@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* =============================================
   AUTOGESTION - MODERN DARK SAAS DESIGN SYSTEM
   ============================================= */

:root {
    /* Core Palette */
    --sidebar-bg:       #0d1117;
    --sidebar-item-hover: rgba(255,255,255,0.06);
    --sidebar-item-active: #1d4ed8;
    --sidebar-text:     #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-border:   rgba(255,255,255,0.06);

    --canvas:           #f0f2f5;
    --surface:          #ffffff;
    --surface-2:        #f8fafc;

    --primary:          #2563eb;
    --primary-light:    #3b82f6;
    --primary-hover:    #1d4ed8;
    --primary-subtle:   rgba(37, 99, 235, 0.1);

    --danger:           #ef4444;
    --danger-bg:        #fef2f2;
    --danger-light:     #fee2e2;

    --success:          #22c55e;
    --success-bg:       #f0fdf4;
    --success-light:    #dcfce7;

    --warning:          #f59e0b;
    --warning-bg:       #fffbeb;

    --ink:              #0f172a;
    --ink-2:            #1e293b;
    --muted:            #64748b;
    --muted-light:      #94a3b8;
    --border:           #e2e8f0;
    --border-light:     #f1f5f9;

    /* Shadows */
    --shadow-xs:    0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:    0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg:    0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-card:  0 0 0 1px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.06);

    /* Border Radius */
    --r-xs:   4px;
    --r-sm:   6px;
    --r-md:   10px;
    --r-lg:   14px;
    --r-xl:   15px;
    --r-pill: 9999px;

    /* Transitions */
    --t-fast:   0.15s ease;
    --t-normal: 0.25s ease;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--canvas);
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }

/* =============================================
   LAYOUT
   ============================================= */
.app-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* =============================================
   SIDEBAR — Dark navy, fixed width
   ============================================= */
.sidebar {
    width: 64px;
    min-width: 64px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    transition: width var(--t-normal);
    overflow: hidden;
    position: relative;
    z-index: 200;
    border-right: 1px solid var(--sidebar-border);
}

.sidebar:hover {
    width: 240px;
}

/* Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 14px 20px 13px;
    border-bottom: 1px solid var(--sidebar-border);
    min-height: 72px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-logo-badge {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity var(--t-normal);
    white-space: nowrap;
}

.sidebar:hover .sidebar-logo-text { opacity: 1; }

.sidebar-logo-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-logo-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--sidebar-text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 13px;
    border-radius: var(--r-md);
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast);
    position: relative;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    text-decoration: none;
}

.nav-link:hover {
    background: var(--sidebar-item-hover);
    color: #ffffff;
}

.nav-link.active {
    background: var(--sidebar-item-active);
    color: #ffffff;
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav-label {
    flex: 1;
    opacity: 0;
    transition: opacity var(--t-normal);
}

.sidebar:hover .nav-label { opacity: 1; }

.nav-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-pill);
    min-width: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity var(--t-normal);
}

.sidebar:hover .nav-badge { opacity: 1; }

.nav-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 8px 12px;
}

/* ── SIDEBAR FOOTER ── */
.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    padding: 10px 14px;
}

/* Inner row — always 212px wide, clipped by sidebar overflow:hidden */
.sidebar-footer-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 212px;     /* sidebar expanded width (240px) minus padding (28px) */
    min-width: 212px;
    flex-shrink: 0;
    height: 48px;
}

/* Avatar — fixed size, always shows */
.sidebar-footer-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

/* Text info */
.sidebar-footer-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--t-normal);
}
.sidebar:hover .sidebar-footer-info {
    opacity: 1;
}

.sidebar-footer-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.sidebar-footer-role {
    font-size: 10.5px;
    font-weight: 400;
    color: #94a3b8;
    white-space: nowrap;
    margin-top: 1px;
}

/* Icon buttons on the right */
.sidebar-footer-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--t-normal);
}
.sidebar:hover .sidebar-footer-actions {
    opacity: 1;
}
.sidebar-footer-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: background var(--t-fast), color var(--t-fast);
    text-decoration: none;
    flex-shrink: 0;
}
.sidebar-footer-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #f1f5f9;
}


/* =============================================
   MAIN
   ============================================= */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* =============================================
   TOPBAR
   ============================================= */
.topbar {
    height: 56px;
    min-height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.topbar-breadcrumb {
    font-size: 11.5px;
    color: var(--muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
    background: var(--surface-2);
    padding: 6px 12px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 6px 14px;
    font-size: 13px;
    color: var(--muted);
    min-width: 180px;
    cursor: text;
}

.topbar-icon-btn {
    width: 32.75px;
    height: 32.75px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    cursor: pointer;
    color: var(--muted);
    transition: border-color var(--t-fast), color var(--t-fast);
    font-size: 16px;
}

.topbar-icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* =============================================
   PAGE CONTENT
   ============================================= */
.page-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    background: var(--canvas);
}

/* =============================================
   TOOLBAR (search + filters row)
   ============================================= */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    max-width: 440px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 9px 16px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    color: var(--ink-2);
    width: 100%;
}

.search-box input::placeholder { color: var(--muted-light); }

.toolbar-spacer { flex: 1; }

.filter-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color var(--t-fast);
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-weight: 500;
}

.filter-dropdown:hover { border-color: var(--primary-light); }
.filter-dropdown:focus { outline: none; border-color: var(--primary); }

.view-toggle {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    color: var(--muted);
    background: transparent;
    border: none;
    transition: background var(--t-fast), color var(--t-fast);
}

.view-btn.active, .view-btn:hover {
    background: var(--primary-subtle);
    color: var(--primary);
}

.btn-new {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--r-lg);
    height: 36px;
    padding: 0 16px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
    box-shadow: 0 2px 8px rgba(37,99,235,0.35);
    white-space: nowrap;
}

.btn-new:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37,99,235,0.45);
    transform: translateY(-1px);
}

.btn-new:active { transform: translateY(0); }

.results-count {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
    font-weight: 500;
}

/* =============================================
   CLIENT CARDS GRID
   ============================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Individual Card */
.client-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.client-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--border);
}

/* ── Card Header ── */
.cc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 16px 16px 0 0;
    gap: 12px;
}

.cc-header--active {
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.cc-header--expired {
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
    border-bottom: 1px solid rgba(239, 68, 68, 0.08);
}

.cc-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.cc-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.cc-header--expired .cc-avatar {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.cc-school-info {
    min-width: 0;
    flex: 1;
}

.cc-school-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.cc-school-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}

/* Card badge */
.cc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.cc-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.cc-badge--active {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}
.cc-badge--active .cc-badge-dot { background: #22c55e; }

.cc-badge--expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}
.cc-badge--expired .cc-badge-dot { background: #ef4444; }

/* ── Card Body ── */
.cc-body {
    padding: 16px 20px 0;
}

.cc-info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cc-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cc-info-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
}

.cc-info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.cc-info-item:last-child .cc-info-content {
    border-bottom: none;
    padding-bottom: 0;
}

.cc-info-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.cc-info-value {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
    text-align: right;
}

/* ── Status Bar ── */
.cc-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 12px 20px 0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.cc-status-bar i { font-size: 14px; }

.cc-status--danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.cc-status--success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

/* ── Card Actions ── */
.cc-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
}

.cc-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.cc-btn--edit {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}
.cc-btn--edit:hover {
    background: rgba(37, 99, 235, 0.15);
}

.cc-btn--delete {
    width: 100%;
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}
.cc-btn--delete:hover {
    background: rgba(239, 68, 68, 0.12);
}

/* Keep old badge/icon/detail/card/school styles for list view */
/* Status badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-expired {
    background: var(--danger-light);
    color: var(--danger);
}
.badge-expired .badge-dot { background: var(--danger); }

.badge-active {
    background: var(--success-light);
    color: #16a34a;
}
.badge-active .badge-dot { background: var(--success); }

/* School Info Row (list view) */
.school-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}

/* Card Actions (legacy) */
.card-actions {
    display: flex;
    gap: 8px;
}

/* =============================================
   UTILITY CLASSES (Grid vs List View toggles)
   ============================================= */
.list-only { display: none !important; }

/* In list view, flip what is shown */
.list-view .list-only { display: block !important; }
.list-view .grid-only { display: none !important; }
.list-view .badge.list-only { display: inline-flex !important; }

/* Typography utilities */
.text-muted { color: var(--muted); }
.text-sm { font-size: 12.5px; }
.font-semibold { font-weight: 600; }
.text-right { text-align: right; }
.text-danger { color: var(--danger) !important; }

/* =============================================
   LIST HEADER
   ============================================= */
.list-header {
    display: grid;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--r-md) var(--r-md) 0 0;
    padding: 14px 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-items: center;
    gap: 20px;
    /* Grid layout matching cards - Responsive */
    grid-template-columns: minmax(180px, 1.5fr) minmax(140px, 1.2fr) minmax(120px, 1fr) 110px 100px 90px 90px 90px 130px;
    gap: 16px;
}

/* =============================================
   LIST VIEW STYLES
   ============================================= */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    overflow: hidden;
}

.list-view .client-card {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) minmax(140px, 1.2fr) minmax(120px, 1fr) 110px 100px 90px 90px 90px 130px;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-light);
    box-shadow: none;
    margin: 0;
}

.list-view .client-card:last-child {
    border-bottom: none;
}

.list-view .client-card:hover {
    transform: none;
    box-shadow: none;
    background: var(--surface-2);
}

.list-view .client-card::before {
    display: none;
}

/* Ensure columns don't overflow */
.col-client, .col-ecole, .col-phone, .col-abo, .col-price, .col-insc, .col-exp, .col-etat {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.list-view .card-school {
    background: transparent;
    border: none;
    padding: 0;
}

.list-view .col-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Badge variants */
.badge-premium {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.badge-premium .badge-dot { background: #ef4444; }

/* Icon buttons (Action buttons) */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--t-fast);
}

.btn-icon:hover {
    background: var(--canvas);
    color: var(--ink);
    border-color: var(--border-light);
}

.btn-icon-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-light);
}

/* Grid view button styles */
.cards-grid:not(.list-view) .btn-icon {
    flex: 1;
    width: auto;
    height: auto;
    padding: 10px;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--r-md);
}

.cards-grid:not(.list-view) .btn-view-profile {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: none;
}

.cards-grid:not(.list-view) .btn-view-profile:hover {
    background: rgba(59, 130, 246, 0.15);
}

.cards-grid:not(.list-view) .btn-icon-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
}

.cards-grid:not(.list-view) .btn-icon-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

.cards-grid:not(.list-view) .btn-icon i {
    font-size: 16px;
}

.card-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px -24px;
}

/* =============================================
   AUTH PAGE
   ============================================= */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0d1117 0%, #0f172a 50%, #1e1b4b 100%);
    padding: 20px;
}

.auth-card {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--r-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.auth-logo-badge {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: white;
    box-shadow: 0 8px 24px rgba(59,130,246,0.5);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-md);
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.form-input::placeholder { color: #475569; }

.form-error {
    color: #f87171;
    font-size: 12px;
    margin-top: 6px;
}

.btn-auth {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: var(--r-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 4px 16px rgba(37,99,235,0.45);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
    letter-spacing: 0.01em;
}

.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.55);
}

.btn-auth:active { transform: translateY(0); }

/* =============================================
   DASHBOARD SIMPLE
   ============================================= */
.dashboard-welcome {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    border-radius: var(--r-xl);
    padding: 32px;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.dashboard-welcome::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.dashboard-welcome h2 {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
}

.dashboard-welcome p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* =============================================
   MODAL & FORMS (Dashboard)
   ============================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--surface);
    width: 100%;
    max-width: 600px;
    border-radius: var(--r-xl);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
    transform: translateY(20px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}
.btn-close:hover {
    background: var(--canvas);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.dashboard-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.dashboard-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
}

.dashboard-input, .dashboard-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--ink);
    font-size: 13.5px;
    font-family: inherit;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.dashboard-input:focus, .dashboard-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: var(--canvas);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
}

.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-2);
    padding: 10px 16px;
    border-radius: var(--r-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 13.5px;
    transition: background var(--t-fast);
}
.btn-secondary:hover {
    background: var(--border-light);
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: var(--r-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 13.5px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    transition: background var(--t-fast);
}
.btn-primary:hover {
    background: var(--primary-hover);
}

/* =============================================
   RESPONSIVE - Client Cards Grid
   ============================================= */
@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .cc-header { padding: 12px 14px; }
    .cc-body   { padding: 12px 14px 0; }
    .cc-actions { padding: 12px 14px; }
    .cc-status-bar { margin: 10px 14px 0; }
    .cc-school-name { font-size: 13px; }
    .cc-info-icon { width: 24px; height: 24px; min-width: 24px; font-size: 12px; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1441px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}
