/* Storanger – Weboberfläche. Keine Inline-Styles (CSP).
   Hell/Dunkel: Systemeinstellung, im Namensmenü überstimmbar (data-theme am <html>, gemerkt in der Sitzung). */
:root {
    --bg: #e7ebf1; --surface: #ffffff; --surface-2: #edf1f5; --border: #d3dae3;
    --text: #1c2430; --muted: #5f6b7a; --brand: #0f5c73; --brand-strong: #0b4758; --brand-contrast: #ffffff;
    --ok: #1f7a4d; --ok-bg: #e5f4ec; --warn: #8a5a00; --warn-bg: #fdf3dc; --error: #b42318; --error-bg: #fdecea;
    --warn-contrast: #ffffff;
    --archive: #5b3fa8; --archive-bg: #efeafb;
    --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    color-scheme: light dark;
}
/* Dunkel: nach Systemeinstellung – außer der Benutzer hat „Hell“ gewählt (Namensmenü, data-theme) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #11161c; --surface: #19202a; --surface-2: #212a35; --border: #2d3846;
        --text: #e6ebf1; --muted: #9aa7b6; --brand: #4fb3cf; --brand-strong: #7cc9de; --brand-contrast: #06232c;
        --ok: #6fd39f; --ok-bg: #16352a; --warn: #f2c46b; --warn-bg: #3a2f14; --error: #ff8a80; --error-bg: #3d1d1b;
        --warn-contrast: #11161c;
        --archive: #c1adf5; --archive-bg: #2c2445; --shadow: none;
    }
}
/* … und immer, wenn er „Dunkel“ gewählt hat */
:root[data-theme="dark"] {
    --bg: #11161c; --surface: #19202a; --surface-2: #212a35; --border: #2d3846;
    --text: #e6ebf1; --muted: #9aa7b6; --brand: #4fb3cf; --brand-strong: #7cc9de; --brand-contrast: #06232c;
    --ok: #6fd39f; --ok-bg: #16352a; --warn: #f2c46b; --warn-bg: #3a2f14; --error: #ff8a80; --error-bg: #3d1d1b;
        --warn-contrast: #11161c;
    --archive: #c1adf5; --archive-bg: #2c2445; --shadow: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .2rem 0 .4rem; display: flex; align-items: center; gap: .5rem; color: var(--brand); }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .88em; overflow-wrap: anywhere; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.icon-folder { color: #c98a14; fill: rgba(201, 138, 20, .18); }
.icon-file { color: var(--muted); }

/* Kopfzeile */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap;
    padding: .6rem max(var(--rand, 1rem), env(safe-area-inset-left)); background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 650; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 2rem; height: 2rem; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { color: var(--muted); font-weight: 450; font-size: .8rem; }
.brand-large .brand-mark { width: 2.6rem; height: 2.6rem; }
/* Suche und Zeitpunkt: gleiche Bauform – Icon, Feld, Knopf in einer umrandeten Einheit.
   Vorher stand der Zeitpunkt als lose Reihe daneben, mit eigenem Rahmen ums Feld und anderen Abständen. */
.leiste { display: flex; align-items: center; gap: .4rem; padding: 0 .3rem 0 .7rem; color: var(--muted);
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.leiste input { min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit;
    padding: .45rem 0; outline: none; }
.leiste:focus-within { border-color: var(--brand); }
.leiste .btn { flex: none; border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; }
.leiste .btn:hover { background: var(--surface); color: var(--text); }
.search { flex: 1 1 12rem; max-width: 36rem; }
.search input { flex: 1; }
/* Die KI-Suche ist ein Link, keine Eingabe – gleiche Hülle, aber klickbar und ohne Feld */
/* Dieselbe Schrift wie „Suchen“ und „Setzen“ daneben – sonst fällt der Link aus der Reihe */
a.leiste { flex: none; padding: .35rem .9rem; gap: .45rem; color: var(--muted); font-size: .85rem; font-weight: 550; }
a.leiste:hover { border-color: var(--brand); color: var(--text); text-decoration: none; }
a.leiste .icon { color: var(--brand); }
.account { display: flex; align-items: center; gap: .6rem; margin-left: auto; min-width: 0; }
.account > details, .account > details > summary { min-width: 0; }
.account form { margin: 0; }
.account-name { display: inline-block; font-size: .9rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* **Volle Breite** (Wunsch des Betreibers, 10.11.2026): Listen und Tabellen nutzen den ganzen Bildschirm, links und rechts
   100 px Luft auf großen Bildschirmen, schmaler werdend bis 16 px auf dem Handy. Fließtext bleibt lesbar schmal (.lesbar). */
:root { --rand: clamp(16px, 5vw, 100px); }
.container { max-width: none; margin: 0; padding: 1.2rem var(--rand) 3rem; }
.container > p, .container .beschreibung, .container .notice, .mail-kopf, .mail-text, .lesbar { max-width: 75rem; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1rem; }

/* Buttons */
/* `hidden` muss stärker sein als eigene display-Regeln (sonst bleibt z. B. ein ausgeblendeter Knopf stehen) */
[hidden] { display: none !important; }
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-small { padding: .2rem .55rem; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; padding: .7rem; }
.ms-logo { width: 1.1rem; height: 1.1rem; }

/* Hinweise, Status, Badges */
.notice { display: flex; gap: .5rem; align-items: flex-start; padding: .7rem .9rem; margin: .8rem 0; border-radius: var(--radius);
    background: var(--surface-2); border: 1px solid var(--border); }
.notice-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.notice-error { background: var(--error-bg); color: var(--error); border-color: transparent; }
.notice-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; vertical-align: .1em; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-archive { background: var(--archive-bg); color: var(--archive); }
.status { margin: .8rem 0; padding: .6rem .8rem; border-radius: 8px; }
.status p { margin: 0; display: flex; align-items: center; gap: .4rem; font-weight: 600; }
.status ul { margin: .4rem 0 0 1.6rem; padding: 0; font-size: .9rem; }
.status-ok { background: var(--ok-bg); color: var(--ok); display: flex; align-items: center; gap: .4rem; font-weight: 600; }
.status-warn { background: var(--warn-bg); color: var(--warn); }

/* Übersicht */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; margin-top: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.card-head { display: flex; gap: .7rem; align-items: flex-start; }
.card-head .icon { width: 1.6rem; height: 1.6rem; color: var(--brand); margin-top: .15rem; }
.card h2 { margin: 0; }
.card p { margin: .1rem 0 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .8rem 0 0; }
.stats dt { color: var(--muted); font-size: .75rem; }
.stats dd { margin: 0; font-weight: 650; }
.stats dd.stat-date { font-weight: 500; font-size: .88rem; }
.empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; margin-top: 1rem; }

/* Listen */
.crumbs { display: flex; flex-wrap: wrap; gap: .3rem; font-size: .9rem; margin-bottom: .4rem; }
.crumbs .sep { color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-top: .8rem; box-shadow: var(--shadow); }
.listing { width: 100%; border-collapse: collapse; }
.listing th, .listing td { padding: .5rem .8rem; text-align: left; border-bottom: 1px solid var(--border); }
.listing th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em;
    color: var(--brand-contrast); background: var(--brand); border-bottom-color: var(--brand); }
.listing tr:last-child td { border-bottom: 0; }
.listing tbody tr:hover { background: var(--surface-2); }
.listing .num { text-align: right; white-space: nowrap; }
.listing tbody td { height: 3.1rem; vertical-align: middle; }   /* gleiche Höhe, Inhalt mittig statt an der Grundlinie */
/* Kennung in der Liste: eine Zeile, nie umbrechen. Achtung: .kennung (Detailseite) ist display:flex –
   auf einer Tabellenzelle würde das die Zeile sprengen (eigene Höhe, eigene Trennlinie). */
/* Ordner, in dem nichts Vorhandenes mehr liegt: wie eine gelöschte Datei gekennzeichnet */
.listing .name.is-geloescht .icon-folder { color: var(--muted); fill: rgba(140, 140, 140, .15); }
.listing td.kennung-zelle { white-space: nowrap; color: var(--muted); letter-spacing: .04em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
.listing .row-actions { flex-wrap: nowrap; }   /* Detail und Laden bleiben nebeneinander */
/* **Ausnahme Kontenliste:** Dort stehen bis zu vier Knöpfe mit sprechenden Beschriftungen in einer Zelle.
   Ohne Umbruch wird die Tabelle breiter als das Fenster, und die letzte Spalte – mit „Adminrechte
   entziehen" – ist nur noch durch waagerechtes Scrollen erreichbar (gemeldet am 12.10.2026). */
.listing.konten .row-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 22rem; }
.listing td:nth-child(3), .listing td:nth-child(4) { white-space: nowrap; }
.name { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 500; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }

/* Dateidetails */
.title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .8rem; }
.title-row .kennung { margin-left: auto; }                 /* Kennung immer ganz rechts */
.title-aktionen { display: flex; gap: .5rem; margin: .2rem 0 1.2rem; }   /* Schaltflächen darunter, links */
.title-row h1 { overflow-wrap: anywhere; }
.actions { display: flex; gap: .5rem; }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: .8rem 1.5rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1rem 0; }
.meta div:nth-child(2) { grid-column: 1 / -1; }
.meta dt { color: var(--muted); font-size: .78rem; }
.meta dd { margin: .1rem 0 0; }

/* Anmeldung */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-box { width: 100%; max-width: 26rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); }
.login-box h1 { margin-top: 1.2rem; }
/* Vorführ-Zugang: alles mittig, PIN-Feld groß und mit Abstand zu Text und Knopf */
.login-center { text-align: center; }
.login-center .brand, .login-center h1 { justify-content: center; }
.pin-form { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: 1.5rem 0 1.2rem; }
.pin-form label { font-weight: 500; }
.pin-form input { width: 11rem; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
    color: var(--text); font: inherit; font-size: 1.5rem; letter-spacing: .4em; text-indent: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.pin-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.pin-form .btn-block { max-width: 16rem; }

@media (max-width: 640px) {
    .account-name { display: none; }
    .account { order: 2; }
    .search { order: 3; flex-basis: 100%; max-width: none; }
    .stats { grid-template-columns: 1fr 1fr; }
    .listing th:nth-child(3), .listing td:nth-child(3) { display: none; }
}

/* Verwaltung */
.subnav { display: flex; flex-wrap: wrap; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .6rem; margin-bottom: 1.2rem; font-size: .92rem; }
.subnav a { color: var(--muted); }
.subnav a.is-active { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
.subnav a:last-child { margin-left: auto; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 1.2rem 0; box-shadow: var(--shadow); }
.card h2 { margin-top: 0; font-size: 1.05rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .8rem 1rem; }
.form-grid label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; }
.form-grid input, .form-grid select { padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
.form-grid label small { font-weight: 400; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
form > .form-actions { margin-top: .8rem; }   /* außerhalb eines Rasters fehlt sonst der Abstand zur Karte */
/* Erklärender Text in einem Formularraster läuft über alle Spalten – sonst steht er als schmale Säule daneben */
.form-grid .ganze-zeile { grid-column: 1 / -1; margin: 0; }
/* Ein Kästchen mit Beschriftung gehört nebeneinander – die Spaltenrichtung der übrigen Felder passt hier nicht */
.form-grid label.schalter { flex-direction: row; align-items: center; }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
/*
 * Knöpfe am Zeilenende.
 *
 * `align-items: center` ist nicht Geschmack, sondern notwendig: Ohne das streckt ein Flex-Container seine
 * Kinder auf die volle Zeilenhöhe – in einer Zeile mit zweizeiligem Namen wurden die Knöpfe dadurch hoch wie
 * die ganze Zelle (08.10.2026, Liste der Mappen). `margin: 0` am Formular aus demselben Grund: Ein `<form>`
 * bringt vom Browser einen unteren Abstand mit, und der schob den Trennstrich der Zeile nach unten.
 */
.row-actions { display: flex; gap: .3rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-actions form, .listing form.inline { margin: 0; }
.inline { display: inline-flex; align-items: center; margin: 0; }
/* Brotkrümel beim Einrichten: Pfadebenen als Sprungziele, damit es einen Weg zurück gibt (08.10.2026) */
.krumen { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0 0 .8rem; }
/* Kleines Feld samt Knopf in einer Zeile – z. B. die Kennung einer Quelle vor der Freigabe */
.inline-edit { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }

/* Favoritenstern an einer Freigabe (ADR 0049): grau, angeklickt gelb. Keine Schaltfläche im üblichen Sinn –
   deshalb ohne Rahmen, aber mit sichtbarem Fokus, sonst ist er per Tastatur nicht zu finden. */
.card-head .stern { margin-left: auto; }
.stern-knopf { background: none; border: 0; padding: .2rem; cursor: pointer; color: var(--muted); line-height: 0; }
.stern-knopf svg { fill: none; }
.stern-knopf:hover { color: var(--text); }
.stern-knopf.ist-favorit { color: #e3a008; }
.stern-knopf.ist-favorit svg { fill: currentColor; }
.stern-knopf:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: 2px; border-radius: 4px; }

/* Abschnitte der Übersicht: Favoriten, Laufwerke, übrige Freigaben */
h2.abschnitt { display: inline-flex; align-items: center; gap: .45rem; margin: 1.4rem 0 .6rem; font-size: 1.05rem; }
.freigaben-liste > summary { cursor: pointer; list-style: none; }
.freigaben-liste > summary::-webkit-details-marker { display: none; }
.freigaben-liste > summary::before { content: '▸'; margin-right: .4rem; color: var(--muted); }
.freigaben-liste[open] > summary::before { content: '▾'; }
.choice { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem 0; }
.small { font-size: .82rem; }

/* Personen- und Gruppensuche */
.picker { position: relative; }
.vorschlaege { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin: .2rem 0 0; padding: .25rem; list-style: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); max-height: 16rem; overflow-y: auto; }
.vorschlag { display: block; width: 100%; text-align: left; padding: .45rem .6rem; border: 0; border-radius: 7px; background: none;
    color: var(--text); font: inherit; font-weight: 400; cursor: pointer; }
.vorschlag:hover, .vorschlag:focus { background: var(--surface-2); }
.inline-field { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; margin: .3rem 0 .8rem 1.9rem; }
.inline-field input { padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 1rem; margin-left: 1.9rem; }
.inline-fields .inline-field { margin: .3rem 0 .8rem; }
.inline-field select { padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
.such-fehler { color: var(--warn); font-weight: 600; }

/* Dateisymbole nach Typ */
.name .icon { width: 1.6em; height: 1.6em; stroke-width: 1.7; vertical-align: -.4em; }
/* Dateityp-Symbole (vscode-icons, MIT – public/assets/icons/LICENSE.txt): mehrfarbig, deshalb als Bild */
.icon-datei { width: 1.7em; height: 1.7em; flex: none; vertical-align: -.45em; }
h1 .icon-datei { width: 1.15em; height: 1.15em; vertical-align: -.15em; }
.is-geloescht .icon-datei { opacity: .55; }
.listing .name { gap: .5rem; }
/* Das Blatt bekommt eine zarte Füllung in der Farbe des Typs – dadurch ist es auf einen Blick zu unterscheiden */
[class*="icon-f-"] { fill: color-mix(in srgb, currentColor 12%, transparent); }
.icon-f-word { color: #2b579a; }
.icon-f-excel { color: #217346; }
.icon-f-ppt { color: #c43e1c; }
.icon-f-pdf { color: #c0392b; }
.icon-f-image { color: #8e44ad; }
.icon-f-zip { color: #b7791f; }
.icon-f-text { color: #4b5563; }
.icon-f-code { color: #0f766e; }
.icon-f-mail { color: #1d4ed8; }
.icon-f-media { color: #be185d; }

/* Sortierbare Spalten und Filter */
.listing th a { display: inline-flex; align-items: center; gap: .25rem; color: inherit; }
.listing th a.is-sorted { color: inherit; font-weight: 700; }   /* der Pfeil zeigt die Sortierung, die Farbe bleibt */
.filterbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .8rem 0 0; }
.entfernen-form { display: inline; margin: 0; }
.gruende { border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; margin: 0; }
.gruende legend { padding: 0 .4rem; color: var(--muted); font-size: .9rem; }

/* Dateiinfo auf der Detailseite: eingeklappt, Schalter steht neben „Ansehen“ */
.klapp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.klapp:not(:checked) ~ .meta { display: none; }
.klapp:checked ~ .title-aktionen .klapp-knopf { background: var(--surface-2); border-color: var(--brand); color: var(--brand); }
.klapp-knopf { cursor: pointer; }

/* Suche: Freigabe und Ort in einer Spalte, die nicht die halbe Tabelle frisst */
/* Suchtreffer: der Dateiname steht über die ganze Breite, darunter die Angaben in Spalten */
.sortierung { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin: .8rem 0 0; }
.sortierung strong { color: var(--text); }
.trefferliste { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: 14px; }
.treffer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 14px 18px; }
.treffer-kopf .name { font-size: 1.03rem; }
/* Der Ausschnitt aus dem Dokument: höchstens vier Zeilen, sonst füllt ein Treffer den Bildschirm */
.treffer-text { margin: .35rem 0 .6rem; color: var(--muted); line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.treffer-text mark { background: var(--mark, #fde68a); color: inherit; border-radius: 3px; padding: 0 .1em; }
.treffer-ort { display: grid; grid-template-columns: 5.5rem 1fr; gap: .1rem .6rem; margin: 0 0 .6rem; font-size: .92rem; }
.treffer-ort dt { color: var(--muted); }
.treffer-ort dd { margin: 0; overflow-wrap: anywhere; }
.treffer-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem;
    border-top: 1px solid var(--border); padding-top: .55rem; }
.treffer-daten { color: var(--muted); font-size: .9rem; }
.treffer-daten .sep { opacity: .5; margin: 0 .15rem; }
.treffer-daten .kennung-wert { color: var(--text); letter-spacing: .04em; }
.listing th.ort, .listing td.ort { width: 40%; max-width: 40%; overflow-wrap: anywhere; }
.listing td.ort a.muted { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .15em; }
.listing td.ort a.muted:hover { color: var(--brand); text-decoration-color: currentColor; }
.sperr-eintrag { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.schalter { display: inline-flex; align-items: center; gap: .5rem; }
.schalter input { width: 1rem; height: 1rem; accent-color: var(--brand); cursor: pointer; }
/* Ordner ohne Berechtigung (ADR 0034): sichtbar wie im Explorer, aber verschlossen */
.filterzeile { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; }
.filterzeile .filterbar { flex: 1 1 20rem; }
/* „Auch gelöschte anzeigen“: Kästchen, damit man sieht, was gerade gilt */
.geloeschte { display: inline-flex; align-items: center; gap: .6rem; margin: .8rem 0 0; }
.geloeschte label { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); cursor: pointer; }
.geloeschte input { width: 1rem; height: 1rem; accent-color: var(--brand); cursor: pointer; }
.geloeschte label:has(:checked) { color: var(--text); font-weight: 600; }
.filterbar input { flex: 1 1 14rem; padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
/* Auswahlfelder in der Filterzeile: wie die Suche, aber sie wachsen nicht mit */
.filterbar select { flex: 0 1 auto; max-width: 14rem; padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
/* Abgeschaltetes Recht: steht da, wirkt nicht – zurückgenommen, aber lesbar */
.listing tr.aus td { opacity: .62; }
.listing tr.aus td:last-child, .listing tr.aus .badge { opacity: 1; }
.badge.geloescht { display: inline-flex; align-items: center; gap: .3rem; }
.badge.geloescht .icon { width: 1em; height: 1em; stroke-width: 2.2; }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: #fff; white-space: nowrap; }
.tag + .tag { margin-left: .25rem; }
.tag-remove { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: 0 0 0 .3rem; }
.tagzeile { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .8rem 0; }
.tagzeile .tag { display: inline-flex; align-items: center; }
.tag-form { display: inline-flex; align-items: center; gap: .3rem; }
.tag-form select { padding: .25rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; }
.beschreibung { margin: .5rem 0 0; font-size: .92rem; }
.card textarea { width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; resize: vertical; }

/* Sammeldownload */
.listing th.tick, .listing td.tick { width: 2.2rem; text-align: center; padding-right: 0; }
.bulkbar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: .8rem; }
.zahl { display: inline-block; min-width: 1.35rem; padding: 0 .35rem; border-radius: 999px; background: var(--brand);
    color: var(--brand-contrast); font-size: .78rem; font-weight: 700; text-align: center; }

/* Stand vom … */
.stand { flex: none; padding-left: .55rem; gap: .25rem; }
.stand input { font-size: .85rem; padding-right: 0; width: auto; }
/* Links steht das Zeichen dicht am Feld – rechts soll es genauso eng sein. Der Knopf trägt sonst sein
   volles Innenmaß und erzeugt eine Lücke, die es links nicht gibt. */
.stand .btn { padding-left: .45rem; }
/* Das Kalendersymbol, das der Browser selbst ins Feld setzt, wäre das zweite in derselben Leiste –
   links steht schon eines. Das Feld bleibt per Tastatur und Pfeiltasten bedienbar. */
.stand input::-webkit-calendar-picker-indicator { display: none; }
.stand input::-webkit-inner-spin-button { display: none; }
.zeitband { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; }
@media (max-width: 860px) { .stand input { max-width: 10rem; } }

/* Gelöschte Dateien: im Archiv vorhanden, auf dem Fileserver nicht mehr */
.name.is-geloescht { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.btn.is-active { background: var(--surface-2); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.schnipsel { color: var(--muted); font-size: .85rem; margin-top: .25rem; line-height: 1.45; }
.schnipsel mark { background: var(--warn-bg); color: var(--text); padding: 0 .15rem; border-radius: 3px; }

/* KI-Suche */
.spinner { display: inline-block; width: .9em; height: .9em; margin-right: .4rem; vertical-align: -.1em;
    border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: dreh 1s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.antwort { white-space: pre-line; line-height: 1.6; }

/* Ordnerbaum zur Pfadauswahl (Verwaltung → Freigaben) */
.folder-picker { grid-column: 1 / -1; max-height: 20rem; overflow: auto; padding: .5rem .6rem; border: 1px solid var(--border);
    border-radius: 8px; background: var(--bg); }
.folder-picker ul { list-style: none; margin: 0; padding: 0 0 0 1.1rem; }
.folder-picker > ul { padding-left: 0; }
.folder-picker li { margin: .05rem 0; }
.folder-picker-toggle { width: 1.3rem; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.folder-picker-toggle:disabled { cursor: default; }
.folder-picker-name { border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; padding: .1rem .35rem; border-radius: 6px; text-align: left; }
.folder-picker-name:hover { background: var(--surface-2); }
.folder-picker-name.is-selected { background: var(--brand); color: var(--brand-contrast); }
.folder-picker-name.is-selected .muted { color: inherit; opacity: .8; }

/* Vorführung: Hinweis und gesperrte Bedienelemente */
.notice-info { background: var(--archive-bg); color: var(--text); border-color: transparent; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; display: contents; }
.btn:disabled, button:disabled, input:disabled, select:disabled, textarea:disabled, option:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--border); }
.btn-primary:disabled:hover { background: var(--brand); border-color: var(--brand); }

/* Systemmarkierung (aus dem Zustand abgeleitet, kein Benutzer-Tag) */
.tag-system { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }

/* Fortschritt von Übertragung und Suchindex (Verwaltung) */
.fortschritt { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; margin: .5rem 0 1rem; }
.fortschritt h3 { margin: 0 0 .4rem; font-size: 1rem; }
.fortschritt p { margin: .4rem 0 0; }
.fortschritt progress { width: 100%; height: .7rem; accent-color: var(--brand); }
progress.klein { width: 7rem; height: .5rem; vertical-align: middle; accent-color: var(--brand); }

/* Nachgeladene Abschnitte (htmx, ADR 0029): Platzhalter aus unsichtbarem Mustertext typischer Länge mit grauem
   Hintergrund – er bricht um wie der echte Wert, darum bleibt die Box beim Austausch gleich groß */
.skel { color: transparent; background: var(--border); border-radius: 4px; user-select: none;
    -webkit-box-decoration-break: clone; box-decoration-break: clone; animation: skel 1.4s ease-in-out infinite; }
.skel-aus { animation: none; }
@keyframes skel { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.laedt-fehler { color: var(--warn); font-style: italic; }
/* einzeilig mit … am Ende (volle Angabe im Tooltip), z. B. Pfade in „Größte Dateien“ */
.einzeilig { display: block; max-width: min(40rem, 62vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Verwaltung → Agenten und → Server: Zustand eines Rechners */
.rechner h2 .badge { vertical-align: middle; margin-left: .3rem; }
/* Beiwerk in einer Überschrift – Zählung, Hinweis – soll nicht mitbrüllen */
h2 small, h2 .small, h3 small { font-weight: 400; font-size: .82rem; color: var(--muted); }
/* Auswahlfelder in einer Tabelle: wie im Formular, damit sie nicht wie vom Browser dazugemalt wirken */
.listing select { max-width: 100%; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
/* Zuordnungsmatrix: je Mappe eine schmale Spalte mit einem Kästchen. Die Kopfzeile trägt die Namen. */
.listing.zuordnung th.num, .listing.zuordnung td.num { width: 1%; white-space: nowrap; }
.listing.zuordnung input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); cursor: pointer; }
.rechner-gruende { margin: .2rem 0 .8rem; padding-left: 1.2rem; color: var(--warn); }
.rechner-werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .5rem 1.5rem; margin: .4rem 0 .8rem; }
.rechner-werte h3 { margin: 0 0 .3rem; font-size: 1rem; }
.rechner-werte p { margin: .3rem 0 0; }
.rechner-werte progress { width: 100%; height: .6rem; accent-color: var(--brand); }
.rechner .table-wrap { margin-top: .6rem; }
/* Schmale Tabelle: so breit wie ihr breitester Text, nicht wie die Karte (Microsoft-365-Karte, 27.10.2026) */
.table-wrap.schmal { width: fit-content; max-width: 100%; }
.table-wrap.schmal .listing { width: auto; }

/* KI-Suche: Gesprächsfaden über der Antwort (frühere Fragen dieser Folge) */
.faden { margin: 0 0 .4rem; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }
.faden li { margin: .1rem 0; }


/* Menü in der Kopfzeile (Vorbild Firefox): reines <details>, kein Skript nötig – die CSP verbietet eingebettete
   Skripte, und ein Menü soll auch ohne JavaScript aufgehen. */
.menue { position: relative; }
.menue > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.menue > summary::-webkit-details-marker { display: none; }
.menue[open] > summary { border-color: var(--brand); }
/* Der eigene Name ist eine Schaltfläche und soll auch so aussehen – mit Rahmen und Fläche wie jeder Knopf */
.konto-knopf { font-size: .85rem; padding: .35rem .5rem .35rem .7rem; }
.konto-knopf .icon { width: 1rem; height: 1rem; color: var(--muted); }
.menue[open] > .konto-knopf .icon { transform: rotate(180deg); }   /* offen: Winkel zeigt nach oben */
.menue-inhalt { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 30; min-width: 16rem; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .4rem;
    box-shadow: 0 10px 30px rgb(0 0 0 / .18); display: grid; gap: .1rem; }
.menue-inhalt a, .menue-inhalt button { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left;
    padding: .5rem .6rem; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.menue-inhalt a:hover, .menue-inhalt button:hover { background: var(--surface-2); text-decoration: none; }
.menue-inhalt form { margin: 0; }
.menue-kopf { margin: .2rem .6rem .4rem; color: var(--muted); font-size: .85rem; }
.menue-hinweis { margin-left: auto; color: var(--muted); display: inline-flex; }
.menue-hinweis .icon { width: .95rem; height: .95rem; }
.menue .icon { width: 1.1rem; height: 1.1rem; }

/* Detailansicht: Herunterladen mit verknüpften Dateien (ADR 0032) */
.verknuepft-laden { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: .2rem 0 .8rem; }

/* Aufträge im Kopf: klappen unter der Schaltfläche „Jobs“ auf, statt die Seite zu verlassen */
.jobs-menue { list-style: none; margin: 0 0 .3rem; padding: 0; display: grid; gap: .25rem; }
.jobs-menue li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .2rem .6rem;
    padding: .4rem .5rem; border-radius: 8px; }
.jobs-menue li:hover { background: var(--surface-2); }
.jobs-menue-name { grid-column: 1 / -1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobs-menue .badge { justify-self: start; }
.btn.kopie { padding: .25rem .4rem; }
.btn.kopie .icon { width: 1rem; height: 1rem; }

/* Kurze Kennung je Datei (zum Weitergeben in Tickets, Teams, Buchhaltung) */
.kennung { margin: 0; display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .9rem; }
.kennung strong { color: var(--text); letter-spacing: .04em; }


/* Darstellung im Namensmenü */
/* „Darstellung“ ist eine Gruppe: Ihre drei Stellungen stehen eingerückt unter der Überschrift.
   Konto prüfen und Abmelden sind eigene Punkte und bleiben deshalb auf der ersten Ebene. */
/* Kennzeichen (Admin, Vorführung) stehen als eigene Zeile unter der Adresse, nicht mehr oben neben dem Namen */
.menue-marken { margin: 0 .6rem .3rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.menue-trenner { margin: .25rem .3rem .35rem; border: 0; border-top: 1px solid var(--border); }
/* „Darstellung“ ist eine Überschrift, sieht aber aus wie die Einträge daneben – nur ohne Hover, weil nicht klickbar */
.menue-abschnitt { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; color: var(--text); }
.darstellung { display: grid; gap: .1rem; margin: 0 0 .2rem; }
.darstellung button { padding-left: 2.2rem; }   /* eingerückt unter die Überschrift mit ihrem Zeichen */
.darstellung button.gewaehlt { font-weight: 650; }
.icon-platz { display: inline-block; width: 1.1rem; height: 1.1rem; }
.menue-inhalt > form + form button, .menue-inhalt .darstellung + form button { border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; }


/* ------------------------------------------------------------------ Kopfzeile: eine Zeile, egal wie breit
   Diese Regeln stehen bewusst am Ende: Sie müssen die Grundregeln überschreiben (gleiche Spezifität → später gewinnt). */
.topbar > * { min-width: 0; }
.topbar .nur-schmal { display: none; }
.account { min-width: 0; }
.account > details, .account > details > summary { min-width: 0; }
.account > details > summary { overflow: hidden; }
.account-name { display: inline-block; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stand input { max-width: 11rem; }   /* Notbremse für sehr breite Schriften, sonst zählt die Eigenbreite */

/* KI-Suche: Wahl zwischen schnellem und gründlichem Modell */
fieldset.stufen { border: 1px solid var(--border); border-radius: .4rem; margin: .6rem 0 0; padding: .5rem .7rem; min-width: 0; }
fieldset.stufen legend { padding: 0 .3rem; font-size: .85rem; color: var(--muted); }
fieldset.stufen label { display: block; padding: .25rem 0; cursor: pointer; }
/* Erklärung unter die Zeile, eingerückt bis unter den Text – nicht unter das Kästchen */
fieldset.stufen .erklaerung { display: block; margin-left: 1.6rem; font-size: .85rem; color: var(--muted); }

@media (max-width: 1280px) {
    .topbar .nur-breit { display: none; }        /* KI-Suche und Jobs wandern ins Klappmenü (Verwaltung steht im Kontomenü) */
    .topbar .nur-schmal { display: inline-flex; }
    .account-name { max-width: 9rem; }
}
@media (max-width: 1000px) {
    .topbar .account .badge { display: none; }   /* „Admin“/„Vorführung“ braucht den Platz nicht */
    .topbar .stand { display: none; }            /* „Stand vom …“ bleibt über die Verwaltung erreichbar */
    .topbar .search .btn { display: none; }      /* Eingabetaste genügt – das Feld braucht den Platz */
}
@media (max-width: 700px) {
    .topbar .brand-text { display: none; }       /* nur noch die Bildmarke */
    .account-name { max-width: 6rem; }
}

/* Einrichtungscode für einen neuen Agenten (ADR 0042): einmal sichtbar, deshalb gut ablesbar und diktierbar. */
.einrichtungscode { font-family: var(--mono); font-size: 1.7rem; letter-spacing: .14em; text-align: center;
    margin: .8rem 0; padding: .7rem .5rem; border: 1px dashed var(--border); border-radius: var(--radius);
    background: var(--bg); overflow-wrap: anywhere; }
.befehl { font-family: var(--mono); font-size: .85rem; margin: .5rem 0; padding: .55rem .7rem;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ E-Mail-Betrachter
   `.msg`/`.eml` in eigenem Tab. Kopfzeilen mit `details` aufklappbar – kein Skript, wie überall hier.
   Der Körper steckt in einem abgeschotteten Rahmen mit eigener Richtlinie; seine Höhe ist fest, weil
   sich ohne Skript nicht messen lässt, wie hoch der Inhalt ist. Ein eigener Rollbalken ist dafür der
   ehrliche Preis. */
.mail { max-width: 62rem; }
.mail-betreff { font-size: 1.35rem; margin: 0 0 .75rem; line-height: 1.3; }
.mail-kopf { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .75rem; margin: 0 0 .75rem; }
.mail-kopf dt { color: var(--muted); white-space: nowrap; }
.mail-kopf dd { margin: 0; overflow-wrap: anywhere; }
.mail-rohkopf { margin-bottom: 1rem; }
.mail-rohkopf > summary { cursor: pointer; color: var(--muted); font-size: .9rem; padding: .25rem 0; }
.mail-rohkopf table { width: 100%; border-collapse: collapse; margin-top: .5rem; font-size: .85rem; }
.mail-rohkopf th { text-align: left; vertical-align: top; padding: .2rem .75rem .2rem 0; white-space: nowrap;
    color: var(--muted); font-weight: 600; }
.mail-rohkopf td { padding: .2rem 0; overflow-wrap: anywhere; font-family: var(--mono); }
.mail-anhaenge { border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; margin-bottom: 1rem; }
.mail-anhaenge h2 { font-size: .95rem; margin: 0 0 .4rem; display: flex; align-items: center; gap: .4rem; }
.mail-anhaenge ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.mail-anhaenge li { display: flex; align-items: center; gap: .5rem; }
.mail-groesse { color: var(--muted); font-size: .85rem; margin-left: auto; }
/* Höhe nur als Rückfall ohne JavaScript: Das Skript macht den Rahmen so hoch wie seinen Inhalt, damit die
   Seite einen Rollbalken hat und nicht zwei. */
.mail-koerper { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); display: block; }
.betrachter-knoepfe { display: flex; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.dateikopf-fuss { margin-bottom: 1rem; }
.dateikopf-fuss .kopie { padding: 0 .2rem; vertical-align: -.25em; }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono);
    border: 1px solid var(--border); border-radius: 8px; padding: .8rem; margin: 0; }
.mail-fuss { margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* Bei E-Mails führt der Name in den Betrachter, also braucht das Herunterladen einen eigenen Griff.
   Er ist bewusst leise: ein Symbol, das erst beim Überfahren der Zeile deutlich wird – sonst konkurriert
   es in einer langen Liste mit dem Namen, den man eigentlich lesen will. */
.name-laden { display: inline-flex; align-items: center; margin-left: .4rem; padding: .1rem;
    color: var(--muted); opacity: .55; border-radius: 4px; vertical-align: middle; }
.name-laden .icon { width: 1.05em; height: 1.05em; vertical-align: 0; }
tr:hover .name-laden, .treffer-kopf:hover .name-laden, .name-laden:focus-visible { opacity: 1; color: var(--brand); }
.name-laden:hover { opacity: 1; color: var(--brand); background: var(--surface-2); }
/* Nur ein Symbol, kein Text: gleiche Höhe wie die Knöpfe daneben, aber quadratisch. */
.btn-symbol { padding-left: .45rem; padding-right: .45rem; }
.btn-symbol .icon { margin: 0; }

/* ------------------------------------------------------------------ Warnseite vor einem Verweis
   Sie steht auf unserer eigenen Herkunft, außerhalb der Abschottung – nur deshalb kann sie aussehen, wie
   sie aussehen soll. Im Dokument selbst dürfte das fremde CSS sie umfärben oder verstecken. */
.warnung { max-width: 44rem; }
.warnung h1 { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; margin: 0 0 .75rem; }
.warnung h1 .icon { width: 1.5em; height: 1.5em; color: var(--warn); flex: none; }
.warnung-grund { margin: 0 0 1rem; }
.warnung-widerspruch { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 1rem;
    padding: .7rem .9rem; border: 1px solid var(--error); border-radius: var(--radius);
    background: var(--error-bg); color: var(--text); }
.warnung-widerspruch .icon { width: 1.3em; height: 1.3em; color: var(--error); flex: none; margin-top: .1em; }
.warnung-ziel { margin: 0 0 1.2rem; padding: .8rem .9rem; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--surface-2); }
.warnung-ziel dt { color: var(--muted); font-size: .85rem; }
.warnung-ziel dd { margin: .1rem 0 .7rem; }
.warnung-ziel dd:last-child { margin-bottom: 0; }
/* Der eigentliche Rechnername groß, die Vorsilben klein: Bei `bank.de.beispiel.ru` liest man sonst das Falsche. */
.warnung-rechner { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
.warnung-rechner .leise { font-weight: 400; font-size: .85em; color: var(--muted); }
.warnung-url { font-family: var(--mono); font-size: .85rem; overflow-wrap: anywhere; color: var(--muted); }
.warnung-knoepfe { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 0 0 1.2rem; }
/* Der Öffnen-Knopf ist bewusst **nicht** die ruhige Markenfarbe: Er verlässt das Archiv. */
.btn-warnung { background: var(--warn); color: var(--warn-contrast); border-color: var(--warn); font-weight: 600; }
.btn-warnung:hover { filter: brightness(1.1); }
.warnung-fuss { color: var(--muted); font-size: .85rem; margin: 0; }


/* ------------------------------------------------------------------ Textbetrachter
   Zeilennummern über CSS-Zähler und nicht im Text: So lässt sich der Inhalt kopieren, ohne die Nummern
   mitzunehmen – und es braucht kein Skript dafür. */
.text-angaben { color: var(--muted); font-size: .9rem; margin: 0 0 .6rem; }
.text-angaben .sep { opacity: .5; margin: 0 .3rem; }
.text-warnung { color: var(--warn); }
.text-inhalt { counter-reset: zeile; margin: 0; padding: .6rem 0; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--surface); font-family: var(--mono); font-size: .85rem;
    line-height: 1.55; overflow-x: auto; }
.text-inhalt span { display: block; padding: 0 .8rem 0 4.2rem; white-space: pre; }
.text-inhalt span::before { counter-increment: zeile; content: counter(zeile); position: absolute;
    left: 0; width: 3.4rem; text-align: right; color: var(--muted); opacity: .6;
    user-select: none; -webkit-user-select: none; }
.text-inhalt span { position: relative; }
.text-inhalt span:hover { background: var(--surface-2); }
.text-tabelle-rahmen { overflow: auto; max-height: 75vh; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--surface); }
.text-tabelle { border-collapse: collapse; font-size: .85rem; width: max-content; min-width: 100%; }
.text-tabelle th, .text-tabelle td { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
    padding: .25rem .5rem; text-align: left; vertical-align: top; max-width: 28rem; overflow-wrap: anywhere; }
.text-tabelle thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; font-weight: 600; }
.text-tabelle .zeilennr { color: var(--muted); text-align: right; font-family: var(--mono);
    background: var(--surface-2); position: sticky; left: 0; user-select: none; }

/* ------------------------------------------------------------------ Dauerhafte Verweise (/identifier)
   Hellblau, weil es ein Hinweis ist und keine Warnung: Die Box sagt, welche Fassung der Link meint. */
:root { --hinweis: #0b5aa8; --hinweis-bg: #e8f1fb; --hinweis-rand: #b8d4ef; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --hinweis: #8ec6ff; --hinweis-bg: #16263a; --hinweis-rand: #2b4a6e; }
}
:root[data-theme="dark"] { --hinweis: #8ec6ff; --hinweis-bg: #16263a; --hinweis-rand: #2b4a6e; }

.verweis-box { border: 1px solid var(--hinweis-rand); background: var(--hinweis-bg);
    border-left: 4px solid var(--hinweis); border-radius: var(--radius);
    padding: .7rem .9rem; margin: 0 0 1rem; }
.verweis-box p { margin: 0 0 .3rem; }
.verweis-box p:last-child { margin-bottom: 0; }
.verweis-box code { font-family: var(--mono); font-size: .85em; overflow-wrap: anywhere; }
.verweis-box .klein-grau { font-size: .85rem; color: var(--muted); }
/* Die gemeinte Zeile im selben Blau – der Blick springt von der Box in die Liste. */
.listing tr.ist-gemeint > td { background: var(--hinweis-bg); }
.listing tr.ist-gemeint > td:first-child { box-shadow: inset 3px 0 0 var(--hinweis); }

.kennung-mit-link { display: inline-flex; align-items: center; gap: .15rem; }
.kennung-mit-link .kopie { padding: 0 .25rem; vertical-align: -.2em; }
.identifier-fehler { max-width: 40rem; }
.identifier-fehler h1 { display: flex; align-items: center; gap: .5rem; font-size: 2rem; margin: 0 0 .5rem; }
.identifier-fehler h1 .icon { width: 1.2em; height: 1.2em; color: var(--muted); }
.identifier-fehler .gross { font-size: 1.1rem; margin: 0 0 1rem; }
/* Rückmeldung beim Kopieren: nur das Symbol wechselt kurz die Farbe, die Beschriftung bleibt stehen. */
.kopie.kopiert { color: var(--ok); }
.kopie.kopiert-fehler { color: var(--error); }

/* Verwaltung → Aktivität (20.10.2026). Das Diagramm ist serverseitig gezeichnetes SVG: Die CSP erlaubt
   weder eingebettete Skripte noch `style="…"`, also stehen Farben und Maße hier – nicht am Element. */
.aktivitaet-svg { width: 100%; height: auto; display: block; margin-top: .4rem; }
.aktivitaet-grund { stroke: var(--border); }
.aktivitaet-achse { font-size: 11px; fill: var(--muted); }
.reihe-neu { fill: var(--ok); }
.reihe-geaendert { fill: var(--brand); }
.reihe-geloescht { fill: var(--warn); }
.legende { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; align-items: center; margin: 0 0 .2rem; }
.legende strong { margin-right: .5rem; }
/* Der Punkt erbt die Farbe seiner Reihe über dieselbe Klasse wie die Balken – `fill` wirkt im SVG,
   `background` hier; beides aus derselben Variablen, damit die Legende nie etwas anderes zeigt als das Bild. */
.legende-punkt { width: .7rem; height: .7rem; border-radius: 2px; display: inline-block; }
.legende-punkt.reihe-neu { background: var(--ok); }
.legende-punkt.reihe-geaendert { background: var(--brand); }
.legende-punkt.reihe-geloescht { background: var(--warn); }

/* **Blöcke mit einer Zeile** (Quellen, Postfächer, 11/2026): Name, Herkunft und Zustand in der Kopfzeile, alles Weitere
   eingeklappt. Lange Listen bleiben so überschaubar; aufgeklappt wird, wo man arbeitet. */
.block { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin: .4rem 0; }
.block > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; padding: .6rem .9rem; cursor: pointer; list-style: none; }
.block > summary::-webkit-details-marker { display: none; }
.block > summary::before { content: '▸'; color: var(--muted); width: .8rem; }
.block[open] > summary::before { content: '▾'; }
.block-name { font-weight: 600; }
.block-herkunft { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.block-status { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.block-inhalt { padding: .4rem .9rem .9rem 2.1rem; border-top: 1px solid var(--border); }
.block-inhalt .listing { margin: .4rem 0; }
.block-aktionen { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.block-aktionen form { display: inline; }

/* Postfach-Formular: Abschnitte in Arbeitsreihenfolge, unpassende Felder ausgegraut statt versteckt */
.formular-abschnitt { border: 0; border-top: 1px solid var(--border); margin: 1rem 0 0; padding: .8rem 0 0; }
.formular-abschnitt > legend { font-weight: 600; padding: 0 .4rem 0 0; }
/* Eingabefelder weiß (Oberfläche), nicht in der Seitenfarbe – das Formular steht ohne Karte direkt auf der Seite,
   dort waren die Felder vom Hintergrund nicht zu unterscheiden (Wunsch des Betreibers 11.11.2026) */
.postfach-formular input:not([type=checkbox]):not([type=hidden]), .postfach-formular select, .postfach-formular textarea {
    background: var(--surface); color: var(--text); border: 1px solid #b9c3cf; border-radius: 8px; padding: .5rem .6rem; font: inherit; font-weight: 400;
}
.postfach-formular textarea { width: 100%; resize: vertical; }
.postfach-formular input:focus, .postfach-formular select:focus, .postfach-formular textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.ausgegraut { opacity: .4; }
.ausgegraut input, .ausgegraut select, .ausgegraut textarea { cursor: not-allowed; }

/* Mailliste: ganze Zeile klickbar (storanger.js, data-href) und zwei Ansichten – großzügig und schmal */
.listing tbody tr[data-href] { cursor: pointer; }
.ansicht-schalter { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: .88rem; }
.ansicht-schalter a { padding: .4rem .8rem; color: var(--muted); text-decoration: none; }
.ansicht-schalter a + a { border-left: 1px solid var(--border); }
.ansicht-schalter a.is-active { background: var(--surface-2); color: var(--text); font-weight: 600; }
/* Schmal: eine Textzeile je Mail. Die Höhe bestimmen sonst die Kopier-Knöpfe der Kennung (btn-small, rund 1,8rem) –
   sie werden hier flach, ohne Rahmen und Innenabstand. */
.mailliste.is-schmal tbody td { height: auto; padding-top: .2rem; padding-bottom: .2rem; line-height: 1.35; font-size: 80%; }   /* 20 % kleinere Schrift */
.mailliste.is-schmal .kennung-mit-link .kopie { padding: 0 .15rem; border: 0; min-height: 0; line-height: 1; }
.mailliste.is-schmal .kennung-mit-link .kopie .icon { width: 1em; height: 1em; }
.mailliste.is-schmal td.tick input { margin: 0; vertical-align: middle; }   /* sonst hebt das Kästchen die Zeile um 4 px */
.mailliste.is-schmal .name .icon { width: 1.2em; height: 1.2em; vertical-align: -.2em; }
/* Kein Umbruch in keiner Spalte: Sonst bricht das Datum („10.11.2026 08:59“) um, sobald ein langer Betreff die Breite
   frisst, und die Zeile ist wieder doppelt so hoch. Lange Namen und Betreffs enden stattdessen mit „…“. */
.mailliste.is-schmal td { white-space: nowrap; }
.mailliste.is-schmal .person { display: block; max-width: 12vw; overflow: hidden; text-overflow: ellipsis; }
.mailliste.is-schmal td.betreff .name { display: inline-block; max-width: 22vw; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.mailliste.is-schmal td.betreff .badge { vertical-align: middle; }

/* Sammelzugänge (ADR 0068): eine Zeile je Zugang, Abgleich auf eigener Seite */
.sammelzugang-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; padding: .7rem 1rem; }
.sammelzugang-zeile .block-name { font-weight: 600; }
.sammelzugang-zeile .block-herkunft { display: block; }
.namensregel { margin-top: 2rem; }
.inline-auswahl { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.inline-auswahl select { max-width: 22rem; padding: .3rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; }
.muster-bearbeiten { display: inline-block; }
.muster-bearbeiten > summary { list-style: none; cursor: pointer; }
.muster-bearbeiten > summary::-webkit-details-marker { display: none; }
.muster-bearbeiten[open] { display: block; margin-bottom: .4rem; }
.inline-auswahl input[type=text] { padding: .3rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; max-width: 14rem; }

/* Auslastung eines Postfachs: nur der Balken, keine Zahl (<meter> färbt ab 80 % und 95 % selbst um) */
meter.auslastung { width: 4.5rem; height: .55rem; vertical-align: middle; }
.listing tr.unterzeile td { padding-top: .25rem; padding-bottom: .25rem; height: auto; font-size: .92rem; }
.listing tr.unterzeile td:first-child { padding-left: 1.8rem; }

/* Statistik → Zufluss: Diagramme als SVG (13.11.2026). Farben aus den Tokens, damit Hell und Dunkel stimmen. */
.diagramm { display: block; width: 100%; height: auto; margin: .2rem 0 .8rem; }
.dia-gitter { stroke: var(--border); stroke-width: 1; }
.dia-null { stroke: var(--muted); stroke-width: 1; }
.dia-achse { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.dia-dateien { fill: var(--brand); fill-opacity: .55; stroke: none; }
.dia-mails { fill: var(--archive); fill-opacity: .6; stroke: none; }
.dia-gespeichert { fill: none; stroke: var(--text); stroke-opacity: .75; stroke-width: 1.2; }
.dia-titel { margin: 1rem 0 .2rem; font-size: 1rem; }
.dia-legende { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; }
.dia-farbe { display: inline-block; width: .9em; height: .9em; border-radius: 2px; margin-right: .35em; vertical-align: -.1em; }
i.dia-dateien { background: var(--brand); opacity: .55; }
i.dia-mails { background: var(--archive); opacity: .6; }
.dia-gespeichert-farbe { border-top: 2px solid var(--text); height: 0; border-radius: 0; vertical-align: .25em; }
.zufluss-status { margin: .3rem 0 .4rem; padding: .5rem .75rem; border-radius: var(--radius); background: var(--surface-2); }
.zufluss-status.is-aktiv { background: var(--ok-bg); color: var(--ok); }
.zufluss-platzhalter { min-height: 34rem; }
.segment { display: inline-flex; gap: .3rem; }

