/* ============================================================
   AVA – Erscheinungsbild „Frisch“
   Helles Salbei-Weiß, tiefes Jadegrün als Akzent (aus der Markenfarbe des Kunden: --brand),
   Limettengrün als Signal für „frei / gut“. Alle Farben als Token, Hell und Dunkel.
   ============================================================ */
:root {
  --brand: #127a62;
  --font: "Plus Jakarta Sans";
  --bg: #f3f5f0; --surface: #ffffff; --surface-2: #eef1ea; --surface-3: #e6eae1; --border: #dfe4d9; --border-strong: #c9d0c1;
  --text: #17211c; --muted: #616d63; --heading: #0e1813;
  --accent: var(--brand); --on-accent: #ffffff;
  --accent-soft: color-mix(in oklab, var(--accent) 11%, var(--surface)); --accent-line: color-mix(in oklab, var(--accent) 30%, var(--border));
  --spark: #c9f06b; --spark-ink: #2c4a05;
  --ok: #1d8a53; --ok-soft: #e3f4ea; --bad: #c8372f; --bad-soft: #fbe8e6; --warn: #a96300; --warn-soft: #fbf0dc;
  --purple: #6d4fd8; --purple-soft: #efeafc; --info-soft: color-mix(in oklab, var(--accent) 9%, var(--surface));
  --hero: linear-gradient(118deg, color-mix(in oklab, var(--accent) 14%, var(--surface)) 0%, color-mix(in oklab, var(--spark) 38%, var(--surface)) 100%);
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23,33,28,.04), 0 6px 20px -12px rgba(23,33,28,.14);
  --shadow-lg: 0 18px 50px -20px rgba(23,33,28,.35);
  --table: #e4e8df; --table-edge: #b8c1b1; --free: #24b06c; --mine: var(--accent); --taken: #e0483f; --assigned: #8a6cf0; --blocked: #cdd3c7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1210; --surface: #131b18; --surface-2: #19231f; --surface-3: #202c27; --border: #25312c; --border-strong: #34443d;
    --text: #e6eee9; --muted: #94a49a; --heading: #f4f8f5;
    --accent: color-mix(in oklab, var(--brand) 55%, #d9fff0); --on-accent: #0c1210;
    --accent-soft: color-mix(in oklab, var(--accent) 16%, var(--surface));
    --spark-ink: #d6f78f;
    --ok: #5fd394; --ok-soft: #173126; --bad: #ff7b72; --bad-soft: #3a1d1b; --warn: #f2b14c; --warn-soft: #36290f;
    --purple: #b4a0ff; --purple-soft: #262040; --info-soft: color-mix(in oklab, var(--accent) 12%, var(--surface));
    --hero: linear-gradient(118deg, color-mix(in oklab, var(--accent) 26%, var(--surface)) 0%, color-mix(in oklab, var(--spark) 12%, var(--surface)) 100%);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -14px rgba(0,0,0,.6); --shadow-lg: 0 20px 60px -20px rgba(0,0,0,.7);
    --table: #22302a; --table-edge: #3a4b43; --free: #3fcf86; --taken: #ff6b62; --blocked: #39463f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1210; --surface: #131b18; --surface-2: #19231f; --surface-3: #202c27; --border: #25312c; --border-strong: #34443d;
  --text: #e6eee9; --muted: #94a49a; --heading: #f4f8f5;
  --accent: color-mix(in oklab, var(--brand) 55%, #d9fff0); --on-accent: #0c1210;
  --accent-soft: color-mix(in oklab, var(--accent) 16%, var(--surface));
  --spark-ink: #d6f78f;
  --ok: #5fd394; --ok-soft: #173126; --bad: #ff7b72; --bad-soft: #3a1d1b; --warn: #f2b14c; --warn-soft: #36290f;
  --purple: #b4a0ff; --purple-soft: #262040; --info-soft: color-mix(in oklab, var(--accent) 12%, var(--surface));
  --hero: linear-gradient(118deg, color-mix(in oklab, var(--accent) 26%, var(--surface)) 0%, color-mix(in oklab, var(--spark) 12%, var(--surface)) 100%);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -14px rgba(0,0,0,.6); --shadow-lg: 0 20px 60px -20px rgba(0,0,0,.7);
  --table: #22302a; --table-edge: #3a4b43; --free: #3fcf86; --taken: #ff6b62; --blocked: #39463f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
#app { height: 100%; }
body { font: 14px/1.5 var(--font), system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 20px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; margin-top: 1em; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Shell */
#app { display: flex; }
.side { width: 236px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; height: 100%; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; }
.brand b { display: block; } .brand small { color: var(--muted); }
.logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 16px; }
.side nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 2px; overflow-y: auto; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.side nav a:hover { background: var(--surface-2); text-decoration: none; }
.side nav a.active { background: var(--accent-soft); color: var(--accent); }
.side nav .ico { width: 20px; text-align: center; opacity: .8; }
.side nav .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; }
.side-foot { padding: 12px 14px 14px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.side-user { display: flex; align-items: center; gap: 2px; }
.side-user-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px; border-radius: 10px; cursor: pointer; text-align: left; color: var(--text); }
.side-user-main:hover { background: var(--surface-2); }
.side-user-main span { min-width: 0; } .side-user-main b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-main small { display: block; color: var(--muted); font-size: 12px; }
.side-user .icon-btn { display: grid; place-items: center; padding: 7px; }
.side-legal { font-size: 12px; color: var(--muted); padding: 0 4px; }
.side-legal a { color: var(--muted); } .side-legal a:hover { color: var(--text); }
.legal-links { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.top h1 { margin: 0; font-size: 18px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px 4px 4px; cursor: pointer; text-align: left; }
.user-btn b { display: block; font-size: 13px; } .user-btn small { color: var(--muted); display: block; line-height: 1.1; }
.user-btn:hover { background: var(--surface-2); }
.main { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }
.menu-btn { display: none; }
.icon-btn { background: none; border: 0; border-radius: 8px; cursor: pointer; padding: 6px 8px; font-size: 16px; position: relative; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.bell .dot { position: absolute; top: 0; right: 0; background: var(--bad); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 5px; }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-2.wide-left { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-2.tight { gap: 8px; margin-bottom: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.stat > small:first-child { color: var(--muted); font-weight: 500; }
.stat b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.greet { font-size: 16px; font-weight: 600; margin: 0 0 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--text); text-decoration: none !important; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.lg { padding: 14px 24px; font-size: 17px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.info { background: var(--info-soft); color: var(--accent); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); margin: 2px 2px 2px 0; }
.tag[style*="--c"] { background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 30%, transparent); color: var(--c); }
.alert { padding: 10px 12px; border-radius: 8px; margin: 10px 0; background: var(--surface-2); }
.alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--info-soft); } .alert.muted { color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; } .avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatars { display: flex; align-items: center; } .avatars .avatar { margin-right: -6px; border: 2px solid var(--surface); }
.avatars .more { margin-left: 10px; font-size: 12px; color: var(--muted); }
.chip-user { display: inline-flex; align-items: center; gap: 8px; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); } .empty-ico { font-size: 28px; }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 10px; }
.form.inline { flex-direction: row; flex-wrap: wrap; align-items: center; }
.form.inline input, .form.inline select { flex: 1 1 120px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--surface); color: var(--text); min-width: 0; font-size: 14px; }
/* Auswahlfelder: eigener Pfeil innerhalb des Rahmens (der Browser-Pfeil sitzt sonst je nach System am äußersten Rand) */
select:not([multiple]) { -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis; }
select:not([multiple]):focus { background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); }
select::-ms-expand { display: none; }
input[type=color] { height: 36px; width: 70px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-weight: 400; font-size: 13.5px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 12px; margin: 6px 0; }
legend { font-size: 12px; color: var(--muted); padding: 0 4px; font-weight: 600; }
details summary { cursor: pointer; color: var(--accent); font-weight: 500; padding: 4px 0; }
details[open] { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; } .row.center { justify-content: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grow { flex: 1; } .grow-input { flex: 1 1 220px; }
.sticky-save { position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(transparent, var(--bg) 40%); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 14px; }
.toolbar > label { min-width: 0; }
.date-nav { display: flex; gap: 6px; align-items: center; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-size: 12.5px; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 14px; cursor: pointer; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl td.actions { white-space: nowrap; text-align: right; } .tbl td.actions .btn { margin-left: 4px; }
.tbl td.c { text-align: center; }
.tbl.team td:not(:first-child) { text-align: center; font-size: 16px; }
.tbl.team td small { display: block; font-size: 10px; color: var(--muted); }
.tbl.team .c-office { background: var(--ok-soft); }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding-top: 10px; font-size: 12.5px; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.mini-list li:last-child { border: 0; }

/* Buchen */
.suggest { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; margin-bottom: 14px; }
.suggest > b { align-self: center; }
.sugg { display: flex; flex-direction: column; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-width: 180px; flex: 1 1 180px; max-width: 300px; }
.sugg:hover { border-color: var(--accent); }
.sugg small { color: var(--muted); } .sugg span { color: var(--accent); font-weight: 600; font-size: 12px; margin-top: 4px; }
.book-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.plan-card { padding: 12px; }
.floor-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.floor-tabs button { border: 1px solid var(--border); background: var(--surface); padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.floor-tabs button.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.plan-wrap { width: 100%; overflow: auto; position: relative; height: var(--plan-h, 70vh); }
.plan { width: 100%; min-width: 620px; height: auto; display: block; user-select: none; }
/* Ganzer Plan: Rahmen passt sich dem Plan an, nichts scrollt oder verrutscht */
.plan-wrap:has(> .plan.fit) { height: auto; overflow: hidden; }
.plan.fit { min-width: 0; max-height: max(340px, calc(100vh - 240px)); }
/* Gezoomt: Rahmen bleibt gleich groß, Plan mit der Maus verschieben */
.plan-wrap:has(> .plan:not(.fit):not(.editing)) { cursor: grab; touch-action: pan-x pan-y pinch-zoom; }
.plan-wrap.panning { cursor: grabbing; } .plan-wrap.panning * { cursor: grabbing !important; }
.plan-bg { fill: var(--surface-2); }
.zone rect:first-child { stroke: color-mix(in srgb, var(--text) 18%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zone rect:first-child { opacity: .18; } }
.zone-label { font-size: calc(13px * var(--fs, 1)); font-weight: 600; fill: var(--muted); }
.res { cursor: pointer; }
.res .shape { fill: var(--surface); stroke-width: 2; transition: filter .15s; }
.res:hover .shape { filter: brightness(.95); }
.res-name { font-size: calc(11px * var(--fs, 1)); font-weight: 600; text-anchor: middle; fill: var(--text); pointer-events: none; }
.res-sub, .res-cap { font-size: calc(10px * var(--fs, 1)); text-anchor: middle; fill: var(--muted); pointer-events: none; }
.t-room .res-name { font-size: calc(13px * var(--fs, 1)); }
.s-free .shape { stroke: var(--free); fill: color-mix(in srgb, var(--free) 12%, var(--surface)); }
.s-mine .shape { stroke: var(--mine); fill: color-mix(in srgb, var(--mine) 22%, var(--surface)); }
.s-taken .shape { stroke: var(--taken); fill: color-mix(in srgb, var(--taken) 14%, var(--surface)); }
.s-assigned .shape { stroke: var(--assigned); fill: color-mix(in srgb, var(--assigned) 12%, var(--surface)); }
.s-blocked .shape, .s-inactive .shape { stroke: var(--blocked); fill: var(--surface-2); }
.s-blocked .res-name, .s-inactive .res-name { fill: var(--muted); }
.s-neutral .shape { stroke: color-mix(in srgb, var(--text) 30%, transparent); }
.res.dim { opacity: .25; }
.res.sel .shape { stroke-width: 4; stroke: var(--accent); }
.res.hl .shape { animation: pulse 1.2s ease-in-out 3; }
@keyframes pulse { 50% { stroke-width: 7; stroke: var(--accent); } }
.assigned-dot { fill: var(--assigned); stroke: var(--surface); stroke-width: 1.5; }
.seat .shape { stroke-width: 3; }
.seat-name { font-size: calc(9px * var(--k, 1)); font-weight: 600; text-anchor: middle; fill: var(--text); pointer-events: none; }
.seat-ini { font-size: calc(12px * var(--k, 1)); font-weight: 700; text-anchor: middle; fill: #fff; pointer-events: none; }
.seat.s-free .shape { fill: color-mix(in srgb, var(--free) 10%, var(--surface)); }
.table rect:first-child { fill: var(--table); stroke: var(--table-edge); stroke-width: 1.5; }
.table.sel rect:first-child { stroke: var(--accent); stroke-width: 3; }
.table-label { font-size: 9px; text-anchor: middle; fill: var(--muted); pointer-events: none; }
.plan.editing .table { cursor: move; }
.zone.sel rect:first-child { stroke: var(--accent); stroke-width: 3; }
.mk circle { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.mk text { font-size: calc(11px * var(--k, 1)); text-anchor: middle; pointer-events: none; }
.mk.mk-first text, .mk-first-txt { fill: #e03131; color: #e03131; font-weight: 700; }
.plan.editing .res, .plan.editing .zone.editable { cursor: move; }
.handle { fill: var(--accent); cursor: nwse-resize; opacity: .7; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); padding: 8px 4px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
i.lg { width: 12px; height: 12px; border-radius: 3px; border: 2px solid; display: inline-block; }
.lg.free { border-color: var(--free); } .lg.mine { border-color: var(--mine); background: color-mix(in srgb, var(--mine) 25%, transparent); }
.lg.taken { border-color: var(--taken); } .lg.assigned { border-color: var(--assigned); } .lg.blocked { border-color: var(--blocked); background: var(--surface-2); }
.detail { position: sticky; top: 0; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; }
.detail-head h2 { margin: 2px 0 8px; }
.detail-empty { text-align: center; padding: 30px 10px; }
.star { font-size: 22px; color: var(--muted); } .star.on { color: #f59f00; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin-bottom: 8px; }
.kv span { color: var(--muted); }
.tags { margin-bottom: 10px; }
.detail-foot { display: flex; gap: 4px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 14px; padding-top: 10px; }
.timeline { margin: 10px 0; }
.tl-bar { position: relative; height: 26px; background: var(--ok-soft); border-radius: 6px; overflow: hidden; }
.tl-b { position: absolute; top: 0; bottom: 0; background: var(--taken); opacity: .75; }
.tl-b.pending { background: var(--warn); }
.tl-sel { position: absolute; top: 0; bottom: 0; border: 2px solid var(--accent); border-radius: 4px; background: color-mix(in srgb, var(--accent) 15%, transparent); z-index: 1; }
.tl-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }

/* Übersicht */
.bk-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; flex-wrap: wrap; }
.bk-card > div:first-child { display: flex; flex-direction: column; }
.bk-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sugg-inline { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin: 10px 0; flex-wrap: wrap; }
.func-list { list-style: none; padding: 0; margin: 0 0 14px; }
.func-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.func-list li > div { flex: 1; display: flex; flex-direction: column; }
.func-list small { color: var(--muted); }
.fn-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; }
.survey .scale { display: flex; gap: 8px; }
.scale label { cursor: pointer; }
.scale input { position: absolute; opacity: 0; }
.scale span { font-size: 28px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--border); }
.scale input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.scale input:focus-visible + span { outline: 2px solid var(--accent); }

/* Woche */
.week-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.day { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-height: 130px; background: var(--surface); }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day.holiday { background: var(--surface-2); }
.day.s-office { background: var(--ok-soft); } .day.s-home { background: var(--info-soft); } .day.s-away, .day.s-sick { background: var(--warn-soft); }
.day-h { display: flex; justify-content: space-between; align-items: baseline; }
.day select { font-size: 12.5px; padding: 4px 24px 4px 6px; background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; }
.day .ev { color: var(--purple); }
.pref-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pref-row select { font-size: 12.5px; padding: 5px 24px 5px 6px; background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; }
.wd-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 4px 0; }
.wd-row > span { width: 140px; font-weight: 500; }

/* Personen / Events */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.person { display: flex; gap: 12px; margin: 0; }
.p-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.p-status { font-size: 13px; }
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.event { display: flex; gap: 14px; margin: 0; }
.ev-date { display: flex; flex-direction: column; align-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 8px 12px; height: fit-content; }
.ev-date b { font-size: 22px; line-height: 1; } .ev-date small { text-transform: uppercase; font-weight: 600; }
.ev-body { flex: 1; min-width: 0; }
.comments { list-style: none; padding: 0; } .comments li { padding: 6px 0; border-bottom: 1px dashed var(--border); } .comments p { margin: 2px 0 0; }

/* Analytics */
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hb { display: grid; grid-template-columns: minmax(80px, 160px) 1fr 52px; gap: 10px; align-items: center; font-size: 12.5px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { background: var(--surface-2); border-radius: 4px; height: 12px; overflow: hidden; }
.hb-t i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.hb-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.vbars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 10px; }
.vb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.vb i { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.vb small { font-size: 10px; color: var(--muted); }

/* Admin */
.group-list { list-style: none; padding: 0; margin: 0; }
.group-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.group-list li b { flex: 1; }
.dot-c { width: 12px; height: 12px; border-radius: 50%; }
.int-list { list-style: none; padding: 0; margin: 0; }
.int-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.int-list li > div { display: flex; flex-direction: column; } .int-list small { color: var(--muted); }

/* Modal & Toast */
.modal-back { position: fixed; inset: 0; background: rgba(10, 14, 22, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { width: min(820px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal header h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.notif { list-style: none; padding: 0; margin: 0; }
.notif li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--border); }
.notif li.unread span { font-weight: 600; }
.notif small { color: var(--muted); }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 380px; transition: opacity .3s, transform .3s; }
.toast-bad { background: var(--bad); color: #fff; } .toast-warn { background: var(--warn); color: #fff; } .toast-info { background: var(--accent); color: var(--on-accent); }
.toast.out { opacity: 0; transform: translateY(8px); }
.qr-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr-box [data-qr] { background: #fff; padding: 12px; border-radius: 10px; }
.qr-box a { word-break: break-all; }
.invite { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.invite p { padding: 0 16px; }
.inv-head { background: var(--brand); color: #fff; padding: 14px 16px; font-weight: 700; font-size: 16px; }

/* Kiosk-/Vollbildseiten */
body.bare #app { display: block; overflow-y: auto; }
.bare-wrap { min-height: 100%; display: flex; flex-direction: column; }
.bare-wrap > * { flex: 1; }
.kiosk-card { max-width: 440px; margin: 10vh auto; background: var(--surface); border-radius: 18px; padding: 32px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); }
.kiosk-card h1 { font-size: 30px; margin: 6px 0; }
.qr-btns { display: grid; gap: 8px; }
.qr-btns .btn { width: 100%; white-space: normal; }
.qr-order { text-align: left; border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; display: grid; gap: 8px; }
.qr-order h3 { margin: 0; }
.qr-order p { margin: 0; }
.big-ok { font-size: 56px; color: var(--ok); }
.bad-text { color: var(--bad); font-weight: 600; }
.room-kiosk { min-height: 100%; display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto 1fr; color: #fff; }
.room-kiosk.free { background: linear-gradient(135deg, #2b8a3e, #37b24d); } .room-kiosk.busy { background: linear-gradient(135deg, #c92a2a, #f03e3e); }
.room-kiosk header { grid-column: 1 / -1; display: flex; justify-content: space-between; padding: 28px 40px 0; }
.room-kiosk h1 { font-size: 40px; } .clock { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rk-status { padding: 30px 40px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.rk-status h2 { font-size: 72px; margin: 0; letter-spacing: -.03em; } .rk-title { font-size: 26px; margin: 0; font-weight: 600; }
.room-kiosk .btn { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.35); }
.room-kiosk .btn:hover { background: rgba(255,255,255,.28); }
.rk-next { background: rgba(0,0,0,.18); padding: 30px; display: flex; flex-direction: column; gap: 8px; }
.rk-next > div { padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,.1); }
.rk-next .now { background: rgba(255,255,255,.3); } .rk-next .past { opacity: .5; }
.visitor-kiosk { min-height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #000)); padding: 20px; position: relative; }
.vk-inner { background: var(--surface); border-radius: 22px; padding: 40px; width: min(640px, 100%); text-align: center; display: flex; flex-direction: column; gap: 16px; }
.vk-inner h1 { font-size: 30px; }
.lg-input { font-size: 22px !important; padding: 14px 16px !important; text-align: center; }
.vk-hits { display: flex; flex-direction: column; gap: 8px; }
.kiosk-form { text-align: left; }
.vk-exit { position: absolute; bottom: 16px; right: 20px; color: rgba(255,255,255,.7); font-size: 12px; }
.qr-sheet { padding: 24px; background: #fff; color: #111; min-height: 100%; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.qr-item { border: 1px dashed #bbb; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; break-inside: avoid; }
.qr-item small { color: #666; }
@media print { .no-print { display: none !important; } .qr-sheet { padding: 0; } }

/* Responsiv */
@media (max-width: 1100px) {
  .book-layout { grid-template-columns: 1fr; } .detail { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; height: auto; padding-top: env(safe-area-inset-top, 0px); transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .side.open { transform: none; }
  .menu-btn { display: inline-block; }
  .top { padding: 10px 16px; } .main { padding: 16px 16px 40px; }
  .user-btn span { display: none; } .user-btn { padding: 3px; }
  .grid-2, .grid-2.wide-left, .grid-3 { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: 1fr; } .day { min-height: 0; }
  .pref-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .room-kiosk { grid-template-columns: 1fr; } .rk-status h2 { font-size: 52px; }
  .events, .people { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 20px; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .toolbar > label, .toolbar .seg { width: 100%; }
  .seg button { flex: 1; }
}

/* Plan-Editor & Profil */
.editor-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.eb-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 4px 0 8px; }
.eb-label:first-child { margin-left: 0; }
.inline-range { flex-direction: row; align-items: center; gap: 8px; }
img.avatar { object-fit: cover; padding: 0; }
.photo-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.photo-opt { border: 2px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-align: center; color: var(--text); font-weight: 500; }
.photo-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.photo-opt input { position: absolute; opacity: 0; }
.photo-opt:has(input:focus-visible) { outline: 2px solid var(--accent); }
.seat-preview { display: flex; align-items: center; gap: 16px; }

/* Analytics: Rückblick + Prognose */
.vbars { gap: 3px; height: 200px; }
.vb-col { position: relative; flex: 1; width: 100%; }
.vb-col i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.vb-col i.fc { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, transparent) 0 4px, color-mix(in srgb, var(--accent) 15%, transparent) 4px 8px); }
.vb.future .vb-col i:not(.fc) { background: color-mix(in srgb, var(--accent) 70%, var(--surface)); }
.vb.is-today small { color: var(--accent); font-weight: 700; }
.cap-line { position: absolute; left: -2px; right: -2px; border-top: 2px dashed var(--bad); opacity: .55; }
.lg.bar-past { background: var(--accent); border-color: var(--accent); }
.lg.bar-fc { background: color-mix(in srgb, var(--accent) 30%, transparent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.lg.bar-cap { border: 0; border-top: 2px dashed var(--bad); border-radius: 0; height: 2px; }
.stat.warn b { color: var(--warn); }
.tbl.num td:not(:first-child), .tbl.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.meter { display: inline-block; width: 60px; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.meter i { display: block; height: 100%; background: var(--accent); }
.tbl.heat td[style*="--h"] { background: color-mix(in srgb, var(--ok) calc(var(--h) * 45%), transparent); }
.rot-line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.rot-handle { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; cursor: grab; }
.rot-handle:hover { fill: var(--accent-soft); }
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.geom fieldset { display: flex; flex-direction: column; gap: 8px; }
.editor-help kbd { font: 11px/1 ui-monospace, monospace; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 4px; background: var(--surface); }
.plan.editing .handle { opacity: .9; }
.plan.editing .zone .handle { width: 16px; height: 16px; }
@media (max-width: 520px) { .row4 { grid-template-columns: 1fr 1fr; } }
.floor-tabs .edit-btn { margin-left: auto; border: 1px dashed var(--accent); color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-weight: 600; }
.floor-tabs .edit-btn:hover { background: var(--surface); }
.edit-banner { border: 1px solid var(--accent); }
.sa-card { border-color: color-mix(in srgb, var(--purple) 40%, var(--border)); background: color-mix(in srgb, var(--purple-soft) 50%, var(--surface)); }
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.admin-tbl th small { white-space: nowrap; }
[hidden] { display: none !important; }

/* Wochenbuchung & Teams-Tab */
.wb-steps { display: flex; gap: 18px; padding: 0; margin: 0 0 12px; list-style: none; counter-reset: s; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.wb-steps li { counter-increment: s; display: flex; align-items: center; gap: 6px; }
.wb-steps li::before { content: counter(s); width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.wb-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.wb-day { border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wb-day.v-office { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); }
.wb-day.v-mobile { background: var(--info-soft); }
.wb-day.v-away { background: var(--warn-soft); }
.wb-day.past, .wb-day.hol { opacity: .6; }
.wb-dh { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.wb-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.wb-seg button { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 4px 2px; font-size: 11.5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.2; color: var(--text); }
.wb-seg button span { font-size: 14px; }
.wb-seg button.on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.wb-seg button:disabled { opacity: .4; cursor: not-allowed; }
.wb-note { font-size: 12px; min-height: 18px; }
.ok-t { color: var(--ok); font-weight: 600; } .bad-t { color: var(--bad); font-weight: 600; }
.wb-seat { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 14px 0 10px; }
.wb-seat > label { flex: 1 1 320px; }
.wb-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.wb-result { margin: 12px 0 0; padding: 10px 14px; background: var(--surface-2); border-radius: 8px; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
details.fine > summary { cursor: pointer; list-style: revert; color: var(--text); }
details.fine[open] > summary { margin-bottom: 10px; }
.pres { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pres.online { color: var(--ok); } .pres.online.mobile { color: var(--accent); } .pres.off { color: var(--muted); font-weight: 500; }
.today-prompt { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.today-prompt .row { flex-shrink: 0; }
.pres-btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.teams-tab { max-width: 1680px; margin: 0 auto; padding-block: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.teams-note { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.tt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.int-list .row { margin-top: 6px; }
@media (max-width: 860px) { .wb-days { grid-template-columns: 1fr; } .wb-seg { grid-template-columns: repeat(4, 1fr); } .teams-link, .pres-btn { display: none; } }

h1, h2, h3 { color: var(--heading); }
.brand-stack { display: flex; flex-direction: column; gap: 2px; color: var(--heading); }
.brand-stack small { color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; padding-left: 32px; }
.brand-logo { display: block; width: auto; max-width: 100%; color: var(--heading); }
.hero { background: var(--hero); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; color: var(--heading); }
.hero .greet { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.hero span { color: var(--muted); }
.inv-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 6px 10px; color: #17211c; }
.vk-logo { display: flex; justify-content: center; color: var(--heading); }

/* Anmeldung */
.auth-wrap { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--hero), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: 0 20px 50px rgba(10, 30, 95, .12); display: flex; flex-direction: column; gap: 12px; }
.auth-card h1 { font-size: 22px; margin: 6px 0 0; }
.auth-card p { margin: 0; }
.auth-logo { display: flex; align-items: center; gap: 10px; color: var(--heading); }
.auth-logo span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px; }
.auth-foot { text-align: center; }
.center { text-align: center; }
.code-input { font-size: 22px !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-qr { display: flex; justify-content: center; }
.auth-qr img { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--border); }
.auth-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.auth-secret { display: block; word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; font-size: 13px; user-select: all; }
#acc-link { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; }
.secret-out { font-family: ui-monospace, Menlo, monospace !important; font-size: 16px !important; letter-spacing: .03em; background: var(--surface-2) !important; }
.admin-perms, .pw-start { padding: 8px 0 0 24px; display: flex; flex-direction: column; gap: 6px; }

/* Impressum */
.legal { display: grid; gap: 16px; line-height: 1.6; max-width: 62ch; }
.legal p { margin: 0; }
.legal h3 { margin: 0 0 4px; font-size: 14px; }
.legal-card { max-width: 680px; }
.auth-card .legal { text-align: left; margin: 8px 0 16px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Grundriss als Hintergrund (CAD-Plan): Bereiche als Rahmen, Räume durchscheinend */
.plan.on-bg .plan-bg { fill: #fff; }
.plan.on-bg .zone rect:first-child { fill-opacity: .14; stroke-width: calc(2px * var(--fs, 1)); }
.plan.on-bg .zone-label { fill: #3b3f99; font-weight: 700; }
.plan.on-bg .t-room .shape { fill-opacity: .35; }
.plan .table.block rect:first-child { fill: transparent; stroke: var(--accent); stroke-dasharray: 5 4; stroke-width: calc(1.2px * var(--fs, 1)); }
.plan .table.block.sel rect:first-child { fill: var(--accent-soft); fill-opacity: .4; }
.plan .draw-rect { fill: var(--accent-soft); fill-opacity: .35; stroke: var(--accent); stroke-dasharray: 6 4; stroke-width: calc(1.5px * var(--fs, 1)); pointer-events: none; }
.plan.editing.tool-block { cursor: crosshair; }
.plan-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zoom-bar { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-left: auto; }
.zoom-bar .icon-btn { border-radius: 0; min-width: 34px; font-weight: 700; }
.area-list { display: grid; gap: 6px; margin-top: 8px; }
.area-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 10px; align-items: center; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--text); }
.area-item:hover { background: var(--surface-2); }
.area-item i { width: 10px; height: 10px; border-radius: 3px; grid-row: span 2; }
.area-item small { color: var(--muted); grid-column: 2; }
.area-item .ok { color: var(--ok, #2b8a3e); font-size: 12px; }
.area-item .warn { grid-column: 2 / span 2; font-size: 12px; color: #b35c00; background: #fff4e0; border-radius: 6px; padding: 1px 6px; justify-self: start; }
.size-ctl { display: inline-flex; align-items: center; gap: 6px; }
.edit-btn + .zoom-bar { margin-left: 0; }
.floor-tabs .zoom-bar button { border: 0; border-radius: 0; padding: 4px 10px; background: var(--surface); }
.plan.on-bg .zone-label { font-size: 8.5px; paint-order: stroke; stroke: #fff; stroke-width: 2.5px; }
/* Räume auf Grundriss-Etagen: Beschriftung passend zur kleinen Raumfläche */
.plan.on-bg .t-room .res-name { font-size: 7.5px; }
.plan.on-bg .t-room .res-sub, .plan.on-bg .t-room .res-cap { font-size: 6px; }

/* Lizenzhinweis über dem Inhalt */
.license-bar { padding: 8px 24px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); }
.license-bar.warn { background: #fff4e0; color: #8a4b00; }
.license-bar.bad { background: #ffe3e3; color: #a51111; }
.license-bar a { color: inherit; text-decoration: underline; margin-left: 6px; }
.lic-key { width: 100%; min-height: 90px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.lic-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.lic-grid dt { color: var(--muted); } .lic-grid dd { margin: 0; overflow-wrap: anywhere; }

/* Hinweisseite außerhalb der Bürozeiten */
.closed-page { max-width: 560px; margin: 24px auto; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 32px 24px; }
.closed-page h2 { margin: 0; font-size: 22px; }
.closed-page p { margin: 0; max-width: 46ch; line-height: 1.55; }
.closed-icon { font-size: 40px; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); }
.closed-hours { width: auto; min-width: 240px; }
.closed-hours caption { font-weight: 600; padding-bottom: 6px; }
.closed-hours th { text-align: left; padding-right: 24px; font-weight: 500; }
.closed-hours tr.is-today { background: var(--accent-soft); }
.closed-hours tr.is-today th, .closed-hours tr.is-today td { font-weight: 700; }

/* Öffnungszeiten je Standort */
.hours-edit { display: grid; gap: 6px; }
.hours-row { display: grid; grid-template-columns: 36px auto 1fr 12px 1fr; gap: 8px; align-items: center; }
.hours-row input[type=time] { min-width: 0; }
.hours-row label.switch { display: inline-flex; flex-direction: row; gap: 6px; align-items: center; font-size: 13px; color: var(--text); font-weight: 400; }
.role-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }

/* Erweiterte Analysen */
.gauge-wrap { display: grid; grid-template-columns: minmax(0, 240px) 1fr; gap: 16px; align-items: center; }
.gauge { width: 100%; height: auto; color: var(--text); }
.gauge-v { font-size: 22px; font-weight: 700; fill: var(--text); }
.gauge-t { font-size: 10px; fill: var(--muted); }
.line-chart { width: 100%; height: auto; display: block; }
.line-chart .grid { stroke: var(--border); }
.line-chart .ax { font-size: 10px; fill: var(--muted); }
.tbl.compact td, .tbl.compact th { padding: 3px 8px; font-size: 12.5px; }
.wk-bar { width: 30%; }
@media (max-width: 700px) { .gauge-wrap { grid-template-columns: 1fr; } }

/* Kapazitätsgrenze & Serienbuchung */
.cap-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cap-note > span:first-child { flex: 1 1 260px; }
.cap-bar { flex: 0 0 140px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.cap-bar i { display: block; height: 100%; background: currentColor; border-radius: 99px; }
details.repeat { border: 1px solid var(--line, var(--border, #ddd)); border-radius: 8px; padding: 8px 10px; }
details.repeat summary { cursor: pointer; font-weight: 500; }
details.repeat[open] summary { margin-bottom: 8px; }

/* API-Schnittstelle */
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.api-new { border: 2px solid var(--ok); }
.api-new input { min-width: 0; flex: 1 1 320px; }
/* Platzwahl in „Meine Woche“: Standort → Etage → Lageplan */
.wb-pick { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.wb-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wb-lbl { width: 72px; flex: none; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pills, .wb-chosen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1 1 0; min-width: 0; }
.pill { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13.5px; }
.pill:hover { border-color: var(--accent); }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.seat-chip { background: var(--accent-soft); color: var(--text); border: 1px solid var(--accent); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; }
.wb-plan { margin-top: 4px; }
.wb-plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.wb-plan-head .row { gap: 8px; flex-wrap: wrap; }
.wb-plan-head .zoom-bar { margin-left: 0; }
.wb-plan-days { display: flex; gap: 4px; }
.wb-plan-days .btn.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.wb-plan-days .btn.office:not(.on) { border-color: var(--accent); }
@media (max-width: 600px) { .wb-lbl { width: 100%; } }
/* Mängel & Catering */
.tabs-top { margin-bottom: 14px; }
.mini-plan { width: 100%; height: auto; max-height: 340px; display: block; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.mini-plan.pick { cursor: crosshair; }
.mini-plan .pin circle { fill: color-mix(in srgb, var(--bad, #d33) 30%, transparent); stroke: var(--bad, #d33); }
.mini-plan .pin .dot { fill: var(--bad, #d33); stroke: none; }
.tk-plan { margin: 6px 0; }
.tk-photo { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; margin: 6px 0; }
.qr-report { border: 2px dashed var(--accent); }
.nowrap { white-space: nowrap; }
.mini-list.dogs li { line-height: 1.4; }


/* ============================================================
   AVA „Frisch“ – Feinschliff der Bausteine
   ============================================================ */
body { font-size: 14.5px; letter-spacing: -.003em; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3 { letter-spacing: -.018em; font-weight: 700; }
.stat b, .mono, td { font-variant-numeric: tabular-nums; }

/* Seitenleiste: ruhig, aktive Seite als Fläche mit Akzentkante */
.side { background: var(--surface); border-right: 1px solid var(--border); }
.brand { padding: 20px 18px 16px; }
.brand b { font-size: 15px; letter-spacing: -.01em; color: var(--heading); } .brand small { font-size: 12px; }
.brand-word { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); }
.brand-word b { font-size: calc(var(--h, 28px) * .5); letter-spacing: -.01em; }
.brand-logo { display: block; width: auto; max-width: 180px; object-fit: contain; }
.brand-stack small { padding-left: 0; margin-top: 6px; }
.ava-mark { display: block; flex-shrink: 0; border-radius: 9px; box-shadow: 0 4px 12px -4px color-mix(in oklab, var(--brand) 60%, transparent); }
.side nav { padding: 6px 12px; gap: 3px; }
.side nav a { padding: 9px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 550; transition: background .15s, color .15s; }
.side nav a:hover { background: var(--surface-2); color: var(--text); }
.side nav a.active { background: var(--accent-soft); color: var(--heading); font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
.side nav a.active .ico { opacity: 1; color: var(--accent); }
.side nav .count { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.side-foot { border-top-color: var(--border); }

/* Kopfzeile: leicht abgesetzt, mit Unschärfe beim Scrollen */
.top { background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); padding: 14px 28px; }
.top h1 { font-size: 21px; color: var(--heading); }
.main { padding: 24px 28px 48px; }

/* Karten, Kennzahlen, Begrüßung */
.card { border-radius: var(--radius); border-color: var(--border); padding: 18px 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 15.5px; }
.stat { border-radius: var(--radius); padding: 16px 18px; gap: 6px; position: relative; overflow: hidden; }
.stat > small:first-child { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 700; }
.stat b { font-size: 30px; color: var(--heading); letter-spacing: -.03em; }
.bar { height: 7px; background: var(--surface-3); }
.bar i { background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 55%, var(--spark))); }
.hero { border: 1px solid var(--accent-line); border-radius: calc(var(--radius) + 4px); padding: 22px 24px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--spark) 55%, transparent) 0%, transparent 65%); pointer-events: none; }
.hero .greet { font-size: 22px; }

/* Knöpfe: weich, klar, mit spürbarem Klick */
.btn { border-radius: var(--radius-sm); padding: 8px 15px; font-weight: 600; border-color: var(--border-strong); transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { box-shadow: 0 6px 16px -8px color-mix(in oklab, var(--accent) 70%, transparent); }
.btn.primary:hover { filter: none; background: color-mix(in oklab, var(--accent) 88%, #000); border-color: color-mix(in oklab, var(--accent) 88%, #000); }
:root[data-theme="dark"] .btn.primary:hover { background: color-mix(in oklab, var(--accent) 85%, #fff); }
.btn.sm { padding: 5px 11px; border-radius: 9px; }
.btn.lg { border-radius: 14px; }

/* Eingaben */
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea { border-radius: var(--radius-sm); border-color: var(--border-strong); padding: 8px 11px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
label { font-weight: 600; }

/* Tabellen, Reiter, Abzeichen */
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tbl tr:hover td { background: color-mix(in oklab, var(--surface-2) 60%, transparent); }
.tabs button.on, .seg button.on { color: var(--heading); }
.badge { font-weight: 700; letter-spacing: .01em; padding: 3px 9px; }
.badge.ok::before, .badge.warn::before, .badge.bad::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.toast { border-radius: 14px; box-shadow: var(--shadow-lg); }

/* Branding-Karte in der Administration */
.brand-preview { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 4px; }
.color-row { display: flex; align-items: center; gap: 10px; } .color-row small { font-weight: 400; }
.side nav .ico { width: 20px; display: grid; place-items: center; opacity: .75; }
.side nav a:hover .ico { opacity: 1; }
.brand-card .row2 { grid-template-columns: 1fr; }
.brand-card input[type=color] { width: 56px; height: 40px; flex-shrink: 0; cursor: pointer; }
.brand-card .color-row { align-items: center; }
@media (min-width: 1300px) { .brand-card .row2 { grid-template-columns: 1fr 1fr; } }
