/*
 * Gestaltungssystem „Präzisionswerkzeug“ (übernommen aus SecondBrain):
 * fast einfarbig, ein Signalakzent Orange, Inter Tight + JetBrains Mono, dicht und ruhig.
 * Tabellen statt Kacheln, kleine Mono-Beschriftungen in Großbuchstaben, keine Verläufe, keine Pillen.
 * Zusätzlich hier: handytauglich (Leiste unten mit „Scannen“).
 */

@font-face { font-family: "Inter Tight"; font-weight: 400; font-display: swap; src: url("../fonts/inter-tight-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 500; font-display: swap; src: url("../fonts/inter-tight-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-display: swap; src: url("../fonts/inter-tight-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
    --font-sans: "Inter Tight", "Segoe UI Variable", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, monospace;

    --bg: #fafaf9;
    --panel: #ffffff;
    --ink: #0b0b0c;
    --muted: #6b6b70;
    --faint: #a1a1a6;
    --line: #e8e8e6;
    --hover: #f1f1ef;
    --select: #efefed;
    --accent: #ff4f1a;
    --accent-soft: #fff6f2;
    --accent-line: #ffd3c4;

    --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.45;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tabular { font-variant-numeric: tabular-nums; }

/* ── Kopfleiste ───────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 16px;
    height: 48px; padding: 0 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); }
.brand-icon { width: 20px; height: 20px; border-radius: 5px; display: block; }
.brand-name { font-family: var(--font-mono); font-weight: 500; font-size: 13px; }
.tabs { display: flex; gap: 2px; }
.tab {
    padding: 4px 8px; border-radius: 4px; font-size: 13px;
    color: var(--muted); text-decoration: none;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); background: var(--select); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-search { width: 260px; }

/* ── Seitenrahmen ─────────────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding-bottom: 96px; }
.page-head { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.page-head .lead { margin-top: 4px; max-width: 720px; color: var(--muted); }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section { padding: 16px 24px; }
.section + .section { border-top: 1px solid var(--line); }

.label {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--faint);
}
.metrics { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 18px; }
.metric-value { font-family: var(--font-mono); font-size: 22px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-label { margin-top: 6px; font-size: 11px; color: var(--muted); }

.code-tag {
    font-family: var(--font-mono); font-weight: 500; font-size: 12px;
    padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel);
    white-space: nowrap;
}

/* ── Formulare & Knöpfe ───────────────────────────────────── */
.input, .select, .textarea {
    width: 100%; font: inherit; color: var(--ink);
    padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--panel);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); }
.textarea { resize: vertical; min-height: 80px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 16px; }
.span-12 { grid-column: span 12; } .span-10 { grid-column: span 10; } .span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: inherit; font-size: 13px; font-weight: 500; line-height: 1;
    padding: 8px 12px; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--panel); color: var(--ink);
    text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--faint); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2a2d; border-color: #2a2a2d; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--hover); border-color: transparent; }
.btn-danger { color: var(--accent); }
.btn-danger:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.btn-sm { padding: 5px 8px; font-size: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.segmented { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.segmented a { padding: 4px 10px; border-radius: 4px; font-size: 12px; color: var(--muted); text-decoration: none; }
.segmented a:hover { color: var(--ink); }
.segmented a.active { background: var(--ink); color: #fff; }

.flash {
    margin: 12px 24px 0; padding: 9px 12px;
    border: 1px solid var(--line); border-left: 3px solid var(--ink);
    border-radius: var(--radius); background: var(--panel);
}
.flash.warn { border-color: var(--accent-line); border-left-color: var(--accent); background: var(--accent-soft); }

kbd { font-family: var(--font-mono); font-size: 10px; color: var(--muted); padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; }

/* ── Kartonliste (Tabelle, am Handy gestapelt) ────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.filters .input { flex: 1 1 240px; }
.filters .select { flex: 0 1 200px; width: auto; }

.table-head, .row {
    display: grid;
    grid-template-columns: 44px 84px minmax(0, 1fr) 150px 92px;
    gap: 14px; align-items: center;
    padding: 8px 24px;
}
.table-head { padding-top: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.row { text-decoration: none; border-bottom: 1px solid var(--line); }
.row:hover { background: var(--hover); }
.row-thumb { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--select); }
.row-thumb.empty { display: flex; align-items: center; justify-content: center; }
.row-thumb.empty::after { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--faint); border-radius: 2px; }
.row-title { font-weight: 500; }
.row-snippet { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-loc { font-family: var(--font-mono); font-size: 12px; }
.row-date { font-family: var(--font-mono); font-size: 11px; color: var(--faint); text-align: right; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--muted); }

/* ── Kartondetails ────────────────────────────────────────── */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.detail-main { border-right: 1px solid var(--line); min-width: 0; }
.inspector { padding: 16px 20px; display: flex; flex-direction: column; gap: 18px; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.location-big { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.contents-list { margin: 0; padding: 0; list-style: none; }
.contents-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.contents-list li:last-child { border-bottom: none; }
.notes { white-space: pre-line; }
.qr-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 12px; text-align: center; }
.qr-box img { width: 140px; height: 140px; margin: 0 auto; image-rendering: pixelated; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.photo-grid figure { margin: 0; position: relative; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; cursor: zoom-in; background: var(--select); }
.photo-grid form { position: absolute; top: 6px; right: 6px; }
.photo-del { width: 26px; height: 26px; padding: 0; border-radius: 4px; border: 1px solid var(--line); background: rgba(255,255,255,.92); cursor: pointer; font-size: 14px; line-height: 1; }
.photo-del:hover { color: var(--accent); border-color: var(--accent-line); }
.upload { display: flex; gap: 8px; flex-wrap: wrap; }
.upload input[type=file] { flex: 1 1 220px; font: inherit; font-size: 13px; }

dialog.lightbox { padding: 0; border: none; background: transparent; max-width: 96vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(11, 11, 12, .82); }
dialog.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 4px; cursor: zoom-out; }

/* ── Regale ───────────────────────────────────────────────── */
.shelf { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.shelf-title { font-family: var(--font-mono); font-size: 15px; font-weight: 500; }
.compartments { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.comp {
    min-height: 64px; padding: 6px 8px;
    border: 1px solid var(--line); border-radius: 4px; background: var(--panel);
    display: flex; flex-direction: column; gap: 3px;
}
.comp.empty { background: transparent; border-style: dashed; }
.comp-no { font-family: var(--font-mono); font-size: 10px; color: var(--faint); display: flex; justify-content: space-between; }
.comp-no a { color: var(--faint); text-decoration: none; }
.comp-no a:hover { color: var(--ink); }
.comp-box { font-size: 12px; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp-box:hover { text-decoration: underline; }
.comp-box .mono { font-size: 11px; color: var(--muted); }
.comp.highlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ── Scannen ──────────────────────────────────────────────── */
.scan-wrap { max-width: 520px; margin: 0 auto; padding: 16px; }
.scan-view {
    position: relative; aspect-ratio: 1; width: 100%;
    background: var(--ink); border-radius: var(--radius); overflow: hidden;
}
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
    position: absolute; inset: 18%;
    border: 2px solid var(--accent); border-radius: 8px;
    box-shadow: 0 0 0 999px rgba(11, 11, 12, .35);
}
.scan-status { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #fff; font-family: var(--font-mono); font-size: 11px; }
.scan-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; padding: 24px; text-align: center; }
.manual { display: flex; gap: 8px; margin-top: 14px; }
.manual .input { font-family: var(--font-mono); font-size: 16px; }

/* ── Leiste unten (nur Handy) ─────────────────────────────── */
.bottombar { display: none; }

@media (max-width: 760px) {
    body { font-size: 15px; }
    .topbar { gap: 10px; padding: 0 12px; }
    .topbar .tabs, .topbar-search, .hide-mobile { display: none !important; }
    .page-head, .section, .shelf { padding-left: 16px; padding-right: 16px; }
    .filters { padding: 10px 16px; }
    .flash { margin: 10px 16px 0; }

    .table-head { display: none; }
    .row {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-areas: "thumb main";
        padding: 10px 16px; gap: 12px;
    }
    .row-thumb { width: 52px; height: 52px; grid-area: thumb; }
    .row > .row-code, .row > .row-loc, .row > .row-date { display: none; }
    .row-main { grid-area: main; }
    .row-meta-mobile { display: flex !important; gap: 8px; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

    .detail { grid-template-columns: 1fr; }
    .detail-main { border-right: none; border-bottom: 1px solid var(--line); }
    .inspector { flex-direction: row; flex-wrap: wrap; }
    .inspector > * { flex: 1 1 200px; }
    .form-grid > * { grid-column: span 12 !important; }
    .form-grid > .keep-half { grid-column: span 6 !important; }

    .bottombar {
        display: grid; grid-template-columns: 1fr 1fr auto 1fr; align-items: center; gap: 4px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
        background: var(--bg); border-top: 1px solid var(--line);
    }
    .bottombar a { text-decoration: none; text-align: center; font-size: 12px; color: var(--muted); padding: 6px; }
    .bottombar a.active { color: var(--ink); font-weight: 500; }
    .bottombar .scan-btn {
        display: flex; align-items: center; gap: 8px;
        background: var(--ink); color: #fff; border-radius: 999px;
        padding: 11px 20px; font-size: 14px; font-weight: 500;
    }
    .bottombar .scan-btn::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
}
.row-meta-mobile { display: none; }

/* ── Platz-Dokumentation ───────────────────────────────────── */
.comp-loose {
    display: flex; align-items: center; gap: 6px; margin-top: 2px;
    font-size: 11px; color: var(--muted); text-decoration: none; min-width: 0;
}
.comp-loose img { width: 22px; height: 22px; border-radius: 3px; object-fit: cover; flex: none; }
.comp-loose span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: italic; }
.comp-loose:hover span { color: var(--ink); }
.comp-fill { flex: 1; min-height: 20px; }
.comp-fill:hover { background: var(--hover); border-radius: 3px; }
.row.row-compact { grid-template-columns: 44px 84px minmax(0, 1fr); }
.subhead { padding: 14px 24px 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
    .row.row-compact { grid-template-columns: 52px minmax(0, 1fr); }
    .subhead { padding: 12px 16px 8px; }
}

/* ── Lager: gemeinsame Editor-Bausteine ───────────────────── */
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 24px; border-bottom: 1px solid var(--line); }
.save-status { font-size: 11px; color: var(--faint); }
.save-status.error { color: var(--accent); }
.edit-only { display: none !important; }
body.editing .edit-only { display: inline-flex !important; }
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 420px; }
.plan-inspector { border-left: 1px solid var(--line); }
.inspector-stack { display: flex; flex-direction: column; gap: 14px; }
.insp-block { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.btn-col { display: flex; flex-direction: column; gap: 6px; }
.btn-col .btn { justify-content: flex-start; }
.insp-save { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0; background: var(--bg); }
.btn:disabled { opacity: .45; cursor: default; }
.shelf-links { display: flex; flex-direction: column; margin-top: 12px; border-top: 1px solid var(--line); }
.shelf-links a { padding: 6px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 13px; }
.shelf-links a:hover { color: var(--accent); }
dialog.modal { border: 1px solid var(--line); border-radius: 10px; padding: 20px; width: min(420px, 92vw); background: var(--panel); color: var(--ink); }
dialog.modal::backdrop { background: rgba(11, 11, 12, .25); }

/* ── Raumplan (Draufsicht, SVG in cm) ─────────────────────── */
.plan-canvas { padding: 16px 24px; overflow: auto; }
#plan { width: 100%; height: auto; max-height: 72vh; display: block; user-select: none; }
body.editing #plan { touch-action: none; }
.plan-room { fill: var(--panel); stroke: var(--ink); stroke-width: 3; }
.plan-grid .g-fine { stroke: var(--line); stroke-width: .5; }
.plan-grid .g-major { stroke: #d6d6d3; stroke-width: 1; }
.plan-dim { font-family: var(--font-mono); font-size: 11px; fill: var(--faint); }
.plan-empty { font-family: var(--font-sans); font-size: 14px; fill: var(--muted); }
.plan-shelf { cursor: pointer; outline: none; }
body.editing .plan-shelf { cursor: move; }
.plan-shelf .ps-body { fill: var(--select); stroke: var(--ink); stroke-width: 1.5; }
.plan-shelf .ps-fill { fill: #dcdcd8; pointer-events: none; }
.plan-shelf .ps-front { stroke: var(--ink); stroke-width: 5; stroke-linecap: square; pointer-events: none; }
.plan-shelf .ps-label { font-family: var(--font-mono); font-weight: 500; fill: var(--ink); pointer-events: none; }
.plan-shelf:hover .ps-body { fill: var(--hover); }
.plan-shelf.selected .ps-body { stroke: var(--accent); stroke-width: 2.5; }
.plan-shelf.selected .ps-front { stroke: var(--accent); }
.plan-shelf.conflict .ps-body { stroke: var(--accent); stroke-dasharray: 6 4; fill: var(--accent-soft); }
.plan-shelf .ps-handle { fill: var(--panel); stroke: var(--accent); stroke-width: 2; cursor: nwse-resize; }

/* ── Regal (Vorderansicht) ────────────────────────────────── */
.rack-wrap { padding: 20px 24px 28px; overflow-x: auto; }
.rack { display: flex; flex-direction: column; min-width: 420px; border: 3px solid var(--ink); border-bottom: none; background: var(--panel); }
.rack-floor { min-width: 420px; height: 10px; background: var(--ink); border-radius: 0 0 2px 2px; }
.lvl { display: flex; border-bottom: 3px solid var(--ink); min-height: 56px; }
.lvl-label {
    flex: none; width: 44px; display: flex; align-items: center; justify-content: center;
    border: none; border-right: 1px solid var(--line); background: var(--bg); color: var(--muted);
    font: inherit; font-size: 11px; cursor: default;
}
.rack.editing .lvl-label { cursor: pointer; }
.rack.editing .lvl-label:hover { color: var(--ink); background: var(--hover); }
.lvl.selected .lvl-label { background: var(--accent); color: #fff; }
.lvl.selected .lvl-slots { box-shadow: inset 0 0 0 2px var(--accent); }
.lvl-slots { flex: 1; display: flex; min-width: 0; }
.slot {
    position: relative; min-width: 0; overflow: hidden;
    padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 4px;
    border-right: 1px dashed var(--faint); cursor: pointer;
}
.slot:last-child { border-right: none; }
.slot:hover { background: var(--hover); }
.slot.empty .slot-no { color: var(--faint); }
.slot.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.slot.highlight { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.slot.new { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--hover) 6px 7px); }
.slot-no { font-size: 10px; color: var(--muted); }
.slot-used { font-size: 11px; color: var(--muted); }
.chip {
    display: block; font-size: 12px; text-decoration: none; padding: 2px 6px;
    border: 1px solid var(--line); border-radius: 4px; background: var(--panel);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip .mono { font-size: 11px; color: var(--muted); }
.chip:hover { border-color: var(--ink); }
.slot-loose { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-style: italic; min-width: 0; }
.slot-loose img { width: 24px; height: 24px; border-radius: 3px; object-fit: cover; flex: none; }
.slot-loose span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { flex: none; width: 10px; margin: 0 -5px; z-index: 2; cursor: col-resize; position: relative; touch-action: none; }
.divider::after { content: ""; position: absolute; top: 18%; bottom: 18%; left: 3px; width: 4px; border-radius: 2px; background: var(--accent); opacity: 0; }
.divider:hover::after, .divider:active::after { opacity: 1; }

@media (max-width: 760px) {
    .toolbar-row { padding: 10px 16px; }
    .plan-layout { grid-template-columns: 1fr; }
    .plan-inspector { border-left: none; border-top: 1px solid var(--line); }
    .plan-canvas, .rack-wrap { padding: 12px 16px; }
    .rack, .rack-floor { min-width: 520px; }
}

/* ── App-Rahmen: Bereiche, Benutzer ───────────────────────── */
.user-chip { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 13px; }
.user-chip:hover, .user-chip.active { background: var(--select); color: var(--ink); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; }
.subnav { display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); overflow-x: auto; }
.subnav-title { margin-right: 10px; }
.subnav a { padding: 4px 8px; border-radius: 4px; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--ink); background: var(--select); }

/* Übersicht */
.areas { border-top: 1px solid var(--line); }
.area { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); text-decoration: none; }
a.area:hover { background: var(--hover); }
.area-icon { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 13px; }
.area-icon.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.area-title { font-weight: 600; }
.area-stats { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.area-stats b { color: var(--ink); font-weight: 500; }
.area.soon { color: var(--faint); }

/* Anmeldung */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px 24px; }
.auth-brand { margin-bottom: 22px; }
.auth-title { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.auth-form .btn-primary { justify-content: center; padding: 10px; }
.auth-form .input { font-size: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

/* Mitglieder */
.users-head, .users-row { display: grid; grid-template-columns: 1.2fr 1.6fr 0.9fr 1fr 2.4fr; gap: 12px; align-items: center; }
.users-row { padding: 10px 24px; grid-template-areas: none; }
.users-row form { display: inline; }
.link-box { background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); }
.private-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 3px; padding: 0 4px; }

@media (max-width: 760px) {
    .user-name, .subnav-title { display: none; }
    .subnav { padding: 0 12px; }
    .area { padding: 14px 16px; grid-template-columns: 40px minmax(0, 1fr); }
    .area-stats { grid-column: 2; flex-wrap: wrap; gap: 4px 14px; }
    .users-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 16px; }
    .users-row .btn-row { justify-content: flex-start !important; }
}

/* Konto: App & Benachrichtigungen */
.notify-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.notify-row:last-of-type { border-bottom: none; }
.notify-row .field-hint { flex-basis: 100%; }
.topic-row { padding: 6px 0; color: var(--ink); align-items: flex-start; }
.topic-row b { font-weight: 500; }
