/* style.css — Design-Tokens + Grundlayout. Kein Build-Step, kein Framework. */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #16202a;
  --muted: #5d6b7a;
  --line: #e2e7ec;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px #0f172a14, 0 4px 16px #0f172a0d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151a; --surface: #182028; --ink: #e8eef4; --muted: #9aa8b6;
    --line: #26313b; --shadow: 0 1px 2px #0006;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.wrap { max-width: 46rem; margin: 0 auto; padding: 1rem 1rem 4rem; }
header.top {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .9rem 0 1.1rem;
}
header.top h1 { font-size: 1.15rem; margin: 0; letter-spacing: -.01em; }
header.top .sub { color: var(--muted); font-size: .85rem; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; margin-bottom: .85rem;
}
.card h2 { margin: 0 0 .5rem; font-size: 1rem; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.date { font-weight: 600; }

button, .btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: .55rem .9rem; min-height: 44px;   /* Daumen-tauglich */
}
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.ghost { background: transparent; }
button:disabled { opacity: .5; cursor: default; }

input, select {
  font: inherit; padding: .5rem .6rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
}

.pill { font-size: .78rem; padding: .15rem .55rem; border-radius: 999px; border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: currentColor; }
.pill.warn { color: var(--warn); border-color: currentColor; }
.pill.bad { color: var(--bad); border-color: currentColor; }
.pill.premium { color: var(--brand); border-color: currentColor; }

.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: .4rem; }
.bar > i { display: block; height: 100%; background: var(--ok); }
.bar.warn > i { background: var(--warn); }
.bar.over > i { background: var(--bad); }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .4rem .3rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 10px;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.on { opacity: 1; }
