/* Heuser Personaldisposition – Stylesheet im Heuser-Design (Anthrazit, Türkis, Papierweiß; Rot nur für Warnungen).
   Grundlage: MayRiesen Personaldisposition 0.10.0, Farben und Schrift aus der Heuser-Landingpage (public/styles.css). */
:root {
  /* Heuser-Markenfarben */
  --brand: #222833; --brand-panel: #2b3340; --brand-ink: #f9eee6; --accent: #58d1ce; --accent-ink: #182f32; --accent-hover: #83e2df;
  --brand-2: #247c7b; --brand-soft: #def4f3; --danger: #b3261e; --danger-soft: #fbeceb;
  --ink: #222833; --muted: #6b717c; --line: #e2e0da; --line-2: #efede8; --bg: #f6f5f1; --surface: #fff;
  --weekend: #eceae4; --today: #c8102e; --warn: #b26a00; --warn-soft: #fff4e0; --ok: #1f7a4d; --ok-soft: #e6f4ec;
  --vacation: #e3a92b; --vacation-soft: #fdf3dc; --private: #8e939b; --training: #4f86b8; --training-soft: #e3eef8;
  --label-w: 300px; --radius: 3px; --shadow: 0 1px 2px rgba(34, 40, 51, .06), 0 1px 3px rgba(34, 40, 51, .08);
  font-family: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 13.5px; line-height: 1.4; min-width: 1240px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
small { display: block; color: var(--muted); font-size: 11.5px; }
code { font-family: Consolas, monospace; font-size: 12px; background: var(--line-2); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 6px 0; }

/* ---------- Grundlayout ---------- */
.shell { display: flex; height: 100vh; }
.sidebar { width: 212px; flex: none; background: var(--brand); color: #d3d5da; display: flex; flex-direction: column; padding: 18px 12px; }
.brand { display: grid; gap: 8px; padding: 6px 8px 24px; }
.brand img { width: 150px; height: auto; display: block; }
.brand strong { color: var(--accent); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.brand strong::before { content: ''; width: 18px; height: 2px; background: var(--accent); }
.brand small { color: #b9bec7; }
.nav { display: grid; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #d3d5da; padding: 9px 10px; border-radius: var(--radius); text-align: left; font-weight: 600; }
.nav-item span { width: 18px; text-align: center; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.is-active { background: var(--brand-panel); color: var(--brand-ink); box-shadow: inset 3px 0 var(--accent); }
.nav-item.is-active span { color: var(--accent); opacity: 1; }
.sidebar-foot { margin-top: auto; font-size: 11px; color: #9ba1ab; padding: 8px 6px 0; border-top: 1px solid #424956; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 52px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.period-toolbar { display: flex; align-items: center; gap: 6px; }
.period-title { min-width: 210px; text-align: center; font-size: 14px; color: var(--brand); }
.view { flex: 1; overflow: auto; padding: 18px 22px 28px; }

/* ---------- Bedienelemente ---------- */
.button, .icon-button { height: 32px; border: 1px solid #d6d3cc; background: #fff; border-radius: var(--radius); padding: 0 12px; font-weight: 600; color: #2d3440; white-space: nowrap; }
.button:hover, .icon-button:hover { border-color: var(--brand); color: var(--brand); }
.button:disabled { opacity: .5; cursor: default; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.button.danger { color: var(--danger); }
.button.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.icon-button { width: 32px; padding: 0; font-size: 18px; line-height: 1; }
.link-button { border: 0; background: none; color: var(--brand-2); font-weight: 600; padding: 2px 4px; }
.link-button:hover { text-decoration: underline; }
.link-button.danger { color: var(--danger); }
.mini-button { width: 24px; height: 24px; border: 1px solid #d6d3cc; border-radius: 5px; background: #fff; color: var(--brand); font-weight: 700; flex: none; }
.segmented { display: inline-flex; border: 1px solid #d6d3cc; border-radius: var(--radius); overflow: hidden; background: #fff; }
.segmented button { border: 0; background: transparent; padding: 0 12px; height: 30px; font-weight: 600; color: #555b66; border-right: 1px solid #e6e3dc; }
.segmented button:last-child { border-right: 0; }
.segmented button.is-selected { background: var(--brand); color: var(--brand-ink); box-shadow: inset 0 -2px var(--accent); }
input, select, textarea { border: 1px solid #d6d3cc; border-radius: var(--radius); background: #fff; padding: 6px 9px; min-height: 32px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--brand-2); }

.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.view-head h2 { font-size: 22px; color: var(--brand); letter-spacing: -.02em; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 10.5px; font-weight: 700; color: var(--brand-2); margin: 0 0 2px; }
.sub { color: var(--muted); margin: 3px 0 0; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.actions.vertical { flex-direction: column; align-items: stretch; }
.filterbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8px; margin-bottom: 10px; }
.filterbar.inner { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; }
.filterbar select { max-width: 200px; }
.search { display: flex; align-items: center; border: 1px solid #d6d3cc; border-radius: var(--radius); padding-left: 8px; background: #fff; }
.search span { color: var(--muted); }
.search input { border: 0; min-width: 180px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: #3c424d; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin: 2px 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 18px; height: 10px; border-radius: 3px; font-style: normal; }
.lg-project { background: var(--brand-2); }
.lg-vacation { background: var(--vacation); }
.lg-private { background: var(--private); }
.lg-training { background: var(--training); }
.lg-weekend { width: auto; height: auto; padding: 0 4px; font-size: 9px; font-weight: 700; background: #fff; border: 1px dashed #8e939b; color: #4a505b; }
.lg-critical { background: #fff; border: 2px solid var(--danger); }
.cap-free { background: var(--ok-soft); border: 1px solid #b9dcc7; } .cap-partial { background: #e3f5f4; border: 1px solid #a9e0dd; } .cap-full { background: #bfe9e7; border: 1px solid #8fd3d0; } .cap-over { background: var(--danger-soft); border: 1px solid #e5a5a5; } .cap-absent { background: var(--line-2); border: 1px solid var(--line); }

.badge { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; padding: 1px 5px; border-radius: 3px; vertical-align: 1px; }
.badge-internal { background: var(--brand-soft); color: var(--brand); }
.badge-external { background: #fff1e6; color: #9a4b00; border: 1px solid #f2cfae; }
.company { color: #7a4a14; font-weight: 600; }
.company.is-missing { color: var(--danger); }
.driver { margin-left: 5px; font-size: 12px; }
.driver-badge { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; color: #165c3a; background: var(--ok-soft); border: 1px solid #b9dcc7; border-radius: 3px; padding: 0 4px; }
.pill { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 10px; margin-right: 6px; }
.pill.is-critical { background: var(--danger); color: #fff; }
.pill.is-warning { background: var(--warn-soft); color: var(--warn); border: 1px solid #f0d29c; }
.status { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--line-2); color: #3a404b; }
.status.is-archived { background: #f1f1f1; color: #888; }
.chips { display: flex; flex-wrap: wrap; gap: 3px; }
.chip { font-size: 11px; background: var(--line-2); border-radius: 3px; padding: 1px 6px; color: #3a404b; }
.chip.is-more { background: #e8e6e0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 11px; flex: none; }
.avatar.is-external { background: #fff1e6; color: #9a4b00; }
.person { display: flex; align-items: center; gap: 8px; min-width: 0; width: 100%; }
.person-text { min-width: 0; flex: 1; }
.person-text strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person.compact .avatar { width: 26px; height: 26px; }
.load { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 10px; flex: none; }
.load.is-free { background: var(--ok-soft); color: var(--ok); } .load.is-partial { background: #e3f5f4; color: var(--brand-2); } .load.is-full { background: #bfe9e7; color: var(--brand); } .load.is-over { background: var(--danger); color: #fff; } .load.is-muted { background: var(--line-2); color: var(--muted); }

/* ---------- Hinweise ---------- */
.notice { background: var(--warn-soft); border: 1px solid #f0d29c; border-left: 4px solid var(--warn); border-radius: 4px; padding: 9px 12px; margin-bottom: 10px; }
.notice.is-critical { background: #fff7f6; border-color: #efc4c4; border-left-color: var(--danger); }
.notice summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; }
.notice summary::-webkit-details-marker { display: none; }
.notice .summary-link { margin-left: auto; color: var(--brand-2); font-weight: 600; font-size: 12px; }
.notice[open] .summary-link::after { content: ' ▴'; }
.notice ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.notice li { display: flex; gap: 8px; align-items: baseline; }
.notice li span:last-child { color: var(--muted); }

/* ---------- Zeitachse / Board ---------- */
.board { overflow: auto; max-height: calc(100vh - 255px); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); position: relative; }
.board-grid { display: grid; grid-template-columns: var(--label-w) var(--timeline-w); width: max-content; }
.tl-grid { display: grid; grid-template-columns: repeat(var(--days), var(--day-w)); }
.corner { position: sticky; left: 0; top: 0; z-index: 6; background: #f9f8f5; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 12px; font-weight: 700; color: var(--brand); }
.tl-head { position: sticky; top: 0; z-index: 5; background: #f9f8f5; border-bottom: 1px solid var(--line); }
.tl-head-weeks .tl-week { border-left: 1px solid #d3d0c8; padding: 5px 6px 3px; overflow: hidden; white-space: nowrap; }
.tl-head-weeks .tl-week:first-child { border-left: 0; }
.tl-week strong { font-size: 12px; color: var(--brand); }
.tl-week small { display: inline; margin-left: 6px; font-size: 10.5px; }
.tl-week.is-current strong { color: var(--today); }
.tl-head-days { border-top: 1px solid var(--line-2); }
.tl-day { text-align: center; font-size: 10px; color: #737882; padding: 2px 0 3px; border-left: 1px solid var(--line-2); overflow: hidden; }
.tl-day:nth-child(7n+1) { border-left-color: #d3d0c8; }
.tl-day span { display: block; line-height: 1.1; }
.tl-day b { display: block; font-size: 11px; color: #363c47; line-height: 1.2; }
.tl-day.is-weekend { background: var(--weekend); color: #9a9ea6; }
.tl-day.is-weekend b { color: #90949c; }
.tl-day.is-today { background: #fde8eb; } .tl-day.is-today b { color: var(--today); }
.tl-day.is-outside b { color: #aaadb3; font-weight: 500; }
.tl-day.is-month-start { box-shadow: inset 2px 0 #8fd3d0; }

.row-label { position: sticky; left: 0; z-index: 3; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-2); padding: 6px 10px; display: flex; align-items: center; gap: 8px; min-height: 38px; }
.lane { position: relative; border-bottom: 1px solid var(--line-2); min-height: 38px; grid-template-rows: repeat(var(--lanes, 1), 28px); row-gap: 3px; padding: 5px 0;
  /* Gleiche Spaltendefinition wie im Kopf: Wochenende Sa/So, Tageslinien, Wochenlinie. */
  background-image: linear-gradient(to right, transparent calc(var(--day-w) * 5), var(--weekend) calc(var(--day-w) * 5)), linear-gradient(to right, #d3d0c8 1px, transparent 1px), linear-gradient(to right, var(--line-2) 1px, transparent 1px);
  background-size: calc(var(--day-w) * 7) 100%, calc(var(--day-w) * 7) 100%, var(--day-w) 100%; }
.section-label { background: #f2f1ec; font-weight: 700; color: #3a404b; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; min-height: 26px; padding: 4px 12px; justify-content: space-between; }
.section-label small { display: inline; }
.section-lane { min-height: 26px; padding: 0; background-color: #f2f1ec; }
.group-label { background: #faf9f6; border-top: 2px solid var(--line); box-shadow: inset 4px 0 var(--c); align-items: flex-start; padding: 8px 10px 8px 12px; }
.group-lane { background-color: #faf9f6; border-top: 2px solid var(--line); grid-template-rows: 1fr; align-items: center; }
.group-text { flex: 1; min-width: 0; }
.group-text strong { color: var(--brand); }
.group-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-count b { color: var(--ink); }
.team-count em { color: var(--warn); font-style: normal; }
.collapse { border: 0; background: none; color: var(--brand); font-size: 13px; padding: 0 2px; }
.flag { display: inline-block; margin-top: 3px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.flag.is-critical { background: var(--danger); color: #fff; } .flag.is-warning { background: var(--warn-soft); color: var(--warn); }
.person-label { padding-left: 22px; }
.empty-label { color: var(--muted); font-size: 12px; padding-left: 26px; }
.period-bar { height: 8px; border-radius: 4px; background: var(--c); opacity: .35; grid-row: 1; }

.bar { position: relative; z-index: 1; display: flex; align-items: center; height: 28px; margin: 0 1px; border-radius: 5px; background: var(--c); color: #fff; font-size: 11px; font-weight: 700; overflow: hidden; cursor: grab; user-select: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(255, 255, 255, .12), rgba(0, 0, 0, .05)); pointer-events: none; }
.bar-label { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); flex: 1; }
.bar.clip-start { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.clip-end { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bar.is-critical { box-shadow: 0 0 0 2px var(--danger), inset 0 0 0 1px rgba(255, 255, 255, .5); }
.bar.is-warning { box-shadow: 0 0 0 2px var(--warn); }
.bar.is-readonly { cursor: pointer; opacity: .55; }
.bar.is-dragged { z-index: 4; opacity: .9; cursor: grabbing; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.bar[data-preview]:not([data-preview=''])::before { content: attr(data-preview); position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, .55); padding: 0 5px; border-radius: 3px; z-index: 2; }
.grip { width: 7px; align-self: stretch; cursor: ew-resize; flex: none; background: rgba(255, 255, 255, .0); }
.grip:hover { background: rgba(255, 255, 255, .35); }
/* Sa/So innerhalb einer Einsatzphase: sichtbare Lücke, Einsätze gelten nur Mo–Fr. */
.bar-gap { position: absolute; top: -1px; bottom: -1px; z-index: 1; background: var(--weekend); border-left: 1px dashed rgba(0, 0, 0, .12); border-right: 1px dashed rgba(0, 0, 0, .12); box-sizing: border-box; pointer-events: none; }
.bar.is-dragged .bar-gap { display: none; }
.grip { position: relative; z-index: 2; }
.abs { z-index: 1; display: flex; align-items: center; height: 22px; align-self: center; margin: 0 1px; border-radius: 4px; font-size: 10.5px; font-weight: 700; overflow: hidden; white-space: nowrap; }
.abs span { padding: 0 5px; overflow: hidden; text-overflow: ellipsis; }
.abs-vacation { background: var(--vacation-soft); color: #7a5300; border: 1px solid var(--vacation); }
.abs-private { background: #efeeea; color: #4c5568; border: 1px solid var(--private); }
.abs-training { background: var(--training-soft); color: #22527d; border: 1px solid var(--training); }
.we-mark.is-removable { cursor: pointer; }
.we-mark.is-removable:hover { background: var(--weekend); }
.we-mark { z-index: 1; align-self: center; height: 20px; margin: 0 2px; border: 1px dashed var(--c); border-radius: 4px; background: #fff; font-size: 9px; font-weight: 800; color: #3a404b; display: grid; place-items: center; }
.tl-today { grid-row: 1 / -1; width: 2px; background: var(--today); opacity: .55; justify-self: center; pointer-events: none; z-index: 0; }
.is-drop-target { background-color: #e0f6f5 !important; box-shadow: inset 0 0 0 2px var(--brand-2); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }

/* ---------- Tabellen & Karten ---------- */
.table-card, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); }
.card { padding: 14px 16px; margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.card h3 { font-size: 15px; color: var(--brand); }
.table-card { overflow: auto; max-height: calc(100vh - 230px); }
.table { width: 100%; border-collapse: collapse; }
.table th { position: sticky; top: 0; z-index: 1; background: #f9f8f5; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #737882; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover td { background: #fbfaf7; }
.table tr.is-archived td, .table tr.is-inactive td { color: #8a93a6; }
.table tr.is-selected td { background: var(--brand-soft); }
.table .check { width: 34px; }
.row-actions { white-space: nowrap; text-align: right; }
.group-row td { background: #f2f1ec; padding: 6px 10px; }
.group-row strong { color: #3a404b; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.group-row span { margin-left: 8px; color: var(--muted); font-size: 11px; }
.group-row.is-top td { background: var(--brand); }
.group-row.is-top strong, .group-row.is-top span { color: #fff; }
.group-row.is-top.is-external td { background: #7a4a14; }
.group-row.is-missing strong { color: var(--danger); }
.contact span { display: block; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 0; }
.progress { display: flex; gap: 8px; align-items: center; }
.progress-track { width: 90px; height: 7px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--c); }
.progress strong { font-size: 12px; white-space: nowrap; }
.detail { margin-top: 12px; border-top: 4px solid var(--c); }
.detail-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.detail h3 { font-size: 17px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 8px 18px; margin: 10px 0 0; }
.facts dt { font-size: 10.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 600; }
.note { background: var(--line-2); padding: 6px 10px; border-radius: 6px; }
.phase-line { font-size: 12px; color: var(--muted); }
.phase-line.is-current { color: var(--ink); }
.abs-tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 3px; border-left: 3px solid var(--c); background: var(--line-2); margin-right: 6px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { font-size: 30px; color: #b9bcc2; }
.empty h3 { color: #3a404b; margin: 6px 0; font-size: 15px; }

/* Büro-Urlaubsübersicht */
.ov-grid { --ov-w: 112px; overflow-x: auto; }
.ov-head, .ov-dep-head { display: grid; grid-template-columns: 240px 1fr; align-items: stretch; }
.ov-head { border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.ov-head > span { padding: 6px 10px; text-transform: uppercase; letter-spacing: .04em; align-self: end; }
.ov-cells { display: grid; grid-template-columns: repeat(var(--ov-cols), var(--ov-w)); }
.ov-week { padding: 6px 8px; border-left: 1px solid var(--line); }
.ov-week strong { display: block; color: var(--brand); font-size: 12px; }
.ov-week small { font-size: 10.5px; }
.ov-dep { border-bottom: 1px solid var(--line-2); }
.ov-dep-head { width: 100%; border: 0; background: #fff; text-align: left; padding: 0; }
.ov-dep-head:hover { background: #fbfaf7; }
.ov-dep.is-critical .ov-dep-head { box-shadow: inset 3px 0 var(--danger); }
.ov-name { display: flex; gap: 2px; flex-direction: column; padding: 8px 10px; }
.caret { position: absolute; }
.ov-dep-head { position: relative; }
.ov-dep-head .caret { left: 0; top: 9px; color: var(--brand); font-size: 11px; }
.ov-name { padding-left: 16px; }
.ov-name .crit { color: var(--danger); }
.ov-cell { border-left: 1px solid var(--line-2); padding: 6px 8px; min-height: 42px; }
.ov-cell strong { font-size: 14px; }
.ov-cell.has-vacation { background: var(--vacation-soft); }
.ov-cell.is-critical { background: var(--danger-soft); color: var(--danger); }
.ov-person { display: grid; grid-template-columns: 240px 1fr; font-size: 12px; border-top: 1px dashed var(--line-2); }
.ov-person > span { padding: 6px 10px 6px 26px; }
.ov-person .ov-cell { min-height: 30px; }
.ov-conflicts { margin: 6px 10px 10px 26px; padding: 0; list-style: none; color: var(--danger); font-weight: 600; font-size: 12px; }

/* Kapazitätsmatrix */
.cap-wrap { overflow: auto; max-height: calc(100vh - 280px); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); }
.cap-table { border-collapse: separate; border-spacing: 0; }
.cap-table th { position: sticky; top: 0; z-index: 2; background: #f9f8f5; font-size: 11px; color: var(--brand); padding: 6px 4px; border-bottom: 1px solid var(--line); min-width: 74px; text-align: center; }
.cap-table th small { font-weight: 400; }
.cap-table th.is-current { color: var(--today); }
.cap-table td { border-bottom: 1px solid var(--line-2); padding: 3px; text-align: center; }
.cap-table .sticky { position: sticky; left: 0; z-index: 3; background: #fff; text-align: left; min-width: 250px; max-width: 250px; padding: 5px 10px; border-right: 1px solid var(--line); }
.cap-table th.sticky { z-index: 4; background: #f9f8f5; }
.cap-table .fc { min-width: 116px; text-align: left; font-size: 12px; padding: 4px 8px; border-right: 1px solid var(--line-2); }
.cap-table .fc strong { color: var(--brand); }
.cap-table tfoot td { position: sticky; bottom: 0; background: #f9f8f5; font-weight: 700; border-top: 1px solid var(--line); font-size: 12px; }
.cap-cell { width: 70px; height: 40px; border: 1px solid transparent; border-radius: 5px; position: relative; display: grid; place-content: center; gap: 0; padding: 0; }
.cap-cell b { font-size: 14px; }
.cap-cell small { font-size: 10px; line-height: 1.1; }
.cap-cell.is-free { background: var(--ok-soft); border-color: #b9dcc7; color: var(--ok); }
.cap-cell.is-partial { background: #e3f5f4; border-color: #a9e0dd; color: var(--brand-2); }
.cap-cell.is-full { background: #bfe9e7; border-color: #8fd3d0; color: var(--brand); }
.cap-cell.is-over { background: var(--danger-soft); border-color: #e5a5a5; color: var(--danger); }
.cap-cell.is-absent { background: var(--line-2); color: var(--muted); }
.cap-cell:hover { outline: 2px solid var(--brand); }
.we-dot { position: absolute; top: 1px; right: 2px; font-size: 7.5px; font-style: normal; font-weight: 800; color: #6b4a00; }
.cap-detail .cap-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.cap-detail .cap-line.total { border-top: 2px solid var(--ink); font-weight: 700; }
.cap-free { margin-top: 10px; }
.range-label { color: var(--brand); padding: 0 6px; }

/* ---------- Dialoge ---------- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(16, 20, 27, .55); display: grid; place-items: center; padding: 20px; }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: #fff; border-radius: 4px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.dialog.is-wide { width: min(860px, 100%); }
.dialog header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dialog header h2 { font-size: 16px; color: var(--brand); }
.dialog header .icon-button { border: 0; }
.dialog-body { padding: 14px 18px 16px; overflow: auto; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #3c424d; }
.form fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; margin: 8px 0; }
.form legend { font-size: 12px; font-weight: 700; color: var(--brand); padding: 0 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.grid-2 .wide, .grid-2 fieldset.wide { grid-column: 1 / -1; }
.inline-choice { display: flex; gap: 16px; align-items: center; }
.inline-choice label { flex-direction: row; align-items: center; gap: 6px; font-weight: 600; }
.chips-select { display: flex; flex-wrap: wrap; gap: 5px; }
.chips-select label { flex-direction: row; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 5px; padding: 3px 8px; font-weight: 500; background: #fff; }
.chips-select label:has(input:checked) { background: var(--brand-soft); border-color: #8fd3d0; color: var(--brand); }
.chips-select label.is-driver:has(input:checked) { background: var(--ok-soft); border-color: #9cd0b2; color: #165c3a; }
.qual-group { margin: 6px 0; }
.qual-group h4 { font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; letter-spacing: .04em; }
.with-button { display: flex; gap: 6px; }
.with-button select { flex: 1; }
.form-error { color: var(--danger); font-weight: 600; min-height: 1em; margin: 8px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dialog-actions.start { justify-content: flex-start; margin: 0 0 10px; }
.phase-list { border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; }
.phase-list h3 { font-size: 13px; color: var(--brand); margin-bottom: 4px; }
.phase-list ol { margin: 0 0 8px; padding-left: 18px; }
.phase-list li { display: flex; justify-content: space-between; }
.phase-list .row-actions { text-align: left; display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; margin-bottom: 6px; }
.inline-form input { flex: 1; }
.history, .history-list { display: grid; gap: 4px; padding: 0; list-style: none; font-size: 12px; }
.history-list li small { display: block; }
.confirm-text p { margin: 4px 0; }

/* Einstellungen */
.settings-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.settings-grid .about { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; }
.settings-grid .about img { width: 150px; }
.path { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: center; margin: 6px 0; font-size: 12px; }
.backup-list { margin-top: 10px; max-height: 320px; overflow: auto; display: grid; gap: 2px; }
.backup-list > div { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.backup-list small { grid-column: 1; }
.backup-list button { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

/* Toasts */
#toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--brand); border-left: 4px solid var(--accent); color: #fff; padding: 10px 14px; border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); max-width: 440px; font-weight: 600; }
.toast.is-error { background: var(--danger); }

/* Wochenplan / Druck */
.print-doc { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px 22px; border-radius: 6px; }
.print-head { display: grid; grid-template-columns: 130px 1fr auto; gap: 14px; align-items: start; border-bottom: 3px solid var(--accent); padding-bottom: 10px; margin-bottom: 10px; }
.print-head img { width: 120px; margin-top: 4px; }
.print-head h1 { margin: 0; font-size: 18px; color: var(--brand); }
.print-head p { margin: 2px 0; }
.print-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.print-table th, .print-table td { border: 1px solid #d3d0c8; padding: 4px 5px; vertical-align: top; font-size: 11.5px; }
.print-table th { background: var(--brand); color: #fff; text-align: left; }
.print-table th small { color: #cfe9e8; display: inline; margin-left: 4px; }
.print-table th:first-child { width: 22%; }
.print-table th:last-child { width: 16%; }
.wp-person strong { display: block; }
.wp-project { display: inline-block; border-left: 4px solid var(--c); background: #f4f3ef; padding: 1px 5px; margin: 1px 2px 1px 0; font-weight: 700; border-radius: 2px; }
.wp-project small { display: inline; font-weight: 500; }
.wp-absence { display: inline-block; background: var(--line-2); padding: 1px 5px; font-weight: 700; border-radius: 2px; color: #4c5568; }
.wp-absent { background: #fafafa; }
.wp-sum { font-size: 11px; }
.print-section { margin-top: 12px; }
.print-section h2 { font-size: 13px; color: var(--brand); margin-bottom: 4px; }
.print-section p { margin: 2px 0; font-size: 12px; }
.print-contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 14px; }
.print-contacts div { border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font-size: 12px; }
.print-contacts span { display: block; }
.print-foot { margin-top: 12px; color: var(--muted); font-size: 10.5px; border-top: 1px solid var(--line); padding-top: 6px; }

@media (max-width: 1500px) { :root { --label-w: 260px; } .facts { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; min-width: 0; }
  .sidebar, .topbar, .no-print, #toast-host, #dialog-root { display: none !important; }
  .shell, .main, .view { display: block; height: auto; overflow: visible; padding: 0; }
  .print-doc { border: 0; box-shadow: none; padding: 0; }
  .print-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wp-project, .wp-absence { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.tl-head-days.is-compact .tl-day span { font-size: 8.5px; letter-spacing: -.02em; }
.topbar-title { display: flex; align-items: baseline; gap: 10px; color: var(--brand); }
.topbar-title strong { font-size: 14px; }
.topbar-title span { color: var(--muted); font-size: 12.5px; }
.topbar-title span:not(:empty)::before { content: '·'; margin-right: 10px; }

/* Positionsverwaltung (0.9.0) */
.form .dialog-actions label.inline-check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 500; color: #4a505b; margin: 0 0 0 12px; }
.form .dialog-actions label.inline-check input { width: auto; height: auto; margin: 0; }
.positions-table .order-cell { white-space: nowrap; width: 84px; }
.positions-table .order-cell .icon-button { width: 28px; height: 28px; font-size: 14px; margin-right: 4px; }
.positions-table .order-cell .icon-button:disabled { opacity: .35; cursor: default; }

/* 0.10.0 – Anmeldung, Benutzer, Mehrfachzuordnung, Verfügbarkeit, Urlaubsprüfung, Urlaubsdruck */
.auth-screen { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: var(--brand); }
.auth-card { width: min(380px, calc(100vw - 32px)); background: #fff; border-radius: 4px; box-shadow: 0 20px 50px rgba(34, 40, 51, .18); padding: 26px 28px; display: grid; gap: 10px; border-top: 4px solid var(--accent); }
.auth-card img { width: 170px; margin-bottom: 6px; }
.auth-card h1 { margin: 0; font-size: 20px; color: var(--brand); }
.auth-card .sub { margin: 0 0 4px; color: var(--muted); }
.auth-card .button.primary { justify-content: center; height: 38px; }
.auth-card small { text-align: center; }
.user-chip { display: flex; align-items: center; gap: 10px; margin-left: auto; margin-right: 18px; font-size: 12.5px; color: var(--muted); }
.user-chip span { font-weight: 600; color: var(--ink); }
.users-card { grid-column: 1 / -1; }
.users-card .card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.users-table td small { display: block; color: var(--muted); }
.users-table .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.form label.check input { width: auto; height: auto; }
.multi-pick { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.multi-pick legend { font-weight: 700; color: #4a505b; padding: 0 4px; }
.multi-pick .inline-select { margin-top: 8px; flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.multi-pick .inline-select select { max-width: 280px; }
.multi-pick .hint { margin: 6px 0 0; }
.extra-positions { display: block; color: var(--muted); }
.cap-table .fc small { display: block; color: var(--muted); }
.avail-now { color: var(--ok) !important; }
.vacation-check h4 { margin: 12px 0 4px; font-size: 13px; color: var(--brand); }
.vacation-check h4:first-letter { color: inherit; }
.vacation-check ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.vacation-check li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fbfaf8; }
.vacation-check li small { grid-column: 1; color: var(--muted); }
.vacation-check li span { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; white-space: nowrap; }
.vp-preview { max-height: 58vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: #f9f8f5; margin-top: 8px; }
.vp-preview .print-doc { box-shadow: none; }
.pv-table th, .pv-table td { padding: 2px 3px; font-size: 10.5px; }
.pv-table th.pv-person, .pv-table td.pv-person { width: 170px; }
.pv-table th:first-child { width: 170px; }
.pv-table th:last-child, .pv-table td.pv-sum { width: 38px; text-align: center; }
.pv-person strong { display: block; font-size: 11px; }
.pv-person small { color: var(--muted); }
.pv-group td { background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 11px; }
.pv-group small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.pv-table th.pv-week { text-align: center; }
.pv-table th.pv-week small { display: block; margin: 0; }
.pv-days, td.pv-week { white-space: nowrap; }
.pv-days { display: flex; justify-content: space-between; font-weight: 500; opacity: .85; }
.pv-days i, td.pv-week i { font-style: normal; flex: 1; text-align: center; }
td.pv-week { padding: 1px 2px; }
td.pv-week i { display: inline-block; width: 19%; height: 15px; line-height: 15px; margin: 0 .5%; border: 1px solid #e5e2dc; border-radius: 2px; font-size: 9px; font-weight: 700; }
.pv-vacation { background: #edc451 !important; border-color: #d4a72a !important; color: #4a3700; }
.pv-other { background: #dfe3ea !important; border-color: #c4cbd6 !important; color: #4c5568; }
.pv-table th.pv-day, .pv-table td.pv-day { text-align: center; padding: 1px 0; font-weight: 700; }
.pv-table th.pv-day small { display: block; margin: 0; font-weight: 500; }
.pv-table .is-weekend { background: #eceae4 !important; color: #8a94a6; }
.pv-table th.is-weekend { background: #6b717c !important; color: #fff; }
.pv-table th.is-current { background: var(--danger) !important; }
.pv-month h2 { font-size: 14px; color: var(--brand); margin: 10px 0 6px; }
.pv-legend { margin-right: 10px; }
.pv-legend i { display: inline-block; font-style: normal; font-weight: 700; padding: 0 4px; border: 1px solid; border-radius: 2px; margin-right: 3px; }
#print-root { display: none; }
@media print {
  body.is-printing-root .shell, body.is-printing-root #dialog-root, body.is-printing-root #auth-screen { display: none !important; }
  body.is-printing-root #print-root { display: block; }
  .pv-break { break-before: page; }
  .pv-table tr { break-inside: avoid; }
  .pv-table thead { display: table-header-group; }
  .pv-vacation, .pv-other, .pv-group td, .pv-table .is-weekend, .pv-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Mehrfachauswahl von Personen (Wochenendarbeit, Einteilung kopieren) */
.pick-list { display: grid; gap: 8px; max-height: 300px; overflow: auto; padding: 2px 2px 4px; }
.pick-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 12px; color: var(--brand); }
.pick-list .chips-select label small { color: var(--muted); font-weight: 400; }
.pick-list .chips-select label.is-disabled { opacity: .5; cursor: not-allowed; }

/* Beschriftung je Wochenabschnitt (Mo–Fr) eines Einsatzbalkens */
.bar { justify-content: space-between; }
.bar .bar-label { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; flex: none; box-sizing: border-box; padding: 0 6px; pointer-events: none; }

/* Urlaubskonto */
.vacation-accounts .actions { display: flex; align-items: center; gap: 8px; }
.vac-year { min-width: 44px; text-align: center; color: var(--brand); font-size: 15px; }
.vac-rest { font-weight: 700; color: var(--ok); }
.vac-rest.is-warning { color: var(--warn); }
.vac-rest.is-critical { color: var(--danger); }
.vac-info { margin: 4px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #f7f6f2; font-size: 13px; }
.table.compact td, .table.compact th { padding: 4px 8px; }

/* Baustellen-Urlaubsübersicht */
.site-overview .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ov-summary { background: #f7f6f2; }
.ov-summary .ov-dep-head.is-static, .ov-summary .ov-dep-head.is-static:hover { background: transparent; cursor: default; }
.ov-cell small { display: block; }
.ov-cell .ov-free { color: var(--ok); font-weight: 600; }

/* Heuser-Keyvisual (Scheinwerfer, Figur, Glühbirne) auf der Anmeldeseite */
.auth-screen { grid-template-columns: auto 1fr; place-items: stretch; background: #1f2433; }
.auth-screen::before { content: ''; background: url("assets/branding/heuser-keyvisual.jpg") center / cover no-repeat; width: min(46vw, calc(100vh * 941 / 1672)); -webkit-mask-image: linear-gradient(to right, #000 75%, transparent); mask-image: linear-gradient(to right, #000 75%, transparent); }
.auth-screen > .auth-card { place-self: center; }
@media (min-width: 900px) { .auth-screen > .auth-card > img { display: none; } }
@media (max-width: 899px) { .auth-screen { grid-template-columns: 1fr; } .auth-screen::before { display: none; } }
