﻿/* ═══════════════════════════════════════════════════════════════════════
   Zeus Timesheet — Unified CSS  (RULE 001: all styles here, no inline)
   Mobile-first baseline: 375px                         (RULE 004)
   Theme: Clean Light
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─────────────────────────────────────────── */
:root {
    --primary:       #2563eb;
    --primary-dark:  #1d4ed8;
    --primary-light: #3b82f6;
    --accent:        #2563eb;
    --accent-light:  #3b82f6;
    --bg:            #f0f4f8;
    --surface:       #ffffff;
    --input-bg:      #ffffff;
    --sidebar-bg:    #1e2430;
    --sidebar-w:     240px;
    --topbar-h:      60px;
    --mobile-nav-h:  64px;
    --border:        #e2e8f0;
    --text:          #1e293b;
    --text-muted:    #64748b;
    --success:       #16a34a;
    --danger:        #dc2626;
    --warning:       #d97706;
    --info:          #0891b2;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow:        0 2px 8px rgba(0,0,0,.10);
    --shadow-lg:     0 8px 32px rgba(0,0,0,.15);
    --radius:        10px;
    --radius-sm:     6px;
    --transition:    .2s ease;
    /* sidebar-specific tokens — override per theme */
    --sidebar-border:          #2a3245;
    --sidebar-accent:          #93c5fd;
    --sidebar-nav-color:       #8899b0;
    --sidebar-nav-hover-bg:    rgba(255,255,255,.06);
    --sidebar-nav-hover-color: #c8d6e8;
    --sidebar-nav-active-bg:   rgba(37,99,235,.18);
    --sidebar-user-name:       #e2e8f0;
}

/* ─── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: none; }
img { max-width: 100%; }

/* ─── App Layout ─────────────────────────────────────────────────────── */
.app-body { display: flex; min-height: 100vh; overflow-x: hidden; }

.main-wrapper {
    flex: 1;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow-x: hidden;
    padding-bottom: var(--mobile-nav-h);
    transition: margin-left var(--transition);
}

@media (min-width: 992px) {
    .main-wrapper { margin-left: var(--sidebar-w); padding-bottom: 0; }
}

/* ─── Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100%;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform var(--transition);
    overflow-y: auto;
}

.sidebar.open { transform: none; }

@media (min-width: 992px) { .sidebar { transform: translateX(0); } }

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 16px;
    color: var(--sidebar-accent);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--sidebar-border);
    min-height: 72px;
}
.sidebar-brand-icon { font-size: 1.5rem; color: var(--sidebar-accent); }
.sidebar-brand-text {}
.sidebar-brand-logo { width: auto; height: auto; max-width: 100%; object-fit: contain; display: block; }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--sidebar-nav-color);
    font-size: .875rem;
    border-radius: 0;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
    border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--sidebar-nav-hover-bg); color: var(--sidebar-nav-hover-color); text-decoration: none; border-left-color: rgba(255,255,255,.15); }
.nav-item.active { background: var(--sidebar-nav-active-bg); color: var(--sidebar-accent); font-weight: 600; border-left-color: var(--sidebar-accent); }
.nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-label {}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; flex: 1; text-decoration: none; }
.sidebar-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--sidebar-border); }
.sidebar-user-info {}
.sidebar-user-name { color: var(--sidebar-user-name); font-size: .875rem; font-weight: 600; line-height: 1.2; }
.sidebar-user-role { color: var(--sidebar-nav-color); font-size: .75rem; }
.sidebar-logout { color: var(--sidebar-nav-color); font-size: 1.1rem; padding: 4px; transition: color var(--transition); }
.sidebar-logout:hover { color: #f87171; }

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 1030;
}
.sidebar-overlay.show { display: block; }

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 2px; }

/* ─── Topbar ─────────────────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    z-index: 1020;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.topbar-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: color var(--transition);
}
.topbar-toggle:hover { background: rgba(37,99,235,.06); color: var(--primary); }
@media (min-width: 992px) { .topbar-toggle { display: none; } }

.topbar-title { font-weight: 600; font-size: 1rem; color: var(--text); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.topbar-icon-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    line-height: 1;
    transition: color var(--transition), background var(--transition);
}
.topbar-icon-btn:hover { background: rgba(37,99,235,.06); color: var(--primary); }

.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    text-align: center;
    padding: 0 4px;
}

.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
    transition: background var(--transition);
}
.topbar-user-btn:hover { background: rgba(37,99,235,.06); }
.topbar-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }

/* ─── Notification Dropdown ─────────────────────────────────────────── */
.notif-dropdown { width: 340px; padding: 0; max-height: 440px; max-width: calc(100vw - 16px); flex-direction: column; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.notif-dropdown.show { display: flex; }
.notif-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .875rem; color: var(--text); }
.notif-list { overflow-y: auto; flex: 1; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: .875rem; }
.notif-footer { padding: 10px 16px; border-top: 1px solid var(--border); text-align: center; font-size: .875rem; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; padding: 0; font-size: .8rem; }
.notif-drop-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); transition: background .15s; }
.notif-drop-item:hover { background: rgba(37,99,235,.04); color: var(--text); }
.notif-drop-item.unread { background: rgba(37,99,235,.04); }
.notif-drop-body { flex: 1; min-width: 0; }
.notif-drop-msg { font-size: .8375rem; margin: 0 0 3px; white-space: normal; }
.notif-drop-time { font-size: .75rem; color: var(--text-muted); margin: 0; }
.notif-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0; margin-top: 5px; }

/* ─── Page Content ───────────────────────────────────────────────────── */
.page-content { padding: 24px 20px; flex: 1; }
@media (min-width: 768px) { .page-content { padding: 28px 28px; } }

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 2px; color: var(--text); }
.page-subtitle { font-size: .875rem; color: var(--text-muted); margin: 0; }
.breadcrumb-back { display: inline-flex; align-items: center; color: var(--text-muted); font-size: .875rem; margin-bottom: 4px; }
.breadcrumb-back:hover { color: var(--primary); }

/* ─── Cards ──────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--text); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); }
.card-title { font-size: .9rem; font-weight: 600; margin: 0; color: var(--text); }
.card-subtitle { font-size: .75rem; color: var(--text-muted); }
.card-action { font-size: .8rem; color: var(--primary); }
.card-body { padding: 18px; }

/* ─── Stats Grid ─────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 0;
}
@media (min-width: 576px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .stats-grid { grid-template-columns: repeat(6, 1fr); } }

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.stat-card:hover { border-color: rgba(37,99,235,.25); box-shadow: var(--shadow); }
.stat-card--alert { border-left: 3px solid var(--accent); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.stat-icon--blue   { background: rgba(37,99,235,.1);   color: #2563eb; }
.stat-icon--green  { background: rgba(22,163,74,.1);   color: #16a34a; }
.stat-icon--amber  { background: rgba(217,119,6,.1);   color: #d97706; }
.stat-icon--orange { background: rgba(234,88,12,.1);   color: #ea580c; }
.stat-icon--red    { background: rgba(220,38,38,.1);   color: #dc2626; }
.stat-icon--purple { background: rgba(124,58,237,.1);  color: #7c3aed; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--text); }
.stat-label { font-size: .75rem; color: var(--text-muted); }
.stat-link { font-size: .75rem; color: var(--primary); margin-top: auto; }

/* ─── Tables ─────────────────────────────────────────────────────────── */
.table { font-size: .875rem; color: var(--text); }
.table th { font-weight: 600; color: var(--text-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-hover > tbody > tr:hover > * { background-color: rgba(37,99,235,.04); }
.empty-state-cell { padding: 0 !important; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 12px; opacity: .25; }

/* ─── User Cell ──────────────────────────────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-name { font-weight: 500; }
.user-email { font-size: .8rem; }

/* ─── Badges ─────────────────────────────────────────────────────────── */
.badge { font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-status-active    { background: rgba(22,163,74,.12);   color: #15803d; }
.badge-status-pending   { background: rgba(217,119,6,.12);   color: #b45309; }
.badge-status-inactive  { background: rgba(100,116,139,.12); color: #475569; }
.badge-status-draft     { background: rgba(100,116,139,.12); color: #475569; }
.badge-status-submitted { background: rgba(8,145,178,.12);   color: #0e7490; }
.badge-status-approved  { background: rgba(22,163,74,.12);   color: #15803d; }
.badge-status-rejected  { background: rgba(220,38,38,.12);   color: #b91c1c; }
.badge-status-declined  { background: rgba(220,38,38,.12);   color: #b91c1c; }
.badge-status-planning  { background: rgba(124,58,237,.12);  color: #6d28d9; }
.badge-status-on_hold   { background: rgba(234,88,12,.12);   color: #c2410c; }
.badge-status-completed { background: rgba(37,99,235,.12);   color: #1d4ed8; }
.badge-status-cancelled { background: rgba(220,38,38,.10);   color: #b91c1c; }
.badge-role { background: rgba(37,99,235,.1); color: var(--primary); }

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn { border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; transition: all var(--transition); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary { border-color: var(--border); color: var(--text-muted); }
.btn-outline-secondary:hover { background: rgba(37,99,235,.06); border-color: var(--primary); color: var(--primary); }
.btn-outline-danger { border-color: rgba(220,38,38,.4); color: #dc2626; }
.btn-outline-danger:hover { background: rgba(220,38,38,.08); border-color: var(--danger); color: var(--danger); }
.btn-outline-warning { border-color: rgba(217,119,6,.4); color: #d97706; }
.btn-outline-warning:hover { background: rgba(217,119,6,.08); border-color: var(--warning); color: var(--warning); }
.btn-outline-info { border-color: rgba(8,145,178,.4); color: #0891b2; }
.btn-outline-info:hover { background: rgba(8,145,178,.08); border-color: var(--info); color: var(--info); }
.btn-secondary { background: #f1f5f9; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: #e2e8f0; border-color: #cbd5e1; color: var(--text); }
.btn-danger { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.3); color: #dc2626; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-full { width: 100%; }
.btn-xs { padding: 2px 8px; font-size: .75rem; }
.btn-icon { background: none; border: none; cursor: pointer; padding: 0; line-height: 1; color: var(--text-muted); }
.btn-icon:hover { color: var(--primary); }

/* ─── Forms ──────────────────────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border);
    font-size: .875rem;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus, .form-select:focus {
    background: var(--input-bg);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-check-input { background-color: var(--input-bg); border-color: var(--border); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.form-label.required::after { content: ' *'; color: var(--danger); }
.form-group { margin-bottom: 16px; }
.form-text { color: var(--text-muted); }

.input-icon-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; z-index: 1; }
.input-icon-left { padding-left: 38px; }
.input-icon-right { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }

/* ─── Filter Bar ─────────────────────────────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: .75rem; font-weight: 600; color: var(--text-muted); }

/* ─── Mobile Bottom Nav ──────────────────────────────────────────────── */
.mobile-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--mobile-nav-h);
    background: var(--sidebar-bg);
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    z-index: 1030;
    box-shadow: 0 -2px 12px rgba(0,0,0,.2);
}
.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--sidebar-nav-color);
    font-size: .65rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}
.mobile-nav-item i { font-size: 1.3rem; }
.mobile-nav-item.active { color: var(--sidebar-accent); }
.mobile-nav-item.active i { color: var(--sidebar-accent); }

/* ─── Auth Layout ────────────────────────────────────────────────────── */
.auth-body { margin: 0; background: var(--bg); min-height: 100vh; }
.auth-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg);
}
.auth-overlay {}
.auth-container { width: 100%; max-width: 420px; }
.auth-logo {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.auth-logo i { color: var(--primary); }
.auth-logo-img { max-height: 72px; max-width: 240px; object-fit: contain; }
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
}
.auth-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.auth-subtitle { color: var(--text-muted); font-size: .875rem; margin-bottom: 24px; }
.auth-divider { position: relative; text-align: center; margin: 20px 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.auth-divider span { background: var(--surface); padding: 0 12px; position: relative; font-size: .8rem; color: var(--text-muted); }
.btn-outline { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: var(--radius-sm); padding: 8px 16px; font-size: .875rem; display: block; text-align: center; }
.auth-footer-text { text-align: center; color: var(--text-muted); font-size: .75rem; margin-top: 20px; }

/* ─── Profile ────────────────────────────────────────────────────────── */
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.profile-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.profile-role { color: var(--text-muted); font-size: .875rem; margin-bottom: 12px; }
.profile-bio { font-size: .875rem; color: var(--text-muted); }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.avatar-upload-wrap { position: relative; display: inline-block; }
.avatar-upload-btn { position: absolute; bottom: 0; right: 0; background: var(--primary); color: #fff; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .85rem; border: 2px solid var(--surface); }

/* ─── Info List ──────────────────────────────────────────────────────── */
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.info-list dt { font-weight: 600; font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.info-list dd { margin: 0; font-size: .875rem; }

/* ─── Doc List ───────────────────────────────────────────────────────── */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.doc-item:last-child { border-bottom: none; }
.doc-icon { font-size: 1.5rem; color: #dc2626; }
.doc-name { font-weight: 500; font-size: .875rem; color: var(--text); }
.doc-meta { font-size: .75rem; color: var(--text-muted); }
.doc-actions { margin-left: auto; }

/* ─── List Items ─────────────────────────────────────────────────────── */
.list-item { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.list-item-title { font-weight: 500; font-size: .875rem; }
.list-item-sub { font-size: .75rem; color: var(--text-muted); }

/* ─── Notifications Full List ────────────────────────────────────────── */
.notif-full-list { list-style: none; margin: 0; padding: 0; }
.notif-full-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.notif-full-item:last-child { border-bottom: none; }
.notif-full-item.unread { background: rgba(37,99,235,.04); border-left: 2px solid var(--primary); }
.notif-item-icon { width: 36px; height: 36px; background: rgba(37,99,235,.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); }
.notif-item-body { flex: 1; }
.notif-item-msg { font-size: .875rem; margin-bottom: 2px; color: var(--text); }
.notif-item-time { font-size: .75rem; color: var(--text-muted); margin: 0; }
.notif-mark-btn { margin-left: auto; }

/* ─── Calendar ───────────────────────────────────────────────────────── */
.calendar-card .card-body { padding: 8px; }
.fc { color: var(--text); }
.fc .fc-col-header-cell-cushion { color: var(--text-muted); }
.fc .fc-daygrid-day-number { color: var(--text-muted); }
.fc .fc-button-primary { background: rgba(37,99,235,.08); border-color: #cbd5e1; color: var(--primary); }
.fc .fc-button-primary:hover { background: rgba(37,99,235,.15); border-color: var(--primary); color: var(--primary); }
.fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.fc .fc-today-button { background: rgba(37,99,235,.1); border-color: var(--primary); color: var(--primary); }
.fc .fc-daygrid-day.fc-day-today { background: rgba(37,99,235,.04); }

/* ─── Permission Grid ────────────────────────────────────────────────── */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.perm-module { background: rgba(37,99,235,.03); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.perm-module-title { text-transform: capitalize; font-size: .8rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; }

/* ─── Timesheet Entry Grid ───────────────────────────────────────────── */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.entry-day { background: rgba(37,99,235,.03); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.entry-day-label { font-weight: 700; font-size: .75rem; color: var(--primary); margin-bottom: 8px; text-transform: uppercase; }

/* ─── Modals ─────────────────────────────────────────────────────────── */
.modal-content { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.modal-header { border-bottom-color: var(--border); }
.modal-title { color: var(--text); }
.modal-footer { border-top-color: var(--border); }
.modal-backdrop.show { opacity: .5; }

/* ─── Toasts ─────────────────────────────────────────────────────────── */
.zeus-toast { min-width: 280px; box-shadow: var(--shadow-lg); border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.zeus-toast .toast-header { background: var(--surface); color: var(--text); border-bottom-color: var(--border); }

/* ─── Utility ────────────────────────────────────────────────────────── */
.gap-2 { gap: 8px; }
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-primary-subtle { background: rgba(37,99,235,.08) !important; }

/* ─── Alerts ─────────────────────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); }
.alert-success { background: rgba(22,163,74,.08);  border-color: rgba(22,163,74,.2);  color: #15803d; }
.alert-danger  { background: rgba(220,38,38,.08);  border-color: rgba(220,38,38,.2);  color: #b91c1c; }
.alert-warning { background: rgba(217,119,6,.08);  border-color: rgba(217,119,6,.2);  color: #92400e; }
.alert-info    { background: rgba(8,145,178,.08);  border-color: rgba(8,145,178,.2);  color: #0e7490; }

/* ─── Tabs ───────────────────────────────────────────────────────────── */
.nav-tabs { border-bottom-color: var(--border); }
.nav-tabs .nav-link { color: var(--text-muted); border-color: transparent; }
.nav-tabs .nav-link:hover { color: var(--primary); border-color: transparent transparent var(--border); }
.nav-tabs .nav-link.active { background: var(--surface); color: var(--primary); border-color: var(--border) var(--border) var(--surface); }

/* ─── Pills ──────────────────────────────────────────────────────────── */
.nav-pills .nav-link { color: var(--text-muted); }
.nav-pills .nav-link.active { background: rgba(37,99,235,.12); color: var(--primary); }

/* ─── Pagination ─────────────────────────────────────────────────────── */
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─── Progress Bars ──────────────────────────────────────────────────── */
.progress { height: 6px; border-radius: 3px; }
.progress-bar { background: var(--primary); }

/* ─── Accordion ──────────────────────────────────────────────────────── */
.accordion-button:not(.collapsed) { background: rgba(37,99,235,.06); color: var(--primary); box-shadow: none; }

/* ─── Input Groups ───────────────────────────────────────────────────── */
.input-group-text { background: #f8fafc; border-color: #cbd5e1; color: var(--text-muted); }

/* ─── Dropdown Menus ─────────────────────────────────────────────────── */
.dropdown-item { font-size: .875rem; }
.dropdown-item.active, .dropdown-item:active { background: rgba(37,99,235,.1); color: var(--primary); }

/* ─── Scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ═══════════════════════════════════════════════════════════════════════
   THEMES  (10 built-in themes)
   Apply via <html data-theme="name"> in the layout.
   Dark themes additionally get data-theme-variant="dark".
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. Frost (default light — no block needed, :root = Frost) ──────── */

/* ── 2. Obsidian ─────────────────────────────── dark · blue ────────── */
[data-theme="obsidian"] {
    --primary:                #60a5fa;
    --primary-dark:           #3b82f6;
    --primary-light:          #93c5fd;
    --accent:                 #60a5fa;
    --bg:                     #0d1117;
    --surface:                #161b27;
    --input-bg:               #1e2535;
    --border:                 #253048;
    --text:                   #e2e8f0;
    --text-muted:             #8899b0;
    --shadow-sm:              0 1px 3px rgba(0,0,0,.3);
    --shadow:                 0 2px 8px rgba(0,0,0,.4);
    --shadow-lg:              0 8px 32px rgba(0,0,0,.55);
    --sidebar-bg:             #090e1a;
    --sidebar-border:         #1e2a40;
    --sidebar-accent:         #60a5fa;
    --sidebar-nav-color:      #5a6b85;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.05);
    --sidebar-nav-hover-color:#93c5fd;
    --sidebar-nav-active-bg:  rgba(96,165,250,.15);
    --sidebar-user-name:      #cbd5e1;
}

/* ── 3. Ember ────────────────────────────────── dark · orange ──────── */
[data-theme="ember"] {
    --primary:                #f97316;
    --primary-dark:           #ea580c;
    --primary-light:          #fb923c;
    --accent:                 #f97316;
    --bg:                     #120c03;
    --surface:                #1d1509;
    --input-bg:               #261b0c;
    --border:                 #2e2010;
    --text:                   #fef3c7;
    --text-muted:             #a8743a;
    --shadow-sm:              0 1px 3px rgba(0,0,0,.4);
    --shadow:                 0 2px 8px rgba(0,0,0,.5);
    --shadow-lg:              0 8px 32px rgba(0,0,0,.6);
    --sidebar-bg:             #0d0900;
    --sidebar-border:         #2a1a05;
    --sidebar-accent:         #fb923c;
    --sidebar-nav-color:      #7a5a30;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.05);
    --sidebar-nav-hover-color:#fcd34d;
    --sidebar-nav-active-bg:  rgba(249,115,22,.18);
    --sidebar-user-name:      #fde68a;
}

/* ── 4. Forge ────────────────────────────────── dark · cyan ────────── */
[data-theme="forge"] {
    --primary:                #06b6d4;
    --primary-dark:           #0891b2;
    --primary-light:          #22d3ee;
    --accent:                 #06b6d4;
    --bg:                     #0d1520;
    --surface:                #141f30;
    --input-bg:               #1a2840;
    --border:                 #1e3248;
    --text:                   #e2edf4;
    --text-muted:             #5e7d98;
    --shadow-sm:              0 1px 3px rgba(0,0,0,.35);
    --shadow:                 0 2px 8px rgba(0,0,0,.45);
    --shadow-lg:              0 8px 32px rgba(0,0,0,.6);
    --sidebar-bg:             #090f1a;
    --sidebar-border:         #152030;
    --sidebar-accent:         #22d3ee;
    --sidebar-nav-color:      #45607a;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.05);
    --sidebar-nav-hover-color:#67e8f9;
    --sidebar-nav-active-bg:  rgba(6,182,212,.15);
    --sidebar-user-name:      #cce4f0;
}

/* ── 5. Aurora ───────────────────────────────── dark · green ──────── */
[data-theme="aurora"] {
    --primary:                #10b981;
    --primary-dark:           #059669;
    --primary-light:          #34d399;
    --accent:                 #10b981;
    --bg:                     #071510;
    --surface:                #0e2018;
    --input-bg:               #142a20;
    --border:                 #1a3828;
    --text:                   #d1fae5;
    --text-muted:             #4e8060;
    --shadow-sm:              0 1px 3px rgba(0,0,0,.4);
    --shadow:                 0 2px 8px rgba(0,0,0,.5);
    --shadow-lg:              0 8px 32px rgba(0,0,0,.6);
    --sidebar-bg:             #040e08;
    --sidebar-border:         #12281e;
    --sidebar-accent:         #34d399;
    --sidebar-nav-color:      #3a6050;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.05);
    --sidebar-nav-hover-color:#6ee7b7;
    --sidebar-nav-active-bg:  rgba(16,185,129,.15);
    --sidebar-user-name:      #a7f3d0;
}

/* ── 6. Orchid ───────────────────────────────── light · purple ─────── */
[data-theme="orchid"] {
    --primary:                #7c3aed;
    --primary-dark:           #6d28d9;
    --primary-light:          #8b5cf6;
    --accent:                 #7c3aed;
    --bg:                     #f5f3ff;
    --surface:                #ffffff;
    --input-bg:               #ffffff;
    --border:                 #e9e5ff;
    --text:                   #1e1b4b;
    --text-muted:             #6b7280;
    --sidebar-bg:             #2e1065;
    --sidebar-border:         #4c1d95;
    --sidebar-accent:         #c4b5fd;
    --sidebar-nav-color:      #7c6da8;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.08);
    --sidebar-nav-hover-color:#e9d5ff;
    --sidebar-nav-active-bg:  rgba(196,181,253,.18);
    --sidebar-user-name:      #ede9fe;
}

/* ── 7. Crimson ──────────────────────────────── dark · red ─────────── */
[data-theme="crimson"] {
    --primary:                #ef4444;
    --primary-dark:           #dc2626;
    --primary-light:          #f87171;
    --accent:                 #ef4444;
    --bg:                     #100808;
    --surface:                #1c1010;
    --input-bg:               #251515;
    --border:                 #2d1515;
    --text:                   #fef2f2;
    --text-muted:             #996060;
    --shadow-sm:              0 1px 3px rgba(0,0,0,.4);
    --shadow:                 0 2px 8px rgba(0,0,0,.5);
    --shadow-lg:              0 8px 32px rgba(0,0,0,.6);
    --sidebar-bg:             #0c0606;
    --sidebar-border:         #280f0f;
    --sidebar-accent:         #f87171;
    --sidebar-nav-color:      #6b3535;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.05);
    --sidebar-nav-hover-color:#fca5a5;
    --sidebar-nav-active-bg:  rgba(239,68,68,.15);
    --sidebar-user-name:      #fee2e2;
}

/* ── 8. Sahara ───────────────────────────────── light · amber ──────── */
[data-theme="sahara"] {
    --primary:                #d97706;
    --primary-dark:           #b45309;
    --primary-light:          #f59e0b;
    --accent:                 #d97706;
    --bg:                     #fffbf0;
    --surface:                #fff8ed;
    --input-bg:               #fffdf8;
    --border:                 #f0ddb0;
    --text:                   #1c1500;
    --text-muted:             #8c6e30;
    --sidebar-bg:             #1c1200;
    --sidebar-border:         #332200;
    --sidebar-accent:         #fbbf24;
    --sidebar-nav-color:      #7a6030;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.08);
    --sidebar-nav-hover-color:#fde68a;
    --sidebar-nav-active-bg:  rgba(251,191,36,.18);
    --sidebar-user-name:      #fef3c7;
}

/* ── 9. Arctic ───────────────────────────────── light · sky ────────── */
[data-theme="arctic"] {
    --primary:                #0ea5e9;
    --primary-dark:           #0284c7;
    --primary-light:          #38bdf8;
    --accent:                 #0ea5e9;
    --bg:                     #f0f9ff;
    --surface:                #ffffff;
    --input-bg:               #ffffff;
    --border:                 #bae6fd;
    --text:                   #0c1a2e;
    --text-muted:             #4b7a9a;
    --sidebar-bg:             #0c4a6e;
    --sidebar-border:         #164e63;
    --sidebar-accent:         #7dd3fc;
    --sidebar-nav-color:      #4d8aa8;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.08);
    --sidebar-nav-hover-color:#bae6fd;
    --sidebar-nav-active-bg:  rgba(125,211,252,.18);
    --sidebar-user-name:      #e0f2fe;
}

/* ── 10. Midnight ────────────────────────────── dark · gold ────────── */
[data-theme="midnight"] {
    --primary:                #eab308;
    --primary-dark:           #ca8a04;
    --primary-light:          #fbbf24;
    --accent:                 #eab308;
    --bg:                     #050c1a;
    --surface:                #0c1326;
    --input-bg:               #131f35;
    --border:                 #1a2540;
    --text:                   #f1f5f9;
    --text-muted:             #607a99;
    --shadow-sm:              0 1px 3px rgba(0,0,0,.4);
    --shadow:                 0 2px 8px rgba(0,0,0,.5);
    --shadow-lg:              0 8px 32px rgba(0,0,0,.6);
    --sidebar-bg:             #03080f;
    --sidebar-border:         #131f35;
    --sidebar-accent:         #fbbf24;
    --sidebar-nav-color:      #3d5470;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.05);
    --sidebar-nav-hover-color:#fde68a;
    --sidebar-nav-active-bg:  rgba(234,179,8,.15);
    --sidebar-user-name:      #e2e8f0;
}

/* ── 11. Slate ───────────────────────────────── light · slate-blue ─── */
[data-theme="slate"] {
    --primary:                #475569;
    --primary-dark:           #334155;
    --primary-light:          #64748b;
    --accent:                 #475569;
    --bg:                     #f1f5f9;
    --surface:                #ffffff;
    --input-bg:               #ffffff;
    --border:                 #cbd5e1;
    --text:                   #0f172a;
    --text-muted:             #64748b;
    --sidebar-bg:             #0f172a;
    --sidebar-border:         #1e293b;
    --sidebar-accent:         #94a3b8;
    --sidebar-nav-color:      #64748b;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.06);
    --sidebar-nav-hover-color:#cbd5e1;
    --sidebar-nav-active-bg:  rgba(71,85,105,.2);
    --sidebar-user-name:      #e2e8f0;
}

/* ── 12. Rose ────────────────────────────────── light · rose/pink ──── */
[data-theme="rose"] {
    --primary:                #e11d48;
    --primary-dark:           #be123c;
    --primary-light:          #f43f5e;
    --accent:                 #e11d48;
    --bg:                     #fff1f2;
    --surface:                #ffffff;
    --input-bg:               #ffffff;
    --border:                 #fecdd3;
    --text:                   #1c0610;
    --text-muted:             #9f6070;
    --sidebar-bg:             #4c0519;
    --sidebar-border:         #881337;
    --sidebar-accent:         #fda4af;
    --sidebar-nav-color:      #9f4463;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.08);
    --sidebar-nav-hover-color:#fecdd3;
    --sidebar-nav-active-bg:  rgba(253,164,175,.18);
    --sidebar-user-name:      #ffe4e6;
}

/* ── 13. Mint ────────────────────────────────── light · teal/mint ──── */
[data-theme="mint"] {
    --primary:                #0d9488;
    --primary-dark:           #0f766e;
    --primary-light:          #14b8a6;
    --accent:                 #0d9488;
    --bg:                     #f0fdfa;
    --surface:                #ffffff;
    --input-bg:               #ffffff;
    --border:                 #99f6e4;
    --text:                   #042f2e;
    --text-muted:             #5eabA0;
    --sidebar-bg:             #042f2e;
    --sidebar-border:         #134e4a;
    --sidebar-accent:         #5eead4;
    --sidebar-nav-color:      #2d7a74;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.07);
    --sidebar-nav-hover-color:#99f6e4;
    --sidebar-nav-active-bg:  rgba(94,234,212,.18);
    --sidebar-user-name:      #ccfbf1;
}

/* ── 14. Sand ────────────────────────────────── light · warm neutral ─ */
[data-theme="sand"] {
    --primary:                #78716c;
    --primary-dark:           #57534e;
    --primary-light:          #a8a29e;
    --accent:                 #78716c;
    --bg:                     #faf9f7;
    --surface:                #ffffff;
    --input-bg:               #ffffff;
    --border:                 #e7e5e0;
    --text:                   #1c1917;
    --text-muted:             #78716c;
    --sidebar-bg:             #1c1917;
    --sidebar-border:         #292524;
    --sidebar-accent:         #d6d3d1;
    --sidebar-nav-color:      #78716c;
    --sidebar-nav-hover-bg:   rgba(255,255,255,.07);
    --sidebar-nav-hover-color:#e7e5e0;
    --sidebar-nav-active-bg:  rgba(214,211,209,.18);
    --sidebar-user-name:      #f5f5f4;
}

/* ── Dark-theme shared overrides (Bootstrap components) ─────────────── */
/* Body / page background */
[data-theme-variant="dark"] body { background-color: var(--bg); color: var(--text); }

/* Forms */
[data-theme-variant="dark"] .form-control,
[data-theme-variant="dark"] .form-select,
[data-theme-variant="dark"] .form-control:disabled {
    background-color: var(--input-bg);
    border-color: var(--border);
    color: var(--text);
}
[data-theme-variant="dark"] .form-control::placeholder { color: var(--text-muted); opacity: 1; }
[data-theme-variant="dark"] .form-control:focus,
[data-theme-variant="dark"] .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--text);
}
[data-theme-variant="dark"] .form-check-input { background-color: var(--input-bg); border-color: var(--border); }
[data-theme-variant="dark"] .input-group-text {
    background-color: var(--input-bg);
    border-color: var(--border);
    color: var(--text-muted);
}
/* Dropdowns */
[data-theme-variant="dark"] .dropdown-menu {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
[data-theme-variant="dark"] .dropdown-item { color: var(--text); }
[data-theme-variant="dark"] .dropdown-item:hover,
[data-theme-variant="dark"] .dropdown-item:focus { background-color: rgba(255,255,255,.07); color: var(--text); }
[data-theme-variant="dark"] .dropdown-header { color: var(--text-muted); }
[data-theme-variant="dark"] .dropdown-divider { border-color: var(--border); }
/* Tables */
[data-theme-variant="dark"] .table { --bs-table-bg: transparent; --bs-table-color: var(--text); color: var(--text); }
[data-theme-variant="dark"] .table td,
[data-theme-variant="dark"] .table th { border-color: var(--border); color: var(--text); }
[data-theme-variant="dark"] .table thead th { color: var(--text-muted); }
[data-theme-variant="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(255,255,255,.04);
    color: var(--text);
}
[data-theme-variant="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(255,255,255,.03);
    color: var(--text);
}
/* Cards */
[data-theme-variant="dark"] .card { background-color: var(--surface); border-color: var(--border); color: var(--text); }
[data-theme-variant="dark"] .card-header { background-color: transparent; border-color: var(--border); color: var(--text); }
[data-theme-variant="dark"] .card-footer { background-color: transparent; border-color: var(--border); }
[data-theme-variant="dark"] .list-group-item { background-color: var(--surface); border-color: var(--border); color: var(--text); }
/* Modals */
[data-theme-variant="dark"] .modal-content { background-color: var(--surface); color: var(--text); border-color: var(--border); }
[data-theme-variant="dark"] .modal-header,
[data-theme-variant="dark"] .modal-footer { border-color: var(--border); }
[data-theme-variant="dark"] .modal-title { color: var(--text); }
[data-theme-variant="dark"] .btn-close { filter: invert(1); }
/* Buttons */
[data-theme-variant="dark"] .btn-secondary { background: var(--input-bg); border-color: var(--border); color: var(--text); }
[data-theme-variant="dark"] .btn-secondary:hover { background: var(--border); }
[data-theme-variant="dark"] .btn-outline-secondary { border-color: var(--border); color: var(--text-muted); }
[data-theme-variant="dark"] .btn-outline-secondary:hover { background: rgba(255,255,255,.08); color: var(--text); }
/* Accordion */
[data-theme-variant="dark"] .accordion-item { background-color: var(--surface); border-color: var(--border); }
[data-theme-variant="dark"] .accordion-button { background-color: var(--surface); color: var(--text); }
[data-theme-variant="dark"] .accordion-button:not(.collapsed) { background-color: var(--input-bg); color: var(--primary); }
[data-theme-variant="dark"] .accordion-button::after { filter: invert(1) brightness(2); }
/* Pagination */
[data-theme-variant="dark"] .page-link { background-color: var(--surface); border-color: var(--border); color: var(--text-muted); }
[data-theme-variant="dark"] .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
/* Tabs */
[data-theme-variant="dark"] .nav-tabs { border-color: var(--border); }
[data-theme-variant="dark"] .nav-tabs .nav-link { color: var(--text-muted); }
[data-theme-variant="dark"] .nav-tabs .nav-link:hover { color: var(--primary); border-color: var(--border); }
[data-theme-variant="dark"] .nav-tabs .nav-link.active { background: var(--surface); color: var(--primary); border-color: var(--border) var(--border) var(--surface); }
/* Pills */
[data-theme-variant="dark"] .nav-pills .nav-link { color: var(--text-muted); }
[data-theme-variant="dark"] .nav-pills .nav-link.active { background: rgba(255,255,255,.1); color: var(--primary); }
/* Misc text */
[data-theme-variant="dark"] h1,[data-theme-variant="dark"] h2,[data-theme-variant="dark"] h3,
[data-theme-variant="dark"] h4,[data-theme-variant="dark"] h5,[data-theme-variant="dark"] h6 { color: var(--text); }
[data-theme-variant="dark"] .text-dark { color: var(--text) !important; }
[data-theme-variant="dark"] .text-body { color: var(--text) !important; }
[data-theme-variant="dark"] small, [data-theme-variant="dark"] .small { color: var(--text-muted); }
[data-theme-variant="dark"] hr { border-color: var(--border); }
/* Badges — ensure legibility */
[data-theme-variant="dark"] .badge-status-draft,
[data-theme-variant="dark"] .badge-status-inactive { background: rgba(148,163,184,.15); color: #94a3b8; }
[data-theme-variant="dark"] .badge-status-submitted { background: rgba(34,211,238,.12); color: #67e8f9; }
[data-theme-variant="dark"] .badge-status-approved,
[data-theme-variant="dark"] .badge-status-active { background: rgba(52,211,153,.12); color: #6ee7b7; }
[data-theme-variant="dark"] .badge-status-rejected,
[data-theme-variant="dark"] .badge-status-declined,
[data-theme-variant="dark"] .badge-status-cancelled { background: rgba(248,113,113,.12); color: #fca5a5; }
[data-theme-variant="dark"] .badge-status-pending { background: rgba(252,211,77,.12); color: #fde68a; }
[data-theme-variant="dark"] .badge-role { background: rgba(255,255,255,.1); color: var(--sidebar-accent); }
/* Alerts */
[data-theme-variant="dark"] .alert-success { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.2); color: #6ee7b7; }
[data-theme-variant="dark"] .alert-danger  { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.2); color: #fca5a5; }
[data-theme-variant="dark"] .alert-warning { background: rgba(252,211,77,.08);  border-color: rgba(252,211,77,.2);  color: #fde68a; }
[data-theme-variant="dark"] .alert-info    { background: rgba(103,232,249,.08); border-color: rgba(103,232,249,.2); color: #67e8f9; }
/* Topbar */
[data-theme-variant="dark"] .topbar { background-color: var(--surface); border-color: var(--border); }
/* Stat cards */
[data-theme-variant="dark"] .stat-card { background-color: var(--surface); border-color: var(--border); }
[data-theme-variant="dark"] .stat-value { color: var(--text); }
/* Empty state */
[data-theme-variant="dark"] .empty-state { color: var(--text-muted); }
/* Profile */
[data-theme-variant="dark"] .auth-card { background-color: var(--surface); border-color: var(--border); }
/* Perm grid */
[data-theme-variant="dark"] .perm-module { background: rgba(255,255,255,.03); border-color: var(--border); }
/* Entry day */
[data-theme-variant="dark"] .entry-day { background: rgba(255,255,255,.03); border-color: var(--border); }
/* Topbar user btn / icon btns */
[data-theme-variant="dark"] .topbar-user-btn { color: var(--text); }
[data-theme-variant="dark"] .topbar-icon-btn { color: var(--text-muted); }
/* Scrollbar */
[data-theme-variant="dark"] ::-webkit-scrollbar-track { background: var(--bg); }
[data-theme-variant="dark"] ::-webkit-scrollbar-thumb { background: var(--border); }


/* ── Theme picker UI ─────────────────────────────────────────────────── */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 4px;
}
.theme-card {
    cursor: pointer;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    display: block;
}
.theme-card input[type="radio"] { display: none; }
.theme-card:has(input:checked),
.theme-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.2);
}
.theme-preview {
    display: flex;
    height: 72px;
    overflow: hidden;
}
.theme-preview-sidebar {
    width: 28%;
    flex-shrink: 0;
}
.theme-preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.theme-preview-topbar { height: 30%; }
.theme-preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.theme-preview-accent {
    width: 55%;
    height: 8px;
    border-radius: 4px;
    opacity: .85;
}
.theme-name {
    font-size: .75rem;
    font-weight: 600;
    text-align: center;
    padding: 6px 4px 7px;
    color: var(--text);
    background: var(--surface);
}

