/* ==========================================================================
   Basis · Trainings-Dashboard
   Design-System: Ozean/Kobalt-Blau als Identität, Teal/Amber nur für Status
   ========================================================================== */

:root {
  /* Ink & surfaces */
  --ink:            #070c13;
  --surface-1:      #0d1620;
  --surface-2:      #132234;
  --surface-3:      #1a2b40;
  --border:         #1f3350;
  --border-soft:    #172538;

  /* Blue identity ramp (hue ~208) */
  --ocean-900:      #0b1a2c;
  --ocean-800:      #0f2440;
  --ocean-700:      #1d3a5f;
  --ocean-600:      #234a78;
  --ocean-500:      #2f7dc4;
  --sky-400:        #5bc4f0;
  --ice-300:        #a6e4ff;

  /* Status accents (used ONLY for done/planned/attention, not for hierarchy) */
  --teal:           #2fd6a0;
  --teal-dim:       #123a30;
  --amber:          #f2a13c;
  --amber-dim:      #3a2712;

  /* Text */
  --text:           #eaf2fb;
  --text-dim:       #c3d3e6;
  --muted:          #7e93ad;
  --muted-2:        #56698500;

  /* Type */
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Radii / spacing rhythm */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --gap: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-size: 15px;
  background:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(47,125,196,0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at -10% 100%, rgba(47,214,160,0.05), transparent 55%),
    var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ocean-500); color: #fff; }

a { color: var(--sky-400); }

/* ---------- App shell / layout ---------- */

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.sidenav {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--surface-1), var(--ink) 70%);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 4px;
}

@media (min-width: 1600px) {
  .shell { grid-template-columns: 260px 1fr; }
  .nav-item { padding: 13px 14px; font-size: 15px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.nav-item[hidden], .bn-item[hidden] { display: none !important; }
.nav-item:hover { background: var(--surface-2); color: var(--text-dim); }
.nav-item.is-active {
  background: linear-gradient(135deg, var(--ocean-700), var(--ocean-800));
  color: var(--ice-300);
  box-shadow: inset 0 0 0 1px var(--ocean-600);
}
.nav-icon { font-size: 14px; width: 16px; text-align: center; opacity: .9; }

.sidenav-footer {
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid var(--border-soft);
}

.content {
  padding: 32px 48px 60px;
  max-width: 1920px;
  width: 100%;
}

@media (min-width: 1600px) {
  .content { padding: 40px 64px 72px; }
  .page-title { font-size: 32px; }
  .stat-value { font-size: 36px; }
  .stat-value.xl { font-size: 48px; }
}

.bottomnav { display: none; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Page header ---------- */

.page-head { margin-bottom: 22px; }
.page-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 700; margin-bottom: 6px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700; letter-spacing: -0.01em;
}
.page-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- Grid helpers ---------- */

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.span-2 { grid-column: span 2; }
.stack { display: grid; gap: var(--gap); }

/* ---------- Cards ---------- */

.card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--ocean-500), var(--sky-400) 60%, transparent);
}
.card.accent-teal::before { background: linear-gradient(90deg, var(--teal), var(--sky-400) 70%, transparent); }
.card.accent-amber::before { background: linear-gradient(90deg, var(--amber), var(--ocean-500) 70%, transparent); }
.card.flush { padding: 0; }

.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px; gap: 10px; flex-wrap: wrap;
}
.card-title { font-size: 13px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.card-title-lg { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text); }
.card-note { font-size: 12px; color: var(--muted); }

/* ---------- Big stat numbers ---------- */

.stat {
  display: flex; flex-direction: column; gap: 2px;
}
.stat-value {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ice-300);
}
.stat-value.xl { font-size: 42px; }
.stat-value .unit { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat-delta { font-size: 12px; font-weight: 700; }
.stat-delta.up { color: var(--teal); }
.stat-delta.down { color: var(--amber); }

.stat-row { display: flex; gap: 26px; flex-wrap: wrap; }

/* ---------- Progress bar system ---------- */

.bar-block { display: grid; gap: 6px; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.bar-top .name { color: var(--text-dim); font-weight: 600; }
.bar-top .value { font-family: var(--font-display); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.bar-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
  overflow: visible;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ocean-700), var(--ocean-500) 55%, var(--sky-400));
  box-shadow: 0 0 10px rgba(91,196,240,0.25);
  transition: width .4s ease;
}
.bar-fill.over { background: linear-gradient(90deg, var(--ocean-600), var(--sky-400) 55%, var(--ice-300)); }
.bar-fill.low { background: linear-gradient(90deg, var(--amber-dim), var(--amber)); box-shadow: 0 0 10px rgba(242,161,60,0.2); }
.bar-fill.good { background: linear-gradient(90deg, var(--teal-dim), var(--teal)); box-shadow: 0 0 10px rgba(47,214,160,0.25); }

.bar-target {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 18px;
  background: var(--text-dim);
  opacity: .55;
  border-radius: 2px;
}
.bar-target::after {
  content: attr(data-label);
  position: absolute;
  top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--muted); white-space: nowrap;
}

.bar-mini-track { height: 7px; }
.bar-mini-track .bar-fill { box-shadow: none; }

/* ---------- Tags / priority pills ---------- */

.tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
}
.tag.pflicht { background: var(--ocean-500); color: #04121f; }
.tag.ergaenzung { background: transparent; color: var(--sky-400); box-shadow: inset 0 0 0 1px var(--ocean-600); }
.tag.bonus { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }

.status-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  box-shadow: inset 0 0 0 2px var(--border);
  display: flex; align-items: center; justify-content: center;
}
.status-dot.done { background: var(--teal); box-shadow: none; }
.status-dot.done::after { content: "✓"; font-size: 10px; color: #04231a; font-weight: 900; }
.status-dot.planned { background: transparent; }
.status-dot.skipped { box-shadow: inset 0 0 0 2px var(--amber); }
.status-dot.skipped::after { content: "–"; font-size: 12px; color: var(--amber); font-weight: 900; }

/* ---------- Unit / session rows ---------- */

.unit-list { display: grid; gap: 8px; }
.unit {
  display: grid;
  grid-template-columns: 16px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 13px;
}
.unit-name { font-weight: 700; font-size: 14px; }
.unit-detail { color: var(--muted); font-size: 12px; margin-top: 2px; }
.unit-key-badge { color: var(--amber); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.fallback-note {
  margin-top: 12px; font-size: 12px; color: var(--muted);
  background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: var(--r-md); padding: 10px 12px;
}
.fallback-note b { color: var(--text); }

/* ---------- Day columns (Woche tab) ---------- */

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.day-col {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 100%;
}
.day-col.is-today { box-shadow: inset 0 0 0 1px var(--ocean-500), 0 0 0 3px rgba(47,125,196,0.12); }
.day-col-head { display: flex; flex-direction: column; gap: 1px; margin-bottom: 2px; }
.day-name { font-family: var(--font-display); font-weight: 600; font-size: 13px; }
.day-date { color: var(--muted); font-size: 10px; }
.day-mini-unit {
  font-size: 11.5px; padding: 7px 8px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.day-mini-unit .status-dot { width: 12px; height: 12px; }
.day-mini-unit .status-dot.done::after { font-size: 8px; }

/* ---------- Sleep breakdown bar ---------- */

.sleep-bar {
  display: flex; height: 22px; border-radius: 8px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border);
}
.sleep-seg.deep  { background: var(--ocean-700); }
.sleep-seg.light { background: var(--ocean-500); }
.sleep-seg.rem   { background: var(--sky-400); }
.sleep-seg.awake { background: var(--surface-3); }

.sleep-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--muted); }
.sleep-legend .lg { display: flex; align-items: center; gap: 6px; }
.sleep-legend .sw { width: 9px; height: 9px; border-radius: 2px; }
.sw.deep  { background: var(--ocean-700); }
.sw.light { background: var(--ocean-500); }
.sw.rem   { background: var(--sky-400); }
.sw.awake { background: var(--surface-3); }

/* ---------- Recovery ring ---------- */

.ring-wrap { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.ring-fill { fill: none; stroke: url(#ringGradient); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.ring-label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-label .val { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.ring-label .lbl { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Coach ---------- */

.coach-hero {
  background: linear-gradient(135deg, var(--ocean-800), var(--surface-1) 70%);
  border: 1px solid var(--ocean-700);
}
.coach-headline {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--text);
  max-width: 46ch;
}
.coach-reasons { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.coach-reasons li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; color: var(--text-dim); line-height: 1.5;
}
.coach-reasons li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--sky-400); margin-top: 6px; flex-shrink: 0;
}

/* ---------- Charts ---------- */

.chart-svg { width: 100%; height: auto; display: block; }
.chart-grid-line { stroke: var(--border-soft); stroke-width: 1; }
.chart-axis-label { fill: var(--muted); font-size: 9px; font-family: var(--font-body); }
.chart-line { fill: none; stroke: var(--sky-400); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#areaGradient); opacity: .5; }
.chart-dot { fill: var(--ice-300); stroke: var(--ink); stroke-width: 2; }

/* ---------- Log list ---------- */

.log-list { display: grid; gap: 8px; }
.log-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px; align-items: center;
  padding: 10px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.log-date { font-size: 11px; color: var(--muted); font-weight: 700; }
.log-name { font-size: 13.5px; font-weight: 600; }
.log-note { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.log-metric { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--ice-300); text-align: right; white-space: nowrap; }

/* ---------- Type icon chip ---------- */

.type-chip {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-size: 14px; flex-shrink: 0;
}

/* ---------- Compare cards (Verlauf) ---------- */

.compare-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.compare-side { text-align: center; }
.compare-side .compare-heading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--sky-400); margin-bottom: 6px; }
.compare-vs { color: var(--muted); font-size: 11px; font-weight: 700; }

.compare-bars { margin-top: 16px; display: grid; gap: 8px; }
.compare-bar-row { display: flex; align-items: center; gap: 10px; }
.compare-bar-label { font-size: 10.5px; color: var(--muted); width: 74px; flex-shrink: 0; text-align: right; }
.compare-bar-track { flex: 1; height: 14px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.compare-bar-fill { height: 100%; border-radius: 999px; }
.compare-bar-fill.current { background: linear-gradient(90deg, var(--ocean-700), var(--sky-400)); }
.compare-bar-fill.previous { background: var(--surface-3); }
.compare-delta {
  text-align: center; font-family: var(--font-display); font-weight: 700;
  font-size: 13px; margin-top: 10px; padding: 6px; border-radius: var(--r-sm);
  background: var(--surface-2);
}
.compare-delta.up { color: var(--teal); }
.compare-delta.down { color: var(--amber); }

/* ---------- Sync button ---------- */

.sync-btn {
  position: fixed;
  top: 20px; right: 24px;
  z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--ocean-600);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ice-300);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transition: background .15s ease, transform .1s ease;
}
.sync-btn:hover { background: var(--surface-3); }
.sync-btn:active { transform: scale(0.97); }
.sync-btn .icon { display: inline-block; transition: transform .6s ease; }
.sync-btn.is-syncing .icon { animation: spin 0.9s linear infinite; }
.sync-btn:disabled { opacity: 0.7; cursor: default; }
@keyframes spin { to { transform: rotate(360deg); } }

.sync-panel {
  position: fixed; top: 68px; right: 24px; z-index: 50;
  max-width: 320px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 12px; color: var(--text-dim);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.sync-panel .title { font-weight: 700; color: var(--text); margin-bottom: 6px; }
.sync-panel ul { margin: 0; padding-left: 16px; display: grid; gap: 3px; }

@media (max-width: 960px) {
  .sync-btn { top: 12px; right: 12px; padding: 8px 12px; font-size: 12px; }
  .sync-panel { top: 56px; right: 12px; left: 12px; max-width: none; }
}

/* ---------- Interactive unit toggle + notes ---------- */

.status-dot.clickable { cursor: pointer; transition: transform .1s ease; }
.status-dot.clickable:hover { transform: scale(1.15); }
.status-dot.clickable:active { transform: scale(0.9); }

.note-box {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 12px;
  line-height: 1.5;
}
.note-box::placeholder { color: var(--muted); }
.note-box:focus { outline: none; box-shadow: 0 0 0 2px var(--ocean-500); }
.note-saved-hint { font-size: 11px; color: var(--teal); opacity: 0; transition: opacity .3s ease; }
.note-saved-hint.show { opacity: 1; }

.move-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10.5px;
  padding: 3px 4px;
  max-width: 62px;
  cursor: pointer;
}
.move-select:focus { outline: none; box-shadow: 0 0 0 2px var(--ocean-500); }
.moved-note { font-size: 10.5px; color: var(--amber); margin-top: 2px; }

.text-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 12px;
  flex: 1;
  min-width: 0;
}
.text-input::placeholder { color: var(--muted); }
.text-input:focus { outline: none; box-shadow: 0 0 0 2px var(--ocean-500); }

.btn-small {
  padding: 10px 16px;
  border: 1px solid var(--ocean-600);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ice-300);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-small:hover { background: var(--surface-3); }
.btn-small:disabled { opacity: .5; cursor: default; }
.btn-small.is-listening { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }

.qa-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; }
.qa-question { font-weight: 700; color: var(--text-dim); font-size: 12.5px; margin-bottom: 4px; }
.qa-answer { color: var(--text); font-size: 13px; line-height: 1.5; }

.sync-status {
  position: fixed; top: 66px; right: 24px; z-index: 50;
  font-size: 11.5px; color: var(--muted);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
}
@media (max-width: 960px) { .sync-status { top: 56px; right: 12px; font-size: 10.5px; padding: 6px 10px; } }

/* ---------- Tips lists (Schlaf, Coach) ---------- */

.tips-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.tips-list li {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 12.5px; color: var(--text-dim); line-height: 1.5;
}
.tips-list li::before {
  content: "→"; color: var(--sky-400); font-weight: 700; flex-shrink: 0;
}

/* ---------- Kraft tab ---------- */

.exercise-list { display: grid; gap: 8px; margin-top: 12px; }
.exercise-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 13px;
}
.exercise-name { font-weight: 700; font-size: 13.5px; }
.exercise-spec { font-family: var(--font-display); font-size: 12.5px; color: var(--ice-300); font-weight: 600; white-space: nowrap; text-align: right; }

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--gap);
}

/* ---------- Viewer mode / hosted mode ---------- */

body.is-hosted #sync-btn { display: none; }
body.is-viewer .status-dot.clickable { cursor: default; }
body.is-viewer .status-dot.clickable:hover,
body.is-viewer .status-dot.clickable:active { transform: none; }
body.is-viewer .note-box { opacity: .7; cursor: not-allowed; }

.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
}
.role-chip:hover { color: var(--text-dim); }

/* ---------- Login overlay ---------- */

.login-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(47,125,196,0.18), transparent 60%),
    var(--ink);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 360px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  text-align: center;
}
.login-brand {
  width: 44px; height: 44px; margin: 0 auto 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ocean-500), var(--sky-400));
  color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.login-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.login-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 20px; line-height: 1.5; }
.login-input {
  width: 100%; padding: 12px 14px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text); font-size: 15px; text-align: center;
  letter-spacing: 0.02em;
}
.login-input:focus { outline: none; box-shadow: 0 0 0 2px var(--ocean-500); }
.login-submit-btn {
  width: 100%; padding: 12px; border: none; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--ocean-600), var(--ocean-500));
  color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
}
.login-submit-btn:hover { filter: brightness(1.08); }
.login-submit-btn:disabled { opacity: .6; cursor: default; }
.login-error {
  color: var(--amber); font-size: 12.5px; margin-top: 12px; min-height: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidenav { display: none; }
  .content { padding: 20px 16px 96px; }
  .bottomnav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0;
    background: rgba(13,22,32,0.92);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-soft);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
    z-index: 40;
  }
  .bn-item {
    background: none; border: none; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 8px;
  }
  .bn-item .nav-icon { font-size: 16px; }
  .bn-item.is-active { color: var(--ice-300); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .week-grid { grid-template-columns: 1fr; }
  .exercise-row { grid-template-columns: 1fr; }
  .compare-pair { grid-template-columns: 1fr; text-align: center; }
  .compare-vs { display: none; }
}

@media (min-width: 961px) and (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
