:root {
    /* World-Class Prestige Academia Design System */
    --bg-primary: #020617;      /* Deep Midnight Slate */
    --bg-surface: #0f172a;      /* Navy 900 */
    --bg-surface-elevated: #1e293b; /* Slate 800 */
    
    --primary: #3b82f6;         /* Standard Academic Blue */
    --primary-hover: #2563eb;   /* Deep Royal Blue */
    --secondary:#fbbf24;      /* Institutional Gold */
    --accent: #10b981;          /* Emerald Accent */
    
    --text-high-contrast: #0f172a; /* Maximum visibility for light backgrounds */
    --text-main: #ffffff;       
    --text-muted: #e2e8f0;      
    --text-inverse: #020617;

    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    /* School Corporate Design System (New) */
    --school-teal: #12B5B5;
    --school-yellow: #FFD700;
    --school-dark: #1e293b;     /* Darker Slate for text on light backgrounds */
    --school-light: #F8F9FA;
    --school-white: #FFFFFF;
    
    /* System legacy mappings */
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-primary: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #F1F5F9;
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-inverse: #FFFFFF;
    --glass-border: rgba(15, 23, 42, 0.1);
    --darker: #F1F5F9;
    --light: #1E293B;
}

[data-theme="light"] body {
    background-color: #F8FAFC;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(251, 191, 36, 0.03) 0px, transparent 50%);
}

[data-theme="light"] .glass-nav {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .nav-link,
[data-theme="light"] .navbar-brand,
[data-theme="light"] .navbar-brand span {
    color: #0F172A !important;
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .text-white {
    color: #0F172A !important;
}

[data-theme="light"] .navbar-toggler i {
    color: #0F172A !important;
}

/* Theme Toggle Premium Button */
.theme-toggle-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    padding: 0;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .theme-toggle-btn {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0F172A;
}

.theme-option {
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.1) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.theme-option.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    color: #3b82f6;
}

[data-theme="light"] .theme-option {
    border-color: rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] .theme-option:hover {
    background: rgba(15, 23, 42, 0.03) !important;
}

[data-theme="light"] .theme-option.active {
    background: rgba(59, 130, 246, 0.05) !important;
}

/* Light Theme overrides for Register/Login specifically */
[data-theme="light"] .glass-card-premium {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .register-modern {
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
                url('https://images.unsplash.com/photo-1523050337458-5ebbb12b5816?auto=format&fit=crop&q=80') center/cover no-repeat fixed !important;
}

[data-theme="light"] .login-modern {
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
                url('https://images.unsplash.com/photo-1546410531-bb4caa6b424d?auto=format&fit=crop&q=80') center/cover no-repeat fixed !important;
}

[data-theme="light"] .register-title, 
[data-theme="light"] .register-desc,
[data-theme="light"] .form-label,
[data-theme="light"] .brand-text span {
    color: #0f172a !important;
}

[data-theme="light"] .premium-input {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

[data-theme="light"] .input-icon {
    color: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .glow-obj {
    opacity: 0.05 !important;
}

[data-theme="light"] select.premium-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230f172a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

[data-theme="light"] option {
    background: white !important;
    color: #0f172a !important;
}

/* ===================================================
   NEW CORPORATE SCHOOL HERO COMPONENT
   =================================================== */

.hero-school {
    position: relative;
    min-height: 100vh;
    background-color: var(--school-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

/* The Teal Diagonal Background */
.hero-school::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background-color: var(--school-teal);
    clip-path: polygon(0 0, 100% 0, 100% 60%, 0% 100%);
    z-index: 1;
}

/* Secondary softer teal shape for depth */
.hero-school::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 75%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0% 90%);
    z-index: 2;
    pointer-events: none;
}

/* The Yellow Accent Triangle */
.hero-school-accent {
    position: absolute;
    top: 25%;
    right: 0;
    width: 35%;
    height: 50%;
    background-color: var(--school-yellow);
    clip-path: polygon(100% 0, 100% 100%, 0 55%);
    z-index: 1;
}

.hero-school-content {
    position: relative;
    z-index: 10;
    width: 100%;
}

.hero-school-brand {
    font-family: 'Outfit', sans-serif;
    color: var(--school-white);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: 600;
}

.hero-school-title {
    margin-bottom: 3rem;
    position: relative;
}

.hero-school-title .title-top {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 3.5rem;
    color: var(--school-white);
    display: block;
    margin-bottom: -15px;
    letter-spacing: -1px;
}

.hero-school-title .title-main {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 8rem;
    color: var(--school-white);
    line-height: 0.9;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Stronger shadow for pop */
}

.hero-school-desc {
    color: #0f172a;             /* High-contrast Navy/Slate 900 */
    opacity: 1;                 /* Full opacity for clarity */
    max-width: 520px;
    font-size: 1.2rem;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    font-weight: 500;           /* Increased weight for better definition */
    text-rendering: optimizeLegibility;
}

/* Pill Input Style */
.school-input-group {
    max-width: 400px;
    position: relative;
    margin-bottom: 2rem;
}

.school-input {
    width: 100%;
    padding: 18px 30px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.school-input:focus {
    border-color: var(--school-teal);
    background: white;
    box-shadow: 0 10px 25px -5px rgba(18, 181, 181, 0.2);
}

.btn-school {
    background-color: var(--school-teal);
    color: white;
    border: none;
    padding: 16px 45px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    text-decoration: none;
}

.btn-school:hover {
    background-color: #0d8d8d;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(18, 181, 181, 0.4);
    color: white;
}

/* Circular Image Frame */
.school-hero-frame {
    position: relative;
    width: 620px;
    height: 620px;
    margin-left: auto;
    z-index: 15;
    animation: floatingHero 6s ease-in-out infinite;
}

@keyframes floatingHero {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.school-circle-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 18px solid white;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.25), 
                0 18px 36px -18px rgba(0,0,0,0.3);
}

.school-social-icons {
    position: absolute;
    bottom: 40px;
    right: 0;
    display: flex;
    gap: 25px;
    color: var(--school-teal);
    font-size: 1.4rem;
}

.school-social-icons a {
    color: inherit;
    transition: transform 0.3s;
}

.school-social-icons a:hover {
    transform: translateY(-3px);
}

.school-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--school-teal);
    opacity: 0.6;
}

@media (max-width: 991px) {
    .school-hero-frame {
        width: 350px;
        height: 350px;
        margin: 3rem auto 0;
    }
    .hero-school-title .title-main {
        font-size: 4rem;
    }
    .hero-school {
        text-align: center;
        padding-bottom: 5rem;
    }
    .hero-school-desc {
        margin-left: auto;
        margin-right: auto;
    }
    .school-input-group {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ════════ WORLD-CLASS LANDING THEME (Unified) ════════ */
body.bro-theme {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(251, 191, 36, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
}

body.bro-theme .text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.1));
}

body.bro-theme .btn-premium {
    background: var(--accent-gradient);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
}

body.bro-theme .btn-premium:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

body.bro-theme .glass-card {
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
}

body.bro-theme .navbar-brand span {
    color: var(--text-main) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--darker);
    /* High-End Dynamic Mesh Gradient */
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.18) 0px, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.08) 0px, transparent 50%), 
        radial-gradient(at 50% 50%, rgba(14, 165, 233, 0.05) 0px, transparent 50%), 
        radial-gradient(at 0% 100%, rgba(30, 58, 138, 0.12) 0px, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 0.4) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px;
    position: relative;
}

/* Background Atmosphere Glow Section */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(251, 191, 36, 0.04) 0%, transparent 40%);
    filter: blur(100px);
    z-index: -2;
    pointer-events: none;
    animation: atmosphereDrift 25s ease-in-out infinite alternate;
}

@keyframes atmosphereDrift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(2%, 3%) rotate(2deg); }
}

/* Explicit Utility Overrides for Bootstrap to use our beautiful palette */
.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.border-secondary {
    border-color: var(--secondary) !important;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes glow {
    0% {
        filter: drop-shadow(0 0 5px rgba(30, 58, 138, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(30, 58, 138, 0.6));
    }

    100% {
        filter: drop-shadow(0 0 5px rgba(30, 58, 138, 0.3));
    }
}

/* Glassmorphism Components */
.glass-nav {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    /* CRITICAL: allow dropdown to overflow without growing the navbar */
    overflow: visible !important;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    color: #94a3b8 !important;
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--light) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 1.2rem;
    right: 1.2rem;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* Sidebar Specific Styles */
.sidebar .nav-link {
    border-radius: 12px;
    padding: 0.8rem 1rem !important;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary) !important;
    transform: translateX(4px);
}

.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(24, 24, 27, 0.95);
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 16px;
        border: 1px solid var(--glass-border);
    }

    .nav-link {
        padding: 1rem 0 !important;
    }

    .nav-link::after {
        left: 0;
        right: auto;
        width: 30px;
    }
}

.glass-card {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

.glass-card p {
    color: #cbd5e1; /* Reverting slightly for readability against bright white headers */
    opacity: 0.95;
}

.glass-card h1, .glass-card h2, .glass-card h3, .glass-card h4 {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: var(--academia-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(37, 99, 235, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(251, 191, 36, 0.05));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: var(--primary);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.03);
}

/* Typography — Standard School Website Scale */
h1 {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

h2 {
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    font-weight: 700;
    line-height: 1.3;
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 600;
}

h5,
h6 {
    font-weight: 600;
}

p {
    line-height: 1.8;
    font-weight: 450;
    letter-spacing: 0.01em;
}

.glow-text {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2), 0 0 30px rgba(255, 255, 255, 0.1);
    -webkit-font-smoothing: antialiased;
}

.text-contrast-high {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.75;
    color: rgba(148, 163, 184, 0.85);
}

.lead {
    font-size: clamp(1rem, 1.8vw, 1.2rem) !important;
    line-height: 1.8;
    font-weight: 400;
}

.text-gradient {
    background: linear-gradient(135deg, #fafafa 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons Premium Refinement */
.btn-premium {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--light);
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 600;
    transition: all 0.4s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--glass-border);
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Form Styles */
.premium-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    padding: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.premium-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.was-validated .premium-input:invalid {
    border-color: #ef4444 !important;
    background-image: none;
}

.was-validated .premium-input:valid {
    border-color: #10b981 !important;
    background-image: none;
}

.invalid-feedback {
    color: #f87171;
    font-size: 0.8rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

select.premium-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

select.premium-input option {
    background-color: var(--dark);
    color: white;
}

/* Landing Page Styles */
.hero-section {
    padding: 8rem 0;
    text-align: center;
    position: relative;
}

.floating-shape {
    position: absolute;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite alternate;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    left: 10%;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    bottom: 20%;
    right: 15%;
}


.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0;
    text-align: center;
    background: rgba(2, 6, 23, 0.5);
    margin-top: 8rem;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

/* Hero Section — Standard School Website form */
.hero-modern {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    padding-bottom: 5rem;
    z-index: 1;
    overflow: hidden;
}

/* Hero central vignette — stronger dark core for text readability
   while the building image shows through at the edges */
.hero-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* Hard dark center so centred text sits on a readable surface */
        radial-gradient(ellipse 70% 80% at 50% 50%, rgba(2, 6, 23, 0.85) 0%, transparent 100%),
        /* High-End Cinematic Mask — smoother transition edges */
        radial-gradient(circle at 50% 50%, transparent 0%, rgba(2, 6, 23, 0.95) 90%),
        linear-gradient(180deg,
            rgba(2, 6, 23, 0.40) 0%,
            rgba(2, 6, 23, 0.80) 65%,
            rgba(2, 6, 23, 1) 100%),
        url('../img/hero_bg_ultra.png') center center / cover no-repeat;
    z-index: -1;
    animation: slowZoom 40s infinite alternate ease-in-out;
}

/* Coloured ambient glow streaks (decorative) */
.hero-modern::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 40% at 15% 50%, rgba(30, 58, 138, 0.25) 0%, transparent 100%),
        radial-gradient(ellipse 40% 35% at 85% 55%, rgba(245, 158, 11, 0.1) 0%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08);
    }
}

/* Hero text legibility — strong shadows to pop over the building image */
.hero-modern h1 {
    text-shadow:
        0 0 40px rgba(0, 0, 0, 0.9),
        0 4px 16px rgba(0, 0, 0, 0.95),
        0 2px 4px rgba(0, 0, 0, 1);
}

/* The gold text-gradient span inside h1 gets a warm glow to separate from bg */
.hero-modern h1 .text-gradient {
    filter: drop-shadow(0 2px 12px rgba(245, 158, 11, 0.8)) drop-shadow(0 0 4px rgba(0,0,0,0.9));
}

.hero-modern p.lead {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0,0,0,1);
    color: rgba(241, 245, 249, 0.98) !important;
}

/* Sub-page hero headers (about, features) */
.hero-subpage {
    padding: 8rem 0 5rem;
    position: relative;
    overflow: hidden;
}

/* ===================================================
   HERO ANIMATIONS — Ethiopian Digital School Theme
   =================================================== */

/* --- Digital grid overlay --- */
.hero-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(30, 58, 138, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 58, 138, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridShift 20s linear infinite;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

@keyframes gridShift {
    0%   { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* --- Animated ambient orbs --- */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
    animation: orbDrift 12s ease-in-out infinite alternate;
}

.hero-orb-1 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.35) 0%, transparent 70%);
    top: -80px; left: -120px;
    animation-duration: 14s;
}

.hero-orb-2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    bottom: -60px; right: -80px;
    animation-duration: 18s;
    animation-delay: -5s;
}

.hero-orb-3 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 70%);
    top: 40%; left: 55%;
    animation-duration: 22s;
    animation-delay: -9s;
}

@keyframes orbDrift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -20px) scale(1.05); }
    66%  { transform: translate(-20px, 25px) scale(0.97); }
    100% { transform: translate(15px, -10px) scale(1.02); }
}

/* --- Floating education icon particles --- */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-size: 1.1rem;
    color: rgba(245, 158, 11, 0.22);
    animation: particleFloat var(--dur) ease-in-out var(--delay) infinite alternate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(30, 58, 138, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(2px);
}

.hero-particle:nth-child(2n) { color: rgba(14, 165, 233, 0.2); }
.hero-particle:nth-child(3n) { color: rgba(255, 255, 255, 0.15); }

@keyframes particleFloat {
    0%   { transform: translateY(0) rotate(0deg)   scale(1);    opacity: 0.5; }
    50%  { transform: translateY(-22px) rotate(8deg) scale(1.1);  opacity: 0.9; }
    100% { transform: translateY(-8px)  rotate(-5deg) scale(0.95); opacity: 0.6; }
}

/* --- Info pills (institutional details below CTA) --- */
.hero-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-info-pill:hover {
    background: rgba(30, 58, 138, 0.25);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.05);
    color: white;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
}

.hero-headline-glow {
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(30, 58, 138, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.5);
}

.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.4)); }
    50% { filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.8)); }
}

/* --- Scroll indicator (mouse icon) --- */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
}

.hero-scroll-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 13px;
    margin: 0 auto;
    position: relative;
    cursor: pointer;
}

.hero-scroll-dot {
    width: 4px;
    height: 8px;
    background: var(--secondary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%   { top: 6px; opacity: 1; }
    60%  { top: 22px; opacity: 0.2; }
    100% { top: 6px; opacity: 1; }
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-particle, .hero-orb, .hero-grid-overlay,
    .hero-scroll-dot { animation: none !important; }
}


.hero-about {
    background:
        linear-gradient(160deg, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.88) 100%),
        url('../img/about_bg.png') center center / cover no-repeat;
    background-attachment: fixed;
    border-radius: 0 0 40px 40px;
    position: relative;
}

.hero-features {
    background:
        linear-gradient(160deg, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.88) 100%),
        url('../img/features_bg.png') center center / cover no-repeat;
    background-attachment: fixed;
    border-radius: 0 0 40px 40px;
    position: relative;
}

.login-body-bg {
    background:
        linear-gradient(160deg, rgba(2, 6, 23, 0.6) 0%, rgba(2, 6, 23, 0.92) 100%),
        url('../img/login_bg.png') center center / cover no-repeat;
    background-attachment: fixed;
}


.hero-badge {
    background: rgba(245, 158, 11, 0.12);
    border: 2px solid rgba(245, 158, 11, 0.4);
    color: var(--secondary);
    letter-spacing: 2px;
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

.hero-badge:hover {
    transform: translateY(-2px);
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--secondary);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px #10b981;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: indicatorPulse 2.5s infinite;
}


/* SOS Special UI Components */
.text-primary-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

.btn-info-glow {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    transition: all 0.3s ease;
}

.btn-info-glow:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
    transform: translateY(-2px);
}

.btn-danger-glow {
    background: linear-gradient(135deg, #ef4444, #f87171);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

.btn-danger-glow:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.bordered-right-glass {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .bordered-right-glass {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1.5rem;
    }
}

.premium-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: white;
    padding: 1.2rem;
    width: 100%;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-input:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.05);
}

/* School Theme (Light Dashboard) Overrides */
.school-theme .premium-input {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--school-dark);
}

.school-theme .premium-input:focus {
    background: white;
    border-color: var(--school-teal);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.school-theme select.premium-input option {
    background-color: white;
    color: var(--school-dark);
}

.glow-button {
    position: relative;
    overflow: hidden;
}

.glow-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    opacity: 0;
    transition: 0.5s;
    pointer-events: none;
}

.glow-button:hover::after {
    opacity: 1;
    transform: translate(25%, 25%);
}

/* Premium Header Utilities */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-white {
    transition: color 0.3s ease;
}

.hover-white:hover {
    color: white !important;
}

.tracking-tight {
    letter-spacing: -0.02em;
}

.transition {
    transition: all 0.3s ease;
}

/* ===================================================
   RESPONSIVE — Standard School Website Breakpoints
   =================================================== */

/* Mobile first: ensure full-width sections */
@media (max-width: 576px) {
    .hero-modern {
        min-height: 100svh;
        padding-top: 90px;
        padding-bottom: 3rem;
        text-align: center;
    }

    .hero-modern h1 {
        font-size: 2rem;
    }

    .hero-modern .lead {
        font-size: 0.95rem !important;
    }

    .glass-card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    section.container,
    section>.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-badge {
        font-size: 0.72rem;
        padding: 0.45rem 1.2rem;
    }

    /* Footer identity bar stacks nicely */
    footer .d-flex.align-items-center {
        flex-direction: column;
        text-align: center;
    }
}

/* Tablets */
@media (min-width: 577px) and (max-width: 991px) {
    .hero-modern {
        min-height: 80vh;
        padding-top: 100px;
    }

    .hero-modern h1 {
        font-size: 2.6rem;
    }

    .glass-card {
        padding: 2rem;
        border-radius: 24px;
    }
}

/* Fix: background-attachment fixed causes issues on iOS */
@media (max-width: 991px) {

    .hero-about,
    .hero-features,
    .login-body-bg {
        background-attachment: scroll;
    }

    body {
        background-attachment: scroll;
    }
}

/* Section spacing responsive */
@media (max-width: 768px) {
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    h2.section-title {
        text-align: center;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-container {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    #reportDetailModal,
    #reportDetailModal * {
        visibility: visible;
    }

    #reportDetailModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
    }

    .glass-card {
        background: white !important;
        color: black !important;
        border: 1px solid #eee !important;
        box-shadow: none !important;
    }

    .text-white,
    .text-primary,
    .text-secondary {
        color: black !important;
    }

    .btn,
    .nav-tabs,
    .btn-close {
        display: none !important;
    }

    .glow-text {
        -webkit-text-fill-color: black !important;
        text-shadow: none !important;
    }

    .tab-content>.tab-pane {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-bottom: 2rem;
    }
}

/* Teacher Forms - Standard Layout (Ultra Compact for 20 students) */
.compact-table th,
.compact-table td {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.8rem;
    vertical-align: middle;
}

.score-input {
    min-width: 50px !important;
    padding: 0.2rem 0.4rem !important;
    font-size: 0.8rem !important;
}

.status-pill-group .btn-check+.btn {
    border-radius: 12px;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    margin: 0 1px;
}

/* Admin Dashboard - Premium Components */
.capacity-container {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.capacity-progress {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.capacity-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #0ea5e9);
    transition: width 1s ease-in-out;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
}

.capacity-bar.warning {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.capacity-bar.danger {
    background: linear-gradient(90deg, #ef4444, #991b1b);
}

.admin-quick-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    overflow: hidden;
}

.admin-quick-link:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: #4f46e5;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    margin-right: 5px;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ==========================================================================
   Modern Dashboard Theme (Refined Qurtubiks Aesthetic)
   ========================================================================== */

body.modern-dashboard {
    --dash-bg: #f8fafc;      /* Modern Soft Light Grey */
    --dash-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); /* Premium Deep Gradient */
    --dash-card: #ffffff;
    --dash-text: #0f172a;      /* Even darker for maximum sharpness */
    --dash-text-muted: #4b5563;    /* Gray-600 for reliable contrast */
    --dash-accent: #6366f1;       /* Indigo Accent */
    --dash-border: rgba(255, 255, 255, 0.05);
    --dash-sidebar-hover: rgba(255, 255, 255, 0.1);

    background-color: var(--dash-bg) !important;
    color: var(--dash-text) !important;
    font-family: 'Inter', 'Outfit', sans-serif;
    overflow-x: hidden;
}

.modern-dashboard .floating-shape {
    display: none !important;
}

.modern-dashboard .sidebar {
    background: var(--dash-sidebar) !important;
    background-color: #0c1424 !important; /* Solid fallback for overscroll/drag areas */
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;        /* header & scrollable handle their own padding */
    z-index: 1000;
    border-right: 1px solid var(--dash-border) !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.35) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;             /* scrollable child scrolls */
    color: #f8fafc !important; /* Force light text for dark sidebar */
}

.modern-dashboard .sidebar .sidebar-header {
    flex-shrink: 0;
    padding: 1.6rem 1.4rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}

.modern-dashboard .sidebar .sidebar-scrollable {
    flex: 1 1 auto;
    min-height: 0;          /* CRITICAL: allows flex child to shrink and scroll */
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1.5rem;
}

.modern-dashboard .sidebar .nav-link {
    color: #94a3b8 !important;
    padding: 0.72rem 1.25rem !important;
    margin: 0.1rem 0.7rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
    white-space: nowrap;
    position: relative;
}

.modern-dashboard .sidebar .nav-link span {
    color: inherit;
}

.modern-dashboard .sidebar .nav-link i {
    width: 18px;
    flex-shrink: 0;
    font-size: 1rem;
    color: #64748b;
    opacity: 1;
    transition: all 0.22s ease;
}

.modern-dashboard .sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #e2e8f0 !important;
    transform: translateX(3px);
}

.modern-dashboard .sidebar .nav-link:hover i {
    opacity: 1;
    color: #22d3ee !important;
    transform: scale(1.15);
}

.modern-dashboard .sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(34,211,238,0.14) 0%, rgba(34,211,238,0.04) 100%) !important;
    color: #22d3ee !important;
    font-weight: 700;
    border-left: 3px solid #22d3ee !important;
    border-right: none !important;
    border-radius: 0 10px 10px 0 !important;
    margin-left: 0 !important;
    padding-left: calc(1.25rem + 0.7rem - 3px) !important;
    transform: none !important;
    box-shadow: inset 0 0 16px rgba(34,211,238,0.04);
}

.modern-dashboard .sidebar .nav-link.active::before {
    display: none;               /* replaced by border-left approach */
}

.modern-dashboard .sidebar .nav-link.active i {
    color: #22d3ee !important;
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(34,211,238,0.5));
}

.modern-dashboard .sidebar .nav-link.active span {
    color: #22d3ee !important;
}

.modern-dashboard .sidebar-heading {
    padding: 1.2rem 1.5rem 0.4rem;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #3d5166;
    letter-spacing: 0.15em;
}

.modern-dashboard main {
    margin-left: 260px;
    background-color: var(--dash-bg);
    min-height: 100vh;
    padding: 2.5rem !important;
    width: calc(100% - 260px);
}

.modern-dashboard .glass-card {
    background: var(--dash-card) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--dash-border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    border-radius: 16px !important;
    color: var(--dash-text) !important;
    padding: 2rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-dashboard .glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05) !important;
}

.modern-dashboard h1, .modern-dashboard h2, .modern-dashboard h3 {
    color: var(--dash-text) !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
}

.modern-dashboard .text-gradient {
    background: linear-gradient(135deg, var(--dash-text) 0%, var(--dash-accent) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.modern-dashboard .text-white {
    color: #fafafa !important;
}

.modern-dashboard .stat-card {
    border: none !important;
}

.modern-dashboard .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    background: #f1f5f9; /* Default fallback */
    color: #475569;
}

.modern-dashboard .bg-blue-glow { background: #e0f2fe !important; color: #0284c7 !important; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1); }
.modern-dashboard .bg-amber-glow { background: #fef3c7 !important; color: #d97706 !important; box-shadow: 0 4px 12px rgba(217, 119, 6, 0.1); }
.modern-dashboard .bg-emerald-glow { background: #d1fae5 !important; color: #059669 !important; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.1); }
.modern-dashboard .bg-purple-glow { background: #f3e8ff !important; color: #7c3aed !important; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1); }

.modern-dashboard .table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.modern-dashboard .table thead th {
    background: transparent;
    color: #374151; /* Gray-700 for headers */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    border: none;
    padding-bottom: 1rem;
    letter-spacing: 0.05em;
}

.modern-dashboard .table-dark {
    background: transparent !important;
}

.modern-dashboard .table tbody tr {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border-radius: 10px;
}

.modern-dashboard .table td {
    padding: 1rem;
    border: none !important;
    color: #111827 !important; /* Force dark text in table cells */
}

.modern-dashboard .btn-premium {
    background: #f97316 !important; /* Brighter orange from reference */
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.modern-dashboard .btn-premium:hover {
    background: #ea580c !important;
    transform: translateY(-1px);
}

@media (max-width: 992px) {
    .modern-dashboard .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .modern-dashboard main {
        margin-left: 0;
        width: 100%;
    }
}

/* Dashboard Specific Overrides */
.modern-dashboard .info-label {
    color: var(--dash-text-muted) !important;
}

.modern-dashboard .info-value {
    color: var(--dash-text) !important;
}

.modern-dashboard .card-note {
    background: #f1f5f9 !important;
    color: var(--dash-text) !important;
    border-left: 4px solid var(--dash-border);
}

.modern-dashboard .text-white-50 {
    color: var(--dash-text-muted) !important;
}

.modern-dashboard .glow-text {
    color: var(--dash-text) !important;
    text-shadow: none !important;
}

.modern-dashboard .section-header {
    border-left: 3px solid var(--dash-accent) !important;
}

/* ===================================================
   FULL SCHOOL THEME OVERRIDE (Refined)
   =================================================== */

body.school-theme {
    background-color: var(--school-white) !important;
    color: var(--school-dark) !important;
    background-image: none !important;
    font-family: 'Outfit', sans-serif;
}

body.school-theme::before,
body.school-theme::after {
    display: none !important;
}
/* Cleaned up broken/unused gradients */

body.school-theme::after {
    display: none !important;
}

/* Typography Refinement */
.school-theme h1, .school-theme h2, .school-theme h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--school-dark) !important;
    letter-spacing: -0.5px;
}

.school-theme h4, .school-theme h5, .school-theme h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--school-dark) !important;
}

.school-theme p, 
.school-theme .text-secondary, 
.school-theme .text-light,
.school-theme .small {
    font-family: 'Outfit', sans-serif;
    color: #334155 !important; /* Darker Slate for maximum readability */
    line-height: 1.8;
    font-weight: 400;
}

/* Section Header Polishing */
.school-theme .section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.school-theme .section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Redefining Cards for School Theme */
.school-theme .glass-card,
.school-theme .school-card {
    background: white !important;
    backdrop-filter: none !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04) !important;
    color: var(--school-dark) !important;
    padding: 2.5rem !important;
    border-radius: 20px !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.school-theme .school-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(18, 181, 181, 0.1), 0 8px 10px -6px rgba(18, 181, 181, 0.1) !important;
    border-color: rgba(18, 181, 181, 0.2) !important;
}

/* Redefining Panels for School Theme */
.school-theme .glass-panel,
.school-theme .school-panel {
    background: #ffffff !important;
    backdrop-filter: none !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 30px !important;
    padding: 3.5rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    color: var(--school-dark) !important;
}

/* Text Overrides for School Theme */
.school-theme .text-white {
    color: var(--school-dark) !important;
}

.school-theme .text-white-50 {
    color: #64748b !important;
}

.school-theme .text-teal {
    color: var(--school-teal) !important;
}

.school-theme .text-yellow {
    color: var(--school-yellow) !important;
}

.school-theme .premium-input {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: var(--school-dark) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.school-theme .premium-input:focus {
    border-color: var(--school-teal) !important;
    box-shadow: 0 0 0 4px rgba(18, 181, 181, 0.1) !important;
}

.school-theme select.premium-input {
    background-image: none !important; /* Removed repeating chevrons */
    padding-right: 1rem !important;
}

/* ==================================================
   PREMIUM LIGHT FOOTER FOR CORPORATE SCHOOL THEME
   ================================================== */
.school-theme footer {
    background: #f8fafc !important; /* Premium light slate white */
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.school-theme footer .text-white,
.school-theme footer h1, .school-theme footer h2, .school-theme footer h3,
.school-theme footer h4, .school-theme footer h5, .school-theme footer h6 {
    color: var(--school-dark) !important;
}

.school-theme footer p,
.school-theme footer .small,
.school-theme footer .text-secondary,
.school-theme footer .text-white-50,
.school-theme footer a {
    color: #475569 !important; /* Elegant readable slate */
}

.school-theme footer a:hover {
    color: var(--school-teal) !important;
}

.school-theme footer strong,
.school-theme footer strong.text-white,
.school-theme footer strong.text-light {
    color: var(--school-dark) !important;
}

.school-theme footer .border-bottom {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

.school-theme footer [style*="border-top"] {
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}

/* Restore visibility for dark Glass Panels */
.school-theme .glass-panel[style*="rgba(9,9,11"],
.school-theme .glass-card[style*="rgba(9,9,11"] {
    background: rgba(9, 9, 11, 0.95) !important;
    color: #ffffff !important;
}
.school-theme .glass-panel[style*="rgba(15,23,42"] {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #ffffff !important;
}
.school-theme .glass-panel[style*="rgba(9,9,11"] .text-white,
.school-theme .glass-panel[style*="rgba(15,23,42"] .text-white,
.school-theme .glass-card[style*="rgba(9,9,11"] .text-white,
.school-theme .glass-panel[style*="rgba(9,9,11"] h1,
.school-theme .glass-panel[style*="rgba(9,9,11"] h2,
.school-theme .glass-panel[style*="rgba(9,9,11"] h3,
.school-theme .glass-panel[style*="rgba(9,9,11"] h4,
.school-theme .glass-panel[style*="rgba(15,23,42"] h3 {
    color: #ffffff !important;
}
.school-theme .glass-panel[style*="rgba(9,9,11"] .text-secondary,
.school-theme .glass-panel[style*="rgba(15,23,42"] .text-secondary,
.school-theme .glass-card[style*="rgba(9,9,11"] .text-secondary,
.school-theme .glass-panel[style*="rgba(9,9,11"] p,
.school-theme .glass-panel[style*="rgba(15,23,42"] p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Navbar Tuning */
.school-theme .navbar.glass-nav {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    padding: 1.2rem 0 !important;
}

.school-theme .navbar .nav-link {
    color: #1e293b !important;
    font-weight: 500;
}

.school-theme .navbar .nav-link:hover {
    color: var(--school-teal) !important;
}

/* Fix Navbar Brand Logo Text */
.school-theme .navbar .navbar-brand > span.text-white {
    color: var(--school-dark) !important;
}
.school-theme .navbar .navbar-brand > span.text-white > span {
    color: var(--school-teal) !important;
}

/* Fix Login Button Visibility */
.school-theme .navbar .btn-outline {
    color: var(--school-dark) !important;
    border-color: rgba(30, 41, 59, 0.5) !important;
}
.school-theme .navbar .btn-outline:hover {
    background: var(--school-dark) !important;
    color: white !important;
    border-color: var(--school-dark) !important;
}

/* Fix Mobile Navbar Collapse Menu */
@media (max-width: 991.98px) {
    .school-theme .navbar-collapse {
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05) !important;
    }
}
/* Hero Text Specifics */
.school-theme .hero-school .text-white,
.school-theme .hero-school h1 .title-top,
.school-theme .hero-school h1 .title-main,
.school-theme .hero-school .hero-school-brand span {
    color: var(--school-dark) !important;
}

.school-theme .hero-school-desc {
    color: var(--school-dark) !important;
    text-shadow: none;
    font-weight: 500;
}

.school-theme .btn-school {
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(18, 181, 181, 0.3) !important;
}

.school-theme .badge.bg-warning {
    background-color: var(--school-yellow) !important;
    color: #1e293b !important;
    font-weight: 700;
}

.school-theme .badge.bg-primary {
    background-color: var(--school-teal) !important;
    color: white !important;
    font-weight: 700;
}

/* ===================================================
   CORPORATE SCHOOL LOGIN STYLING
   =================================================== */
.school-theme.school-login-bg {
    background: 
        radial-gradient(circle at top right, rgba(18,181,181,0.08) 0%, transparent 60%),
        radial-gradient(circle at bottom left, rgba(14,165,233,0.05) 0%, transparent 80%),
        var(--school-light) !important;
    background-attachment: fixed;
    min-height: 100vh;
}

.school-theme.school-login-bg .glass-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08) !important;
    border-radius: 24px;
    padding: 3rem !important;
}

.school-theme.school-login-bg .text-white {
    color: var(--school-dark) !important;
}

.school-theme.school-login-bg .text-secondary,
.school-theme.school-login-bg .text-muted {
    color: rgba(30, 41, 59, 0.7) !important;
}

.school-theme.school-login-bg .premium-input {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--school-dark) !important;
    border-radius: 12px;
}

.school-theme.school-login-bg .premium-input:focus {
    border-color: var(--school-teal) !important;
    box-shadow: 0 0 0 4px rgba(18, 181, 181, 0.1) !important;
}

.school-theme.school-login-bg .btn-premium {
    background: var(--school-teal) !important;
    color: white !important;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 20px -5px rgba(18, 181, 181, 0.3) !important;
    transition: all 0.3s ease;
}

.school-theme.school-login-bg .btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -4px rgba(18, 181, 181, 0.4) !important/* ===================================================
   PREMIUM CORPORATE SCHOOL DASHBOARD THEME
   (Refined High-End Aesthetic)
   =================================================== */
/* Dashboard Sidebar Branding Correction */
body.school-theme.modern-dashboard .sidebar .navbar-brand span,
body.school-theme.modern-dashboard .sidebar .px-3 span,
body.school-theme.modern-dashboard .sidebar .navbar-brand i,
body.school-theme.modern-dashboard .sidebar .px-3 i {
    color: #ffffff !important; /* Force white for branding on navy */
}

body.school-theme.modern-dashboard .sidebar .navbar-brand span span,
body.school-theme.modern-dashboard .sidebar .px-3 span span {
    color: var(--school-yellow) !important;
}

body.school-theme.modern-dashboard p.text-muted {
    color: #64748b !important; /* Fixed: was #b4c6ef (low contrast) */
}

body.school-theme.modern-dashboard {
    background-color: #1a3b5d !important; /* Premium Navy Base */
    color: var(--dash-text) !important; /* Fixed: was #ffffff (invisible on light bg) */
    font-family: 'Inter', 'Outfit', sans-serif;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Light Background for Main Content Area */
body.school-theme.modern-dashboard main {
    background: var(--dash-bg) !important; 
    position: relative;
    min-height: 100vh;
}

body.school-theme.modern-dashboard::before {
    display: none !important;
}

body.school-theme.modern-dashboard .sidebar {
    background: var(--dash-sidebar) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.35) !important;
    padding: 0 !important;  /* header/scrollable own their padding */
    height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Custom Elegant Scrollbar for Sidebar */
body.school-theme.modern-dashboard .sidebar::-webkit-scrollbar {
    width: 5px;
}
body.school-theme.modern-dashboard .sidebar::-webkit-scrollbar-track {
    background: transparent;
}
body.school-theme.modern-dashboard .sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
body.school-theme.modern-dashboard .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.5); /* Cyan tint on hover */
}

body.school-theme.modern-dashboard .sidebar .nav-link {
    color: #94a3b8 !important;
    font-weight: 500;
    margin: 0.1rem 0.7rem;
    padding: 0.72rem 1.25rem !important;
    border-radius: 10px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}

body.school-theme.modern-dashboard .sidebar .nav-link span { color: inherit; }

body.school-theme.modern-dashboard .sidebar .nav-link i {
    font-size: 1rem;
    width: 18px;
    flex-shrink: 0;
    color: #64748b;
    opacity: 1;
    transition: all 0.22s ease;
}

body.school-theme.modern-dashboard .sidebar .nav-link:hover {
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateX(3px);
}

body.school-theme.modern-dashboard .sidebar .nav-link:hover i {
    color: #22d3ee !important;
    opacity: 1;
    transform: scale(1.15);
}

body.school-theme.modern-dashboard .sidebar .nav-link.active {
    color: #22d3ee !important;
    background: linear-gradient(90deg, rgba(34,211,238,0.14) 0%, rgba(34,211,238,0.04) 100%) !important;
    font-weight: 700;
    border-left: 3px solid #22d3ee !important;
    border-radius: 0 10px 10px 0 !important;
    margin-left: 0 !important;
    padding-left: calc(1.25rem + 0.7rem - 3px) !important;
    transform: none !important;
    box-shadow: inset 0 0 16px rgba(34,211,238,0.04) !important;
}

body.school-theme.modern-dashboard .sidebar .nav-link.active i {
    opacity: 1;
    color: #22d3ee !important;
    filter: drop-shadow(0 0 6px rgba(34,211,238,0.5));
}

body.school-theme.modern-dashboard .sidebar .nav-link.active span {
    color: #22d3ee !important;
}

body.school-theme.modern-dashboard .sidebar .nav-link.active::after {
    display: none;   /* replaced by border-left */
}

body.school-theme.modern-dashboard .glass-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border-radius: 20px !important;
    padding: 2.2rem !important;
}

body.school-theme.modern-dashboard .text-white,
body.school-theme.modern-dashboard h1,
body.school-theme.modern-dashboard h2,
body.school-theme.modern-dashboard .glow-text {
    color: var(--dash-text) !important; /* Charcoal for light surface */
}

body.school-theme.modern-dashboard h1.h2,
body.school-theme.modern-dashboard .text-gradient {
    background: linear-gradient(135deg, var(--dash-text) 0%, var(--dash-accent) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* FINAL PRIORITY: Content INSIDE White Glass Cards must be dark and sharp */
body.school-theme.modern-dashboard .glass-card h1,
body.school-theme.modern-dashboard .glass-card h2,
body.school-theme.modern-dashboard .glass-card h3,
body.school-theme.modern-dashboard .glass-card h4,
body.school-theme.modern-dashboard .glass-card h5,
body.school-theme.modern-dashboard .glass-card p,
body.school-theme.modern-dashboard .glass-card span:not(.badge),
body.school-theme.modern-dashboard .glass-card div:not(.badge),
body.school-theme.modern-dashboard .glass-card .glow-text,
body.school-theme.modern-dashboard .glass-card .text-white,
body.school-theme.modern-dashboard .glass-card .text-gradient {
    color: var(--dash-text) !important;
    -webkit-text-fill-color: var(--dash-text) !important;
    background: none !important;
    text-shadow: none !important;
    font-family: 'Inter', sans-serif;
}

body.school-theme.modern-dashboard .glass-card .text-muted,
body.school-theme.modern-dashboard .glass-card p.text-muted,
body.school-theme.modern-dashboard .glass-card .text-secondary,
body.school-theme.modern-dashboard .text-muted,
body.school-theme.modern-dashboard .text-secondary {
    color: var(--dash-text-muted) !important;
}

body.school-theme.modern-dashboard .badge.bg-glass {
    background: rgba(99, 102, 241, 0.08) !important;
    color: var(--dash-accent) !important;
}

/* Modernized Progress Bar (System Capacity) */
.modern-dashboard .capacity-progress {
    height: 10px;
    background: #f1f5f9;
    border: none;
    border-radius: 100px;
}

.modern-dashboard .capacity-bar {
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%) !important;
    box-shadow: none;
    border-radius: 100px;
}

/* Teal/Indigo Button Upgrade */
.modern-dashboard .btn-premium {
    background: linear-gradient(135deg, #0d9488 0%, #4f46e5 100%) !important; 
    border-radius: 12px !important;
    padding: 0.6rem 1.4rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.modern-dashboard .btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.3) !important;
}

/* Sidebar Branding Reset */
body.school-theme.modern-dashboard .sidebar .navbar-brand {
    padding: 0 1.5rem;
    margin-bottom: 2.5rem !important;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
}

/* ===================================================
   OFFICIAL TRANSCRIPT COMPONENT (PREMIUM)
   =================================================== */

.transcript-paper {
    background: #ffffff !important;
    padding: 40px !important;
    border-radius: 0 !important;
    color: #1e293b !important;
    font-family: 'Outfit', sans-serif !important;
    position: relative;
    overflow: hidden;
    box-shadow: none !important;
    border: 1px solid #e2e8f0;
}

/* Security Background Watermark */
.transcript-paper::after {
    content: 'OFFICIAL TRANSCRIPT';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 8rem;
    font-weight: 900;
    color: rgba(13, 148, 136, 0.03);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
}

.transcript-header-gold {
    border: 3px double #f59e0b;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    background: rgba(245, 158, 11, 0.02);
}

.transcript-table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    z-index: 1;
    position: relative;
}

.transcript-table-premium th {
    background: #f8fafc;
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 12px 15px;
    border-bottom: 2px solid #e2e8f0;
}

.transcript-table-premium td {
    padding: 15px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

.transcript-table-premium tr:hover td {
    background: #fdfdfd;
}

.transcript-badge-status {
    padding: 6px 16px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* ===================================================
   PRINT OPTIMIZATION (REFINED)
   =================================================== */

@media print {
    @page {
        margin: 1cm;
        size: A4;
    }

    /* Nuclear option to hide everything else */
    body > *:not(#reportDetailModal) {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    #reportDetailModal {
        position: static !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .modal-dialog {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .modal-content {
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
        overflow: visible !important;
    }

    .modal-header, 
    .modal-footer,
    .btn-close,
    .nav-pills,
    .btn-premium,
    button[onclick="window.print()"] {
        display: none !important;
    }

    .modal-body {
        padding: 0 !important;
        overflow: visible !important;
    }

    .transcript-paper {
        border: none !important;
        padding: 0 !important;
        width: 100% !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    /* Force all tab content to be visible in print */
    .tab-content > .tab-pane {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-bottom: 30px !important;
    }

    /* Add "Semester X" labels before each table in print */
    #sem1::before { content: "Semester 1 Results"; display: block; font-weight: bold; font-size: 1.1rem; margin-bottom: 10px; border-bottom: 1px solid #eee; }
    #sem2::before { content: "Semester 2 Results"; display: block; font-weight: bold; font-size: 1.1rem; margin-top: 20px; margin-bottom: 10px; border-bottom: 1px solid #eee; }

    /* Force background colors and remove shadows */
    .transcript-header-gold, .bg-light, .badge {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-shadow: none !important;
    }

    /* Fix table layout */
    .transcript-table-premium {
        table-layout: auto !important;
        width: 100% !important;
        page-break-inside: avoid !important;
    }

    /* Hide the watermark if it's too dark or causes issues, or keep it light */
    .transcript-paper::after {
        opacity: 0.05 !important;
    }
}


/* ===================================================
   SYSTEM-WIDE MOBILE RESPONSIVENESS CORE
   =================================================== */

/* Mobile Header Navigation */
.mobile-top-bar {
    display: none;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1050;
    justify-content: space-between;
    align-items: center;
}

[data-theme="light"] .mobile-top-bar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-toggle-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    padding: 0;
    cursor: pointer;
}

[data-theme="light"] .mobile-toggle-btn {
    color: #0f172a;
}

/* Sidebar Responsive Overlay (Mobile & Tablet up to 991px) */
@media (max-width: 991.98px) {
    .mobile-top-bar {
        display: flex !important; /* Override d-md-none */
    }

    .sidebar {
        position: fixed !important;
        top: 0;
        left: -280px; /* Hidden by default */
        width: 280px !important;
        height: 100vh !important;
        z-index: 2000 !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 20px 0 50px rgba(0,0,0,0.5) !important;
    }

    .sidebar.show {
        left: 0 !important;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 1999;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .sidebar-close-btn {
        display: block !important;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.5);
        background: transparent;
        border: none;
    }

    [data-theme="light"] .sidebar-close-btn {
        color: rgba(0, 0, 0, 0.5);
    }

    /* Main Content Adjustments */
    main {
        margin-left: 0 !important;
        padding-top: 1rem !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Card & Padding Adjustments */
    .glass-card {
        padding: 1.5rem !important;
        border-radius: 20px !important;
    }

    h1 { font-size: 1.75rem !important; }
    h3 { font-size: 1.25rem !important; }
}

@media (min-width: 992px) {
    .sidebar-close-btn {
        display: none !important;
    }
}

/* Utility for Mobile Grid */
.mobile-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Dashboard Header Responsiveness */
@media (max-width: 991.98px) {
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .d-flex.align-items-center.gap-3 {
        width: 100%;
        flex-wrap: wrap;
    }

    .btn-premium, .btn-glass, .btn-outline-secondary {
        width: 100%;
        margin-bottom: 0.5rem;
        text-align: center;
        justify-content: center;
    }
}

/* ══════════════════════════════════════════════
   LANGUAGE SELECTOR — ISOLATED DROPDOWN
   Dropdown floats below navbar without resizing it
══════════════════════════════════════════════ */

/* Container: fixed size, creates stacking context for the dropdown */
.language-selector-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;        /* Never grows/shrinks in flex row */
    overflow: visible;     /* Let the dropdown escape */
    height: 40px;          /* Fixed height — navbar stays the same */
}

/* The Bootstrap dropdown wrapper inside the container */
.language-selector-container .dropdown {
    position: static !important; /* Relative pos comes from the container above */
}

/* The toggle button: compact pill that matches navbar */
.language-selector-container .dropdown-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0.45rem 0.9rem !important;   /* compact — won't push header height */
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease !important;
    /* NO transform on hover — transforms cause layout recalc */
    height: 36px;          /* Explicit height so it never changes */
    line-height: 1 !important;
}

.language-selector-container .dropdown-toggle:hover,
.language-selector-container .dropdown-toggle:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    outline: none !important;
    box-shadow: none !important;
    /* transform: none — intentional, no vertical shift */
}

/* Hide the default Bootstrap caret arrow */
.language-selector-container .dropdown-toggle::after {
    display: none !important;
}

/* Custom chevron icon stays inside the button inline */
.language-selector-container .dropdown-toggle .lang-chevron {
    font-size: 0.6rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.language-selector-container .dropdown-toggle[aria-expanded="true"] .lang-chevron {
    transform: rotate(180deg);
}

/* Light theme button variant */
[data-theme="light"] .language-selector-container .dropdown-toggle {
    background: rgba(15, 23, 42, 0.06) !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
}

[data-theme="light"] .language-selector-container .dropdown-toggle:hover {
    background: rgba(15, 23, 42, 0.1) !important;
    border-color: rgba(15, 23, 42, 0.25) !important;
}

/* Dropdown MENU: absolutely positioned, floats over content */
.language-selector-container .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;  /* 8px gap below the button */
    right: 0 !important;
    left: auto !important;
    transform: none !important;        /* No Bootstrap transforms that cause layout shift */
    margin: 0 !important;
    z-index: 1070 !important;          /* Above navbar, below modals */
    min-width: 160px !important;
    padding: 0.5rem !important;
    border-radius: 14px !important;
    background: rgba(10, 20, 40, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4) !important;
    /* Animation */
    animation: langDropIn 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

[data-theme="light"] .language-selector-container .dropdown-menu {
    background: rgba(255, 255, 255, 0.97) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
}

@keyframes langDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dropdown items */
.language-selector-container .dropdown-item {
    border-radius: 8px !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: background 0.15s ease !important;
}

.language-selector-container .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.language-selector-container .dropdown-item.active {
    background: rgba(18, 181, 181, 0.18) !important;
    color: #12b5b5 !important;
    font-weight: 700 !important;
}

[data-theme="light"] .language-selector-container .dropdown-item {
    color: #334155 !important;
}
[data-theme="light"] .language-selector-container .dropdown-item:hover {
    background: rgba(15, 23, 42, 0.06) !important;
    color: #0f172a !important;
}
[data-theme="light"] .language-selector-container .dropdown-item.active {
    background: rgba(18, 181, 181, 0.12) !important;
    color: #0d9488 !important;
}

/* Global Dark Mode Heading Contrast Fix */
[data-theme='dark'] h1, 
[data-theme='dark'] h2, 
[data-theme='dark'] h3, 
[data-theme='dark'] h4, 
[data-theme='dark'] h5, 
[data-theme='dark'] h6 {
    color: #F8FAFC !important;
}

[data-theme='dark'] .text-secondary,
[data-theme='dark'] .text-muted {
    color: #94A3B8 !important;
}

/* Premium Dashboard Elements */
.premium-stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.premium-stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
}

.stat-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

.status-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: status-glow 2s infinite;
}

@keyframes status-glow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.letter-spacing-1 { letter-spacing: 1px; }
.letter-spacing-2 { letter-spacing: 2px; }

.btn-glass-dark {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.btn-glass-dark:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.tabular-nums { font-variant-numeric: tabular-nums; }
.tracking-tight { letter-spacing: -0.025em; }

/* Light Theme Adjustments */
[data-theme="light"] .premium-stat-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.05) !important;
}

[data-theme="light"] .premium-stat-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .btn-glass-dark {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.05);
    color: #0f172a !important;
}

/* ── Modernized Global Sidebar ── */
.sidebar {
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    background: #0c1424 !important; /* Solid fallback */
    background: linear-gradient(180deg, #0c1424 0%, #0f172a 60%, #0c1424 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* outer wrapper does NOT scroll */
    z-index: 100;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.35);
}

/* Fixed top header — never scrolls */
.sidebar-header {
    flex-shrink: 0;
    padding: 1.6rem 1.4rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}

/* Scrollable body of the sidebar */
.sidebar-scrollable {
    flex: 1 1 auto;
    min-height: 0;          /* CRITICAL: allows flex child to shrink and scroll */
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1.5rem;
    scroll-behavior: smooth;
}

/* Thin teal scrollbar — appears on hover */
.sidebar-scrollable::-webkit-scrollbar { width: 3px; }
.sidebar-scrollable::-webkit-scrollbar-track { background: transparent; }
.sidebar-scrollable::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.15);
    border-radius: 10px;
}
.sidebar-scrollable:hover::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.35);
}

/* Category labels */
.sidebar-category {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: #94a3b8; /* Increased contrast from #3d5166 */
    padding: 1.2rem 1.5rem 0.4rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-category::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin-left: 0.4rem;
}

/* Nav links — clearly visible */
.sidebar .nav-link {
    color: #94a3b8 !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.72rem 1.25rem !important;
    margin: 0.1rem 0.7rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.sidebar .nav-link span {
    color: inherit;
}

.sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.22s ease;
    color: #64748b;
}

/* Hover state */
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #e2e8f0 !important;
    transform: translateX(3px);
    border-right: none !important;
}
.sidebar .nav-link:hover i {
    color: #22d3ee !important;
    transform: scale(1.15);
}

/* Active state */
.sidebar .nav-link.active {
    background: linear-gradient(90deg,
        rgba(34,211,238,0.14) 0%,
        rgba(34,211,238,0.04) 100%) !important;
    color: #22d3ee !important;
    font-weight: 700;
    border-left: 3px solid #22d3ee !important;
    border-right: none !important;
    border-radius: 0 10px 10px 0 !important;
    margin-left: 0 !important;
    padding-left: calc(1.25rem + 0.7rem - 3px) !important;
    transform: none !important;
    box-shadow: inset 0 0 16px rgba(34,211,238,0.04);
}
.sidebar .nav-link.active i {
    color: #22d3ee !important;
    filter: drop-shadow(0 0 6px rgba(34,211,238,0.5));
}
.sidebar .nav-link.active span {
    color: #22d3ee !important;
    text-shadow: 0 0 20px rgba(34,211,238,0.25);
}

/* Logout special */
.sidebar .logout-link {
    color: #f87171 !important;
    margin-top: 0.5rem;
}
.sidebar .logout-link i { color: #f87171 !important; }
.sidebar .logout-link:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
}

/* Light Theme Sidebar */
[data-theme="light"] .sidebar {
    background: #ffffff !important;
    border-right-color: rgba(0, 0, 0, 0.06);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .sidebar-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.01);
}
[data-theme="light"] .sidebar-category {
    color: #b0bec5;
}
[data-theme="light"] .sidebar-category::after {
    background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .sidebar .nav-link {
    color: #475569 !important;
}
[data-theme="light"] .sidebar .nav-link i { color: #94a3b8; }
[data-theme="light"] .sidebar .nav-link:hover {
    background: rgba(59, 130, 246, 0.06) !important;
    color: #2563eb !important;
}
[data-theme="light"] .sidebar .nav-link:hover i { color: #2563eb !important; }
[data-theme="light"] .sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(59,130,246,0.12), rgba(59,130,246,0.03)) !important;
    color: #2563eb !important;
    border-left-color: #2563eb !important;
}
[data-theme="light"] .sidebar .nav-link.active i {
    color: #2563eb !important;
    filter: none;
}


/* Communication Hub - Directive Styles */
.directives-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.directives-container::-webkit-scrollbar {
    width: 4px;
}

.directives-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.directive-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.directive-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.3);
}

.directive-icon-mini {
    width: 32px;
    height: 32px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.directive-text {
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

.xx-small { font-size: 0.65rem; }
.xxx-small { font-size: 0.55rem; }
.letter-spacing-2 { letter-spacing: 0.1em; }


/* --- Teacher Dashboard Specific --- */
.next-class-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border-left: 5px solid #6366f1;
    position: relative;
    overflow: hidden;
}

.next-class-card::after {
    content: '\f51b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    opacity: 0.05;
    transform: rotate(-15deg);
}

.pulse-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.performance-gauge {
    width: 100%;
    height: 12px;
    background: rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.performance-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 6px;
    transition: width 1s ease-out;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.quick-action-btn i {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.btn-premium {
    background: var(--accent-gradient) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 1rem !important;
}

.btn-premium:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
}

/* Sidebar hover/active — defined in the Modernized Sidebar section above */
/* This block intentionally left as a no-op to avoid overriding the canonical rules */

.premium-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
}

.premium-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
    outline: none !important;
}

.premium-input[readonly] {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: not-allowed;
}

/* ════════ GLOBAL DASHBOARD RESPONSIVE SYSTEM ════════ */
@media (max-width: 991.98px) {
    /* Fixed Sidebar for Mobile */
    .sidebar {
        position: fixed !important;
        left: -280px !important;
        width: 280px !important;
        height: 100vh !important;
        top: 0 !important;
        z-index: 1050 !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        background: #0f172a !important; /* Dark theme for sidebar everywhere */
        display: flex !important;
        flex-direction: column !important;
    }

    .sidebar.active {
        left: 0 !important;
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5) !important;
    }

    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 1040;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Main Content Shift */
    main, .main-content, .col-md-10 {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 1.25rem !important;
    }

    /* Mobile Top Bar Consistency */
    .mobile-top-bar {
        display: flex !important;
        background: #020617;
        padding: 0.75rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: sticky;
        top: 0;
        z-index: 1000;
        justify-content: space-between;
        align-items: center;
    }

    /* Typography Scaling */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }
    
    .stat-card, .glass-card {
        padding: 1.25rem !important;
        border-radius: 20px !important;
    }

    .stat-icon-wrapper, .stat-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.1rem !important;
    }

    /* Table Responsiveness */
    .table-responsive {
        border-radius: 12px;
        border: 1px solid rgba(0,0,0,0.05);
    }
}

@media (max-width: 575.98px) {
    .row > * {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .stat-card h2 {
        font-size: 1.5rem !important;
    }
}


/* Shared keyboard, mobile, and motion preferences */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--bs-primary, #2563eb);
    outline-offset: 3px;
}

.table-responsive {
    overscroll-behavior-inline: contain;
}

@media (max-width: 575.98px) {
    :where(.modal-footer, .card-header) {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .modal-body :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
