  :root {
    --bg:            #0b1829;
    --sidebar:       #0d1f35;
    --sidebar-hover: #152843;
    --sidebar-active:#1a3a5c;
    --panel:         #0f2236;
    --panel2:        #0d1f35;
    --accent:        #4a9eff;
    --accent-light:  rgba(74,158,255,0.1);
    --accent2:       #2279e5;
    --green:         #3dd68c;
    --green-bg:      rgba(61,214,140,0.1);
    --red:           #ff5c5c;
    --red-bg:        rgba(255,92,92,0.1);
    --yellow:        #f5a623;
    --yellow-bg:     rgba(245,166,35,0.1);
    --text:          #d0dff0;
    --text-dim:      rgba(160,190,220,0.55);
    --border:        rgba(255,255,255,0.07);
    --sidebar-text:  rgba(255,255,255,0.55);
    --sidebar-text-active: #ffffff;
    --sidebar-w:     260px;
    --shadow:        0 2px 12px rgba(0,0,0,0.4);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.5);
  }

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

  body {
    font-family: 'Montserrat', 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    overflow: hidden; /* sidebar fixed, main scrolls */
  }

  /* ===== SIDEBAR ===== */
  #sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
  }

  .sidebar-header {
    padding: 0;
    background: #091526;
    position: relative;
  }
  .sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4a9eff, transparent);
  }

  .sidebar-top-band {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  .logo-emblem {
    width: 42px;
    height: 42px;
    background: var(--accent2);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.5px;
  }

  .logo-top {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: 0.3px;
  }

  .logo-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1.5px;
    margin-top: 2px;
  }

  /* Student info card */
  .student-card {
    margin: 14px 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 13px;
  }

  .student-card-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    margin-bottom: 5px;
  }

  .student-card-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    line-height: 1.3;
  }

  .student-card-meta {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    margin-top: 3px;
    line-height: 1.4;
  }

  .student-card-status {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(26,122,80,0.3);
    color: #5de8a8;
    border: 1px solid rgba(93,232,168,0.25);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
  }

  /* Nav menu */
  .nav-section-label {
    padding: 16px 16px 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.18s;
    border-left: 3px solid transparent;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--sidebar-text);
    margin: 1px 0;
  }

  .nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
  }

  .nav-item.active {
    background: var(--sidebar-active);
    border-left-color: #5ab3ff;
    color: var(--sidebar-text-active);
    font-weight: 600;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.8;
  }

  .nav-icon svg {
    width: 17px;
    height: 17px;
  }

  .nav-item.active .nav-icon {
    opacity: 1;
  }

  .nav-badge {
    margin-left: auto;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
  }

  .sidebar-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .btn-exit {
    width: 100%;
    padding: 9px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: rgba(255,255,255,0.5);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .btn-exit:hover {
    background: rgba(197,48,48,0.2);
    color: #fc8181;
    border-color: rgba(197,48,48,0.3);
  }

  /* ===== MAIN CONTENT ===== */
  #main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    position: relative;
  }

  /* Subtle diagonal stripe decoration matching brand */
  #main::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -100px;
    width: 500px;
    height: 110vh;
    background: rgba(30,90,180,0.06);
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
  }
  #main::after {
    content: '';
    position: fixed;
    top: -200px;
    right: -220px;
    width: 280px;
    height: 110vh;
    background: rgba(30,90,180,0.04);
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
  }

  /* Top bar */
  .topbar {
    padding: 0 32px;
    height: 58px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0d1f35;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
  }

  .topbar-title {
    font-size: 15px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    letter-spacing: 0.5px;
  }

  .topbar-sep {
    color: rgba(255,255,255,0.1);
    font-size: 18px;
  }

  .topbar-breadcrumb {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(160,190,220,0.35);
  }

  .topbar-time {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--accent);
    background: rgba(74,158,255,0.12);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 500;
  }

  /* ===== SCREENS ===== */
  .screens-viewport {
    flex: 1;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
  }
  .screen {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 28px 32px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s;
    transform: translateY(16px);
  }
  .screen.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 1;
  }
  .screen.screen-leaving {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
  }
  .screen.screen-entering {
    visibility: visible;
    animation: screenEnter 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  @keyframes screenEnter {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Dashboard entrance animation */
  @keyframes dashboardFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  #screen-dashboard.dashboard-entering .dash-grid .stat-card {
    opacity: 0;
    animation: dashboardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  #screen-dashboard.dashboard-entering .dash-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
  #screen-dashboard.dashboard-entering .dash-grid .stat-card:nth-child(2) { animation-delay: 0.12s; }
  #screen-dashboard.dashboard-entering .dash-grid .stat-card:nth-child(3) { animation-delay: 0.19s; }
  #screen-dashboard.dashboard-entering .dash-grid .stat-card:nth-child(4) { animation-delay: 0.26s; }
  #screen-dashboard.dashboard-entering .section-title {
    opacity: 0;
    animation: dashboardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.32s forwards;
  }
  #screen-dashboard.dashboard-entering .test-grid .test-card {
    opacity: 0;
    animation: dashboardFadeIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(1) { animation-delay: 0.42s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(2) { animation-delay: 0.50s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(3) { animation-delay: 0.58s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(4) { animation-delay: 0.66s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(5) { animation-delay: 0.74s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(6) { animation-delay: 0.82s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(7) { animation-delay: 0.90s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(8) { animation-delay: 0.98s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(9) { animation-delay: 1.06s; }
  #screen-dashboard.dashboard-entering .test-grid .test-card:nth-child(10) { animation-delay: 1.14s; }

  /* Normative base doc cards container */
  .norm-doc-cards {
    display: flex;
    flex-direction: row;
    gap: 24px;
    flex-wrap: wrap;
  }
  .norm-doc-card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
    flex: 1;
    min-width: 320px;
    box-shadow: var(--shadow);
  }
  .norm-doc-header { margin-bottom: 20px; }
  .norm-doc-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(74,158,255,0.25);
    margin-bottom: 12px;
    font-family: 'JetBrains Mono', monospace;
  }
  .norm-doc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    font-family: 'Montserrat', sans-serif;
  }
  .norm-doc-meta {
    margin-bottom: 18px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .norm-doc-meta-row {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-family: 'JetBrains Mono', monospace;
  }
  .norm-doc-meta-row:last-child { margin-bottom: 0; }
  .norm-doc-label {
    color: var(--text);
    font-weight: 600;
    margin-right: 8px;
  }
  .norm-doc-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 24px;
    flex: 1;
  }
  .norm-doc-link {
    align-self: flex-start;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 2px 8px rgba(74,158,255,0.3);
  }
  .norm-doc-link:hover {
    background: var(--accent2);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(74,158,255,0.4);
  }

  /* Dashboard */
  .dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
  }

  .stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

  .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 10px 10px 0 0;
  }

  .stat-green::before { background: var(--green); }
  .stat-yellow::before { background: var(--yellow); }
  .stat-red::before { background: var(--red); }

  .stat-val {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
  }

  .stat-label {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 4px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
  }

  .stat-icon {
    position: absolute;
    right: 16px; top: 18px;
    opacity: 0.12;
    display: flex;
    align-items: center;
  }

  .stat-icon svg {
    width: 32px;
    height: 32px;
  }

  .stat-card { color: var(--text); }
  .stat-green .stat-val { color: var(--green); }
  .stat-yellow .stat-val { color: var(--yellow); }
  .stat-red .stat-val { color: var(--red); }

  /* Test list */
  .section-title {
    font-size: 10px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.25);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  .test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
  }

  .test-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    color: var(--text);
  }

  .test-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(13,95,165,0.12);
  }

  .test-card-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
  }

  .tag-required { background: rgba(255,80,80,0.15); color: #ff7070; border: 1px solid rgba(255,80,80,0.3); font-family: 'Montserrat', sans-serif; }
  .tag-optional { background: rgba(74,158,255,0.12); color: #7ac0ff; border: 1px solid rgba(74,158,255,0.25); font-family: 'Montserrat', sans-serif; }
  .tag-done { background: rgba(61,214,140,0.12); color: #3dd68c; border: 1px solid rgba(61,214,140,0.25); font-family: 'Montserrat', sans-serif; }

  .test-card-title {
    font-size: 15px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.35;
  }

  .test-card-meta {
    font-size: 11px;
    color: var(--text-dim);
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
  }

  .test-card-subject {
    font-size: 10px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1.5px;
    margin-top: 4px;
    text-transform: uppercase;
  }
  html.light .test-card-subject { color: rgba(0,40,80,0.4); }

  .test-card-score {
    position: absolute;
    top: 16px; right: 16px;
    font-size: 22px;
    font-weight: 800;
    color: var(--green);
  }

  /* Progress bar */
  .progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), #42a5f5);
    transition: width 0.5s ease;
  }

  /* ===== TEST SCREEN ===== */
  .test-header {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
  }

  .test-progress-info { flex: 1; }

  .test-qnum {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
  }

  .test-title-small {
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 4px;
  }

  .timer-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 26px;
    font-weight: 500;
    color: var(--yellow);
    text-align: right;
  }

  .timer-label {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    text-align: right;
    margin-bottom: 2px;
  }

  .question-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
  }

  .question-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 22px;
  }

  .answers-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  .answer-opt {
    padding: 13px 16px;
    background: rgba(255,255,255,0.02);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .answer-opt:hover {
    border-color: var(--accent);
    background: rgba(74,158,255,0.08);
    color: var(--accent);
  }

  .answer-opt.selected {
    border-color: var(--accent);
    background: rgba(74,158,255,0.08);
    color: var(--accent);
  }

  .answer-opt.correct {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--green);
  }

  .answer-opt.wrong {
    border-color: var(--red);
    background: var(--red-bg);
    color: var(--red);
  }

  .opt-letter {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--border);
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--text-dim);
  }

  .answer-opt.selected .opt-letter {
    background: var(--accent);
    color: #fff;
  }

  .test-nav {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
  }

  .btn {
    padding: 10px 24px;
    border-radius: 7px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.18s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(13,95,165,0.25);
  }

  .btn-primary:hover {
    background: var(--accent2);
    box-shadow: 0 4px 14px rgba(13,95,165,0.35);
  }

  .btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-dim);
  }

  .btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(74,158,255,0.08);
  }

  .btn-success {
    background: var(--green);
    color: #fff;
  }

  /* Q map */
  .q-map {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }

  .q-dot {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
  }

  .q-dot.answered { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
  .q-dot.current { background: var(--accent); color: #fff; border-color: var(--accent); }

  /* Results screen */
  .result-hero {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 28px;
  }

  .result-score-big {
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
  }

  .result-score-big.pass { color: var(--green); }
  .result-score-big.fail { color: var(--red); }

  .result-verdict {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
  }

  .result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 560px;
    margin: 24px auto 0;
  }

  /* Profile */
  .profile-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
  }

  .profile-avatar-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    color: var(--text);
  }

  .avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 14px;
    box-shadow: 0 4px 16px rgba(13,95,165,0.3);
  }

  .profile-info-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px;
    box-shadow: var(--shadow);
    color: var(--text);
  }

  .info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    align-items: center;
  }

  .info-row:last-child { border-bottom: none; }

  .info-key {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    width: 160px;
    flex-shrink: 0;
  }

  .info-val {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
  }

  /* History table */
  .history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
  }

  .history-table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-dim);
    border-bottom: 1.5px solid var(--border);
    background: rgba(255,255,255,0.02);
  }

  .history-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
  }

  .history-table tr:hover td {
    background: rgba(74,158,255,0.06);
  }

  .pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .pill-pass { background: rgba(61,214,140,0.1); color: var(--green); border: 1px solid rgba(61,214,140,0.2); }
  .pill-fail { background: rgba(255,92,92,0.1); color: var(--red); border: 1px solid rgba(255,92,92,0.2); }

  /* ===== ANSWER REVIEW ===== */
  .review-section {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 0 40px;
  }

  .review-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.3s ease both;
    color: var(--text);
  }

  .review-item.review-correct {
    border-left: 4px solid var(--green);
  }

  .review-item.review-wrong {
    border-left: 4px solid var(--red);
  }

  .review-qnum {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .review-status-badge {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
  }

  .badge-correct { background: rgba(61,214,140,0.12); color: var(--green); border: 1px solid rgba(61,214,140,0.25); }
  .badge-wrong   { background: rgba(255,92,92,0.12); color: var(--red);   border: 1px solid rgba(255,92,92,0.25); }

  .review-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .review-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .review-opt {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
  }

  .review-opt.opt-correct {
    background: rgba(61,214,140,0.08);
    border-color: rgba(61,214,140,0.25);
    color: var(--green);
  }

  .review-opt.opt-wrong-chosen {
    background: rgba(255,92,92,0.08);
    border-color: rgba(255,92,92,0.25);
    color: var(--red);
    text-decoration: line-through;
    text-decoration-color: rgba(255,92,92,0.4);
  }

  .review-opt.opt-neutral {
    background: rgba(255,255,255,0.02);
    color: rgba(160,190,220,0.4);
  }

  .review-opt-icon {
    font-size: 14px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
  }

  .review-opt-letter {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    flex-shrink: 0;
  }

  .review-separator {
    text-align: center;
    padding: 24px 0 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    letter-spacing: 4px;
  }

  .review-separator::before,
  .review-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  /* ===== LOGIN SCREEN ===== */
  #login-screen {
    position: fixed;
    inset: 0;
    background: #0B1829;
    display: flex;
    z-index: 9999;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
  }

  /* Left decorative panel */
  .login-left {
    width: 46%;
    position: relative;
    background: #0d1f35;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 52px;
  }

  /* Diagonal stripe decoration */
  .login-left::before {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 340px; height: 900px;
    background: rgba(30,100,200,0.18);
    transform: rotate(-18deg);
    pointer-events: none;
  }
  .login-left::after {
    content: '';
    position: absolute;
    top: -60px; right: -160px;
    width: 200px; height: 900px;
    background: rgba(30,100,200,0.1);
    transform: rotate(-18deg);
    pointer-events: none;
  }

  .login-left-content {
    position: relative;
    z-index: 1;
  }

  .login-tagline {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(100,160,255,0.7);
    margin-bottom: 18px;
    font-family: 'JetBrains Mono', monospace;
  }

  .login-headline {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
  }

  .login-headline span {
    color: #4a9eff;
  }

  .login-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    line-height: 1.7;
    max-width: 320px;
  }

  /* Horizontal rule accent */
  .login-accent-line {
    width: 48px;
    height: 3px;
    background: #4a9eff;
    margin-bottom: 24px;
    border-radius: 2px;
  }

  /* Dots grid decoration */
  .login-dots {
    position: absolute;
    top: 40px; left: 40px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    opacity: 0.12;
  }
  .login-dots span {
    width: 3px; height: 3px;
    background: #fff;
    border-radius: 50%;
    display: block;
  }

  /* Right form panel */
  .login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 52px 60px;
    position: relative;
  }

  /* Subtle corner accent */
  .login-right::before {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 280px; height: 280px;
    background: radial-gradient(circle at bottom right, rgba(30,100,200,0.12), transparent 70%);
    pointer-events: none;
  }

  .login-form-wrap {
    width: 100%;
    max-width: 360px;
    position: relative;
    z-index: 1;
  }

  .login-form-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    font-family: 'Montserrat', sans-serif;
  }

  .login-form-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 36px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
  }

  .field-group {
    margin-bottom: 18px;
  }

  .field-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
    font-family: 'JetBrains Mono', monospace;
  }

  .field-input, .field-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 7px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
  }

  .field-input::placeholder { color: rgba(255,255,255,0.2); }

  .field-input:focus, .field-select:focus {
    border-color: #4a9eff;
    background: rgba(74,158,255,0.08);
  }

  .field-select {
    appearance: none;
    cursor: pointer;
  }

  .field-select option {
    background: #152540;
    color: #fff;
  }

  .btn-login {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    background: #1a6fd4;
    border: none;
    border-radius: 7px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .btn-login:hover {
    background: #2279e5;
    box-shadow: 0 4px 20px rgba(26,111,212,0.45);
    transform: translateY(-1px);
  }

  .btn-login:active {
    transform: translateY(0);
  }

  .scan-line { display: none; }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 5px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: #c5d3e8; border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

  /* Responsive */
  @media (max-width: 768px) {
    #sidebar { display: none; }
    #main { margin-left: 0; }
    .profile-grid { grid-template-columns: 1fr; }
    .result-grid { grid-template-columns: 1fr; }
    .norm-doc-cards { flex-direction: column; }
    .norm-doc-card { min-width: 0; }
  }

  .screen.active { min-height: 0; }

  /* divider in sidebar header */
  .sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 0 12px;
  }

  /* ===== LIGHT THEME — ГК ОрВД Corporate Blue ===== */
  html.light {
    --bg:            #0080C8;
    --sidebar:       #006aaa;
    --sidebar-hover: #0077be;
    --sidebar-active:#005a94;
    --panel:         #ffffff;
    --panel2:        rgba(255,255,255,0.92);
    --accent:        #ffffff;
    --accent-light:  rgba(255,255,255,0.15);
    --accent2:       #e8f4fc;
    --green:         #00c853;
    --green-bg:      rgba(0,200,83,0.15);
    --red:           #ff3d3d;
    --red-bg:        rgba(255,61,61,0.15);
    --yellow:        #ffb300;
    --yellow-bg:     rgba(255,179,0,0.15);
    --text:          #003a5c;
    --text-dim:      rgba(0,58,92,0.55);
    --border:        rgba(255,255,255,0.25);
    --sidebar-text:  rgba(255,255,255,0.75);
    --sidebar-text-active: #ffffff;
    --shadow:        0 2px 12px rgba(0,60,100,0.15), 0 1px 3px rgba(0,60,100,0.1);
    --shadow-lg:     0 8px 32px rgba(0,60,100,0.2);
  }

  /* ---- Backgrounds ---- */
  html.light body { background: #0080C8; color: #003a5c; }

  /* Concentric circles bg decoration */
  html.light #main {
    background:
      radial-gradient(circle at 92% 15%, rgba(255,255,255,0.07) 0%, transparent 35%),
      radial-gradient(circle at 92% 15%, rgba(255,255,255,0.05) 0%, transparent 52%),
      radial-gradient(circle at 92% 15%, rgba(255,255,255,0.035) 0%, transparent 68%),
      radial-gradient(circle at 92% 15%, rgba(255,255,255,0.02) 0%, transparent 85%),
      #0080C8;
  }
  html.light #main::before {
    background: rgba(255,255,255,0.06);
    transform: rotate(-15deg);
  }
  html.light #main::after {
    background: rgba(255,255,255,0.03);
    transform: rotate(-15deg);
  }

  /* ---- Topbar ---- */
  html.light .topbar {
    background: rgba(0,90,148,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
  }
  html.light .topbar-title { color: #fff; letter-spacing: 1px; }
  html.light .topbar-breadcrumb { color: rgba(255,255,255,0.45); }
  html.light .topbar-time { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
  html.light .theme-switch { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
  html.light .theme-switch:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
  html.light .theme-switch-label { color: rgba(255,255,255,0.7); }
  html.light .theme-switch-track { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.15); }

  /* ---- Sidebar ---- */
  html.light #sidebar { background: #005a94; }
  html.light .sidebar-header { background: #004d80; }
  html.light .sidebar-header::after { background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent); }
  html.light .student-card { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }
  html.light .nav-item:hover { background: rgba(255,255,255,0.1); }
  html.light .nav-item.active { background: rgba(255,255,255,0.18); border-left-color: #fff; }
  html.light .btn-exit { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.6); }
  html.light .btn-exit:hover { background: rgba(255,80,80,0.25); border-color: rgba(255,80,80,0.4); color: #fff; }

  /* ---- Cards & Panels ---- */
  html.light .stat-card {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,50,100,0.12);
    color: #003a5c;
  }
  html.light .stat-val { color: #0080C8; }
  html.light .stat-green .stat-val { color: #00a040; }
  html.light .stat-yellow .stat-val { color: #d07000; }
  html.light .stat-red .stat-val { color: #cc2222; }
  html.light .stat-label { color: rgba(0,58,92,0.5); }
  html.light .stat-icon { color: #0080C8; opacity: 0.12; }

  html.light .test-card {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,50,100,0.12);
    color: #003a5c;
  }
  html.light .test-card:hover {
    border-color: rgba(255,255,255,1);
    box-shadow: 0 8px 32px rgba(0,30,80,0.18), 0 2px 8px rgba(0,30,80,0.08);
    transform: translateY(-3px);
  }
  html.light .test-card-title { color: #002a4a !important; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; }
  html.light .test-card-meta { color: rgba(0,40,80,0.45) !important; letter-spacing: 1px; font-size: 10px; }
  html.light .test-card-score { color: #00a040; }

  html.light .section-title {
    color: rgba(255,255,255,0.55) !important;
    letter-spacing: 3px;
    font-family: 'Montserrat', sans-serif;
  }
  html.light .section-title::after { background: rgba(255,255,255,0.2); }

  /* Tags */
  html.light .tag-required { background: #d93025; color: #ffffff; border-color: #d93025; font-weight: 700; letter-spacing: 0.8px; }
  html.light .tag-optional { background: transparent; color: #0060a0; border-color: #0060a0; font-weight: 700; letter-spacing: 0.8px; }
  html.light .tag-done { background: #0a8a3a; color: #ffffff; border-color: #0a8a3a; font-weight: 700; letter-spacing: 0.8px; }

  /* Progress bar */
  html.light .progress-bar { background: rgba(0,40,80,0.08); }
  html.light .progress-fill { background: linear-gradient(90deg, #0060a0, #0090d0); }

  /* ---- Test screen ---- */
  html.light .test-header {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,50,100,0.12);
    color: #003a5c;
  }
  html.light .test-title-small { color: rgba(0,58,92,0.5); }
  html.light .test-qnum { color: #003a5c; }
  html.light .timer-display { color: #003a5c !important; }
  html.light .timer-label { color: rgba(0,58,92,0.5); }

  html.light .question-box {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,50,100,0.12);
  }
  html.light .question-text { color: #003a5c !important; }
  html.light .answer-opt {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.5);
    color: #003a5c;
  }
  html.light .answer-opt:hover {
    background: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,50,100,0.1);
  }
  html.light .answer-opt.selected {
    background: rgba(0,58,92,0.12);
    border-color: #003a5c;
    color: #003a5c;
  }
  html.light .answer-opt.correct { background: rgba(0,160,64,0.12); border-color: #00a040; color: #006428; }
  html.light .answer-opt.wrong { background: rgba(220,30,30,0.1); border-color: #cc2222; color: #aa1111; }
  html.light .opt-letter { background: rgba(0,58,92,0.08); border-color: rgba(0,58,92,0.15); color: #003a5c; }
  html.light .answer-opt.selected .opt-letter { background: #003a5c; color: #fff; }

  /* Q map panel */
  html.light .q-dot { background: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.4); color: rgba(0,58,92,0.6); }
  html.light .q-dot.answered { background: rgba(0,58,92,0.15); border-color: rgba(0,58,92,0.3); color: #003a5c; }
  html.light .q-dot.current { background: #003a5c; color: #fff; border-color: #003a5c; }

  /* Nav buttons (next/prev) */
  html.light .btn-secondary {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
  }
  html.light .btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
    color: #fff;
  }
  html.light .btn-primary { background: #003a5c; color: #fff; box-shadow: 0 2px 8px rgba(0,40,80,0.3); }
  html.light .btn-primary:hover { background: #004d7a; box-shadow: 0 4px 16px rgba(0,40,80,0.4); }

  /* Q-map wrapper */
  html.light #screen-test-active > div > div:last-child > div {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(255,255,255,0.6) !important;
  }

  /* ---- Results ---- */
  html.light .result-score-big.pass { color: #fff; text-shadow: 0 0 40px rgba(0,200,83,0.5); }
  html.light .result-score-big.fail { color: #fff; text-shadow: 0 0 40px rgba(255,61,61,0.5); }
  html.light .result-verdict { color: rgba(255,255,255,0.9) !important; }
  html.light .result-grid .stat-card { background: rgba(255,255,255,0.95); }

  /* ---- Review ---- */
  html.light .review-item {
    background: rgba(255,255,255,0.95);
    border-color: rgba(255,255,255,0.5);
    color: #003a5c;
  }
  html.light .review-item.review-correct { border-left-color: #00a040; }
  html.light .review-item.review-wrong { border-left-color: #cc2222; }
  html.light .review-question { color: #003a5c !important; }
  html.light .review-qnum { color: rgba(0,58,92,0.45); }
  html.light .review-opt.opt-neutral { background: rgba(0,58,92,0.04); color: rgba(0,58,92,0.4); }
  html.light .review-opt.opt-correct { background: rgba(0,160,64,0.1); border-color: rgba(0,160,64,0.3); color: #006428; }
  html.light .review-opt.opt-wrong-chosen { background: rgba(220,30,30,0.08); border-color: rgba(220,30,30,0.3); color: #aa1111; }
  html.light .review-opt-letter { background: rgba(0,58,92,0.06); border-color: rgba(0,58,92,0.12); }
  html.light .review-separator { color: rgba(255,255,255,0.4) !important; }
  html.light .review-separator::before, html.light .review-separator::after { background: rgba(255,255,255,0.2); }
  html.light .badge-correct { background: rgba(0,160,64,0.12); color: #006428; border-color: rgba(0,160,64,0.25); }
  html.light .badge-wrong { background: rgba(220,30,30,0.1); color: #aa1111; border-color: rgba(220,30,30,0.2); }

  /* ---- Profile ---- */
  html.light .profile-avatar-box { background: rgba(255,255,255,0.95); border-color: rgba(255,255,255,0.6); color: #003a5c; }
  html.light #prof-name { color: #003a5c !important; }
  html.light .profile-info-box { background: rgba(255,255,255,0.95); border-color: rgba(255,255,255,0.6); color: #003a5c; }
  html.light .info-key { color: rgba(0,58,92,0.45) !important; }
  html.light .info-val { color: #003a5c !important; }
  html.light .info-row { border-color: rgba(0,58,92,0.08); }
  html.light #prof-avg { color: #003a5c !important; }
  html.light .profile-avatar-box > div:nth-child(4) { background: rgba(0,58,92,0.08) !important; border-color: rgba(0,58,92,0.1) !important; }

  html.light .norm-doc-card { background: rgba(255,255,255,0.95); border-color: rgba(255,255,255,0.6); }
  html.light .norm-doc-title { color: #003a5c; }
  html.light .norm-doc-label { color: #003a5c; }
  html.light .norm-doc-meta-row { color: rgba(0,58,92,0.6); }
  html.light .norm-doc-desc { color: rgba(0,58,92,0.7); }
  html.light .norm-doc-link { background: #003a5c; }
  html.light .norm-doc-link:hover { background: #004d7a; }

  /* ---- History ---- */
  html.light .history-table th { background: rgba(0,58,92,0.05); color: rgba(0,58,92,0.45); }
  html.light .history-table td { color: #003a5c; border-color: rgba(0,58,92,0.06); }
  html.light .history-table tr:hover td { background: rgba(255,255,255,0.5); }
  html.light #screen-history > div { background: rgba(255,255,255,0.95) !important; border-color: rgba(255,255,255,0.6) !important; }
  html.light .pill-pass { background: rgba(0,160,64,0.12); color: #006428; border-color: rgba(0,160,64,0.25); }
  html.light .pill-fail { background: rgba(220,30,30,0.1); color: #aa1111; border-color: rgba(220,30,30,0.2); }

  /* ---- Scrollbar ---- */
  html.light ::-webkit-scrollbar-track { background: rgba(0,80,140,0.2); }
  html.light ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); }
  html.light ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }

  /* ---- Unanswered banner ---- */
  html.light #unanswered-banner { background: rgba(255,255,255,0.97) !important; border-color: rgba(220,30,30,0.3) !important; }

  /* Smooth theme transition */
  *, *::before, *::after {
    transition: background-color 0.25s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }
  /* But not for animations that shouldn't transition */
  .answer-opt, .nav-item, .test-card, .btn, .btn-login, .btn-exit {
    transition: all 0.18s ease;
  }

  /* ===== THEME SWITCH ===== */
  .theme-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--panel);
    user-select: none;
    transition: all 0.2s;
  }
  .theme-switch:hover { border-color: var(--accent); }

  .theme-switch-track {
    width: 34px;
    height: 18px;
    border-radius: 9px;
    background: rgba(255,255,255,0.15);
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
  }
  html.light .theme-switch-track { background: #dce5f0; border-color: #c5d3e8; }

  .theme-switch-track.on { background: var(--accent) !important; border-color: var(--accent) !important; }

  .theme-switch-thumb {
    position: absolute;
    top: 2px; left: 2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    transition: transform 0.25s, background 0.25s;
  }
  .theme-switch-track.on .theme-switch-thumb {
    transform: translateX(16px);
    background: #fff;
  }

  .theme-switch-icon {
    font-size: 13px;
    line-height: 1;
  }
  .theme-switch-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
  }


  /* ===== LOGIN TABS ===== */
  .login-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 22px;
  }
  .login-tab {
    flex: 1;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.4);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .login-tab.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  }
  .login-tab:hover:not(.active) { color: rgba(255,255,255,0.7); }

  /* ===== TEACHER FILTER TABS ===== */
  .filter-tab {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    letter-spacing: 0.3px;
  }
  .filter-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  html.light .filter-tab.active { background: #003a5c; border-color: #003a5c; color: #fff; }
  .filter-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

  /* Teacher badge in sidebar */
  .teacher-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(255,179,0,0.2);
    color: #ffb300;
    border: 1px solid rgba(255,179,0,0.3);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    margin-top: 6px;
  }

  /* ===== CONFETTI CANVAS ===== */
  #confetti-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9998;
  }

  /* ===== ANIMATED SCORE ===== */
  .result-score-big {
    font-size: 96px;
    font-weight: 900;
    line-height: 1;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 8px;
    transition: none;
  }
  .score-animate {
    animation: scorePop 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
  }
  @keyframes scorePop {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
  }
  .verdict-animate {
    animation: fadeSlideUp 0.5s ease 0.5s both;
  }
  @keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .stat-card-animate {
    animation: fadeSlideUp 0.4s ease both;
  }


  html.light .teacher-badge { background: rgba(255,179,0,0.15); color: #c07000; border-color: rgba(255,179,0,0.3); }
  html.light .filter-tab { border-color: rgba(0,58,92,0.2); color: rgba(0,58,92,0.5); }
  html.light .filter-tab.active { background: #003a5c; border-color: #003a5c; color: #fff; }
  html.light .filter-tab:hover:not(.active) { border-color: #003a5c; color: #003a5c; }
  html.light .login-tab { color: rgba(255,255,255,0.5); }
  html.light .login-tab.active { background: rgba(255,255,255,0.15); color: #fff; }
