/* =====================================================================
   AZIS — Arbeitszeit-Informationssystem · Redesign stylesheet
   Faithful rebuild of the app's design tokens (Electric / Classic / Camo /
   Terminal / Light), with elevated UX polish on top.
   ===================================================================== */

/* ---------- ELECTRIC (default · cyan on near-black, dark mode) ---------- */
:root {
  --bg: #0a0c10;
  --surface-1: rgba(22, 26, 34, 0.72);
  --surface-1-solid: #161a22;
  --surface-2: rgba(32, 38, 48, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf2;
  --muted: #8a93a3;
  --text-muted: #5d6573;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --accent-soft: rgba(34, 211, 238, 0.14);
  --accent-glow: rgba(34, 211, 238, 0.45);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
  --violet: #a78bfa;
  --teal: #2dd4bf;
  --konto-bg: rgba(34, 211, 238, 0.06);
  --konto-border: rgba(34, 211, 238, 0.22);
  --konto-text: #d6f4f9;
  --soft-bg: rgba(255, 255, 255, 0.05);
  --summary-bg: rgba(255, 255, 255, 0.03);
  --body-radial: rgba(34, 211, 238, 0.10);
  --body-top: #0d1015;
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-strong: rgba(0, 0, 0, 0.7);
  --grid-line: rgba(255, 255, 255, 0.04);
  --glass-blur: 18px;
}

/* ---------- CLASSIC (teal, calmer dark) ---------- */
:root[data-theme-family="classic"][data-theme="dark"] {
  --bg: #0b0b0f;
  --surface-1: #16171c;
  --surface-1-solid: #16171c;
  --surface-2: #202229;
  --border: #2a2d34;
  --border-strong: #3a3d44;
  --text: #f4f5f7;
  --muted: #a3a8b3;
  --text-muted: #6b7080;
  --accent: #27b3a9;
  --accent-strong: #178d85;
  --accent-soft: rgba(39, 179, 169, 0.12);
  --accent-glow: rgba(39, 179, 169, 0.32);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #ff7d7d;
  --info: #60a5fa;
  --violet: #a78bfa;
  --teal: #2dd4bf;
  --konto-bg: #1d2027;
  --konto-border: #2f333b;
  --konto-text: #d8e7ff;
  --soft-bg: #202229;
  --summary-bg: #181a20;
  --body-radial: rgba(39, 179, 169, 0.10);
  --body-top: #101116;
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-strong: rgba(0, 0, 0, 0.7);
  --grid-line: rgba(255, 255, 255, 0.035);
  --glass-blur: 0px;
}

/* ---------- CAMO (tactical OD green + coyote tan) ---------- */
:root[data-theme="camo"] {
  --bg: #1a1f15;
  --surface-1: rgba(38, 48, 30, 0.78);
  --surface-1-solid: #26301e;
  --surface-2: rgba(58, 70, 44, 0.88);
  --border: rgba(190, 174, 132, 0.12);
  --border-strong: rgba(190, 174, 132, 0.28);
  --text: #e7eadf;
  --muted: #a8a78c;
  --text-muted: #757462;
  --accent: #c08a3e;
  --accent-strong: #a36e2a;
  --accent-soft: rgba(192, 138, 62, 0.14);
  --accent-glow: rgba(192, 138, 62, 0.40);
  --success: #8caa4f;
  --warning: #d4a13a;
  --danger: #c8533a;
  --info: #6f8c4d;
  --violet: #b39169;
  --teal: #8caa4f;
  --konto-bg: rgba(192, 138, 62, 0.08);
  --konto-border: rgba(192, 138, 62, 0.28);
  --konto-text: #e6cfa5;
  --soft-bg: rgba(255, 255, 255, 0.04);
  --summary-bg: rgba(255, 255, 255, 0.02);
  --body-radial: rgba(192, 138, 62, 0.10);
  --body-top: #1d2318;
  --shadow: rgba(0, 0, 0, 0.55);
  --shadow-strong: rgba(0, 0, 0, 0.7);
  --grid-line: rgba(190, 174, 132, 0.05);
  --glass-blur: 14px;
}

/* ---------- TERMINAL (phosphor green on black, mono everything) ---------- */
:root[data-theme="terminal"] {
  --bg: #040805;
  --surface-1: rgba(8, 20, 10, 0.8);
  --surface-1-solid: #08140a;
  --surface-2: rgba(14, 30, 16, 0.9);
  --border: rgba(74, 222, 128, 0.16);
  --border-strong: rgba(74, 222, 128, 0.34);
  --text: #b7f7c5;
  --muted: #5fae72;
  --text-muted: #3e7a4e;
  --accent: #4ade80;
  --accent-strong: #22c55e;
  --accent-soft: rgba(74, 222, 128, 0.12);
  --accent-glow: rgba(74, 222, 128, 0.45);
  --success: #4ade80;
  --warning: #d4d44a;
  --danger: #f0746a;
  --info: #4ade80;
  --violet: #7ee0a0;
  --teal: #4ade80;
  --konto-bg: rgba(74, 222, 128, 0.06);
  --konto-border: rgba(74, 222, 128, 0.24);
  --konto-text: #c6f9d2;
  --soft-bg: rgba(74, 222, 128, 0.05);
  --summary-bg: rgba(74, 222, 128, 0.03);
  --body-radial: rgba(74, 222, 128, 0.10);
  --body-top: #061008;
  --shadow: rgba(0, 0, 0, 0.6);
  --shadow-strong: rgba(0, 0, 0, 0.8);
  --grid-line: rgba(74, 222, 128, 0.06);
  --glass-blur: 6px;
  --font-ui: var(--font-num);
}

/* ---------- LIGHT (teal on warm white) ---------- */
:root[data-theme="light"] {
  --bg: #eff5f2;
  --surface-1: #ffffff;
  --surface-1-solid: #ffffff;
  --surface-2: #f1f6f4;
  --border: #d8e4e1;
  --border-strong: #b8cdc8;
  --text: #122925;
  --muted: #4b635f;
  --text-muted: #6e8079;
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-soft: rgba(8, 145, 178, 0.10);
  --accent-glow: rgba(8, 145, 178, 0.28);
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
  --info: #2563eb;
  --violet: #7c3aed;
  --teal: #0d9488;
  --konto-bg: #ecf7f4;
  --konto-border: #bdd8d2;
  --konto-text: #0f5e56;
  --soft-bg: #e8f2ef;
  --summary-bg: #fbfefd;
  --body-radial: rgba(8, 145, 178, 0.10);
  --body-top: #f9fbfb;
  --shadow: rgba(16, 37, 33, 0.08);
  --shadow-strong: rgba(16, 37, 33, 0.12);
  --grid-line: rgba(16, 37, 33, 0.04);
  --glass-blur: 0px;
}

:root {
  --font-ui: "Avenir Next", "Segoe UI", -apple-system, system-ui, sans-serif;
  --font-num: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t-med: 260ms;
  --glow-mult: 1;
}

* { box-sizing: border-box; }

/* ===================================================================
   PHONE SHELL
   =================================================================== */
html, body {
  margin: 0;
  height: 100%;
}
body {
  font-family: var(--font-ui);
  background:
    radial-gradient(1200px 800px at 50% -10%, #16202b 0%, #0a0c10 55%, #07080b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
  color: #e8ecf2;
  -webkit-font-smoothing: antialiased;
}

.stage {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.phone {
  position: relative;
  width: 390px;
  height: 844px;
  border-radius: 54px;
  padding: 13px;
  background: linear-gradient(155deg, #2a2d34 0%, #131519 48%, #1c1f25 100%);
  box-shadow:
    0 2px 4px rgba(255, 255, 255, 0.18) inset,
    0 50px 100px -28px rgba(0, 0, 0, 0.85),
    0 0 0 2px #050608;
  flex: 0 0 auto;
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
/* dynamic-island-ish neutral pill */
.phone__island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 30px;
  background: #050608;
  border-radius: 16px;
  z-index: 60;
  pointer-events: none;
}

/* The actual app viewport */
.app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font-ui);
  background:
    radial-gradient(120% 60% at 50% -8%, var(--body-radial) 0%, transparent 58%),
    linear-gradient(180deg, var(--body-top) 0%, var(--bg) 26%);
  overflow: hidden;
}
:root[data-theme="terminal"] .app::after {
  /* faint scanlines */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  z-index: 40;
  opacity: 0.5;
}

/* status bar */
.statusbar {
  height: 54px;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 26px 6px;
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  z-index: 50;
}
.statusbar__right { display: flex; align-items: center; gap: 6px; }
.statusbar__bars { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.statusbar__bars i { width: 3px; background: currentColor; border-radius: 1px; display: block; }
.statusbar__batt {
  width: 24px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px;
  position: relative; padding: 1.5px;
}
.statusbar__batt::after {
  content: ""; position: absolute; right: -3.5px; top: 3px; width: 2px; height: 4px;
  background: currentColor; border-radius: 0 1px 1px 0;
}
.statusbar__batt i { display: block; height: 100%; width: 72%; background: currentColor; border-radius: 1px; }

/* ===================================================================
   APP HEADER
   =================================================================== */
.appbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 20px 12px;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--konto-border);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 6px 18px calc(var(--glow-mult) * 1px) var(--accent-glow);
  position: relative;
}
.brand__mark svg { width: 22px; height: 22px; color: var(--accent); }
.brand__title { font-size: 18px; font-weight: 800; letter-spacing: 0.14em; }
.brand__sub {
  font-family: var(--font-num);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--muted); text-transform: uppercase; margin-top: 1px;
}
.beta-pill {
  font-family: var(--font-num);
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  padding: 4px 9px; border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--konto-border);
  text-transform: uppercase;
}

/* scroll body */
.scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 16px 120px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.scroll::-webkit-scrollbar { width: 0; }

/* card base */
.card {
  background: var(--surface-1);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 40px -24px var(--shadow-strong);
}

/* ===================================================================
   TODAY HERO
   =================================================================== */
.hero {
  padding: 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.hero__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.hero__day {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.hero__date {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 27px; font-weight: 700; line-height: 1.05; margin-top: 4px;
  color: var(--text);
}
.hero__status {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 9px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--konto-border);
}
.hero__status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* progress ring */
.ring { position: relative; width: 86px; height: 86px; flex: 0 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring .ring__bg { stroke: var(--border); }
.ring .ring__fg {
  stroke: var(--accent);
  filter: drop-shadow(0 0 calc(var(--glow-mult) * 5px) var(--accent-glow));
  transition: stroke-dashoffset 900ms var(--ease-out);
}
.ring__label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.ring__label strong {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 16px; font-weight: 700; color: var(--text); line-height: 1;
}
.ring__label span {
  font-family: var(--font-num); font-size: 10px; color: var(--muted);
}

.hero__saldo-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 18px; padding-top: 15px;
  border-top: 1px solid var(--border);
}
.hero__saldo-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hero__saldo {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: 0.01em;
}
.val-pos { color: var(--success); }
.val-neg { color: var(--danger); }
.val-zero { color: var(--text); }

/* punch button */
.punch {
  margin-top: 16px;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px; border: none; cursor: pointer;
  border-radius: var(--radius-lg);
  font-family: var(--font-ui); font-size: 15px; font-weight: 800; letter-spacing: 0.03em;
  color: #04181c;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 8px 22px calc(var(--glow-mult) * 1px) var(--accent-glow), 0 1px 0 rgba(255,255,255,0.25) inset;
  transition: transform var(--t-fast) var(--ease-spring), filter var(--t-fast);
}
.punch:active { transform: scale(0.965); }
.punch svg { width: 18px; height: 18px; }
.punch--running {
  color: var(--text);
  background: var(--soft-bg);
  border: 1px solid var(--danger);
  box-shadow: 0 0 0 1px rgba(248,113,113,0.2), 0 8px 22px -10px rgba(248,113,113,0.4);
}
.punch--running .punch__pulse {
  width: 9px; height: 9px; border-radius: 50%; background: var(--danger);
  box-shadow: 0 0 0 0 var(--danger);
  animation: pulse 1.6s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(248,113,113,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(248,113,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); }
}
.punch__timer { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ===================================================================
   KONTO BAND  (Monats-Saldo + chips + sparkline)
   =================================================================== */
.band { padding: 18px 18px 14px; margin-bottom: 14px; }
.band__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.band__label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.band__saldo {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 30px; font-weight: 600; line-height: 1; margin-top: 4px;
}
.band__sub { font-family: var(--font-num); font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* month nav inline */
.mnav { display: flex; align-items: center; gap: 4px; }
.mnav button {
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center;
  background: var(--soft-bg); border: 1px solid var(--border); color: var(--text);
  font-size: 18px; line-height: 1;
  transition: background var(--t-fast), transform var(--t-fast);
}
.mnav button:active { transform: scale(0.9); }
.mnav__label {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  min-width: 92px; text-align: center;
}

/* sparkline */
.spark { margin-top: 16px; }
.spark__bars { display: flex; align-items: flex-end; gap: 2px; height: 46px; }
.spark__bar {
  flex: 1 1 0; border-radius: 2px 2px 0 0; min-height: 2px;
  background: var(--border-strong);
  transform-origin: bottom; transform: scaleY(0);
  animation: spark-grow 600ms var(--ease-out) forwards;
}
.spark__bar.pos { background: linear-gradient(180deg, var(--success), color-mix(in srgb, var(--success) 50%, transparent)); }
.spark__bar.neg { background: linear-gradient(180deg, var(--danger), color-mix(in srgb, var(--danger) 50%, transparent)); }
.spark__bar.today { background: var(--accent); box-shadow: 0 0 8px calc(var(--glow-mult) * 1px) var(--accent-glow); }
@keyframes spark-grow { to { transform: scaleY(1); } }
.spark__axis {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-family: var(--font-num); font-size: 9px; color: var(--text-muted); letter-spacing: 0.04em;
}

/* konto chips */
.chips {
  display: flex; gap: 10px; margin-top: 16px;
  overflow-x: auto; padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.chips::-webkit-scrollbar { height: 0; }
.chip {
  flex: 0 0 auto; min-width: 104px; scroll-snap-align: start;
  text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--konto-bg); border: 1px solid var(--konto-border);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast);
}
.chip:active { transform: scale(0.96); }
.chip__top { display: flex; align-items: center; gap: 7px; }
.chip__icon { width: 15px; height: 15px; color: var(--accent); flex: 0 0 auto; }
.chip__label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.chip__val {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 21px; font-weight: 700; color: var(--konto-text); line-height: 1;
}
.chip__val small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.chip__trend { font-family: var(--font-num); font-size: 10px; font-weight: 700; }

/* ===================================================================
   MONTH LIST  (KW groups + day cards)
   =================================================================== */
.kw { margin-bottom: 6px; }
.kw__head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 6px 8px;
  position: sticky; top: -4px; z-index: 5;
}
.kw__head::before { content: ""; position: absolute; inset: -4px -16px 0; background: linear-gradient(180deg, var(--bg) 60%, transparent); z-index: -1; opacity: 0.92; }
.kw__tag {
  font-family: var(--font-num); font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 8px; border-radius: 6px; border: 1px solid var(--konto-border);
  text-transform: uppercase;
}
.kw__range { font-size: 11px; color: var(--text-muted); letter-spacing: 0.02em; }
.kw__sum {
  margin-left: auto;
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 12px; font-weight: 700;
}

.daylist { display: flex; flex-direction: column; gap: 8px; }

.day {
  --tone: transparent;
  --tone-tint: transparent;
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  padding: 13px 15px 13px 17px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(0deg, var(--tone-tint), var(--tone-tint)),
    var(--surface-1-solid);
  border: 1px solid var(--border);
  color: var(--text);
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast), background var(--t-fast);
}
.day::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tone);
}
.day:active { transform: scale(0.985); }
.day.is-weekend { opacity: 0.62; }
.day.is-today { border-color: var(--konto-border); box-shadow: 0 0 0 1px var(--accent-soft), 0 6px 18px -10px var(--accent-glow); }
.day.is-today::before { width: 4px; }

.day__num {
  width: 38px; flex: 0 0 auto; text-align: center;
}
.day__dow { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.day__dom {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 20px; font-weight: 700; line-height: 1.1; color: var(--text);
}
.day__main { flex: 1 1 auto; min-width: 0; }
.day__label { font-size: 14px; font-weight: 700; letter-spacing: 0.005em; }
.day__meta {
  font-family: var(--font-num); font-size: 11px; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.day__right { text-align: right; flex: 0 0 auto; }
.day__saldo {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 17px; font-weight: 700; line-height: 1;
}
.day__hours { font-family: var(--font-num); font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }
.day__chev { color: var(--text-muted); width: 16px; height: 16px; flex: 0 0 auto; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  padding: 2px 7px; border-radius: 6px;
  background: color-mix(in srgb, var(--tone) 16%, transparent);
  color: var(--tone);
  border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent);
}

/* ===================================================================
   TAB BAR
   =================================================================== */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  gap: 4px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.tab {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px 6px; border: none; background: none; cursor: pointer;
  color: var(--text-muted); border-radius: 12px;
  font-family: var(--font-ui); font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  transition: color var(--t-fast);
}
.tab svg { width: 22px; height: 22px; transition: transform var(--t-fast) var(--ease-spring); }
.tab.active { color: var(--accent); }
.tab.active svg { transform: translateY(-1px) scale(1.06); filter: drop-shadow(0 0 calc(var(--glow-mult) * 5px) var(--accent-glow)); }
.tab:active svg { transform: scale(0.88); }

/* ===================================================================
   BOTTOM SHEET (day entry)
   =================================================================== */
.scrim {
  position: absolute; inset: 0; z-index: 70;
  background: rgba(2, 4, 8, 0.55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity var(--t-med) var(--ease-out);
}
.scrim.show { opacity: 1; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 71;
  max-height: 88%;
  display: flex; flex-direction: column;
  background: var(--surface-1-solid);
  border-top-left-radius: 26px; border-top-right-radius: 26px;
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -24px 60px -20px rgba(0,0,0,0.8);
  transform: translateY(102%);
  transition: transform 420ms var(--ease-spring);
}
.sheet.show { transform: translateY(0); }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 10px auto 4px; flex: 0 0 auto; }
.sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px 14px; flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
}
.sheet__date { }
.sheet__dow { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sheet__title {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 22px; font-weight: 700; margin-top: 2px;
}
.sheet__close {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: var(--soft-bg); border: 1px solid var(--border); color: var(--text);
  display: grid; place-items: center;
}
.sheet__close svg { width: 16px; height: 16px; }
.sheet__body { overflow-y: auto; padding: 16px 18px 8px; flex: 1 1 auto; }
.sheet__body::-webkit-scrollbar { width: 0; }

.flabel { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.field { margin-bottom: 18px; }

/* status chips */
.statuschips { display: flex; flex-wrap: wrap; gap: 7px; }
.schip {
  --tone: var(--muted);
  cursor: pointer;
  padding: 8px 13px; border-radius: 999px;
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  background: var(--soft-bg); border: 1px solid var(--border); color: var(--text);
  transition: all var(--t-fast) var(--ease-out);
}
.schip.active {
  background: color-mix(in srgb, var(--tone) 18%, transparent);
  border-color: color-mix(in srgb, var(--tone) 55%, transparent);
  color: var(--tone);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 30%, transparent);
}
.schip:active { transform: scale(0.95); }

/* time inputs */
.timegrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.timefield { min-width: 0; }
.timefield label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.timefield input {
  box-sizing: border-box; width: 100%; min-width: 0; min-inline-size: 0; min-height: 52px; padding: 13px 12px; border-radius: var(--radius-md);
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 20px; font-weight: 700; text-align: center; letter-spacing: 0.04em;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.timefield input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* live computed strip */
.compute {
  display: flex; gap: 10px; margin: 4px 0 18px;
  padding: 14px; border-radius: var(--radius-md);
  background: var(--summary-bg); border: 1px solid var(--border);
}
.compute__cell { flex: 1 1 0; text-align: center; position: relative; }
.compute__cell + .compute__cell::before { content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 1px; background: var(--border); }
.compute__k { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.compute__v {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 20px; font-weight: 700; margin-top: 4px;
  transition: color var(--t-fast);
}

.sheet__foot {
  flex: 0 0 auto; padding: 12px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  display: flex; gap: 10px;
}
.btn {
  flex: 1 1 0; cursor: pointer; border: none;
  padding: 15px; border-radius: var(--radius-md);
  font-family: var(--font-ui); font-size: 15px; font-weight: 800; letter-spacing: 0.02em;
  transition: transform var(--t-fast) var(--ease-spring), filter var(--t-fast);
}
.btn:active { transform: scale(0.97); }
.btn--ghost { flex: 0 0 auto; padding: 15px 20px; background: var(--soft-bg); border: 1px solid var(--border); color: var(--text); }
.btn--primary {
  color: #04181c;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 8px 22px calc(var(--glow-mult) * 1px) var(--accent-glow);
}
:root[data-theme="terminal"] .btn--primary,
:root[data-theme="light"] .btn--primary { color: #fff; }
:root[data-theme="terminal"] .punch { color: #04140a; }

/* toast */
.toast {
  position: absolute; left: 50%; bottom: 92px; z-index: 80;
  transform: translate(-50%, 20px); opacity: 0;
  display: flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 13px; font-weight: 700; color: var(--text);
  box-shadow: 0 16px 40px -16px rgba(0,0,0,0.7);
  transition: transform var(--t-med) var(--ease-spring), opacity var(--t-med);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 16px; height: 16px; color: var(--success); }

/* generic settings/export placeholder screens */
.placeholder {
  padding: 40px 20px; text-align: center; color: var(--muted);
}
.settings-list { display: flex; flex-direction: column; gap: 8px; }
.srow {
  display: flex; align-items: center; gap: 13px; width: 100%; cursor: pointer; text-align: left;
  padding: 15px 16px; border-radius: var(--radius-md);
  background: var(--surface-1-solid); border: 1px solid var(--border); color: var(--text);
  transition: transform var(--t-fast), border-color var(--t-fast);
}
.srow:active { transform: scale(0.985); }
.srow__icon { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; }
.srow__label { flex: 1 1 auto; font-size: 14px; font-weight: 600; }
.srow__chev { color: var(--text-muted); font-size: 18px; }
.section-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 18px 6px 10px;
}

/* theme switch row */
.themes { display: flex; gap: 9px; flex-wrap: wrap; }
.theme-dot {
  cursor: pointer; flex: 1 1 calc(33% - 9px);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 8px; border-radius: var(--radius-md);
  background: var(--surface-1-solid); border: 1px solid var(--border); color: var(--muted);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.theme-dot:active { transform: scale(0.96); }
.theme-dot.active { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 1px var(--accent-soft); }
.theme-dot .swatch {
  width: 100%; height: 30px; border-radius: 8px; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.theme-dot .swatch i { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; }

/* entrance helpers */
.stagger { opacity: 0; transform: translateY(10px); animation: rise 520ms var(--ease-out) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
.no-motion * { animation-duration: 0.001ms !important; transition: none !important; }

/* brand mark holds the real icon image */
.brand__mark { padding: 0; overflow: hidden; background: var(--surface-1-solid); }
.brand__mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===================================================================
   SETTINGS — theme family cards + Hell/Dunkel segmented + locked eggs
   =================================================================== */
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.theme-card {
  cursor: pointer; text-align: left;
  padding: 12px; border-radius: var(--radius-md);
  background: var(--surface-1-solid); border: 1px solid var(--border); color: var(--text);
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  position: relative;
}
.theme-card:active { transform: scale(0.975); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.theme-card.locked { opacity: 0.7; }
.theme-card__swatch {
  height: 38px; border-radius: 9px; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: flex-end; padding: 0 9px; gap: 5px;
}
.theme-card__swatch i { width: 13px; height: 13px; border-radius: 50%; }
.theme-card__swatch .lock {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(4,6,10,0.55); color: #fff;
}
.theme-card__swatch .lock svg { width: 16px; height: 16px; }
.theme-card__name { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.theme-card__tag {
  font-family: var(--font-num); font-size: 8.5px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--konto-border);
}
.theme-card__tag.egg { background: rgba(167,139,250,0.14); color: var(--violet); border-color: rgba(167,139,250,0.3); }
.theme-card__meta { font-size: 11px; color: var(--muted); }

/* Hell / Dunkel segmented switch */
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--soft-bg); border: 1px solid var(--border); border-radius: 12px;
}
.seg.disabled { opacity: 0.4; pointer-events: none; }
.seg button {
  flex: 1 1 0; cursor: pointer; border: none; background: none; color: var(--muted);
  padding: 9px; border-radius: 8px;
  font-family: var(--font-ui); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: color var(--t-fast), background var(--t-fast);
}
.seg button svg { width: 15px; height: 15px; }
.seg button.active { background: var(--surface-1-solid); color: var(--text); box-shadow: 0 2px 8px -3px var(--shadow-strong); }

.srow--danger .srow__icon { color: var(--danger); }
.srow__badge {
  font-family: var(--font-num); font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 7px; border-radius: 5px; text-transform: uppercase;
  background: rgba(248,113,113,0.14); color: var(--danger); border: 1px solid rgba(248,113,113,0.3);
}

/* ===================================================================
   ADMIN — login (red) + dashboard tiles
   =================================================================== */
.admin-overlay {
  position: absolute; top: 54px; left: 0; right: 0; bottom: 0; z-index: 65;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 360ms var(--ease-out);
}
.admin-overlay.show { transform: translateX(0); }

/* login */
.alogin {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 26px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(248,113,113,0.12) 0%, transparent 55%),
    var(--bg);
  text-align: center;
}
.alogin__shield {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: rgba(248,113,113,0.10); border: 1px solid rgba(248,113,113,0.35);
  color: var(--danger); margin-bottom: 20px;
  box-shadow: 0 0 0 6px rgba(248,113,113,0.05), 0 16px 40px -16px rgba(248,113,113,0.4);
}
.alogin__shield svg { width: 30px; height: 30px; }
.alogin__title { font-size: 19px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #ffd1d1; }
.alogin__sub { margin-top: 8px; font-family: var(--font-num); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(240,167,167,0.6); }
.alogin__form { width: 100%; max-width: 290px; margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.alogin__field-label { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(240,167,167,0.6); }
.alogin__input {
  width: 100%; padding: 14px; border-radius: 12px; text-align: center;
  background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.3); color: #ffd9d9;
  font-family: var(--font-num); font-size: 18px; letter-spacing: 0.3em;
}
.alogin__input:focus { outline: none; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248,113,113,0.18); }
.alogin__submit {
  margin-top: 4px; width: 100%; padding: 14px; border: none; cursor: pointer; border-radius: 12px;
  background: linear-gradient(180deg, #f87171, #dc2626); color: #fff;
  font-family: var(--font-ui); font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  transition: transform var(--t-fast) var(--ease-spring);
}
.alogin__submit:active { transform: scale(0.97); }
.alogin__cancel { background: none; border: none; color: rgba(240,167,167,0.5); cursor: pointer; font-size: 12px; margin-top: 14px; letter-spacing: 0.04em; }
.alogin__hint { margin-top: 18px; font-family: var(--font-num); font-size: 10px; color: rgba(240,167,167,0.4); letter-spacing: 0.04em; }

/* dashboard */
.admin-head {
  flex: 0 0 auto; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--danger) 8%, var(--bg));
}
.admin-head__back {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center;
  background: var(--soft-bg); border: 1px solid var(--border); color: var(--text);
}
.admin-head__back svg { width: 17px; height: 17px; transform: rotate(180deg); }
.admin-head__title { font-size: 16px; font-weight: 800; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; }
.admin-head__badge {
  font-family: var(--font-num); font-size: 9px; font-weight: 800; letter-spacing: 0.12em;
  padding: 3px 7px; border-radius: 5px; text-transform: uppercase;
  background: rgba(248,113,113,0.16); color: var(--danger); border: 1px solid rgba(248,113,113,0.35);
}
.admin-head__sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.admin-scroll { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px 30px; display: flex; flex-direction: column; gap: 12px; background: radial-gradient(120% 40% at 50% 0%, rgba(248,113,113,0.06), transparent 60%); }
.admin-scroll::-webkit-scrollbar { width: 0; }
.admin-logout {
  flex: 0 0 auto; cursor: pointer;
  padding: 8px 13px; border-radius: 9px;
  background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.4); color: var(--danger);
  font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  transition: transform var(--t-fast), background var(--t-fast);
}
.admin-logout:active { transform: scale(0.95); }
.admin-head { border-bottom-color: rgba(248,113,113,0.22); }

.atile { padding: 16px; position: relative; border-color: rgba(248,113,113,0.18); }
.atile::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--danger), rgba(248,113,113,0.2)); }
.atile__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.atile__title { font-size: 14.5px; font-weight: 800; letter-spacing: 0.01em; display: flex; align-items: center; gap: 8px; }
.atile__title svg { width: 16px; height: 16px; color: var(--danger); }
.atile__sub { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.atile__pill {
  font-family: var(--font-num); font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
  background: var(--soft-bg); color: var(--muted); border: 1px solid var(--border);
}
.atile__pill.on { background: rgba(52,211,153,0.14); color: var(--success); border-color: rgba(52,211,153,0.32); }
.atile__pill.off { background: rgba(248,113,113,0.12); color: var(--danger); border-color: rgba(248,113,113,0.3); }

/* admin toggle row */
.atoggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.atoggle__text strong { display: block; font-size: 13px; font-weight: 700; }
.atoggle__text small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.switch {
  flex: 0 0 auto; width: 46px; height: 27px; border-radius: 999px; cursor: pointer; position: relative;
  background: var(--soft-bg); border: 1px solid var(--border); transition: background var(--t-fast), border-color var(--t-fast);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--muted); transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast);
}
.switch.on { background: var(--accent-soft); border-color: var(--konto-border); }
.switch.on::after { transform: translateX(19px); background: var(--accent); }
.switch.on.danger { background: rgba(248,113,113,0.16); border-color: rgba(248,113,113,0.35); }
.switch.on.danger::after { background: var(--danger); }

.adivide { height: 1px; background: var(--border); margin: 4px 0; }

/* admin input */
.ainput {
  width: 100%; padding: 11px 12px; border-radius: 10px; resize: none;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-ui); font-size: 13px; line-height: 1.45;
}
.ainput:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ainput--mono { font-family: var(--font-num); }
.afield-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.arow-actions { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.arow-actions .spacer { flex: 1 1 auto; }
.abtn {
  cursor: pointer; border: none; padding: 9px 16px; border-radius: 9px;
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  transition: transform var(--t-fast);
}
.abtn:active { transform: scale(0.96); }
.abtn--soft { background: var(--soft-bg); border: 1px solid var(--border); color: var(--text); }
.abtn--accent { background: var(--accent); color: #04181c; }
.abtn--danger { background: rgba(248,113,113,0.14); border: 1px solid rgba(248,113,113,0.35); color: var(--danger); }
.asaved { font-family: var(--font-num); font-size: 11px; color: var(--success); opacity: 0; transition: opacity var(--t-fast); }
.asaved.show { opacity: 1; }

/* reports / audit list */
.alist { display: flex; flex-direction: column; gap: 8px; }
.aitem {
  padding: 11px 12px; border-radius: 10px;
  background: var(--summary-bg); border: 1px solid var(--border);
}
.aitem__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aitem__tag {
  font-family: var(--font-num); font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 5px; text-transform: uppercase;
}
.aitem__tag.bug { background: rgba(248,113,113,0.14); color: var(--danger); }
.aitem__tag.idea { background: rgba(96,165,250,0.14); color: var(--info); }
.aitem__tag.praise { background: rgba(52,211,153,0.14); color: var(--success); }
.aitem__time { font-family: var(--font-num); font-size: 10px; color: var(--text-muted); }
.aitem__body { font-size: 12px; color: var(--text); margin-top: 6px; line-height: 1.45; }
.aitem__meta { font-family: var(--font-num); font-size: 10px; color: var(--text-muted); margin-top: 6px; }

.aaudit { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.aaudit:last-child { border-bottom: none; }
.aaudit__time { font-family: var(--font-num); font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.aaudit__act { font-size: 12px; color: var(--text); }
.aaudit__act b { font-family: var(--font-num); font-weight: 700; color: var(--accent); }

/* feature flags */
.aflag { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.aflag:last-child { border-bottom: none; }
.aflag__name { font-family: var(--font-num); font-size: 12.5px; font-weight: 700; }
.aflag__desc { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* health KV grid */
.ahealth { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ahealth__cell { padding: 11px; border-radius: 10px; background: var(--summary-bg); border: 1px solid var(--border); }
.ahealth__k { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ahealth__v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 700; margin-top: 5px; }
.ahealth__v small { font-size: 11px; color: var(--muted); font-weight: 600; }
.adot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.adot.ok { background: var(--success); box-shadow: 0 0 6px var(--success); }

/* ===================================================================
   WELCOME TOUR (AZIS 6.0)
   =================================================================== */
.welcome {
  position: absolute; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: flex-end;
  background:
    radial-gradient(130% 70% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 52%),
    color-mix(in srgb, var(--bg) 92%, #000);
  opacity: 0; transition: opacity var(--t-med) var(--ease-out);
}
.welcome.show { opacity: 1; }
.welcome__top { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.welcome__logo {
  width: 84px; height: 84px; border-radius: 22px; overflow: hidden; margin-bottom: 22px;
  border: 1px solid var(--konto-border);
  box-shadow: 0 0 0 7px var(--accent-soft), 0 24px 60px -20px var(--accent-glow);
  animation: welcome-pop 700ms var(--ease-spring) both;
}
.welcome__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes welcome-pop { from { transform: scale(0.6); opacity: 0; } }
.welcome__eyebrow { font-family: var(--font-num); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.welcome__title { font-size: 34px; font-weight: 800; letter-spacing: 0.04em; margin: 10px 0 4px; display: flex; align-items: baseline; gap: 10px; }
.welcome__ver {
  font-family: var(--font-num); font-weight: 800;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 60%, #fff) 0%, var(--accent) 55%, var(--accent-strong) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.welcome__sub { font-size: 14px; color: var(--muted); }
.welcome__sheet {
  flex: 0 0 auto; padding: 22px 22px calc(24px + env(safe-area-inset-bottom));
  background: var(--surface-1-solid);
  border-top-left-radius: 26px; border-top-right-radius: 26px;
  border-top: 1px solid var(--border-strong);
}
.welcome__sheet-title { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.welcome__list { display: flex; flex-direction: column; gap: 13px; margin-bottom: 22px; }
.whl { display: flex; align-items: flex-start; gap: 13px; opacity: 0; transform: translateY(8px); animation: rise 460ms var(--ease-out) forwards; }
.whl__icon {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--konto-border); color: var(--accent);
}
.whl__icon svg { width: 18px; height: 18px; }
.whl__text { flex: 1 1 auto; min-width: 0; }
.whl__text strong { display: block; font-size: 14px; font-weight: 700; }
.whl__where { display: block; font-family: var(--font-num); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); margin-top: 4px; white-space: nowrap; }
.welcome__cta {
  width: 100%; padding: 16px; border: none; cursor: pointer; border-radius: var(--radius-lg);
  color: #04181c; background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  font-family: var(--font-ui); font-size: 15px; font-weight: 800; letter-spacing: 0.03em;
  box-shadow: 0 8px 22px calc(var(--glow-mult) * 1px) var(--accent-glow);
  transition: transform var(--t-fast) var(--ease-spring);
}
:root[data-theme="terminal"] .welcome__cta, :root[data-theme="light"] .welcome__cta { color: #fff; }
.welcome__cta:active { transform: scale(0.98); }
.welcome__skip { width: 100%; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 12px; margin-top: 12px; letter-spacing: 0.04em; }

/* ===================================================================
   BRAND LOGO (compass + clock)
   =================================================================== */
.brandlogo { display: block; }
.brandlogo .bl-ring { transform-origin: 120px 120px; animation: bl-spin 14s linear infinite; }
.brandlogo .bl-arrows-glow { animation: bl-pulse 3.2s ease-in-out infinite; }
@keyframes bl-spin { to { transform: rotate(360deg); } }
@keyframes bl-pulse { 0%,100% { opacity: 0.28; } 50% { opacity: 0.5; } }
.no-motion .brandlogo .bl-ring, .no-motion .brandlogo .bl-arrows-glow { animation: none; }

/* small icon in the app bar uses the raster for classic/camo */
.brand__mark .brandlogo { width: 100%; height: 100%; }

/* ===================================================================
   TOP ADMIN PILL (shows when admin unlocked) + 4th tab
   =================================================================== */
.appbar__pills { display: flex; align-items: center; gap: 6px; }
.admin-pill {
  font-family: var(--font-num); font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  padding: 4px 9px; border-radius: 999px; text-transform: uppercase;
  color: #fff; background: linear-gradient(180deg, #f87171, #dc2626);
  border: 1px solid rgba(248,113,113,0.5);
  box-shadow: 0 0 0 1px rgba(248,113,113,0.25), 0 6px 16px -6px rgba(220,38,38,0.7);
  animation: admin-pop 360ms var(--ease-spring) both;
}
@keyframes admin-pop { from { transform: scale(0.4); opacity: 0; } }
.beta-pill { cursor: pointer; user-select: none; -webkit-user-select: none; position: relative; overflow: hidden; transition: box-shadow var(--t-fast), transform var(--t-fast); }
.beta-pill.holding { transform: scale(1.06); box-shadow: 0 0 0 1px var(--danger), 0 0 18px rgba(248,113,113,0.5); color: var(--danger); }
.beta-pill__hold {
  position: absolute; left: 0; bottom: 0; height: 100%; width: 0%;
  background: rgba(248,113,113,0.22); z-index: -1;
}
.tab--admin.active { color: var(--danger); }
.tab--admin.active svg { filter: drop-shadow(0 0 6px rgba(248,113,113,0.6)); }

/* ===================================================================
   SETTINGS SUB-SCREEN (Kopfdaten / Gleitzeit-Regeln …)
   =================================================================== */
.subscreen {
  /* Vollflaechiger Overlay statt unter der App-Bar — sonst gibt's
     Hoehen-Mismatch zwischen appbar (padding + safe-area-inset-top)
     und dem festen top: 54px → Header sah angeschnitten aus. */
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 35;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 320ms var(--ease-out);
}
.subscreen.show { transform: translateX(0); }
.sub-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--border);
}
.sub-head__back {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; background: var(--soft-bg); border: 1px solid var(--border); color: var(--text);
}
.sub-head__back svg { width: 17px; height: 17px; transform: rotate(180deg); }
.sub-head__title { font-size: 16px; font-weight: 800; letter-spacing: 0.01em; }
.sub-head__sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.sub-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 16px 30px; }
.sub-body::-webkit-scrollbar { width: 0; }
.sfield { margin-bottom: 16px; }
.sfield > label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 7px; }
.sfield input, .sfield select {
  box-sizing: border-box; width: 100%; min-width: 0; min-inline-size: 0; min-height: 44px; padding: 12px 13px; border-radius: var(--radius-md);
  background: var(--surface-1-solid); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-ui); font-size: 15px;
}
.sfield input[inputmode="numeric"], .sfield input.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
.sfield input:focus, .sfield select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sfield-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sub-note { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; margin: 4px 2px 18px; }
.sub-save { position: sticky; bottom: 0; padding-top: 8px; }
.sub-save button {
  width: 100%; padding: 14px; border: none; cursor: pointer; border-radius: var(--radius-md);
  color: #04181c; background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  font-family: var(--font-ui); font-size: 15px; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: 0 8px 22px calc(var(--glow-mult) * 1px) var(--accent-glow);
}
:root[data-theme="terminal"] .sub-save button, :root[data-theme="light"] .sub-save button { color: #fff; }

/* ===================================================================
   FIRST-RUN INTRO  (Update-Loading + 6.0 Reveal)
   =================================================================== */
.intro { position: absolute; inset: 0; z-index: 95; background: #05080e; overflow: hidden; }

/* ---- Update wird geladen (kept faithful) ---- */
.uload {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 36px 30px; text-align: center; color: #e8ecf2;
  background: radial-gradient(120% 70% at 50% 0%, rgba(34,211,238,0.08), transparent 55%), #070b12;
}
.uload__bgGrid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(34,211,238,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(34,211,238,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 75%);
}
.uload__spinner { width: 58px; height: 58px; margin-bottom: 22px; }
.uload__spinner svg { width: 100%; height: 100%; }
.uload__track { fill: none; stroke: rgba(34,211,238,0.14); stroke-width: 5; }
.uload__arc { fill: none; stroke: #22d3ee; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 60 110; transform-origin: 32px 32px; animation: uload-spin 0.9s linear infinite; filter: drop-shadow(0 0 6px rgba(34,211,238,0.6)); }
@keyframes uload-spin { to { transform: rotate(360deg); } }
.uload__title { font-size: 19px; font-weight: 800; letter-spacing: 0.03em; margin: 0 0 22px; color: #e8ecf2; }
.uload__tasks { list-style: none; margin: 0 0 22px; padding: 0; width: 100%; max-width: 300px; text-align: left; display: flex; flex-direction: column; gap: 9px; }
.uload__task { display: flex; align-items: center; gap: 10px; font-family: var(--font-num); font-size: 12.5px; color: rgba(232,236,242,0.4); transition: color 240ms ease, opacity 240ms ease; }
.uload__marker { width: 16px; text-align: center; color: rgba(34,211,238,0.5); font-weight: 800; }
.uload__task.active { color: #cfeef5; }
.uload__task.active .uload__marker { color: #22d3ee; animation: uload-blink 0.8s steps(2) infinite; }
.uload__task.done { color: #9fb2bf; }
.uload__task.done .uload__marker { color: #34d399; }
@keyframes uload-blink { 50% { opacity: 0.3; } }
.uload__progress { width: 100%; max-width: 300px; height: 5px; border-radius: 999px; background: rgba(34,211,238,0.12); overflow: hidden; margin-bottom: 26px; }
.uload__bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #06b6d4, #22d3ee); box-shadow: 0 0 10px rgba(34,211,238,0.6); transition: width 420ms var(--ease-out); }
.uload__continue {
  min-width: 200px; padding: 14px 36px; border: none; border-radius: 14px; cursor: pointer;
  color: #04181c; background: linear-gradient(180deg, #22d3ee, #06b6d4);
  font-family: var(--font-ui); font-size: 15px; font-weight: 800; letter-spacing: 0.04em;
  box-shadow: 0 8px 22px rgba(34,211,238,0.4); transition: opacity 240ms, transform var(--t-fast) var(--ease-spring);
}
.uload__continue:disabled { opacity: 0.32; cursor: default; box-shadow: none; }
.uload__continue:not(:disabled) { animation: uload-cta 700ms var(--ease-spring) both; }
.uload__continue:not(:disabled):active { transform: scale(0.97); }
@keyframes uload-cta { from { transform: translateY(8px) scale(0.96); opacity: 0; } }

/* ---- 6.0 Glitch-Reveal ---- */
.reveal {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(130% 75% at 50% 8%, rgba(34,211,238,0.16), transparent 50%), #060b14;
  color: #e8ecf2;
  animation: reveal-in 320ms ease both;
}
@keyframes reveal-in { from { opacity: 0; } }
.reveal__circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.55; }
.reveal__trace { fill: none; stroke: #22d3ee; stroke-width: 0.6; stroke-dasharray: 320; stroke-dashoffset: 320; opacity: 0.5; animation: trace-draw 1.1s var(--ease-out) forwards; filter: drop-shadow(0 0 1px rgba(34,211,238,0.5)); }
@keyframes trace-draw { to { stroke-dashoffset: 0; } }
.reveal__scan { position: absolute; left: 0; right: 0; top: 0; height: 38%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(34,211,238,0.16), transparent);
  animation: scan-sweep 1.3s var(--ease-out) 1; }
@keyframes scan-sweep { 0% { transform: translateY(-40%); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(280%); opacity: 0; } }

.reveal__top { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; position: relative; z-index: 2; }
.reveal__logo { position: relative; width: 150px; height: 150px; margin-bottom: 22px; }
.reveal__logo > .brandlogo { position: relative; z-index: 2; filter: drop-shadow(0 0 24px rgba(34,211,238,0.5)); animation: logo-enter 720ms var(--ease-spring) both; }
@keyframes logo-enter { from { transform: scale(0.5); opacity: 0; } }
.reveal__ghost { position: absolute; inset: 0; z-index: 1; mix-blend-mode: screen; opacity: 0; pointer-events: none; }
.reveal__ghost--r { filter: sepia(1) saturate(9) hue-rotate(-32deg) brightness(1.1); }
.reveal__ghost--c { filter: sepia(1) saturate(9) hue-rotate(150deg) brightness(1.2); }

/* glitch build (stage 0): logo slices jump, ghosts split + flicker */
.reveal[data-stage="0"] .reveal__logo > .brandlogo { animation: logo-enter 720ms var(--ease-spring) both, logo-glitch 1s steps(1) both; }
.reveal[data-stage="0"] .reveal__ghost--r { animation: ghost-r 1s steps(1) both; }
.reveal[data-stage="0"] .reveal__ghost--c { animation: ghost-c 1s steps(1) both; }
@keyframes logo-glitch {
  0%   { clip-path: inset(0 0 78% 0); transform: translate(-6px,0); }
  14%  { clip-path: inset(40% 0 30% 0); transform: translate(5px,0); }
  28%  { clip-path: inset(72% 0 8% 0); transform: translate(-4px,0); }
  42%  { clip-path: inset(20% 0 55% 0); transform: translate(6px,0); }
  58%  { clip-path: inset(60% 0 20% 0); transform: translate(-3px,0); }
  72%  { clip-path: inset(8% 0 70% 0); transform: translate(2px,0); }
  86%  { clip-path: inset(0 0 0 0); transform: translate(-1px,0); }
  100% { clip-path: inset(0 0 0 0); transform: none; }
}
@keyframes ghost-r { 0%,100% { opacity: 0; transform: none; } 10% { opacity: 0.7; transform: translate(-7px,2px); } 30% { opacity: 0.6; transform: translate(6px,-2px); } 50% { opacity: 0.7; transform: translate(-5px,1px); } 70% { opacity: 0.5; transform: translate(4px,0); } 90% { opacity: 0.25; transform: translate(-2px,0); } }
@keyframes ghost-c { 0%,100% { opacity: 0; transform: none; } 10% { opacity: 0.7; transform: translate(7px,-2px); } 30% { opacity: 0.6; transform: translate(-6px,2px); } 50% { opacity: 0.7; transform: translate(5px,-1px); } 70% { opacity: 0.5; transform: translate(-4px,0); } 90% { opacity: 0.25; transform: translate(2px,0); } }

/* lock-in burst at stage >= 1 */
.reveal__logo::after { content: ""; position: absolute; inset: 0; border-radius: 34px; border: 2px solid rgba(34,211,238,0.8); opacity: 0; z-index: 0; }
.reveal[data-stage="1"] .reveal__logo::after, .reveal[data-stage="2"] .reveal__logo::after { animation: lock-burst 600ms var(--ease-out) 1; }
@keyframes lock-burst { 0% { opacity: 0.9; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.7); } }
.reveal[data-stage="1"] .reveal__logo > .brandlogo, .reveal[data-stage="2"] .reveal__logo > .brandlogo { animation: logo-settle 500ms var(--ease-spring) both; }
@keyframes logo-settle { 0% { transform: scale(1.12); } 60% { transform: scale(0.97); } 100% { transform: scale(1); } }

.reveal__eyebrow { font-family: var(--font-num); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #22d3ee; opacity: 0; }
.reveal__title { font-size: 38px; font-weight: 800; letter-spacing: 0.04em; margin: 10px 0 4px; position: relative; opacity: 0; }
.reveal__ver { font-family: var(--font-num); font-weight: 800; background: linear-gradient(180deg, #a5f3fc, #22d3ee 55%, #06b6d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.reveal__sub { font-size: 14px; color: #8a93a3; opacity: 0; }
.reveal[data-stage="1"] .reveal__eyebrow, .reveal[data-stage="2"] .reveal__eyebrow { animation: rise 500ms var(--ease-out) 60ms both; }
.reveal[data-stage="1"] .reveal__title, .reveal[data-stage="2"] .reveal__title { animation: title-glitch 560ms steps(1) both; }
.reveal[data-stage="1"] .reveal__sub, .reveal[data-stage="2"] .reveal__sub { animation: rise 500ms var(--ease-out) 220ms both; }
@keyframes title-glitch {
  0% { opacity: 0; transform: translateX(-8px) skewX(8deg); }
  20% { opacity: 1; transform: translateX(6px) skewX(-6deg); }
  35% { transform: translateX(-4px); } 50% { transform: translateX(3px); }
  70% { transform: translateX(-1px); } 100% { opacity: 1; transform: none; }
}

.reveal__sheet { flex: 0 0 auto; padding: 22px 22px calc(24px + env(safe-area-inset-bottom)); background: #0b0f16; border-top-left-radius: 26px; border-top-right-radius: 26px; border-top: 1px solid rgba(34,211,238,0.18); position: relative; z-index: 2; transform: translateY(100%); }
.reveal[data-stage="2"] .reveal__sheet { animation: sheet-up 520ms var(--ease-spring) 120ms both; }
@keyframes sheet-up { to { transform: translateY(0); } }
.reveal__sheet-title { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #8a93a3; margin-bottom: 14px; }
.reveal__list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.reveal .whl__text strong { color: #e8ecf2; }
.reveal__cta { width: 100%; padding: 16px; border: none; cursor: pointer; border-radius: 16px; color: #04181c; background: linear-gradient(180deg, #22d3ee, #06b6d4); font-family: var(--font-ui); font-size: 15px; font-weight: 800; letter-spacing: 0.03em; box-shadow: 0 8px 22px rgba(34,211,238,0.4); transition: transform var(--t-fast) var(--ease-spring); }
.reveal__cta:active { transform: scale(0.98); }

/* stage caption */
.cap { text-align: center; color: #6b7280; font-family: var(--font-num); font-size: 12px; margin-top: 16px; letter-spacing: 0.04em; }

/* PWA integration: the design handoff's phone frame is presentation-only. */
html,
body,
#root {
  width: 100%;
  min-height: 100%;
}
body {
  display: block;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
}
#root {
  min-height: 100svh;
}
.app {
  position: relative;
  inset: auto;
  width: min(100%, 430px);
  min-height: 100svh;
  height: 100svh;
  margin: 0 auto;
  isolation: isolate;
}
.appbar {
  padding-top: calc(14px + env(safe-area-inset-top));
}
