/* Pendelbuch – Design-System. Systemschrift (SF Pro auf dem iPhone), keine externen Ressourcen (CSP). */

:root {
  --bg: #F3F5FA;
  --bg-2: #EAEEF6;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E3E8F0;
  --line-2: #D5DCE7;
  --accent: #2563EB;
  --accent-2: #1D4ED8;
  --accent-ink: #FFFFFF;
  --accent-soft: #E8EFFE;
  --sign-a: #1E40AF;
  --sign-b: #2563EB;
  --warn: #D97706;
  --warn-bg: #FEF3C7;
  --warn-ink: #92400E;
  --bad: #DC2626;
  --bad-bg: #FEE2E2;
  --bad-ink: #991B1B;
  --ok: #059669;
  --ok-bg: #D1FAE5;
  --ok-ink: #065F46;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 24px -8px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 48px -16px rgba(30, 64, 175, .45);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --sidebar: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1120; --bg-2: #0F172A; --surface: #131C2E; --surface-2: #172238; --ink: #E7ECF5; --ink-2: #C3CCDC;
    --muted: #8D9AB2; --line: #22304A; --line-2: #2C3B57; --accent: #4F83FF; --accent-2: #3B6FF0; --accent-soft: #1A2A4D;
    --sign-a: #1E3A8A; --sign-b: #3366F0; --warn: #F59E0B; --warn-bg: #3A2A0B; --warn-ink: #FCD34D;
    --bad: #F87171; --bad-bg: #3B1518; --bad-ink: #FCA5A5; --ok: #34D399; --ok-bg: #0F3027; --ok-ink: #6EE7B7;
    --shadow-sm: none; --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 8px 28px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 48px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1120; --bg-2: #0F172A; --surface: #131C2E; --surface-2: #172238; --ink: #E7ECF5; --ink-2: #C3CCDC;
  --muted: #8D9AB2; --line: #22304A; --line-2: #2C3B57; --accent: #4F83FF; --accent-2: #3B6FF0; --accent-soft: #1A2A4D;
  --sign-a: #1E3A8A; --sign-b: #3366F0; --warn: #F59E0B; --warn-bg: #3A2A0B; --warn-ink: #FCD34D;
  --bad: #F87171; --bad-bg: #3B1518; --bad-ink: #FCA5A5; --ok: #34D399; --ok-bg: #0F3027; --ok-ink: #6EE7B7;
  --shadow-sm: none; --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 8px 28px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 48px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
h2 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: .92rem; font-weight: 650; margin: 20px 0 10px; color: var(--ink-2); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; background: var(--surface-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; }

/* ---------- App-Rahmen ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-right: 1px solid var(--line); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); padding: 4px 8px 18px; }
.brand:hover { text-decoration: none; }
.logo {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
  color: #fff; background: linear-gradient(135deg, var(--sign-b), var(--sign-a));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 6px 16px -6px rgba(37, 99, 235, .7);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 1.05rem; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: .74rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; padding: 16px 10px 6px; }
.nav-label:first-child { padding-top: 4px; }
.side-nav a, .sheet-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 550;
}
.side-nav a:hover, .sheet-nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.side-nav a[aria-current="page"] .ic { stroke-width: 2.1; }
/* Abmelden: deutlich abgesetzt, ganz unten */
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.logout {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--muted); cursor: pointer; font-weight: 550; font-size: .9rem;
}
.logout:hover { background: var(--bad-bg); color: var(--bad-ink); }

.main { margin-left: var(--sidebar); padding: 28px 36px 64px; max-width: calc(1180px + var(--sidebar)); }
.mobile-top { display: none; }
.tabbar, .sheet { display: none; }
#view { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #view { animation: none; } }

/* Seitenkopf */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.top h2 { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; margin: 0; }
.top select { height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); padding: 0 12px; font-weight: 600; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card > h2:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: stretch; margin-bottom: 18px; }
.grid2 > .card, .grid2 > .plate { margin-bottom: 0; }

/* Die Tafel – modernisiert, mit der weißen Schild-Kante aus v1 */
.plate {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 6px; margin-bottom: 18px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .18), transparent 55%), linear-gradient(135deg, var(--sign-b), var(--sign-a));
  box-shadow: var(--shadow-lg);
}
.plate::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%); pointer-events: none;
}
.plate-in {
  position: relative; z-index: 1; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: calc(var(--r-lg) - 6px);
  padding: 22px 24px; display: grid; grid-template-columns: 1fr auto; gap: 14px 32px; align-items: center; height: 100%;
}
.plate-in.single { grid-template-columns: 1fr; }
.plate .amt { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 780; line-height: 1; letter-spacing: -.035em; }
.plate .what { opacity: .85; margin-top: 8px; font-size: .92rem; }
.plate dl { display: grid; grid-template-columns: auto auto; gap: 6px 22px; margin: 0; font-size: .9rem; }
.plate dt { opacity: .78; }
.plate dd { margin: 0; font-weight: 680; text-align: right; }

/* ---------- Bedienelemente ---------- */
.btn {
  min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface);
  cursor: pointer; font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink); box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .8); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line-2)); background: var(--surface); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: .82rem; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.iconbtn { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 1.15rem; box-shadow: var(--shadow-sm); }
.iconbtn:hover { background: var(--surface-2); }

/* Heute-Karte */
.today-msg { font-size: 1.35rem; font-weight: 720; letter-spacing: -.015em; margin: 0 0 16px; }
.stamp-btn {
  width: 100%; min-height: 84px; font-size: 1.35rem; font-weight: 720; border-radius: var(--r); letter-spacing: -.01em;
  background: linear-gradient(135deg, var(--sign-b), var(--sign-a)) !important; border: 0 !important;
  box-shadow: 0 14px 30px -14px rgba(37, 99, 235, .9) !important;
}
.stamp-btn:hover { filter: brightness(1.06); }

/* Hinweise */
.note { border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-bg); color: var(--warn-ink);
  padding: 12px 16px; border-radius: var(--r-sm); margin: 12px 0; font-size: .92rem; }
.note strong { color: inherit; }
.note.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-bg); color: var(--bad-ink); }
.note.ok { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-bg); color: var(--ok-ink); }
.note ul { margin: 6px 0 0; padding-left: 20px; }
.note .list { color: var(--ink); }
.msg { min-height: 1.2em; color: var(--muted); margin: 6px 0; font-size: .9rem; }
.msg.err { color: var(--bad); }
.msg:empty { min-height: 0; margin: 0; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 650;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; line-height: 1.6; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: transparent; }
.chip.sign { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
td .chip, a + .chip { margin-left: 6px; }

/* Tabellen */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: var(--surface-2); }
table.list td.num, table.list th.num { text-align: right; }
table.list.small td, table.list.small th { padding: 6px 8px; font-size: .84rem; }
table.list small { display: block; }

/* Formulare */
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.form input, .form select, .form textarea, .monthnav input, .row select, .row input {
  height: 40px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); padding: 0 12px; color: var(--ink);
  font-size: .94rem; font-weight: 450; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.form input:focus, .form select:focus, .form textarea:focus, .row select:focus, .row input:focus, .monthnav input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.form textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.form input[type=file] { padding: 7px 10px; height: auto; }
.form .wide { grid-column: 1 / -1; }
.form .chk { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: .9rem; }
.form .chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.form .actions { margin: 4px 0 0; }
input[type=checkbox] { accent-color: var(--accent); }

/* ---------- Monatsansicht ---------- */
.monthnav { display: flex; align-items: center; gap: 6px; }
.monthnav input { font-weight: 650; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 10px 6px 0; font-size: .78rem; font-weight: 600; color: var(--muted); text-align: center; }
.steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 99px; background: var(--line); }
.steps li.done { color: var(--ok-ink); }
.steps li.done::before { background: var(--ok); }
.steps li.now { color: var(--accent); }
.steps li.now::before { background: var(--accent); }

.days { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.row { display: grid; grid-template-columns: 74px minmax(150px, 190px) 120px 120px 64px 1fr; gap: 10px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line); transition: background .12s; }
.row:first-child { border-top: 0; }
.row:not(.head):hover { background: var(--surface-2); }
.row.head { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: var(--surface-2); padding: 9px 14px; }
.row.off { background: color-mix(in srgb, var(--bg) 55%, var(--surface)); }
.row.off .d { color: var(--muted); }
.row.off select { background: transparent; }
.row.today { box-shadow: inset 3px 0 0 var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.d { font-weight: 720; font-size: 1.02rem; line-height: 1.15; }
.d small { display: block; font-weight: 500; color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
.row select, .row input { height: 36px; padding: 0 9px; font-size: .9rem; width: 100%; }
.row input:disabled, .row select:disabled { opacity: .5; background: transparent; }
.tcell { display: flex; flex-direction: column; gap: 3px; }
.tcell .src { font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.tcell .src:empty { display: none; }
.tcell.est input { border-color: var(--warn); background: var(--warn-bg); color: var(--warn-ink); }
.tcell.est .src { color: var(--warn); }
.tcell.miss input { border-color: color-mix(in srgb, var(--bad) 55%, var(--line-2)); }
.dur { font-weight: 720; text-align: right; font-size: .95rem; }
.dur.long { color: var(--accent); }
.issues { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .8rem; margin-top: -2px; }
.issues .i-WARNING { color: var(--warn-ink); background: var(--warn-bg); padding: 2px 8px; border-radius: 6px; }
.issues .i-ERROR { color: var(--bad-ink); background: var(--bad-bg); padding: 2px 8px; border-radius: 6px; font-weight: 650; }
.issues .i-INFO { color: var(--muted); }
.stamps { color: var(--muted); }

/* Kennzahlen */
dl.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0; }
dl.kpis > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
dl.kpis dt { color: var(--muted); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
dl.kpis dd { margin: 4px 0 0; font-weight: 700; font-size: 1rem; }
dl.kpis .wide { grid-column: 1 / -1; }

/* Diagramme */
.chart { display: block; max-width: none; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .bar { fill: var(--accent); }
.chart .bar.open { fill: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.chart .bar.paid { fill: var(--ok); }
.chart .axis { stroke: var(--line-2); }
.chart .trend { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--accent); vertical-align: -1px; }
.legend .l-open::before { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.legend .l-paid::before { background: var(--ok); }

.token { font-family: ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; background: var(--surface); color: var(--ink);
  padding: 12px; border-radius: var(--r-sm); border: 1px dashed var(--line-2); }
pre.json, pre.mailbody { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  padding: 10px 12px; border-radius: var(--r-sm); font-size: .8rem; max-width: 64ch; }
pre.mailbody { font-family: inherit; font-size: .9rem; max-width: none; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .84rem; }

/* Dialoge */
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); padding: 24px;
  max-width: 480px; width: calc(100% - 32px); box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45); }
dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog h2 { margin-top: 0; font-size: 1.2rem; }

/* Login */
.login { max-width: 400px; margin: 0 auto; padding: 12vh 16px 40px; }
.login .plate { margin-bottom: 20px; }
.login .card { padding: 24px; }
.login .btn.primary { min-height: 46px; font-size: 1rem; }
.plate-in.single, .form.one { grid-template-columns: 1fr; }
.wrap.login { max-width: 400px; }

.foot { color: var(--muted); font-size: .8rem; margin-top: 32px; max-width: 80ch; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .main { padding: 24px 24px 64px; }
  .row { grid-template-columns: 64px minmax(130px, 170px) 108px 108px 56px 1fr; gap: 8px; }
}

/* ---------- Handy ---------- */
@media (max-width: 860px) {
  body { font-size: 15px; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 0 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .mobile-top {
    display: flex; position: sticky; top: 0; z-index: 15; margin: 0 -16px 16px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  }
  .mobile-top .brand { padding: 0; }
  .mobile-top .logo { width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; }
  .top h2 { font-size: 1.35rem; }
  .card { padding: 16px; border-radius: 14px; margin-bottom: 14px; }
  .grid2 { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
  .plate-in { grid-template-columns: 1fr; padding: 18px; }
  .plate dl { grid-template-columns: 1fr auto; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; cursor: pointer;
    color: var(--muted); font-size: .66rem; font-weight: 600; border-radius: 10px; text-decoration: none;
  }
  .tabbar .ic { width: 23px; height: 23px; }
  .tabbar a[aria-current="page"], .tabbar button.active { color: var(--accent); }
  .tabbar a[aria-current="page"] .ic { stroke-width: 2.2; }

  .sheet[open] { display: block; }
  .sheet {
    margin: auto 0 0; width: 100%; max-width: none; border-radius: 22px 22px 0 0; border: 0; padding: 8px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    animation: up .22s ease-out;
  }
  @keyframes up { from { transform: translateY(40%); opacity: .6; } to { transform: none; opacity: 1; } }
  .sheet-grip { width: 40px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 4px auto 12px; }
  .sheet-nav { display: flex; flex-direction: column; gap: 2px; }
  .sheet-nav a { padding: 13px 12px; font-size: 1rem; }
  .sheet-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
  .sheet-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .sheet-foot .logout { width: auto; color: var(--bad); padding: 10px 12px; }

  /* Tagesliste als Karten */
  .row { grid-template-columns: 52px 1fr 1fr; grid-template-areas: "d t t" "d a b" "d u n" "i i i"; gap: 8px; padding: 12px; }
  .row.head { display: none; }
  .row .d { grid-area: d; align-self: start; padding-top: 6px; font-size: 1.1rem; }
  .row .t { grid-area: t; } .row .a { grid-area: a; } .row .b { grid-area: b; }
  .row .u { grid-area: u; text-align: left; align-self: center; } .row .n { grid-area: n; }
  .row select, .row input { height: 40px; font-size: 16px; }
  .issues { grid-area: i; margin-top: 0; }
  .steps li { font-size: .68rem; padding-top: 9px; }
  .form { grid-template-columns: 1fr 1fr; }
  .form input, .form select, .form textarea { font-size: 16px; }
  table.list { font-size: .88rem; }
  .today-msg { font-size: 1.2rem; }
  .stamp-btn { min-height: 76px; }
}
@media (max-width: 480px) {
  .form { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 auto; }
}
