/* MF SchichtWerk · Gestaltung nach MF-Markenleitfaden 4.0.14 (helle Anwendungswelt, Kopfzeile E47) */
@font-face { font-family: 'Cinzel'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/cinzel-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/cinzel-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #F4F6F9;            /* Arbeitsfläche */
  --card: #FFFFFF;          /* Karten */
  --navy: #11263F;          /* MF Dunkelblau */
  --gold: #B88A45;          /* Champagnergold */
  --gold-dark: #745327;     /* Dunkles Gold (Schrift auf Weiß) */
  --cyan: #65C4DA;          /* MF Cyan */
  --info: #18809A;          /* Cyan-Aktion, kontrastreich auf Weiß */
  --text: #172A43;          /* Text Dunkelblau */
  --tile: #2A5078;          /* MF Kachelblau */
  --muted: #526377;         /* Grauublau: Menüpunkte und Nebentexte */
  --head: #16314F;          /* Programmname */
  --line: #DCE2EA;
  --gold-line: rgba(184, 138, 69, .5);
  --warm: #F9F6EF;
  --ok-bg: #EEF8F2; --ok-line: #8FD0A9; --ok-text: #1B5E3A;
  --info-bg: #EDF9FC; --info-line: #9DD3E3; --info-text: #145E73;
  --warn-bg: #FFEBE0; --warn-line: #F0A27A; --warn-text: #8F3410;
  --err-bg: #FFF0F0; --err-line: #E4A3A8; --err-text: #8A1F2B;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px;
  --header-h: 138px; --logo-h: 112px; --master-h: 104px; --prog-size: 32px;
  --radius: 16px;
  --font-head: 'Cinzel', Georgia, serif; --font-body: 'Inter', system-ui, sans-serif;
}
@media (max-width: 1100px) { :root { --header-h: 100px; --logo-h: 80px; --master-h: 78px; --prog-size: 27px; } }
@media (max-width: 700px)  { :root { --header-h: 88px; --logo-h: 68px; --master-h: 54px; --prog-size: 20px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font-body); min-height: 100vh; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); margin: 0; font-weight: 600; font-variant-caps: small-caps; letter-spacing: .01em; line-height: 1.2; }
h1 { font-size: clamp(26px, 3.4vw, 38px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 var(--s1); }
a { color: var(--info); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Kopfzeile (E47) ---------- */
.appheader { position: relative; height: var(--header-h); background: var(--hdr-bg, #fff); border-bottom: 2px solid var(--gold-line); display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s3); overflow: hidden; }
.appheader .thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.appheader .tile { position: relative; z-index: 1; height: var(--logo-h); width: var(--logo-h); flex: none; display: block; cursor: pointer; border-radius: 22%; }
.appheader .tile img { width: 100%; height: 100%; display: block; }
.appheader .tile.wide { width: calc(var(--logo-h) * 1.7); height: var(--logo-h); border-radius: 0; }
.appheader .tile.wide img { object-fit: contain; }
.appheader .titles { position: relative; z-index: 1; min-width: 0; flex: 1; }
.progname { font: 600 var(--prog-size)/1.1 'Cinzel', serif; color: var(--head); font-variant-caps: small-caps; white-space: nowrap; margin: 0; }
.tagline { font: 600 clamp(9px, 1.15vw, 15px)/1.3 'Cinzel', serif; color: var(--gold); letter-spacing: .09em; margin-top: 6px; white-space: nowrap; text-transform: uppercase; }
.master { position: relative; z-index: 1; height: var(--master-h); background: transparent; padding: 0; flex: none; display: flex; align-items: center; } /* Monogramm mit durchsichtigem Hintergrund, steht frei auf der Kopfzeile */
.master img { height: 100%; width: auto; display: block; }
@media (max-width: 700px) { .appheader { padding: 0 12px; gap: 12px; } .master { padding: 0; } .tagline { margin-top: 4px; } }

/* ---------- Gerüst ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); background: linear-gradient(90deg, #fff 248px, var(--bg) 248px); }
.sidebar { background: #fff; border-right: 1px solid var(--gold-line); padding: var(--s2); display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; border: 1px solid transparent; }
.nav a svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a[aria-current="page"] { background: var(--warm); border-color: var(--gold-line); color: var(--text); font-weight: 600; }
.nav .group { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; padding: 14px 12px 4px; }
.nav .badge { margin-left: auto; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidefoot { margin-top: auto; padding-top: var(--s2); }
.sidefoot hr { border: 0; border-top: 1px solid var(--gold-line); margin: var(--s2) 0; }
.sidefoot .mono { display: block; margin: 0 auto var(--s1); width: 96px; }
.sidefoot .who { border: 1px solid var(--gold-line); border-radius: 14px; padding: 12px; text-align: center; font-size: 12px; color: var(--muted); }
.sidefoot .who b { display: block; color: var(--text); font-size: 14px; margin: 2px 0; }
.sidefoot .who .btn { width: 100%; margin-top: 8px; min-height: 40px; font-size: 13px; }
.sidefoot .who .linkbtn { display: inline-block; margin-top: 8px; font-size: 12px; background: none; border: 0; color: var(--gold-dark); text-decoration: underline; cursor: pointer; padding: 6px; min-height: 32px; }
.main { padding: var(--s3); max-width: 1320px; width: 100%; min-width: 0; }
.mobilebar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .sidebar { position: fixed; z-index: 60; inset: 0 auto 0 0; width: 280px; transform: translateX(-102%); transition: transform .2s; box-shadow: 0 0 40px rgba(17, 38, 63, .25); max-height: none; height: 100%; }
  body.menu-open .sidebar { transform: none; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(17, 38, 63, .4); z-index: 55; }
  body.menu-open .scrim { display: block; }
  .nav a { font-size: 12px; }
  .mobilebar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .mobilebar .btn { min-height: 44px; }
  .mobilebar .title { font: 600 18px 'Cinzel', serif; font-variant-caps: small-caps; }
  .main { padding: var(--s2); }
}

/* ---------- Seiten ---------- */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.eyebrow { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 16px; margin-top: 4px; }
.grid { display: grid; gap: var(--s3); }
.grid.cols2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.cols3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--s2); }
.row { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); box-shadow: 0 1px 2px rgba(17, 38, 63, .04); }
.card.gold { border-color: var(--gold-line); }
.card.info { border-color: var(--info-line); }
.card h2, .card h3 { margin-bottom: var(--s1); }
.card .eyebrow + h2, .card .eyebrow + h3 { margin-top: 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font: 600 30px/1.1 'Cinzel', serif; color: var(--navy); }
.kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.kpi .d { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Schaltflächen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 12px; border: 1px solid var(--gold-line); background: #fff; color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s; }
.btn:hover { background: var(--warm); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #1b3a5c; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.gold:hover { background: #a67a38; }
.btn.info { background: var(--info); border-color: var(--info); color: #fff; }
.btn.danger { border-color: var(--err-line); color: var(--err-text); }
.btn.danger:hover { background: var(--err-bg); }
.btn.sm { min-height: 36px; padding: 4px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 72px; font-size: 20px; border-radius: 18px; width: 100%; }
.btn.icon { padding: 8px; min-width: 44px; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Formulare ---------- */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea, input.in, select.in { min-height: 44px; border: 1px solid #C6CFDA; border-radius: 12px; padding: 8px 12px; background: #fff; color: var(--text); font-size: 16px; text-transform: none; letter-spacing: 0; font-weight: 400; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field .hint { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; color: var(--muted); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s2); }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--navy); flex: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
label.chip { cursor: pointer; min-height: 36px; }
label.chip input { accent-color: var(--navy); }
.seg { display: inline-flex; border: 1px solid var(--gold-line); border-radius: 12px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; min-height: 40px; padding: 6px 14px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* ---------- Rückmeldungen ---------- */
.msg { display: flex; gap: 12px; align-items: flex-start; border: 1px solid; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.msg b { display: block; }
.msg.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-text); }
.msg.info { background: var(--info-bg); border-color: var(--info-line); color: var(--info-text); }
.msg.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.msg.err { background: var(--err-bg); border-color: var(--err-line); color: var(--err-text); }
.msg .ic { width: 24px; height: 24px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
#toasts .msg { box-shadow: 0 8px 24px rgba(17, 38, 63, .18); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; }
.pill.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-text); }
.pill.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.pill.err { background: var(--err-bg); border-color: var(--err-line); color: var(--err-text); }
.pill.info { background: var(--info-bg); border-color: var(--info-line); color: var(--info-text); }
.pill.gray { background: #F0F2F6; border-color: var(--line); color: var(--muted); }

/* ---------- Dialoge ---------- */
dialog { border: 1px solid var(--gold-line); border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 24px 60px rgba(17, 38, 63, .3); color: var(--text); }
dialog::backdrop { background: rgba(17, 38, 63, .5); }
dialog .dhead { padding: var(--s3) var(--s3) 0; }
dialog .dbody { padding: var(--s2) var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
dialog .dfoot { padding: var(--s2) var(--s3) var(--s3); display: flex; gap: var(--s1); justify-content: flex-end; flex-wrap: wrap; }
dialog form { margin: 0; }

/* ---------- Tabellen ---------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { border-collapse: collapse; width: 100%; font-size: 15px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px; border-bottom: 1px solid #EEF1F5; vertical-align: middle; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: 0; }
.neg { color: var(--err-text); } .pos { color: var(--ok-text); }
.bar { height: 10px; background: #E8ECF2; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--tile); border-radius: 6px; }
.bar.gold > i { background: var(--gold); }
.bar.warn > i { background: #C9892E; }
.bar.err > i { background: #B23A48; }

/* ---------- Dienstplan ---------- */
.planbar { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; margin-bottom: var(--s2); }
.planbar .weeklabel { font: 600 18px 'Cinzel', serif; font-variant-caps: small-caps; min-width: 220px; text-align: center; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.plan table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; table-layout: fixed; }
.plan th { background: #fff; padding: 10px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); text-align: center; position: sticky; top: 0; }
.plan th.today { color: var(--gold-dark); background: var(--warm); }
.plan th .dd { display: block; font: 600 20px 'Cinzel', serif; color: var(--text); letter-spacing: 0; text-transform: none; }
.plan th.rowh, .plan td.rowh { width: 150px; text-align: left; padding: 10px 12px; position: sticky; left: 0; background: #fff; z-index: 2; border-right: 1px solid var(--line); }
.plan td { vertical-align: top; padding: 6px; border-bottom: 1px solid #EEF1F5; border-right: 1px solid #F2F4F8; min-height: 64px; height: 76px; }
.plan th.holiday, .plan td.holiday { background: var(--warm); }
.hname { display: block; color: var(--gold-dark); font-weight: 600; line-height: 1.2; }
.plan td.rest { background: repeating-linear-gradient(135deg, #F7F8FA, #F7F8FA 8px, #F1F3F7 8px, #F1F3F7 16px); }
.plan td.todaycol { background: #FFFDF8; }
.plan .rn { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.plan .rn .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.plan .rsub { font-size: 12px; color: var(--muted); }
.shift { display: block; width: 100%; text-align: left; margin: 0 0 4px; padding: 6px 8px 6px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); border-left: 5px solid var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); cursor: pointer; font-size: 13px; line-height: 1.3; }
.shift:hover { background: color-mix(in srgb, var(--c) 18%, #fff); }
.shift .tm { font-weight: 700; font-variant-numeric: tabular-nums; display: block; }
.shift .nm { color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift.open { border-style: dashed; background: #fff; }
.shift.mine { box-shadow: 0 0 0 2px var(--gold); }
.shift.chg { outline: 2px dotted var(--info); outline-offset: 1px; }
.shift .badge-chg { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--info-bg); color: var(--info-text); border: 1px solid var(--info-line); vertical-align: 1px; }
.publishbar { margin-top: -6px; }
.shift .w { display: inline-block; margin-left: 4px; font-weight: 700; }
.shift .w { font-size: 15px; line-height: 1; }
.shift .w.error { color: #C0182E; } .shift .w.warn { color: #E04E12; } .shift .w.info { color: var(--info); }
.shift.has-error { border-color: #C0182E; box-shadow: 0 0 0 1px #C0182E inset; }
.shift.has-warn { border-color: #E04E12; box-shadow: 0 0 0 1px #E04E12 inset; }
.addcell { width: 100%; min-height: 28px; border: 1px dashed transparent; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; opacity: 0; }
.plan td:hover .addcell, .addcell:focus-visible { opacity: 1; border-color: var(--line); }
.absence { font-size: 12px; background: #F0F2F6; border-radius: 8px; padding: 2px 8px; color: var(--muted); display: block; margin-bottom: 4px; }
.daylist { display: none; flex-direction: column; gap: var(--s2); }
.daycard h3 { display: flex; justify-content: space-between; align-items: baseline; }
@media (max-width: 760px) { .plan { display: none; } .daylist { display: flex; } .planbar .weeklabel { min-width: 0; flex: 1; } }
.legend { display: flex; gap: var(--s2); flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: var(--s2); }

/* ---------- Aufgaben ---------- */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: 12px; min-height: 52px; cursor: pointer; border: 1px solid transparent; }
.task:hover { background: var(--bg); }
.task input { width: 26px; height: 26px; accent-color: var(--navy); margin-top: 1px; flex: none; }
.task .tt { flex: 1; min-width: 0; }
.task.done .tt b { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.task .who { font-size: 12px; color: var(--muted); }
.phase { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-dark); font-weight: 700; margin: 12px 8px 2px; }
.progress { display: flex; align-items: center; gap: 12px; }
.progress .bar { flex: 1; }

/* ---------- Stempeln / Station ---------- */
.clockcard { text-align: center; }
.clockcard .time { font: 600 44px/1 'Cinzel', serif; color: var(--navy); margin: 8px 0; font-variant-numeric: tabular-nums; }
.stationqr { background: #fff; border: 2px solid var(--gold-line); border-radius: 24px; padding: 20px; display: inline-block; }
.stationqr img { width: min(420px, 70vw); height: auto; display: block; image-rendering: pixelated; }
.stationwrap { text-align: center; }
.countdown { width: min(420px, 70vw); margin: 12px auto 0; }
body.kiosk .shell { grid-template-columns: 1fr; }
body.kiosk .sidebar, body.kiosk .mobilebar { display: none; }

/* ---------- Anmeldeseiten ---------- */
.authwrap { max-width: 460px; margin: var(--s4) auto; padding: 0 var(--s2); }
.authwrap .bigtile { display: block; width: 132px; margin: 0 auto var(--s2); }
.authwrap .bigtile.wide { width: 220px; box-sizing: border-box; padding: 14px 20px; background: var(--hdr-bg, #131313); border-radius: 18px; }
.authwrap .card { padding: var(--s3) var(--s3) var(--s3); }
.authwrap h1 { text-align: center; font-size: 28px; margin-bottom: 4px; }
.authwrap .sub { text-align: center; margin-bottom: var(--s2); }

.empty { text-align: center; padding: var(--s3); color: var(--muted); }
.qrbox { text-align: center; }
.qrbox img { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 12px; }
.kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: #F0F2F6; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.hbar { display: grid; grid-template-columns: 110px 1fr 90px; gap: 12px; align-items: center; font-size: 14px; }

@media print {
  .appheader, .sidebar, .mobilebar, #toasts, .noprint { display: none !important; }
  body { background: #fff; } .shell { display: block; } .card { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Gestaltung „Dunkle Kopfleiste“: Akzent- und Kopfzeilenfarbe kommen aus den Einstellungen (brand.js setzt die Variablen) ---------- */
@font-face { font-family: 'Oswald'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/oswald-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/oswald-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Dosis'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/dosis-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Dosis'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/dosis-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Dosis'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/dosis-latin-600-normal.woff2') format('woff2'); }
html[data-theme="dunkel"] {
  --gold: #b88a45; --gold-dark: #936e37; --gold-line: rgba(184, 138, 69, .55); --warm: #f8f3ec; --on-gold: #ffffff;
  --navy: #1B1B1B; --tile: #674d27; --text: #1A1A1A; --muted: #5E5A55; --head: #FFFFFF;
  --hdr-bg: #131313; --bg: #F5F3F0; --info: #936e37;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif; --font-body: 'Dosis', system-ui, sans-serif;
}
html[data-theme="dunkel"] body { font-size: 18px; font-weight: 500; }
html[data-theme="dunkel"] h1, html[data-theme="dunkel"] h2, html[data-theme="dunkel"] h3 { font-variant-caps: normal; font-weight: 500; letter-spacing: .01em; }
html[data-theme="dunkel"] .progname { font-family: var(--font-head); font-weight: 500; font-variant-caps: normal; letter-spacing: .02em; color: #fff; }
html[data-theme="dunkel"] .tagline { font-family: var(--font-head); font-weight: 500; color: var(--gold-on-head, var(--gold)); }
html[data-theme="dunkel"] .btn { font-family: var(--font-body); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
html[data-theme="dunkel"] .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
html[data-theme="dunkel"] .btn.primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
html[data-theme="dunkel"] .btn.gold { background: var(--hdr-bg); border-color: var(--hdr-bg); }
html[data-theme="dunkel"] .kpi .v, html[data-theme="dunkel"] .clockcard .time, html[data-theme="dunkel"] .plan th .dd, html[data-theme="dunkel"] .planbar .weeklabel, html[data-theme="dunkel"] .mobilebar .title { font-family: var(--font-head); font-variant-caps: normal; }
html[data-theme="dunkel"] .seg button[aria-pressed="true"] { background: var(--hdr-bg); }
html[data-theme="dunkel"] .nav a { font-size: 15px; }
html[data-theme="dunkel"] .eyebrow { color: var(--gold); }
html[data-theme="dunkel"] .field input, html[data-theme="dunkel"] .field select, html[data-theme="dunkel"] .field textarea { font-weight: 500; }
html[data-theme="dunkel"] .bar > i { background: var(--gold); }
html[data-theme="dunkel"] .stationqr img { }
@media (max-width: 900px) { html[data-theme="dunkel"] .nav a { font-size: 14px; } }

/* ---- Erweiterungen: Kalender, Terminal, Tageswerte ---- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .wdh { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.cal .day { min-height: 96px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day.empty { background: transparent; border-color: transparent; }
.cal .day.today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.cal .day.ruhe { background: var(--warm); }
.cal .day.holiday { background: var(--warm); border-color: var(--gold-line); }
.cal .dn { font-weight: 600; font-size: 13px; }
.cal .wdlabel { display: none; font-weight: 400; color: var(--muted); }
.cal .ab { font-size: 12px; padding: 2px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ab.urlaub { background: var(--info-bg); color: var(--info-text); }
.cal .ab.krank { background: var(--err-bg); color: var(--err-text); }
.cal .ab.wunschfrei { background: var(--warn-bg); color: var(--warn-text); }
.cal .ab.offen { border: 1px dashed currentColor; }
.cal .mine { font-size: 12px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--gold); border-left: 4px solid var(--c, #999); background: #fff; }
@media (max-width: 760px) {
  .cal { grid-template-columns: 1fr; }
  .cal .wdh, .cal .day.empty { display: none; }
  .cal .day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .cal .wdlabel { display: inline; }
}
.tagrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tagrow > b { min-width: 90px; }
.terminal { gap: 12px; }
.tile-person { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-height: 88px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.tile-person.in { border-color: var(--ok-line); background: var(--ok-bg); }
.tile-person:disabled { opacity: .5; cursor: not-allowed; }
.tile-person b { font-size: 18px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pinpad button { min-height: 56px; font-size: 22px; font-weight: 600; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.pinpad button:active { background: var(--warm); }
.bellbadge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold-dark); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: auto; }
.monthlabel { min-width: 150px; text-align: center; font-size: 17px; }

/* ---- Touch: iPad und Handy, größere Ziele ---- */
@media (pointer: coarse) {
  .btn, .btn.sm, .linkbtn, .addcell, .seg button, select, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time] { min-height: 44px; }
  .addcell { min-width: 44px; }
  input[type=checkbox], input[type=radio] { width: 26px; height: 26px; }
  .check, label.check { min-height: 44px; display: flex; align-items: center; gap: 10px; }
  .nav a { min-height: 48px; }
}
@media (pointer: coarse) { button.linkbtn, .sidefoot .linkbtn { min-height: 44px; padding-block: 10px; } }
.gaplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 10px; }
.gaplist .gap { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); font-size: 14px; }
@media (pointer: coarse) { .sidefoot .who .linkbtn { min-height: 44px; padding-block: 10px; } }
