/* Verwaltung. Bewusst ohne Build-Schritt, damit der Deploy auf
   Shared Hosting einfach bleibt. Farben kommen aus dem Farbprofil
   (App\Branding\Theme) als CSS-Variablen; hier stehen nur Ersatzwerte. */

@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
    --primary: #0B3FA8; --on-primary: #fff; --primary-strong: #09348A; --primary-soft: #E9EEF7;
    --accent: #6BBE45; --on-accent: #1B2130; --accent-strong: #5EA73D; --accent-soft: #E7F5E1;
    --link: #0B3FA8; --side: #0B3FA8; --on-side: #fff; --side-muted: #B1C2E3; --side-hover: #2352B1;
    --bg: #F3F7FC; --surface: #fff; --text: #1B2130; --muted: #5F6878; --border: #D9DDE4;
    --radius: 14px; --radius-sm: 8px;
    --danger: #B42318; --danger-soft: #FDECEA; --success: #1E7A43; --success-soft: #E5F4EB; --warn: #7A4F00; --warn-soft: #FFF4DB;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
    --font: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-head: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--link); text-underline-offset: 2px; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Grundgerüst: Seitenleiste + Inhalt ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) 252px, var(--bg) 252px); }
.side { background: var(--side); color: var(--on-side); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: inherit; text-decoration: none; }
.side-mark { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; flex: none; }
.side-logo { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: var(--radius-sm); padding: 4px; flex: none; }
.side-logo-brand { padding: 0; background: none; }
.side-names { display: flex; flex-direction: column; min-width: 0; }
.side-name { font-family: var(--font-head); font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.side-sub { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--side-muted); }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-menu { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.side-toggle { display: none; background: none; border: 0; color: var(--on-side); padding: 8px; border-radius: var(--radius-sm); cursor: pointer; }
.side-toggle .icon { width: 28px; height: 28px; }
.side-toggle:hover { background: var(--side-hover); }
.side-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-toggle .icon-close, .side.is-open .side-toggle .icon-open { display: none; }
.side.is-open .side-toggle .icon-close { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a, .side-actions a, .side-actions button {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--side-muted); text-decoration: none; font: inherit; font-size: .95rem; background: none; border: 0; cursor: pointer; width: 100%; text-align: left;
    transition: background .15s, color .15s;
}
.side-nav a:hover, .side-actions a:hover, .side-actions button:hover { background: var(--side-hover); color: var(--on-side); }
.side-nav a.active, .side-actions a.active { background: var(--side-hover); color: var(--on-side); box-shadow: inset 3px 0 0 var(--accent); }
.side-nav a:focus-visible, .side-actions a:focus-visible, .side-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-top: 1px solid var(--side-hover); padding-top: 16px; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-name { font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.side-actions form { margin: 0; }
.side-provided { font-size: .75rem; color: var(--side-muted); padding: 4px 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }

.content { padding: 30px 34px 56px; max-width: 1240px; width: 100%; }

/* ---------- Typografie ---------- */
h1 { font-family: var(--font-head); font-weight: 500; font-size: 2rem; line-height: 1.15; margin: 0 0 18px; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 40px 0 12px; }
h3 { font-size: 1rem; line-height: 1.35; margin: 22px 0 8px; }
.lead { color: var(--muted); margin: -10px 0 22px; max-width: 72ch; }
.intro { color: var(--muted); margin: -4px 0 14px; max-width: 72ch; font-size: .95rem; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.error { color: var(--danger); font-size: .9rem; margin-top: 4px; }
.section-title { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 28px 0 12px; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }

/* ---------- Kopfzeile einer Seite ---------- */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1, .page-head h2 { margin: 0; }
h2 + .intro, .page-head + .intro { margin-top: -6px; }
.page-head.section-head { margin: 40px 0 12px; }
/* Titel mit Zustands-Schild; der Rückweg steht ruhig darüber. */
.page-title { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-width: 0; }
.page-title h1 { overflow-wrap: anywhere; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--muted); font-size: .9rem; text-decoration: none; border-radius: 4px; }
.back-link:hover { color: var(--text); text-decoration: underline; }
.back-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.back-link .icon { width: 16px; height: 16px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page-head .btn { margin-top: 0; }

/* ---------- Schaltflächen ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--primary); color: var(--on-primary); border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; margin-top: 16px;
    transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--primary-strong); box-shadow: 0 4px 14px rgba(16, 24, 40, .15); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn .icon { width: 18px; height: 18px; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--surface); color: var(--link); border-color: var(--border); }
.btn-secondary:hover { background: var(--primary-soft); }
.btn-danger { background: #B42318; color: #fff; }
.btn-danger:hover { filter: brightness(.9); }
.btn-small { padding: 6px 12px; font-size: .88rem; margin-top: 0; }
td .btn { margin-top: 0; }
.inline-form { display: inline; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url], input[type=date], input[type=file], textarea, select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font: inherit; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 18px; height: 18px; }
textarea { min-height: 110px; resize: vertical; }
.checkbox { display: flex; gap: 10px; align-items: center; font-weight: normal; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 22px; }
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 16px; align-items: end; }
.filter-bar label { margin-top: 0; }
.filter-bar .btn { margin-top: 12px; }
.facts { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 8px 20px; margin: 0; }
.facts dt { color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
/* Kompakte Kopfangaben einer Detailseite: zwei Paare je Zeile, sobald Platz ist. „full": Angabe über die ganze Breite. */
@media (min-width: 1080px) {
    .facts-2 { grid-template-columns: fit-content(190px) minmax(0, 1fr) fit-content(190px) minmax(0, 1fr); gap: 10px 22px; }
    .facts-2 dt.full { grid-column: 1; }
    .facts-2 dt.full + dd { grid-column: 2 / -1; }
}
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }

/* ---------- Hinweise ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid transparent; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--primary-soft); }
tbody tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; }

/* ---------- Kennzeichen ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--primary-soft); color: var(--text); white-space: nowrap; }
.badge-active { background: var(--success-soft); color: var(--success); }
.badge-active::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-base { background: var(--primary-soft); color: var(--link); }
/* Art eines Etiketts: QR-Code, NFC, NFC für Metall, selbst gedruckt */
.badge-kind .icon { width: 15px; height: 15px; }
.badge-kind-qr, .badge-kind-own { background: var(--primary-soft); color: var(--text); }
.badge-kind-nfc { background: #E0F2FE; color: #075985; }
.badge-kind-nfc_metal { background: #EDE9FE; color: #5B21B6; }
.org { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.org:hover { text-decoration: underline; }
.org-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; color: var(--muted); font-size: .88rem; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--text); display: grid; place-items: center; flex: none; }
.kpi-icon .icon { width: 18px; height: 18px; }
.kpi-value { font-size: 2rem; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.spark { width: 100%; height: 42px; display: block; margin-top: 4px; color: var(--primary); }
.spark .area { fill: var(--primary-soft); }
.spark .line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.delta { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--muted); white-space: nowrap; }
.delta-up { background: var(--success-soft); color: var(--success); }
.delta-down { background: var(--danger-soft); color: var(--danger); }

/* Zweispaltige Reihe */
.row-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.row-2 > .card { margin-bottom: 0; display: flex; flex-direction: column; }
.row-2 .bars { flex: 1; min-height: 190px; height: auto; }

/* Balkendiagramm */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 24px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; position: relative; min-width: 0; }
.bar-fill { width: 100%; max-width: 40px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent), var(--accent-strong)); min-height: 3px; transform-origin: bottom; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; transition: filter .15s; }
.bar:hover .bar-fill, .bar:focus-within .bar-fill { filter: brightness(1.08); }
.bar-label { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.bar-tip { position: absolute; top: -4px; left: 50%; transform: translate(-50%, -100%); background: var(--text); color: var(--surface); font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.bar:hover .bar-tip, .bar:focus .bar-tip { opacity: 1; }
.bar:focus { outline: none; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Sonstiges aus den Bauabschnitten ---------- */
.qr svg { width: 200px; height: 200px; }
.codes { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--primary-soft); padding: 12px; border-radius: var(--radius-sm); columns: 2; }

/* ---------- Anmeldeseiten ---------- */
body.guest { min-height: 100vh; background: var(--bg); }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 56px 16px; }
/* Marke: Zeichen und Schriftzug (Work Sans fett, enge Laufweite), darunter der Slogan mit grünem Strich (resources/brand). */
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-logo { display: flex; align-items: center; gap: 12px; }
.auth-logo img { width: 46px; height: 48px; flex: none; }
.auth-name { font-size: 2.15rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: #0B1B3A; }
.auth-sub { font-size: .7rem; font-weight: 600; letter-spacing: .09em; line-height: 1.3; text-transform: uppercase; color: var(--text); padding-left: 9px; border-left: 3px solid #6BBE45; }
.auth-card { padding: 28px; }
.auth-card h1 { font-size: 1.6rem; }
.auth-foot { text-align: center; font-size: .85rem; color: var(--muted); }

/* ---------- Erscheinungsbild einstellen ---------- */
.appearance { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.presets { display: flex; flex-wrap: wrap; gap: 10px; }
.preset { display: flex; padding: 4px; gap: 3px; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .15s, transform .1s; }
.preset:hover { transform: translateY(-1px); }
.preset[aria-pressed=true] { border-color: var(--text); }
.preset i { width: 16px; height: 26px; border-radius: 4px; display: block; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=color] { width: 48px; height: 44px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; flex: none; }
.color-row input[type=text] { width: 120px; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; }
.contrast { font-size: .82rem; margin-top: 6px; color: var(--success); }
.contrast.is-bad { color: var(--danger); font-weight: 600; }
input[type=range] { width: 100%; accent-color: var(--primary); }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 600; margin-top: 18px; cursor: pointer; }
.preview-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.preview { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(16, 24, 40, .14); display: grid; grid-template-columns: 170px 1fr; background: var(--bg); color: var(--text); font-size: .85rem; margin-bottom: 22px; }
.preview .p-side { background: var(--side); color: var(--on-side); padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; }
.preview .p-brand { display: flex; align-items: center; gap: 8px; padding: 0 6px 12px; font-family: var(--font-head); font-size: 1rem; }
.preview .p-brand .side-mark { width: 30px; height: 30px; font-size: .95rem; }
.preview .p-brand img { width: 32px; height: 32px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.preview .p-nav { padding: 7px 8px; border-radius: var(--radius-sm); color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview .p-nav.active { background: var(--side-hover); color: var(--on-side); box-shadow: inset 3px 0 0 var(--accent); }
.preview .p-main { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.preview .p-title { font-family: var(--font-head); font-size: 1.4rem; }
.preview .p-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.preview .p-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.preview .p-card b { display: block; font-size: 1.3rem; }
.preview .p-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.preview .btn { margin: 0; padding: 7px 12px; font-size: .82rem; }
.phone-preview { max-width: 300px; border: 8px solid #1B2130; border-radius: 30px; overflow: hidden; background: var(--bg); box-shadow: 0 16px 40px rgba(16, 24, 40, .18); font-size: .82rem; }
.phone-preview .ph-head { background: var(--primary); color: var(--on-primary); padding: 16px; }
.phone-preview .ph-org { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.phone-preview .ph-org .side-mark { width: 28px; height: 28px; font-size: .9rem; }
.phone-preview .ph-org img { height: 28px; max-width: 110px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.phone-preview .ph-title { font-family: var(--font-head); font-size: 1.15rem; margin-top: 8px; }
.phone-preview .ph-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.phone-preview .ph-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: .82rem; }
.phone-preview .ph-table th, .phone-preview .ph-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.phone-preview .ph-table th { color: var(--muted); font-weight: 600; }
.phone-preview .ph-foot { text-align: center; color: var(--muted); padding: 0 12px 12px; }
.save-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Bewegung reduzieren, wenn gewünscht ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 960px) {
    .shell { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
    .side { position: sticky; top: 0; z-index: 20; height: auto; max-height: 100vh; padding: 10px 12px; gap: 10px; flex-direction: column; }
    /* Menü mit drei Strichen: zugeklappt nur Logo und Knopf, aufgeklappt alle Punkte untereinander. */
    /* Ohne Skript bleibt das Menü offen – dann steht es einfach über dem Inhalt, statt den Bildschirm zu überdecken. */
    .side:not(.has-toggle) { position: static; max-height: none; }
    .side.has-toggle .side-toggle { display: block; }
    .side.has-toggle:not(.is-open) .side-menu { display: none; }
    .side-menu { gap: 12px; padding-bottom: 4px; }
    .side-foot { margin-top: 0; }
    .side-user { padding-top: 12px; }
}
@media (max-width: 960px) {
    .content { padding: 22px 16px 48px; }
    .row-2, .appearance { grid-template-columns: minmax(0, 1fr); }
    h1 { font-size: 1.6rem; }
}
@media (max-width: 640px) {
    .side-user-text .side-sub { display: none; }
    .preview { grid-template-columns: minmax(0, 1fr); }
    .preview .p-side { flex-direction: row; overflow: hidden; }
    .preview .p-brand { padding-bottom: 0; }
    .preview .p-nav { display: none; }
    .kpi-value { font-size: 1.7rem; }
}

.side-provided a { color: inherit; }
.version-badge { margin-left: 8px; text-decoration: none; vertical-align: middle; }
.version-badge:hover { text-decoration: underline; }

/* Dokument hochladen: Umschalter PDF / Fotos und Seitenvorschau */
.segmented { display: inline-flex; gap: 4px; padding: 4px; margin-top: 16px; border-radius: var(--radius-sm); background: var(--primary-soft); flex-wrap: wrap; }
.segmented label { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border-radius: calc(var(--radius-sm) - 2px); font-weight: 600; cursor: pointer; color: var(--muted); }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--primary); }
.segmented .icon { width: 18px; height: 18px; }
.photo-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-page { position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.photo-page img { display: block; width: 100%; height: 140px; object-fit: cover; }
.photo-page span { position: absolute; left: 6px; top: 6px; background: var(--text); color: var(--surface); font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.photo-page button { position: absolute; right: 6px; top: 6px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font: inherit; font-size: .72rem; padding: 2px 8px; cursor: pointer; }
.photo-status { grid-column: 1 / -1; font-size: .88rem; color: var(--muted); }

/* Bestätigung auf den Anmeldeseiten (z. B. „Mail ist unterwegs") */
.auth-done { text-align: center; }
.auth-done-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: inline-grid; place-items: center; margin-bottom: 8px; }
.auth-done-icon .icon { width: 28px; height: 28px; }
.auth-done p { margin: 0 0 10px; }
input[readonly] { background: var(--primary-soft); color: var(--muted); }

/* ---------- Anmeldeseiten: Anbieter und rechtliche Verweise ---------- */
.auth-provided { margin-top: 30px; text-align: center; }
.auth-provided span { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.auth-provided img { height: 96px; display: block; margin: 10px auto 0; }
.auth-legal { display: flex; gap: 16px; justify-content: center; margin-top: 10px; font-size: .82rem; }
.auth-legal a { color: var(--muted); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: .9rem; }
.auth-row .checkbox { margin: 0; }
.btn-block { width: 100%; }
.auth-hint { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
a.auth-brand { color: var(--text); text-decoration: none; }

/* Diagramm ohne Werte: freundlicher Hinweis statt flacher Balken */
.bars-empty { flex: 1; min-height: 190px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 20px; }
.bars-empty .icon { width: 32px; height: 32px; color: var(--accent-strong); }
.bars-empty p { margin: 0; max-width: 320px; }

/* Admins: einmal angezeigter Einrichtungs-Link, aufklappbare Aktionen */
.setup-link { border-color: var(--accent); background: var(--accent-soft); }
.setup-link input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.row-actions summary { list-style: none; cursor: pointer; }
.row-actions summary::-webkit-details-marker { display: none; }
.row-actions[open] { min-width: 260px; }
.row-actions form { margin-top: 10px; }

/* Änderungsprotokoll */
.audit-filter { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.audit-filter > div { min-width: 220px; }
.audit-filter label { margin-top: 0; }
.audit-filter .btn { margin-top: 0; }
.audit-table td { vertical-align: top; font-size: .92rem; }
.audit-change { font-size: .85rem; overflow-wrap: anywhere; }
.audit-change s { color: var(--muted); }
.pager-nav { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }

/* Bestand: Reiter je Kategorie und Auswahl der Kategorie */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem; }
.cat-tabs a:hover { border-color: var(--accent); }
.cat-tabs a.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.cat-tabs a .icon { width: 17px; height: 17px; }
.cat-tabs a span { font-size: .78rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--text); }
.cat-tabs a.active span { background: rgba(255, 255, 255, .2); color: inherit; }

/* NFC-Tag beschreiben (Packvorschrift → Etiketten) */
.nfc-panel { margin-top: 16px; border-left: 4px solid var(--primary); }
.nfc-status { font-weight: 600; min-height: 1.4em; }
.nfc-status[data-state^="done"] { color: var(--success, #1a7f37); }
.nfc-status[data-state^="error"] { color: var(--danger, #b42318); }

[data-app-install][hidden] { display: none; }

/* Vorgedruckte Aufkleber: Kurzübersicht (Artikel, Betrieb im Admin-Portal) */
.stock-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Unterlagen: Fassungen und Prüfsumme */
.sha { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.version-card { border-left: 4px solid var(--border); }
.version-card.is-released { border-left-color: var(--success); }
.version-card.is-rejected { border-left-color: var(--danger); }
.version-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-top: 12px; }
.version-actions details { flex-basis: 100%; }
.version-actions details > summary { cursor: pointer; color: var(--link); display: inline-block; }
/* Aufklappbare Aktion in einer Tabellenzeile (z. B. „Zugang entfernen“ mit Bestätigungswort). */
.row-details { margin-top: 6px; }
.row-details > summary { cursor: pointer; color: var(--link); }
.row-details form { max-width: 440px; white-space: normal; }

/* Packvorschrift: Stückliste mit Eingabefeldern in der Tabelle */
.lines-table .num, .lines-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines-table .input-qty { width: 76px; }
.lines-table .input-note { min-width: 110px; }
.lines-table .line-actions { white-space: nowrap; text-align: right; }
.lines-table .line-actions .btn .icon { width: 15px; height: 15px; }
.lines-table tfoot td { border-bottom: 0; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 4px 0; }

/* Suche: Feld im Seitenkopf (Betriebsbereich), Suchseite und Suchwort über Listen */
.top-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px 16px; flex-wrap: wrap; margin: -10px 0 18px; }
.top-search { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 320px; }
/* Sprachumschalter: Knöpfe (angemeldet) oder Verweise (Anmeldeseiten), ohne JavaScript. */
.lang-switch { display: flex; align-items: center; gap: 4px; margin: 0; }
.lang-switch-guest { justify-content: center; margin-bottom: 18px; }
.lang-switch a, .lang-switch button { font: inherit; font-size: .85rem; line-height: 1.2; padding: 6px 11px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--muted); text-decoration: none; cursor: pointer; }
.lang-switch a:hover, .lang-switch button:hover { color: var(--text); border-color: var(--border); }
.lang-switch a:focus-visible, .lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-switch [aria-current] { color: var(--text); font-weight: 600; border-color: var(--border); background: var(--surface, #fff); }
.top-search-field { position: relative; flex: 0 1 340px; }
.top-search-field .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.top-search-field input { padding-left: 36px; }
.search-main { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-main input { flex: 1 1 260px; }
.search-main .btn { margin-top: 0; }
.search-filters { margin-top: 14px; }
.search-filters > summary { cursor: pointer; color: var(--link); display: inline-block; }
.search-group { margin-bottom: 26px; scroll-margin-top: 16px; }
.search-group .card-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.search-snippet { color: var(--muted); font-size: .92rem; margin-top: 6px; overflow-wrap: anywhere; }
mark { background: var(--accent-soft); color: var(--text); border-radius: 3px; padding: 0 2px; }
.list-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.list-search input { flex: 0 1 300px; }

/* Vorlagen und Beispiele */
.template-list { display: grid; gap: 8px; margin-top: 12px; }
.template-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.template-item > span { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.template-item .btn { margin-top: 0; }
.template-link { margin: 0 0 4px; }
.import-result { border-left: 4px solid var(--success); }

/* Artikelnummer des Abnehmers direkt in der Liste der Zuordnungen (Artikel- und Abnehmerseite). */
.assignment-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.assignment-form input[type="text"] { margin: 0; width: auto; flex: 1 1 130px; min-width: 110px; padding: 6px 10px; }
.assignment-form .btn { margin-top: 0; }
.assignment-form .error { flex-basis: 100%; }

/* Abnehmerbereich: Suchfeld „Ihre Artikelnummer" und die drei nummerierten Blöcke der Artikelseite. */
.number-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.number-search > div { flex: 1 1 260px; }
.number-search input { margin: 0; font-size: 1.1rem; }
.number-search .btn { margin-top: 0; }
.block-number { display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--primary); color: var(--on-primary, #fff); font-size: .85em; margin-right: 8px; }
.own-number { font-size: 1.15rem; font-weight: 600; }

/* ==========================================================================
   Übersichtlichkeit (Version 0.13): ein Muster für alle Bereiche.
   1. Aufklappbare Abschnitte (.fold)   2. Weitere Aktionen (.menu)
   3. Tabellen als Karten auf dem Handy (table.cards, td[data-label])
   4. „Was ist zu tun" (.todo)          5. Menü in Gruppen
   ========================================================================== */

/* 1. Aufklappbarer Abschnitt: natives <details>, per Tastatur bedienbar. */
.folds { margin-top: 40px; }
.folds > .section-title { margin: 0 0 10px; }
.fold { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 10px; }
.fold > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 14px 18px; cursor: pointer; border-radius: var(--radius); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin: 0 4px 0 2px; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold > summary:hover { background: var(--primary-soft); }
.fold > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fold[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.fold-title { font-family: var(--font); font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.3; }
.fold-meta { color: var(--muted); font-size: .88rem; text-align: right; }
.fold-body { padding: 6px 18px 18px; }
.fold-body > :first-child { margin-top: 0; }
.fold-body > :last-child { margin-bottom: 0; }
.fold-danger > summary .fold-title { color: var(--danger); }
/* Keine Kästen in Kästen: Karten und Tabellen im aufgeklappten Abschnitt ohne eigenen Rahmen-Schatten. */
.fold-body > .card, .fold-body > form.card { border: 0; box-shadow: none; padding: 0; background: none; }
.fold-body .table-wrap { box-shadow: none; }
.fold-body h3 { margin-top: 18px; }
/* Kleiner Aufklapper im Fließtext („Mehr erfahren", „Filter"). */
.more { margin: 0 0 14px; }
.more > summary { cursor: pointer; color: var(--link); display: inline-block; font-size: .92rem; border-radius: 4px; }
.more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.more > p, .more > div { color: var(--muted); font-size: .92rem; max-width: 72ch; margin: 8px 0 0; }
.card > .more:last-child, .card > form > .more:last-child { margin-bottom: 0; }
.filter-more { margin: 0 0 16px; }
.filter-more > summary { font-weight: 600; }
.filter-more > .filter-bar { margin-top: 12px; }

/* 2. Weitere Aktionen hinter einem Knopf. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary .icon { width: 16px; height: 16px; transition: transform .15s; }
.menu[open] > summary .icon { transform: rotate(180deg); }
.menu-items { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 250px; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(16, 24, 40, .16); }
.menu-items form { margin: 0; }
.menu-items a, .menu-items button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: .95rem; text-align: left; text-decoration: none; cursor: pointer; }
.menu-items a:hover, .menu-items button:hover { background: var(--primary-soft); }
.menu-items a:focus-visible, .menu-items button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-items .icon { width: 18px; height: 18px; color: var(--muted); }
.menu-items .menu-note { padding: 6px 12px; color: var(--muted); font-size: .85rem; }

td.actions-cell { text-align: right; white-space: nowrap; }

/* 3. Tabellen: auf dem Handy wird jede Zeile zu einer Karte. Die Kopfzeile bleibt für
      Vorleseprogramme erhalten; die Beschriftung je Feld kommt aus data-label. */
@media (max-width: 640px) {
    .table-wrap:has(> table.cards) { overflow: visible; }
    table.cards, table.cards tbody, table.cards tfoot, table.cards tr, table.cards td { display: block; width: 100%; }
    table.cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    table.cards tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
    table.cards tbody tr:last-child, table.cards tfoot tr:last-child { border-bottom: 0; }
    table.cards tfoot tr { background: var(--primary-soft); }
    table.cards td { padding: 3px 0; border: 0; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
    table.cards td[data-label] { display: grid; grid-template-columns: minmax(92px, 36%) minmax(0, 1fr); gap: 10px; align-items: baseline; }
    table.cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; line-height: 1.5; }
    table.cards td[data-label] > * { grid-column: 2; justify-self: start; }
    table.cards td[data-label] > input, table.cards td[data-label] > select, table.cards td[data-label] > form { justify-self: stretch; }
    /* Das erste Feld ist die Überschrift der Karte. */
    table.cards tbody td:first-child { display: block; font-weight: 600; font-size: 1.02rem; padding-bottom: 5px; }
    table.cards tbody td:first-child::before { content: none; }
    table.cards .badge { white-space: normal; }
    table.cards td.actions-cell { padding-top: 8px; }
    table.cards td.actions-cell:empty, table.cards td:empty { display: none; }
    table.cards td input[type=text], table.cards td select { max-width: 100%; }
    .lines-table.cards .input-qty, .lines-table.cards .input-note { width: 100%; min-width: 0; }
    .menu { flex: 1 1 100%; }
    .menu-items { position: static; box-shadow: none; margin-top: 6px; }
    .page-head .actions { margin-left: 0; width: 100%; }
    .fold > summary { padding: 13px 14px; grid-template-columns: auto minmax(0, 1fr); }
    .fold-body { padding: 4px 14px 16px; }
    .fold-meta { grid-column: 2; text-align: left; }
    .card { padding: 16px; }
    .top-search { flex-basis: 100%; }
    .top-search-field { flex: 1 1 auto; }
    .top-bar { justify-content: flex-start; }
}

/* 4. Übersicht: „Was ist zu tun" – höchstens vier große, anklickbare Zähler. */
.todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 8px; }
.todo-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; min-width: 0; }
a.todo-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(16, 24, 40, .1); }
.todo-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.todo-count { font-size: 2.4rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.todo-label { font-weight: 600; }
.todo-hint { color: var(--muted); font-size: .85rem; }
.todo-tile.is-danger { border-left-color: var(--danger); }
.todo-tile.is-danger .todo-count { color: var(--danger); }
.todo-tile.is-warn { border-left-color: var(--accent); }
.todo-tile.is-done { border-left-color: var(--success); }
.todo-tile.is-done .todo-count { color: var(--muted); }
.todo-tile.is-done .todo-hint { color: var(--success); font-weight: 600; }
/* Kompakte Liste (letzte Lieferungen, To-do-Zeilen im Lieferantenbereich). */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rows > li:first-child { padding-top: 0; }
.rows > li:last-child { border-bottom: 0; padding-bottom: 0; }
.rows .row-main { flex: 1 1 260px; min-width: 0; }
.rows .row-main a { font-weight: 600; }
.rows .row-sub { display: block; color: var(--muted); font-size: .88rem; }
.rows .btn { margin-top: 0; }
/* Schnellzugriff: eine ruhige Reihe. */
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-row a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 500; }
.quick-row a:hover { border-color: var(--accent); }
.quick-row a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quick-row .icon { width: 17px; height: 17px; color: var(--muted); }

/* 5. Menü in Gruppen mit kleinen Überschriften; Zähler an „Eingereicht". */
.side-group { margin: 12px 12px 3px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); opacity: .8; font-weight: 600; }
.side-nav > .side-group:first-child { margin-top: 0; }
.side-nav a { padding-top: 7px; padding-bottom: 7px; }
.side-nav { gap: 2px; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; text-align: center; }

/* Detailseiten: Fassung eines Dokuments als Hauptkarte, eine Zahl an der Packvorschrift. */
.current-version .version-top { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.current-version .version-top h2 { margin: 0; }
.current-version .version-top .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.current-version .btn { margin-top: 0; }
.stat-line { color: var(--muted); font-size: .92rem; }
.stat-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.form-actions .btn { margin-top: 0; }
/* Formulare: „Weitere Angaben" als eingeklappte Karte; kurze Zwischenüberschriften. */
details.card.form-more-card { padding: 0; }
details.card.form-more-card > summary { display: block; padding: 16px 22px; font-weight: 600; font-size: 1rem; color: var(--text); border-radius: var(--radius); }
details.card.form-more-card > summary::before { content: ""; display: inline-block; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin: 0 14px 2px 2px; transition: transform .15s; }
details.card.form-more-card[open] > summary::before { transform: rotate(45deg); }
details.card.form-more-card > summary:hover { background: var(--primary-soft); }
details.card.form-more-card > div { color: inherit; font-size: inherit; max-width: none; margin: 0; padding: 0 22px 22px; }
details.card.form-more-card > div > label:first-child { margin-top: 0; }
.form-heading { font-size: 1.05rem; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--border); }
.card > h2 + .hint { margin-top: 2px; }
select { max-width: 100%; }

/* „Neu in …": ruhiger Hinweis nach einem Update oben auf der Startseite des eigenen Bereichs (kein Fenster, das sperrt). */
.whats-new { background: var(--primary-soft); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; max-width: 80ch; }
.whats-new h2 { margin: 0 0 8px; font-size: 1.05rem; }
.whats-new ul, .whats-new-list { margin: 0; padding-left: 20px; }
.whats-new li + li, .whats-new-list li + li { margin-top: 6px; }
.whats-new-version { margin: 10px 0 4px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.whats-new-actions { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin-top: 14px; }
.whats-new-actions form { margin: 0; }

/* Anforderung an den Lieferanten: geführte Antwort (Stufen, Teile, Unterlagen am Teil) und Prüfseite. Ohne Tabellen
   beim Eintragen – jedes Teil ist eine Karte, damit auf dem Handy nichts seitlich gewischt werden muss. */
.answer-level + .answer-level { margin-top: 18px; }
.answer-level > h3 { margin: 18px 0 8px; font-size: 1rem; }
.answer-part { border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 14px; background: var(--surface); }
.answer-part-head { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-bottom: 4px; }
.answer-part-head h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.answer-part .grid-2 label { margin-top: 10px; }
.answer-docs-title { margin: 16px 0 6px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.answer-doc { border-top: 1px solid var(--border); padding: 10px 0; }
.answer-doc-head { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.answer-doc-head .hint { margin-top: 0; }
.answer-doc-file { margin: 6px 0; overflow-wrap: anywhere; }
.answer-doc .more { margin: 6px 0 0; }
.answer-doc .more > div, .answer-add > div { color: inherit; font-size: inherit; max-width: none; }
.answer-doc-line { margin: 0 0 4px; overflow-wrap: anywhere; }
.answer-consent { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 14px 0 0; min-width: 0; }
.answer-consent .checkbox { margin-top: 6px; }
.answer-add { margin: 14px 0 0; }
.answer-add > summary { font-weight: 600; font-size: 1rem; }
.answer-or { margin: 16px 0 0; font-weight: 600; }
.answer-add-quantity { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.answer-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.answer-actions .btn { margin-top: 0; }
/* Übersicht des Betriebs: Zeile unter den Zählern (Anforderungen an Lieferanten). */
.todo-line { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius-sm); }
.todo-line.is-danger { border-left-color: var(--danger); }
.answer-doc-label { white-space: nowrap; }
