/* ============================================================
   STEP 1 — DESIGN TOKENS (extracted from 9quotes project)
   ============================================================ */
:root {
    /* Backgrounds */
    --bg-body:          #070b19;
    --bg-base:          #0b0f19;
    --bg-deep:          #020617;
    --bg-surface:       #111b2d;
    --bg-panel:         rgba(15, 23, 42, 0.6);
    --bg-card:          rgba(30, 41, 59, 0.45);
    --bg-card-hover:    rgba(30, 41, 59, 0.65);
    --bg-input:         #0f172a;
    --bg-sidebar:       #060a14;
    --bg-header:        rgba(15, 23, 42, 0.75);

    /* Text */
    --text-primary:     #f8fafc;
    --text-heading:     #ffffff;
    --text-body:        #cbd5e1;
    --text-muted:       #94a3b8;
    --text-faint:       #94a3b8;
    --text-link:        #34d399;

    /* Accent — Emerald (primary brand color) */
    --accent-50:        #ecfdf5;
    --accent-100:       #d1fae5;
    --accent-200:       #a7f3d0;
    --accent-300:       #6ee7b7;
    --accent-400:       #34d399;
    --accent-500:       #10b981;
    --accent-600:       #059669;
    --accent-700:       #047857;
    --accent-800:       #065f46;
    --accent-900:       #064e3b;
    --accent-950:       #022c22;

    /* Purple (secondary) */
    --purple-400:       #c084fc;
    --purple-500:       #a855f7;
    --purple-600:       #9333ea;
    --purple-800:       #6b21a8;
    --purple-950:       #3b0764;

    /* Semantic */
    --danger-400:       #f87171;
    --danger-500:       #ef4444;
    --danger-600:       #dc2626;
    --danger-950:       #450a0a;
    --warning-400:      #fbbf24;
    --warning-500:      #f59e0b;
    --warning-950:      #451a03;
    --info-400:         #60a5fa;
    --info-500:         #3b82f6;
    --info-950:         #172554;
    --success-400:      #34d399;
    --success-500:      #10b981;
    --success-950:      #022c22;

    /* Borders */
    --border-default:   rgba(255, 255, 255, 0.05);
    --border-card:      rgba(255, 255, 255, 0.08);
    --border-input:     #1e293b;
    --border-accent:    rgba(16, 185, 129, 0.4);
    --border-hover:     rgba(16, 185, 129, 0.4);

    /* Shadows */
    --shadow-card:      0 10px 30px -10px rgba(16, 185, 129, 0.15);
    --shadow-panel:     0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-btn:       0 10px 15px -3px rgba(5, 150, 105, 0.2);

    /* Typography */
    --font-family:      'Plus Jakarta Sans', sans-serif;
    --font-mono:        ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

    --fs-xs:            0.75rem;    /* 12px */
    --fs-sm:            0.875rem;   /* 14px */
    --fs-base:          1rem;       /* 16px */
    --fs-lg:            1.125rem;   /* 18px */
    --fs-xl:            1.25rem;    /* 20px */
    --fs-2xl:           1.5rem;     /* 24px */
    --fs-3xl:           1.875rem;   /* 30px */
    --fs-4xl:           2.25rem;    /* 36px */

    --fw-light:         300;
    --fw-regular:       400;
    --fw-medium:        500;
    --fw-semibold:      600;
    --fw-bold:          700;
    --fw-extrabold:     800;

    /* Spacing */
    --sp-1:             0.25rem;    /* 4px */
    --sp-2:             0.5rem;     /* 8px */
    --sp-3:             0.75rem;    /* 12px */
    --sp-4:             1rem;       /* 16px */
    --sp-5:             1.25rem;    /* 20px */
    --sp-6:             1.5rem;     /* 24px */
    --sp-8:             2rem;       /* 32px */
    --sp-10:            2.5rem;     /* 40px */
    --sp-12:            3rem;       /* 48px */

    /* Radius */
    --radius-sm:        0.375rem;   /* 6px */
    --radius-md:        0.5rem;     /* 8px */
    --radius-lg:        0.75rem;    /* 12px */
    --radius-xl:        1rem;       /* 16px */
    --radius-2xl:       1.5rem;     /* 24px */
    --radius-full:      9999px;

    /* Layout */
    --sidebar-w:        240px;
    --sidebar-collapsed: 64px;
    --header-h:         64px;

    /* Transitions */
    --transition-fast:  150ms ease;
    --transition-base:  200ms ease;
    --transition-slow:  300ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-body);
    font-size: var(--fs-sm);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--accent-300); }

img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-600); }

/* ============================================================
   SECTION MARKERS
   ============================================================ */
.section-divider {
    border: none;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
    margin: var(--sp-12) 0 var(--sp-8);
}
.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-400);
    background: var(--accent-950);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: var(--sp-1) var(--sp-3);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sp-6);
}
.subsection-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: var(--sp-3);
    margin-top: var(--sp-6);
}

/* ============================================================
   LAYOUT — SIDEBAR
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-default);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-slow);
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-logo {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 var(--sp-5);
    border-bottom: 1px solid var(--border-default);
    gap: var(--sp-3);
    flex-shrink: 0;
}
.sidebar-logo .logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-weight: var(--fw-extrabold);
    font-size: var(--fs-sm);
    color: white;
    flex-shrink: 0;
}
.sidebar-logo .logo-text {
    font-weight: var(--fw-extrabold);
    font-size: var(--fs-base);
    color: var(--text-heading);
    white-space: nowrap;
}
.sidebar.collapsed .logo-text { display: none; }

.sidebar-nav { flex: 1; padding: var(--sp-4) 0; }
.nav-group-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
    padding: var(--sp-4) var(--sp-5) var(--sp-2);
    white-space: nowrap;
}
.sidebar.collapsed .nav-group-label { display: none; }

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-5);
    margin: 1px var(--sp-3);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
}
.nav-item:hover {
    background: rgba(30, 41, 59, 0.5);
    color: var(--text-primary);
}
.nav-item.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-400);
    font-weight: var(--fw-semibold);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--sp-3));
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-500);
    border-radius: var(--radius-full);
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar.collapsed .nav-item span { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: var(--sp-3); }

.nav-badge {
    margin-left: auto;
    background: var(--danger-600);
    color: white;
    font-size: 10px;
    font-weight: var(--fw-bold);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    line-height: 1.5;
}
.sidebar.collapsed .nav-badge { display: none; }

.sidebar-toggle {
    border-top: 1px solid var(--border-default);
    padding: var(--sp-3);
    display: flex;
    justify-content: flex-end;
}
.sidebar.collapsed .sidebar-toggle {
    justify-content: center;
}
.sidebar-toggle button {
    background: transparent;
    border: 1px solid var(--border-input);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    padding: var(--sp-2);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle button:hover { color: var(--accent-400); border-color: var(--border-accent); }
.sidebar-toggle button svg { width: 18px; height: 18px; }

/* ============================================================
   LAYOUT — MAIN WRAPPER
   ============================================================ */
.main-wrapper {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    transition: margin-left var(--transition-slow);
}
.sidebar.collapsed ~ .main-wrapper { margin-left: var(--sidebar-collapsed); }

/* ============================================================
   LAYOUT — TOP HEADER BAR
   ============================================================ */
.top-header {
    height: var(--header-h);
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-6);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb .sep { color: var(--text-faint); }
.breadcrumb .current { color: var(--text-primary); font-weight: var(--fw-semibold); }

.header-search {
    position: relative;
    width: 280px;
}
.header-search input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    padding: var(--sp-2) var(--sp-4);
    padding-left: 36px;
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-family: var(--font-family);
    outline: none;
    transition: border-color var(--transition-fast);
}
.header-search input::placeholder { color: var(--text-faint); }
.header-search input:focus { border-color: var(--accent-500); }
.header-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-faint);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}
.header-icon-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--sp-2);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}
.header-icon-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.header-icon-btn svg { width: 20px; height: 20px; }
.header-icon-btn .notif-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--danger-500);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-body);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    cursor: pointer;
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}
.user-menu:hover { background: rgba(255,255,255,0.05); }
.user-avatar {
    width: 32px; height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-600), var(--accent-400));
    display: flex; align-items: center; justify-content: center;
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    color: white;
}
.user-menu .user-name {
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    font-size: var(--fs-sm);
}
.user-menu .user-role {
    font-size: var(--fs-xs);
    color: var(--text-faint);
}

/* Main content area */
.page-content {
    padding: var(--sp-8);
}

.page-title {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-extrabold);
    color: var(--text-heading);
    margin-bottom: var(--sp-2);
}
.page-subtitle {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-8);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, .h1 { font-size: var(--fs-4xl); font-weight: var(--fw-extrabold); color: var(--text-heading); line-height: 1.1; letter-spacing: -0.025em; }
h2, .h2 { font-size: var(--fs-3xl); font-weight: var(--fw-extrabold); color: var(--text-heading); line-height: 1.2; letter-spacing: -0.02em; }
h3, .h3 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); color: var(--text-heading); line-height: 1.3; }
h4, .h4 { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--text-heading); line-height: 1.4; }
.text-body { font-size: var(--fs-sm); color: var(--text-body); }
.text-small { font-size: var(--fs-xs); }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-label {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.text-accent { color: var(--accent-400); }
.font-mono { font-family: var(--font-mono); }

/* ============================================================
   COMPONENTS — BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--radius-lg);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}
.btn svg { width: 16px; height: 16px; }

.btn-sm { padding: var(--sp-1) var(--sp-3); font-size: var(--fs-xs); }
.btn-md { padding: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); }
.btn-lg { padding: var(--sp-3) var(--sp-6); font-size: var(--fs-base); }

.btn-primary {
    background: var(--accent-600);
    color: white;
    box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: var(--accent-500); }

.btn-secondary {
    background: var(--bg-input);
    border-color: var(--border-input);
    color: var(--text-body);
}
.btn-secondary:hover { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-accent); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.btn-danger {
    background: var(--danger-600);
    color: white;
}
.btn-danger:hover { background: var(--danger-500); }

/* ============================================================
   COMPONENTS — BADGES / STATUS PILLS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: 2px var(--sp-3);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-family: var(--font-mono);
}
.badge-success { background: rgba(16,185,129,0.1); color: var(--success-400); border: 1px solid rgba(16,185,129,0.3); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning-400); border: 1px solid rgba(245,158,11,0.3); }
.badge-danger  { background: rgba(239,68,68,0.1);  color: var(--danger-400);  border: 1px solid rgba(239,68,68,0.3); }
.badge-info    { background: rgba(59,130,246,0.1);  color: var(--info-400);    border: 1px solid rgba(59,130,246,0.3); }
.badge-neutral { background: rgba(100,116,139,0.15); color: var(--text-muted); border: 1px solid rgba(100,116,139,0.3); }

/* ============================================================
   COMPONENTS — FORM INPUTS
   ============================================================ */
.form-group { margin-bottom: var(--sp-5); }
.form-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-body);
    margin-bottom: var(--sp-2);
}
.form-helper {
    font-size: var(--fs-xs);
    color: var(--text-faint);
    margin-top: var(--sp-1);
}
.form-error {
    font-size: var(--fs-xs);
    color: var(--danger-400);
    margin-top: var(--sp-1);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    padding: var(--sp-2) var(--sp-3);
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-family: var(--font-family);
    outline: none;
    transition: border-color var(--transition-fast);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-faint); }
.form-input.has-error,
.form-select.has-error { border-color: var(--danger-500); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 36px; }

.form-check {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--text-body);
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 16px; height: 16px;
    accent-color: var(--accent-500);
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-input);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; top: 3px;
    background: white;
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-600); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ============================================================
   COMPONENTS — CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: var(--sp-6);
    transition: all var(--transition-base);
}
.card:hover { border-color: rgba(255,255,255,0.12); }

.card-clickable:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--sp-4);
    border-bottom: 1px solid var(--border-default);
    margin-bottom: var(--sp-4);
}
.card-header h4 { font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--text-heading); }
.card-footer {
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-default);
    margin-top: var(--sp-4);
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-3);
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}
.stat-card .stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
}
.stat-card .stat-icon svg { width: 20px; height: 20px; }
.stat-card .stat-icon.emerald { background: rgba(16,185,129,0.1); color: var(--accent-400); border: 1px solid rgba(16,185,129,0.2); }
.stat-card .stat-icon.blue    { background: rgba(59,130,246,0.1);  color: var(--info-400);    border: 1px solid rgba(59,130,246,0.2); }
.stat-card .stat-icon.purple  { background: rgba(168,85,247,0.1);  color: var(--purple-400);  border: 1px solid rgba(168,85,247,0.2); }
.stat-card .stat-icon.orange  { background: rgba(245,158,11,0.1);  color: var(--warning-400); border: 1px solid rgba(245,158,11,0.2); }
.stat-card .stat-value { font-size: var(--fs-3xl); font-weight: var(--fw-extrabold); color: var(--text-heading); line-height: 1; }
.stat-card .stat-label { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-medium); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .stat-trend { font-size: var(--fs-xs); font-weight: var(--fw-semibold); display: flex; align-items: center; gap: var(--sp-1); }
.stat-card .stat-trend.up { color: var(--success-400); }
.stat-card .stat-trend.down { color: var(--danger-400); }

/* ============================================================
   COMPONENTS — TABLES
   ============================================================ */
.table-wrapper {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: var(--fs-sm);
}
.table-wrapper thead {
    background: rgba(2, 6, 23, 0.5);
}
.table-wrapper th {
    padding: var(--sp-3) var(--sp-4);
    font-size: 11px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
}
.table-wrapper th.sortable { cursor: pointer; user-select: none; }
.table-wrapper th.sortable:hover { color: var(--text-primary); }
.table-wrapper td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-body);
}
.table-wrapper tbody tr { transition: background var(--transition-fast); }
.table-wrapper tbody tr:hover { background: rgba(30, 41, 59, 0.3); }

.table-striped tbody tr:nth-child(even) { background: rgba(15, 23, 42, 0.3); }
.table-striped tbody tr:nth-child(even):hover { background: rgba(30, 41, 59, 0.4); }

.table-actions {
    display: flex;
    gap: var(--sp-2);
}
.table-actions button,
.table-actions a {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--sp-1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    text-decoration: none;
    align-items: center;
    justify-content: center;
}
.table-actions button:hover,
.table-actions a:hover { color: var(--accent-400); background: rgba(255,255,255,0.05); }
.table-actions button svg,
.table-actions a svg { width: 16px; height: 16px; }

/* ============================================================
   COMPONENTS — MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}
.modal-overlay[hidden] { display: none; }
.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-panel);
    width: 100%;
    max-width: 448px;
    padding: var(--sp-6);
    color: var(--text-primary);
}
.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-panel);
    width: 100%;
    max-width: 480px;
    padding: var(--sp-6);
    color: var(--text-primary);
}
.modal-card h3 { margin: 0 0 var(--sp-3) 0; font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.modal-card p { margin: 0 0 var(--sp-3) 0; }
.modal-card label { display: block; margin-top: var(--sp-3); }
.modal-card textarea { width: 100%; padding: var(--sp-2); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elevated); color: var(--text-primary); margin-top: var(--sp-1); resize: vertical; min-height: 80px; font-family: inherit; }
.modal-card .modal-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; margin-top: var(--sp-4); }
.modal-md { max-width: 560px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-5) var(--sp-6);
    border-bottom: 1px solid var(--border-default);
}
.modal-header h3 { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--sp-1);
    border-radius: var(--radius-sm);
    display: flex;
}
.modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: var(--sp-6); }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-6);
    border-top: 1px solid var(--border-default);
}

/* ============================================================
   COMPONENTS — ALERTS / TOASTS
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    border-radius: var(--radius-lg);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-3);
}
.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: var(--success-400); }
.alert-warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); color: var(--warning-400); }
.alert-danger  { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.2);  color: var(--danger-400); }
.alert-info    { background: rgba(59,130,246,0.08);  border: 1px solid rgba(59,130,246,0.2);  color: var(--info-400); }

.alert .alert-title { font-weight: var(--fw-semibold); color: var(--text-primary); }
.alert .alert-text  { color: var(--text-body); }

.toast-container { position: fixed; top: var(--sp-6); right: var(--sp-6); z-index: 60; display: flex; flex-direction: column; gap: var(--sp-3); }
.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: var(--sp-4) var(--sp-5);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    box-shadow: var(--shadow-panel);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
.toast.toast-success svg { color: var(--success-400); }
.toast.toast-warning svg { color: var(--warning-400); }
.toast.toast-danger svg  { color: var(--danger-400); }
.toast.toast-info svg    { color: var(--info-400); }
.toast .toast-message { flex: 1; font-size: var(--fs-sm); color: var(--text-body); }
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   COMPONENTS — TABS
   ============================================================ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-default);
}
.tab-item {
    padding: var(--sp-3) var(--sp-5);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    font-family: var(--font-family);
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: -1px;
    white-space: nowrap;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active {
    color: var(--accent-400);
    border-bottom-color: var(--accent-500);
    font-weight: var(--fw-semibold);
}

/* ============================================================
   COMPONENTS — BREADCRUMB (standalone)
   ============================================================ */
.breadcrumb-standalone {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-6);
}
.breadcrumb-standalone a { color: var(--text-muted); display: flex; align-items: center; }
.breadcrumb-standalone a:hover { color: var(--text-primary); }
.breadcrumb-standalone a svg { width: 16px; height: 16px; }
.breadcrumb-standalone .sep { color: var(--text-faint); }
.breadcrumb-standalone .current { color: var(--text-primary); font-weight: var(--fw-semibold); }

/* ============================================================
   COMPONENTS — PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
}
.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.pagination-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.pagination-btn.active { background: var(--accent-600); color: white; }
.pagination-btn.disabled { opacity: 0.3; cursor: not-allowed; }
.pagination-btn svg { width: 16px; height: 16px; }

/* ============================================================
   COMPONENTS — EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: var(--sp-12) var(--sp-8);
}
.empty-state .empty-icon {
    width: 64px; height: 64px;
    margin: 0 auto var(--sp-6);
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-faint);
}
.empty-state .empty-icon svg { width: 28px; height: 28px; }
.empty-state h4 { font-size: var(--fs-lg); color: var(--text-heading); margin-bottom: var(--sp-2); }
.empty-state p { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-6); max-width: 360px; margin-left: auto; margin-right: auto; }

/* ============================================================
   COMPONENTS — LOADING SKELETON
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 25%, rgba(30,41,59,0.6) 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin-bottom: var(--sp-2); }
.skeleton-text.short { width: 60%; }
.skeleton-title { height: 20px; width: 40%; margin-bottom: var(--sp-3); }
.skeleton-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); }
.skeleton-card { height: 160px; border-radius: var(--radius-xl); }
.skeleton-row { height: 48px; margin-bottom: var(--sp-2); border-radius: var(--radius-md); }

/* ============================================================
   COMPONENTS — AVATAR
   ============================================================ */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: var(--fw-bold);
    color: white;
    flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 10px; }
.avatar-md { width: 36px; height: 36px; font-size: var(--fs-xs); }
.avatar-lg { width: 48px; height: 48px; font-size: var(--fs-sm); }

.avatar-group { display: flex; }
.avatar-group .avatar { border: 2px solid var(--bg-body); margin-left: -8px; }
.avatar-group .avatar:first-child { margin-left: 0; }
.avatar-group .avatar-more {
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 10px;
}

/* ============================================================
   COMPONENTS — DROPDOWN MENU
   ============================================================ */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    min-width: 180px;
    padding: var(--sp-2);
    box-shadow: var(--shadow-panel);
    z-index: 50;
    display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    color: var(--text-body);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.dropdown-item svg { width: 16px; height: 16px; color: var(--text-muted); }
.dropdown-divider { height: 1px; background: var(--border-default); margin: var(--sp-2) 0; }

/* ============================================================
   DATA DISPLAY — STAT CARDS ROW
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-6);
    margin-bottom: var(--sp-8);
}

/* ============================================================
   DATA DISPLAY — BAR CHART PLACEHOLDER
   ============================================================ */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-3);
    height: 180px;
    padding-top: var(--sp-4);
}
.bar-chart .bar {
    flex: 1;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-fast);
    position: relative;
}
.bar-chart .bar:hover { opacity: 0.8; }
.bar-chart .bar-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ============================================================
   DATA DISPLAY — LINE CHART PLACEHOLDER
   ============================================================ */
.line-chart {
    height: 180px;
    position: relative;
    border-left: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    margin-left: 10px;
    padding-bottom: 24px;
}
.line-chart svg { width: 100%; height: 100%; }

/* ============================================================
   DATA DISPLAY — PROGRESS BARS
   ============================================================ */
.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar .progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}
.progress-fill.emerald { background: var(--accent-500); }
.progress-fill.blue    { background: var(--info-500); }
.progress-fill.purple  { background: var(--purple-500); }
.progress-fill.orange  { background: var(--warning-500); }
.progress-fill.red     { background: var(--danger-500); }

/* ============================================================
   UTILITY
   ============================================================ */
.flex-row { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.p-4 { padding: var(--sp-4); }
.p-6 { padding: var(--sp-6); }
.p-8 { padding: var(--sp-8); }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.text-center { text-align: center; }
.flex-1 { flex: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   HEADER BUTTONS (shared by detail, create-edit, settings, profile)
   ============================================================ */
.icon-btn {
    position: relative;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.icon-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
}
.icon-btn svg { width: 18px; height: 18px; }

.user-btn {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--sp-1) var(--sp-3) var(--sp-1) var(--sp-1);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.user-btn:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.user-name {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}
.user-role {
    font-size: 10px;
    color: var(--text-faint);
}

/* ============================================================
   BREADCRUMB EXTENSIONS
   ============================================================ */
.breadcrumb-sep {
    color: var(--text-faint);
    margin: 0 var(--sp-1);
}
.breadcrumb-current {
    color: var(--text-primary);
    font-weight: var(--fw-medium);
}

/* ============================================================
   DROPDOWN ENHANCEMENTS
   ============================================================ */
.dropdown-header {
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--text-heading);
}
.dropdown-footer {
    padding: var(--sp-2) var(--sp-4);
    border-top: 1px solid var(--border-default);
    text-align: center;
}
.dropdown-footer a {
    font-size: var(--fs-xs);
    color: var(--accent-400);
    text-decoration: none;
    font-weight: var(--fw-semibold);
}
.dropdown-footer a:hover { text-decoration: underline; }
.dropdown-item-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
}
.dropdown-item-desc {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
.dropdown-item-time {
    font-size: 10px;
    color: var(--text-faint);
    margin-top: 2px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    padding: var(--sp-6);
}

/* ============================================================
   PAGE HEADER ROW
   ============================================================ */
.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-6);
    gap: var(--sp-4);
}
.page-header-row h1 {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--text-heading);
    margin: 0;
}
.page-header-actions {
    display: flex;
    gap: var(--sp-3);
}

/* ============================================================
   CARD BODY & FOOTER
   ============================================================ */
.card-body {
    padding: var(--sp-6);
}
.card-footer {
    padding: var(--sp-4) var(--sp-6);
    border-top: 1px solid var(--border-card);
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-3);
}

/* ============================================================
   INFO FIELD (detail page, profile page)
   ============================================================ */
.info-field {
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border-default);
}
.info-field:last-child { border-bottom: none; }
.info-field label {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-faint);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--sp-1);
}
.info-field span {
    font-size: var(--fs-sm);
    color: var(--text-primary);
}

/* ============================================================
   MONO / TEXT HELPERS
   ============================================================ */
.mono {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
}
.text-success { color: var(--accent-400); }
.text-danger  { color: var(--danger-400); }
.text-warning { color: var(--warning-400); }

/* ============================================================
   STAT BLOCK
   ============================================================ */
.stat-block {
    padding: var(--sp-4);
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
}
.stat-block .stat-label {
    font-size: var(--fs-xs);
    color: var(--text-faint);
    margin-bottom: var(--sp-1);
}
.stat-block .stat-value {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--text-heading);
}

/* ============================================================
   TIMELINE (detail page)
   ============================================================ */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
.timeline-item {
    display: flex;
    gap: var(--sp-4);
    padding: var(--sp-4) 0;
    position: relative;
}
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 40px;
    bottom: 0;
    width: 2px;
    background: var(--border-default);
}
.timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid;
}
.dot-success { border-color: var(--accent-500); background: rgba(16,185,129,0.1); }
.dot-warning { border-color: var(--warning-500); background: rgba(245,158,11,0.1); }
.dot-info    { border-color: var(--info-500); background: rgba(59,130,246,0.1); }
.dot-danger  { border-color: var(--danger-500); background: rgba(239,68,68,0.1); }

.timeline-content {
    flex: 1;
    min-width: 0;
}
.timeline-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
}
.timeline-desc {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
.timeline-time {
    font-size: 10px;
    color: var(--text-faint);
    margin-top: var(--sp-1);
}

/* ============================================================
   CLIENT HEADER (detail page)
   ============================================================ */
.client-header-info {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
}
.client-header-details {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}
.client-header-name {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.client-header-name h1 {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--text-heading);
    margin: 0;
}

/* ============================================================
   FORM CONTROL
   ============================================================ */
.form-control {
    width: 100%;
    padding: var(--sp-2) var(--sp-3);
    background: var(--bg-surface);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-family: var(--font-family);
    transition: border-color var(--transition-fast);
    outline: none;
}
.form-control:focus {
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.form-control::placeholder {
    color: var(--text-faint);
}
.form-group.has-error .form-control {
    border-color: var(--danger-500);
}
.form-group.has-error .form-error {
    display: block;
}

.required {
    color: var(--danger-400);
}
.full-width {
    grid-column: 1 / -1;
}

/* ============================================================
   TOGGLE GROUP / ITEM / LABEL
   ============================================================ */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    margin-top: var(--sp-4);
}
.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border-default);
}
.toggle-item:last-child { border-bottom: none; }
.toggle-label {
    font-size: var(--fs-sm);
    color: var(--text-primary);
    font-weight: var(--fw-medium);
}

/* ============================================================
   TAB BTN / TAB PANEL (settings page)
   ============================================================ */
.tab-btn {
    padding: var(--sp-2) var(--sp-5);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.tab-btn:hover {
    color: var(--text-primary);
}
.tab-btn.active {
    color: var(--accent-400);
    border-bottom-color: var(--accent-500);
}

/* ============================================================
   QUICK RANGE BTN (transactions page filter chips)
   ============================================================ */
.quick-range-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-card);
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    text-decoration: none;
    line-height: 1.2;
}
.quick-range-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}
.quick-range-btn.active {
    color: white;
    background: var(--accent-600);
    border-color: var(--accent-500);
    box-shadow: 0 4px 12px -2px rgba(5, 150, 105, 0.4);
}
.quick-range-btn.active:hover {
    background: var(--accent-500);
}
.tab-panel, .tab-content {
    display: none;
}
.tab-panel.active, .tab-content.active {
    display: block;
}

/* ============================================================
   BADGE EXTENSIONS
   ============================================================ */
.badge-purple {
    background: rgba(168,85,247,0.15);
    color: var(--purple-400);
}
.badge-success {
    background: rgba(16,185,129,0.15);
    color: var(--accent-400);
}

/* ============================================================
   BUTTON WARNING
   ============================================================ */
.btn-warning {
    background: rgba(245,158,11,0.15);
    color: var(--warning-400);
    border: 1px solid rgba(245,158,11,0.3);
}
.btn-warning:hover {
    background: rgba(245,158,11,0.25);
}

/* ============================================================
   AVATAR XL (profile page)
   ============================================================ */
.avatar-xl {
    width: 72px;
    height: 72px;
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    background: linear-gradient(135deg, var(--accent-600), var(--accent-400));
    color: #fff;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   PROFILE HEADER (profile page)
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    padding: var(--sp-6);
}
.profile-header-details {
    flex: 1;
}
.profile-header-details h2 {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--text-heading);
    margin: 0 0 var(--sp-1) 0;
}

/* ============================================================
   SESSION LIST (profile page)
   ============================================================ */
.session-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
}
.session-info {
    flex: 1;
}
.session-device {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-primary);
}
.session-meta {
    font-size: var(--fs-xs);
    color: var(--text-faint);
    margin-top: 2px;
}
.revoke-btn {
    font-size: var(--fs-xs);
    padding: var(--sp-1) var(--sp-3);
}

/* ============================================================
   PAGE CONTENT (alternative to main-content, used by notifications)
   ============================================================ */
.page-content {
    padding: var(--sp-6);
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-input);
    color: var(--text-body);
    border-radius: var(--radius-md);
    padding: var(--sp-2);
    cursor: pointer;
    margin-right: var(--sp-3);
}
.mobile-menu-btn svg {
    width: 20px;
    height: 20px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
}
.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-w);
        transition: transform var(--transition-slow);
        z-index: 50;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar.collapsed {
        width: var(--sidebar-w);
        transform: translateX(-100%);
    }
    .sidebar.collapsed.mobile-open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0 !important;
    }
    .top-header {
        padding-left: var(--sp-3);
        padding-right: var(--sp-3);
    }
    .header-actions {
        gap: var(--sp-2);
    }
    .header-actions .btn {
        padding: var(--sp-1) var(--sp-2);
        font-size: var(--fs-xs);
    }
}
