/* ============================================================
   Training · clean dark
   ruhig · flach · eine Akzentfarbe · viel Luft
   ============================================================ */

:root {
  --bg:        #0f1113;
  --surface:   #16181b;
  --surface-2: #1c1f23;
  --line:      #23262b;
  --line-2:    #2c3037;

  --ink:   #e9eaec;
  --ink-2: #9aa0a8;
  --ink-3: #656b73;

  --accent:    #e0a83e;   /* ruhiges Amber, nur als Signal */
  --accent-in: #17130a;
  --accent-sf: #24200f;

  /* Effort – gedämpft, nur als Punkt/Kante */
  --me:   #cf6a6a;
  --de:   #5f92c9;
  --reha: #5da882;

  --ok:   #5da882;
  --warn: #d0a24a;
  --stop: #cf6a6a;

  --r:   12px;
  --r-s: 9px;

  --f: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f);
  font-size: 15px; line-height: 1.55;
  color: var(--ink); background: var(--bg);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { padding: 20px 16px 28px; max-width: 720px; margin: 0 auto; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top));
  background: rgba(15,17,19,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 15px; letter-spacing: .01em; color: var(--ink); }
.brand small { font-weight: 500; font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.linkbtn {
  background: none; border: 0; color: var(--ink-3); font-size: 13px; font-weight: 500;
  padding: 6px 4px; cursor: pointer;
}
.linkbtn:active { color: var(--ink); }
.inline { display: inline; margin: 0; }

/* ---------- untere Navigation ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(18,20,23,.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 0 9px; text-decoration: none; color: var(--ink-3);
  font-size: 10.5px; font-weight: 500; letter-spacing: .01em;
}
.tabs a .ic { font-size: 18px; line-height: 1; opacity: .55; transition: opacity .15s; }
.tabs a.on { color: var(--ink); }
.tabs a.on .ic { opacity: 1; }

/* ---------- Typo ---------- */
h1 { font-weight: 700; font-size: 24px; letter-spacing: -.02em; margin: 2px 0 3px; line-height: 1.15; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 3px; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); margin: 26px 0 10px; text-transform: uppercase; }
.mut  { color: var(--ink-3); font-size: 13px; }
.lead { color: var(--ink-2); font-size: 14px; margin: 3px 0 18px; }

/* ---------- Flash ---------- */
.flash {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--reha); padding: 11px 15px; margin: 0 0 6px; border-radius: var(--r-s);
  font-size: 13.5px;
}
.flash::before { content: "✓"; }

/* ---------- Karten ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 6px 16px; margin-bottom: 12px;
}
.card.pad { padding: 16px; }

/* ---------- Segmented Picker ---------- */
.picker { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 14px; scrollbar-width: none; }
.picker::-webkit-scrollbar { display: none; }
.picker a {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 8px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: .12s;
}
.picker a:active { transform: scale(.97); }
.picker a.on { background: var(--surface-2); border-color: var(--line-2); color: var(--ink); font-weight: 600; }

/* ---------- Einheiten-Kopf ---------- */
.sess {
  border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: var(--r); padding: 15px 16px; margin-bottom: 16px; background: var(--surface);
}
.sess.me   { border-left-color: var(--me); }
.sess.de   { border-left-color: var(--de); }
.sess.reha { border-left-color: var(--reha); }
.sess-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em;
}
.sess-tag .dot { width: 7px; height: 7px; border-radius: 50%; }
.sess.me .dot { background: var(--me); } .sess.de .dot { background: var(--de); } .sess.reha .dot { background: var(--reha); }
.sess-title { font-weight: 700; font-size: 20px; letter-spacing: -.02em; margin: 5px 0 7px; }
.sess-wave { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sess-wave b { color: var(--ink); font-weight: 600; }

/* ---------- Plan-Tabelle ---------- */
table.plan { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.plan thead th {
  text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 8px 9px;
}
.plan thead th.c-soll { text-align: right; }
.plan thead th.c-in { text-align: center; width: 52px; padding-left: 2px; padding-right: 2px; }
.plan tbody td { padding: 11px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.plan tbody tr:first-child td { border-top: 0; }

.plan .c-name { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.32; }
.plan .c-cue  { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.plan .c-pr   { display: inline-block; font-weight: 600; font-size: 10.5px; color: var(--accent); margin-top: 4px;
                background: var(--accent-sf); padding: 2px 7px; border-radius: 5px; }
.plan .c-soll { text-align: right; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.plan .c-val  { text-align: center; font-weight: 700; font-size: 15px; color: var(--ink); }
.plan td.c-in { padding: 6px 3px; }
.plan td.c-in input {
  width: 100%; max-width: 50px; padding: 9px 3px; text-align: center; font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface-2); color: var(--ink);
}
.plan td.c-in input:focus { outline: none; border-color: var(--accent); background: #1c1a12; }

.plan tr.r-main td { background: var(--surface); }
.plan tr.r-main .c-name { font-size: 15px; }
.plan tr.r-main .c-name::before { content: "▸ "; color: var(--accent); font-weight: 700; }
.plan tr.r-info .c-name { font-weight: 500; color: var(--ink-2); font-size: 13.5px; }
.plan tr.r-info .c-soll { color: var(--ink-3); text-align: left; }
.plan tr.r-warm td { background: var(--surface); }
.plan tr.r-warm a { color: var(--accent); text-decoration: none; font-size: 12.5px; font-weight: 600; }

.btn-save {
  width: 100%; padding: 15px; border: 0; border-radius: var(--r-s); background: var(--accent); color: var(--accent-in);
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--f); position: sticky; bottom: 84px;
}
.btn-save:active { transform: scale(.99); opacity: .92; }

/* ---------- Listen-Zeilen ---------- */
.lrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: 0; }
.l-name { font-weight: 600; font-size: 14.5px; }
.l-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.l-val { font-weight: 700; font-size: 18px; color: var(--ink); text-align: right; white-space: nowrap; letter-spacing: -.01em; }
.l-val small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.l-val.pr { color: var(--accent); }

/* Blocklisten-Karte (Archiv) */
.block-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin-bottom: 11px; transition: .12s;
}
.block-card:active { border-color: var(--line-2); }
.block-card .bc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.block-card .bc-name { font-weight: 600; font-size: 15.5px; }
.block-card .bc-meta { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.block-card .bc-arrow { color: var(--ink-3); font-size: 18px; }

/* Status-Pillen */
.pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.pill.dot::before { content: "●"; margin-right: 5px; font-size: 8px; vertical-align: 1px; }
.p-frei           { background: var(--surface-2); color: var(--ok); }
.p-eingeschraenkt { background: var(--surface-2); color: var(--warn); }
.p-gesperrt       { background: var(--surface-2); color: var(--stop); }
.tag-badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.tag-active { color: var(--reha); }

select.status-sel {
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px;
  background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-family: var(--f); cursor: pointer;
}

/* ---------- Wissen (Accordion) ---------- */
details.acc { border-bottom: 1px solid var(--line); }
details.acc summary { list-style: none; cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 11px; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::before { content: "+"; color: var(--ink-3); font-size: 17px; width: 14px; }
details.acc[open] summary::before { content: "−"; }
details.acc .body { padding: 0 0 16px; color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }

/* ---------- Formulare ---------- */
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack input, .stack select {
  padding: 13px 14px; font-size: 16px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface-2); color: var(--ink); width: 100%; font-family: var(--f);
}
.stack input:focus, .stack select:focus { outline: none; border-color: var(--accent); }
.btn-primary {
  padding: 14px; border: 0; border-radius: var(--r-s); background: var(--accent); color: var(--accent-in);
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--f);
}
.btn-primary:active { transform: scale(.99); opacity: .92; }

.empty { text-align: center; color: var(--ink-3); padding: 44px 16px; }
.empty .big { font-size: 34px; margin-bottom: 12px; opacity: .4; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; }
.auth-logo { font-weight: 700; font-size: 26px; text-align: center; letter-spacing: -.02em; margin-bottom: 3px; }
.auth-sub { text-align: center; font-size: 13px; color: var(--ink-3); margin-bottom: 26px; }
