/* ================================================================
   EduPrism — app.css  v3.0  |  Full Premium Template Redesign
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ================================================================
   Design Tokens
   ================================================================ */
:root {
    /* Brand */
    --primary:          #7c3aed;
    --primary-dark:     #6d28d9;
    --primary-light:    #8b5cf6;
    --primary-soft:     rgba(124, 58, 237, 0.10);
    --primary-glow:     rgba(124, 58, 237, 0.25);
    --accent:           #06b6d4;
    --accent-soft:      rgba(6, 182, 212, 0.10);

    /* Sidebar */
    --sidebar-w:        260px;
    --sidebar-bg:       #13111a;
    --sidebar-surface:  #1c1928;
    --sidebar-text:     #9ca3af;
    --sidebar-hover:    rgba(255,255,255,0.06);
    --sidebar-active:   var(--primary);
    --sidebar-border:   rgba(255,255,255,0.06);

    /* Topbar */
    --topbar-h:         64px;
    --topbar-bg:        rgba(255,255,255,0.82);
    --topbar-blur:      blur(18px);
    --topbar-border:    rgba(0,0,0,0.06);

    /* Page */
    --body-bg:          #f5f4f8;
    --surface:          #ffffff;
    --surface-2:        #f9f8fc;

    /* Cards */
    --card-bg:          #ffffff;
    --card-radius:      16px;
    --card-shadow:      0 1px 4px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.05);
    --card-shadow-lg:   0 8px 32px rgba(0,0,0,0.10);
    --card-border:      rgba(0,0,0,0.07);

    /* Text */
    --text-primary:     #0d0b14;
    --text-secondary:   #6b7280;
    --text-muted:       #9ca3af;
    --border-color:     #e5e7eb;

    /* Typography */
    --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* White-label overrides */
    --primary-color:    #7c3aed;
    --secondary-color:  #6d28d9;

    /* Transitions */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   Dark Mode Tokens
   ================================================================ */
:root.dark-mode, body.dark-mode, [data-theme="dark"] {
    /* Brand adjustments */
    --primary-soft:     rgba(139, 92, 246, 0.15);
    --primary-glow:     rgba(124, 58, 237, 0.4);
    
    /* Sidebar remains dark, but slightly different surface */
    --sidebar-surface:  #1a1725;
    
    /* Topbar */
    --topbar-bg:        rgba(19, 17, 26, 0.82);
    --topbar-border:    rgba(255,255,255,0.08);

    /* Page */
    --body-bg:          #0f0d15;
    --surface:          #161421;
    --surface-2:        #1c1928;

    /* Cards */
    --card-bg:          #161421;
    --card-shadow:      0 4px 20px rgba(0,0,0,0.3);
    --card-shadow-lg:   0 8px 48px rgba(0,0,0,0.45);
    --card-border:      rgba(255,255,255,0.08);

    /* Text */
    --text-primary:     #f8fafc;
    --text-secondary:   #94a3b8;
    --text-muted:       #64748b;
    --border-color:     #242132;
}

/* ================================================================
   Reset & Base
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--body-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
code { color: #6c757d; font-size: 0.82em; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }

/* ================================================================
   Layout
   ================================================================ */
.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}
.main-wrapper.sidebar-collapsed { margin-left: 72px; }

/* ================================================================
   Sidebar
   ================================================================ */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--transition);
    scrollbar-width: none;
    border-right: 1px solid var(--sidebar-border);
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar.collapsed { width: 72px; }

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--sidebar-border);
    min-height: var(--topbar-h);
    flex-shrink: 0;
}
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 22px 14px; }

.sidebar-logo {
    width: 38px; height: 38px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

.sidebar-brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.brand-sub {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(156, 163, 175, 0.6);
    letter-spacing: 0.1em;
    white-space: nowrap;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 10px 12px;
    overflow-y: auto;
    scrollbar-width: none;
}

.nav-section-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(156, 163, 175, 0.45);
    padding: 18px 8px 6px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.855rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #e5e7eb;
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(139,92,246,0.14));
    color: #c4b5fd;
    font-weight: 600;
    border: 1px solid rgba(124,58,237,0.18);
}

.nav-item.active .nav-icon {
    color: #a78bfa;
}

/* Sub-level nav items (indented, slightly smaller) */
.nav-item-sub {
    padding-left: 36px;
    font-size: 0.8rem;
    margin-bottom: 1px;
    opacity: 0.85;
}
.nav-item-sub::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    flex-shrink: 0;
}
.nav-item-sub.active {
    opacity: 1;
}

.nav-icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    transition: color var(--transition);
}

/* Active left bar */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 25%; bottom: 25%;
    width: 3px;
    background: var(--primary-light);
    border-radius: 0 3px 3px 0;
}

/* Collapsed state */
.sidebar.collapsed .brand-name,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .upgrade-text { display: none !important; }

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 11px 0;
    margin: 2px 6px;
}
.sidebar.collapsed .nav-icon { font-size: 1.15rem; width: auto; }

/* Divider */
.sidebar-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 6px 16px;
}

/* Logout */
.sidebar-upgrade { padding: 12px; border-top: 1px solid var(--sidebar-border); flex-shrink: 0; }

.upgrade-card {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
    cursor: pointer;
}
.upgrade-card:hover { background: rgba(239,68,68,0.2); transform: translateY(-1px); }

.upgrade-icon {
    width: 30px; height: 30px;
    background: rgba(239,68,68,0.2);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fca5a5; font-size: 0.9rem; flex-shrink: 0;
}
.upgrade-text strong { display: block; color: #fca5a5; font-size: 0.78rem; font-weight: 600; }
.upgrade-text small  { color: rgba(252,165,165,0.6); font-size: 0.63rem; }

/* Sidebar mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1039;
    backdrop-filter: blur(3px);
}
.sidebar-overlay.show { display: block; }

/* ================================================================
   Topbar
   ================================================================ */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-h);
    background: var(--topbar-bg);
    backdrop-filter: var(--topbar-blur);
    -webkit-backdrop-filter: var(--topbar-blur);
    border-bottom: 1px solid var(--topbar-border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 12px;
    z-index: 999;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.03);
}

.sidebar-toggle {
    width: 38px; height: 38px;
    border: 1px solid var(--border-color) !important;
    background: white !important;
    color: var(--text-secondary) !important;
    border-radius: 10px !important;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}
.sidebar-toggle:hover {
    background: var(--primary-soft) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: rotate(90deg);
}

/* Search */
.topbar-search { flex: 1; max-width: 340px; }

.prism-search { position: relative; }
.prism-search i {
    position: absolute; left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.85rem; pointer-events: none;
}
.prism-search input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1.5px solid var(--border-color);
    background: var(--body-bg);
    border-radius: 11px;
    font-size: 0.82rem;
    color: var(--text-primary);
    font-family: var(--font);
    outline: none;
    transition: all var(--transition);
}
.prism-search input::placeholder { color: var(--text-muted); }
.prism-search input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Topbar actions */
.topbar-actions { display: flex; align-items: center; gap: 6px; }

.topbar-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: white;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    cursor: pointer; position: relative;
    transition: all var(--transition);
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.topbar-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.badge-dot {
    position: absolute; top: 8px; right: 8px;
    width: 7px; height: 7px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* User menu */
.user-menu-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.user-menu-btn:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.user-avatar {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.68rem; font-weight: 700; flex-shrink: 0;
    box-shadow: 0 2px 6px var(--primary-glow);
}
.user-name  { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.user-role  { display: block; font-size: 0.67rem; color: var(--text-muted); font-weight: 500; }

/* Notifications */
.notification-dropdown {
    width: 310px;
    border-radius: 14px !important;
    border: 1.5px solid var(--border-color) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.12) !important;
}
.notif-header { font-size: 0.875rem; }
.notif-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer; transition: background var(--transition);
}
.notif-item:hover { background: var(--body-bg); }
.notif-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ================================================================
   Page Content
   ================================================================ */
.page-content {
    flex: 1;
    padding: 30px 28px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 14px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 2px;
    letter-spacing: -0.03em;
}

.breadcrumb { font-size: 0.8rem; margin: 0; }
.breadcrumb-item.active { color: var(--text-secondary); }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================================================================
   Footer
   ================================================================ */
.system-footer {
    margin-top: auto;
    padding: 20px 28px;
    background: white;
    border-top: 1px solid var(--border-color);
}
.hover-primary:hover { color: var(--primary) !important; }

/* ================================================================
   Flash / Notification Hub
   ================================================================ */
.notification-hub { padding: 20px 28px 0; }

.alert-prism-success, .alert-prism-error {
    border-radius: 14px !important;
    padding: 1rem 1.25rem !important;
    border: 1.5px solid !important;
}
.alert-prism-success {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.alert-prism-error {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}
.alert-prism-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.alert-heading { font-size: 0.875rem; }

/* ================================================================
   KPI / Stat Cards
   ================================================================ */
.kpi-card, .glass-kpi {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 22px 20px 18px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.kpi-card:hover, .glass-kpi:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-lg);
}

/* Colored top accent bar */
.kpi-blue::before   { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg,#7c3aed,#8b5cf6); }
.kpi-green::before  { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg,#10b981,#34d399); }
.kpi-orange::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg,#f59e0b,#fbbf24); }
.kpi-indigo::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg,#6366f1,#818cf8); }
.kpi-red::before    { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg,#ef4444,#f87171); }
.kpi-pink::before   { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg,#ec4899,#f472b6); }
.kpi-teal::before   { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg,#06b6d4,#22d3ee); }

/* Subtle bg glow */
.kpi-blue::after   { content:''; position:absolute; bottom:0; right:0; width:80px; height:80px; background: radial-gradient(circle, rgba(124,58,237,0.07), transparent); pointer-events:none; }
.kpi-green::after  { content:''; position:absolute; bottom:0; right:0; width:80px; height:80px; background: radial-gradient(circle, rgba(16,185,129,0.07), transparent); pointer-events:none; }
.kpi-orange::after { content:''; position:absolute; bottom:0; right:0; width:80px; height:80px; background: radial-gradient(circle, rgba(245,158,11,0.07), transparent); pointer-events:none; }
.kpi-indigo::after { content:''; position:absolute; bottom:0; right:0; width:80px; height:80px; background: radial-gradient(circle, rgba(99,102,241,0.07), transparent); pointer-events:none; }
.kpi-red::after    { content:''; position:absolute; bottom:0; right:0; width:80px; height:80px; background: radial-gradient(circle, rgba(239,68,68,0.07), transparent); pointer-events:none; }
.kpi-pink::after   { content:''; position:absolute; bottom:0; right:0; width:80px; height:80px; background: radial-gradient(circle, rgba(236,72,153,0.07), transparent); pointer-events:none; }
.kpi-teal::after   { content:''; position:absolute; bottom:0; right:0; width:80px; height:80px; background: radial-gradient(circle, rgba(6,182,212,0.07), transparent); pointer-events:none; }

/* Icon */
.kpi-icon, .kpi-icon-glow {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
    transition: transform var(--transition);
    flex-shrink: 0;
}
.glass-kpi:hover .kpi-icon-glow,
.kpi-card:hover  .kpi-icon { transform: scale(1.1) rotate(-3deg); }

.glass-kpi.kpi-blue   .kpi-icon-glow, .kpi-card.kpi-blue   .kpi-icon { background: rgba(124,58,237,0.10); color:#7c3aed; }
.glass-kpi.kpi-green  .kpi-icon-glow, .kpi-card.kpi-green  .kpi-icon { background: rgba(16,185,129,0.10); color:#10b981; }
.glass-kpi.kpi-orange .kpi-icon-glow, .kpi-card.kpi-orange .kpi-icon { background: rgba(245,158,11,0.10); color:#f59e0b; }
.glass-kpi.kpi-indigo .kpi-icon-glow, .kpi-card.kpi-indigo .kpi-icon { background: rgba(99,102,241,0.10); color:#6366f1; }
.glass-kpi.kpi-red     .kpi-icon-glow, .kpi-card.kpi-red     .kpi-icon { background: rgba(239,68,68,0.10);   color:#ef4444; }
.glass-kpi.kpi-pink    .kpi-icon-glow, .kpi-card.kpi-pink    .kpi-icon { background: rgba(236,72,153,0.10);  color:#ec4899; }
.glass-kpi.kpi-teal    .kpi-icon-glow, .kpi-card.kpi-teal    .kpi-icon { background: rgba(6,182,212,0.10);   color:#06b6d4; }
.glass-kpi.kpi-cyan    .kpi-icon-glow, .kpi-card.kpi-cyan    .kpi-icon { background: rgba(6,182,212,0.10);   color:#06b6d4; }
.glass-kpi.kpi-emerald .kpi-icon-glow, .kpi-card.kpi-emerald .kpi-icon { background: rgba(16,185,129,0.10);  color:#10b981; }
.glass-kpi.kpi-violet  .kpi-icon-glow, .kpi-card.kpi-violet  .kpi-icon { background: rgba(124,58,237,0.10);  color:#7c3aed; }
.glass-kpi.kpi-slate   .kpi-icon-glow, .kpi-card.kpi-slate   .kpi-icon { background: rgba(100,116,139,0.10); color:#64748b; }

.kpi-value, .kpi-val {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.kpi-label, .kpi-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
}
.kpi-sub {
    font-size: 0.72rem;
    margin-top: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

.glass-kpi .kpi-value, .glass-kpi .kpi-val,
.kpi-card  .kpi-value, .kpi-card  .kpi-val  { color: var(--text-primary); }
.glass-kpi .kpi-label, .glass-kpi .kpi-lbl,
.kpi-card  .kpi-label, .kpi-card  .kpi-lbl  { color: var(--text-secondary); }
.glass-kpi .kpi-sub,   .kpi-card  .kpi-sub  { color: var(--text-muted); }

.trend-up   { color: #10b981; }
.trend-down { color: #ef4444; }

/* ================================================================
   Cards
   ================================================================ */
.card-custom {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.card-custom:hover { box-shadow: var(--card-shadow-lg); }

.card-header-custom {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
}
.card-title-custom {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.card-subtitle-custom {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 3px 0 0;
}

/* Bootstrap card overrides */
.card {
    border-radius: var(--card-radius) !important;
    box-shadow: var(--card-shadow) !important;
    border: 1px solid var(--card-border) !important;
}

/* Settings tabs */
.nav-tabs-custom {
    border-bottom: 2px solid var(--border-color);
    gap: 4px;
}
.nav-tabs-custom .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 0;
    transition: color var(--transition), border-color var(--transition);
}
.nav-tabs-custom .nav-link:hover { color: var(--primary); }
.nav-tabs-custom .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

/* ================================================================
   Broadcast / List Cards
   ================================================================ */
.broadcast-stream { display: flex; flex-direction: column; gap: 0.75rem; }

.broadcast-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    transition: box-shadow var(--transition), transform var(--transition);
    overflow: hidden;
}
.broadcast-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-lg) !important;
}

.card-ribbon {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; z-index: 2;
}

.broadcast-avatar-wrap { position: relative; width: 48px; height: 48px; }
.broadcast-avatar {
    width: 100%; height: 100%;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

/* Status pulse */
.status-pulse {
    position: absolute; bottom: -2px; right: -2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff; z-index: 3;
}
.pulse-active { background: #10b981; animation: pulse-green-sm 2s infinite; }
@keyframes pulse-green-sm {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ================================================================
   Stat Cards (older pattern)
   ================================================================ */
.stat-card {
    background: white;
    border-radius: var(--card-radius);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-lg); }
.stat-card-body { padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.stat-info { flex: 1; }
.stat-label {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-secondary); margin: 0 0 4px;
}
.stat-value {
    font-size: 1.6rem; font-weight: 800;
    color: var(--text-primary); margin: 0; line-height: 1.1;
    letter-spacing: -0.03em;
}

/* ================================================================
   Tables
   ================================================================ */
.data-table thead th {
    background: #f9f8fc;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border-bottom: 1.5px solid var(--border-color);
    padding: 12px 16px;
    white-space: nowrap;
}
.data-table tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #f9f8fc; }

.table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    background: #f9f8fc;
    border-bottom: 1.5px solid var(--border-color) !important;
}
.table tbody tr:hover { background: #f9f8fc !important; }

.table-avatar {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700;
    flex-shrink: 0; overflow: hidden;
}
.table-avatar img { width: 100%; height: 100%; object-fit: cover; }
.table-avatar.small { width: 28px; height: 28px; font-size: 0.6rem; border-radius: 7px; }

/* ================================================================
   Status Badges
   ================================================================ */
.status-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem; font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}
.status-active, .status-paid       { background: #ecfdf5; color: #059669; }
.status-inactive, .status-overdue  { background: #fef2f2; color: #dc2626; }
.status-pending, .status-partial   { background: #fffbeb; color: #d97706; }
.status-graduated                  { background: #f5f3ff; color: #7c3aed; }
.status-transferred                { background: #f0f9ff; color: #0284c7; }
.status-suspended                  { background: rgba(239,68,68,0.10); color: #9a1c1c; }

.status-indicator {
    display: inline-flex; align-items: center;
    gap: 5px; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.status-indicator .dot {
    width: 6px; height: 6px;
    border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.status-active .dot   { background: #10b981; }
.status-inactive .dot { background: #9ca3af; }
.status-pending .dot  { background: #f59e0b; }
.status-active .lbl   { color: #059669; }
.status-inactive .lbl { color: #6b7280; }
.status-pending .lbl  { color: #d97706; }

/* ================================================================
   Buttons
   ================================================================ */
.btn {
    border-radius: 10px !important;
    font-family: var(--font) !important;
    font-weight: 600 !important;
    transition: all var(--transition) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    border-color: var(--primary) !important;
    font-size: 0.875rem !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px var(--primary-glow) !important;
}
.btn-primary:active { transform: translateY(0px) !important; }

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    font-size: 0.875rem !important;
}
.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}

.shadow-primary { box-shadow: 0 4px 14px var(--primary-glow) !important; }

.btn-light-blue   { background: rgba(124,58,237,0.08); color: #7c3aed; border: none; }
.btn-light-indigo { background: rgba(99,102,241,0.08); color: #6366f1; border: none; }
.btn-outline-orange { background: #fff7ed; color: #f97316; border: 1.5px solid #ffedd5; }
.btn-outline-indigo { background: #f5f3ff; color: #7c3aed; border: 1.5px solid #ede9fe; }

.btn-icon-user {
    width: 34px; height: 34px;
    border-radius: 9px;
    border: 1.5px solid var(--border-color);
    background: white;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--transition);
    cursor: pointer;
}
.btn-icon-user:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* ================================================================
   Forms
   ================================================================ */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    font-size: 0.875rem;
    font-family: var(--font);
    padding: 9px 13px;
    transition: border-color var(--transition), box-shadow var(--transition);
    color: var(--text-primary);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
}
.form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.form-label.required::after { content: ' *'; color: #ef4444; }

.form-control-modern {
    border-radius: 11px;
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    background: #f9f8fc;
    font-size: 0.875rem;
    font-family: var(--font);
    transition: all var(--transition);
}
.form-control-modern:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
}

.input-group-modern {
    display: flex; align-items: center;
    background: #f9f8fc;
    border: 1.5px solid var(--border-color);
    border-radius: 11px; overflow: hidden;
}
.input-group-modern .form-control { border: 0; background: transparent; }

/* ================================================================
   Modals
   ================================================================ */
.modal { z-index: 9999 !important; }
.modal-backdrop { z-index: 9990 !important; }
.modal-open .sidebar, .modal-open .topbar { z-index: 1030 !important; }

.modal-content {
    border: none !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 72px rgba(0,0,0,0.18) !important;
    overflow: hidden;
}
.modal-content-custom { border-radius: 18px !important; }
.modal-header { padding: 22px 26px 14px !important; }
.modal-body   { padding: 14px 26px 18px !important; }
.modal-footer { padding: 14px 26px 22px !important; }

.modal-title-block { display: flex; align-items: center; gap: 13px; }
.modal-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; flex-shrink: 0;
}
.modal-icon-primary { background: var(--primary-soft); color: var(--primary); }
.modal-icon-warning { background: rgba(245,158,11,0.10); color: #f59e0b; }
.modal-icon-danger  { background: rgba(239,68,68,0.10);  color: #ef4444; }
.modal-icon-info    { background: rgba(6,182,212,0.10);   color: #06b6d4; }

.modal-hero-icon {
    width: 72px; height: 72px;
    background: rgba(255,255,255,0.18);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
}
.modal-hero-icon-sm {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff;
}

.delete-icon-wrap {
    width: 64px; height: 64px;
    background: rgba(239,68,68,0.10);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: #ef4444; margin: 0 auto;
}

/* ================================================================
   Dropdowns
   ================================================================ */
.dropdown-menu {
    border-radius: 14px !important;
    border: 1.5px solid var(--border-color) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,0.12) !important;
    padding: 6px !important;
}
.dropdown-item {
    font-size: 0.875rem;
    font-family: var(--font);
    font-weight: 500;
    padding: 9px 13px;
    border-radius: 9px;
    margin: 1px 0;
    transition: all var(--transition);
}
.dropdown-item:hover {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
}
.dropdown-divider { margin: 4px 0 !important; }

/* ================================================================
   Alerts
   ================================================================ */
.alert { border-radius: 12px; font-size: 0.875rem; font-family: var(--font); }

/* ================================================================
   Auth Pages
   ================================================================ */
.auth-body {
    background: var(--body-bg);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.auth-container { width: 100%; max-width: 900px; }
.auth-card {
    background: white;
    border-radius: 22px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.12);
    display: flex;
    min-height: 540px;
    overflow: hidden;
}
.auth-card-left {
    flex: 1;
    background: linear-gradient(145deg, var(--primary-dark), var(--primary), #7c3aed);
    padding: 48px 40px;
    display: flex; align-items: center; justify-content: center;
}
.auth-illustration { text-align: center; }
.auth-brand-logo {
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.15);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; color: white;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}
.auth-tagline { font-size: 1.45rem; font-weight: 800; color: white; margin-bottom: 10px; letter-spacing: -0.03em; }
.auth-desc { color: rgba(255,255,255,0.72); font-size: 0.875rem; margin-bottom: 20px; line-height: 1.6; }
.auth-feature-item { color: rgba(255,255,255,0.85); font-size: 0.82rem; margin-bottom: 8px; }
.auth-card-right {
    flex: 0 0 390px;
    padding: 48px 42px;
    display: flex; align-items: center;
}
.auth-form-wrapper { width: 100%; }
.auth-header { margin-bottom: 28px; }
.auth-logo-sm {
    width: 46px; height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: white; margin-bottom: 16px;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.auth-title { font-size: 1.45rem; font-weight: 800; margin-bottom: 4px; color: var(--text-primary); letter-spacing: -0.03em; }
.auth-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin: 0; font-weight: 500; }
.input-group-auth { position: relative; }
.input-icon {
    position: absolute; left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary); z-index: 2; font-size: 0.875rem;
}
.auth-input { padding-left: 38px !important; }
.input-toggle-password {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-secondary); cursor: pointer; z-index: 2; padding: 0;
    transition: color var(--transition);
}
.input-toggle-password:hover { color: var(--primary); }
.auth-forgot-link { font-size: 0.8rem; color: var(--primary); text-decoration: none; font-weight: 600; }
.btn-auth { padding: 12px 20px !important; font-size: 0.95rem !important; }

/* ================================================================
   Dashboard Specific
   ================================================================ */
.dash-date-badge {
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex; align-items: center;
    box-shadow: var(--card-shadow);
    font-weight: 600;
}
.live-pill {
    background: rgba(16,185,129,0.10); color: #059669;
    border-radius: 20px; padding: 2px 8px;
    font-size: 0.7rem; font-weight: 700;
    display: inline-flex; align-items: center;
    border: 1px solid rgba(16,185,129,0.2);
}

/* Charts */
.chart-tabs {
    display: flex; background: var(--body-bg);
    border-radius: 9px; padding: 3px; gap: 2px;
}
.chart-tab {
    border: none; background: transparent; border-radius: 7px;
    padding: 5px 14px; font-size: 0.78rem; font-weight: 700;
    color: var(--text-secondary); cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
}
.chart-tab.active {
    background: white; color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Activity feed */
.activity-feed { max-height: 400px; overflow-y: auto; }
.af-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
}
.af-item:last-child { border-bottom: 0; }
.af-item:hover { background: #f9f8fc; }
.af-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem; flex-shrink: 0;
}
.af-body { flex: 1; min-width: 0; }
.af-action { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-table  { font-weight: 500; color: var(--text-secondary); font-size: 0.78rem; }
.af-meta   { font-size: 0.72rem; color: var(--text-secondary); margin-top: 2px; }
.af-badge  { flex-shrink: 0; }

/* Class bars */
.cls-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
}
.cls-row:last-child { border-bottom: 0; }
.cls-info { width: 88px; flex-shrink: 0; display: flex; flex-direction: column; }
.cls-name { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cls-stream { font-size: 0.68rem; color: var(--text-secondary); }
.cls-bar-wrap { flex: 1; height: 6px; background: var(--body-bg); border-radius: 4px; overflow: hidden; }
.cls-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 4px; min-width: 4px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }
.cls-count { font-size: 0.78rem; font-weight: 800; color: var(--text-primary); width: 26px; text-align: right; flex-shrink: 0; }

/* Attendance donut */
.donut-wrapper { position: relative; width: 180px; height: 180px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-pct { font-size: 1.65rem; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -0.04em; }
.donut-lbl { font-size: 0.7rem; color: var(--text-secondary); font-weight: 600; }
.att-legend { padding: 0 4px; }
.att-leg-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-color); font-size: 0.8rem; }
.att-leg-row:last-child { border-bottom: 0; }
.att-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.att-dot-present { background: #10b981; }
.att-dot-absent  { background: #ef4444; }
.att-dot-late    { background: #f59e0b; }
.att-dot-excused { background: #3b82f6; }
.att-leg-label { color: var(--text-secondary); flex: 1; font-weight: 500; }
.att-leg-val   { font-weight: 800; color: var(--text-primary); }

/* Fee strip */
.fee-strip-item {
    padding: 14px 8px;
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.fee-strip-item:last-child { border-right: 0; }
.fee-strip-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; margin-bottom: 4px; }
.fee-strip-val { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -0.02em; }
.fee-strip-lbl { font-size: 0.7rem; color: var(--text-secondary); font-weight: 600; }

/* Announcements */
.ann-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--border-color); }
.ann-item:last-child { border-bottom: 0; }
.ann-accent { width: 4px; flex-shrink: 0; border-radius: 0 0 0 0; }
.ann-body { padding: 11px 14px; flex: 1; }
.ann-title { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.ann-meta  { font-size: 0.72rem; color: var(--text-secondary); font-weight: 500; }

/* Empty state */
.empty-state { text-align: center; color: var(--text-secondary); padding: 36px 20px; }
.empty-state i { font-size: 2.2rem; display: block; margin-bottom: 10px; opacity: 0.25; }
.empty-state p { font-size: 0.82rem; margin: 0; font-weight: 500; }

.empty-state-icon {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.3;
}

/* ================================================================
   Transport
   ================================================================ */
.live-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; background: #10b981; animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(1.3); }
}
.vehicle-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer; transition: background var(--transition);
}
.vehicle-item:hover { background: var(--body-bg); }
.vehicle-item:last-child { border-bottom: 0; }
.vehicle-icon {
    width: 38px; height: 38px;
    background: var(--primary-soft);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1rem; flex-shrink: 0;
}
.vehicle-info { flex: 1; min-width: 0; font-size: 0.82rem; }
.route-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border-color); }
.route-item:last-child { border-bottom: 0; }
.route-line-indicator { width: 4px; height: 30px; background: linear-gradient(180deg, var(--primary), var(--primary-light)); border-radius: 2px; flex-shrink: 0; }

/* ================================================================
   Profile
   ================================================================ */
.profile-avatar-lg {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 800;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.profile-avatar-xl {
    width: 100px; height: 100px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 800; overflow: hidden;
    box-shadow: 0 6px 20px var(--primary-glow);
}
.profile-detail-row {
    display: flex; justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
}
.profile-detail-row:last-child { border-bottom: 0; }

/* Photo upload */
.photo-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 16px; padding: 30px;
    text-align: center; cursor: pointer;
    transition: all var(--transition);
    background: #f8fafc;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-upload-area:hover { border-color: var(--primary); background: #f0f7ff; }

.photo-preview-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.passport-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.photo-preview-wrapper:hover .photo-overlay { opacity: 1; }
.photo-overlay i { font-size: 1.5rem; margin-bottom: 5px; }
.photo-overlay span { font-size: 0.75rem; font-weight: 600; }

.photo-placeholder .placeholder-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: var(--primary);
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.photo-placeholder .placeholder-text span { color: #334155; }

.smaller { font-size: 0.75rem; }

/* ================================================================
   Pagination
   ================================================================ */
.pagination .page-link {
    border-radius: 8px; margin: 0 2px;
    color: var(--primary); border-color: var(--border-color);
    font-size: 0.8rem; padding: 6px 11px;
    font-weight: 600;
    font-family: var(--font);
    transition: all var(--transition);
}
.pagination .page-link:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary);
    box-shadow: 0 3px 10px var(--primary-glow);
}

/* ================================================================
   Leaflet
   ================================================================ */
.custom-vehicle-marker {
    background: var(--primary); border: 2px solid white;
    border-radius: 50%; width: 34px !important; height: 34px !important;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1rem;
    box-shadow: 0 3px 10px var(--primary-glow);
}
.custom-station-marker {
    background: white; border: 2px solid var(--primary);
    border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ================================================================
   Attendance row highlights
   ================================================================ */
.table-success-subtle { background: rgba(16,185,129,0.05) !important; }
.table-danger-subtle  { background: rgba(239,68,68,0.05) !important; }
.table-warning-subtle { background: rgba(245,158,11,0.05) !important; }
.table-info-subtle    { background: rgba(6,182,212,0.05) !important; }

/* ================================================================
   Toasts
   ================================================================ */
.toast-custom {
    min-width: 290px; max-width: 360px;
    background: white; border-radius: 14px;
    box-shadow: 0 10px 36px rgba(0,0,0,0.13);
    border-left: 4px solid #10b981;
    margin-bottom: 8px;
    opacity: 1; transition: opacity 0.4s, transform 0.4s;
}
.toast-custom.toast-hiding { opacity: 0; transform: translateX(30px); }
.toast-success { border-left-color: #10b981; }
.toast-danger  { border-left-color: #ef4444; }
.toast-warning { border-left-color: #f59e0b; }
.toast-info    { border-left-color: #3b82f6; }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-success .toast-icon { color: #10b981; }
.toast-danger  .toast-icon { color: #ef4444; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info    .toast-icon { color: #3b82f6; }
.toast-msg { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }

/* ================================================================
   Shared Utilities
   ================================================================ */
.fs-7 { font-size: 0.9rem; }

.network-node {
    width: 38px; height: 38px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}

.prism-date-badge {
    width: 46px; background: var(--primary-soft);
    border-radius: 11px; padding: 6px 0;
    text-align: center; flex-shrink: 0;
}
.prism-date-badge .day   { display: block; font-size: 1.1rem; font-weight: 800; color: var(--primary); line-height: 1; }
.prism-date-badge .month { display: block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); margin-top: 2px; }

.grade-pill {
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 0.78rem;
}

.live-pulse-dot {
    width: 8px; height: 8px; background: #10b981;
    border-radius: 50%; display: inline-block; position: relative;
}
.live-pulse-dot::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background: #10b981;
    border-radius: 50%; animation: pulse-green-ring 2s infinite;
}
@keyframes pulse-green-ring {
    0%   { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

.mini-stat-badge {
    text-align: center; background: #fff;
    padding: 6px 12px; border-radius: 11px;
    border: 1.5px solid var(--border-color);
    min-width: 64px; display: inline-flex; flex-direction: column;
}
.mini-stat-badge .val { font-size: 0.9rem; font-weight: 800; line-height: 1; }
.mini-stat-badge .lbl { font-size: 0.55rem; font-weight: 700; opacity: 0.6; letter-spacing: 0.06em; }

.upcoming-date-hex {
    width: 46px; height: 46px; border-radius: 11px;
    background: var(--primary-soft); color: var(--primary);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    line-height: 1.1; flex-shrink: 0;
}
.upcoming-date-hex .m { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.upcoming-date-hex .d { font-size: 1.2rem; font-weight: 800; }

.stat-dot { width: 7px; height: 7px; border-radius: 50%; }

/* ================================================================
   Color Helpers
   ================================================================ */
.bg-primary-soft   { background: var(--primary-soft) !important; }
.bg-success-soft   { background: rgba(16,185,129,0.10) !important; }
.bg-danger-soft    { background: rgba(239,68,68,0.10) !important; }
.bg-warning-soft   { background: rgba(245,158,11,0.10) !important; }
.bg-info-soft      { background: rgba(6,182,212,0.10) !important; }
.bg-pink-soft      { background: rgba(236,72,153,0.10) !important; }
.bg-secondary-soft { background: rgba(107,114,128,0.10) !important; }

.bg-blue-soft   { background: var(--primary-soft) !important; }
.bg-green-soft  { background: rgba(16,185,129,0.10) !important; }
.bg-orange-soft { background: rgba(245,158,11,0.10) !important; }
.bg-red-soft    { background: rgba(239,68,68,0.10) !important; }
.bg-indigo-soft { background: rgba(99,102,241,0.10) !important; }
.bg-pink-soft   { background: rgba(236,72,153,0.10) !important; }

.text-primary   { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-pink      { color: #ec4899 !important; }
.text-blue      { color: var(--primary) !important; }
.text-green     { color: #10b981 !important; }
.text-orange    { color: #f59e0b !important; }
.text-red       { color: #ef4444 !important; }
.text-indigo    { color: #6366f1 !important; }

.bg-blue   { background: var(--primary) !important; }
.bg-green  { background: #10b981 !important; }
.bg-orange { background: #f59e0b !important; }
.bg-red    { background: #ef4444 !important; }
.bg-indigo { background: #6366f1 !important; }
.bg-pink   { background: #ec4899 !important; }

.text-xxs { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.3px; }
.text-xs  { font-size: 0.78rem; font-weight: 500; }
.ls-1     { letter-spacing: 1px; }
.uppercase { text-transform: uppercase !important; }
.no-caret::after { display: none; }
.pv-1     { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.meta-item { display: inline-flex; align-items: center; gap: 4px; }

.state-inactive { opacity: 0.6; filter: grayscale(0.4); }

/* ================================================================
   Pagination Rounded
   ================================================================ */
.pagination-rounded .page-link {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: #64748b; font-weight: 800;
    border-radius: 12px !important; margin: 0 3px; border: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all var(--transition);
}
.pagination-rounded .page-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.pagination-rounded .page-item.active .page-link {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ================================================================
   Animations
   ================================================================ */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; display: inline-block; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.35s ease forwards; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-w);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 6px 0 32px rgba(0,0,0,0.35);
    }
    .main-wrapper { margin-left: 0; }
    .page-content { padding: 18px; }
    .notification-hub { padding: 16px 16px 0; }
    .auth-card-right { flex: 1; padding: 32px 24px; }
}

@media (max-width: 575.98px) {
    .page-header { flex-direction: column; }
    .topbar-search { display: none; }
    .page-title { font-size: 1.25rem; }
    .topbar { padding: 0 16px; }
}

/* ================================================================
   Finance Module — Shared Components
   ================================================================ */

/* ── Glass KPI Cards ─────────────────────────────────────────── */
.glass-kpi {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.glass-kpi:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-lg); }
.glass-kpi::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}
.glass-kpi::after {
    content: '';
    position: absolute;
    bottom: -20px; right: -20px;
    width: 90px; height: 90px;
    border-radius: 50%;
    opacity: .08;
}
.kpi-icon-glow {
    width: 44px; height: 44px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
}
.kpi-val { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; margin-bottom: 4px; }
.kpi-lbl { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); margin-bottom: 2px; }
.kpi-sub { font-size: .72rem; color: var(--text-muted); font-weight: 500; }

/* Colour variants */
.kpi-green::before  { background: linear-gradient(90deg,#10b981,#059669); }
.kpi-green::after   { background: #10b981; }
.kpi-green .kpi-icon-glow { background: rgba(16,185,129,.12); color: #10b981; }

.kpi-red::before    { background: linear-gradient(90deg,#ef4444,#dc2626); }
.kpi-red::after     { background: #ef4444; }
.kpi-red .kpi-icon-glow { background: rgba(239,68,68,.12); color: #ef4444; }

.kpi-blue::before   { background: linear-gradient(90deg,#3b82f6,#2563eb); }
.kpi-blue::after    { background: #3b82f6; }
.kpi-blue .kpi-icon-glow { background: rgba(59,130,246,.12); color: #3b82f6; }

.kpi-indigo::before { background: linear-gradient(90deg,#6366f1,#4f46e5); }
.kpi-indigo::after  { background: #6366f1; }
.kpi-indigo .kpi-icon-glow { background: rgba(99,102,241,.12); color: #6366f1; }

.kpi-orange::before { background: linear-gradient(90deg,#f59e0b,#d97706); }
.kpi-orange::after  { background: #f59e0b; }
.kpi-orange .kpi-icon-glow { background: rgba(245,158,11,.12); color: #f59e0b; }

.kpi-teal::before   { background: linear-gradient(90deg,#06b6d4,#0891b2); }
.kpi-teal::after    { background: #06b6d4; }
.kpi-teal .kpi-icon-glow { background: rgba(6,182,212,.12); color: #06b6d4; }

.kpi-pink::before   { background: linear-gradient(90deg,#ec4899,#db2777); }
.kpi-pink::after    { background: #ec4899; }
.kpi-pink .kpi-icon-glow { background: rgba(236,72,153,.12); color: #ec4899; }

.kpi-cyan::before   { background: linear-gradient(90deg,#06b6d4,#0e7490); }
.kpi-cyan::after    { background: #06b6d4; }
.kpi-cyan .kpi-icon-glow { background: rgba(6,182,212,.12); color: #06b6d4; }

.kpi-emerald::before { background: linear-gradient(90deg,#10b981,#059669); }
.kpi-emerald::after  { background: #10b981; }
.kpi-emerald .kpi-icon-glow { background: rgba(16,185,129,.12); color: #10b981; }

.kpi-violet::before  { background: linear-gradient(90deg,#7c3aed,#6d28d9); }
.kpi-violet::after   { background: #7c3aed; }
.kpi-violet .kpi-icon-glow { background: rgba(124,58,237,.12); color: #7c3aed; }

.kpi-slate::before   { background: linear-gradient(90deg,#64748b,#475569); }
.kpi-slate::after    { background: #64748b; }
.kpi-slate .kpi-icon-glow { background: rgba(100,116,139,.12); color: #64748b; }

.kpi-link { cursor: pointer; }
.kpi-link:hover { transform: translateY(-4px); }

/* ── Table Avatar ────────────────────────────────────────────── */
.table-avatar {
    width: 34px; height: 34px; min-width: 34px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 800;
    letter-spacing: .02em;
}

/* ── Colour Soft Bg Utilities ────────────────────────────────── */
.bg-green-soft   { background: rgba(16,185,129,.1)  !important; }
.bg-red-soft,
.bg-danger-soft  { background: rgba(239,68,68,.1)   !important; }
.bg-blue-soft    { background: rgba(59,130,246,.1)  !important; }
.bg-indigo-soft  { background: rgba(99,102,241,.1)  !important; }
.bg-orange-soft  { background: rgba(245,158,11,.1)  !important; }
.bg-teal-soft    { background: rgba(6,182,212,.1)   !important; }
.bg-pink-soft    { background: rgba(236,72,153,.1)  !important; }
.bg-success-soft  { background: rgba(16,185,129,.1)  !important; }
.bg-secondary-soft { background: rgba(107,114,128,.1) !important; }
.bg-primary-soft  { background: var(--primary-soft)  !important; }
.bg-violet-soft   { background: rgba(124,58,237,.1)  !important; }
.bg-cyan-soft     { background: rgba(6,182,212,.1)   !important; }
.bg-emerald-soft  { background: rgba(16,185,129,.1)  !important; }
.bg-warning-soft  { background: rgba(245,158,11,.1)  !important; }

.text-green   { color: #10b981 !important; }
.text-red     { color: #ef4444 !important; }
.text-teal    { color: #06b6d4 !important; }
.text-indigo  { color: #6366f1 !important; }
.text-orange  { color: #f59e0b !important; }
.text-pink    { color: #ec4899 !important; }
.text-cyan    { color: #06b6d4 !important; }
.text-violet  { color: #7c3aed !important; }
.text-emerald { color: #10b981 !important; }

/* ── Quick Access Links ──────────────────────────────────────── */
.quick-link-card {
    transition: all .15s;
    min-height: 42px;
}
.quick-link-card:hover {
    background: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transform: translateY(-1px);
}
.ql-icon { font-size: 1.05rem; flex-shrink: 0; }
.ql-label { font-size: .8rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hover-lift:hover { transform: translateY(-2px); }

/* ── Finance Sub-navigation ──────────────────────────────────── */
.fin-subnav {
    display: flex;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 6px;
    flex-wrap: wrap;
    box-shadow: var(--card-shadow);
}
.fin-subnav-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.fin-subnav-item i { font-size: .9rem; }
.fin-subnav-item:hover { background: var(--primary-soft); color: var(--primary); }
.fin-subnav-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ── Finance Quick-link Tiles ────────────────────────────────── */
.fin-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    background: var(--body-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 13px;
    text-decoration: none;
    transition: all .2s;
}
.fin-tile:hover {
    background: #fff;
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 4px 14px var(--primary-glow);
}
.fin-tile-icon { width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.2rem;flex-shrink:0; }
.fin-tile-label { font-size:.86rem;font-weight:700;color:var(--text-primary); }
.fin-tile-desc  { font-size:.72rem;color:var(--text-secondary);font-weight:500; }
.fin-tile-green  .fin-tile-icon { background:rgba(16,185,129,.1);color:#10b981; }
.fin-tile-blue   .fin-tile-icon { background:var(--primary-soft);color:var(--primary); }
.fin-tile-red    .fin-tile-icon { background:rgba(239,68,68,.1);color:#ef4444; }
.fin-tile-teal   .fin-tile-icon { background:rgba(6,182,212,.1);color:#06b6d4; }
.fin-tile-indigo .fin-tile-icon { background:rgba(99,102,241,.1);color:#6366f1; }
/* Dark Mode Component Overrides */
[data-theme="dark"] body, .dark-mode body { background-color: var(--body-bg) !important; color: var(--text-primary); }
[data-theme="dark"] .sidebar-brand, .dark-mode .sidebar-brand { border-bottom-color: var(--sidebar-border); }
[data-theme="dark"] .topbar, .dark-mode .topbar { background: var(--topbar-bg); border-bottom-color: var(--topbar-border); }
[data-theme="dark"] .topbar-btn, .dark-mode .topbar-btn, [data-theme="dark"] .sidebar-toggle, .dark-mode .sidebar-toggle, [data-theme="dark"] .user-menu-btn, .dark-mode .user-menu-btn { 
    background: var(--surface) !important; 
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}
[data-theme="dark"] .prism-search input, .dark-mode .prism-search input { background: var(--surface-2); border-color: var(--border-color); color: var(--text-primary); }
[data-theme="dark"] .card, .dark-mode .card, [data-theme="dark"] .card-custom, .dark-mode .card-custom { background: var(--card-bg) !important; border-color: var(--card-border) !important; }
[data-theme="dark"] .table, .dark-mode .table, [data-theme="dark"] .data-table, .dark-mode .data-table { color: var(--text-primary) !important; }
[data-theme="dark"] .table thead th, .dark-mode .table thead th { background: var(--surface-2) !important; color: var(--text-secondary) !important; }
[data-theme="dark"] .form-control, .dark-mode .form-control, [data-theme="dark"] .form-select, .dark-mode .form-select { 
    background-color: var(--surface-2) !important; 
    border-color: var(--border-color) !important; 
    color: var(--text-primary) !important;
}
[data-theme="dark"] .system-footer, .dark-mode .system-footer { background: var(--surface); border-top-color: var(--border-color); }
[data-theme="dark"] .dropdown-menu, .dark-mode .dropdown-menu { background: var(--surface); border-color: var(--border-color); }
[data-theme="dark"] .modal-content, .dark-mode .modal-content { background: var(--surface); border-color: var(--border-color); }

/* Text Utility Overrides for Dark Mode */
[data-theme="dark"] .text-primary, .dark-mode .text-primary { color: var(--text-primary) !important; }
[data-theme="dark"] .text-secondary, .dark-mode .text-secondary { color: var(--text-secondary) !important; }
[data-theme="dark"] .text-muted, .dark-mode .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .text-dark, .dark-mode .text-dark { color: var(--text-primary) !important; }
[data-theme="dark"] .bg-light, .dark-mode .bg-light { background-color: var(--surface-2) !important; }
[data-theme="dark"] .bg-white, .dark-mode .bg-white { background-color: var(--surface) !important; }
[data-theme="dark"] .border, .dark-mode .border, [data-theme="dark"] .border-bottom, .dark-mode .border-bottom { border-color: var(--border-color) !important; }
[data-theme="dark"] .btn-light, .dark-mode .btn-light { background-color: var(--surface-2) !important; border-color: var(--border-color) !important; color: var(--text-primary) !important; }

.theme-select-card { transition: all var(--transition); border: 2px solid transparent !important; cursor: pointer; pointer-events: auto !important; }
.cursor-pointer { cursor: pointer; }
.theme-select-card:hover { transform: translateY(-5px); box-shadow: var(--card-shadow-lg); border-color: var(--primary) !important; }

/* ── Finance Transaction Rows ────────────────────────────────── */
.fin-txn-row {
    display:flex; align-items:center; gap:13px;
    padding:12px 20px;
    border-bottom:1px solid var(--border-color);
    transition:background .15s;
}
.fin-txn-row:last-child { border-bottom:0; }
.fin-txn-row:hover { background:var(--body-bg); }
.fin-txn-icon { width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:1rem;flex-shrink:0; }
.fin-txn-income  { background:rgba(16,185,129,.1);color:#10b981; }
.fin-txn-expense { background:rgba(239,68,68,.1);color:#ef4444; }
.fin-txn-info { flex:1;min-width:0; }
.fin-txn-name { font-size:.84rem;font-weight:700;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.fin-txn-meta { font-size:.72rem;color:var(--text-secondary);margin-top:2px; }
.fin-txn-amount { text-align:right;font-size:.85rem;font-weight:800;flex-shrink:0; }
.fin-txn-date   { font-size:.68rem;color:var(--text-muted);font-weight:500;margin-top:2px; }
.fin-income  { color:#10b981; }
.fin-expense { color:#ef4444; }
.fin-receipt { font-size:.68rem;color:var(--primary);background:var(--primary-soft);padding:1px 6px;border-radius:4px; }
.fin-legend-dot { display:inline-block;width:9px;height:9px;border-radius:50%; }

/* ── Delete Icon Wrap ────────────────────────────────────────── */
.delete-icon-wrap {
    width:56px; height:56px;
    border-radius:16px;
    background:rgba(239,68,68,.1);
    color:#ef4444;
    display:flex; align-items:center; justify-content:center;
    font-size:1.5rem;
    margin:0 auto;
}

/* ── Notifications Dropdown ──────────────────────────────────── */
.notification-dropdown {
    width: 320px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow-lg);
    border-radius: 12px;
}

.notif-header {
    background: #fff;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.notif-body {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: all 0.2s;
}

.notif-item:hover {
    background: var(--primary-soft);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-footer {
    background: #fff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

[data-theme="dark"] .notif-header, [data-theme="dark"] .notif-footer,
.dark-mode .notif-header, .dark-mode .notif-footer {
    background: var(--surface);
    border-color: var(--border-color);
}

[data-theme="dark"] .notif-item, .dark-mode .notif-item {
    border-bottom-color: rgba(255,255,255,0.03);
}

[data-theme="dark"] .notif-item:hover, .dark-mode .notif-item:hover {
    background: rgba(255,255,255,0.03);
}

/* ================================================================
   SearchableSelect — Custom Searchable Dropdown (no library)
   ================================================================ */
.ss-wrap {
    position: relative;
}
.ss-input {
    cursor: pointer;
    font-size: 0.85rem;
}
.ss-input:focus {
    cursor: text;
}
.ss-drop {
    position: fixed;
    z-index: 10001;
    list-style: none;
    padding: 6px;
    margin: 0;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow-lg);
    max-height: 220px;
    overflow-y: auto;
    display: none;
}
.ss-drop.ss-open {
    display: block;
}
.ss-option {
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-primary);
    list-style: none;
}
.ss-option:hover,
.ss-option.ss-hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.ss-option.ss-selected {
    font-weight: 600;
    color: var(--primary);
}
.ss-no-results {
    padding: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    list-style: none;
}
/* Dark mode */
.dark-mode .ss-drop {
    background: var(--surface);
    border-color: var(--border-color);
}
.dark-mode .ss-option { color: var(--text-primary); }
.dark-mode .ss-option:hover,
.dark-mode .ss-option.ss-hover { background: rgba(124,58,237,0.2); color: var(--primary); }

/* ── Global print rules — hide app chrome ─────────────────────────────── */
@media print {
    .system-footer,
    .topbar,
    .sidebar,
    .page-header-actions,
    .fin-subnav,
    .d-print-none { display: none !important; }
    .main-wrapper  { margin-left: 0 !important; padding: 0 !important; }
    .main-content  { padding: 0 !important; }
}
