/* BZ Schranken Cloud – nach dem Design-Katalog (docs-template): Tokens, Instrument Sans, Maße 36/10/14 */

@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/InstrumentSans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/InstrumentSans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Tokens ===== */
:root {
    --bgPage: #F4F5F7;
    --bgCard: #FFFFFF;
    --ink: #171A20;
    --muted: #6A7180;
    --faint: #9AA0AB;
    --soft: #F4F5F7;
    --line: #D9DDE4;
    --hair: #E6E8EC;
    --danger: #C4453A;
    --dangerSoft: #FBEEED;
    --ok: #1F8A5B;
    --okSoft: #EAF5EF;
    --warn: #B07A1F;
    --warnSoft: #FDF6EC;
    --btnBg: #171A20;
    --btnInk: #FFFFFF;
    --accent: #3D63DD;
    --accentInk: var(--accent);
    --accentSoft: color-mix(in srgb, var(--accent) 9%, white);
    --grain: url('/img/grain-light.png');
    --grainOp: .035;
    --grainBlend: multiply;
    --splatPct: 18%;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bgPage: #0E1116;
    --bgCard: #161A21;
    --ink: #F2F4F8;
    --muted: #8B93A1;
    --faint: #5C6470;
    --soft: #1D222B;
    --line: #333B48;
    --hair: #262C36;
    --danger: #E06B60;
    --dangerSoft: rgba(196, 69, 58, .16);
    --ok: #4CAF82;
    --okSoft: rgba(31, 138, 91, .16);
    --warn: #D9A648;
    --warnSoft: rgba(176, 122, 31, .14);
    --btnBg: #F2F4F8;
    --btnInk: #171A20;
    --accentInk: color-mix(in oklab, var(--accent) 55%, white);
    --accentSoft: color-mix(in srgb, var(--accent) 16%, #161A21);
    --grain: url('/img/grain-dark.png');
    --grainOp: .04;
    --grainBlend: screen;
    --splatPct: 22%;
    color-scheme: dark;
}
:root[data-text="klein"] body { zoom: .93; }
:root[data-text="gross"] body { zoom: 1.08; }

/* ===== Grundlagen ===== */
* { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bgPage); -webkit-font-smoothing: antialiased; }
a { color: var(--accentInk); text-decoration: none; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex: none; }
code, .mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .92em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.push { margin-left: auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== App-Rahmen: Seitenleiste links ===== */
.shell { display: flex; height: 100vh; overflow: hidden; background: var(--bgPage); }
.sidebar { position: relative; flex: none; width: 250px; background: var(--bgCard); border-right: 1px solid var(--hair); display: flex; flex-direction: column; transition: width .2s ease; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 64px; border-bottom: 1px solid var(--hair); flex: none; color: inherit; }
.sb-brand:hover { color: inherit; }
.brand-mark { flex: none; display: block; width: 32px; height: 32px; border-radius: 8px; }
/* Die dunkle Hälfte des Logos verschwindet sonst im dunklen Hintergrund */
:root[data-theme="dark"] .brand-mark { box-shadow: 0 0 0 1px var(--line); }
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
.brand-suite { font-size: 10px; font-weight: 700; letter-spacing: .09em; color: var(--faint); text-transform: uppercase; white-space: nowrap; line-height: 1; }
.brand-name { font-size: 14.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.sb-nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.sb-section { font-size: 11px; font-weight: 600; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; padding: 14px 10px 5px; white-space: nowrap; overflow: hidden; }
.sb-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background .12s ease; }
.sb-item:hover { background: var(--soft); color: var(--muted); }
.sb-item.active { background: var(--accentSoft); color: var(--accentInk); font-weight: 600; }
.sb-icon { flex: none; width: 18px; height: 18px; display: grid; place-items: center; }
.sb-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sb-foot { flex: none; padding: 4px 10px; border-top: 1px solid var(--hair); }
.sb-foot form { margin: 0; }
.sb-toggle { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 6px 12px; border: none; border-radius: 8px; background: transparent; color: var(--faint); font: inherit; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .12s ease, color .12s ease; }
.sb-toggle:hover { background: var(--soft); color: var(--ink); }
.sb-toggle svg { transition: transform .2s ease; }
.shell.collapsed .sidebar { width: 64px; }
.shell.collapsed .brand-text, .shell.collapsed .sb-label, .shell.collapsed .sb-section { display: none; }
.shell.collapsed .sb-nav .sb-section-line { display: block; }
.sb-section-line { display: none; height: 1px; background: var(--hair); margin: 12px 10px; }
.shell.collapsed .sb-toggle svg { transform: rotate(180deg); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 24px; height: 64px; background: var(--bgCard); border-bottom: 1px solid var(--hair); }
.topbar-title { font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn.menu-btn { display: none; }
.profile-pill { display: flex; align-items: center; gap: 9px; padding: 3px 14px 3px 3px; border-radius: 999px; border: 1px solid var(--hair); background: var(--bgCard); cursor: pointer; flex: none; color: var(--ink); font: inherit; transition: background .12s ease, border-color .12s ease; }
.profile-pill:hover { background: var(--soft); border-color: var(--line); color: var(--ink); }
.profile-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accentSoft); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--accentInk); flex: none; }
.avatar.lg { width: 36px; height: 36px; font-size: 12.5px; }
.avatar.xl { width: 80px; height: 80px; font-size: 22px; border: 3px solid var(--bgCard); box-shadow: 0 4px 14px rgba(0, 0, 0, .10); }
.content { flex: 1; overflow: auto; padding: 16px; }
.page { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.page.narrow { max-width: 760px; }

/* Seitenkopf: Titel 23/600 und eine Untertitel-Zeile */
.page-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-title { font-size: 23px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
.page-sub { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head .row-actions { margin-left: auto; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); align-self: flex-start; }
.back-link:hover { color: var(--ink); }

/* ===== Buttons ===== */
.btn { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bgCard); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s ease, border-color .12s ease, opacity .12s ease, color .12s ease; }
.btn:hover { background: var(--soft); border-color: var(--faint); color: var(--ink); }
.btn-primary { background: var(--btnBg); color: var(--btnInk); border-color: transparent; }
.btn-primary:hover { background: var(--btnBg); color: var(--btnInk); border-color: transparent; opacity: .88; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 0 10px; }
.btn-ghost:hover { background: var(--soft); border-color: transparent; color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: transparent; opacity: .9; }
.btn-danger-outline { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger-outline:hover { background: var(--dangerSoft); color: var(--danger); border-color: var(--danger); }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--soft); color: var(--faint); border-color: var(--hair); cursor: not-allowed; opacity: 1; }
.btn.has-icon { padding-left: 12px; }
.icon-btn { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 10px; border: none; background: transparent; color: var(--muted); cursor: pointer; transition: background .12s ease, color .12s ease; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn[aria-pressed="true"] { background: var(--accentSoft); color: var(--accentInk); }
.icon-btn.bordered { border: 1px solid var(--line); background: var(--bgCard); }
.link-btn { background: none; border: none; padding: 0; font: inherit; font-size: 13px; font-weight: 500; color: var(--accentInk); cursor: pointer; }
.link-btn:hover { color: var(--ink); }

/* ===== Felder ===== */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > .link-btn { align-self: flex-start; }
.field > label, .field-label { font-size: 13px; font-weight: 600; display: flex; align-items: baseline; gap: 6px; }
.field .opt { font-weight: 400; color: var(--faint); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea {
    height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bgCard); color: var(--ink); font: inherit; font-size: 14px; width: 100%;
    transition: border-color .12s ease, box-shadow .12s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accentSoft); }
input:disabled, select:disabled, textarea:disabled { background: var(--soft); color: var(--faint); border-color: var(--hair); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { height: auto; min-height: 84px; padding: 9px 14px; line-height: 1.5; resize: vertical; }
select { appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239AA0AB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-validation-error { border-color: var(--danger) !important; }
.field-validation-error, .error-text { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--danger); }
.field-validation-valid { display: none; }
.validation-summary-errors { background: var(--dangerSoft); color: var(--danger); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.input-icon { position: relative; display: block; }
.input-icon > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon > input { padding-left: 40px; }
.input-icon > input.has-toggle { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; border: none; background: transparent; border-radius: 7px; color: var(--faint); cursor: pointer; }
.pw-toggle:hover { background: var(--soft); color: var(--ink); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; line-height: 1.4; }
.check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check .hint { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.code-slots { display: flex; gap: 8px; justify-content: center; }
.code-slots input { width: 40px; height: 46px; padding: 0; text-align: center; font-size: 18px; font-weight: 600; }
.segmented { display: flex; gap: 2px; background: var(--soft); border-radius: 8px; padding: 3px; }
.segmented button { flex: 1; display: flex; align-items: center; justify-content: center; padding: 9px 10px; border: none; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s ease; }
.segmented button[aria-pressed="true"] { background: var(--bgCard); color: var(--accentInk); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }

/* ===== Kacheln ===== */
.card { background: var(--bgCard); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.card.hoverable { transition: border-color .15s ease, box-shadow .15s ease; }
.card.hoverable:hover { border-color: var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 0; }
.card-head.spaced { padding-bottom: 10px; }
.card-titles { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.card-title { font-size: 15.5px; font-weight: 600; color: var(--ink); margin: 0; }
.card-sub { font-size: 12.5px; color: var(--faint); }
.card-head .row-actions, .card-head .icon-btn { margin-left: auto; }
.card-body { padding: 12px 14px 14px; }
.card-body.flush { padding: 0; }
.card-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--hair); font-size: 12.5px; color: var(--faint); margin-top: auto; }
.card-foot a { margin-left: auto; font-size: 13px; font-weight: 500; }
.layout-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.layout-1-1 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
/* Hauptkachel mit inneren Abschnitten */
.sections { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); padding: 14px 0 18px; }
.section { padding: 0 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.section + .section { border-left: 1px solid var(--hair); }
.section-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.metric { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.metric.ok { color: var(--ok); }
.metric.danger { color: var(--danger); }
.metric.warn { color: var(--warn); }
.section .meta { font-size: 12.5px; color: var(--faint); }
/* Listen mit Punkt */
.dot-list { display: flex; flex-direction: column; }
.dot-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--ink); min-width: 0; }
.dot-row .text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-row .meta { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); }
.dot.danger { background: var(--danger); }
.dot.warn { background: var(--warn); }
/* Flacher Abschnitt ohne Kachel */
.flat { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.flat-title { font-size: 15.5px; font-weight: 600; }
/* Fakten */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Formularseiten: linksbündig, schmal */
.form-page { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.card-foot.actions { justify-content: flex-end; }
.card-foot.actions .btn, .card-foot.actions form { margin: 0; }
/* Dauerhafte Zustände, die beim Laden feststehen (vorübergehende Meldungen sind Toasts) */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--warnSoft); color: var(--warn); font-size: 13.5px; line-height: 1.45; }
.notice.danger { background: var(--dangerSoft); color: var(--danger); }
.notice.info { background: var(--accentSoft); color: var(--accentInk); }
.notice svg { margin-top: 1px; }

/* ===== Status ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; color: var(--muted); background: var(--soft); line-height: 1.2; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { color: var(--ok); background: var(--okSoft); }
.pill.danger { color: var(--danger); background: var(--dangerSoft); }
.pill.warn { color: var(--warn); background: var(--warnSoft); }
.pill.accent { color: var(--accentInk); background: var(--accentSoft); }
.pill.plain::before { display: none; }
.tag { font-size: 10.5px; font-weight: 700; color: var(--accentInk); background: var(--accentSoft); border-radius: 999px; padding: 2px 8px; letter-spacing: .04em; }

/* ===== Listen ===== */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar form { display: contents; }
.toolbar .search { position: relative; flex: 1; min-width: 160px; max-width: 360px; }
.toolbar .search > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.toolbar .search input { padding-left: 38px; }
.list { background: var(--bgCard); border: 1px solid var(--hair); border-radius: 14px; overflow: auto; }
.list table { width: 100%; border-collapse: separate; border-spacing: 0; }
.list th { position: sticky; top: 0; z-index: 1; background: var(--bgCard); text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; border-bottom: 2px solid var(--line); border-right: 1px solid var(--hair); white-space: nowrap; }
.list td { padding: 8px 14px; font-size: 13.5px; border-top: 1px solid var(--hair); border-right: 1px solid var(--hair); vertical-align: middle; }
.list tbody tr:first-child td { border-top: none; }
.list th:last-child, .list td:last-child { border-right: none; }
.list tbody tr { transition: background .12s ease; }
.list tbody tr:hover { background: var(--soft); }
.list tr[data-href] { cursor: pointer; }
.list .cell-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.list .cell-meta { font-size: 12.5px; color: var(--faint); }
.list .cell-action { width: 1%; white-space: nowrap; text-align: right; }
.list .stacked > div + div { margin-top: 4px; }
.list-foot { display: flex; gap: 8px; justify-content: flex-end; }
.list.inset { border: none; border-radius: 0; border-top: 1px solid var(--hair); }
.copy-cell { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.toolbar select { width: auto; min-width: 180px; }

/* ===== Leer- und Fehlerzustände ===== */
.empty { padding: 40px 16px; display: grid; place-items: center; }
.empty-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 380px; }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; color: var(--faint); }
.empty-title { font-size: 16.5px; font-weight: 600; }
.empty-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.error-code { font-size: 50px; font-weight: 700; color: var(--line); letter-spacing: -.02em; line-height: 1; }

/* ===== Werte zum Kopieren ===== */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; margin: 0; }
.kv dt { font-size: 13px; color: var(--muted); }
.kv dd { margin: 0; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; background: var(--soft); border: 1px solid var(--hair); border-radius: 8px; padding: 7px 10px; overflow-wrap: anywhere; min-height: 34px; }
.kv .secret:not(.revealed) { filter: blur(5px); user-select: none; }
.kv .row-actions { justify-self: end; }
.kv-group { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 6px 0 2px; grid-column: 1 / -1; }
.qr { width: 184px; height: 184px; image-rendering: pixelated; border-radius: 10px; border: 1px solid var(--hair); background: #fff; padding: 6px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

/* ===== Toasts unten rechts ===== */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 95; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { --tone: var(--accent); position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-start; gap: 10px; background: var(--bgCard); border: 1px solid var(--hair); border-radius: 14px; padding: 16px 14px 16px 18px; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); width: 420px; max-width: calc(100vw - 40px); animation: toastIn .24s cubic-bezier(.2, .7, .2, 1) both; }
.toast.ok { --tone: var(--ok); }
.toast.danger { --tone: var(--danger); }
.toast.warn { --tone: var(--warn); }
.toast::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 60% 140% at 4% 40%, color-mix(in srgb, var(--tone) var(--splatPct), transparent) 0%, transparent 70%); }
.toast::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--grain); background-size: 256px 256px; opacity: var(--grainOp); mix-blend-mode: var(--grainBlend); -webkit-mask-image: radial-gradient(ellipse 70% 160% at 6% 40%, black 0%, rgba(0, 0, 0, .55) 30%, rgba(0, 0, 0, .18) 60%, transparent 100%); mask-image: radial-gradient(ellipse 70% 160% at 6% 40%, black 0%, rgba(0, 0, 0, .55) 30%, rgba(0, 0, 0, .18) 60%, transparent 100%); }
.toast.leaving { animation: toastOut .19s cubic-bezier(.4, 0, .8, .4) both; }
.toast-icon { flex: none; width: 18px; height: 18px; display: grid; place-items: center; color: var(--tone); margin-top: 1px; }
.toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.toast-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.toast-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.toast-close { flex: none; width: 32px; height: 32px; margin: -7px -4px 0 0; display: grid; place-items: center; border: none; background: transparent; color: var(--faint); border-radius: 8px; cursor: pointer; }
.toast-close:hover { color: var(--ink); }

/* ===== Dialoge ===== */
.backdrop { position: fixed; inset: 0; background: rgba(14, 17, 22, .45); z-index: 90; animation: fadeIn .15s ease both; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 92vw); background: var(--bgCard); border: 1px solid var(--hair); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); z-index: 91; padding: 18px; display: flex; flex-direction: column; gap: 12px; animation: modalIn .2s ease both; }
.modal-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--dangerSoft); color: var(--danger); display: grid; place-items: center; }
.modal-title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.modal-text { font-size: 14px; color: var(--muted); line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== Profil-Drawer ===== */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(14, 17, 22, .35); z-index: 80; animation: fadeIn .15s ease both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 90vw); background: var(--bgCard); border-left: 1px solid var(--hair); box-shadow: -12px 0 40px rgba(0, 0, 0, .18); z-index: 81; display: flex; flex-direction: column; animation: drawerIn .22s ease both; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 0 14px; height: 64px; border-bottom: 1px solid var(--hair); flex: none; }
.drawer-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.drawer-who .name { font-size: 14px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-who .mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.drawer-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; border: none; background: transparent; cursor: pointer; text-align: left; width: 100%; transition: background .12s ease; }
.drawer-item:hover { background: var(--soft); color: var(--ink); }
.drawer-item > svg:first-child { color: var(--muted); }
.drawer-item .grow { flex: 1; }
.drawer-item .value { font-size: 12px; color: var(--faint); }
.drawer-sep { border-top: 1px solid var(--hair); margin: 8px 4px; }
.look { display: flex; flex-direction: column; gap: 12px; padding: 4px 6px; animation: fadeIn .18s ease both; }
.look-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 6px 10px 6px 6px; border: none; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.look-back:hover { background: var(--soft); color: var(--ink); }
.look-title { font-size: 15px; font-weight: 600; }
.look-label { font-size: 12.5px; color: var(--muted); }
.drawer-extra { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.version-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; background: var(--soft); border: 1px solid var(--hair); border-radius: 14px; padding: 14px 16px; }
.version-card::after { content: ''; position: absolute; right: -40px; top: -50px; width: 150px; height: 150px; border-radius: 36px; background: var(--accentSoft); transform: rotate(12deg); }
.version-card > span { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.version-card .slug { font-size: 13.5px; font-weight: 600; }
.version-card .ver { font-size: 11.5px; color: var(--muted); }
.maker { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.maker img { width: 18px; height: 18px; object-fit: contain; }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px; }
.drawer-foot form { margin: 0; }
.drawer-foot .btn { width: 100%; height: auto; padding: 12px 16px; }

/* ===== Einstellungen (Konto) ===== */
.settings { display: flex; gap: 22px; align-items: flex-start; }
.settings-nav { flex: none; width: 210px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.settings-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .12s ease; }
.settings-nav a:hover { background: var(--soft); color: var(--muted); }
.settings-nav a.active { background: var(--accentSoft); color: var(--accentInk); font-weight: 600; }
.settings-main { flex: 1; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.profile-head .name { font-size: 18px; font-weight: 600; }

/* ===== Anmeldung ===== */
.login { display: flex; min-height: 100vh; background: var(--bgPage); }
.login-panel { position: relative; overflow: hidden; width: 44%; min-width: 380px; background: #14171D; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; }
.login-panel .photo { position: absolute; inset: 0; background: url('/img/login-panel.jpg') center / cover; filter: saturate(.4); }
.login-panel .tint { position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 45%, #1B2740); mix-blend-mode: multiply; opacity: .82; }
.login-panel .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 23, 29, .05) 0%, rgba(20, 23, 29, .5) 100%); }
.login-brand { position: relative; display: flex; flex-direction: column; gap: 3px; }
.login-brand .suite { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; color: rgba(255, 255, 255, .65); text-transform: uppercase; line-height: 1; }
.login-brand .name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.01em; line-height: 1.2; }
.login-maker { position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; }
.login-maker img { width: 28px; height: 28px; object-fit: contain; }
.login-main { flex: 1; display: flex; flex-direction: column; align-items: center; overflow-y: auto; }
.login-form { width: min(420px, 100%); padding: 40px 20px 16px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.login-steps { display: flex; flex-direction: column; gap: 14px; animation: stepIn .3s ease both; }
.login-title { text-align: center; font-size: 23px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 4px; }
.login-text { text-align: center; font-size: 13.5px; color: var(--muted); margin: -6px 0 4px; line-height: 1.5; }
.login-error { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--danger); background: var(--dangerSoft); border-radius: 10px; padding: 10px 12px; }
.login-mobile-brand { display: none; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 28px; }
.login-mobile-brand .suite { font-size: 10px; font-weight: 700; letter-spacing: .09em; color: var(--faint); text-transform: uppercase; line-height: 1; }
.login-mobile-brand .name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.login-foot { display: flex; justify-content: center; gap: 16px; font-size: 12px; color: var(--faint); padding: 0 0 24px; }

/* ===== Schmale Bildschirme ===== */
@media (max-width: 899px) {
    .login-panel { display: none; }
    .login-mobile-brand { display: flex; }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 85; transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility .22s; width: 270px !important; }
    .shell.nav-open .sidebar { transform: none; visibility: visible; box-shadow: 12px 0 40px rgba(0, 0, 0, .18); }
    .shell .brand-text, .shell .sb-label, .shell .sb-section { display: revert; }
    .sb-foot { display: none; }
    .icon-btn.menu-btn { display: grid; }
    .topbar { padding: 0 12px; }
    .profile-name { display: none; }
    .profile-pill { padding: 3px; }
    .layout-2-1, .layout-1-1, .form-grid { grid-template-columns: 1fr; }
    .sections { grid-template-columns: 1fr 1fr; row-gap: 16px; }
    .section:nth-child(odd) { border-left: none; }
    .settings { flex-direction: column; }
    .settings-nav { width: 100%; flex-direction: row; overflow-x: auto; position: static; }
    .kv { grid-template-columns: minmax(0, 1fr) auto; }
    .kv dt { grid-column: 1 / -1; margin-top: 4px; }
    .toolbar .search { max-width: none; }
}
.nav-backdrop { display: none; }
@media (max-width: 899px) {
    .shell.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(14, 17, 22, .35); z-index: 84; }
}
