/* NEXTSET - GENERAL */

/* Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

:root {
    /* === COLORS === */
    /* primary */
    --primary: #ffa500;
    --primary-bg: #fff9f0;
    --orange: #ffa500;
    --orange-light: #fff8f0;
    --orange-bg: rgba(255, 165, 0, 0.1);
    /* secondary */
    --secondary: #1f2937;
    --secondary-hover: #1f2937;
    --secondary-light: #3da9ff;
    --secondary-bg: #f0f8ff;
    --dark-blue: #1f2937;
    /* neutrals */
    --black: #222222;
    --gray-dark: #444444;
    --gray: #666666;
    --gray-light: #999999;
    --gray-lighter: #cccccc;
    --gray-lightest: #e8e8e8;
    --white: #ffffff;
    --off-white: #fafafa;
    --light-bg: #f7f7f7;
    /* status */
    --success: #22c55e;
    --success-hover: #16a34a;
    --success-bg: #f0fdf4;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-bg: #fffbeb;
    --error: #ef4444;
    --error-hover: #dc2626;
    --error-bg: #fef2f2;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-hover: #2563eb;
    --info-bg: #eff6ff;
    /* additional colors */
    --purple: #7c3aed;
    --purple-bg: rgba(124, 58, 237, 0.1);
    --indigo: #6366f1;
    --indigo-bg: #e0e7ff;

    /* === STATUS BADGE COLORS (solid bg, white text) === */
    --status-active: #16a34a;
    --status-trial: #6366f1;
    --status-covered: #7c3aed;
    --status-inactive: #6b7280;
    --status-paid: #16a34a;
    --status-pending: #f59e0b;
    --status-failed: #ef4444;
    --status-draft: #6b7280;

    /* === ROLE COLORS === */
    /* Admin - Authority / critical control */
    --role-admin: #dc2626;
    --role-admin-light: rgba(220, 38, 38, 0.1);
    --role-admin-hover: #b91c1c;
    /* Club Manager - Organization / oversight */
    --role-manager: #3b82f6;
    --role-manager-light: rgba(59, 130, 246, 0.1);
    --role-manager-hover: #2563eb;
    /* Coach - Purple / expertise / guidance */
    --role-coach: #7c3aed;
    --role-coach-light: rgba(124, 58, 237, 0.1);
    --role-coach-hover: #6d28d9;
    /* Player - Energy / engagement */
    --role-player: #ffa500;
    --role-player-light: rgba(255, 165, 0, 0.1);
    --role-player-hover: #e69500;
    /* Academy - Blue / trust / organization */
    --role-academy: #3b82f6;
    --role-academy-light: rgba(59, 130, 246, 0.1);
    --role-academy-hover: #2563eb;
    /* User - Neutral / limited access */
    --role-user: #64748b;
    --role-user-light: rgba(100, 116, 139, 0.1);
    --role-user-hover: #475569;

    /* === UI ELEMENTS === */
    /* borders */
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --border-focus: #ffa500;
    /* shadow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    /* overlay */
    --overlay: rgba(0, 0, 0, 0.6);

    /* === LAYOUT === */
    --sidebar-width: 250px;
    --header-height: 60px;
    --content-max-width: 1200px;

    /* === SPACING === */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* === RADIUS === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* === FONT SIZES === */
    --fs-h1: 2.5rem;
    --fs-h2: 2rem;
    --fs-h3: 1.25rem;
    --fs-p: 1rem;
    --fs-small: 0.875rem;
    --fs-tiny: 0.75rem;
    --fs-button: 1.2rem;
    --fs-ul: 1rem;
    --fs-li: 1rem;
    --fs-a: 1rem;

    /* === LINE HEIGHTS === */
    --lh-heading: 1.2;
    --lh-body: 1.5;
    --lh-tight: 1.4;

    /* === TRANSITIONS === */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* === INPUTS === */
    --input-padding: 0.875rem 1rem;
    --input-padding-sm: 0.5rem 0.75rem;
    --input-font-size: 1rem;
    --input-border-width: 2px;
}

/* === TEXTS === */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--fs-p);
    line-height: var(--lh-body);
    color: var(--black);
    background-color: var(--white);
}
h1 {
    font-size: var(--fs-h1);
    line-height: var(--lh-heading);
    color: var(--primary);
}
h2 {
    font-size: var(--fs-h2);
    line-height: var(--lh-heading);
    color: var(--black);
    margin-bottom: 0.25rem;
}
h2 + p {
    margin-top: 0;
}
.section-subtitle {
    color: var(--gray);
    font-size: 1rem;
    margin-bottom: 2rem;
}
h3 {
    font-size: var(--fs-h3);
    line-height: var(--lh-heading);
    color: var(--gray);
}
p {
    font-size: var(--fs-p);
}
ul {
    font-size: var(--fs-ul);
    list-style: none;
}
li {
    font-size: var(--fs-li);
}

/* === LINKS === */
a {
    font-size: var(--fs-a);
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s ease;
}
a:hover:not(.btn-primary):not(.btn-secondary):not(.btn-plan):not(.cta-btn):not(.cta-btn-primary):not(.cta-btn-secondary):not(.nav-link):not(.mobile-nav-link):not(.dropdown-item):not(.logo-link):not(.btn-login):not(.btn-signup):not(.mobile-btn-login):not(.mobile-btn-signup):not(.toggle-btn):not(.action-btn):not(.action-primary):not(.action-outline):not(.back-link):not(.social-link):not(.footer-links a):not(.footer-contact a):not(.footer-legal a) {
    color: var(--secondary);
}
/* Prevent underlines on main website pages */
a:hover {
    text-decoration: none;
}
/* Ensure button links have correct colors */
a.btn-primary,
a.action-primary {
    color: white;
}
a.action-outline {
    color: var(--primary);
}
a.action-outline:hover,
a.btn-primary:hover,
a.action-primary:hover {
    color: white;
}

/* === IMAGES === */
img {
    width: auto;
    height: 100%;
}

/* === BUTTONS === */
/* Base button reset */
button {
    border: none;
    font-family: inherit;
    cursor: pointer;
}

/* === ICONS === */
.icon-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.icon-small svg {
    width: 16px;
    height: 16px;
    display: block;
}
.icon-medium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.icon-medium svg {
    width: 20px;
    height: 20px;
    display: block;
}
.icon-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.icon-large svg {
    width: 24px;
    height: 24px;
    display: block;
}
.icon-xlarge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.icon-xlarge svg {
    width: 32px;
    height: 32px;
    display: block;
}

/* === FORMS === */
.form-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}
.form-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black);
    margin: 0;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: block;
}
.form-group label::after {
    content: ' *';
    color: var(--danger);
    font-weight: 700;
}
.form-group label[for]:not([required])::after {
    content: '';
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    color: var(--black);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray);
}
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A4A4A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}
.form-group small {
    color: var(--gray);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: block;
}
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}
.form-actions.full-width {
    grid-column: 1 / -1;
}

/* === FORM BUTTONS === */
.btn-primary,
.btn-secondary,
.btn-tertiary,
.btn-danger,
.btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid transparent;
}
/* primary */
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    color: white;
}
/* secondary */
.btn-secondary {
    background: var(--white);
    color: var(--black);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: translateY(-2px);
}
/* tertiary */
.btn-tertiary {
    background: var(--light-bg);
    color: var(--black);
    border-color: var(--border);
}
.btn-tertiary:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: translateY(-2px);
}
/* danger, delete, cancel */
.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
}
/* text link button */
.btn-text {
    background: transparent;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border: none;
}
.btn-text:hover {
    background: rgba(255, 165, 0, 0.1);
    color: var(--secondary);
}
/* icon button */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}
.btn-icon svg {
    stroke: white;
}
.btn-icon:hover {
    background: var(--secondary);
    transform: scale(1.05);
}
.btn-icon-danger {
    background: var(--danger);
}
.btn-icon-danger:hover {
    background: var(--secondary);
}
/* sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--fs-small);
}
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}
/* full width */
.btn-full {
    width: 100%;
}
/* Disabled State (all buttons) */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-tertiary:disabled,
.btn-danger:disabled,
.btn-text:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-primary:disabled:hover,
.btn-secondary:disabled:hover,
.btn-tertiary:disabled:hover,
.btn-danger:disabled:hover {
    transform: none;
}

/* === FORM INPUTS === */
input[type="range"] {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
    transition: all 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    background: #E68600;
    transform: scale(1.2);
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}
input[type="range"]::-moz-range-thumb:hover {
    background: #E68600;
    transform: scale(1.2);
}
input[type="range"]::-webkit-slider-runnable-track {
    background: var(--border);
    border-radius: 4px;
    height: 8px;
}
input[type="range"]::-moz-range-track {
    background: var(--border);
    border-radius: 4px;
    height: 8px;
}
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--dark-blue);
}

/* === FORM VALIDATION === */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--danger);
}
.form-group .error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* === ALERTS === */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.alert svg {
    flex-shrink: 0;
}
.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-left: 4px solid #2563eb;
}
.alert-warning {
    background: rgba(249, 115, 22, 0.1);
    color: #ea580c;
    border-left: 4px solid #ea580c;
}

/* === RESPONSIVENESS === */
@media screen and (min-width: 425px) {
    :root {
        --fs-h1: 2.5rem;
        --fs-h2: 1.75rem;
        --fs-h3: 1.6rem;
        --fs-p: 1.05rem;
    }
}

@media screen and (min-width: 769px) {
    :root {
        --fs-h1: 2.75rem;
        --fs-h2: 2rem;
        --fs-h3: 1.6rem;
        --fs-p: 1.125rem;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-section {
        padding: 2rem;
    }
    .form-header h2 {
        font-size: 1.5rem;
    }
    .form-actions {
        flex-direction: row;
    }
    .btn-primary,
    .btn-secondary,
    .btn-text {
        width: auto;
    }
}

@media screen and (min-width: 1025px) {
    :root {
        --fs-h1: 3rem;
        --fs-h2: 2.5rem;
        --fs-h3: 2rem;
        --fs-p: 1.25rem;
    }
}

/* === ROLE BADGES === */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.role-badge.admin {
    background: var(--role-admin);
    color: white;
    border: none;
}
.role-badge.club_manager,
.role-badge.manager {
    background: var(--role-manager);
    color: white;
    border: none;
}
.role-badge.coach {
    background: var(--role-coach);
    color: white;
    border: none;
}
.role-badge.player {
    background: var(--role-player);
    color: white;
    border: none;
}
.role-badge.user,
.role-badge.none {
    background: var(--role-user);
    color: white;
    border: none;
}

/* === ROLE AVATARS === */
.role-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    text-transform: uppercase;
}
.role-avatar.admin {
    background: var(--role-admin);
    color: white;
    border: none;
}
.role-avatar.club_manager,
.role-avatar.manager {
    background: var(--role-manager);
    color: white;
    border: none;
}
.role-avatar.coach {
    background: var(--role-coach);
    color: white;
    border: none;
}
.role-avatar.player {
    background: var(--role-player);
    color: white;
    border: none;
}
.role-avatar.user,
.role-avatar.none {
    background: var(--role-user);
    color: white;
    border: none;
}

/* Avatar sizes */
.role-avatar.sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}
.role-avatar.md {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
}
.role-avatar.lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}
.role-avatar.xl {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-tiny);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-orange {
    background: var(--role-player);
    color: white;
}
.badge-blue {
    background: var(--role-manager);
    color: white;
}
.badge-green {
    background: var(--success);
    color: white;
}
.badge-red {
    background: var(--danger);
    color: white;
}
.badge-gray {
    background: var(--gray);
    color: white;
}
.badge-warning {
    background: var(--warning);
    color: white;
}
.badge-purple {
    background: var(--role-coach);
    color: white;
}
.badge-success {
    background: var(--success);
    color: white;
}
.badge-admin {
    background: var(--role-admin);
    color: white;
}

/* === CARDS === */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 2px solid var(--border);
}
a.card:hover,
.card.clickable:hover {
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--border-light);
}
.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    backdrop-filter: blur(6px);
}
.modal.active {
    display: flex;
}
.modal-content {
    background: var(--off-white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.25s ease;
    scrollbar-width: none;
    box-shadow: var(--shadow-lg);
}
.modal-content::-webkit-scrollbar {
    display: none;
}
.modal-content.modal-large {
    max-width: 700px;
}
.modal-content.modal-small {
    max-width: 400px;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border);
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-header h2,
.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black);
}
.modal-close {
    background: var(--light-bg);
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    line-height: 1;
}
.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}
.modal-body {
    padding: var(--space-xl);
    background: var(--off-white);
}
.modal-body p {
    color: var(--gray-dark);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}
.modal-body p:last-child {
    margin-bottom: 0;
}
.modal-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-sm);
    padding: var(--space-xl);
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    background: var(--white);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.modal-actions button {
    width: 100%;
}
/* Modal Icon (for confirmation modals) */
.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}
.modal-icon svg {
    width: 28px;
    height: 28px;
}
.modal-icon.success {
    background: var(--success-bg);
}
.modal-icon.success svg {
    stroke: var(--success);
}
.modal-icon.danger {
    background: var(--danger-bg);
}
.modal-icon.danger svg {
    stroke: var(--danger);
}
.modal-icon.warning {
    background: var(--warning-bg);
}
.modal-icon.warning svg {
    stroke: var(--warning);
}
.modal-icon.info {
    background: var(--info-bg);
}
.modal-icon.info svg {
    stroke: var(--info);
}

/* === STAT CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
}
.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--light-bg);
}
.stat-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--secondary);
}
.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--black);
    line-height: 1.2;
}
.stat-label {
    font-size: var(--fs-tiny);
    color: var(--gray);
    font-weight: 500;
    line-height: 1.2;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}
.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    color: var(--gray-light);
    opacity: 0.5;
}
.empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}
.empty-state h3 {
    color: var(--gray-dark);
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
}
.empty-state p {
    color: var(--gray);
    font-size: var(--fs-p);
    margin-bottom: var(--space-lg);
}

/* === SECTION === */
.section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border: 2px solid var(--border);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--border-light);
}
.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* === TABLES === */
.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border);
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead {
    background: var(--light-bg);
    border-bottom: 2px solid var(--border);
}
th {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}
tbody tr:last-child {
    border-bottom: none;
}
tbody tr:hover {
    background: var(--light-bg);
}
td {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--fs-small);
}

/* === PAGE HEADER === */
.page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    gap: var(--space-md);
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
}
.page-header p {
    color: var(--gray);
    font-size: 0.95rem;
}
.page-header > div:first-child {
    display: flex;
    flex-direction: column;
}
.page-header .btn-primary,
.page-header .btn-secondary {
    width: 100%;
}

/* === SEARCH BOX === */
.search-box {
    position: relative;
    max-width: 100%;
    margin-bottom: var(--space-md);
    display: flex;
    justify-content: center;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-box input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 3rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--fs-p);
    transition: border-color var(--transition-base);
}
.search-box input:focus {
    outline: none;
    border-color: var(--secondary);
}

/* === LOADING SPINNER === */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spinner-dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--secondary);
}

/* === RESPONSIVE UTILITIES === */
@media (min-width: 769px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .page-header h1 {
        font-size: 2.5rem;
    }
    .page-header .btn-primary,
    .page-header .btn-secondary {
        width: auto;
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .modal-actions {
        flex-direction: row;
    }
    .modal-actions button {
        width: auto;
    }
    .search-box {
        max-width: 400px;
    }
    .section {
        padding: var(--space-xl);
    }
}

/* === HIDE/SHOW UTILITIES === */
.hidden {
    display: none !important;
}
.visible {
    display: block !important;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === TEXT UTILITIES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--gray); }

/* === SPACING UTILITIES === */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

/* === FLEX UTILITIES === */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }
