/* CORE Coach — trainer portal styles.
   Extends the shared design system in styles.css. Desktop-first, responsive down to mobile.
   Member (430px) styles are untouched except for the clearly-scoped member additions at the end. */

.sidebar-extra { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 4px; }
.sidebar-extra button { border: 0; background: transparent; color: var(--muted); text-align: left; padding: 9px 14px; border-radius: 11px; font-size: 13px; font-weight: 600; }
.sidebar-extra button:hover { background: var(--panel-2); color: var(--text); }
.nav-badge { margin-left: auto; background: var(--primary); color: var(--on-primary); border-radius: 99px; font-size: 11px; font-weight: 800; padding: 2px 7px; }
.portal-switch button + button { background: transparent; color: var(--muted); }

.t-head { grid-column: span 12; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.t-head h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(26px, 3vw, 36px); margin: 6px 0 2px; }
.t-head p { margin: 0; font-size: 14px; }
.t-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.t-back { grid-column: span 12; border: 0; background: transparent; color: var(--muted); font-weight: 600; padding: 0 0 4px; text-align: left; }
.t-back:hover { color: var(--text); }
.t-subhead { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; margin: 22px 0 10px; }
.t-muted { color: var(--muted); font-size: 13px; }
.t-error { color: #ff8f8f; border: 1px solid rgba(255,143,143,.3); background: rgba(255,143,143,.07); padding: 11px 13px; border-radius: 12px; font-size: 13px; }
.t-link { border: 0; background: transparent; color: var(--primary); font-weight: 600; font-size: 12px; padding: 0 4px; }
.t-link.danger { color: #ff8f8f; }

.t-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 8px; }
.t-stat { border: 1px solid var(--line); border-radius: 15px; padding: 14px; background: rgba(255,255,255,.02); }
.t-stat strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.t-stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.t-stat em { display: block; color: var(--green); font-style: normal; font-size: 11px; margin-top: 5px; }

.t-rows { display: grid; gap: 10px; margin-top: 14px; }
.t-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; background: rgba(255,255,255,.02); flex-wrap: wrap; }
.t-rowbtn { width: 100%; color: inherit; text-align: left; }
.t-rowbtn:hover { border-color: var(--primary-line); }
.t-row-main { display: flex; align-items: center; gap: 13px; min-width: 0; flex: 1; }
.t-row-main strong { display: block; font-size: 14px; }
.t-row-main small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.t-avatar, .t-icon { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--panel-2); color: var(--primary); display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; }
.t-badge { font-size: 11px; border-radius: 99px; padding: 5px 10px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.t-badge.good { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.t-badge.warn { color: #ffc46b; border-color: rgba(255,196,107,.3); background: rgba(255,196,107,.07); }
.t-badge.info { color: var(--blue); border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.07); }
.btn.small { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
.t-empty { border: 1px dashed var(--line); border-radius: 15px; padding: 22px; text-align: center; margin-top: 14px; }
.t-empty p { margin: 0 0 12px; }

.t-clickable { cursor: pointer; }
.t-clickable:hover td { background: var(--primary-soft); }
.t-search { width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 13px 15px; border-radius: 12px; outline: none; margin-bottom: 6px; }
.t-search:focus { border-color: var(--primary); }

.t-client-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.t-client-head h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 32px; margin: 0; }
.t-client-head p { margin: 4px 0 0; font-size: 13px; }
.t-client-head .t-avatar { width: 52px; height: 52px; font-size: 17px; }
.t-client-head .t-head-actions { margin-left: auto; }
.t-tabs { overflow-x: auto; padding-bottom: 4px; }

.t-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.card textarea, .card select { width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 13px; border-radius: 12px; outline: none; font: inherit; resize: vertical; }
.card textarea:focus, .card select:focus { border-color: var(--primary); }
.guardrail { border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 12px; padding: 13px 15px; margin: 16px 0; background: var(--primary-soft); }
.guardrail b { font-size: 11px; letter-spacing: .1em; color: var(--primary); }
.guardrail p { margin: 6px 0 0; font-size: 13px; }

.t-note { border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; background: rgba(255,255,255,.02); }
.t-note p { margin: 0 0 6px; color: var(--text); font-size: 14px; line-height: 1.5; }
.t-note small { color: var(--muted); font-size: 12px; }

.t-perms { display: grid; gap: 10px; margin: 14px 0; }
.t-perm { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; font-size: 14px; }

.t-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.t-quick button { border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--text); border-radius: 14px; padding: 16px 14px; text-align: left; font-weight: 600; font-size: 13px; }
.t-quick button:hover { border-color: var(--primary-line); background: var(--primary-soft); }

.t-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.t-pick { border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--text); border-radius: 14px; padding: 14px; text-align: left; }
.t-pick strong { display: block; font-size: 14px; }
.t-pick small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.t-pick.on { border-color: var(--primary); background: var(--primary-soft); }

.t-builder-row { border: 1px solid var(--line); border-radius: 15px; padding: 14px; margin-bottom: 12px; background: rgba(255,255,255,.02); }
.t-builder-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.t-builder-head small { color: var(--muted); font-size: 12px; }
.t-builder-tools { display: flex; gap: 4px; }
.t-builder-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.t-builder-fields label { min-width: 0; }
.t-builder-fields input, .t-builder-fields select { width: 100%; min-width: 0; }
.t-builder-fields label { display: grid; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.t-builder-fields label.wide { grid-column: 1 / -1; }
.t-builder-fields input, .t-builder-fields select { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 10px; border-radius: 10px; outline: none; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; }
.t-builder-fields input:focus, .t-builder-fields select:focus { border-color: var(--primary); }
.t-addbar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.t-addbar select { flex: 1; min-width: 220px; }

.t-bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; margin-top: 18px; }
.t-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.t-bar i { display: block; width: 100%; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--primary), rgba(76,125,255,.28)); }
.t-bar span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.t-bar b { font-size: 11px; color: var(--text); order: -1; }

.t-convs { display: grid; gap: 8px; max-height: 520px; overflow-y: auto; }
.t-conv { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.02); border-radius: 14px; padding: 11px 12px; color: var(--text); text-align: left; }
.t-conv.on { border-color: var(--primary); background: var(--primary-soft); }
.t-conv span { flex: 1; min-width: 0; }
.t-conv strong { display: block; font-size: 13px; }
.t-conv small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-thread-head { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 6px; }
.t-thread-head strong { display: block; font-size: 15px; }
.t-thread-head small { color: var(--muted); font-size: 12px; }
.t-thread-head button { margin-left: auto; }
.t-thread { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 14px 2px; }
.t-msg { max-width: 76%; border-radius: 16px; padding: 11px 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.t-msg p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.t-msg small { color: var(--muted); font-size: 11px; }
.t-msg.out { margin-left: auto; border-color: var(--primary-line); background: var(--primary-soft); }
.t-composer { display: flex; gap: 10px; margin-top: 10px; }
.t-composer input { flex: 1; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 13px 15px; border-radius: 12px; outline: none; }
.t-composer input:focus { border-color: var(--green); }

.t-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.t-day { border: 1px solid var(--line); border-radius: 13px; padding: 10px; min-height: 118px; background: rgba(255,255,255,.02); }
.t-day.now { border-color: var(--primary); background: var(--primary-soft); }
.t-day header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.t-day header strong { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.t-day header small { font-size: 15px; font-weight: 800; }
.t-event { border-radius: 9px; padding: 7px 8px; background: rgba(76,125,255,.10); border: 1px solid var(--primary-line); margin-bottom: 6px; font-size: 11px; }
.t-event b { display: block; color: var(--primary); }
.t-event small { display: block; color: var(--muted); margin-top: 2px; }
.t-event.assign { background: var(--green-soft); border-color: var(--green-line); }
.t-event.assign b { color: var(--green); }

.t-live { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; background: rgba(255,255,255,.02); }
.t-live .t-row-main { margin-bottom: 10px; }

@media (max-width: 1100px) { .t-calendar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .t-head { align-items: flex-start; }
  .t-client-head .t-head-actions { margin-left: 0; width: 100%; }
  .t-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-thread { max-height: none; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 520px) {
  .t-calendar { grid-template-columns: 1fr; }
  .t-msg { max-width: 92%; }
  .t-client-head h1 { font-size: 26px; }
}

/* ---- member-side additions (430px app) ---- */
.coach-note { border: 1px solid rgba(91,160,255,.35); background: rgba(59,130,246,.09); border-radius: 14px; padding: 11px 13px; margin: 12px 0; }
.coach-note b { color: #60a5fa; font-size: 10px; letter-spacing: .08em; }
.coach-note p { margin: 6px 0 0; color: #cfdcf3; font-size: 13px; line-height: 1.45; }
/* Grid tracks default to min-width:auto, and an <input> has an intrinsic
   minimum width of roughly 20 characters. Three of them therefore refuse to
   shrink inside a 430px phone and push the whole page sideways. minmax(0,1fr)
   plus min-width:0 lets the tracks actually honour 1fr. */
.set-logger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 14px 0 4px; }
.set-logger label { display: grid; gap: 6px; min-width: 0; font-size: 10px; font-weight: 700; letter-spacing: .07em; color: #8ea0bd; }
.set-logger select { width: 100%; min-width: 0; border: 1px solid #1b2841; background: var(--panel); color: #e8eeff; padding: 12px 8px; border-radius: 12px; outline: none; font: inherit; font-size: 13px; }
.set-logger select:focus { border-color: var(--primary); }
/* Two columns is the honest maximum for select controls at 430px; three
   truncates the option text. */
.set-logger.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.set-logger .full { grid-column: 1 / -1; }
.set-logger input { width: 100%; min-width: 0; border: 1px solid #1b2841; background: var(--panel); color: #e8eeff; padding: 12px 8px; border-radius: 12px; outline: none; font: inherit; text-align: center; }
.set-logger input:focus { border-color: var(--primary); }
.member-generic .btn.secondary { background: transparent; border: 1px solid #1b2841; color: #aab7cc; }
.history-row.mine { border-left: 3px solid var(--primary); padding-left: 10px; }
/* ---- icons ----
   Inline SVG on a 24x24 grid, inheriting text colour. Replaces the Unicode
   glyphs, which rendered from OS fallback fonts at inconsistent widths. */
.icon { display: block; flex: none; }
/* Chevrons are UI affordances: WCAG wants 3:1, and #46586f gave 1.9:1. */
.row-chevron { display: inline-flex; align-items: center; color: #7d8ca6; flex: none; }
.settings-row .row-chevron, .t-row .row-chevron { margin-left: auto; }

/* member bottom nav — real icons instead of dots */
.fig-bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding-top: 0; }
.fig-bottom-nav button:before { display: none; }
.fig-bottom-nav button .icon { opacity: .75; }
.fig-bottom-nav button.active .icon { opacity: 1; }
.fig-bottom-nav button span { font-size: 10px; line-height: 1; }

/* Notification bell with an unread dot.
   Do NOT set `position` here — styles.css positions this absolutely in the
   header's top-right corner, and overriding it drops the button into the flow.
   An absolutely-positioned element is already a containing block for .dot. */
.notification { display: grid; place-items: center; color: #c9d5ea; }
.notification .dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); border: 2px solid #121d34; }

/* quick actions — icon above the label */
.quick-action b { display: flex; align-items: center; color: var(--primary); margin-bottom: 12px; }

/* row icon wrappers centre their SVG */
.exercise-icon, .list-icon, .t-icon, .t-avatar { display: inline-grid; place-items: center; }

/* trainer sidebar icons align with labels */
.nav button { display: flex; align-items: center; gap: 11px; }
.nav-icon { display: inline-grid; place-items: center; width: 20px; }
.mobile-nav button span { display: inline-grid; place-items: center; }
.t-builder-tools .t-link { display: inline-flex; align-items: center; padding: 4px 6px; }

/* The coaching card sat on a green surface that predates the Figma palette.
   Green now means a positive state only; coaching context is informational. */
.coach-card { background: #0b1a30 !important; border-color: rgba(76,125,255,.35) !important; }
.coach-card .fig-label { color: var(--primary) !important; }
.coach-card p { color: #cfdcf3 !important; }

/* member auth screens (430px) */
.auth-screen { padding: 64px 20px 40px; display: flex; flex-direction: column; min-height: 100vh; }
.auth-brand { font-size: 14px; font-weight: 800; letter-spacing: .18em; color: #8ea0bd; margin-bottom: 40px; }
.auth-brand span { color: var(--primary); }
.auth-screen h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 30px; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 8px; }
.auth-sub { color: #74869e; font-size: 14px; margin: 0 0 26px; }
.auth-error { color: #ff8f8f; background: rgba(255,143,143,.08); border: 1px solid rgba(255,143,143,.32); border-radius: 12px; padding: 11px 13px; font-size: 13px; margin: 0 0 18px; }
.auth-screen .field { margin: 0 0 16px; }
.auth-screen .field label { color: #8ea0bd; }
.auth-screen .field input { background: var(--panel); border-color: #1b2841; color: #e8eeff; padding: 15px; border-radius: 13px; }
.auth-screen .fig-primary { margin-top: 6px; height: 50px; }
.auth-note { color: #8ea0bd; font-size: 11px; line-height: 1.6; border-left: 2px solid #1b2841; padding-left: 11px; margin: 22px 0 0; }
.auth-link { display: block; width: 100%; background: transparent; border: 0; color: var(--primary); font-size: 13px; font-weight: 600; padding: 14px 0 0; text-align: center; }
.auth-link.subtle { color: #74869e; font-weight: 500; padding-top: 10px; }
.auth-link:hover { text-decoration: underline; }

/* ---- accessibility ----
   Keyboard users need to see focus. Applied globally rather than per-component
   so nothing added later is missed. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}
button:focus-visible, a:focus-visible, [role="switch"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--primary); color: #fff; padding: 11px 16px;
  border-radius: 0 0 10px 10px; font-weight: 700; font-size: 13px;
  text-decoration: none; transition: top .12s;
}
.skip-link:focus { top: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header action — was a bare chevron with no visible meaning. */
.head-action {
  position: absolute; right: 8px; top: 10px;
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid rgba(34,48,76,.9); background: #121d34; color: #c9d5ea;
  border-radius: 12px; padding: 8px 10px 8px 12px; font-size: 12px; font-weight: 600;
}
.head-action:hover { border-color: var(--primary-line); color: #fff; }

/* .history-row is used as both a div and a button. As a <button> it inherited
   the browser's default white background and centred text, so history rows
   rendered as white blocks. Reset it to match the div form. */
button.history-row, button.settings-row {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #10203a;
  color: inherit;
  font: inherit;
  text-align: left;
  align-items: center;
}
button.history-row:last-child, button.settings-row:last-child { border-bottom: 0; }
button.history-row:hover, button.settings-row:hover { background: var(--primary-soft); }

/* Rows had 13px vertical padding but none horizontally, so trailing values sat
   1px from the card edge. */
.settings-group .history-row, .settings-group .settings-row { gap: 12px; padding-left: 14px; padding-right: 14px; }
.settings-group .history-row > *:last-child, .settings-group .settings-row > *:last-child { flex: none; }

/* ---- Kitchen ----
   Food artwork is drawn per category, not photographed. Real product imagery
   needs a product database with image rights. */
.food-photo { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; flex: none; background: var(--panel-2); border: 1px solid rgba(255,255,255,.06); }
.bc-video { width: 100%; border-radius: 14px; background: #000; margin-top: 12px; max-height: 260px; object-fit: cover; }
.bc-video[hidden] { display: none; }
.food-art { display: inline-grid; place-items: center; border-radius: 13px; flex: none; border: 1px solid rgba(255,255,255,.06); }
.kit-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.kit-area { border: 1px solid #1b2841; background: var(--panel); border-radius: 16px; padding: 15px 10px; color: #e8eeff; text-align: center; }
.kit-area strong { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 24px; }
.kit-area small { display: block; color: #8ea0bd; font-size: 11px; margin-top: 4px; }
.kit-area:hover { border-color: var(--primary-line); }

.kit-row { display: flex; align-items: center; gap: 12px; border: 1px solid #1b2841; background: var(--panel); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.kit-row.used { opacity: .55; }
.kit-copy { flex: 1; min-width: 0; }
.kit-copy strong { display: block; font-size: 14px; }
.kit-copy small { display: block; color: #8ea0bd; font-size: 11px; margin-top: 3px; }
.kit-bar { height: 5px; border-radius: 99px; background: #10203a; overflow: hidden; margin-top: 8px; }
.kit-bar i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.kit-bar.big { height: 9px; margin: 4px 0 14px; }
.kit-left { margin-top: 4px !important; }
.kit-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.kit-expiring { border-color: rgba(255,196,107,.4); background: rgba(255,196,107,.05); }
.kit-idea-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kit-idea-head strong { font-size: 15px; }
.kit-detail { display: flex; align-items: center; gap: 16px; }
.portion-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.portion-row button { border: 1px solid #1b2841; background: var(--panel); color: #8ea0bd; border-radius: 10px; padding: 10px 4px; font-size: 11px; font-weight: 600; }
.portion-row button.on { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }
.receipt-row { display: block; width: 100%; text-align: left; color: inherit; }
.receipt-row:hover { border-color: var(--primary-line); }
.haul .signal strong { font-size: 19px; }
.fig-primary:disabled { opacity: .45; cursor: not-allowed; }

/* Step progress in the advanced set walkthroughs. */
.step-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #22304c; flex: none; }
.step-dot.on { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.step-dot.done { border-color: var(--green); background: var(--green); }

.clickable-card { cursor: pointer; }
.clickable-card:hover { border-color: var(--primary-line); }

/* activity, recovery and sleep controls */
.gps-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.gps-toggle strong { display: block; font-size: 14px; }
.gps-toggle small { display: block; color: #74869e; font-size: 12px; margin-top: 3px; }
/* accent-color only tints the checked state; an unchecked native checkbox still
   renders as a white box, which reads as broken on a dark surface. */
.gps-toggle input {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; flex: none; margin: 0;
  border: 1px solid #22304c; border-radius: 7px; background: var(--panel);
  display: grid; place-items: center; cursor: pointer;
}
.gps-toggle input:checked { background: var(--primary-strong); border-color: var(--primary-strong); }
.gps-toggle input:checked::after {
  content: ''; width: 11px; height: 6px; margin-top: -3px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
.gps-toggle input:disabled { opacity: .45; cursor: not-allowed; }
.scale-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.scale-row > span { font-size: 13px; color: #aab7cc; }
.scale { display: flex; gap: 6px; }
.scale button { width: 36px; height: 36px; border-radius: 11px; border: 1px solid #1b2841; background: var(--panel); color: #74869e; font-weight: 700; font-size: 13px; }
.scale button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.sleep-bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; margin: 14px 0; }
/* Recorded route cards — the traced GPS shape, drawn without map tiles. */
.route-card { padding: 15px; }
.route-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.route-card-head strong { display: block; font-size: 15px; }
.route-card-head small { display: block; color: #8ea0bd; font-size: 12px; margin-top: 3px; }
.route-trace { display: block; background: #08111f; border: 1px solid #1b2841; border-radius: 14px; }
.route-empty { color: #8ea0bd; font-size: 12px; margin: 0; padding: 14px; background: #08111f; border: 1px dashed #1b2841; border-radius: 14px; text-align: center; }
.route-card .btn-row { margin-top: 12px; }
/* The generator states its reasoning rather than presenting a bare number. */

/* Calorie figures are data, not a positive state — green is reserved. */
.food-kcal { font-size: 11px; font-weight: 600; color: #9fb0ca; white-space: nowrap; }

/* Horizontal filter strips scroll by design; the native scrollbar reads as a
   stray line across the layout. */
.chip-row, .t-tabs { scrollbar-width: none; -ms-overflow-style: none; }
.chip-row::-webkit-scrollbar, .t-tabs::-webkit-scrollbar { display: none; }
.chip-row { padding-bottom: 2px; }

/* A card holding a single control does not need full card padding. */
.fig-card.slim { padding: 13px 15px; }
.plan-steps { border: 0; }
.plan-steps .history-row { padding-left: 0; padding-right: 0; }
.gen-reason { margin: 0; font-size: 12px; line-height: 1.5; color: #9fb0ca; border-left: 2px solid var(--primary-line); padding-left: 10px; }

.chart-with-target { position: relative; }
.target-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed rgba(142,160,189,.55); pointer-events: none; }
/* Anchored left: on the right it collided with the tallest bar's value label. */
.target-line b { position: absolute; left: 0; top: -13px; font-size: 9px; font-weight: 600; color: #8ea0bd; letter-spacing: .06em; text-transform: uppercase; background: var(--bg); padding-right: 4px; }
.sleep-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 5px; }
.sleep-bar i { display: block; width: 100%; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--primary), rgba(76,125,255,.3)); }
.sleep-bar b { order: -1; font-size: 11px; color: #e8eeff; }
.sleep-bar span { font-size: 10px; color: #74869e; }

/* nutrition — macro bars and food log rows */
.macro-row { margin-bottom: 11px; }
.macro-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #8ea0bd; margin-bottom: 5px; }
.macro-top b { color: #e8eeff; font-size: 13px; }
.macro-top b small { color: #8ea0bd; font-weight: 500; }
.macro-track { height: 7px; border-radius: 99px; background: #10203a; overflow: hidden; }
.macro-track i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.macro-track i.over { background: #ffc46b; }
.log-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(27,40,65,.7); }
.log-row:last-child { border-bottom: 0; }
.log-row > span:first-child { flex: 1; min-width: 0; }
.log-row strong { display: block; font-size: 13px; }
.log-row small { display: block; color: #74869e; font-size: 11px; margin-top: 3px; }
.log-kcal { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }

/* editable Profile & Settings controls */
.switch { width: 42px; height: 24px; border-radius: 99px; background: #1b2841; border: 1px solid #22304c; position: relative; flex: none; transition: background .15s; }
.switch:after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #74869e; transition: transform .15s, background .15s; }
.switch.on { background: var(--primary); border-color: var(--primary); }
.switch.on:after { transform: translateX(18px); background: #fff; }
.row-select, .row-input { max-width: 100%; border: 1px solid #1b2841; background: var(--panel); color: #e8eeff; padding: 9px 11px; border-radius: 10px; outline: none; font: inherit; font-size: 13px; max-width: 55%; }
.row-select:focus, .row-input:focus { border-color: var(--primary); }
.settings-row .row-input { text-align: right; }

.history-row > span > strong { display: block; margin-bottom: 4px; }
.history-row > span > small { display: block; color: #8ea0bd; line-height: 1.45; }
