/* Zeiterfassung - Notion-inspiriertes UI: neutral, ruhig, viel Weissraum. */
:root {
  --ink: #37352f;
  --ink-soft: #5f5e5b;
  --muted: #8a8983;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --border: #ececeb;
  --border-strong: #e0e0de;
  --hover: #f1f1ef;
  --accent: #2383e2;
  --accent-ink: #1a6dc4;
  --green: #2f9e44;
  --green-soft: #ebf6ee;
  --green-ink: #2b8a3e;
  --red: #e03131;
  --red-soft: #fcebea;
  --amber: #f08c00;
  --amber-soft: #fdf2e3;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 15, 15, .04), 0 2px 8px rgba(15, 15, 15, .04);
  --focus-ring: #0b57d0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip-link {
  position: fixed; left: 12px; top: 8px; z-index: 100;
  transform: translateY(-160%); padding: 9px 14px;
  border-radius: var(--radius-sm); background: var(--ink); color: #fff;
  font-weight: 650; box-shadow: var(--shadow);
}
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 4px; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 12px; }
.section-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--red); display: block; margin: 4px 0 0; font-size: .82rem; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 10px 18px; position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 650; color: var(--ink); font-size: 1rem; }
.brand:hover { text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); font-size: .9rem; }
.inline { display: inline; margin: 0; }

/* Subnav (Notion-artige Reiter) */
.subnav {
  display: flex; gap: 2px; flex-wrap: nowrap; align-items: center;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 16px; position: sticky; top: 0; z-index: 20;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  color: var(--ink-soft); font-size: .9rem; font-weight: 500;
  padding: 12px 12px; border-bottom: 2px solid transparent;
  flex: 0 0 auto; white-space: nowrap;
}
.subnav a:hover { color: var(--ink); text-decoration: none; background: var(--hover); border-radius: 6px 6px 0 0; }
.subnav a.active, .subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 650; }
.subnav-admin { color: var(--accent) !important; }
.subnav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: 0 0 auto; white-space: nowrap; }
.subnav-logout {
  border: none; background: transparent; color: var(--ink-soft);
  font-size: .9rem; font-weight: 500; cursor: pointer; padding: 12px 4px;
}
.subnav-logout:hover { color: var(--red); }

/* Layout */
.container { max-width: 760px; margin: 0 auto; padding: 22px 16px 56px; }
.container-wide { max-width: 1500px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 22px; margin-bottom: 16px;
}
.login-card { max-width: 400px; margin: 40px auto 0; }
.error-card { max-width: 560px; margin: 48px auto 0; text-align: center; }
.error-card .btn { margin-top: 12px; }
.error-status { margin: 0 0 4px; color: var(--accent); font-size: 2.4rem; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }

/* Forms */
label { display: block; font-weight: 550; margin: 14px 0 6px; font-size: .88rem; color: var(--ink-soft); }
.input {
  width: 100%; padding: 9px 12px; font-size: 1rem; color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(35,131,226,.16); }
.input:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.pin-display { letter-spacing: .45em; text-align: center; font-size: 1.4rem; padding: 12px; }
.code-input { text-align: center; letter-spacing: .35em; font-size: 1.35rem; }
.checkbox { font-weight: 400; display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--ink-soft); }
.form-hint { margin: 7px 0 0; color: var(--muted); font-size: .82rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hours-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.hours-grid label { margin: 8px 0 4px; text-align: center; }
.hours-grid .input { padding: 8px 6px; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; font-size: .92rem; font-weight: 550;
  border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer;
  line-height: 1.2; transition: background .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: #fff; border-color: var(--border-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--hover); }
.btn-block { width: 100%; margin-top: 18px; }
.linklist { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
form.is-submitting :is(button[type="submit"], input[type="submit"]) {
  pointer-events: none; cursor: wait; opacity: .68;
}

/* Keypad */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.key {
  padding: 16px 0; font-size: 1.3rem; font-weight: 550; color: var(--ink);
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  cursor: pointer; user-select: none; transition: background .1s ease;
}
.key:hover { background: var(--hover); }
.key:active { background: #e9e9e7; transform: translateY(1px); }
.key-util { color: var(--muted); }

/* Live-Uhr + Tagessumme */
.clock { text-align: center; margin: 4px 0 18px; }
.clock .time { font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.clock .date { color: var(--muted); font-size: .9rem; }
.today-worked {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--hover); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px;
}
.today-worked .val { font-weight: 650; font-variant-numeric: tabular-nums; }

/* Stempel-Status */
.status { display: flex; align-items: center; gap: 12px; padding: 4px 0 18px; }
.status .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); }
.status-label { font-size: 1.4rem; font-weight: 650; }
.status-anwesend .dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-pause .dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.status-aus .dot { background: #b6b5b0; }

/* Grosse Stempel-Buttons */
.stamp-actions { display: grid; gap: 10px; }
.btn-stamp {
  width: 100%; padding: 20px 0; font-size: 1.15rem; font-weight: 650; color: #fff;
  border: none; border-radius: var(--radius); cursor: pointer; transition: filter .12s ease;
}
.btn-stamp:hover { filter: brightness(.96); }
.btn-stamp:active { transform: translateY(1px); }
.stamp-kommen { background: var(--green); }
.stamp-gehen { background: var(--red); }
.stamp-pause { background: var(--amber); }
.kiosk-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.kiosk-actions .btn-stamp { padding: 16px 0; font-size: 1rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: none; }
.tl-time { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 50px; }
.tl-kind { flex: 1; color: var(--ink-soft); }

/* Tags / Badges */
.tag { font-size: .72rem; background: var(--hover); color: var(--ink-soft); padding: 2px 8px; border-radius: 999px; }
.tag-abs { background: #eef3fb; color: var(--accent-ink); }
.badge { font-size: .72rem; padding: 2px 8px; border-radius: 999px; }
.badge-beantragt { background: var(--amber-soft); color: #8a5a00; }
.badge-genehmigt { background: var(--green-soft); color: var(--green-ink); }
.badge-abgelehnt { background: var(--red-soft); color: var(--red); }

/* Status-Badges (Schicht-Abgleich) */
.status-badge { display: inline-block; font-size: .76rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status-ok { background: var(--green-soft); color: var(--green-ink); }
.status-abweichung { background: var(--amber-soft); color: #b8730a; }
.status-offen { background: var(--amber-soft); color: #b8730a; }
.status-fehlt { background: var(--red-soft); color: var(--red); }
.status-ungeplant { background: #eef3fb; color: var(--accent-ink); }
.mono { font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions .btn { padding: 4px 10px; font-size: .82rem; }

/* Dashboard v2 */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.num-sub { font-size: 1rem; color: var(--muted); font-weight: 500; }
.live-badge { background: var(--green-soft); color: var(--green-ink); font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.area-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin-bottom: 14px; background: var(--hover); }
.area-bar span { display: block; height: 100%; min-width: 6px; }
.area-group { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.area-group:last-child { border-bottom: none; }
.btn-approve { background: var(--green); color: #fff; border: none; padding: 6px 12px; font-size: .82rem; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; }
.btn-approve:hover { background: var(--green-ink); }
.btn-reject { background: #fff; color: var(--red); border: 1px solid #f3cfcd; padding: 6px 12px; font-size: .82rem; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; }
.btn-reject:hover { background: var(--red-soft); }
.req-item { grid-template-columns: 1fr auto; }
@media (max-width: 900px) { .dash-cols { grid-template-columns: 1fr; } }

/* Flash */
.flashes { margin-bottom: 16px; display: grid; gap: 8px; }
.flash { padding: 11px 14px; border-radius: var(--radius-sm); font-size: .92rem; border: 1px solid transparent; }
.flash-error { background: var(--red-soft); color: var(--red); border-color: #f3cfcd; }
.flash-success { background: var(--green-soft); color: var(--green-ink); border-color: #cce8d4; }
.flash-warning { background: var(--amber-soft); color: #b8730a; border-color: #f3ddb9; }

/* Admin Dashboard */
.adm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 4px; }
.stat { background: var(--hover); border-radius: var(--radius-sm); padding: 16px 12px; text-align: center; }
.stat .num { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .82rem; }
.emp-list { list-style: none; margin: 0; padding: 0; }
.emp-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.emp-item:last-child { border-bottom: none; }
.dot-inline { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.dot-anwesend { background: var(--green); }
.dot-pause { background: var(--amber); }
.dot-aus { background: #b6b5b0; }

/* Tabellen */
.table-scroll {
  width: 100%; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain;
  border-radius: var(--radius-sm); scrollbar-width: thin;
}
.table-scroll .ztable { min-width: 520px; }
.table-scroll-wide .ztable { min-width: 760px; }
.table-scroll-extra-wide .ztable { min-width: 920px; }
.ztable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ztable th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; padding: 8px 8px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.ztable td { padding: 9px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.ztable tbody tr:hover { background: var(--hover); }
.ztable tfoot td { font-weight: 650; border-top: 2px solid var(--border-strong); border-bottom: none; }
.ztable .is-weekend td { color: var(--muted); background: #fafafa; }
.saldo.pos { color: var(--green-ink); }
.saldo.neg { color: var(--red); }
.saldo.zero { color: var(--muted); }

.zeiten-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.viewtabs { display: inline-flex; background: var(--hover); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.viewtabs a { padding: 5px 14px; border-radius: 5px; color: var(--ink-soft); font-size: .9rem; }
.viewtabs a:hover { text-decoration: none; }
.viewtabs a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.balance { font-weight: 600; }
.period-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.period { font-weight: 600; min-width: 180px; text-align: center; }

.entries-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-del { display: inline-flex; align-items: center; gap: 4px; margin: 0; background: var(--hover); border-radius: 999px; padding: 2px 4px 2px 10px; }
.mini { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; }
.x:hover { color: var(--red); }

/* Dokumente */
.doc-list { list-style: none; margin: 0 0 12px; padding: 0; }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.doc-item:last-child { border-bottom: none; }
.doc-name { flex: 1; }

/* Abwesenheiten */
.abs-list { list-style: none; margin: 0; padding: 0; }
.abs-item { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.abs-item:last-child { border-bottom: none; }
.abs-when { font-weight: 650; font-variant-numeric: tabular-nums; }
.abs-kind { flex: 1; min-width: 120px; color: var(--ink-soft); }

/* Audit-Protokoll */
.audit-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.audit-filter > div { flex: 1 1 280px; }
.audit-filter label { margin-top: 0; }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-item { padding: 15px 0; border-bottom: 1px solid var(--border); }
.audit-item:first-child { padding-top: 0; }
.audit-item:last-child { padding-bottom: 0; border-bottom: none; }
.audit-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.audit-head time { font-weight: 650; font-variant-numeric: tabular-nums; }
.audit-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 9px 0 0; }
.audit-meta > div { display: flex; align-items: baseline; gap: 6px; min-width: 150px; }
.audit-meta dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; }
.audit-meta dd { margin: 0; color: var(--ink-soft); }
.audit-subtle { color: var(--muted); font-size: .82rem; }
.audit-values { margin-top: 9px; }
.audit-values summary { width: fit-content; color: var(--ink-soft); cursor: pointer; font-size: .85rem; }
.audit-value-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.audit-value-grid span { display: block; margin-bottom: 3px; color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; }
.audit-value-grid pre { max-height: 180px; overflow: auto; margin: 0; padding: 9px 10px; border-radius: var(--radius-sm); background: var(--hover); color: var(--ink-soft); font: .78rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.audit-pagination .is-disabled { opacity: .45; cursor: default; }
.audit-page-status { min-width: 110px; color: var(--muted); text-align: center; font-size: .88rem; }

/* Schichtplaner */
.shift-palette { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.planner-msg { color: var(--red); font-size: .85rem; min-height: 1.1em; margin-top: 8px; }
.planner { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.planner-grid {
  display: grid; grid-template-columns: 180px repeat(7, minmax(120px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-sm); min-width: 760px;
}
.pg-cell { background: var(--surface); padding: 8px; }
.pg-corner { background: var(--bg); }
.pg-head { text-align: center; font-weight: 600; font-size: .82rem; padding: 8px 4px; line-height: 1.25; }
.pg-head.is-today { background: #eef3fb; }
.pg-emp { background: #fafafa; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.pg-drop { display: flex; flex-direction: column; gap: 4px; min-height: 64px; }
.pg-drop.drag-over { background: var(--green-soft); outline: 2px dashed var(--green); outline-offset: -2px; }
.pg-cov { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: #fafafa; display: flex; align-items: center; justify-content: center; }

.shift-chip {
  --c: #2383e2;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); border-left: 4px solid var(--c);
  border-radius: 6px; background: #fff; padding: 4px 6px; font-size: .76rem; cursor: grab;
}
.shift-chip .chip-label { font-weight: 600; }
.shift-chip .chip-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.shift-chip.dragging { opacity: .45; }
.palette-chip { background: #fff; }
.assigned-chip { width: 100%; }
.chip-x { margin-left: auto; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
.chip-x:hover { color: var(--red); }

/* Schichtplaner v2: Layout + Pool + Bereiche */
.planner-layout { display: flex; gap: 16px; align-items: flex-start; }
.emp-pool { width: 210px; flex: 0 0 210px; position: sticky; top: 58px; }
.emp-pill { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; cursor: grab; }
.emp-pill:hover { background: var(--hover); border-color: var(--accent); }
.ep-name { font-weight: 600; font-size: .9rem; }
.ep-meta { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.planner-card { flex: 1; min-width: 0; }
.pg-area { background: #fafafa; display: flex; align-items: center; font-weight: 600; border-left: 4px solid var(--c, var(--border-strong)); }
.pg-total { font-weight: 700; }
.chip-badge { font-size: .62rem; background: #fff3bf; color: #8a5a00; border-radius: 999px; padding: 1px 5px; }
.occ-chip { width: 100%; }

/* Zeit-Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,15,15,.35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-overlay[hidden] { display: none; }
.modal-card { background: var(--surface); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.18); padding: 22px; width: 100%; max-width: 400px; }
.modal-card h2 { margin-bottom: 2px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.preset-btn { border: 1px solid var(--border-strong); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: .8rem; cursor: pointer; }
.preset-btn:hover { background: var(--hover); }

/* Entfernen-Popover */
.popover { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 210px; overflow: hidden; }
.popover[hidden] { display: none; }
.popover button { border: none; background: transparent; text-align: left; padding: 10px 14px; cursor: pointer; font-size: .88rem; }
.popover button:hover { background: var(--hover); }

@media (max-width: 760px) {
  .planner-layout { flex-direction: column; }
  .emp-pool { width: 100%; flex: none; position: static; }
}

/* Kalender-Woche (Zeitachse) */
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; }
.leg { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-soft); }
.leg-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.cal-head { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border-strong); }
.cal-day-head { text-align: center; font-weight: 600; font-size: .82rem; padding: 8px 4px; line-height: 1.25; border-left: 1px solid var(--border); }
.cal-day-head.is-today { background: #eef3fb; }
.cal-body { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); grid-template-rows: 1fr; position: relative; }
.cal-gutter, .cal-col { height: 100%; }
.cal-gutter { position: relative; }
.cal-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--border); }
.cal-col.is-today { background: #f7faff; }
.cal-col.drag-over { background: var(--green-soft); outline: 2px dashed var(--green); outline-offset: -2px; }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }

.cal-block { position: absolute; border-radius: 6px; background: var(--c, #2383e2); color: #fff;
  padding: 3px 18px 3px 7px; overflow: hidden; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.14);
  display: flex; flex-direction: column; gap: 0; min-height: 22px; }
.cal-block.dragging { opacity: .5; }
.cb-name { font-weight: 650; font-size: .76rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-time { font-size: .7rem; opacity: .9; font-variant-numeric: tabular-nums; }
.cal-block .chip-x { position: absolute; top: 1px; right: 3px; color: #fff; opacity: .8; margin: 0; padding: 0; }
.cal-block .chip-x:hover { opacity: 1; color: #fff; }
.cal-block .chip-badge { position: absolute; bottom: 2px; right: 4px; background: rgba(255,255,255,.28); color: #fff; }
.cal-resize { position: absolute; left: 0; right: 0; height: 8px; cursor: ns-resize; z-index: 2; }
.cal-resize-top { top: 0; }
.cal-resize-bottom { bottom: 0; }
.cal-block:hover .cal-resize { background: rgba(255,255,255,.35); }
.cal-block.resizing { opacity: .9; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }

/* Loeschen-Bereich im Bearbeiten-Dialog */
.modal-delete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.btn-del { padding: 5px 10px; font-size: .82rem; }

/* Responsive */
@media (max-width: 560px) {
  .adm-grid { grid-template-columns: repeat(2, 1fr); }
  .hours-grid { grid-template-columns: repeat(4, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .container { padding: 16px 14px 48px; }
  .login-card { margin-top: 8px; }
  .error-card { margin-top: 8px; }
  .subnav { padding-inline: max(8px, env(safe-area-inset-left)); }
  .audit-filter { align-items: stretch; }
  .audit-filter .btn { min-height: 42px; }
  .audit-value-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
