/* Makler-Hub
   Gestaltung: ruhige Arbeitsfläche, eine feste Seitenleiste, Inhalt linksbündig.
   Das prägende Element ist die Ablaufleiste: 22 Marken in drei Formen
   (Kreis = läuft automatisch, Raute = Makler entscheidet, Quadrat = andere handeln).
   Die Akzentfarbe kommt aus dem Admin-Portal (--accent), die drei Akteurfarben bleiben fest. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 600; font-display: swap; src: url("fonts/interdisplay-600.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 700; font-display: swap; src: url("fonts/interdisplay-700.woff") format("woff"); }

:root {
  --paper: #F2F4F3; --surface: #FFFFFF; --sunk: #E8ECEB; --ink: #16212A; --muted: #586570; --faint: #8A959E; --line: #D3DADB; --line-soft: #E3E8E8;
  --accent: #0B6B74; --accent-ink: #FFFFFF;
  --auto: #0B6B74; --auto-soft: #DCEEEF;
  --makler: #9D4E00; --makler-soft: #FBEBD8; --makler-fill: #C76A00;
  --extern: #5546A6; --extern-soft: #EAE7F8;
  --danger: #B3293A; --danger-soft: #F9E4E7; --ok: #1E7B4F; --ok-soft: #DFF1E7;
  --shadow: 0 1px 2px rgba(22, 33, 42, .06), 0 8px 28px rgba(22, 33, 42, .10);
  --display: "Inter Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --side: 252px;
  color-scheme: light;
}
:root[data-thema="dunkel"] {
  --paper: #0F161B; --surface: #172128; --sunk: #0B1115; --ink: #E6ECEE; --muted: #9BA9B2; --faint: #6F7E88; --line: #2A3841; --line-soft: #212D35;
  --auto: #5CC8D0; --auto-soft: #12363B;
  --makler: #F2A65A; --makler-soft: #3A2913; --makler-fill: #F2A65A;
  --extern: #B3A7F3; --extern-soft: #272248;
  --danger: #F2909A; --danger-soft: #3D1D22; --ok: #6FD3A0; --ok-soft: #14352A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 32px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 14.5px/1.5 var(--body); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
:where(:root[data-thema="dunkel"]) a { color: var(--auto); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
h1 { font: 700 26px/1.15 var(--display); letter-spacing: -.012em; text-wrap: balance; }
h2 { font: 600 17px/1.25 var(--display); letter-spacing: -.005em; }
h3 { font: 600 14.5px/1.3 var(--body); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; } .right { margin-left: auto; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- Gerüst */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 18px 12px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 6px; min-height: 44px; text-decoration: none; color: inherit; }
.brand img { max-height: 52px; max-width: 100%; object-fit: contain; display: block; }
.gate .brand img, .k-head .brand img { max-height: 64px; }
.brand.bild { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand .unter { font: 600 13px/1.2 var(--display); color: var(--ink); }
/* Zugeschnittenes Logo: Rahmen im Seitenverhältnis der sichtbaren Fläche, das Bild liegt verschoben darin. */
.logo { display: block; position: relative; overflow: hidden; aspect-ratio: var(--a); width: min(100%, calc(var(--logo-h, 54px) * var(--a))); }
.brand .logo img { position: absolute; max-width: none; max-height: none; height: auto; }
.gate .brand .logo, .k-head .brand .logo { --logo-h: 64px; }

/* Helles Logo (weiß auf transparent): braucht dunklen Grund. In der Seitenleiste wird die ganze Leiste dunkel. */
.brand.hell { background: var(--side-nacht, #11181D); border-radius: 10px; padding: 16px 18px; justify-content: center; }
:root[data-thema="dunkel"] .brand:not(.hell) img { background: #fff; border-radius: 7px; padding: 5px 8px; }
:root[data-thema="dunkel"][data-akzent="dunkel"] { --accent: #E6ECEE !important; --accent-ink: #16212A !important; }
.side.nacht { --surface: var(--side-nacht, #11181D); --paper: rgba(255, 255, 255, .08); --sunk: rgba(255, 255, 255, .12); --ink: #F4F6F7; --muted: #A7B1B8; --line-soft: rgba(255, 255, 255, .12);
  background: var(--side-nacht, #11181D); color: var(--ink); border-color: transparent; }
.side.nacht .brand.hell { background: none; border-radius: 0; padding: 8px 4px 10px; justify-content: flex-start; }
.side.mitlogo .brand { padding: 6px 4px 8px; }
.gate .brand.hell, .k-head .brand.hell { align-items: center; padding: 18px 22px; }
.side.nacht .nav a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.side.nacht .nav a.on svg { color: #fff; }
.side.nacht .nav .count.hot { background: #F2A65A; color: #2B1A05; }
:root[data-thema="dunkel"] .side.nacht { border-right: 1px solid var(--line); }
.brand .mark { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 16px var(--display); }
.brand b { display: block; font: 700 15.5px/1.15 var(--display); }
.brand span { display: block; font-size: 12px; color: var(--muted); line-height: 1.25; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a svg { flex: none; opacity: .85; }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a.on { background: color-mix(in srgb, var(--accent) 11%, var(--surface)); color: var(--ink); }
.nav a.on svg { color: var(--accent); opacity: 1; }
:root[data-thema="dunkel"] .nav a.on svg { color: var(--auto); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; min-width: 20px; padding: 0 6px; height: 20px; border-radius: 10px; display: grid; place-items: center; background: var(--sunk); color: var(--muted); }
.nav .count.hot { background: var(--makler-soft); color: var(--makler); }
.nav hr { border: 0; border-top: 1px solid var(--line-soft); margin: 8px 4px; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; color: inherit; }
.side .me:hover { background: var(--paper); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center; font-weight: 600; font-size: 12.5px; flex: none; }
.side .me b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.side .me span { display: block; font-size: 12px; color: var(--muted); }

.main { display: flex; flex-direction: column; min-width: 0; }
.simbar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 7px 28px; background: var(--extern-soft); color: var(--extern); font-size: 13px; border-bottom: 1px solid color-mix(in srgb, var(--extern) 22%, transparent); }
.simbar b { font-weight: 600; }
.simbar .clock { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.simbar .next { color: var(--muted); }
.simbar .btn { height: 26px; padding: 0 10px; font-size: 12.5px; }
.page { padding: 26px 28px 60px; max-width: 1400px; width: 100%; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.crumb { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.crumb:hover { color: var(--ink); }

/* ---------------------------------------------------------------- Bausteine */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.makler { border-color: var(--makler-fill); color: var(--makler); background: var(--makler-soft); }
.btn.makler.primary { background: var(--makler-fill); border-color: var(--makler-fill); color: #fff; }
:root[data-thema="dunkel"] .btn.makler.primary { color: #23170a; }
.btn.extern { border: 1px dashed var(--extern); color: var(--extern); background: transparent; }
.btn.extern:hover { background: var(--extern-soft); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--sunk); color: var(--ink); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.who { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; line-height: 1.5; }
.who::before { content: ""; width: 7px; height: 7px; flex: none; }
.who.auto { background: var(--auto-soft); color: var(--auto); } .who.auto::before { background: currentColor; border-radius: 50%; }
.who.makler { background: var(--makler-soft); color: var(--makler); } .who.makler::before { background: currentColor; border-radius: 50%; }
.who.extern { background: var(--extern-soft); color: var(--extern); } .who.extern::before { background: currentColor; border-radius: 50%; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 5px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--makler-soft); color: var(--makler); } .tag.bad { background: var(--danger-soft); color: var(--danger); } .tag.sim { background: var(--extern-soft); color: var(--extern); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.panel > .body { padding: 16px 18px; }
.panel > .body.flush { padding: 0; }
.empty { padding: 26px 18px; color: var(--muted); text-align: left; }
.cols { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }

.list > li, .list > a { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; min-width: 0; }
.list > :last-child { border-bottom: 0; }
.list > a:hover { background: color-mix(in srgb, var(--paper) 70%, var(--surface)); }
.list .t { font-weight: 500; overflow-wrap: anywhere; } .list .s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.when { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr[data-href] { cursor: pointer; } .tbl tbody tr[data-href]:hover { background: color-mix(in srgb, var(--paper) 70%, var(--surface)); }
.scroll-x { overflow-x: auto; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 9px 13px; color: var(--muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.tabs .count { font-size: 12px; background: var(--sunk); border-radius: 9px; padding: 0 6px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 500; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
textarea.input { height: auto; padding: 9px 11px; line-height: 1.45; resize: vertical; }
.input:hover { border-color: var(--faint); }
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks label, .check { display: flex; gap: 8px; align-items: center; font-weight: 400; cursor: pointer; }
.counter { font-size: 12px; color: var(--muted); align-self: flex-end; font-variant-numeric: tabular-nums; } .counter.over { color: var(--danger); font-weight: 600; }
.field > .seg { align-self: flex-start; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 5px 11px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--surface); }
.seg button.on.auto { background: var(--auto); color: #fff; } .seg button.on.entwurf { background: var(--makler-fill); color: #fff; }
:root[data-thema="dunkel"] .seg button.on.auto, :root[data-thema="dunkel"] .seg button.on.entwurf { color: #10171c; }

.kv { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 7px 14px; }
.kv dt { color: var(--muted); font-size: 13.5px; } .kv dd { overflow-wrap: anywhere; }
pre.text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; }
.notice { display: flex; gap: 10px; padding: 10px 13px; border-radius: 8px; font-size: 13.5px; background: var(--sunk); }
.notice.warn { background: var(--makler-soft); color: var(--makler); } .notice.sim { background: var(--extern-soft); color: var(--extern); } .notice.bad { background: var(--danger-soft); color: var(--danger); }

/* ---------------------------------------------------------------- Ablaufleiste */
/* Prozesskette: je Schritt eine Kachel mit eigenem Zeichen. --c ist die Farbe dessen, der am Zug ist. */
.kette { display: flex; flex-wrap: wrap; gap: 18px 22px; }
.kph { display: flex; flex-direction: column; gap: 9px; }
.kkopf { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted); }
.kkopf b { font-weight: 600; color: var(--muted); } .kph.on .kkopf b { color: var(--ink); }
.kkopf span { font-variant-numeric: tabular-nums; font-size: 12px; }
.kreihe { display: flex; gap: 8px; }
.kn { --c: var(--auto); position: relative; }
.kn.makler { --c: var(--makler-fill); } .kn.extern { --c: var(--extern); }
.kn + .kn::before { content: ""; position: absolute; left: -8px; top: 18px; width: 8px; height: 2px; background: var(--line); }
.kn.erledigt + .kn::before { background: var(--accent); }
.kn > button, .kn > .kk { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kn > button { cursor: pointer; border-radius: 12px; }
.kt { --c: var(--auto); width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; position: relative; background: var(--surface); border: 1.5px solid var(--line); color: var(--faint); transition: transform .12s ease; }
.kt.makler, .kn.makler .kt { --c: var(--makler-fill); } .kt.extern, .kn.extern .kt { --c: var(--extern); }
.kn .kt::after { content: ""; position: absolute; right: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); }
.kn.erledigt .kt, .kt.erledigt { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kn.aktiv .kt, .kt.aktiv { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.kn.aktiv .kt::after { display: none; }
.kn > button:hover .kt { transform: translateY(-1px); border-color: var(--c); }
.kn.sel > button .kt, .kn.sel > .kk .kt { outline: 2px solid var(--ink); outline-offset: 3px; }
.kn > button:focus-visible .kt { outline: 2px solid var(--accent); outline-offset: 3px; }
.kid { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; line-height: 1; }
.kn.aktiv .kid, .kn.sel .kid { color: var(--ink); font-weight: 600; }
.kt.gross { width: 56px; height: 56px; border-radius: 15px; }
.kt.klein { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }
.blick { --c: var(--auto); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 16px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.blick.makler { --c: var(--makler-fill); } .blick.extern { --c: var(--extern); }
.blick > .kt { --c: inherit; } .blick.makler > .kt { --c: var(--makler-fill); } .blick.extern > .kt { --c: var(--extern); }
.blick.aktiv > .kt { background: var(--c); border-color: var(--c); color: #fff; } .blick.erledigt > .kt { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.blick h3 { font: 700 18px/1.2 var(--display); }
.bdrei { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.bdrei > div { padding: 12px 15px; border-left: 1px solid var(--line-soft); } .bdrei > div:first-child { border-left: 0; }
.bdrei dt { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.bdrei dd { font-size: 13.5px; line-height: 1.45; }
.bdrei .fokus { background: color-mix(in srgb, var(--c) 9%, var(--surface)); box-shadow: inset 3px 0 0 var(--c); } .bdrei .fokus dt { color: var(--ink); } .bdrei .fokus dd { font-weight: 500; }
.fort { display: flex; align-items: center; gap: 9px; }
.fbalken { display: flex; gap: 3px; } .fbalken i { display: block; width: 30px; height: 5px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--p), var(--line) var(--p)); }
@media (max-width: 860px) { .bdrei { grid-template-columns: minmax(0, 1fr); } .bdrei > div { border-left: 0; border-top: 1px solid var(--line-soft); } .bdrei > div:first-child { border-top: 0; } .blick { grid-template-columns: auto minmax(0, 1fr); } .btags { grid-column: 1 / -1; } .kreihe { flex-wrap: wrap; row-gap: 12px; } }
.stepinfo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.stepinfo .id { font: 600 15px var(--display); color: var(--muted); font-variant-numeric: tabular-nums; }

.now { border: 1px solid var(--line); border-left: 4px solid var(--c, var(--auto)); border-radius: 10px; background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.now.makler { --c: var(--makler-fill); } .now.extern { --c: var(--extern); } .now.auto { --c: var(--auto); }
.now h2 { font-size: 19px; }
.now .lead { max-width: 76ch; }
.simgroup { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px dashed color-mix(in srgb, var(--extern) 55%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--extern-soft) 45%, transparent); }
.simgroup > span { font-size: 12.5px; color: var(--extern); font-weight: 500; }

/* ---------------------------------------------------------------- Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 10px; background: var(--line-soft); overflow: hidden; }
.stats > div { padding: 14px 18px; min-width: 0; background: var(--surface); }
.stats.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1180px) { .page > .stats.k6, .now .stats.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats.k6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats > div { padding: 12px 14px; } }
.stats b { display: block; font: 700 24px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--muted); }
.stats .hot b { color: var(--makler); }
.funnel { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 6px 12px; align-items: center; font-size: 13.5px; }
.funnel .bar { height: 10px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.funnel .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
:root[data-thema="dunkel"] .funnel .bar i { background: var(--auto); }

/* ---------------------------------------------------------------- Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--sunk); border-radius: 9px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.kcol > header { display: flex; align-items: baseline; gap: 6px; padding: 3px 5px 1px; font-weight: 600; font-size: 13.5px; }
.kcol > header span { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.kcol.out > header { color: var(--danger); }
.kcol.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; display: flex; flex-direction: column; gap: 4px; cursor: grab; text-align: left; width: 100%; }
.kcard:hover { border-color: var(--faint); }
.kcard.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.kcard b { font-weight: 600; font-size: 14px; }
.kcard span { font-size: 12.5px; color: var(--muted); }
.kcard .todo { color: var(--makler); font-weight: 500; }
.kcard.dragging { opacity: .45; }
.kcol .folge { font-size: 12px; color: var(--faint); padding: 0 5px 4px; line-height: 1.35; }

/* ---------------------------------------------------------------- Dialoge */
.overlay { position: fixed; inset: 0; background: rgba(15, 22, 27, .42); display: grid; place-items: start center; padding: 6vh 16px 16px; overflow-y: auto; z-index: 50; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); width: min(640px, 100%); display: flex; flex-direction: column; }
.modal.wide { width: min(920px, 100%); }
.modal > header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal > .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal > footer { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13.5px; }
.toast.bad { background: var(--danger); color: #fff; }
:root[data-thema="dunkel"] .toast.bad { color: #1b0b0e; }

/* ---------------------------------------------------------------- Postfach, Verlauf, Akte */
.split { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 0; min-height: 420px; }
.split > .left { border-right: 1px solid var(--line-soft); max-height: 72vh; overflow-y: auto; }
.split > .rightp { padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mrow { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; border-left: 3px solid transparent; background: none; border-top: 0; border-right: 0; width: 100%; text-align: left; }
.mrow:hover { background: color-mix(in srgb, var(--paper) 70%, var(--surface)); }
.mrow.on { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.mrow .top { display: flex; gap: 8px; align-items: baseline; }
.mrow .top b { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .subj { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline li { display: grid; grid-template-columns: 118px 16px minmax(0, 1fr); gap: 0 10px; padding: 7px 18px; align-items: baseline; }
.timeline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--auto); margin-top: 6px; justify-self: center; }
.timeline .dot.extern { background: var(--extern); border-radius: 1px; } .timeline .dot.makler { background: var(--makler-fill); transform: rotate(45deg); border-radius: 1px; }
.folder { display: flex; align-items: center; gap: 8px; padding: 9px 18px; background: color-mix(in srgb, var(--paper) 60%, var(--surface)); border-bottom: 1px solid var(--line-soft); font-weight: 600; font-size: 13.5px; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 12px; background: var(--sunk); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.wave { display: flex; align-items: center; gap: 3px; height: 44px; }
.wave i { display: block; width: 4px; border-radius: 2px; background: var(--auto); animation: wave 1s ease-in-out infinite; }
@keyframes wave { 0%, 100% { height: 8px; } 50% { height: 36px; } }
@media (prefers-reduced-motion: reduce) { .wave i { animation: none; height: 18px; } }

/* ---------------------------------------------------------------- Anmeldung */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.gate .card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.gate .brand { padding: 0; }
.demo { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.demo button { display: flex; justify-content: space-between; gap: 10px; border: 1px dashed color-mix(in srgb, var(--extern) 55%, transparent); background: transparent; border-radius: 7px; padding: 7px 11px; cursor: pointer; color: var(--extern); font-size: 13.5px; }
.demo button:hover { background: var(--extern-soft); }

@media (max-width: 1080px) { .cols { grid-template-columns: minmax(0, 1fr); } .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand > span:not(.mark):not(.logo) { display: none; } .side .brand img { max-height: 30px; max-width: 150px; } .side.nacht .brand.hell { padding: 2px 4px; }
  .nav { flex-direction: row; flex-wrap: wrap; } .nav hr { display: none; } .nav a { padding: 6px 9px; }
  .side .me { margin: 0 0 0 auto; } .side .me div { display: none; }
  .page { padding: 18px 16px 48px; } .simbar { padding: 7px 16px; }
  .grid2, .grid3, .split { grid-template-columns: minmax(0, 1fr); }
  .split > .left { border-right: 0; border-bottom: 1px solid var(--line-soft); max-height: 300px; }
  .timeline li { grid-template-columns: 16px minmax(0, 1fr); } .timeline .when { grid-column: 2; grid-row: 2; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; }
  .stepinfo { grid-template-columns: auto minmax(0, 1fr); } .stepinfo > .btn-row { grid-column: 1 / -1; }
}
:root.embed .side, :root.embed .simbar { display: none; }
:root.embed .shell { grid-template-columns: minmax(0, 1fr); }

/* ---------------------------------------------------------------- Hinweisband über die ganze Breite */
.notice.band { align-items: center; flex-wrap: wrap; margin-bottom: 18px; color: var(--ink); border: 1px solid color-mix(in srgb, var(--makler) 28%, transparent); }
.notice.band b { font-weight: 600; }
.notice.band .btn { margin-left: auto; }

/* ---------------------------------------------------------------- Herkunft und Absprung */
.srcline { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px 12px; }
.src { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }
.src svg { flex: none; }
.jump { font-size: 12.5px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2.5px; display: inline-flex; align-items: center; }
.jump:hover { text-decoration-color: currentColor; }
.list .srcline { margin-top: 3px; }
.kcard .src { font-size: 12px; }

/* ---------------------------------------------------------------- Schnittstellen */
.conn { display: grid; grid-template-columns: 290px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.conn > nav { border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; }
.conn > nav button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.conn > nav button:hover { background: var(--paper); }
.conn > nav button.on { background: var(--paper); box-shadow: inset 3px 0 0 var(--accent); }
.conn > nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.conn > nav b { font-weight: 600; }
.conn > nav small { grid-column: 1; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn > nav .tag { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.conn > .detail { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.conn .steps, .ein .steps { counter-reset: s; display: flex; flex-direction: column; gap: 7px; }
.conn .steps li, .ein .steps li { counter-increment: s; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 13.5px; overflow-wrap: anywhere; }
.conn .steps li::before, .ein .steps li::before { content: counter(s); width: 20px; height: 20px; border-radius: 50%; background: var(--sunk); color: var(--muted); font-size: 12px; font-weight: 600; display: grid; place-items: center; margin-top: 1px; }
.conn fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.conn fieldset .wide { grid-column: 1 / -1; }
.conn .set { font-size: 12px; color: var(--ok); display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-weight: 500; }
.conn .result { display: flex; gap: 9px; align-items: flex-start; padding: 10px 13px; border-radius: 8px; font-size: 13.5px; background: var(--ok-soft); color: var(--ok); }
.conn .result.bad { background: var(--danger-soft); color: var(--danger); }
.conn .result svg { flex: none; margin-top: 2px; }
.conn .mode { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.conn h3 { font: 600 13px var(--body); color: var(--muted); margin-bottom: 8px; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 860px) { .conn { grid-template-columns: minmax(0, 1fr); } .conn > nav { border-right: 0; flex-direction: row; overflow-x: auto; } .conn > nav button { min-width: 190px; border-bottom: 0; border-right: 1px solid var(--line-soft); } .conn > .detail { border-top: 1px solid var(--line-soft); padding: 18px 16px; } .conn fieldset { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- Aufgaben: Stand und Notizen */
.tlink { all: unset; cursor: pointer; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; overflow-wrap: anywhere; }
.tlink:hover { text-decoration-color: currentColor; } .tlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.list.tasks > li { align-items: flex-start; } .list.tasks > li > input[type="checkbox"], .list.tasks > li > .who { margin-top: 3px; }
.tright { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; padding: 6px 9px; border-radius: 7px; background: var(--paper); font-size: 13px; color: var(--ink); }
.note svg { flex: none; margin-top: 3px; color: var(--muted); } .note b { font-weight: 600; }
.notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; max-height: 220px; overflow: auto; }
.notes li { padding: 8px 11px; border-radius: 8px; background: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; }
.linkbtn { all: unset; cursor: pointer; text-decoration: underline; color: var(--muted); font-size: 12px; margin-left: 6px; }
.linkbtn:hover { color: var(--danger); }

/* ---------------------------------------------------------------- Kalender */
.calbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 14px; }
.calbar h2 { font: 700 19px/1.2 var(--display); margin-left: 6px; }
.btn.icon { padding-left: 8px; padding-right: 8px; }
.callay { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 20px; align-items: start; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; --rand: 58px; }
.cal .kopf { display: grid; border-bottom: 1px solid var(--line); }
.cal.zeit .kopf, .cal.zeit .ganztags { grid-template-columns: var(--rand) repeat(var(--tage), minmax(0, 1fr)); }
.cal.zeit .dh { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: baseline; gap: 7px; padding: 9px 10px; border-left: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; }
.cal.zeit .dh b { font: 600 19px/1 var(--display); color: var(--ink); }
.cal.zeit .dh.heute b { background: var(--accent); color: var(--accent-ink); border-radius: 50%; min-width: 30px; height: 30px; display: inline-grid; place-items: center; font-size: 15.5px; }
.cal.zeit .dh:hover { background: var(--paper); } .cal.zeit .dh:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal .ganztags { display: grid; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 55%, var(--surface)); }
.cal .ganztags .eck { font-size: 11.5px; color: var(--muted); padding: 7px 6px 0 0; text-align: right; }
.cal .gz { border-left: 1px solid var(--line-soft); padding: 4px 3px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .lauf { max-height: min(74vh, 780px); overflow-y: auto; }
.cal .gitter { display: grid; grid-template-columns: var(--rand) repeat(var(--tage), minmax(0, 1fr)); position: relative; }
.cal .stunden div { position: relative; }
.cal .stunden span { position: absolute; top: -8px; right: 8px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal .stunden div:first-child span { top: 2px; }
.cal .col { position: relative; border-left: 1px solid var(--line-soft); cursor: cell;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--line-soft) 55%, transparent) 1px, transparent 1px);
  background-size: 100% var(--stunde), 100% calc(var(--stunde) / 2); background-position: 0 0, 0 calc(var(--stunde) / 2); }
.cal .col.heute { background-color: color-mix(in srgb, var(--accent) 3.5%, transparent); }
.ev { all: unset; box-sizing: border-box; position: absolute; cursor: pointer; overflow: hidden; border-radius: 6px; padding: 3px 7px 3px 9px; font-size: 12px; line-height: 1.3; color: var(--ink);
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); box-shadow: inset 3px 0 0 var(--c), 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); display: flex; flex-direction: column; }
.ev b { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; flex: none; }
.ev.flach b { display: block; white-space: nowrap; text-overflow: ellipsis; flex: 1 1 60%; min-width: 0; }
.ev span { color: var(--muted); font-size: 11.5px; overflow: hidden; }
.ev.flach { flex-direction: row; gap: 6px; align-items: center; padding-top: 0; padding-bottom: 0; } .ev.flach span { white-space: nowrap; flex: 0 1000 auto; min-width: 0; text-overflow: ellipsis; }
.ev:hover { background: color-mix(in srgb, var(--c) 24%, var(--surface)); z-index: 2; }
.ev:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 3; }
.ev.belegt, .chip.belegt { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--c) 16%, transparent) 6px 12px); color: var(--muted); }
.cal .frei { position: absolute; left: 2px; right: 2px; border: 1.5px dashed color-mix(in srgb, var(--ok) 60%, transparent); border-radius: 6px; pointer-events: none; }
.cal .frei span { font-size: 11px; color: var(--ok); padding: 2px 6px; display: block; }
.cal .jetzt { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); pointer-events: none; z-index: 4; }
.cal .jetzt::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.chip { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 5px; align-items: baseline; font-size: 12px; line-height: 1.35; padding: 1px 6px 1px 8px; border-radius: 5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 3px 0 0 var(--c); min-width: 0; }
.chip .num { color: var(--muted); font-size: 11.5px; flex: none; }
.chip.voll { background: color-mix(in srgb, var(--c) 20%, var(--surface)); }
.chip:hover { background: color-mix(in srgb, var(--c) 26%, var(--surface)); } .chip:focus-visible { outline: 2px solid var(--ink); }
.cal.monat .kopf { grid-template-columns: repeat(7, minmax(0, 1fr)); } .cal.monat .kopf div { padding: 8px 10px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mgitter { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(112px, auto); }
.mz { border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); padding: 4px 4px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: cell; }
.mz:nth-child(7n+1) { border-left: 0; } .mz:nth-child(-n+7) { border-top: 0; }
.mz.fremd { background: color-mix(in srgb, var(--paper) 60%, var(--surface)); } .mz.fremd .mtag { color: var(--faint); }
.mtag { all: unset; cursor: pointer; align-self: flex-start; font: 600 13px var(--body); padding: 2px 7px; border-radius: 12px; margin-bottom: 1px; font-variant-numeric: tabular-nums; }
.mtag:hover { background: var(--sunk); } .mz.heute .mtag { background: var(--accent); color: var(--accent-ink); }
.mehr { all: unset; cursor: pointer; font-size: 11.5px; color: var(--muted); padding: 0 8px; } .mehr:hover { color: var(--ink); text-decoration: underline; }
.ebenen { display: flex; flex-direction: column; gap: 3px; } .ebenen li { display: flex; align-items: center; gap: 4px; min-height: 28px; }
.ebene { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; min-width: 0; font-size: 13.5px; }
.ebene input { position: absolute; opacity: 0; width: 0; height: 0; }
.ebene i, .punkt { width: 13px; height: 13px; border-radius: 4px; border: 2px solid var(--c); flex: none; display: inline-block; }
.ebene input:checked + i, .punkt { background: var(--c); }
.ebene input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.ebene input:not(:checked) ~ span { color: var(--muted); }
.punkt { width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.farbe { all: unset; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; }
.farbe.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); } .farbe:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.hilfe { margin-top: 8px; font-size: 13px; } .hilfe summary { cursor: pointer; color: var(--muted); } .hilfe b { font-weight: 600; }
@media (max-width: 1180px) { .callay { grid-template-columns: minmax(0, 1fr); } .calside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; } }
@media (max-width: 860px) { .cal.zeit:not([style*="--tage:1"]) { overflow-x: auto; } .cal.zeit:not([style*="--tage:1"]) > * { min-width: 720px; } .mgitter { grid-auto-rows: minmax(74px, auto); } .chip .num { display: none; } }

/* ---------------------------------------------------------------- Geführte Tour */
#tour { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: min(430px, calc(100vw - 24px)); max-height: min(78vh, 640px); display: flex; flex-direction: column; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 6px rgba(10, 16, 22, .10), 0 22px 60px rgba(10, 16, 22, .28); overflow: hidden; }
#tour header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 0 18px; color: var(--muted); }
#tour .tschritt { margin-left: 10px; padding: 1px 8px; border-radius: 5px; background: var(--sunk); font-variant-numeric: tabular-nums; }
#tour .tzu { all: unset; cursor: pointer; padding: 6px; border-radius: 6px; display: flex; color: var(--muted); } #tour .tzu:hover { background: var(--sunk); color: var(--ink); } #tour .tzu:focus-visible { outline: 2px solid var(--accent); }
#tour .tleiste { display: flex; gap: 3px; padding: 10px 18px 0; } #tour .tleiste i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); } #tour .tleiste i.war { background: var(--accent); } #tour .tleiste i.ist { background: var(--makler-fill); }
#tour .tinhalt { padding: 14px 18px 4px; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; }
#tour h2 { font: 700 19px/1.2 var(--display); } #tour p { font-size: 14px; line-height: 1.5; }
#tour details { font-size: 13px; border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px 12px; } #tour summary { cursor: pointer; font-weight: 600; color: var(--muted); }
#tour details ul { margin-top: 7px; display: flex; flex-direction: column; gap: 5px; } #tour details li { padding-left: 14px; position: relative; line-height: 1.4; }
#tour details li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--auto); }
#tour .tfokus { font-size: 13.5px; line-height: 1.45; padding: 10px 13px; border-radius: 9px; background: var(--makler-soft); box-shadow: inset 3px 0 0 var(--makler-fill); }
#tour .tfokus b { display: block; font-size: 12px; font-weight: 600; color: var(--makler); margin-bottom: 2px; }
#tour footer { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px 16px; }
.tour-ziel { outline: 3px solid var(--makler-fill); outline-offset: 5px; border-radius: 10px; scroll-margin-top: 110px; }
@media (max-width: 860px) { #tour { right: 12px; left: 12px; bottom: 12px; width: auto; max-height: 62vh; } }
@media (prefers-reduced-motion: no-preference) { #tour { animation: tourauf .22s ease-out; } @keyframes tourauf { from { transform: translateY(10px); opacity: 0; } } }

@media (max-width: 860px) {
  .side .brand .logo { width: 176px; }
  .list.tasks > li { flex-wrap: wrap; } .list.tasks > li > .grow { flex: 1 1 60%; min-width: 0; }
  .tright { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .calbar h2 { font-size: 17px; margin-left: 0; }
}

/* ---------------------------------------------------------------- Einrichtung */
.ein-kopf { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.ein-balken { flex: 1 1 220px; max-width: 420px; height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.ein-balken i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .4s ease; }
.ein { display: grid; grid-template-columns: 300px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; align-items: start; }
.ein-nav { border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; padding-bottom: 8px; align-self: stretch; }
.ein-gruppe { font-size: 12px; font-weight: 600; color: var(--muted); padding: 14px 16px 4px; }
.ein-nav button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 16px; }
.ein-nav button:hover { background: var(--paper); }
.ein-nav button.on { background: var(--paper); box-shadow: inset 3px 0 0 var(--accent); }
.ein-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ein-t { display: flex; flex-direction: column; min-width: 0; }
.ein-t b { font-weight: 500; font-size: 13.5px; line-height: 1.3; }
.ein-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ein-punkt { width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: #fff; background: var(--surface); }
.ein-punkt.erledigt { background: var(--ok); border-color: var(--ok); }
.ein-punkt.erledigt svg { stroke-width: 2.6; }
.ein-punkt.teilweise { border-color: var(--makler-fill); background: linear-gradient(90deg, var(--makler-fill) 50%, var(--surface) 50%); }
.ein-punkt.uebersprungen { border-style: dashed; color: var(--faint); }
.ein-detail { padding: 22px 26px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ein-detail h2 { font-size: 22px; letter-spacing: -.01em; }
.ein-stand { font-weight: 500; margin-top: -6px; }
.ein-stand.erledigt { color: var(--ok); } .ein-stand.teilweise { color: var(--makler); } .ein-stand.offen, .ein-stand.uebersprungen { color: var(--muted); }
.ein-warum { max-width: 72ch; font-size: 15px; }
.ein-zwei { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; }
.ein-zwei h3 { margin-bottom: 8px; }
.ein-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ein-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--paper); }
.ein-box.ok { flex-direction: row; align-items: center; gap: 10px; color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.ein-fuss { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.einleiste { position: fixed; z-index: 40; left: calc(var(--side) + 24px); right: 24px; bottom: 16px; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 10px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow); max-width: 860px; margin: 0 auto; }
.einleiste .btn.ghost { color: var(--surface); }
.ein-nr { font: 600 12px/1 var(--body); padding: 4px 7px; border-radius: 5px; background: color-mix(in srgb, var(--surface) 18%, transparent); }
:root[data-betrieb="echt"] [data-tour-start] { display: none; }
@media (max-width: 900px) {
  .ein { grid-template-columns: 1fr; }
  .ein-nav { border-right: 0; border-bottom: 1px solid var(--line-soft); max-height: 260px; overflow: auto; }
  .ein-zwei { grid-template-columns: 1fr; }
  .ein-detail { padding: 18px 16px; }
  .einleiste { left: 12px; right: 12px; bottom: 12px; flex-wrap: wrap; }
}
body:has(.einleiste) .page { padding-bottom: 96px; }
.ein-liste li { list-style: disc; padding-left: 2px; }
.ein-liste li::marker { color: var(--faint); }
.ein .steps li { font-size: 14px; }
.einleiste .btn.primary { background: var(--surface); color: var(--ink); border-color: var(--surface); }
body:has(.einleiste) .toasts { bottom: 80px; }
