/* Linea Übersicht – weiß, ruhig, Inter. Einzige Akzentfarbe: #0071e3. */
:root {
  --chart-cur: #0071e3; --chart-prev: #79b8f5;
  --seg-on: #fff; --ink: #1d1d1f; --muted: #6e6e73; --line: #e4e4e9; --wash: #f5f5f7; --white: #fff; --bg: #fff;
  --accent: #0071e3; --accent-strong: #0060c2; --accent-wash: #eaf3fd; --accent-ink: #0a3d75; --on-accent: #fff;
  --bad: #c4001a; --bad-wash: #fdecee; --warn: #8a4b00; --warn-wash: #fff4e0; --good: #1b7340; --good-wash: #e9f6ee;
  --bar-bg: rgba(255,255,255,.92); --field-border: #d2d2d7; --slot-line: #f0f0f3; --today-col: #fafcff; --out-day: #fbfbfc; --out-ink: #a1a1a6;
  --missing: #b8b8be; --chip-dl: #1d1d1f; --chip-dl-ink: #fff; --backdrop: rgba(29,29,31,.36); --sheet-shadow: 0 -8px 40px rgba(29,29,31,.18);
  --dot-off: #c7c7cc; --demo-border: #9ec5f0; --demo-bg: #f8fbff; --toast-bg: #1d1d1f; --toast-ink: #fff;
  --r-s: 8px; --r-m: 14px; --tap: 44px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

/* Dunkler Modus: automatisch nach iPhone-Einstellung oder manuell */
:root[data-theme="dunkel"] { color-scheme: dark;
  --chart-cur: #2997ff; --chart-prev: #245f9e; --seg-on: #3a3a3c; --ink: #f5f5f7; --muted: #a1a1a6; --line: #38383d; --wash: #1c1c1e; --white: #000; --bg: #000;
  --accent: #2997ff; --accent-strong: #5aadff; --accent-wash: #0b2a4a; --accent-ink: #cfe6ff; --on-accent: #fff;
  --bad: #ff6b6b; --bad-wash: #3d1416; --warn: #ffb340; --warn-wash: #3a2708; --good: #4cd17a; --good-wash: #0f2f1b;
  --bar-bg: rgba(0,0,0,.86); --field-border: #48484d; --slot-line: #1f1f22; --today-col: #06101c; --out-day: #0b0b0c; --out-ink: #6e6e73;
  --missing: #5a5a5f; --chip-dl: #f5f5f7; --chip-dl-ink: #000; --backdrop: rgba(0,0,0,.6); --sheet-shadow: 0 -8px 40px rgba(0,0,0,.6);
  --dot-off: #5a5a5f; --demo-border: #1f4f80; --demo-bg: #06101c; --toast-bg: #f5f5f7; --toast-ink: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) { color-scheme: dark;
  --chart-cur: #2997ff; --chart-prev: #245f9e; --seg-on: #3a3a3c; --ink: #f5f5f7; --muted: #a1a1a6; --line: #38383d; --wash: #1c1c1e; --white: #000; --bg: #000;
  --accent: #2997ff; --accent-strong: #5aadff; --accent-wash: #0b2a4a; --accent-ink: #cfe6ff; --on-accent: #fff;
  --bad: #ff6b6b; --bad-wash: #3d1416; --warn: #ffb340; --warn-wash: #3a2708; --good: #4cd17a; --good-wash: #0f2f1b;
  --bar-bg: rgba(0,0,0,.86); --field-border: #48484d; --slot-line: #1f1f22; --today-col: #06101c; --out-day: #0b0b0c; --out-ink: #6e6e73;
  --missing: #5a5a5f; --chip-dl: #f5f5f7; --chip-dl-ink: #000; --backdrop: rgba(0,0,0,.6); --sheet-shadow: 0 -8px 40px rgba(0,0,0,.6);
  --dot-off: #5a5a5f; --demo-border: #1f4f80; --demo-bg: #06101c; --toast-bg: #f5f5f7; --toast-ink: #000; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) :is(.logo-mark, .login-logo) { filter: invert(1); } }
:root[data-theme="dunkel"] :is(.logo-mark, .login-logo) { filter: invert(1); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
/* touch-action: manipulation schaltet nur den Doppeltipp-Zoom ab (schnelles Tippen auf Knöpfe zoomte die Ansicht).
   Zwei-Finger-Zoom und Scrollen bleiben; der Viewport sperrt das Vergrößern bewusst nicht. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.025em; }
h2 { font-size: 19px; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 12px; max-width: 68ch; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--toast-bg); color: var(--toast-ink); padding: 10px 14px; border-radius: var(--r-s); z-index: 100; }
.skip:focus { top: 12px; }
* { -webkit-tap-highlight-color: transparent; }

.demo-bar { background: var(--accent-wash); color: var(--accent-ink); font-size: 13px; line-height: 1.4; padding: 9px 20px; text-align: center; }

/* Rahmen */
.frame { min-height: 100dvh; }
.side { display: none; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 10px 0 16px; background: var(--bar-bg); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; min-height: var(--tap); }
.brand-sub { color: var(--muted); font-weight: 500; }
.logo-mark { height: 20px; width: auto; flex: none; display: block; }
.brand-sub { font-weight: 500; }
.side-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
main { padding: 20px 16px calc(120px + var(--safe-b)); max-width: 1080px; margin: 0 auto; outline: none; }
.dockbar { position: fixed; left: 0; right: 0; bottom: calc(10px + var(--safe-b)); z-index: 20; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; pointer-events: none; }
.dockbar > * { pointer-events: auto; }
.tabs, .dock-round { background: var(--bar-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.14); }
.tabs { display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; flex: 0 1 auto; }
.tabs a { position: relative; display: grid; place-items: center; width: 56px; height: 50px; border-radius: 999px; color: var(--muted); }
.tabs a[aria-current] { background: var(--wash); color: var(--ink); }
.tabs a[aria-current] svg { stroke-width: 2.2; }
.tabs a:active { background: var(--wash); }
.tabs svg, .dock-round svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.dock-round { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: var(--ink); flex: none; cursor: pointer; padding: 0; }
.dock-round:active { transform: scale(.96); }
.dock-me span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.dock-me[aria-current] span { background: #0071e3; color: #fff; }
.dock-me span.has-img, .me-pic.has-img { background-size: cover; background-position: center; }
.dock-me[aria-current] span.has-img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #0071e3; }
.me-row { display: flex; align-items: center; gap: 14px; }
.me-pic { width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); font-size: 24px; font-weight: 600; }
.profile label.btn { position: relative; cursor: pointer; }
.profile label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.badge { position: absolute; top: 5px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.quick .row { min-height: 68px; }


/* Kopf einer Seite */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 20px; }
.page-head .muted { font-size: 15px; margin-top: 4px; }
.h1-wrap { overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; min-height: var(--tap); margin: -8px 0 4px; font-size: 15px; font-weight: 500; }

/* Segmente */
.seg { display: inline-flex; background: var(--wash); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button, .seg-opt span { appearance: none; border: 0; background: transparent; border-radius: 8px; min-height: 38px; padding: 0 14px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-checked="true"], .seg button[aria-selected="true"], .seg-opt input:checked + span { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 2px rgba(29,29,31,.12), 0 0 0 .5px rgba(29,29,31,.06); }
.seg button:hover { color: var(--ink); }
.seg .count { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.seg-scroll { display: flex; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-full { display: flex; width: 100%; }
.seg-opt { flex: 1; display: flex; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { flex: 1; justify-content: center; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); }
.v-auftraege .seg, .v-kalender .seg { margin-bottom: 0; }

/* Kennzahlen: das, was morgens zählt */
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -16px 8px; }
.metric { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px 16px 16px; color: var(--ink); min-height: 124px; position: relative; min-width: 0; }
.metric + .metric { border-left: 1px solid var(--line); padding-left: 12px; }
.metric:active { background: var(--wash); }
.metric-label { font-size: 14px; font-weight: 500; color: var(--muted); }
.metric-value { font-size: clamp(26px, 9vw, 40px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.05; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.metric-value.is-missing { color: var(--missing); }
.metric-sub { font-size: 13px; line-height: 1.35; color: var(--muted); margin-top: auto; padding-top: 6px; }
.metric-sub.note { color: var(--accent-strong); }
.metric-sub.warn { color: var(--warn); }
.metric-sub.off { color: var(--muted); font-weight: 500; }
.h-count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: 4px; }
.row-lead .row-title { font-size: 17px; }
.req-subj { font-weight: 600; margin-bottom: 6px; }
.is-hl { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.row.is-hl { background: var(--accent-wash); outline-offset: -2px; }

/* Blöcke und Listen */
.block { margin-top: 32px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; min-height: var(--tap); }
.link { font-size: 15px; font-weight: 500; min-height: var(--tap); display: inline-flex; align-items: center; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 0; color: var(--ink); background: none; border: 0; text-align: left; cursor: pointer; }
.row.static { cursor: default; }
a.row:active, button.row:active { background: var(--wash); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 600; font-size: 16px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--ink); font-size: 15px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-snip { color: var(--muted); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.row-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; color: var(--muted); text-align: right; max-width: 44%; }
.row-time { flex: none; width: 52px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.3; color: var(--ink); }
.empty { color: var(--muted); padding: 14px 0; font-size: 15px; }
.day-h { font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 0 0; letter-spacing: 0; }
.day-h .muted { font-weight: 500; }
.day-h.is-bad { color: var(--bad); }
.sim { display: inline-flex; align-items: center; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--warn-wash); color: var(--warn); vertical-align: middle; }
.tag { font-size: 12px; font-weight: 500; color: var(--accent-strong); }

.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.25; background: var(--wash); color: var(--ink); white-space: nowrap; }
.pill.accent { background: var(--accent-wash); color: var(--accent-ink); }
.pill.good { background: var(--good-wash); color: var(--good); }
.pill.warn { background: var(--warn-wash); color: var(--warn); }
.pill.bad { background: var(--bad-wash); color: var(--bad); }
.pill.soft { background: var(--wash); color: var(--muted); }

.inline-note, .inline-warn { font-size: 14px; line-height: 1.45; padding: 10px 12px; border-radius: var(--r-s); margin: 8px 0; max-width: 68ch; }
.inline-note { background: var(--accent-wash); color: var(--accent-ink); }
.inline-warn { background: var(--warn-wash); color: var(--warn); }

/* Knöpfe */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; text-align: center; transition: background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--muted); }
.btn:active { background: var(--wash); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: #0071e3; border-color: #0071e3; color: #fff; }
.btn-primary:hover { background: #0060c2; border-color: #0060c2; }
.btn-primary:active { filter: brightness(.9); }
.btn-quiet { border-color: transparent; color: var(--accent); padding: 0 8px; }
.btn-quiet:hover { border-color: transparent; background: var(--accent-wash); }
.btn-danger { color: var(--bad); }
.btn-icon { width: var(--tap); padding: 0; font-size: 22px; line-height: 1; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: 14px; font-weight: 500; color: var(--muted); padding: 0; }
.field small { color: var(--muted); font-size: 13px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 16px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,.2); }
.check { flex-direction: row; align-items: center; gap: 10px; min-height: var(--tap); }
.check input, .check-row input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.check > span { color: var(--ink); font-size: 15px; font-weight: 400; }
.check-row { cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.grid2[hidden], .newcust[hidden], .times[hidden] { display: none; }
.card-form { max-width: 640px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 4px 0 8px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.note-box { background: var(--wash); border-radius: var(--r-s); padding: 12px; margin-bottom: 16px; }
.note-box p { white-space: pre-wrap; margin-top: 4px; }

/* Große Zahl auf Detailseiten */
.big-figure { font-size: 56px; font-weight: 600; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; line-height: 1; margin: 4px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.big-figure span { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.bars { list-style: none; margin: 16px 0 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 96px 1fr 84px; align-items: center; gap: 12px; min-height: 36px; font-size: 14px; }
.bar-track { height: 8px; background: var(--wash); border-radius: 4px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.bar-val.muted { font-weight: 400; font-size: 13px; }

/* Diagramm (Besuche) */
.kpi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.kpi .big-figure { margin-bottom: 4px; }
.kpi-delta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 12px; }
.delta { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); } .delta.flat { color: var(--muted); }
.delta [aria-hidden] { font-size: 11px; margin-right: 2px; }
.delta-l { color: var(--muted); font-size: 14px; }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 8px; padding: 0; font-size: 14px; color: var(--ink); }
.chart-legend li { display: inline-flex; align-items: center; gap: 8px; }
.lk { width: 18px; height: 0; border-top: 2px solid var(--chart-cur); display: inline-block; }
.lk.prev { border-top: 2px dashed var(--chart-prev); }
.chart-box { position: relative; height: 230px; margin: 0 -4px; touch-action: pan-y; }
.chart svg { display: block; overflow: visible; outline: none; }
.chart svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.cg-grid { stroke: var(--line); stroke-width: 1; }
.cg-grid.base { stroke: var(--field-border); }
.cg-ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; font-family: var(--font); }
.cg-cur { fill: none; stroke: var(--chart-cur); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cg-prev { fill: none; stroke: var(--chart-prev); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; stroke-linecap: round; }
.cg-cur.thin, .cg-prev.thin { stroke-width: 1.5; }
.cg-cross { stroke: var(--muted); stroke-width: 1; }
.cg-dot { fill: var(--chart-cur); stroke: var(--bg); stroke-width: 2; }
.cg-dot.prev { fill: var(--chart-prev); }
.chart-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.14); padding: 8px 10px; font-size: 13px; min-width: 150px; display: grid; gap: 4px; }
.tip-row { display: grid; grid-template-columns: 14px auto 1fr; align-items: center; gap: 8px; white-space: nowrap; }
.tip-row strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.tip-row span:last-child { color: var(--muted); }
.tip-key { width: 14px; border-top: 2px solid var(--chart-cur); }
.tip-key.prev { border-top: 2px dashed var(--chart-prev); }
.chart-hint { margin-top: 4px; }
.table-view { margin-top: 16px; }
.table-view summary { cursor: pointer; color: var(--accent); font-weight: 500; min-height: var(--tap); display: flex; align-items: center; }
.table-view table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: right; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.table-view th:first-child, .table-view td:first-child { text-align: left; }
.table-view th { color: var(--muted); font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spark { display: block; height: 26px; margin-top: 6px; }
.metric-delta { margin-top: 2px; }
.metric-delta .delta { font-size: 13px; }

/* Datenquellen */
.src-list { list-style: none; margin: 0; padding: 0; }
.src-list li { display: grid; grid-template-columns: 10px 90px 1fr; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; }
.src-name { font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot-off); }
.dot.ok { background: var(--good); } .dot.warn { background: var(--warn); } .dot.off { background: var(--dot-off); }
.src-state { color: var(--muted); }
.src-state.warn { color: var(--warn); }
.src-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.src-cards li { border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; }
.src-top { display: flex; align-items: center; gap: 10px; }
.src-cards .src-state { margin-top: 6px; font-size: 14px; }

/* Gespräch */
.thread { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; max-width: 72ch; }
.msg.mine { background: var(--wash); border-color: transparent; margin-left: 24px; }
.msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; margin-bottom: 8px; }
.msg-head strong { font-weight: 600; overflow-wrap: anywhere; }
.msg-head time { color: var(--muted); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.55; }

/* Aufträge */
.jobs { margin-top: 16px; display: grid; gap: 12px; }
.jobs-head { display: none; }
.job { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); }
.job:active { background: var(--wash); }
.job-main { grid-column: 1 / -1; display: flex; flex-direction: column; min-width: 0; }
.job-main .row-title, .job-main .row-sub { white-space: normal; }
.job-cell { display: flex; flex-direction: column; gap: 3px; font-size: 14px; min-width: 0; }
.job-cell .k { font-size: 12.5px; color: var(--muted); }
.job-cell .pill { align-self: flex-start; }

/* Kalender */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-weight: 600; margin-left: 8px; font-size: 15px; }
.ag-day { border-top: 1px solid var(--line); padding-bottom: 4px; }
.ag-day .day-h { margin-top: 12px; }
.ag-day.is-today .day-h { color: var(--accent); }
.slot-free { display: flex; align-items: center; width: 100%; min-height: var(--tap); border: 0; background: none; color: var(--accent); font-size: 14px; font-weight: 500; padding: 0; cursor: pointer; text-align: left; }
.week { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); grid-template-rows: auto auto calc(var(--px) * var(--hours)); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.wk-dh { padding: 10px 6px; text-align: center; border-left: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; flex-direction: column; }
.wk-dh strong { font-size: 18px; color: var(--ink); font-weight: 600; }
.wk-dh.is-today strong { color: var(--accent); }
.wk-allday-l { font-size: 11px; color: var(--muted); padding: 6px 4px; border-top: 1px solid var(--line); }
.wk-allday { border-left: 1px solid var(--line); border-top: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 30px; }
.wk-hours { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.wk-hours span { height: var(--px); font-size: 11px; color: var(--muted); padding: 2px 6px; font-variant-numeric: tabular-nums; }
.wk-col { position: relative; border-left: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.wk-col.is-today { background: var(--today-col); }
.wk-slot { height: var(--px); flex: none; border: 0; border-bottom: 1px solid var(--slot-line); background: none; cursor: pointer; padding: 0; }
.wk-slot:hover { background: var(--accent-wash); }
.wk-ev { position: absolute; left: 3px; right: 3px; border: 0; border-left: 3px solid var(--accent); background: var(--accent-wash); color: var(--accent-ink); border-radius: 6px; padding: 3px 6px; font-size: 12px; line-height: 1.3; text-align: left; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.wk-ev strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-ev span { color: var(--accent-ink); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-ev.t-wiedervorlage, .chip-ev.t-wiedervorlage { border-left-color: var(--muted); background: var(--wash); color: var(--ink); }
.wk-ev.t-anruf, .chip-ev.t-anruf, .wk-ev.t-sonstiges, .chip-ev.t-sonstiges { border-left-color: var(--good); background: var(--good-wash); color: var(--ink); }
.wk-ev.t-wiedervorlage span, .wk-ev.t-anruf span, .wk-ev.t-sonstiges span { color: var(--muted); opacity: 1; }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); pointer-events: none; }
.chip-dl, .chip-ev { border: 0; text-align: left; font-size: 11.5px; line-height: 1.3; padding: 3px 6px; border-radius: 5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-dl { background: var(--chip-dl); color: var(--chip-dl-ink); font-weight: 500; }
.chip-dl.warn { background: var(--warn-wash); color: var(--warn); } .chip-dl.bad { background: var(--bad-wash); color: var(--bad); } .chip-dl.done { background: var(--wash); color: var(--muted); }
.chip-ev { background: var(--accent-wash); color: var(--accent-ink); border-left: 3px solid var(--accent); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mo-wd { font-size: 12px; color: var(--muted); padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.mo-day { min-height: 64px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: none; padding: 4px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; cursor: pointer; min-width: 0; }
.mo-day.is-out { background: var(--out-day); color: var(--out-ink); }
.mo-n { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mo-day.is-today .mo-n { color: var(--on-accent); background: var(--accent); border-radius: 999px; width: 24px; height: 24px; display: grid; place-items: center; }
.mo-item { display: none; }
.mo-more { display: none; }
.mo-day:has(.mo-item)::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 2px auto 0; }

/* Daumenzone: Hauptaktionen unten */
.dock { position: sticky; bottom: calc(80px + var(--safe-b)); z-index: 5; margin: 20px -16px 0; padding: 10px 16px; background: var(--bar-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.dock .btn { flex: 1 1 auto; min-height: 50px; }
.fab { display: none; }
.fab > span:first-child { font-size: 24px; line-height: 1; margin-top: -2px; }
.sheet-inner .actions { position: sticky; bottom: calc(-20px - var(--safe-b)); background: var(--bg); margin: 16px -16px calc(-20px - var(--safe-b)); padding: 12px 16px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); }
.sheet-inner .actions .btn-primary { flex: 1 1 auto; min-height: 50px; }

/* Zum Aktualisieren ziehen */
.ptr { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 40; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.14); display: grid; place-items: center; transform: translate(-50%, -50px); opacity: 0; pointer-events: none; }
.ptr.back { transition: transform .25s, opacity .25s; }
.ptr svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ptr-arrow { transition: transform .2s; transform-origin: 12px 12px; }
.ptr.ready .ptr-arrow { transform: rotate(180deg); }
.ptr-spin { display: none; stroke-dasharray: 34 60; }
.ptr.spin .ptr-arrow { display: none; }
.ptr.spin .ptr-spin { display: block; animation: ptr-rot .8s linear infinite; transform-origin: 12px 12px; }
@keyframes ptr-rot { to { transform: rotate(360deg); } }
html, body { overscroll-behavior-y: contain; }

/* Untere Sheets (Dialog) */
dialog { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; background: var(--bg); color: var(--ink); box-shadow: var(--sheet-shadow); }
dialog::backdrop { background: var(--backdrop); }
.sheet-inner { padding: 8px 16px calc(20px + var(--safe-b)); overflow-y: auto; max-height: 92dvh; }
.sheet-head { position: sticky; top: 0; background: var(--bg); z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 12px; margin-bottom: 4px; }
.sheet-head h2 { font-size: 19px; }
.sheet-title-2 { font-weight: 600; font-size: 17px; margin: 2px 0 16px; }
.overlap { margin-top: -6px; margin-bottom: 14px; }

/* Rückmeldung */
.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translate(-50%, 12px); background: var(--toast-bg); color: var(--toast-ink); padding: 12px 18px; border-radius: 12px; font-size: 14.5px; max-width: min(92vw, 480px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Einstellungen */
.block.first { margin-top: 8px; }
.toggles .tg { padding-bottom: 4px; }
.check-row input[role="switch"] { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 999px; background: var(--field-border); position: relative; cursor: pointer; transition: background-color .2s; flex: none; }
.check-row input[role="switch"]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .2s; }
.check-row input[role="switch"]:checked { background: var(--good); }
.check-row input[role="switch"]:checked::after { transform: translateX(20px); }
.check-row input[role="switch"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inline-field { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.inline-field select, .inline-field input { width: auto !important; min-width: 170px; }
.steps { margin: 4px 0 12px; padding-left: 22px; display: grid; gap: 10px; }
.steps li { line-height: 1.45; }
.copy-row { display: flex; align-items: center; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.copy-row code { font-size: 12.5px; background: var(--wash); padding: 6px 8px; border-radius: 6px; overflow-wrap: anywhere; flex: 1 1 200px; }
.kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; font-size: 14px; }

/* Mitteilung in der App (Vorschau und geöffnete App) */
.push-banner { position: fixed; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 300; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 0; border-radius: 18px; text-align: left;
  background: var(--bar-bg); color: var(--ink); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 10px 30px rgba(0,0,0,.2); transform: translateY(-140%); transition: transform .3s; cursor: pointer; max-width: 520px; margin: 0 auto; }
.push-banner.show { transform: none; }
.push-banner img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 9px; padding: 13px 3px; border: 1px solid var(--line); }
.pb-text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; line-height: 1.35; }
.pb-text span { color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pb-when { font-size: 12px; color: var(--muted); align-self: start; }

/* Anmeldung */
.login { max-width: 400px; margin: 0 auto; padding: calc(56px + env(safe-area-inset-top, 0px)) 20px 40px; min-height: 100dvh; }
.login-logo { height: 32px; width: auto; display: block; margin-bottom: 36px; }
.login h1 { margin-bottom: 6px; }
.login > .muted { margin-bottom: 24px; }
.btn-wide { width: 100%; min-height: 52px; font-size: 16px; }
.or { text-align: center; color: var(--muted); margin: 14px 0; font-size: 14px; }

/* Vorschau: Testsituationen */
.demo-panel { margin-top: 32px; border: 1px dashed var(--demo-border); border-radius: var(--r-m); padding: 16px; background: var(--demo-bg); }
.demo-panel .actions { margin-top: 10px; }

@media (min-width: 600px) {
  main { padding-left: 28px; padding-right: 28px; }
  .metrics { margin-left: 0; margin-right: 0; border-radius: 0; }
  .src-cards { grid-template-columns: repeat(3, 1fr); }
  .mo-item { display: block; font-size: 11px; line-height: 1.3; padding: 1px 4px; border-radius: 4px; background: var(--accent-wash); color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mo-item.is-dl { background: var(--chip-dl); color: var(--chip-dl-ink); } .mo-item.is-dl.bad { background: var(--bad-wash); color: var(--bad); }
  .mo-item.t-wiedervorlage { background: var(--wash); color: var(--ink); }
  .mo-more { display: block; font-size: 11px; color: var(--muted); }
  .mo-day { min-height: 104px; }
  .mo-day:has(.mo-item)::after { display: none; }
}

@media (min-width: 900px) {
  .top, .dockbar { display: none; }
  .frame { display: grid; grid-template-columns: 240px 1fr; }
  .side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100dvh; padding: 24px 16px; border-right: 1px solid var(--line); }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--ink); font-size: 15px; font-weight: 500; }
  .side-nav a:hover { background: var(--wash); }
  .side-nav a[aria-current] { background: var(--accent-wash); color: var(--accent-ink); }
  .side-nav a:last-child { margin-top: 16px; color: var(--muted); font-size: 14px; }
  main { padding: 36px 40px 64px; width: 100%; }
  h1 { font-size: 32px; }
  .metric { min-height: 150px; padding: 22px 22px 22px 0; }
  .metric + .metric { padding-left: 24px; }
  .metric:hover .metric-label { color: var(--accent); }
  .metric-value { font-size: 52px; }
  .v-start { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
  .v-start > .page-head, .v-start > .metrics, .v-start > .sources { grid-column: 1 / -1; }
  .rows.inq .row { display: grid; grid-template-columns: 220px 1fr 150px; }
  .rows.inq .row-main { display: contents; }
  .rows.inq .row-title { grid-column: 1; }
  .rows.inq .row-sub { grid-column: 2; grid-row: 1; }
  .rows.inq .row-snip { grid-column: 2; grid-row: 2; -webkit-line-clamp: 1; }
  .rows.inq .row-meta { grid-column: 3; grid-row: 1 / span 2; max-width: none; }
  .rows.inq .row-title { grid-row: 1 / span 2; align-self: center; }
  .jobs { gap: 0; border-top: 1px solid var(--line); }
  .jobs-head { display: grid; grid-template-columns: 2.2fr 1fr 1.4fr 1.5fr 1.3fr; gap: 16px; padding: 10px 12px; font-size: 13px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); }
  .job { grid-template-columns: 2.2fr 1fr 1.4fr 1.5fr 1.3fr; gap: 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 12px; align-items: center; }
  .job:hover { background: var(--wash); }
  .job-main { grid-column: auto; }
  .job-cell .k { display: none; }
  .dock { position: static; margin: 16px 0 0; padding: 0; border: 0; background: none; }
  .dock .btn { flex: 0 0 auto; min-height: var(--tap); }
  .fab { display: inline-flex; position: static; min-height: var(--tap); padding: 0 16px; font-size: 15px; box-shadow: none; }
  .fab > span:first-child { font-size: 18px; }
  .sheet-inner .actions { position: static; margin: 16px 0 0; padding: 0; border: 0; }
  .sheet-inner .actions .btn-primary { flex: 0 0 auto; min-height: var(--tap); }
  .push-banner { left: auto; right: 24px; top: 24px; width: 400px; }
  dialog { margin: auto; width: min(560px, 92vw); border-radius: 18px; max-height: 88vh; box-shadow: 0 20px 60px rgba(29,29,31,.25); }
  .sheet-inner { padding: 8px 24px 24px; max-height: 88vh; }
  .toast { bottom: 28px; }
}

@media (max-width: 360px) {
  .seg button { padding: 0 10px; font-size: 13.5px; }
  .grid2 { grid-template-columns: 1fr; }
  .row-time { width: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .ptr.spin .ptr-spin { stroke-dasharray: none; }
}

/* KI-Assistenten */
.by-ai { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.ai-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; background: var(--accent-wash); color: var(--accent-ink); }
.ai-row { border-bottom: 0; }
details.howto { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 14px; }
details.howto summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 500; }
details.howto[open] { padding-bottom: 12px; }
details.howto p { margin: 8px 0; line-height: 1.45; }
.consent .who { font-size: 20px; font-weight: 600; margin: 4px 0 2px; }
.consent ul.can { margin: 10px 0 0; padding-left: 20px; line-height: 1.6; }
.consent .actions { margin-top: 20px; }
.row.wrap .row-title, .row.wrap .row-sub { white-space: normal; overflow: visible; text-overflow: clip; }

/* App-Sperre */
html.privat body { visibility: hidden; }
.lock .lock-pic { width: 72px; height: 72px; margin: 8px auto 0; display: block; }
.lock details.howto { width: 100%; text-align: left; }
.lock-field select { min-width: 210px; }

/* App-Symbol wählen */
.sym-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 4px; }
.sym-pick button { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border: 1px solid var(--line); border-radius: var(--r-m); background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; min-height: 44px; }
.sym-pick button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sym-pick img { width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.sym-steps { margin-top: 10px; }

/* Sperrbildschirm: Farbverlauf wie linea-webdesign.de (fast Schwarz mit blauem Schein) */
html.gesperrt, html.gesperrt body { background: #0b0b0d; }
.lockscreen {
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center;
  padding: max(56px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  color: #f5f5f7; text-align: center;
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(0, 113, 227, .55), rgba(0, 113, 227, .14) 55%, transparent 80%),
    radial-gradient(60% 40% at 50% 100%, rgba(41, 151, 255, .16), transparent 75%),
    linear-gradient(180deg, #0d1626 0%, #0b0b0d 55%, #0b0b0d 100%);
}
.lock-logo { width: 96px; height: 96px; margin: 8px 0 18px; }
.lock-hint { font-size: 17px; margin: 0 0 18px; color: #f5f5f7; }
.pin-dots { display: flex; gap: 20px; margin-bottom: 8px; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #f5f5f7; }
.pin-dots i.on { background: #f5f5f7; }
.pin-dots.shake { animation: lock-shake .4s; }
@keyframes lock-shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@media (prefers-reduced-motion: reduce) { .pin-dots.shake { animation: none; } }
.lock-err { min-height: 22px; margin: 6px 0 10px; font-size: 15px; color: #ffb4ab; }
.keypad { display: grid; grid-template-columns: repeat(3, 78px); gap: 16px 26px; margin: 4px 0 18px; }
.keypad > span { width: 78px; height: 78px; }
.key { width: 78px; height: 78px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: #fff; font: 400 32px/1 var(--font); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); touch-action: manipulation; }
.key:active { background: rgba(255, 255, 255, .32); }
.key-icon { background: transparent; }
.key:focus-visible, .lock-fid:focus-visible, .lock-out:focus-visible, .lock-pw summary:focus-visible, .lock-pw button:focus-visible { outline: 2px solid #2997ff; outline-offset: 3px; }
.lock-fid { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 10px 0 22px; padding: 16px 22px; border: 0; border-radius: 18px;
  background: rgba(255, 255, 255, .10); color: #fff; font: 500 17px/1.2 var(--font); cursor: pointer; min-width: 220px; }
.lock-pw { width: 100%; max-width: 320px; margin-top: auto; }
.lock-pw summary { list-style: none; cursor: pointer; color: #2997ff; font-size: 16px; padding: 12px; min-height: 44px; }
.lock-pw summary::-webkit-details-marker { display: none; }
.lock-pw form { display: flex; gap: 8px; margin-top: 4px; }
.lock-pw input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font: 16px var(--font); }
.lock-pw input::placeholder { color: rgba(255, 255, 255, .55); }
.lock-pw button { height: 46px; padding: 0 16px; border: 0; border-radius: 12px; background: #0071e3; color: #fff; font: 500 16px var(--font); cursor: pointer; }
.lock-out { margin-top: 10px; background: none; border: 0; color: rgba(255, 255, 255, .7); font: 15px var(--font); padding: 12px; min-height: 44px; cursor: pointer; }
.pin-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.pin-acts { display: flex; gap: 8px; flex: none; }
@media (max-height: 700px) { .key { width: 68px; height: 68px; font-size: 28px; } .keypad { grid-template-columns: repeat(3, 68px); gap: 12px 22px; } .lock-logo { width: 72px; height: 72px; margin-bottom: 10px; } }

/* Kunden */
.cust-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.cust-tools .search { flex: 1 1 240px; }
.cust-tools input[type="search"] { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--field-border); background: var(--bg); color: var(--ink); font: 16px var(--font); box-sizing: border-box; }
.custs .row { gap: 12px; }
.custs .avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.custs .row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.contact-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: -4px 0 18px; }
.contact-acts .btn { min-height: 44px; }
p.pre { white-space: pre-wrap; margin: 0; }

/* Menüleiste mit fünf Bereichen: passt von 320 bis 430 px */
@media (max-width: 440px) {
  .dockbar { gap: 8px; padding: 0 8px; }
  .dock-round { width: 52px; height: 52px; }
  .tabs a { width: 46px; }
  .tabs svg, .dock-round svg { width: 23px; height: 23px; }
  .badge { right: 3px; }
}
@media (max-width: 384px) { .dockbar { gap: 6px; } .tabs a { width: 44px; } }
@media (max-width: 360px) { .dockbar [data-act="quickadd"] { display: none; } .tabs a { width: 44px; } .dock-round { width: 52px; height: 52px; } }
/* Sehr schmale Geräte (≤ 360 px): „+“ der Menüleiste entfällt, dafür „+ …“ oben in der jeweiligen Liste */
@media (max-width: 360px) { .fab { display: inline-flex; position: static; min-height: var(--tap); padding: 0 14px; font-size: 15px; box-shadow: none; } .fab > span:first-child { font-size: 18px; } }

/* Kopf: Logo-Symbol + Schriftzug */
.brand-sym { width: 24px; height: 24px; color: var(--ink); flex: none; display: block; }
.brand { gap: 8px; }

/* Runder Zurück-Knopf, Titel daneben (Unterseiten) */
.backbar { display: flex; align-items: center; gap: 14px; margin: -6px 0 14px; min-height: 48px; }
.back-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none; color: var(--ink);
  background: var(--bar-bg); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.back-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.back-btn:active { transform: scale(.95); }
.backbar-t { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }

/* Einstellungen: Übersicht mit Gruppen, Unterseiten mit Karten */
.set-h { font-size: 15px; font-weight: 600; color: var(--muted); margin: 22px 4px 8px; }
.set-group, .set-me { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); overflow: hidden; }
.set-group li + li .set-row { border-top: 1px solid var(--line); }
.set-row, .set-me { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 60px; color: var(--ink); text-decoration: none; }
.set-me { margin-top: 4px; }
.set-me .me-pic { width: 52px; height: 52px; font-size: 20px; }
.set-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--wash); flex: none; }
.set-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chev { width: 18px; height: 18px; margin-left: auto; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.set-row:active, .set-me:active { background: var(--wash); }
.set-page > .block, .set-page > section { border: 1px solid var(--line); border-radius: 18px; padding: 6px 16px 14px; margin-bottom: 16px; background: var(--bg); }
.set-page > .block > .block-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.set-page > .block > .block-head:not(:has(> :not(h2))) { display: none; }
.set-page .src-cards > li { border-radius: 14px; }
.lock-when select { min-width: 160px; height: 40px; border-radius: 10px; border: 1px solid var(--field-border); background: var(--bg); color: var(--ink); font: 16px var(--font); padding: 0 10px; }
.check-row input[role="switch"]:checked { background: var(--ink); }
.check-row input[role="switch"]:checked::after { background: var(--bg); }
.lock-when { display: flex; align-items: center; gap: 12px; }
.lock-when select { width: auto; flex: none; }
.pin-row .row-title, .pin-row .row-sub { white-space: normal; overflow: visible; }
.pin-row .row-main { min-width: 0; flex: 1; }

/* Rechnungen */
.inv-row { gap: 10px; }
.inv-row .row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pill.sig { background: #0b0b0d; color: #fff; }
:root[data-theme="dunkel"] .pill.sig { background: #f5f5f7; color: #0b0b0d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .pill.sig { background: #f5f5f7; color: #0b0b0d; } }
.inv-pos { display: grid; grid-template-columns: 1fr 76px 104px; gap: 8px; align-items: end; }
.inv-pos + .inv-pos { margin-top: 4px; }
@media (max-width: 380px) { .inv-pos { grid-template-columns: 1fr 1fr; } .inv-pos .field:first-child { grid-column: 1 / -1; } }
.inv-sum { font-size: 17px; margin: 8px 0; }
.inv-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 14px; }
.inv-totals > div { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 4px; }
.inv-totals span { font-size: 13px; }
.inv-totals strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.head-acts { display: inline-flex; gap: 8px; align-items: center; }

/* Störungsseite: Fokus für Screenreader auf der Überschrift (nicht bedienbar), daher ohne Rahmen */
.login h1[tabindex="-1"]:focus{outline:none}

/* iPhone: bei offener Tastatur bleibt das Formularfenster mit Speichern und Abbrechen sichtbar */
@media (max-width: 899px) {
  dialog { margin-bottom: var(--kb, 0px); max-height: calc(var(--vvh, 100dvh) * .92); }
  .sheet-inner { max-height: calc(var(--vvh, 100dvh) * .92); }
  .tastatur-offen dialog { border-radius: 18px; }
  .tastatur-offen .sheet-inner .actions { bottom: -20px; margin-bottom: -20px; padding-bottom: 12px; }
}

#pkerr { margin: 10px 0 0; }

/* Mitteilungs-Banner: ausgeblendet heißt wirklich weg (sonst ragt er oben in die Seite und fängt Klicks ab) */
.push-banner[hidden] { display: none !important; }

/* Speicherfehler im Formularfenster: in der Aktionsleiste direkt über „Speichern“ */
.actions > .form-fehler { flex: 1 1 100%; margin: 0 0 2px; }

/* Face ID: Zustand sichtbar, kompakter Knopf neben dem Ziffernblock */
.lock-status { min-height: 22px; margin: -12px 0 12px; font-size: 15px; color: #f5f5f7; text-align: center; max-width: 320px; }
.lock-fid.kompakt { flex-direction: row; gap: 10px; padding: 12px 20px; margin: 0 0 18px; min-height: 48px; }
.lock-fid.kompakt svg { width: 24px; height: 24px; }
.lock-fid[aria-busy="true"] { opacity: .7; cursor: progress; }
#pk[aria-busy="true"] { opacity: .75; cursor: progress; }

/* Offene Tastatur: Speicherfehler in der Leiste nur einzeilig, damit Leiste und Meldung das bearbeitete Feld nicht verdecken.
   Der volle Text wird angesagt (role=alert) und ist nach dem Schließen der Tastatur ganz zu lesen. */
@media (max-width: 899px) {
  .tastatur-offen .actions > .form-fehler { font-size: 13px; line-height: 1.3; padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Kundenvorschau: Startseite, Einrichtung, Betreiberansicht */
.vorschau-start { display: grid; gap: 12px; margin: 8px 0 20px; }
.vorschau-start h1 { margin: 0; }
.vorschau-start .or { margin: 4px 0; text-align: center; color: var(--muted, #6e6e73); }
.vs-betreiber { margin: 8px 0 0; }
.vs-betreiber > summary { cursor: pointer; padding: 12px 0; min-height: 44px; font-weight: 600; }
.vs-betreiber > summary:focus-visible { outline: 2px solid var(--accent, #0071e3); outline-offset: 3px; }
.v-einrichten .row-title, .v-einrichten .row-sub, .v-betreiber .row-title, .v-betreiber .row-sub { white-space: normal; overflow: visible; text-overflow: clip; }
.v-einrichten .row, .v-betreiber .row { align-items: flex-start; gap: 12px; }
.v-betreiber .row-meta { flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; flex: 0 0 auto; max-width: 48%; }
.v-einrichten .row > .btn { flex: 0 0 auto; align-self: center; }

/* ---------- Kunden-App: Startseite „Heute“ und ruhigere Listen (26.11.) ---------- */
.heute { background: var(--wash); border-radius: 20px; padding: 22px 20px 20px; margin: 4px 0 0; display: grid; gap: 10px; }
.heute-k { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.heute-t { font-size: 20px; line-height: 1.35; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.heute-btn { justify-self: start; min-height: 50px; padding: 0 22px; font-size: 16px; font-weight: 600; margin-top: 6px; max-width: 100%; white-space: normal; text-align: left; line-height: 1.25; padding-block: 12px; }
.start-mehr { margin-top: 8px; }
.block { margin-top: 40px; }
.block-head h2 { font-size: 20px; }
.metrics { margin-top: 14px; }
/* Lange Kundennamen und Betreffs: am Handy zwei Zeilen statt abgeschnitten */
.row-title, .row-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.row { padding: 14px 0; }
.row-meta { max-width: 40%; }
.row-meta .pill { white-space: normal; text-align: right; }
@media (min-width: 900px) {
  .heute { padding: 28px 28px 26px; grid-template-columns: 1fr auto; align-items: center; column-gap: 24px; }
  .heute-k { grid-column: 1 / -1; }
  .heute-btn { margin-top: 0; }
  .heute-t { font-size: 22px; }
}

/* Kaufweg in der Vorschau und Einrichtungslink */
.vorschau-start.kauf { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.vorschau-start.kauf h2 { font-size: 20px; }
.vorschau-start form { display: grid; gap: 12px; }
#tk-ok { display: grid; gap: 12px; }
.login .pill { justify-self: start; margin-bottom: 8px; }
.login input[readonly] { background: var(--wash); color: var(--muted); }

/* Einrichtung und Betreiber: erklärende Texte vollständig zeigen (die Zwei-Zeilen-Kürzung der Listen gilt hier nicht) */
.v-einrichten .row-title, .v-einrichten .row-sub, .v-betreiber .row-title, .v-betreiber .row-sub { display: block; -webkit-line-clamp: unset; overflow: visible; }

/* Linea Büro (Arbeitsname) – Gestaltung der Kunden-App nach design/linea-buero-entwurf.html.
   Wird von scripts/build.mjs hinter app.css gehängt; eigene Datei, damit app.css (Grundlage) unberührt bleibt.
   Regeln: Inter, helle Flächen, Schrift #1d1d1f, Akzent #0071e3. Tippflächen ab 44 px, Eingabefelder 16 px (kein Fokus-Zoom). */

/* Kopfzeile: Symbol in Blau + Wortmarke „Linea Büro“ */
.brand-tile { width: 28px; height: 28px; border-radius: 8px; flex: none; display: block; background: #0071e3; }
.brand-word { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.brand-word span { color: var(--muted); font-weight: 500; }
.side .brand-word { font-size: 18px; }

/* Seitenkopf: Titel einheitlich, Unterzeile ruhig */
.page-head h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; }
@media (max-width: 359px) { .page-head h1 { font-size: 26px; } main { padding-inline: 14px; } }

/* Hauptaktionen: eine Höhe, ein Radius */
.btn { min-height: var(--tap); border-radius: 999px; }
.btn-primary { min-height: 50px; font-weight: 600; }

/* Listen mit Initialen-Kreis (Anfragen, „Wartet auf Antwort“) */
.row.with-av { align-items: flex-start; gap: 12px; }
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; font-size: 14px; letter-spacing: .02em; margin-top: 1px; }
.row.with-av .row-title { font-weight: 600; }
.unread { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 2px; }
.rows.inq .row-snip { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 14px; }

/* Filter der Anfragen: Kapseln statt Segmentleiste, seitlich wischbar */
.v-anfragen .seg-scroll { background: none; padding: 0; gap: 6px; margin: 4px -16px 12px; padding-inline: 16px; border-radius: 0; }
.v-anfragen .seg-scroll button { background: var(--wash); border-radius: 999px; min-height: 40px; }
.v-anfragen .seg-scroll button[aria-selected="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.v-anfragen .seg-scroll button[aria-selected="true"] .count { color: inherit; opacity: .75; }

/* Einrichtung: Fortschritt und Schrittkarten */
.einr-prog { height: 6px; border-radius: 6px; background: var(--wash); margin: 4px 0 8px; overflow: hidden; }
.einr-prog > i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s ease; }
.einr-stand { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.einr-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.einr-karte { border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; gap: 8px; background: var(--bg); }
.einr-kopf { display: flex; align-items: center; gap: 12px; }
.einr-nr { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--wash); font-weight: 600; font-size: 14px; }
.einr-karte.ist-fertig .einr-nr { background: var(--good); color: #fff; }
.einr-kopf h2 { font-size: 17px; flex: 1; min-width: 0; }
.einr-karte p { color: var(--muted); font-size: 14px; }
.einr-ok { color: var(--good) !important; font-weight: 500; }
.einr-echt { font-size: 13px !important; margin-top: 0; }
.einr-karte .btn { justify-self: stretch; margin-top: 4px; }
@media (min-width: 640px) { .einr-karte .btn { justify-self: start; } }
.einr-fertig { margin-top: 16px; }

/* Ränder auf kleinen Displays: nichts ragt seitlich heraus */
.row-main, .einr-karte, .heute { min-width: 0; }
