/* Dispo-Cockpit · Desktop-first */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--ink-deep); color: var(--bone); font-family: var(--font-body); }

body.dispo-cockpit {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--ink-soft);
  border-right: 1px solid var(--ink-line);
  display: flex; flex-direction: column;
  padding: 16px 0;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px;
  padding: 4px 18px 18px 18px;
  border-bottom: 1px solid var(--ink-line);
}
.brand img { height: 36px; background: var(--brand-white); padding: 4px 8px; border-radius: 6px; }
.brand strong {
  font-family: var(--font-display); font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  margin-top: 8px;
}
.brand-sub {
  color: var(--bone-muted); font-size: 11px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.sidebar nav { display: flex; flex-direction: column; padding: 12px 0; flex: 1; }
.sidebar .navlink {
  background: none; border: none; text-align: left;
  color: var(--bone-soft); font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 11px 18px;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  border-left: 2px solid transparent;
}
.sidebar .navlink:hover { color: var(--bone); background: var(--ink-rise); }
.sidebar .navlink[aria-current="true"] {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--ink-rise);
}
.badge {
  margin-left: auto;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: var(--radius-pill);
  min-width: 18px; text-align: center;
}
.badge:empty { display: none; }
.sidebar-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--ink-line);
  display: flex; flex-direction: column; gap: 10px;
  font-size: var(--text-sm); color: var(--bone-muted);
}
.sidebar-foot button {
  background: transparent; border: none;
  color: var(--bone-soft); cursor: pointer;
}
.sidebar-foot button:hover { color: var(--accent); }

/* Main */
main { padding: 22px 28px; max-width: 1500px; }
.view-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.view-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  margin: 0;
  letter-spacing: var(--tracking-tight);
}
.toolbar { display: flex; gap: 10px; }
.toolbar input, .toolbar select {
  background: var(--ink-soft); color: var(--bone);
  border: 1px solid var(--ink-line-2);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: var(--text-base);
}

/* Buttons */
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  border: none; padding: 9px 16px;
  border-radius: var(--radius-md);
  font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hi); }
.btn-secondary {
  background: transparent; color: var(--bone-soft);
  border: 1px solid var(--ink-line-3);
  padding: 5px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: var(--text-sm);
}
.btn-secondary:hover { color: var(--accent); border-color: var(--accent); }
.btn-ok      { color: var(--ok);   border-color: var(--ok-line); }
.btn-ok:hover{ color: var(--accent-ink); background: var(--ok); border-color: var(--ok); }
.btn-err     { color: var(--err);  border-color: var(--err-line); }
.btn-err:hover{ color: var(--accent-ink); background: var(--err); border-color: var(--err); }

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.table th, .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--ink-line);
}
.table th {
  font-size: 11px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--bone-muted);
  font-weight: 600;
}
.table tbody tr:hover { background: var(--ink-rise); }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); }
.table .actions { display: flex; gap: 6px; }
.table img.thumb { max-height: 36px; border-radius: 4px; }
.table .muted { color: var(--bone-muted); padding: 24px; text-align: center; }

.tag {
  display: inline-block;
  font-size: 11px; letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--radius-pill);
  border: 1px solid var(--ink-line-2);
}
.tag.ok    { color: var(--ok);    border-color: var(--ok-line); }
.tag.warn  { color: var(--warn);  border-color: var(--warn-line); }
.tag.err   { color: var(--err);   border-color: var(--err-line); }
.tag.accent{ color: var(--accent);border-color: var(--accent-line); }

/* Dashboard-KPI-Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-card {
  background: var(--ink-rise);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.kpi-card.alert  { border-color: var(--err-line); background: linear-gradient(135deg, var(--err-soft), var(--ink-rise)); }
.kpi-card.warn   { border-color: var(--warn-line); background: linear-gradient(135deg, var(--warn-soft), var(--ink-rise)); }
.kpi-card.ok     { border-color: var(--ok-line); }
.kpi-num {
  font-size: 2.2rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.kpi-card.alert .kpi-num { color: var(--err); }
.kpi-card.warn .kpi-num  { color: var(--warn); }
.kpi-card.ok .kpi-num    { color: var(--ok); }
.kpi-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-soft);
  font-weight: 600;
}
.kpi-detail {
  font-size: 0.78rem;
  color: var(--bone-muted);
  margin-top: 4px;
}

.section-title {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-muted);
  margin: 0 0 14px 0;
  font-weight: 600;
}
.activity-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-rise);
}
.activity-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 130px;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ink-line);
  align-items: center;
  font-size: var(--text-sm);
}
.activity-row:last-child { border-bottom: none; }
.activity-row .activity-time { color: var(--bone-muted); font-family: var(--font-mono); font-size: 0.78rem; }
.activity-row .activity-kind {
  display: inline-block;
  background: var(--ink-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-soft);
}

/* Toast */
.toast {
  position: fixed; bottom: 22px; right: 22px;
  background: var(--ink-rise-2);
  color: var(--bone);
  border: 1px solid var(--ink-line-3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
}
.toast.ok  { border-color: var(--ok-line);  color: var(--ok); }
.toast.error { border-color: var(--err-line); color: var(--err); }

/* Modal */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: grid; place-items: center;
  z-index: 200;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--ink-rise);
  border: 1px solid var(--ink-line-3);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 720px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink-line);
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin: 0;
  letter-spacing: var(--tracking-tight);
}
.modal-close {
  background: transparent; border: none;
  color: var(--bone-soft); font-size: 26px;
  cursor: pointer; width: 32px; height: 32px;
  line-height: 1; border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--accent); }
.modal-body { padding: 20px 22px; }
.modal-section {
  font-size: var(--text-md);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--bone-soft);
  margin: 22px 0 10px 0;
}
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 22px;
}
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.form-grid label {
  display: flex; flex-direction: column;
  color: var(--bone-soft); font-size: var(--text-sm);
  gap: 4px;
}
.form-grid input, .form-grid select {
  background: var(--ink-soft); color: var(--bone);
  border: 1px solid var(--ink-line-2);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: var(--text-base);
}
.form-grid input:focus, .form-grid select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.stop-row {
  display: grid;
  grid-template-columns: 130px 1fr 200px 36px;
  gap: 8px;
  margin-bottom: 8px;
}
.stop-row select, .stop-row input {
  background: var(--ink-soft); color: var(--bone);
  border: 1px solid var(--ink-line-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: var(--text-sm);
}

/* Skill-Matrix */
.table-matrix th, .table-matrix td { text-align: center; }
.table-matrix th:first-child, .table-matrix td:first-child { text-align: left; font-weight: 600; }
.matrix-cell.released { background: rgba(74,222,128,0.10); color: var(--ok); }
.matrix-cell.mentor   { background: rgba(99,91,255,0.10); }
.matrix-cell.training { background: rgba(250,204,21,0.10); color: var(--warn); }
.matrix-cell.none     { color: var(--bone-muted); }

/* ──────────────────────────────────────────────────────────────────────
   TOUR-BOARD — Wochenansicht Fahrer × Wochentag (Phase 2.5)
   ────────────────────────────────────────────────────────────────────── */

/* Tab-Switcher */
.week-tabs { display: inline-flex; gap: 4px; background: var(--ink-soft); border: 1px solid var(--ink-line-2); border-radius: var(--radius-md); padding: 4px; }
.week-tab { background: transparent; border: none; padding: 6px 14px; border-radius: var(--radius-sm); color: var(--bone-soft); font-family: var(--font-body); font-size: var(--text-sm); cursor: pointer; transition: color var(--dur-1), background var(--dur-1); }
.week-tab:hover { color: var(--bone); }
.week-tab.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* Board header */
.tour-board-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; margin: 16px 0 12px; padding: 0 4px; }
.tour-board-label { font-family: var(--font-display); font-size: var(--text-lg); color: var(--bone); }
.tour-board-summary { color: var(--bone-soft); font-size: var(--text-sm); }
.tour-board-summary strong { color: var(--bone); }

/* Grid: 1 Fahrer-Spalte (sticky links) + 7 Wochentag-Spalten */
.tour-board-grid {
  display: grid;
  grid-template-columns: 200px repeat(7, minmax(160px, 1fr));
  border: 1px solid var(--ink-line-2);
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: var(--ink-soft);
}
.tour-board-empty { grid-column: 1 / -1; padding: 24px; text-align: center; color: var(--bone-muted); }

/* Header-Zeile (Wochentag-Labels) */
.tb-corner, .tb-day-head {
  position: sticky; top: 0; z-index: 2;
  background: var(--ink-rise);
  border-bottom: 1px solid var(--ink-line-2);
  padding: 10px 12px; font-size: var(--text-xs); color: var(--bone-soft);
  font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide);
}
.tb-corner { left: 0; z-index: 3; border-right: 1px solid var(--ink-line-2); }
.tb-day-head.weekend { color: var(--bone-muted); background: var(--ink-soft); }
.tb-day-head .tb-day-num { display: block; font-size: var(--text-sm); color: var(--bone); margin-top: 2px; font-weight: 700; letter-spacing: 0; }
.tb-day-head.weekend .tb-day-num { color: var(--bone-soft); font-weight: 500; }

/* Fahrer-Zeile */
.tb-driver-cell, .tb-day-cell {
  border-bottom: 1px solid var(--ink-line);
  padding: 10px;
  min-height: 96px;
  position: relative;
}
.tb-driver-cell {
  position: sticky; left: 0; z-index: 1;
  background: var(--ink-rise);
  border-right: 1px solid var(--ink-line-2);
  display: flex; flex-direction: column; justify-content: center;
}
.tb-driver-cell .pn {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--bone-muted); letter-spacing: var(--tracking-wide);
}
.tb-driver-cell .name {
  font-weight: 600; color: var(--bone); margin-top: 2px;
}
.tb-day-cell.weekend { background: rgba(255,255,255,0.015); }
.tb-day-cell.weekend.empty::before { content: ''; }

/* Absence-Balken — pro Tag eine Segment-Zelle, Außenkanten rounded,
   Mitten flach: ergibt visuell einen continuous-Balken über die
   Range hinweg. Position: absolute oben in der Day-Cell. */
.tb-absence-bar {
  position: absolute; left: 0; right: 0; top: 6px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  border-top: 1px solid; border-bottom: 1px solid;
  pointer-events: none;
}
.tb-absence-bar.sick     { background: var(--err-soft);  color: var(--err);  border-color: var(--err-line); }
.tb-absence-bar.vacation { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tb-absence-bar.is-first { left: 6px; border-left: 1px solid; border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.tb-absence-bar.is-last  { right: 6px; border-right: 1px solid; border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.tb-absence-bar.is-first.sick,
.tb-absence-bar.is-last.sick     { border-color: var(--err-line); }
.tb-absence-bar.is-first.vacation,
.tb-absence-bar.is-last.vacation { border-color: var(--warn-line); }
/* Touren unter dem Balken brauchen oben Platz */
.tb-day-cell:has(.tb-absence-bar) > .tb-tour:first-of-type { margin-top: 30px; }

/* Tour-Kachel */
.tb-tour {
  background: var(--ink-rise-2);
  border: 1px solid var(--ink-line-2);
  border-left: 3px solid var(--bone-muted);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: var(--text-xs);
  line-height: 1.35;
  cursor: default;
}
.tb-tour:last-child { margin-bottom: 0; }
.tb-tour .tb-tour-num { font-family: var(--font-mono); font-size: 10px; color: var(--bone-muted); }
.tb-tour .tb-tour-cust { font-weight: 700; color: var(--bone); margin: 2px 0; }
.tb-tour .tb-tour-cargo { color: var(--bone-soft); font-size: 11px; }
.tb-tour .tb-tour-time { color: var(--bone-muted); font-size: 10px; margin-top: 3px; font-family: var(--font-mono); }

/* Status-Farben — linke Border + dezenter Background-Tint */
.tb-tour.s-completed   { border-left-color: var(--ok);   background: linear-gradient(90deg, var(--ok-soft), var(--ink-rise-2) 40%); }
.tb-tour.s-in_progress { border-left-color: var(--info); background: linear-gradient(90deg, var(--info-soft), var(--ink-rise-2) 40%); }
.tb-tour.s-planned     { border-left-color: var(--bone-muted); }
.tb-tour.s-dispatched  { border-left-color: var(--info); }
.tb-tour.s-cancelled   { border-left-color: var(--err);  background: var(--err-soft); opacity: 0.7; }
.tb-tour.s-cancelled .tb-tour-cust { text-decoration: line-through; color: var(--bone-soft); }

/* Verspätungs-Akzent (orange/warn-Streifen unterhalb der Kachel) */
.tb-tour.is-delayed { box-shadow: inset 0 -2px 0 var(--warn); }
.tb-tour.is-delayed .tb-tour-time::after { content: ' · ⚠ +' attr(data-delay) 'min'; color: var(--warn); }

/* Hover-Effekt */
.tb-tour:hover { background-color: var(--ink-rise); }

/* ──────────────────────────────────────────────────────────────────────
   TOUR-DETAIL-MODAL (Phase 2.5 Drilldown, Read-only)
   ────────────────────────────────────────────────────────────────────── */

.modal-card-wide { max-width: 880px; }

/* Status-Badge im Modal-Header neben Tour-Nummer */
.td-header-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.td-status-badge {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  border: 1px solid;
}
.td-status-badge.s-completed   { color: var(--ok);   background: var(--ok-soft);   border-color: var(--ok-line); }
.td-status-badge.s-in_progress { color: var(--info); background: var(--info-soft); border-color: rgba(96,165,250,0.28); }
.td-status-badge.s-planned     { color: var(--bone-soft); background: rgba(255,255,255,0.05); border-color: var(--ink-line-3); }
.td-status-badge.s-dispatched  { color: var(--info); background: var(--info-soft); border-color: rgba(96,165,250,0.28); }
.td-status-badge.s-cancelled   { color: var(--err);  background: var(--err-soft);  border-color: var(--err-line); }

/* Section-Layout */
.td-section { margin-top: 18px; }
.td-section:first-child { margin-top: 0; }
.td-section-title {
  font-size: var(--text-xs); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; color: var(--bone-muted);
  margin: 0 0 8px 0; padding-bottom: 6px;
  border-bottom: 1px solid var(--ink-line);
}

/* Plan vs Ist + Stamm-Daten-Grid */
.td-kv-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 24px;
  font-size: var(--text-sm);
}
.td-kv-grid > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.td-kv-grid .k { color: var(--bone-muted); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.td-kv-grid .v { color: var(--bone); font-family: var(--font-mono); font-size: var(--text-sm); text-align: right; }
.td-kv-grid .v.null { color: var(--bone-faint); font-style: italic; }
.td-kv-grid .v.delay-pos { color: var(--warn); }

/* Inline-Tabellen (Stops, LS, Belege, Sessions) */
.td-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); margin-top: 4px; }
.td-table th { text-align: left; padding: 6px 8px; font-size: var(--text-xs); color: var(--bone-muted); text-transform: uppercase; letter-spacing: var(--tracking-wide); font-weight: 600; border-bottom: 1px solid var(--ink-line); }
.td-table td { padding: 6px 8px; border-bottom: 1px solid var(--ink-line); color: var(--bone-soft); }
.td-table td.mono { font-family: var(--font-mono); font-size: var(--text-xs); }
.td-table td.num  { text-align: right; font-family: var(--font-mono); }
.td-table .muted-cell { color: var(--bone-faint); font-style: italic; }
.td-table tr:last-child td { border-bottom: none; }

/* Notes-Block */
.td-notes {
  background: var(--ink-deep); border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: var(--text-sm); color: var(--bone-soft);
  white-space: pre-wrap; line-height: 1.5;
}
.td-notes.empty { color: var(--bone-faint); font-style: italic; }

/* Pill für Sub-Status (z.B. Beleg approved/rejected) */
.td-pill { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); border: 1px solid; }
.td-pill.s-completed, .td-pill.s-signed, .td-pill.s-approved { color: var(--ok);   border-color: var(--ok-line);   background: var(--ok-soft); }
.td-pill.s-rejected, .td-pill.s-cancelled, .td-pill.s-skipped { color: var(--err);  border-color: var(--err-line);  background: var(--err-soft); }
.td-pill.s-submitted, .td-pill.s-draft, .td-pill.s-pending    { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.td-pill.s-in_progress, .td-pill.s-arrived, .td-pill.s-dispatched { color: var(--info); border-color: rgba(96,165,250,0.28); background: var(--info-soft); }

/* Tour-Kachel im Grid wird klickbar */
.tb-tour { cursor: pointer; }
.tb-tour:hover { transform: translateY(-1px); transition: transform var(--dur-1); }
.tb-tour:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* LS-Detail-Modal: stacked über Tour-Detail-Modal (z-index 300 > 200) */
.modal.modal-ls-detail { z-index: 300; background: rgba(0,0,0,0.45); }
/* LS-Zeile im Lieferscheine-Tab klickbar */
#delivery-tbody tr[data-ls-id] { cursor: pointer; }
#delivery-tbody tr[data-ls-id]:hover { background: rgba(255,255,255,0.03); }
#delivery-tbody tr[data-ls-id]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* LS-Eintrag im Tour-Modal Section 4 ebenfalls klickbar */
.td-table tr[data-ls-id] { cursor: pointer; }
.td-table tr[data-ls-id]:hover { background: rgba(255,255,255,0.03); }
/* Tour-Link in LS-Modal Section 1 */
.ls-tour-link {
  background: transparent; border: none; padding: 0;
  color: var(--accent); cursor: pointer;
  font: inherit; font-family: var(--font-mono); font-size: var(--text-sm);
  text-decoration: underline; text-underline-offset: 2px;
}
.ls-tour-link:hover { color: var(--accent-hover, var(--accent)); filter: brightness(1.15); }
.ls-tour-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
/* Signatur-Pill (Section 3) */
.ls-sig-pill {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 600;
  color: var(--info); background: var(--info-soft);
  border: 1px solid rgba(96,165,250,0.28);
}
.ls-sig-pill.empty { color: var(--bone-faint); background: rgba(255,255,255,0.04); border-color: var(--ink-line); font-style: italic; font-weight: 400; }
/* Notiz-Edit (Section 4) */
.ls-notes-edit {
  width: 100%; min-height: 96px; resize: vertical;
  background: var(--ink-deep); color: var(--bone);
  border: 1px solid var(--ink-line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; font: inherit; font-size: var(--text-sm); line-height: 1.5;
}
.ls-notes-edit:focus { outline: none; border-color: var(--accent); }
.ls-notes-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; gap: 12px;
}
.ls-notes-counter { color: var(--bone-faint); font-size: var(--text-xs); font-family: var(--font-mono); }
.ls-notes-counter.over { color: var(--err); }
.ls-save-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
/* Status-Historie-Placeholder (Section 6) */
.ls-history-placeholder {
  background: var(--ink-deep); border: 1px dashed var(--ink-line);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: var(--text-sm); color: var(--bone-faint); font-style: italic;
}
.ls-history-placeholder .hint { display: block; margin-top: 4px; font-size: var(--text-xs); color: var(--bone-faint); }
/* LS-Modal Footer */
.ls-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px 18px 22px;
  border-top: 1px solid var(--ink-line);
  margin-top: 12px;
}

/* Theme-Toggle in Sidebar-Foot (Hell/Auto/Dunkel) */
.theme-toggle {
  display: flex; gap: 4px;
  font-size: 11px;
}
.theme-toggle button {
  flex: 1;
  background: transparent;
  border: 1px solid var(--ink-line);
  color: var(--bone-soft);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
}
.theme-toggle button:hover { color: var(--bone); border-color: var(--ink-line-3); }
.theme-toggle button.active {
  background: var(--ink-rise);
  color: var(--accent);
  border-color: var(--accent);
}
.sidebar-foot-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
