/* ── Wise-Inspired Design System ────────────────────────────────────────────
   Near-black #0e0f0c · Lime Green #9fe870 · Inter 600 body
   Pill buttons · scale(1.05) hover · ring shadows only · "calt" everywhere
   ─────────────────────────────────────────────────────────────────────────── */

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

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

:root {
  /* ── Brand ───────────── */
  --green:       #9fe870;
  --green-dark:  #163300;
  --green-light: #e2f6d5;
  --green-hover: #cdffad;
  --green-nav:   rgba(211, 242, 192, 0.4);
  --green-sub:   rgba(22, 51, 0, 0.08);

  /* ── Neutrals ────────── */
  --black:   #0e0f0c;
  --gray2:   #454745;
  --gray3:   #868685;
  --surface: #e8ebe6;
  --bg:      #ffffff;
  --bg2:     #f7f9f5;

  /* ── Semantic ────────── */
  --pos:     #054d28;
  --danger:  #d03238;
  --warn:    #ffd11a;

  /* ── Shadows (ring only) */
  --ring:       rgba(14,15,12,0.12) 0px 0px 0px 1px;
  --ring-inset: rgb(134,134,133) 0px 0px 0px 1px inset;
  --ring-green: rgba(159,232,112,0.5) 0px 0px 0px 3px;

  /* ── Radius ──────────── */
  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   20px;
  --r-xl:   30px;
  --r-2xl:  40px;
  --r-pill: 9999px;

  /* ── Type ────────────── */
  --font: 'Inter', 'Helvetica', 'Arial', sans-serif;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--black);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.44;
  letter-spacing: 0.18px;
  font-feature-settings: "calt";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--ring);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 0.85;
  color: var(--black);
  font-feature-settings: "calt";
}

.nav-links { display: flex; gap: 0.25rem; align-items: center; }

.nav-link {
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-pill);
  color: var(--gray2);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.nav-link:hover {
  background: var(--green-nav);
  color: var(--black);
  transform: scale(1.03);
}
.nav-link.active {
  background: var(--green);
  color: var(--green-dark);
}

/* ── Navbar user pill ─────────────────────────────────────────────────────── */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.4rem;
  border-radius: var(--r-pill);
  background: var(--green-light);
  margin-left: 0.5rem;
}

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-feature-settings: "calt";
}

.nav-username {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.nav-logout {
  margin-left: 0.25rem;
  font-size: 0.8rem !important;
  padding: 0.3rem 0.8rem !important;
}

/* ── Main ─────────────────────────────────────────────────────────────────── */
.main-content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ── Page header ──────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 2.5rem; }

.page-header h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -1.5px;
  color: var(--black);
  font-feature-settings: "calt";
  margin-bottom: 0.6rem;
}

.page-header .subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.108px;
  font-feature-settings: "calt";
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
  box-shadow: var(--ring);
}

/* Scale hover — the Wise signature */
.btn:hover  { transform: scale(1.05); }
.btn:active { transform: scale(0.95); }

/* Primary — Wise Green */
.btn-primary {
  background: var(--green);
  color: var(--green-dark);
  box-shadow: none;
}
.btn-primary:hover { background: var(--green-hover); }

/* Outline — subtle dark */
.btn-outline {
  background: var(--bg);
  color: var(--black);
  box-shadow: var(--ring);
}
.btn-outline:hover { background: var(--bg2); }

/* Secondary green-tinted */
.btn-secondary {
  background: var(--green-sub);
  color: var(--black);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--green-light); }

/* Success */
.btn-success {
  background: var(--pos);
  color: #fff;
  box-shadow: none;
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: none;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
}

/* Record button */
.btn-record {
  background: var(--black);
  color: #fff;
  padding: 0.9rem 2.75rem;
  font-size: 1rem;
  font-weight: 900;
  border-radius: var(--r-pill);
  letter-spacing: 0.5px;
  gap: 0.6rem;
  box-shadow: none;
  transition: transform 0.15s, background 0.15s;
}
.btn-record:hover  { transform: scale(1.05); background: var(--gray2); }
.btn-record:active { transform: scale(0.95); }

.btn-record.recording {
  background: var(--danger);
  animation: rec-pulse 1.4s infinite;
}
@keyframes rec-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(208,50,56,.4); }
  70%  { box-shadow: 0 0 0 14px rgba(208,50,56,0); }
  100% { box-shadow: 0 0 0 0   rgba(208,50,56,0); }
}

.rec-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  flex-shrink: 0;
}
.btn-record.recording .rec-dot { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Dashboard stats ──────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 1.75rem 1.6rem;
  box-shadow: var(--ring);
  transition: transform 0.15s;
}
.stat-card:hover { transform: scale(1.02); }

.stat-card.stat-done { background: var(--green-light); }

.stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -1.5px;
  color: var(--black);
  font-feature-settings: "calt";
  margin-bottom: 0.4rem;
}

.stat-done .stat-number { color: var(--green-dark); }

.stat-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray2);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.stat-sub {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--gray3);
  margin-top: 0.15rem;
  letter-spacing: -0.05px;
}

/* ── Progress bar ─────────────────────────────────────────────────────────── */
.progress-section { margin-bottom: 2rem; }

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  margin-bottom: 0.6rem;
  font-feature-settings: "calt";
}

.progress-bar-bg {
  background: var(--surface);
  border-radius: var(--r-pill);
  height: 8px;
  overflow: hidden;
  box-shadow: var(--ring);
}

.progress-bar-fill {
  background: var(--green);
  height: 100%;
  border-radius: var(--r-pill);
  transition: width 0.5s ease;
}

/* ── Action section ───────────────────────────────────────────────────────── */
.action-section {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* ── Info cards ───────────────────────────────────────────────────────────── */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.info-card {
  background: var(--bg2);
  border-radius: var(--r-lg);
  padding: 1.35rem;
  box-shadow: var(--ring);
  transition: transform 0.15s;
}
.info-card:hover { transform: scale(1.02); }

.info-icon { font-size: 1.4rem; margin-bottom: 0.55rem; }

.info-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.3rem;
  letter-spacing: -0.1px;
  font-feature-settings: "calt";
}

.info-body {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--gray3);
  line-height: 1.55;
  letter-spacing: -0.05px;
}

/* ── Record layout ────────────────────────────────────────────────────────── */
.record-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 740px) {
  .record-layout { grid-template-columns: 1fr; }
  .record-sidebar { display: none; }
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.record-sidebar {
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 1.4rem;
  position: sticky;
  top: 84px;
  box-shadow: var(--ring);
}

.sidebar-stat { margin-bottom: 1rem; }

.sidebar-num {
  font-size: 2rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -1px;
  color: var(--black);
  display: block;
  margin-bottom: 0.2rem;
  font-feature-settings: "calt";
}

.sidebar-lbl {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.sidebar-progress-wrap {
  background: var(--surface);
  border-radius: var(--r-pill);
  height: 5px;
  overflow: hidden;
  margin: 1rem 0 0.3rem;
  box-shadow: var(--ring);
}

.sidebar-progress-fill {
  background: var(--green);
  height: 100%;
  border-radius: var(--r-pill);
  width: 0%;
  transition: width 0.4s ease;
}

.sidebar-pct {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gray3);
  text-align: right;
  margin-bottom: 1rem;
  letter-spacing: -0.05px;
}

.sidebar-tips {
  border-top: 1px solid var(--surface);
  padding-top: 1rem;
}
.sidebar-tips p {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--black);
  font-feature-settings: "calt";
}
.sidebar-tips ul { padding-left: 1rem; }
.sidebar-tips li {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--gray3);
  margin-bottom: 0.35rem;
  line-height: 1.5;
  letter-spacing: -0.05px;
}

/* ── Record center ────────────────────────────────────────────────────────── */
.record-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* ── Sentence card ────────────────────────────────────────────────────────── */
.sentence-card {
  width: 100%;
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 2.5rem 2.75rem;
  text-align: center;
  box-shadow: var(--ring);
}

.sentence-id {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray3);
  margin-bottom: 0.35rem;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.sentence-category {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: var(--r-pill);
  padding: 0.2rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-feature-settings: "calt";
  margin-bottom: 1.5rem;
}

.sentence-zulu {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 0.95;
  color: var(--black);
  margin-bottom: 1rem;
  letter-spacing: -1px;
  font-feature-settings: "calt";
}

.sentence-english {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  line-height: 1.44;
  font-feature-settings: "calt";
}

/* ── Edit trigger (inside sentence card) ─────────────────────────────────── */
.btn-edit-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.25rem;
  padding: 0.3rem 0.9rem;
  background: var(--green-sub);
  color: var(--green-dark);
  border: none;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  font-feature-settings: "calt";
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn-edit-trigger:hover  { transform: scale(1.05); background: var(--green-light); }
.btn-edit-trigger:active { transform: scale(0.95); }

/* ── Edit panel ───────────────────────────────────────────────────────────── */
.edit-panel {
  width: 100%;
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 1.75rem 2rem;
  box-shadow: var(--ring);
  animation: slide-in 0.2s ease;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.edit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.edit-panel-title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  font-feature-settings: "calt";
  color: var(--black);
}

.btn-icon {
  background: var(--bg2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--gray3);
  box-shadow: var(--ring);
  transition: transform 0.15s, background 0.15s;
}
.btn-icon:hover  { transform: scale(1.1); background: var(--surface); color: var(--black); }
.btn-icon:active { transform: scale(0.9); }

.edit-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray2);
  margin-bottom: 0.4rem;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}
.edit-required { color: var(--danger); margin-left: 2px; }

.edit-textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid rgba(14,15,12,0.12);
  border-radius: var(--r-md);
  color: var(--black);
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  resize: vertical;
  outline: none;
  box-shadow: var(--ring);
  transition: box-shadow 0.15s;
}
.edit-textarea:focus {
  box-shadow: var(--ring-green);
  border-color: var(--green);
}
.edit-textarea::placeholder { color: var(--gray3); font-weight: 400; }

.edit-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ── Waveform ─────────────────────────────────────────────────────────────── */
.waveform-wrap {
  width: 100%;
  position: relative;
  background: var(--bg2);
  border-radius: var(--r-lg);
  height: 80px;
  overflow: hidden;
  box-shadow: var(--ring);
}

#waveform { display: block; width: 100%; height: 100%; }

.waveform-idle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray3);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  pointer-events: none;
}

/* ── Timer ────────────────────────────────────────────────────────────────── */
.rec-timer {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gray3);
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  font-feature-settings: "calt";
  transition: color 0.2s;
}
.rec-timer.active { color: var(--danger); }

/* ── Record controls ──────────────────────────────────────────────────────── */
.rec-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* ── Post-record ──────────────────────────────────────────────────────────── */
.post-rec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.post-rec audio {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--ring);
}

.post-btns { display: flex; gap: 0.75rem; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--black);
  color: #fff;
  padding: 0.55rem 1.35rem;
  border-radius: var(--r-pill);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
  z-index: 999;
  box-shadow: var(--ring);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Keyboard hints ───────────────────────────────────────────────────────── */
.kbd-hints {
  color: var(--gray3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

kbd {
  background: var(--bg2);
  border-radius: var(--r-sm);
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-family: var(--font);
  font-weight: 700;
  box-shadow: var(--ring);
}

/* ── Review page ──────────────────────────────────────────────────────────── */
.review-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.search-box {
  flex: 1;
  background: var(--bg);
  border: 1px solid rgba(14,15,12,0.12);
  border-radius: var(--r-pill);
  color: var(--black);
  padding: 0.6rem 1.25rem;
  font-family: var(--font);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  outline: none;
  box-shadow: var(--ring);
  transition: box-shadow 0.15s, transform 0.15s;
}
.search-box:focus {
  box-shadow: var(--ring-green);
  transform: scale(1.005);
}
.search-box::placeholder { color: var(--gray3); font-weight: 400; }

.review-count {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray3);
  white-space: nowrap;
  letter-spacing: -0.05px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.review-card {
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: var(--ring);
  transition: transform 0.15s, box-shadow 0.15s;
}
.review-card:hover {
  transform: scale(1.02);
  box-shadow: var(--ring), 0 4px 20px rgba(14,15,12,0.08);
}

.review-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-id {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.badge {
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: var(--r-pill);
  padding: 0.1rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-feature-settings: "calt";
}

.review-zulu {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--black);
  line-height: 1.2;
  letter-spacing: -0.3px;
  font-feature-settings: "calt";
}

.review-english {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray3);
  line-height: 1.45;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.review-audio-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-audio {
  flex: 1;
  height: 36px;
  border-radius: var(--r-pill);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.page-info {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
}

/* ── All-done ─────────────────────────────────────────────────────────────── */
.all-done {
  text-align: center;
  padding: 5rem 2rem;
}
.all-done .done-icon { font-size: 3.5rem; margin-bottom: 1.25rem; }
.all-done h2 {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -1.5px;
  color: var(--black);
  font-feature-settings: "calt";
  margin-bottom: 0.75rem;
}
.all-done p {
  color: var(--gray3);
  font-weight: 600;
  margin-bottom: 2rem;
  font-size: 1rem;
  letter-spacing: -0.05px;
}

/* ── Toast review ─────────────────────────────────────────────────────────── */
.toast-review {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--black);
  color: #fff;
  padding: 0.55rem 1.35rem;
  border-radius: var(--r-pill);
  font-size: 0.84rem;
  font-weight: 600;
  font-feature-settings: "calt";
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 999;
  box-shadow: var(--ring);
}
.toast-review.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.loading-msg, .empty-msg {
  color: var(--gray3);
  text-align: center;
  padding: 4rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

/* ── Nav admin link ───────────────────────────────────────────────────────── */
.nav-link-admin {
  color: var(--green-dark) !important;
  background: var(--green-light);
}
.nav-link-admin:hover { background: var(--green) !important; }
.nav-link-admin.active { background: var(--green) !important; }

/* ── Admin tabs ───────────────────────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--surface);
  padding-bottom: 0;
}

.admin-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.6rem 1.2rem;
  font-family: var(--font);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--gray3);
  cursor: pointer;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.admin-tab:hover  { color: var(--black); }
.admin-tab.active { color: var(--black); border-bottom-color: var(--green); }

/* ── Admin panels ─────────────────────────────────────────────────────────── */
.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* ── Admin two-column grid ────────────────────────────────────────────────── */
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (max-width: 820px) { .admin-two-col { grid-template-columns: 1fr; } }

/* ── Admin card ───────────────────────────────────────────────────────────── */
.admin-card {
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--ring);
  overflow: hidden;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.admin-card-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -0.1px;
  font-feature-settings: "calt";
}

/* ── Leaderboard ──────────────────────────────────────────────────────────── */
.leaderboard-list { display: flex; flex-direction: column; gap: 0.6rem; }

.lb-row {
  display: grid;
  grid-template-columns: 24px 1fr auto 56px;
  align-items: center;
  gap: 0.6rem;
}

.lb-rank {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--gray3);
  text-align: right;
  font-feature-settings: "calt";
}

.lb-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--black);
  font-feature-settings: "calt";
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-bar-wrap {
  background: var(--surface);
  border-radius: var(--r-pill);
  height: 6px;
  overflow: hidden;
}

.lb-bar {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
}

.lb-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray3);
  text-align: right;
  font-feature-settings: "calt";
}

/* ── Category progress ────────────────────────────────────────────────────── */
.cat-progress-list { display: flex; flex-direction: column; gap: 0.8rem; max-height: 380px; overflow-y: auto; }

.cat-row-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.cat-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--black);
  font-feature-settings: "calt";
}

.cat-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray3);
  font-feature-settings: "calt";
}

.cat-bar-bg {
  background: var(--surface);
  border-radius: var(--r-pill);
  height: 5px;
  overflow: hidden;
}

.cat-bar-fill {
  background: var(--green);
  height: 100%;
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
}

/* ── Admin toolbar ────────────────────────────────────────────────────────── */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray3);
  font-feature-settings: "calt";
  white-space: nowrap;
}

.admin-select {
  background: var(--bg);
  border: 1px solid rgba(14,15,12,0.15);
  border-radius: var(--r-pill);
  color: var(--black);
  padding: 0.5rem 1rem;
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  font-feature-settings: "calt";
  outline: none;
  box-shadow: var(--ring);
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.admin-select:focus { box-shadow: var(--ring-green); }

/* ── Admin table ──────────────────────────────────────────────────────────── */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-xl);
  box-shadow: var(--ring);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  font-feature-settings: "calt";
  background: var(--bg);
}

.admin-table thead {
  background: var(--bg2);
  border-bottom: 1px solid var(--surface);
}

.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray2);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
  font-feature-settings: "calt";
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--surface);
  vertical-align: middle;
  font-weight: 600;
  color: var(--black);
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr:hover { background: var(--bg2); }

.td-muted { color: var(--gray3) !important; font-weight: 400 !important; font-size: 0.8rem; }
.td-num   { font-variant-numeric: tabular-nums; font-weight: 700 !important; }
.td-id    { font-size: 0.75rem; color: var(--gray3) !important; font-weight: 600 !important; white-space: nowrap; }
.td-zulu  { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ── Role badge ───────────────────────────────────────────────────────────── */
.role-badge {
  display: inline-block;
  padding: 0.15rem 0.65rem;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-feature-settings: "calt";
}
.role-admin    { background: var(--green); color: var(--green-dark); }
.role-recorder { background: var(--surface); color: var(--gray2); }

/* ── Status badge ─────────────────────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.65rem;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-feature-settings: "calt";
}
.status-done    { background: var(--green-light); color: var(--green-dark); }
.status-pending { background: var(--surface); color: var(--gray2); }
.status-skipped { background: rgba(208,50,56,0.1); color: var(--danger); }

/* ── User cell ────────────────────────────────────────────────────────────── */
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.user-cell-name { font-weight: 700; font-feature-settings: "calt"; }

/* ── Export grid ──────────────────────────────────────────────────────────── */
.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.export-card {
  background: var(--bg);
  border-radius: var(--r-2xl);
  padding: 2rem 2rem 1.75rem;
  box-shadow: var(--ring);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.15s;
}
.export-card:hover { transform: scale(1.02); }

.export-icon { font-size: 2rem; margin-bottom: 0.25rem; }

.export-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--black);
  font-feature-settings: "calt";
}

.export-desc {
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--gray3);
  line-height: 1.5;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  flex: 1;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,15,12,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
}

.modal-card {
  background: var(--bg);
  border-radius: var(--r-2xl);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--ring), 0 8px 40px rgba(14,15,12,0.18);
  animation: slide-in 0.2s ease;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--black);
  font-feature-settings: "calt";
  margin-bottom: 0.2rem;
}

.modal-sub {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray3);
  font-feature-settings: "calt";
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ── Modal header ─────────────────────────────────────────────────────────── */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

/* ── Field input (modal forms) ────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 0.4rem; }

.field-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid rgba(14,15,12,0.12);
  border-radius: var(--r-md);
  color: var(--black);
  padding: 0.7rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  outline: none;
  box-shadow: var(--ring);
  transition: box-shadow 0.15s;
}
.field-input:focus {
  box-shadow: var(--ring-green);
  border-color: var(--green);
}
.field-input::placeholder { color: var(--gray3); font-weight: 400; }

/* ── Admin hero header ────────────────────────────────────────────────────── */
.admin-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gray3);
  margin-bottom: 0.3rem;
  font-feature-settings: "calt";
}

.admin-hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -1.5px;
  color: var(--black);
  font-feature-settings: "calt";
}

.admin-hero-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.5rem;
  background: var(--bg2);
  border-radius: var(--r-2xl);
  box-shadow: var(--ring);
  flex-wrap: wrap;
}

.admin-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.admin-hero-num {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: var(--black);
  line-height: 1;
  font-feature-settings: "calt";
  font-variant-numeric: tabular-nums;
}

.admin-hero-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.admin-hero-divider {
  width: 1px;
  height: 32px;
  background: var(--surface);
}

/* ── Master progress bar ──────────────────────────────────────────────────── */
.admin-master-progress {
  margin-bottom: 2rem;
}

.admin-master-bar-bg {
  background: var(--surface);
  border-radius: var(--r-pill);
  height: 10px;
  overflow: hidden;
  box-shadow: var(--ring);
  margin-bottom: 0.5rem;
}

.admin-master-bar-fill {
  background: var(--green);
  height: 100%;
  border-radius: var(--r-pill);
  width: 0%;
  transition: width 0.6s ease;
}

.admin-master-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

/* ── Admin tabs (pill style) ──────────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
  background: var(--bg2);
  border-radius: var(--r-xl);
  padding: 0.3rem;
  width: fit-content;
  box-shadow: var(--ring);
  border: none;
}

.admin-tab {
  background: none;
  border: none;
  border-bottom: none;
  border-radius: var(--r-lg);
  padding: 0.5rem 1.1rem;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray3);
  cursor: pointer;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  transition: background 0.15s, color 0.15s, transform 0.12s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
}
.admin-tab:hover  { color: var(--black); background: var(--bg); transform: scale(1.03); }
.admin-tab.active {
  background: var(--green);
  color: var(--green-dark);
  transform: none;
}

.tab-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* ── Overview stat cards ──────────────────────────────────────────────────── */
.ov-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) { .ov-stats-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .ov-stats-row { grid-template-columns: repeat(2, 1fr); } }

.ov-stat-card {
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--ring);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: transform 0.15s;
}
.ov-stat-card:hover { transform: scale(1.02); }

.ov-stat-icon {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.ov-stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1.2px;
  color: var(--black);
  font-feature-settings: "calt";
  font-variant-numeric: tabular-nums;
}

.ov-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.ov-stat-sub {
  font-size: 0.72rem;
  color: var(--gray3);
  font-weight: 400;
}

.ov-stat-done { background: var(--green-light); }
.ov-stat-done .ov-stat-num { color: var(--green-dark); }

.ov-stat-skipped { background: rgba(208,50,56,0.05); }
.ov-stat-skipped .ov-stat-num { color: var(--danger); }

/* ── Admin card badge ─────────────────────────────────────────────────────── */
.admin-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray3);
  background: var(--bg2);
  border-radius: var(--r-pill);
  padding: 0.15rem 0.65rem;
  font-feature-settings: "calt";
}

/* ── Activity feed ────────────────────────────────────────────────────────── */
.activity-feed {
  display: flex;
  flex-direction: column;
  max-height: 340px;
  overflow-y: auto;
}

.activity-row {
  display: grid;
  grid-template-columns: 90px 1fr 130px 100px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--surface);
  font-size: 0.82rem;
  font-feature-settings: "calt";
}
.activity-row:last-child { border-bottom: none; }

.activity-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.activity-zulu {
  font-weight: 700;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-cat {
  font-size: 0.65rem !important;
  justify-self: start;
}

.activity-by {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray3);
  text-align: right;
  font-feature-settings: "calt";
}

/* ── Toolbar ──────────────────────────────────────────────────────────────── */
.toolbar-left  { display: flex; align-items: center; gap: 0.75rem; }
.toolbar-right { display: flex; align-items: center; gap: 0.75rem; }
.toolbar-filters { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

/* ── You badge ────────────────────────────────────────────────────────────── */
.you-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray3);
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 0.15rem 0.65rem;
  font-feature-settings: "calt";
}

/* ── Export cards (improved) ──────────────────────────────────────────────── */
.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.export-card {
  background: var(--bg);
  border-radius: var(--r-2xl);
  padding: 1.75rem;
  box-shadow: var(--ring);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.15s;
}
.export-card:hover { transform: scale(1.015); }

.export-card-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.export-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.export-icon-csv  { background: var(--green-light); }
.export-icon-zip  { background: rgba(208,50,56,0.08); }
.export-icon-cat  { background: rgba(14,15,12,0.06); }
.export-icon-user { background: rgba(255,209,26,0.18); }

.export-icon-glyph { font-size: 1.4rem; }

.export-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--black);
  font-feature-settings: "calt";
  line-height: 1.1;
}

.export-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray3);
  font-feature-settings: "calt";
}

.export-desc {
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--gray3);
  line-height: 1.55;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  flex: 1;
}

.export-meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: var(--r-pill);
  padding: 0.2rem 0.75rem;
  width: fit-content;
  font-feature-settings: "calt";
}

.export-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}

/* ── Mic permission overlay ───────────────────────────────────────────────── */
.mic-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,15,12,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mic-card {
  background: var(--bg);
  border-radius: var(--r-2xl);
  padding: 3rem 2.5rem 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--ring), 0 24px 60px rgba(14,15,12,0.22);
  animation: slide-in 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.mic-card-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.mic-card-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: var(--black);
  font-feature-settings: "calt";
  line-height: 1.1;
}

.mic-card-body {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--gray3);
  line-height: 1.6;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.mic-card-hint {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray3);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.mic-card-error {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--danger);
  background: rgba(208,50,56,0.07);
  border-radius: var(--r-md);
  padding: 0.65rem 1rem;
  width: 100%;
  line-height: 1.5;
  font-feature-settings: "calt";
}

/* ── Device selector row ──────────────────────────────────────────────────── */
.device-selector-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg2);
  border-radius: var(--r-xl);
  padding: 0.6rem 1rem;
  box-shadow: var(--ring);
}

.device-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray2);
  white-space: nowrap;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

.device-select {
  flex: 1;
  background: var(--bg);
  border: 1px solid rgba(14,15,12,0.12);
  border-radius: var(--r-pill);
  color: var(--black);
  padding: 0.4rem 0.85rem;
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
  outline: none;
  box-shadow: var(--ring);
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.device-select:focus { box-shadow: var(--ring-green); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--surface);
  padding: 1.5rem 2rem;
  margin-top: 4rem;
  background: var(--bg);
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--ring);
  flex-shrink: 0;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.footer-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.1px;
  font-feature-settings: "calt";
}

.footer-tagline {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray3);
  letter-spacing: -0.05px;
  font-feature-settings: "calt";
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hamburger button ─────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.nav-hamburger:hover { background: var(--bg2); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ────────────────────────────────────────────────────────── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--surface);
  padding: 0.75rem 1rem 1.25rem;
  z-index: 99;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 8px 24px rgba(14,15,12,0.08);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}
.nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-link {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-md);
  color: var(--gray2);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  font-feature-settings: "calt";
  transition: background 0.15s, color 0.15s;
}
.drawer-link:hover, .drawer-link.active {
  background: var(--green-nav);
  color: var(--black);
}
.drawer-link.active { background: var(--green); color: var(--green-dark); }
.drawer-logout { color: var(--danger) !important; margin-top: 0.25rem; }

.drawer-divider {
  height: 1px;
  background: var(--surface);
  margin: 0.5rem 0;
}

.drawer-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
}

/* ── Mobile breakpoint ────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Nav */
  .nav-links       { display: none; }
  .nav-hamburger   { display: flex; }
  .nav-drawer      { display: flex; }
  .navbar          { padding: 0 1rem; }

  /* Main content */
  .main-content    { padding: 1.5rem 1rem; }

  /* Page header */
  .page-header h1  { font-size: 2rem; letter-spacing: -1px; }

  /* Stat cards */
  .stat-number     { font-size: 2rem; }
  .stats-grid      { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  /* Dashboard action section */
  .action-section  { gap: 0.5rem; }
  .action-section .btn { flex: 1; justify-content: center; }

  /* Record layout */
  .record-layout   { grid-template-columns: 1fr; gap: 1rem; }
  .record-sidebar  { display: none; }
  .sentence-zulu   { font-size: 1.5rem; letter-spacing: -0.5px; }
  .sentence-card   { padding: 1.5rem 1.25rem; }
  .rec-controls    { gap: 0.5rem; }
  .rec-controls .btn { padding: 0.5rem 0.9rem; font-size: 0.88rem; }
  .btn-record      { padding: 0.8rem 1.75rem; }
  .post-btns       { flex-direction: column; width: 100%; }
  .post-btns .btn  { width: 100%; justify-content: center; }

  /* Admin hero */
  .admin-hero        { flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
  .admin-hero-title  { font-size: 1.9rem; }
  .admin-hero-right  { width: 100%; justify-content: space-between; padding: 0.75rem 1rem; gap: 0; }
  .admin-hero-num    { font-size: 1.25rem; }
  .admin-hero-divider { height: 24px; }

  /* Admin master progress */
  .admin-master-progress { margin-bottom: 1.25rem; }

  /* Admin tabs — scrollable */
  .admin-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { white-space: nowrap; padding: 0.45rem 0.85rem; font-size: 0.82rem; }

  /* Overview stat cards */
  .ov-stats-row { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  .ov-stat-num  { font-size: 1.7rem; }
  .ov-stat-card { padding: 1rem; }

  /* Admin two-col */
  .admin-two-col { grid-template-columns: 1fr; margin-top: 1rem; }

  /* Activity feed — collapse to 2 columns */
  .activity-row {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
  }
  .activity-cat { display: none; }
  .activity-by  { text-align: left; }

  /* Admin tables */
  .admin-table th, .admin-table td { padding: 0.6rem 0.75rem; font-size: 0.78rem; }
  .td-zulu { max-width: 140px; }
  .row-actions { gap: 0.3rem; }
  .row-actions .btn { padding: 0.25rem 0.55rem; font-size: 0.75rem; }

  /* Admin toolbar */
  .admin-toolbar { flex-direction: column; align-items: flex-start; }
  .toolbar-right { width: 100%; }
  .toolbar-right .search-box { width: 100% !important; }
  .toolbar-filters { width: 100%; }
  .toolbar-filters .search-box { width: 100% !important; }
  .toolbar-filters .admin-select { flex: 1; min-width: 0; }

  /* Export grid */
  .export-grid { grid-template-columns: 1fr; }

  /* Mic overlay */
  .mic-card { padding: 2rem 1.5rem; }
  .mic-card-title { font-size: 1.3rem; }

  /* Device selector */
  .device-label { display: none; }

  /* Modal */
  .modal-card { padding: 1.5rem; }
  .modal-title { font-size: 1.2rem; }

  /* Footer */
  .site-footer { padding: 1.25rem 1rem; margin-top: 2rem; }

  /* Review grid */
  .review-grid { grid-template-columns: 1fr; }
  .review-controls { flex-wrap: wrap; }

  /* Info cards */
  .info-cards { grid-template-columns: 1fr 1fr; }
}
