/* ============================================================
   dbar Labs HYROX — App Stylesheet
   Design system sourced from dbarlabs.com
   ─────────────────────────────────────────────────────────────
   PALETTE:
     Cream background:  #FAF8F6
     Surface white:     #FFFFFF
     Surface card:      #F4F1EE  (slightly deeper cream for cards)
     Charcoal heading:  #2B2B2B
     Dark mid text:     #4A4A4A
     Muted body text:   #747474
     Faint meta text:   #A8A8A8
     Purple accent:     #8048B5  (primary brand, Sign In btn, links)
     Purple light:      #EDE4F6  (pill bg, tag bg)
     Purple mid:        #C4A6E2  (borders, subtle)
     Dark CTA:          #2F2F30  (primary button)
     Green badge:       #16C948  (Live Demo / success / complete)
     Green light:       #E4F8EC
     Border subtle:     #EAEAEA
     Border cream:      #E8E4DF
     Shadow sm:         0 2px 8px rgba(0,0,0,0.06)
     Shadow md:         0 4px 20px rgba(0,0,0,0.09)
     Shadow lg:         0 8px 40px rgba(0,0,0,0.12)
   ============================================================ */

:root {
  /* Core palette */
  --cream:         #FAF8F6;
  --cream-deep:    #F3F0EC;
  --white:         #FFFFFF;
  --card:          #FFFFFF;
  --card-alt:      #F7F4F1;
  --heading:       #2B2B2B;
  --text:          #4A4A4A;
  --muted:         #747474;
  --faint:         #A8A8A8;
  --border:        #EAEAEA;
  --border-cream:  #E4DDD5;

  /* Purple — dbar Labs primary brand */
  --purple:        #8048B5;
  --purple-dark:   #6535A0;
  --purple-light:  #EDE4F6;
  --purple-mid:    #C4A6E2;
  --purple-glow:   rgba(128, 72, 181, 0.12);

  /* Dark CTA button */
  --cta:           #2F2F30;
  --cta-hover:     #1A1A1B;

  /* Green — success / completed / live */
  --green:         #16C948;
  --green-dark:    #0FA83C;
  --green-light:   #E4F8EC;
  --green-glow:    rgba(22, 201, 72, 0.15);

  /* Semantic */
  --danger:        #E53E3E;
  --danger-light:  #FFF0F0;
  --warning:       #D97706;
  --warning-light: #FEF3C7;
  --info:          #2563EB;
  --info-light:    #EFF6FF;

  /* Layout */
  --sidebar-w:     256px;
  --topbar-h:      60px;
  --radius-xs:     4px;
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --radius-pill:   999px;

  /* Typography */
  --font:          'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
  --font-display:  'Plus Jakarta Sans', 'Inter', sans-serif;

  /* Transitions */
  --t:             all 0.18s ease;
  --t-slow:        all 0.3s ease;

  /* Shadows */
  --shadow-xs:     0 1px 3px rgba(0,0,0,0.05);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.06);
  --shadow:        0 4px 20px rgba(0,0,0,0.09);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.12);
  --shadow-purple: 0 4px 20px rgba(128,72,181,0.18);
  --shadow-cta:    0 4px 16px rgba(47,47,48,0.20);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
.hidden { display: none !important; }

/* ── Google Font import ─────────────────────────────────────── */
/* (loaded via HTML head link tag) */

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.splash-inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.splash-logo-img {
  width: clamp(160px, 30vw, 240px);
  margin-bottom: 8px;
  animation: fadeUp 0.5s ease 0.2s both;
  /* Original colors on light background — no filter needed */
}
.splash-sub {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 36px;
  animation: fadeUp 0.5s ease 0.35s both;
}
.splash-bar-wrap {
  width: 200px; height: 3px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 20px;
}
.splash-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--purple-dark), var(--purple));
  border-radius: var(--radius-pill);
  transition: width 1.8s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 10px var(--purple-glow);
}
.splash-tagline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--faint);
  text-transform: uppercase;
  animation: fadeUp 0.5s ease 0.5s both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-sm);
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-logo-img {
  width: 130px;
  display: block;
  /* Original logo colors on white sidebar */
}
.sidebar-logo-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--purple);
  text-transform: uppercase;
  padding-left: 1px;
  margin-top: 4px;
}
.sidebar-nav { flex: 1; padding: 10px 10px; }
.nav-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  background: none; border: none; cursor: pointer;
  color: var(--muted);
  font-size: 13.5px; font-weight: 500;
  font-family: var(--font);
  text-align: left;
  transition: var(--t);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}
.nav-btn:hover {
  color: var(--heading);
  background: var(--cream-deep);
}
.nav-btn.active {
  color: var(--purple);
  background: var(--purple-light);
  font-weight: 600;
}
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.btn-settings {
  width: 100%; padding: 9px 14px;
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12.5px; font-family: var(--font);
  cursor: pointer; transition: var(--t);
  font-weight: 500;
}
.btn-settings:hover { color: var(--heading); background: var(--border); }

/* ============================================================
   MOBILE TOPBAR
   ============================================================ */
.topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.hamburger {
  background: none; border: none;
  color: var(--heading); font-size: 22px; cursor: pointer;
  padding: 4px;
}
.topbar-logo {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
}
.topbar-logo-img {
  height: 26px;
  display: block;
  /* Original logo colors on white topbar */
}
.topbar-hyrox {
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-light);
  padding: 3px 8px; border-radius: var(--radius-pill);
}
.topbar-race-countdown {
  font-size: 11px; font-weight: 700;
  color: var(--purple);
  background: var(--purple-light);
  border: 1px solid var(--purple-mid);
  padding: 4px 10px; border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 36px 40px 60px;
  max-width: calc(1400px + var(--sidebar-w));
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { animation: fadeUp 0.25s ease; }
.section-header { margin-bottom: 28px; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.section-desc {
  color: var(--muted);
  font-size: 14px; margin-top: 8px;
  max-width: 600px; line-height: 1.7;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--t);
}
.card:hover { box-shadow: var(--shadow); border-color: var(--purple-mid); }
.card-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--heading);
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}
.card-desc { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; line-height: 1.6; }

/* ============================================================
   BUTTONS
   ============================================================ */
/* Primary dark CTA — exactly like dbarlabs.com "Get started" */
.btn-primary {
  background: var(--cta);
  color: var(--white);
  border: none; border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-weight: 700; font-size: 14px; cursor: pointer;
  font-family: var(--font);
  transition: var(--t);
  box-shadow: var(--shadow-cta);
  letter-spacing: 0.1px;
}
.btn-primary:hover {
  background: var(--cta-hover);
  box-shadow: 0 6px 24px rgba(47,47,48,0.28);
  transform: translateY(-1px);
}
.btn-primary.btn-lg {
  padding: 14px 28px; font-size: 15px; width: 100%;
  border-radius: var(--radius);
}

/* Purple brand button — like "Sign In" on dbarlabs.com */
.btn-purple {
  background: var(--purple);
  color: var(--white);
  border: none; border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 600; font-size: 13.5px; cursor: pointer;
  font-family: var(--font);
  transition: var(--t);
  box-shadow: var(--shadow-purple);
}
.btn-purple:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

/* Secondary / ghost */
.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 600; font-size: 13.5px; cursor: pointer;
  font-family: var(--font);
  transition: var(--t);
}
.btn-secondary:hover {
  background: var(--cream-deep);
  border-color: var(--purple-mid);
  color: var(--purple);
}

/* Danger */
.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1.5px solid rgba(229,62,62,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 600; font-size: 13.5px; cursor: pointer;
  font-family: var(--font);
  transition: var(--t);
}
.btn-danger:hover { background: #fde8e8; border-color: var(--danger); }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.text-input {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--heading);
  padding: 10px 14px;
  font-size: 13.5px; font-family: var(--font);
  width: 100%;
  transition: var(--t);
}
.text-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-glow);
}
.text-input::placeholder { color: var(--faint); }
.textarea { min-height: 82px; resize: vertical; }
.select-input {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--heading);
  padding: 10px 36px 10px 14px;
  font-size: 13.5px; font-family: var(--font);
  cursor: pointer; transition: var(--t);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%238048B5' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}
.select-input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.full-width { grid-column: 1 / -1; }

/* ============================================================
   BADGES / PILLS (like dbarlabs.com)
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600;
}
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-green  { background: var(--green-light); color: var(--green-dark); }
.badge-gray   { background: var(--cream-deep); color: var(--muted); border: 1px solid var(--border); }

/* Green "Live Demo" style dot badge */
.dot-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  background: var(--green); color: var(--white);
  box-shadow: 0 2px 8px var(--green-glow);
}
.dot-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  display: block;
}

/* ============================================================
   DASHBOARD STATS
   ============================================================ */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--t);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card.accent {
  background: linear-gradient(135deg, var(--purple-light), #f5eeff);
  border-color: var(--purple-mid);
}
.stat-val {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 800;
  color: var(--purple);
  line-height: 1;
  letter-spacing: -1px;
}
.stat-label {
  font-size: 11.5px; font-weight: 600;
  color: var(--faint); margin-top: 5px;
  text-transform: uppercase; letter-spacing: 0.8px;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.race-countdown-banner {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-top: 12px;
  background: var(--purple-light);
  border: 1px solid var(--purple-mid);
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--purple);
}
.dash-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.phase-map { display: flex; flex-direction: column; gap: 7px; }
.phase-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--cream-deep);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-cream);
  transition: var(--t);
}
.phase-row.active {
  border-left-color: var(--purple);
  background: var(--purple-light);
}
.phase-row.done {
  border-left-color: var(--green);
  opacity: 0.65;
}
.phase-num {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: var(--purple); min-width: 24px;
}
.phase-name { font-size: 13px; font-weight: 600; color: var(--heading); }
.phase-wks { font-size: 11px; color: var(--muted); margin-left: auto; }
.today-focus-card {
  background: var(--cream-deep);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.focus-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  color: var(--purple);
  letter-spacing: -0.3px;
}
.focus-desc { font-size: 13px; color: var(--text); margin-top: 6px; line-height: 1.5; }
.focus-wu { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.pr-board { display: flex; flex-direction: column; gap: 0; }
.pr-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.pr-item:last-child { border-bottom: none; }
.pr-lift { color: var(--muted); }
.pr-val { font-weight: 700; color: var(--purple); font-family: var(--font-mono); }
.station-ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sref-item {
  background: var(--cream-deep);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--purple-mid);
}
.sref-name { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.5px; }
.sref-val { font-size: 13.5px; font-weight: 700; color: var(--heading); margin-top: 2px; }
.sref-spec { font-size: 11px; color: var(--purple); font-weight: 600; }

/* ============================================================
   PROGRAM BROWSER
   ============================================================ */
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.program-list { display: flex; flex-direction: column; gap: 10px; }
.week-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--t);
  box-shadow: var(--shadow-xs);
}
.week-block:hover { border-color: var(--purple-mid); box-shadow: var(--shadow-sm); }
.week-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--t);
}
.week-header:hover { background: var(--cream-deep); }
.week-num {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  color: var(--purple); min-width: 44px;
  letter-spacing: -1px;
}
.week-info { flex: 1; }
.week-title { font-weight: 700; font-size: 14.5px; color: var(--heading); }
.week-phase { font-size: 12px; color: var(--muted); margin-top: 2px; }
.week-dots { display: flex; gap: 5px; }
.week-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border); border: 1.5px solid var(--border-cream);
}
.week-dot.done { background: var(--green); border-color: var(--green-dark); }
.week-chevron { color: var(--faint); font-size: 18px; transition: var(--t); }
.week-block.open .week-chevron { transform: rotate(90deg); color: var(--purple); }
.week-days { display: none; border-top: 1px solid var(--border); }
.week-block.open .week-days { display: block; }
.day-block {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.day-block:last-child { border-bottom: none; }
.day-block:nth-child(even) { background: #FDFCFB; }
.day-label {
  font-size: 10.5px; font-weight: 700;
  color: var(--purple);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.day-focus { font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.exercise-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12.5px; }
.exercise-table th {
  text-align: left; color: var(--faint);
  padding: 5px 10px 5px 0;
  border-bottom: 1.5px solid var(--border);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700;
}
.exercise-table td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.exercise-table tr:last-child td { border-bottom: none; }
.ex-name { font-weight: 600; color: var(--heading); }
.ex-sets { color: var(--purple); font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.ex-rpe { color: var(--warning); font-size: 11px; font-weight: 600; }
.ex-weight { color: var(--info); font-size: 11.5px; font-family: var(--font-mono); font-weight: 600; }
.ex-cue { color: var(--muted); font-style: italic; max-width: 280px; line-height: 1.4; }

/* ============================================================
   TODAY'S SESSION
   ============================================================ */
.session-picker {
  display: flex; align-items: flex-end; gap: 14px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.picker-row { display: flex; flex-direction: column; gap: 5px; }
.picker-row label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.session-display { margin-bottom: 22px; }
.session-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.session-card-header {
  background: linear-gradient(135deg, var(--purple-light), #faf7ff);
  padding: 22px 24px;
  border-bottom: 1px solid var(--purple-mid);
}
.session-card-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  color: var(--purple); letter-spacing: -0.5px;
}
.session-card-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.session-wu-badge {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  padding: 3px 12px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700;
  margin-top: 10px;
  letter-spacing: 0.5px;
}
.session-exercises { padding: 20px 24px; }
.session-ex-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.7fr 0.7fr 2fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.session-ex-row:last-child { border-bottom: none; }
.sex-name { font-weight: 600; color: var(--heading); font-size: 13.5px; }
.sex-sets { color: var(--purple); font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.sex-weight { color: var(--info); font-size: 12px; font-family: var(--font-mono); font-weight: 600; }
.sex-rpe { color: var(--warning); font-size: 12px; font-weight: 600; }
.sex-tempo { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.sex-cue { color: var(--muted); font-size: 12px; font-style: italic; line-height: 1.4; }
.sex-header { color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid var(--border); }

/* ── Session Logger ─ */
.session-logger {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.log-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.rpe-selector { display: flex; gap: 5px; flex-wrap: wrap; }
.rpe-btn {
  width: 36px; height: 36px;
  background: var(--cream-deep);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: var(--t); font-family: var(--font);
}
.rpe-btn:hover { border-color: var(--purple-mid); color: var(--purple); background: var(--purple-light); }
.rpe-btn.active { background: var(--purple); color: var(--white); border-color: var(--purple); }
.recovery-selector { display: flex; gap: 7px; flex-wrap: wrap; }
.rec-btn {
  padding: 7px 13px;
  background: var(--cream-deep);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted); font-size: 13px;
  cursor: pointer; transition: var(--t); font-family: var(--font);
}
.rec-btn:hover, .rec-btn.active { border-color: var(--purple); color: var(--purple); background: var(--purple-light); }
.pain-selector { display: flex; gap: 7px; flex-wrap: wrap; }
.pain-btn {
  padding: 5px 11px;
  background: var(--cream-deep);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted); font-size: 12px;
  cursor: pointer; transition: var(--t); font-family: var(--font);
}
.pain-btn:hover { border-color: var(--danger); color: var(--danger); }
.pain-btn.active { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }
.pain-btn[data-val="none"].active { border-color: var(--green-dark); color: var(--green-dark); background: var(--green-light); }

/* ============================================================
   RACE PREDICTOR
   ============================================================ */
.pacing-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pacing-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pacing-group { display: flex; flex-direction: column; gap: 5px; }
.pacing-group label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.pacing-output { display: flex; flex-direction: column; }
.pace-total {
  text-align: center; padding: 24px;
  background: linear-gradient(135deg, var(--purple-light), #f5eeff);
  border: 1.5px solid var(--purple-mid);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.pace-total-label { font-size: 11px; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: 2px; }
.pace-total-time {
  font-family: var(--font-display);
  font-size: 56px; font-weight: 800;
  color: var(--purple); line-height: 1;
  letter-spacing: -2px;
}
.pace-segment {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.pace-segment:last-child { border-bottom: none; }
.pace-seg-num { font-family: var(--font-mono); font-size: 11px; font-weight: 600; min-width: 22px; }
.pace-type-run .pace-seg-num { color: var(--info); }
.pace-type-station .pace-seg-num { color: var(--purple); }
.pace-seg-name { flex: 1; color: var(--text); }
.pace-seg-time { font-family: var(--font-mono); font-weight: 700; color: var(--heading); }
.pace-seg-cum { font-family: var(--font-mono); font-size: 11px; color: var(--faint); min-width: 56px; text-align: right; }
.pacing-strategy {
  margin-top: 14px; padding: 16px;
  background: var(--cream-deep);
  border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.7; color: var(--text);
  border-left: 3px solid var(--purple);
}
.pacing-strategy strong { color: var(--purple); }

/* ============================================================
   REST TIMER
   ============================================================ */
.timer-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.timer-card { text-align: center; padding: 32px; }
.timer-display { position: relative; width: 220px; height: 220px; margin: 0 auto 24px; }
.timer-ring { width: 220px; height: 220px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fill {
  fill: none; stroke: var(--purple); stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.ring-fill.warning { stroke: var(--warning); }
.ring-fill.done    { stroke: var(--green); }
.timer-time-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.timer-time {
  font-family: var(--font-mono);
  font-size: 50px; font-weight: 700;
  color: var(--heading); line-height: 1;
}
.timer-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 4px; color: var(--purple);
  text-transform: uppercase; margin-top: 4px;
}
.timer-presets { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; }
.preset-btn {
  padding: 7px 13px;
  background: var(--cream-deep);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--t); font-family: var(--font);
}
.preset-btn:hover, .preset-btn.active {
  background: var(--purple); color: var(--white);
  border-color: var(--purple);
  box-shadow: var(--shadow-purple);
}
.timer-custom { display: flex; align-items: center; gap: 7px; justify-content: center; margin-bottom: 18px; }
.timer-min, .timer-sec { width: 60px; text-align: center; }
.timer-colon { font-size: 24px; color: var(--purple); font-family: var(--font-mono); font-weight: 700; }
.timer-controls { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
.timer-sets-row {
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
  font-size: 13px; color: var(--muted);
}
.timer-sets { width: 52px; text-align: center; }
.sets-left { color: var(--purple); font-weight: 700; font-family: var(--font-mono); }
.rest-guide-list { display: flex; flex-direction: column; }
.rest-item {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.rest-item:last-child { border-bottom: none; }
.rest-type { color: var(--text); }
.rest-time { color: var(--purple); font-family: var(--font-mono); font-weight: 700; }

/* ============================================================
   LIBRARY CARDS
   ============================================================ */
.library-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.lib-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--t);
}
.lib-card:hover { border-color: var(--purple-mid); box-shadow: var(--shadow); }
.lib-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--purple-light), #faf7ff);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.lib-code {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  color: var(--purple); min-width: 48px;
  letter-spacing: -1px;
}
.lib-title { font-weight: 700; font-size: 14.5px; color: var(--heading); }
.lib-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lib-body { padding: 16px 20px; }
.lib-ex-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.lib-ex-item {
  display: flex; gap: 10px;
  font-size: 13px; padding: 9px 12px;
  background: var(--cream-deep);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--purple-mid);
}
.lib-ex-name { flex: 1; font-weight: 600; color: var(--heading); }
.lib-ex-sets { color: var(--purple); font-family: var(--font-mono); font-size: 12px; font-weight: 600; white-space: nowrap; }
.lib-ex-cue { color: var(--muted); font-size: 11.5px; font-style: italic; width: 100%; margin-top: 2px; }

/* ============================================================
   HYROX STATIONS
   ============================================================ */
.stations-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.station-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--t);
}
.station-card:hover { border-color: var(--purple-mid); box-shadow: var(--shadow); transform: translateY(-2px); }
.station-num-bar { height: 4px; background: linear-gradient(90deg, var(--purple-dark), var(--purple)); }
.station-body { padding: 20px; }
.station-order { font-size: 10.5px; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 4px; }
.station-name { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--heading); margin-bottom: 12px; letter-spacing: -0.3px; }
.station-specs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.station-spec {
  padding: 3px 10px; background: var(--purple-light);
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 700;
  color: var(--purple); border: 1px solid var(--purple-mid);
}
.station-standards { font-size: 12.5px; color: var(--text); line-height: 1.65; }
.station-penalty { color: var(--danger); font-size: 11.5px; font-weight: 600; margin-top: 7px; }
.station-tip { color: var(--green-dark); font-size: 11.5px; font-weight: 600; margin-top: 4px; }

/* ============================================================
   TRAINING LOG
   ============================================================ */
.log-list { display: flex; flex-direction: column; gap: 10px; }
.log-entry {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-xs);
  transition: var(--t);
}
.log-entry:hover { border-color: var(--purple-mid); box-shadow: var(--shadow-sm); }
.log-entry-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 7px; }
.log-date { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--purple); }
.log-week-day { font-weight: 700; font-size: 14px; color: var(--heading); }
.log-rpe { color: var(--warning); font-size: 12.5px; font-weight: 700; }
.log-recovery { font-size: 12.5px; color: var(--text); }
.log-duration { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-left: auto; }
.log-pain-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.pain-tag {
  padding: 2px 9px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
  background: var(--danger-light);
  border: 1px solid rgba(229,62,62,0.2);
  color: var(--danger);
}
.pain-tag.none { background: var(--green-light); border-color: rgba(22,201,72,0.2); color: var(--green-dark); }
.log-notes { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.55; font-style: italic; }
.log-empty { text-align: center; padding: 60px 20px; color: var(--faint); font-size: 15px; }

/* ============================================================
   WEEKLY CHECK-IN
   ============================================================ */
.checkin-week-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.checkin-week-row label { font-size: 13px; color: var(--muted); font-weight: 600; }
.checkin-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.checkin-item {
  padding: 12px 14px;
  background: var(--cream-deep);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-cream);
}
.checkin-q { font-size: 13px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.checkin-scale { display: flex; gap: 5px; }
.scale-btn {
  flex: 1; padding: 6px 4px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--muted); font-size: 12px; cursor: pointer;
  transition: var(--t); font-family: var(--font); font-weight: 600;
}
.scale-btn:hover { border-color: var(--purple-mid); color: var(--purple); }
.scale-btn.active { background: var(--purple); color: var(--white); border-color: var(--purple); }
.checkin-history-entry {
  padding: 12px 14px;
  background: var(--cream-deep);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px; border-left: 3px solid var(--border-cream);
}
.cih-week { color: var(--purple); font-weight: 700; margin-bottom: 3px; }
.cih-scores { color: var(--muted); font-size: 12px; }

/* ============================================================
   RED FLAGS
   ============================================================ */
.redflags-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rf-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: var(--t);
}
.rf-card:hover { border-color: rgba(229,62,62,0.3); }
.rf-header {
  padding: 16px 20px;
  background: var(--danger-light);
  border-bottom: 1px solid rgba(229,62,62,0.1);
  cursor: pointer; display: flex; align-items: center; gap: 12px;
}
.rf-icon { font-size: 22px; }
.rf-title { font-weight: 700; font-size: 14.5px; color: var(--heading); }
.rf-trigger { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rf-body {
  padding: 0 20px; max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
}
.rf-card.open .rf-body { max-height: 600px; padding: 16px 20px; }
.rf-pivot { font-size: 13px; line-height: 1.75; color: var(--text); }
.rf-swap { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--purple); }

/* ============================================================
   DATA & BACKUP
   ============================================================ */
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.export-buttons { display: flex; flex-direction: column; gap: 10px; }
.import-area { display: flex; flex-direction: column; gap: 10px; }
.import-label {
  display: flex; align-items: center; justify-content: center;
  padding: 20px; gap: 8px;
  background: var(--cream-deep);
  border: 2px dashed var(--border-cream);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--t);
  font-size: 14px; color: var(--muted); font-weight: 500;
}
.import-label:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-light); }
.file-input { display: none; }
.storage-summary { display: flex; flex-direction: column; }
.storage-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.storage-row:last-child { border-bottom: none; }
.storage-key { color: var(--muted); }
.storage-val { color: var(--purple); font-family: var(--font-mono); font-weight: 700; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(43,43,43,0.45);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-sm { max-width: 380px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--heading); letter-spacing: -0.3px;
}
.modal-close {
  background: var(--cream-deep); border: 1px solid var(--border);
  color: var(--muted); font-size: 16px; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t);
}
.modal-close:hover { background: var(--border); color: var(--heading); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-body p { font-size: 14px; color: var(--text); line-height: 1.6; }
.modal-footer { padding: 18px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.lifts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.lifts-grid div { display: flex; flex-direction: column; gap: 4px; }
.lifts-grid label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--cta);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px; font-weight: 600; color: var(--white);
  z-index: 9000;
  transform: translateY(80px); opacity: 0;
  transition: all 0.28s ease;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  max-width: 340px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--green); }

/* ============================================================
   PWA INSTALL BANNER
   ============================================================ */
.install-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 14px;
  z-index: 800;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.install-banner p { flex: 1; font-size: 14px; color: var(--text); }
.install-banner strong { color: var(--purple); }
.install-dismiss {
  background: none; border: none; color: var(--faint);
  font-size: 18px; cursor: pointer; padding: 2px 6px;
  transition: var(--t);
}
.install-dismiss:hover { color: var(--heading); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-cream); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-mid); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .pacing-layout { grid-template-columns: 1fr; }
  .timer-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .topbar { display: flex; }
  .main-content { margin-left: 0; padding: 76px 16px 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .library-grid { grid-template-columns: 1fr; }
  .stations-grid { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; }
  .redflags-grid { grid-template-columns: 1fr; }
  .pacing-form { grid-template-columns: 1fr; }
  .session-ex-row { grid-template-columns: 1fr 1fr; }
  .log-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .session-picker { flex-direction: column; align-items: stretch; }
  .timer-controls { flex-direction: column; }
  .modal { border-radius: var(--radius-lg); }
  .main-content { padding: 72px 14px 40px; }
}

/* ============================================================
   AUTH STATUS (sidebar)
   ============================================================ */
.auth-status {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.auth-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
  transition: var(--t);
}
.auth-dot.unlocked { background: var(--green); box-shadow: 0 0 6px var(--green-glow); }
.auth-label {
  font-size: 12px; font-weight: 600;
  color: var(--muted); flex: 1;
  transition: var(--t);
}
.auth-label.unlocked { color: var(--green-dark); }
.auth-toggle-btn {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--purple-mid);
  background: var(--white);
  color: var(--purple);
  cursor: pointer;
  transition: var(--t);
  font-family: var(--font);
  white-space: nowrap;
}
.auth-toggle-btn:hover { background: var(--purple); color: var(--white); border-color: var(--purple); }
.auth-toggle-btn.unlocked {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}
.auth-toggle-btn.unlocked:hover { background: var(--danger); color: var(--white); border-color: var(--danger); }

/* Mobile topbar lock button */
.topbar-lock-btn {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 16px; cursor: pointer;
  transition: var(--t);
  line-height: 1;
}
.topbar-lock-btn:hover { background: var(--purple-light); border-color: var(--purple-mid); }
.topbar-lock-btn.unlocked { background: var(--green-light); border-color: rgba(22,201,72,0.3); }

/* ============================================================
   VIEW-ONLY OVERLAY on locked write sections
   ============================================================ */
.write-locked {
  position: relative;
  pointer-events: none;
  opacity: 0.45;
  user-select: none;
}
.write-locked::after {
  content: '🔐 Unlock to edit';
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--purple);
  background: rgba(250,248,246,0.7);
  border-radius: var(--radius-sm);
  pointer-events: all;
  cursor: pointer;
}

/* ============================================================
   PIN PAD
   ============================================================ */
.pin-dots {
  display: flex; gap: 14px; justify-content: center;
  margin: 20px 0 24px;
}
.pin-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--purple-mid);
  background: var(--white);
  transition: var(--t);
}
.pin-dot.filled {
  background: var(--purple);
  border-color: var(--purple);
}
.pin-dot.error {
  background: var(--danger);
  border-color: var(--danger);
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  60%      { transform: translateX(6px); }
  80%      { transform: translateX(-3px); }
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 220px;
  margin: 0 auto 16px;
}
.pin-key {
  padding: 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 18px; font-weight: 700;
  font-family: var(--font-mono);
  color: var(--heading);
  cursor: pointer;
  transition: var(--t);
  box-shadow: var(--shadow-xs);
  line-height: 1;
}
.pin-key:hover {
  background: var(--purple-light);
  border-color: var(--purple-mid);
  color: var(--purple);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.pin-key:active { transform: translateY(0); }
.pin-key-clear {
  color: var(--warning);
  border-color: var(--warning-light);
  background: var(--warning-light);
}
.pin-key-clear:hover { background: #fde8a0; border-color: var(--warning); color: var(--warning); }
.pin-key-cancel {
  color: var(--danger);
  border-color: var(--danger-light);
  background: var(--danger-light);
}
.pin-key-cancel:hover { background: #fde8e8; border-color: var(--danger); }
.pin-error {
  color: var(--danger);
  font-size: 12.5px; font-weight: 600;
  padding: 8px 16px;
  background: var(--danger-light);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.auth-callout {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(111, 84, 153, 0.18);
  background: rgba(111, 84, 153, 0.08);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.auth-toggle-row a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 700;
}

.auth-toggle-row a:hover {
  text-decoration: underline;
}
