:root {
  --canvas: #f2f6fa;
  --card: #ffffff;
  --ink: #1b2b3a;
  --ink-2: #5c6f82;
  --rule: #e2e9f0;
  --brand: #0d7fd6;
  --brand-2: #0a6ab3;
  --brand-soft: #e6f2fc;
  --teal: #14b8a6;
  --red: #e0453b;
  --red-soft: #fdeceb;
  --amber: #f0a020;
  --amber-soft: #fef4e2;
  --green: #22a06b;
  --green-soft: #e6f7ef;
  --shadow: 0 1px 2px rgba(27, 43, 58, 0.04), 0 8px 24px rgba(27, 43, 58, 0.06);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-height: 100vh; }
a { color: var(--brand); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(13, 127, 214, 0.35); outline-offset: 2px; border-radius: 6px; }

/* Navigation */
.side { position: fixed; inset: 0 auto 0 0; width: 240px; padding: 20px 16px 14px; background: var(--card); border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); padding: 6px 10px; margin-bottom: 12px; letter-spacing: -0.01em; }
.side .brand .logo-img { height: 38px; width: auto; }
.side .brand .logo-mark { display: none; height: 34px; }
.side .brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--teal)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1rem; }
.side a:not(.brand) { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 0.93rem; white-space: nowrap; }
.side .group { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }
.side .group > small { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); opacity: .7; padding: 0 12px; margin: 2px 0 3px; font-weight: 700; }
.side .who { padding-top: 10px; }
.side a:not(.brand):hover { background: var(--canvas); color: var(--ink); text-decoration: none; }
.side a.on { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.side a svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side .who { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--rule); font-size: 0.9rem; display: flex; flex-direction: column; gap: 2px; }
.side .who span { font-weight: 600; }
.side .who small { color: var(--ink-2); }
.side .who .version { font-size: 0.75rem; margin-top: 6px; }
main.with-nav { margin-left: 240px; padding: 36px 44px 80px; max-width: 1180px; }
main.solo { padding: 60px 24px; display: flex; justify-content: center; }

/* Typography */
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 14px; }
h3 { font-size: 0.95rem; font-weight: 700; margin: 20px 0 8px; }
p { margin: 0 0 12px; max-width: 72ch; }
.muted { color: var(--ink-2); }
.hint { margin-top: 12px; font-size: 0.9rem; }
.pre { white-space: pre-wrap; }
header.page { margin-bottom: 28px; }
section { margin-bottom: 28px; min-width: 0; }
/* Breite Tabellen scrollen innerhalb ihres Kastens statt die Seite zu sprengen */
@media (max-width: 1400px) {
  main.with-nav { padding: 28px 24px 70px; }
  section > table, .card > table, section > .card > table, main > table { display: block; overflow-x: auto; max-width: 100%; }
}
.error { color: var(--red); font-weight: 600; }
.notice { padding: 12px 16px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-2); font-weight: 500; }

/* Übersicht: Begrüßung, Kacheln, Fortschritt */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.hero h1 { margin-bottom: 2px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px; }
.tile { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.tile:hover { text-decoration: none; transform: translateY(-1px); }
.tile .n { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.tile .l { color: var(--ink-2); font-size: 0.9rem; }
.tile.red .n { color: var(--red); }
.tile.amber .n { color: var(--amber); }
.tile.green .n { color: var(--green); }
.tile.brand .n { color: var(--brand); }
.progress { background: var(--card); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 28px; }
.progress .bar { height: 10px; border-radius: 999px; background: var(--canvas); overflow: hidden; margin: 10px 0 12px; }
.progress .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--teal)); }
.progress ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 20px; font-size: 0.92rem; }
.progress li { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.progress li.ok { color: var(--ink); }
.progress li .tick { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rule); flex: none; display: grid; place-items: center; font-size: 0.7rem; }
.progress li.ok .tick { background: var(--green); border-color: var(--green); color: #fff; }

/* Fristenliste: die Ampel ist der einzige starke Akzent */
h2.overdue { color: var(--red); }
h2.soon { color: var(--amber); }
h2.upcoming { color: var(--green); }
h2.later { color: var(--ink-2); }
.items { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item { display: grid; grid-template-columns: 6px 100px 1fr auto auto; gap: 0 18px; align-items: start; padding: 14px 20px 14px 0; border-bottom: 1px solid var(--rule); }
.item:last-child { border-bottom: 0; }
.item .dot { width: 6px; height: 100%; min-height: 24px; border-radius: 0 4px 4px 0; background: var(--rule); }
.item.overdue .dot { background: var(--red); }
.item.soon .dot { background: var(--amber); }
.item.upcoming .dot { background: var(--green); }
.item .date { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.item .body { display: flex; flex-direction: column; }
.item .body small { color: var(--ink-2); max-width: 70ch; }
.item .body small.law { font-size: 0.8rem; }
.item .left { white-space: nowrap; font-size: 0.85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--canvas); color: var(--ink-2); }
.item.overdue .left { background: var(--red-soft); color: var(--red); }
.item.soon .left { background: var(--amber-soft); color: #9a6200; }
.item.upcoming .left { background: var(--green-soft); color: var(--green); }
.item .actions { display: flex; gap: 12px; }
.items.dim { opacity: 0.65; }

/* Cards, tables, forms */
.card { background: var(--card); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); }
.card.narrow { width: 100%; max-width: 440px; }
table { border-collapse: collapse; width: 100%; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 0.82rem; color: var(--ink-2); font-weight: 600; background: #f8fafc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

label { display: flex; flex-direction: column; gap: 5px; font-size: 0.88rem; font-weight: 500; color: var(--ink-2); }
input, select, textarea { font: inherit; color: var(--ink); padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--card); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(13, 127, 214, 0.15); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 20px; }
.grid .wide { grid-column: 1 / -1; }
.grid > label, .grid > div { min-width: 0; }
.grid input:not([type=checkbox]):not([type=radio]), .grid select, .grid textarea { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.grid input.short { width: 110px; }
.grid label small { font-weight: 400; color: var(--ink-3, #6b7a88); font-size: 0.8rem; line-height: 1.3; }
.grid h3 small { font-weight: 400; color: var(--ink-3, #6b7a88); font-size: 0.8rem; margin-left: 8px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-title { font-size: 0.88rem; font-weight: 500; color: var(--ink-2); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.checks label.check, .checks label.inline-field { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.92rem; }
.checks label.inline-field { gap: 4px; }
.checks input[type=checkbox] { width: auto; margin: 0; }
.grid h3 { grid-column: 1 / -1; margin: 14px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--rule); font-size: 0.95rem; color: var(--ink-2); letter-spacing: .01em; }
.grid h3:first-child { margin-top: 0; }
.grid p.hint { grid-column: 1 / -1; }
select { text-overflow: ellipsis; }
.grid > div { grid-column: 1 / -1; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); grid-column: 1 / -1; font-weight: 400; }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.inline { display: inline; }
form.inline button { padding: 0; }
button, .button { font: inherit; font-weight: 600; cursor: pointer; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--brand); background: var(--card); color: var(--brand); }
button:hover, .button:hover { background: var(--brand-soft); text-decoration: none; }
button.primary { background: var(--brand); color: #fff; }
button.primary:hover { background: var(--brand-2); }
button.link { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 500; }
button.link:hover { background: none; text-decoration: underline; }
button.link.danger { color: var(--red); }
button.danger { border-color: var(--red); color: var(--red); }
button.danger:hover { background: var(--red-soft); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
dl.facts dt { color: var(--ink-2); }
dl.facts dd { margin: 0; }
dl.facts dd.strong { font-weight: 700; color: var(--brand-2); }
code.url { display: block; padding: 12px 14px; background: var(--canvas); border-radius: 10px; word-break: break-all; font-size: 0.9rem; }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; color: #fff; background: var(--amber); border-radius: 999px; padding: 2px 8px; margin-left: auto; }

details.auth { margin-bottom: 12px; padding: 0; }
details.auth summary { cursor: pointer; padding: 16px 24px; display: flex; gap: 20px; align-items: baseline; list-style: none; }
details.auth summary::-webkit-details-marker { display: none; }
details.auth summary .name { font-weight: 700; min-width: 280px; }
details.auth[open] summary { border-bottom: 1px solid var(--rule); }
details.auth form, details.auth dl { padding: 20px 24px; }

@media (max-width: 860px) {
  .side { position: static; width: auto; flex-direction: row; flex-wrap: wrap; padding: 10px 12px; gap: 4px; }
  .side .brand { margin: 0 8px 0 0; }
  .side .brand .logo-img { display: none; }
  .side .brand .logo-mark { display: block; }
  .side a:not(.brand) span { display: none; }
  .side .group { flex-direction: row; margin: 0; gap: 2px; }
  .side .group > small { display: none; }
  .side .who { margin: 0 0 0 auto; border: 0; padding: 0 8px; }
  .side .who .version { display: none; }
  main.with-nav { margin: 0; padding: 20px 14px 60px; }
  .item { grid-template-columns: 6px 1fr; padding-right: 14px; }
  .item .date, .item .body, .item .left, .item .actions { grid-column: 2; }
  .grid { grid-template-columns: 1fr; }
  details.auth summary { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; transform: none !important; } }

/* Belege */
.months { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.month { padding: 6px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); font-weight: 600; font-size: 0.9rem; }
.month.on { background: var(--brand); color: #fff; }
.month.locked:not(.on) { color: var(--green); }
.month:hover { text-decoration: none; }
.pill { display: inline-block; white-space: nowrap; padding: 2px 10px; border-radius: 999px; background: var(--canvas); color: var(--ink-2); font-size: 0.82rem; font-weight: 600; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: #9a6200; }
.pill.red { background: var(--red-soft); color: var(--red); }
.drop { border: 2px dashed var(--rule); box-shadow: none; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.preview iframe, .preview img { width: 100%; height: 640px; border: 0; border-radius: 10px; background: var(--canvas); object-fit: contain; }
.preview img { height: auto; max-height: 640px; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } .preview iframe { height: 480px; } }
.wide-tile { display: flex; flex-direction: row; align-items: center; gap: 20px; margin-bottom: 14px; }
.wide-tile .l { font-size: 0.95rem; max-width: 80ch; }
.month.empty { opacity: 0.45; }
.month.inbox b { background: var(--amber); color: #fff; border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.months.years { margin-bottom: 10px; }

/* Mandanten-Umschalter */
.switcher { display: flex; flex-direction: column; gap: 4px; margin: -8px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.switcher form { display: contents; }
.mandant { display: grid; grid-template-columns: 10px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; width: 100%; padding: 8px 10px; border-radius: 10px; border: 1.5px solid transparent; background: none; color: var(--ink-2); font-weight: 500; }
.mandant i { grid-row: 1 / 3; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.mandant span { font-size: 0.92rem; color: var(--ink); font-weight: 600; }
.mandant small { font-size: 0.75rem; color: var(--ink-2); }
button.mandant { cursor: pointer; }
button.mandant:hover { background: var(--canvas); }
.mandant.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, white); }

/* Bank */
table.bank td { vertical-align: top; }
tr.tx.offen td:first-child { box-shadow: inset 4px 0 0 var(--red); }
tr.tx.zugeordnet td:first-child { box-shadow: inset 4px 0 0 var(--green); }
tr.tx.kein_beleg td:first-child { box-shadow: inset 4px 0 0 var(--rule); }
td.pos { color: var(--green); font-weight: 600; }
td.neg { font-weight: 600; }
table.payroll td, table.payroll th { padding: 8px 6px; font-size: 0.9rem; }
tr.dim { opacity: 0.55; }

small.note { color: #9a6200; }

.qr svg { width: 220px; height: 220px; margin: 8px auto 12px; display: block; }

tr.tx.fehlt td:first-child { box-shadow: inset 4px 0 0 var(--red); }
tr.tx.offen td:first-child { box-shadow: inset 4px 0 0 var(--amber); }

/* ---------- Taktwerk ---------- */
.brand-solo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; margin-bottom: 18px; }
.brand-solo .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--teal)); display: grid; place-items: center; color: #fff; font-weight: 800; }
td.neg, .num.neg { color: var(--red); }
.stamp { margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.stamp p { margin: 0; font-size: 1.05rem; }
button.big { font-size: 1.15rem; padding: 14px 32px; }
ul.findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.findings li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 0.93rem; }
ul.findings li.fehler { color: var(--ink); }
ul.findings li small { flex-basis: 100%; padding-left: 62px; }
ul.plain { padding-left: 20px; }
ul.plain li { margin-bottom: 8px; }
table.times td, table.times th { padding: 9px 12px; font-size: 0.92rem; }
tr.free td { color: var(--ink-2); background: #fafcfe; }
tr.today td { background: var(--brand-soft); }
tr.has-error td:first-child { box-shadow: inset 4px 0 0 var(--red); }
td.has-error { background: var(--red-soft); }
.block { display: block; }
.block.terminal::before, .block.stempel::before { content: "⏱ "; color: var(--ink-2); }
.block.korrektur::before { content: "✎ "; color: var(--amber); }
details.corr { display: inline-block; }
details.corr summary { cursor: pointer; color: var(--brand); font-size: 0.85rem; list-style: none; }
details.corr summary::-webkit-details-marker { display: none; }
details.corr form { margin-top: 8px; padding: 12px; background: var(--canvas); border-radius: 10px; min-width: 320px; }
.grid.small { gap: 8px 12px; }
.grid.small input { padding: 7px 10px; }
table.week td { vertical-align: top; font-size: 0.88rem; min-width: 96px; }
table.week td.free { background: #fafcfe; }
table.week th.today { color: var(--brand); }
table.year td, table.year th { padding: 8px 8px; font-size: 0.88rem; }
th.num { text-align: right; }
.months a.month, .months span.month { display: inline-flex; align-items: center; }

/* Terminal */
body.terminal main { padding-top: 32px; max-width: 900px; margin: 0 auto; }
.big-time { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 18px; color: var(--ink); }
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; width: 100%; }
.term-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.term-card.in { box-shadow: var(--shadow), inset 0 0 0 2px var(--green); }
.term-card summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; list-style: none; gap: 10px; }
.term-card summary::-webkit-details-marker { display: none; }
.term-card .nm { font-weight: 700; font-size: 1.05rem; }
.term-card form { margin-top: 12px; }
.term-card button { flex: 1; }

/* Dienst- und Einsatzplan (1.2.0) */
table.plan td { position: relative; padding-right: 22px; }
table.plan td.st-urlaub, table.plan td.st-abwesend { background: var(--amber-soft); }
table.plan td.st-krank { background: var(--red-soft); }
table.plan td.st-feiertag, table.plan td.st-frei { background: #fafcfe; }
table.plan td.st-schule { background: #eef3fb; }
li.item.ok .dot { background: #1f9d55; }
table.plan td.st-short { background: var(--red-soft); }
table.plan .shift { margin-bottom: 3px; }
table.plan .shift.absent { opacity: .75; }
table.plan .shift form.inline { display: inline; }
table.plan .shift button.link { padding: 0 4px; font-size: .95rem; }
table.plan tr.own td { background: var(--brand-soft); }
table.plan td.warn { color: var(--red); font-weight: 600; }
details.add { position: absolute; top: 6px; right: 6px; }
details.add summary { list-style: none; cursor: pointer; color: var(--brand); font-weight: 700; width: 18px; height: 18px; line-height: 16px; text-align: center; border: 1.5px solid var(--brand); border-radius: 50%; font-size: .9rem; }
details.add summary::-webkit-details-marker { display: none; }
details.add[open] { z-index: 5; }
details.add form.mini { position: absolute; right: 0; top: 24px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 10px; width: 250px; box-shadow: 0 8px 24px rgba(0,0,0,.12); display: grid; gap: 6px; text-align: left; }
details.add form.mini input, details.add form.mini select { font-size: .85rem; padding: 6px 8px; }
details.add form.mini .row { display: flex; gap: 4px; }
details.add form.mini .row input { min-width: 0; flex: 1; }


/* Demodaten */
.demo-banner { margin: 0 0 16px; padding: 8px 14px; border-radius: 10px; background: var(--amber-soft); color: #9a6200; font-size: .88rem; font-weight: 600; }
fieldset.choice { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 14px; margin: 4px 0 10px; }
fieldset.choice legend { font-weight: 600; padding: 0 6px; }
fieldset.choice label.check { display: block; margin: 8px 0; line-height: 1.4; }

tr.row-open td { background: var(--red-soft); }

/* Standard-Krankmeldung */
details.sick > summary { cursor: pointer; list-style: none; }
details.sick > summary::-webkit-details-marker { display: none; }
details.sick > summary::before { content: "+ "; color: var(--brand); font-weight: 700; }
details.sick[open] > summary::before { content: "– "; }
.reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
label.reason { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 12px; cursor: pointer; }
label.reason:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
label.reason input { margin-top: 3px; }
label.reason span { display: flex; flex-direction: column; line-height: 1.25; }
label.reason small { color: var(--ink-2); font-size: .78rem; }

/* Admin-Reiter */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 18px; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); font-weight: 600; font-size: 0.88rem; }
.tabs a.on { background: var(--brand); color: #fff; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on:hover { color: #fff; }
.tabs a .badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.72rem; text-align: center; }

/* Terminal 1.6 */
main.term { flex-direction: column; align-items: center; gap: 10px; max-width: 760px; }
.term-head { text-align: center; }
.term-head .big-time { font-size: 4.2rem; margin: 8px 0 0; }
.term-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; width: 100%; margin: 14px 0 6px; }
.term-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 160px; border-radius: 22px; border: 0; font-size: 1.5rem; font-weight: 700; color: #fff; cursor: pointer; box-shadow: var(--shadow); transition: transform .08s; }
.term-btn:active { transform: scale(.97); }
.term-btn .ico { font-size: 1.6rem; opacity: .9; }
.term-btn.kommen { background: linear-gradient(135deg, var(--green), #1a8c5a); }
.term-btn.pause { background: linear-gradient(135deg, var(--amber), #d48a10); }
.term-btn.gehen { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.term-btn:hover { filter: brightness(1.05); }
.term-msg { font-size: 1.15rem; width: 100%; text-align: center; }
.term-msg.bad { background: var(--red-soft); color: var(--red); }
.term-dialog { width: 100%; display: flex; justify-content: center; }
.term-dialog[hidden], .term-buttons[hidden] { display: none; }
.term-form { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; width: min(100%, 360px); display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.term-form h2 { margin: 0; text-align: center; font-size: 1.4rem; }
.pin-display { text-align: center; font-size: 2rem; letter-spacing: 10px; padding: 8px 0; color: var(--ink); min-height: 2.6rem; }
.pin-hidden { position: absolute; opacity: 0; pointer-events: none; height: 0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { font-size: 1.5rem; padding: 16px 0; border-radius: 14px; }
.keypad button.soft { color: var(--ink-2); }
.term-note summary { cursor: pointer; color: var(--brand); font-size: .92rem; }
.term-note input { width: 100%; margin-top: 8px; }
.term-note .quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: .8rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rule); background: var(--canvas); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
@media (max-width: 640px) { .term-buttons { grid-template-columns: 1fr; } .term-btn { min-height: 96px; flex-direction: row; } .term-head .big-time { font-size: 3rem; } }

/* Urlaubsplaner */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .85rem; color: var(--ink-2); margin: 0 0 14px; }
.legend form.inline, .legend form.inline label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 2px; vertical-align: middle; }
.sw.urlaub, td.urlaub { background: var(--green); }
.sw.antrag, td.antrag { background: var(--amber); }
.sw.krank, td.krank { background: var(--red); }
.sw.sonst, td.sonst { background: var(--brand); }
.sw.off { background: #e9edf1; }
.sw.thin { background: var(--red-soft); border: 1px solid var(--red); }
.vac-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
table.vac { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
table.vac th, table.vac td { padding: 0; height: 24px; border-bottom: 1px solid var(--rule); border-right: 1px solid #f0f3f6; text-align: center; font-size: .72rem; }
table.vac th { color: var(--ink-2); font-weight: 600; height: auto; padding: 6px 0 4px; line-height: 1.1; }
table.vac th small { font-weight: 400; font-size: .62rem; }
table.vac th.nm, table.vac td.nm { width: 160px; text-align: left; padding: 0 10px; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: var(--card); z-index: 1; }
table.vac td.nm.num, table.vac th.nm:last-child { width: 64px; text-align: right; position: static; overflow: visible; text-overflow: clip; }
table.vac th.off, table.vac td.off { background: #eef1f4; }
table.vac td.urlaub, table.vac td.antrag, table.vac td.krank, table.vac td.sonst { border-right-color: rgba(255,255,255,.35); }
table.vac td.half { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 3px, transparent 3px 6px); }
table.vac th.today { color: var(--brand); font-weight: 800; }
table.vac tr.sum td { height: 20px; font-size: .68rem; color: var(--ink-2); border-bottom: 0; }
table.vac tr.sum td.thin { background: var(--red-soft); color: var(--red); font-weight: 700; }
table.vac td.pad, table.vac th.pad { background: transparent; border: 0; }

/* Wünsche im Dienstplan */
.wish { position: absolute; left: 6px; top: 4px; font-size: .8rem; line-height: 1; }
.wish.frei { color: var(--amber); }
.wish.dienst { color: var(--green); }

/* Tagesansicht Dienstplan (Zeitstrahl) */
table.tl { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.tl th.nm, table.tl td.nm { width: 150px; text-align: left; padding: 8px 10px; vertical-align: middle; }
table.tl th.axis { padding: 0 0 18px; }
table.tl .axis-wrap { position: relative; height: 18px; }
table.tl .axis-wrap .h { position: absolute; transform: translateX(-50%); font-size: .75rem; color: var(--ink-2); font-weight: 500; }
table.tl td.track { padding: 4px 0; border-top: 1px solid var(--line); }
table.tl .lane { position: relative; height: 46px; }
table.tl .lane .grid { position: absolute; top: 0; bottom: 0; border-left: 1px dashed #d9e2ec; }
table.tl .bar { position: absolute; top: 6px; height: 34px; border-radius: 8px; padding: 0 10px; display: flex; align-items: center; gap: 4px; font-size: .82rem; white-space: nowrap; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15,61,94,.12); }
table.tl .bar.off { left: 0; right: 0; background: #f4f6f8; color: var(--ink-2); justify-content: center; }
table.tl .bar.off.krank { background: var(--red-soft); color: #9b2c2c; }
table.tl .tl-add { position: absolute; right: 6px; top: 12px; }
table.tl .lane.occ { height: 28px; }
table.tl .lane.occ .slot { position: absolute; top: 2px; height: 24px; display: grid; place-items: center; font-size: .68rem; background: #eef3f8; border-right: 1px solid #fff; color: var(--ink-2); }
table.tl .lane.occ .slot.thin { background: var(--red-soft); color: #9b2c2c; font-weight: 600; }
table.tl tr.own td { background: #f5f9ff; }

table.stats td.top { background: var(--amber-soft); font-weight: 600; }

/* Rufbereitschaft (1.13.0) */
table.plan td.st-bereitschaft { background: #f6f3ff; }
.shift.oncall { border: 1px dashed #7c5cbf; border-radius: 6px; padding: 2px 5px; margin-bottom: 3px; color: #4a3a7a; }
table.tl .bar.oncall { background: repeating-linear-gradient(45deg, #f6f3ff, #f6f3ff 6px, #ebe4ff 6px, #ebe4ff 12px); border: 1px dashed #7c5cbf; color: #4a3a7a; }

/* 1.22.0: Dienstgang, Prüfhinweise, Terminal mit vier Knöpfen */
.pill.blue { background: var(--brand-soft); color: var(--brand-2); }
.block.dienstgang::before { content: "🚗 "; }
ul.findings li.acked { color: var(--ink-2); }
ul.findings li.acked > .pill { opacity: .6; }
ul.findings li small.ack { color: var(--green); }
ul.findings li .ack-form { flex-basis: 100%; padding-left: 62px; font-size: .88rem; }
ul.findings li .ack-form form { margin-top: 6px; }
.term-buttons.four { grid-template-columns: 1fr 1fr 1fr 1fr; }
.term-buttons.five { grid-template-columns: repeat(5, 1fr); }
.term-btn.zurueck { background: linear-gradient(135deg, #7c8ce0, #5b6fd6); font-size: 1.25rem; }
@media (max-width: 1100px) { .term-buttons.five { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px) { .term-buttons.five { grid-template-columns: 1fr; } }
.term-btn.dienstgang { background: linear-gradient(135deg, #5b6fd6, #3b4fb8); }
@media (max-width: 900px) { .term-buttons.four { grid-template-columns: 1fr 1fr; } }
.schedule-hist td, .schedule-hist th { font-size: .9rem; }

/* 1.24.0: Kontexthilfe */
.help { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 5px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); font-size: .72rem; font-weight: 700; cursor: help; vertical-align: middle; }
label:has(> .help) { position: relative; padding-right: 22px; }
label > .help { position: absolute; right: 0; top: 2px; margin: 0; }
.help:hover, .help:focus { background: var(--brand); color: #fff; outline: none; }

/* Wer ist da?: Vertretung und Sprungziel */
.att small.sub { color: var(--brand-2); }
.att small.sub a { color: inherit; }
.att tr:target { background: var(--brand-soft); outline: 2px solid var(--brand); }
.att tr:target td { color: var(--ink); }

/* Mitarbeiter-Startseite: Meine Woche (1.27.0) */
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekstrip .wday { border: 1px solid var(--rule); border-radius: 10px; padding: 8px 6px; min-height: 92px; font-size: .85rem; background: var(--card); }
.weekstrip .wday.today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.weekstrip .wday.off { background: var(--canvas); }
.weekstrip .wd { font-weight: 600; margin-bottom: 6px; }
.weekstrip .plan { font-variant-numeric: tabular-nums; }
.weekstrip .ist { margin-top: 6px; font-weight: 600; color: var(--green); }
.weekstrip .ist.neg { color: var(--red); }
.weekstrip .pill { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .weekstrip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card.todo { border-left: 4px solid var(--amber); }

/* Admin in Bereichen (1.29.0) */
.tabs.admin-groups { margin-bottom: 6px; }
.tabs.admin-pages { margin-bottom: 18px; }
.tabs.admin-pages a { font-size: .85rem; padding: 5px 12px; background: transparent; box-shadow: none; border: 1px solid var(--rule); }
.tabs.admin-pages a.on { background: var(--brand-soft); color: var(--brand-2); border-color: transparent; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 28px; }
.admin-grid .tile-link { display: flex; flex-direction: column; gap: 6px; min-height: 132px; color: inherit; text-decoration: none; padding: 18px 20px; transition: box-shadow .12s, transform .12s; }
.admin-grid .tile-link:hover, .admin-grid .tile-link:focus-visible { box-shadow: var(--shadow), 0 0 0 2px var(--brand-soft); text-decoration: none; transform: translateY(-1px); outline: none; }
.admin-grid .tile-link h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; color: var(--brand-2); }
.admin-grid .tile-link p { margin: 0; flex: 1; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.admin-grid .tile-link small { display: block; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: .85rem; line-height: 1.5; }
.admin-grid .tile-link small .pill { vertical-align: middle; }
details.inline-actions summary { cursor: pointer; color: var(--brand); font-size: .9rem; list-style: none; }
details.inline-actions summary::-webkit-details-marker { display: none; }

/* Einrichtungsassistent (1.30.0) */
.onb-steps { list-style: none; padding: 0; margin: 0; }
.onb-steps li { border-top: 1px solid var(--rule); padding: 10px 0; }
.onb-steps li:first-child { border-top: 0; }
.onb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.onb-head .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rule); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; color: #fff; flex: 0 0 24px; }
.onb-steps li.done .tick { background: var(--green); border-color: var(--green); }
.onb-steps li.skipped .tick { background: var(--ink-2); border-color: var(--ink-2); }
.onb-steps li.done strong { color: var(--ink-2); }
.onb-steps details { margin: 6px 0 0 32px; }
.onb-steps summary { cursor: pointer; color: var(--brand); font-size: .88rem; }
.onb-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0; font-size: .92rem; }
.onb-info dt { color: var(--ink-2); font-weight: 600; }
.onb-info dd { margin: 0; }
.onb-info dd.example { background: var(--amber-soft); border-radius: 8px; padding: 6px 10px; }

/* Sprachwahl (Anmeldung, Terminal) */
.langbar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0 0; }
.langbar .chip { text-decoration: none; }
.langbar .chip.on, .tabs .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabs .chip { text-decoration: none; }
[dir="rtl"] .langbar { direction: rtl; }

/* Lizenz (1.36.0) */
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--ink-3, #6b7a88); font-size: .9rem; }
dl.kv dd { margin: 0; }
.warning { padding: 10px 14px; border-radius: 10px; background: #fff3cd; color: #664d03; font-weight: 500; }
@media (max-width: 800px) { .grid.two { grid-template-columns: minmax(0, 1fr); } }

/* Mitarbeiter-Startseite: Urlaubskonto / Stunden (1.43.0) */
dl.kv dd.red, dl.kv dd .red { color: var(--red); }
dl.kv dd.green, dl.kv dd .green { color: var(--green); }
/* 1.44.0: Wer ist da? – Vorschau */
.att.week th.today, .att.week td.today { background: var(--brand-soft); }
.att.week th.we, .att.week td.we { color: var(--muted); background: #fafafa; }
.att.week td { font-size: .85rem; }
.att.week td .pill { font-size: .72rem; white-space: nowrap; }
.att.week td:first-child { white-space: nowrap; }
.tabs .chip { margin-right: 4px; }
/* 1.44.0: Urlaubssperre im Planer */
.vac th.sperre, .vac td.sperre, .sw.sperre { background-image: repeating-linear-gradient(135deg, rgba(220, 38, 38, .18) 0 3px, transparent 3px 7px); }
/* 1.45.0: Kenntnisnahme */
.card div.bar { display: inline-block; width: 90px; height: 8px; border-radius: 999px; background: var(--canvas); overflow: hidden; vertical-align: middle; box-shadow: inset 0 0 0 1px var(--rule); }
.card div.bar.big { display: block; width: 100%; height: 12px; }
.card div.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--teal)); }
tr.thin td { color: var(--muted); }
.runde td.p1 { font-weight: 700; }
.vac td.wunsch { background: #e9d5ff; }
.vac td.wunsch.p2 { background: #f3e8ff; }
.vac td.wunsch.p3 { background: #faf5ff; }
.sw.wunsch { background: #e9d5ff; }
/* 1.47.0: begründeter Verstoß */
.findings small.ack.justified { color: #b91c1c; font-weight: 600; }
.findings li.fehler.acked { opacity: .85; }
/* 1.48.0: Arbeitszeitmodelle */
table.models td.acts { white-space: nowrap; font-size: .9rem; }
table.models td.acts form { display: inline; }

/* 1.50.0: Antragsverlauf und Überschneidungen */
strong.red { color: var(--red); }
table.history tr.warn td { background: var(--amber-soft, #fff6e0); }
table tr.first td { background: var(--green-soft, #eaf7ee); }
table tr.me td { font-weight: 600; }
