:root {
  --bg: #f2f4f7; --surface: #fff; --ink: #10243e; --muted: #5b6b7f; --line: #dbe2ea;
  --navy: #10243e; --olrd: #e8590c; --lna: #1971c2; --accent: var(--olrd);
  --ok: #2b8a3e; --warn: #b35c00; --danger: #c92a2a; --open-bg: #ffe3e3;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,36,62,.06), 0 4px 16px rgba(16,36,62,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink);
  background: var(--bg); -webkit-text-size-adjust: 100%; }
body.grp-LNA { --accent: var(--lna); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0 0 10px; }
a { color: var(--lna); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { margin-left: auto; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.icon { width: 22px; height: 22px; display: inline-block; flex: none; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: #b8c4d2; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, .day:focus-visible, .nav button:focus-visible { outline: 3px solid #74c0fc; outline-offset: 1px; }
label.field { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
label.field > input, label.field > select, label.field > textarea { display: block; width: 100%; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  min-height: 42px; padding: 8px 10px; border: 1px solid #b8c4d2; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
label.check input { width: 18px; height: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.error { background: #fff0f0; border: 1px solid #ffc9c9; color: var(--danger); padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.info { background: #e7f5ff; border: 1px solid #a5d8ff; color: #0b4a80; padding: 8px 12px; border-radius: 10px; font-size: 14px; }

/* Ebene 0: Anmeldung */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #10243e 0%, #183a63 100%); }
.gate-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px; padding: 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.gate-logo { width: 64px; height: 64px; border-radius: 14px; display: block; margin-bottom: 14px; }
.gate-foot { margin-top: 18px; font-size: 13px; text-align: center; color: var(--muted); }
.gate-foot a { color: var(--muted); }
.secret { font: 600 17px/1.6 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; background: var(--bg); padding: 10px 12px; border-radius: 10px; word-break: break-all; user-select: all; }
.code-input { font: 600 24px ui-monospace, Menlo, monospace !important; letter-spacing: 8px; text-align: center; }

/* Rahmen */
.shell { min-height: 100%; display: flex; flex-direction: column; }
.top { background: var(--navy); color: #fff; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 12px; border-bottom: 4px solid var(--accent); }
.top .brand { font-weight: 700; font-size: 16px; letter-spacing: .3px; }
.top .who { margin-left: auto; font-size: 13px; text-align: right; line-height: 1.25; opacity: .92; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e9eef4; color: var(--ink); white-space: nowrap; }
.chip.OLRD { background: var(--olrd); color: #fff; } .chip.LNA { background: var(--lna); color: #fff; }
.chip.warn { background: #fff3bf; color: #7a4a00; } .chip.red { background: var(--open-bg); color: var(--danger); } .chip.green { background: #d3f9d8; color: #1c6b2c; }
.duty { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.duty div { font-size: 13px; line-height: 1.3; min-width: 0; }
.duty b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.nav { display: flex; background: #fff; border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
.nav button { flex: 1; border: 0; background: none; padding: 7px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; min-width: 0; }
.nav button.on { color: var(--accent); }
.nav .badge { position: absolute; top: 3px; left: calc(50% + 6px); background: var(--danger); color: #fff; border-radius: 999px; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; }
main { flex: 1; padding: 16px; max-width: 1100px; width: 100%; margin: 0 auto; min-width: 0; }
@media (min-width: 900px) {
  .shell { flex-direction: column; }
  .body { flex-direction: row-reverse; }
  .nav { flex-direction: column; width: 210px; border-top: 0; border-right: 1px solid var(--line); position: static; padding: 12px 8px; gap: 2px; justify-content: flex-start; }
  .nav button { flex: none; flex-direction: row; gap: 10px; padding: 10px 12px; font-size: 14px; border-radius: 10px; justify-content: flex-start; }
  .nav button.on { background: var(--bg); }
  .nav .badge { position: static; margin-left: auto; }
  main { padding: 24px 28px; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.seg-ctl { display: inline-flex; background: #e3e8ee; border-radius: 10px; padding: 3px; }
.seg-ctl button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 700; cursor: pointer; color: var(--muted); min-height: 36px; }
.seg-ctl button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--accent); }

/* Monatsraster: je Tag eine Zeile, 24 Stunden von links nach rechts */
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.scale, .day { display: grid; grid-template-columns: 62px 1fr; align-items: stretch; }
.scale { font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); background: #f8fafc; }
.scale .ticks { position: relative; height: 20px; }
.scale .ticks span { position: absolute; top: 3px; transform: translateX(-50%); }
.scale .ticks span:first-child { transform: none; } .scale .ticks span:last-child { transform: translateX(-100%); }
.day { border: 0; border-bottom: 1px solid #edf1f5; background: none; padding: 0; width: 100%; text-align: left; cursor: pointer; height: 34px; }
.day:last-child { border-bottom: 0; }
.day:hover { background: #f8fafc; }
.day .lbl { font-size: 12.5px; padding: 0 8px; display: flex; align-items: center; gap: 5px; border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.day .lbl b { width: 18px; font-weight: 600; color: var(--muted); }
.day.we .lbl { background: #f1f4f8; } .day.we .lbl b { color: var(--ink); }
.day.today .lbl { background: var(--navy); color: #fff; } .day.today .lbl b { color: #fff; }
.bar { position: relative; background-image: linear-gradient(to right, #dfe5ec 1px, transparent 1px); background-size: 25% 100%; }
.s { position: absolute; top: 4px; bottom: 4px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.s.open { background: repeating-linear-gradient(135deg, #ffc9c9 0 5px, #fff0f0 5px 10px); color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.s.off::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.6) 0 4px, transparent 4px 9px); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px var(--danger); border-radius: 4px; }
.s.me { top: 2px; bottom: 2px; box-shadow: inset 0 0 0 2px var(--ink); }
.nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 2; }
.c0 { background: #1c6dd0; } .c1 { background: #d9480f; } .c2 { background: #2b8a3e; } .c3 { background: #862e9c; } .c4 { background: #0b7285; }
.c5 { background: #c2255c; } .c6 { background: #5f3dc4; } .c7 { background: #8f5a00; } .c8 { background: #495057; } .c9 { background: #087f5b; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 22px; height: 14px; border-radius: 3px; display: inline-block; position: relative; }
.legend i.open { background: repeating-linear-gradient(135deg, #ffc9c9 0 4px, #fff0f0 4px 8px); box-shadow: inset 0 0 0 1.5px var(--danger); }
.legend i.off { background: #868e96; } .legend i.off::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.6) 0 3px, transparent 3px 7px); box-shadow: inset 0 0 0 1.5px var(--danger); border-radius: 3px; }

/* Listen */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.item .dot { width: 10px; align-self: stretch; border-radius: 5px; flex: none; min-height: 36px; }
.item .dot.open { background: repeating-linear-gradient(135deg, #ff8787 0 4px, #ffe3e3 4px 8px); }
.item .txt { flex: 1; min-width: 180px; }
.item .txt b { display: block; font-variant-numeric: tabular-nums; }
.item .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #edf1f5; vertical-align: middle; }
.tbl tr.dirty td { background: #fff9db; }
.tbl select { min-height: 36px; padding: 4px 8px; max-width: 100%; }
.scroll-x { overflow-x: auto; }
.sticky-bar { position: sticky; bottom: 62px; display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; box-shadow: var(--shadow); z-index: 3; }
@media (min-width: 900px) { .sticky-bar { bottom: 12px; } }

/* Dialoge */
.overlay { position: fixed; inset: 0; background: rgba(16,36,62,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal { background: var(--surface); width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .overlay { align-items: center; } .modal { border-radius: 18px; } }
.modal h2 { margin-bottom: 12px; padding-right: 30px; }
.modal .close { position: sticky; float: right; top: 0; border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; margin: -4px -4px 0 0; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.range { display: grid; grid-template-columns: auto 1fr 104px; gap: 8px; align-items: center; }
.range span { font-size: 13px; font-weight: 600; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.chips button.on { background: var(--open-bg); border-color: var(--danger); color: var(--danger); }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 92vw; font-size: 14px; }
.toast.err { background: var(--danger); }
.doc { max-width: 760px; margin: 0 auto; padding: 24px 18px 60px; }
.doc h1 { margin-bottom: 14px; } .doc h2 { margin: 22px 0 8px; }
.todo { background: #fff3bf; padding: 0 4px; border-radius: 4px; }
h2.sec { margin: 22px 0 10px; }
.shell { min-height: 100vh; min-height: 100dvh; }
.scale .ticks span { white-space: nowrap; }
main { padding-bottom: 28px; }
.scale .ticks span:last-child { padding-right: 4px; }


/* ================= Smart-MANV-Stil: dunkle Fläche, Signalgelb, kräftige Überschriften ================= */
:root {
  color-scheme: dark;
  --bg: #0b0d12; --surface: #13161d; --surface2: #1a1e27; --ink: #f1f2f4; --muted: #98a1b0; --line: #272c37;
  --navy: #0b0d12; --yellow: #ffc400; --olrd: #ffc400; --lna: #4c9aff; --accent: #ffc400;
  --danger: #ff6b6b; --open-bg: #3a1618; --radius: 8px; --shadow: none;
  --display: "Montserrat", "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}
body, body.grp-LNA { --accent: #ffc400; }
body { font-family: var(--display); background: var(--bg); color: var(--ink); }
h1, h2 { font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: 26px; } h3 { font-weight: 700; }
a { color: var(--yellow); }
.accent-txt { color: var(--yellow); }
.eyebrow { font: 600 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px rgba(255,196,0,.22); flex: none; }

.btn { background: transparent; border-color: #3a4150; color: var(--ink); border-radius: 6px; font-weight: 700; }
.btn:hover { border-color: var(--yellow); }
.btn.primary, .btn.accent { background: var(--yellow); border-color: var(--yellow); color: #0b0d12; }
.btn.primary:hover, .btn.accent:hover { background: #ffd23d; }
.btn.danger { color: var(--danger); }
.btn:focus-visible, input:focus-visible, select:focus-visible, .day:focus-visible, .nav button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
label.field { color: var(--muted); font: 600 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
label.field > input, label.field > select, label.field > textarea { font: 400 15px var(--display); letter-spacing: 0; text-transform: none; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  background: #0e1117; border-color: #3a4150; color: var(--ink); border-radius: 6px; }
label.check input { accent-color: var(--yellow); }
.error { background: #2a1214; border-color: #6b2529; color: #ff9c9c; border-radius: 6px; }
.info { background: #101a2b; border-color: #23406e; color: #a9c8ff; border-radius: 6px; }

.gate { background: radial-gradient(900px 500px at 85% 10%, rgba(40,70,140,.28), transparent 60%), radial-gradient(700px 420px at 10% 100%, rgba(255,196,0,.08), transparent 60%), #0b0d12; }
.gate-card { background: transparent; box-shadow: none; padding: 8px 4px; max-width: 420px; }
.gate-card h1 { font-size: 44px; line-height: 1.02; letter-spacing: -.03em; margin-bottom: 14px; }
.gate-logo { display: none; }
.gate-foot { text-align: left; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 26px; }
.secret { background: #0e1117; border: 1px solid var(--line); font-family: var(--mono); border-radius: 6px; }
.code-input { font-family: var(--mono) !important; }

.top { background: #0b0d12; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.top .brand { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.chip { background: #232834; color: var(--ink); border-radius: 4px; font: 700 11px/1.7 var(--mono); letter-spacing: .06em; }
.chip.OLRD { background: var(--yellow); color: #0b0d12; } .chip.LNA { background: var(--lna); color: #06101f; }
.chip.warn { background: #3a2f08; color: #ffd75e; } .chip.red { background: var(--open-bg); color: #ff9c9c; } .chip.green { background: #10311c; color: #7fe3a0; }
.duty { background: var(--surface); border-bottom-color: var(--line); }
.duty .muted { font: 600 10px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.duty b { font-size: 15px; margin-top: 2px; }
.nav { background: #0b0d12; border-top-color: var(--line); }
.nav button { color: var(--muted); }
.nav button.on { color: var(--yellow); }
.nav .badge { background: var(--yellow); color: #0b0d12; font-weight: 800; }
@media (min-width: 900px) { .nav { border-right-color: var(--line); } .nav button.on { background: var(--surface); } }
.card, .item, .plan { background: var(--surface); border-color: var(--line); box-shadow: none; }
.seg-ctl { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.seg-ctl button { border-radius: 4px; }
.seg-ctl button.on { background: var(--yellow); color: #0b0d12; box-shadow: none; }
.tabs { border-bottom-color: var(--line); }
.tabs button.on { color: var(--ink); border-color: var(--yellow); }

.scale { background: #0e1117; border-bottom-color: var(--line); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; }
.day { border-bottom-color: #1c202a; }
.day:hover { background: #171b24; }
.day .lbl { border-right-color: var(--line); }
.day .lbl b { color: var(--muted); }
.day.we .lbl { background: #171b24; } .day.we .lbl b { color: var(--ink); }
.day.today .lbl { background: var(--yellow); color: #0b0d12; } .day.today .lbl b { color: #0b0d12; }
.bar { background-image: linear-gradient(to right, #262b36 1px, transparent 1px); }
.s { border-radius: 3px; box-shadow: none; }
.s.me { box-shadow: inset 0 0 0 2px #fff; }
.s.open { background: repeating-linear-gradient(135deg, #5a1d21 0 5px, #2a1214 5px 10px); color: #ff9c9c; box-shadow: inset 0 0 0 1.5px var(--danger); }
.s.off::after { background: repeating-linear-gradient(135deg, rgba(11,13,18,.62) 0 4px, transparent 4px 9px); box-shadow: inset 0 0 0 2px var(--yellow); border-radius: 3px; }
.nowline { background: var(--yellow); box-shadow: 0 0 6px rgba(255,196,0,.8); }
.c0 { background: #2f7de1; } .c1 { background: #e0581a; } .c2 { background: #2f9e44; } .c3 { background: #9c4dcc; } .c4 { background: #1098ad; }
.c5 { background: #d6336c; } .c6 { background: #6c5ce7; } .c7 { background: #9a7b1f; } .c8 { background: #6b7482; } .c9 { background: #12a37a; }
.legend i.open { background: repeating-linear-gradient(135deg, #5a1d21 0 4px, #2a1214 4px 8px); }
.legend i.off::after { background: repeating-linear-gradient(135deg, rgba(11,13,18,.62) 0 3px, transparent 3px 7px); box-shadow: inset 0 0 0 1.5px var(--yellow); }
.item .dot.open { background: repeating-linear-gradient(135deg, #ff6b6b 0 4px, #5a1d21 4px 8px); }
.empty { border-color: #3a4150; }
.tbl th { border-bottom-color: var(--line); font: 600 10px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tbl td { border-bottom-color: #1c202a; }
.tbl tr.dirty td { background: rgba(255,196,0,.09); }
.sticky-bar { background: rgba(19,22,29,.96); border-color: #3a4150; }
.overlay { background: rgba(0,0,0,.66); }
.modal { background: var(--surface); border: 1px solid var(--line); }
.modal .close { background: var(--surface2); color: var(--ink); }
.range span { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.chips button { background: transparent; border-color: #3a4150; color: var(--ink); border-radius: 4px; }
.chips button.on { background: var(--open-bg); border-color: var(--danger); color: #ff9c9c; }
.toast { background: var(--yellow); color: #0b0d12; font-weight: 700; border-radius: 6px; }
.toast.err { background: #c92a2a; color: #fff; }
.todo { background: #ffc400; color: #0b0d12; }
.doc h2 { font-size: 16px; }
.gate { min-height: 100vh; min-height: 100dvh; }
.eyebrow { display: block; }
.eyebrow::before { display: inline-block; margin-right: 10px; vertical-align: middle; position: relative; top: -1px; }

.gate-box { border: 1px solid var(--line); background: rgba(19,22,29,.7); border-radius: 8px; padding: 16px; }
.eyebrow.plain::before { display: none; }
.eyebrow.plain { margin: 0; }
.code-input.qr { font-size: 18px !important; letter-spacing: 2px; text-transform: uppercase; width: 100%; }
.seg-ctl.sm button { padding: 3px 10px; min-height: 28px; font-size: 12px; }
.top .seg-ctl { margin-left: 6px; }
/* Abmelden oben rechts, Statistik */
.top .logout { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: #fff; border: 1px solid #3a4150; white-space: nowrap; }
.top .logout .icon svg { width: 18px; height: 18px; }
.top .logout:hover { border-color: var(--yellow, #ffc400); color: var(--yellow, #ffc400); }
@media (max-width: 560px) { .top .logout span:not(.icon) { display: none; } .top .logout { padding: 6px 8px; } }
.tbl.num td:not(:first-child), .tbl.num th:not(:first-child) { text-align: right; white-space: nowrap; }
.tbl tr.sum td { font-weight: 700; border-top: 2px solid var(--line); }
.big { display: block; font-size: 22px; margin: 4px 0; }
.top .who .role { opacity: .7; font-size: 12px; }
/* Rückmelderunde */
.item.co .txt .chip { margin: 4px 4px 0 0; }
.co-admin { margin-top: 10px; width: 100%; }
.co-admin summary { cursor: pointer; font: 600 12px/1.6 var(--mono); color: var(--muted); letter-spacing: .04em; }
.co-admin summary:hover { color: var(--ink); }
.co-admin .list { margin: 8px 0; gap: 6px; }
.co-admin .item { padding: 6px 10px; background: var(--surface2); }
.co-admin .item .dot { min-height: 22px; }
.co-admin .item .txt b { display: inline; margin-right: 6px; }
.co-plan { background: var(--surface2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.co-plan .tbl td { padding: 5px 8px; border-color: var(--line); }
.co-plan .tbl td:first-child { color: var(--muted); white-space: nowrap; }
/* Fahrzeuge */
.vcard .row h2 { margin: 0; }
.vplan { margin-top: 4px; }
.s.v-werkstatt, .legend i.v-werkstatt { background: repeating-linear-gradient(135deg, #5a1d21 0 5px, #2a1214 5px 10px); color: #ff9c9c; box-shadow: inset 0 0 0 1.5px var(--danger); }
.s.v-sperre, .legend i.v-sperre { background: repeating-linear-gradient(135deg, #4a3608 0 5px, #241a04 5px 10px); color: #ffd75e; box-shadow: inset 0 0 0 1.5px #b8860b; }
.s.v-ruht, .legend i.v-ruht { background: repeating-linear-gradient(135deg, #2a303c 0 4px, #1c2029 4px 9px); color: var(--muted); box-shadow: inset 0 0 0 1px #3a4150; }
.s.v-kein_dienst { color: var(--muted); }
.s.v-frei, .s.v-kein_dienst { background: transparent; box-shadow: none; }
.s.vconf { box-shadow: inset 0 0 0 2px var(--danger), 0 0 0 1px var(--danger); }
.s.vx::after, .legend i.vx::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: repeating-linear-gradient(135deg, rgba(255,196,0,.55) 0 3px, transparent 3px 8px); box-shadow: inset 0 0 0 2px var(--yellow); }
.legend i.vx { background: #2f7de1; }
.s.vn { box-shadow: inset 0 0 0 2px #fff; }
.txt-red { color: #ff9c9c; }
/* Termine */
.k-besprechung { --mt: #ffc400; } .k-planung_olrd { --mt: #ff922b; } .k-planung_lna { --mt: #4c9aff; } .k-landratsamt { --mt: #b197fc; }
.k-besprechung_olrd { --mt: #e8590c; } .k-besprechung_lna { --mt: #1c7ed6; }
.k-werkstatt_olrd { --mt: #ff6b6b; } .k-werkstatt_lna { --mt: #f783ac; }
.mt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mt, #ffc400); margin-left: 4px; vertical-align: middle; }
.legend i.mt-dot { width: 10px; height: 10px; border-radius: 50%; }
.item.mt .dot { background: var(--mt); }
.chip.mtchip { background: color-mix(in srgb, var(--mt) 22%, transparent); color: var(--mt); }
.mt-note { white-space: pre-line; margin-top: 4px; color: var(--ink); opacity: .85; }
.list.past { opacity: .55; }
textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #3a4150; resize: vertical; }

/* Danke sagen */
.item.ty { flex-wrap: wrap; }
.ty-row { display: flex; gap: 6px; }
.ty-btn { font-size: 20px; line-height: 1; padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line, #d7dbe0);
  background: transparent; cursor: pointer; filter: grayscale(.4); opacity: .75; }
.ty-btn:hover { opacity: 1; filter: none; }
.ty-btn.on { background: var(--accent-soft, #e6f0ff); border-color: var(--accent, #2563eb); filter: none; opacity: 1; }
.ty-big { font-size: 24px; margin-right: 8px; }

/* H&H proDoppik */
.hh-prow { display: grid; grid-template-columns: minmax(170px, 1fr) 2fr; gap: 8px; align-items: center; }
.hh-prow input[type=text]:disabled { opacity: .5; }
.hh-cols input[type=text] { width: 100%; min-width: 110px; }
.hh-cols tr.off td { opacity: .55; }
.nowrap { white-space: nowrap; }
@media (max-width: 600px) { .hh-prow { grid-template-columns: 1fr; } }

/* Kuchendiagramm Stunden */
.pie-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.pie { width: 340px; height: 340px; max-width: 100%; flex: none; }
.pie-lbl { font-size: 10px; font-weight: 700; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.25); stroke-width: 2px; }
.pie-legend { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.pie-row { display: grid; grid-template-columns: 12px 1fr auto 64px; gap: 10px; align-items: center; font-size: 14px; }
.pie-row i { width: 12px; height: 12px; border-radius: 3px; }
.pie-row b { text-align: right; }
.pie-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

[hidden] { display: none !important; }

/* Termine: Zu-/Absage */
.mt-reply { margin-top: 8px; gap: 6px; }
.mt-reply .btn.danger.on { background: var(--red, #e03131); color: #fff; }
.mt-replies { margin-top: 8px; }
.mt-replies summary { cursor: pointer; }
.mt-replies div { margin-top: 3px; }

/* Fahrzeuge: deutlicher Abstand zwischen den Fahrzeugkarten */
.card.vcard { margin-bottom: 32px; border-top-width: 3px; }
.card.vcard:last-of-type { margin-bottom: 0; }

/* Hauptmenü unten (Handy): kurze Beschriftung, nichts überlappt */
.nav .ns { display: none; }
@media (max-width: 899px) {
  .nav .nl { display: none; }
  .nav .ns { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; letter-spacing: -0.2px; }
  .nav button { padding-left: 0; padding-right: 0; }
}

/* ================= Helles Design (Profil → Darstellung) ================= */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f7; --surface: #ffffff; --surface2: #f7f8fa; --ink: #12151c; --muted: #5d6676; --line: #dde1e8;
  --navy: #12151c; --open-bg: #ffe3e3; --danger: #d6363f; --lna: #1c6dd0;
}
html[data-theme="light"] body, html[data-theme="light"] body.grp-LNA { --accent: #b78900; }
html[data-theme="light"] a, html[data-theme="light"] .accent-txt, html[data-theme="light"] .eyebrow { color: #a07800; }
html[data-theme="light"] .btn { border-color: #c9ced8; }
html[data-theme="light"] .btn:hover { border-color: #b78900; }
html[data-theme="light"] input[type=text], html[data-theme="light"] input[type=email], html[data-theme="light"] input[type=password],
html[data-theme="light"] input[type=date], html[data-theme="light"] input[type=number], html[data-theme="light"] select,
html[data-theme="light"] textarea, html[data-theme="light"] .secret { background: #fff; border-color: #c9ced8; }
html[data-theme="light"] .error { background: #fff0f0; border-color: #f2b8bb; color: #a51d24; }
html[data-theme="light"] .info { background: #eef4ff; border-color: #bcd2f7; color: #1b4a8f; }
html[data-theme="light"] .gate { background: radial-gradient(900px 500px at 85% 10%, rgba(40,90,200,.12), transparent 60%), radial-gradient(700px 420px at 10% 100%, rgba(255,196,0,.18), transparent 60%), #f3f4f7; }
html[data-theme="light"] .gate-box { background: rgba(255,255,255,.85); }
html[data-theme="light"] .top, html[data-theme="light"] .nav { background: #fff; }
html[data-theme="light"] .top .logout { color: var(--ink); border-color: #c9ced8; }
html[data-theme="light"] .chip { background: #eceef2; }
html[data-theme="light"] .chip.warn { background: #fff3bf; color: #7a5c00; } html[data-theme="light"] .chip.red { color: #a51d24; }
html[data-theme="light"] .chip.green { background: #e3f7e9; color: #1d6b35; }
html[data-theme="light"] .nav button.on { color: #a07800; }
html[data-theme="light"] .scale { background: #f7f8fa; }
html[data-theme="light"] .day { border-bottom-color: #eceef2; }
html[data-theme="light"] .day:hover, html[data-theme="light"] .day.we .lbl { background: #f5f6f9; }
html[data-theme="light"] .bar { background-image: linear-gradient(to right, #e6e9ef 1px, transparent 1px); }
html[data-theme="light"] .s.open, html[data-theme="light"] .legend i.open, html[data-theme="light"] .s.v-werkstatt, html[data-theme="light"] .legend i.v-werkstatt {
  background: repeating-linear-gradient(135deg, #ffc9c9 0 5px, #fff0f0 5px 10px); color: #a51d24; }
html[data-theme="light"] .s.v-sperre, html[data-theme="light"] .legend i.v-sperre { background: repeating-linear-gradient(135deg, #ffe8a3 0 5px, #fff8e1 5px 10px); color: #7a5c00; }
html[data-theme="light"] .s.v-ruht, html[data-theme="light"] .legend i.v-ruht { background: repeating-linear-gradient(135deg, #e3e6ec 0 4px, #f3f4f7 4px 9px); box-shadow: inset 0 0 0 1px #c9ced8; }
html[data-theme="light"] .s.off::after, html[data-theme="light"] .legend i.off::after { background: repeating-linear-gradient(135deg, rgba(255,255,255,.6) 0 4px, transparent 4px 9px); }
html[data-theme="light"] .item .dot.open { background: repeating-linear-gradient(135deg, #e03131 0 4px, #ffc9c9 4px 8px); }
html[data-theme="light"] .empty, html[data-theme="light"] .chips button, html[data-theme="light"] textarea { border-color: #c9ced8; }
html[data-theme="light"] .tbl td { border-bottom-color: #eceef2; }
html[data-theme="light"] .sticky-bar { background: rgba(255,255,255,.96); border-color: #dde1e8; }
html[data-theme="light"] .overlay { background: rgba(18,21,28,.45); }
html[data-theme="light"] .txt-red, html[data-theme="light"] .chips button.on { color: #a51d24; }
html[data-theme="light"] .card, html[data-theme="light"] .item, html[data-theme="light"] .plan { box-shadow: 0 1px 2px rgba(18,21,28,.06); }
html[data-theme="light"] .ty-btn.on { background: #fff3bf; border-color: #b78900; }
html[data-theme="light"] .chip.mtchip { background: color-mix(in srgb, var(--mt) 18%, white); color: color-mix(in srgb, var(--mt) 75%, black); }
html[data-theme="light"] .pie-lbl { stroke: rgba(0,0,0,.35); }

/* Master: System */
.perm-tbl th.r, .perm-tbl td.r { text-align: center; width: 92px; }
.perm-tbl td.area { font: 600 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 16px; }
.perm-tbl tr.chg td { background: rgba(255,196,0,.10); }
.perm-tbl input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--yellow); cursor: pointer; }
.perm-tbl .lock { color: var(--muted); font-size: 13px; }
.perm-tbl thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sys-field { display: grid; grid-template-columns: minmax(220px, 1.3fr) 1fr; gap: 6px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sys-field:last-child { border-bottom: 0; }
.sys-field .lbl b { display: block; font-size: 14px; }
.sys-field .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sys-field.chg { background: rgba(255,196,0,.08); margin: 0 -10px; padding: 10px; border-radius: 6px; }
.sys-field .val { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sys-field .val input[type=text], .sys-field .val input[type=number] { flex: 1; min-width: 120px; }
.chip.crit { background: var(--open-bg); color: #ff9c9c; }
html[data-theme="light"] .chip.crit { color: #a51d24; }
.diff { font-family: var(--mono); font-size: 13px; background: var(--surface2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; max-height: 240px; overflow: auto; }
.diff div { padding: 2px 0; }
.emoji-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji-pick button { font-size: 20px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; opacity: .5; }
.emoji-pick button.on { opacity: 1; border-color: var(--yellow); background: rgba(255,196,0,.12); }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #3a4150; border-radius: 999px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--yellow); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-pick button { border: 2px solid var(--line); border-radius: 8px; padding: 10px; background: var(--surface2); color: var(--ink); cursor: pointer; font-weight: 700; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.theme-pick button.on { border-color: var(--yellow); }
.theme-pick i { width: 100%; height: 38px; border-radius: 5px; border: 1px solid var(--line); display: block; }
.theme-pick i.dark { background: linear-gradient(90deg, #0b0d12 0 30%, #13161d 30%); }
.theme-pick i.light { background: linear-gradient(90deg, #f3f4f6 0 30%, #e2e5ea 30%); }
.theme-pick i.auto { background: linear-gradient(135deg, #0b0d12 0 50%, #e2e5ea 50%); }
@media (max-width: 700px) { .sys-field { grid-template-columns: 1fr; } }
html[data-theme="light"] .top { color: var(--ink); border-bottom-color: var(--line); }
html[data-theme="light"] .duty { background: #fff; }
html[data-theme="light"] .day.today .lbl, html[data-theme="light"] .day.today .lbl b { color: #12151c; }
html[data-theme="light"] .chip.OLRD { background: var(--yellow); color: #12151c; }
html[data-theme="light"] .chip.LNA { background: var(--lna); color: #fff; }
html[data-theme="light"] .seg-ctl button.on { background: var(--yellow); color: #12151c; }
html[data-theme="light"] .s.me, html[data-theme="light"] .s.vn { box-shadow: inset 0 0 0 2px #12151c; }

/* Helles Design: abgestufte Grautöne statt reinem Weiß (bessere Lesbarkeit, weniger Blendung) */
html[data-theme="light"] {
  --bg: #e2e5ea; --surface: #f3f4f6; --surface2: #e9ecf0; --line: #cdd2da; --muted: #545d6b;
}
html[data-theme="light"] .top, html[data-theme="light"] .nav { background: #d5d9e0; }
html[data-theme="light"] .duty { background: #eaecf0; }
html[data-theme="light"] .scale, html[data-theme="light"] .day.we .lbl, html[data-theme="light"] .day:hover { background: #e6e9ee; }
html[data-theme="light"] .day { border-bottom-color: #dde1e7; }
html[data-theme="light"] .bar { background-image: linear-gradient(to right, #d6dae1 1px, transparent 1px); }
html[data-theme="light"] .tbl td { border-bottom-color: #dde1e7; }
html[data-theme="light"] input[type=text], html[data-theme="light"] input[type=email], html[data-theme="light"] input[type=password],
html[data-theme="light"] input[type=date], html[data-theme="light"] input[type=number], html[data-theme="light"] select,
html[data-theme="light"] textarea, html[data-theme="light"] .secret { background: #fbfbfc; border-color: #bcc3cd; }
html[data-theme="light"] .btn { border-color: #b9c0ca; }
html[data-theme="light"] .sticky-bar { background: rgba(243,244,246,.97); }
html[data-theme="light"] .gate { background: radial-gradient(900px 500px at 85% 10%, rgba(40,90,200,.10), transparent 60%), radial-gradient(700px 420px at 10% 100%, rgba(255,196,0,.14), transparent 60%), #e2e5ea; }
html[data-theme="light"] .gate-box { background: rgba(243,244,246,.92); }
html[data-theme="light"] .theme-pick i.light { background: linear-gradient(90deg, #f3f4f6 0 30%, #e2e5ea 30%); }
html[data-theme="light"] .theme-pick i.auto { background: linear-gradient(135deg, #0b0d12 0 50%, #e2e5ea 50%); }

/* System: deutlicher Abstand zwischen den großen Feldern (wie bei den Fahrzeugen) */
.sys-body > .card { margin-top: 0 !important; margin-bottom: 32px !important; }
.sys-body > .card:last-child { margin-bottom: 0 !important; }
.sys-body .tbl td:first-child { width: 40%; color: var(--muted); }
.sys-body .card .list { display: grid; gap: 16px; }

.pie-lbl { font-size: 8.5px; }
.pie-lbl .pie-name { font-weight: 800; font-size: 8px; }
/* Zweiter Faktor: QR-Code und Wiederherstellungs-Codes */
.qr-box { display: flex; justify-content: center; }
.qr-box img { background: #fff; padding: 10px; border-radius: 10px; }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.recovery code { font: 600 15px/1.5 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; }
label.check { display: flex; gap: 8px; align-items: flex-start; }
/* Meine Geräte */
.dev { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dev:last-child { border-bottom: 0; }
.dev .txt { flex: 1; }

.perm-tbl tr.off td{opacity:.55}
