:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #6b7684;
  --line: #e3e7ec;
  --brand: #cb4a03;
  --brand-ink: #ffffff;
  --ok-bg: #e7f6ec; --ok-ink: #1c7a3f;
  --err-bg: #fdecea; --err-ink: #b5321c;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .75rem 1.25rem;
  background: #000000; border-bottom: 1px solid #000000;
}
.topbar nav a { color: #fff; }
.topbar nav a:hover { color: var(--brand); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 46px; width: auto; display: block; }
.topbar nav { display: flex; align-items: center; gap: 1.7rem; }
.topbar nav a { color: #fff; text-decoration: none; }
.topbar nav a:hover { color: var(--brand); }

/* Dropdown groups (Training / Admin / Login) */
.nav-group { position: relative; }
.nav-group > summary { color: #fff; cursor: pointer; list-style: none; user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: " ▾"; font-size: .7em; opacity: .8; }
.nav-group > summary:hover { color: var(--brand); }
.nav-drop {
  position: absolute; top: 100%; left: 0; margin-top: .4rem; z-index: 60;
  display: flex; flex-direction: column; gap: .1rem; min-width: 160px;
  background: #1b1f24; border: 1px solid #2c3138; border-radius: 8px; padding: .4rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.nav-drop a { padding: .4rem .6rem; border-radius: 5px; }
.nav-drop a:hover { background: #262b31; }
.nav-drop a.on { background: var(--brand); color: #fff; font-weight: 700; }
.nav-drop-signout { border-top: 1px solid #2c3138; margin-top: .3rem; padding-top: .5rem; color: #ff9a9a; }
/* Runner-context dropdown: name as the title + the coach's runner switcher */
.nav-runner > summary { font-weight: 700; color: var(--brand); }
.nav-runner .nav-drop { min-width: 210px; }
.nav-runner-switch { border-top: 1px solid #2c3138; margin-top: .35rem; padding-top: .45rem; }
.nav-runner-switch input { width: 100%; box-sizing: border-box; padding: .4rem .5rem; margin-bottom: .35rem;
  border: 1px solid #3a4048; border-radius: 6px; background: #12151a; color: #fff; font: inherit; font-size: .82rem; }
#nav-runner-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
#nav-runner-list a { display: block; font-size: .84rem; }
#nav-runner-list a.active { background: var(--brand); color: #fff; font-weight: 700; }
.nav-group[open] > .nav-drop { display: flex; }
@media (hover: hover) and (min-width: 861px) {
  .nav-group:hover > .nav-drop { display: flex; }
}

/* Mobile burger */
.topbar nav a.nav-switch { color: var(--brand); font-weight: 700; border: 1px solid var(--brand); border-radius: 6px; padding: .2rem .55rem; }
.topbar nav a.nav-switch:hover { background: var(--brand); color: #fff; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .1rem .3rem; }
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .topbar nav { display: none; flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: .5rem; padding-top: .6rem; }
  .topbar.nav-open nav { display: flex; }
  .nav-group, .nav-group > summary { width: 100%; }
  .nav-drop { position: static; margin: .3rem 0 .3rem .8rem; box-shadow: none; }
}

.wrap { width: 98%; max-width: 1700px; margin: 1.5rem auto; padding: 0; min-height: calc(100vh - 320px); }

/* Site footer (mirrors pbrunner.co.uk) */
.site-footer { background: #000000; color: #cfd4da; margin-top: 3rem; padding: 2.2rem 1rem; }
.footer-inner { max-width: 1500px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-logo img { height: 40px; width: auto; opacity: .95; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: #22262c; color: #fff; transition: background .15s, color .15s; }
.footer-social a:hover { background: var(--brand); color: #fff; }
.footer-copy { font-size: .82rem; color: #8b929b; margin: 0; }
h1 { font-size: 1.5rem; margin: .2rem 0 .3rem; }
h2 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.muted { color: var(--muted); }
.back { display: inline-block; margin-bottom: .5rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--brand); }

/* Buttons */
.btn {
  display: inline-block; padding: .45rem .8rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  text-decoration: none; cursor: pointer; font-size: .9rem;
}
.btn:hover { border-color: #c9d0d8; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(.95); }
.btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn-danger-ghost { color: #b5321c; }

/* Flash */
.flash { padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--err-bg); color: var(--err-ink); }

/* Library cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.card-head h2 { margin: 0; font-size: 1.05rem; }
.tag { display: inline-block; margin-top: .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: .1rem .4rem; border-radius: 5px; }
.tag-review { color: #9a5b00; background: #fff4e0; border-color: #f0c27a; }
.audit-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 1rem; }
.audit-controls input[type=number] { width: 4rem; }
table.audit { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.audit th, table.audit td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
table.audit th.num, table.audit td.num { text-align: right; }
table.audit .hot { color: #b71c1a; font-weight: 800; }
table.audit tbody tr:hover { background: var(--bg); }
.ex-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.ex-filters input[type=search] { min-width: 12rem; }
table.ex-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.ex-table th, table.ex-table td { padding: .4rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
table.ex-table th.num, table.ex-table td.num { text-align: right; }
table.ex-table tbody tr:hover { background: var(--bg); }
.pill { display: inline-block; font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.sesh-Legs { background: #e8f2ff; border-color: #b9d8ff; color: #1857a8; }
.sesh-FullBody { background: #eafaf0; border-color: #b6e6c8; color: #1a7a43; }
.sesh-Core { background: #fff3e0; border-color: #f2cd94; color: #9a5b00; }
.sesh-Arms { background: #f3e9ff; border-color: #d9bff2; color: #6b3fa0; }
.sesh-LegsArms { background: #eef0f2; }
.lib-tabs { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; border-bottom: 2px solid var(--line); margin: 0 0 1.2rem; }
.lib-tabs a { padding: .55rem .9rem; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.lib-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.lib-tabs a .count { font-size: .78rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 .4rem; margin-left: .2rem; }
.lib-tabs .new-link { margin-left: auto; color: var(--brand); }
.tag-private { color: #6b3fa0; background: #f3e9ff; border-color: #d9bff2; }
.ex-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0 1rem; padding: .7rem; background: var(--bg); border-radius: 8px; }
.ex-add select { min-width: 10rem; }
.ex-editor { display: flex; flex-direction: column; gap: .3rem; }
.ex-erow { display: grid; grid-template-columns: 1fr auto 5rem 6rem auto; gap: .6rem; align-items: center; padding: .35rem .5rem; background: var(--bg); border-radius: 6px; }
.ex-erow.ex-head { background: transparent; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ex-erow .ex-sets, .ex-erow .ex-reps { width: 100%; }
.ex-pts-wrap { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.ex-pts { color: var(--brand); font-weight: 700; font-size: .85rem; }
.row-x { border: none; background: none; color: #b71c1a; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.ex-erow.rs-row { grid-template-columns: 2fr auto 1fr 1fr auto; gap: .8rem; background: transparent; padding: .3rem 0; }
.ex-erow.rs-row .ex-name { background: #fff; border: 1px solid #dcdfe4; border-radius: 5px; padding: .55rem .7rem; font-weight: 600; }
.ex-erow.rs-row input { width: 100%; padding: .55rem .65rem; border: 1px solid #dcdfe4; border-radius: 5px; font: inherit; }
.ex-erow.rs-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(230,74,25,.12); }
.ex-erow.rs-row.ex-head .ex-name { background: transparent; border: none; padding: 0; }
.ex-chips { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.ex-chips li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; font-size: .82rem; }
.ex-chips .ex-nm { font-weight: 600; }
.ex-chips .ex-load { color: var(--brand); font-size: .78rem; }
.ex-chips .ex-swap { font-size: .72rem; color: var(--muted); text-decoration: underline; }
.swap-list { display: flex; flex-direction: column; gap: .3rem; margin-top: 1rem; }
.swap-opt { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; background: var(--bg); border-radius: 6px; cursor: pointer; }
.swap-opt .swap-nm { font-weight: 600; flex: 1; }
.formula-table { width: 100%; max-width: 640px; border-collapse: collapse; margin: .5rem 0 1.5rem; }
.formula-table th, .formula-table td { padding: .4rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.formula-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.formula-table input { width: 7rem; }
.review-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1rem; padding: .7rem .9rem; background: #fff4e0; border: 1px solid #f0c27a; border-radius: 8px; }
.review-bar strong { color: #9a5b00; }
.review-bar .btn { margin-left: auto; }
.pts { font-weight: 800; color: var(--brand); white-space: nowrap; }
.pts-empty { color: var(--muted); font-weight: 600; }

.segs { list-style: none; padding: 0; margin: .8rem 0; display: flex; flex-direction: column; gap: .3rem; }
.segs li { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; font-size: .88rem; padding: .3rem .5rem; background: var(--bg); border-radius: 6px; }
.seg-label { color: var(--ink); }
.seg-amt { color: var(--muted); }
.needs { font-style: italic; }
.card-actions { margin-top: auto; padding-top: .8rem; display: flex; gap: .5rem; }

/* Zone chips */
.seg-zone { font-weight: 700; font-size: .75rem; padding: .1rem .4rem; border-radius: 5px; color: #fff; }
/* Zone colours (PB Runner) */
.z1 { background: #D9D9D9; } .z2 { background: #B6D7A8; } .z3 { background: #F9CB9C; }
.z4 { background: #F7AD62; } .z5 { background: #EA9999; } .z6 { background: #E06666; }
.z7 { background: #CC0000; }

/* Session cards coloured by main zone (same z1-z7 ramp); S&C a distinct purple. */
.sched, .plan-sess { border-left: 5px solid var(--line); }
.sess-z1 { border-left-color: #D9D9D9; } .sess-z2 { border-left-color: #B6D7A8; }
.sess-z3 { border-left-color: #F9CB9C; } .sess-z4 { border-left-color: #F7AD62; }
.sess-z5 { border-left-color: #EA9999; } .sess-z6 { border-left-color: #E06666; }
.sess-z7 { border-left-color: #CC0000; }
.sess-sc { border-left-color: #8E7CC3; background: #f6f3fc; }
.sess-race { border-left-color: var(--brand); background: #fff5f0; }
.race-target { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem; margin: .4rem 0; }
.race-goal { font-weight: 800; color: var(--brand); font-size: 1.02rem; }
.race-pace { font-size: .82rem; }
.race-splits .rs-head { font-size: .8rem; font-weight: 700; margin-bottom: .35rem; color: var(--ink); }
.rs-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1rem; font-size: .82rem; }
.rs-list li { display: flex; align-items: baseline; gap: .4rem; padding: .1rem 0; break-inside: avoid; }
.rs-list .rs-n { color: var(--muted); min-width: 2.2rem; }
.rs-list .rs-cum { font-weight: 600; margin-left: auto; }
.rs-grade { font-size: .72rem; font-weight: 700; }
.rs-grade.up { color: #c0392b; }
.rs-grade.down { color: #1a7a43; }

.efforts-box { background: #eafaf0; border: 1px solid #b6e6c8; border-radius: 8px; padding: .6rem .9rem; margin: 0 0 1rem; font-size: 1rem; }
.efforts-box strong { font-size: 1.3rem; color: #1a7a43; }
.efforts-box.low { background: #fff4e0; border-color: #f0c27a; }
.efforts-box.low strong { color: #b5321c; }
#qty-field { display: none; }
/* light zone backgrounds need dark text; the deep reds keep white */
.seg-zone.z1, .seg-zone.z2, .seg-zone.z3, .seg-zone.z4, .seg-zone.z5, .seg-zone.z6 { color: #2a2f36; }
.seg-zone.z7 { color: #fff; }

/* Editor */
.editor { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.field { margin-bottom: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field textarea { padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

.seg-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: .8rem; }
.seg-row { display: grid; grid-template-columns: 1.2fr .7fr 1.2fr .6fr 1fr auto auto; gap: .5rem; align-items: center; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.seg-row:last-child { border-bottom: none; }
.seg-head { background: var(--bg); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.seg-row input, .seg-row select { padding: .4rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; width: 100%; color: var(--ink); }
.seg-row select.seg-zone { font-size: .9rem; font-weight: 600; }   /* editor dropdown (not a colour chip) */
.amt-wrap { display: flex; align-items: center; gap: .3rem; }
.amt-wrap .seg-amount { flex: 1; }
.amt-wrap .seg-unit { width: auto; }
.amt-suffix { color: var(--muted); font-size: .82rem; }
.seg-pts { font-weight: 700; color: var(--brand); font-size: .85rem; white-space: nowrap; text-align: right; }
.row-del { border: none; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.row-del:hover { color: #b5321c; }

.total-bar { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; background: var(--bg); border-radius: 8px; margin: .8rem 0; }
.total-bar strong { color: var(--brand); font-size: 1.2rem; }
.form-actions { display: flex; gap: .6rem; margin-top: 1rem; }

.confirm { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; max-width: 480px; }
.confirm form { display: flex; gap: .6rem; margin-top: 1rem; }

/* Runners */
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.inline-form input { padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.runner-list { display: flex; flex-direction: column; gap: .5rem; }
.runner-row { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.runner-row:hover { border-color: var(--brand); }
.runner-name { font-weight: 700; }
.runner-row .go { margin-left: auto; color: var(--brand); font-size: .88rem; text-decoration: none; }
.runner-name { text-decoration: none; color: var(--ink); }
.runner-name:hover { color: var(--brand); }
.runner-row.is-inactive { opacity: .6; }
.status-badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .12rem .5rem; border-radius: 999px; }
.status-badge.active { color: #1a7a43; background: #eafaf0; border: 1px solid #b6e6c8; }
.status-badge.inactive { color: #8a8f98; background: #eef0f2; border: 1px solid #d9dde2; }
.row-toggle { margin: 0; }
.btn-mini { font-size: .76rem; padding: .2rem .55rem; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; cursor: pointer; color: var(--muted); }
.btn-mini:hover { border-color: var(--brand); color: var(--brand); }
.pay-summary a { display: inline-flex; gap: .35rem; align-items: center; text-decoration: none; font-size: .74rem; }
.pay-paid { color: #1a7a43; font-weight: 700; }
.pay-due-chip { color: #b5321c; font-weight: 700; }
.pay-eff { color: #6b3fa0; font-weight: 700; background: #f3e9ff; border-radius: 999px; padding: .05rem .4rem; }
.pl-stat { font-size: .74rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; background: #eef2f7; color: #3a4658; white-space: nowrap; }
.pl-stat.achieved { background: #eafaf0; color: #1a7a43; }
.pl-stat.good { background: #eafaf0; color: #1a7a43; }
.pl-stat.ok { background: #fff4e0; color: #9a5b00; }
.pl-stat.bad { background: #fdeaea; color: #b5321c; }

/* Settings: rest days, holidays, self-assessment */
.rest-days, .holidays, .self-assess { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.rest-days legend, .holidays legend, .self-assess legend { font-weight: 700; font-size: .85rem; padding: 0 .3rem; }
.rest-days { display: flex; flex-direction: column; gap: .6rem; }
.chk-row { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.rest-days .chk { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.field-label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.pill-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: .5rem .95rem; border: 1.5px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: .9rem; cursor: pointer; background: var(--card); transition: all .12s; }
.pill span:hover { border-color: var(--brand); }
.pill input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.hol-lab { flex-direction: row !important; align-items: center; gap: .4rem !important; font-weight: 600; }
.hol-add { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin-bottom: .6rem; }
.hol-chip { display: inline-flex; align-items: center; gap: .35rem; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .15rem .2rem .15rem .5rem; margin: .15rem; font-size: .82rem; }
.hol-chip .hol-x { border: none; background: none; color: #b5321c; cursor: pointer; font-size: 1rem; line-height: 1; }
.sa-row { display: grid; grid-template-columns: 96px 1fr 36px; align-items: center; gap: .6rem; margin: .3rem 0; }
.sa-name { font-weight: 700; font-size: .85rem; }
.sa-out { font-weight: 800; text-align: right; }

/* Profile self-assessment bars */
.sa-bars { display: flex; flex-direction: column; gap: .6rem; }
.sa-bar-row .sa-bar-top { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700; margin-bottom: .2rem; }
.sa-track { height: 12px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.sa-fill { height: 100%; border-radius: 999px; transition: width .4s; }
.pl-goal { font-size: .8rem; font-weight: 700; color: #6b3fa0; }
.ltg-head { font-size: .95rem; margin: .8rem 0 .2rem; }
.ltg { font-size: .9rem; white-space: pre-line; }
.nav-alert { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e53935; color: #fff; font-size: .68rem; font-weight: 800; }
.audit tr.unseen-row { background: #fff9ec; }
.new-dot { color: #e53935; font-size: .7rem; }
.zone-pills { display: inline-flex; margin: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.zpill { font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: .22rem .5rem; border: none; border-left: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; }
.zpill:first-child { border-left: none; }
.zpill:hover { color: var(--brand); }
.zpill.on { background: var(--brand); color: #fff; }

/* --- Dashboard week ring --- */
.week-ring { position: relative; width: 150px; height: 150px; margin: .4rem auto .5rem; }
.week-ring svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fg { fill: none; stroke: #1a9e4b; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .4s ease; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center strong { font-size: 1.7rem; line-height: 1; }
.ring-center .muted { font-size: .8rem; }
.ring-pct { font-size: 1.1rem; font-weight: 800; color: #1a7a43; margin-top: .15rem; }   /* % of week total */
.ring-target { font-size: 1.15rem; font-weight: 700; color: var(--muted); margin-top: .1rem; }
.ring-target-form { display: flex; align-items: flex-end; justify-content: center; gap: .4rem; margin-top: .5rem; }
.ring-target-form label { display: flex; flex-direction: column; gap: .15rem; font-size: .72rem; font-weight: 700; color: var(--muted); }
.ring-target-form input { width: 78px; padding: .35rem .45rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; text-align: center; }
.ring-off { font-size: .82rem; font-weight: 800; margin-top: .25rem; }
.week-ring.good .ring-off { color: #1a9e4b; }
.week-ring.ok   .ring-off { color: #d9820a; }
.week-ring.bad  .ring-off { color: #e53935; }
.week-target-line { text-align: center; margin: 0 0 .4rem; font-size: .95rem; }
.week-target-line strong { color: var(--brand); }

/* Points still needed to reach 100% of the weekly target */
.week-togo { text-align: center; margin: .1rem 0 .5rem; font-size: .9rem; color: var(--muted); }
.week-togo .togo-n { color: var(--brand); font-weight: 800; font-size: 1.05rem; }
.week-togo .togo-done { color: #1a9e4b; font-weight: 800; font-size: .95rem; }

.planned-note { text-align: center; margin: 0 0 .6rem; font-size: .93rem; }   /* +3px */

/* Coach notes + weekly target box — full width, above the schedule */
.coach-week-box { background: #fff8f5; border: 1px solid #f3d5c8; border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.coach-week-form { display: flex; flex-direction: column; gap: .7rem; }
.cw-head { display: flex; align-items: flex-end; gap: .8rem; }
.cw-target { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; font-weight: 700; color: var(--muted); }
.cw-target input { width: 120px; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 1rem; }
.cw-notes-lab { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 700; color: var(--muted); }
.cw-notes-lab textarea { width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 1rem; resize: vertical; }
.cw-injured { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.cw-injured input { width: 16px; height: 16px; }
.cw-readonly { display: flex; flex-direction: column; gap: .4rem; }
.cw-target-ro { font-size: .95rem; font-weight: 600; color: var(--ink); }
.cw-target-ro strong { color: var(--brand); }
.cw-notes-ro { margin: 0; font-size: 1rem; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }

/* Daily total as a progress bar */
.day-total { display: block; font-size: .95rem; font-weight: 700; padding: 2px; border-radius: 3px;
  background: linear-gradient(to right, #cdeed9 var(--pct, 0%), var(--bg) var(--pct, 0%)); }

/* Session card: bigger text, green-plus view-info toggle, bold coach feedback */
.sched-name { font-size: .92rem; }
.chips .seg-zone { font-size: .9rem; }   /* target stats +2px */
/* Card action buttons (Feedback / Info / Coach Tip) — white pills, inline in one row */
.card-btn { font-size: .72rem; color: var(--brand); background: #fff; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; padding: .22rem .4rem; font-weight: 600;
  font-family: inherit; line-height: 1.3; white-space: nowrap; }
.card-btn:hover { border-color: var(--brand); background: #fff4ef; }
.tip-btn.has-tip { border-style: solid; border-color: var(--brand); }   /* a tip already exists */
/* Delete: a deliberately faint plain × top-right (kept subtle so runners rarely delete). */
.rm { background: none; border: none; cursor: pointer; padding: 0 .1rem; line-height: 1;
  font-size: .95rem; color: #d3d6da; }
.rm:hover { color: #b5321c; }
/* Coach tip box — toggled by the Coach Tip button */
.coach-tip-box { display: none; margin-top: .5rem; }
.sched.tip-open .coach-tip-box { display: block; }
.tip-form textarea { width: 100%; box-sizing: border-box; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; margin-bottom: .35rem; }
.coach-tip-text { margin: 0; font-size: .9rem; background: #fff7e6; border: 1px solid #f2d98a; border-radius: 8px; padding: .5rem .6rem; }
.sched-note { font-size: .85rem; }
.sched-details { display: none; margin-top: .45rem; padding-top: .45rem; border-top: 1px dashed var(--line); }
.sched.open .sched-details { display: block; }
.fb { margin-top: .45rem; font-size: .95rem; }   /* feedback +2px */
.fb p { margin: .15rem 0 0; padding: 0; text-indent: 0; }
.fb .fb-runner { margin-bottom: .5rem; }         /* space between runner + coach feedback */
.fb .fb-coach { font-weight: 500; color: #111417; margin-top: .5rem; background: transparent; padding: 0; }
.as-planned { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.sc-note { font-size: 1.05rem; }
.sc-credit { background: #eafaf0; border: 1px solid #b6e6c8; border-radius: 8px; padding: .7rem .9rem; margin: .5rem 0 1rem; }
.sc-credit strong { font-size: 1.4rem; color: #1a7a43; }
.sc-credit p { margin: .3rem 0 0; }
.tick-all { margin-bottom: .4rem; }

/* S&C tick-to-credit list */
.ex-list { list-style: none; margin: 0 0 .4rem; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.ex-list li { display: flex; align-items: center; gap: .4rem; font-size: .84rem; }
.ex-lab { display: flex; align-items: center; gap: .45rem; flex: 1; cursor: pointer; min-width: 0; }
.ex-lab .ex-check { width: 16px; height: 16px; flex: 0 0 auto; }
.ex-list .ex-nm { flex: 1; min-width: 0; }
.ex-list li.ticked .ex-nm { color: var(--muted); text-decoration: line-through; }
.ex-pts { color: var(--brand); font-weight: 700; }
.ex-vid, .ex-swap { font-size: .72rem; color: var(--muted); text-decoration: underline; }
.seg-detail { list-style: none; margin: 0 0 .4rem; padding: 0; font-size: .82rem; }
.seg-detail li { display: flex; justify-content: space-between; gap: .5rem; padding: .12rem 0; }
.seg-rest { font-size: .74rem; color: #8a6d1a; font-weight: 600; }

/* Week header + nav */
.week-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.week-nav { display: flex; gap: .4rem; }

/* The 2x4 grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; min-height: 150px; display: flex; flex-direction: column; overflow: hidden; }
/* Full-width black header bar per box for emphasis */
.box-head { display: flex; justify-content: space-between; align-items: center; gap: .4rem;
  background: #16191d; color: #fff; margin: -.7rem -.7rem .6rem; padding: .5rem .75rem;
  border-radius: var(--radius) var(--radius) 0 0; }
.day-name { font-weight: 700; font-size: .95rem; color: #fff; }
.day-date { color: #c7ccd3; font-size: .82rem; }
.day.is-today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.day.is-today .box-head { background: var(--brand); }
.day.is-today .day-date { color: #ffe3d6; }

.sched { background: var(--bg); border-radius: 8px; padding: .5rem; margin: 0 -4px .5rem; }   /* -4px L/R */
.sched-top { display: flex; justify-content: space-between; gap: .4rem; align-items: flex-start; }
.sched-lead { display: flex; align-items: flex-start; gap: .45rem; min-width: 0; flex: 1; }
.img-preview { display: block; margin-top: .5rem; max-width: 160px; border-radius: 8px; border: 1px solid var(--line); }
.tip-confirm { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; font-size: .88rem; color: var(--ink); }
.tip-confirm input { width: 16px; height: 16px; }
.stat-stars { color: #f4b400; }
/* Weekly training-points bar chart */
.wpts-panel { margin: 1rem 0; }
.wpts-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.wpts-head h2 { margin: 0; }
.wpts-chart { width: 100%; overflow-x: auto; }
.wpts-svg { width: 100%; min-width: 480px; height: auto; display: block; }
.wpts-hit { fill: #1a9e4b; }
.wpts-miss { fill: #e08a00; }
.wpts-avg { stroke: #d63a2f; stroke-width: 2.5; stroke-dasharray: 5 3; }
.wpts-xlabel { font-size: 9px; fill: var(--muted); text-anchor: middle; }
.wpts-legend { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .82rem; margin-top: .6rem; color: var(--muted); }
.wpts-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: middle; margin-right: .2rem; }
.wpts-legend .lg-green { background: #1a9e4b; } .wpts-legend .lg-orange { background: #e08a00; }
.wpts-legend .lg-red { background: #d63a2f; }

/* 100% Club leaderboard */
.club-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 1rem; }
.club-table { width: 100%; border-collapse: collapse; }
.club-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.club-table td { padding: .7rem .9rem; border-top: 1px solid var(--line); vertical-align: middle; }
.club-rank { font-weight: 800; color: var(--muted); width: 2.5rem; }
.club-name { font-weight: 700; }
.club-star-icons { color: #f4b400; letter-spacing: 1px; font-size: 1.05rem; }
.club-streak { font-weight: 600; }
.club-top .club-rank { color: var(--brand); }
.club-top { background: #fff8f0; }
.stars-form { display: flex; gap: .3rem; margin-top: .35rem; justify-content: center; }
.stars-form input { width: 62px; padding: .25rem .35rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; text-align: center; }
.sess-thumb { width: 60px; height: 60px; flex: 0 0 auto; object-fit: cover; border-radius: 6px; background: #eee; }
/* Title + (points box · zone stats) stacked to the right of the thumbnail */
.sched-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.sched-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.pts-box { background: #1A9E4B; color: #fff; font-weight: 600; font-size: .78rem; letter-spacing: .02em;
  padding: .12rem .4rem; border-radius: 5px; white-space: nowrap; }
.pts-box .pts, .pts-box .pts.done { color: #fff; font-weight: 600; font-size: .78rem; }
.sched-meta .seg-zone { font-size: .78rem; }   /* match the PTS box exactly */
.sched-name { font-weight: 700; font-size: .91rem; line-height: 1.25; margin-bottom: 3px; }   /* +1px, +100 weight, +3px gap */
.chips { display: flex; flex-wrap: wrap; gap: .25rem; margin: .4rem 0; }
.chips .seg-zone { font-size: .78rem; padding: .1rem .34rem; }   /* target stat +1.5px */
.sched-note { font-size: .78rem; color: var(--muted); margin: .3rem 0 0; font-style: italic; }
.day-total { margin-top: auto; text-align: right; font-weight: 700; font-size: .82rem; color: var(--ink); padding-top: .3rem; }
.empty { color: var(--muted); font-size: .82rem; font-style: italic; margin: auto 0; text-align: center; }
.rest-day { font-style: normal; font-weight: 700; letter-spacing: .02em; color: #9aa2ab; }

/* Week box (8th cell) */
.week-box { background: #fff8f5; border-color: #f3d5c8; }
.progress-nums { display: flex; align-items: baseline; gap: .3rem; }
.progress-nums strong { font-size: 1.4rem; color: var(--brand); }
.bar { height: 8px; background: #efe2db; border-radius: 5px; overflow: hidden; margin: .35rem 0 .2rem; }
.bar-fill { height: 100%; background: var(--brand); }
.small { font-size: .74rem; }
.week-meta { display: flex; flex-direction: column; gap: .5rem; margin-top: .7rem; }
.week-meta label { display: flex; flex-direction: column; gap: .2rem; font-size: .81rem; font-weight: 600; color: var(--muted); }   /* +2px −1.5px */
.week-meta input, .week-meta textarea { padding: .45rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .96rem; }   /* +2px −1.5px */
.assign-hint { margin-top: 1rem; text-align: center; }

/* Scheduled-session remove button + day footer / add button */
.day-body { flex: 1; }
.sched-right { display: inline-flex; align-items: center; gap: .3rem; }
.rm-form { margin: 0; display: inline; }
.day-foot { margin-top: auto; padding-top: .4rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem; border-top: 1px solid var(--line); }
.day-foot .day-total { padding: 3px 10px; }
.add-btn { margin-left: auto; font-size: .8rem; color: var(--brand); text-decoration: none; border: 1px dashed #f0c3b3; border-radius: 6px; padding: .2rem .5rem; }
.add-btn:hover { background: #fff4ef; }

/* Session picker overlay */
.picker-backdrop { position: fixed; inset: 0; background: rgba(28, 36, 48, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem; z-index: 50; }
.picker-backdrop[hidden] { display: none; }
.picker-panel { background: var(--card); border-radius: var(--radius); width: 100%; max-width: 460px; max-height: 82vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; }
.picker-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.picker-close { color: var(--muted); text-decoration: none; font-size: 1.4rem; line-height: 1; }
.picker-close:hover { color: #b5321c; }
#picker-filter { margin: .8rem 1rem 0; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.picker-cats { display: flex; flex-wrap: wrap; gap: .3rem; padding: .6rem 1rem 0; }
.cat-btn { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: .2rem .6rem; font: inherit; font-size: .75rem; cursor: pointer; }
.cat-btn:hover { border-color: var(--brand); }
.cat-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.picker-list { overflow-y: auto; padding: .6rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; }
.picker-item { margin: 0; display: flex; align-items: stretch; gap: .3rem; }
.pi-add { flex: 1 1 auto; display: flex; justify-content: space-between; align-items: center; gap: .6rem; text-align: left; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; }
.pi-add:hover { border-color: var(--brand); background: #fff6f2; }
.pi-star { flex: 0 0 auto; width: 2.1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 1.05rem; line-height: 1; color: #c9ced6; }
.pi-star:hover { border-color: #f5a623; color: #f5a623; }
.pi-star.on { color: #f5a623; border-color: #f3c77a; background: #fff9ef; }
.cat-btn.cat-fav.on { background: #f5a623; border-color: #f5a623; }
.pi-name { font-weight: 600; font-size: .9rem; }
.pi-meta { color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* Completed-session state on the week grid */
.sched.done { background: #eef8f0; border-left: 3px solid #2e9e5b; }
/* Completion status overrides the zone colour: incomplete = orange, missed = red */
.sched.status-incomplete { border-left: 5px solid #e08a00; background: #fff7ec; }
.sched.status-missed { border-left: 5px solid #d63a2f; background: #fdeeed; }
.pts.done { color: #2e9e5b; }
.sched-actions { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .4rem; }
.sched-actions { display: flex; align-items: center; justify-content: flex-start; gap: 3px; margin-top: .55rem; flex-wrap: nowrap; }
.sched-actions .rm-form { margin: 0; }
.log-link { font-size: .9rem; color: var(--brand); text-decoration: none; font-weight: 600; }   /* +2px */
.reply-link { font-size: .9rem; color: #2f6fed; text-decoration: none; font-weight: 600; }
.reply-link:hover { text-decoration: underline; }
.log-link:hover { text-decoration: underline; }
.done-tag { font-size: .74rem; color: #2e9e5b; font-weight: 600; }

/* Completion (log) page */
.complete-head { margin-bottom: 1rem; }
.coach-note { background: #fff6f2; border-left: 3px solid var(--brand); padding: .5rem .7rem; border-radius: 0 8px 8px 0; margin-top: .5rem; }
.complete-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.panel h2 { font-size: 1rem; margin: 0 0 .7rem; display: flex; align-items: center; gap: .5rem; }
.pts-badge { background: var(--bg); color: var(--brand); font-size: .82rem; padding: .12rem .5rem; border-radius: 20px; font-weight: 700; }
.seg-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.seg-list li { display: flex; align-items: center; gap: .5rem; }
.seg-amt { font-weight: 600; min-width: 62px; }
.seg-label { font-size: .82rem; }

/* Status buttons: Extra / Complete / Incomplete / Missed */
.status-help { margin: .2rem 0 .5rem; }
.status-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1rem; }
.status-btn { padding: .6rem .4rem; border: 2px solid transparent; border-radius: 8px; font: inherit;
  font-weight: 700; cursor: pointer; color: #fff; opacity: .4; transition: opacity .12s, transform .1s, box-shadow .12s; }
.status-btn:hover { opacity: .75; }
.status-btn.selected { opacity: 1; font-weight: 800; transform: translateY(-2px) scale(1.06);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0,0,0,.3), 0 6px 16px rgba(0,0,0,.32); }
.status-extra { background: #2f6fed; }
.status-complete { background: #1a9e4b; }
.status-incomplete { background: #e08a00; }
.status-missed { background: #d63a2f; }
@media (max-width: 560px) { .status-buttons { grid-template-columns: repeat(2, 1fr); } }

.zrow { display: grid; grid-template-columns: 150px 1fr 74px auto auto; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.zsel { padding: .4rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.zslider { width: 100%; accent-color: var(--brand); }
.zmin { width: 100%; padding: .4rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.unit { color: var(--muted); font-size: .8rem; }
.zpts { font-size: .8rem; color: var(--brand); font-weight: 700; white-space: nowrap; min-width: 52px; text-align: right; }
.zremove { border: none; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; line-height: 1; }
.zremove:hover { color: #b5321c; }
#add-zone { margin: .3rem 0 1rem; }
.actual-total { font-size: 1.05rem; margin: .8rem 0 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.actual-total strong { color: var(--brand); font-size: 1.3rem; }
.actual-total .muted { font-size: .85rem; margin-left: .3rem; }

@media (max-width: 760px) {
  .complete-grid { grid-template-columns: 1fr; }
  .zrow { grid-template-columns: 120px 1fr 64px auto auto; }
}

/* Layout with runner-switcher sidebar */
/* Runner nav moved to the top-bar dropdown — pages are now full-width. */
.with-sidebar { display: block; }
.with-sidebar .main { width: 100%; min-width: 0; }
.switcher { display: none; }
.switcher-legacy-unused { width: 230px; flex: 0 0 230px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; position: sticky; top: 1rem; }
.switcher-head { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .5rem; }
.switcher-search { width: 100%; box-sizing: border-box; margin-bottom: .5rem; padding: .35rem .5rem; font-size: .82rem; border: 1px solid var(--line); border-radius: 7px; }
.switcher-empty { font-size: .82rem; color: var(--muted); margin: 0 0 .5rem; padding: 0 .5rem; }
.switcher-list { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .12rem; max-height: 360px; overflow-y: auto; }
.switcher-list a { display: flex; align-items: center; gap: .3rem; padding: .3rem .5rem; border-radius: 7px; text-decoration: none; color: var(--ink); font-size: .82rem; }
.switcher-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switcher-list a:hover { background: var(--bg); }
.switcher-list a.active { background: #fff2ec; color: var(--brand); font-weight: 700; }
.switcher-list .tick { display: inline-block; width: 12px; color: var(--brand); }
.switcher-add { display: block; font-size: .8rem; color: var(--brand); text-decoration: none; padding: .25rem .5rem; }
.switcher-views { display: flex; flex-direction: column; gap: .25rem; margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.switcher-views a { font-size: .85rem; text-decoration: none; color: var(--muted); padding: .3rem .5rem; border-radius: 7px; }
.switcher-views a.on { background: var(--brand); color: #fff; font-weight: 700; }
.switcher-views a:not(.on):hover { background: var(--bg); }

/* Multi-week plan grid */
.plan-scroll { overflow-x: auto; }
.plan { min-width: 760px; display: flex; flex-direction: column; gap: 6px; }
.plan-row { display: grid; grid-template-columns: 108px repeat(7, 1fr); gap: 6px; }
.plan-head .plan-col-head { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: .2rem 0; }
.plan-head .plan-wk-label { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.plan-wk-label { display: flex; flex-direction: column; justify-content: center; gap: .1rem; padding: .3rem .4rem; font-size: .78rem; }
.plan-wk-label .wk-open { font-weight: 700; color: var(--ink); text-decoration: none; font-size: .94rem; }   /* +2.5px */
.plan-wk-label .wk-open:hover { color: var(--brand); }
.plan-wk-label .wk-total { color: var(--muted); font-size: .86rem; }   /* +2.5px */
.plan-row.current .plan-wk-label .wk-open { color: var(--brand); }
.plan-cell { background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-height: 54px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.plan-cell.is-today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan-cell.drag-over { background: #fff4ef; border-color: var(--brand); border-style: dashed; }
.plan-sess { display: flex; align-items: center; justify-content: space-between; gap: 3px; background: var(--bg); border-radius: 6px; padding: 3px 5px; cursor: grab; font-size: .72rem; }
.plan-sess:active { cursor: grabbing; }
.plan-sess.dragging { opacity: .4; }
.ps-name { font-weight: 600; line-height: 1.2; overflow: hidden; }
.ps-right { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.ps-pts { color: var(--brand); font-weight: 800; }
.plan-add { margin-top: auto; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; font-size: .8rem; padding: 0 .3rem; text-decoration: none; }
.plan-add:hover { color: var(--brand); border-color: var(--brand); }

/* Saved plans list */
.plans-list { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0 1.5rem; }
.plan-list-rows { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.plan-row-item { display: flex; align-items: center; gap: .8rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; }
.plan-row-item.editing { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pl-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.pl-name { font-weight: 700; }
.pl-status { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: .1rem .4rem; border-radius: 4px; background: #eef1f5; color: #5a6b82; }
.pl-status.active { background: #eef8f0; color: #2e7d4f; }
.pl-status.imported { background: #fff3e0; color: #a15c00; }
.pl-actions { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; }
.pl-actions .btn { padding: .25rem .6rem; font-size: .8rem; }
.pl-actions form { margin: 0; }
.setup-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .5rem; }
.setup-header h2 { margin: 0; font-size: 1.1rem; }

/* Plan setup (periodisation) */
.setup-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1.2rem; align-items: start; }
.setup-form { display: flex; flex-direction: column; gap: .7rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.setup-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.setup-form input { padding: .45rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.avg-line { font-size: .95rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.avg-line strong { color: var(--brand); font-size: 1.2rem; }
.target-table { border-collapse: collapse; width: 100%; }
.target-table th { text-align: left; font-size: .72rem; text-transform: uppercase; color: var(--muted); padding: .3rem .5rem; }
.target-table td { padding: .3rem .5rem; border-top: 1px solid var(--line); font-size: .88rem; }
.target-table .tgt { font-weight: 700; color: var(--brand); }
.target-table tr.rec { background: #f0f6ff; }
.target-table tr.rec td { color: #2f5aa8; }
.wk-type { font-size: .62rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; padding: .04rem .3rem; border-radius: 4px; width: fit-content; }
.wk-type.build { background: #ffe6d9; color: #b5321c; }
.wk-type.rec { background: #e6f0ff; color: #2f5aa8; }

@media (max-width: 760px) { .setup-grid { grid-template-columns: 1fr; } }

/* Display-mode toggle (RPE / HR / Pace) */
.display-toggle { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.display-toggle form { margin: 0; }
.mode-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: .3rem .7rem; border-radius: 20px; font: inherit; font-size: .82rem; cursor: pointer; }
.mode-btn:hover { border-color: var(--brand); }
.mode-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.zone-warn { margin-left: .3rem; text-decoration: none; color: #b5321c; }
.zone-warn:hover { text-decoration: underline; }

/* Runner profile */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin: 1rem 0 1.5rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .1rem; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; }
.profile-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pb-list { list-style: none; margin: 0; padding: 0; }
.pb-list li { display: flex; justify-content: space-between; padding: .4rem 0; border-top: 1px solid var(--line); }
.pb-list li:first-child { border-top: none; }
.plan-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.plan-mini li { display: flex; flex-direction: column; }
.plan-mini a { font-weight: 700; color: var(--ink); text-decoration: none; }
.plan-mini a:hover { color: var(--brand); }
.settings-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 480px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.6rem; margin-top: 1rem; }
.settings-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.settings-form input, .settings-form select, .settings-form textarea { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.settings-form input:focus, .settings-form select:focus, .settings-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(230,74,25,.12); }

/* Consistent form controls site-wide — Montserrat, rounded, roomy */
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=email], input[type=search], select, textarea {
  font-family: inherit;
}

/* Payments */
.pay-search { width: 100%; max-width: 420px; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; margin: .3rem 0 1rem; }
.pay-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(230,74,25,.12); }
.runner-list .runner-row { display: flex; align-items: center; gap: 1rem; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .5rem; background: var(--card); }
.rr-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; }
.runner-name-link { font-weight: 700; color: var(--ink); text-decoration: none; }
.runner-name-link:hover { color: var(--brand); }
.eff-counter { display: inline-flex; align-items: center; gap: .5rem; background: #eafaf0; border: 1px solid #b6e6c8; border-radius: 999px; padding: .2rem .4rem; }
.eff-label { min-width: 4.6rem; text-align: left; }
.eff-btn { width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer; font-size: 1.1rem; font-weight: 800; line-height: 1; color: #fff; }
.eff-btn.plus { background: #1a9e4b; }
.eff-btn.minus { background: #d08a2c; }
.eff-btn:hover { filter: brightness(1.08); }
.eff-count { min-width: 1.6rem; text-align: center; font-weight: 800; font-size: 1.05rem; color: #1a7a43; }
.eff-count.low { color: #b5321c; }
.eff-label { font-size: .78rem; }
.runner-list .go { color: var(--brand); text-decoration: none; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.pay-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pay-list { list-style: none; margin: 0; padding: 0; }
.pay-list li { display: flex; align-items: baseline; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.pay-list li:first-child { border-top: none; }
.pay-amt { font-weight: 800; }
.pay-amt.due { color: #b5321c; }
.pay-amt.paid { color: #2e7d4f; }
.pay-date { color: var(--muted); font-size: .82rem; min-width: 80px; }
.pay-desc { flex: 1; }
.pay-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin: .6rem 0 1rem; }
.pay-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .76rem; font-weight: 600; color: var(--muted); }
.pay-form input, .pay-form select { padding: .4rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }

@media (max-width: 760px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-cols, .pay-cols { grid-template-columns: 1fr; }
}

/* Races */
.race-add-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin: .8rem 0 1.2rem; }
.race-add-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.race-add-form input, .race-add-form select { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.race-add-form .small { flex-basis: 100%; margin: 0; }
.race-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.race-card { display: flex; flex-direction: column; gap: .3rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; text-decoration: none; color: var(--ink); }
.race-card:hover { border-color: var(--brand); }
.race-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.race-name { font-weight: 700; }
.diff-badge { background: var(--brand); color: #fff; font-weight: 800; font-size: .8rem; padding: .1rem .45rem; border-radius: 20px; }
.band-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; color: var(--muted); }
.diff-panel { text-align: right; }
.diff-big { font-size: 2rem; font-weight: 800; color: var(--brand); display: block; }
.pace-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; margin: .8rem 0; }
.pace-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.pace-form input, .pace-form select { padding: .45rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.split-table { border-collapse: collapse; width: 100%; max-width: 620px; }
.split-table th { text-align: left; font-size: .72rem; text-transform: uppercase; color: var(--muted); padding: .3rem .5rem; }
.split-table td { padding: .35rem .5rem; border-top: 1px solid var(--line); }
.split-table tr.up { background: #fdf0ec; } .split-table tr.down { background: #eef8f0; }

/* PBs */
.pb-add-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; margin: .8rem 0; }
.pb-add-form input, .pb-add-form select { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.pb-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .5rem 1rem 1rem; margin-top: 1rem; }
.pb-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .3rem .4rem; overflow-x: auto; margin-top: .2rem; }
.pb-table { border-collapse: collapse; width: 100%; }
.pb-table th { text-align: left; font-size: .72rem; text-transform: uppercase; color: var(--muted); padding: .45rem .7rem; white-space: nowrap; }
.pb-table td { padding: .55rem .7rem; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.pb-event { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.pb-rm { width: 1%; }
.pb-table a { color: var(--brand); text-decoration: none; }
.pb-inline { display: flex; align-items: center; gap: .5rem; margin: 0; }
.pb-inline input[type=text] { flex: 1; min-width: 120px; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.pb-inline input[type=date] { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }
.pb-time { font-weight: 800; }
.dist-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; background: #eef1f5; color: #5a6b82; padding: .1rem .4rem; border-radius: 4px; }

/* Admin accounts */
.acct-filter { padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; margin: .8rem 0; width: 260px; max-width: 100%; }
.acct-table { border-collapse: collapse; width: 100%; max-width: 900px; }
.acct-table th { text-align: left; font-size: .72rem; text-transform: uppercase; color: var(--muted); padding: .3rem .5rem; }
.acct-table td { padding: .3rem .5rem; border-top: 1px solid var(--line); }
.acct-form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.acct-form input { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.acct-status { font-size: .72rem; font-weight: 700; }
.acct-status.ok { color: #2e7d4f; } .acct-status.no { color: #b5321c; }

/* Blog / Tips lists */
.post-list { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; max-width: 800px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.post-card.coach-tip { border-left: 4px solid var(--brand); }
.post-card h2 { margin: .2rem 0 .4rem; font-size: 1.1rem; }
.post-card a { color: var(--brand); text-decoration: none; }

/* About page */
.about-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; margin: 1rem 0 1.5rem; }
.about-img { width: 100%; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.12); }
.about-lead .lead { font-size: 1.15rem; color: var(--muted); }
.about-body { max-width: 760px; }
.about-body p { margin: 0 0 1rem; line-height: 1.7; }
@media (max-width: 760px) { .about-wrap { grid-template-columns: 1fr; } }

/* Feed */
.feed-head { margin-bottom: 1rem; }
.tip-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; }
.tip-form input { flex: 1; min-width: 160px; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.feed-layout { display: grid; grid-template-columns: 1fr 260px; gap: 1.2rem; align-items: start; }
.feed-stream { display: flex; flex-direction: column; gap: .6rem; }
.feed-item { display: flex; gap: .8rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.feed-item.fk-club { border-left: 4px solid #2e9e5b; }
.feed-item.fk-star { border-left: 4px solid #f4b400; background: #fffdf5; }
.feed-item.fk-blog { border-left: 4px solid #3a7bd5; }
.feed-item.fk-tip { border-left: 4px solid var(--brand); }
.feed-item.fk-session { border-left: 4px solid var(--line); }
.fi-icon { font-size: 1.3rem; line-height: 1.4; }
.fi-body { min-width: 0; flex: 1; }
.fi-body p { margin: 0 0 .2rem; }
.fi-body a { color: var(--brand); }
.fi-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--muted); }
.fi-date { font-size: .74rem; color: var(--muted); }
.feed-side .panel h2 { font-size: .95rem; }
.mini-quote { margin: 0 0 .6rem; font-size: .9rem; font-style: italic; color: var(--ink); border-left: 3px solid var(--brand); padding-left: .6rem; }

@media (max-width: 800px) { .feed-layout { grid-template-columns: 1fr; } }

/* Homepage */
.pill { display: inline-block; background: #fff1e8; color: var(--brand); font-weight: 700; font-size: .78rem; padding: .3rem .7rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; margin: 1rem 0 2.5rem; }
.hero h1 { font-size: 2.4rem; line-height: 1.1; margin: .8rem 0 .6rem; letter-spacing: -.02em; }
.hero p { font-size: 1.05rem; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.hero-img img { width: 100%; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.12); display: block; }
.center { text-align: center; }
.intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; margin: 2rem 0; }
.intro img { width: 100%; border-radius: 12px; display: block; }
.ticks { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-direction: column; gap: .35rem; }
.ticks li { position: relative; padding-left: 1.5rem; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.price-card h3 { margin: 0; text-transform: uppercase; letter-spacing: .03em; font-size: .95rem; }
.price-card .price { font-size: 2.4rem; font-weight: 800; color: var(--brand); margin: .3rem 0 .5rem; }
.price-card .price span { font-size: 1rem; color: var(--muted); font-weight: 600; }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.quote-grid blockquote { margin: 0; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 1.1rem 1.2rem; font-size: 1.05rem; }
.quote-grid cite { display: block; margin-top: .6rem; font-size: .82rem; color: var(--muted); font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.cta-band { text-align: center; background: var(--brand); color: #fff; border-radius: 18px; padding: 2rem; margin: 2.5rem 0 1rem; }
.cta-band h2 { color: #fff; margin: 0 0 1rem; font-size: 1.6rem; }
.cta-band .btn-primary { background: #fff; color: var(--brand); }

/* Contact */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; margin-top: 1rem; }
.contact-details { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-direction: column; gap: .6rem; }
.contact-details li { display: flex; flex-direction: column; }
.contact-details strong { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.contact-form { display: flex; flex-direction: column; gap: .7rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.contact-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.contact-form input, .contact-form textarea { padding: .55rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

@media (max-width: 800px) {
  .hero, .intro, .contact-wrap { grid-template-columns: 1fr; }
  .price-grid, .quote-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
}

/* Runner login */
.login-wrap { max-width: 340px; margin: 3rem auto; }
.login-form { display: flex; flex-direction: column; gap: .7rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-top: 1rem; }
.login-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.login-form input { padding: .55rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* Coach default-field selector */
.default-field-form { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; }
.default-field-form label { display: flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .85rem; }
.default-field-form select { padding: .35rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }

/* Zone profile editor */
.zone-anchors { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; background: #fff8f5; border: 1px solid #f3d5c8; border-radius: 10px; padding: .8rem 1rem; margin: 1rem 0; }
.zone-anchors label { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; font-weight: 700; color: var(--muted); }
.zone-anchors input { padding: .45rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }

.zone-table { border-collapse: collapse; width: 100%; max-width: 620px; margin: 1rem 0; }
.zone-table th { text-align: left; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: .3rem .5rem; }
.zone-table td { padding: .35rem .5rem; border-top: 1px solid var(--line); vertical-align: middle; }
.zone-table input { padding: .35rem .4rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }

/* Feedback on the week card */
.fb { margin: .4rem 0 0; border-top: 1px dashed var(--line); padding-top: .35rem; }
.fb-runner { font-size: .89rem; color: var(--ink); margin: 0 0 .2rem; }   /* +2px then −1px */
.fb-coach { font-size: .89rem; color: #2e6b46; background: #eef8f0; border-radius: 6px; padding: .3rem .4rem; margin: .2rem 0 0; }
.rpe-chip { display: inline-block; font-size: .8rem; font-weight: 700; background: #ffe6d9; color: #b5321c; padding: .08rem .4rem; border-radius: 4px; }   /* +2px */

/* Feedback (log) fieldset on the completion page */
.feedback-fields { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem 1rem; margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; }
.feedback-fields legend { font-weight: 700; font-size: .9rem; padding: 0 .4rem; }
.feedback-fields label { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.feedback-fields input, .feedback-fields textarea { padding: .4rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.feedback-fields input[type=number] { width: 90px; }
.coach-reply { background: #eef8f0; border-radius: 8px; padding: .5rem .6rem; font-size: .85rem; color: #2e6b46; }

/* Coach feedback inbox */
.pending-badge { font-size: .8rem; background: var(--brand); color: #fff; padding: .1rem .5rem; border-radius: 20px; vertical-align: middle; }
.fb-list { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.fb-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.fb-item.open { border-left: 3px solid var(--brand); }
.fb-item.answered { border-left: 3px solid #2e9e5b; }
.fb-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.fb-who { font-weight: 700; }
.fb-stats { margin-left: auto; display: inline-flex; gap: .4rem; align-items: center; }
.fb-stats .pts { color: var(--brand); font-weight: 700; }
.fb-runner-note { font-style: italic; margin: .5rem 0; }
/* Target vs achieved comparison in the coach feedback log */
.fb-compare { display: flex; align-items: stretch; gap: .6rem; margin: .5rem 0; }
.fb-col { flex: 1; display: flex; flex-direction: column; gap: .1rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.fb-col.achieved { background: #eef8f0; border-color: #b6e6c8; }
.fb-col-h { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fb-col strong { font-size: 1.05rem; }
.fb-arrow { align-self: center; color: var(--muted); font-size: 1.2rem; }
/* Feedback conversation thread (chat bubbles) */
.fb-thread { display: flex; flex-direction: column; gap: .5rem; margin: .6rem 0; }
.fb-thread h3 { font-size: .95rem; margin: 0 0 .2rem; }
.fb-msg { max-width: 85%; padding: .5rem .7rem; border-radius: 12px; }
.fb-msg .fb-who { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-bottom: .15rem; }
.fb-msg p { margin: 0; font-size: .9rem; line-height: 1.4; }
.fb-msg.runner { align-self: flex-end; background: #e8f0fe; color: #1a3a6b; border-bottom-right-radius: 3px; }
.fb-msg.coach { align-self: flex-start; background: #eef8f0; color: #1f5136; border-bottom-left-radius: 3px; }
.fb-reply-form { display: flex; gap: .5rem; align-items: flex-start; margin-top: .5rem; }
.fb-reply-form textarea { flex: 1; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* Session focus tag */
.focus-tag { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: .05rem .35rem; border-radius: 4px; background: #eef1f5; color: #5a6b82; }

/* Drag-to-move states (weekly grid) */
.sched { cursor: grab; }
.sched:active { cursor: grabbing; }
.sched.dragging { opacity: .4; }
.drop-day.drag-over { background: #fff4ef; box-shadow: inset 0 0 0 2px var(--brand); }

@media (max-width: 760px) {
  .with-sidebar { flex-direction: column; }
  .switcher { width: auto; flex: none; position: static; }
  .switcher-list { flex-direction: row; flex-wrap: wrap; max-height: none; }
}

@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .seg-head { display: none; }
  .seg-row { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
}

/* Ask Coach Simon — question list + chat */
.ask-form { display: flex; flex-direction: column; gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: .6rem 0 1.4rem; max-width: 640px; }
.ask-form input, .ask-form textarea { padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.ask-form textarea { resize: vertical; }
.ask-form .btn { align-self: flex-start; }
.ask-list { display: flex; flex-direction: column; gap: .5rem; max-width: 720px; }
.ask-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .9rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.ask-row:hover { border-color: var(--brand); }
.ask-row.ask-await { border-left: 4px solid var(--brand); }
.ask-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ask-who { font-weight: 700; font-size: .9rem; }
.ask-subj { font-weight: 600; font-size: .95rem; }
.ask-snip { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-badge { flex: 0 0 auto; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .2rem .5rem; border-radius: 999px; }
.ask-badge.await { background: var(--brand); color: #fff; }
.ask-badge.answered { background: #eafaf0; color: #1a7a43; border: 1px solid #b6e6c8; }

.chat { display: flex; flex-direction: column; gap: .6rem; max-width: 720px; margin: 1rem 0 1.4rem; }
.chat-msg { display: flex; }
.chat-runner { justify-content: flex-start; }
.chat-coach { justify-content: flex-end; }
.chat-bubble { max-width: 80%; padding: .55rem .8rem; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.chat-coach .chat-bubble { background: #eef7f0; border-color: #cbe7d3; }
.chat-runner .chat-bubble { background: #fff; }
.chat-who { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: .15rem; }
.chat-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-time { display: block; font-size: .68rem; color: var(--muted); margin-top: .25rem; }
.chat-reply { display: flex; gap: .5rem; align-items: flex-end; max-width: 720px; }
.chat-reply textarea { flex: 1 1 auto; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }

/* Blog writer + full post */
.blog-writer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .3rem .9rem; margin: .4rem 0 1.4rem; }
.blog-writer summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }
.blog-form { display: flex; flex-direction: column; gap: .5rem; padding: .3rem 0 .7rem; }
.blog-form input, .blog-form textarea { padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.blog-form textarea { resize: vertical; }
.blog-form .btn { align-self: flex-start; }
.blog-full { max-width: 720px; }
.blog-full h1 { margin: .2rem 0 .8rem; }
.blog-full p { line-height: 1.6; margin: 0 0 1rem; }
.blog-file { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: var(--muted); }
.post-thumb img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: .5rem; }
.blog-hero { width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; margin: .3rem 0 1.1rem; }
.blog-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; margin-top: 1rem; }
.blog-gallery img { width: 100%; border-radius: 8px; }

/* Session thumbnail (random from the workout's category pool), beside the title */
.sched-thumb { flex: 0 0 auto; width: 65px; height: 65px; object-fit: cover; border-radius: 8px; background: #eef1f4; }

/* Category image manager (admin) */
.catimg-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; }
.catimg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.catimg-head h2 { margin: 0; font-size: 1.05rem; }
.catimg-upload { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.catimg-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; margin-top: .8rem; }
.catimg-thumb { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; background: #eef1f4; }
.catimg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catimg-thumb .rm { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; line-height: 1; }

/* Race result entry (feedback) */
.race-fields { border: 1px solid #f3c77a; background: #fffaf0; border-radius: 10px; padding: .6rem .9rem; margin: 0 0 1rem; }
.race-fields legend { font-weight: 700; padding: 0 .3rem; }
.race-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem .7rem; }
.race-grid label { display: flex; flex-direction: column; gap: .15rem; font-size: .82rem; color: var(--muted); }
.race-grid input { padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
@media (max-width: 560px) { .race-grid { grid-template-columns: 1fr 1fr; } }

/* Team week overview (admin) */
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.team-nav { display: flex; gap: .4rem; }
.team-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.team-grid { border-collapse: collapse; width: 100%; font-size: .82rem; }
.team-grid th, .team-grid td { border: 1px solid var(--line); padding: .4rem .5rem; vertical-align: top; text-align: left; }
.team-grid thead th { position: sticky; top: 0; background: #f4f6f8; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); z-index: 1; white-space: nowrap; }
.team-date { display: block; font-weight: 400; color: var(--muted); }
.team-runner-h, .team-runner { position: sticky; left: 0; background: #fff; z-index: 1; white-space: nowrap; font-weight: 600; min-width: 130px; }
.team-grid thead .team-runner-h { z-index: 2; background: #f4f6f8; }
.team-runner a { color: var(--brand); text-decoration: none; }
.team-sess { display: block; padding: .12rem 0; }
.team-today { background: #fff6f2; }
.team-grid thead th.team-today { background: #ffe6d8; color: var(--brand); }

/* Runner payments page */
.pay-cards { display: flex; gap: .8rem; flex-wrap: wrap; margin: .6rem 0 1.2rem; }
.pay-card { flex: 1 1 180px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.pay-card.pay-owed { border-color: #f0c27a; background: #fffaf0; }
.pay-card-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.pay-card-val { font-size: 1.7rem; line-height: 1.1; color: var(--brand); }
.pay-owed .pay-card-val { color: #b5321c; }

/* "New since last visit" runner notice */
.new-notice { background: #eef7ff; border: 1px solid #bcdcff; color: #14508a; border-radius: 10px; padding: .6rem .9rem; margin: 0 0 1rem; font-size: .92rem; }
.new-notice a { color: #14508a; font-weight: 700; }

/* Race editor + coach tip */
.race-editor { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .3rem .9rem; margin: .4rem 0 1.2rem; }
.race-editor summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }
.race-tip { background: #fff8ec; border: 1px solid #f0d9a8; border-radius: 8px; padding: .5rem .8rem; margin: .2rem 0 1rem; }
