:root {
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --surface-3: #eff3f1;
  --sidebar-bg: #111b16;
  --stroke: rgba(0,0,0,0.07);
  --stroke-md: rgba(0,0,0,0.11);
  --text: #0f1a15;
  --text-2: #3a4f47;
  --muted: #7a9088;
  --accent: #1ac97a;
  --accent-bg: rgba(26,201,122,0.10);
  --accent-strong: #0fa35e;
  --track: #3b7cf8;
  --track-bg: rgba(59,124,248,0.10);
  --road: #e8920a;
  --road-bg: rgba(232,146,10,0.10);
  --danger: #e5504a;
  --danger-bg: rgba(229,80,74,0.10);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05),0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 14px rgba(0,0,0,0.07),0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.11),0 4px 14px rgba(0,0,0,0.06);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --sidebar-w: 258px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

html, body {
  overscroll-behavior-y: none;
  overscroll-behavior: none;
  height: 100%;
}
body {
  min-height: 100vh;
  font-family: "Inter", "Instrument Sans", system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background: #eaedea;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.quick-menu {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: 2px; overflow-x: auto;
  padding: 8px 16px;
  background: rgba(234,237,234,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  scrollbar-width: none;
}
.quick-menu::-webkit-scrollbar { display: none; }
.quick-menu-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 0.46rem 0.95rem;
  white-space: nowrap; cursor: pointer;
  font-weight: 500; font-size: 0.86rem;
  transition: background 0.14s, color 0.14s;
}
.quick-menu-button:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.quick-menu-button.active-menu {
  background: #fff; color: var(--text);
  border-color: rgba(0,0,0,0.10);
  box-shadow: var(--shadow-sm); font-weight: 600;
}

button, input, select, textarea { font: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0,1fr) 292px;
  gap: 14px; padding: 14px; align-items: start;
}
.sidebar, .main-content, .insights {
  display: flex; flex-direction: column; gap: 12px;
}

.brand-card {
  padding: 20px;
  background: var(--sidebar-bg);
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: var(--shadow);
}
.brand-card h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.18rem; font-weight: 700;
  letter-spacing: -0.02em; color: #fff;
}
.brand-copy {
  margin: 7px 0 0;
  color: rgba(255,255,255,0.38);
  font-size: 0.80rem; line-height: 1.5;
}
.auth-status-card {
  margin-top: 14px; padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.09);
  display: flex; flex-direction: column; gap: 8px;
}
.auth-status-card strong { display: block; font-size: 0.92rem; color: #fff; }
.auth-status-copy, .access-copy { margin: 3px 0 0; color: rgba(255,255,255,0.45); font-size: 0.80rem; }

.panel, .hero {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.panel h2, .hero h2, .dialog-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em;
}
.panel-head, .hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.compact-head { align-items: center; }

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 600; color: var(--muted);
}
.brand-card .eyebrow { color: rgba(255,255,255,0.30); }
.session-meta, .trend-head p { margin: 5px 0 0; color: var(--muted); font-size: 0.86rem; }

.primary-button, .ghost-button, .template-chip, .chip-action {
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: all 0.14s ease; font-weight: 600; font-size: 0.84rem; line-height: 1;
}
.primary-button { padding: 0.58rem 1.10rem; background: var(--accent); color: #fff; }
.primary-button:hover {
  background: var(--accent-strong); transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,201,122,0.32);
}
.ghost-button {
  padding: 0.54rem 0.95rem;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--stroke-md);
}
.ghost-button:hover { background: var(--surface-2); border-color: rgba(0,0,0,0.16); transform: translateY(-1px); }
.brand-card .ghost-button { background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.82); border-color: rgba(255,255,255,0.12); }
.brand-card .ghost-button:hover { background: rgba(255,255,255,0.18); }
.small { padding: 0.38rem 0.75rem; font-size: 0.80rem; }
.language-toggle { min-width: 48px; }
.template-chip:hover, .athlete-tab:hover, .athlete-card:hover,
.library-chip:hover, .equipment-chip:hover, .chip-action:hover { transform: translateY(-1px); }

.team-stats, .mini-stats, .entry-summary, .athlete-card-grid,
.diary-stack, .metrics-stack { display: grid; gap: 8px; }
.stat-card, .metric-card, .summary-card {
  padding: 11px 13px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--stroke);
}
.stat-card > span, .metric-card > span, .summary-card > span { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.stat-card strong, .metric-card strong, .summary-card strong {
  display: block; margin-top: 4px; font-size: 1.08rem;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--text);
}

.athlete-list, .athlete-tabs, .template-buttons, .chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.template-section { display: flex; flex-direction: column; gap: 6px; }
.template-category-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 8px; }
.chip-team { background: rgba(99,102,241,0.10); color: #5b50e0; border-color: rgba(99,102,241,0.2); }
.chip-team:hover { background: rgba(99,102,241,0.18); }
.chip-circuit { background: rgba(16,185,129,0.10); color: #059669; border-color: rgba(16,185,129,0.2); }
.chip-circuit:hover { background: rgba(16,185,129,0.18); }
.chip-road { background: var(--road-bg); color: var(--road); border-color: rgba(232,146,10,0.2); }
.chip-road:hover { background: rgba(232,146,10,0.2); }
.athlete-card {
  width: 100%; border: 1px solid var(--stroke); background: var(--surface);
  border-radius: var(--radius-md); display: flex; align-items: center;
  padding: 9px 12px; transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
  cursor: pointer; gap: 10px;
}
.athlete-card:hover { border-color: var(--stroke-md); box-shadow: var(--shadow-sm); background: var(--surface-2); }
.active-athlete-card {
  border-color: var(--accent) !important; background: rgba(26,201,122,0.04) !important;
  box-shadow: 0 0 0 3px rgba(26,201,122,0.13) !important;
}
.athlete-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent-strong);
  font-weight: 700; font-size: 0.86rem;
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; flex-shrink: 0;
}
.athlete-meta { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.athlete-meta strong { font-size: 0.88rem; font-weight: 600; }
.athlete-meta span:last-child, .snapshot-meta, .diary-meta,
.diary-note, .agenda-card span, .agenda-empty { color: var(--muted); font-size: 0.79rem; }

.athlete-tab {
  width: auto; border: 1px solid var(--stroke-md); background: var(--surface-2);
  border-radius: var(--radius-sm); padding: 0.42rem 0.85rem; cursor: pointer;
  font-weight: 600; font-size: 0.82rem; color: var(--text-2); transition: all 0.14s;
}
.athlete-tab.active { background: var(--text); color: #fff; border-color: var(--text); }

.icon-button, .chip-remove {
  border: none; background: var(--danger-bg); color: var(--danger);
  cursor: pointer; font-weight: 700; transition: background 0.14s;
}
.icon-button:hover, .chip-remove:hover { background: rgba(229,80,74,0.18); }
.row-inline-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
.icon-button { width: 32px; height: 32px; border-radius: 50%; }
.chip-remove {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 0.75rem;
}

textarea, input, select {
  width: 100%; border: 1px solid var(--stroke-md);
  background: var(--surface-2); padding: 0.62rem 0.85rem;
  border-radius: var(--radius-md); color: var(--text);
  font-size: 0.89rem; outline: none;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}
textarea:focus, input:focus, select:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(26,201,122,0.14);
}
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 5px; }
label span { font-size: 0.78rem; font-weight: 500; color: var(--text-2); }
.session-form-grid, .detail-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px;
}

.snapshot-card, .diary-card, .agenda-card {
  border: 1px solid var(--stroke); background: var(--surface);
  border-radius: var(--radius-md); padding: 11px 13px;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.snapshot-card:hover, .agenda-card:hover { border-color: var(--stroke-md); box-shadow: var(--shadow-sm); }
.snapshot-card.active, .agenda-card.active {
  border-color: var(--accent); background: rgba(26,201,122,0.03);
  box-shadow: 0 0 0 3px rgba(26,201,122,0.10);
}
.snapshot-card button { width: 100%; border: none; background: transparent; padding: 0; text-align: left; cursor: pointer; font-weight: 600; }
.snapshot-head, .diary-headline { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.snapshot-head strong, .diary-headline strong { font-family: "Space Grotesk", sans-serif; font-size: 0.92rem; }
.snapshot-metrics, .diary-metrics {
  margin-top: 8px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px;
}
.metric-pill {
  padding: 6px 9px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--stroke);
}
.metric-pill span {
  display: block; color: var(--muted); font-size: 0.68rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.metric-pill strong { display: block; margin-top: 2px; font-size: 0.92rem; font-family: "Space Grotesk", sans-serif; }
.diary-note { margin-top: 7px; font-size: 0.82rem; color: var(--text-2); line-height: 1.5; }

.surface-filter-row {
  display: flex; gap: 4px; margin-bottom: 12px;
  background: var(--surface-2); border-radius: var(--radius-md);
  padding: 3px; border: 1px solid var(--stroke);
}
.surface-filter-btn {
  flex: 1; padding: 5px 10px; border-radius: var(--radius-sm);
  border: none; background: transparent; color: var(--muted);
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}
.surface-filter-btn:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.surface-filter-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.surface-filter-btn[data-surface="track"].active { color: var(--track); }
.surface-filter-btn[data-surface="road"].active { color: var(--road); }

.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 5px; }
.weekday-label {
  font-size: 0.70rem; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--muted); padding: 0 4px 4px; text-align: center; font-weight: 600;
}
.calendar-day {
  min-height: 76px; padding: 6px 8px;
  border-radius: var(--radius-md); border: 1px solid var(--stroke);
  background: var(--surface); text-align: left;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.14s, box-shadow 0.14s; cursor: pointer;
}
.calendar-day:hover { border-color: var(--stroke-md); box-shadow: var(--shadow-sm); }
.faded-day { opacity: 0.38; }
.selected-day { border-color: var(--accent) !important; box-shadow: 0 0 0 2px rgba(26,201,122,0.15) !important; }
.session-day { background: rgba(26,201,122,0.03); }
.calendar-date-number { font-weight: 700; font-family: "Space Grotesk", sans-serif; font-size: 0.86rem; color: var(--text); }
.calendar-day-stack { display: flex; flex-direction: column; gap: 3px; }
.calendar-badge {
  font-size: 0.65rem; font-weight: 600; padding: 0.18rem 0.42rem;
  border-radius: 999px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calendar-badge.road { background: var(--road); color: #fff; }
.calendar-badge.track { background: var(--track); }
.agenda-head { margin-top: 14px; }
.agenda-list, .blocks-container { display: grid; gap: 9px; }
.blocks-container { gap: 15px; }

.block-card { border: 1px solid var(--stroke); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.block-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 13px 16px 10px;
  border-bottom: 1px solid var(--stroke); background: var(--surface-2);
}
.block-actions { display: flex; gap: 7px; align-items: center; }
.block-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 0.82rem; }
.table-wrap { overflow-x: auto; padding: 0 12px 12px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 8px 7px; border-bottom: 1px solid rgba(0,0,0,0.05); text-align: left; font-size: 0.86rem; }
th {
  color: var(--muted); font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2);
}
td input { min-width: 72px; text-align: center; padding: 0.48rem 0.5rem; }
.summary-value { font-weight: 700; font-family: "Space Grotesk", sans-serif; }

.pill {
  align-self: start; padding: 0.28rem 0.58rem; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent-strong);
  font-size: 0.76rem; font-weight: 700;
}
.pill.down { background: var(--danger-bg); color: var(--danger); }

.chart { display: flex; align-items: flex-end; gap: 7px; min-height: 150px; padding-top: 10px; }
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bar {
  width: 100%; max-width: 34px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  min-height: 8px; transition: opacity 0.14s;
}
.bar-group:hover .bar { opacity: 0.78; }
.bar-label { font-size: 0.70rem; color: var(--muted); }

.inline-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.session-equipment-actions { margin-top: 8px; }
.sync-grid { display: grid; gap: 10px; margin-bottom: 10px; }
.sync-status {
  margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--stroke);
  color: var(--muted); font-size: 0.82rem; line-height: 1.4;
}

.template-chip {
  padding: 0.52rem 0.85rem; background: var(--accent-bg);
  color: var(--accent-strong); font-weight: 700; font-size: 0.82rem;
  border-radius: var(--radius-sm);
}
.template-chip:hover { background: rgba(26,201,122,0.18); }

.micro-chip, .equipment-chip, .library-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.40rem 0.72rem; border-radius: 999px;
  border: 1px solid var(--stroke-md); background: var(--surface);
  color: var(--text); font-size: 0.82rem;
}
.equipment-chip, .library-chip { cursor: pointer; font-weight: 600; }
.muted-chip { color: var(--muted); }

.dialog-card {
  width: min(92vw, 420px); border: none; border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-lg); display: grid; gap: 12px;
}
dialog::backdrop { background: rgba(10,20,15,0.42); backdrop-filter: blur(4px); }
menu { margin: 0; padding: 0; display: flex; justify-content: flex-end; gap: 8px; }

.wrap-actions { flex-wrap: wrap; }
.access-card { display: grid; gap: 4px; }
.block-rest-row, .block-rest-display { padding: 0 16px 10px; }
.block-rest-display { color: var(--muted); font-size: 0.86rem; }
.mode-athlete [data-coach-only] { display: none !important; }

/* ── AUTH GATE ── */
.auth-gate {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: rgba(8,16,12,0.65); backdrop-filter: blur(16px);
}
.auth-gate[hidden] { display: none !important; }
.auth-card {
  width: min(400px, 100%);
  padding: 28px 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 16px;
}

/* Brand inside auth */
.auth-brand {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--stroke);
}
.auth-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--sidebar-bg); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.03em; flex-shrink: 0;
}
.auth-brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 1.05rem; color: var(--text);
}
.auth-brand-sub { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

/* Role tabs */
.auth-role-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; background: var(--surface-3);
  border-radius: 12px; padding: 4px;
  border: 1px solid var(--stroke);
}
.auth-role-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border-radius: 9px; border: none;
  background: transparent; color: var(--muted);
  font-size: 0.86rem; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.auth-role-btn.active {
  background: #fff; color: var(--text);
  box-shadow: var(--shadow-sm);
}
.auth-role-icon { font-size: 1.5rem; line-height: 1; }

/* PIN feedback */
.auth-feedback {
  min-height: 20px; font-size: 0.84rem; font-weight: 600;
  color: var(--danger); text-align: center;
}
.auth-feedback.success { color: var(--accent-strong); }

.auth-locked { overflow: hidden; }

.sidebar-close-btn { display: none; }
/* ── MOBILE BOTTOM NAV ── */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 25;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--stroke);
  padding: 6px 8px env(safe-area-inset-bottom, 0px);
}
.mobile-bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.assignee-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 180px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--stroke-md);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.assignee-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.assignee-option input { width: 18px; height: 18px; flex: 0 0 auto; }
.assignee-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-nav-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 4px; border: none; background: transparent;
  color: var(--muted); font-size: 0.68rem; font-weight: 600;
  cursor: pointer; border-radius: var(--radius-sm); transition: color 0.14s, background 0.14s;
  min-height: 54px; justify-content: center;
}
.mobile-nav-btn .nav-icon { font-size: 1.3rem; line-height: 1; }
.mobile-nav-btn.active { color: var(--accent-strong); background: var(--accent-bg); }

.today-actions-panel {
  padding: 12px;
}
.today-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}
.today-action {
  min-height: 76px;
  border: 1px solid var(--stroke-md);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.today-action:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.16);
  transform: translateY(-1px);
}
.today-action strong {
  display: block;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.94rem;
}
.today-action span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.backup-actions .primary-button,
.backup-actions .ghost-button {
  min-height: 42px;
  flex: 1 1 150px;
}
.advanced-sync {
  margin-top: 8px;
  border-top: 1px solid var(--stroke);
  padding-top: 10px;
}
.advanced-sync summary {
  cursor: pointer;
  color: var(--text-2);
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 10px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
  .insights { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .snapshot-metrics, .diary-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --sidebar-w: 100%; }
  .app-shell { grid-template-columns: 1fr; padding: 10px; gap: 10px; padding-bottom: 80px; }
  .sidebar { display: none; }
  .sidebar.mobile-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 20;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    padding: 12px 12px 90px;
    flex-direction: column;
    gap: 12px;
  }
  .mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(0,0,0,0.45);
  }
  .mobile-backdrop.visible {
    display: block;
  }
  .insights { grid-template-columns: 1fr; }
  .session-form-grid, .detail-grid { grid-template-columns: 1fr; }
  .hero, .panel-head { flex-direction: column; align-items: stretch; }
  .quick-menu { display: none; }
  .mobile-bottom-nav { display: block; }
  .panel, .hero { padding: 14px; border-radius: 14px; }
  .today-action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .today-action { min-height: 88px; }
  .brand-card { border-radius: 14px; }
  table { min-width: 520px; }
  td input { min-width: 62px; }
  .auth-card { padding: 22px 18px; }
  /* Touch-friendly tap targets */
  .primary-button, .ghost-button { min-height: 44px; }
  .athlete-card { padding: 12px 14px; }
  .calendar-day { min-height: 56px; padding: 5px 6px; }
  .calendar-date-number { font-size: 0.80rem; }
  .calendar-badge { font-size: 0.60rem; padding: 0.14rem 0.36rem; }
  .athlete-tab { padding: 0.55rem 1rem; min-height: 40px; }
  .sidebar-close-btn { display: flex; width: 100%; justify-content: flex-start; }
}
