/* Gestaltung wie im Prototyp: Werkzeug für den Kundentermin, groß bedienbar am Tablet.
   Weiß, Tinte, Petrol als Führung, Wärme-Orange als Akzent. Keine Web-Schriften (offline). */
:root {
  color-scheme: light dark;
  --bg: #ffffff; --panel: #f3f5f4; --ink: #16201d; --mute: #5b6763; --line: #d6ddda;
  --pri: #0d5c74; --priInk: #ffffff; --acc: #e06a1b; --warn: #9a3b00; --warnBg: #fff1e6; --ok: #1d6b3a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121a1c; --panel: #1b2528; --ink: #e8eeec; --mute: #9aa8a4; --line: #2e3b3e;
    --pri: #5fb6cf; --priInk: #0b1a1f; --warn: #ffb37a; --warnBg: #3a2416; --ok: #7fd3a0;
  }
}
:root[data-theme="dark"] {
  --bg: #121a1c; --panel: #1b2528; --ink: #e8eeec; --mute: #9aa8a4; --line: #2e3b3e;
  --pri: #5fb6cf; --priInk: #0b1a1f; --warn: #ffb37a; --warnBg: #3a2416; --ok: #7fd3a0;
}
* { box-sizing: border-box; min-width: 0; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: clip; }
header { padding: 16px max(4vw, 16px) 10px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
h1 { font-size: clamp(20px, 3vw, 28px); line-height: 1.1; margin: 0; font-weight: 800; }
h1 a { color: inherit; text-decoration: none; }
h2 { font-size: 24px; margin: 0 0 4px; }
h3 { font-size: 17px; margin: 22px 0 8px; }
.sub { color: var(--mute); font-size: 14px; margin: 4px 0; }
.hint { color: var(--mute); font-size: 14px; margin: 0 0 18px; }
#speicher-status:not(:empty)::before { content: "· "; }
.konto { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.pill { margin: 0; padding: 6px 12px; border-radius: 20px; font-size: 13px; background: var(--panel); border: 1px solid var(--line); }
.pill.on { color: var(--ok); }
.pill.off { color: var(--warn); background: var(--warnBg); }
.nur-aufnahme { display: none; }
body.in-aufnahme .nur-aufnahme { display: inline-flex; }
nav { display: flex; gap: 6px; overflow-x: auto; padding: 12px max(4vw, 16px); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
nav[hidden] { display: none; }
nav button { flex: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 22px; padding: 10px 14px; font: 600 14px/1 inherit; min-height: 44px; cursor: pointer; }
nav button.on { background: var(--pri); color: var(--priInk); border-color: var(--pri); }
nav button.done::before { content: "✓ "; color: var(--ok); }
nav button.on.done::before { color: inherit; }
main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px max(4vw, 16px) 48px; max-width: 1240px; margin: 0 auto; }
@media (min-width: 900px) { main { grid-template-columns: minmax(0, 1fr) 320px; } main.breit { grid-template-columns: minmax(0, 1fr); } }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; }
input[type=text], input[type=email], input[type=number], input[type=tel], input[type=password], select, textarea {
  font: 16px/1.3 inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-height: 44px; width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; font-weight: 600; font-size: 15px; }
.seg input:checked + span { background: var(--pri); color: var(--priInk); border-color: var(--pri); }
.seg input:focus-visible + span { outline: 3px solid var(--acc); outline-offset: 2px; }
.chk { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 15px; }
.chk input { width: 22px; height: 22px; flex: none; accent-color: var(--pri); }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { border: 0; border-radius: 8px; padding: 12px 20px; font: 600 16px/1.2 inherit; min-height: 44px; cursor: pointer; background: var(--pri); color: var(--priInk); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .6; cursor: wait; }
aside { background: var(--panel); border-radius: 12px; padding: 18px; align-self: start; position: sticky; top: 84px; }
aside[hidden] { display: none; }
aside h3 { margin: 0 0 10px; font-size: 15px; color: var(--mute); font-weight: 600; }
.big { font-size: clamp(34px, 5vw, 46px); font-weight: 800; line-height: 1; white-space: nowrap; }
.big small { font-size: 18px; font-weight: 600; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv b { white-space: nowrap; text-align: right; }
.warn { background: var(--warnBg); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }
.okmsg { color: var(--ok); font-size: 14px; margin: 8px 0; font-weight: 600; }
.meter { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; margin: 6px 0 2px; }
.meter i { display: block; height: 100%; background: var(--pri); }
.scroll { overflow-x: auto; }
.wpt { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.wpt th, .wpt td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.wpt th:first-child, .wpt td:first-child { text-align: left; white-space: normal; }
.wpt tr.sel td { background: color-mix(in srgb, var(--pri) 16%, transparent); font-weight: 700; }
.wpt tr.over td { color: var(--mute); }
.wpt.lv td.txt { text-align: left; white-space: normal; min-width: 260px; }
.wpt.lv tr.tt td { padding-top: 16px; }
.paste { background: var(--panel); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.paste summary, details summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.paste textarea { margin-top: 8px; }
.slot { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; margin: 12px 0; }
.slot.miss { border-color: var(--acc); }
.slh { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.thumbs figure { position: relative; margin: 0; width: 96px; }
.thumbs img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; display: block; }
.thumbs figcaption { font-size: 11px; color: var(--mute); }
.x { position: absolute; top: -8px; right: -8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); font-size: 18px; cursor: pointer; }
.fb { position: relative; }
.fb input { position: absolute; opacity: 0; inset: 0; width: 100%; cursor: pointer; }
.preisbox { background: var(--pri); color: var(--priInk); border-radius: 12px; padding: 18px 20px; margin: 18px 0; display: flex; flex-direction: column; gap: 2px; }
.preisbox span, .preisbox small { opacity: .9; font-size: 14px; }
.preisbox b { font-size: clamp(32px, 6vw, 44px); line-height: 1.1; }
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 20px; }
.karte { background: var(--panel); border-radius: 12px; padding: 16px; }
.karte h3 { margin: 0 0 4px; }
.karte .row { margin-top: 12px; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 22px; width: min(420px, calc(100vw - 32px)); background: var(--bg); color: var(--ink); }
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog form { display: grid; gap: 12px; }
dialog .row { margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) { .meter i { transition: width .4s; } }
#abgleich-status:empty { display: none; }
.karte.konflikt { outline: 2px solid var(--acc); }
.sync-abgeglichen { color: var(--ok); }
.sync-konflikt { color: var(--warn); font-weight: 600; }
.konflikt .row .btn.ghost { background: var(--bg); }
