/* ============================================================
   TOEFL WAR ROOM — main.css v2
   app.brighten.id — Light mode only
   ============================================================ */

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

:root {
  --bg:          #F4F6FB;
  --surface:     #FFFFFF;
  --border:      #E5E7F0;
  --primary:     #6366F1;
  --primary-bg:  #EEF2FF;
  --primary-dark:#4F46E5;
  --text:        #111827;
  --text-sec:    #4B5563;
  --text-muted:  #9CA3AF;
  --teal:        #1D9E75;
  --teal-bg:     #E1F5EE;
  --purple:      #534AB7;
  --purple-bg:   #EEEDFE;
  --amber:       #BA7517;
  --amber-bg:    #FAEEDA;
  --red:         #E24B4A;
  --red-bg:      #FCEBEB;
  --radius:      14px;
  --radius-sm:   8px;
  --radius-xs:   6px;
  --sidebar-w:   256px;
  --topbar-h:    56px;
  --font:        system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
ul { list-style: none; }

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

/* ═══════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.25s ease;
}

/* Logo / Brand */
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; flex-shrink: 0;
}
.sidebar-logo-text { flex: 1; min-width: 0; }
.sidebar-logo-text .app-name {
  font-size: 14px; font-weight: 800; color: var(--text);
  line-height: 1.25; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-logo-text .app-sub {
  font-size: 11.5px; color: var(--text-muted); line-height: 1.3;
  font-weight: 500; margin-top: 1px;
}

/* User Card */
.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}
.user-avatar {
  width: 38px; height: 38px;
  background: var(--primary-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--primary); flex-shrink: 0;
  border: 2px solid #fff;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-target {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px; margin-top: 1px;
}
.user-target-pill {
  display: inline-flex; align-items: center;
  background: var(--primary-bg); color: var(--primary);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px;
}

/* Nav */
.sidebar-nav { flex: 1; padding: 14px 0 8px; overflow-y: auto; }
.nav-section { padding: 0 12px; margin-bottom: 4px; }
.nav-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 12px 8px 5px; display: block;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text-sec); font-size: 13.5px; font-weight: 500;
  cursor: pointer; margin-bottom: 1px;
  transition: background 0.13s, color 0.13s;
  position: relative;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.nav-item.active .nav-icon {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.nav-icon {
  width: 30px; height: 30px;
  background: var(--bg);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  transition: background 0.13s;
}
.nav-item:hover .nav-icon { background: var(--border); }
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.btn-logout {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border-radius: 10px; border: none; background: none;
  color: var(--red); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: background 0.13s;
  text-align: left;
}
.btn-logout:hover { background: var(--red-bg); }
.btn-logout .nav-icon { background: var(--red-bg); color: var(--red); }

/* ═══════════════════════════════════════
   MOBILE TOPBAR
═══════════════════════════════════════ */
.mobile-topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center; justify-content: space-between;
  padding: 0 16px;
  z-index: 150;
}
.mobile-topbar-brand {
  display: flex; align-items: center; gap: 10px;
}
.mobile-topbar-brand .brand-icon {
  width: 32px; height: 32px;
  background: var(--primary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.mobile-topbar-brand .brand-name {
  font-size: 14px; font-weight: 800; color: var(--text);
  letter-spacing: -0.02em;
}
.hamburger {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--bg); border-radius: 8px;
  cursor: pointer; font-size: 20px; color: var(--text-sec);
  flex-shrink: 0;
}

/* Sidebar overlay on mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 199;
  opacity: 0;
  transition: opacity 0.25s;
}
.sidebar-overlay.show { display: block; opacity: 1; }

/* ═══════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  padding: 32px 36px;
}

/* ═══════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════ */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px;
  margin-bottom: 28px; flex-wrap: wrap;
}
.page-header-left { flex: 1; min-width: 0; }
.page-title { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.2; letter-spacing: -0.02em; }
.page-subtitle { font-size: 13.5px; color: var(--text-sec); margin-top: 5px; }
.page-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600; line-height: 1.5;
}
.badge-indigo { background: var(--primary-bg); color: var(--primary); }
.badge-teal   { background: var(--teal-bg);    color: var(--teal); }
.badge-purple { background: var(--purple-bg);  color: var(--purple); }
.badge-amber  { background: var(--amber-bg);   color: var(--amber); }
.badge-red    { background: var(--red-bg);     color: var(--red); }

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.card-link { font-size: 12px; color: var(--primary); font-weight: 600; }
.card-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.indigo { background: var(--primary-bg); color: var(--primary); }
.stat-icon.red    { background: var(--red-bg);     color: var(--red); }
.stat-icon.teal   { background: var(--teal-bg);    color: var(--teal); }
.stat-icon.amber  { background: var(--amber-bg);   color: var(--amber); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -0.02em; }
.stat-sub   { font-size: 11.5px; color: var(--text-muted); }

/* ═══════════════════════════════════════
   SECTION PROGRESS CARDS
═══════════════════════════════════════ */
.section-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
}
.section-card-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.section-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.section-card-icon.teal   { background: var(--teal-bg);   color: var(--teal); }
.section-card-icon.purple { background: var(--purple-bg); color: var(--purple); }
.section-card-icon.amber  { background: var(--amber-bg);  color: var(--amber); }
.section-akurasi-label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.section-akurasi-value {
  font-size: 36px; font-weight: 800; line-height: 1;
  margin-bottom: 12px; letter-spacing: -0.02em;
}
.section-akurasi-value.teal   { color: var(--teal); }
.section-akurasi-value.purple { color: var(--purple); }
.section-akurasi-value.amber  { color: var(--amber); }
.progress-bar {
  height: 5px; background: var(--bg);
  border-radius: 99px; overflow: hidden; margin-bottom: 14px;
}
.progress-fill { height: 100%; border-radius: 99px; }
.progress-fill.teal   { background: var(--teal); }
.progress-fill.purple { background: var(--purple); }
.progress-fill.amber  { background: var(--amber); }
.section-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px;
}
.section-card-footer span { color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.section-card-footer a { color: var(--primary); font-weight: 600; }
.section-card-footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   BOTTOM GRID
═══════════════════════════════════════ */
.bottom-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 24px;
}

/* ═══════════════════════════════════════
   ERROR WALL
═══════════════════════════════════════ */
.error-list { display: flex; flex-direction: column; }
.error-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.error-item:last-child { border-bottom: none; padding-bottom: 0; }
.error-item-body { flex: 1; min-width: 0; }
.error-item-desc {
  font-size: 13px; color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.error-item-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.error-item-action { flex-shrink: 0; }
.link-review { font-size: 12px; color: var(--primary); font-weight: 600; }
.link-review:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   SESI LIST
═══════════════════════════════════════ */
.sesi-list { display: flex; flex-direction: column; }
.sesi-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.sesi-item:last-child { border-bottom: none; }
.sesi-date { color: var(--text-sec); font-weight: 500; }
.sesi-right { display: flex; align-items: center; gap: 8px; }
.sesi-score { font-weight: 700; font-size: 13.5px; }
.sesi-score.good { color: var(--teal); }
.sesi-score.mid  { color: var(--amber); }
.sesi-score.low  { color: var(--red); }

/* ═══════════════════════════════════════
   QUICK ACTIONS
═══════════════════════════════════════ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.quick-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-sec);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.13s;
  white-space: nowrap;
}
.quick-btn:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.quick-btn .btn-icon {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.quick-btn.listen .btn-icon  { background: var(--teal-bg);   color: var(--teal); }
.quick-btn.struct .btn-icon  { background: var(--purple-bg); color: var(--purple); }
.quick-btn.read   .btn-icon  { background: var(--amber-bg);  color: var(--amber); }
.quick-btn.err    .btn-icon  { background: var(--red-bg);    color: var(--red); }
.quick-btn.mock   .btn-icon  { background: var(--primary-bg);color: var(--primary); }
.quick-btn.score  .btn-icon  { background: var(--primary-bg);color: var(--primary); }

/* ═══════════════════════════════════════
   STREAK BADGE
═══════════════════════════════════════ */
.streak-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: var(--amber-bg); color: var(--amber);
  border-radius: 20px; font-size: 12.5px; font-weight: 700;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600;
  transition: opacity 0.13s, background 0.13s;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--text-sec);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); opacity: 1; }
.btn-red { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════
   FORMS
═══════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-label .required { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%; padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  outline: none; transition: border-color 0.15s; appearance: none;
  font-size: 13.5px;
}
.form-control:focus { border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 88px; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ═══════════════════════════════════════
   SECTION TABS (Log Error)
═══════════════════════════════════════ */
.section-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.section-tab {
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.section-tab:hover { border-color: var(--text-muted); }
.section-tab.active-teal   { border-color: var(--teal);   background: var(--teal-bg); }
.section-tab.active-purple { border-color: var(--purple); background: var(--purple-bg); }
.section-tab.active-amber  { border-color: var(--amber);  background: var(--amber-bg); }
.section-tab .tab-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 10px;
}
.section-tab .tab-icon.teal   { background: var(--teal-bg);   color: var(--teal); }
.section-tab .tab-icon.purple { background: var(--purple-bg); color: var(--purple); }
.section-tab .tab-icon.amber  { background: var(--amber-bg);  color: var(--amber); }
.section-tab .tab-name { font-size: 14px; font-weight: 700; color: var(--text); }
.section-tab .tab-sub  { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.section-tab.active-teal .tab-name   { color: var(--teal); }
.section-tab.active-purple .tab-name { color: var(--purple); }
.section-tab.active-amber .tab-name  { color: var(--amber); }

/* ═══════════════════════════════════════
   CONDITIONAL FIELDS
═══════════════════════════════════════ */
.conditional-fields { display: none; }
.conditional-fields.show { display: block; }

/* ═══════════════════════════════════════
   TABLE
═══════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 11px 14px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border); background: var(--bg);
  white-space: nowrap;
}
tbody td {
  padding: 13px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-sec); vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #FAFBFF; }
td .td-main { font-size: 13px; font-weight: 600; color: var(--text); }
td .td-sub  { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════
   FILTER TABS
═══════════════════════════════════════ */
.filter-tabs {
  display: flex; gap: 0;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.filter-tab {
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; border: none; background: none;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  transition: color 0.13s, border-color 0.13s;
  white-space: nowrap;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ═══════════════════════════════════════
   SCORE INPUTS
═══════════════════════════════════════ */
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.score-input-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.score-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 12px;
}
.score-input-card.teal   .score-section-label { color: var(--teal); }
.score-input-card.purple .score-section-label { color: var(--purple); }
.score-input-card.amber  .score-section-label { color: var(--amber); }
.score-result-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center; margin-bottom: 18px;
}
.score-result-box .total-score { font-size: 52px; font-weight: 800; color: var(--primary); line-height: 1; letter-spacing: -0.03em; }
.score-result-box .score-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.score-result-box .score-gap   { font-size: 13px; margin-top: 10px; font-weight: 700; }
.score-result-box .score-gap.positive { color: var(--teal); }
.score-result-box .score-gap.negative { color: var(--red); }
.scaled-display { text-align: center; margin-top: 10px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.scaled-display.teal   { color: var(--teal); }
.scaled-display.purple { color: var(--purple); }
.scaled-display.amber  { color: var(--amber); }
.scaled-label { font-size: 11px; color: var(--text-muted); text-align: center; font-weight: 500; }

/* ═══════════════════════════════════════
   CSS BAR CHART
═══════════════════════════════════════ */
.chart-wrap { padding: 8px 0; }
.chart-bars {
  display: flex; align-items: flex-end; gap: 8px;
  height: 120px; border-bottom: 1px solid var(--border);
  padding-bottom: 4px; margin-bottom: 8px;
}
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chart-bar {
  width: 100%; border-radius: 5px 5px 0 0;
  background: var(--primary-bg); min-height: 4px;
  transition: background 0.2s;
}
.chart-bar:hover { background: var(--primary); cursor: default; }
.chart-bar.highlight { background: var(--primary); }
.chart-bar-val  { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.chart-bar-date { font-size: 10px; color: var(--text-muted); text-align: center; }

/* ═══════════════════════════════════════
   ALERT
═══════════════════════════════════════ */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; font-weight: 500; }
.alert-success { background: var(--teal-bg); color: var(--teal); border: 1px solid #b7e4d5; }
.alert-error   { background: var(--red-bg);  color: var(--red);  border: 1px solid #f5c6c6; }

/* ═══════════════════════════════════════
   AUTH PAGES
═══════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; background: var(--bg); padding: 24px;
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 36px;
  width: 100%; max-width: 420px;
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.auth-logo-icon {
  width: 42px; height: 42px; background: var(--primary);
  border-radius: 11px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; flex-shrink: 0;
}
.auth-logo-text .app-name { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.auth-logo-text .app-sub  { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 13.5px; color: var(--text-sec); margin-bottom: 28px; }
.auth-footer { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 700; }
.auth-footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════ */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; opacity: 0.5; }
.empty-state p { font-size: 13.5px; }

/* ═══════════════════════════════════════
   PLACEHOLDER PAGE
═══════════════════════════════════════ */
.placeholder-page { text-align: center; padding: 60px 20px; }
.placeholder-page .ph-icon {
  width: 72px; height: 72px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin: 0 auto 18px;
}
.placeholder-page h2 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -0.02em; }
.placeholder-page p  { font-size: 14px; color: var(--text-sec); margin-bottom: 24px; line-height: 1.6; }
.units-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-top: 28px; text-align: left;
}
.unit-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 15px;
  font-size: 12.5px; font-weight: 600; color: var(--text-sec);
  display: flex; align-items: center; gap: 8px;
  transition: border-color 0.13s;
}
.unit-chip:hover { border-color: var(--primary); color: var(--primary); }
.unit-chip i { font-size: 15px; flex-shrink: 0; }

/* ═══════════════════════════════════════
   MISC
═══════════════════════════════════════ */
.divider { height: 1px; background: var(--border); margin: 22px 0; }
.form-check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.form-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-check-label { font-size: 13.5px; color: var(--text-sec); }

/* Review */
.review-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; max-width: 660px;
}
.review-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.review-field { margin-bottom: 16px; }
.review-field-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 5px;
}
.review-field-value { font-size: 14px; color: var(--text); line-height: 1.6; }

/* Score section stats */
.score-section-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px;
}
.score-section-stat {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.score-section-stat .label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; margin-bottom: 5px; }
.score-section-stat .value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.score-section-stat.teal   .value { color: var(--teal); }
.score-section-stat.purple .value { color: var(--purple); }
.score-section-stat.amber  .value { color: var(--amber); }

/* ═══════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1100px)
═══════════════════════════════════════ */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .main-content { padding: 28px 24px; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — Mobile (≤ 768px)
═══════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  /* Show mobile topbar */
  .mobile-topbar { display: flex; }

  /* Sidebar becomes overlay on mobile */
  .sidebar {
    transform: translateX(-100%);
    top: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  }
  .sidebar.open { transform: translateX(0); }

  /* Main content goes full width, offset for topbar */
  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-top: calc(var(--topbar-h) + 20px);
  }

  /* Page header tighter */
  .page-title { font-size: 18px; }
  .page-subtitle { font-size: 12.5px; }

  /* Stat cards 2 column */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; gap: 10px; }
  .stat-value { font-size: 24px; }
  .stat-icon { width: 36px; height: 36px; font-size: 18px; }

  /* Section cards: full width stack */
  .section-cards { grid-template-columns: 1fr; gap: 12px; }
  .section-akurasi-value { font-size: 30px; }

  /* Bottom grid stack */
  .bottom-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Quick actions: 3-column grid on mobile */
  .quick-actions { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quick-btn { padding: 10px 8px; font-size: 12px; gap: 6px; }

  /* Score grid */
  .score-grid { grid-template-columns: 1fr; }
  .score-section-grid { grid-template-columns: 1fr; }

  /* Section tabs */
  .section-tabs { grid-template-columns: 1fr; gap: 10px; }

  /* Forms */
  .form-row, .form-row-3 { grid-template-columns: 1fr; gap: 0; }

  /* Auth card */
  .auth-card { padding: 28px 22px; }

  /* Filter tabs scrollable */
  .filter-tabs { overflow-x: auto; padding-bottom: 0; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { padding: 8px 12px; }

  /* Cards */
  .card { padding: 16px; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; gap: 10px; }
  .page-header-right { align-self: flex-start; }
}
