:root {
    --theme-color: #1e3c72;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Keep portal labels fixed: no accidental blue selection or browsing caret.
   Form controls remain fully editable through the override below. */
body,
body * {
    -webkit-user-select: none;
    user-select: none;
    caret-color: transparent;
}

input,
textarea,
[contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
    caret-color: auto;
}

#auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #030b10;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    transition: 0.5s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ================= ULTRA-PREMIUM FUJI GLASSMORPHIC LOGIN ================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
    --fuji-deep: #030b10;
    --fuji-dark-teal: #051419;
    --fuji-mid: #0a1e28;
    --fuji-horizon-rose: #5c1a2a;
    --fuji-sunset-copper: #c4703a;
    --fuji-gold: #e8a44c;
    --fuji-glow-cyan: #0ef6cc;
    --fuji-electric-blue: #3b82f6;
    --fuji-magenta: #d946a8;
    --fuji-snow: #e8ecf4;
    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.1);
}

#login-wrapper,
#pin-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--fuji-deep) !important;
    z-index: 1000;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

#pin-wrapper {
    z-index: 9999 !important;
}

/* SVG Background Layer */
.fuji-scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Atmospheric Orbs */
.atmo-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.atmo-orb--teal {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14, 246, 204, 0.12) 0%, transparent 70%);
    filter: blur(80px);
    top: 15%;
    left: 5%;
    animation: orbDrift 12s ease-in-out infinite;
}

.atmo-orb--copper {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(196, 112, 58, 0.18) 0%, transparent 70%);
    filter: blur(70px);
    bottom: 20%;
    right: 5%;
    animation: orbDrift 10s ease-in-out infinite reverse;
}

.atmo-orb--magenta {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(217, 70, 168, 0.1) 0%, transparent 70%);
    filter: blur(90px);
    top: 40%;
    right: 25%;
    animation: orbDrift 14s ease-in-out infinite 2s;
}

.atmo-orb--gold {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(232, 164, 76, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    bottom: 30%;
    left: 30%;
    animation: orbDrift 9s ease-in-out infinite 1s;
}

@keyframes orbDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    33% {
        transform: translate(15px, -20px) scale(1.08);
        opacity: 0.9;
    }

    66% {
        transform: translate(-10px, 12px) scale(0.95);
        opacity: 0.7;
    }
}

/* Floating Particles (Cherry Blossom / Data Nodes) */
.particle-field {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===== CHERRY BLOSSOM SVG BRANCHES ===== */
.sakura-branch {
    position: absolute;
    top: 0;
    height: 100%;
    width: 140px;
    z-index: 3;
    pointer-events: none;
    opacity: 0.85;
    filter: drop-shadow(0 0 12px rgba(255, 130, 180, 0.2));
    animation: sakuraSway 8s ease-in-out infinite;
}

.sakura-left {
    left: 0;
}

.sakura-right {
    right: 0;
    transform: scaleX(-1);
}

@keyframes sakuraSway {

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

    25% {
        transform: translateY(-3px) rotate(0.3deg);
    }

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

    75% {
        transform: translateY(-1px) rotate(0.1deg);
    }
}

.sakura-right {
    animation: sakuraSwayRight 8s ease-in-out infinite;
}

@keyframes sakuraSwayRight {

    0%,
    100% {
        transform: scaleX(-1) translateY(0) rotate(0deg);
    }

    25% {
        transform: scaleX(-1) translateY(-3px) rotate(0.3deg);
    }

    50% {
        transform: scaleX(-1) translateY(2px) rotate(-0.2deg);
    }

    75% {
        transform: scaleX(-1) translateY(-1px) rotate(0.1deg);
    }
}

@media (max-width: 768px) {
    .sakura-branch {
        width: 80px;
        opacity: 0.6;
    }
}

@media (max-width: 480px) {
    .sakura-branch {
        width: 50px;
        opacity: 0.4;
    }
}

/* ===== GLASSMORPHISM PANEL ===== */
.glass-login-box {
    position: relative;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    padding: 50px 42px;
    border-radius: 20px !important;
    width: 92%;
    max-width: 420px;
    border: 1px solid var(--glass-border) !important;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 24px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px var(--glass-highlight) !important;
    color: #fff !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    z-index: 10;
    transition: box-shadow 0.5s ease, border-color 0.5s ease;
    animation: none;
}

.glass-login-box:hover {
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 24px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(14, 246, 204, 0.06),
        0 0 40px rgba(14, 246, 204, 0.03),
        inset 0 1px 1px var(--glass-highlight) !important;
}

.glass-login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}

.glass-login-box::after {
    display: none;
}

/* Neon Laser Sweep */
.laser-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 246, 204, 0.04), transparent);
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.ai-active .laser-sweep {
    opacity: 1;
    animation: laserSweep 3s linear infinite;
}

@keyframes laserSweep {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.pro-icon-container {
    text-align: center;
    margin-bottom: 8px;
}

.pro-icon-container i {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.85);
    filter: drop-shadow(0 0 8px rgba(14, 246, 204, 0.15));
}

/* Login Title */
.glass-login-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 200;
    letter-spacing: 10px;
    text-transform: lowercase;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 36px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ===== INPUT FIELDS ===== */
.glass-input-group {
    margin-bottom: 28px;
    position: relative;
}

.glass-input-group label {
    display: none;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--fuji-glow-cyan);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(14, 246, 204, 0.4);
    border-radius: 2px;
}

.input-wrapper:focus-within::after {
    width: 100%;
    left: 0;
}

.pro-input-icon {
    position: absolute;
    right: 12px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 14px;
    transition: 0.4s ease;
    pointer-events: none;
}

.eye-toggle-icon {
    pointer-events: all !important;
    cursor: pointer;
}

.glass-input-group input {
    width: 100% !important;
    padding: 14px 42px 14px 2px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 0 !important;
    color: #fff !important;
    font-size: 14.5px !important;
    outline: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    letter-spacing: 0.3px;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 300;
}

.glass-input-group input:focus {
    border-bottom-color: transparent !important;
    box-shadow: none !important;
}

.input-wrapper:focus-within .pro-input-icon {
    color: var(--fuji-glow-cyan) !important;
    filter: drop-shadow(0 0 6px rgba(14, 246, 204, 0.5));
}

.glass-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.22) !important;
    font-weight: 200;
    letter-spacing: 0.8px;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* ===== OPTIONS ROW ===== */
.glass-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.4) !important;
}

.glass-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.3s;
    color: rgba(255, 255, 255, 0.4) !important;
    font-weight: 300;
}

.glass-options label:hover {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Custom Toggle Checkbox */
.custom-checkbox-container {
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkmark {
    position: absolute;
    top: -1px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-checkbox-container:hover input~.custom-checkmark {
    border-color: rgba(14, 246, 204, 0.4);
}

.custom-checkbox-container input:checked~.custom-checkmark {
    background: linear-gradient(135deg, var(--fuji-glow-cyan), var(--fuji-electric-blue));
    border-color: transparent;
    box-shadow: 0 0 12px rgba(14, 246, 204, 0.35);
}

.custom-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox-container input:checked~.custom-checkmark:after {
    display: block;
}

.custom-checkbox-container .custom-checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* AI Neural Sync Toggle */
.ai-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
    letter-spacing: 0.5px;
    font-family: 'JetBrains Mono', monospace;
}

.ai-toggle {
    position: relative;
    width: 34px;
    height: 18px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.35s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-toggle.active {
    background: rgba(14, 246, 204, 0.2);
    border-color: rgba(14, 246, 204, 0.4);
    box-shadow: 0 0 12px rgba(14, 246, 204, 0.15);
}

.ai-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-toggle.active::after {
    left: 18px;
    background: var(--fuji-glow-cyan);
    box-shadow: 0 0 8px rgba(14, 246, 204, 0.6);
}

/* ===== ACTION BUTTON ===== */
.glass-login-btn {
    width: 100% !important;
    padding: 15px !important;
    background: linear-gradient(135deg, var(--fuji-glow-cyan), var(--fuji-electric-blue), #6366f1) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    cursor: pointer !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 6px 20px rgba(14, 246, 204, 0.15), 0 2px 8px rgba(59, 130, 246, 0.2) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    background-size: 200% 200% !important;
    animation: gradientShift 4s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.glass-login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.glass-login-btn:hover::before {
    transform: translateX(100%);
}

.glass-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(14, 246, 204, 0.2), 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.glass-login-btn:active {
    transform: translateY(0) scale(0.95) !important;
    box-shadow: 0 2px 8px rgba(14, 246, 204, 0.15) !important;
    transition: all 0.1s ease !important;
}

/* ===== NEURAL SYNC LOG ===== */
.neural-log {
    margin-top: 18px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(14, 246, 204, 0.1);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(14, 246, 204, 0.6);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease, margin 0.5s ease;
    line-height: 1.7;
}

.neural-log.visible {
    max-height: 120px;
    padding: 12px 14px;
    overflow-y: auto;
}

.neural-log::-webkit-scrollbar {
    width: 3px;
}

.neural-log::-webkit-scrollbar-track {
    background: transparent;
}

.neural-log::-webkit-scrollbar-thumb {
    background: rgba(14, 246, 204, 0.3);
    border-radius: 3px;
}

.error-msg {
    color: #fff;
    margin-top: 18px;
    font-size: 12px;
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 11px 14px;
    border-radius: 10px;
    font-weight: 400;
    text-align: center;
    backdrop-filter: blur(8px);
    letter-spacing: 0.3px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ===== HUD DASHBOARD (Post-Login) ===== */
.hud-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: var(--fuji-deep);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hud-overlay.active {
    display: flex;
    opacity: 1;
}

.hud-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 700px;
    width: 90%;
    margin-top: 30px;
}

.hud-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(14, 246, 204, 0.1);
    border-radius: 12px;
    padding: 18px;
    backdrop-filter: blur(10px);
}

.hud-card h4 {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(14, 246, 204, 0.6);
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.hud-card .hud-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.hud-greeting {
    text-align: center;
    margin-bottom: 10px;
}

.hud-greeting h1 {
    font-size: 28px;
    font-weight: 200;
    color: #fff;
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.hud-greeting p {
    font-size: 11px;
    color: rgba(14, 246, 204, 0.5);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.hud-status-bar {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 25px;
    text-align: center;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .glass-login-box {
        padding: 40px 28px;
        max-width: 360px;
    }

    .glass-login-title {
        font-size: 1.5rem;
        letter-spacing: 8px;
    }

    .hud-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .hud-greeting h1 {
        font-size: 22px;
    }

    .atmo-orb--teal {
        width: 250px;
        height: 250px;
    }

    .atmo-orb--copper {
        width: 200px;
        height: 200px;
    }
}

/* ================= DASHBOARD SECTION ================= */
#school-ticker-container {
    display: none;
    background: #e53e3e;
    color: white;
    padding: 6px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

#dashboard-wrapper {
    display: none;
    width: 100%;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.top-navbar {
    height: 50px;
    background: #1a252f;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-shrink: 0;
}

.top-navbar .brand {
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.school-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #38b2ac;
}

.device-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    background: #2c3e50;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.dashboard-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    padding: 20px 0 0 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: 0.3s;
}

.menu-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: 0.3s;
    border-left: 4px solid transparent;
    font-weight: 500;
    border-bottom: 1px solid #34495e;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.menu-item:hover,
.menu-item.active {
    background: #34495e;
    border-left: 4px solid #38b2ac;
    color: #38b2ac;
}

.logout-btn {
    margin-top: auto;
    padding: 15px;
    background: #e53e3e;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
    display: block;
}

.main-content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
    background: #f4f7f6;
}

.header-title {
    margin-bottom: 25px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    color: #2d3748;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-bottom: 4px solid #38b2ac;
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-card h2 {
    color: #2c3e50;
    font-size: 28px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #38b2ac;
    padding-bottom: 10px;
    display: inline-block;
}

.class-filter-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #18bc9c;
    color: #18bc9c;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: 0.3s;
}

.filter-btn:hover {
    background: #e8f8f5;
}

.filter-btn.active {
    background: #18bc9c;
    color: white;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

.submit-btn {
    padding: 10px 20px;
    background: #38b2ac;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
}

.input-premium,
.sched-date,
.sched-subj,
.sched-time {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    font-size: 13px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
    white-space: nowrap;
    text-align: left;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

th {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
}

.action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-size: 12px;
    font-weight: bold;
    margin-right: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-blue {
    background: #3182ce;
}

.btn-red {
    background: #e53e3e;
}

.btn-green {
    background: #38a169;
}

.btn-yellow {
    background: #f39c12;
    color: #fff;
}

.btn-dark {
    background: #2d3748;
}

.btn-purple {
    background: #805ad5;
}

.img-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.switch-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #18bc9c;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.link-display-box {
    display: flex;
    align-items: center;
    margin-top: 15px;
    background: #fff;
    border: 2px dashed #18bc9c;
    border-radius: 6px;
    padding: 5px;
}

.link-display-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: bold;
    background: transparent;
}

.link-display-box button {
    background: #18bc9c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
    flex-wrap: wrap;
}

.setting-row .form-group {
    margin-bottom: 0;
}

.preview-img {
    width: 100px;
    height: 40px;
    object-fit: contain;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px;
}

#role-footer {
    height: 30px;
    background: #27ae60;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
    z-index: 1000;
    letter-spacing: 1px;
}

.mobile-name {
    display: none;
}

/* ================= MODALS & CERTIFICATES ================= */
.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 24px 16px;
    box-sizing: border-box;
    flex-direction: column;
}

.custom-modal-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    box-sizing: border-box;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-top: 5px solid #38b2ac;
}

.custom-modal-header {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.id-card-generator,
.cert-card-generator {
    background-color: #fff;
    position: relative;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
}

.id-card-generator {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 260px;
    height: 430px;
}

.cert-card-generator {
    width: 700px;
    height: 500px;
    padding: 40px;
    text-align: center;
    border: 10px solid var(--theme-color, #1e3c72);
    background: #fafafa;
}

.id-header {
    background: var(--theme-color, #1e3c72);
    color: white;
    text-align: center;
    padding: 20px 10px 45px 10px;
    position: relative;
}

.id-school-name {
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.id-school-logo-print {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    position: absolute;
    top: 15px;
    left: 15px;
    border: 2px solid white;
    background: white;
    object-fit: cover;
}

.id-photo-container {
    margin-top: -45px;
    margin-bottom: 10px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.id-photo-circle {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: #eee;
}

.id-name-text {
    font-size: 16px;
    font-weight: 800;
    color: white;
    background: #16a085;
    padding: 6px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    margin: 5px 15px 15px 15px;
    text-align: center;
    letter-spacing: 0.5px;
}

.id-details-box {
    width: 100%;
    padding: 0 20px;
    font-size: 11px;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.6;
}

.id-row {
    display: flex;
    margin-bottom: 3px;
    align-items: flex-start;
}

.id-label {
    width: 65px;
    color: var(--theme-color, #1e3c72);
}

.id-val {
    flex: 1;
    text-transform: capitalize;
    color: #2c3e50;
}

.id-footer-area {
    margin-top: auto;
    width: 100%;
    text-align: center;
    padding-bottom: 5px;
}

.sig-box {
    text-align: center;
    width: 100px;
    margin: 0 auto;
    padding-bottom: 5px;
}

.principal-sig-img {
    height: 35px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.sig-line {
    border-top: 1px solid #000;
    width: 100px;
    margin: 2px auto;
}

.sig-label {
    font-size: 9px;
    font-weight: bold;
    color: #e53e3e;
    text-transform: uppercase;
    text-align: center;
}

.emergency-text {
    font-size: 10px;
    font-weight: bold;
    color: #c0392b;
    display: block;
    margin-top: 5px;
}

.id-bottom-stripe {
    background: #e67e22;
    height: 12px;
    width: 100%;
    margin-top: 5px;
}

/* Certificate specific */
.cert-header-title {
    font-size: 28px;
    color: var(--theme-color, #1e3c72);
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.cert-type {
    font-size: 20px;
    color: #e67e22;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.cert-body {
    font-size: 18px;
    line-height: 2;
    color: #333;
    text-align: justify;
    margin-bottom: 40px;
}

.cert-footer-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

#final-id-image,
#final-cert-image {
    display: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    background: white;
}

#final-id-image {
    width: 260px;
    height: 430px;
}

#final-cert-image {
    width: 700px;
    height: auto;
    max-width: 90vw;
}

.id-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ================= COMMAND CENTER DASHBOARD REFRESH ================= */
#dashboard-wrapper {
    background:
        radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.22), transparent 32%),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.18), transparent 28%),
        linear-gradient(135deg, #07111f 0%, #0d1f2d 48%, #06101b 100%);
    color: #e5eef8;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
}

#dashboard-wrapper .top-navbar {
    height: 64px;
    background: rgba(5, 13, 24, 0.88);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

#dashboard-wrapper .top-navbar .brand {
    letter-spacing: 0;
    color: #f8fafc;
}

#dashboard-wrapper .school-logo {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(45, 212, 191, 0.65);
    box-shadow: 0 0 18px rgba(45, 212, 191, 0.22);
}

#dashboard-wrapper .device-toggle {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    color: #cbd5e1;
}

#dashboard-wrapper .dashboard-body {
    gap: 0;
}

#dashboard-wrapper .sidebar {
    width: 245px;
    background: rgba(6, 15, 27, 0.86);
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    padding: 14px 0;
    box-shadow: 22px 0 50px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

#dashboard-wrapper .menu-container {
    padding: 0 10px;
    gap: 4px;
}

#dashboard-wrapper .menu-item {
    border: 1px solid transparent;
    border-bottom: none;
    border-left: none;
    border-radius: 8px;
    color: #9fb2c8;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 600;
    -webkit-user-select: none;
    user-select: none;
    caret-color: transparent;
    touch-action: manipulation;
}

#dashboard-wrapper .menu-item i {
    width: 18px;
    color: #5eead4;
    opacity: 0.9;
}

#dashboard-wrapper .menu-item:hover,
#dashboard-wrapper .menu-item.active {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.24), rgba(59, 130, 246, 0.08));
    border-color: rgba(45, 212, 191, 0.28);
    color: #ffffff;
    box-shadow: inset 3px 0 0 #2dd4bf, 0 10px 24px rgba(20, 184, 166, 0.08);
}

#dashboard-wrapper .logout-btn {
    margin: 12px 10px 0;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fecaca;
}

#dashboard-wrapper .main-content {
    background: transparent;
    padding: 24px;
}

#dashboard-wrapper .header-title {
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    color: #f8fafc;
    margin-bottom: 18px;
}

#dashboard-wrapper .header-title h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
}

#dashboard-wrapper .card,
#dashboard-wrapper .glass-panel,
#dashboard-wrapper .stat-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.58));
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #dbeafe;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
}

#dashboard-wrapper .card,
#dashboard-wrapper .glass-panel {
    border-radius: 8px;
}

#dashboard-wrapper .stat-card {
    border-radius: 8px;
    border-bottom: 3px solid #2dd4bf;
    text-align: left;
}

#dashboard-wrapper .stat-card h3,
#dashboard-wrapper .card h3,
#dashboard-wrapper .glass-panel h3 {
    color: #e2e8f0;
}

#dashboard-wrapper .card h3,
#dashboard-wrapper .glass-panel h3 {
    border-bottom-color: rgba(45, 212, 191, 0.36);
}

#dashboard-wrapper .stat-card h2 {
    color: #22d3ee;
}

#dashboard-wrapper .form-group label {
    color: #b6c7db;
}

#dashboard-wrapper .input-premium,
#dashboard-wrapper .sched-date,
#dashboard-wrapper .sched-subj,
#dashboard-wrapper .sched-time,
#dashboard-wrapper .form-group input,
#dashboard-wrapper .form-group select,
#dashboard-wrapper .form-group textarea {
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
    border-radius: 8px;
}

#dashboard-wrapper .form-group input::placeholder,
#dashboard-wrapper .form-group textarea::placeholder {
    color: #64748b;
}

#dashboard-wrapper table {
    color: #dbeafe;
}

#dashboard-wrapper th {
    background: rgba(2, 6, 23, 0.62);
    color: #93c5fd;
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

#dashboard-wrapper td {
    border-bottom-color: rgba(148, 163, 184, 0.12);
}

#dashboard-wrapper tr:hover td {
    background: rgba(20, 184, 166, 0.05);
}

#dashboard-wrapper .filter-btn {
    background: rgba(2, 6, 23, 0.45);
    border-color: rgba(45, 212, 191, 0.35);
    color: #99f6e4;
    border-radius: 8px;
}

#dashboard-wrapper .filter-btn.active,
#dashboard-wrapper .filter-btn:hover {
    background: rgba(20, 184, 166, 0.22);
    color: #ffffff;
}

#dashboard-wrapper .link-display-box,
#dashboard-wrapper .switch-container,
#dashboard-wrapper .setting-row [style*="background:#f9f9f9"],
#dashboard-wrapper [style*="background: #f9f9f9"] {
    background: rgba(2, 6, 23, 0.42) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}

.section-kicker {
    color: #5eead4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.transfer-hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 22px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(37, 99, 235, 0.12));
    border: 1px solid rgba(45, 212, 191, 0.2);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.transfer-hero-panel h2 {
    margin: 6px 0;
    color: #f8fafc;
    font-size: 24px;
    letter-spacing: 0;
}

.transfer-hero-panel p {
    color: #a9bbcf;
    margin: 0;
    max-width: 680px;
}

.transfer-school-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #dbeafe;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.18);
    white-space: nowrap;
}

.transfer-layout-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.3fr);
    gap: 18px;
    align-items: start;
}

.transfer-form-panel,
.transfer-history-panel {
    padding: 22px;
}

.transfer-preview-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    margin: 8px 0 16px;
    border-radius: 8px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.2);
    color: #c7d2fe;
    font-size: 13px;
}

.transfer-doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
}

.transfer-history-panel .table-container {
    max-height: 520px;
    overflow: auto;
}

.transfer-doc-link {
    color: #67e8f9;
    text-decoration: none;
    display: inline-block;
    margin-right: 8px;
    font-size: 12px;
}

.transfer-doc-link:hover {
    color: #ffffff;
}

@media (max-width: 980px) {
    .transfer-layout-grid {
        grid-template-columns: 1fr;
    }

    .transfer-hero-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    body:not(.force-desktop) .dashboard-body {
        flex-direction: column;
        overflow-y: auto;
    }

    body:not(.force-desktop) .sidebar {
        width: 100%;
        height: auto;
        padding: 0;
    }

    body:not(.force-desktop) .menu-container {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px;
        align-items: center;
        background: rgba(6, 15, 27, 0.94);
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    }

    body:not(.force-desktop) .menu-container::-webkit-scrollbar {
        display: none;
    }

    body:not(.force-desktop) .menu-item {
        padding: 8px 15px;
        margin-bottom: 0;
        border-left: none;
        margin-right: 10px;
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.82);
        border-bottom: none;
        font-size: 13px;
    }

    body:not(.force-desktop) .menu-item.active {
        background: rgba(20, 184, 166, 0.26);
        color: white;
    }

    body:not(.force-desktop) .logout-btn {
        padding: 8px 15px;
        border-radius: 20px;
        margin-left: 5px;
        margin-top: 0;
        font-size: 13px;
    }

    body:not(.force-desktop) .main-content {
        padding: 15px;
        height: auto;
        overflow: visible;
    }

    body:not(.force-desktop) .desktop-name {
        display: none !important;
    }

    body:not(.force-desktop) .mobile-name {
        display: inline-block !important;
    }
}

body.force-desktop {
    min-width: 1100px;
    overflow-x: auto;
}

.locked-row,
.company-feature-locked {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    filter: grayscale(1);
    background: #ffebeb !important;
}

.company-feature-locked * {
    pointer-events: none;
}

.company-lock-badge {
    float: right;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {

    .auth-edit-grid,
    .privilege-grid {
        grid-template-columns: 1fr;
    }

    body:not(.force-desktop) .menu-container {
        background: rgba(255, 255, 255, 0.96) !important;
    }

    body:not(.force-desktop) .menu-item {
        background: #f8fafc !important;
    }

    body:not(.force-desktop) .menu-item.active {
        background: #eff6ff !important;
        color: #1d4ed8 !important;
    }
}

/* STUDENT RECORD CENTER */
.export-records-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 24px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--theme-color, #2563eb), #0f766e);
    box-shadow: 0 18px 40px rgba(15, 118, 110, 0.2);
}

.export-records-header h2 {
    margin: 5px 0 7px;
    font-size: clamp(21px, 3vw, 29px);
}

.export-records-header p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.55;
}

.export-records-header .section-kicker {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.export-records-summary {
    min-width: 130px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.13);
    text-align: center;
    backdrop-filter: blur(10px);
}

.export-records-summary strong,
.export-records-summary span {
    display: block;
}

.export-records-summary strong {
    font-size: 29px;
    line-height: 1;
}

.export-records-summary span {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.export-records-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.export-filter-field {
    display: grid;
    flex: 1;
    gap: 6px;
    min-width: 210px;
}

.export-filter-field label {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.export-select-all-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #334155;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.export-select-all-control input,
.export-check-column input {
    width: 17px;
    height: 17px;
    accent-color: var(--theme-color, #2563eb);
    cursor: pointer;
}

.export-pdf-button {
    min-height: 42px;
    padding: 0 20px !important;
    white-space: nowrap;
}

.export-records-table-wrap {
    overflow-x: auto;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.export-records-table {
    min-width: 920px;
    margin: 0;
}

.export-records-table th {
    white-space: nowrap;
}

.export-records-table td {
    color: #334155;
}

.export-records-table tbody tr:hover {
    background: #f0fdfa;
}

.export-check-column {
    width: 68px;
    text-align: center !important;
}

.export-status-pill {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #15803d;
    background: #f0fdf4;
    font-size: 11px;
    font-weight: 800;
}

.export-empty-state {
    padding: 42px !important;
    color: #64748b !important;
    text-align: center;
}

#dashboard-wrapper #tab-export-records .export-records-toolbar,
#dashboard-wrapper #tab-export-records .export-records-table-wrap {
    color: #0f172a;
}

@media (max-width: 768px) {

    .export-records-header,
    .export-records-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .export-records-summary {
        align-self: stretch;
    }

    .export-filter-field {
        min-width: 0;
    }

    .export-select-all-control,
    .export-pdf-button {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }
}

/* GLOBAL SIGNATURE TRANSPARENCY OVERRIDE */
img[src*="signature"],
.id-signature,
.cert-sig,
.global-transparent-sig {
    mix-blend-mode: multiply !important;
    background-color: transparent !important;
}

/* Student Portal: responsive real-data module workspace */
.student-module-shell { max-width:980px; margin:0 auto; padding:4px 0 24px; }
.student-module-toolbar { display:flex; align-items:flex-start; gap:14px; margin-bottom:18px; }
.student-module-heading { flex:1; min-width:0; }
.student-module-heading h2 { margin:2px 0 4px; color:#102a56; font-size:clamp(22px,3vw,30px); font-weight:800; }
.student-module-heading p { color:#64748b; font-size:13px; margin:0; }
.student-module-kicker { color:#2563eb; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.student-back-btn,.student-icon-btn,.student-text-btn { min-height:42px; border:1px solid #dbe4f0; border-radius:10px; background:#fff; color:#1e3a72; padding:10px 13px; cursor:pointer; font-weight:700; }
.student-back-btn { display:inline-flex; align-items:center; gap:8px; }
.student-icon-btn { width:42px; padding:10px; }
.student-back-btn:hover,.student-icon-btn:hover,.student-text-btn:hover { background:#eff6ff; border-color:#93c5fd; }
.student-module-content { min-width:0; }
.student-state { min-height:190px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; border:1px dashed #cbd5e1; border-radius:16px; background:#f8fafc; text-align:center; padding:24px; color:#64748b; }
.student-state i { font-size:32px; color:#94a3b8; }
.student-state h3 { margin:0; color:#334155; font-size:16px; }
.student-state p { margin:0; font-size:13px; }
.student-state-error i { color:#dc2626; }
.student-profile-card { display:flex; gap:22px; align-items:flex-start; padding:22px; border-radius:16px; background:#fff; box-shadow:0 8px 25px rgba(15,23,42,.07); }
.student-profile-photo { width:112px; height:140px; object-fit:cover; border-radius:12px; border:1px solid #dbe4f0; background:#f8fafc; }
.student-detail-grid { flex:1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.student-detail-grid div { padding:12px; border:1px solid #edf2f7; border-radius:10px; background:#f8fafc; }
.student-detail-grid span { display:block; color:#64748b; font-size:11px; margin-bottom:4px; }
.student-detail-grid strong { display:block; color:#1e293b; font-size:14px; overflow-wrap:anywhere; }
.student-record-list { display:grid; gap:12px; }
.student-record-card,.student-history-item { display:flex; align-items:center; gap:14px; justify-content:space-between; padding:16px; background:#fff; border:1px solid #e6edf5; border-radius:14px; box-shadow:0 4px 14px rgba(15,23,42,.04); }
.student-record-card h3 { margin:0 0 5px; color:#1e3a72; font-size:15px; }
.student-record-card p,.student-history-item p { margin:0 0 5px; color:#475569; font-size:13px; white-space:pre-wrap; }
.student-record-card small,.student-history-item small { color:#94a3b8; font-size:11px; }
.student-action-link { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:8px 12px; border:0; border-radius:9px; background:#2563eb; color:#fff; text-decoration:none; cursor:pointer; font-weight:700; font-size:12px; }
.student-history-block { margin-top:24px; padding-top:20px; border-top:1px solid #e5e7eb; }
.student-history-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.student-history-heading h4 { margin:0; color:#1e3a72; }
.student-history-item { align-items:flex-start; margin-bottom:10px; flex-wrap:wrap; }
.student-history-item > div { flex:1; min-width:180px; }
.student-history-item strong { color:#1e3a72; }
.student-status-badge { border-radius:999px; padding:5px 10px; background:#eff6ff; color:#1d4ed8; font-size:11px; font-weight:800; }
.student-reply { flex-basis:100%; padding:10px; border-left:3px solid #2563eb; background:#eff6ff; }
@media (max-width:600px) {
    .student-module-toolbar { gap:8px; }
    .student-back-btn span { display:none; }
    .student-profile-card { flex-direction:column; align-items:stretch; }
    .student-profile-photo { width:92px; height:116px; }
    .student-detail-grid { grid-template-columns:1fr; }
    .student-record-card { align-items:flex-start; flex-direction:column; }
    .student-action-link { width:100%; }
}

/* ==========================================================================
   ULTRA-PREMIUM CYBER COMMAND DESK STYLING (Inspired by Company Portal)
   ========================================================================== */
.ops-concept, :root {
  --m-bg: #070e1a;
  --m-panel: #0a1526;
  --m-panel-2: #0f1f38;
  --m-sidebar: #050b14;
  --m-ink: #e2e8f0;
  --m-ink-heading: #ffffff;
  --m-muted: #94a3b8;
  --m-line: rgba(0, 240, 255, 0.16);
  --m-accent: #00f0ff;
  --m-accent-soft: rgba(0, 240, 255, 0.12);
  --m-accent-glow: rgba(0, 240, 255, 0.35);
  --m-warm: #fbbf24;
  --m-green: #34d399;
  --m-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 240, 255, 0.02);
  --m-tooltip-bg: rgba(7, 14, 26, 0.96);
  --m-tooltip-border: rgba(0, 240, 255, 0.3);
  --m-tooltip-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
}

body.light-theme, body.light-theme .ops-concept {
  --m-bg: #f8fafc;
  --m-panel: #ffffff;
  --m-panel-2: #f1f5f9;
  --m-sidebar: #f8fafc;
  --m-ink: #1e293b;
  --m-ink-heading: #0f172a;
  --m-muted: #64748b;
  --m-line: #e2e8f0;
  --m-accent: #0284c7;
  --m-accent-soft: rgba(2, 132, 199, 0.1);
  --m-accent-glow: rgba(2, 132, 199, 0.2);
  --m-warm: #b45309;
  --m-green: #047857;
  --m-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  --m-tooltip-bg: #ffffff;
  --m-tooltip-border: #cbd5e1;
  --m-tooltip-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}

.mock-content { color: var(--m-ink); font-family: 'Plus Jakarta Sans', Inter, sans-serif; }

/* Operations Desk Header */
.compact-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.compact-heading h3 {
    font-size: 22px;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--m-ink-heading);
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}
.compact-heading p {
    margin: 4px 0 0;
    color: var(--m-muted);
    font-size: 13px;
    font-weight: 400;
}
.session-chip {
    border: 1px solid var(--m-line);
    border-radius: 10px;
    padding: 7px 14px;
    color: var(--m-muted);
    font-size: 11px;
    white-space: nowrap;
    background: var(--m-panel-2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--m-shadow);
}

/* Primary Metric KPI Cards */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.queue-card {
    padding: 18px 20px;
    border: 1px solid var(--m-line);
    border-radius: 14px;
    background: var(--m-panel);
    box-shadow: var(--m-shadow);
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}
.queue-card:hover {
    transform: translateY(-4px);
    border-color: var(--m-accent);
    box-shadow: 0 14px 28px -6px var(--m-accent-glow);
}
.queue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--m-accent), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}
.queue-card:hover::before {
    opacity: 1;
}
.queue-card .queue-label {
    color: var(--m-muted);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.queue-card .queue-number {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 10px 0 6px;
    color: var(--m-ink-heading);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.1;
}
.queue-card .queue-foot {
    color: var(--m-accent);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Section Separator Line */
.section-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 26px 0 14px;
    border-bottom: 1px solid var(--m-line);
    padding-bottom: 8px;
}
.section-line h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--m-ink-heading);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-line span {
    color: var(--m-muted);
    font-size: 11px;
    font-weight: 500;
}

/* Quick Tools Grid */
.feature-launch {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.tool-card {
    cursor: pointer;
    border: 1px solid var(--m-line);
    border-radius: 14px;
    padding: 18px 16px;
    background: var(--m-panel);
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--m-shadow);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
}
.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--m-accent);
    box-shadow: 0 14px 28px -6px var(--m-accent-glow);
}
.tool-card .launch-symbol {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--m-accent);
    background: var(--m-panel-2);
    border: 1px solid var(--m-line);
    margin-bottom: 12px;
    font-size: 17px;
    position: relative;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.tool-card:hover .launch-symbol {
    background: var(--m-accent);
    color: #070d18;
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 0 18px var(--m-accent-glow);
}
body.light-theme .tool-card:hover .launch-symbol {
    color: #ffffff;
}
.tool-card strong {
    display: block;
    font-size: 13px;
    color: var(--m-ink-heading);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.tool-card small {
    color: var(--m-muted);
    font-size: 11px;
    line-height: 1.45;
    display: block;
}

/* Informative Hover Tooltip on Quick Tools */
.tool-card .launch-symbol .launch-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--m-tooltip-bg);
    border: 1px solid var(--m-tooltip-border);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--m-ink);
    font-size: 11px;
    line-height: 1.45;
    white-space: normal;
    width: 230px;
    box-shadow: var(--m-tooltip-shadow);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 1000;
    text-align: left;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.tool-card .launch-symbol .launch-tooltip strong {
    display: block;
    color: var(--m-accent);
    font-size: 12px;
    margin-bottom: 4px;
    font-family: 'Poppins', sans-serif;
}
.tool-card .launch-symbol .launch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--m-tooltip-border) transparent transparent transparent;
}
.tool-card .launch-symbol:hover .launch-tooltip,
.tool-card:hover .launch-symbol .launch-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Dual / Triple Charts Grid */
.mock-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.mock-panel {
    border: 1px solid var(--m-line);
    border-radius: 14px;
    background: var(--m-panel);
    padding: 18px 20px;
    box-shadow: var(--m-shadow);
    display: flex;
    flex-direction: column;
    position: relative;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--m-line);
    padding-bottom: 10px;
}
.panel-head strong {
    font-size: 13px;
    color: var(--m-ink-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}
.panel-head span {
    font-size: 11px;
    color: var(--m-muted);
}



/* Scrollbar styles for the new horizontal navigation */
.custom-scrollbar::-webkit-scrollbar { height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.6); }

/* Ensure active menu items in new navigation look clear */
.nav-scroll .menu-item.active { background: rgba(168, 85, 247, 0.15) !important; color: #fff !important; font-weight: bold; border-radius: 8px; border: 1px solid rgba(168, 85, 247, 0.3); }
.nav-scroll .menu-item:hover { background: rgba(148, 163, 184, 0.1); border-radius: 8px; }

/* ==========================================================================
   INTEGRATED MODERN UI & SIDEBAR STYLES (from modern-ui.css)
   ========================================================================== */
:root {
  --sidebar-width: 280px;
  --topbar-height: 64px;
  --theme-bg: #050b14;
  --theme-panel: #0a1120;
  --theme-border: rgba(0, 240, 255, 0.15);
  --theme-text: #e2e8f0;
  --theme-accent: #00f0ff;
  --theme-accent-glow: rgba(0, 240, 255, 0.3);
}

body.light-theme {
  --theme-bg: #f8fafc;
  --theme-panel: #ffffff;
  --theme-border: #cbd5e1;
  --theme-text: #1e293b;
  --theme-accent: #0284c7;
  --theme-accent-glow: rgba(2, 132, 199, 0.25);
  --m-bg: #f8fafc !important;
  --m-panel: #ffffff !important;
  --m-ink: #1e293b !important;
  --m-muted: #64748b !important;
  --m-line: #e2e8f0 !important;
}

/* Core Layout */
.mock-main {
    flex-direction: column !important;
    background: var(--theme-bg) !important;
    height: 100vh !important;
    overflow: hidden !important;
}

/* Topbar */
.mock-topbar {
    flex-direction: row !important;
    width: 100% !important;
    height: var(--topbar-height) !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: var(--theme-panel) !important;
    border-bottom: 1px solid var(--theme-border) !important;
    padding: 10px 20px !important;
    z-index: 40 !important;
    position: relative !important;
}

/* Hamburger Toggle Button */
.hamb {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(0, 240, 255, 0.08) !important;
    border: 1px solid rgba(0, 240, 255, 0.25) !important;
    color: var(--theme-accent) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    font-size: 16px !important;
}
.hamb:hover {
    background: rgba(0, 240, 255, 0.2) !important;
    box-shadow: 0 0 14px var(--theme-accent-glow) !important;
    transform: scale(1.05) !important;
    color: #ffffff !important;
}
body.light-theme .hamb {
    background: #e0f2fe !important;
    border-color: #bae6fd !important;
    color: #0284c7 !important;
}

/* Horizontal Top Navigation Bar */
.nav-scroll {
    flex-direction: row !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    padding: 0 10px !important;
    gap: 4px !important;
}
.nav-scroll::-webkit-scrollbar { height: 3px; }
.nav-scroll::-webkit-scrollbar-thumb { background: var(--theme-border); border-radius: 3px; }

.nav-scroll .menu-item, .nav-scroll .logout-btn, .nav-scroll .nav-item {
    padding: 6px 12px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--theme-text) !important;
    background: transparent;
    transition: all 0.2s ease !important;
    border: 1px solid transparent;
}
.nav-scroll .menu-item:hover {
    background: rgba(0, 240, 255, 0.08) !important;
    color: #ffffff !important;
}
.nav-scroll .menu-item.active {
    background: rgba(0, 240, 255, 0.15) !important;
    border: 1px solid var(--theme-border) !important;
    color: var(--theme-accent) !important;
    font-weight: 600 !important;
    box-shadow: 0 0 10px var(--theme-accent-glow);
}

/* ==========================================================================
   Full Feature-Rich Side Navigation Menu
   ========================================================================== */
.mock-sidebar {
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    max-width: 90vw !important;
    height: 100% !important;
    background: linear-gradient(180deg, #07101e 0%, #050b14 100%) !important;
    border-right: 1px solid var(--theme-border) !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 50 !important;
    overflow: hidden !important;
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.45) !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease !important;
}

body.light-theme .mock-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.07) !important;
}

/* Desktop Collapse State */
@media (min-width: 1025px) {
    .mock-sidebar.sidebar-collapsed {
        width: 0 !important;
        min-width: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        border-right: none !important;
    }
}

/* Mobile & Tablet Drawer Mode */
@media (max-width: 1024px) {
    .mock-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 290px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        z-index: 99999 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.6) !important;
    }
    .mock-sidebar.sidebar-open {
        transform: translateX(0) !important;
    }
}

/* Backdrop for Mobile Drawer */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9990;
    transition: opacity 0.3s ease;
}
.sidebar-backdrop.active {
    display: block !important;
}

/* Sidebar Internal Layout */
.sidebar-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--theme-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(10, 17, 32, 0.95);
    flex-shrink: 0;
}
body.light-theme .sidebar-header {
    background: #ffffff;
    border-bottom-color: #e2e8f0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(145deg, #00f0ff, #3b82f6);
    display: grid;
    place-items: center;
    color: white;
    font-size: 15px;
    flex-shrink: 0;
}
.sidebar-title-wrap {
    min-width: 0;
    line-height: 1.2;
}
.sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--theme-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.sidebar-subtitle {
    font-size: 10px;
    color: var(--theme-accent);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 13px;
    transition: all 0.2s;
}
.sidebar-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

/* Sidebar Search Box */
.sidebar-search-box {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}
.sidebar-search-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    padding: 7px 12px;
    color: #e2e8f0;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
}
.sidebar-search-input:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 10px var(--theme-accent-glow);
    background: rgba(15, 23, 42, 0.95);
}
body.light-theme .sidebar-search-input {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* Scrollable Menu Items */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
}
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.2); border-radius: 4px; }

.sidebar-group-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-accent);
    padding: 12px 10px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}
body.light-theme .sidebar-group-title {
    color: #0284c7;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    user-select: none;
    border-left: 3px solid transparent;
}
.sidebar-nav-item:hover {
    background: rgba(0, 240, 255, 0.08);
    color: #ffffff;
    transform: translateX(3px);
}
.sidebar-nav-item.active {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.16) 0%, rgba(0, 240, 255, 0.03) 100%);
    border-left-color: var(--theme-accent);
    color: var(--theme-accent);
    font-weight: 600;
    box-shadow: 0 0 14px var(--theme-accent-glow);
}
body.light-theme .sidebar-nav-item {
    color: #475569;
}
body.light-theme .sidebar-nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}
body.light-theme .sidebar-nav-item.active {
    background: #e0f2fe;
    border-left-color: #0284c7;
    color: #0284c7;
}

.sidebar-nav-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    color: var(--theme-accent);
    flex-shrink: 0;
}
body.light-theme .sidebar-nav-icon {
    color: #0284c7;
}

.sidebar-nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    background: #ef4444;
    color: #ffffff;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--theme-border);
    background: rgba(6, 11, 20, 0.95);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
body.light-theme .sidebar-footer {
    background: #ffffff;
    border-top-color: #e2e8f0;
}

.sidebar-footer .device-toggle {
    font-size: 11px;
    color: var(--m-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}
.sidebar-footer .logout-btn {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.sidebar-footer .logout-btn:hover {
    background: #ef4444;
    color: white;
}

/* Main Content Area */
.main-content {
    background: var(--theme-bg) !important;
}

/* Analytics and Charts Polish */
.analytics-grid .card, #tab-dashboard .card {
    background: var(--theme-panel) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    padding: 18px 20px !important;
}
body.light-theme .analytics-grid .card, body.light-theme #tab-dashboard .card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
}

.stats-grid .stat-card {
    background: var(--theme-panel) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 14px !important;
    transition: all 0.25s ease !important;
}
.stats-grid .stat-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35) !important;
}
body.light-theme .stats-grid .stat-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

/* ==========================================================================
   MOBILE & SMARTPHONE OPTIMIZATION (PORTAL & STUDENT PORTAL)
   ========================================================================== */

/* Student Mobile Floating Bottom Navigation Bar */
.student-mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 9999;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
    padding: 0 8px calc(env(safe-area-inset-bottom, 0px) + 2px) 8px;
}

.student-mobile-bottom-bar .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    transition: all 0.18s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.student-mobile-bottom-bar .bottom-nav-item i {
    font-size: 18px;
    color: #64748b;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease;
}

.student-mobile-bottom-bar .bottom-nav-item.active {
    color: #1e3a8a;
    font-weight: 700;
}

.student-mobile-bottom-bar .bottom-nav-item.active i {
    transform: translateY(-2px) scale(1.15);
    color: #2563eb;
}

@media (min-width: 769px) {
    .student-mobile-bottom-bar {
        display: none !important;
    }
}

/* Student ID Banner Mobile Responsive Stacking */
@media (max-width: 640px) {
    #student-id-banner {
        flex-direction: column !important;
        gap: 14px !important;
        text-align: center !important;
        padding: 14px !important;
    }
    #student-id-banner > div:nth-child(2) {
        width: 100% !important;
        padding: 0 !important;
    }
    #student-id-banner .grid {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
    #student-id-banner .grid > div {
        font-size: 11.5px !important;
        padding-bottom: 3px !important;
    }
    #student-id-banner #stu-banner-qr {
        width: 72px !important;
        height: 72px !important;
        margin: 0 auto !important;
    }
}

/* Touch-friendly Responsive Data Tables */
.table-responsive,
.table-wrap,
.data-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .data-table th, .data-table td {
        padding: 8px 10px !important;
        font-size: 11.5px !important;
        white-space: nowrap;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 12px auto !important;
        padding: 14px !important;
        border-radius: 12px !important;
    }

    /* Admit card scroll on phone */
    #stu-admit-live-container,
    #admit-card-preview-content {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 8px !important;
    }
}

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

/* Universal Auto-Adjustment & Anti-Clipping for Phone, Tablet, and Desktop */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 6px !important;
    }
    .modal-content {
        padding: 14px !important;
        max-width: 98vw !important;
        max-height: 94vh !important;
        border-radius: 10px !important;
    }
    .official-admit-card-sheet {
        padding: 10px !important;
        max-width: 100% !important;
    }
    .student-back-btn span {
        display: inline-block !important;
    }
    /* Ensure action buttons wrap cleanly instead of being cut off */
    .module-toolbar, .table-actions, .filter-bar, .modal-header-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
}

/* ============================================================================ */
/* STUDENT PROFILE APPROVALS DESK - MODERN CRISP THEME OVERRIDES                */
/* ============================================================================ */
#tab-profile-approvals .card {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05) !important;
}

#tab-profile-approvals .data-table {
    background: #ffffff !important;
    color: #1e293b !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

#tab-profile-approvals .data-table th {
    background: #f8fafc !important;
    color: #334155 !important;
    font-weight: 700 !important;
    font-size: 11.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 14px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none !important;
}

#tab-profile-approvals .data-table td {
    background: #ffffff !important;
    color: #1e293b !important;
    padding: 14px 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

#tab-profile-approvals .data-table tr:hover td {
    background: #fbfcfe !important;
}

#tab-profile-approvals .stat-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

#tab-profile-approvals .stat-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   HIGH-PERFORMANCE SMOOTH SCROLLING & HARDWARE-ACCELERATED TABLE ENGINE
   ========================================================================== */
#student-table, #admit-student-table, #staff-table {
    contain: paint;
}

#student-table tr, #admit-student-table tr, #staff-table tr {
    content-visibility: auto;
    contain-intrinsic-size: 1px 54px;
}

#student-table img, #admit-student-table img {
    will-change: transform;
}

div[style*="overflow-x:auto"], .table-responsive, .table-wrap {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

/* ==========================================================================
   MOBILE APP DOCK & COMPACT DASHBOARD ENGINE (APK & TOUCH OPTIMIZATION)
   ========================================================================== */

/* 1. Desktop suppression - Never show bottom dock on desktop/laptop */
@media (min-width: 769px) {
    .portal-mobile-bottom-bar {
        display: none !important;
    }
}

/* 2. Mobile / APK View (< 769px) */
@media (max-width: 768px) {
    /* Hide overflowing desktop top menu links on mobile to save header space */
    .top-navigation .mock-topbar .nav-scroll {
        display: none !important;
    }

    /* Compact Top Header */
    .mock-topbar {
        padding: 8px 12px !important;
        min-height: 54px !important;
    }

    .mock-logo-text {
        font-size: 14px !important;
    }

    .school-logo {
        width: 28px !important;
        height: 28px !important;
    }

    /* Content bottom padding to prevent bottom dock overlap */
    #dashboard-wrapper .main-scroll-area,
    #staff-dashboard-wrapper .main-scroll-area,
    #staff-dashboard-wrapper .flex-1,
    .main-scroll-area {
        padding-bottom: 84px !important;
    }

    /* 2-Column Compact KPI Grid (Matching Native App Mockup) */
    .stat-strip {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 14px !important;
    }

    .queue-card {
        padding: 10px 12px !important;
        min-height: 82px !important;
        border-radius: 12px !important;
    }

    .queue-card .queue-label {
        font-size: 10px !important;
        letter-spacing: 0.02em !important;
    }

    .queue-card .queue-number {
        font-size: 20px !important;
        margin: 5px 0 3px !important;
    }

    .queue-card .queue-foot {
        font-size: 9px !important;
    }

    /* 2-Column Compact Quick Tools Grid */
    .feature-launch {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .tool-card {
        padding: 10px 8px !important;
        border-radius: 12px !important;
        min-height: 72px !important;
    }

    .tool-card .launch-symbol {
        width: 34px !important;
        height: 34px !important;
        font-size: 14px !important;
        margin-bottom: 6px !important;
        border-radius: 9px !important;
    }

    .tool-card strong {
        font-size: 11px !important;
        margin-bottom: 0 !important;
    }

    .tool-card small {
        display: none !important;
    }

    /* Staff Mobile Layout */
    #staff-dashboard-wrapper .staff-grid-2col {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    #staff-dashboard-wrapper .staff-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* High-Performance Mobile Bottom Navigation Dock */
    .portal-mobile-bottom-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 62px !important;
        background: rgba(11, 18, 32, 0.96) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-around !important;
        z-index: 9999 !important;
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5) !important;
        padding: 0 4px !important;
    }

    body.light-theme .portal-mobile-bottom-bar {
        background: rgba(255, 255, 255, 0.96) !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
    }

    .portal-bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: none;
        border: none;
        color: #94a3b8;
        font-size: 9.5px;
        font-weight: 600;
        cursor: pointer;
        padding: 4px 0;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        outline: none;
        -webkit-tap-highlight-color: transparent;
        position: relative;
    }

    .portal-bottom-nav-item i {
        font-size: 16px;
        color: #94a3b8;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease;
    }

    .portal-bottom-nav-item.active {
        color: #00f0ff;
        font-weight: 700;
    }

    .portal-bottom-nav-item.active i {
        transform: translateY(-2px) scale(1.15);
        color: #00f0ff;
        filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
    }

    /* Floating Center "All Modules / Menu" Button */
    .portal-bottom-nav-item.center-dock-btn {
        margin-top: -14px;
    }

    .dock-icon-circle {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: linear-gradient(135deg, #00f0ff, #3b82f6);
        display: grid;
        place-items: center;
        color: #0b1220;
        font-size: 16px;
        box-shadow: 0 0 16px rgba(0, 240, 255, 0.5), 0 4px 10px rgba(0, 0, 0, 0.3);
        border: 2px solid rgba(255, 255, 255, 0.3);
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .dock-icon-circle.staff-dock {
        background: linear-gradient(135deg, #d946ef, #9333ea);
        box-shadow: 0 0 16px rgba(217, 70, 239, 0.5), 0 4px 10px rgba(0, 0, 0, 0.3);
        color: #ffffff;
    }

    .portal-bottom-nav-item.center-dock-btn:active .dock-icon-circle {
        transform: scale(0.92);
    }

    .portal-bottom-nav-item.center-dock-btn span {
        margin-top: 2px;
        font-size: 9px;
    }
}




