/* Corporate Design B „Modern & technisch“ (R1.13): Space Grotesk für Überschriften, IBM Plex Sans für Text (OFL, selbst gehostet) */
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-600.woff") format("woff"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/static/fonts/space-grotesk-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/static/fonts/space-grotesk-700.woff") format("woff"); font-weight: 600 900; font-display: swap; }
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #12182b;
  --muted: #4b5466;
  --line: #dfe3ea;
  --accent: #12805c;
  --accent-ink: #ffffff;
  --work: #12805c;
  --work-ink: #0e6a4c;
  --danger-ink: #a8291f;
  --break: #c98a00;
  --break-ink: #7f5600;
  --signal: #ffc53d;
  --tile-work: #12805c;
  --tile-break: #ffc53d;
  --tile-out: #e4e7ec;
  --tile-ink: #12182b;
  --danger: #c8372b;
  --radius: 10px;
  --font-head: "Space Grotesk", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
/* Dunkel ist der Standard; hell nur, wenn data-theme="light" gesetzt ist (Schalter) */
:root:not([data-theme="light"]) { --bg: #0d1220; --surface: #151c2e; --text: #e8ecf3; --muted: #a6aec0; --line: #273149; --accent: #5fd3a4; --accent-ink: #0b1a14; --work: #5fd3a4; --break: #ffc53d; --break-ink: #ffc53d; --tile-work: #12805c; --tile-break: #ffc53d; --tile-out: #2a3247; --tile-ink: #e9ecf2; --danger: #ff7b6e; --work-ink: #5fd3a4; --danger-ink: #ff7b6e; --work-btn-ink: #0b2416; color-scheme: dark; }
h1, h2, h3, .brand, .timer, .kiosk-clock, .kiosk-card h1, .month-label, .stats .v { font-family: var(--font-head); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
[hidden] { display: none !important; }
h1, h2 { margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }

.lic-banner { padding: 12px 20px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; border-bottom: 1px solid var(--line); }
.lic-banner.info { background: #e8f0fe; color: #1a3d8f; }
.lic-banner.warning { background: #fff1d6; color: #7a4500; }
.lic-banner.critical { background: #fde7e4; color: #8f1d12; }
.lic-banner span:empty { display: none; }
/* Dunkel ist der Standard; hell nur, wenn data-theme="light" gesetzt ist (Schalter) */
:root:not([data-theme="light"]) .lic-banner.info { background: #16264a; color: #b7cbff; }
:root:not([data-theme="light"]) .lic-banner.warning { background: #3a2a10; color: #f6c97a; }
:root:not([data-theme="light"]) .lic-banner.critical { background: #3d1a17; color: #ffb3a8; }
.banner { background: var(--accent); color: var(--accent-ink); text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.brand .dot { width: 22px; height: 22px; background: url('/static/favicon.svg') center / contain no-repeat; }
.brand { letter-spacing: -0.02em; }
.timer { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }

/* Login */
.login { min-height: 90vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.login-card .brand { margin-bottom: 8px; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.big { font-size: 18px; padding: 16px 28px; border-radius: 14px; min-width: 160px; }
.btn.work { background: var(--work); border-color: var(--work); color: var(--work-btn-ink, #fff); }
.btn.pause { background: var(--break); border-color: var(--break); color: #1a1000; }
.btn.small { padding: 5px 10px; font-size: 13px; }

.error { color: var(--danger); min-height: 1em; margin: 0; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }

/* Layout */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; }
.tabs button { font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.tabs button.active { background: var(--bg); color: var(--text); }
.user { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.content { max-width: 860px; margin: 24px auto; padding: 0 16px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.row h2 { margin: 0; }

/* Stempeluhr */
.clock { text-align: center; padding: 32px 20px; }
.state { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.state.working { background: color-mix(in srgb, var(--work) 15%, transparent); color: var(--work); }
.state.break { background: color-mix(in srgb, var(--break) 18%, transparent); color: var(--break-ink, var(--break)); }
.timer { font-size: clamp(48px, 12vw, 76px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; margin: 12px 0 4px; }
.sub { color: var(--muted); }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 24px 0 8px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.timeline li:last-child { border-bottom: 0; }
.timeline .tag { font-weight: 600; }
.timeline .tag.work { color: var(--work); }
.timeline .tag.break { color: var(--break-ink, var(--break)); }
.empty { color: var(--muted); }

/* Monat */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.stats div { background: var(--bg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; }
.stats .k { font-size: 12px; color: var(--muted); }
.stats .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 6px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.pill.working { color: var(--work); }
.pill.break { color: var(--break-ink, var(--break)); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .stats .v { font-size: 18px; }
  .table th:nth-child(2), .table td:nth-child(2), .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  #tab-users .table th:nth-child(2), #tab-users .table td:nth-child(2) { display: none; }
}

/* ---------- v0.2: Dialog, Listen, Hinweise ---------- */
.brand .company-name { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 4px; }
.brand .company-name:not(:empty)::before { content: "·"; margin-right: 6px; }
.user select { font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.tabs { flex-wrap: wrap; }
.month-label { min-width: 170px; text-align: center; margin: 0; }
.row.end { justify-content: flex-end; }
.col { flex-direction: column; align-items: stretch !important; }
.timeline li.col { display: flex; gap: 6px; }
.history { display: grid; gap: 8px; padding: 8px 0 4px 12px; border-left: 3px solid var(--line); margin-left: 4px; }
.history .rev { display: flex; flex-direction: column; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.unreadable { color: var(--muted); font-style: italic; }
.is-locked input:disabled { cursor: not-allowed; }
.pill.badge { margin-left: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--work-ink); }
.pill.warn { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
tr.dim td { opacity: 0.55; }
.btn.danger, .btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
/* Dunkles Schema: --danger ist dort hell, weiße Schrift hätte nur 2,5:1 (WCAG 1.4.3) */
:root:not([data-theme="light"]) .btn.danger, :root:not([data-theme="light"]) .btn.danger:hover { color: #1a0a08; }
.danger-text { color: var(--danger); }
.features { display: grid; gap: 10px; margin: 8px 0 16px; }
.feature.soon span { color: var(--muted); }
form.card > label { margin-bottom: 14px; }
form.card h3 { margin: 18px 0 4px; font-size: 15px; }

.dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--text); width: min(520px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(16, 23, 42, 0.45); }
.dialog-inner { padding: 22px; display: flex; flex-direction: column; gap: 12px; max-height: 85vh; overflow-y: auto; }
.dialog-inner h2 { margin: 0 0 4px; }
.dialog-inner label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.dialog-inner label.check { flex-direction: row; align-items: center; color: var(--text); font-size: 15px; }
.checklist { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.checklist legend { font-size: 13px; color: var(--muted); padding: 0 4px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
#demo-hint { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#demo-hint p { width: 100%; margin: 4px 0 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) {
  .topbar { gap: 10px; }
  .table { display: block; overflow-x: auto; }
  .user #user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* v0.3: Zeitkonto, Pausenregeln, Monatsabschluss */
.rule { gap: .5rem; align-items: center; flex-wrap: wrap; }
.rule input.num, input.num { width: 5.5rem; flex: none; }
.closed-note { background: var(--warn-bg, #fff4e0); border-radius: 10px; padding: .6rem .9rem; margin: .5rem 0; }
td.neg, .stats .neg .v { color: var(--danger-ink); }
.stats .pos .v { color: var(--accent); }
tr.dim td { opacity: .6; }
ul.plain { list-style: none; padding: 0; margin: .4rem 0 .8rem; display: grid; gap: .3rem; }
.danger-text { color: var(--danger-ink); }

/* v0.4: Abwesenheiten, Kalender */
.dot-sm { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); vertical-align: middle; flex: none; }
.dot-sm.pend { background: repeating-linear-gradient(45deg, var(--muted) 0 2px, transparent 2px 4px); border: 1px solid var(--muted); }
.pill.hol { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--work-ink, var(--accent)); }
.pill.abs { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.pill.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
td .pill + .pill { margin-left: 4px; }
.small { font-size: 13px; }
input.feed { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; margin: 6px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; }
.legend .row { gap: 6px; }
.cal-wrap { overflow-x: auto; margin-top: 12px; -webkit-overflow-scrolling: touch; }
table.cal { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 12px; }
table.cal th, table.cal td { border-bottom: 1px solid var(--line); text-align: center; padding: 0; height: 30px; min-width: 22px; }
table.cal thead th { font-weight: 600; color: var(--muted); padding: 4px 0; }
table.cal thead th span { display: block; line-height: 1.2; }
table.cal th.who { text-align: left; padding: 0 10px 0 0; min-width: 120px; max-width: 180px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; color: var(--text); font-weight: 600; position: sticky; left: 0; background: var(--surface); z-index: 1; }
table.cal .we { background: color-mix(in srgb, var(--muted) 9%, transparent); }
table.cal .hol { background: color-mix(in srgb, var(--accent) 11%, transparent); }
table.cal thead th.hol { color: var(--work-ink); }
table.cal .today { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
table.cal thead th.today { color: var(--work-ink); }
.blk { display: block; height: 18px; margin: 0 1px; border-radius: 4px; background: var(--c, var(--accent)); }
.blk.half { width: 50%; }
.blk.pending { background: repeating-linear-gradient(45deg, var(--c) 0 3px, color-mix(in srgb, var(--c) 35%, transparent) 3px 6px); opacity: .85; }
.blk.cvb { background: repeating-linear-gradient(-45deg, var(--accent) 0 2px, transparent 2px 5px); opacity: .5; }
tr.strong-row td { background: color-mix(in srgb, var(--accent) 5%, transparent); }

/* v0.5: App, offline */
.offline-note { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 14px;
  background: color-mix(in srgb, var(--break) 14%, transparent); color: var(--text); }
.user-btn { font-weight: 500; color: var(--muted); }
.user-btn.active { color: var(--text); background: var(--bg); }

/* v0.5: Anmeldung, Sicherheit */
.login-alt { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.login-alt .btn[hidden] { display: none; }
.warn-card { border-color: color-mix(in srgb, var(--break) 50%, var(--line)); background: color-mix(in srgb, var(--break) 8%, var(--surface)); }
img.qr { width: 200px; height: 200px; background: #fff; padding: 6px; border-radius: 8px; align-self: center; }
code.secret { font-size: 15px; letter-spacing: .05em; user-select: all; }
pre.codes { font-size: 15px; line-height: 1.7; columns: 2; background: var(--bg); padding: 10px 14px; border-radius: 8px; user-select: all; }
.col { display: flex; flex-direction: column; gap: 8px; }

/* v0.5: Barrierefreiheit (WCAG 2.2 AA) */
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; margin: 2px; flex: none; accent-color: var(--accent); }
label.check { min-height: 32px; }
/* Kopfzeile: Bereiche in einer Zeile, bei Platzmangel waagerecht scrollbar statt umbrechen */
.topbar { flex-wrap: nowrap; }
.tabs { flex-wrap: nowrap; overflow-x: auto; min-width: 0; flex: 1 1 auto; justify-content: flex-start; justify-content: safe center; scrollbar-width: thin; }
.tabs button { white-space: nowrap; flex: none; }
.brand, .user { flex: none; }
@media (max-width: 1400px) { .brand .company-name { display: none; } }
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; }
  .tabs { order: 3; flex-basis: 100%; }
}
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 8px; }

/* v0.6: Projekte, Außer Haus, Reise */
.picker { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; margin: 14px 0 4px; }
.picker label { min-width: 180px; text-align: left; }
.tag.away { color: var(--accent); }
.tag.travel { color: var(--break-ink, var(--break)); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.report tr.group th { text-align: left; font-size: 15px; padding-top: 14px; }
table.report tfoot th, table.report tfoot td { border-top: 2px solid var(--text); padding-top: 8px; }
small.proj { font-weight: 500; }
@media (max-width: 1400px) { .tabs button { padding: 8px 10px; } .tabs { gap: 2px; } }
.state.working, .pill.working { color: var(--work-ink, var(--work)); }
.pill.warn, .pill.danger { color: var(--danger-ink, var(--danger)); }
table.table:focus-visible { outline-offset: -2px; }
.btn.mobile { background: var(--surface); border: 2px solid var(--work); color: var(--work-ink, var(--work)); }
.pill.mob { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); margin-left: 6px; }

/* v0.7: Kiosk-Modus */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kiosk-body { min-height: 100vh; }
.kiosk-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.kiosk-clock { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kiosk { max-width: 980px; margin: 24px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.kiosk:focus { outline: none; }
.kiosk-hint { text-align: center; color: var(--muted); font-size: 18px; margin: 0; }
.kiosk input[type=search] { font-size: 20px; padding: 14px 16px; }
.kiosk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kiosk-person { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; min-height: 92px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.kiosk-person .kp-name { font-size: 20px; font-weight: 700; }
.kiosk-person .kp-state { font-size: 14px; color: var(--muted); }
.kiosk-person.working { border-left: 6px solid var(--work); }
.kiosk-person.break { border-left: 6px solid var(--break); }
.kiosk-card { max-width: 560px; width: 100%; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.kiosk-card h1 { font-size: 30px; margin: 0; }
.kiosk-card input[type=password], .kiosk-card input[name=code] { font-size: 30px; text-align: center; letter-spacing: .3em; max-width: 280px; }
.kiosk-pad { display: grid; grid-template-columns: repeat(3, 88px); gap: 10px; }
.kiosk-key { height: 72px; font-size: 26px; font-weight: 700; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.kiosk-key.ok { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* Kiosk auf dem Handy: kein Auto-Zoom (iOS zoomt Felder unter 16px) und kein Doppeltipp-Zoom auf Tasten und Kacheln */
.kiosk-body input, .kiosk-body select, .kiosk-body textarea { font-size: max(16px, 1em); }
.kiosk-body button, .kiosk-body .btn, .kiosk-body .kiosk-grid, .kiosk-body .kiosk-pad { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.kiosk-key, .kiosk-person { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.kiosk-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.kiosk-actions .btn.big { min-width: 180px; min-height: 72px; font-size: 22px; }
.kiosk-figures { display: grid; grid-template-columns: auto auto; gap: 8px 24px; font-size: 22px; margin: 6px 0; }
.kiosk-figures dt { color: var(--muted); text-align: right; }
.kiosk-figures dd { margin: 0; font-weight: 700; text-align: left; font-variant-numeric: tabular-nums; }
.kiosk-result.in h1 { color: var(--work-ink, var(--work)); }
code.big-code { font-size: 32px; letter-spacing: .15em; align-self: center; }

/* v0.7: API-Doku, OAuth */
.docs { max-width: 980px; }
.docs pre.code, pre.code { background: var(--bg); padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; }
.endpoint { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.endpoint h3 { font-size: 16px; margin: 0 0 6px; }
.verb { display: inline-block; min-width: 56px; text-align: center; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--accent); }
.verb.post { color: var(--work-ink, var(--work)); }

/* Datenübernahme und Webhooks */
.grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem 1rem; }
.error-row td { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.break-all { word-break: break-all; }
.notice { color: var(--work-ink); font-weight: 600; }
.pill.law { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger-ink); }
.labor-hints .hint { margin: .4rem 0 0; font-weight: 600; }
.notice-warn { border-left: 4px solid var(--break); padding: .4rem .7rem; background: color-mix(in srgb, var(--break) 8%, transparent); }
.filters { flex-wrap: wrap; gap: .5rem 1rem; margin: .5rem 0 1rem; }
.filters input[type=search] { min-width: 16rem; flex: 1; }
label.inline { display: flex; align-items: center; gap: .4rem; }
.pill.ok { background: color-mix(in srgb, var(--work) 14%, var(--surface)); color: var(--work-ink); }
.levels li { margin: .3rem 0; }
.integrity:empty { display: none; }
.integrity { margin-bottom: 1rem; }

/* v0.9: Woche und Konten */
.table.week tr.current th, .table.week tr.current td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.table.week tfoot th, .table.week tfoot td { border-top: 2px solid var(--line); font-weight: 600; }
.spark { display: block; }
.spark .axis { stroke: var(--line); stroke-width: 1; }
.spark .pos { fill: var(--work); }
.spark .neg { fill: var(--danger); }
.table.accounts td, .table.accounts th { vertical-align: middle; }

.table.week tr.future td { color: var(--muted); }
.table.plans tr.superseded td { color: var(--muted); }
.row.wrap { flex-wrap: wrap; }

/* v0.9: Kiosk-Dashboard (R9.2) */
.kiosk-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.kiosk-person { flex-direction: row; align-items: center; gap: 14px; text-align: left; }
.kiosk-person .kp-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kiosk-person .kp-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 18px; background: rgba(255, 255, 255, .25); }
.kiosk-person.kp-working { background: var(--tile-work); color: #fff; border: 0; }
.kiosk-person.kp-working .kp-state { color: #fff; }
.kiosk-person.kp-break { background: var(--tile-break); color: #12182b; border: 0; }
.kiosk-person.kp-break .kp-state { color: #12182b; }
.kiosk-person.kp-out { background: var(--tile-out); color: var(--tile-ink); border: 0; }
.kiosk-person.kp-out .kp-state { color: var(--tile-ink); }
.kiosk-person.kp-out .kp-avatar, .kiosk-person.kp-neutral .kp-avatar { background: var(--surface); color: var(--text); }
.kiosk-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; color: var(--muted); font-size: 16px; }
.kiosk-legend span { display: inline-flex; align-items: center; gap: 8px; }
.kiosk-legend .lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.kiosk-legend .lg.working { background: var(--tile-work); }
.kiosk-legend .lg.break { background: var(--tile-break); }
.kiosk-legend .lg.out { background: var(--tile-out); border: 1px solid var(--line); }
.kiosk-infos { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.kiosk-infos .btn { min-height: 56px; min-width: 150px; font-size: 18px; }
.kiosk-actions .btn.leave { background: var(--surface); border: 2px solid var(--text); color: var(--text); }
.kiosk-table { font-size: 18px; width: 100%; }
.kiosk-person.kp-working .kp-avatar { background: rgba(0, 0, 0, .25); }
.kiosk-form { text-align: left; align-items: stretch; }
.kiosk-form h1 { text-align: center; }
.kiosk-field { display: flex; flex-direction: column; gap: 6px; font-size: 18px; }
.kiosk-field select, .kiosk-field input { font-size: 20px; min-height: 52px; }
.kiosk-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kiosk-msg { font-size: 18px; margin: 0; }
.kiosk-msg.ok { color: var(--work-ink, var(--work)); font-weight: 600; }

/* ------------------------------------------------ Schichtplan (v0.10, Beta) */
.content.wide { max-width: 1240px; }
.table-wrap { overflow-x: auto; }
.shifts .shift-checks { margin: 8px 0 16px; }
.shifts .shift-checks h3 { font-size: 15px; margin: 0 0 6px; }
.shifts .shift-checks ul { margin: 0; padding: 0; display: grid; gap: 4px; }
.ok-text { color: var(--work-ink, var(--work)); font-weight: 600; }
.shift-grid { min-width: 900px; table-layout: fixed; }
.shift-grid thead th:first-child { width: 150px; }
.shift-grid thead th:last-child { width: 96px; }
.shift-grid td.shift-cell { vertical-align: top; padding: 6px 4px; }
.shift-grid tbody th { font-size: 13px; color: var(--text); }
.shift-cell > * + * { margin-top: 4px; }
.shift-chip { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: center; width: 100%; text-align: left;
  font: inherit; font-size: 12.5px; line-height: 1.3; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--accent)); border-radius: 8px; padding: 4px 6px; }
.shift-chip .name { font-weight: 600; }
.shift-chip .time { grid-column: 2; font-variant-numeric: tabular-nums; }
.shift-chip .note { grid-column: 1 / -1; }
button.shift-chip { cursor: pointer; }
button.shift-chip:hover { border-color: var(--text); }
.shift-cell .add { width: 100%; justify-content: center; color: var(--muted); padding: 2px 6px; min-height: 28px; }
.shift-grid tfoot th, .shift-grid tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-size: 12.5px; padding: 6px 4px; }
.shift-grid tfoot .btn { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; padding: 4px 6px; font-size: 12.5px; }
.cover.under, .cover.under .btn { color: var(--danger-ink, var(--danger)); font-weight: 600; }
.cover.ok, .cover.ok .btn { color: var(--work-ink, var(--work)); }
.cover.over, .cover.over .btn { color: var(--break-ink, var(--muted)); }
.shift-list { display: none; }
.shift-list section { border-top: 1px solid var(--line); padding: 10px 0; }
.shift-list h3 { font-size: 15px; margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.shift-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.shift-list li .shift-chip { width: auto; }
.shift-list .cover { margin-right: 10px; }
@media (max-width: 760px) {
  .shift-wrap { display: none; }
  .shift-list { display: block; }
}
.timeline.my-shifts li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 7.5em 11em; gap: 8px; align-items: center; }
.timeline.my-shifts li > span:last-child { justify-content: flex-end; }
.shift-chip.standby { border-style: dashed; border-left-style: solid; }
.shift-chip .kind { font-size: 11.5px; color: var(--muted); }
.swaps li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.swaps li > div { flex: 1 1 320px; }
.swaps li > ul { flex-basis: 100%; margin: 0; }
.duty-row { margin: 0 0 12px; gap: 8px 12px; }
.duty-row input { width: 5em; }
.duty-row p { flex-basis: 100%; margin: 0; }
@media (max-width: 600px) {
  .timeline.my-shifts li { grid-template-columns: 1fr auto; }
  .timeline.my-shifts li > span:last-child { grid-column: 1 / -1; justify-content: flex-start; }
}
/* v0.10.1: Hilfe-Links; Tabs ab mittlerer Breite in eigener Zeile, damit nichts abgeschnitten wird */
a.help-link { color: var(--work-ink, var(--accent)); font-weight: 600; text-underline-offset: 3px; }
#help-link { text-decoration: none; }
@media (max-width: 1760px) {
  .topbar { flex-wrap: wrap; row-gap: 4px; }
  .tabs { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .user { margin-left: auto; }
}

/* v1.0.1: Pflichtfelder, große PIN-Anzeige, Menü auf dem Handy statt scrollender Leiste */
.req { color: var(--danger-ink, var(--danger)); font-weight: 700; }
.required-legend { margin: 0 0 6px; }
.pin-big { font-size: 40px; font-weight: 700; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; margin: 8px 0; }
.block { display: block; }
.menu-toggle { display: none; }
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 6px; order: 2; margin-left: auto; font-weight: 600; }
  .user { order: 2; margin-left: 0; }
  .tabs { display: none; order: 4; flex-basis: 100%; flex-direction: column; overflow: visible; gap: 2px; padding-top: 6px; border-top: 1px solid var(--line, rgba(128,128,128,.3)); }
  .topbar.menu-open .tabs { display: flex; }
  .tabs button { width: 100%; text-align: left; padding: 12px 14px; font-size: 16px; }
}
td.times div { white-space: nowrap; }

.kp-pin { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.kiosk-demo { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); font-size: 14px; }

.company-logo { height: 32px; max-width: 120px; width: auto; object-fit: contain; border-radius: 6px; vertical-align: middle; margin-right: 8px; }
.kiosk-count { position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 14px 22px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 22px; font-weight: 700; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.logo-preview { max-height: 64px; max-width: 160px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--bg); }

.theme-toggle { min-width: 44px; min-height: 44px; padding: 0 10px; font-size: 20px; line-height: 1; cursor: pointer; }
.kiosk-right { display: flex; align-items: center; gap: 12px; }
.login-card .brand .theme-toggle { margin-left: auto; }

/* v1.3 (V14): Tresor-Assistent, Statusseite, Support-Zugang, Diagnose */
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.steps li { display: inline-flex; align-items: center; gap: 6px; }
.steps li.current { color: var(--text); font-weight: 600; }
.steps li.done { color: var(--work-ink, var(--accent)); }
.step-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor; font-size: 12px; font-variant-numeric: tabular-nums; }
.steps li.current .step-no { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wizard h2:focus { outline: none; }
.wizard h2:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
ul.bullets { margin: 0 0 8px; padding-left: 1.2rem; display: grid; gap: 6px; }
ul.bullets li.strong { font-weight: 600; }
.recovery-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 20px; letter-spacing: .08em; user-select: all; color: var(--text); }
.recovery-key .grp { white-space: nowrap; }
.recovery-sheet { display: none; }
dl.facts { display: grid; grid-template-columns: minmax(10rem, 18rem) 1fr; gap: 6px 20px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cred { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
@media (max-width: 700px) { dl.facts { grid-template-columns: 1fr; gap: 0; } dl.facts dd { margin-bottom: 8px; } .recovery-key { font-size: 17px; } }

/* Druckblatt für den Wiederherstellungsschlüssel: nur dieses Blatt, schwarz auf weiß, unabhängig vom Farbschema */
@media print {
  body.print-key { background: #fff; color: #000; }
  body.print-key > *:not(.recovery-sheet) { display: none !important; }
  body.print-key .recovery-sheet { display: block; max-width: 17cm; margin: 2cm auto; color: #000; background: #fff; font-family: system-ui, sans-serif; font-size: 12pt; line-height: 1.5; }
  .recovery-sheet h1 { font-size: 20pt; margin: 0 0 12pt; color: #000; }
  .recovery-sheet .recovery-key { display: flex; flex-wrap: wrap; gap: 8pt 16pt; margin: 14pt 0; padding: 12pt 14pt; border: 1.5pt solid #000; border-radius: 0; background: #fff; color: #000; font-size: 18pt; user-select: auto; }
  .recovery-sheet .sheet-line { margin-top: 22pt; }
}
