/* ====================================================
   ADT UI v2 — tampilan profesional (login, Admin Pusat, Proktor, Guru)
   Dimuat SETELAH style.css: menimpa token warna, tombol, form, kartu,
   tabel, dan kerangka panel (sidebar + topbar). Ruang ujian murid tidak
   memakai kelas .app-shell sehingga tidak ikut berubah.
   ==================================================== */

:root {
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;

  --primary-hue: 224;
  --primary: #1D4ED8;
  --primary-hover: #1E40AF;
  --primary-light: #EEF3FE;
  --primary-border: #BFD0F7;

  --success: #15803D;
  --success-hover: #166534;
  --success-light: #DCFCE7;
  --success-border: #BBE5C8;

  --warning: #B45309;
  --warning-hover: #92400E;
  --warning-light: #FEF3C7;

  --danger: #DC2626;
  --danger-hover: #B91C1C;
  --danger-light: #FEE2E2;
  --danger-border: #F5C2C2;

  --dark: #0F172A;
  --dark-hover: #020617;

  --grad-primary: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  --grad-teacher: linear-gradient(135deg, #15803D 0%, #166534 100%);
  --grad-dark: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  --grad-warning: linear-gradient(135deg, #D97706 0%, #B45309 100%);

  --bg-app: #F5F7FB;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --surface-2: #F1F5F9;
  --surface-3: #E2E8F0;
  --table-head: #F8FAFC;
  --border-color: #E2E8F0;
  --border-soft: #EEF1F6;
  --border-strong: #CBD5E1;
  --text-main: #0F172A;
  --text-label: #334155;
  --text-nav: #475569;
  --text-muted: #64748B;
  --shadow-color: rgba(15, 23, 42, 0.06);
  --ring: rgba(29, 78, 216, 0.35);

  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: #E2E8F0;

  --border-radius-sm: 10px;
  --border-radius-md: 14px;
  --border-radius-lg: 18px;
}

body.dark-theme {
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --primary-light: rgba(59, 130, 246, 0.14);
  --primary-border: rgba(59, 130, 246, 0.4);
  --success: #22C55E;
  --success-hover: #16A34A;
  --success-light: rgba(34, 197, 94, 0.14);
  --success-border: rgba(34, 197, 94, 0.4);
  --warning: #F59E0B;
  --warning-light: rgba(245, 158, 11, 0.14);
  --danger: #EF4444;
  --danger-hover: #DC2626;
  --danger-light: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(239, 68, 68, 0.4);

  --bg-app: #0B1120;
  --bg-sidebar: #0F172A;
  --bg-card: #111A2E;
  --surface-2: #1E293B;
  --surface-3: #334155;
  --table-head: #0F172A;
  --border-color: #1E293B;
  --border-soft: #1A2436;
  --border-strong: #334155;
  --text-main: #E2E8F0;
  --text-label: #CBD5E1;
  --text-nav: #A3B1C6;
  --text-muted: #94A3B8;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --ring: rgba(59, 130, 246, 0.5);
  --glass-bg: rgba(15, 23, 42, 0.92);
  --glass-border: #1E293B;
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ====================================================
   TOMBOL
   ==================================================== */
.btn {
  min-height: 40px;
  padding: 0 16px;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn.btn:hover,
.btn.btn:active { transform: none; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-sidebar), 0 0 0 4px var(--ring);
}
.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-xs { min-height: 28px; padding: 0 10px; font-size: 0.78rem; border-radius: 8px; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 0.95rem; font-weight: 700; }
.btn-block { width: 100%; }

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.btn-primary:hover { background-color: var(--primary-hover); color: #FFFFFF; }

.btn-success {
  background-color: var(--success);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.btn-success:hover { background-color: var(--success-hover); color: #FFFFFF; }

.btn-warning {
  background-color: #B45309;
  color: #FFFFFF;
}
.btn-warning:hover { background-color: #92400E; color: #FFFFFF; }

.btn-danger {
  background-color: var(--danger);
  color: #FFFFFF;
}
.btn-danger:hover { background-color: var(--danger-hover); color: #FFFFFF; }

.btn-dark {
  background-color: var(--dark);
  color: #FFFFFF;
}
.btn-dark:hover { background-color: var(--dark-hover); color: #FFFFFF; }
.dark-theme .btn-dark { background-color: var(--surface-3); }
.dark-theme .btn-dark:hover { background-color: #475569; }

.btn-secondary {
  background-color: var(--surface-2);
  color: var(--text-main);
}
.btn-secondary:hover { background-color: var(--surface-3); color: var(--text-main); }

.btn-outline,
.btn-outline-dark {
  background-color: var(--bg-sidebar);
  border-color: var(--border-strong);
  color: var(--text-main);
}
.btn-outline:hover,
.btn-outline-dark:hover {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-outline-primary {
  background-color: transparent;
  border-color: var(--primary-border);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-success {
  background-color: transparent;
  border-color: var(--success-border);
  color: var(--success);
}
.btn-outline-success:hover {
  background-color: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.btn-outline-danger {
  background-color: transparent;
  border-color: var(--danger-border);
  color: var(--danger);
}
.btn-outline-danger:hover {
  background-color: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-outline-purple {
  background-color: transparent;
  border-color: #D4C5F9;
  color: #6D28D9;
}
.btn-outline-purple:hover {
  background-color: #F3EEFF;
  border-color: #8B5CF6;
  color: #6D28D9;
}

.btn-ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--text-nav);
}
.btn-ghost:hover { background-color: var(--surface-2); color: var(--text-main); }

/* Tombol ikon saja (aksi baris, topbar, kartu pengguna) */
.btn-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-icon:hover { background-color: var(--surface-2); color: var(--text-main); }
.btn-icon-danger:hover { background-color: var(--danger-light); color: var(--danger); }
.btn-icon:focus-visible,
.nav-item:focus-visible,
.login-tab:focus-visible,
.btn-theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.btn-group, .btn-group-center { gap: 8px; }

/* ====================================================
   FORM
   ==================================================== */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-label);
  margin-bottom: 6px;
}

.form-control,
.input-wrapper input,
.input-wrapper select {
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background-color: var(--bg-sidebar);
  color: var(--text-main);
}
textarea.form-control { min-height: 0; }
.input-wrapper input,
.input-wrapper select { padding-left: 2.6rem; }
.input-wrapper i { left: 0.95rem; font-size: 0.95rem; }

.form-control:focus,
.input-wrapper input:focus,
.input-wrapper select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}
.form-control::placeholder,
.input-wrapper input::placeholder { color: #94A3B8; }

/* ====================================================
   KARTU, STATISTIK, TABEL, BADGE, MODAL
   ==================================================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.glass {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.app-shell .padding-lg { padding: 1.5rem; }
.app-shell .content-area .card > h2,
.app-shell .content-area .card > h3:first-child,
.app-shell .content-area .card h2.margin-bottom-md {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}

.tab-header { margin-bottom: 1.5rem; }
.tab-header h1,
.tab-header-action h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}
.tab-header p,
.tab-header-action p {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.tab-header-action { margin-bottom: 1.5rem; gap: 1rem; }

/* Kartu statistik: putih dengan ikon berwarna (tanpa gradien penuh) */
.stats-grid { gap: 1rem; }
.stat-card {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 1.15rem 1.25rem;
  gap: 1rem;
}
.stat-card::after { display: none; }
.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: var(--primary-light);
  color: var(--primary);
}
.stat-card .stat-info h3 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.stat-card .stat-info p {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 1;
}
.stat-card.card-purple .stat-icon { background: #F1ECFE; color: #6D28D9; }
.stat-card.card-blue .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card.card-orange .stat-icon { background: #FFEDD5; color: #C2410C; }
.stat-card.card-green .stat-icon { background: var(--success-light); color: var(--success); }
.dark-theme .stat-card.card-purple .stat-icon { background: rgba(139, 92, 246, 0.16); color: #C4B5FD; }
.dark-theme .stat-card.card-orange .stat-icon { background: rgba(249, 115, 22, 0.16); color: #FDBA74; }

.table th,
.table td { border-bottom: 1px solid var(--border-soft); }
.table thead th {
  background-color: var(--table-head);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.table tbody tr:hover { background-color: var(--table-head); }
.dark-theme .table tbody tr:hover { background-color: rgba(255, 255, 255, 0.03); }

.badge {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.badge-dark { background-color: var(--surface-3); color: var(--text-label); }

.modal { background-color: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); }
.modal-content {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}
.modal-header { background-color: var(--bg-sidebar); border-radius: 18px 18px 0 0; }
.modal-header h2, .modal-header h3 { font-size: 1.1rem; font-weight: 800; }

/* ====================================================
   KERANGKA PANEL: SIDEBAR + TOPBAR (Admin Pusat, Proktor, Guru)
   ==================================================== */
.app-shell > .app-container {
  display: flex;
  height: 100vh;
  min-height: 0;
}

.app-shell .sidebar {
  width: 264px;
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px 14px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  overflow-x: hidden;
}

.app-shell .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid var(--border-color);
}
.app-shell .sidebar-brand .header-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
}
.dark-theme .app-shell .sidebar-brand .header-logo { background: #FFFFFF; padding: 3px; }
.app-shell .sidebar-brand-text { min-width: 0; }
.app-shell .sidebar-brand h2 {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  white-space: normal;
  text-align: left;
  color: var(--text-main);
}
.app-shell .header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 5px;
}
.app-shell .header-meta .badge { font-size: 0.66rem; padding: 2px 8px; }
.app-shell .header-school-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: normal;
  max-width: 100%;
  line-height: 1.3;
}

.app-shell .sidebar-nav,
.app-shell .sa-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.app-shell .nav-group-label {
  display: block;
  padding: 14px 12px 6px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.app-shell .nav-group-label:first-child { padding-top: 2px; }
/* Nomor langkah alur kerja (menu guru) */
.app-shell .nav-group-label:has(.nav-step) { display: flex; align-items: center; gap: 8px; }
.app-shell .nav-step {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
}

.app-shell .nav-item {
  min-height: 40px;
  padding: 0 12px;
  gap: 12px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-nav);
  white-space: nowrap;
}
.app-shell .nav-item i {
  width: 18px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.app-shell .nav-item:hover {
  background-color: var(--surface-2);
  color: var(--text-main);
}
.app-shell .nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}
.app-shell .nav-item .live-nav-count { margin-left: auto; }

.app-shell .sidebar-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}
.app-shell .sidebar-user-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.app-shell .sidebar-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-shell .sidebar-user-info > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell .sidebar-user-role {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}
.app-shell .sidebar-user .btn-icon { width: 32px; height: 32px; border-radius: 8px; }

.app-shell .app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.app-shell .app-header {
  position: relative;
  top: auto;
  z-index: 20;
  flex-shrink: 0;
  height: 64px;
  min-height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
}
.app-shell .topbar-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.app-shell .topbar-sep { font-size: 0.6rem; opacity: 0.7; }
.app-shell .topbar-page {
  color: var(--text-main);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-shell .topbar-title:has(.topbar-page:empty) .topbar-sep { display: none; }

.app-shell .header-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.app-shell .nav-theme-toggle {
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-nav);
  justify-content: center;
}
.app-shell .nav-theme-toggle:hover { background-color: var(--surface-2); color: var(--text-main); }

.app-shell .content-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px 48px;
  background-color: var(--bg-app);
}

.app-shell .sidebar-toggle,
.app-shell .sidebar-backdrop { display: none; }

/* Tata letak dua kolom tidak boleh melebar keluar layar; tabel menggulir di dalam kartunya */
.app-shell .classes-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 1.5rem; }
@media (max-width: 1180px) {
  .app-shell .classes-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Tablet & HP: sidebar menjadi laci yang bisa dibuka-tutup */
@media (max-width: 900px) {
  .app-shell > .app-container {
    display: block;
    height: auto;
    min-height: 100vh;
  }
  .app-shell .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1200;
    width: 280px;
    max-width: 86vw;
    padding: 18px 14px 14px;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(-100%);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .app-shell.sidebar-open .sidebar {
    transform: none;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  }
  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.45);
  }
  .app-shell .sidebar-nav,
  .app-shell .sa-sidebar-nav { flex-direction: column; gap: 2px; }
  .app-shell .nav-item { min-height: 42px; padding: 0 12px; font-size: 0.9rem; gap: 12px; }
  .app-shell .sidebar-toggle { display: inline-flex; margin-left: -6px; }
  .app-shell .app-main { height: auto; min-height: 100vh; }
  .app-shell .app-header {
    position: sticky;
    top: 0;
    height: 56px;
    min-height: 56px;
    padding: 0 12px;
  }
  .app-shell .content-area {
    padding: 16px 16px 40px;
    overflow-y: visible;
  }
  .app-shell .tab-header h1,
  .app-shell .tab-header-action h1 { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell .sidebar { transition: none; }
}

/* ====================================================
   HALAMAN LOGIN
   ==================================================== */
#login-view,
.dark-theme #login-view {
  display: block;
  background: var(--bg-app);
}
#login-view .login-shell {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}

/* Panel merek */
.login-hero {
  flex: 1 1 480px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  color: #FFFFFF;
  background-color: #0B2A6F;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
}
.dark-theme .login-hero { background-color: #081D4F; }
.login-hero::before,
.login-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.login-hero::before { right: -180px; bottom: -180px; width: 520px; height: 520px; }
.login-hero::after { right: -100px; bottom: -100px; width: 360px; height: 360px; border-color: rgba(255, 255, 255, 0.1); }

.login-hero-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-hero-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-hero-logo img { width: 38px; height: 38px; object-fit: contain; }
.login-hero-name { display: flex; flex-direction: column; line-height: 1.3; }
.login-hero-name strong { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.02em; }
.login-hero-name small { font-size: 0.82rem; color: #C7D5F5; }

.login-hero-body {
  position: relative;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9DB8FF;
}
.login-hero-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}
.login-hero-desc { margin: 0; font-size: 1rem; line-height: 1.6; color: #C7D5F5; }
.login-hero-features {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: #E6EDFC;
}
.login-hero-features i { color: #7FA3FF; font-size: 1.05rem; }
.login-hero-help { position: relative; margin: 0; font-size: 0.82rem; color: #9FB3DE; }

/* Panel form */
.login-main {
  flex: 1 1 520px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
#login-view .login-wrapper {
  width: 100%;
  max-width: 440px;
  padding: 0;
}
#login-view .login-card,
.dark-theme #login-view .login-card {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.07);
  padding: 36px;
}
.dark-theme #login-view .login-card { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }

/* Kotak login memakai grid (lihat style.css): judul di baris 1, langkah login
   ditumpuk di baris 2, tombol Admin Pusat di baris 3 */
#login-view .login-card { grid-template-columns: minmax(0, 1fr); }
#login-view .login-card > .login-brand { grid-area: 1 / 1; }
#login-view .login-card > #login-step-role,
#login-view .login-card > #login-step-superadmin { grid-area: 2 / 1; }
#login-view .login-card > .login-alt { grid-area: 3 / 1; }

#login-view .login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  margin-bottom: 24px;
}
#login-view .brand-logo {
  width: 52px;
  height: 52px;
  margin: 0;
  flex-shrink: 0;
}
#login-view .login-brand-text { min-width: 0; }
#login-view .login-brand-eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
#login-view .login-brand h1 {
  margin: 2px 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: normal;
  text-align: left;
  background: none;
  color: var(--text-main);
  -webkit-text-fill-color: currentColor;
}
#login-view .login-brand p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}
#login-view .login-brand .brand-welcome-hint { display: none; font-weight: 500; color: var(--text-muted); }
#login-view .login-brand.is-welcome .brand-welcome-hint { display: block; }
#login-view .login-brand.is-welcome .login-brand-text > p:not(.brand-welcome-hint) { display: none; }

#login-view .login-school-group { margin-bottom: 18px; }
#login-view .login-tabs-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-label);
}
#login-view .login-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background-color: var(--surface-2);
  border: none;
  border-radius: 12px;
}
#login-view .login-tab {
  min-height: 40px;
  padding: 0 6px;
  gap: 8px;
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-nav);
}
#login-view .login-tab:hover { color: var(--text-main); }
#login-view .login-tab.active {
  background-color: var(--bg-sidebar);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.06);
}
#login-view .login-form .btn-lg { margin-top: 6px; }
#login-view .login-step-title { font-size: 1.2rem; font-weight: 800; }
#login-view .login-back-btn { margin-top: 10px; }

#login-view .login-alt { margin-top: 20px; }
#login-view .login-alt:has(> #btn-open-superadmin.hidden) { display: none; }
#login-view .login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
#login-view .login-divider::before,
#login-view .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
}

#login-view .theme-switch-container { margin-top: 16px; }
#login-view .btn-theme-toggle {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
#login-view .btn-theme-toggle:hover { background-color: var(--surface-2); color: var(--text-main); }

@media (max-width: 900px) {
  .login-hero {
    flex-basis: 100%;
    padding: 20px 20px 24px;
    gap: 14px;
  }
  .login-hero::before,
  .login-hero::after,
  .login-hero-desc,
  .login-hero-features,
  .login-hero-help,
  .login-hero-eyebrow { display: none; }
  .login-hero-title { font-size: 1.2rem; }
  .login-hero-logo { width: 44px; height: 44px; border-radius: 12px; }
  .login-hero-logo img { width: 32px; height: 32px; }
  .login-main { padding: 24px 16px 40px; align-items: flex-start; }
  #login-view .login-card,
  .dark-theme #login-view .login-card { padding: 24px 20px; }
}

/* ====================================================
   CHAT GURU & PROKTOR (jendela mengambang)
   ==================================================== */
#floating-chat-widget {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}
#floating-chat-widget .floating-chat-header { padding: 12px 14px; }
.floating-chat-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.floating-chat-title > div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.chat-status-line { font-size: 0.72rem; font-weight: 500; opacity: 0.95; }
#chat-status[data-kind="ok"]::before,
#chat-status[data-kind="pending"]::before,
#chat-status[data-kind="error"]::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 1px;
  background: #FBBF24;
}
#chat-status[data-kind="ok"]::before { background: #4ADE80; }
#chat-status[data-kind="error"]::before { background: #F87171; }

/* Daftar yang sedang online: sebelumnya disembunyikan, kini tampil sebagai baris ringkas */
#floating-chat-widget .floating-chat-sidebar {
  display: block;
  background: var(--table-head);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 12px;
}
#floating-chat-widget .online-title { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
#floating-chat-widget .online-users-list {
  list-style: none;
  margin: 0;
  padding: 0 0 2px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
#floating-chat-widget .online-users-list:empty::before {
  content: 'Belum ada yang online';
  font-size: 0.76rem;
  color: var(--text-muted);
}
#floating-chat-widget .online-users-list li {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-sidebar);
  font-size: 0.76rem;
  white-space: nowrap;
}
#floating-chat-widget .online-users-list .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#floating-chat-widget .online-users-list li.admin .avatar { background: var(--dark); }
.dark-theme #floating-chat-widget .online-users-list li.admin .avatar { background: var(--surface-3); }
#floating-chat-widget .online-name { font-weight: 600; color: var(--text-main); }
#floating-chat-widget .online-role { color: var(--text-muted); }
#floating-chat-widget .floating-chat-main { background: var(--bg-sidebar); }

/* ====================================================
   FOTO PROFIL GURU
   ==================================================== */
.app-shell .sidebar-user-avatar { overflow: hidden; }
.app-shell .sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-photo-wrap { display: flex; justify-content: center; }
.profile-photo {
  position: relative;
  width: 112px;
  height: 112px;
  padding: 0;
  border: 4px solid var(--bg-sidebar);
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--border-color), 0 8px 24px rgba(15, 23, 42, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: visible;
}
.profile-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.profile-photo-placeholder { font-size: 2.6rem; }
.profile-photo-camera {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  border: 3px solid var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background-color 0.15s ease;
}
.profile-photo:hover .profile-photo-camera { background: var(--primary-hover); }
.profile-photo:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--border-color), 0 0 0 4px var(--ring); }
.profile-photo-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0.75rem 0 0.4rem;
}

/* ====================================================
   PERINGATAN (TOAST): kartu terang, teks gelap, ikon berwarna
   Sebelumnya teks putih di atas warna (jenis 'danger' bahkan tanpa latar
   sehingga tidak terbaca).
   ==================================================== */
.toast-container {
  top: 1.25rem;
  right: 1.25rem;
  gap: 0.6rem;
  z-index: 100000;
  max-width: calc(100vw - 2.5rem);
}
.toast {
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 420px;
  padding: 12px 10px 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-sidebar);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
}
.dark-theme .toast { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.toast-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.toast-text { flex: 1; min-width: 0; padding-top: 4px; overflow-wrap: anywhere; }
.toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast-close:hover { background: var(--surface-2); color: var(--text-main); }

.toast-success { background-color: var(--bg-sidebar); border-color: var(--success-border); }
.toast-success .toast-icon { background: var(--success-light); color: var(--success); }
.toast-error { background-color: #FFF5F5; border-color: #FCA5A5; }
.toast-error .toast-icon { background: #FEE2E2; color: #B91C1C; }
.toast-error .toast-text { color: #7F1D1D; }
.toast-warning { background-color: #FFFBEB; border-color: #FCD34D; }
.toast-warning .toast-icon { background: #FEF3C7; color: #B45309; }
.toast-warning .toast-text { color: #78350F; }
.toast-info { background-color: var(--bg-sidebar); border-color: var(--primary-border); }
.toast-info .toast-icon { background: var(--primary-light); color: var(--primary); }

.dark-theme .toast-error { background-color: #2A1215; border-color: #7F1D1D; }
.dark-theme .toast-error .toast-icon { background: rgba(239, 68, 68, 0.18); color: #FCA5A5; }
.dark-theme .toast-error .toast-text { color: #FECACA; }
.dark-theme .toast-warning { background-color: #2A1F0B; border-color: #78350F; }
.dark-theme .toast-warning .toast-icon { background: rgba(245, 158, 11, 0.18); color: #FCD34D; }
.dark-theme .toast-warning .toast-text { color: #FDE68A; }

@media (max-width: 600px) {
  .toast-container { top: 0.75rem; left: 0.75rem; right: 0.75rem; max-width: none; }
  .toast { min-width: 0; max-width: none; width: 100%; }
}

/* ====================================================
   ADMIN PUSAT: ANALISIS HASIL
   ==================================================== */
.sa-analysis-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.sa-analysis-filters select { flex: 1 1 200px; max-width: 280px; }
.sa-analysis-kktp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-label);
  margin: 0;
}
.sa-analysis-kktp input { width: 84px; }
.sa-analysis-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}
.sa-analysis-detail-title { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.sa-analysis-detail-title strong { font-size: 1.05rem; color: var(--text-main); }
.sa-analysis-detail-title span { font-size: 0.82rem; }
/* Admin Pusat hanya melihat: tombol buat insight AI & berbagi ke murid disembunyikan */
.analysis-readonly #btn-analysis-ai,
.analysis-readonly #btn-analysis-ai-key,
.analysis-readonly #analysis-ai-key-box,
.analysis-readonly .an-share { display: none !important; }
.analysis-readonly .an-ai-empty p { display: none; }
.analysis-readonly .an-ai-empty::after { content: 'Guru belum membuat insight AI untuk ujian ini.'; display: block; font-size: 0.88rem; color: var(--text-muted); }

/* ====================================================
   KARTU PESERTA UJIAN (Varian A) — 95 × 60 mm, 8 kartu per A4
   ==================================================== */
.kp-sheet {
  display: grid;
  grid-template-columns: repeat(2, 95mm);
  justify-content: center;
  border-top: 0.3mm dashed #94A3B8;
  border-left: 0.3mm dashed #94A3B8;
  width: max-content;
  margin: 0 auto;
}
.kp-cell {
  width: 95mm;
  height: 60mm;
  box-sizing: border-box;
  padding: 1.2mm;
  border-right: 0.3mm dashed #94A3B8;
  border-bottom: 0.3mm dashed #94A3B8;
  break-inside: avoid;
  page-break-inside: avoid;
}
.kp-card {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 0.3mm solid #CBD5E1;
  border-radius: 2.5mm;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  color: #0F172A;
  font-family: 'Plus Jakarta Sans', 'Inter', Arial, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.kp-head {
  height: 13mm;
  flex-shrink: 0;
  background: #0B2A6F;
  display: flex;
  align-items: center;
  gap: 2.4mm;
  padding: 0 3.2mm;
  box-sizing: border-box;
}
.kp-logo {
  width: 9mm;
  height: 9mm;
  flex-shrink: 0;
  background: #FFFFFF;
  border-radius: 2.2mm;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kp-logo-round { border-radius: 50%; }
.kp-logo img { width: 6.8mm; height: 6.8mm; object-fit: contain; }
.kp-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2mm; line-height: 1.15; }
.kp-school { font-size: 8.4pt; font-weight: 800; color: #FFFFFF; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-exam { font-size: 6.6pt; font-weight: 800; color: #FBBF24; text-transform: uppercase; letter-spacing: 0.2pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-year { font-size: 5.8pt; font-weight: 500; color: #DCE6FB; }
.kp-title { display: flex; align-items: center; gap: 2mm; padding: 1.6mm 3.2mm 0; }
.kp-title span { font-size: 6.2pt; font-weight: 800; letter-spacing: 1.3pt; color: #0B2A6F; white-space: nowrap; }
.kp-title i { flex: 1; height: 0.45mm; background: #F59E0B; border-radius: 0.3mm; }
.kp-body { flex: 1; min-height: 0; display: flex; gap: 2.8mm; padding: 1.8mm 3.2mm 0; box-sizing: border-box; }
.kp-photo {
  width: 15.5mm;
  height: 20.5mm;
  flex-shrink: 0;
  border-radius: 1.5mm;
  border: 0.3mm solid #CBD5E1;
  background: #E2E8F0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.kp-photo-img { width: 100%; height: 100%; object-fit: cover; }
.kp-photo-placeholder { width: 13mm; height: 16.5mm; }
.kp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.3mm; }
.kp-name { font-size: 10.5pt; font-weight: 800; line-height: 1.12; letter-spacing: -0.1pt; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1mm 2mm; }
.kp-grid > div { display: flex; flex-direction: column; gap: 0.1mm; min-width: 0; }
.kp-label { font-size: 5pt; font-weight: 700; letter-spacing: 0.3pt; color: #64748B; }
.kp-value { font-size: 7.4pt; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-blank { color: #94A3B8; }
.kp-qr-col { width: 16mm; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6mm; }
/* Ukuran QR dikunci persegi: style.css punya .student-qrcode { width/height: 100% !important } */
.kp-qr.student-qrcode {
  width: 15mm !important;
  height: 15mm !important;
  flex: 0 0 15mm;
  padding: 0.7mm;
  box-sizing: border-box;
  border: 0.3mm solid #E2E8F0;
  border-radius: 1.4mm;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.kp-qr.student-qrcode img,
.kp-qr.student-qrcode canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.kp-qr-caption { font-size: 4.8pt; font-weight: 700; color: #475569; text-align: center; line-height: 1.2; }
.kp-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 2.5mm; padding: 0 3.2mm 2.2mm; }
.kp-login { display: flex; flex-direction: column; gap: 0.3mm; background: #EEF3FE; border-radius: 1.5mm; padding: 1.1mm 1.8mm; min-width: 0; }
.kp-login-title { font-size: 5pt; font-weight: 800; color: #1D4ED8; letter-spacing: 0.3pt; }
.kp-login-text { font-size: 5.6pt; font-weight: 600; color: #334155; white-space: nowrap; }
.kp-sign { display: flex; flex-direction: column; align-items: center; min-width: 26mm; flex-shrink: 0; }
.kp-sign-role { font-size: 5pt; font-weight: 600; color: #475569; }
.kp-sign-space { height: 4.5mm; display: flex; align-items: center; justify-content: center; }
.kp-sign-space img { max-height: 5.5mm; max-width: 24mm; object-fit: contain; }
.kp-sign-name { font-size: 5.4pt; font-weight: 800; border-top: 0.25mm solid #0F172A; padding-top: 0.3mm; white-space: nowrap; }
.kp-sign-nip { font-size: 4.8pt; color: #475569; white-space: nowrap; }

@media print {
  #exam-cards-print-area .kp-sheet { margin: 0 auto; }
  /* 8 kartu per halaman A4 (2 × 4): tiap lembar mulai di halaman baru */
  #exam-cards-print-area .kp-sheet + .kp-sheet { break-before: page; page-break-before: always; }
}

/* ====================================================
   PEMOTONG FOTO (crop + zoom) — pas foto murid
   ==================================================== */
.pc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pc-backdrop.hidden { display: none; }
body.pc-open { overflow: hidden; }
.pc-dialog {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg-sidebar);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pc-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.pc-head h3 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 800; }
.pc-head p { margin: 0; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.pc-stage-wrap {
  display: flex;
  justify-content: center;
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--bg-sidebar) 0% 50%) 50% / 18px 18px;
  border-radius: 14px;
  padding: 12px;
}
.pc-stage {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #0F172A;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: 0 0 0 2px var(--primary), 0 8px 24px rgba(15, 23, 42, 0.25);
}
.pc-stage:active { cursor: grabbing; }
.pc-stage:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px var(--ring); }
.pc-img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform;
}
/* Garis bantu sepertiga */
.pc-grid { position: absolute; inset: 0; pointer-events: none; }
.pc-grid i { position: absolute; background: rgba(255, 255, 255, 0.45); }
.pc-grid i:nth-child(1) { left: 33.333%; top: 0; bottom: 0; width: 1px; }
.pc-grid i:nth-child(2) { left: 66.666%; top: 0; bottom: 0; width: 1px; }
.pc-grid i:nth-child(3) { top: 33.333%; left: 0; right: 0; height: 1px; }
.pc-grid i:nth-child(4) { top: 66.666%; left: 0; right: 0; height: 1px; }
.pc-controls { display: flex; align-items: center; gap: 6px; }
.pc-zoom { flex: 1; min-width: 0; accent-color: var(--primary); }
.pc-sep { width: 1px; height: 24px; background: var(--border-color); margin: 0 4px; }
.pc-foot { display: flex; justify-content: flex-end; gap: 8px; }

/* Backup & Restore akun guru */
.backup-card h3 { font-size: 1.1rem; }
.backup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.backup-box { border: 1px solid var(--border-color, #e2e8f0); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.backup-box h4 { margin: 0; font-size: 1rem; }
.backup-box p { margin: 0; font-size: .9rem; }
.backup-parts { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; }
.backup-parts label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.backup-report { margin-top: 1rem; border-radius: 10px; padding: .85rem 1rem; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: .9rem; line-height: 1.6; }
.backup-report ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.backup-report .warn { color: #92400e; margin-top: .4rem; }

/* Mode demo */
.demo-entry{margin:0 0 1rem;padding:1rem;border:1px dashed var(--primary,#2563eb);border-radius:12px;background:rgba(37,99,235,.06)}
.demo-entry-title{font-weight:700;margin-bottom:.25rem}
.demo-entry-help{font-size:.85rem;margin:0 0 .6rem;opacity:.8}
.demo-entry-form{display:flex;gap:.5rem;flex-wrap:wrap}
.demo-entry-form input{flex:1;min-width:150px}
.demo-exam-box{margin:1rem 0}
.demo-exam-note{margin:0 0 .75rem;opacity:.8}
.demo-exam-list{display:grid;gap:.75rem}
.demo-exam-btn{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;text-align:left;width:100%}
.demo-exam-btn span{font-size:.85rem;font-weight:400;opacity:.9}

/* Ajakan pendaftaran + kontak */
.promo-contact{margin:0 0 1rem;padding:1rem;border-radius:12px;background:rgba(16,185,129,.08);border:1px solid rgba(16,185,129,.35)}
.promo-title{font-weight:700;margin-bottom:.25rem}
.promo-text{font-size:.85rem;margin:0 0 .7rem;line-height:1.5;opacity:.9}
.promo-links{display:flex;flex-wrap:wrap;gap:.5rem}
.promo-link{display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .8rem;border-radius:999px;font-size:.85rem;font-weight:600;text-decoration:none;color:#fff}
.promo-wa{background:#25D366}.promo-ig{background:#E1306C}.promo-lynk{background:#0f172a}
.promo-link:hover{filter:brightness(1.08)}

/* Mode demo: petunjuk kode buka saat layar terkunci */
.cheat-demo-hint{display:flex;flex-direction:column;gap:.25rem;margin:0 0 1rem;padding:.8rem 1rem;border-radius:12px;background:#fef3c7;border:2px dashed #f59e0b;color:#78350f;text-align:center;font-size:.95rem}
.cheat-demo-hint strong{letter-spacing:.08em;font-size:.8rem}
.cheat-demo-code{display:inline-block;padding:.05rem .6rem;border-radius:8px;background:#f59e0b;color:#fff;font-size:1.25rem;letter-spacing:.2em}

/* ===== Lembar soal & jawaban: ramah anak, aman di HP (tanpa scroll horizontal) ===== */
html, body { max-width: 100%; overflow-x: hidden; }
#exam-main-interface, #exam-main-interface .exam-content, .question-card, .question-body,
.q-rich, .answer-options { max-width: 100%; min-width: 0; box-sizing: border-box; }
.q-rich { overflow-wrap: anywhere; font-size: 1.05rem; line-height: 1.7; }
/* Gambar selalu muat di layar dan tidak pernah lebih lebar dari kartu soal */
.q-rich img, .answer-options img, .question-body img {
  max-width: 100% !important; height: auto !important; object-fit: contain;
  display: block; margin: .6rem auto; border-radius: 12px;
}
.q-rich video, .q-rich iframe, .q-rich svg { max-width: 100% !important; height: auto; }
/* Tabel di dalam soal ikut mengecil, kata panjang dipatahkan */
.q-rich table { width: 100% !important; max-width: 100%; table-layout: fixed; border-collapse: collapse; }
.q-rich td, .q-rich th { overflow-wrap: anywhere; word-break: break-word; padding: .35rem; }
/* Rumus panjang boleh turun baris; rumus blok yang sangat lebar digulir di dalam kotaknya sendiri */
.katex { max-width: 100%; }
.katex-display { overflow-x: auto; overflow-y: hidden; max-width: 100%; padding: .2rem 0; }
.exam-content button, .exam-content label { touch-action: manipulation; }

@media (max-width: 640px) {
  .question-card { padding: 1rem !important; border-radius: 20px; }
  .q-rich { font-size: 1.08rem; }

  /* Soal Benar/Salah: tiap pernyataan jadi kartu, bukan tabel lebar */
  #answer-options-container .table-responsive { overflow: visible !important; }
  #answer-options-container table { display: block; width: 100% !important; border: 0; }
  #answer-options-container thead { display: none; }
  #answer-options-container tbody { display: block; }
  #answer-options-container tbody tr {
    display: grid !important; grid-template-columns: 2.4rem minmax(0, 1fr) minmax(0, 1fr); gap: .5rem .6rem;
    padding: .8rem; margin-bottom: .85rem; border: 2px solid var(--border-color) !important;
    border-radius: 18px; background: var(--bg-card, #fff);
  }
  #answer-options-container tbody td { display: block; padding: 0 !important; border: 0; min-width: 0; max-width: 100%; width: auto !important; overflow-wrap: anywhere; word-break: break-word; }
  #answer-options-container tbody td { white-space: normal !important; }
  #answer-options-container tbody td .katex, #answer-options-container tbody td .katex * { white-space: nowrap; }
  #answer-options-container tbody td:nth-child(n+3) label { white-space: nowrap !important; }
  #answer-options-container tbody td:nth-child(1) { grid-column: 1; grid-row: 1; font-size: 1.1rem; }
  #answer-options-container tbody td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; overflow-wrap: anywhere; font-size: 1.02rem !important; line-height: 1.55 !important; }
  #answer-options-container tbody td:nth-child(3) { grid-column: 2; grid-row: 2; }
  #answer-options-container tbody td:nth-child(4) { grid-column: 3; grid-row: 2; }
  #answer-options-container tbody td:nth-child(n+3) label {
    height: auto !important; min-height: 40px; padding: .3rem .6rem !important; gap: .4rem; font-weight: 600; font-size: calc(1rem * var(--qs, 1));
    border: 2px solid var(--border-color); border-radius: 12px; background: rgba(148,163,184,.12);
  }
  #answer-options-container tbody td:nth-child(3) label::after { content: "Benar"; }
  #answer-options-container tbody td:nth-child(4) label::after { content: "Salah"; }
  #answer-options-container tbody td:nth-child(n+3) input[type=radio] { width: 17px; height: 17px; margin: 0; }
  #answer-options-container tbody td:nth-child(3) label:has(input:checked) { background: #dcfce7; border-color: #22c55e; color: #166534; }
  #answer-options-container tbody td:nth-child(4) label:has(input:checked) { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
}

/* ===== Ukuran huruf soal: Kecil / Sedang / Besar (Besar = ukuran semula) ===== */
html[data-qsize="kecil"]  { --qs: .8; }
html[data-qsize="sedang"] { --qs: .9; }
html[data-qsize="besar"]  { --qs: 1; }
.q-rich { font-size: calc(1.05rem * var(--qs, 1)); }
.option-text { font-size: calc(1rem * var(--qs, 1)); }
#answer-options-container td:nth-child(2) { font-size: calc(.95rem * var(--qs, 1)) !important; }
@media (max-width: 640px) {
  .q-rich { font-size: calc(1.08rem * var(--qs, 1)); }
  #answer-options-container tbody td:nth-child(2) { font-size: calc(1.02rem * var(--qs, 1)) !important; }
}
.qsize-bar { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: .1rem 0 .9rem; }
.qsize-label { font-size: .8rem; font-weight: 600; opacity: .75; margin-right: .2rem; }
.qsize-btn { border: 2px solid var(--border-color, #e2e8f0); background: transparent; color: inherit; border-radius: 999px; padding: .2rem .8rem; min-height: 36px; font-weight: 700; cursor: pointer; line-height: 1.1; }
.qsize-btn.active { background: #2563eb; border-color: #2563eb; color: #fff; }

.qsize-btn { min-width: 44px; padding: .1rem .5rem; display: inline-flex; align-items: center; justify-content: center; }
.qsize-label { font-size: 1.1rem; opacity: .7; }

/* Ukuran huruf di samping tombol Daftar Soal (hanya simbol) */
.question-head-right { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.question-head-right .qsize-bar { margin: 0; flex-wrap: nowrap; gap: .3rem; }
.question-head-right .qsize-btn { min-width: 38px; min-height: 38px; padding: 0 .35rem; }
#btn-toggle-nav { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
@media (max-width: 400px) { .question-head-right { gap: .35rem; } .question-head-right .qsize-label { display: none; } .question-head-right .qsize-btn { min-width: 34px; min-height: 34px; } }

/* Label bentuk soal (Pilihan Ganda dst.) disembunyikan dari lembar soal */
#question-type-badge, .question-type-pill { display: none !important; }

/* Layar kunci akun demo: satu layar ringkas (tanpa petunjuk angkat tangan / tunggu pengawas) */
#cheat-overlay.is-demo .cheat-steps,
#cheat-overlay.is-demo .cheat-waiting,
#cheat-overlay.is-demo .cheat-divider,
#cheat-overlay.is-demo .cheat-note { display: none !important; }
#cheat-overlay.is-demo .cheat-card { max-height: none; padding-top: 1.4rem; padding-bottom: 1.4rem; }
#cheat-overlay.is-demo .cheat-demo-hint { margin-bottom: .9rem; }

/* ===== Hasil ujian demo (bergrafik, ramah anak) ===== */
.demo-entry-form { flex-direction: column; }
.demo-entry-form button { width: 100%; }
.demo-result { width: 100%; max-width: 560px; margin: 0 auto; padding: 1rem 1rem 2.5rem; align-self: flex-start; box-sizing: border-box; }
#thank-you-view:has(.demo-result:not(.hidden)) { align-items: flex-start !important; min-height: 100vh; }
.dr-head { display: flex; align-items: center; gap: .75rem; margin: .5rem 0 1rem; }
.dr-logo { width: 46px; height: 46px; }
.dr-kicker { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: #2563eb; }
.dr-exam { font-weight: 800; font-size: 1.1rem; line-height: 1.25; }
.dr-who { font-size: .85rem; opacity: .75; }
.dr-card { background: var(--bg-card, #fff); border: 2px solid var(--border-color, #e2e8f0); border-radius: 20px; padding: 1rem 1.1rem; margin-bottom: .9rem; box-shadow: 0 6px 18px rgba(15,23,42,.05); }
.dr-card h2 { font-size: 1rem; margin: 0 0 .7rem; display: flex; align-items: center; gap: .5rem; }
.dr-card h2 i { color: #2563eb; }
.dr-center { text-align: center; }
.dr-score { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dr-ring { width: 130px; height: 130px; flex-shrink: 0; margin: 0 auto; }
.dr-score-side { flex: 1; min-width: 180px; }
.dr-msg { font-size: .98rem; line-height: 1.5; margin-bottom: .6rem; font-weight: 600; }
.dr-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.dr-chip { padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.dr-c-benar { background: #dcfce7; color: #166534; } .dr-c-salah { background: #fee2e2; color: #991b1b; } .dr-c-kosong { background: #e2e8f0; color: #334155; }
.dr-chip i { font-size: .8em; margin-right: .15rem; }
.dr-weak-go { margin-top: .35rem; font-size: .8rem; font-weight: 700; color: #c2410c; }
.dr-stack { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: #e5e7eb; }
.dr-stack span { display: block; height: 100%; }
.dr-legend { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: .6rem; font-size: .8rem; }
.dr-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .3rem; }
.dr-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: .4rem; }
.dr-cell { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 12px; color: #fff; font-weight: 800; text-decoration: none; }
.dr-bar-row { margin-bottom: .8rem; }
.dr-bar-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; font-weight: 600; margin-bottom: .25rem; }
.dr-bar { height: 12px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.dr-bar i { display: block; height: 100%; border-radius: 999px; }
.dr-bar-note { font-size: .75rem; margin-top: .2rem; font-weight: 600; }
.dr-weak { background: #fff7ed; border-color: #fdba74; }
.dr-weak-item + .dr-weak-item { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed #fdba74; }
.dr-weak-title { font-weight: 800; }
.dr-weak-title span { color: #dc2626; font-size: .85rem; margin-left: .3rem; }
.dr-weak-tip { margin-top: .3rem; font-size: .9rem; line-height: 1.5; }
.dr-weak-tip i { color: #f59e0b; }
.dr-good { background: #f0fdf4; border-color: #86efac; }
.dr-list { margin: 0; padding-left: 1.2rem; line-height: 1.7; }
.dr-steps { margin: 0; padding-left: 1.3rem; line-height: 1.65; }
.dr-steps li { margin-bottom: .4rem; }
.dr-ans { border: 2px solid var(--border-color, #e2e8f0); border-radius: 14px; margin-bottom: .55rem; overflow: hidden; }
.dr-ans summary { padding: .65rem .8rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: .5rem; list-style: none; }
.dr-ans summary em { font-style: normal; font-weight: 600; font-size: .8rem; opacity: .7; margin-left: auto; }
.dr-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dr-ans-body { padding: .2rem .9rem .9rem; font-size: .92rem; line-height: 1.55; overflow-wrap: anywhere; }
.dr-q { margin-bottom: .6rem; opacity: .9; }
.dr-row { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .7rem; border-radius: 10px; background: #fee2e2; margin-bottom: .4rem; }
.dr-row > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; font-weight: 700; }
.dr-row b { font-weight: 600; }
.dr-row.ok { background: #dcfce7; }
.dr-pemb { margin-top: .4rem; padding: .6rem .7rem; border-radius: 10px; background: #eff6ff; color: #1e3a8a; }
.dr-actions { margin: 1rem 0; text-align: center; }
.dr-actions .btn-chunky { width: 100%; justify-content: center; }
.dr-cta-contact { text-align: center; margin-top: .5rem; padding: .9rem; border-radius: 16px; background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.35); }
.dr-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .6rem; }
.dr-score-num { font-size: 3rem; font-weight: 800; color: #2563eb; }

/* ===== Narasi promosi berpoin + kontak kecil (tidak mencolok) ===== */
.promo-contact { padding: .85rem 1rem; }
.promo-points { margin: .35rem 0 .6rem; padding-left: 1.15rem; font-size: .85rem; line-height: 1.55; }
.promo-points li { margin-bottom: .15rem; }
.promo-points li::marker { color: #10b981; }
.promo-mini { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .72rem; opacity: .8; }
.promo-mini a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.promo-mini a:hover { text-decoration: underline; opacity: 1; }
.dr-cta-contact { padding: .7rem .9rem; background: transparent; border: 1px dashed var(--border-color, #cbd5e1); }
.dr-cta-contact b { font-size: .8rem; font-weight: 600; opacity: .8; }
.dr-cta-contact .promo-mini { justify-content: center; margin-top: .35rem; }

/* ===== Halaman hasil: seimbang di layar lebar (dua kolom otomatis) ===== */
.dr-head { justify-content: center; text-align: left; }
.dr-body .dr-card { break-inside: avoid; }
.dr-span, .dr-actions, .dr-cta-contact { column-span: all; }
@media (min-width: 900px) {
  .demo-result { max-width: 1040px; padding-top: 1.5rem; }
  .dr-body { column-count: 2; column-gap: 1.1rem; }
  .dr-body .dr-card { margin-bottom: 1.1rem; }
  .dr-score { flex-direction: column; text-align: center; }
  .dr-score .dr-chips { justify-content: center; }
  .dr-score-side { min-width: 0; width: 100%; }
  .dr-ring { width: 150px; height: 150px; }
  .dr-actions .btn-chunky { width: auto; min-width: 280px; }
}
@media (min-width: 640px) and (max-width: 899px) {
  .demo-result { max-width: 640px; }
}

/* Benar/Salah: ukuran huruf mengikuti pilihan Kecil/Sedang/Besar */
@media (max-width: 640px) { #answer-options-container tbody tr { padding: .65rem !important; gap: .4rem .5rem !important; } }

/* Kontak promosi: simetris, rata tengah, jarak sama */
.promo-mini { justify-content: center; align-items: center; gap: .3rem 1.1rem; text-align: center; }
.promo-contact .promo-mini { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid rgba(16,185,129,.25); }

/* Halaman hasil: tepat di tengah (menimpa margin/padding bawaan .view) */
#thank-you-view #demo-result.demo-result {
  box-sizing: border-box; width: 100%; max-width: 560px;
  margin: 0 auto !important; padding: 1rem 1rem 2.5rem !important;
  align-self: flex-start;
}
@media (min-width: 640px) and (max-width: 899px) { #thank-you-view #demo-result.demo-result { max-width: 640px; } }
@media (min-width: 900px) { #thank-you-view #demo-result.demo-result { max-width: 1040px; padding-top: 1.5rem !important; } }
#thank-you-view:has(#demo-result:not(.hidden)) { justify-content: center !important; padding: 0 !important; }

/* ===== Halaman hasil: mode gelap terbaca jelas ===== */
.demo-result { color: var(--text-main); }
body.dark-theme .dr-kicker { color: #60a5fa; }
body.dark-theme .dr-card { background: hsla(225, 25%, 14%, .92); border-color: hsl(225, 20%, 26%); box-shadow: none; }
body.dark-theme .dr-card h2 i { color: #60a5fa; }
body.dark-theme .dr-weak { background: rgba(251,146,60,.12); border-color: rgba(251,146,60,.5); }
body.dark-theme .dr-weak-item + .dr-weak-item { border-top-color: rgba(251,146,60,.4); }
body.dark-theme .dr-weak-title span { color: #f87171; }
body.dark-theme .dr-weak-go { color: #fdba74; }
body.dark-theme .dr-good { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.45); }
body.dark-theme .dr-row { background: rgba(239,68,68,.18); }
body.dark-theme .dr-row.ok { background: rgba(34,197,94,.18); }
body.dark-theme .dr-pemb { background: rgba(59,130,246,.18); color: #bfdbfe; }
body.dark-theme .dr-c-benar { background: rgba(34,197,94,.22); color: #86efac; }
body.dark-theme .dr-c-salah { background: rgba(239,68,68,.22); color: #fca5a5; }
body.dark-theme .dr-c-kosong { background: rgba(148,163,184,.22); color: #cbd5e1; }
body.dark-theme .dr-bar, body.dark-theme .dr-stack { background: rgba(148,163,184,.28); }
body.dark-theme .dr-ring circle:first-of-type { stroke: rgba(148,163,184,.3); }
body.dark-theme .dr-ring text:last-of-type { fill: #94a3b8; }
body.dark-theme .dr-ans { border-color: hsl(225, 20%, 28%); }
body.dark-theme .dr-cta-contact { border-color: hsl(225, 20%, 30%); }
body.dark-theme .dr-cta-contact b, body.dark-theme .promo-mini { opacity: .9; }

/* ===== Daftar (bullet / nomor) di teks soal: beri jarak dari tepi kiri ===== */
.q-rich ol, .q-rich ul, .question-body ol, .question-body ul, .option-text ol, .option-text ul, .dr-q ol, .dr-q ul {
  padding-left: 2rem !important; margin: .6rem 0 !important; list-style-position: outside !important;
}
.q-rich ol, .question-body ol, .option-text ol { list-style-type: decimal !important; }
.q-rich ul, .question-body ul, .option-text ul { list-style-type: disc !important; }
.q-rich li, .question-body li, .option-text li { margin: .35rem 0 !important; padding-left: .4rem !important; }
.q-rich li::marker, .question-body li::marker { font-weight: 700; }

/* Hasil demo: dua tombol aksi */
.dr-actions-2 { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.dr-actions-2 .btn-chunky { flex: 1 1 180px; justify-content: center; width: auto; }

/* ===== Pilihan Try Out + Pricing ===== */
.tc-wrap { display: grid; gap: .5rem; margin-bottom: 1rem; }
.tc-title { font-weight: 700; color: var(--text-main); font-size: .95rem; }
.tc-card { display: flex; align-items: center; gap: .75rem; text-align: left; width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--primary-border); background: var(--primary-light); border-radius: 12px; cursor: pointer; color: var(--text-main); font: inherit; }
.tc-card:hover { border-color: var(--primary); }
.tc-card > i { font-size: 1.15rem; color: var(--primary); width: 1.6rem; text-align: center; }
.tc-card span { display: grid; line-height: 1.25; }
.tc-card small { color: var(--text-muted); font-size: .78rem; }
.pr-overlay { position: fixed; inset: 0; z-index: 9000; overflow-y: auto; background: var(--bg-app); -webkit-overflow-scrolling: touch; }
.pr-overlay[hidden] { display: none; }
.pr-page { max-width: 880px; margin: 0 auto; padding: 1rem 16px 2.5rem; }
.pr-back { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: .4rem 0; }
.pr-h1 { text-align: center; font-size: 1.5rem; color: var(--text-main); margin: .5rem 0 .25rem; }
.pr-sub { text-align: center; color: var(--text-muted); font-size: .88rem; margin: 0 0 1.25rem; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.pr-card { position: relative; background: var(--bg-card); border: 1.5px solid var(--border-color); border-radius: 16px; padding: 1.25rem 1.1rem; display: flex; flex-direction: column; transition: box-shadow .3s, border-color .3s; }
.pr-card.pr-focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.pr-card h2 { margin: 0 0 .3rem; font-size: 1.15rem; color: var(--text-main); }
.pr-badge { position: absolute; top: -.7rem; right: 1rem; background: var(--primary); color: #fff; font-size: .72rem; padding: .2rem .6rem; border-radius: 99px; }
.pr-price { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: .6rem; }
.pr-price small { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.pr-card ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; flex: 1; }
.pr-card li { position: relative; padding-left: 1.5rem; font-size: .88rem; line-height: 1.45; color: var(--text-label); }
.pr-card li::before { content: "\2713"; position: absolute; left: 0; color: #16a34a; font-weight: 800; }
.pr-btn { display: flex; justify-content: center; align-items: center; gap: .5rem; padding: .75rem 1rem; border-radius: 12px; border: 1.5px solid var(--primary); color: var(--primary); font-weight: 700; text-decoration: none; cursor: pointer; }
.pr-btn-main { background: var(--primary); color: #fff; }
.pr-note { font-size: .75rem; color: var(--text-muted); margin: .6rem 0 0; text-align: center; }
.pr-foot { text-align: center; font-size: .88rem; color: var(--text-muted); margin-top: 1.25rem; }
.pr-foot a { color: var(--primary); font-weight: 600; }
body.pr-open { overflow: hidden; }
.pr-form { display: grid; gap: .5rem; margin: 0 0 .9rem; padding: .8rem; border: 1px dashed var(--border-strong); border-radius: 12px; }
.pr-form-t { font-weight: 700; font-size: .85rem; color: var(--text-label); }
body.mode-sekolah #demo-entry, body.mode-sekolah #promo-contact { display: none !important; }
.tc-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.tc-interest { margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--border-strong); text-align: center; }
.tc-interest[hidden] { display: none; }
.tc-interest p { margin: 0 0 .5rem; font-size: .88rem; color: var(--text-muted); }
/* Pilihan sekolah & form masuk baru tampil setelah memilih Try Out Sekolah/Gugus */
body:not(.mode-sekolah) #login-step-role .login-school-group,
body:not(.mode-sekolah) #login-role-area { display: none !important; }
/* Try Out Sekolah: tanpa login proktor, tanpa menu soal & pilihan paket */
/* Try Out Sekolah: tanpa login Proktor (Try Out Gugus tetap memilikinya) */
body.mode-tos .login-tab[data-role="admin"], body.tryout-school .login-tab[data-role="admin"] { display: none !important; }
body.mode-tos #login-view .login-tabs, body.tryout-school #login-view .login-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

body.tryout-school .nav-item[data-tab="teacher-questions"]:not(#pusat-nav-questions) { display: none !important; }
body.tryout-school .form-group:has(> #exam-packet-select) { display: none !important; }
.reg-l { display: grid; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--text-label); }

/* Halaman awal: info hanya di panel biru (kiri); kartu kanan hanya berisi pilihan dan form */
#promo-contact { display: none !important; }
#hero-info { display: none !important; }
#hero-info { display: flex; flex-direction: column; gap: 16px; }
.hi-eyebrow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #9FB3DE; font-weight: 600; }
.hi-title { margin: 0; font-size: 2rem; line-height: 1.2; color: #fff; font-weight: 800; }
.hi-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hi-points li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; line-height: 1.45; color: #D6E0F7; }
.hi-points i { color: #7DD3A8; margin-top: 3px; }
.hi-cta { display: grid; gap: 8px; justify-items: start; padding-top: 4px; }
.hi-cta span { font-size: .85rem; color: #9FB3DE; }
.hi-cta button { border: 0; cursor: pointer; font: inherit; font-weight: 700; background: #fff; color: #1D4ED8; padding: .65rem 1rem; border-radius: 12px; }
.login-hero-help a { color: #fff; text-decoration: underline; }

@media (max-width: 900px) { .hi-eyebrow, .hi-points, .hi-cta { display: none; } .hi-title { font-size: 1.2rem; } }
/* Try Out Mandiri: kepala kartu netral (tanpa logo/nama sekolah Demo) */
body.hdr-neutral .login-brand .brand-logo, body.hdr-neutral .login-brand-text p:not(.brand-welcome-hint) { display: none !important; }

/* ===== Halaman soal siswa: satu layar penuh, tanpa scroll halaman =====
   Header dan tombol navigasi tetap di tempat; hanya isi soal yang bergulir bila panjang. */
body.exam-mode { overflow: hidden !important; }
body.exam-mode #student-view:not(.hidden) { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
body.exam-mode #student-view > .exam-header { flex: 0 0 auto; }
body.exam-mode .exam-layout { flex: 1 1 auto; min-height: 0; height: auto; }
body.exam-mode .exam-content { overflow: hidden; min-height: 0; padding: clamp(.5rem, 1.6vw, 1.25rem); gap: .6rem; justify-content: flex-start; }
body.exam-mode .question-card { display: block; flex: 1 1 auto; min-height: 0; margin-bottom: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(.75rem, 2vw, 1.5rem); }
body.exam-mode .exam-actions { flex: 0 0 auto; padding-top: .15rem; }
@media (max-width: 640px) {
  body.exam-mode .exam-actions { gap: .4rem; }
  body.exam-mode .exam-actions .btn-chunky { min-width: 0; padding-left: .7rem; padding-right: .7rem; }
}
html:has(body.exam-mode) { overflow: hidden !important; }
@media screen { body.exam-mode .print-only { display: none !important; } }

/* ===== Animasi halus perpindahan kartu / menu login ===== */
@keyframes tcIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tc-wrap { display: flex; flex-direction: column; gap: 0; }
.tc-title { margin-bottom: .5rem; }
.tc-card { margin-bottom: .5rem; max-height: 90px; overflow: hidden;
  transition: max-height .45s cubic-bezier(.4,0,.2,1), opacity .3s ease, margin .45s cubic-bezier(.4,0,.2,1),
    padding .45s cubic-bezier(.4,0,.2,1), border-width .45s ease, transform .45s cubic-bezier(.4,0,.2,1), border-color .25s, box-shadow .25s, background-color .25s; }
.tc-wrap.has-choice .tc-card:not(.on) { max-height: 0; opacity: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; transform: scale(.97); pointer-events: none; }
.tc-change { align-self: flex-start; border: 0; background: none; color: var(--primary); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; padding: 0;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s ease, opacity .35s ease .15s, padding .4s ease; }
.tc-wrap.has-choice .tc-change { max-height: 40px; opacity: 1; padding: .1rem 0 .4rem; }
.tc-change:hover { text-decoration: underline; }
#demo-entry:not(.hidden), body.mode-sekolah #login-step-role .login-school-group, body.mode-sekolah #login-role-area:not(.hidden), #tc-interest:not([hidden]) { animation: tcIn .45s cubic-bezier(.2,.7,.2,1) both; }
#hero-info.hi-anim { animation: tcIn .5s cubic-bezier(.2,.7,.2,1) both; }
.pr-overlay:not([hidden]) { animation: tcIn .35s ease both; }
body:not(.mode-mandiri) #demo-entry { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .tc-card, .tc-change, #demo-entry, #hero-info, .pr-overlay, #tc-interest { animation: none !important; transition: none !important; }
}
/* Layar terkunci Sekolah/Gugus: satu layar ringkas, kode pembuka dari guru */
#cheat-overlay.is-tryout .cheat-steps,
#cheat-overlay.is-tryout .cheat-waiting,
#cheat-overlay.is-tryout .cheat-divider,
#cheat-overlay.is-tryout .cheat-note { display: none !important; }
#cheat-overlay.is-tryout .cheat-card { max-height: none; padding-top: 1.4rem; padding-bottom: 1.4rem; }
#cheat-overlay.is-tryout .cheat-demo-hint { margin-bottom: .9rem; }
/* Menu guru: tanpa judul kelompok (1 Data & Akun, 2 Persiapan Ujian, dst.), langsung daftar menu */
nav[aria-label="Menu guru"] .nav-group-label { display: none !important; }

/* Pricing: lebih ringkas */
.pr-for { margin: 0 0 .6rem; font-size: .85rem; color: var(--text-muted); }
.pr-card-best { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.pr-incl { font-size: .92rem; }
.pr-link { border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 600; color: var(--primary); cursor: pointer; padding: .6rem 0 0; text-decoration: underline; }
.pr-note { margin-top: .5rem; }
.pr-card ul { margin-bottom: 1.1rem; }
/* Info pendaftaran ringkas di bawah login */
.tc-interest { margin-top: 1.1rem; padding: .9rem; border: 1px solid var(--border-color); border-radius: 14px; background: var(--primary-light); text-align: center; display: grid; gap: .5rem; justify-items: center; }
.tc-interest[hidden] { display: none; }
.ri-t { font-weight: 700; color: var(--text-main); font-size: .95rem; }
.ri-d { margin: 0; font-size: .82rem; color: var(--text-muted); }
.tc-interest .pr-btn { width: 100%; padding: .6rem 1rem; }
.ri-c { display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center; font-size: .78rem; }
.ri-c a { color: var(--text-muted); text-decoration: none; }
.ri-c a:hover { color: var(--primary); }
.pr-card ul { align-content: start; }
/* Log Demo */
.dl-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.dl-card { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; }
.dl-card > i { font-size: 1.2rem; color: var(--primary); width: 2rem; text-align: center; }
.dl-card b { display: block; font-size: 1.35rem; line-height: 1.1; color: var(--text-main); }
.dl-card span { font-size: .78rem; color: var(--text-muted); }
.dl-bar { display: flex; gap: .8rem; align-items: center; margin-bottom: .8rem; flex-wrap: wrap; }
.dl-bar input { max-width: 320px; }

/* ===== Pricing gaya Hostinger: kartu sejajar, harga besar, tombol penuh, fitur di bawah ===== */
.pr-page { max-width: 860px; }
.pr-grid { align-items: stretch; gap: 1.25rem; }
.pr-card { padding: 0; border-radius: 16px; overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }
.pr-card-best { border: 2px solid var(--primary); box-shadow: 0 10px 30px rgba(29, 78, 216, .15); }
.pr-ribbon-ghost { visibility: hidden; }
.pr-ribbon { background: var(--primary); color: #fff; text-align: center; font-size: .78rem; font-weight: 700; letter-spacing: .03em; padding: .4rem; }
.pr-top { padding: 1.4rem 1.4rem .6rem; min-height: 11.5rem; display: flex; flex-direction: column; }
.pr-card h2 { margin: 0 0 .35rem; font-size: 1.2rem; }
.pr-for { margin: 0 0 .9rem; font-size: .86rem; color: var(--text-muted); min-height: 2.6em; }
.pr-price { display: flex; align-items: baseline; gap: .25rem; margin-top: auto; color: var(--text-main); }
.pr-cur { font-size: 1rem; font-weight: 700; }
.pr-num { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.pr-price small { font-size: .85rem; color: var(--text-muted); font-weight: 500; }
.pr-once { font-size: .8rem; color: var(--primary); font-weight: 600; margin-top: .35rem; min-height: 1.2em; }
.pr-card > .pr-btn { margin: .4rem 1.4rem 0; padding: .85rem 1rem; font-size: 1rem; border-radius: 10px; }
.pr-sub2 { margin: .55rem 1.4rem 1rem; min-height: 2.6em; text-align: center; font-size: .8rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.pr-sub2 .pr-link { padding: 0; }
.pr-card ul { margin: 0; padding: 1.1rem 1.4rem 1.5rem; border-top: 1px solid var(--border-color); gap: .65rem; }
.pr-card li { padding-left: 1.7rem; font-size: .88rem; }
.pr-card li::before { content: "\2713"; position: absolute; left: 0; top: 1px; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: .7rem; text-align: center; line-height: 1.15rem; font-weight: 800; }
@media (max-width: 640px) { .pr-top { min-height: 0; } .pr-for { min-height: 0; } .pr-sub2 { min-height: 0; } }

/* ===== Daftar guru setelah membayar ===== */
.rg-page { max-width: 480px; }
.rg-head { text-align: center; margin: .2rem 0 1rem; }
.rg-head h1 { margin: .5rem 0 .2rem; font-size: 1.5rem; color: var(--text-main); }
.rg-head p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.rg-ok { display: inline-grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 1.4rem; animation: tcIn .5s ease both; }
.rg-steps { display: flex; justify-content: center; gap: .4rem; list-style: none; margin: 0 0 1rem; padding: 0; font-size: .78rem; color: var(--text-muted); flex-wrap: wrap; }
.rg-steps li { display: flex; align-items: center; gap: .35rem; }
.rg-steps li:not(:last-child)::after { content: ""; width: 1.4rem; height: 2px; background: var(--border-strong); margin-left: .25rem; }
.rg-steps li span { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--border-color); font-weight: 700; font-size: .72rem; }
.rg-steps li.done span { background: #16a34a; color: #fff; }
.rg-steps li.now { color: var(--primary); font-weight: 700; }
.rg-steps li.now span { background: var(--primary); color: #fff; }
.rg-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.2rem; box-shadow: 0 6px 24px rgba(15, 23, 42, .06); display: grid; gap: 1rem; }
.rg-t { font-weight: 700; color: var(--text-main); font-size: .95rem; margin-bottom: .35rem; display: flex; align-items: center; gap: .45rem; }
.rg-t i { color: var(--primary); }
.rg-hint { margin: 0 0 .7rem; font-size: .8rem; color: var(--text-muted); }
.rg-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.rg-verify form + form { margin-top: .9rem; }
.rg-verify .pr-btn { width: 100%; margin-top: .7rem; padding: .7rem 1rem; }
.rg-codeform span { display: block; text-align: center; font-size: .78rem; color: var(--text-muted); margin-bottom: .45rem; }
.rg-inline { display: flex; gap: .5rem; }
.rg-inline .pr-btn { width: auto; margin: 0; padding: 0 1.1rem; }
.rg-chip { display: none; align-items: center; gap: .5rem; padding: .7rem .9rem; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: .88rem; font-weight: 600; }
.rg-chip b { font-weight: 500; font-size: .78rem; color: #15803d; }
.rg-card.verified .rg-verify { display: none; }
.rg-card.verified .rg-chip { display: flex; }
.rg-form { display: grid; gap: .8rem; transition: opacity .3s ease; }
.rg-card.locked .rg-form .rg-f, .rg-card.locked .rg-form > .pr-btn { opacity: .45; pointer-events: none; }
.rg-f { display: grid; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--text-label); }
.rg-in { position: relative; display: flex; align-items: center; }
.rg-in > i { position: absolute; left: .85rem; color: var(--text-muted); font-size: .85rem; pointer-events: none; }
.rg-in .form-control { padding-left: 2.4rem; width: 100%; }
.rg-eye { position: absolute; right: .4rem; border: 0; background: none; color: var(--text-muted); cursor: pointer; padding: .4rem .55rem; }
.rg-form .pr-btn { width: 100%; padding: .85rem 1rem; font-size: 1rem; margin-top: .2rem; }
.rg-err { margin: .5rem 0 0; font-size: .82rem; color: #dc2626; }
.rg-wait { margin: .5rem 0 0; font-size: .82rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: .55rem .7rem; }
.rg-foot { text-align: center; margin: .2rem 0 0; }
@media (max-width: 420px) { .rg-row2 { grid-template-columns: 1fr; } }

/* Tombol kembali ke pilihan jenis Try Out: jelas seperti tombol */
.tc-change { align-self: stretch; justify-content: center; border: 1.5px solid var(--primary-border); background: var(--bg-card); color: var(--primary); font-weight: 700; font-size: .85rem; border-radius: 10px; padding: 0; text-align: center; }
.tc-change i { margin-right: .4rem; }
.tc-wrap.has-choice .tc-change { padding: .55rem .8rem; margin-top: .1rem; margin-bottom: .2rem; }
.tc-change:hover { background: var(--primary-light); text-decoration: none; }
.tc-wrap.has-choice .tc-change { max-height: 60px; }
.pr-for { min-height: 2.9em; line-height: 1.45; } .pr-top { min-height: 0; } @media (max-width: 640px) { .pr-for { min-height: 0; } }
.pr-card { border-width: 2px; }
@media screen { .print-only { display: none !important; } }

/* ===== Homepage/login: satu layar penuh, tanpa scroll halaman (desktop) =====
   Panel biru selalu setinggi layar; bila form di kanan lebih tinggi, hanya kolom kanan yang bergulir. */
@media (min-width: 901px) {
  html:has(#login-view:not(.hidden)), body:has(#login-view:not(.hidden)) { overflow: hidden !important; }
  #login-view:not(.hidden) { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  #login-view:not(.hidden) .login-shell { height: 100%; min-height: 0; flex-wrap: nowrap; overflow: hidden; }
  #login-view:not(.hidden) .login-hero { min-height: 0; padding-top: clamp(24px, 5vh, 48px); padding-bottom: clamp(24px, 5vh, 48px); gap: 24px; }
  #login-view:not(.hidden) .login-main { min-height: 0; overflow-y: auto; align-items: flex-start; padding: clamp(16px, 3.5vh, 40px) 24px; }
  #login-view:not(.hidden) .login-wrapper { margin: auto; }
}
body.mode-sekolah:not(.hdr-neutral) #tc-interest { display: none; }
/* Layar pendek (laptop): rapatkan jarak agar form muat tanpa scroll */
@media (min-width: 901px) and (max-height: 960px) {
  #login-view .login-card { padding: 22px 28px; }
  #login-view .login-brand { margin-bottom: 14px; gap: 12px; }
  #login-view .login-brand .brand-logo { height: 42px; }
  #login-view .login-brand h1 { font-size: 1.25rem; }
  #login-view .login-form .form-group, #login-view .login-school-group { margin-bottom: 11px; }
  #login-view .login-tabs { margin-bottom: 12px; }
  #login-view .login-form .btn, #login-view .demo-entry .btn { height: 42px; }
  #login-view .tc-wrap:not(.has-choice) .tc-card, #login-view .tc-card.on { padding: .5rem .75rem; }
  #login-view .tc-wrap { margin-bottom: .6rem; }
  #login-view .tc-interest { margin-top: .7rem; padding: .7rem; }
  #login-view .demo-entry { padding: .75rem; margin-bottom: .7rem; }
}
