/* ════════════════════════════════════════════════════════════════════
   LOCKED IN — Hevy × Yazio
   Twee accenten met een vaste betekenis:
     blauw  = training  (Hevy)
     mint   = voeding   (Yazio)
   Zwarte basis, kaarten drijven op contrast in plaats van randen, en
   typografie die veel groter is dan een klassiek dashboard: grote vette
   koppen, waarden van 20px+, labels in normale schrijfwijze (géén
   uppercase micro-labels — dat is precies wat Hevy en Yazio níét doen).
   ════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/vendor/fonts/manrope-var.woff2') format('woff2');
}

:root {
  --bg: #000000;
  --surface: #141416;
  --surface-2: #1e1e22;
  --surface-3: #2a2a30;
  --line: #26262b;

  --text: #ffffff;
  --text-2: #9b9ba4;
  --text-3: #5f5f6a;

  --train: #0b84ff;   /* Hevy-blauw  — training */
  --food: #00e5a0;    /* Yazio-mint  — voeding  */
  --amber: #ffb648;
  --red: #ff5a5f;

  --r-card: 18px;
  --r-inner: 12px;
  --pad: 18px;

  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.hidden { display: none !important; }
/* Hevy en Yazio zetten cijfers níét in monospace. `.mono` staat op veel plekken
   in de markup, dus in plaats van dat overal te slopen betekent het hier:
   dezelfde sans, maar met cijfers van gelijke breedte zodat niets verspringt.
   Echte code (bv. ACCESS_FINE_LOCATION) blijft wél monospace — zie .explainer. */
.mono { font-family: var(--sans); font-variant-numeric: tabular-nums; }
/* Cijfers mogen niet dansen bij een live-update (tijd, afstand, tempo). */
.tnum, .metric-value, .session-live span:first-child, .gauge-big { font-variant-numeric: tabular-nums; }

.muted { color: var(--text-2); font-size: 13px; }
.hint { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.label { font-size: 13px; font-weight: 500; color: var(--text-2); }

h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 20px; font-weight: 800; letter-spacing: -.015em; color: var(--text); }

.wrap {
  max-width: 560px; margin: 0 auto;
  padding: 8px 16px calc(40px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
}

/* ── TOPBAR ────────────────────────────────────────────────────────── */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 4px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { color: var(--food); font-size: 17px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ── KNOPPEN ───────────────────────────────────────────────────────── */
/* Hevy-stijl: volle pill, stevige tikdoelen (min. 44px hoog). */
.btn {
  font: inherit; font-size: 15px; font-weight: 700;
  padding: 13px 20px; border-radius: 999px;
  border: none; background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: background .15s, opacity .15s, transform .06s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--train); color: #fff; }
.btn-primary:hover { background: #3b9dff; }
.btn-food { background: var(--food); color: #04241a; }
.btn-food:hover { background: #2af0b4; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #ff7377; }
.btn-block { width: 100%; }
.btn-sm { font-size: 14px; padding: 10px 16px; }
.btn-icon { padding: 10px; font-size: 17px; line-height: 1; width: 40px; height: 40px; display: grid; place-items: center; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.spin { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ronde +-knop uit Yazio's maaltijdrijen. */
.btn-add {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: #fff; color: #000; font-size: 24px; font-weight: 400; line-height: 1;
  display: grid; place-items: center; cursor: pointer; flex: none;
  transition: transform .06s, opacity .15s;
}
.btn-add:active { transform: scale(.93); }
.btn-add:disabled { background: var(--surface-3); color: var(--text-3); }

/* ── BADGES & PILLS ────────────────────────────────────────────────── */
.badge, .pill {
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge-ok, .pill-ok { background: #00e5a01f; color: var(--food); }
.badge-warn, .pill-warn { background: #ffb6481f; color: var(--amber); }
.badge-bad, .pill-bad { background: #ff5a5f1f; color: var(--red); }
.badge-ai { background: #0b84ff1f; color: var(--train); }
.badge-muted, .pill-muted { color: var(--text-3); }

/* ── KAARTEN ───────────────────────────────────────────────────────── */
.panel, .workout-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--pad);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head .muted, .panel-head .legend { flex: none; }

.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot-on { background: var(--food); box-shadow: 0 0 0 4px #00e5a022; }
.dot-off { background: var(--red); box-shadow: 0 0 0 4px #ff5a5f22; }

.metric-value { font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.metric-goal { font-size: 13px; color: var(--text-2); font-weight: 600; }
.val-ok { color: var(--food); }
.val-warn { color: var(--amber); }
.val-bad { color: var(--red); }
.val-none { color: var(--text-3); }

/* ════════════════════════════════════════════════════════════════════
   WORKOUT-KAART — Hevy
   Grote titel, daaronder een rij statistieken met label bóven de waarde.
   ════════════════════════════════════════════════════════════════════ */
.workout-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.workout-head h2 { margin-top: 3px; }
.workout-when { margin-top: 3px; font-size: 13px; color: var(--text-2); }

.streak-badge {
  flex: none; display: flex; align-items: center; gap: 9px;
  background: #0b84ff1a; border-radius: 14px; padding: 10px 14px;
}
.streak-badge.cold { background: var(--surface-2); }
.streak-num { font-size: 30px; font-weight: 800; line-height: 1; color: var(--train); letter-spacing: -.03em; }
.streak-badge.cold .streak-num { color: var(--text-3); }
.streak-lbl { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--text-2); }

/* Time / Volume / Records — label klein en grijs, waarde groot en vet. */
.workout-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 18px; }
.workout-stats:empty { margin-top: 0; }
.workout-stats > div { display: flex; flex-direction: column-reverse; gap: 2px; }
.wstat-val { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.wstat-val .unit { font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 3px; }
.workout-note { margin-top: 12px; }

.exercise-list { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.exercise-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ex-name { font-size: 16px; font-weight: 600; }
.ex-detail { color: var(--text-2); font-size: 14px; white-space: nowrap; font-weight: 600; }

.workout-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.week-block { flex: 1; min-width: 0; }
.week-val { font-size: 21px; font-weight: 800; margin: 2px 0 8px; letter-spacing: -.02em; }
.week-goal { font-size: 13px; color: var(--text-2); margin-left: 6px; font-weight: 600; }
.locked-block { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; white-space: nowrap; }

.week-dots { display: flex; gap: 6px; margin-top: 10px; }
.wd { flex: 1; height: 7px; border-radius: 999px; background: var(--surface-3); }
.wd.on { background: var(--train); }
.wd.today { box-shadow: inset 0 0 0 2px var(--text-2); }

/* ════════════════════════════════════════════════════════════════════
   SAMENVATTING — Yazio
   Open ring van 270° met de resterende calorieën groot in het midden,
   geflankeerd door twee kolommen. Daaronder de macro-balken.
   ════════════════════════════════════════════════════════════════════ */
.summary { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
/* Krimpt mee op smalle toestellen, zodat de flankerende kolommen ruimte houden. */
.gauge { position: relative; width: min(190px, 46vw); }
.gauge svg { display: block; width: 100%; height: auto; }
.gauge-arc { transition: stroke-dashoffset .55s cubic-bezier(.4, 0, .2, 1); }
.gauge-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.gauge-big { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.gauge-cap { font-size: 14px; color: var(--text-2); font-weight: 600; margin-top: 3px; }

.summary-side { text-align: center; min-width: 0; }
.summary-side .v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.summary-side .k { font-size: 13px; color: var(--text-2); font-weight: 600; margin-top: 1px; }

/* Macro-balken: label boven, dunne baan met punt, waarde eronder. */
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.macro { min-width: 0; text-align: center; }
.macro-name { font-size: 13px; color: var(--text-2); font-weight: 600; }
.macro-track {
  position: relative; height: 5px; border-radius: 999px;
  background: var(--surface-3); margin: 9px 0; overflow: hidden;
}
.macro-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; transition: width .55s cubic-bezier(.4, 0, .2, 1); }
.macro-val { font-size: 14px; font-weight: 700; }
.macro-val .of { color: var(--text-2); font-weight: 600; }
.macro-source { margin-top: 14px; }

/* ════════════════════════════════════════════════════════════════════
   FOTO → MACRO'S
   ════════════════════════════════════════════════════════════════════ */
.meal-actions { display: flex; gap: 10px; margin: 14px 0 10px; }
.meal-actions .btn { flex: 1; }

.input {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 15px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-inner);
  color: var(--text);
}
.input:focus { outline: none; border-color: var(--train); background: var(--surface); }
.input::placeholder { color: var(--text-3); }

.meal-status { margin-top: 12px; font-size: 14px; font-weight: 600; padding: 12px 15px; border-radius: var(--r-inner); background: var(--surface-2); color: var(--text-2); }
.meal-status.busy { background: #0b84ff1a; color: var(--train); }
.meal-status.ok { background: #00e5a01a; color: var(--food); }
.meal-status.bad { background: #ff5a5f1a; color: var(--red); }

.meal-preview { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--r-inner); margin-top: 14px; }

.meal-form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.meal-form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.field { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.field .input { margin-top: 6px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.meal-model { margin: 6px 0 14px; }
.meal-buttons { display: flex; flex-direction: column; gap: 9px; }

/* Maaltijdrijen — Yazio: ronde icoon, naam, subtitel, ronde actieknop. */
.meal-list { margin-top: 16px; display: flex; flex-direction: column; }
.meal-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.meal-row:last-child { border-bottom: none; }
.meal-icon {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--surface-2); display: grid; place-items: center; font-size: 21px;
}
.meal-main { min-width: 0; flex: 1; }
.meal-name { font-size: 16px; font-weight: 700; }
.meal-sub { font-size: 14px; color: var(--text-2); font-weight: 600; margin-top: 1px; }
.meal-macros { font-size: 13px; color: var(--text-3); margin-top: 2px; font-weight: 600; }
.meal-side { display: flex; align-items: center; gap: 8px; flex: none; }

/* ════════════════════════════════════════════════════════════════════
   STAPPEN
   ════════════════════════════════════════════════════════════════════ */
.steps-today { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.steps-today .metric-value { font-size: 38px; }
.steps-today .unit { font-size: 14px; color: var(--text-2); font-weight: 600; }
.steps-actions { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.notice {
  font-size: 14px; color: var(--text-2); background: #ffb6481a;
  border-radius: var(--r-inner); padding: 13px 15px; margin-bottom: 14px; font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════
   GPS-SESSIE
   ════════════════════════════════════════════════════════════════════ */
.session-type { display: flex; gap: 10px; margin-bottom: 16px; }
.session-type .btn { flex: 1; }

.session-live { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.session-live > div {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--surface-2); border-radius: var(--r-inner); padding: 15px 6px;
}
.session-live span:first-child { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.session-live .unit { font-size: 13px; color: var(--text-2); font-weight: 600; }

.session-buttons { margin-bottom: 12px; }
.session-status { font-size: 14px; font-weight: 600; color: var(--text-2); padding: 12px 15px; background: var(--surface-2); border-radius: var(--r-inner); margin-bottom: 12px; }
.session-status.bad { background: #ff5a5f1a; color: var(--red); }

.map-wrap { margin-bottom: 14px; border-radius: var(--r-inner); overflow: hidden; }
#map { height: 260px; width: 100%; background: var(--surface); }
.leaflet-container { background: var(--surface); font-family: inherit; }
.leaflet-tile { filter: brightness(.6) contrast(1.1) saturate(.7) hue-rotate(175deg) invert(1); }
.leaflet-control-attribution { background: #000000cc !important; color: var(--text-3) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }

.explainer { background: var(--surface-2); border-radius: var(--r-inner); padding: 16px; margin-bottom: 14px; }
.explainer h4 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.explainer p { font-size: 14px; color: var(--text-2); margin-bottom: 8px; line-height: 1.5; }
.explainer p:last-child { margin-bottom: 0; }
.explainer strong { color: var(--text); font-weight: 700; }
.explainer .mono { font-family: var(--mono); color: var(--amber); font-size: 13px; }

.session-list { display: flex; flex-direction: column; }
.session-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.session-row:last-child { border-bottom: none; }
.session-title { font-size: 16px; font-weight: 700; }
.session-sub { font-size: 14px; color: var(--text-2); font-weight: 600; }
.session-stats { display: flex; flex-direction: column; align-items: flex-end; font-size: 15px; font-weight: 700; }
.session-stats .muted { font-size: 13px; font-weight: 600; }

/* ════════════════════════════════════════════════════════════════════
   GRAFIEKEN
   ════════════════════════════════════════════════════════════════════ */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.legend-band { width: 16px; height: 9px; border-radius: 3px; background: #00e5a026; }
.legend-bar { width: 9px; height: 9px; border-radius: 3px; background: var(--food); }
.axis-label { font-size: 11px; fill: var(--text-3); font-weight: 600; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.chart-empty { color: var(--text-3); font-size: 14px; text-align: center; padding: 28px 0; font-weight: 600; }

.foot { text-align: center; padding-top: 6px; }
.foot .muted { font-size: 12px; }

/* ════════════════════════════════════════════════════════════════════
   TABBLADEN
   Vier panelen in één document; de balk staat vast onderaan zoals in
   Hevy en Yazio. Elk tabblad heeft zijn eigen accentkleur, zodat je aan
   de kleur ziet waar je bent.
   ════════════════════════════════════════════════════════════════════ */
.tab-panel { display: flex; flex-direction: column; gap: 14px; }
.tab-panel[hidden] { display: none; }

/* Ruimte onder de inhoud zodat de balk niets afdekt. */
.wrap { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #0b0b0dee; backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.tab {
  appearance: none; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 5px 2px; color: var(--text-3); font: inherit; font-size: 11px; font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 24px; height: 24px; fill: currentColor; stroke: currentColor; }
.tab span { line-height: 1; }
.tab .ind {
  position: absolute;
}
.tab.is-active { color: var(--text); }
.tab[data-tab="training"].is-active { color: var(--train); }
.tab[data-tab="voeding"].is-active { color: var(--food); }
.tab[data-tab="sessie"].is-active { color: var(--amber); }
/* Pill achter het icoon, zoals Hevy's actieve tab. */
.tab.is-active svg {
  border-radius: 999px; padding: 3px 12px; box-sizing: content-box;
  background: currentColor; fill: #000; stroke: #000;
  width: 20px; height: 20px;
}
.tab[data-tab="dashboard"].is-active svg { background: #ffffff; }

/* ── Tekstknop in een kaartkop ─────────────────────────────────────── */
.link-btn {
  appearance: none; border: none; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--food); padding: 4px 0;
}
.link-btn:hover { opacity: .8; }

/* ── DASHBOARD ─────────────────────────────────────────────────────── */
.today-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.week-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 16px; }
.week-line .week-val { margin: 0; }

.d-row { display: flex; align-items: center; gap: 12px; }
.d-main { min-width: 0; }
.d-title { font-size: 19px; font-weight: 800; letter-spacing: -.015em; }
.d-sub { font-size: 14px; color: var(--text-2); font-weight: 600; margin-top: 1px; }
.d-row + .workout-stats { margin-top: 16px; }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qa {
  appearance: none; border: none; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 6px; border-radius: var(--r-inner); background: var(--surface-2);
  color: var(--text); font-size: 14px; font-weight: 700;
  transition: background .15s, transform .06s;
  -webkit-tap-highlight-color: transparent;
}
.qa:active { transform: scale(.97); }
.qa-ico { font-size: 24px; line-height: 1; }
.qa-food:hover { background: #00e5a01f; }
.qa-train:hover { background: #0b84ff1f; }
.qa-move:hover { background: #ffb6481f; }

/* ════════════════════════════════════════════════════════════════════
   VOEDING — Yazio's "toevoegen"-scherm
   Rij met methodetegels, zoekveld met mint-omlijning, lijstrijen met de
   kcal rechts en een ronde actieknop.
   ════════════════════════════════════════════════════════════════════ */
.methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.method {
  appearance: none; border: none; background: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font: inherit; color: var(--text-2); font-size: 12px; font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
.method-tile {
  width: 100%; aspect-ratio: 1; max-height: 68px; border-radius: 16px;
  background: var(--surface-2); border: 2px solid transparent;
  display: grid; place-items: center; font-size: 26px;
  transition: border-color .15s, background .15s;
}
.method.is-active { color: var(--text); }
.method.is-active .method-tile { border-color: var(--food); background: #00e5a014; }
.method:not(.is-off):hover .method-tile { background: var(--surface-3); }
.method.is-off { opacity: .38; cursor: default; }
.method-name { text-align: center; line-height: 1.15; }

.input-search { border-color: var(--food); }
.input-search:focus { border-color: var(--food); }

/* Lijstrij: naam links, kcal rechts, ronde knop uiterst rechts. */
.meal-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; }
.meal-kcal { font-size: 17px; font-weight: 800; white-space: nowrap; letter-spacing: -.02em; }
.meal-kcal span { font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 2px; }

.circle-btn {
  width: 36px; height: 36px; border-radius: 50%; flex: none; cursor: pointer;
  background: none; border: 2px solid var(--food); color: var(--food);
  font-size: 15px; line-height: 1; display: grid; place-items: center;
  transition: background .15s, transform .06s;
  -webkit-tap-highlight-color: transparent;
}
.circle-btn:hover { background: #00e5a01f; }
.circle-btn:active { transform: scale(.92); }
.circle-btn:disabled { opacity: .4; cursor: default; }

.meal-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.count-circle {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  border: 2px solid var(--food); color: var(--food);
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
}
.meal-total { font-size: 15px; font-weight: 700; color: var(--text-2); }

/* ════════════════════════════════════════════════════════════════════
   TRAINING — schema's en loggen
   ════════════════════════════════════════════════════════════════════ */
.head-actions { display: flex; align-items: center; gap: 16px; }
#import-status { margin-bottom: 14px; margin-top: 0; }
.routine-start { margin-top: 14px; }
.routine-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.routine-row:last-child { border-bottom: none; }
.r-main { flex: 1; min-width: 0; }
.r-name { font-size: 16px; font-weight: 700; }
.r-sub { font-size: 14px; color: var(--text-2); font-weight: 600; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Actieve training */
.live-panel { border-color: var(--train); }
.live-foot { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.live-ex { padding: 16px 0; border-bottom: 1px solid var(--line); }
.live-ex:first-child { padding-top: 0; }
.live-ex-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.live-ex-name { font-size: 17px; font-weight: 700; }

/* Set-tabel: dezelfde kolomindeling voor kop en rijen. */
.set-head, .set-row {
  display: grid; grid-template-columns: 34px 1fr 1fr 44px;
  align-items: center; gap: 8px;
}
.set-head { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.set-head span:first-child, .set-row .set-n { text-align: center; }
.set-row { margin-bottom: 8px; }
.set-row.is-done .input { background: #00e5a014; }
.set-n { font-size: 15px; font-weight: 800; color: var(--text-2); }
.input-sm { padding: 9px 10px; font-size: 15px; text-align: center; }
/* De pijltjes van number-velden vreten breedte in een smalle kolom. */
.input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.set-done {
  width: 44px; height: 40px; border-radius: var(--r-inner); cursor: pointer;
  background: var(--surface-2); border: none; color: var(--food);
  font-size: 18px; font-weight: 800; display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.set-row.is-done .set-done { background: var(--food); color: #04241a; }

/* ── Blad (schermvullend) ──────────────────────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 900; background: var(--bg);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
.sheet[hidden] { display: none; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.sheet-head strong { font-size: 17px; font-weight: 800; }
.sheet-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom));
}

/* Filterchips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  appearance: none; border: none; cursor: pointer; font: inherit;
  flex: none; padding: 9px 15px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: 14px; font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
.chip.is-active { background: var(--food); color: #04241a; }

/* Zoekresultaten */
.ex-list { display: flex; flex-direction: column; }
.ex-item {
  appearance: none; border: none; background: none; cursor: pointer; font: inherit; text-align: left;
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.ex-item-main { flex: 1; min-width: 0; }
.ex-item-name { display: block; font-size: 16px; font-weight: 700; }
.ex-item-sub { display: block; font-size: 13px; color: var(--text-2); font-weight: 600; margin-top: 1px; }
.ex-item .circle-btn { pointer-events: none; font-size: 20px; }

/* Schema-editor */
.r-list { margin: 14px 0; }
.r-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.r-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.r-fields label { font-size: 12px; font-weight: 700; color: var(--text-2); display: block; }
.r-fields .input { margin-top: 4px; }
