/* Datenraum: Design-System. Werte laut docs/DESIGN.md. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F4F5F9;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --surface-head: #FAFAFC;
  --ink: #1E1E2A;
  --ink-2: #4A4A57;
  --muted: #6B6B78;
  --faint: #B4B5C0;
  --line: #EDEEF2;
  --ring: 0 0 0 1px #E3E4EA;
  --ring-strong: 0 0 0 1px #D5D7DE;
  --hover: #F4F5F9;
  --hover-2: #ECEDF2;
  --accent: #3B5BDB;
  --on-accent: #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, #FFFFFF);
  --warn-bg: #FCEBE9;
  --warn-ink: #A1271B;
  --ok-bg: #E7F4EC;
  --ok-ink: #17663A;
  --amber-bg: #FDF3DC;
  --amber-ink: #7A4B00;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.ic { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex-grow: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.cluster { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Gerüst: Seitenleiste und Arbeitsfläche */
.shell { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; min-height: 100vh; padding: 8px; }
.side { flex: 0 0 248px; max-width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; }
.panel { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 12px; box-shadow: var(--ring), 0 1px 2px rgba(23, 23, 33, .04); }

.brand { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px; }
.brand-tile { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 600; background: var(--ink); color: #FFFFFF; flex-shrink: 0; }
.brand-tile.is-accent { background: var(--accent); color: var(--on-accent); }
.brand-text { min-width: 0; line-height: 1.25; }
.brand-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { display: block; font-size: 12px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); transition: background .12s ease; }
.nav-item:hover { background: var(--hover-2); }
.nav-item.is-active { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--ring), 0 1px 2px rgba(23, 23, 33, .05); }
.nav-item.is-active .ic { color: var(--accent); }
.nav-label { margin: 18px 10px 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #DCDDE6; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.side-note { display: flex; align-items: center; gap: 8px; margin: 0 4px 6px; padding: 8px 10px; border-radius: 8px; background: var(--hover-2); font-size: 12px; color: var(--ink-2); }

.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 56px; padding: 8px 20px 8px 24px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.crumbs .ic { color: var(--faint); stroke-width: 2; }
.crumbs strong { color: var(--ink); font-weight: 500; }
.content { padding: 28px 32px 36px; display: flex; flex-direction: column; gap: 24px; }
.page-title { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.section-title { font-size: 15px; font-weight: 600; }

/* Karten, Kacheln, Listen */
.card { border-radius: 12px; box-shadow: var(--ring); background: var(--surface); }
.card-pad { padding: 18px 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.tile { padding: 16px 18px; border-radius: 12px; box-shadow: var(--ring); display: flex; flex-direction: column; gap: 4px; }
.tile-label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.tile-value { font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -.01em; }
.tile-note { font-size: 12px; color: var(--muted); }

.rows { border-radius: 12px; box-shadow: var(--ring); overflow: hidden; }
.rows-scroll { overflow-x: auto; }
.rows-head { display: flex; align-items: center; gap: 16px; min-height: 38px; padding: 0 16px; background: var(--surface-head); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--muted); }
.row { display: flex; align-items: center; gap: 16px; min-height: 52px; padding: 8px 16px; border-top: 1px solid var(--line); transition: background .12s ease; }
.row:first-child, .rows-head + .row { border-top: 0; }
.row:hover { background: var(--hover); }
.row-icon { width: 30px; height: 30px; border-radius: 50%; background: #F0F1F5; color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row-icon.is-warn { background: var(--warn-bg); color: var(--warn-ink); }
.row-icon.is-ok { background: var(--ok-bg); color: var(--ok-ink); }
.row-main { flex: 1 1 0; min-width: 0; }
.row-title { font-weight: 500; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-w { flex: 0 0 auto; }
.w-90 { width: 90px; } .w-120 { width: 120px; } .w-150 { width: 150px; } .w-200 { width: 200px; } .w-260 { width: 260px; }
.right { text-align: right; }
.min-720 { min-width: 720px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9C9DAA; }
.pill-ok { background: var(--ok-bg); color: var(--ok-ink); } .pill-ok::before { background: #1E8E4E; }
.pill-warn { background: var(--warn-bg); color: var(--warn-ink); } .pill-warn::before { background: #C4321F; }
.pill-amber { background: var(--amber-bg); color: var(--amber-ink); } .pill-amber::before { background: #B7791F; }
.pill-accent { background: var(--accent-soft); color: var(--accent); } .pill-accent::before { background: var(--accent); }
.pill-plain { padding: 0 10px; } .pill-plain::before { display: none; }

/* Buttons und Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--ring-strong); color: var(--ink); font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s ease, filter .12s ease; }
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.btn-primary:hover { background: var(--accent); filter: brightness(.93); }
.btn-lg { height: 46px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-quiet { box-shadow: none; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--hover-2); }
.icon-btn { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--hover-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 500; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hint { font-size: 12px; color: var(--muted); }
.input-wrap { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px 0 14px; border-radius: 10px; background: var(--surface); box-shadow: var(--ring-strong); }
.input-wrap:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.input-wrap input, .input-wrap select { flex: 1 1 0; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; font-size: 15px; }
.input-wrap input[type="color"] { flex: 0 0 34px; height: 28px; padding: 0; border-radius: 6px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.link { color: var(--accent); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.alert .ic { margin-top: 1px; }
.alert-error { background: var(--warn-bg); color: var(--warn-ink); }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert-amber { background: var(--amber-bg); color: var(--amber-ink); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 24px; text-align: center; border-radius: 12px; box-shadow: var(--ring); }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.empty-title { font-size: 17px; font-weight: 600; }
.empty-text { max-width: 440px; color: var(--ink-2); }

.kv { display: flex; flex-direction: column; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.copy-box { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--surface-2); box-shadow: var(--ring); }
.copy-box code { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }

/* Anmeldung: zweigeteilt */
.auth { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; min-height: 100vh; padding: 12px; background: var(--surface); }
.auth-main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; padding: 20px 28px; }
.auth-head { display: flex; align-items: center; gap: 10px; }
.auth-center { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.auth-title { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.015em; }
.auth-sub { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.auth-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.auth-foot span { display: flex; align-items: center; gap: 6px; }
.auth-divider { padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-2); }
.auth-side { flex: 1.25 1 460px; min-width: 0; min-height: 320px; position: relative; overflow: hidden; border-radius: 16px; background: var(--ink); color: #FFFFFF; display: flex; flex-direction: column; justify-content: flex-end; padding: 36px; }
.auth-side.is-accent { background: var(--accent); color: var(--on-accent); }
.auth-pattern { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .10; }
.auth-side-text { position: relative; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.auth-side-title { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.015em; }
.auth-side-sub { font-size: 16px; line-height: 1.5; color: #D5D7E0; }
.status-code { font-size: 13px; font-weight: 500; color: var(--muted); }

/* Einrichtung */
.install { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 40px 16px 56px; }
.install-card { width: 100%; max-width: 640px; background: var(--surface); border-radius: 16px; box-shadow: var(--ring), 0 1px 2px rgba(23, 23, 33, .04); padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 20px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px; border-radius: 999px; font-size: 13px; color: var(--muted); background: transparent; }
.steps .num { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; background: #E3E4EA; color: var(--ink-2); }
.steps li.is-current { background: var(--surface); box-shadow: var(--ring); color: var(--ink); font-weight: 500; }
.steps li.is-current .num, .steps li.is-done .num { background: var(--accent); color: var(--on-accent); }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.check-list { display: flex; flex-direction: column; border-radius: 12px; box-shadow: var(--ring); overflow: hidden; }
.check-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.check-item:first-child { border-top: 0; }
.check-item .row-icon { width: 24px; height: 24px; }
.check-hint { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

@media (max-width: 860px) {
  .side { flex-basis: 100%; }
  .nav { flex-direction: row; overflow-x: auto; }
  .nav-item { white-space: nowrap; }
  .nav-label, .side-note { display: none; }
  .content { padding: 20px 16px 28px; }
  .topbar { padding: 8px 16px; }
  .auth-main { padding: 16px 12px; }
  .install-card { padding: 22px 18px 24px; }
}

/* Ergänzungen ab Version 0.1.1: Marken, Datenräume, Konto */
.content-narrow { max-width: 860px; width: 100%; }
.page-sub { margin-top: 4px; color: var(--ink-2); }
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { text-decoration: underline; }
.center { align-items: center; }
.end { justify-content: flex-end; }
.nowrap { flex-wrap: nowrap; min-width: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-danger { color: var(--warn-ink); }
.btn-danger:hover { background: var(--warn-bg); }

a.brand { text-decoration: none; border-radius: 8px; }
.brand-logo { display: block; max-width: 168px; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.auth-logo { display: block; max-width: 200px; max-height: 36px; width: auto; height: auto; object-fit: contain; }
.side-user-link { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px; margin: -4px; border-radius: 8px; text-decoration: none; }
.side-user-link:hover, .side-user-link.is-active { background: var(--hover-2); }

.textarea { width: 100%; min-height: 96px; padding: 11px 14px; border: 0; outline: 0; border-radius: 10px; background: var(--surface); box-shadow: var(--ring-strong); font-size: 15px; line-height: 1.45; resize: vertical; }
.textarea:focus { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.input-wrap select { appearance: none; padding-right: 28px; cursor: pointer; background: no-repeat right 6px center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.input-sm { min-height: 32px; flex: 0 1 220px; }
.input-sm input { height: 30px; font-size: 13px; }
input[type="file"] { max-width: 100%; font-size: 13px; color: var(--ink-2); }
input[type="file"]::file-selector-button { height: 32px; margin-right: 10px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--ring-strong); font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--hover); }

.upload { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.upload-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.logo-box { width: 120px; height: 40px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); box-shadow: var(--ring); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-box img, .bg-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-box-lg { width: 200px; height: 72px; padding: 12px 16px; }
.bg-box { width: 200px; height: 112px; border-radius: 8px; overflow: hidden; background: var(--ink); color: #FFFFFF; box-shadow: var(--ring); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bg-box img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.bg-box .muted { color: #B9BAC6; }
.swatch { width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); flex-shrink: 0; }

.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.room-card { --room: var(--accent); display: flex; flex-direction: column; border-radius: 12px; background: var(--surface); box-shadow: var(--ring); overflow: hidden; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.room-card:hover { box-shadow: var(--ring-strong), 0 6px 18px rgba(23, 23, 33, .08); transform: translateY(-1px); }
.room-band { display: flex; align-items: flex-start; justify-content: space-between; height: 76px; padding: 14px 14px 0 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--room) 16%, #FFFFFF), color-mix(in srgb, var(--room) 5%, #FFFFFF)); }
.room-band .pill { background: rgba(255, 255, 255, .85); }
.room-mark { width: 44px; height: 44px; margin-top: 12px; border-radius: 11px; background: var(--room); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; box-shadow: 0 0 0 3px var(--surface); transform: translateY(8px); }
.room-body { display: flex; flex-direction: column; gap: 4px; padding: 20px 16px 14px; }
.room-name { font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.room-desc { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.room-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }

.next-list { overflow: hidden; }
.next-item { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); }
.next-item:first-child { border-top: 0; }
.next-item .row-main { display: flex; flex-direction: column; flex: 1 1 220px; }

.auth-side.has-image { background-color: var(--ink); background-size: cover; background-position: center; }
.auth-side.has-image .auth-side-sub { color: #ECEDF2; }
[data-preview] input:disabled { cursor: default; }
.brand-card { display: flex; flex-direction: column; border-radius: 12px; background: var(--surface); box-shadow: var(--ring); overflow: hidden; }
.brand-stage { display: flex; align-items: center; justify-content: center; height: 104px; padding: 22px 28px; background: var(--surface-2); border-bottom: 1px solid var(--line); text-decoration: none; }
.brand-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.brand-card .room-body { padding-top: 14px; gap: 6px; }
.brand-card .room-foot { flex-wrap: wrap; }
.brand-grid { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }

/* Ergänzungen ab Version 0.1.2: Projektseite */
.faint { color: var(--faint); }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--hover); }
.tab { display: flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--ring), 0 1px 2px rgba(23, 23, 33, .05); }
.tile-value-text { font-size: 20px; line-height: 1.55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-link { text-decoration: none; transition: background .12s ease; }
.next-link:hover { background: var(--hover); }


.room-band.has-image { background-size: cover; background-position: center; }
.room-mark.has-image { background: var(--surface); padding: 5px; }
.room-mark img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

.rep { display: flex; flex-direction: column; gap: 12px; }
.rep-list { display: flex; flex-direction: column; gap: 8px; }
.rep-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-row .input-wrap { min-height: 40px; }
.rep-row .input-wrap input, .rep-row .input-wrap select { height: 38px; font-size: 14px; }
.rep-a { flex: 2 1 200px; }
.rep-b { flex: 3 1 200px; }
.rep-date { flex: 0 1 160px; }
.rep-kind { flex: 0 1 150px; }
.rep-actions { display: flex; flex-shrink: 0; margin-left: auto; }
.rep-radio { display: flex; align-items: center; justify-content: center; width: 28px; height: 40px; flex-shrink: 0; cursor: pointer; }
.rep-radio input, .check input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.rep-row:first-child [data-row-up], .rep-row:last-child [data-row-down] { opacity: .35; }
.bg-box-wide { width: 260px; height: 86px; background: var(--accent); color: var(--on-accent); }
.bg-box-wide .muted { color: inherit; opacity: .85; }
.logo-box-sq { width: 76px; height: 76px; padding: 8px; border-radius: 16px; text-align: center; line-height: 1.2; }
.save-bar { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); box-shadow: var(--ring-strong), 0 6px 20px rgba(23, 23, 33, .10); align-self: flex-start; }
@media (max-width: 860px) {
  .tabs { order: 5; }
  .ph-body { padding: 0 16px 18px; }
  .rep-row { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .rep-row:last-child { border-bottom: 0; }
}
.form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

/* Ergänzungen ab Version 0.1.3: Ordnerbaum */
.js-only { display: none; }
.js .js-only { display: revert; }
.js span.js-only.fcard-grip { display: flex; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.label-title { font-size: 12px; font-weight: 500; color: var(--muted); }
.idx { margin-right: 6px; font-variant-numeric: tabular-nums; }
.ic.folder-ic { stroke: var(--accent); fill: color-mix(in srgb, var(--accent) 18%, #FFFFFF); stroke-width: 1.5; }
.crumbs-wrap { flex-wrap: wrap; row-gap: 2px; }
.icon-btn-sm { width: 26px; height: 26px; border-radius: 6px; }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn[disabled]:hover { background: transparent; }

.docs { display: flex; flex-wrap: wrap; align-items: stretch; flex-grow: 1; }
.tree-pane { flex: 0 0 272px; max-width: 100%; padding: 16px 10px 20px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.docs-main { flex: 999 1 420px; min-width: 0; padding: 24px 32px 36px; display: flex; flex-direction: column; gap: 24px; }
.tree-root { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--ink-2); }
.tree-root:hover { background: var(--hover); }
.tree-root.is-active { background: var(--hover-2); color: var(--ink); }
.tree-empty { padding: 4px 10px; }
.tree { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.tree .tree { margin-left: 18px; }
.tree-item.is-closed > .tree { display: none; }
.tree-item.is-closed > .tree-row .tree-toggle .ic { transform: rotate(-90deg); }
.tree-row { display: flex; align-items: center; height: 34px; border-radius: 8px; color: var(--ink-2); }
.tree-row:hover { background: var(--hover); }
.tree-row.is-active { background: var(--hover-2); color: var(--ink); font-weight: 500; }
.tree-toggle { width: 22px; height: 34px; flex-shrink: 0; padding: 0; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
span.tree-toggle { cursor: default; }
.tree-toggle .ic { transition: transform .12s ease; stroke-width: 2; }
.tree-link { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: center; gap: 8px; padding-right: 8px; text-decoration: none; }
.tree-idx { color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.folder-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.folder-head-text { min-width: 200px; }
.folder-tile { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.fcard { position: relative; display: flex; align-items: center; border-radius: 12px; background: var(--surface); box-shadow: var(--ring); transition: box-shadow .12s ease, opacity .12s ease; }
.fcard:hover { box-shadow: var(--ring-strong), 0 2px 8px rgba(23, 23, 33, .06); }
.fcard.is-dragging { opacity: .45; }
.fcard.is-over { box-shadow: 0 0 0 2px var(--accent); }
.fcard-grip { align-self: stretch; width: 22px; align-items: center; justify-content: center; color: var(--faint); cursor: grab; flex-shrink: 0; margin-right: -8px; }
.fcard-grip:hover { color: var(--muted); }
.fcard-link { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 4px 14px 14px; text-decoration: none; }
.fcard-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.fcard-name { font-weight: 500; }
.fcard-tools { display: flex; flex-direction: column; padding-right: 8px; flex-shrink: 0; }
.add-folder { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.add-folder-icon { height: 38px; display: flex; align-items: center; color: var(--muted); }
.add-folder-input { flex: 1 1 0; min-width: 0; min-height: 38px; padding: 8px 12px; font-size: 14px; resize: none; overflow: hidden; }
.empty-sm { padding: 32px 24px; }

.pop { position: relative; }
.pop > summary { list-style: none; }
.pop > summary::-webkit-details-marker { display: none; }
.pop[open] > summary { background: var(--hover-2); }
.pop-panel { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: min(340px, calc(100vw - 48px)); padding: 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--ring-strong), 0 12px 32px rgba(23, 23, 33, .14); }
.pop-end .pop-panel { left: auto; right: 0; }

@media (max-width: 860px) {
  .tree-pane { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; overflow-y: auto; }
  .docs-main { padding: 20px 16px 28px; }
  .pop { position: static; }
  .folder-head { position: relative; }
  .pop-panel, .pop-end .pop-panel { left: 0; right: 0; width: auto; }
}

/* Ergänzungen ab Version 0.1.4: Dokumente und Upload */
.js .no-js-only { display: none; }
.fbadge { position: relative; width: 32px; height: 40px; border-radius: 5px 11px 5px 5px; background: var(--surface); box-shadow: inset 0 0 0 1.5px #C9CBD4; flex-shrink: 0; }
.fbadge::before { content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 0 0 0 4px; background: #E9EAEF; box-shadow: inset 1.5px -1.5px 0 #C9CBD4; }
.fbadge span { position: absolute; left: -4px; bottom: 7px; padding: 1px 4px; border-radius: 3px; font-size: 9px; font-weight: 700; letter-spacing: .03em; line-height: 1.3; color: #FFFFFF; }
.fbadge-pdf span { background: #C2410C; }
.fbadge-xls span { background: #15803D; }
.doc-row { min-height: 64px; padding-left: 20px; }
.doc-head { padding-left: 20px; }
.doc-name { font-weight: 500; overflow-wrap: anywhere; }
.doc-row .row-main { display: flex; flex-direction: column; }
.doc-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.doc-tools { display: flex; align-items: center; justify-content: flex-end; }
.doc-tools-w { width: 140px; }
.doc-tools a.icon-btn { text-decoration: none; }
.pop > summary.icon-btn { display: inline-flex; }
.pop-sep { padding-top: 14px; border-top: 1px solid var(--line); }
.decide { box-shadow: 0 0 0 1px color-mix(in srgb, #B7791F 45%, #FFFFFF); background: color-mix(in srgb, var(--amber-bg) 45%, #FFFFFF); }
.decide .next-item { align-items: flex-start; }
.decide-text { color: var(--ink-2); max-width: 640px; }

.dropzone { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border-radius: 12px; border: 1.5px dashed #C9CBD4; background: var(--surface-2); transition: border-color .12s ease, background .12s ease; }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); box-shadow: var(--ring); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dropzone-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dropzone-title { font-weight: 500; cursor: pointer; }
.js .dropzone-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-list { list-style: none; margin: 0; padding: 0; border-radius: 12px; box-shadow: var(--ring); overflow: hidden; }
.upload-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.upload-item:first-child { border-top: 0; }
.upload-item .row-main { display: flex; flex-direction: column; }
.upload-bar { height: 4px; margin-top: 6px; border-radius: 999px; background: var(--hover-2); overflow: hidden; }
.upload-bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s linear; }
.upload-done { display: flex; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 860px) {
  .doc-hide { display: none; }
  .doc-row { flex-wrap: wrap; padding-left: 16px; }
  .doc-row .row-main { flex-basis: calc(100% - 60px); }
  .doc-pills, .doc-tools-w { width: auto; }
  .doc-tools { margin-left: auto; }
}
.rows-open { overflow: visible; }
.rows-open .rows-head { border-radius: 12px 12px 0 0; }
.rows-open .row:last-child { border-radius: 0 0 12px 12px; }
.js span.js-only { display: inline; }
.rescue-status { display: block; margin-top: 6px; font-weight: 500; color: var(--ink); }
.rescue-status.is-error { color: var(--warn-ink); }
.js .btn.js-only { display: inline-flex; }
.dropzone + .upload-list { margin-top: 4px; }

/* Ergänzungen ab Version 0.2.0: Veröffentlichen und Versionen */
.fbadge-lg { transform: scale(1.2); margin: 4px 6px 4px 8px; }
.min-560 { min-width: 560px; }
.version-cell { display: flex; align-items: center; gap: 8px; }
.doc-date { display: block; }
.w-150 .truncate { display: block; }
.change-main { display: flex; flex-direction: column; }
.tabs { max-width: 100%; overflow-x: auto; }

/* Ergänzungen ab Version 0.2.1: Zugänge */
.group-block { padding-top: 4px; }
.form-grid-tight { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.min-900 { min-width: 900px; }
.w-30 { width: 30px; } .w-220 { width: 220px; }
.preview-row { align-items: flex-start; }
.preview-row .input-sm { flex: 1 1 auto; width: 100%; }
.preview-row.is-bad { background: color-mix(in srgb, var(--warn-bg) 50%, #FFFFFF); }
.preview-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 7px; accent-color: var(--accent); }
.warn-text { color: var(--warn-ink); }
.mono-area { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.grow.input-wrap { min-width: 0; }
.input-sm select { height: 30px; font-size: 13px; }
.invite-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 24px; align-items: start; }
.recipient-list { list-style: none; margin: 0; padding: 0; border-radius: 10px; box-shadow: var(--ring); max-height: 260px; overflow-y: auto; }
.recipient-list li { display: flex; flex-direction: column; padding: 8px 12px; border-top: 1px solid var(--line); min-width: 0; }
.recipient-list li:first-child { border-top: 0; }
.mail-preview { border-radius: 12px; box-shadow: var(--ring); background: var(--surface); overflow: hidden; }
.mail-preview-head { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.mail-preview-text { margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 13px; line-height: 1.55; color: var(--ink-2); max-height: 520px; overflow-y: auto; }
.auth-foot-link { color: var(--muted); }
.auth-foot-link:hover { color: var(--ink); }
.auth-side.is-accent .auth-side-sub { color: color-mix(in srgb, var(--on-accent) 85%, transparent); }
.auth-rings { opacity: .22; }
.auth-mark { width: 64px; height: 64px; border-radius: 16px; background: #FFFFFF; color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); overflow: hidden; margin-bottom: 6px; }
.auth-mark.has-image { padding: 8px; }
.auth-mark img { max-width: 100%; max-height: 100%; object-fit: contain; }
.auth-chips { margin-top: 6px; }
.auth-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 12px; font-weight: 500; }
.auth-form-wide { max-width: 440px; }
.terms-box { max-height: 180px; overflow-y: auto; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); box-shadow: var(--ring); white-space: pre-line; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.check-top { align-items: flex-start; }
.check-top input { margin-top: 2px; flex-shrink: 0; }
.room-list { display: flex; flex-direction: column; gap: 10px; }
.alert-stack { flex-direction: column; gap: 4px; }
.alert-stack .cluster { gap: 8px; }

/* Code-Schritt der Anmeldung */
.back-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 34px; margin-left: -10px; padding: 0 12px 0 8px; border-radius: 999px; color: var(--ink-2); text-decoration: none; }
.back-link:hover { background: var(--hover); color: var(--ink); }
.ink { color: var(--ink); font-weight: 500; }
.code-boxes { margin: 0; padding: 0; border: 0; display: flex; gap: 8px; min-width: 0; }
.code-boxes legend { padding: 0; margin-bottom: 6px; font-weight: 500; }
.code-box { width: 0; flex: 1 1 0; min-width: 0; height: 56px; border: 0; outline: 0; border-radius: 10px; box-shadow: var(--ring-strong); background: var(--surface); text-align: center; font: inherit; font-size: 24px; font-weight: 600; color: var(--ink); }
.code-box:focus { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.code-gap { margin-left: 8px; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.setting-row > div { flex: 1 1 320px; min-width: 0; }
.stack-xs { display: flex; flex-direction: column; gap: 4px; }
.code-boxes-narrow { max-width: 380px; }

/* Freigaben */
.phase-row { flex-wrap: wrap; row-gap: 10px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--hover); flex-shrink: 0; }
.seg-btn { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-weight: 500; cursor: pointer; }
.seg-btn:hover:not(:disabled) { background: var(--hover-2); color: var(--ink); }
.seg-btn.is-active, .seg-btn:disabled.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--ring), 0 1px 2px rgba(23, 23, 33, .06); cursor: default; }
.matrix-wrap { overflow-x: auto; border-radius: 12px; box-shadow: var(--ring); background: var(--surface); }
.matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.matrix th, .matrix td { padding: 8px 12px; text-align: left; vertical-align: middle; border-top: 1px solid var(--line); white-space: nowrap; }
.matrix thead th { border-top: 0; background: var(--surface-head); font-size: 12px; font-weight: 500; color: var(--muted); }
.matrix th.matrix-name { position: sticky; left: 0; z-index: 1; background: var(--surface); font-weight: 400; min-width: 220px; max-width: 340px; }
.matrix thead th.matrix-name { background: var(--surface-head); }
.matrix-indent { display: flex; align-items: center; gap: 8px; min-width: 0; }
.matrix-indent.depth-2 { padding-left: 18px; } .matrix-indent.depth-3 { padding-left: 36px; } .matrix-indent.depth-4 { padding-left: 54px; }
.matrix-group { min-width: 96px; max-width: 160px; }
.matrix-group > span { display: block; }
.matrix-group .truncate { color: var(--ink); font-size: 13px; }
.matrix-cell { text-align: center; }
.pill-btn { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; }
.pill-btn:hover { filter: brightness(.97); box-shadow: var(--ring-strong); }
.cell { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 30px; border: 0; border-radius: 8px; background: var(--hover); color: var(--faint); cursor: pointer; }
.cell:hover { box-shadow: var(--ring-strong); }
.cell.is-on { background: var(--ok-bg); color: var(--ok-ink); }
.cell.has-rule { box-shadow: 0 0 0 2px var(--accent); }
.cell-mini { width: 22px; height: 18px; border-radius: 5px; cursor: default; }
.matrix-legend { row-gap: 6px; }
.nowrap { white-space: nowrap; }
.dlg { width: min(380px, calc(100vw - 32px)); padding: 20px; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 48px rgba(23, 23, 33, .22); }
.dlg::backdrop { background: rgba(20, 20, 28, .35); }
.dlg-options { display: flex; flex-direction: column; gap: 8px; }
a.pill { text-decoration: none; }
.phase-row .row-main { flex: 1 1 240px; }
@media (max-width: 640px) {
  .matrix th.matrix-name { min-width: 150px; max-width: 200px; }
  .matrix th.matrix-name .truncate { max-width: 110px; }
}
.cluster-end { align-items: flex-end; }
.member-when, .member-state { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

/* Investoren-Ansicht */
.tnum { font-variant-numeric: tabular-nums; }
.nav-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-left: auto; }
.new-mark { color: var(--accent); font-weight: 500; }
.new-mark::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 4px 1px 4px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
a.doc-link { text-decoration: none; color: inherit; }
a.doc-link:hover { background: var(--hover); }
a.doc-link .ic { flex-shrink: 0; }
.fcard-link-only { text-decoration: none; color: inherit; padding-right: 12px; }
.fcard-link-only .fcard-link { padding-right: 8px; }
.brand-btn { width: 100%; border-radius: 10px; cursor: pointer; }
.brand-btn:hover { background: var(--hover-2); }
.room-switch .pop-panel { width: 236px; padding: 6px; }
.brand-tile.has-image { background: var(--surface); box-shadow: var(--ring); padding: 3px; overflow: hidden; }
.brand-tile img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.crumb-home { display: inline-flex; color: var(--muted); }
.crumb-home .ic { color: var(--muted); }
.room-pick { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; } .room-pick:hover { box-shadow: var(--ring-strong); } .room-pick .row-main { display: flex; flex-direction: column; }
.fbadge-space { width: 32px; flex-shrink: 0; }
.ic-space { width: 16px; flex-shrink: 0; }
.doc-head .fbadge-space { margin-left: -4px; }

/* Viewer */
.vw-body-page { background: var(--surface); }
.vw { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--surface); }
.vw-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 64px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.vw-bar .back-link { margin-left: 0; max-width: 220px; }
.vw-sep { width: 1px; height: 28px; background: var(--line); }
.fbadge-sm { transform: scale(.8); }
.vw-title { min-width: 0; flex: 0 1 auto; line-height: 1.3; }
.vw-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.vw-ctrl { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 5px; border-radius: 999px; background: var(--hover); }
.vw-pageno { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; }
.vw-pageno input { width: 34px; height: 26px; border: 0; border-radius: 6px; background: var(--surface); box-shadow: var(--ring); text-align: center; font: inherit; font-variant-numeric: tabular-nums; }
.vw-zoom { min-width: 48px; text-align: center; }
.vw-main { flex: 1 1 0; min-height: 0; display: flex; }
.vw-thumbs { flex: 0 0 132px; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 12px; align-items: center; border-right: 1px solid var(--line); }
.vw-thumb { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.vw-thumb canvas { display: block; background: #FFFFFF; box-shadow: var(--ring); border-radius: 3px; }
.vw-thumb:hover { background: var(--hover); }
.vw-thumb.is-current { background: var(--hover-2); color: var(--ink); font-weight: 600; }
.vw-thumb.is-current canvas { box-shadow: 0 0 0 2px var(--accent); }
.vw-stage { flex: 1 1 0; min-width: 0; overflow: auto; background: #EDEEF2; padding: 24px; position: relative; }
.vw-pages { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.vw-page { background: #FFFFFF; box-shadow: 0 1px 3px rgba(23, 23, 33, .12), 0 0 0 1px rgba(23, 23, 33, .04); flex-shrink: 0; user-select: none; -webkit-user-select: none; }
.vw-page canvas { display: block; width: 100%; height: 100%; }
.vw-status { margin: 40px auto; max-width: 420px; text-align: center; color: var(--ink-2); }
.vw-side { flex: 0 0 280px; overflow-y: auto; padding: 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.vw-facts { margin: 0; display: flex; flex-direction: column; }
.vw-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.vw-facts dt { color: var(--muted); flex-shrink: 0; }
.vw-facts dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.vw-note { display: flex; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.vw-note .ic { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.vw-note strong { color: var(--ink); font-weight: 600; }
.vw-note p { margin-top: 4px; }
.vw-print { display: none; }
.vw:fullscreen .vw-side { display: none; }
@media (max-width: 960px) {
  .vw-side { display: none; }
}
@media (max-width: 640px) {
  .vw-thumbs { display: none; }
  .vw-stage { padding: 12px; }
  .vw-sep, .vw-bar .fbadge { display: none; }
}
@media print {
  body * { visibility: hidden !important; }
  .vw-print { display: block !important; visibility: visible !important; position: fixed; top: 40px; left: 40px; font-size: 18px; }
}
a.seg-btn { display: inline-flex; align-items: center; text-decoration: none; }

/* Projektkopf */
.ph { border-radius: 14px; box-shadow: var(--ring); overflow: hidden; background: var(--surface); }
.ph-banner { position: relative; height: 150px; background: var(--accent); color: var(--on-accent); overflow: hidden; }
.ph-banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-pattern { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .16; }
.ph-body { padding: 0 24px 22px; display: flex; flex-direction: column; gap: 18px; }
.ph-top { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.ph-mark { position: relative; margin-top: -38px; width: 76px; height: 76px; border-radius: 18px; background: var(--surface); box-shadow: var(--ring), 0 4px 12px rgba(23, 23, 33, .10); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 600; color: var(--accent); overflow: hidden; flex-shrink: 0; }
.ph-mark.has-image { padding: 8px; }
.ph-mark img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ph-title-wrap { flex: 1 1 320px; min-width: 0; }
.ph-title { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ph-main { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: stretch; }
.ph-text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ph-desc { max-width: 680px; font-size: 15px; color: var(--ink-2); text-wrap: pretty; }
.ph-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 16px 24px; }
.ph-facts dt { font-size: 12px; color: var(--muted); }
.ph-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.ph-contact { flex: 1 1 320px; max-width: 360px; min-width: 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; align-self: flex-start; }
.ph-contact-row { display: flex; align-items: center; gap: 12px; }
.ph-avatar { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, #FFFFFF); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.ph-contact-name { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ph-contact-line { color: var(--ink-2); overflow-wrap: anywhere; }
.ph-round { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); box-shadow: var(--ring); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ph-round:hover { background: var(--hover-2); }
.ph-steps { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.ph-step { display: flex; align-items: center; gap: 10px; }
.ph-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #D5D7DE; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ph-dot .ic { stroke-width: 2.4; }
.ph-step.is-done .ph-dot { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.ph-step.is-current .ph-dot { border-color: var(--accent); }
.ph-step.is-current .ph-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.ph-step-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ph-step-title { font-weight: 500; }
.ph-step.is-current .ph-step-title { font-weight: 600; }
.ph-step.is-open .ph-step-title { color: var(--ink-2); }
.ph-step-when { font-size: 12px; color: var(--muted); }
.ph-step.is-current .ph-step-when { color: var(--accent); font-weight: 500; }

/* Standort-Kachel (abgeschaltet, siehe App\Room\Map::ENABLED) */
.ph-map { position: relative; height: 168px; border-radius: 16px; overflow: hidden; background: #E8EAEE; border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 12px 32px rgba(23, 23, 33, .16), 0 0 0 1px rgba(23, 23, 33, .06); }
.ph-map-canvas { position: absolute; inset: 0; overflow: hidden; }
.ph-map-t { position: absolute; width: 256px; height: 256px; max-width: none; filter: saturate(.75) contrast(1.02); }
.ph-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -88%); width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(23, 23, 33, .30), 0 0 0 4px rgba(255, 255, 255, .9); }
.ph-pin::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--accent); opacity: .35; }
.ph-map-credit { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; font-size: 10px; color: var(--ink-2); text-decoration: none; background: rgba(255, 255, 255, .78); }
.ph-map-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 12px; text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, .68); border: 1px solid rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); }
.ph-map-bar:hover { background: rgba(255, 255, 255, .86); }
.ph-map-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; font-weight: 500; }
.ph-map-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ph-map-open { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--accent); }
.ph-map { margin-bottom: 0; }
@media (max-width: 860px) {
  .ph-body { padding: 0 16px 18px; }
}
@media (max-width: 640px) {
  .ph-steps { flex-direction: column; }
}
.ph-side { flex: 1 1 320px; max-width: 360px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ph-side .ph-contact { max-width: none; flex: none; }
.preview-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 20px; background: var(--amber-bg); color: var(--amber-ink); border-radius: 12px 12px 0 0; }
.vw > .preview-bar, body > .preview-bar { border-radius: 0; }
.preview-bar .btn { background: rgba(255, 255, 255, .7); }

/* Wasserzeichen-Baukasten */
.wm-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.wm-form { flex: 1 1 340px; max-width: 460px; }
.wm-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.wm-fieldset legend { padding: 0; margin-bottom: 6px; }
.wm-layout > .stack-sm { flex: 1 1 340px; }
.wm-page { position: relative; width: 100%; max-width: 420px; aspect-ratio: 210 / 297; background: #FFFFFF; border-radius: 4px; box-shadow: 0 1px 3px rgba(23, 23, 33, .12), 0 0 0 1px rgba(23, 23, 33, .06); overflow: hidden; }
.wm-doc { position: absolute; inset: 9% 11%; display: flex; flex-direction: column; gap: 14px; }
.wm-bar { display: block; height: 8px; border-radius: 4px; background: #E3E4EA; }
.wm-bar-h { height: 14px; width: 60%; background: #C9CBD4; margin-bottom: 8px; }
.wm-bar-s { width: 70%; }
.wm-layer { position: absolute; inset: 0; pointer-events: none; color: #6E707D; font-weight: 700; }
.wm-grid { position: absolute; left: 50%; top: 50%; width: 220%; transform: translate(-50%, -50%) rotate(-30deg); display: flex; flex-direction: column; gap: 22px; }
.wm-row { display: flex; gap: 34px; justify-content: center; }
.wm-row.is-shift { transform: translateX(80px); }
.wm-block { font-size: 9px; line-height: 1.3; text-align: center; white-space: nowrap; }
.wm-big { position: absolute; left: 50%; top: 50%; font-size: 17px; line-height: 1.25; }

/* Dashboard */
.tiles-4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart-value { font-size: 11px; fill: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-bar { fill: var(--accent); }
.chart-bar.is-today { fill: color-mix(in srgb, var(--accent) 45%, #FFFFFF); }
.att-list { display: flex; flex-direction: column; }
.att-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; border-radius: 8px; }
.att-item:first-child { border-top: 0; }
.att-item:hover { background: var(--hover); }
.att-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--hover); color: var(--ink-2); }
.att-icon.is-urgent { background: var(--warn-bg); color: var(--warn-ink); }
.avatar-square { border-radius: 8px; }
.meter-cell { display: flex; align-items: center; gap: 12px; }
.meter { flex: 1 1 0; height: 6px; border-radius: 3px; background: var(--hover-2); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.meter-0 { width: 0%; }
.meter-5 { width: 5%; }
.meter-10 { width: 10%; }
.meter-15 { width: 15%; }
.meter-20 { width: 20%; }
.meter-25 { width: 25%; }
.meter-30 { width: 30%; }
.meter-35 { width: 35%; }
.meter-40 { width: 40%; }
.meter-45 { width: 45%; }
.meter-50 { width: 50%; }
.meter-55 { width: 55%; }
.meter-60 { width: 60%; }
.meter-65 { width: 65%; }
.meter-70 { width: 70%; }
.meter-75 { width: 75%; }
.meter-80 { width: 80%; }
.meter-85 { width: 85%; }
.meter-90 { width: 90%; }
.meter-95 { width: 95%; }
.meter-100 { width: 100%; }
.w-40 { width: 40px; }
