:root {
  --bg: #f1f4f9; --card: #ffffff; --surface: #ffffff; --surface-2: #f8fafc; --hover: #eef2f7; --hover-blue: #eef5ff;
  --text: #0f172a; --text-2: #334155; --text-3: #475569; --muted: #64748b;
  --border: #e2e8f0; --border-strong: #cbd5e1; --line-soft: #eef2f7; --chip-bg: #e2e8f0; --col: #e9eef6;
  --side: #0b1626; --side-text: #94a3b8; --side-active: #1e3a5f;
  --primary: #1d4ed8; --primary-dark: #1e40af; --primary-soft: #dbeafe; --on-primary-soft: #1e3a8a;
  --ok: #16a34a; --ok-soft: #dcfce7; --on-ok-soft: #166534; --warn: #d97706; --warn-soft: #fef3c7; --on-warn-soft: #78350f;
  --bad: #dc2626; --bad-soft: #fee2e2; --on-bad-soft: #991b1b; --open-bg: #fff7f7;
  --we: #f6f8fb; --we-head: #eceff5; --hol: #fdf3e6; --hol-head: #fbe3c2; --hol-text: #7c2d12;
  --radius: 10px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --bg-image: none; --bg-dim: .75;
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
[data-theme="dark"] {
  --bg: #0a1120; --card: #131c2e; --surface: #131c2e; --surface-2: #18233a; --hover: #1c2943; --hover-blue: #1a2d52;
  --text: #e6eaf2; --text-2: #c5cddb; --text-3: #9fabbf; --muted: #8e9ab0;
  --border: #25324b; --border-strong: #38476a; --line-soft: #1e2a42; --chip-bg: #27344f; --col: #0e1626;
  --side: #070d19; --side-text: #8e9ab0; --side-active: #1b2f52;
  --primary: #3b82f6; --primary-dark: #2563eb; --primary-soft: #1b2e57; --on-primary-soft: #bfdbfe;
  --ok: #22c55e; --ok-soft: #12301f; --on-ok-soft: #86efac; --warn: #f59e0b; --warn-soft: #3a2a0c; --on-warn-soft: #fcd34d;
  --bad: #f87171; --bad-soft: #3b1519; --on-bad-soft: #fca5a5; --open-bg: #2a1519;
  --we: #101a2d; --we-head: #18233b; --hol: #3a2c18; --hol-head: #4a3517; --hol-text: #fdba74;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: var(--text); font-size: 14px; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: var(--bg-image) center / cover no-repeat; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--bg); opacity: var(--bg-dim); pointer-events: none; }
body.login-mode::after { opacity: calc(var(--bg-dim) * .45); }
h1, h2, h3, h4 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { display: inline-flex; vertical-align: middle; }
.muted { color: var(--muted); }
small { color: var(--muted); }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex: none; }
.brand { padding: 20px 18px 16px; color: #fff; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #14233a; }
.brand .logo { width: 44px; height: 44px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 5px rgba(0,0,0,.45)); }
.login-card .brand .logo { width: 60px; height: 60px; }
.brand b { font-size: 15px; display: block; line-height: 1.1; }
.brand small { color: var(--side-text); font-size: 11px; }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: var(--side-text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: #12233b; color: #e2e8f0; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav .sep { height: 1px; background: #14233a; margin: 8px 6px; }
.side-foot { padding: 12px 10px; border-top: 1px solid #14233a; }
.side-foot button { width: 100%; background: none; border: 0; color: var(--side-text); display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.side-foot button:hover { background: #12233b; color: #fff; }
.main { flex: 1; min-width: 0; padding: 22px 26px 40px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; letter-spacing: -.2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Bausteine ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card h3 { font-size: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }
.stat { padding: 16px 18px; }
.stat .num { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.stat .lbl { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat.bad .num { color: var(--bad); } .stat.ok .num { color: var(--ok); } .stat.warn .num { color: var(--warn); }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: #b91c1c; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 16px; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--hover); color: var(--text); }

input[type=text], input[type=number], input[type=date], input[type=time], input[type=email], input[type=tel], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); }
input[type=color] { width: 52px; height: 36px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.toolbar select, .toolbar input { width: auto; }

table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; }
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:hover td { background: var(--hover); }
table.data tr.click { cursor: pointer; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--chip-bg); color: var(--text-2); margin: 1px 3px 1px 0; }
.badge.ok { background: var(--ok-soft); color: var(--on-ok-soft); } .badge.warn { background: var(--warn-soft); color: var(--on-warn-soft); }
.badge.bad { background: var(--bad-soft); color: var(--on-bad-soft); } .badge.blue { background: var(--primary-soft); color: var(--on-primary-soft); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty p { margin: 0 0 14px; }
.hint-box { background: var(--primary-soft); color: var(--on-primary-soft); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; line-height: 1.5; }
.hint-box.warn { background: var(--warn-soft); color: var(--on-warn-soft); }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: grid; place-items: start center; padding: 6vh 16px; overflow: auto; z-index: 50; }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.modal.wide { width: min(880px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 18px; max-height: 68vh; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.confirm-text { margin: 0; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field small { font-size: 12px; }
.span2 { grid-column: span 2; }
.req { color: var(--bad); }
.check-field { flex-direction: row; align-items: center; gap: 8px; }
.check-field small { margin-left: 4px; }
.form-heading { margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 99px; cursor: pointer; font-size: 13px; }
.check-pill:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.qrows { display: flex; flex-direction: column; gap: 6px; }
.qrow { display: grid; grid-template-columns: 1fr 120px 150px 32px; gap: 6px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { white-space: pre-line; background: #0f172a; color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: 420px; }
.toast.err { background: var(--bad); } .toast.ok { background: #14532d; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; }
.login-card { background: var(--surface); border-radius: 16px; padding: 32px; width: min(400px, 100%); box-shadow: 0 25px 60px rgba(0, 0, 0, .4); }
.login-card h2 { margin: 14px 0 4px; } .login-card p { color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.login-card .field { margin-bottom: 14px; } .login-card .btn { width: 100%; justify-content: center; padding: 10px; }

/* ---------- Dienstplan ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.month-nav { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; }
.month-nav b { min-width: 150px; text-align: center; font-size: 15px; }
.month-nav button { border: 0; background: none; padding: 7px 9px; cursor: pointer; border-radius: 8px; }
.month-nav button:hover { background: var(--hover); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; }
.seg button.on { background: var(--primary); color: #fff; }
.brushes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; }
.brushes .lbl { font-size: 12px; color: var(--muted); margin-right: 4px; font-weight: 600; }
.brush { border: 2px solid transparent; border-radius: 8px; padding: 4px 10px; cursor: pointer; font-weight: 700; font-size: 12.5px; color: #fff; user-select: none; }
.brush.on { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }
.brush.neutral { background: var(--chip-bg); color: var(--text); }
.brushes select { width: auto; padding: 4px 8px; }
.sched-wrap { overflow: auto; max-height: max(560px, calc(100vh - 110px)); min-height: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table.sched { border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.sched th, .sched td { border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); padding: 0; text-align: center; }
.sched thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 3; height: 34px; font-weight: 600; color: var(--text-3); }
.sched thead tr:nth-child(2) th { top: 34px; }
.sched .nm { position: sticky; left: 0; background: var(--surface); z-index: 2; text-align: left; padding: 4px 10px; min-width: 176px; max-width: 176px; border-right: 2px solid var(--border); }
.sched thead .nm { z-index: 5; background: var(--surface-2); }
.sched .nm .n1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched .nm .n2 { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched .nm .n2.guest { color: #b45309; font-weight: 600; }
.sched td.day { width: 34px; min-width: 34px; height: 36px; cursor: pointer; position: relative; }
.sched td.day:hover { background: var(--hover-blue); }
.sched .we { background: var(--we); } .sched thead .we { background: var(--we-head); }
.sched .hol { background: var(--hol); } .sched thead .hol { background: var(--hol-head); color: var(--hol-text); }
.sched .today { box-shadow: inset 0 -3px 0 var(--primary); }
.sched thead .today { color: var(--primary); }
.sched td.painted { outline: 2px dashed var(--primary); outline-offset: -2px; background: var(--primary-soft); }
.sched .stat-col { position: sticky; z-index: 2; width: 52px; min-width: 52px; max-width: 52px; padding: 0 4px; font-variant-numeric: tabular-nums; background: var(--surface); }
.sched thead .stat-col { z-index: 4; }
.sched tfoot .stat-col { z-index: 4; }
.sched .stat-col:nth-last-child(1) { right: 0; } .sched .stat-col:nth-last-child(2) { right: 52px; } .sched .stat-col:nth-last-child(3) { right: 104px; }
.sched .stat-col:nth-last-child(4) { right: 156px; } .sched .stat-col:nth-last-child(5) { right: 208px; border-left: 2px solid var(--border); }
.sched thead .stat-col { background: var(--surface-2); }
.sched .diff.ok { color: var(--ok); font-weight: 700; } .sched .diff.warn { color: var(--warn); font-weight: 700; } .sched .diff.bad { color: var(--bad); font-weight: 700; }
.sched td.soll { cursor: pointer; }
.sched .open-row .stat-col { background: var(--open-bg); } .sched td.soll:hover { background: var(--hover-blue); }
.sched .open-row td, .sched .open-row th { background: var(--open-bg); }
.sched .open-row .nm { color: var(--bad); font-weight: 600; background: var(--open-bg); }
.sched tfoot td, .sched tfoot th { position: sticky; bottom: 0; background: var(--surface-2); z-index: 3; height: 30px; font-weight: 600; border-top: 2px solid var(--border); }
.sched tfoot .nm { z-index: 5; }
.cov-ok { color: var(--ok); } .cov-bad { color: var(--bad); }
.chip { display: inline-block; min-width: 30px; padding: 3px 4px; margin: 1px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 11.5px; line-height: 1.15; position: relative; border: 2px solid transparent; }
.chip small { display: block; font-size: 9px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.chip .sd { position: absolute; left: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); }
.chip.auto { opacity: .88; border-style: dashed; border-color: rgba(255, 255, 255, .55); }
.chip.err { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-soft); }
.chip.warn { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.chip.abs { color: #fff; }
.chip.open { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 4px, var(--bad-soft) 4px, var(--bad-soft) 8px); color: var(--bad); border-color: var(--bad); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 10px 2px 0; }
.issues { margin-top: 14px; }
.issue { display: flex; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line-soft); align-items: center; }
.issue.error .ico { color: var(--bad); } .issue.warn .ico { color: var(--warn); }
.issue .who { font-weight: 600; min-width: 150px; } .issue .d { color: var(--muted); min-width: 80px; }
.cell-section { margin-bottom: 16px; } .cell-section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 8px; }
.shift-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.shift-row:hover { background: var(--surface-2); }
.calc-line { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 8px 12px; grid-column: span 2; }

/* ---------- Aufgaben (Kanban) ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--col); border-radius: 12px; padding: 10px; min-height: 200px; }
.col.over { outline: 2px dashed var(--primary); }
.col h3 { padding: 4px 6px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); display: flex; justify-content: space-between; }
.task { background: var(--surface); border-radius: 10px; padding: 11px 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: grab; border-left: 4px solid #94a3b8; }
.task.p1 { border-left-color: var(--bad); } .task.p2 { border-left-color: var(--primary); } .task.p3 { border-left-color: #94a3b8; }
.task .t { font-weight: 600; margin-bottom: 6px; } .task .m { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.late { color: var(--bad); font-weight: 700; }

/* ---------- Sonstiges ---------- */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.list-item { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-item:hover { background: var(--surface-2); } .list-item.active { background: var(--primary-soft); }
.settings-sec { margin-bottom: 16px; } .settings-sec .body { padding: 16px 18px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.report-table td, .report-table th { padding: 6px 10px; }
.progress { height: 8px; background: var(--chip-bg); border-radius: 99px; overflow: hidden; } .progress > div { height: 100%; background: var(--primary); }
.dl { list-style: none; padding: 0; margin: 0; } .dl li { padding: 9px 16px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.dl li:last-child { border: 0; }

/* ---------- Druck ---------- */
@page { size: A3 landscape; margin: 10mm; }
@media print {
  .sidebar, .toolbar, .brushes, .page-head .actions, .issues, #toasts, .no-print { display: none !important; }
  .main { padding: 0; } body, html { background: var(--surface); }
  .sched-wrap { max-height: none; overflow: visible; border: 0; }
  .sched thead th, .sched tfoot td, .sched tfoot th, .sched .nm { position: static; }
  .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sched, .sched * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sched td.day { height: 32px; }
}

/* ---------- Theme / Passwort / Hintergrund ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 42px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 6px; display: inline-flex; }
.pw-eye:hover { color: var(--text); background: var(--hover); }
.theme-fab { position: fixed; top: 14px; right: 14px; z-index: 20; }
.theme-fab .btn { background: var(--surface); box-shadow: var(--shadow); }
.bg-preview { width: 100%; max-width: 360px; aspect-ratio: 16 / 9; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-image) center / cover no-repeat, var(--surface-2); }
.sidebar .theme-toggle { margin-bottom: 2px; }
[data-theme="dark"] .sched td.day:hover { background: var(--hover-blue); }
[data-theme="dark"] .chip { box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
[data-theme="dark"] .chip .sd { border-color: var(--surface); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
[data-theme="dark"] .btn.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
[data-theme="dark"] .btn.danger:hover { background: #b91c1c; }
.field .seg { align-self: flex-start; }
.theme-btn { margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border-strong); background: transparent; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.theme-btn:hover { color: var(--text); background: var(--hover); }
.sidebar .theme-btn { border-color: #1b2c47; color: var(--side-text); }
.sidebar .theme-btn:hover { background: #12233b; color: #fff; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }

/* ---------- Dienstpläne / Bereiche ---------- */
.rtag { display: inline-flex; max-width: 230px; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); background: color-mix(in srgb, var(--c, #64748b) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c, #64748b) 45%, transparent); }
.rtag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #64748b); flex: none; }
.roster-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.roster-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; color: var(--text); }
.roster-tab:hover { background: var(--surface-2); }
.roster-tab .rdot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #64748b); }
.roster-tab small { font-weight: 500; color: var(--muted); }
.roster-tab.on { border-color: var(--c, var(--primary)); box-shadow: inset 0 -3px 0 var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 10%, var(--surface)); }
.kpis { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.kpi { flex: 1 1 150px; padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 20px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi.ok b { color: var(--ok); } .kpi.warn b { color: var(--warn); } .kpi.bad b { color: var(--bad); }
.roster-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-top: 4px solid var(--c, var(--primary)); }
.roster-card h3 { border: 0; padding: 0; margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.roster-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.roster-card .meta b { color: var(--text); }
.roster-card .names { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.roster-card .names span { white-space: nowrap; }
.roster-card .actions { margin-top: auto; padding-top: 4px; }
.chip.dim { opacity: .3; }

/* ---------- Dienstplan: ruhiges, professionelles Raster ---------- */
.page-head { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.toolbar, .brushes { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow); margin-bottom: 12px; }
.brushes { padding: 8px 12px; }
.roster-tabs, .kpis { margin-bottom: 12px; }
.sched-wrap { box-shadow: var(--shadow); border-radius: 12px; }
.sched th, .sched td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.sched thead th { font-size: 11.5px; text-transform: none; letter-spacing: 0; background: var(--surface-2); color: var(--text-2); height: 28px; }
.sched thead tr:nth-child(2) th { top: 28px; font-size: 13px; font-weight: 700; color: var(--text); }
.sched thead th.we { background: var(--we-head); }
.sched thead th.hol { background: var(--hol-head); color: var(--hol-text); }
.sched thead th.today { background: var(--primary); color: #fff; box-shadow: none; }
.sched td.today { background: var(--primary-soft); box-shadow: none; }
.sched td.we { background: var(--we); }
.sched td.hol { background: var(--hol); }
.sched td.day:hover { background: var(--hover-blue); }
.sched .nm { border-left: 4px solid transparent; }
.sched tbody tr:hover > th.nm { background: var(--hover); }
.sched td.stat-col { font-weight: 600; }
.sched td.stat-col.first { border-left: 2px solid var(--border-strong); }
.chip.flat { display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 0; font-size: 12.5px; letter-spacing: .3px; box-shadow: none; opacity: 1; }
.chip.flat + .chip.flat { border-top: 1px solid rgba(255, 255, 255, .55); }
.chip.flat .sd { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 4px; border: 0; border-radius: 0; }
.chip.flat.fixed::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 9px 9px 0; border-color: transparent rgba(255, 255, 255, .9) transparent transparent; }
.chip.flat.err { box-shadow: inset 0 0 0 3px var(--bad); }
.chip.flat.warn { box-shadow: inset 0 0 0 3px var(--warn); }
.chip.flat.open { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 4px, var(--bad-soft) 4px, var(--bad-soft) 8px); color: var(--bad); font-weight: 800; }
.legend { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; margin: 12px 0 0; box-shadow: var(--shadow); }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
@media print {
  .page-head, .roster-tabs, .kpis { box-shadow: none; }
  .page-head { border: 0; padding: 0 0 8px; }
  .sched th, .sched td { border-color: #94a3b8; }
  .sched thead th.today { background: var(--surface-2); color: var(--text); }
  .sched td.today { background: transparent; }
  .chip.flat { height: 30px; }
  .legend { box-shadow: none; }
}

.sched.by-site td.day { width: 62px; min-width: 62px; font-size: 11.5px; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched.by-site thead th:not(.nm) { min-width: 62px; }

/* =====================================================================
   Plan B – Oberfläche v2: obere Leiste, Kennzahlkarten, Karten mit dunkler Kopfzeile, Übersicht, Dienstplan
   ===================================================================== */
:root { --navy: #16304f; --navy-2: #1f4373; --navy-text: #e8eef7; }
[data-theme="dark"] { --navy: #14284a; --navy-2: #1b3a68; }

/* Aufbau: Seitenleiste + (obere Leiste, Inhalt) */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 26px; background: linear-gradient(180deg, #102541, #0d1f38); color: var(--navy-text); border-bottom: 1px solid rgba(255, 255, 255, .06); min-height: 60px; }
.topbar .tb-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: 8px; border-radius: 8px; display: inline-flex; position: relative; }
.topbar .tb-btn:hover { background: rgba(255, 255, 255, .09); }
.topbar .tb-search { flex: 1; max-width: 560px; margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 9px; background: rgba(255, 255, 255, .06); color: #cbd5e1; cursor: pointer; text-align: left; font: inherit; }
.topbar .tb-search:hover { background: rgba(255, 255, 255, .11); }
.topbar .tb-search kbd { margin-left: auto; border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px; padding: 1px 7px; font-size: 11.5px; color: #cbd5e1; font-family: inherit; }
.topbar .badge-dot { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.topbar .tb-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.topbar .tb-user .av { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; }
.topbar .tb-user b { display: block; font-size: 13px; line-height: 1.15; } .topbar .tb-user small { color: #a9b8cf; font-size: 11.5px; }
.tb-menu { position: fixed; z-index: 60; min-width: 300px; max-width: 380px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); padding: 8px; max-height: 70vh; overflow: auto; }
.tb-menu h4 { margin: 6px 8px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.tb-menu a, .tb-menu button.mi { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; color: inherit; text-decoration: none; cursor: pointer; font: inherit; }
.tb-menu a:hover, .tb-menu button.mi:hover { background: var(--hover); }
.tb-menu small { display: block; color: var(--muted); }
body.nav-collapsed .sidebar { display: none; }
.palette { position: fixed; inset: 0; z-index: 80; background: rgba(8, 15, 28, .55); display: flex; justify-content: center; padding-top: 12vh; }
.palette .box { width: min(620px, 92vw); background: var(--surface); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); align-self: flex-start; overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--border); padding: 16px 18px; font-size: 16px; background: transparent; color: var(--text); outline: none; border-radius: 0; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.palette li.on, .palette li:hover { background: var(--primary-soft); color: var(--on-primary-soft); }
.palette li small { color: inherit; opacity: .7; }

/* Seitenleiste */
.sidebar { width: 236px; background: linear-gradient(180deg, #0e2038, #0a1729); }
.nav a { font-size: 14px; padding: 10px 12px; }
.nav a.active { background: #1d4ed8; box-shadow: 0 2px 10px rgba(29, 78, 216, .35); }
.nav a .nbadge { margin-left: auto; background: #2563eb; color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 8px; }
.side-status { margin: 10px; padding: 10px 12px; border: 1px solid #1a2d48; border-radius: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #cbd5e1; }
.side-status .on { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
.side-status small { margin-left: auto; color: #8ea2bf; }

/* Seitenkopf */
.dpage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dpage-head h1 { font-size: 26px; letter-spacing: -.3px; margin: 0; }
.dpage-head p { margin: 2px 0 0; color: var(--muted); }
.datenav { display: flex; gap: 6px; align-items: center; }
.btn.icon { padding: 8px 9px; } .btn.sm.icon { padding: 5px 7px; }

/* Kennzahlkarten */
.dstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.dstats.five { grid-template-columns: repeat(5, 1fr); }
.dstat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.dstat.link { cursor: pointer; } .dstat.link:hover { border-color: var(--border-strong); }
.dstat .dico { width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(145deg, var(--navy-2), var(--navy)); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.dstat.bad .dico { background: linear-gradient(145deg, #b91c1c, #7f1d1d); }
.dstat .dtxt { display: flex; flex-direction: column; min-width: 0; }
.dstat .dlbl { font-size: 13px; color: var(--text-2); font-weight: 500; }
.dstat .dval { font-size: 30px; line-height: 1.1; letter-spacing: -.5px; }
.dstat .dval.ok { color: var(--ok); } .dstat .dval.bad { color: var(--bad); }
.dstat small { color: var(--muted); }
.dstat .dmark { margin-left: auto; align-self: flex-end; } .dmark.ok { color: var(--ok); } .dmark.bad { color: var(--bad); }
.ring { --p: 100; margin-left: auto; width: 62px; height: 62px; border-radius: 50%; background: conic-gradient(var(--rc, var(--ok)) calc(var(--p) * 1%), var(--line-soft) 0); display: flex; align-items: center; justify-content: center; position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.ring span { position: relative; font-size: 11.5px; font-weight: 700; }
.ring.warn { --rc: var(--warn); } .ring.bad { --rc: var(--bad); }

/* Karten mit dunkler Kopfzeile */
.dgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: start; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-9 { grid-column: span 9; } .span-12 { grid-column: span 12; }
.dcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dhead { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; min-height: 46px; }
.dhead b { font-size: 15px; }
.dhead .dact { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.dhead .btn { background: #fff; color: #0f172a; border-color: transparent; }
.dhead .btn:hover { background: #e2e8f0; }
.dcount { background: #2563eb; border-radius: 99px; font-size: 12px; font-weight: 700; padding: 1px 9px; }
.dbody { padding: 0; }
.dcard.light .dhead { background: var(--card); color: var(--text); border-bottom: 1px solid var(--border); }
.wbtn { background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 6px; padding: 3px 5px; cursor: pointer; display: inline-flex; } .wbtn:hover { background: rgba(255, 255, 255, .26); }
.wlabel { font-size: 12.5px; color: #dbe6f5; }
.live { background: #16a34a; color: #fff; border-radius: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 10px; }
@media (max-width: 1280px) { .span-9, .span-6 { grid-column: span 12; } .span-3 { grid-column: span 6; } .dstats.five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .span-3 { grid-column: span 12; } .dstats, .dstats.five { grid-template-columns: repeat(2, 1fr); } }

table.dtab { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtab th { text-align: left; padding: 9px 14px; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.dtab td { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dtab tr:last-child td { border-bottom: 0; }
.dtab tr.click { cursor: pointer; } .dtab tr.click:hover td { background: var(--hover-blue); }
.dtab .c { text-align: center; }
.dtab.week th small { display: block; font-weight: 500; color: var(--muted); }
.dtab.week .selday { background: var(--primary-soft); } .dtab.week th.holday { background: var(--hol-head); color: var(--hol-text); }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.pill { display: inline-block; border-radius: 99px; padding: 2px 11px; font-size: 12px; font-weight: 600; background: var(--chip-bg); color: var(--text-2); }
.pill.ok { background: var(--ok-soft); color: var(--on-ok-soft); } .pill.blue { background: var(--primary-soft); color: var(--on-primary-soft); } .pill.bad { background: var(--bad-soft); color: var(--on-bad-soft); } .pill.warn { background: var(--warn-soft); color: var(--on-warn-soft); } .pill.grey { background: var(--chip-bg); color: var(--text-3); }
.scode { --c: #64748b; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; border-radius: 6px; font-weight: 700; font-size: 12px; background: color-mix(in srgb, var(--c) 24%, var(--surface)); color: color-mix(in srgb, var(--c) 70%, var(--text)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); margin-right: 4px; }
.dempty { padding: 18px; color: var(--muted); margin: 0; }
.dempty-big { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 16px; color: var(--muted); } .dempty-big p { margin: 0; }

/* Kalender */
.dcard.cal { padding: 14px 16px; } .calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calgrid { display: grid; grid-template-columns: 28px repeat(7, 1fr); gap: 3px; text-align: center; align-items: center; }
.calgrid .wd { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 4px 0; } .calgrid .wk { font-size: 11px; color: var(--muted); }
.cd { border: 0; background: none; color: var(--text); height: 30px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cd:hover { background: var(--hover); } .cd.out { color: var(--muted); opacity: .55; } .cd.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cd.sel { background: var(--primary); color: #fff; font-weight: 700; box-shadow: none; }

/* Personalstatus, Hinweise, Schnellaktionen */
ul.plist { list-style: none; margin: 0; padding: 4px 16px 10px; } .plist li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); } .plist li:last-child { border: 0; }
.hints { padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
.hint-row, .task-row { border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 8px; padding: 9px 12px; background: var(--surface); display: flex; align-items: center; gap: 10px; }
.hint-row { cursor: pointer; flex-direction: column; align-items: flex-start; gap: 2px; } .hint-row:hover { background: var(--surface-2); }
.hint-row.bad, .task-row.p1 { border-left-color: var(--bad); } .hint-row.warn, .task-row.p2 { border-left-color: var(--warn); } .task-row.p3 { border-left-color: #94a3b8; }
.task-row .tt { flex: 1; min-width: 0; } .task-row input[type=checkbox] { width: 20px; height: 20px; flex: none; cursor: pointer; }
.ht { font-weight: 600; } .hm { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.qgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 14px; }
.qbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 8px; min-height: 92px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2); cursor: pointer; font: inherit; font-size: 13px; text-align: center; line-height: 1.25; }
.qbtn:hover { background: var(--hover-blue); border-color: var(--primary); }
.qbtn.primary { background: linear-gradient(180deg, #2563eb, #1d4ed8); color: #fff; border-color: transparent; } .qbtn.primary:hover { filter: brightness(1.08); }
@media (max-width: 1100px) { .qgrid { grid-template-columns: repeat(3, 1fr); } }
.bottom-cards { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr 1.2fr; gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 1280px) { .bottom-cards { grid-template-columns: 1fr 1fr; } } @media (max-width: 800px) { .bottom-cards { grid-template-columns: 1fr; } }
.bottom-cards .qgrid { grid-template-columns: repeat(2, 1fr); }

/* ---------- Dienstplan: Werkzeugleiste, Raster, Legende ---------- */
.toolbar2 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar2 .grow { flex: 1; }
.toolbar2 select, .toolbar2 input[type=search] { width: auto; min-width: 150px; }
.month-nav { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.month-nav b { padding: 0 14px; min-width: 150px; text-align: center; }
.month-nav button { border: 0; background: none; padding: 8px 10px; cursor: pointer; color: var(--text); } .month-nav button:hover { background: var(--hover); }
.brushes { background: var(--surface); border-radius: 10px; }
.brush { color: var(--text); border-radius: 7px; border: 1px solid color-mix(in srgb, var(--bc, #64748b) 55%, transparent); background: color-mix(in srgb, var(--bc, #64748b) 28%, var(--surface)); }
.brush.neutral { background: var(--surface-2); border-color: var(--border-strong); }
.brush.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--primary); }
.sched-wrap { border-radius: 12px; box-shadow: var(--shadow); }
.sched thead th { background: var(--surface-2); color: var(--text-2); }
.sched thead th.today { background: var(--primary-soft); color: var(--on-primary-soft); box-shadow: none; }
.sched td.today { background: color-mix(in srgb, var(--primary) 9%, transparent); box-shadow: none; }
.sched .chip.flat { --c: #64748b; background: color-mix(in srgb, var(--c) 26%, var(--surface)) !important; color: color-mix(in srgb, var(--c) 72%, var(--text)); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); border-radius: 7px; min-width: 26px; height: 26px; line-height: 22px; padding: 0 4px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.sched .chip.flat.auto { border-style: solid; opacity: 1; }
.sched .chip.flat.err { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-soft); } .sched .chip.flat.warn { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.sched .chip.flat.open { background: var(--bad-soft) !important; color: var(--bad); border-color: var(--bad); }
.sched tr.grp th.nm, .sched tr.grp td { background: var(--surface-2); font-weight: 700; cursor: pointer; border-bottom: 1px solid var(--border); height: 34px; }
.sched tr.grp th.nm { border-left: 4px solid var(--gc, #94a3b8); }
.sched tr.grp .chev { display: inline-flex; vertical-align: middle; margin-right: 6px; transition: transform .15s; } .sched tr.grp.closed .chev { transform: rotate(-90deg); }
.sched tr.grp small { margin-left: 8px; font-weight: 500; }
.sched tr.grp:hover th.nm, .sched tr.grp:hover td { background: var(--hover); }
.legend2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.legend2 b { margin-right: 6px; }
.legend2 .lg { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 8px; padding: 3px 10px 3px 4px; }
.legend2 .note { margin-left: auto; color: var(--muted); font-size: 12px; }
.sched-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media print { .topbar, .bottom-cards, .toolbar2 { display: none !important; } .main-col { display: block; } }

.sched.wide td.day { width: 112px; min-width: 112px; } .sched.wide th { min-width: 112px; } .sched.wide .chip.flat { min-width: 44px; height: 30px; font-size: 13px; }
.dpage-head > div:first-child { background: color-mix(in srgb, var(--card) 90%, transparent); padding: 8px 18px 10px; border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.sched tr.grp th.nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbody { overflow-x: auto; }

/* Ausfälle & Einspringen */
.dstat.t-pink .dico { background: #fde4e8; color: #e11d48; } .dstat.t-orange .dico { background: #ffe9d2; color: #ea7a0c; }
.dstat.t-blue .dico { background: #dbeafe; color: #2563eb; } .dstat.t-green .dico { background: #dcfce7; color: #16a34a; }
[data-theme="dark"] .dstat.t-pink .dico { background: #4a1822; } [data-theme="dark"] .dstat.t-orange .dico { background: #4a2e10; } [data-theme="dark"] .dstat.t-blue .dico { background: #1b2e57; } [data-theme="dark"] .dstat.t-green .dico { background: #12301f; }
.hintbar { display: flex; gap: 14px; align-items: center; background: color-mix(in srgb, var(--primary) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); border-radius: 12px; padding: 12px 18px; margin-bottom: 16px; color: var(--text-2); line-height: 1.5; }
.hintbar > .ico { color: var(--primary); flex: none; } .hintbar b { color: var(--text); }
.hint-switch { margin-left: auto; display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 8px; padding: 6px 12px; white-space: nowrap; font-size: 13px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--primary); } .switch input:checked + span::before { transform: translateX(20px); }
.dhead .btn.primary-btn { background: #2563eb; color: #fff; } .dhead .btn.primary-btn:hover { background: #1d4ed8; }
.dhead select { width: auto; padding: 5px 10px; }
.dhead select { color: #0f172a; background: #fff; border-color: transparent; }

/* ---------- Bereiche, Objekte & Personalbedarf ---------- */
.namecell { display: flex; align-items: center; gap: 12px; }
.sico { --c: #64748b; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 78%, #fff), color-mix(in srgb, var(--c) 92%, #000)); color: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .25); }
.sico.sm { width: 34px; height: 34px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 80%, var(--text)); box-shadow: none; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.actbtns { display: flex; gap: 6px; }
.ibtn { width: 34px; height: 32px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.ibtn:hover { background: var(--hover-blue); border-color: var(--primary); }
.qlist { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.qrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; text-align: left; }
.qrow:hover { background: var(--hover-blue); border-color: var(--primary); }
.hint-x { margin-left: auto; border: 0; background: none; color: var(--text-2); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px; } .hint-x:hover { background: rgba(0, 0, 0, .08); }
.steps { display: flex; align-items: flex-start; padding: 20px 28px 22px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 2px; background: var(--border-strong); }
.step.done:not(:last-child)::after { background: var(--ok); }
.step .sn { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-2); }
.step.cur .sn { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }
.step.done .sn { background: var(--ok); border-color: var(--ok); color: #fff; }
.step small { font-size: 13px; color: var(--text-2); font-weight: 600; }
.chgs { padding: 6px 16px 12px; }
.chg { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); } .chg:last-child { border: 0; }
.chgico { width: 30px; height: 30px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chg .chgt { margin-left: auto; white-space: nowrap; font-size: 12.5px; }
.lnk { color: #9cc4ff; font-size: 13px; text-decoration: none; font-weight: 600; } .dcard.light .lnk { color: var(--primary); }
.hint-x + * { }

.tabcard { overflow: hidden; }
.tabsbar { display: flex; align-items: center; gap: 4px; padding: 8px 12px; background: linear-gradient(180deg, var(--navy-2), var(--navy)); flex-wrap: wrap; }
.tabsbar .grow { flex: 1; }
.tabbtn { border: 0; background: none; color: #dbe6f5; font: inherit; font-weight: 600; padding: 9px 20px; border-radius: 8px; cursor: pointer; }
.tabbtn:hover { background: rgba(255, 255, 255, .1); } .tabbtn.on { background: #2563eb; color: #fff; }
.tabsbar .btn { margin-left: 6px; } .tabsbar .btn:not(.primary-btn) { background: #fff; color: #0f172a; border-color: transparent; } .tabsbar .btn.primary-btn { background: #2563eb; color: #fff; border-color: transparent; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 16px; }
.filters input[type=search] { min-width: 280px; } .filters select { width: auto; min-width: 190px; } .filters .grow { flex: 1; }
.objtab td { padding-top: 11px; padding-bottom: 11px; }
.tfoot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; } .tfoot .grow { flex: 1; } .tfoot select { width: auto; padding: 4px 8px; }
.pager { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.pg { border: 0; background: var(--surface); color: var(--text); min-width: 36px; height: 34px; cursor: pointer; border-right: 1px solid var(--border); font: inherit; } .pg:last-child { border-right: 0; } .pg:hover:not(:disabled) { background: var(--hover); } .pg:disabled { opacity: .4; cursor: default; } .pg.on { background: var(--primary); color: #fff; }
.siteinfo { padding: 4px 16px 12px; }
.needs .dtab { margin-top: 0; }
@media print { .tabsbar { display: none !important; } }
.filters input[type=search] { width: 360px; max-width: 100%; min-width: 0; } .filters select { width: 220px; }

.dstat.t-purple .dico { background: #ede4ff; color: #7c3aed; } .dstat.t-grey .dico { background: #e6ebf2; color: #475569; }
[data-theme="dark"] .dstat.t-purple .dico { background: #2e2056; } [data-theme="dark"] .dstat.t-grey .dico { background: #27344f; color: #cbd5e1; }
.dstat.t-blue .dico, .dstat.t-green .dico, .dstat.t-orange .dico, .dstat.t-purple .dico, .dstat.t-grey .dico, .dstat.t-pink .dico { box-shadow: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--chip-bg); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1px solid var(--border-strong); }
.swatch { display: inline-block; width: 38px; height: 18px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .15); vertical-align: middle; }
.qmatrix th, .qmatrix td { white-space: nowrap; }
.dcard.tabcard > .dhead { border-radius: 0; }

/* Seitenleiste: Dienstplan-Gruppe mit Unterpunkten */
.nav-group > a { position: relative; }
.nav-group.cur > a { color: #fff; }
.nav-group .chev { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; border-radius: 6px; display: inline-flex; transition: transform .15s; }
.nav-group .chev:hover { background: rgba(255, 255, 255, .12); }
.nav-group:not(.open) .chev { transform: rotate(-90deg); }
.nav-group .subnav { display: none; flex-direction: column; gap: 1px; padding: 2px 0 6px 18px; }
.nav-group.open .subnav { display: flex; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px; color: var(--side-text); text-decoration: none; font-size: 13.5px; }
.subnav a:hover { background: #12233b; color: #e2e8f0; }
.subnav a.active { background: #1d4ed8; color: #fff; box-shadow: 0 2px 10px rgba(29, 78, 216, .35); }
.subnav .bul { font-size: 10px; opacity: .8; }

/* Abwesenheiten */
.filterbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 14px 16px; margin-bottom: 16px; overflow: visible; }
.ffield { display: flex; flex-direction: column; gap: 4px; } .ffield.grow { flex: 1; min-width: 220px; } .ffield label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.ffield select { min-width: 150px; width: auto; } .ffield input[type=search] { width: 100%; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.abspill { --c: #64748b; display: inline-block; padding: 2px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--c) 20%, var(--surface)); color: color-mix(in srgb, var(--c) 78%, var(--text)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
ul.ovl { padding: 10px 14px 6px; } .ovl li.tot { background: var(--primary-soft); color: var(--on-primary-soft); border-radius: 6px; padding: 8px 10px; margin-top: 6px; border: 0; }
.monthtab { width: calc(100% - 28px); margin: 12px 14px 14px; border-collapse: collapse; text-align: center; font-size: 13px; }
.monthtab th { font-weight: 700; padding: 6px 2px; background: var(--surface-2); } .monthtab td { padding: 8px 2px; border-top: 1px solid var(--border); color: var(--muted); } .monthtab td.has { color: var(--text); font-weight: 700; background: var(--primary-soft); }

/* Aufgaben (Kanban) */
.kgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .kgrid { grid-template-columns: 1fr; } }
.kcol.over { outline: 2px dashed var(--primary); outline-offset: 2px; }
.kcount { margin-left: auto; background: rgba(255, 255, 255, .22); border-radius: 99px; min-width: 26px; text-align: center; font-weight: 700; font-size: 12.5px; padding: 1px 8px; }
.kbody { padding: 12px; min-height: 220px; }
.kbody .task { cursor: grab; }
.bars { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 170px 1fr 34px; align-items: center; gap: 12px; font-size: 13px; }
.bar .bt { height: 10px; background: var(--chip-bg); border-radius: 99px; overflow: hidden; } .bar .bf { display: block; height: 100%; border-radius: 99px; }
.bar b { text-align: right; }

/* Protokoll */
.dstats.four { grid-template-columns: repeat(4, 1fr); }
.dtab th.chk, .dtab td.chk { width: 38px; padding-right: 0; } .dtab .chk input { width: 18px; height: 18px; accent-color: #2563eb; cursor: pointer; }
.dtab th.sortable { cursor: pointer; user-select: none; }
@media (max-width: 900px) { .dstats.four { grid-template-columns: repeat(2, 1fr); } }

/* Logo-Kopf wie im Entwurf */
.sidebar .brand { padding: 16px 16px 14px; gap: 12px; }
.sidebar .brand .logo { width: 50px; height: 56px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.sidebar .brand b { font-size: 21px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.05; margin-bottom: 3px; }
.sidebar .brand small { display: block; font-size: 11.5px; line-height: 1.25; color: #cbd5e1; }

.sidebar .brand { position: relative; }
.sidebar .brand .logo { width: 56px; height: 64px; }
.sidebar .brand .theme-btn { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px; margin: 0; }
.sidebar .brand > div:not(.x) { min-width: 0; padding-right: 6px; }
.sidebar .brand small { white-space: nowrap; font-size: 11px; }

/* Einstellungen */
.with-ico { display: flex; align-items: center; gap: 12px; } .with-ico > .ico { color: var(--primary); flex: none; }
.stabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stabs button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; box-shadow: var(--shadow); font: inherit; }
.stabs button b { display: block; font-size: 15px; } .stabs button small { display: block; color: var(--muted); font-size: 12.5px; }
.stabs button:hover { border-color: var(--primary); }
.stabs button.on { background: linear-gradient(180deg, #2f6df0, #1d4fd8); color: #fff; border-color: transparent; } .stabs button.on small { color: #dbe7ff; }
.sgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.sgrid2.wide-right { grid-template-columns: 5fr 7fr; } .sgrid2.even { grid-template-columns: 5fr 7fr; }
.sgrid2 .stack { display: flex; flex-direction: column; gap: 16px; } .sgrid2 > .dcard { margin: 0; }
.sbody { padding: 16px 18px; }
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; }
.sfield { display: flex; gap: 12px; align-items: flex-start; } .sfield > div { flex: 1; min-width: 0; } .sfield.wide { grid-column: 1 / -1; }
.sfield .sfico { width: 24px; flex: none; color: var(--muted); padding-top: 24px; display: flex; justify-content: center; background: none; box-shadow: none; }
.sfield.check .sfico { padding-top: 2px; } .sfield.check .slabel { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.slabel { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.sfield small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.ssave { margin-top: 16px; display: flex; justify-content: flex-end; }
.slabel2 { font-weight: 600; font-size: 13.5px; margin: 10px 0 6px; } .slabel2:first-child { margin-top: 0; }
.schoice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.schoice button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; }
.schoice button.on { background: #2563eb; color: #fff; border-color: #2563eb; }
.schoice .tick { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #2563eb; border: 2px solid #2563eb; display: flex; align-items: center; justify-content: center; }
.srange { display: flex; align-items: center; gap: 14px; } .srange input { flex: 1; } .srange .pct { min-width: 48px; text-align: right; }
.sinfo { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; color: var(--muted); font-size: 12.5px; } .sinfo > .ico { color: var(--primary); flex: none; }
.bg-preview.big { max-width: none; position: relative; margin-bottom: 12px; }
.bg-edit { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 8px; border: 0; background: rgba(15,23,42,.7); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.supl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.smuted { color: var(--muted); margin: 0 0 10px; line-height: 1.55; }
.sdata { display: flex; gap: 14px; flex-wrap: wrap; } .sdata .btn { padding: 12px 18px; gap: 10px; } .sdata .btn small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.sdata .btn.danger { margin-left: auto; }
@media (max-width: 1100px) { .stabs { grid-template-columns: repeat(2, 1fr); } .sgrid2, .sgrid2.wide-right, .sgrid2.even { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .sgrid { grid-template-columns: 1fr; } }

/* Markenkopf: Firmenname in zwei Zeilen */
.brand b { text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.brand b span { display: block; }
.sidebar .brand b { font-size: 15.5px; line-height: 1.12; margin-bottom: 4px; }
.sidebar .brand b span:first-child { font-size: 13.5px; }
.login-card .brand b { font-size: 17px; }

/* Wartungsmodus */
.side-status .warn { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .28); animation: maintpulse 1.6s ease-in-out infinite; }
.side-status.maint { border-color: #7c5a14; color: #fde68a; }
@keyframes maintpulse { 50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, .05); } }
.maint-banner { display: flex; align-items: center; gap: 12px; padding: 9px 20px; background: linear-gradient(90deg, #b45309, #d97706); color: #fff; font-size: 13.5px; }
.maint-banner > .ico { flex: none; } .maint-banner > div { flex: 1; } .maint-banner .btn { background: #fff; color: #92400e; border-color: transparent; font-weight: 600; padding: 5px 12px; }
.maint-card { background: var(--surface); border-radius: 18px; padding: 34px 38px; width: min(560px, 100%); box-shadow: 0 25px 60px rgba(0, 0, 0, .45); text-align: center; border-top: 5px solid #f59e0b; }
.maint-top { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; text-align: left; }
.maint-top .logo { width: 48px; height: 54px; object-fit: contain; } .maint-top b { display: block; text-transform: uppercase; letter-spacing: .05em; font-size: 14px; } .maint-top small { color: var(--muted); }
.maint-ico { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: color-mix(in srgb, #f59e0b 18%, var(--surface)); color: #d97706; }
.maint-card h2 { margin: 0 0 8px; font-size: 26px; }
.maint-msg { color: var(--text-2, var(--text)); line-height: 1.6; margin: 0 auto 18px; max-width: 440px; white-space: pre-line; }
.maint-bar { height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; margin: 0 auto 20px; max-width: 300px; }
.maint-bar i { display: block; height: 100%; width: 38%; border-radius: 6px; background: #f59e0b; animation: maintbar 1.8s ease-in-out infinite; }
@keyframes maintbar { 0% { margin-left: -38%; } 100% { margin-left: 100%; } }
.maint-info { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; text-align: left; overflow: hidden; }
.maint-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; font-size: 13.5px; } .maint-row + .maint-row { border-top: 1px solid var(--border); } .maint-row span { color: var(--muted); }
.maint-card .btn { justify-content: center; }
.maint-note { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }
.maint-link { background: none; border: 0; color: var(--muted); font-size: 12.5px; margin-top: 18px; cursor: pointer; text-decoration: underline; }
.maint-admin { text-align: left; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border); } .maint-admin .btn { width: 100%; }
.mcard-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mcard-status .pill { font-size: 13px; padding: 4px 12px; }
.btn.warnbtn { background: #d97706; color: #fff; border-color: transparent; } .btn.warnbtn:hover { background: #b45309; }

.sidebar .brand { gap: 10px; padding-right: 12px; }
.sidebar .brand .logo { width: 46px; height: 54px; }
.sidebar .brand b { font-size: 12.5px; letter-spacing: .03em; line-height: 1.18; margin: 8px 0 4px; }
.sidebar .brand b span:first-child { font-size: 11px; letter-spacing: .02em; }
.sidebar .brand .theme-btn { top: 5px; right: 6px; width: 24px; height: 24px; border-radius: 7px; }
.sidebar .brand small { font-size: 10.5px; }

/* Auswahllisten (Dropdown-Menüs): in Hell und Dunkel gut lesbar */
select { color-scheme: inherit; cursor: pointer; }
select option, select optgroup { background-color: var(--surface); color: var(--text); padding: 6px 10px; }
select option:checked { background: var(--primary) linear-gradient(var(--primary), var(--primary)); color: #fff; }
select option:disabled { color: var(--muted); }
.dhead select option { background-color: #fff; color: #0f172a; }
.dhead select option:checked { background: #2563eb linear-gradient(#2563eb, #2563eb); color: #fff; }

/* Eigene Auswahlliste (ersetzt das Browser-Menü) */
.csel-pop { position: fixed; z-index: 100000; overflow-y: auto; padding: 5px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 16px 40px rgba(2, 6, 23, .38); font-size: 14px; color: var(--text); animation: cselin .12s ease-out; }
@keyframes cselin { from { opacity: 0; transform: translateY(-4px); } }
.csel-opt { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 8px; cursor: pointer; color: var(--text); line-height: 1.3; }
.csel-opt .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel-opt.active { background: var(--hover-blue, var(--hover)); }
.csel-opt.sel { color: var(--primary); font-weight: 600; }
.csel-opt .tick { flex: none; display: inline-flex; }
.csel-opt.dis { opacity: .45; cursor: default; }
.csel-grp { padding: 8px 11px 3px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.csel-pop::-webkit-scrollbar { width: 8px; } .csel-pop::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
select { cursor: pointer; }

/* ---------- Druck / PDF: Dienstplan sauber auf eine Seite ---------- */
.print-head { display: none; }
@page { size: A3 landscape; margin: 8mm; }
@media print {
  html, body { background: #fff !important; }
  body::before, body::after { display: none !important; }
  .sidebar, .topbar, .maint-banner, .dpage-head, .dstats, .toolbar2, .brushes, .legend2, .bottom-cards, .hintbar, .tabsbar, .no-print, #toasts, .issues, .csel-pop { display: none !important; }
  .shell, .main-col { display: block !important; }
  .main { padding: 0 !important; }
  .print-head { display: block; margin: 0 0 10px; color: #0f172a; }
  .print-head .ph-top { display: flex; align-items: center; gap: 10px; }
  .print-head img { width: 34px; height: 38px; object-fit: contain; }
  .print-head .ph-top b { display: block; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
  .print-head .ph-top span { font-size: 11px; color: #475569; }
  .print-head h2 { margin: 6px 0 2px; font-size: 20px; }
  .print-head .ph-meta { font-size: 11.5px; color: #475569; }
  .sched-wrap { overflow: visible !important; max-height: none !important; border: 0 !important; box-shadow: none !important; zoom: .8; }
  .sched-wrap:has(.by-site) { zoom: .66; }
  .sched, .sched thead th, .sched tfoot td, .sched tfoot th, .sched .nm, .sched .stat-col { position: static !important; }
  .sched .stat-col { left: auto !important; right: auto !important; }
  .sched tr { break-inside: avoid; }
  .sched tr.grp th.nm { white-space: normal !important; text-overflow: clip !important; line-height: 1.15; font-size: 11.5px; }
  .sched tr.grp .chev { display: none !important; }
  .sched, .sched * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Anmeldung */
.login-card .field input { width: 100%; }
.login-note { background: var(--warn-soft); color: var(--on-warn-soft); border-radius: 8px; padding: 9px 12px; margin: 0 0 14px; font-size: 13px; line-height: 1.45; }
.pw-rules { list-style: none; margin: -4px 0 14px; padding: 0; font-size: 12.5px; color: var(--muted); display: grid; gap: 3px; }
.pw-rules li { display: flex; gap: 8px; align-items: center; } .pw-rules li.ok { color: var(--ok); } .pw-rules li span { width: 14px; text-align: center; }
.login-foot { margin: 16px 0 0 !important; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; display: block; }
.tb-who { padding: 8px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; } .tb-who b { display: block; } .tb-who small { color: var(--muted); }
.seclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.seclist li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; } .seclist li > .ico { color: var(--ok); flex: none; margin-top: 2px; }
.seclist small { display: block; color: var(--muted); }

/* Website & Datenbank */
.kv { border-collapse: collapse; font-size: 13px; }
.kv th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 14px 6px 0; white-space: nowrap; vertical-align: top; width: 1%; }
.kv td { padding: 6px 0; word-break: break-all; border-bottom: 1px solid var(--line, rgba(128,128,128,.18)); }
.kv tr:last-child td { border-bottom: 0; }
.kv code { font-size: 12.5px; }
.seclist li > .ico[data-n="alert"], .seclist li.bad > .ico { color: var(--warn, #d97706); }
/* Dienstpläne (Bewachungen) mit Namen im linken Menü */
.subnav-rosters { display: flex; flex-direction: column; gap: 1px; margin: 2px 0; padding-left: 4px; border-left: 2px solid #1e3352; }
.subnav-rosters:empty { display: none; }
.subnav-rosters a { padding: 6px 10px; font-size: 13px; }
.subnav-rosters .rdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.subnav-rosters .rname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subnav-rosters small { font-size: 10.5px; opacity: .65; flex: none; }
.kind-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--bg-soft, #eef2f7); color: var(--muted); vertical-align: middle; }
.rtags { display: flex; flex-wrap: wrap; gap: 4px; }
.rtag.extra { opacity: .8; outline: 1px dashed var(--c, #64748b); outline-offset: -1px; background: transparent; color: var(--c, #64748b); }
.extra-list { display: flex; flex-direction: column; gap: 8px; }
.extra-row { display: grid; grid-template-columns: minmax(170px, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; }
.extra-row .er-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.extra-row .er-name small { font-weight: 400; color: var(--muted); }
.extra-row .er-auto { display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.extra-row .rdot { width: 9px; height: 9px; border-radius: 50%; }
