/* ==========================================================================
   Maßlos – Design System (Aufbau wie Altplattform)
   ========================================================================== */
:root {
  --navy: #0b1f3a; --navy-2: #13305a; --blue: #1b4f9c; --blue-2: #2a66c2; --blue-soft: #5e8fd6;
  --sky: #eaf1fb; --sky-2: #f4f8fd; --bg: #eef3f9; --white: #fff;
  --line: #dde5f0; --line-2: #c9d5e5; --ink: #0b1f3a; --muted: #5c6b82;
  --ok: #1e7f5c; --ok-bg: #e6f4ee; --warn: #9a4a0b; --warn-bg: #fdf3e7; --danger: #b3261e; --danger-bg: #fdecec;
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --shadow: 0 1px 2px rgba(11,31,58,.05), 0 6px 20px rgba(11,31,58,.06);
  --shadow-lg: 0 24px 60px rgba(11,31,58,.16);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --top-h: 72px; --gap: 14px; --side-w: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; } .right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.ic { flex: none; }
.hide { display: none !important; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-2); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover:not(:disabled) { background: var(--navy); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: var(--white); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--navy); }
.btn-soft { background: var(--sky); color: var(--navy); }
.btn-soft:hover:not(:disabled) { background: #dde8f7; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; }
.link:hover { text-decoration-color: currentColor; }
.link.danger { color: var(--danger); }
.icon-round { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--navy); flex: none; }
.icon-round:hover { border-color: var(--navy); }

/* ---------- Badges / Pills / Tags ---------- */
.pill, .badge-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.badge-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-gray { background: #eef1f5; color: #4b5870; }
.tone-blue { background: #e3edfc; color: #1b4f9c; }
.tone-sky { background: #dff1fb; color: #13658f; }
.tone-teal { background: #dcf3f0; color: #146b62; }
.tone-green { background: var(--ok-bg); color: var(--ok); }
.tone-orange { background: #fdebdc; color: #a24c10; }
.tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-violet { background: #ece7fb; color: #5b3aa8; }
.tone-red { background: var(--danger-bg); color: var(--danger); }
.tone-navy { background: var(--navy); color: #fff; }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--sky); color: var(--muted); }
.tag-accent { background: var(--blue); color: #fff; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea, .input, .select {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--sky-2); transition: border-color .15s, background .15s;
}
.field textarea, textarea.input { height: auto; min-height: 96px; padding: 10px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus { outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px var(--sky); }
.select, .field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c6b82' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.select.sm { height: 34px; font-size: 13px; border-radius: 999px; width: auto; }
.field-hint { font-size: 12px; color: var(--muted); }
.field.wide { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: 13px; }
.seg button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.toggle { width: 40px; height: 24px; border-radius: 999px; border: 0; background: var(--line-2); position: relative; padding: 0; transition: background .15s; flex: none; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.toggle.on { background: var(--blue); }
.toggle.on i { left: 19px; }
.searchbox { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--muted); flex: 1; min-width: 200px; }
.searchbox:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
.searchbox input { border: 0; outline: none; background: none; flex: 1; min-width: 0; color: var(--ink); height: 100%; }
.searchbox-right { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--sky); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.searchbox.big { height: 50px; border-radius: var(--r); }

/* ---------- Chips (Filter) & Tabs ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip-btn:hover { color: var(--navy); border-color: var(--line-2); }
.chip-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--sky); color: var(--navy); }
.chip-btn.active .chip-count { background: rgba(255,255,255,.18); color: #fff; }
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-line { height: 42px; padding: 0 14px; border: 0; background: none; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab-line.active { color: var(--navy); border-bottom-color: var(--navy); }

/* ---------- Panels, KPI, Tabellen ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.panel-title h3 { font-size: 18px; }
.panel-sub { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.panel-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--sky); color: var(--navy); display: grid; place-items: center; flex: none; }
.panel-action { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); white-space: nowrap; }
.panel-action:hover { color: var(--navy); }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush > .panel-head { padding: 18px 20px 0; }
.kpi { display: flex; align-items: center; gap: 16px; }
.kpi-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.kpi-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi-delta { font-size: 12.5px; font-weight: 700; color: var(--blue); }
.stat-mini { display: flex; flex-direction: column; gap: 2px; }
.stat-mini b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.stat-mini span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table thead th { background: var(--navy); color: #fff; text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 12px 14px; white-space: nowrap; }
.table thead th:first-child { border-radius: 10px 0 0 10px; }
.table thead th:last-child { border-radius: 0 10px 10px 0; }
.table thead th.right, .table td.right { text-align: right; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td { background: var(--sky-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table .strong { font-weight: 700; }
.table .num { font-weight: 800; letter-spacing: .02em; color: var(--blue); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a.num:hover { text-decoration: underline; }
.cell-2 { display: flex; flex-direction: column; line-height: 1.35; }
.cell-2 small { color: var(--muted); font-size: 12px; }
.th-sort { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 0; }
.th-sort.active { color: #b9d0f2; }
.kv { margin: 0; display: flex; flex-direction: column; }
.kv div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-state b { color: var(--ink); font-size: 15px; }
.empty-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--sky); color: var(--navy); display: grid; place-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.soft { background: var(--sky); color: var(--navy); }
.qr { background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Progress / Stepper ---------- */
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-bar { height: 100%; background: var(--blue); border-radius: 999px; transition: width .35s ease; }
.progress.done .progress-bar { background: var(--ok); }
.stepper { display: inline-flex; align-items: center; height: 38px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; }
.stepper button { width: 38px; height: 100%; border: 0; background: none; font-size: 17px; font-weight: 600; border-radius: 999px; }
.stepper button:hover:not(:disabled) { background: var(--sky); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper.xl { height: auto; border: 0; gap: 40px; background: none; }
.stepper.xl button { width: 52px; height: 52px; border: 1px solid var(--line-2); background: #fff; font-size: 22px; }
.stepper.xl span { font-size: 64px; font-weight: 800; color: var(--blue); min-width: 60px; }

/* ---------- Drawer / Modal / Toasts ---------- */
.drawer-wrap, .modal-wrap, .assistant-wrap { position: fixed; inset: 0; z-index: 80; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(11,31,58,.38); backdrop-filter: blur(3px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .25s ease; }
.drawer.wide { width: min(880px, 100vw); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.drawer-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-wrap { display: grid; place-items: center; padding: 16px; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); background: #fff; border-radius: var(--r-lg); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .2s ease; overflow: hidden; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toast-in .25s ease; max-width: calc(100vw - 32px); }
.toast.tone-warn { background: var(--warn); } .toast.tone-err { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ==========================================================================
   Rahmen: Kopfleiste, Seitenleiste, Inhalt
   ========================================================================== */
.shell { min-height: 100vh; }
.topbar { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 50; height: var(--top-h); background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 12px 0 18px; }
.brand { flex: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); }
.logo-img { display: block; height: 30px; width: auto; }
.logo-full .logo-img { height: 64px; }
.logo-icon { display: block; border-radius: 8px; }
.topnav { display: flex; align-items: center; gap: 2px; }
.topnav-link { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 999px; border: 1px solid transparent; background: none; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.topnav-link:hover { color: var(--navy); background: var(--sky-2); }
.topnav-link.active { color: var(--navy); background: var(--sky); }
.more-btn.active { border-color: var(--line-2); }
.more, .pop-anchor { position: relative; }
.shell-pop { position: absolute; top: calc(100% + 12px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 60; animation: pop .15s ease; }
.more-pop { left: -120px; width: 420px; padding: 12px; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-tile { display: flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--sky-2); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.more-tile:hover { border-color: var(--line-2); background: var(--sky); }
.more-tile.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.more-foot { display: flex; justify-content: flex-end; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.round-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); display: grid; place-items: center; }
.round-btn:hover { border-color: var(--navy); }
.round-btn.copilot { background: var(--navy); color: #fff; border-color: var(--navy); }
.dot-count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.square-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); }
.square-btn.light { background: var(--sky); color: var(--navy); border-color: #d3e0f2; }
.square-btn.light:hover { background: #dce8f8; }
.square-btn.ghost { background: #fff; color: var(--navy); }
.profile-btn .avatar { width: 42px; height: 42px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); }
.search-pop { right: -110px; width: 420px; padding: 12px; }
.bell-pop { right: -60px; width: 400px; padding: 12px; }
.pop-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; }
.pop-head .eyebrow { margin: 0; margin-right: auto; }
.pop-hint { padding: 12px 6px 4px; }
.pop-list { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; margin-top: 8px; }
.pop-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 12px; }
.pop-item:hover { background: var(--sky-2); }
.pop-item.unread { background: var(--sky-2); }
.pop-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--sky); color: var(--navy); display: grid; place-items: center; flex: none; }
.pop-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.pop-copy small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lang { display: inline-flex; gap: 4px; }
.lang button { height: 26px; min-width: 32px; padding: 0 7px; border-radius: 8px; border: 1px solid transparent; background: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.lang button.active { border-color: var(--line-2); background: var(--sky); color: var(--navy); }

.sidebar { position: fixed; top: calc(var(--top-h) + 24px); left: 12px; bottom: 12px; width: var(--side-w); z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between; padding: 12px 0; }
.side-main, .side-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.side-main { overflow-y: auto; }
.side-foot { padding-top: 10px; border-top: 1px solid var(--line); margin: 0 8px; }
.side-link { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); border: 1px solid transparent; background: none; flex: none; }
.side-link:hover { color: var(--navy); background: var(--sky-2); }
.side-link.active { color: #fff; background: var(--navy); }
.shell-content { padding: calc(var(--top-h) + 24px) 12px 24px calc(var(--side-w) + 24px); max-width: 1680px; }
.mobile-nav { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: var(--gap); }
.page-head h1 { font-size: 30px; }
.page-head p { margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.back-link:hover { color: var(--navy); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: var(--gap); }
.toolbar.panel { padding: 12px; }

/* Assistent */
.assistant { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(420px, calc(100vw - 24px)); background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .25s ease; overflow: hidden; }
.assistant-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14px; }
.bubble.bot { background: var(--sky); color: var(--navy); border-top-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.assistant-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.assistant-input { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.assistant-input input { flex: 1; height: 40px; border-radius: 999px; border: 1px solid var(--line-2); padding: 0 14px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-brand { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-claim h1 { font-size: clamp(36px, 4.4vw, 60px); font-weight: 800; letter-spacing: -.035em; }
.login-claim p { margin-top: 18px; max-width: 440px; color: #b9c8de; font-size: 17px; }
.login-waves { position: absolute; left: 0; right: 0; bottom: 60px; width: 100%; height: 120px; }
.login-waves path { fill: none; stroke: var(--blue-soft); stroke-width: 1.4; opacity: .35; }
.login-brand small { color: #8fa3c0; position: relative; }
.login-main { display: grid; place-items: center; padding: 32px 16px; background: #fff; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.login-card h2 { font-size: 32px; }
.login-card .btn { margin-top: 6px; }
.login .field > span { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.pw { position: relative; display: flex; }
.pw input { flex: 1; padding-right: 96px; }
.pw .link { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.alert { padding: 12px 14px; border-radius: var(--r-sm); background: var(--danger-bg); color: var(--danger); font-size: 14px; font-weight: 500; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r); background: var(--sky); font-size: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .topnav { display: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .form-grid.three, .form-grid.four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --top-h: 60px; }
  .topbar { top: 8px; left: 8px; right: 8px; }
  .topbar-inner { gap: 8px; padding: 0 8px 0 12px; }
  .square-btn, .hide-sm { display: none; }
  .round-btn, .profile-btn .avatar { width: 38px; height: 38px; }
  .sidebar { display: none; }
  .shell-content { padding: calc(var(--top-h) + 20px) 16px 96px; }
  .mobile-nav { display: flex; position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; gap: 4px; }
  .mnav { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border-radius: 12px; border: 0; background: none; font-size: 10.5px; font-weight: 600; color: var(--muted); }
  .mnav.active { background: var(--navy); color: #fff; }
  .mobile-more { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 10px; max-height: 60vh; overflow-y: auto; }
  .search-pop, .bell-pop { position: fixed; top: calc(var(--top-h) + 16px); left: 8px; right: 8px; width: auto; }
  .grid-2, .grid-3, .grid-4, .form-grid, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
  h1, .page-head h1 { font-size: 24px; }
  .panel { padding: 16px; }
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 28px 20px 64px; gap: 28px; }
  .login-waves { bottom: 10px; height: 60px; }
  .table { font-size: 13px; }
  .table td, .table thead th { padding: 10px; }
}
@media print {
  .topbar, .sidebar, .mobile-nav, .toasts, .no-print { display: none !important; }
  .shell-content { padding: 0; }
  body { background: #fff; }
  .panel { box-shadow: none; }
}
.tab-count { margin-left: 6px; }
.brand { min-width: 0; flex-shrink: 1; overflow: hidden; }
.top-actions { flex-shrink: 0; }
@media (max-width: 380px) { .logo-img { height: 24px; } }

/* Startfehler (Server nicht erreichbar) */
.boot-error { max-width: 420px; margin: 18vh auto; padding: 0 16px; text-align: center; display: grid; gap: 12px; justify-items: center; }

/* Logo in der Kopfleiste mit Standortzeile; auf dem Handy nur der Schriftzug */
.logo-head .logo-img { height: 58px; }
.logo-head .logo-img.mark { display: none; }
@media (max-width: 720px) {
  .logo-head .logo-img.full { display: none; }
  .logo-head .logo-img.mark { display: block; height: 28px; }
}

/* Konfigurator: Preisaufstellung, Kontraststoff, Kragenstäbchen-Pop-up */
.cfg-sum-lines { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.cfg-sum-lines li { display: flex; justify-content: space-between; gap: 10px; }
.cfg-sum-lines li span { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.cfg-sum-lines li b { white-space: nowrap; font-weight: 600; }
.cfg-contrast-fabric { padding: 16px; background: var(--sky-2); }
.cfg-stay { display: flex; flex-direction: column; gap: 12px; }
.cfg-stay img { width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--r); background: var(--sky-2); }
.field input.cu-auto { background: var(--sky-2); color: var(--muted); cursor: default; }
