/* ─── Flying Tigers Athletics — brand tokens ────────────────────────── */
:root {
  --navy:        #1B2A4A;
  --navy-dark:   #11192d;
  --navy-light:  #2E4170;
  --crimson:     #A0233A;
  --crimson-soft:#FAECE7;
  --steel:       #8893A6;
  --lane-light:  #F4F4F6;
  --bg:          #ffffff;
  --text:        #1F1F23;
  --text-soft:   #6b6b73;
  --text-mute:   #8893A6;
  --border:      #e6e6ea;
  --border-soft: #f1f1f3;
  --green:       #1d9e75;
  --amber:       #BA7517;
  /* Rest day palette: muted brand tones (cool navy-tinged neutrals) */
  --rest-bg:     #EEF1F7;
  --rest-accent: #2E4170;
  --rest-soft:   #FAF6F2;
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.04);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
}

/* ─── Reset / base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input { font: inherit; color: inherit; }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(70px + var(--safe-bottom));
  min-height: 100vh;
}

/* ─── Headers ──────────────────────────────────────────────────────── */
.app-header {
  background: var(--navy);
  color: #fff;
  padding: calc(14px + var(--safe-top)) 18px 14px;
}
.app-header-row { display: flex; align-items: center; justify-content: space-between; }
.app-header-text { display: flex; flex-direction: column; gap: 2px; }
.greeting    { font-size: 12px; opacity: 0.75; }
.screen-name { font-size: 18px; font-weight: 500; }
.app-logo {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
.app-logo img { width: 100%; height: 100%; object-fit: contain; }
.header-meta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.header-pill {
  background: rgba(255,255,255,0.12);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 10px;
}

/* ─── Page body ────────────────────────────────────────────────────── */
.page-body { padding: 16px 14px 24px; }
.section-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 500;
  margin: 16px 0 8px;
}
.section-label:first-child { margin-top: 0; }

/* ─── Cards ────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}
.card.accent-crimson { border-left: 3px solid var(--crimson); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.card.accent-navy    { border-left: 3px solid var(--navy);    border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.card.accent-steel   { border-left: 3px solid var(--steel);   border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.card.accent-green   { border-left: 3px solid var(--green);   border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.card-cat {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin: 0 0 4px;
}
.card-title  { font-size: 15px; font-weight: 500; color: var(--navy); margin: 0 0 6px; }
.card-detail { font-size: 13px; line-height: 1.55; color: var(--text); margin: 0 0 8px; }
.card-target { font-size: 12px; color: var(--crimson); font-weight: 500; }

/* ─── Phase card (gradient) ────────────────────────────────────────── */
.phase-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 0 0 14px;
}
.phase-eyebrow { font-size: 10px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.6px; }
.phase-title   { font-size: 16px; font-weight: 500; margin: 4px 0 8px; }
.phase-bar     { background: rgba(255,255,255,0.2); height: 5px; border-radius: 3px; overflow: hidden; }
.phase-bar-fill{ background: var(--crimson); height: 100%; transition: width 0.4s ease; }
.phase-foot    { display: flex; justify-content: space-between; font-size: 11px; opacity: 0.85; margin-top: 8px; }

/* ─── Stats row ────────────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.stat {
  background: var(--lane-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.stat-label { font-size: 10px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 500; margin: 0; }
.stat-value { font-size: 20px; font-weight: 500; color: var(--navy); margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.stat-sub   { font-size: 10px; color: var(--text-soft); margin: 2px 0 0; }

/* ─── Goals list ───────────────────────────────────────────────────── */
.goals-list { background: #fff; border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 6px 14px; }
.goal-row { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 0.5px solid var(--border-soft); }
.goal-row:last-child { border-bottom: 0; }
.goal-row.secondary { opacity: 0.92; }
.goal-row.secondary .goal-time { color: var(--navy); font-weight: 400; }
.goal-row.secondary .goal-event { color: var(--text-mute); font-style: italic; font-size: 12px; }
.goal-dist { font-size: 11px; color: var(--text-mute); font-weight: 500; }
.goal-event { font-size: 13px; color: var(--text); font-weight: 500; }
.goal-time { font-size: 14px; color: var(--crimson); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Make stat tile clickable on Home (cursor + active state) */
.stat.clickable {
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: block;
  transition: background 0.12s, transform 0.08s;
}
.stat.clickable:active { background: var(--border-soft); transform: scale(0.98); }
.stat.clickable .stat-link {
  display: inline-block;
  font-size: 10px;
  color: var(--crimson);
  margin-top: 4px;
  font-weight: 500;
}

/* ─── CTA Buttons ──────────────────────────────────────────────────── */
.cta {
  background: var(--crimson);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
}
.cta:active { transform: scale(0.98); }
.cta-text  { display: flex; flex-direction: column; }
.cta-title { font-size: 15px; font-weight: 500; }
.cta-sub   { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.cta-arrow { font-size: 20px; line-height: 1; }

.cta-rest {
  background: var(--rest-bg);
  color: var(--rest-accent);
  border: 1px solid var(--rest-accent);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.btn-secondary {
  background: var(--lane-light);
  color: var(--navy);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  width: 100%;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-secondary svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── Lift exercise list ───────────────────────────────────────────── */
.lift-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  align-items: center; padding: 10px 0;
  border-bottom: 0.5px solid var(--border-soft);
}
.lift-row:last-child { border-bottom: 0; }
.lift-info  { min-width: 0; }
.lift-name  { font-size: 13px; color: var(--text); font-weight: 500; }
.lift-sub   { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.lift-log {
  font-size: 11px;
  background: var(--lane-light);
  color: var(--navy);
  padding: 5px 10px;
  border-radius: 14px;
  font-weight: 500;
}
.lift-log.done { background: var(--navy); color: #fff; }

/* ─── Recent activity list ─────────────────────────────────────────── */
.recent { background: #fff; border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 6px 14px; }
.recent-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 0.5px solid var(--border-soft); font-size: 13px; }
.recent-row:last-child { border-bottom: 0; }
.status-pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.status-pill.done    { background: #e1f5ee; color: var(--green); }
.status-pill.today   { background: var(--crimson-soft); color: var(--crimson); font-weight: 500; }
.status-pill.upcoming{ color: var(--text-mute); }
.status-pill.rest    { background: var(--rest-bg); color: var(--rest-accent); }

/* ─── Bottom nav ───────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 0.5px solid var(--border);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 8px 0 calc(8px + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
  z-index: 50;
}
.nav-item span:not(.nav-icon) { font-size: 9.5px; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px;
  color: var(--text-mute);
  padding: 4px 0;
}
.nav-item.active { color: var(--navy); font-weight: 500; }
.nav-icon { font-size: 22px; line-height: 1; }

/* ─── Login screen ─────────────────────────────────────────────────── */
.login-hero {
  position: relative;
  color: #fff;
  padding: calc(48px + var(--safe-top)) 24px 38px;
  text-align: center;
  overflow: hidden;
  /* Layered background: brand-tone gradient overlay over hero photo.
     If hero.jpg is missing, the gradient alone still looks on-brand. */
  background:
    linear-gradient(135deg, rgba(27,42,74,0.78) 0%, rgba(160,35,58,0.70) 100%),
    url("assets/hero.jpg") center/cover no-repeat,
    var(--navy);
}
.login-hero img {
  width: 130px; height: 130px;
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.login-hero h1 {
  font-size: 22px; font-weight: 500;
  margin: 0; line-height: 1.3; padding: 0 12px;
  position: relative; z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.login-prompt { padding: 22px 14px 4px; text-align: center; }
.login-prompt .season-eyebrow { font-size: 10px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 500; }
.login-prompt h2 { font-size: 22px; margin: 4px 0 0; color: var(--navy); font-weight: 500; }
.login-copyright {
  padding: 22px 24px calc(28px + var(--safe-bottom));
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
}

.roster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 14px;
}
.roster-tile {
  aspect-ratio: 1;
  background: var(--lane-light);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 8px;
  transition: transform 0.1s;
}
.roster-tile:active { transform: scale(0.96); }
.tile-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--crimson);
  color: #fff;
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.tile-name { font-size: 12px; font-weight: 500; color: var(--navy); }

/* PIN entry */
.pin-screen { padding: 24px 24px 32px; text-align: center; }
.pin-avatar {
  width: 64px; height: 64px;
  background: var(--crimson); color: #fff;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 500;
}
.pin-name { font-size: 20px; font-weight: 500; color: var(--navy); margin: 0 0 4px; }
.pin-sub  { font-size: 13px; color: var(--text-soft); margin: 0 0 22px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 22px; }
.pin-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--steel);
}
.pin-dot.filled { background: var(--navy); border-color: var(--navy); }
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 260px;
  margin: 0 auto;
}
.pin-key {
  background: var(--lane-light);
  border-radius: var(--radius-md);
  padding: 16px 0;
  font-size: 20px;
  font-weight: 500;
  color: var(--navy);
  transition: transform 0.1s;
}
.pin-key:active { transform: scale(0.94); background: var(--border); }
.pin-key.action { background: transparent; color: var(--text-mute); font-size: 16px; }
.pin-error { color: var(--crimson); font-size: 12px; margin-top: 14px; min-height: 18px; }
.pin-back { margin-top: 18px; font-size: 13px; color: var(--text-soft); }

/* ─── Today screen ─────────────────────────────────────────────────── */
.day-label { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 12px; font-weight: 500; }

/* Rest day theme — muted brand tones */
.rest-screen .app-header { background: var(--rest-accent); }
.rest-hero-icon {
  text-align: center; padding: 18px 0 8px;
  display: flex; justify-content: center; align-items: center;
}
.rest-hero-icon svg { width: 56px; height: 56px; color: var(--rest-accent); }
.rest-hero-title { font-size: 22px; font-weight: 500; color: var(--rest-accent); text-align: center; margin: 0 0 4px; }
.rest-hero-sub  { font-size: 13px; color: var(--text-soft); text-align: center; margin: 0 0 16px; }
.recovery-list { background: var(--rest-bg); border-radius: var(--radius-md); padding: 14px 18px; }
.recovery-item { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 7px 0; font-size: 13px; align-items: start; }
.recovery-item .ico {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--rest-accent);
  color: #fff;
  font-size: 12px; font-weight: 500;
  margin-top: 1px;
}

/* ─── Testing screen ───────────────────────────────────────────────── */
.test-window {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 0 0 14px;
}
.test-eyebrow { font-size: 10px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; }
.test-title   { font-size: 15px; font-weight: 500; margin: 3px 0 0; }

.test-card { background: #fff; border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 11px 14px; margin: 0 0 8px; }
.test-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.test-name  { font-size: 14px; font-weight: 500; color: var(--navy); }
.test-stats { display: flex; gap: 12px; margin-top: 3px; font-size: 11px; color: var(--text-soft); }
.test-stats strong { color: var(--text); font-variant-numeric: tabular-nums; }
.test-trend.improved { color: var(--green); font-weight: 500; font-size: 11px; }
.test-trend.regressed { color: var(--crimson); font-weight: 500; font-size: 11px; }
.test-trend.baseline { color: var(--text-mute); font-size: 11px; }
.test-input-btn {
  font-size: 13px;
  color: var(--crimson);
  background: var(--crimson-soft);
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.test-pending { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

/* ─── Modal for logging ────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(17, 25, 45, 0.6);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
}
.modal {
  width: 100%; max-width: 480px;
  background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 18px 18px calc(18px + var(--safe-bottom));
  animation: slideUp 0.2s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal h3 { font-size: 17px; font-weight: 500; margin: 0 0 4px; color: var(--navy); }
.modal-sub { font-size: 12px; color: var(--text-soft); margin: 0 0 14px; }
.modal-field { margin-bottom: 12px; }
.modal-field label { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.modal-field input, .modal-field textarea {
  width: 100%; margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  background: var(--lane-light);
}
.modal-field input:focus, .modal-field textarea:focus { outline: none; border-color: var(--navy); background: #fff; }
.modal-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 14px; }
.btn-modal-save { background: var(--crimson); color: #fff; border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 500; }
.btn-modal-cancel { background: var(--lane-light); color: var(--navy); border-radius: 10px; padding: 12px; font-size: 14px; }
.btn-modal-delete { background: #fff; color: var(--crimson); border: 1px solid var(--crimson); border-radius: 10px; padding: 11px; font-size: 14px; font-weight: 500; }
.modal-sub strong { color: var(--navy); font-weight: 500; }

/* ─── Date navigation (Today screen) ──────────────────────────────── */
.date-nav-row {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.date-nav-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.date-nav-arrow:active { background: rgba(255,255,255,0.25); }
.date-nav-center { text-align: center; }
.date-nav-kind {
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.7;
}
.date-nav-back-today {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: rgba(255,255,255,0.16);
  border-radius: 12px;
  padding: 4px 10px;
  margin-top: 6px;
  font-weight: 500;
}
.date-nav-back-today:active { background: rgba(255,255,255,0.28); }
.read-only-banner {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  background: var(--lane-light);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

/* Edit pill (small badge for already-logged lift rows on past days) */
.lift-log.edit {
  background: #fff;
  color: var(--crimson);
  border: 1px solid var(--crimson);
}

/* ─── Pace + Recovery (workout detail card) ────────────────────────── */
.workout-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 8px; }
.meta-tile { background: var(--lane-light); border-radius: 10px; padding: 8px 12px; }
.meta-tile.target { background: var(--crimson-soft); }
.meta-tile-label { font-size: 9px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.meta-tile.target .meta-tile-label { color: var(--crimson); }
.meta-tile-value { font-size: 15px; font-weight: 500; color: var(--navy); margin-top: 3px; font-variant-numeric: tabular-nums; }
.meta-tile.target .meta-tile-value { color: var(--crimson); }
.meta-tile-sub { font-size: 10px; color: var(--text-soft); margin-top: 1px; }

/* ─── Structured workout blocks ────────────────────────────────────── */
.block-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.block-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-soft);
  background: var(--lane-light); border-radius: 999px; padding: 4px 11px; }
.block-chip-ic { color: var(--steel); font-size: 11px; }
.block-list { margin: 2px 0 4px; }
.block-row { padding: 11px 0; border-top: 1px solid var(--border-soft); }
.block-row:first-child { border-top: none; padding-top: 4px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.block-rd { font-size: 19px; font-weight: 500; color: var(--navy); font-variant-numeric: tabular-nums; }
.block-int { font-size: 13px; font-weight: 500; color: var(--crimson); white-space: nowrap; }
.block-sub { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.block-pace { color: var(--crimson); font-weight: 500; font-variant-numeric: tabular-nums; }
.block-rest { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--rest-accent);
  background: var(--rest-bg); border-radius: 8px; padding: 4px 9px; margin-top: 7px; font-variant-numeric: tabular-nums; }
.block-rest-ic { font-size: 12px; }
.block-rest-empty { color: var(--text-mute); background: var(--lane-light); font-style: italic; }
.block-focus { font-size: 12.5px; line-height: 1.5; color: var(--navy); background: var(--rest-soft);
  border-left: 3px solid var(--steel); border-radius: 0 8px 8px 0; padding: 8px 11px; margin: 12px 0 2px; }
.block-focus-tag { display: inline-block; font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--steel); margin-right: 7px; }

/* ─── Abs / core circuit card ──────────────────────────────────────────── */
.abs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 2px 0 8px; }
.abs-sub { font-size: 13px; color: var(--text-soft); }
.abs-count { font-size: 12px; font-weight: 500; color: var(--text-mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
.abs-count.hit { color: var(--green); }
.abs-dots { display: flex; gap: 6px; margin: 0 0 12px; }
.abs-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--lane-light); border: 1.5px solid var(--border); }
.abs-dot.on { background: var(--green); border-color: var(--green); }
.abs-list { margin: 0 0 10px; padding-left: 20px; }
.abs-list li { font-size: 14px; line-height: 1.7; color: var(--text); }
.abs-rest { font-size: 12px; color: var(--text-soft); background: var(--lane-light); border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; }
.abs-done.done { background: var(--green); color: #fff; border-color: var(--green); }

/* ─── Coach login tile + coach view ────────────────────────────────────── */
.coach-login-wrap { padding: 4px 20px 8px; }
.coach-tile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px;
  background: var(--navy); color: #fff; border: none; border-radius: var(--radius-md); cursor: pointer; text-align: left; }
.coach-tile-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex: 0 0 auto; }
.coach-tile-text { display: flex; flex-direction: column; flex: 1; }
.coach-tile-name { font-size: 15px; font-weight: 500; }
.coach-tile-sub { font-size: 12px; color: rgba(255,255,255,0.7); }
.coach-tile-arrow { font-size: 20px; color: rgba(255,255,255,0.6); }
.coach-nav { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.coach-nav .date-nav-arrow { flex: 0 0 36px; overflow: hidden; white-space: nowrap; }
.coach-logout { margin-top: 16px; width: 100%; }

/* ─── Email/password auth screen ───────────────────────────────────────── */
.auth-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0 22px; }
.auth-card { width: 100%; max-width: 360px; background: var(--bg); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 18px; margin-top: 8px; box-shadow: var(--shadow-sm); }
.auth-sub { font-size: 14px; color: var(--text-soft); margin: 0 0 14px; line-height: 1.5; }
.auth-note { font-size: 12px; color: var(--text-mute); margin: 4px 0 14px; }
.auth-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-mute); font-weight: 500; margin: 10px 0 4px; }
.auth-input { width: 100%; box-sizing: border-box; font-size: 16px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
.auth-input:focus { outline: none; border-color: var(--navy); }
.auth-error { font-size: 13px; color: var(--crimson); min-height: 18px; margin: 8px 0 2px; }
.auth-btn { width: 100%; margin-top: 8px; }
.btn-primary { width: 100%; background: var(--navy); color: #fff; border: 1px solid var(--navy);
  border-radius: var(--radius-md); padding: 12px; font-size: 15px; font-weight: 500; cursor: pointer; }
.btn-primary:active { background: var(--navy-dark); }
.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.55; }
.auth-link { display: block; width: 100%; background: none; border: none; color: var(--navy-light);
  font-size: 13px; margin-top: 12px; cursor: pointer; text-align: center; }

/* ─── Coach team dashboard ─────────────────────────────────────────────── */
.team-summary { font-size: 13px; color: var(--text-soft); margin: 2px 0 12px; }
.team-row { display: flex; align-items: center; gap: 11px; }
.tile-avatar.sm { width: 34px; height: 34px; font-size: 13px; flex: 0 0 auto; display: flex;
  align-items: center; justify-content: center; border-radius: 50%; background: var(--lane-light); color: var(--navy); font-weight: 500; }
.team-info { flex: 1; min-width: 0; }
.team-name { font-size: 15px; font-weight: 500; color: var(--navy); }
.team-sub { font-size: 12px; color: var(--text-mute); }
.team-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: 0 0 auto; }
.team-badge { font-size: 11px; font-weight: 500; color: var(--text-mute); }
.team-badge.on { color: var(--green); }
.team-core { font-size: 11px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.danger-btn { color: var(--crimson) !important; border-color: var(--crimson) !important; }

/* ─── v1.5: coach note banner (athlete Home) ───────────────────────────── */
.coach-note { background: var(--crimson-soft); border-left: 3px solid var(--crimson); border-radius: 0 10px 10px 0;
  padding: 11px 14px; margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--navy); }
.coach-note-tag { display: inline-block; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--crimson); margin-right: 8px; }

/* ─── v1.5: attendance quick-mark (coach Team) ─────────────────────────── */
.team-card { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--radius-md); margin-bottom: 8px; overflow: hidden; }
.team-main { display: block; width: 100%; text-align: left; background: none; border: none; padding: 12px 14px 6px; cursor: pointer; }
.team-main .team-row { display: flex; align-items: center; gap: 11px; }
.att-group { display: flex; gap: 6px; padding: 0 14px 12px; }
.att-btn { flex: 1; font-size: 12px; font-weight: 500; padding: 6px 0; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border); background: var(--bg); color: var(--text-soft); cursor: pointer; }
.att-btn.att-here.on { background: var(--green); color: #fff; border-color: var(--green); }
.att-btn.att-late.on { background: var(--amber); color: #fff; border-color: var(--amber); }
.att-btn.att-out.on  { background: var(--crimson); color: #fff; border-color: var(--crimson); }

/* ─── v1.5: attendance history + testing trends (athlete detail) ───────── */
.att-history { display: flex; flex-wrap: wrap; gap: 6px; }
.att-pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--lane-light); color: var(--text-soft); }
.att-pill.att-here { background: #E1F5EE; color: #0F6E56; }
.att-pill.att-late { background: #FAEEDA; color: #854F0B; }
.att-pill.att-out  { background: #FAECE7; color: #993C1D; }
.test-trend { padding: 8px 0; border-top: 1px solid var(--border-soft); }
.test-trend:first-child { border-top: none; }
.test-trend-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2px; }
.test-trend-name { font-size: 13px; font-weight: 500; color: var(--navy); }
.test-trend-latest { font-size: 13px; font-weight: 500; color: var(--crimson); font-variant-numeric: tabular-nums; }
.coach-viewtoggle { display: flex; gap: 4px; justify-content: center; margin-top: 10px; position: relative; z-index: 1; }
.cvt { font-size: 13px; font-weight: 500; padding: 5px 18px; border-radius: 999px;
  border: 0.5px solid rgba(255,255,255,0.35); background: transparent; color: rgba(255,255,255,0.78); cursor: pointer; }
.cvt:not(.active):hover { background: rgba(255,255,255,0.12); color: #fff; }
.cvt.active { background: #fff; color: var(--navy); border-color: #fff; }

/* week-at-a-glance day cards */
.cwk-day { display: block; width: 100%; text-align: left; background: var(--bg); border: 0.5px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
.cwk-day.rest { background: var(--lane-light); }
.cwk-day-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.cwk-dow { font-size: 15px; font-weight: 500; color: var(--navy); }
.cwk-date { font-size: 12px; color: var(--text-mute); }
.cwk-theme { font-size: 12px; color: var(--crimson); font-weight: 500; margin-bottom: 6px; }
.cwk-rest { font-size: 13px; color: var(--text-mute); }
.cwk-line { font-size: 12.5px; line-height: 1.5; color: var(--text); margin-top: 4px; display: flex; gap: 7px; align-items: baseline; }
.cwk-tag { flex: 0 0 auto; font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 2px 7px; border-radius: 5px; color: #fff; }
.cwk-tag.sprint { background: var(--crimson); }
.cwk-tag.hurdle { background: var(--crimson); opacity: 0.7; }
.cwk-tag.lift   { background: var(--navy); }
.cwk-tag.core   { background: var(--green); }

/* ─── Per-rep logging grid ─────────────────────────────────────────── */
.rep-grid { margin: 8px 0; }
.set-block { margin-bottom: 12px; }
.set-label { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; margin-bottom: 6px; }
.rep-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
}
.rep-cell {
  display: flex; flex-direction: column;
  background: var(--lane-light);
  border-radius: 8px;
  padding: 6px 8px;
  position: relative;
}
.rep-cell-label {
  font-size: 9px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
  margin-bottom: 2px;
}
.rep-cell input {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  padding: 0;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.rep-cell input:focus { outline: none; }
.rep-cell.filled { background: #fff; border: 1px solid var(--navy); }
.btn-add-rep {
  background: transparent;
  color: var(--crimson);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 4px;
  border: 1px dashed var(--crimson);
  width: 100%;
}

/* ─── Progress: testing sparklines ─────────────────────────────────── */
.progress-card {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.progress-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.progress-test-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
}
.progress-delta {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.progress-delta.improved  { background: #e1f5ee; color: var(--green); }
.progress-delta.regressed { background: var(--crimson-soft); color: var(--crimson); }
.progress-delta.baseline  { background: var(--lane-light); color: var(--text-mute); }
.progress-values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.progress-window {
  text-align: center;
  font-size: 10px;
}
.progress-window-label { color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 500; }
.progress-window-value {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.progress-window-value.empty { color: var(--text-mute); font-weight: 400; }
.sparkline-wrap { display: block; margin-top: 4px; }
.sparkline-wrap svg { display: block; width: 100%; height: 36px; }
.sparkline-empty {
  font-size: 11px;
  color: var(--text-mute);
  text-align: center;
  padding: 8px 0;
  font-style: italic;
}

/* ─── Test-primary cards (one card per test, 4 window cells across) ──── */
.test-row-card {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.test-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.test-row-name { font-size: 14px; font-weight: 500; color: var(--navy); }
.test-row-cells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.test-cell {
  background: var(--lane-light);
  border-radius: 10px;
  padding: 9px 4px;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.08s, background 0.12s;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.test-cell:active { transform: scale(0.96); }
.test-cell.logged {
  background: var(--crimson-soft);
  border-color: var(--crimson);
}
.test-cell.next {
  background: #fff;
  border: 1px dashed var(--crimson);
}
.test-cell.future { opacity: 0.6; }
.test-cell-label {
  font-size: 9px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
}
.test-cell.logged .test-cell-label { color: var(--crimson); }
.test-cell.next .test-cell-label { color: var(--crimson); }
.test-cell-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.test-cell.logged .test-cell-value { color: var(--crimson); }
.test-cell.empty .test-cell-value, .test-cell.future .test-cell-value {
  color: var(--text-mute);
  font-weight: 400;
}

/* ─── Calendar screen ──────────────────────────────────────────────── */
.cal-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px 10px;
}
.cal-month { font-size: 16px; font-weight: 500; color: var(--navy); }
.cal-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lane-light);
  color: var(--navy);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.cal-arrow:active { background: var(--border); }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px; font-weight: 500;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 0;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  font-size: 13px;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}
.cal-day.outside    { color: var(--text-mute); opacity: 0.4; }
.cal-day.today      { background: var(--navy); color: #fff; font-weight: 500; }
.cal-day.training   { background: var(--lane-light); }
.cal-day.rest       { background: var(--rest-bg); color: var(--rest-accent); }
.cal-day.logged     { background: var(--crimson-soft); color: var(--crimson); font-weight: 500; }
.cal-day.testing::after {
  content: "";
  position: absolute;
  top: 4px; right: 4px;
  width: 6px; height: 6px;
  background: var(--crimson);
  border-radius: 50%;
}
.cal-day:active     { transform: scale(0.95); }
.cal-day-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--crimson);
}
.cal-day.today .cal-day-dot { background: #fff; }
.cal-legend {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 10px; color: var(--text-soft);
  padding: 12px 4px 4px;
}
.cal-legend .swatch {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 3px; vertical-align: middle; margin-right: 4px;
}

/* Day-detail modal extras */
.day-detail-section { margin-top: 10px; }
.day-detail-section h4 {
  font-size: 11px; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 500; margin: 12px 0 6px;
}
.day-detail-section p { font-size: 13px; margin: 0 0 4px; color: var(--text); }

/* ─── Pace Calculator ──────────────────────────────────────────────── */
.pc-result {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  margin-bottom: 18px;
}
.pc-result-eyebrow {
  font-size: 10px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}
.pc-result-time {
  font-size: 44px;
  font-weight: 500;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.pc-result-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 6px;
}

.pc-section { margin-bottom: 16px; }
.pc-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 500;
  margin: 0 0 8px;
}
.pc-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pc-pill {
  background: var(--lane-light);
  color: var(--navy);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.08s, background 0.12s;
}
.pc-pill:active { transform: scale(0.95); }
.pc-pill.active { background: var(--crimson); color: #fff; }
.pc-pill.dim { color: var(--text-mute); }

/* ─── Empty / loading ──────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-soft); }
.empty-state p { font-size: 14px; }
