/**
 * Cyber Mission Control 2.0 Theme
 * Custom High-End Tactical Dark CSS for Hacker Competition Platform
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #05070f;
    --bg-layer-0: #05070f;
    --bg-layer-1: #0b101e;
    --bg-layer-2: #11182c;
    --bg-layer-3: #162039;
    --bg-card: rgba(14, 20, 36, 0.85);
    --bg-card-hover: rgba(20, 30, 54, 0.95);
    --bg-surface: #0f172a;
    --ambient-top-light: rgba(255, 255, 255, 0.09);
    --border-glow: rgba(0, 242, 254, 0.2);
    --border-active: #00f2fe;
    --cyan-neon: #00f2fe;
    --cyan-glow: rgba(0, 242, 254, 0.35);
    --violet-neon: #7928ca;
    --violet-glow: rgba(121, 40, 202, 0.35);
    --emerald-tactical: #10b981;
    --amber-warning: #f59e0b;
    --crimson-alert: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* WCAG 2.2 AAA Tactical Focus-Visible Rings */
:focus-visible {
    outline: 2px solid var(--cyan-neon) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 15px var(--cyan-glow) !important;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(121, 40, 202, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, #05070f 0%, #090e1a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    letter-spacing: -0.01em;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #070a12;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-neon);
}

/* Typography & Monospace */
.font-mono {
    font-family: var(--font-mono) !important;
}

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

.bg-cyan-neon {
    background-color: var(--cyan-neon) !important;
    color: #030a10 !important;
}

/* Tactical Topbar */
.cyber-navbar {
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glow);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.navbar-brand {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.brand-glow {
    color: var(--cyan-neon);
    text-shadow: 0 0 10px var(--cyan-glow);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
}
.nav-link:hover, .nav-link.active {
    color: var(--cyan-neon) !important;
    background: rgba(0, 242, 254, 0.08);
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR NAVIGATION SYSTEM
   ═══════════════════════════════════════════════════════ */

:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 68px;
    --sidebar-bg: rgba(7, 10, 18, 0.96);
    --sidebar-border: rgba(0, 242, 254, 0.12);
    --topbar-height: 52px;
}

/* Sidebar Layout Wrapper */
.sidebar-layout {
    overflow-x: hidden;
}

/* Sidebar Container */
.cyber-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

/* Sidebar Brand Section */
.sidebar-brand {
    padding: 1rem 0.85rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
}
.sidebar-brand a {
    overflow: hidden;
    white-space: nowrap;
}
.sidebar-brand-icon {
    font-size: 1.35rem;
    color: var(--amber-warning);
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
    flex-shrink: 0;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-brand-text {
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.2s ease;
}

/* Sidebar Navigation (Professional Tactical Scroll) */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.6rem 0 1rem 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 242, 254, 0.25) transparent;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

/* WebKit (Chrome, Edge, Safari, Opera) */
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
    margin: 6px 0;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-nav:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.35);
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-neon);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.7);
}
.sidebar-nav::-webkit-scrollbar-thumb:active {
    background: #38bdf8;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.85);
}

.sidebar-section-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    padding: 1rem 1rem 0.35rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    margin: 1px 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}
.sidebar-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}
.sidebar-link:hover {
    background: rgba(0, 242, 254, 0.08);
    color: var(--text-primary);
}
.sidebar-link:hover i {
    color: var(--cyan-neon);
}
.sidebar-link.active {
    background: rgba(0, 242, 254, 0.12);
    color: var(--cyan-neon);
    border-left: 3px solid var(--cyan-neon);
    box-shadow: inset 0 0 20px rgba(0, 242, 254, 0.05);
}
.sidebar-link.active i {
    color: var(--cyan-neon);
    text-shadow: 0 0 8px var(--cyan-glow);
}
.sidebar-link-text {
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease;
}

/* Sidebar Logout Link */
.sidebar-logout {
    color: var(--crimson-alert) !important;
}

/* =========================================================================
   DATATABLES OVERRIDES
   ========================================================================= */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: var(--cyber-bg-darker);
    border: 1px solid var(--cyber-cyan-dark);
    color: var(--cyber-text);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-mono);
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.dataTables_wrapper .dataTables_info {
    color: var(--cyber-text-muted) !important;
    font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: transparent !important;
    border: 1px solid var(--cyber-cyan-dark) !important;
    color: var(--cyber-text) !important;
    border-radius: 4px;
    margin-left: 0.25rem;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(0, 255, 255, 0.1) !important;
    color: var(--cyber-cyan) !important;
    border-color: var(--cyber-cyan) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: rgba(0, 255, 255, 0.2) !important;
    color: var(--cyber-cyan-neon) !important;
    border-color: var(--cyber-cyan-neon) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    pointer-events: none;
}.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}
.sidebar-logout i {
    color: var(--crimson-alert);
}

/* Sidebar Footer (User Card) */
.sidebar-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--sidebar-border);
    padding: 0.5rem;
}
.sidebar-user-card {
    padding: 0.5rem 0.5rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    margin-bottom: 0.35rem;
    overflow: hidden;
}
.sidebar-user-avatar {
    font-size: 1.3rem;
    color: var(--cyan-neon);
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.sidebar-user-info {
    overflow: hidden;
    transition: opacity 0.2s ease;
}

/* Sidebar Overlay (mobile backdrop) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1045;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Content Wrapper (shifts with sidebar) */
.sidebar-content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Compact Topbar */
.compact-topbar {
    height: var(--topbar-height);
    background: rgba(7, 10, 18, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--sidebar-border);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1035;
}
.topbar-hamburger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--cyan-neon);
    cursor: pointer;
    flex-shrink: 0;
}
.topbar-hamburger:hover {
    background: rgba(0, 242, 254, 0.15);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.35);
}
.topbar-page-title {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

/* Sidebar Pin / Mini-Toggle Button */
.sidebar-pin-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 0.35rem;
}
.sidebar-pin-btn:hover {
    color: var(--cyan-neon);
    background: rgba(0, 242, 254, 0.1);
    border-color: rgba(0, 242, 254, 0.25);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Professional Vignette Scroll Fade Masks */
.sidebar-scroll-mask-top,
.sidebar-scroll-mask-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 32px;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sidebar-scroll-mask-top {
    top: 60px;
    background: linear-gradient(180deg, rgba(7, 10, 18, 0.98) 0%, rgba(7, 10, 18, 0) 100%);
}
.sidebar-scroll-mask-bottom {
    bottom: 135px;
    background: linear-gradient(0deg, rgba(7, 10, 18, 0.98) 0%, rgba(7, 10, 18, 0) 100%);
}
.sidebar-scroll-mask-top.active,
.sidebar-scroll-mask-bottom.active {
    opacity: 1;
}

/* Cyber Floating Tooltip (mini-sidebar mode) */
.cyber-sidebar-tooltip {
    position: fixed;
    z-index: 1099;
    background: rgba(11, 16, 30, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--cyan-neon);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 254, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 242, 254, 0.2);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    white-space: nowrap;
}
.cyber-sidebar-tooltip.show {
    opacity: 1;
    transform: translateX(0);
}

/* ═══════════════════════════════════════════════════════
   COLLAPSED SIDEBAR RULES (Desktop & Tablet)
   ═══════════════════════════════════════════════════════ */
body.sidebar-collapsed .cyber-sidebar {
    width: var(--sidebar-collapsed-width);
}
body.sidebar-collapsed .sidebar-content-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}
body.sidebar-collapsed .sidebar-brand {
    padding: 0.85rem 0.5rem;
    justify-content: center;
}
body.sidebar-collapsed .sidebar-brand a {
    justify-content: center;
}
body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .sidebar-link-text,
body.sidebar-collapsed .sidebar-user-info,
body.sidebar-collapsed .sidebar-pin-btn {
    opacity: 0;
    width: 0;
    max-width: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
    display: none !important;
}
body.sidebar-collapsed .sidebar-section-label {
    opacity: 0.35;
    font-size: 0;
    height: 1px;
    padding: 0;
    margin: 0.75rem 0.75rem;
    background: rgba(0, 242, 254, 0.2);
    overflow: hidden;
}
body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.65rem 0;
    margin: 2px 0.4rem;
    gap: 0;
}
body.sidebar-collapsed .sidebar-link i {
    font-size: 1.15rem;
    width: auto;
    margin: 0;
}
body.sidebar-collapsed .sidebar-user-card {
    padding: 0.5rem 0.25rem;
    justify-content: center;
}
body.sidebar-collapsed .sidebar-user-card > .d-flex {
    justify-content: center;
}
body.sidebar-collapsed .sidebar-scroll-mask-top,
body.sidebar-collapsed .sidebar-scroll-mask-bottom {
    width: var(--sidebar-collapsed-width);
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE DRAWER (< 768px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .cyber-sidebar {
        transform: translateX(-100%);
        width: 260px !important;
        box-shadow: none;
    }
    .cyber-sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.75);
    }
    .sidebar-content-wrapper {
        margin-left: 0 !important;
    }
    /* Mobile drawer always shows full text when open */
    .cyber-sidebar.sidebar-open .sidebar-brand-text,
    .cyber-sidebar.sidebar-open .sidebar-link-text,
    .cyber-sidebar.sidebar-open .sidebar-user-info,
    .cyber-sidebar.sidebar-open .sidebar-section-label {
        opacity: 1 !important;
        width: auto !important;
        max-width: none !important;
        pointer-events: auto !important;
        height: auto !important;
        font-size: unset !important;
        display: block !important;
    }
    .cyber-sidebar.sidebar-open .sidebar-link {
        justify-content: flex-start !important;
        padding: 0.55rem 1rem !important;
        gap: 0.65rem !important;
    }
    .cyber-sidebar.sidebar-open .sidebar-link i {
        width: 20px !important;
    }
    .cyber-sidebar.sidebar-open .sidebar-pin-btn {
        display: none !important;
    }
}

/* Glassmorphism Cards with 4-Tier Elevation & Ambient Top Highlight */
.cyber-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow);
    border-top: 1px solid var(--ambient-top-light);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}
.cyber-card:hover {
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.1);
}

/* Active Question Highlighting in Exam Arena */
.cyber-card.active-question {
    border-color: var(--cyan-neon) !important;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.cyber-card-header {
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--border-glow);
    padding: 1rem 1.25rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-weight: 600;
}

/* Cyber Buttons */
.btn-cyber-primary {
    background: linear-gradient(135deg, #00f2fe 0%, #00b4d8 100%);
    color: #070a12;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
    transition: all 0.2s ease;
}
.btn-cyber-primary:hover {
    background: linear-gradient(135deg, #38f9d7 0%, #00f2fe 100%);
    color: #070a12;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}

.btn-cyber-secondary {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    transition: all 0.2s ease;
}
.btn-cyber-secondary:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--cyan-neon);
    color: var(--cyan-neon);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.btn-cyber-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: all 0.2s ease;
}
.btn-cyber-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-cyber-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}
.btn-cyber-success:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Badges & Chips */
.badge-cyber {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* HUD Exam Arena Header (Fixed di paling atas layar) */
.hud-header {
    background: rgba(10, 15, 28, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glow);
    padding: 0.75rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1040;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
}

/* Offset pembungkus arena agar seluruh konten tidak tertutup oleh header fixed */
.exam-arena-wrapper {
    padding-top: 86px;
    overflow-anchor: none;
}

.question-card {
    scroll-margin-top: 96px;
    scroll-margin-bottom: 24px;
    overflow-anchor: none;
}

.mcq-option-label {
    scroll-margin-top: 96px;
    scroll-margin-bottom: 24px;
}

.hud-timer-box {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--cyan-neon);
    border-radius: 8px;
    padding: 0.4rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

/* Tabular Numbers: Stabilisasi Piksel Mencegah Micro-Jittering */
.hud-timer-digits {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cyan-neon);
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.hud-timer-digits.warning {
    color: var(--amber-warning);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.hud-timer-digits.danger {
    color: var(--crimson-alert);
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
    animation: pulseDanger 1s infinite alternate;
}

@keyframes pulseDanger {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.04); opacity: 0.8; }
}

/* Heartbeat Indicator */
.hud-pulse {
    width: 10px;
    height: 10px;
    background: var(--emerald-tactical);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--emerald-tactical);
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* Autosave Status */
.autosave-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.autosave-status.saving {
    color: var(--amber-warning);
}
.autosave-status.saved {
    color: var(--emerald-tactical);
}
.autosave-status.error {
    color: var(--crimson-alert);
}

/* High-Density Scalable Question Palette (Didesain untuk 100+ Soal per Babak) */
.palette-scroll-container {
    max-height: 290px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--cyan-neon) rgba(15, 23, 42, 0.6);
}
.palette-scroll-container::-webkit-scrollbar {
    width: 6px;
}
.palette-scroll-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
}
.palette-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-glow);
    border-radius: 4px;
}
.palette-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-neon);
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.35rem;
}
@media (max-width: 1400px) {
    .palette-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}
@media (max-width: 991px) {
    .palette-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}
@media (max-width: 576px) {
    .palette-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.palette-btn {
    aspect-ratio: 1;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    min-height: 28px;
    user-select: none;
}
.palette-btn:hover {
    border-color: var(--cyan-neon);
    color: var(--cyan-neon);
    background: rgba(0, 242, 254, 0.12);
    transform: translateY(-1px);
}
.palette-btn.current {
    border-color: var(--cyan-neon) !important;
    box-shadow: 0 0 10px var(--cyan-glow);
    color: #050b14 !important;
    background: var(--cyan-neon) !important;
    font-weight: 700;
}
.palette-btn.answered {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--emerald-tactical);
    color: #34d399;
}
.palette-btn.flagged {
    background: rgba(245, 158, 11, 0.25);
    border-color: var(--amber-warning);
    color: #fbbf24;
}
.palette-btn.answered.flagged {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 50%, rgba(245, 158, 11, 0.4) 50%);
    border-color: var(--amber-warning);
    color: #fbbf24;
}
.palette-btn.dimmed {
    opacity: 0.2;
    pointer-events: none;
}
.palette-btn.locked {
    cursor: not-allowed !important;
    pointer-events: none !important;
}
.palette-btn.answered.locked {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    color: #34d399 !important;
    opacity: 0.85;
}
.palette-btn.unanswered-locked.locked {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
    opacity: 0.8;
}
.palette-btn.upcoming-locked {
    background: rgba(15, 23, 42, 0.3) !important;
    border-color: rgba(148, 163, 184, 0.1) !important;
    color: rgba(148, 163, 184, 0.3) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Palette Filter Pills */
.palette-filter-group {
    display: flex;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.7);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}
.palette-filter-btn {
    flex: 1;
    padding: 0.25rem 0.4rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    background: transparent;
    border: none;
    text-align: center;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}
.palette-filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.palette-filter-btn.active {
    background: rgba(0, 242, 254, 0.2);
    color: var(--cyan-neon);
    font-weight: 700;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.25);
}

/* Exam Live Progress Bar */
.cyber-progress {
    height: 6px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
}
.cyber-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
    transition: width 0.3s ease;
}

/* Single Question Focus Mode (Exam Engine) */
.question-card {
    display: none;
}
.question-card.active-card {
    display: block;
    animation: cyberCardFadeIn 0.15s ease-out;
}
@keyframes cyberCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Question Markdown Presentation in Exam Arena */
.question-markdown-body {
    color: #e2e8f0;
    line-height: 1.8;
    font-size: 1rem;
    word-break: break-word;
}
.question-markdown-body p {
    margin-bottom: 1.15rem;
    color: #e2e8f0;
    line-height: 1.8;
}
.question-markdown-body p:last-child {
    margin-bottom: 0;
}
.question-markdown-body strong {
    color: #ffffff;
    font-weight: 600;
}
.question-markdown-body em {
    color: #94a3b8;
}
.question-markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 254, 0.3);
    margin: 1rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.question-markdown-body blockquote {
    background: rgba(15, 23, 42, 0.6);
    border-left: 3px solid var(--cyan-neon);
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin: 1.25rem 0;
    color: #cbd5e1;
}

/* MCQ Options Radio Buttons */
.mcq-option-label {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.6rem;
    user-select: none;
}
.mcq-option-label:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(0, 242, 254, 0.45);
    transform: translateX(2px);
}
.mcq-option-label.selected {
    background: rgba(0, 242, 254, 0.12);
    border-color: var(--cyan-neon);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.mcq-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    font-family: var(--font-mono);
    transition: all 0.2s ease;
}
.mcq-option-label:hover .mcq-option-letter {
    border-color: rgba(0, 242, 254, 0.5);
    color: var(--cyan-neon);
    background: rgba(0, 242, 254, 0.08);
}
.mcq-option-label.selected .mcq-option-letter {
    background: var(--cyan-neon);
    color: #030712;
    border-color: var(--cyan-neon);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}
.mcq-option-text {
    line-height: 1.55;
    font-size: 0.95rem;
    flex-grow: 1;
}

.mcq-option-radio {
    accent-color: var(--cyan-neon);
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
}

/* Tactical Textarea for Essay */
.cyber-textarea {
    background: rgba(10, 15, 30, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    padding: 0.85rem;
    transition: all 0.2s ease;
}
.cyber-textarea:focus {
    background: rgba(14, 20, 40, 0.95);
    border-color: var(--cyan-neon);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
    color: #fff;
    outline: none;
}

/* Attachment Card */
.attachment-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(10, 18, 35, 0.95) 100%);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 10px;
    padding: 0.9rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.attachment-card:hover {
    border-color: var(--cyan-neon);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

/* Saved Flag Card (Result & Audit View) */
.saved-flag-card {
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.saved-flag-card code {
    display: inline-block;
    width: 100%;
    font-size: 1.05rem !important;
}

/* Target Instance Box */
.target-instance-box {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

/* Split Screen for Grading Arena */
.rubric-pane {
    background: rgba(15, 23, 42, 0.8);
    border-right: 1px solid var(--border-glow);
    padding: 1.25rem;
    height: calc(100vh - 120px);
    overflow-y: auto;
}

.grading-pane {
    background: var(--bg-card);
    padding: 1.25rem;
    height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Anti-Cheat Modal Strike Overlay */
.strike-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.strike-modal {
    background: #0f172a;
    border: 2px solid var(--crimson-alert);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

/* Tables in Cyber Style */
.table-cyber {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0 0.35rem;
}
.table-cyber th {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    padding: 0.75rem 1rem;
}
.table-cyber td {
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding: 0.85rem 1rem;
    vertical-align: middle;
}
.table-cyber tr:hover td {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(0, 242, 254, 0.3);
}

/* Exam Result Evaluation Table: Anti-clipping & Sticky Headers */
#examResultTable {
    table-layout: fixed;
    width: 100%;
}
#examResultTable thead th {
    position: sticky;
    top: var(--topbar-height, 56px);
    z-index: 25;
    background: #0b1120 !important;
    border-bottom: 2px solid var(--cyan-neon) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
@media (max-width: 991.98px) {
    #examResultTable {
        min-width: 820px;
    }
}
@media (min-width: 992px) {
    .result-table-container {
        overflow: visible !important;
    }
}
.result-table-container {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}
#examResultTable td {
    overflow-wrap: break-word;
    word-break: break-word;
}
#examResultTable td .code-block-wrapper,
#examResultTable td pre {
    max-width: 100%;
}

/* Role Badges */
.badge-role-admin {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
}
.badge-role-judge {
    background: linear-gradient(135deg, #7928ca 0%, #4c1d95 100%);
    color: #fff;
}
.badge-role-participant {
    background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
    color: #070a12;
    font-weight: 700;
}
.badge-role-sie {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-weight: 700;
}

/* ==========================================================================
   TIER-1 WORLD CLASS SAAS EXTENSIONS: FLOATING TOASTS (ZERO LAYOUT SHIFT)
   Penjelasan & Alasan:
   Floating Toasts bertumpuk melayang di sudut kanan bawah layar dengan z-index tinggi.
   Tidak mendorong elemen halaman (Cumulative Layout Shift = 0) seperti alert bootstrap bawaan.
   ========================================================================== */
.cyber-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2050;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 3rem);
}

.cyber-toast {
    pointer-events: auto;
    background: rgba(11, 16, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid var(--cyan-neon);
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 242, 254, 0.12);
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.cyber-toast.toast-success {
    border-left-color: var(--emerald-tactical);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 185, 129, 0.15);
}
.cyber-toast.toast-error, .cyber-toast.toast-danger {
    border-left-color: var(--crimson-alert);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(239, 68, 68, 0.2);
}
.cyber-toast.toast-warning {
    border-left-color: var(--amber-warning);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.15);
}

.cyber-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
}
.cyber-toast-icon {
    font-size: 1.15rem;
    line-height: 1;
    margin-top: 2px;
}
.cyber-toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    transition: color 0.2s ease;
}
.cyber-toast-close:hover {
    color: #fff;
}

.cyber-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--cyan-neon);
    width: 100%;
    animation: toastProgress 5s linear forwards;
}

@keyframes toastSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* ==========================================================================
   GLOBAL COMMAND PALETTE (CTRL + K / CMD + K)
   Penjelasan & Alasan:
   Memberikan akses navigasi secepat kilat (sub-millisecond flow) ala Raycast & Linear
   tanpa harus berpindah dari keyboard ke mouse.
   ========================================================================== */
.cmd-palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 15, 0.85);
    backdrop-filter: blur(14px);
    z-index: 3000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    animation: fadeIn 0.2s ease;
}

.cmd-palette-card {
    background: #0b101e;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    width: 100%;
    max-width: 640px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 242, 254, 0.18);
    overflow: hidden;
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-palette-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.6);
}

.cmd-palette-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    outline: none;
}
.cmd-palette-input::placeholder {
    color: var(--text-muted);
}

.cmd-palette-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 0.5rem;
}

.cmd-palette-group-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem 0.25rem 0.75rem;
    letter-spacing: 0.08em;
}

.cmd-palette-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.cmd-palette-item:hover, .cmd-palette-item.active {
    background: rgba(0, 242, 254, 0.12);
    color: #fff;
    border: 1px solid rgba(0, 242, 254, 0.25);
}

.cmd-palette-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.cmd-palette-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    background: rgba(8, 12, 22, 0.9);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* KBD Shortcut Badges */
.cyber-kbd {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan-neon);
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { transform: scale(0.95) translateY(-10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* ==========================================================================
   CYBER ARENA SPLIT-SCREEN & GLASSMORPHISM LOGIN STYLING (NO 2FA)
   Penjelasan & Alasan:
   Mengadaptasi tata letak Split-Screen kelas dunia dari gambar referensi:
   - Sisi Kiri: Showcase atmosfer kompetisi Cyber Arena dengan metrik dan pilar pertahanan.
   - Sisi Kanan: Kartu otentikasi melayang dengan efek glassmorphism tinggi, selector peran,
     toggle show/hide password, dan 3 badge keamanan tanpa 2FA (Bcrypt, Anti-Brute Force, Audit Log).
   ========================================================================== */
.text-gradient-neon {
    background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 40%, #c084fc 80%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-split-wrapper {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.login-showcase-panel {
    padding-right: 1.5rem;
}

.feature-pillar-card {
    background: rgba(14, 20, 36, 0.6);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.25s ease;
}
.feature-pillar-card:hover {
    border-color: rgba(0, 242, 254, 0.4);
    background: rgba(20, 30, 54, 0.8);
    transform: translateY(-2px);
}
.feature-pillar-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--cyan-neon);
    flex-shrink: 0;
}

.login-card-floating {
    background: rgba(11, 16, 30, 0.88);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 15px 45px -10px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 242, 254, 0.12);
    position: relative;
    overflow: hidden;
}
.login-card-floating::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--cyan-neon), #c084fc, transparent);
}

.segmented-pill-container {
    background: rgba(7, 10, 18, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    padding: 0.25rem;
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}
.segmented-pill {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.segmented-pill.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.18) 0%, rgba(121, 40, 202, 0.25) 100%);
    color: #fff;
    border: 1px solid rgba(0, 242, 254, 0.4);
    box-shadow: 0 2px 10px rgba(0, 242, 254, 0.2);
}

.cyber-input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.cyber-input-icon {
    position: absolute;
    left: 0.9rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 5;
    transition: color 0.2s ease;
}
.cyber-form-input {
    background: rgba(7, 10, 18, 0.8) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-family: var(--font-sans);
    padding: 0.55rem 2.6rem 0.55rem 2.4rem !important;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    width: 100%;
}
.cyber-form-input:focus {
    background: rgba(10, 15, 28, 0.95) !important;
    border-color: var(--cyan-neon) !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.25) !important;
}
.cyber-form-input:focus + .cyber-input-icon,
.cyber-input-group:focus-within .cyber-input-icon {
    color: var(--cyan-neon);
}

.btn-toggle-pw {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    font-size: 1rem;
    z-index: 5;
    transition: color 0.2s ease;
}
.btn-toggle-pw:hover {
    color: var(--cyan-neon);
}

.btn-cyber-cta {
    background: linear-gradient(135deg, #00f2fe 0%, #0284c7 50%, #7c3aed 100%);
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35), 0 0 15px rgba(0, 242, 254, 0.2);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-cyber-cta:hover {
    background: linear-gradient(135deg, #38f9d7 0%, #00f2fe 50%, #8b5cf6 100%);
    color: #070a12;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 242, 254, 0.45);
}

.trust-badge-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.trust-badge-card {
    background: rgba(7, 10, 18, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 6px;
    padding: 0.4rem 0.25rem;
    text-align: center;
}
.trust-badge-icon {
    font-size: 1rem;
    margin-bottom: 0.15rem;
    display: block;
}
.trust-badge-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1.2;
    display: block;
}

/* ==========================================================================
   METRICS GRID & RESPONSIVE TELEMETRY COMPONENT
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.metrics-divider {
    border-left: 1px solid rgba(148, 163, 184, 0.2);
}

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVE ENGINE (ZERO HORIZONTAL SCROLL)
   ========================================================================== */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Tablet Breakpoint (max-width: 991.98px) */
@media (max-width: 991.98px) {
    .login-showcase-panel {
        padding-right: 0;
        margin-bottom: 2rem;
        text-align: left;
    }
    .login-card-floating {
        padding: 2rem 1.5rem;
        margin: 0 auto;
        max-width: 520px;
    }
}

/* Mobile Devices (max-width: 767.98px) */
@media (max-width: 767.98px) {
    /* Navbar */
    .cyber-navbar {
        padding: 0.45rem 0.75rem;
    }
    .navbar-brand {
        font-size: 0.88rem;
        gap: 0.35rem;
    }
    .navbar-brand .brand-glow {
        font-size: 0.9rem;
    }

    /* Login Page */
    .login-split-wrapper {
        padding: 1rem 0;
    }
    .login-card-floating {
        padding: 1.5rem 1rem !important;
        border-radius: 14px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    }
    .feature-pillar-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    .feature-pillar-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    /* Segmented Role Selector */
    .segmented-pill-container {
        padding: 0.25rem;
        gap: 0.25rem;
    }
    .segmented-pill {
        padding: 0.5rem 0.35rem;
        font-size: 0.76rem;
    }

    /* Exam HUD Header */
    .hud-header {
        padding: 0.4rem 0.6rem !important;
        min-height: 52px;
    }
    .exam-arena-wrapper {
        padding-top: 68px !important;
    }
    .hud-timer-box {
        padding: 0.25rem 0.6rem !important;
        border-radius: 8px;
    }
    .hud-timer-digits {
        font-size: 1.05rem !important;
    }

    /* Question Cards & Form Controls */
    .question-card {
        padding: 1rem !important;
        border-radius: 12px;
    }
    .mcq-option-label {
        padding: 0.75rem 0.85rem;
        font-size: 0.88rem;
        min-height: 48px;
        align-items: center;
    }
    .mcq-option-radio {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
    .essay-input {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    /* Palette Grid */
    .palette-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.35rem;
    }
    .palette-btn {
        min-height: 38px;
        font-size: 0.82rem;
    }

    /* Buttons Touch Target Ergonomics */
    .btn-prev-question, .btn-next-question {
        min-height: 42px;
        padding: 0.5rem 0.85rem;
        font-size: 0.82rem;
    }

    /* Dashboard & Admin Elements */
    .dashboard-index .cyber-card {
        padding: 1.25rem !important;
    }
    .dashboard-index h2 {
        font-size: 1.25rem;
    }
}

/* Extra Small Phones (max-width: 575.98px) */
@media (max-width: 575.98px) {
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Metrics Grid Stacking */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .metrics-divider {
        border-left: none !important;
        border-top: 1px solid rgba(148, 163, 184, 0.15);
        padding-top: 0.65rem;
        padding-left: 0 !important;
    }

    /* Trust Badge Row */
    .trust-badge-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
    }
    .trust-badge-card {
        padding: 0.4rem 0.25rem;
    }
    .trust-badge-label {
        font-size: 0.62rem;
    }

    /* Segmented Pill Ultra-Compact */
    .segmented-pill {
        font-size: 0.72rem;
        padding: 0.45rem 0.2rem;
    }

    /* Compact Navbar */
    .cyber-navbar {
        padding: 0.35rem 0.5rem;
    }

    /* Sticky HUD Header */
    .hud-header {
        padding: 0.35rem 0.4rem !important;
    }

    /* Tables Mobile Ergonomics */
    .table-responsive {
        border-radius: 8px;
        margin-bottom: 1rem;
    }
    .table {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   EXAM RESULT PREMIUM STYLING (HIGH PERFORMANCE & RESPONSIVE)
   ========================================================================== */
.exam-result-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.result-hero-card {
    background: radial-gradient(circle at 50% 0%, rgba(0, 242, 254, 0.08) 0%, rgba(13, 17, 28, 0.95) 75%), #090d16;
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.result-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00f2fe, #38ef7d, #00f2fe);
}

.result-kpi-card {
    background: rgba(10, 14, 23, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.result-kpi-card.kpi-success {
    border-color: rgba(34, 197, 94, 0.35);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.06) 0%, rgba(10, 14, 23, 0.85) 100%);
}

.result-kpi-card.kpi-danger {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.06) 0%, rgba(10, 14, 23, 0.85) 100%);
}

.result-kpi-card.kpi-warning {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, rgba(10, 14, 23, 0.85) 100%);
}

.result-kpi-card.kpi-total {
    border-color: rgba(0, 242, 254, 0.45);
    background: linear-gradient(180deg, rgba(0, 242, 254, 0.08) 0%, rgba(10, 14, 23, 0.9) 100%);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.result-q-item {
    background: rgba(13, 17, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s ease;
}

.result-q-item:hover {
    border-color: rgba(0, 242, 254, 0.25);
}

.chosen-option-box {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0.01em;
    color: #ffffff !important;
}

.chosen-option-box .user-select-text {
    color: #ffffff !important;
}

.chosen-option-box.correct {
    background: #022c22 !important;
    border: 1.5px solid #22c55e !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.chosen-option-box.wrong {
    background: #450a0a !important;
    border: 1.5px solid #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.chosen-option-box.unanswered {
    background: #451a03 !important;
    border: 1.5px solid #f59e0b !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

/* High-Contrast Scoring Legend Badges */
.badge-rule-scoring {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    border-radius: 8px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-rule-benar {
    background: #022c22 !important;
    color: #4ade80 !important;
    border: 1.5px solid #22c55e !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.badge-rule-salah {
    background: #450a0a !important;
    color: #fca5a5 !important;
    border: 1.5px solid #ef4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.badge-rule-kosong {
    background: #451a03 !important;
    color: #fde047 !important;
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Hero Status Banner */
.hero-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(6, 78, 59, 0.4);
    border: 1.5px solid #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.status-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    display: inline-block;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.6;
    }
}

.text-vivid-success {
    color: #4ade80 !important;
}

.text-vivid-danger {
    color: #f87171 !important;
}

.text-vivid-warning {
    color: #fde047 !important;
}

/* Participant / Team Status Card */
.participant-status-card {
    background: rgba(10, 15, 26, 0.9) !important;
    border: 1.5px solid rgba(0, 242, 254, 0.35) !important;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.participant-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00f2fe, #10b981, transparent);
}

/* Arena Linear Flow Header Pill */
.arena-linear-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(245, 158, 11, 0.15);
    border: 1.5px solid #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
    font-size: 0.78rem;
    font-weight: 700;
    color: #fde047;
    white-space: nowrap;
}

/* ==========================================================================
   EXAM ARENA: ULTRA HIGH-CONTRAST CATEGORY & POINT PRESENTATION
   ========================================================================== */
.question-meta-hero {
    background: linear-gradient(135deg, rgba(14, 23, 42, 0.98), rgba(9, 14, 26, 0.98)) !important;
    border: 1.5px solid rgba(0, 242, 254, 0.45) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 242, 254, 0.15) !important;
    border-radius: 12px;
}

/* Solid Vivid Category Capsule */
.arena-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    border: 2px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.arena-cat-pill .cat-prefix {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0.9;
}
.arena-cat-pill .cat-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* Big Glowing Tactical Point Pill */
.arena-point-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    border-radius: 50px;
    background: #10b981 !important;
    color: #022013 !important;
    font-family: var(--font-mono);
    font-weight: 900;
    border: 2px solid #34d399 !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.55), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}
.arena-point-pill .pts-prefix {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #022013 !important;
    opacity: 0.95;
}
.arena-point-pill .pts-number {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    color: #022013 !important;
}
.arena-point-pill .pts-unit {
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #022013 !important;
}

/* Arena Penalty Pill */
.arena-penalty-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.82rem;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
    border: 1.5px solid #f87171 !important;
}

/* HUD Topbar Active Question Pill */
.hud-active-capsule {
    background: rgba(11, 18, 32, 0.95);
    border: 1.5px solid rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
    border-radius: 50px;
    padding: 3px 12px;
}
.hud-pts-badge {
    background: #10b981 !important;
    color: #022013 !important;
    font-weight: 900 !important;
    font-size: 0.82rem !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.45) !important;
    border-radius: 50px !important;
    padding: 3px 10px !important;
}

/* ==========================================================================
   OFFICIAL PRINT & PDF STYLESHEET (BERITA ACARA TRANSCRIPT)
   ========================================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 12mm 15mm;
    }

    *, *::before, *::after {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html, body {
        background: #ffffff !important;
        color: #111827 !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide Web UI / Navigation Elements */
    nav,
    .navbar,
    .cyber-topbar,
    .topbar,
    .participant-topbar,
    .sidebar,
    .sidebar-content-wrapper > footer,
    footer,
    .app-footer,
    .no-print,
    .d-print-none,
    .btn,
    button,
    .hero-status-pill,
    .result-hero-card::before,
    .participant-status-card::before {
        display: none !important;
    }

    .sidebar-content-wrapper,
    #main,
    .exam-result-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* High contrast text and card surfaces */
    .result-hero-card,
    .participant-status-card,
    .cyber-card,
    .result-kpi-card {
        background: #ffffff !important;
        color: #111827 !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        box-shadow: none !important;
        margin-bottom: 1rem !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .result-hero-card h2,
    .result-hero-card h4,
    .cyber-card-header,
    .cyber-card-header span {
        color: #0f172a !important;
    }

    .text-light,
    .text-white,
    .text-cyan-neon,
    .text-info,
    .text-secondary {
        color: #1e293b !important;
    }

    .text-muted {
        color: #475569 !important;
    }

    .text-vivid-success {
        color: #15803d !important;
    }

    .text-vivid-danger {
        color: #b91c1c !important;
    }

    .text-vivid-warning {
        color: #b45309 !important;
    }

    /* Badges in Print */
    .badge {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border: 1px solid #94a3b8 !important;
        font-weight: 600 !important;
    }

    .badge-rule-scoring {
        background: #f8fafc !important;
        color: #0f172a !important;
        border: 1px solid #cbd5e1 !important;
    }

    /* Chosen Option Box */
    .chosen-option-box {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        color: #0f172a !important;
        padding: 8px 12px !important;
    }

    .chosen-option-box.correct {
        background: #f0fdf4 !important;
        border: 1.5px solid #16a34a !important;
        color: #14532d !important;
    }

    .chosen-option-box.wrong {
        background: #fef2f2 !important;
        border: 1.5px solid #dc2626 !important;
        color: #7f1d1d !important;
    }

    .chosen-option-box.unanswered {
        background: #fffbeb !important;
        border: 1.5px solid #d97706 !important;
        color: #78350f !important;
    }

    .chosen-option-box .user-select-text {
        color: inherit !important;
    }

    /* Juri MCQ List Items */
    .option-result-item {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        color: #0f172a !important;
        padding: 6px 10px !important;
    }

    .option-result-item.is-correct-key {
        background: #f0fdf4 !important;
        border: 1.5px solid #16a34a !important;
        color: #14532d !important;
    }

    .option-result-item.is-user-selected {
        background: #fef2f2 !important;
        border: 1.5px solid #dc2626 !important;
        color: #7f1d1d !important;
    }

    .option-result-item.is-both {
        background: #ecfdf5 !important;
        border: 2px solid #059669 !important;
        color: #064e3b !important;
    }

    /* Results Table */
    .table-responsive {
        overflow: visible !important;
        display: block !important;
    }

    #examResultTable {
        width: 100% !important;
        border-collapse: collapse !important;
        border: 1px solid #94a3b8 !important;
    }

    #examResultTable th {
        background: #e2e8f0 !important;
        color: #0f172a !important;
        border: 1px solid #94a3b8 !important;
        font-size: 9.5pt !important;
        padding: 6px !important;
    }

    #examResultTable td {
        border: 1px solid #cbd5e1 !important;
        color: #1e293b !important;
        font-size: 9.5pt !important;
        padding: 6px !important;
    }

    #examResultTable tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Question body & Code Blocks */
    .q-body-content, pre, code {
        background: #f8fafc !important;
        color: #0f172a !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Signature Section */
    .print-signatures {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

