/* ═══════════════════════════════════════════════════════════════════════
   SHARED TOKENS — all three variations live inside <DCArtboard> wrappers.
   Tokens are light-dark via data-theme on html. Tweaks panel overrides them.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* default (light, yellow accent) */
  --bg:             #F5F4F0;
  --surface:        #FFFFFF;
  --surface-2:      #F9F8F4;
  --surface-3:      #EFEDE6;
  --border:         #E3E0D8;
  --border-2:       #CFCBC0;
  --border-strong:  #A8A395;

  --text:           #0F0F0E;
  --text-2:         #4A4740;
  --text-3:         #8B877C;

  --accent:         #F2C811;   /* safety yellow */
  --accent-2:       #E8A70D;
  --accent-ink:     #0F0F0E;
  --accent-bg:      #FEF7C6;

  --ok:             #1F8A3D;
  --ok-bg:          #E6F4EA;
  --warn:           #C57B00;
  --warn-bg:        #FFF0D0;
  --bad:            #C4281B;
  --bad-bg:         #FDE7E3;

  --radius-lg:   12px;
  --radius:       8px;
  --radius-sm:    5px;
  --radius-xs:    3px;

  --font-sans: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --shadow-s: 0 1px 2px rgba(20,18,10,.06);
  --shadow-m: 0 1px 3px rgba(20,18,10,.05), 0 2px 10px rgba(20,18,10,.04);
}

[data-theme="dark"] {
  --bg:             #0C0C0E;
  --surface:        #161618;
  --surface-2:      #1C1C20;
  --surface-3:      #26262B;
  --border:         #2A2A2F;
  --border-2:       #3A3A42;
  --border-strong:  #55555F;

  --text:           #F3F2EC;
  --text-2:         #B9B6AC;
  --text-3:         #807C70;

  --accent:         #F2C811;
  --accent-2:       #E8A70D;
  --accent-ink:     #0C0C0E;
  --accent-bg:      #2D2A0F;

  --ok:             #5BC47A;
  --ok-bg:          #132D1A;
  --warn:           #F5B83D;
  --warn-bg:        #332615;
  --bad:            #E56254;
  --bad-bg:         #321816;

  --shadow-s: 0 1px 2px rgba(0,0,0,.35);
  --shadow-m: 0 1px 3px rgba(0,0,0,.3), 0 2px 10px rgba(0,0,0,.35);
}

/* Number-style tweak */
[data-num="prop"] .og-num, [data-num="prop"] .br-num,
[data-num="prop"] .cr-kpi-value, [data-num="prop"] .og-hl-val,
[data-num="prop"] .br-lede-big {
  font-family: var(--font-sans) !important;
}

/* Table-style tweak */
[data-tbl="minimal"] .og-table tbody td,
[data-tbl="minimal"] .br-table tbody td { border-bottom-color: transparent !important; }
[data-tbl="zebra"]   .og-table tbody tr:nth-child(even) td,
[data-tbl="zebra"]   .br-table tbody tr:nth-child(even) td { background: var(--surface-2); }
[data-tbl="lined"]   .og-table td,
[data-tbl="lined"]   .br-table td { border-right: 1px solid var(--border); }
[data-tbl="lined"]   .og-table td:last-child,
[data-tbl="lined"]   .br-table td:last-child { border-right: none; }

/* Global body */
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}
* { box-sizing: border-box; }

/* ═══════════════════════════════════════════════════════════════════════
   VARIATION 1 — CONTROL ROOM
   ═══════════════════════════════════════════════════════════════════════ */
.cr-root {
  padding: 24px 28px 28px;
  background: var(--bg);
  min-height: 1400px;
  color: var(--text);
}

.cr-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 20px;
}
.cr-eyebrow {
  font-size: 11px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: 6px; font-weight: 500;
}
.cr-h1 {
  font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin: 0;
  line-height: 1.1;
}
.cr-header-right { display: flex; gap: 8px; align-items: center; }
.cr-chip {
  font-size: 11px; font-weight: 500; padding: 5px 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-2);
}
.cr-chip-mono { font-family: var(--font-mono); }
.cr-chip-accent {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent-2); font-weight: 600;
  position: relative; padding-left: 20px;
}
.cr-chip-accent::before {
  content: ""; position: absolute; left: 8px; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-ink); transform: translateY(-50%);
  animation: cr-pulse 1.6s ease-in-out infinite;
}
@keyframes cr-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ─── Date picker chip ─── */
.cr-dp { position: relative; display: inline-block; }
/* Wrapper für den Datepicker in der globalen Topbar. Stellt sicher, dass die
   Chip dieselbe Höhe wie der "Export CSV"-Button daneben hat, ohne den Chip-
   Selbst-Stil zu überschreiben. */
.cr-header-dp { display: inline-flex; align-items: center; }
.cr-dp-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  padding: 5px 9px 5px 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-2);
  transition: background .12s, border-color .12s, color .12s;
}
.cr-dp-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--text-3); }
.cr-dp-btn.is-open { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.cr-dp-ico { display: inline-flex; color: var(--text-3); }
.cr-dp-btn:hover .cr-dp-ico, .cr-dp-btn.is-open .cr-dp-ico { color: var(--accent); }
.cr-dp-caret { font-size: 8px; color: var(--text-3); margin-left: 1px; }

.cr-dp-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 50;
  width: 290px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 32px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.06);
  padding: 10px;
}
.cr-dp-head {
  display: grid; grid-template-columns: 28px 1fr 28px;
  align-items: center; margin-bottom: 8px;
}
.cr-dp-nav {
  width: 24px; height: 24px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  border-radius: var(--radius-xs); cursor: pointer;
  font-size: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.cr-dp-nav:hover { background: var(--surface-2); color: var(--text); }
.cr-dp-title {
  text-align: center; font-size: 12.5px; font-weight: 600;
  color: var(--text);
}
.cr-dp-grid {
  display: grid;
  grid-template-columns: 28px repeat(7, 1fr);
  gap: 2px;
}
.cr-dp-wd {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  text-align: center; padding: 4px 0 6px;
}
.cr-dp-wd-kw { color: var(--text-3); opacity: .6; }
.cr-dp-kw {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3);
  text-align: center; align-self: center; opacity: .6;
}
.cr-dp-day {
  height: 28px; border: 0; background: transparent;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text);
  border-radius: var(--radius-xs); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s, color .1s;
}
.cr-dp-day:hover:not(:disabled) { background: var(--surface-2); }
.cr-dp-day.is-out { color: var(--text-3); opacity: .45; }
.cr-dp-day.is-wknd { color: var(--text-2); }
.cr-dp-day.is-today {
  box-shadow: inset 0 0 0 1px var(--text-3);
}
.cr-dp-day.is-sel {
  background: var(--accent) !important; color: var(--accent-ink) !important;
  font-weight: 700;
}
.cr-dp-day.is-future { cursor: not-allowed; color: var(--text-3); opacity: .35; }
.cr-dp-day.is-future:hover { background: transparent; }

.cr-dp-foot {
  display: flex; gap: 6px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
}
.cr-dp-quick {
  flex: 1; border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--text-2); padding: 5px 6px; border-radius: var(--radius-xs);
  cursor: pointer; text-transform: uppercase; letter-spacing: .06em;
}
.cr-dp-quick:hover:not(:disabled) { background: var(--surface-2); color: var(--text); border-color: var(--text-3); }
.cr-dp-quick:disabled {
  cursor: not-allowed; opacity: .4;
  /* Kein Hover-Effekt im Disabled-Zustand. */
}

.cr-kpis {
  display: grid;
  grid-template-columns: 1.6fr 1.4fr 1fr 1fr 1fr;
  gap: 10px; margin-bottom: 18px;
}
.cr-kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-s);
  display: flex; flex-direction: column; justify-content: space-between;
}
.cr-kpi-hero {
  background: var(--text); color: var(--bg);
  border-color: var(--text);
}
.cr-kpi-hero .cr-kpi-label { opacity: .55; color: inherit; }
.cr-kpi-hero .cr-kpi-sub-sep { opacity: .4; color: inherit; }
.cr-kpi-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  font-weight: 600; color: var(--text-3); margin-bottom: 10px;
}
.cr-kpi-value {
  font-family: var(--font-mono); font-weight: 600; font-size: 34px;
  line-height: 1; letter-spacing: -0.02em;
}
.cr-kpi-value-sm { font-size: 26px; }
.cr-kpi-unit {
  font-size: 13px; font-weight: 500; margin-left: 4px;
  opacity: .6;
}
.cr-kpi-sub {
  font-size: 11px; color: var(--text-2); margin-top: 10px;
  display: flex; gap: 8px; align-items: center;
}
.cr-kpi-sub-sep { color: var(--text-3); }
.cr-kpi-bar { margin-top: 10px; }
.cr-kpi-legend {
  display: flex; gap: 10px; margin-top: 6px;
  font-size: 10px; color: var(--text-2); font-family: var(--font-mono);
}
.cr-kpi-legend span { display: flex; align-items: center; gap: 4px; }
.cr-kpi-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.cr-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* Klickbare KPI-Filter-Cards (erste drei: Gesamt / Produktion / Verpackung).
   <button>-Reset, damit sie optisch wie eine div-Card wirken. */
.cr-kpi-clickable {
  font: inherit; color: inherit; text-align: left;
  cursor: pointer; appearance: none;
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
}
/* Hero-Card (Gesamt produziert) hat dunklen Hintergrund → Schrift muss weiß
   bleiben. .cr-kpi-clickable steht im CSS später als .cr-kpi-hero und würde
   sonst dessen color: #FFF mit color: inherit überschreiben. */
.cr-kpi-clickable.cr-kpi-hero { color: var(--bg); }
.cr-kpi-clickable:hover {
  border-color: var(--text-3);
  box-shadow: 0 0 0 1px var(--text-3) inset, var(--shadow-s);
}
.cr-kpi-clickable:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.cr-kpi-clickable:active { transform: translateY(1px); }

/* Aktiver Filter — kräftige Akzent-Outline + dezenter Innenring.
   Hero-Variante (Gesamt) hat schon dunklen Hintergrund → eigener Stil. */
.cr-kpi-clickable.is-active:not(.cr-kpi-hero) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow-s);
}
.cr-kpi-hero.is-active {
  box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow-s);
}

.cr-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px;
  margin-bottom: 14px;
}
.cr-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-s);
  padding: 16px 18px;
}
.cr-card-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 14px;
}
.cr-card-title {
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
}
.cr-card-sub { font-size: 11px; color: var(--text-3); }
.cr-card-tabs { display: flex; gap: 2px; }
.cr-tab {
  padding: 4px 10px; font-size: 11px; font-weight: 500;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-xs); cursor: pointer;
  color: var(--text-3); font-family: var(--font-sans);
}
.cr-tab:hover { color: var(--text-2); background: var(--surface-2); }
.cr-tab-active {
  background: var(--surface-3); color: var(--text);
  border-color: var(--border);
}

.cr-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3);
  padding: 12px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.cr-group-label:first-child { padding-top: 0; }

.cr-line {
  display: grid;
  grid-template-columns: 44px 1.3fr 210px 72px 84px;
  gap: 10px; align-items: center;
  padding: 9px 4px; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.cr-line:last-child { border-bottom: none; }
.cr-line:hover { background: var(--surface-2); }
.cr-line-off { color: var(--text-3); }
.cr-line-off .cr-line-total-num { color: var(--text-3); }
.cr-line-id {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--text-2); padding: 3px 6px;
  background: var(--surface-3); border-radius: var(--radius-xs);
  text-align: center;
}
.cr-line-name-top { font-size: 12.5px; font-weight: 500; }
/* ─── InlineNote: Stift unter Linienname, Info-Icon hinter Linienname ── */
.cr-note-wrap {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 4px; vertical-align: middle;
}
.cr-note-edit-btn {
  font-size: 10px; cursor: pointer; opacity: 0; transition: opacity .15s;
  color: var(--text-3); margin-top: 2px; line-height: 1;
}
.cr-line:hover .cr-note-edit-btn { opacity: 1; }
/* Info-Icon + Tooltip Wrapper */
.cr-note-info-wrap {
  position: relative; display: inline-flex; align-items: center;
  margin-left: 6px; vertical-align: middle;
}
.cr-note-info {
  font-size: 16px; color: var(--accent); cursor: help;
  font-style: normal; line-height: 1;
  transition: color .15s;
}
.cr-note-info-wrap:hover .cr-note-info { color: var(--text); }
/* Custom Tooltip */
.cr-note-tooltip {
  display: none; position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  box-shadow: var(--shadow-lg);
  padding: 10px 14px; font-size: 13px; line-height: 1.5;
  min-width: 180px; max-width: 320px; width: max-content;
  white-space: pre-wrap; word-break: break-word;
  z-index: 100; pointer-events: none;
}
.cr-note-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--border);
}
.cr-note-info-wrap:hover .cr-note-tooltip { display: block; }
/* Popup Overlay */
.cr-note-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: var(--overlay); display: flex;
  align-items: center; justify-content: center;
}
.cr-note-popup {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius, 8px); box-shadow: var(--shadow-lg);
  width: 380px; max-width: 92vw; padding: 16px;
}
.cr-note-popup-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 12px; font-weight: 600; color: var(--text);
}
.cr-note-popup-close {
  background: none; border: none; font-size: 18px; color: var(--text-3);
  cursor: pointer; padding: 0 2px; line-height: 1;
}
.cr-note-popup-close:hover { color: var(--text); }
.cr-note-popup-input {
  width: 100%; box-sizing: border-box; resize: vertical;
  font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 4px; padding: 8px 10px; outline: none;
  min-height: 80px;
}
.cr-note-popup-input:focus { border-color: var(--accent); }
.cr-note-popup-foot {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px;
}
.cr-note-popup-cancel, .cr-note-popup-save {
  font-size: 12px; padding: 5px 14px; border-radius: 4px;
  cursor: pointer; border: 1px solid var(--border); font-family: inherit;
}
.cr-note-popup-cancel {
  background: var(--surface); color: var(--text-2);
}
.cr-note-popup-cancel:hover { background: var(--surface2); }
.cr-note-popup-save {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.cr-note-popup-save:hover { opacity: .9; }
.cr-line-shifts {
  display: flex; gap: 4px; font-family: var(--font-mono);
  font-size: 16px;
}
.cr-shift {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: var(--radius-xs);
  display: flex; align-items: baseline; gap: 4px; min-width: 62px;
  font-weight: 600; letter-spacing: -0.02em;
}
.cr-shift em {
  font-style: normal; font-weight: 600; color: var(--text-3);
  font-size: 9px; letter-spacing: 0;
}
.cr-line-total {
  font-family: var(--font-mono); text-align: right;
}
.cr-line-total-num {
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
}
.cr-line-total-unit {
  font-size: 10px; color: var(--text-3); margin-left: 2px;
}
.cr-line-verf-empty { color: var(--text-3); font-size: 13px; }

.cr-right { display: flex; flex-direction: column; gap: 14px; }

.cr-chart { margin-bottom: 12px; }
.cr-chart-bars {
  display: flex; gap: 4px; align-items: stretch;
  height: 180px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.cr-chart-col { flex: 1; display: flex; flex-direction: column; align-items: stretch; min-width:0; }
.cr-chart-col-click { cursor: pointer; }
.cr-chart-col-click:hover .cr-chart-bar:not(.cr-chart-bar-today) { opacity: .7; }
.cr-chart-col-click:hover .cr-chart-label:not(.cr-chart-label-today) { color: var(--text-2); }
.cr-chart-bar-wrap {
  flex: 1 1 auto; min-height: 0;
  width: 100%; display: flex; align-items: flex-end; justify-content: center;
}
.cr-chart-bar {
  width: 100%; max-width: 24px; background: var(--text-2);
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  position: relative; transition: background .15s;
}
.cr-chart-bar-weekend { background: var(--border-2); }
.cr-chart-bar-today { background: var(--accent); }
.cr-chart-bar-val {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--text); white-space: nowrap;
}
.cr-chart-label {
  font-size: 9.5px; font-family: var(--font-mono); color: var(--text-3);
  text-align: center; margin-top: 6px; line-height: 1.25;
}
.cr-chart-label span { color: var(--text-2); }
.cr-chart-label-today { color: var(--text) !important; font-weight: 600; }
.cr-chart-axis {
  display: flex; justify-content: space-between;
  font-size: 9.5px; font-family: var(--font-mono); color: var(--text-3);
  padding: 4px 0 0;
}
.cr-chart-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.cr-chart-meta-item { display: flex; flex-direction: column; gap: 2px; }
.cr-meta-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cr-meta-val { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.cr-meta-accent { color: var(--accent-2); }

.cr-stoer-card { flex: 1; }
.cr-stoer-bar {
  margin-bottom: 14px;
  border-radius: var(--radius-xs); overflow: hidden;
  border: 1px solid var(--border);
}
.cr-stoer-list { display: flex; flex-direction: column; gap: 6px; }
.cr-stoer-item {
  display: grid; grid-template-columns: 12px 1fr auto auto;
  gap: 10px; align-items: center; font-size: 12px;
}
.cr-stoer-dot { width: 10px; height: 10px; border-radius: 2px; }
.cr-stoer-name { color: var(--text); }
.cr-stoer-min { font-family: var(--font-mono); font-weight: 500; }
.cr-stoer-min em { font-style: normal; color: var(--text-3); font-size: 10px; margin-left: 2px; }
.cr-stoer-pct {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-2);
  background: var(--surface-2); padding: 2px 6px; border-radius: var(--radius-xs);
  min-width: 34px; text-align: center;
}
/* Wochenauswertung: Störgründe-/Maschinenzeiten-Listen mit Ø-Spalten (alle KW) */
.kw-stoer-item { grid-template-columns: 12px 1fr auto auto auto auto; }
.kw-stoer-avg {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  min-width: 64px; text-align: right;
}
.kw-stoer-avg em { font-style: normal; font-size: 10px; margin-left: 2px; }
.kw-stoer-avgpct {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
  min-width: 44px; text-align: center;
}

.cr-avail { padding: 16px 18px; }
.cr-avail-grid { display: flex; flex-direction: column; gap: 12px; }
.cr-avail-row {
  display: grid; grid-template-columns: 180px 110px 1fr 280px 14px;
  gap: 18px; align-items: center;
  padding: 10px 12px; background: var(--surface-2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.cr-avail-row:hover { background: var(--surface); border-color: var(--text-3); }
.cr-avail-row-open {
  background: var(--surface);
  border-color: var(--accent);
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.cr-avail-chev {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3);
  text-align: center; user-select: none;
}
.cr-avail-row-open .cr-avail-chev { color: var(--accent); }

/* Detail panel */
.cr-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 1.3fr;
  gap: 20px;
  padding: 20px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-top: -12px; margin-bottom: 4px;
  position: relative;
}
.cr-detail::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 16px;
  height: 1px; background: var(--border);
}
.cr-detail-block { min-width: 0; }
.cr-detail-h {
  font-size: 9.5px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: .1em; font-weight: 600; margin-bottom: 12px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.cr-detail-h-row { display: flex; justify-content: space-between; align-items: center; }

.cr-detail-shifts { display: flex; flex-direction: column; gap: 10px; }
.cr-detail-shift { display: flex; flex-direction: column; gap: 4px; }
.cr-detail-shift-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em;
}
.cr-detail-shift-label { font-weight: 600; color: var(--text-2); }
.cr-detail-shift-val {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
}
.cr-detail-shift-val em { font-style: normal; font-size: 10px; color: var(--text-3); margin-left: 2px; font-weight: 400; }
.cr-detail-shift-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.cr-detail-shift-bar i { display: block; height: 100%; border-radius: 2px; }
.cr-detail-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border);
}
.cr-detail-total span { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cr-detail-total b { font-family: var(--font-mono); font-size: 18px; font-weight: 600; }
.cr-detail-total em { font-style: normal; font-size: 11px; color: var(--text-3); margin-left: 3px; font-weight: 400; }
.cr-detail-note {
  margin-top: 12px; padding: 8px 10px;
  background: color-mix(in oklab, var(--warn) 12%, transparent);
  border-left: 2px solid var(--warn);
  font-size: 11px; color: var(--text-2);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

.cr-detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.cr-detail-metric { display: flex; flex-direction: column; gap: 2px; }
.cr-detail-metric span { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cr-detail-metric b { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.cr-detail-metric em { font-style: normal; font-size: 10px; color: var(--text-3); margin-left: 2px; font-weight: 400; }
.cr-detail-metric-big { font-size: 20px !important; color: var(--accent); }

.cr-detail-shift-verf {
  grid-column: 1 / -1;
  display: flex; gap: 16px; align-items: center;
  padding: 4px 0 2px;
}
.cr-detail-shift-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.cr-shift-verf-label {
  font-size: 9px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em;
}
.cr-shift-verf-empty {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-4);
}

.cr-detail-stack { display: flex; flex-direction: column; gap: 7px; }
.cr-detail-empty { font-size: 11px; color: var(--text-3); font-style: italic; }
.cr-detail-stack-row {
  display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: center;
}
.cr-detail-stack-row i { width: 10px; height: 10px; border-radius: 2px; }
.cr-detail-stack-name { font-size: 11.5px; color: var(--text-2); }
.cr-detail-stack-val { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.cr-detail-stack-val em { font-style: normal; font-size: 9px; color: var(--text-3); margin-left: 2px; font-weight: 400; }
.cr-detail-stack-pct { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); width: 32px; text-align: right; }

.cr-detail-spark {
  display: flex; gap: 4px; align-items: stretch; height: 120px;
}
.cr-detail-spark-col {
  flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0;
}
.cr-detail-spark-val {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); text-align: center; height: 12px;
}
.cr-detail-spark-bar-wrap {
  flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; justify-content: center;
}
.cr-detail-spark-bar { width: 70%; border-radius: 2px 2px 0 0; }
.cr-detail-spark-lbl {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-3); text-align: center;
}
.cr-detail-spark-stats {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
}

.cr-detail-timeline { grid-column: 1 / -1; margin-top: 4px; }
.cr-tl-ctrls { display: flex; gap: 12px; align-items: center; }
.cr-tl-zoom { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-xs); overflow: hidden; }
.cr-tl-zoom-btn {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  background: transparent; color: var(--text-2); border: 0;
  padding: 3px 8px; cursor: pointer;
  border-right: 1px solid var(--border);
}
.cr-tl-zoom-btn:last-child { border-right: 0; }
.cr-tl-zoom-btn:hover { background: var(--surface-2); }
.cr-tl-zoom-btn.is-on { background: var(--accent); color: var(--bg); }
.cr-tl-nav { display: inline-flex; gap: 6px; align-items: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); }
.cr-tl-nav-btn {
  width: 20px; height: 20px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); border-radius: var(--radius-xs); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 9px;
}
.cr-tl-nav-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.cr-tl-nav-btn:disabled { opacity: .35; cursor: default; }
.cr-tl-nav-lbl { min-width: 92px; text-align: center; }

.cr-tl-track {
  position: relative; height: 32px; background: var(--surface-2);
  border-radius: 3px; cursor: crosshair;
  border: 1px solid var(--border);
}
.cr-tl-seg {
  position: absolute; top: 0; bottom: 0;
  min-width: 1px;
}
.cr-tl-seg:first-child { border-top-left-radius: 2px; border-bottom-left-radius: 2px; }
.cr-tl-seg:last-child  { border-top-right-radius: 2px; border-bottom-right-radius: 2px; }
.cr-tl-seg-editable { cursor: pointer; }
.cr-tl-seg-editable:hover { filter: brightness(1.18) drop-shadow(0 0 3px rgba(0,0,0,.35)); z-index: 2; }

/* ─── Segment-Edit-Popup ──────────────────────────────────────────────────── */
.cr-seg-popup {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius, 8px); box-shadow: var(--shadow-lg);
  width: 340px; max-width: 92vw; padding: 16px;
}
.cr-seg-popup-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.cr-seg-popup-row  { display: flex; align-items: center; gap: 8px; }
.cr-seg-popup-lbl  { font-size: 12px; color: var(--text-2); min-width: 88px; flex-shrink: 0; }
.cr-seg-popup-inp  {
  flex: 1; font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 8px; min-width: 0;
}
.cr-seg-popup-inp:focus { outline: none; border-color: var(--accent); }
.cr-seg-popup-inp-code { flex: 0 0 80px; }
.cr-seg-popup-dur  { font-size: 11px; color: var(--text-3); white-space: nowrap; }
/* Durchsuchbares Status-Auswahlfeld (StatusSearchSelect) */
.cr-seg-combo      { position: relative; flex: 1; min-width: 0; }
.cr-seg-combo-inp  { width: 100%; box-sizing: border-box; }
.cr-seg-combo-list {
  position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; box-shadow: var(--shadow-lg);
  max-height: 220px; overflow-y: auto; padding: 2px;
}
.cr-seg-combo-item {
  display: block; width: 100%; text-align: left; font-family: inherit;
  font-size: 13px; color: var(--text); background: transparent;
  border: none; border-radius: 3px; padding: 5px 8px; cursor: pointer;
}
.cr-seg-combo-item.is-active { background: var(--surface2); }
.cr-seg-combo-empty { font-size: 12px; color: var(--text-3); padding: 6px 8px; }
.cr-seg-popup-err  { font-size: 12px; color: var(--bad); padding: 4px 0; }
.cr-seg-popup-del {
  font-size: 12px; padding: 5px 12px; border-radius: 4px; cursor: pointer;
  background: transparent; border: 1px solid var(--bad); color: var(--bad);
  font-family: inherit;
}
.cr-seg-popup-del:hover { background: var(--bad); color: #fff; }
.cr-seg-popup-del:disabled, .cr-seg-popup-del-confirm:disabled { opacity: .5; pointer-events: none; }
.cr-seg-popup-del-confirm {
  font-size: 12px; padding: 5px 12px; border-radius: 4px; cursor: pointer;
  background: var(--bad); border: 1px solid var(--bad); color: #fff;
  font-family: inherit;
}
.cr-tl-cursor {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: var(--text); pointer-events: none; z-index: 2;
}
.cr-tl-tip {
  position: absolute; top: calc(100% + 6px); width: 220px;
  background: var(--text); color: var(--bg);
  padding: 8px 10px; border-radius: var(--radius-xs);
  font-size: 11px; line-height: 1.35;
  pointer-events: none; z-index: 10;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.cr-tl-tip-time { font-family: var(--font-mono); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cr-tl-tip-row { display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.cr-tl-tip-row i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.cr-tl-tip-row b { font-weight: 600; }
.cr-tl-tip-range { font-family: var(--font-mono); font-size: 10px; opacity: .75; }
.cr-tl-tip-dur   { font-family: var(--font-mono); font-size: 10px; opacity: .75; margin-top: 2px; }

.cr-tl-axis {
  position: relative; height: 18px; margin-top: 4px;
}
.cr-tl-tick {
  position: absolute; top: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.cr-tl-tick i { width: 1px; height: 4px; background: var(--text-3); display: block; }
.cr-tl-tick span { font-family: var(--font-mono); font-size: 9px; color: var(--text-3); white-space: nowrap; }
.cr-tl-tick.is-major i { height: 6px; background: var(--text-2); }
.cr-tl-tick.is-major span { color: var(--text-2); }

.cr-tl-stats {
  display: flex; gap: 8px; margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
}
.cr-avail-id {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  padding: 2px 6px; background: var(--text); color: var(--bg);
  border-radius: var(--radius-xs); display: inline-block;
}
.cr-avail-name { font-size: 13px; font-weight: 500; margin-top: 4px; }
.cr-avail-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  font-family: var(--font-mono);
}
.cr-avail-stats span {
  font-size: 9.5px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: .08em; font-weight: 600; display: block;
}
.cr-avail-stats b { font-size: 14px; font-weight: 600; font-family: var(--font-mono); }
.cr-avail-stats em { font-style: normal; font-size: 10px; color: var(--text-3); margin-left: 2px; font-weight: 400; }
.cr-avail-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border);
  font-size: 10.5px; color: var(--text-2);
}
.cr-avail-legend span { display: flex; align-items: center; gap: 5px; }
.cr-avail-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ═══════════════════════════════════════════════════════════════════════
   VARIATION 2 — BRIEFING (editorial)
   ═══════════════════════════════════════════════════════════════════════ */
.br-root {
  padding: 36px 48px 40px;
  background: var(--surface);
  min-height: 1400px;
  color: var(--text);
  max-width: 1320px;
  margin: 0 auto;
}
.br-mast {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 12px;
}
.br-mast-eyebrow {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .15em; color: var(--text-3); margin-bottom: 10px;
}
.br-mast-title {
  font-size: 44px; font-weight: 700; letter-spacing: -0.035em;
  line-height: 1; margin: 0;
}
.br-mast-date { font-size: 14px; font-weight: 500; text-align: right; }
.br-mast-kw {
  font-size: 10.5px; color: var(--text-3); font-family: var(--font-mono);
  margin-top: 4px; text-align: right;
}
.br-rule {
  height: 2px; background: var(--text); margin: 18px 0;
}
.br-rule + .br-section, .br-rule + .br-lede { margin-top: 24px; }

.br-lede {
  display: grid; grid-template-columns: 380px 1fr; gap: 40px;
  margin-bottom: 28px;
}
.br-lede-num { border-right: 1px solid var(--border); padding-right: 36px; }
.br-lede-kicker {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-3); margin-bottom: 8px;
}
.br-lede-big {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 88px; line-height: 1; letter-spacing: -0.04em;
}
.br-lede-big span {
  font-size: 28px; margin-left: 4px; color: var(--text-3); font-weight: 500;
}
.br-lede-delta {
  margin-top: 12px; display: flex; gap: 10px; align-items: center;
}
.br-lede-delta-label {
  font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .08em;
}
.br-lede-copy { padding-top: 6px; }
.br-lede-intro {
  font-size: 17px; line-height: 1.6; margin: 0 0 14px;
  color: var(--text); text-wrap: pretty;
}
.br-lede-intro b { font-weight: 600; }
.br-dropcap {
  float: left; font-size: 58px; line-height: 0.85; font-weight: 700;
  padding: 4px 10px 0 0; letter-spacing: -0.03em;
}

.br-kpis {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.br-kpi {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.br-kpi:last-child { border-right: none; }
.br-kpi-l {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3); margin-bottom: 10px;
}
.br-kpi-v {
  font-family: var(--font-mono); font-weight: 600; font-size: 22px;
  line-height: 1; letter-spacing: -0.02em;
}
.br-kpi-v em { font-style: normal; font-size: 11px; color: var(--text-3); margin-left: 3px; font-weight: 500; }

.br-section { margin-bottom: 24px; }
.br-section-head {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: baseline;
  margin-bottom: 20px;
}
.br-section-num {
  font-family: var(--font-mono); font-weight: 600; font-size: 22px;
  color: var(--accent-2); letter-spacing: -0.02em;
}
.br-section-kicker {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-3); margin-bottom: 4px;
}
.br-section-title {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.br-section-meta {
  display: flex; gap: 18px; font-size: 11px; color: var(--text-3);
  font-family: var(--font-mono);
}
.br-section-meta b { color: var(--text); font-weight: 600; }

.br-chart {
  display: flex; gap: 6px; align-items: stretch; height: 260px;
  padding: 0 8px 0;
}
.br-chart-col { flex: 1; display: flex; flex-direction: column; align-items: stretch; min-width:0; }
.br-chart-bar-wrap {
  flex: 1 1 auto; min-height: 0;
  width: 100%; display: flex; align-items: flex-end; justify-content: center;
}
.br-chart-bar {
  width: 100%; max-width: 36px; background: var(--text);
  border-radius: 0;
}
.br-chart-bar-weekend { background: var(--border-2); }
.br-chart-bar-today { background: var(--accent); }
.br-chart-label {
  font-size: 10.5px; color: var(--text-3); margin-top: 8px;
  font-family: var(--font-mono); letter-spacing: -0.02em;
}
.br-chart-label-today { color: var(--accent-2); font-weight: 600; }
.br-chart-num {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text);
  margin-top: 2px; font-weight: 500;
}

.br-table {
  width: 100%; border-collapse: collapse;
}
.br-table th {
  text-align: left; font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-3);
  padding: 8px 10px; border-bottom: 2px solid var(--text);
}
.br-table td {
  padding: 10px; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.br-table tfoot td {
  border-top: 2px solid var(--text); border-bottom: none;
  font-weight: 600; padding-top: 12px;
}
.br-num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.br-num-total { font-weight: 600; }
.br-row-off td { color: var(--text-3); }
.br-td-id { font-family: var(--font-mono); font-weight: 600; font-size: 12px; }
.br-td-name { font-weight: 500; position: relative; }
.br-td-group {
  display: block; font-size: 10px; color: var(--text-3);
  font-weight: 400; margin-top: 2px; text-transform: uppercase; letter-spacing: .05em;
}
.br-td-bem { color: var(--text-2); font-size: 11.5px; max-width: 260px; }
.br-muted { color: var(--text-3); }

.br-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}
.br-stoer-bar {
  margin-bottom: 16px; border-radius: var(--radius-xs); overflow: hidden;
}
.br-stoer-list { display: flex; flex-direction: column; gap: 8px; }
.br-stoer-item {
  display: grid; grid-template-columns: 28px 14px 1fr auto auto;
  gap: 12px; align-items: center; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.br-stoer-item:last-child { border-bottom: none; }
.br-stoer-rank { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }
.br-stoer-dot { width: 10px; height: 10px; border-radius: 2px; }
.br-stoer-min { font-family: var(--font-mono); font-weight: 600; }
.br-stoer-pct {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-2);
  min-width: 40px; text-align: right;
}

.br-avail { display: flex; flex-direction: column; gap: 12px; }
.br-avail-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; background: var(--surface-2);
}
.br-avail-top { display: flex; gap: 8px; align-items: baseline; margin-bottom: 10px; }
.br-avail-id {
  font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  background: var(--text); color: var(--surface);
  padding: 2px 6px; border-radius: var(--radius-xs);
}
.br-avail-name { font-size: 13px; font-weight: 500; }
.br-avail-mid {
  display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center;
  margin-bottom: 12px;
}
.br-avail-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.br-avail-nums span {
  font-size: 9.5px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: .08em; font-weight: 600; display: block; margin-bottom: 2px;
}
.br-avail-nums b { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }

.br-foot {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--text-3);
  font-family: var(--font-mono); letter-spacing: -0.02em;
  padding-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════
   VARIATION 3 — OPS GRID (dense)
   ═══════════════════════════════════════════════════════════════════════ */
.og-root {
  padding: 14px 18px 20px;
  background: var(--bg);
  min-height: 1400px;
  color: var(--text);
  font-size: 12px;
}

.og-cmd {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--text); color: #FFF;
  padding: 7px 14px; border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.02em;
}
.og-cmd-left { display: flex; align-items: center; gap: 10px; }
.og-cmd-tag {
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; padding: 2px 7px; border-radius: var(--radius-xs);
  letter-spacing: 0.08em;
}
.og-cmd-title { font-weight: 600; letter-spacing: 0.06em; }
.og-cmd-sep { color: rgba(255,255,255,.35); }
.og-cmd-date, .og-cmd-kw { color: rgba(255,255,255,.8); }
.og-cmd-right { display: flex; gap: 6px; align-items: center; }
.og-cmd-pill {
  background: rgba(255,255,255,.08); padding: 3px 8px;
  border-radius: var(--radius-xs); display: flex; align-items: center; gap: 5px;
  font-size: 10.5px;
}
.og-cmd-pill-accent {
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.og-led { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.og-led-ok { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.og-led-warn { background: var(--warn); box-shadow: 0 0 6px var(--warn); }

.og-headline {
  display: grid; grid-template-columns: 1.3fr 1.4fr 1fr 1.3fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  margin-bottom: 10px;
}
.og-headline > div { padding: 0 18px; border-right: 1px solid var(--border); }
.og-headline > div:first-child { padding-left: 0; }
.og-headline > div:last-child { border-right: none; padding-right: 0; }

.og-hl-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3); margin-bottom: 6px;
}
.og-hl-val {
  font-family: var(--font-mono); font-size: 36px; font-weight: 600;
  line-height: 1; letter-spacing: -0.03em;
}
.og-hl-delta { margin-top: 8px; }
.og-hl-shifts { display: flex; gap: 0; }
.og-hl-shift {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  padding-right: 12px;
}
.og-hl-shift:last-child { padding-right: 0; }
.og-hl-shift span {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3);
}
.og-hl-shift b { font-family: var(--font-mono); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.og-hl-shift em { font-style: normal; font-size: 10px; color: var(--text-3); font-family: var(--font-mono); }

.og-hl-split { display: flex; gap: 18px; align-items: center; justify-content: space-evenly; }
.og-hl-split-item {
  text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.og-hl-split-item span { font-size: 9.5px; color: var(--text-3); font-weight: 700; letter-spacing: .1em; }
.og-hl-split-item b { font-family: var(--font-mono); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.og-hl-split-item em { font-style: normal; font-size: 10px; color: var(--text-3); font-family: var(--font-mono); }

.og-hl-trend > svg { margin-top: 2px; margin-bottom: 4px; }
.og-hl-trend-meta {
  display: flex; justify-content: space-between; margin-top: 2px;
  font-size: 9.5px; color: var(--text-3); font-family: var(--font-mono);
}

.og-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "lines lines"
    "stoer verf"
    "trend trend";
  gap: 10px;
}
.og-panel-lines { grid-area: lines; }
.og-panel-stoer { grid-area: stoer; }
.og-panel-verf  { grid-area: verf; }
.og-panel-trend { grid-area: trend; }

.og-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px 12px;
}
.og-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.og-panel-title {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text);
  font-family: var(--font-mono);
}
.og-panel-sub {
  font-size: 10px; color: var(--text-3); font-family: var(--font-mono);
}
.og-panel-actions { display: flex; gap: 3px; }
.og-btn {
  padding: 3px 9px; font-size: 10px; font-weight: 600;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-xs); cursor: pointer;
  color: var(--text-3); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .06em;
}
.og-btn:hover { color: var(--text); border-color: var(--border-2); }
.og-btn-active {
  background: var(--text); color: var(--bg); border-color: var(--text);
}

.og-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.og-table th {
  text-align: left; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-3);
  padding: 6px 8px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.og-table td {
  padding: 6px 8px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.og-table tbody tr:hover td { background: var(--surface-2); }
.og-table tfoot td {
  background: var(--surface-3); border-top: 2px solid var(--text);
  font-weight: 700; padding-top: 8px; font-size: 11.5px;
}
.og-num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.og-th-total { color: var(--text) !important; }
.og-td-id { font-family: var(--font-mono); font-weight: 600; }
.og-td-name { font-weight: 500; }
.og-td-total { font-weight: 600; }
.og-td-bem { color: var(--text-2); font-size: 10.5px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.og-muted { color: var(--border-2); }
.og-row-off td { color: var(--text-3); }

.og-verf {
  font-family: var(--font-mono); font-weight: 600; padding: 2px 6px;
  border-radius: var(--radius-xs); display: inline-block;
}
.og-verf-ok { background: var(--ok-bg); color: var(--ok); }
.og-verf-warn { background: var(--warn-bg); color: var(--warn); }
.og-verf-bad { background: var(--bad-bg); color: var(--bad); }

.og-stoer-bar {
  margin-bottom: 10px; border-radius: var(--radius-xs); overflow: hidden;
  border: 1px solid var(--border);
}
.og-stoer-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  margin-right: 6px; vertical-align: middle;
}
.og-mini-bar-wrap {
  height: 6px; background: var(--surface-3); border-radius: 2px; overflow: hidden;
  width: 80px;
}
.og-mini-bar { height: 100%; }

.og-verf-legend {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px;
  padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 10px; color: var(--text-2); font-family: var(--font-mono);
}
.og-verf-legend span { display: flex; align-items: center; gap: 4px; }
.og-verf-legend i { width: 8px; height: 8px; border-radius: 1px; display: inline-block; }

.og-trend-chart {
  display: flex; gap: 4px; align-items: stretch; height: 180px;
}
.og-trend-col {
  flex: 1; display: flex; flex-direction: column; align-items: stretch;
  gap: 3px; min-width: 0;
}
.og-trend-num {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-2); font-weight: 500;
  height: 14px; text-align: center;
}
.og-trend-wrap {
  flex: 1 1 auto; min-height: 0;
  width: 100%; display: flex; align-items: flex-end; justify-content: center;
}
.og-trend-bar {
  width: 100%; max-width: 28px; background: var(--text-2);
  border-radius: 1px 1px 0 0;
}
.og-trend-bar-w { background: var(--border-2); }
.og-trend-bar-today { background: var(--accent); }
.og-trend-lbl {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3);
  text-align: center; line-height: 1.2;
}
.og-trend-lbl em { font-style: normal; color: var(--text-2); }
.og-trend-lbl-today { color: var(--accent-2) !important; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════
   TWEAKS PANEL
   ═══════════════════════════════════════════════════════════════════════ */
.tweaks-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 9999;
  background: var(--text); color: var(--bg);
  padding: 10px 14px; border-radius: 22px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  border: none; cursor: pointer;
  box-shadow: 0 6px 22px rgba(0,0,0,.22);
  display: flex; gap: 6px; align-items: center;
}
.tweaks-fab:hover { opacity: .92; }
.tweaks-panel {
  position: fixed; right: 18px; bottom: 68px; z-index: 9999;
  width: 300px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 16px 44px rgba(0,0,0,.22);
  padding: 14px 16px;
  font-family: var(--font-sans); color: var(--text);
}
.tweaks-panel-title {
  font-size: 13px; font-weight: 600; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks-panel-title button {
  background: transparent; border: none; cursor: pointer;
  color: var(--text-3); font-size: 16px; padding: 0 4px;
}
.tweak-row { margin-bottom: 11px; }
.tweak-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-3); margin-bottom: 5px;
}
.tweak-seg {
  display: flex; gap: 2px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px;
}
.tweak-seg button {
  flex: 1; padding: 4px 8px; font-size: 11px; font-weight: 500;
  background: transparent; border: none; border-radius: var(--radius-xs);
  cursor: pointer; color: var(--text-2); font-family: inherit;
}
.tweak-seg button.on {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: var(--shadow-s);
}
.tweak-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-swatch {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; padding: 0; position: relative;
}
.tweak-swatch.on {
  border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset;
}

/* ═══════════════════════════════════════════════════════════════════════
   AUFGABEN — Card-Layout (Erweiterung zu .aufg-* in app.css)
   ═══════════════════════════════════════════════════════════════════════ */
.aufg-list{display:flex;flex-direction:column;gap:10px}
.aufg-card{
  display:grid;grid-template-columns:1fr auto;gap:14px;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:14px 16px 14px 18px;
  border-left:4px solid var(--border-strong);
  position:relative;
}
.aufg-card.s-offen      {border-left-color:var(--bad)}
.aufg-card.s-inarbeit   {border-left-color:var(--warn)}
.aufg-card.s-erledigt   {border-left-color:var(--ok);background:var(--ok-bg)}
.aufg-card.s-overdue    {border-left-color:var(--bad);background:var(--bad-bg)}
/* Default-Cursor fuer die ganze Card — Pfeil, kein I-Beam.
   Klickbare Felder ueberschreiben mit cursor:pointer. */
.aufg-card{cursor:default}
.aufg-card-meta{
  display:flex;gap:6px;align-items:center;flex-wrap:wrap;
  font-size:11px;color:var(--text-3);margin-bottom:6px;line-height:1.4;
  cursor:default
}
.aufg-card-overdue-badge{
  display:inline-block;padding:2px 8px;border-radius:999px;
  font-size:10px;font-weight:700;background:var(--bad);color:#fff;
  text-transform:uppercase;letter-spacing:.04em;margin-right:4px;
  cursor:default
}
.aufg-card-done-check{color:var(--ok);font-weight:700;margin-right:6px;font-size:14px;cursor:inherit}
.aufg-card-desc{
  font-size:14px;font-weight:500;line-height:1.4;color:var(--text);
  cursor:pointer;white-space:pre-wrap;word-break:break-word
}
.aufg-card-massn{
  font-size:12.5px;font-weight:400;line-height:1.5;color:var(--text-2);
  margin-top:6px;cursor:pointer;white-space:pre-wrap;word-break:break-word
}
.aufg-card-right{
  display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:140px;
  cursor:default
}
.aufg-card-right-top{display:flex;gap:6px;align-items:center}
.aufg-card-due{
  font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--text-2);
  cursor:pointer
}
.aufg-card-due.bad{color:var(--bad);font-weight:600}
.aufg-card-person{
  font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--text-2);
  cursor:pointer
}
.aufg-card-bereich{cursor:pointer}
.aufg-card-empty-placeholder{color:var(--text-3);font-style:italic;cursor:inherit}

/* Click-to-Edit: Inline-Input ersetzt das Text-Element ohne Layout-Sprung */
.aufg-edit-input{
  width:100%;padding:4px 6px;border:1px solid var(--accent);border-radius:var(--radius-sm);
  font-family:inherit;font-size:inherit;color:var(--text);background:var(--surface);
  outline:none;line-height:inherit;box-sizing:border-box
}
.aufg-edit-input.massn{font-size:12.5px}
textarea.aufg-edit-input{resize:vertical;min-height:38px}

/* Erledigt-Sektion-Trenner */
.aufg-section-divider{
  display:flex;align-items:center;gap:8px;padding:10px 14px;margin:6px 0;
  background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);
  cursor:pointer;font-size:13px;font-weight:600;color:var(--ok);
  user-select:none
}
.aufg-section-divider:hover{background:var(--accent-bg)}
.aufg-section-divider .arrow{margin-left:auto;color:var(--text-3);font-size:11px;transition:transform .15s}
.aufg-section-divider.open .arrow{transform:rotate(90deg)}

/* + Neue Aufgabe Button in Filter-Bar */
.aufg-add-btn{
  padding:5px 14px;border:1px solid var(--accent);border-radius:var(--radius-sm);
  background:var(--accent);color:#fff;font-size:12px;font-weight:600;cursor:pointer;
  margin-left:auto
}
.aufg-add-btn:hover{filter:brightness(1.05)}

/* Modal-Style fuer + Neue Aufgabe (nutzt qtask-Pattern) */
#aufgNewModal .qtask-box{max-width:520px}
.aufg-new-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.aufg-new-label{
  font-size:10.5px;font-weight:600;color:var(--text-3);text-transform:uppercase;
  letter-spacing:.06em;display:block;margin-bottom:4px
}

/* ─── GV/TV-Doppelanzeige ───────────────────────────────────────────────
   GV = Gesamtverfügbarkeit (bisher), TV = Technische Verfügbarkeit (neu).
   Drei Anzeigeorte: KPI-Kachel, Linien · Tagesmenge-Zeile, Verfügbarkeit-
   und-Maschinenzeitprofil-Zeile. Vierter Ort: LineDetailPanel — dort
   per Klick togglebar (Klasse cr-detail-metric-toggle). */
.cr-kpi-verf-pair {
  display: flex; gap: 18px; align-items: flex-end;
}
.cr-kpi-verf-cell {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.cr-kpi-verf-tag {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  color: var(--text-3); letter-spacing: .08em;
}
.cr-kpi-verf-num {
  font-family: var(--font-mono); font-weight: 600; font-size: 22px;
  line-height: 1; letter-spacing: -0.02em;
}

.cr-line-verf-pair {
  display: flex; gap: 8px; align-items: center; justify-content: flex-end;
}
.cr-line-verf-tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: var(--text-3); letter-spacing: .08em; line-height: 1;
  width: 28px; text-align: center;
}
/* Header-Zeile in der Linien-Liste — zeigt einmal "GV / TV" oberhalb der
   Verfügbarkeits-Ringe. Sichtbar in jedem Scope (auch Verpackung-only). */
.cr-line-header {
  padding: 0 4px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  cursor: default;
}
.cr-line-header:hover { background: transparent; }

.cr-avail-verf-pair {
  display: flex; gap: 10px; align-items: center; justify-content: center;
}
.cr-avail-verf-cell {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.cr-avail-verf-tag {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  color: var(--text-3); letter-spacing: .08em; line-height: 1;
}

.cr-detail-metric-toggle {
  cursor: pointer; user-select: none;
  border-radius: var(--radius-xs);
  padding: 4px 6px; margin: -4px -6px;
  transition: background .12s ease;
}
.cr-detail-metric-toggle:hover { background: var(--surface-2); }
.cr-detail-metric-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cr-detail-verf-mode {
  display: inline-block; margin-left: 4px;
  font-size: 9px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent);
  padding: 1px 4px; border-radius: 2px;
}
