/* ── ORION SCHOOL MANAGEMENT SYSTEM - PREMIUM STYLESHEET v2.0 ── */

/* ── 1. Color System & Design Tokens ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --font-primary: 'Plus Jakarta Sans', sans-serif;

    /* Dark Theme (Default) */
    --bg-primary: #080c14;
    --bg-secondary: #0f1623;
    --bg-tertiary: #161e2e;
    --bg-glass: rgba(15, 22, 35, 0.75);
    --bg-glass-2: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-2: rgba(255, 255, 255, 0.12);
    --border-focus: #3b82f6;

    --text-primary: #f0f4ff;
    --text-secondary: #8fa3c8;
    --text-muted: #4d6080;

    --accent-primary: #3b82f6;
    --accent-primary-glow: rgba(59, 130, 246, 0.35);
    --accent-secondary: #8b5cf6;
    --accent-secondary-glow: rgba(139, 92, 246, 0.35);
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #06b6d4;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px var(--accent-primary-glow);
    --shadow-glow-violet: 0 0 25px var(--accent-secondary-glow);

    --transition-speed: 0.3s;
    --border-radius: 14px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
}

/* ── 6 Modern Theme Options ── */

/* 1. Dark Cyber (Default Dark) */
body.dark-theme, body.theme-dark {
    --bg-primary: #080c14;
    --bg-secondary: #0f1623;
    --bg-tertiary: #161e2e;
    --bg-glass: rgba(15, 22, 35, 0.75);
    --bg-glass-2: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-2: rgba(255, 255, 255, 0.12);
    --border-focus: #3b82f6;

    --text-primary: #f0f4ff;
    --text-secondary: #8fa3c8;
    --text-muted: #4d6080;

    --accent-primary: #3b82f6;
    --accent-primary-glow: rgba(59, 130, 246, 0.35);
    --accent-secondary: #8b5cf6;
    --accent-secondary-glow: rgba(139, 92, 246, 0.35);
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #06b6d4;
}

/* 2. Light Deluxe (Clean Light) */
body.light-theme, body.theme-light {
    --bg-primary: #f0f4fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8eef8;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-2: rgba(15, 23, 42, 0.04);
    --border-glass: rgba(15, 23, 42, 0.09);
    --border-glass-2: rgba(15, 23, 42, 0.14);
    --border-focus: #2563eb;

    --text-primary: #0a1628;
    --text-secondary: #3d5275;
    --text-muted: #8fa3c8;

    --accent-primary: #2563eb;
    --accent-primary-glow: rgba(37, 99, 235, 0.2);
    --accent-secondary: #7c3aed;
    --accent-secondary-glow: rgba(124, 58, 237, 0.2);
    --accent-success: #059669;
    --accent-warning: #d97706;
    --accent-danger: #dc2626;
    --accent-info: #0891b2;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.14);
    --shadow-glow: 0 0 25px var(--accent-primary-glow);
}

/* 3. Emerald Forest (Teal & Emerald Dark) */
body.theme-emerald {
    --bg-primary: #041713;
    --bg-secondary: #092620;
    --bg-tertiary: #113830;
    --bg-glass: rgba(9, 38, 32, 0.78);
    --bg-glass-2: rgba(16, 185, 129, 0.05);
    --border-glass: rgba(16, 185, 129, 0.12);
    --border-glass-2: rgba(16, 185, 129, 0.2);
    --border-focus: #10b981;

    --text-primary: #ecfdf5;
    --text-secondary: #6ee7b7;
    --text-muted: #2d6a54;

    --accent-primary: #10b981;
    --accent-primary-glow: rgba(16, 185, 129, 0.35);
    --accent-secondary: #14b8a6;
    --accent-secondary-glow: rgba(20, 184, 166, 0.35);
    --accent-success: #34d399;
    --accent-warning: #f59e0b;
    --accent-danger: #f87171;
    --accent-info: #22d3ee;
}

/* 4. Sapphire Ocean (Deep Cobalt & Cyan) */
body.theme-sapphire {
    --bg-primary: #071328;
    --bg-secondary: #0e1e3e;
    --bg-tertiary: #172c54;
    --bg-glass: rgba(14, 30, 62, 0.78);
    --bg-glass-2: rgba(6, 182, 212, 0.05);
    --border-glass: rgba(6, 182, 212, 0.12);
    --border-glass-2: rgba(6, 182, 212, 0.2);
    --border-focus: #06b6d4;

    --text-primary: #f0f9ff;
    --text-secondary: #7dd3fc;
    --text-muted: #345e8b;

    --accent-primary: #06b6d4;
    --accent-primary-glow: rgba(6, 182, 212, 0.35);
    --accent-secondary: #3b82f6;
    --accent-secondary-glow: rgba(59, 130, 246, 0.35);
    --accent-success: #10b981;
    --accent-warning: #fbbf24;
    --accent-danger: #f87171;
    --accent-info: #38bdf8;
}

/* 5. Sunset Amber (Warm Bronze & Amber) */
body.theme-amber {
    --bg-primary: #180e07;
    --bg-secondary: #29180c;
    --bg-tertiary: #3d2514;
    --bg-glass: rgba(41, 24, 12, 0.8);
    --bg-glass-2: rgba(245, 158, 11, 0.05);
    --border-glass: rgba(245, 158, 11, 0.12);
    --border-glass-2: rgba(245, 158, 11, 0.2);
    --border-focus: #f59e0b;

    --text-primary: #fffbeb;
    --text-secondary: #fde68a;
    --text-muted: #84532b;

    --accent-primary: #f59e0b;
    --accent-primary-glow: rgba(245, 158, 11, 0.35);
    --accent-secondary: #f97316;
    --accent-secondary-glow: rgba(249, 115, 22, 0.35);
    --accent-success: #10b981;
    --accent-warning: #facc15;
    --accent-danger: #ef4444;
    --accent-info: #38bdf8;
}

/* 6. Amethyst Neon (Cyber Amethyst & Pink) */
body.theme-amethyst {
    --bg-primary: #12091c;
    --bg-secondary: #1e102d;
    --bg-tertiary: #2c1842;
    --bg-glass: rgba(30, 16, 45, 0.8);
    --bg-glass-2: rgba(192, 132, 252, 0.05);
    --border-glass: rgba(192, 132, 252, 0.12);
    --border-glass-2: rgba(192, 132, 252, 0.2);
    --border-focus: #c084fc;

    --text-primary: #faf5ff;
    --text-secondary: #e9d5ff;
    --text-muted: #6b3f94;

    --accent-primary: #c084fc;
    --accent-primary-glow: rgba(192, 132, 252, 0.35);
    --accent-secondary: #f43f5e;
    --accent-secondary-glow: rgba(244, 63, 94, 0.35);
    --accent-success: #34d399;
    --accent-warning: #fbbf24;
    --accent-danger: #fb7185;
    --accent-info: #38bdf8;
}

/* 7. Rose Blossom (Rose Gold & Soft Blush) */
body.theme-blossom {
    --bg-primary: #fff0f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fce4ec;
    --bg-glass: rgba(255, 255, 255, 0.88);
    --bg-glass-2: rgba(236, 72, 153, 0.05);
    --border-glass: rgba(236, 72, 153, 0.15);
    --border-glass-2: rgba(236, 72, 153, 0.25);
    --border-focus: #ec4899;

    --text-primary: #701a34;
    --text-secondary: #9f1239;
    --text-muted: #e11d48;

    --accent-primary: #ec4899;
    --accent-primary-glow: rgba(236, 72, 153, 0.25);
    --accent-secondary: #f43f5e;
    --accent-secondary-glow: rgba(244, 63, 94, 0.25);
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #e11d48;
    --accent-info: #06b6d4;

    --shadow-sm: 0 2px 8px rgba(159, 18, 57, 0.06);
    --shadow-md: 0 8px 24px rgba(159, 18, 57, 0.1);
    --shadow-lg: 0 20px 60px rgba(159, 18, 57, 0.14);
    --shadow-glow: 0 0 25px var(--accent-primary-glow);
}

/* 8. Lavender Glam (Velvet Purple & Lilac Glow) */
body.theme-lavender {
    --bg-primary: #140d24;
    --bg-secondary: #211638;
    --bg-tertiary: #30214e;
    --bg-glass: rgba(33, 22, 56, 0.82);
    --bg-glass-2: rgba(232, 121, 249, 0.06);
    --border-glass: rgba(232, 121, 249, 0.15);
    --border-glass-2: rgba(232, 121, 249, 0.25);
    --border-focus: #e879f9;

    --text-primary: #fdf4ff;
    --text-secondary: #f0abfc;
    --text-muted: #a855f7;

    --accent-primary: #e879f9;
    --accent-primary-glow: rgba(232, 121, 249, 0.35);
    --accent-secondary: #c084fc;
    --accent-secondary-glow: rgba(192, 132, 252, 0.35);
    --accent-success: #34d399;
    --accent-warning: #fbbf24;
    --accent-danger: #f43f5e;
    --accent-info: #38bdf8;
}

/* ── Theme Picker Dropdown Menu ── */
.theme-picker-container {
    position: relative;
    display: inline-block;
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass-2);
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(16px);
    animation: themeDropFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-dropdown.show {
    display: flex;
}

@keyframes themeDropFade {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.theme-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 4px;
}

.theme-dropdown-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-glass-2);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-option-card:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.theme-option-card.active {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    box-shadow: 0 0 12px var(--accent-primary-glow);
}

.theme-option-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-option-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.theme-option-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.theme-option-check {
    font-size: 12px;
    color: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.theme-option-card.active .theme-option-check {
    opacity: 1;
}

/* ── 2. Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-glass) transparent;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-glass-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    line-height: 1.5;
}

/* Glassmorphic Panel */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.glass-panel:hover {
    border-color: var(--border-glass-2);
}

/* ── 3. View Router ── */
.view-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.view-panel.active {
    display: block;
    opacity: 1;
    animation: fadeInView 0.3s ease forwards;
    transform: none !important;
}
#view-main-layout {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}
#view-login, #view-setup {
    height: 100vh;
    overflow-y: auto;
}
@keyframes fadeInView {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes shakeCard {
    0%, 100% { transform: translateX(0); }
    15%  { transform: translateX(-8px); }
    30%  { transform: translateX(8px); }
    45%  { transform: translateX(-6px); }
    60%  { transform: translateX(6px); }
    75%  { transform: translateX(-3px); }
    90%  { transform: translateX(3px); }
}

/* ── 4. LOGIN SCREEN — Premium Redesign ── */
#view-login {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Animated mesh gradient background */
#view-login::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 60%, rgba(139, 92, 246, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 50% 10%, rgba(6, 182, 212, 0.07) 0%, transparent 50%);
    animation: gradientPulse 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}
@keyframes gradientPulse {
    0%   { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    padding: 0;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(59, 130, 246, 0.08);
    border: 1px solid var(--border-glass-2);
    overflow: hidden;
    border-radius: 22px;
}

/* Login brand header stripe */
.login-brand-strip {
    padding: 28px 36px 22px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.12) 100%);
    border-bottom: 1px solid var(--border-glass);
    text-align: center;
    position: relative;
}
.login-brand-strip::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

.login-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}
.login-logo-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}
.login-logo-text {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-brand-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* Login form body */
.login-form-body {
    padding: 30px 36px 28px;
}

/* Login type indicator badge */
.login-type-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-glass-2);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    padding: 8px 16px;
    margin-bottom: 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    min-height: 38px;
}
.login-type-indicator .indicator-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.4s ease;
    flex-shrink: 0;
}
.login-type-indicator.is-sysadmin {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

/* Dual Login Tab Switcher */
.login-auth-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin: 16px 0 20px;
}
.login-tab-btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.login-tab-btn.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.login-tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}
.login-type-indicator.is-sysadmin .indicator-dot {
    background: var(--accent-secondary);
    box-shadow: 0 0 8px var(--accent-secondary);
    animation: pulseDot 1.5s ease-in-out infinite;
}
.login-type-indicator.is-branch {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}
.login-type-indicator.is-branch .indicator-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    animation: pulseDot 1.5s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}
.indicator-text { flex: 1; }
.indicator-icon { font-size: 14px; }

/* Login subtitle */
.login-subtitle-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}
.login-subtitle-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Form inputs */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}
.form-group label i {
    font-size: 11px;
    color: var(--accent-primary);
}
.form-control {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-glass-2);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
    appearance: none;
}
.form-control:focus {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238fa3c8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
select.form-control option { background: #0f1623; color: var(--text-primary); }

/* Input with icon wrapper */
.input-icon-wrap {
    position: relative;
}
.input-icon-wrap .form-control {
    padding-right: 44px;
}
.input-icon-wrap .input-suffix-btn {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s;
}
.input-icon-wrap .input-suffix-btn:hover { color: var(--accent-primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}
.btn-secondary {
    background: var(--bg-glass-2);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--border-glass-2); background: rgba(255,255,255,0.07); }
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}
.btn-success:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5); }
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5); }
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}
.btn-warning:hover:not(:disabled) { transform: translateY(-1px); }
.btn-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #fff;
}
.btn-info:hover:not(:disabled) { transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 24px; font-size: 15px; border-radius: 10px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-icon {
    background: var(--bg-glass-2);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 15px;
}
.btn-icon:hover { color: var(--text-primary); border-color: var(--border-glass-2); background: var(--bg-glass-2); }
.btn-link {
    background: none; border: none; cursor: pointer;
    color: var(--accent-primary); font-size: 12px;
    font-family: var(--font-primary); text-decoration: none;
    transition: color 0.2s; padding: 0;
}
.btn-link:hover { color: #93c5fd; text-decoration: underline; }

/* Sign In button - full width premium */
.btn-sign-in {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
    margin-top: 6px;
}
.btn-sign-in::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-sign-in:hover::before { opacity: 1; }
.btn-sign-in:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(59, 130, 246, 0.55);
}
.btn-sign-in:active { transform: translateY(0); }
.btn-sign-in:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-sign-in .btn-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}
.btn-sign-in.loading .btn-spinner { display: block; }
.btn-sign-in.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Login footer area */
.login-card-footer {
    padding: 16px 36px 22px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.login-card-footer-text {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Test credentials panel */
.test-creds-toggle {
    background: none; border: none;
    font-family: var(--font-primary);
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex; align-items: center; gap: 5px;
    padding: 4px 0;
    transition: color 0.2s;
}
.test-creds-toggle:hover { color: var(--accent-primary); }
.test-creds-toggle i { font-size: 10px; transition: transform 0.3s; }
.test-creds-toggle.open i { transform: rotate(180deg); }

.test-creds-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    background: rgba(59,130,246,0.04);
    border-radius: 0 0 12px 12px;
}
.test-creds-panel.open {
    max-height: 500px;
}
.test-creds-inner {
    padding: 16px 36px 18px;
    border-top: 1px solid var(--border-glass);
}
.test-creds-inner h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.cred-group {
    margin-bottom: 12px;
}
.cred-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.cred-group-label.sysadmin-creds { color: #a78bfa; }
.cred-group-label.branch-creds { color: #60a5fa; }
.cred-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: var(--bg-glass-2);
    border-radius: 7px;
    margin-bottom: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}
.cred-row:hover { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.2); }
.cred-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cred-badge.sys { background: rgba(139,92,246,0.15); color: #a78bfa; }
.cred-badge.admin { background: rgba(59,130,246,0.15); color: #60a5fa; }
.cred-badge.teacher { background: rgba(16,185,129,0.15); color: #34d399; }
.cred-badge.finance { background: rgba(245,158,11,0.15); color: #fbbf24; }
.cred-badge.other { background: rgba(100,116,139,0.15); color: #94a3b8; }
.cred-info { flex: 1; }
.cred-user { font-weight: 600; color: var(--text-primary); }
.cred-pass { color: var(--text-muted); font-size: 11px; }
.cred-use-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 11px;
    padding: 2px 6px; border-radius: 4px;
    transition: all 0.2s;
    font-family: var(--font-primary);
}
.cred-use-btn:hover { color: var(--accent-primary); background: rgba(59,130,246,0.1); }

/* ── 5. Setup Wizard Panel ── */
#view-setup {
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1e1b4b 100%);
    min-height: 100vh;
}
.setup-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 30px 20px;
}
.setup-card {
    width: 100%;
    max-width: 780px;
    padding: 44px;
    box-shadow: var(--shadow-lg);
}
.setup-header {
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 22px;
}
.setup-header h2 {
    font-size: 24px;
    color: var(--accent-primary);
    text-shadow: var(--shadow-glow);
    margin-bottom: 8px;
}
.setup-header p { color: var(--text-secondary); font-size: 14px; }
.setup-step { display: none; animation: slideIn 0.3s ease-out; }
.setup-step.active { display: block; }
.setup-step h3 { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.setup-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.setup-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
}
.setup-progress { display: flex; justify-content: center; gap: 8px; margin-top: 25px; }
.progress-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background-color: var(--border-glass);
    transition: background-color 0.3s;
}
.progress-dot.active {
    background-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── 6. App Layout (Sidebar + Header + Content) ── */
/* ── 6. App Layout (Sidebar + Header + Content) ── */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

/* Dedicated Parent Portal Mode (Clean Parent Sidebar Navigation) */
.app-layout.is-parent-user .app-sidebar {
    display: flex !important;
}
.app-sidebar {
    width: 260px;
    position: fixed !important;
    top: 0 !important; left: 0 !important; bottom: 0 !important;
    height: 100vh !important;
    background: #0f172a;
    border-right: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0;
    border-top: none; border-left: none; border-bottom: none;
    z-index: 1000 !important;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.sidebar-brand {
    height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
}
.brand-icon { font-size: 20px; color: var(--accent-primary); text-shadow: var(--shadow-glow); flex-shrink: 0; }
.brand-text { font-size: 14px; font-weight: 800; letter-spacing: 0.5px; line-height: 1.25; color: var(--text-primary); }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; overflow-x: hidden; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav li { margin-bottom: 4px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.25s ease;
}
.nav-link i { width: 20px; text-align: center; font-size: 15px; }
.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-glass-2);
    transform: translateX(3px);
}
.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1d4ed8 100%);
    box-shadow: var(--shadow-glow);
}
.app-main-content {
    flex: 1;
    margin-left: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.app-header {
    height: 68px;
    flex-shrink: 0;
    width: 100%;
    z-index: 99;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--border-glass);
    border-radius: 0;
    border-top: none; border-right: none; border-left: none;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.header-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-glass-2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0 16px;
    height: 40px;
    min-width: 260px;
    color: var(--text-muted);
}
.header-search input {
    background: none; border: none; outline: none;
    color: var(--text-primary); font-family: var(--font-primary);
    font-size: 13px; width: 100%;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}
.badge-branch { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.badge-academic { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }

.user-profile-menu { position: relative; }
.profile-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 10px;
    transition: background 0.2s;
}
.profile-info:hover { background: var(--bg-glass-2); }
.profile-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px;
}
.profile-text { display: flex; flex-direction: column; }
.profile-name { font-size: 13px; font-weight: 600; }
.profile-role { font-size: 11px; color: var(--text-muted); }
.profile-chevron { font-size: 11px; color: var(--text-muted); transition: transform 0.2s; }
.profile-info.open .profile-chevron { transform: rotate(180deg); }
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    min-width: 180px;
    padding: 8px;
    display: none;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    animation: dropIn 0.2s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.profile-dropdown.show { display: block; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s;
}
.dropdown-item:hover { color: var(--text-primary); background: var(--bg-glass-2); }

/* ── 7. Content Area ── */
.content-container {
    flex: 1;
    padding: 24px 28px 40px 28px;
    overflow-y: auto !important;
    overflow-x: hidden;
    min-width: 0;
    max-width: 100%;
    height: calc(100vh - 68px);
}
.content-panel { display: none; }
.content-panel.active { display: block; opacity: 1; animation: slideIn 0.25s ease-out both; }
@keyframes slideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Dashboard */
.dashboard-header { margin-bottom: 22px; }
.dashboard-header h1 { font-size: 24px; font-weight: 700; }
.dashboard-header p { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}
.metric-card {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: default;
}
.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), 0 0 25px rgba(var(--accent-color, 59, 130, 246), 0.12);
}
.metric-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color, #3b82f6) 20%, transparent), color-mix(in srgb, var(--accent-color, #3b82f6) 8%, transparent));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: var(--accent-color, #3b82f6);
    flex-shrink: 0;
}
.metric-data h3 { font-size: 26px; font-weight: 800; }
.metric-data p { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.currency-label { font-size: 14px; color: var(--text-secondary); font-weight: 600; }

.dashboard-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.dashboard-card { padding: 0; overflow: hidden; }
.col-span-2 { grid-column: span 2; }
.card-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border-glass);
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-header p { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.card-body { padding: 20px 22px; }
.card-body.chart-body { padding: 16px; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
}
.table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-secondary);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-glass-2); }
.text-center { text-align: center; }

/* Panel Layouts */
.panel-header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.panel-header-with-actions h1 { font-size: 22px; font-weight: 700; }
.panel-header-with-actions p { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }
.header-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Tabs inside panels */
.tab-container { overflow: hidden; }
.tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    padding: 6px 6px 0;
    gap: 4px;
    background: var(--bg-glass-2);
}
.tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.tab-btn.active { color: var(--accent-primary); background: var(--bg-primary); border-bottom: 2px solid var(--accent-primary); }
.tab-content { display: none; padding: 20px; }
.tab-content.active { display: block; animation: slideIn 0.25s ease; }

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group.stretch { flex: 1; min-width: 200px; }
.filter-group.end { margin-left: auto; flex-direction: row; align-items: flex-end; gap: 8px; }
.filter-group label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }

/* Promo bar */
.promo-bar {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    padding: 16px;
    background: var(--bg-glass-2);
    border-radius: var(--border-radius);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* Forms grid layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-grid .form-group { margin-bottom: 0; }
.form-grid .colspan-2 { grid-column: span 2; }

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.status-active { background: rgba(16,185,129,0.15); color: #34d399; }
.status-inactive { background: rgba(239,68,68,0.12); color: #f87171; }
.status-promoted { background: rgba(59,130,246,0.12); color: #60a5fa; }
.status-transferred { background: rgba(245,158,11,0.12); color: #fbbf24; }
.status-withdrawn { background: rgba(100,116,139,0.15); color: #94a3b8; }
.status-paid { background: rgba(16,185,129,0.12); color: #34d399; }
.status-partial { background: rgba(245,158,11,0.12); color: #fbbf24; }
.status-unpaid { background: rgba(239,68,68,0.1); color: #f87171; }
.status-present { background: rgba(16,185,129,0.12); color: #34d399; }
.status-absent { background: rgba(239,68,68,0.1); color: #f87171; }
.status-late { background: rgba(245,158,11,0.12); color: #fbbf24; }
.status-issued { background: rgba(59,130,246,0.12); color: #60a5fa; }
.status-returned { background: rgba(16,185,129,0.12); color: #34d399; }
.status-overdue { background: rgba(239,68,68,0.1); color: #f87171; }

/* Activity Timeline */
.activity-timeline { list-style: none; }
.activity-timeline li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-glass);
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.activity-timeline li:last-child { border-bottom: none; }
.activity-timeline li::before { content: '•'; color: var(--accent-primary); flex-shrink: 0; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.show { display: flex !important; animation: fadeInView 0.25s ease; }
.modal-dialog {
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    color: #f8fafc;
    animation: slideIn 0.3s ease;
}
.modal-dialog.modal-lg { max-width: 780px; }
.modal-dialog.modal-xl { max-width: 1000px; }
.modal-header {
    padding: 22px 26px 18px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
    background: none; border: none;
    color: var(--text-muted); font-size: 18px;
    cursor: pointer; padding: 4px;
    transition: color 0.2s; border-radius: 4px;
}
.modal-close:hover { color: var(--accent-danger); }
.modal-body { padding: 22px 26px; }
.modal-footer {
    padding: 16px 26px 22px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    min-width: 280px;
    max-width: 380px;
    animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(0.9); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(40px) scale(0.9); } }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast.success .toast-icon { color: var(--accent-success); }
.toast.error .toast-icon { color: var(--accent-danger); }
.toast.info .toast-icon { color: var(--accent-info); }
.toast.warning .toast-icon { color: var(--accent-warning); }
.toast.success { border-color: rgba(16,185,129,0.2); }
.toast.error { border-color: rgba(239,68,68,0.2); }
.toast.info { border-color: rgba(6,182,212,0.2); }
.toast.warning { border-color: rgba(245,158,11,0.2); }

/* Cards & grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-danger { color: var(--accent-danger); }
.text-success { color: var(--accent-success); }
.text-warning { color: var(--accent-warning); }
.text-info { color: var(--accent-info); }
.text-primary-color { color: var(--accent-primary); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 14px; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 14px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }
.scrollable-y { overflow-y: auto; }
.max-h-350 { max-height: 350px; }
.divider { border: none; border-top: 1px solid var(--border-glass); margin: 16px 0; }

/* Section info row */
.info-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 14px;
    background: var(--bg-glass-2);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.info-row label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    min-width: 130px;
    flex-shrink: 0;
    padding-top: 1px;
}
.info-row span { color: var(--text-primary); font-weight: 500; }

/* System Admin Portal specific */
.sysadmin-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.branch-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-glass-2);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.branch-list-item:hover { border-color: var(--border-glass-2); background: rgba(255,255,255,0.05); }
.branch-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff; flex-shrink: 0;
}
.branch-info { flex: 1; }
.branch-name { font-size: 14px; font-weight: 600; }
.branch-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.branch-actions { display: flex; gap: 6px; }

/* Report card print styles */
@media print {
    body { background: white; color: black; }
    .app-sidebar, .app-header, #toast-container { display: none !important; }
    .app-main-content { margin-left: 0; }
}

/* Responsive */
@media (max-width: 1200px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-details-grid { grid-template-columns: 1fr; }
    .col-span-2 { grid-column: span 1; }
}
@media (max-width: 900px) {
    .app-sidebar { width: 220px; }
    .app-main-content { margin-left: 220px; }
    .app-header { left: 220px; }
    .app-layout.sidebar-collapsed .app-sidebar { width: 72px; }
    .app-layout.sidebar-collapsed .app-main-content { margin-left: 72px; }
    .app-layout.sidebar-collapsed .app-header { left: 72px; }
}
@media (max-width: 700px) {
    .metrics-grid { grid-template-columns: 1fr; }
    .login-card { max-width: 100%; }
    .login-form-body { padding: 24px 24px 20px; }
    .login-brand-strip { padding: 22px 24px 18px; }
    .login-card-footer { padding: 14px 24px 18px; }
    .test-creds-inner { padding: 14px 24px 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .colspan-2 { grid-column: span 1; }
    .app-layout.sidebar-collapsed .app-sidebar { width: 72px; }
    .app-layout.sidebar-collapsed .app-main-content { margin-left: 72px; }
    .app-layout.sidebar-collapsed .app-header { left: 72px; }
}

/* Collapsible Sidebar States */
.app-layout.sidebar-collapsed .app-sidebar {
    width: 72px;
}
.app-layout.sidebar-collapsed .app-main-content {
    margin-left: 72px;
}
.app-layout.sidebar-collapsed .app-header {
    left: 72px;
}
.app-layout.sidebar-collapsed .brand-text {
    display: none;
}
.app-layout.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 22px 0;
}
.app-layout.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 11px 0;
    gap: 0;
    font-size: 0 !important;
}
.app-layout.sidebar-collapsed .nav-link i {
    font-size: 17px;
    margin: 0;
}

/* Timetable Styles */
.timetable-cell {
    padding: 12px !important;
}
.timetable-cell.occupied {
    background: rgba(99, 102, 241, 0.12) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
}
.timetable-cell.occupied:hover {
    background: rgba(99, 102, 241, 0.22) !important;
}
.timetable-cell.free {
    background: rgba(255, 255, 255, 0.01) !important;
}
.timetable-cell.free:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

/* Tabular Input Styles */
.table-input {
    width: 100%;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}
.table-input:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Result Approval & Remarks Model Styles */
.avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}
.rank-badge.rank-1 { background: rgba(234, 179, 8, 0.2); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.4); }
.rank-badge.rank-2 { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }
.rank-badge.rank-3 { background: rgba(217, 119, 6, 0.2); color: #f59e0b; border: 1px solid rgba(217, 119, 6, 0.4); }
.rank-badge.rank-other { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }

.detail-subtable-wrapper {
    padding: 12px 16px 16px 40px;
    background: rgba(15, 23, 42, 0.4);
    border-left: 3px solid var(--accent-primary);
}
.detail-subtable {
    width: 100%;
    margin-top: 6px;
    border-collapse: separate;
    border-spacing: 0 4px;
}
.detail-subtable th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 6px 12px;
}
.detail-subtable td {
    font-size: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.02);
}

.status-banner {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
}
.status-banner.status-draft { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.status-banner.status-pending { background: rgba(234, 179, 8, 0.12); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }

/* Module Enable / Disable Toggle Switch Styles */
.module-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-glass-2);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.toggle-card:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
}

.toggle-card input[type="checkbox"] {
    display: none;
}

.toggle-card .toggle-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-card .toggle-switch-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.toggle-card input[type="checkbox"]:checked ~ .toggle-switch-badge {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.toggle-card input[type="checkbox"]:not(:checked) ~ .toggle-switch-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ── 15. Comprehensive Device & Screen Size Responsiveness ── */

/* Table Scroll Container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
    border-radius: var(--border-radius-sm);
}

/* Touch Friendly Targets */
.btn, .form-control, .nav-link, .tab-btn {
    min-height: 40px;
    touch-action: manipulation;
}

/* Off-Canvas Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 12, 20, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Screen Size Adaptations: Tablets & Desktops (<= 1024px) */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .panel-header-with-actions {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Screen Size Adaptations: Mobile & Small Tablets (<= 768px) */
@media (max-width: 768px) {
    /* Mobile Off-Canvas Drawer Navigation */
    .app-sidebar {
        position: fixed !important;
        top: 0 !important; left: 0 !important; bottom: 0 !important;
        width: 270px !important;
        height: 100vh !important;
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
        z-index: 2000 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .app-layout.sidebar-mobile-open .app-sidebar {
        transform: translateX(0) !important;
    }
    
    .app-layout.sidebar-mobile-open .sidebar-overlay {
        display: block !important;
        opacity: 1 !important;
    }
    
    .app-main-content {
        margin-left: 0 !important;
        width: 100vw !important;
    }
    
    .app-header {
        padding: 0 14px !important;
        gap: 8px;
    }
    
    .header-search {
        min-width: 110px !important;
        max-width: 180px !important;
        padding: 0 10px !important;
    }
    .header-search input {
        font-size: 12px !important;
    }
    
    .badge-branch, .badge-academic {
        font-size: 10px !important;
        padding: 3px 6px !important;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Layout & Component Grid Collapse */
    .metrics-grid, .stats-grid, .form-grid, .dashboard-details-grid {
        grid-template-columns: 1fr !important;
    }
    
    .content-container {
        padding: 14px !important;
    }
    
    .panel-header-with-actions {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .panel-header-with-actions h1 {
        font-size: 20px !important;
    }
    
    .header-actions-row, .action-buttons {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px !important;
    }
    
    .tab-header {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }
    
    .tab-btn {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
    
    /* Modal Responsiveness */
    .modal-dialog {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 10px auto !important;
        padding: 16px !important;
        max-height: 92vh !important;
        overflow-y: auto;
    }
    
    .modal-footer {
        flex-wrap: wrap;
        gap: 8px;
    }
    .modal-footer .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Extra Small Screens (<= 480px) */
@media (max-width: 480px) {
    .header-search {
        display: none !important;
    }
    .profile-text {
        display: none !important;
    }
    .app-header {
        justify-content: space-between;
    }
    .table th, .table td {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

/* ── 16. Animated Login Splash Screen (Cross-Browser Compatible: Chrome, Edge, Safari, Firefox) ── */
#view-splash {
    background: #0f172a;
    background: radial-gradient(circle at top right, #1e1b4b 0%, #0f172a 50%, #080c14 100%);
    display: none;
    opacity: 0;
    visibility: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100vw;
    width: 100%;
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    z-index: 999999 !important;
    -webkit-transition: opacity 0.3s ease, -webkit-transform 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#view-splash.active {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    -webkit-animation: none !important;
    transform: none !important;
    -webkit-transform: none !important;
}

#view-splash.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(1.03) !important;
    -webkit-transform: scale(1.03) !important;
}

.splash-container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    text-align: center;
    margin: auto;
}

.splash-card {
    padding: 40px 32px;
    border-radius: 24px;
    background: #0f172a;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.splash-logo-container {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.splash-logo-box {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: #3b82f6;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1d4ed8 100%);
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    z-index: 2;
}

.splash-icon {
    font-size: 32px;
    color: #ffffff;
}

.splash-pulse-ring {
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 28px;
    border: 2px solid var(--accent-primary);
    -webkit-animation: splashPulse 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
    animation: splashPulse 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.splash-pulse-ring.secondary {
    -webkit-animation-delay: 0.6s;
    animation-delay: 0.6s;
}

@-webkit-keyframes splashPulse {
    0% { -webkit-transform: scale(0.95); opacity: 0.8; }
    50% { -webkit-transform: scale(1.15); opacity: 0.2; }
    100% { -webkit-transform: scale(0.95); opacity: 0.8; }
}

@keyframes splashPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0.2; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.splash-title {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.splash-subtitle {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.splash-progress-bar-container {
    height: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.splash-progress-bar {
    height: 100%;
    width: 0%;
    background: #3b82f6;
    background: linear-gradient(90deg, var(--accent-primary) 0%, #60a5fa 100%);
    box-shadow: 0 0 12px var(--accent-primary);
    border-radius: 10px;
    -webkit-transition: width 0.12s linear;
    transition: width 0.12s linear;
}

.splash-status-text {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--accent-primary);
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 8px;
}


/* ══════════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ══════════════════════════════════════════════════════════════════ */

.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(15, 17, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.pwa-install-banner.visible {
    transform: translateY(0);
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.pwa-install-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.pwa-install-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pwa-install-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.pwa-install-text span {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pwa-install-btn {
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.pwa-install-dismiss {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}

.pwa-install-dismiss:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}


/* ══════════════════════════════════════════════════════════════════
   OFFLINE INDICATOR BAR
   ══════════════════════════════════════════════════════════════════ */

.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: linear-gradient(90deg, #b45309, #d97706);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transform: translateY(-100%);
    transition: transform 0.35s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.offline-indicator.visible {
    transform: translateY(0);
}

.offline-indicator i {
    font-size: 14px;
}


/* ══════════════════════════════════════════════════════════════════
   NOTIFICATION BADGES (sidebar pill badges)
   ══════════════════════════════════════════════════════════════════ */

.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 20px;
    line-height: 1;
    margin-left: 6px;
    vertical-align: middle;
    flex-shrink: 0;
    position: relative;
}

.notif-badge.pulse::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.4);
    animation: badge-ring 1.6s ease-out infinite;
}

@keyframes badge-ring {
    0%   { transform: scale(0.8); opacity: 0.8; }
    70%  { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}


/* ══════════════════════════════════════════════════════════════════
   NOTIFICATION BELL (header)
   ══════════════════════════════════════════════════════════════════ */

.notif-bell-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-bell-btn {
    position: relative !important;
}

.notif-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 20px;
    line-height: 1;
    border: 2px solid var(--bg-primary, #0f1117);
}

.notif-bell-badge.pulse {
    animation: badge-ring 1.6s ease-out infinite;
}

/* Notification Dropdown Panel */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: var(--bg-glass, rgba(15, 17, 23, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.notif-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass, rgba(255,255,255,0.06));
}

/* Live SSE indicator dot */
.notif-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6b7280;
    margin-left: auto;
    flex-shrink: 0;
    transition: background 0.3s;
}

.notif-live-dot.live {
    background: #22c55e;
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

.notif-dropdown-body {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px 0;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-glass, rgba(255,255,255,0.04));
}

.notif-item:last-child { border-bottom: none; }

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

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

.notif-item-icon.messages {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.notif-item-icon.fees {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.notif-item-icon.announcements {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.notif-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.notif-item-placeholder {
    padding: 20px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Responsive: hide PWA banner text on small screens */
@media (max-width: 480px) {
    .pwa-install-text span { display: none; }
    .notif-dropdown { width: calc(100vw - 32px); right: -80px; }
}
