/* ============================================================
   DIASTA — Design System & Global Styles
   Dark Mode Premium | Font: Inter | Palet: Navy/Teal/Gold
   ============================================================ */

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

/* ══ CSS Custom Properties (Design Tokens) ════════════════ */
:root {
  /* Color Palette */
  --bg-primary:     #0a0e1a;
  --bg-secondary:   #0f1629;
  --bg-card:        #111827;
  --bg-card-hover:  #1a2332;
  --bg-elevated:    #1f2937;
  --bg-input:       #1a2235;

  /* Accent Colors */
  --accent-teal:    #00d4aa;
  --accent-teal-dim: #00a882;
  --accent-teal-glow: rgba(0, 212, 170, 0.15);
  --accent-gold:    #ffd700;
  --accent-gold-dim: #e6c200;
  --accent-gold-glow: rgba(255, 215, 0, 0.15);
  --accent-blue:    #4f8ef7;
  --accent-purple:  #a78bfa;
  --accent-coral:   #ff6b6b;

  /* Text Colors */
  --text-primary:   #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-accent:    #00d4aa;

  /* Border */
  --border-color:   #1e2d45;
  --border-focus:   #00d4aa;

  /* Status Colors */
  --success:        #10b981;
  --warning:        #f59e0b;
  --error:          #ef4444;
  --info:           #3b82f6;

  /* Gradients */
  --gradient-hero:  linear-gradient(135deg, #0a0e1a 0%, #0d1f3c 50%, #0a1628 100%);
  --gradient-card:  linear-gradient(145deg, #111827, #1a2332);
  --gradient-teal:  linear-gradient(135deg, #00d4aa, #00a882);
  --gradient-gold:  linear-gradient(135deg, #ffd700, #e6c200);
  --gradient-accent: linear-gradient(135deg, #00d4aa 0%, #4f8ef7 100%);

  /* Shadows */
  --shadow-sm:      0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md:      0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg:      0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-teal:    0 0 30px rgba(0, 212, 170, 0.2);
  --shadow-gold:    0 0 30px rgba(255, 215, 0, 0.2);

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow:   0.4s ease;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs:   12px;
  --font-size-sm:   14px;
  --font-size-base: 16px;
  --font-size-lg:   18px;
  --font-size-xl:   20px;
  --font-size-2xl:  24px;
  --font-size-3xl:  30px;
  --font-size-4xl:  36px;
  --font-size-5xl:  48px;
}

/* ══ Reset & Base ════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: var(--font-size-base);
}

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
a { color: var(--accent-teal); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-teal-dim); }

/* ══ SPA Container ═══════════════════════════════════════ */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  display: none;
  flex: 1;
  animation: fadeSlideIn 0.35s ease;
}
.page.active { display: flex; flex-direction: column; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══ Layout ══════════════════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}
.container-sm { max-width: 600px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-md { max-width: 800px; margin: 0 auto; padding: 0 var(--space-lg); }

/* ══ Navigation ══════════════════════════════════════════ */
.navbar {
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.navbar-brand span { color: var(--accent-teal); }
.navbar-logo {
  width: 36px;
  height: 36px;
  background: var(--gradient-teal);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--bg-primary);
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.nav-link {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-teal);
  background: var(--accent-teal-glow);
}
.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}
.user-avatar {
  width: 32px; height: 32px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: white;
}

/* ══ Cards ═══════════════════════════════════════════════ */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
}
.card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: var(--shadow-teal);
  transform: translateY(-2px);
}
.card-sm { padding: var(--space-lg); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}
.card-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
}

/* ══ Buttons ════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px var(--space-xl);
  border-radius: var(--radius-md);
  border: none;
  font-size: var(--font-size-base);
  font-weight: 600;
  transition: all var(--transition-normal);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-teal);
  color: #0a0e1a;
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 212, 170, 0.4);
}

.btn-gold {
  background: var(--gradient-gold);
  color: #0a0e1a;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}
.btn-gold:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background: var(--accent-teal-glow);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--error);
}

.btn-sm { padding: 8px var(--space-lg); font-size: var(--font-size-sm); }
.btn-lg { padding: 16px var(--space-2xl); font-size: var(--font-size-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-sm); }

/* ══ Form Elements ═══════════════════════════════════════ */
.form-group { margin-bottom: var(--space-lg); }
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: 12px var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
  outline: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-teal-glow);
}
.form-control::placeholder { color: var(--text-muted); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2394a3b8' d='M8 10.5L2 4.5h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
.form-error {
  color: var(--error);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
}
.form-hint {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
}

/* ══ Alert / Toast ═══════════════════════════════════════ */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.alert-success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: var(--success); }
.alert-error   { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: var(--error); }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: var(--warning); }
.alert-info    { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: var(--info); }

/* Toast Notification */
#toast-container {
  position: fixed;
  top: 80px;
  right: var(--space-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  min-width: 280px;
  max-width: 400px;
  border-left: 4px solid;
}
.toast-success { background: var(--bg-card); border-color: var(--success); color: var(--success); }
.toast-error   { background: var(--bg-card); border-color: var(--error); color: var(--error); }
.toast-info    { background: var(--bg-card); border-color: var(--info); color: var(--info); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ══ Badge ═══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-teal    { background: var(--accent-teal-glow); color: var(--accent-teal); border: 1px solid rgba(0,212,170,0.3); }
.badge-gold    { background: var(--accent-gold-glow); color: var(--accent-gold); border: 1px solid rgba(255,215,0,0.3); }
.badge-gray    { background: rgba(100,116,139,0.2); color: var(--text-secondary); }
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-error   { background: rgba(239,68,68,0.15); color: var(--error); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }

/* ══ Divider ════════════════════════════════════════════ */
.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-xl) 0;
}
.divider-text {
  text-align: center;
  position: relative;
  margin: var(--space-xl) 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}
.divider-text::before, .divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 60px);
  border-top: 1px solid var(--border-color);
}
.divider-text::before { left: 0; }
.divider-text::after  { right: 0; }

/* ══ Loading Spinner ════════════════════════════════════ */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  z-index: 9998;
  backdrop-filter: blur(4px);
}
.loading-text {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ══ Progress Bar ═══════════════════════════════════════ */
.progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-teal);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* ══ Grid Layouts ═══════════════════════════════════════ */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ══ Hero / Landing Section ═════════════════════════════ */
.hero-section {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.08) 0%, transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  bottom: -50px; right: 10%;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 16px;
  background: var(--accent-teal-glow);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent-teal);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, #f0f4ff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title span {
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
  font-weight: 400;
}
.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-value {
  font-size: var(--font-size-3xl);
  font-weight: 900;
  color: var(--accent-teal);
  line-height: 1;
  margin-bottom: var(--space-xs);
}
.hero-stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ══ Test Module Cards ══════════════════════════════════ */
.module-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-teal);
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.module-card:hover::before { opacity: 0.05; }
.module-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: var(--space-lg);
}
.module-icon-mbti    { background: rgba(0, 212, 170, 0.15); }
.module-icon-bigfive { background: rgba(255, 215, 0, 0.15); }
.module-icon-iq      { background: rgba(79, 142, 247, 0.15); }
.module-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: var(--space-md);
}
.module-status.selesai { color: var(--success); }
.module-status.belum   { color: var(--text-muted); }
.module-status.aktif   { color: var(--accent-teal); }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.status-dot.aktif { animation: blink 1s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ══ Test Runner Styles ══════════════════════════════════ */
.test-runner-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-primary);
}
.test-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.test-progress-area {
  flex: 1;
  max-width: 500px;
}
.test-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}
.test-timer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--accent-teal);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.test-timer.warning { color: var(--warning); animation: pulse 1s ease-in-out infinite; }
.test-timer.danger  { color: var(--error); animation: pulse 0.5s ease-in-out infinite; }
.timer-svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.timer-track { fill: none; stroke: var(--border-color); stroke-width: 3; }
.timer-fill { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.3s ease; }

.test-body {
  flex: 1;
  padding: var(--space-3xl) var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.question-number {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}
.question-text {
  font-size: var(--font-size-xl);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: var(--space-2xl);
}

/* Forced Choice (MBTI) */
.forced-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.choice-btn {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  font-family: inherit;
}
.choice-btn:hover {
  border-color: var(--accent-teal);
  background: var(--accent-teal-glow);
  transform: translateY(-2px);
}
.choice-btn.selected {
  border-color: var(--accent-teal);
  background: var(--accent-teal-glow);
  box-shadow: 0 0 0 3px var(--accent-teal-glow);
}
.choice-btn.selected::after {
  content: '✓';
  position: absolute;
  top: var(--space-sm); right: var(--space-sm);
  width: 24px; height: 24px;
  background: var(--accent-teal);
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.choice-label {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

/* Likert Scale (Big Five) */
.likert-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
}
.likert-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
}
.likert-btn:hover { border-color: var(--accent-teal); background: var(--accent-teal-glow); }
.likert-btn.selected { border-color: var(--accent-teal); background: var(--accent-teal-glow); }
.likert-number {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--accent-teal);
}
.likert-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* Multiple Choice (IQ Verbal/Numerical) */
.multiple-choice { display: flex; flex-direction: column; gap: var(--space-sm); }
.mc-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  text-align: left;
}
.mc-btn:hover { border-color: var(--accent-teal); background: var(--accent-teal-glow); }
.mc-btn.selected { border-color: var(--accent-teal); background: var(--accent-teal-glow); }
.mc-key {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--font-size-sm);
  color: var(--accent-teal);
  flex-shrink: 0;
}
.mc-btn.selected .mc-key { background: var(--accent-teal); color: var(--bg-primary); }

/* Matrix Grid (IQ Abstract) */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  max-width: 360px;
  margin: 0 auto var(--space-2xl);
}
.matrix-cell {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.matrix-cell.missing {
  border-color: var(--accent-gold);
  border-style: dashed;
  background: rgba(255, 215, 0, 0.05);
}
.matrix-cell svg { width: 80%; height: 80%; }
.matrix-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
}
.matrix-opt {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  gap: 4px;
  font-family: inherit;
}
.matrix-opt:hover { border-color: var(--accent-teal); background: var(--accent-teal-glow); }
.matrix-opt.selected { border-color: var(--accent-teal); background: var(--accent-teal-glow); }
.matrix-opt svg { width: 70%; height: 70%; }
.matrix-opt-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--accent-teal);
}

/* Memory Sequence */
.memory-display {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin: var(--space-2xl) 0;
  flex-wrap: wrap;
}
.memory-item {
  width: 64px; height: 64px;
  background: var(--bg-card);
  border: 2px solid var(--accent-teal);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--accent-teal);
  font-variant-numeric: tabular-nums;
  animation: memoryReveal 0.3s ease;
}
@keyframes memoryReveal {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.memory-hidden { opacity: 0; }
.memory-timer-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-lg);
}

/* Test Navigation */
.test-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  position: sticky;
  bottom: 0;
  gap: var(--space-md);
}

/* ══ Results Page ════════════════════════════════════════ */
.result-section {
  padding: var(--space-2xl) 0;
}
.result-section:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-2xl);
}
.section-tag {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}
.section-heading {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.5px;
}
.mbti-type-display {
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 900;
  letter-spacing: -4px;
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-sm);
}
.iq-score-display {
  font-size: clamp(64px, 12vw, 120px);
  font-weight: 900;
  letter-spacing: -6px;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.dimension-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.dim-label {
  width: 80px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.dim-bar-container {
  flex: 1;
  position: relative;
  height: 24px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: visible;
}
.dim-bar-fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dim-bar-fill.left  { background: var(--gradient-teal); }
.dim-bar-fill.right { background: var(--gradient-gold); right: 0; left: auto; }
.dim-value {
  width: 50px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-align: right;
  color: var(--accent-teal);
  flex-shrink: 0;
}

/* ══ Dashboard ═══════════════════════════════════════════ */
.dashboard-header {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border-color);
}
.welcome-text {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: var(--space-sm);
}
.welcome-text span { color: var(--accent-teal); }

/* ══ Table Styles ════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}
thead th {
  background: var(--bg-elevated);
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: var(--font-size-xs);
  white-space: nowrap;
}
tbody td {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}
tbody tr:hover { background: var(--bg-elevated); }
tbody tr:first-child td { border-top: none; }

/* ══ Admin Panel ════════════════════════════════════════ */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: var(--space-xl) var(--space-md);
}
.sidebar-title {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-md);
  padding: 0 var(--space-sm);
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.sidebar-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sidebar-item.active { background: var(--accent-teal-glow); color: var(--accent-teal); }
.admin-content {
  flex: 1;
  padding: var(--space-2xl);
  overflow-y: auto;
}

/* ══ Mode Tes Indicator ══════════════════════════════════ */
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px var(--space-lg);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.mode-terpadu { background: rgba(0,212,170,0.1); color: var(--accent-teal); border: 1px solid rgba(0,212,170,0.3); }
.mode-terpisah { background: rgba(255,215,0,0.1); color: var(--accent-gold); border: 1px solid rgba(255,215,0,0.3); }

/* ══ Stat Cards ════════════════════════════════════════ */
.stat-card {
  padding: var(--space-xl);
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
}
.stat-value {
  font-size: var(--font-size-4xl);
  font-weight: 900;
  color: var(--accent-teal);
  line-height: 1;
  margin-bottom: var(--space-xs);
  letter-spacing: -2px;
}
.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ══ Radar Chart Container ═══════════════════════════════ */
.chart-container {
  position: relative;
  height: 300px;
  margin: var(--space-lg) 0;
}

/* ══ Informed Consent Page ═══════════════════════════════ */
.consent-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--space-xl);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}
.consent-box::-webkit-scrollbar { width: 4px; }
.consent-box::-webkit-scrollbar-track { background: var(--border-color); }
.consent-box::-webkit-scrollbar-thumb { background: var(--accent-teal); border-radius: 2px; }

/* ══ PDF Print Styles ════════════════════════════════════ */
@media print {
  body { background: white; color: black; }
  .navbar, .test-nav, #toast-container { display: none !important; }
  .page { display: block !important; }
  .card { border: 1px solid #ddd; break-inside: avoid; }
}

/* ══ Scrollbar Styling ═══════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-teal-dim); }

/* ══ Responsive ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .forced-choice { grid-template-columns: 1fr; }
  .likert-scale { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .likert-label { display: none; }
  .matrix-options { grid-template-columns: repeat(5, 1fr); }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
  .hero-title { font-size: 36px; }
  .test-body { padding: var(--space-xl) var(--space-md); }
  .container { padding: 0 var(--space-md); }
  .forced-choice .choice-btn { padding: var(--space-lg); }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .navbar { padding: 0 var(--space-md); }
  .matrix-grid { max-width: 240px; }
  .test-timer { font-size: var(--font-size-lg); }
}
