/* Zentrale – Gestaltung nach Apples macOS-Vorgaben: Systemschrift (SF Pro), Systemfarben,
   schwebende Glas-Seitenleiste, Kapsel-Knöpfe, Segment-Steuerelemente, Sheets. */

:root {
  color-scheme: light;
  --grund: #f5f5f7;
  --flaeche: #ffffff;
  --flaeche-2: #f5f5f7;
  --fuellung: rgba(120, 120, 128, 0.12);
  --fuellung-hover: rgba(0, 0, 0, 0.045);
  --auswahl: rgba(0, 0, 0, 0.075);
  --zebra: rgba(0, 0, 0, 0.028);
  --text: #1d1d1f;
  --gedaempft: #6e6e73;
  --platzhalter: rgba(60, 60, 67, 0.34);
  --linie: #e5e5ea;
  --linie-stark: #d1d1d6;
  --kante: rgba(0, 0, 0, 0.07);
  --trenner: rgba(60, 60, 67, 0.13);
  --akzent: #007aff;
  --akzent-text: #ffffff;
  --akzent-schwach: #e5f0ff;
  --link: #0066cc;
  --fokus: rgba(0, 122, 255, 0.4);
  --gut: #248a3d;
  --gut-schwach: #e3f5e8;
  --warn: #c45500;
  --warn-schwach: #fff1df;
  --schlecht: #d70015;
  --schlecht-schwach: #ffe7e9;
  --aus: rgba(60, 60, 67, 0.06);
  --ruest-1: rgba(60, 60, 67, 0.16);
  --ruest-2: rgba(60, 60, 67, 0.05);
  --rand-teil: rgba(0, 0, 0, 0.3);
  --bett: #2c2c2e;
  --bett-raster: rgba(255, 255, 255, 0.08);
  --glas: rgba(255, 255, 255, 0.66);
  --glas-stark: rgba(255, 255, 255, 0.84);
  --glas-rand: rgba(0, 0, 0, 0.07);
  --knopf: #ffffff;
  --knopf-hover: #f2f2f4;
  --knopf-kante: rgba(0, 0, 0, 0.12);
  --knopf-schatten: 0 1px 1.5px rgba(0, 0, 0, 0.06);
  --segment-aktiv: #ffffff;
  --feld: #ffffff;
  --feld-kante: rgba(0, 0, 0, 0.14);
  --schalter-aus: rgba(120, 120, 128, 0.2);
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.035);
  --schatten-hoch: 0 2px 6px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.09);
  --schatten-leiste: 0 0 0 0.5px rgba(0, 0, 0, 0.03), 0 10px 34px rgba(0, 0, 0, 0.07);
  --schatten-fenster: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 24px 70px rgba(0, 0, 0, 0.22);
  --verlauf-1: rgba(100, 210, 255, 0.34);
  --verlauf-2: rgba(175, 82, 222, 0.2);
  --radius: 14px;
  --radius-klein: 8px;
  --pfeile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 14' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 5 4.5 2l3 3M1.5 9l3 3 3-3'/%3E%3C/svg%3E");
  --lupe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='m15 15 5 5'/%3E%3C/svg%3E");
  --schrift: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --rund: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --serie-1: #007aff; --serie-2: #ff9500; --serie-3: #34c759; --serie-4: #ffcc00;
  --serie-einnahmen: #34c759; --serie-ausgaben: #af52de;
  --leiste-breite: 252px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --grund: #1c1c1e;
    --flaeche: #2c2c2e;
    --flaeche-2: #343436;
    --fuellung: rgba(118, 118, 128, 0.24);
    --fuellung-hover: rgba(255, 255, 255, 0.06);
    --auswahl: rgba(255, 255, 255, 0.1);
    --zebra: rgba(255, 255, 255, 0.03);
    --text: #f5f5f7;
    --gedaempft: #98989d;
    --platzhalter: rgba(235, 235, 245, 0.3);
    --linie: #3a3a3c;
    --linie-stark: #48484a;
    --kante: rgba(255, 255, 255, 0.07);
    --trenner: rgba(255, 255, 255, 0.1);
    --akzent: #0a84ff;
    --akzent-text: #ffffff;
    --akzent-schwach: #0e2f52;
    --link: #409cff;
    --fokus: rgba(10, 132, 255, 0.5);
    --gut: #30d158;
    --gut-schwach: #0f3a1c;
    --warn: #ff9f0a;
    --warn-schwach: #3d2a0c;
    --schlecht: #ff453a;
    --schlecht-schwach: #45191a;
    --aus: rgba(0, 0, 0, 0.3);
    --ruest-1: rgba(255, 255, 255, 0.18);
    --ruest-2: rgba(255, 255, 255, 0.05);
    --rand-teil: rgba(255, 255, 255, 0.35);
    --bett: #111113;
    --glas: rgba(44, 44, 48, 0.72);
    --glas-stark: rgba(40, 40, 44, 0.86);
    --glas-rand: rgba(255, 255, 255, 0.09);
    --knopf: #3a3a3c;
    --knopf-hover: #444446;
    --knopf-kante: rgba(255, 255, 255, 0.06);
    --knopf-schatten: 0 1px 1px rgba(0, 0, 0, 0.3);
    --segment-aktiv: #636366;
    --feld: #232325;
    --feld-kante: rgba(255, 255, 255, 0.12);
    --schalter-aus: rgba(120, 120, 128, 0.36);
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.3);
    --schatten-hoch: 0 8px 28px rgba(0, 0, 0, 0.45);
    --schatten-leiste: 0 10px 34px rgba(0, 0, 0, 0.35);
    --schatten-fenster: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 70px rgba(0, 0, 0, 0.55);
    --verlauf-1: rgba(10, 132, 255, 0.28);
    --verlauf-2: rgba(191, 90, 242, 0.18);
    --serie-1: #0a84ff; --serie-2: #ff9f0a; --serie-3: #30d158; --serie-4: #ffd60a;
    --serie-einnahmen: #30d158; --serie-ausgaben: #bf5af2;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --grund: #1c1c1e;
  --flaeche: #2c2c2e;
  --flaeche-2: #343436;
  --fuellung: rgba(118, 118, 128, 0.24);
  --fuellung-hover: rgba(255, 255, 255, 0.06);
  --auswahl: rgba(255, 255, 255, 0.1);
  --zebra: rgba(255, 255, 255, 0.03);
  --text: #f5f5f7;
  --gedaempft: #98989d;
  --platzhalter: rgba(235, 235, 245, 0.3);
  --linie: #3a3a3c;
  --linie-stark: #48484a;
  --kante: rgba(255, 255, 255, 0.07);
  --trenner: rgba(255, 255, 255, 0.1);
  --akzent: #0a84ff;
  --akzent-text: #ffffff;
  --akzent-schwach: #0e2f52;
  --link: #409cff;
  --fokus: rgba(10, 132, 255, 0.5);
  --gut: #30d158;
  --gut-schwach: #0f3a1c;
  --warn: #ff9f0a;
  --warn-schwach: #3d2a0c;
  --schlecht: #ff453a;
  --schlecht-schwach: #45191a;
  --aus: rgba(0, 0, 0, 0.3);
  --ruest-1: rgba(255, 255, 255, 0.18);
  --ruest-2: rgba(255, 255, 255, 0.05);
  --rand-teil: rgba(255, 255, 255, 0.35);
  --bett: #111113;
  --glas: rgba(44, 44, 48, 0.72);
  --glas-stark: rgba(40, 40, 44, 0.86);
  --glas-rand: rgba(255, 255, 255, 0.09);
  --knopf: #3a3a3c;
  --knopf-hover: #444446;
  --knopf-kante: rgba(255, 255, 255, 0.06);
  --knopf-schatten: 0 1px 1px rgba(0, 0, 0, 0.3);
  --segment-aktiv: #636366;
  --feld: #232325;
  --feld-kante: rgba(255, 255, 255, 0.12);
  --schalter-aus: rgba(120, 120, 128, 0.36);
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.3);
  --schatten-hoch: 0 8px 28px rgba(0, 0, 0, 0.45);
  --schatten-leiste: 0 10px 34px rgba(0, 0, 0, 0.35);
  --schatten-fenster: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 70px rgba(0, 0, 0, 0.55);
  --verlauf-1: rgba(10, 132, 255, 0.28);
  --verlauf-2: rgba(191, 90, 242, 0.18);
  --serie-1: #0a84ff; --serie-2: #ff9f0a; --serie-3: #30d158; --serie-4: #ffd60a;
  --serie-einnahmen: #30d158; --serie-ausgaben: #bf5af2;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 14px/1.45 var(--schrift);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.modal-offen { overflow: hidden; }
::selection { background: color-mix(in srgb, var(--akzent) 28%, transparent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.15; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.012em; }
h3 { font-size: 14px; font-weight: 600; margin-top: 1.2em; }
p { margin: 0 0 0.8em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
pre { white-space: pre-wrap; background: var(--flaeche-2); padding: 10px 12px; border-radius: var(--radius-klein); }
small, .klein { font-size: 12.5px; }
.gedaempft { color: var(--gedaempft); }
.mitte { text-align: center; }
.rechts { text-align: right; }
.text-gut { color: var(--gut); }
.text-warn { color: var(--warn); }
.text-schlecht { color: var(--schlecht); font-weight: 600; }
.platz { flex: 1; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 1px; }
.symbol { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

.sprung { position: absolute; left: -999px; top: 8px; background: var(--flaeche); padding: 8px 12px; border-radius: var(--radius-klein); z-index: 100; }
.sprung:focus { left: 8px; }

/* Hülle: schwebende Glas-Seitenleiste + Inhalt ------------------------------------------------ */
.app { display: grid; grid-template-columns: var(--leiste-breite) minmax(0, 1fr); min-height: 100vh; }
body.anmeldung .app { display: none; }
body:not(.anmeldung) .anmeldeseite { display: none; }

.seitenleiste {
  position: sticky; top: 10px; height: calc(100vh - 20px); margin: 10px 0 10px 10px;
  overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 10px 12px;
  background: var(--glas);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  backdrop-filter: blur(30px) saturate(1.8);
  border: 1px solid var(--glas-rand); border-radius: 20px; box-shadow: var(--schatten-leiste);
}
.seitenleiste::-webkit-scrollbar { display: none; }
.marke { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; flex: none; letter-spacing: -0.01em; }
.marke:hover { text-decoration: none; }
.seitenleiste .marke { padding: 2px 8px 6px; font-size: 15px; }
.app-symbol {
  display: inline-block; width: 28px; height: 28px; flex: none; border-radius: 7px;
  background: linear-gradient(180deg, #64d2ff 0%, #0a84ff 55%, #0060df 100%);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.18);
}
.app-symbol svg { display: block; width: 100%; height: 100%; }

.suchknopf {
  display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 10px;
  border: 0; background: var(--fuellung); color: var(--gedaempft); border-radius: 10px;
  font: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.suchknopf span { flex: 1; }
.suchknopf .symbol { width: 15px; height: 15px; }
.suchknopf kbd { font-family: var(--schrift); font-size: 11.5px; color: var(--gedaempft); opacity: 0.8; }

#navigation { display: flex; flex-direction: column; gap: 1px; flex: 1; }
#navigation a {
  display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 5px 9px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 450;
}
#navigation a:hover { background: var(--fuellung-hover); }
#navigation a[aria-current='page'] { background: var(--auswahl); font-weight: 600; }
.nav-icon { width: 18px; height: 18px; flex: none; color: var(--akzent); }
.nav-zahl { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--gedaempft); }
.nav-gruppe { margin: 16px 9px 3px; font-size: 11px; font-weight: 600; color: var(--gedaempft); }
.nav-fuss { margin-top: auto; border-top: 1px solid var(--trenner); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.nav-ich { display: flex; flex-direction: column; padding: 2px 9px; font-size: 13px; font-weight: 500; }
.nav-ich small { color: var(--gedaempft); font-weight: 400; font-size: 12px; }
.nav-badge { background: #ff3b30; color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; text-align: center; padding: 0 5px; line-height: 18px; font-weight: 600; }
.kopfzeile { display: none; }

main { max-width: 1400px; width: 100%; margin: 0 auto; padding: 30px 36px 64px; outline: none; }
.laedt { padding: 60px; text-align: center; color: var(--gedaempft); }
section { margin-bottom: 24px; }

/* Bausteine ----------------------------------------------------------------------------------- */
.panel { background: var(--flaeche); border: 1px solid var(--kante); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--schatten); margin-bottom: 20px; }
details.panel > summary { cursor: pointer; font-weight: 600; }
details.panel[open] > summary { margin-bottom: 12px; }
.abschnitt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.abschnitt-kopf h1, .abschnitt-kopf h2 { margin: 0; }
.werkzeugleiste { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.werkzeugleiste.ohne-rand { margin: 0; }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zaehler { background: var(--warn-schwach); color: var(--warn); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 600; margin-left: 4px; }

.knopf {
  display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 5px 15px; border-radius: 999px;
  border: 1px solid var(--knopf-kante); background: var(--knopf); color: var(--text); box-shadow: var(--knopf-schatten);
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, filter 0.15s;
}
.knopf:hover { background: var(--knopf-hover); text-decoration: none; }
.knopf:active { filter: brightness(0.94); }
.knopf:disabled { opacity: 0.45; cursor: default; filter: none; }
.knopf.primaer { background: var(--akzent); border-color: transparent; color: var(--akzent-text); box-shadow: 0 1px 2px rgba(0, 90, 200, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.knopf.primaer:hover { background: var(--akzent); filter: brightness(1.07); }
.knopf.primaer:active { filter: brightness(0.93); }
.knopf.leise { border-color: transparent; background: transparent; box-shadow: none; color: var(--link); }
.knopf.leise:hover { background: var(--akzent-schwach); }
.knopf.gefahr-leise { border-color: transparent; background: transparent; box-shadow: none; color: var(--schlecht); }
.knopf.gefahr-leise:hover { background: var(--schlecht-schwach); }
.knopf.klein { min-height: 26px; padding: 3px 11px; font-size: 12.5px; }
.knopf.gross { min-height: 40px; padding: 8px 20px; font-size: 15px; }
.icon {
  display: inline-grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--gedaempft);
  font-size: 1rem; cursor: pointer; width: 30px; height: 30px; border-radius: 999px; flex: none;
}
.icon:hover { background: var(--fuellung-hover); color: var(--text); }
.icon .symbol { width: 17px; height: 17px; }
.link { border: 0; background: none; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-align: left; }
.link:hover { text-decoration: underline; }

/* Segment-Steuerelemente (auch für Reiter) */
.segmente, .tabs { display: inline-flex; background: var(--fuellung); border: 0; border-radius: 9px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.segment, .tab {
  border: 0; background: transparent; min-height: 26px; padding: 4px 12px; border-radius: 7px;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s;
}
.segment:hover:not(.aktiv), .tab:hover:not(.aktiv) { background: var(--fuellung-hover); }
.segment small { color: var(--gedaempft); font-size: 12px; }
.segment.aktiv, .tab.aktiv { background: var(--segment-aktiv); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); font-weight: 600; }
.tabs { display: flex; width: fit-content; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.tab { padding: 4px 14px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.55; white-space: nowrap; vertical-align: 1px; }
.badge.neutral, .badge.info { background: var(--akzent-schwach); color: var(--link); }
.badge.ok { background: var(--gut-schwach); color: var(--gut); }
.badge.warn { background: var(--warn-schwach); color: var(--warn); }
.badge.bad { background: var(--schlecht-schwach); color: var(--schlecht); }
.badge.still { background: var(--fuellung); color: var(--gedaempft); }

.banner { background: var(--akzent-schwach); border-radius: 12px; padding: 11px 16px; margin-bottom: 18px; }
.optimierung { background: var(--gut-schwach); border-radius: 12px; padding: 11px 16px; color: var(--text); }
.leer { text-align: center; padding: 40px 16px; color: var(--gedaempft); background: var(--flaeche); border: 1px solid var(--kante); border-radius: var(--radius); }

.farbe { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.punkt { width: 14px; height: 14px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px var(--rand-teil); flex: none; }
.punkt.leer { background: repeating-linear-gradient(45deg, var(--linie-stark) 0 3px, transparent 3px 6px); padding: 0; border: 0; }

.balken { height: 6px; background: var(--fuellung); border-radius: 99px; overflow: hidden; }
.balken span { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.balken.ok span { background: var(--gut); }
.balken.warn span { background: var(--warn); }

/* Kennzahlen ---------------------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--flaeche); border: 1px solid var(--kante); border-radius: var(--radius); padding: 14px 16px 15px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--schatten); }
.kpi-titel { font-size: 12.5px; color: var(--gedaempft); font-weight: 500; }
.kpi-wert { font-family: var(--rund); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2px; }
.kpi-zusatz { font-size: 12px; color: var(--gedaempft); }
.kpi.gut .kpi-wert { color: var(--gut); }
.kpi.warnung .kpi-wert { color: var(--warn); }
.kpi.schlecht { border-color: color-mix(in srgb, var(--schlecht) 35%, var(--kante)); }
.kpi.schlecht .kpi-wert { color: var(--schlecht); }
a.kpi { color: inherit; text-decoration: none; transition: box-shadow 0.2s, transform 0.2s; }
a.kpi:hover { box-shadow: var(--schatten-hoch); transform: translateY(-1px); }

/* Druckerkarten ------------------------------------------------------------------------------- */
.druckergitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.druckerkarte {
  background: var(--flaeche); border: 1px solid var(--kante); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--schatten);
}
.druckerkarte header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.druckerkarte h3 { margin: 0; font-size: 15px; }
.druckerkarte.inaktiv { opacity: 0.55; }
.karten-klick { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 3px; border-radius: var(--radius-klein); }
.karten-klick:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }
.karten-klick .zustand { font-size: 12.5px; font-weight: 600; color: var(--gedaempft); display: inline-flex; align-items: center; gap: 6px; }
.karten-klick .zustand::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.druckerkarte.laeuft .zustand { color: var(--gut); }
.druckerkarte.bereit .zustand { color: var(--link); }
.druckerkarte.ueberfaellig .zustand { color: var(--warn); }
.karten-klick .was { font-weight: 600; display: flex; gap: 6px; align-items: center; }
.zeile { display: flex; justify-content: space-between; gap: 8px; }
.slots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.slot { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--fuellung); border-radius: 99px; padding: 2px 9px; }
.slot small { color: var(--gedaempft); }
.aufgabe-hinweis { background: var(--warn-schwach); color: var(--text); border-radius: 10px; padding: 7px 11px; font-size: 13px; }

.aufgaben { list-style: none; margin: 0; padding: 0; }
.aufgaben li { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--linie); }
.aufgaben li:last-child { border-bottom: 0; }
.aufgaben time { color: var(--gedaempft); font-size: 13px; }
.warnliste { margin: 0; padding-left: 18px; }
.warnliste li { margin: 4px 0; }
.warnliste li.w-termin, .warnliste li.w-nichtplanbar { color: var(--schlecht); }
.warnliste li.w-filament, .warnliste li.w-job { color: var(--warn); }
.warnliste a { color: inherit; }

/* Tabellen (macOS-Liste mit wechselnden Zeilenfarben) ----------------------------------------- */
.tabellen-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--kante); border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 20px; }
.panel .tabellen-rahmen, .modal-box .tabellen-rahmen { box-shadow: none; border-radius: 10px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabelle th { text-align: left; font-size: 12px; font-weight: 600; color: var(--gedaempft); padding: 9px 12px 8px; border-bottom: 1px solid var(--linie); white-space: nowrap; background: var(--flaeche); }
.tabelle td { padding: 9px 12px; vertical-align: middle; }
.tabelle tbody tr:where(:nth-child(even)) td { background: var(--zebra); }
.tabelle .zahl { text-align: right; white-space: nowrap; }
.tabelle.kompakt td, .tabelle.kompakt th { padding: 6px 9px; }
.tabelle tr.klickbar { cursor: pointer; }
.tabelle tr.klickbar:hover td { background: var(--fuellung-hover); }
.tabelle tr.hervor td { background: var(--gut-schwach); font-weight: 600; }
.tabelle tr.vergleich td { color: var(--gedaempft); font-style: italic; }
.tabelle tr.summe td { border-top: 1px solid var(--linie-stark); font-weight: 600; }
.tabelle tfoot td { background: var(--flaeche-2); font-weight: 600; }
.fortschritt-zelle { min-width: 120px; }
.fortschritt-zelle small { color: var(--gedaempft); }

/* Zeitplan ------------------------------------------------------------------------------------ */
.gantt { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--kante); border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 20px; position: relative; }
.gantt-innen { position: relative; width: calc(var(--breite) + 160px); }
.gantt-zeile { display: flex; height: 60px; border-bottom: 1px solid var(--linie); position: relative; }
.gantt-zeile:last-child { border-bottom: 0; }
.gantt-zeile.achsenzeile { height: 42px; background: var(--flaeche-2); }
.gantt-name {
  position: sticky; left: 0; z-index: 4; width: 160px; flex: none;
  background: var(--flaeche); border-right: 1px solid var(--linie);
  padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.gantt-zeile.achsenzeile .gantt-name { background: var(--flaeche-2); }
.gantt-name strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-name span { display: flex; gap: 3px; }
.gantt-spur { position: relative; flex: none; z-index: 1; }
.gantt-achse { position: relative; flex: none; }
.tick { position: absolute; top: 20px; bottom: 0; border-left: 1px solid var(--linie); }
.tick span { position: absolute; left: 4px; font-size: 11px; white-space: nowrap; }
.tick .std { bottom: 3px; color: var(--gedaempft); }
.tick.tag { top: 0; border-left-color: var(--linie-stark); }
.tick .datum { top: 3px; color: var(--text); font-weight: 600; }
.gantt-koerper { position: relative; }
.gantt-schatten { position: absolute; top: 0; bottom: 0; left: 160px; pointer-events: none; z-index: 0; }
.aus { position: absolute; top: 0; bottom: 0; background: var(--aus); }
.jetzt { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--schlecht); z-index: 3; }
.block {
  position: absolute; top: 9px; height: 42px; display: flex; padding: 0; border: 0;
  border-radius: 8px; overflow: hidden; cursor: pointer; background: transparent; font: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.block:hover { box-shadow: inset 0 0 0 2px var(--text); z-index: 2; }
.block .ruest { flex: none; background: repeating-linear-gradient(45deg, var(--ruest-1) 0 4px, var(--ruest-2) 4px 8px); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.block .druck { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; display: flex; align-items: center; }
.block.laufend { box-shadow: inset 0 0 0 2px var(--gut), 0 0 0 1px var(--gut); }
.block.auto .druck { background-image: repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, 0.12) 10px 12px); }

/* Inspektor (Seitenleiste rechts) & Sheet (Modal) --------------------------------------------- */
#leiste, #modal { position: fixed; inset: 0; z-index: 50; }
#leiste[hidden], #modal[hidden] { display: none; }
.leiste-hintergrund, .modal-hintergrund {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: einblenden 0.2s ease-out;
}
@keyframes einblenden { from { opacity: 0; } }
.leiste-box {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(640px, calc(100% - 20px));
  background: var(--flaeche); border-radius: 20px; box-shadow: var(--schatten-fenster); overflow: hidden;
  display: flex; flex-direction: column;
  animation: rein 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rein { from { transform: translateX(28px); opacity: 0; } }
.leiste-box header, .modal-box header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--linie); }
.leiste-box header h2, .modal-box header h2 { margin: 0; font-size: 17px; font-weight: 700; }
.leiste-inhalt { padding: 18px 20px 28px; overflow-y: auto; }
.modal-box {
  position: relative; margin: 6vh auto; width: min(680px, calc(100% - 24px)); max-height: 88vh;
  background: var(--flaeche); border-radius: 20px; box-shadow: var(--schatten-fenster);
  display: flex; flex-direction: column;
  animation: auftauchen 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes auftauchen { from { transform: scale(0.97) translateY(8px); opacity: 0; } }
.modal-box.breit { width: min(1000px, calc(100% - 24px)); }
.modal-inhalt { padding: 18px 20px; overflow-y: auto; }
.modal-box footer { display: flex; gap: 8px; align-items: center; padding: 12px 20px 14px; border-top: 1px solid var(--linie); border-radius: 0 0 20px 20px; flex-wrap: wrap; }

.kennliste { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 16px; }
.kennliste div { display: flex; flex-direction: column; }
.kennliste span { font-size: 12px; color: var(--gedaempft); }
.gruende { padding-left: 18px; margin: 0; }
.gruende li { margin: 3px 0; }
.aktionen-zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.bett { width: 100%; max-width: 420px; display: block; margin: 12px auto 4px; }
.bett-flaeche { fill: var(--bett); }
.bett-raster { stroke: var(--bett-raster); stroke-width: 1; }
.bett text { font-family: var(--schrift); font-weight: 700; pointer-events: none; }

/* Formulare ----------------------------------------------------------------------------------- */
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--text); }
label small { font-weight: 400; color: var(--gedaempft); }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background-color: var(--feld);
  border: 1px solid var(--feld-kante); border-radius: var(--radius-klein); padding: 6px 10px; min-height: 32px; width: 100%;
  transition: border-color 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--platzhalter); }
input:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file']):focus, select:focus, textarea:focus {
  border-color: var(--akzent); outline: 3.5px solid var(--fokus); outline-offset: 0;
}
input[type='search'] { -webkit-appearance: none; appearance: none; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 28px; cursor: pointer;
  background-image: var(--pfeile); background-repeat: no-repeat; background-position: right 10px center; background-size: 9px 14px;
}
select[multiple], select[size] { background-image: none; padding-right: 10px; }
input[type='checkbox'], input[type='radio'] { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--akzent); flex: none; }
input[type='color'] { padding: 2px; height: 32px; }
input[type='range'] { padding: 0; accent-color: var(--akzent); border: 0; background: transparent; }
input[type='file'] { border: 0; padding: 0; min-height: 0; background: transparent; }
select.fehlt { border-color: var(--warn); background-color: var(--warn-schwach); }
textarea { resize: vertical; }
.mini { width: 80px; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; }
.check.gross { align-self: end; min-height: 32px; }
.inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.voll { margin: 10px 0; }
.raster2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 12px; }
.raster4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 12px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.feldreihe { display: flex; gap: 12px; align-items: end; margin-top: 12px; flex-wrap: wrap; }
.feld-hinweis { font-size: 12.5px; color: var(--gedaempft); padding-bottom: 8px; }
.wachsen { flex: 1; }
.schmal { width: 110px; flex: none; }

/* Schalter im macOS-Stil (Kontrollkästchen in .schalter) */
.schalter { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.schalter input[type='checkbox'] {
  -webkit-appearance: none; appearance: none; width: 32px; height: 19px; margin: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: radial-gradient(circle, #fff 0 7px, rgba(0, 0, 0, 0.1) 7.5px, transparent 8.5px) left center / 19px 19px no-repeat, var(--schalter-aus);
  transition: background-position 0.2s, background-color 0.2s;
}
.schalter input[type='checkbox']:checked { background-position: right center, 0 0; background-color: var(--akzent); background-image: radial-gradient(circle, #fff 0 7px, rgba(0, 0, 0, 0.1) 7.5px, transparent 8.5px); }

.position, .bauteil, .shop { border: 1px solid var(--kante); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; background: var(--flaeche-2); }
.bauteil legend, .shop legend { font-weight: 700; padding: 0 6px; }
.position-kopf { display: flex; gap: 10px; align-items: end; }
.position-farben { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.position-farben label { min-width: 200px; flex: 1; }
.import-hinweis { font-size: 13px; margin-top: 8px; padding: 9px 12px; border-radius: 10px; background: var(--akzent-schwach); }
.import-hinweis.warn { background: var(--warn-schwach); }
.import-hinweis .check { margin-top: 6px; font-size: 13px; }
.gcode { margin-top: 6px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

.liste { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.drucker-zeile { display: grid; grid-template-columns: minmax(220px, 1.2fr) 2fr auto; gap: 16px; align-items: center; margin: 0; }
.drucker-zeile h3 { margin: 0 0 2px; }
.drucker-zeile.inaktiv { opacity: 0.55; }
.drucker-slots { display: flex; gap: 10px; flex-wrap: wrap; }
.slot-wahl { min-width: 170px; }
.slot-wahl .farbe { width: 100%; }
.slot-wahl select { flex: 1; }
.drucker-aktionen { display: flex; gap: 10px; align-items: center; }

.einstellungen .tage { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px 20px; margin-bottom: 14px; }
.tag-zeile { display: flex; align-items: center; gap: 8px; }
.tag-zeile .check { width: 120px; }
.tag-zeile input[type='time'] { width: 110px; }

/* Mitteilungen (wie macOS-Benachrichtigungen oben rechts; klickdurchlässig, damit sie keine Knöpfe verdecken) */
#hinweise { position: fixed; right: 16px; top: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100% - 32px)); pointer-events: none; }
.hinweis {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--glas-stark); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  color: var(--text); padding: 12px 16px; border-radius: 18px; border: 1px solid var(--glas-rand);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14); font-size: 13.5px; line-height: 1.4;
  transition: opacity 0.4s, transform 0.4s; animation: melden 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hinweis::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: 5.5px; border-radius: 50%; background: var(--gut); }
.hinweis.fehler::before { background: var(--schlecht); }
.hinweis.warn::before { background: var(--warn); }
.hinweis.weg { opacity: 0; transform: translateX(24px); }
@keyframes melden { from { opacity: 0; transform: translateX(24px); } }

/* Anmeldung ----------------------------------------------------------------------------------- */
.anmeldeseite {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1100px 620px at 12% -5%, var(--verlauf-1), transparent 60%), radial-gradient(900px 620px at 95% 105%, var(--verlauf-2), transparent 60%), var(--grund);
}
.anmeldebox {
  width: min(400px, 100%); background: var(--glas-stark); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  border: 1px solid var(--glas-rand); border-radius: 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
  padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 14px;
}
.anmeldebox .marke { flex-direction: column; gap: 10px; align-self: center; font-size: 13px; font-weight: 600; color: var(--gedaempft); }
.anmeldebox .marke span { display: inline; }
.anmeldebox h1 { margin: 2px 0 0; text-align: center; font-size: 24px; }
.anmeldebox > p { text-align: center; }
.marke.gross .app-symbol { width: 60px; height: 60px; border-radius: 14px; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 90, 220, 0.28); }
.fehlertext { color: var(--schlecht); margin: 0; text-align: center; }

/* Übersicht & Karten -------------------------------------------------------------------------- */
.spalten { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.spalten > .panel { margin-bottom: 0; }
.spalten .breit { min-width: 0; }
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.todo li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--flaeche-2); }
.todo li::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--linie-stark); }
.todo li.t-warn::before { background: var(--warn); }
.todo li.t-bad::before { background: var(--schlecht); }
.todo li.t-ok::before { background: var(--gut); }
.todo li.t-info::before { background: var(--akzent); }
.todo a { color: var(--text); text-decoration: none; }
.todo a:hover { text-decoration: underline; }
.mini-liste, .balkenliste { list-style: none; margin: 0; padding: 0; }
.mini-liste li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.mini-liste li span:last-child { margin-left: auto; }
.balkenliste li { display: grid; grid-template-columns: 110px 1fr 36px; gap: 10px; align-items: center; padding: 5px 0; }
.leiste-bar { height: 8px; background: var(--fuellung); border-radius: 99px; overflow: hidden; }
.leiste-bar i { display: block; height: 100%; border-radius: 99px; }
.balkenliste strong { text-align: right; }

.diagramm { margin: 0; }
.diagramm figcaption { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--gedaempft); margin-bottom: 6px; }
.legende i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.diagramm-flaeche { position: relative; }
.diagramm svg { width: 100%; height: 220px; display: block; overflow: visible; }
.diagramm .raster line { stroke: var(--linie); stroke-width: 1; }
.diagramm .raster line.basis { stroke: var(--linie-stark); }
.diagramm .raster text, .diagramm .achse text { fill: var(--gedaempft); font-size: 11px; font-family: var(--schrift); }
.diagramm path, .diagramm rect:not(.treffer) { stroke: var(--flaeche); stroke-width: 0; }
.diagramm .treffer { fill: transparent; cursor: crosshair; }
.diagramm .treffer.aktiv { fill: var(--text); fill-opacity: 0.05; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; white-space: pre;
  background: var(--glas-stark); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8);
  color: var(--text); font-size: 12px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--glas-rand); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.diagramm-tabelle { margin-top: 8px; font-size: 13px; }
.diagramm-tabelle summary { cursor: pointer; color: var(--gedaempft); }

.kartengitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kartengitter > .panel { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.kartengitter header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.kartengitter h2, .kartengitter h3 { margin: 0; }
.adresse-box { background: var(--flaeche-2); border-radius: 10px; padding: 9px 12px; margin: 8px 0; line-height: 1.4; }
.verlauf { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.verlauf li { padding: 5px 0; border-bottom: 1px solid var(--linie); }
.verlauf li:last-child { border-bottom: 0; }
.verlauf time { color: var(--gedaempft); margin-right: 6px; }
.rechnung-vorschau { width: 100%; height: 560px; border: 1px solid var(--linie); border-radius: 10px; background: #fff; margin: 10px 0; }
.position-zeile { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.position-zeile input:first-child, .position-zeile select:first-child { flex: 1; }
.position-zeile.ext { display: grid; grid-template-columns: 80px 2fr 1fr 1fr 1.4fr 34px; }
.position-zeile.ext input { width: 100%; min-width: 0; }
.position-zeile.sl-zeile select { flex: 1; }
.zweier { display: flex; gap: 6px; }
.dateien { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.datei-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--fuellung); border-radius: 99px; padding: 2px 4px 2px 12px; }
.marken-wahl { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; }
.hinweisliste { padding-left: 18px; margin: 8px 0; }
.pflichten { padding-left: 18px; }
.pflichten li { margin: 6px 0; }
.suche {
  min-width: 240px; flex: 1; max-width: 360px; border-radius: 999px; padding-left: 32px;
  background: var(--fuellung) var(--lupe) no-repeat 11px center / 14px 14px; border-color: transparent;
}
.suche:focus { background-color: var(--feld); }
.werkzeugleiste select { width: auto; min-width: 140px; }

/* Suche (wie Spotlight) ----------------------------------------------------------------------- */
#suchbox { position: fixed; inset: 0; z-index: 70; }
#suchbox[hidden] { display: none; }
.suchfenster {
  position: relative; margin: 14vh auto 0; width: min(640px, calc(100% - 24px)); overflow: hidden;
  background: var(--glas-stark); -webkit-backdrop-filter: blur(40px) saturate(1.8); backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid var(--glas-rand); border-radius: 22px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
  animation: auftauchen 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.suchfenster input {
  border: 0; border-radius: 0; min-height: 60px; padding: 16px 20px 16px 54px; font-size: 20px; letter-spacing: -0.01em;
  background: transparent var(--lupe) no-repeat 20px center / 20px 20px;
}
.suchfenster input:focus { outline: none; }
.suchfenster ul { list-style: none; margin: 0; padding: 6px 8px 8px; max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--trenner); }
.suchfenster ul:empty { display: none; }
.suchfenster li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.suchfenster li small { margin-left: auto; }
.suchfenster li:hover { background: var(--fuellung-hover); }
.suchfenster li[aria-selected='true'] { background: var(--akzent); color: #fff; }
.suchfenster li[aria-selected='true'] .gedaempft { color: rgba(255, 255, 255, 0.82); }
.suchfenster li[aria-selected='true'] .badge { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* Schmal -------------------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .spalten { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .raster4 { grid-template-columns: 1fr 1fr; }
  .span3 { grid-column: span 2; }
  .drucker-zeile { grid-template-columns: 1fr; }
  .aufgaben li { grid-template-columns: 1fr auto; }
  .aufgaben time { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste {
    position: fixed; z-index: 40; left: 8px; top: 8px; bottom: 8px; height: auto; margin: 0; width: 270px;
    background: var(--glas-stark); box-shadow: var(--schatten-fenster);
    transform: translateX(calc(-100% - 16px)); visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.25s;
  }
  body.menue-offen .seitenleiste { transform: none; visibility: visible; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .kopfzeile {
    display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 30; padding: 8px 10px;
    background: var(--glas-stark); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
    border-bottom: 1px solid var(--trenner);
  }
  .kopf-titel { font-weight: 700; font-size: 16px; flex: 1; }
  main { padding: 20px 16px 60px; }
  .balkenliste li { grid-template-columns: 90px 1fr 30px; }
}
@media (max-width: 640px) {
  .raster2, .raster4 { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .kennliste { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi-wert { font-size: 22px; }
  h1 { font-size: 24px; }
  .druckergitter { grid-template-columns: 1fr; }
  .suche { min-width: 0; max-width: none; width: 100%; }
  .gantt-name { width: 110px; padding: 6px 8px; }
  .gantt-innen { width: calc(var(--breite) + 110px); }
  .gantt-schatten { left: 110px; }
  .modal-box { margin: 0; width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .modal-box footer { border-radius: 0; }
  .leiste-box { top: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; }
  .position-kopf { flex-wrap: wrap; }
  .position-zeile.ext { grid-template-columns: 70px 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .seitenleiste, .kopfzeile, .knopf, .werkzeugleiste, .tabs, #hinweise { display: none !important; }
  .app { display: block; }
  main { padding: 0; max-width: none; }
  .panel { box-shadow: none; break-inside: avoid; }
  body { background: #fff; color: #000; }
}

/* 3D-Modelle */
.ansicht3d { position: relative; height: 340px; border-radius: var(--radius-klein, 8px); overflow: hidden; background: radial-gradient(ellipse at 50% 35%, var(--flaeche, #fff), var(--fuellung, #eef0f3)); border: 1px solid var(--kante, var(--linie)); margin: 10px 0 4px; }
.ansicht3d canvas { display: block; cursor: grab; }
.ansicht3d canvas:active { cursor: grabbing; }
.ansicht3d.klein { height: 190px; margin: 0; }
.ansicht3d.platte { height: min(420px, 55vh); }
.ansicht3d.laedt3d::after { content: '3D-Ansicht wird geladen …'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--gedaempft); font-size: 0.85rem; }
.ansicht3d-fehler { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; color: var(--gedaempft); font-size: 0.85rem; }
.ansicht-umschalter { display: flex; justify-content: flex-end; margin-top: 8px; }
.modell-zeile { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 14px; align-items: start; margin-bottom: 12px; }
.modell-zeile:has(.modell-leer) { grid-template-columns: 1fr; }
.modell-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.modell-info strong { overflow-wrap: anywhere; }
.modell-leer { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1.5px dashed var(--linie-stark, var(--linie)); border-radius: var(--radius-klein, 8px); cursor: pointer; font-weight: 400; background: var(--flaeche); }
.modell-leer:hover { border-color: var(--akzent); }
.modell-leer:focus-within { outline: 2px solid var(--fokus, var(--akzent)); outline-offset: 2px; }
@media (max-width: 640px) { .modell-zeile { grid-template-columns: 1fr; } .ansicht3d.klein { height: 220px; } }
