/* ─── Trail Design System ─── */
/* Naturnära · varm sand · mossgrön */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg:           #F3EFE6;
  --surface:      #FFFFFF;
  --ink:          #1E1C17;
  --mute:         #6F6A5E;
  --line:         #E4DECF;
  --primary:      #3E5B3E;
  --primary-ink:  #F3EFE6;
  --accent:       #C85A34;
  --good:         #3E5B3E;
  --bad:          #B23A30;
  --radius:       18px;
  --radius-sm:    12px;
  --radius-xs:    8px;
  --shadow:       0 1px 2px rgba(30,28,23,.04), 0 8px 24px rgba(30,28,23,.06);
  --font-display: 'Fraunces', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', Menlo, Monaco, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: #F3EFE6;  /* fallback utan CSS-variabler */
  background: var(--bg);
  color: #1E1C17;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* ─── Participant layout (mobile-first) ─── */
.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 0 40px;
  display: flex;
  flex-direction: column;
}

/* ─── Top bar ─── */
.top-bar {
  padding: 56px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--ink);
}

/* ─── Page content area ─── */
.page-content {
  padding: 0 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── Hero on start screen ─── */
.hero-bg {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(180deg, #3E5B3E22 0%, var(--bg) 100%);
  margin-bottom: -20px;
}

.hero-bg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ─── Typography ─── */
h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.08;
  margin: 0 0 10px;
}

h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
}

p {
  margin: 0 0 10px;
  color: var(--mute);
  font-size: 15px;
}

.label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mute);
}

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

/* ─── Form elements ─── */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mute);
}

.form input,
.form textarea,
.form select {
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--primary);
}

.form textarea {
  resize: vertical;
  min-height: 90px;
}

/* ─── Buttons ─── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  padding: 0 20px;
  background: var(--primary);
  color: var(--primary-ink);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background 0.15s;
}

.btn-primary:hover {
  background: #334d33;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--ink);
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.action-row .btn-primary,
.action-row .btn-secondary {
  width: auto;
  flex: 1;
}

/* ─── Code input (digit boxes) ─── */
.digit-grid {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.digit-box {
  flex: 1;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
}

/* ─── Answer options ─── */
.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  font-size: 16px;
  font-weight: 500;
}

.option-card input[type="radio"] {
  display: none;
}

.option-card:has(input:checked) {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid var(--line);
  color: var(--mute);
}

.option-card:has(input:checked) .option-letter {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: transparent;
}

/* ─── Info & error boxes ─── */
.info-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.error-box {
  background: #FEE2E2;
  color: var(--bad);
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.success-box {
  background: #ECFBEC;
  color: var(--good);
  border: 1px solid #C3E6C3;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ─── Status badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-good  { background: rgba(62,91,62,.12); color: var(--good); }
.badge-mute  { background: rgba(111,106,94,.12); color: var(--mute); }
.badge-bad   { background: rgba(178,58,48,.12); color: var(--bad); }
.badge-accent { background: rgba(200,90,52,.12); color: var(--accent); }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  display: inline-block;
}

/* ─── Scanner ─── */
.scanner-wrap {
  margin: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* ─── Progress ring ─── */
.progress-ring {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

/* ─── Station list ─── */
.station-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.station-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
}

.station-row.is-next {
  background: rgba(62,91,62,.1);
  border-color: var(--primary);
}

.station-icon {
  width: 28px;
  height: 28px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--line);
  color: var(--mute);
}

.station-icon.done { background: var(--good); color: #fff; }
.station-icon.next { background: var(--primary); color: var(--primary-ink); }

/* ─── Answer result screen ─── */
.result-icon {
  width: 80px;
  height: 80px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: #fff;
}

.result-icon.correct { background: var(--good); box-shadow: 0 8px 24px rgba(62,91,62,.35); }
.result-icon.wrong   { background: var(--bad);  box-shadow: 0 8px 24px rgba(178,58,48,.35); }

.result-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.result-stat {
  text-align: center;
}

.result-stat-label { font-size: 12px; color: var(--mute); }
.result-stat-value { font-family: var(--font-display); font-size: 22px; font-weight: 500; }

/* ─── Leaderboard ─── */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 20px;
}

.podium-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.podium-avatar {
  width: 52px;
  height: 52px;
  border-radius: 99px;
  background: var(--primary);
  color: var(--primary-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  position: relative;
}

.podium-bar {
  width: 100%;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}

.lb-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  font-size: 14px;
}

.lb-row.is-me {
  background: rgba(62,91,62,.08);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: var(--radius-xs);
}

.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.lb-avatar.is-me {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: transparent;
}

/* ─── QR scan CTA card ─── */
.scan-cta {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  margin-top: 16px;
}

.scan-cta-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Admin layout (desktop) ─── */
.admin-wrap {
  display: flex;
  min-height: 100dvh;
}

.admin-sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 18px;
}

.admin-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s;
}

.admin-nav-item:hover {
  background: var(--bg);
}

.admin-nav-item.active {
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 600;
}

.admin-sidebar-spacer { flex: 1; }

.admin-user-card {
  padding: 10px;
  border-radius: var(--radius-xs);
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg);
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-topbar-left { flex: 1; }

.admin-crumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 3px;
}

.admin-topbar-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.admin-topbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-content {
  padding: 28px;
  flex: 1;
  overflow-y: auto;
}

/* ─── Admin buttons ─── */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-xs);
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}

.admin-btn:hover { opacity: 0.85; }

.admin-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.admin-btn.ghost:hover { background: var(--surface); }

.admin-btn.danger {
  background: transparent;
  color: var(--bad);
  border: 1px solid #FECACA;
}

/* ─── Admin card ─── */
.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.admin-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.admin-card-header span { flex: 1; }

.admin-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ─── Admin form fields ─── */
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--mute);
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  border-color: var(--primary);
}

.admin-field textarea { resize: vertical; min-height: 72px; }
.admin-field .mono { font-family: var(--font-mono); }

/* ─── Admin tabs ─── */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  transition: color 0.12s;
}

.admin-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.admin-tab:hover:not(.active) { color: var(--ink); }

/* ─── Admin table ─── */
.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--mute);
  text-align: left;
  font-weight: 500;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}

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

.admin-table tr:hover td { background: var(--bg); }

/* ─── Admin stat cards ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mute);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin-top: 6px;
  line-height: 1;
}

.stat-sub {
  font-size: 12px;
  color: var(--mute);
  margin-top: 4px;
}

/* ─── Toggle switch ─── */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-text { flex: 1; }
.toggle-title { font-size: 14px; font-weight: 600; }
.toggle-sub   { font-size: 12px; color: var(--mute); margin-top: 2px; }

.toggle-switch {
  width: 40px;
  height: 24px;
  border-radius: 99px;
  background: var(--line);
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.18s;
}

.toggle-switch.on { background: var(--primary); }

.toggle-knob {
  width: 20px;
  height: 20px;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.18s;
}

.toggle-switch.on .toggle-knob { left: 18px; }

/* ─── Radio options (leaderboard visibility) ─── */
.radio-option {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.radio-option.selected {
  border-color: var(--primary);
  background: rgba(62,91,62,.08);
}

.radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 99px;
  border: 1.5px solid var(--mute);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.radio-option.selected .radio-dot { border-color: var(--primary); }

.radio-dot-inner {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--primary);
}

/* ─── Login page ─── */
.login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 40px;
  box-shadow: var(--shadow);
}

/* ─── Leaderboard podium (desktop/mobile) ─── */
.lb-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.lb-podium-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.lb-podium-card.first {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ─── Admin top nav (mobile) ─── */
.admin-topnav {
  display: none;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  /* Hide desktop sidebar */
  .admin-sidebar {
    display: none;
  }

  /* Show mobile top nav */
  .admin-topnav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
  }

  .admin-topnav-item {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--mute);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.12s;
  }

  .admin-topnav-item.active {
    color: var(--ink);
    border-bottom-color: var(--primary);
    font-weight: 600;
  }

  .admin-topnav-item:hover:not(.active) {
    color: var(--ink);
  }

  /* Make wrap a column so topnav sits above content */
  .admin-wrap {
    flex-direction: column;
  }

  /* Main area takes full width */
  .admin-main {
    min-width: 0;
    width: 100%;
  }

  .admin-content {
    padding: 16px;
  }

  .admin-topbar {
    padding: 12px 16px;
    position: static; /* don't overlap topnav on mobile */
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .lb-podium-grid {
    grid-template-columns: 1fr;
  }

  /* Stack two-column grids on mobile */
  .admin-content [style*="grid-template-columns: 2fr 1fr"],
  .admin-content [style*="grid-template-columns: 1.5fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 901px) {
  /* Desktop: hide topnav, show sidebar */
  .admin-topnav {
    display: none;
  }

  .admin-topnav-item {
    display: none;
  }
}
