/* Grundregeln der eigenständigen Seite. Im Artifact liefert sie der Rahmen der Plattform. */
:root { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; font-size: 12px; font-family: system-ui, sans-serif; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: Stellhebel in einer festen linken Schiene, rechts Kennzahlen und darunter fünf Ansichten (Übersicht, Teams, Räume, Etagen, Annahmen). */
:root {
  /* IBS-CAFM-Styleguide: Off-White als Seitengrund, warme Neutraltöne, Akzent der Themenwelt „Arbeitswelten“
     (Green 700 statt 600, damit weiße Schrift auf dem Akzent AA erreicht), Überschriften in Marineblau. */
  --bg: #f5f1ea;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --surface-3: #e2ddd4;
  --ink: #1c1c1f;
  --ink-2: #57534c;
  --line: #e2ded6;
  --line-strong: #bdb7ad;
  --heading: #1f2a4c;
  --accent: #466344;
  --accent-ink: #ffffff;
  --accent-soft: #ebf0eb;
  --good: #0aac23;
  --warn: #fbb315;
  --crit: #dc3c3d;
  --z-desk: #257de0;
  --z-focus: #f47230;
  --z-calls: #00b894;
  --z-meet: #f2a600;
  --z-collab: #ee7fac;
  --z-social: #008a17;
  --z-support: #98a4ad;
  /* Styleguide: DM Sans für Überschriften und Text, Fraunces nur für große Zahlen */
  --font-display: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Fraunces", Georgia, serif;
  --r: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f14; --surface: #1c1c1f; --surface-2: #2a2a2e; --surface-3: #36363b;
    --ink: #f5f1ea; --ink-2: #aaa59c; --line: #313136; --line-strong: #4b4b52;
    --heading: #f5f1ea; --accent: #8fb58d; --accent-ink: #0f0f14; --accent-soft: #232c23;
    --z-desk: #338ced; --z-focus: #e76624; --z-calls: #00a888; --z-meet: #d28e05;
    --z-collab: #e24d8b; --z-social: #0aac23; --z-support: #6b7780;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f14; --surface: #1c1c1f; --surface-2: #2a2a2e; --surface-3: #36363b;
  --ink: #f5f1ea; --ink-2: #aaa59c; --line: #313136; --line-strong: #4b4b52;
  --heading: #f5f1ea; --accent: #8fb58d; --accent-ink: #0f0f14; --accent-soft: #232c23;
  --z-desk: #338ced; --z-focus: #e76624; --z-calls: #00a888; --z-meet: #d28e05;
  --z-collab: #e24d8b; --z-social: #0aac23; --z-support: #6b7780;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Schriftmaß: Grundschrift 12 px für Tabellen, Felder und Fließtext. Hilfstexte, Überschriften und Kennzahlen hängen an rem (15 px), damit graue Kleinschrift nicht unter 11 px fällt. */
html { font-size: 15px; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 12px; line-height: 1.45; }
.app { max-width: 1480px; margin: 0 auto; padding-block: 24px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 24px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; color: var(--heading); }
h2 { font-size: 1.15rem; font-weight: 600; color: var(--heading); }
h3 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-2); }
p { margin: 0; }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Kopf */
.top { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; }
/* IBS-Logo: bis zum Re-Launch gilt laut Styleguide das Legacy-Logo, hell auf hellem Grund, dunkel im dunklen Modus */
.brand { display: flex; align-items: flex-start; gap: 18px; min-width: 0; }
.logo { height: 56px; width: auto; flex: none; margin-top: 2px; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.top-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 68ch; }
.eyebrow { font-family: var(--font-display); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.badge { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.75rem; color: var(--ink-2); border: 1px dashed var(--line-strong); border-radius: 99px; padding: 1px 9px; }
.presets { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); border-radius: var(--r); padding: 4px; }
.seg button, .btn { font: inherit; font-weight: 500; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 2px; padding: 6px 12px; cursor: pointer; }
.seg button:hover { background: var(--surface-3); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.btn { border-color: var(--line-strong); background: var(--surface); }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); padding: 4px 8px; }
.preset-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Raster */
.layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 22px; max-height: calc(100vh - 32px); overflow-y: auto; }
.main { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.group { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-weight: 500; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.field output { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); white-space: nowrap; }
.field small, .hint { color: var(--ink-2); font-size: 0.8rem; }
.hint { max-width: 75ch; }
/* Aufklappbare Erläuterung: ein Satz bleibt sichtbar, Rechenweg und Herleitung stehen hier */
.more { font-size: 0.8rem; color: var(--ink-2); max-width: 75ch; }
.more summary { cursor: pointer; width: fit-content; color: var(--ink-2); font-weight: 500; text-decoration: underline dotted; text-underline-offset: 3px; }
.more summary:hover { color: var(--ink); }
.more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.more-body { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="number"], input[type="text"], select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; padding: 4px 7px; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
input[type="number"] { text-align: right; -moz-appearance: textfield; appearance: textfield; }
/* Keine Hoch/Runter-Pfeile: Sie kosten in schmalen Feldern den Platz für die Zahl. Pfeiltasten zählen weiter. */
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0; min-width: 0; }
.readout { background: var(--surface-2); border-radius: 4px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.readout strong { font-family: var(--font-num); font-size: 1.15rem; font-weight: 500; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-label { font-size: 0.8rem; color: var(--ink-2); }
.kpi-value { font-family: var(--font-num); font-weight: 500; font-size: clamp(1.35rem, 1rem + 1vw, 1.8rem); line-height: 1.1; white-space: nowrap; }
.kpi-value small { font-family: var(--font-body); font-size: 0.5em; font-weight: 500; color: var(--ink-2); }
.kpi-sub { font-size: 0.8rem; color: var(--ink-2); }
.kpi-main { gap: 6px; }
.kpi-main .kpi-value { font-size: clamp(1.7rem, 1.2rem + 1.2vw, 2.3rem); }
.kpi-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.kpi-meter { position: relative; height: 8px; background: var(--surface-2); border-radius: 4px; margin: 4px 0 2px; }
.kpi-meter b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--ink-2); }
.kpi-meter i { position: absolute; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--crit); }
.kpi-headline .pill { margin-left: auto; }
.kpi-meter u { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }

/* Status */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; color: var(--ink); }
.pill i { font-style: normal; width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: #ffffff; background: var(--ink-2); flex: none; }
.pill.good i { background: var(--good); }
.pill.warn i { background: var(--warn); color: #0b0b0b; }
.pill.crit i { background: var(--crit); }

/* Ansichten */
.tabs { display: flex; flex-wrap: wrap; gap: 0 22px; border-bottom: 1px solid var(--line-strong); }
.tabs button { font: inherit; font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; color: var(--ink-2); background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 2px 7px; margin-bottom: -1px; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.view { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.view[hidden] { display: none; }

/* Abschnitte */
.sec { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sec-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; }
.sec-head p { color: var(--ink-2); max-width: 75ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* Flächenbilanz */
.plot { position: relative; padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.bar-cap { font-size: 0.8rem; color: var(--ink-2); display: flex; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.bar-cap b { color: var(--ink); font-weight: 600; }
.track { position: relative; height: 30px; }
.track.thin { height: 14px; }
.stackbar { display: flex; gap: 2px; height: 100%; }
.stackbar span { flex-basis: 0; min-width: 0; cursor: default; }
.stackbar span:last-child { border-radius: 0 4px 4px 0; }
.track.thin .stackbar span { opacity: 0.55; }
.grid { position: absolute; inset: 22px 0 0 0; pointer-events: none; }
.grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.capline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--ink); pointer-events: none; }
.capline span { position: absolute; top: -2px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; background: var(--surface); padding: 0 6px; }
.capline.l span { right: 0; }
.capline.r span { left: 0; }
.axis { position: relative; height: 18px; font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.axis span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; }
.axis span:first-child { transform: none; }
.axis span:last-child { transform: translateX(-100%); }
.bars-inner { position: relative; display: flex; flex-direction: column; gap: 12px; z-index: 1; }

/* Tabellen */
.scroll { overflow-x: auto; min-width: 0; }
/* Ohne doctype (Fragment direkt im Browser geöffnet) setzen Browser Tabellen auf 16 px. Deshalb erben Tabellen die Schrift ausdrücklich. */
table { font: inherit; white-space: inherit; text-align: start; border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 500; font-size: 0.78rem; color: var(--ink-2); padding: 0 10px 8px; border-bottom: 1px solid var(--line-strong); vertical-align: bottom; white-space: nowrap; }
th.num { text-align: right; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 600; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; flex: none; }
.zname { font-weight: 500; white-space: nowrap; }
.zact { display: block; font-size: 0.78rem; color: var(--ink-2); padding-left: 20px; }
.in-s { width: 74px !important; }
.teams td, .teams th { padding-left: 5px; padding-right: 5px; }
.teams th { white-space: normal; }
/* Bereichszelle wie die Nachbarspalten: Name als Hauptwert, Profil als kleine graue Zeile darunter */
.teams td.unit { min-width: 16rem; }
.teams td.unit input, .teams td.unit select { display: block; }
.teams td.unit input { font-size: inherit; font-weight: 600; padding: 4px 7px; border-color: var(--line); }
.teams td.unit select { width: auto; max-width: 100%; margin-top: 2px; padding: 2px 4px 2px 7px; font-size: 0.76rem; color: var(--ink-2); background: transparent; border-color: transparent; cursor: pointer; }
.teams td.unit input:hover, .teams td.unit select:hover { border-color: var(--line-strong); }
.teams .in-s { width: 62px !important; }
.teams td small { display: block; color: var(--ink-2); font-size: 0.76rem; }
.slide { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.teams .slide input { min-width: 80px; }
.slide output { font-weight: 600; min-width: 3em; text-align: right; }
.rec { font: inherit; font-size: 0.76rem; color: var(--ink-2); background: none; border: 0; padding: 2px 0 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; white-space: nowrap; }
.rec:hover { color: var(--accent); }
.meter { position: relative; height: 8px; width: 56px; flex: none; background: var(--surface-2); border-radius: 4px; }
.meter b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--ink-2); }
.meter u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.utilcell { display: flex; flex-direction: column; gap: 6px; }
.utilcell div.row { display: flex; gap: 10px; align-items: center; }
.icon-btn { font: inherit; font-size: 1.1rem; line-height: 1; width: 28px; height: 28px; border-radius: 4px; border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--crit); color: var(--crit); }

/* Wochenverlauf */
.week td, .week th { padding-left: 7px; padding-right: 7px; }
.week .in-s { width: 62px !important; }
.week select { min-width: 150px; }
.week td small { display: block; font-size: 0.76rem; color: var(--ink-2); margin-top: 3px; }
.week td small.pk { color: var(--ink); font-weight: 600; }
.week td small.u-warn { color: var(--ink); font-weight: 600; }
.week td small.u-crit { color: var(--crit); font-weight: 600; }
.week tfoot td { font-weight: 400; }
.week tfoot td:first-child, .week tfoot td.pk { font-weight: 600; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.facts { display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); max-width: 90ch; }
.facts b { color: var(--ink); font-weight: 600; }

/* Tagesgang */
.heat { table-layout: fixed; min-width: 520px; }
.heat th { text-align: center; white-space: normal; }
.heat th small { display: block; font-weight: 400; }
.heat th:first-child, .heat td:first-child { text-align: left; width: 120px; }
.heat td { text-align: center; padding: 4px; border-bottom: 0; }
.heat td:first-child { padding-left: 10px; color: var(--ink-2); }
.heat tr.design td:first-child { color: var(--ink); font-weight: 600; }
.heat .cell { display: flex; flex-direction: column; gap: 1px; padding: 8px 4px; border-radius: 4px; border: 2px solid transparent; font-variant-numeric: tabular-nums; }
.heat .cell b { font-weight: 600; }
.heat .cell small { font-size: 0.74rem; color: var(--ink-2); }
.heat .cell.hot { border-color: var(--ink); }
.dayparts .in-s { width: 70px !important; }

/* Benchmarks */
.bench { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 2fr) minmax(150px, auto); gap: 6px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bench:first-child { padding-top: 0; }
.bench:last-of-type { border-bottom: 0; }
.bench-name { font-weight: 600; }
.bench-name span { display: block; font-weight: 400; font-size: 0.8rem; color: var(--ink-2); }
.range { position: relative; height: 44px; min-width: 0; }
.range .rail-line { position: absolute; left: 0; right: 0; top: 12px; height: 8px; border-radius: 4px; background: var(--surface-2); }
.range .band { position: absolute; top: 12px; height: 8px; background: var(--accent); opacity: 0.45; }
.range .dot { position: absolute; top: 8px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); }
.range .ref { position: absolute; top: 10px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-2); }
.range .tick { position: absolute; top: 26px; font-size: 0.72rem; color: var(--ink-2); transform: translateX(-50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bench-val { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.bench-val strong { font-family: var(--font-num); font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.8rem; color: var(--ink-2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.lg-ref { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-2); }
.lg-band { width: 22px; height: 8px; background: var(--accent); opacity: 0.45; }
.lg-cap { width: 0; height: 14px; border-left: 2px dashed var(--ink); }

/* Szenarien */
.preset-btns { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; justify-content: flex-end; align-items: center; }
.preset-btns .sample { font-size: 0.78rem; color: var(--ink-2); }
#sample-sel { width: auto; max-width: 100%; }
.sample-msg { margin: 0; font-size: 0.78rem; color: var(--ink-2); text-align: right; }
.sc-save { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.sc-save .field { flex: 1 1 240px; max-width: 420px; }
#sc-table td, #sc-table th { white-space: nowrap; }
#sc-table tr.cur td { background: var(--surface-2); font-weight: 600; }
#sc-table .btn { padding: 2px 7px; font-size: 0.78rem; }
#sc-table td.act { text-align: right; }
#sc-table td.act .btn { margin-left: 4px; }
#sc-msg { margin-top: 10px; min-height: 1.2em; }
#sc-msg .btn { padding: 2px 9px; font-size: 0.8rem; margin-left: 8px; }
textarea { font: 0.78rem/1.4 ui-monospace, Consolas, monospace; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; padding: 8px; width: 100%; box-sizing: border-box; resize: vertical; }
/* Teams unter Bereichen */
.sub-unit { padding: 14px 0; border-bottom: 1px solid var(--line); }
.sub-unit:first-child { padding-top: 0; }
.sub-unit:last-child { border-bottom: 0; padding-bottom: 0; }
.sub-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.sub-head > div { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; min-width: 0; }
.sub-head h3 { text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--ink); }
.subs { margin-top: 10px; }
.subs th, .subs td { white-space: nowrap; }
.subs td input[type="text"] { min-width: 130px; }
.subs td select { min-width: 150px; width: auto; }
.subs .wk { display: flex; gap: 3px; margin-top: 4px; }
.subs .wk input { width: 46px; padding-left: 4px; padding-right: 2px; }
.subs tfoot td { font-size: 0.82rem; }
.sub-note { margin-top: 8px; }
/* Sensitivität: Richtung des Schritts über hell/dunkel und Beschriftung, keine Zonenfarben */
.sens-row { display: grid; grid-template-columns: minmax(150px, 250px) minmax(0, 1fr) 190px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sens-row:last-child { border-bottom: 0; }
.sens-name b { display: block; font-weight: 600; }
.sens-name small { color: var(--ink-2); font-size: 0.78rem; }
.sens-track { position: relative; height: 26px; background: var(--surface-2); border-radius: 4px; }
.sens-track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-strong); }
.sens-track i { position: absolute; height: 10px; border-radius: 2px; min-width: 2px; }
.sens-track i.lo { top: 2px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.sens-track i.hi { bottom: 2px; background: var(--accent); }
.sens-val { font-size: 0.8rem; font-variant-numeric: tabular-nums; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; }
.sens-val span { color: var(--ink-2); }
.sens-val b { text-align: right; font-weight: 600; }
#sens-legend i.lo, #sens-legend i.hi { display: inline-block; width: 18px; height: 10px; border-radius: 2px; }
#sens-legend i.lo { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
#sens-legend i.hi { background: var(--accent); }
@media (max-width: 760px) { .sens-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } .sens-val { grid-template-columns: auto auto; justify-content: start; } }
/* Etagen */
.floors { display: flex; flex-direction: column; gap: 4px; }
.floor { display: grid; grid-template-columns: 62px minmax(0, 1fr) 170px; gap: 10px; align-items: center; }
.floor-name { font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }
.floor-bar { display: flex; gap: 2px; height: 34px; border: 1px dashed var(--line-strong); border-radius: 4px; padding: 2px; min-width: 0; }
.floor-bar span { flex-basis: 0; min-width: 0; background: var(--surface-2); border-radius: 2px; padding: 0 8px; font-size: 0.78rem; line-height: 28px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: default; }
.floor-bar span.alt { background: var(--surface-3); }
.floor-bar span.free { background: transparent; color: var(--ink-2); }
/* Etagenräume und zentrale Flächen: neutral mit Rahmen, damit die Zonenfarben keine zweite Bedeutung bekommen */
.floor-bar span.cen { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.floor-bar span.typ { padding: 0; }
.floor-bar span { container-type: inline-size; }
.floor-bar span b { font-weight: inherit; }
/* Zu schmal für einen lesbaren Namen: Text weg statt „Et…“. Name steht im Tooltip und in der Tabelle darunter. */
@container (max-width: 64px) { .floor-bar span b { display: none; } }
.floor-head { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
#floor-legend { margin-top: 12px; }
#floor-legend .sw { margin-right: 0; }
#floor-legend .sw.cen { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
#floor-legend .sw.unit { background: var(--surface-3); }
#floor-table-wrap { margin-top: 14px; }
#floor-table td, #floor-table th { white-space: nowrap; }
#floor-table tbody th, #floor-table tfoot th { text-align: left; font-size: inherit; font-weight: 400; color: var(--ink); padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
#floor-table tfoot th { font-weight: 600; border-bottom: 0; }
#floor-table tfoot tr:first-child th { border-top: 1px solid var(--line-strong); }
#floor-table tfoot tr.sub th, #floor-table tfoot tr.sub td { border-top: 1px solid var(--line); }
#floor-table tfoot tr.sub th, #floor-table tfoot tr.sub td { font-weight: 400; color: var(--ink-2); }
#floor-table td:last-child, #floor-table th:last-child { font-weight: 600; }
#floor-table th .sw { margin-right: 5px; }
#floor-sum { margin-top: 10px; }
.issues { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.issues li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.issues li > span:last-child { min-width: 0; flex: 1 1 240px; }
#floor-inputs h3 { margin: 18px 0 8px; }
#floor-inputs h3:first-child { margin-top: 0; }
#floor-inputs table { width: auto; min-width: 320px; }
.nb-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.nb-row select { min-width: 0; max-width: 100%; }
/* Sonderflächen: Schraffur aus vorhandenen Neutraltönen, keine eigene Zonenfarbe */
.hatch, .floor-bar span.hatch { background: repeating-linear-gradient(135deg, var(--z-support) 0 3px, var(--surface-3) 3px 7px); }
.special td:first-child input { min-width: 170px; }
.special td:nth-child(4) input { min-width: 180px; width: 100%; }
.special select { min-width: 130px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
/* Raumprogramm */
#rooms td small { display: block; color: var(--ink-2); font-size: 0.76rem; }
#team-rooms td small { color: var(--ink-2); font-size: 0.76rem; }
#team-rooms-wrap h3 { margin-top: 18px; }
#rooms tr.grp td { background: var(--surface-2); font-weight: 600; font-size: 0.82rem; }
.catalog td:first-child input { min-width: 170px; }
.catalog select { min-width: 110px; }
.roommix .in-s { width: 54px !important; }
.roommix td, .roommix th { padding-left: 4px; padding-right: 4px; font-size: 0.8rem; }
.roommix th { white-space: normal; vertical-align: bottom; }
.roommix .grp-h { text-align: center; border-left: 1px solid var(--line); }
.roommix .grp-s { border-left: 1px solid var(--line); }
.assume .wide { grid-column: 1 / -1; min-width: 0; }
input:disabled { opacity: 0.45; }
.floor-info { font-size: 0.8rem; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { border-left: 3px solid var(--crit); padding: 6px 12px; background: var(--surface-2); border-radius: 0 4px 4px 0; }

/* Annahmen */
.assume { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px; }
.assume > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.assume td, .assume th { padding-left: 6px; padding-right: 6px; }
.prose { display: flex; flex-direction: column; gap: 8px; max-width: 75ch; color: var(--ink-2); }
.prose b { color: var(--ink); font-weight: 600; }
.sum-bad { color: var(--crit); font-weight: 600; }

/* Tooltip */
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 0.8rem; padding: 6px 10px; border-radius: 4px; max-width: 260px; white-space: pre-line; font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpi-main { grid-column: 1 / -1; } }
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; }
  .bench { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:last-child { grid-column: 1 / -1; }
  .floor { grid-template-columns: 52px minmax(0, 1fr); }
  .floor { grid-template-columns: 52px minmax(0, 1fr); }
  .floor-info { display: none; }
  .panel { padding: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  .stackbar span, .meter b, .range .dot { transition: flex-grow 0.2s ease, width 0.2s ease, left 0.2s ease; }
}
