/* ==========================================================================
   OpenAWO – Asset Management
   Farbwelt der Arbeiterwohlfahrt: AWO-Rot (RAL 3020), Schwarz, Weiß
   plus fünf Sekundärfarben. Keine externen Schriften (datenschutzfreundlich).
   ========================================================================== */

:root {
    /* Primär */
    --awo-rot: #cc0605;           /* RAL 3020 Verkehrsrot (Bildschirm-Näherung) */
    --awo-rot-dunkel: #a50504;
    --awo-rot-hell: #fdeceb;
    --schwarz: #141414;
    --weiss: #ffffff;

    /* Sekundär */
    --awo-violett: #5560a4;
    --awo-gelb: #fecd1b;
    --awo-orange: #ec7405;
    --awo-blau: #009ee0;
    --awo-gruen: #79b530;

    /* Neutral */
    --text: #1c1c1e;
    --text-muted: #6b6b73;
    --bg: #f5f5f7;
    --surface: #ffffff;
    --border: #e7e7ec;
    --border-strong: #d4d4dc;

    /* Form */
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 6px 24px rgba(20, 20, 20, .06);
    --focus: 0 0 0 3px rgba(204, 6, 5, .22);
    --sidebar-w: 256px;

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.icon { width: 18px; height: 18px; flex: none; }

.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;
}

/* --------------------------------------------------------------------------
   Grundlayout
   -------------------------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    position: sticky; top: 0;
    width: var(--sidebar-w); height: 100vh;
    flex: none;
    display: flex; flex-direction: column;
    background: var(--schwarz);
    color: #f2f2f2;
    padding: 22px 14px 18px;
    border-top: 4px solid var(--modul);
}

/* ---------------------------------------------------------------------
   Programmbereiche (Module): eigene Akzentfarbe aus den AWO-Sekundärfarben.
   --modul      = leuchtende Akzentfarbe (Linien, Kacheln)
   --modul-text = dunklere Variante mit ausreichendem Kontrast zu Weiß (Schrift, aktive Menüpunkte)
   --------------------------------------------------------------------- */
body { --modul: var(--awo-rot); --modul-text: var(--awo-rot); --modul-hell: var(--awo-rot-hell); }
.modul-asset,    .programm-asset    { --modul: var(--awo-blau);  --modul-text: #00709e; --modul-hell: #e0f4fc; }
.modul-fuhrpark, .programm-fuhrpark { --modul: var(--awo-gruen); --modul-text: #4a7a16; --modul-hell: #edf6e2; }
.modul-konfiguration { --modul: var(--awo-violett); --modul-text: #4b5596; --modul-hell: #eceefa; }

.modul-kachel {
    display: grid; place-items: center; flex: none;
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--modul); color: var(--weiss);
}
.modul-kachel .icon { width: 19px; height: 19px; }
.modul-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.modul-name strong { font-size: 14px; color: #e4e4e9; }
.modul-name small { font-size: 11.5px; color: #8d8d95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Programmbereiche in der Seitenleiste (untereinander) */
.programme { display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.programm {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none;
    border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.programm:hover { background: rgba(255, 255, 255, .06); }
.programm:focus-visible { outline: 2px solid var(--modul); outline-offset: 1px; }
.programm .modul-kachel { opacity: .55; transition: opacity .15s; }
.programm:hover .modul-kachel, .programm.is-aktiv .modul-kachel { opacity: 1; }
.programm.is-aktiv { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .1); }
.programm.is-aktiv .modul-name strong { color: var(--weiss); }
.programm.is-aktiv::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--modul); flex: none; }

/* Kopfzeile (Querbalken) */
.kopfzeile {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 10px;
    height: 60px; padding: 0 clamp(20px, 3vw, 48px);
    background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--border);
    box-shadow: inset 0 3px 0 var(--modul);
}
.kopfzeile .menu-toggle { display: none; }
.kopf-bereich { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-weight: 650; color: var(--modul-text); text-decoration: none; white-space: nowrap; }
.kopf-bereich .modul-kachel { width: 28px; height: 28px; border-radius: 8px; }
.kopf-bereich .modul-kachel .icon { width: 16px; height: 16px; }
.kopf-bereich:hover span:last-child { text-decoration: underline; }
.kopf-trenner { color: #c4c4cb; }
.kopf-titel { min-width: 0; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.kopf-knopf {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
    border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 550; font-size: 14px;
    border: 1px solid var(--border);
}
.kopf-knopf .icon { width: 18px; height: 18px; }
.kopf-knopf:hover { background: #f4f4f7; }
.kopf-knopf.is-aktiv { background: var(--modul-hell); border-color: transparent; color: var(--modul-text); }
.benutzer-menue { position: relative; }
.benutzer-menue > summary {
    display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 4px;
    border-radius: 99px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 550;
}
.benutzer-menue > summary::-webkit-details-marker { display: none; }
.benutzer-menue > summary:hover { background: #f4f4f7; }
.benutzer-menue > summary:focus-visible { outline: 2px solid var(--modul); outline-offset: 1px; }
.benutzer-menue .avatar { width: 32px; height: 32px; font-size: 12px; }
.benutzer-menue > summary > .icon { width: 15px; height: 15px; color: var(--text-muted); }
.benutzer-menue-liste {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 220px;
    padding: 6px; background: var(--weiss); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .14);
}
.benutzer-menue-kopf { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.benutzer-menue-kopf small { color: var(--text-muted); }
.benutzer-menue-liste a, .benutzer-menue-liste button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
    border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--text); text-decoration: none; cursor: pointer;
}
.benutzer-menue-liste a:hover, .benutzer-menue-liste button:hover { background: #f4f4f7; }
.benutzer-menue-liste .icon { width: 17px; height: 17px; color: var(--text-muted); }
.benutzer-menue-liste form { margin: 0; }

/* Globale Suche in der Kopfzeile */
.kopf-suche label { position: relative; display: block; }
.kopf-suche .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-muted); pointer-events: none; }
.kopf-suche input {
    width: 300px; height: 38px; padding: 0 34px 0 36px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: #f6f6f8;
    font: inherit; font-size: 14px; color: var(--text); transition: width .2s, border-color .15s, background .15s;
}
.kopf-suche input:focus { outline: none; width: 380px; background: var(--weiss); border-color: var(--modul); box-shadow: 0 0 0 3px var(--modul-hell); }
.kopf-suche kbd {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--weiss);
    font: 600 11px/1.4 inherit; color: var(--text-muted);
}
.kopf-suche input:focus + kbd, .kopf-suche input:not(:placeholder-shown) + kbd { display: none; }
.kopf-suche-mobil { display: none; }

/* Suchergebnisse */
.suche-gross { display: flex; gap: 10px; padding: 14px; margin-bottom: 18px; }
.suche-gross .search { flex: 1; }
.suche-gruppe { margin-bottom: 18px; }
.suche-gruppe-kopf { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.suche-gruppe-kopf h2 { margin: 0; font-size: 17px; }
.suche-alle { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--modul-text); }
.treffer { font-size: 13px; color: var(--text-muted); max-width: 340px; }
.treffer mark { background: #fff1a8; color: var(--text); padding: 0 1px; border-radius: 2px; }
.treffer-feld { font-weight: 600; color: var(--text); }
.treffer-trenner { margin: 0 6px; color: #c4c4cb; }

/* Dokumente zu Assets und SIM-Karten */
.dokumente { margin-top: 20px; }
.dokumente-kopf { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.dokumente-kopf h2 { margin: 2px 0 2px; font-size: 17px; }
.dokumente-kopf p { margin: 0; font-size: 13.5px; }
.dokumente-leer { margin: 0 0 14px; font-size: 14px; }
.dokument-liste { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dokument { display: flex; align-items: center; gap: 14px; padding: 10px 12px; }
.dokument + .dokument { border-top: 1px solid var(--border); }
.dokument-vorschau { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: #f4f4f7; border: 1px solid var(--border); text-decoration: none; }
.dokument-vorschau img { width: 100%; height: 100%; object-fit: cover; }
.dokument-kuerzel { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--text-muted); }
.dokument-kuerzel-pdf { color: var(--awo-rot); }
.dokument-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dokument-name { font-weight: 600; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dokument-name:hover { color: var(--modul-text); text-decoration: underline; }
.dokument-text small { font-size: 12.5px; }
.dokument-notiz { display: flex; align-items: center; gap: 4px; margin: 2px 0 0; }
.dokument-notiz input {
    flex: 1; min-width: 0; height: 30px; padding: 0 8px; margin-left: -8px;
    border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; font-size: 13.5px; color: var(--text);
}
.dokument-notiz input::placeholder { color: #a5a5ad; font-style: italic; }
.dokument-notiz input:hover { border-color: var(--border); }
.dokument-notiz input:focus { outline: none; border-color: var(--modul); background: var(--weiss); box-shadow: 0 0 0 3px var(--modul-hell); }
.dokument-notiz .icon-btn { width: 30px; height: 30px; color: var(--modul-text); }
.dokument-aktionen { display: flex; gap: 2px; }
.dokument-aktionen form { margin: 0; }
.upload-zone {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 20px; border: 2px dashed var(--border-strong); border-radius: var(--radius-sm);
    text-align: center; cursor: pointer; color: var(--text); transition: border-color .15s, background .15s;
}
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone .icon { width: 24px; height: 24px; color: var(--modul-text); }
.upload-zone strong { color: var(--modul-text); }
.upload-zone small { font-size: 12.5px; }
.upload-zone:hover, .upload-zone.ist-ueber { border-color: var(--modul); background: var(--modul-hell); }
.upload-zone.hat-dateien { border-style: solid; border-color: var(--modul); }
.upload-zone:focus-within { box-shadow: var(--focus); }
.dokument-upload-zeile { display: flex; gap: 10px; margin-top: 10px; }
.dokument-upload-zeile input[type=text] {
    flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); font: inherit; font-size: 15px;
}
.dokument-upload-zeile input[type=text]:focus { outline: none; border-color: var(--awo-rot); box-shadow: var(--focus); }
@media (max-width: 600px) {
    .dokument { flex-wrap: wrap; }
    .dokument-upload-zeile { flex-direction: column; }
}

/* Ansicht eines Eintrags (nur lesen) */
.ansicht-kopf { align-items: center; }
.ansicht-titel { display: flex; align-items: center; gap: 18px; min-width: 0; }
.ansicht-titel h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.ansicht-titel h1 .status { font-size: 13px; letter-spacing: 0; }
.ansicht-titel .page-sub { margin-top: 4px; }
.ansicht-bild {
    flex: none; display: grid; place-items: center; width: 84px; height: 84px; overflow: hidden;
    border-radius: 14px; background: var(--weiss); border: 1px solid var(--border);
}
.ansicht-bild img { width: 100%; height: 100%; object-fit: contain; }
.ansicht-bild-leer { background: var(--modul-hell); color: var(--modul-text); border-color: transparent; }
.ansicht-bild-leer .icon { width: 36px; height: 36px; }
.ansicht-aktionen { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.btn-rahmen { border: 1px solid var(--border-strong); background: var(--weiss); }
.btn.btn-rahmen:hover { border-color: var(--modul); color: var(--modul-text); }
/* Spalten wie ein Mauerwerk: kurze Bereiche füllen die Lücken (kompakt) */
.ansicht-raster { columns: 3 360px; column-gap: 18px; }
.ansicht-raster + .meta { margin-top: 8px; }
.ansicht-karte {
    break-inside: avoid; margin: 0 0 18px; padding: 16px 18px 12px;
    background: var(--weiss); border: 1px solid var(--border); border-radius: var(--radius);
}
.ansicht-karte h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 15px; }
.ansicht-karte h2 .form-gruppe-icon { width: 28px; height: 28px; }
.ansicht-karte.ist-leer { padding-bottom: 14px; }
.ansicht-karte.ist-leer h2 { margin-bottom: 4px; color: var(--text-muted); }
.ansicht-keine { margin: 0 0 0 38px; font-size: 13.5px; }
.ansicht-link { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--modul-text); }
.ansicht-liste { margin: 0; }
.ansicht-zeile { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; padding: 6px 0; border-top: 1px solid #f0f0f3; font-size: 14px; }
.ansicht-zeile:first-child { border-top: 0; }
.ansicht-zeile dt { color: var(--text-muted); }
.ansicht-zeile dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ansicht-zeile dd a { color: var(--text); font-weight: 550; }
.ansicht-zeile dd a:hover { color: var(--modul-text); }
.ansicht-zeile dd small { display: block; font-size: 12.5px; }
.ansicht-text { display: block; white-space: normal; line-height: 1.5; }
.ansicht-feldbild { max-width: 140px; max-height: 100px; border-radius: 8px; border: 1px solid var(--border); }
.ansicht-verknuepft, .ansicht-dokumente { list-style: none; margin: 0; padding: 0; }
.ansicht-verknuepft li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid #f0f0f3; font-size: 14px; }
.ansicht-verknuepft li:first-child, .ansicht-dokumente li:first-child { border-top: 0; }
.ansicht-verknuepft a, .ansicht-dokumente a { font-weight: 600; color: var(--text); }
.ansicht-dokumente li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid #f0f0f3; font-size: 14px; }
.ansicht-dokumente li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ansicht-dokumente .dokument-kuerzel { flex: none; width: 38px; padding: 3px 0; text-align: center; border-radius: 6px; background: #f4f4f7; }
@media (max-width: 860px) {
    .ansicht-bild { width: 60px; height: 60px; }
    .ansicht-aktionen { width: 100%; }
    .ansicht-aktionen .btn { flex: 1; }
}
@media print {
    .sidebar, .kopfzeile, .ansicht-aktionen, .breadcrumb { display: none !important; }
    .ansicht-raster { columns: 2; }
}

/* Dashboard */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 30px; }
.kennzahl {
    --k: var(--awo-rot);
    display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; text-decoration: none; color: var(--text);
    background: var(--weiss); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: inset 4px 0 0 var(--k); transition: box-shadow .15s, transform .15s;
}
a.kennzahl:hover { transform: translateY(-1px); box-shadow: inset 4px 0 0 var(--k), 0 8px 22px rgba(0, 0, 0, .06); }
.kennzahl-wert { font-size: 32px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kennzahl-text { font-size: 13.5px; color: var(--text-muted); }
.kennzahl-gruen { --k: var(--awo-gruen); }
.kennzahl-orange { --k: var(--awo-orange); }
.kennzahl-blau { --k: var(--awo-blau); }
.kennzahl-violett { --k: var(--awo-violett); }
.abschnitt-titel { margin: 0 0 14px; font-size: 18px; }
.kategorie-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.kategorie-kachel {
    --f: var(--awo-blau); --f-hell: #e0f4fc; --f-text: #00709e;
    display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 16px;
    background: var(--weiss); border: 1px solid var(--border); border-radius: var(--radius);
    border-top: 4px solid var(--f); transition: box-shadow .15s;
}
.kategorie-kachel:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .07); }
.farbe-gruen   { --f: var(--awo-gruen);   --f-hell: #edf6e2; --f-text: #4a7a16; }
.farbe-violett { --f: var(--awo-violett); --f-hell: #eceefa; --f-text: #4b5596; }
.farbe-orange  { --f: var(--awo-orange);  --f-hell: #fdeee2; --f-text: #b2570a; }
.farbe-gelb    { --f: var(--awo-gelb);    --f-hell: #fff6d6; --f-text: #8a6d00; }
.farbe-grau    { --f: #9a9aa2;            --f-hell: #f0f0f3; --f-text: #5c5c64; }
.kategorie-kopf { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.kategorie-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--f-hell); color: var(--f-text); }
.kategorie-icon .icon { width: 25px; height: 25px; }
.kategorie-name { font-size: 16px; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.kategorie-zahl { margin-left: auto; font-size: 34px; font-weight: 750; line-height: 1; color: var(--f-text); font-variant-numeric: tabular-nums; }
.kategorie-kopf:hover .kategorie-name { text-decoration: underline; }
.kategorie-kachel.ist-leer { border-top-color: var(--border); }
.kategorie-kachel.ist-leer .kategorie-zahl, .kategorie-kachel.ist-leer .kategorie-icon { color: #a5a5ad; background: #f4f4f7; }
.kategorie-kachel.ist-leer .kategorie-zahl { background: none; }
.kategorie-leer { margin: 0; font-size: 13.5px; }
.status-balken { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: #f0f0f3; }
.balken-teil { min-width: 4px; }
.balken-1 { background: #b4b4bc; }              /* Unbekannt */
.balken-2 { background: var(--awo-violett); }   /* In Bestellung */
.balken-3 { background: var(--awo-gelb); }      /* In Vorbereitung */
.balken-4 { background: var(--awo-orange); }    /* Zur Abholung bereit */
.balken-5 { background: var(--awo-gruen); }     /* Im Einsatz */
.balken-6 { background: #55555d; }              /* Verschrottet */
.balken-7 { background: var(--awo-blau); }      /* Im Rücklauf */
.status-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.status-legende a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); text-decoration: none; }
.status-legende a:hover { color: var(--text); text-decoration: underline; }
.status-legende i { width: 9px; height: 9px; border-radius: 50%; }
.status-legende strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Konfiguration: Übersicht */
.konfig-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.konfig-kachel {
    display: flex; gap: 14px; padding: 18px; text-decoration: none; color: var(--text);
    background: var(--weiss); border: 1px solid var(--border); border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.konfig-kachel:hover { border-color: var(--modul); box-shadow: 0 8px 22px rgba(0, 0, 0, .06); transform: translateY(-1px); }
.konfig-kachel-text { display: flex; flex-direction: column; gap: 2px; }
.konfig-kachel-text strong { font-size: 15.5px; }
.konfig-kachel-text small { color: var(--text-muted); font-size: 13px; }
.konfig-kachel-text em { margin-top: 6px; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--modul-text); }

.nav-trenner {
    display: flex; align-items: center; gap: 8px;
    margin: 6px 12px 14px;
    font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #6f6f77;
}
.nav-trenner::before, .nav-trenner::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }



/* Startseite eines geplanten Programmbereichs */
.modul-plan { padding: 28px; }
.modul-plan-kopf { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.modul-plan-kopf h2 { margin: 2px 0 4px; font-size: 19px; }
.modul-plan-kopf p { margin: 0; max-width: 60ch; }
.modul-kachel-gross { width: 48px; height: 48px; border-radius: 12px; }
.modul-kachel-gross .icon { width: 26px; height: 26px; }
.modul-plan-liste { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.modul-plan-liste li { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fafafb; }
.modul-plan-liste strong { display: block; margin-bottom: 2px; }
.modul-plan-liste small { color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.modul-plan-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--modul-hell); color: var(--modul-text); }
.modul-plan-icon .icon { width: 18px; height: 18px; }

.brand {
    display: flex; align-items: center; gap: 12px;
    padding: 4px 10px 22px;
    text-decoration: none;
}
.brand-mark {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border-radius: 11px;
    background: var(--awo-rot);
    color: var(--weiss);
    box-shadow: 0 6px 18px rgba(204, 6, 5, .35);
}
.brand-mark .icon { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; letter-spacing: -.01em; }
.brand-text small { font-size: 12.5px; color: #a7a7ae; }

.nav { flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 18px; }
.nav-group-title {
    padding: 0 12px 6px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: #85858d;
}
.nav-item {
    position: relative;
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: #d6d6dc;
    text-decoration: none;
    font-weight: 500;
    transition: background .15s, color .15s;
}
a.nav-item:hover { background: rgba(255, 255, 255, .07); color: var(--weiss); }
.nav-item.is-active {
    background: var(--modul-text);
    color: var(--weiss);
}
.nav-item.is-disabled { color: #6c6c74; cursor: default; }
.nav-soon {
    margin-left: auto;
    font-style: normal; font-size: 10.5px; font-weight: 600;
    padding: 1px 7px; border-radius: 99px;
    background: rgba(255, 255, 255, .07); color: #8d8d95;
}
.sidebar-foot {
    padding: 12px 12px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 12.5px; color: #85858d;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }


.content {
    /* nutzt die Bildschirmbreite; nur auf sehr breiten Monitoren begrenzt, damit Zeilen lesbar bleiben */
    width: 100%;
    max-width: 1920px;
    padding: 36px clamp(20px, 3vw, 48px) 64px;
}

/* --------------------------------------------------------------------------
   Seitenkopf
   -------------------------------------------------------------------------- */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.eyebrow {
    margin: 0 0 4px;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .09em;
    color: var(--modul-text);
}
h1 {
    margin: 0;
    font-size: 30px; line-height: 1.15; font-weight: 750;
    letter-spacing: -.02em;
}
.page-sub { margin: 6px 0 0; color: var(--text-muted); }

.breadcrumb {
    display: flex; gap: 8px; align-items: center;
    margin-bottom: 14px;
    font-size: 13.5px; color: var(--text-muted);
}
.breadcrumb a { text-decoration: none; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--awo-rot); }

/* --------------------------------------------------------------------------
   Karten
   -------------------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-form { max-width: 1040px; padding: 28px; overflow: visible; }
/* Breite Bildschirme: Grunddaten links, Bereiche (Einrichtung, Einkauf, …) rechts */
@media (min-width: 1500px) {
    .card-form:has(.form-spalten), .card-form:has(.form-spalten) + .dokumente { max-width: 1440px; }
    .form-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
    .form-spalte-bereiche > .form-gruppe:first-child { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit; font-weight: 600; font-size: 14.5px;
    text-decoration: none; white-space: nowrap;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn-primary { background: var(--awo-rot); color: var(--weiss); box-shadow: 0 4px 14px rgba(204, 6, 5, .25); }
.btn-primary:hover { background: var(--awo-rot-dunkel); }

.btn-secondary { background: var(--weiss); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--schwarz); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: #ececf0; color: var(--text); }

.btn-danger { background: var(--awo-rot); color: var(--weiss); }
.btn-danger:hover { background: var(--awo-rot-dunkel); }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px;
    border: 0; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.icon-btn:hover { background: #efeff3; color: var(--text); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.icon-btn-danger:hover { background: var(--awo-rot-hell); color: var(--awo-rot); }

/* --------------------------------------------------------------------------
   Werkzeugleiste & Suche
   -------------------------------------------------------------------------- */
.toolbar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}
.search {
    position: relative;
    flex: 1 1 240px; max-width: 560px;
}
.search .icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); pointer-events: none;
}
.search input {
    width: 100%; height: 40px;
    padding: 0 12px 0 40px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--weiss);
    font: inherit; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.select-wrap select, .field select {
    height: 40px;
    padding: 0 38px 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--weiss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
    font: inherit; color: var(--text);
    appearance: none; -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.select-wrap select { max-width: 250px; }
.select-wrap select:focus, .field select:focus { outline: none; border-color: var(--awo-rot); box-shadow: var(--focus); }
.search input:focus { outline: none; border-color: var(--awo-rot); box-shadow: var(--focus); }

/* --------------------------------------------------------------------------
   Tabelle
   -------------------------------------------------------------------------- */
.table-wrap { position: relative; overflow-x: auto; } /* relative: versteckte Beschriftungen bleiben im Rahmen */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 13px 18px; text-align: left; vertical-align: middle; }
.table thead th {
    background: #fafafb;
    border-bottom: 1px solid var(--border);
    font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-muted);
}
.table tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: #fbfbfc; }

.th-sort { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; white-space: nowrap; }
.th-sort:hover, .th-sort.is-sorted { color: var(--text); }
.th-sort .icon { width: 14px; height: 14px; color: var(--awo-rot); }

.cell-strong a { font-weight: 600; text-decoration: none; }
.cell-strong a:hover { color: var(--awo-rot); }

.col-kurz { width: 160px; }
.col-date { width: 190px; white-space: nowrap; font-size: 14px; }
.col-actions { width: 104px; text-align: right !important; white-space: nowrap; }

.muted { color: var(--text-muted); }
.table-foot { margin: 0; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13.5px; }

.col-num { width: 110px; text-align: center !important; font-variant-numeric: tabular-nums; }
.col-firma { width: 130px; }
.col-kontakt { font-size: 14px; }
.mail-link { color: var(--text-muted); text-decoration: none; word-break: break-all; }
.mail-link:hover { color: var(--awo-rot); text-decoration: underline; }
.count-link {
    display: inline-grid; place-items: center;
    min-width: 30px; height: 26px; padding: 0 8px;
    border-radius: 99px;
    background: #f0f0f4; color: var(--text);
    font-weight: 600; font-size: 13.5px; text-decoration: none;
}
.count-link:hover { background: var(--awo-rot-hell); color: var(--awo-rot); }

/* Kurzname-Etiketten in den AWO-Sekundärfarben */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 13px; font-weight: 700; letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.tag-0 { background: #eceefa; color: var(--awo-violett); }
.tag-1 { background: #fff6d6; color: #7a5b00; }
.tag-2 { background: #fdeedf; color: #b25600; }
.tag-3 { background: #e0f4fc; color: #00739f; }
.tag-4 { background: #edf6e2; color: #4d7a17; }

/* Leerer Zustand */
.empty { padding: 56px 24px; text-align: center; }
.empty-icon {
    display: inline-grid; place-items: center;
    width: 64px; height: 64px; margin-bottom: 14px;
    border-radius: 18px;
    background: var(--awo-rot-hell); color: var(--awo-rot);
}
.empty-icon .icon { width: 30px; height: 30px; }
.empty h2 { margin: 0 0 6px; font-size: 19px; }
.empty p { margin: 0 auto 20px; max-width: 420px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */
.field { margin-bottom: 22px; }
.field-short { max-width: 280px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.req { color: var(--awo-rot); }
.field input {
    width: 100%; height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--weiss);
    font: inherit; font-size: 15px; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.field select { width: 100%; height: 44px; padding-left: 14px; font-size: 15px; }
.has-error select { border-color: var(--awo-rot); background-color: #fffafa; }
.field-row { display: grid; grid-template-columns: 140px 1fr; gap: 16px; }
.field-row-half { grid-template-columns: 1fr 1fr; }
.form-section {
    margin: 8px 0 16px; padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--awo-rot);
}
.field input::placeholder { color: #a5a5ad; }
.field input:focus { outline: none; border-color: var(--awo-rot); box-shadow: var(--focus); }
.field textarea {
    width: 100%; min-height: 100px;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--weiss);
    font: inherit; font-size: 15px; line-height: 1.5; color: var(--text);
    resize: vertical;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea::placeholder { color: #a5a5ad; }
.field textarea:focus { outline: none; border-color: var(--awo-rot); box-shadow: var(--focus); }
.has-error textarea { border-color: var(--awo-rot); background: #fffafa; }
.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.field-error { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--awo-rot); }
.has-error input { border-color: var(--awo-rot); background: #fffafa; }

.meta { font-size: 13px; margin: 0 0 6px; }

.form-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 26px; padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Foto-Feld */
.label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.foto-feld { display: flex; gap: 20px; align-items: flex-start; }
.foto-vorschau {
    position: relative;
    flex: none;
    width: 200px; aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f0f0f4;
    border: 1px solid var(--border);
    transition: opacity .15s, filter .15s;
}
.foto-vorschau img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.foto-platzhalter {
    position: absolute; inset: 0;
    display: none; place-items: center;
    color: #b4b4bc;
}
.foto-vorschau.is-leer .foto-platzhalter { display: grid; }
.foto-vorschau.is-leer { border-style: dashed; border-color: var(--border-strong); }
.foto-platzhalter .icon { width: 36px; height: 36px; }
.foto-vorschau.is-entfernt { opacity: .35; filter: grayscale(1); }
.foto-aktionen { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
.foto-aktionen .field-hint { margin: 0; }
.foto-waehlen { position: relative; overflow: hidden; }
.foto-waehlen input[type=file] {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer;
    font-size: 0;
}
.foto-waehlen:focus-within { box-shadow: var(--focus); border-color: var(--awo-rot); }
.field label.btn { display: inline-flex; margin-bottom: 0; font-size: 14.5px; }
.field label.check { display: inline-flex; margin-bottom: 0; font-weight: 500; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--awo-rot); }
.has-error .foto-vorschau { border-color: var(--awo-rot); }

/* Vorschaubild in der Liste */
.einrichtung-link { display: inline-flex; align-items: center; gap: 12px; }
.thumb {
    flex: none;
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f4; color: #a5a5ad;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .icon { width: 18px; height: 18px; }

/* Combobox (durchsuchbare Auswahl) */
.combobox { position: relative; }
.field .combobox-input { padding-right: 76px; }
.combobox-toggle, .combobox-clear {
    position: absolute; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center;
    width: 30px; height: 30px;
    border: 0; border-radius: 7px;
    background: transparent; color: var(--text-muted);
    cursor: pointer;
}
.combobox-toggle { right: 8px; }
.combobox-clear { right: 40px; display: none; }
.combobox.hat-wert .combobox-clear { display: grid; }
.combobox-toggle:hover, .combobox-clear:hover { background: #efeff3; color: var(--text); }
.combobox-toggle svg, .combobox-clear svg { width: 16px; height: 16px; transition: transform .15s; }
.combobox.is-open .combobox-toggle svg { transform: rotate(180deg); }
.combobox-liste {
    position: absolute; z-index: 25;
    top: calc(100% + 6px); left: 0; right: 0;
    max-height: 300px; overflow-y: auto;
    margin: 0; padding: 6px;
    list-style: none;
    background: var(--weiss);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(20, 20, 20, .14);
}
.combobox-liste li[role=option] {
    display: flex; flex-direction: column;
    padding: 8px 12px 8px 34px;
    border-radius: 7px;
    cursor: pointer;
    position: relative;
}
.combobox-liste li.is-active { background: #f3f3f6; }
.combobox-liste li[aria-selected=true] { color: var(--awo-rot); }
.combobox-liste li[aria-selected=true]::before {
    content: ""; position: absolute; left: 13px; top: 13px;
    width: 10px; height: 6px;
    border-left: 2px solid var(--awo-rot); border-bottom: 2px solid var(--awo-rot);
    transform: rotate(-45deg);
}
.combobox-label { font-weight: 600; }
.combobox-sub { font-size: 13px; color: var(--text-muted); }
.combobox-liste mark { background: #fff1bf; color: inherit; border-radius: 3px; padding: 0 1px; }
.combobox-liste li.combobox-aktion {
    margin-top: 4px; padding: 9px 12px 9px 34px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 7px 7px;
    color: var(--awo-rot); font-weight: 600;
}
.combobox-liste li.combobox-aktion::before {
    content: "+"; position: absolute; left: 13px; top: 6px;
    font-size: 18px; font-weight: 600;
}
.combobox-liste li.combobox-aktion.is-active { background: var(--awo-rot-hell); }
.combobox-leer { padding: 10px 12px; color: var(--text-muted); font-size: 14px; }
.has-error .combobox-input { border-color: var(--awo-rot); background: #fffafa; }

/* Assets */
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; letter-spacing: .01em; }
.cell-strong .mono { font-weight: 700; }
.field input.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 15px; }
.status {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 3px 10px 3px 8px; border-radius: 99px;
    font-size: 13px; font-weight: 600; white-space: nowrap;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status-1 { background: #f0f0f4; color: #6b6b73; }                       /* Unbekannt */
.status-2 { background: #eceefa; color: var(--awo-violett); }             /* In Bestellung */
.status-3 { background: #fdeedf; color: #b25600; }                        /* In Vorbereitung */
.status-4 { background: #fff6d6; color: #7a5b00; }                        /* Zur Abholung bereit */
.status-4 i { background: var(--awo-gelb); box-shadow: 0 0 0 1px #c99a00; }
.status-5 { background: #edf6e2; color: #4d7a17; }                        /* Im Einsatz */
.status-6 { background: #2a2a2e; color: #f2f2f2; }                        /* Verschrottet */
.status-7 { background: #e0f4fc; color: #00739f; }                        /* Im Rücklauf */

/* Status der SIM-Karten */
.sim-status-1 { background: #edf6e2; color: #4d7a17; }                    /* aktiv */
.sim-status-2 { background: #f0f0f4; color: #6b6b73; }                    /* gekündigt */

.nowrap { white-space: nowrap; }

/* Geheime Felder (PIN/PUK) ohne Berechtigung */
.field.field-geheim input[disabled] { background: #f4f4f6; color: #6b6b73; letter-spacing: .15em; cursor: not-allowed; }
.field.field-geheim input[disabled]::placeholder { letter-spacing: normal; font-family: inherit; }
.geheim-schloss { display: inline-flex; vertical-align: -2px; color: #8a8a93; }
.geheim-schloss .icon { width: 14px; height: 14px; }
.field select.select-status { width: 100%; height: 44px; padding-left: 14px; font-size: 15px; }

/* Bereiche im Formular (z. B. Einkauf, Einrichtung, Leasing) */
.form-gruppe {
    margin: 26px 0 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fbfbfc;
}
.form-gruppe + .form-gruppe { margin-top: 16px; }
.form-gruppe-kopf {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    list-style: none;
}
.form-gruppe-kopf::-webkit-details-marker { display: none; }
.form-gruppe-kopf strong { display: block; font-size: 15.5px; }
.form-gruppe-kopf small { display: block; font-size: 13px; color: var(--text-muted); }
.form-gruppe-icon {
    display: grid; place-items: center; flex: none;
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--modul-hell); color: var(--modul-text);
}
.form-gruppe-icon .icon { width: 17px; height: 17px; }
.form-gruppe-inhalt { padding: 2px 18px 2px; }
.form-gruppe-inhalt > .field:last-child, .form-gruppe-inhalt > .field-row:last-child .field { margin-bottom: 18px; }
.form-gruppe-klappbar > .form-gruppe-kopf { cursor: pointer; border-radius: var(--radius); }
.form-gruppe-klappbar > .form-gruppe-kopf:hover { background: #f4f4f7; }
.form-gruppe-klappbar > .form-gruppe-kopf:focus-visible { outline: none; box-shadow: var(--focus); }
.form-gruppe-pfeil { margin-left: auto; color: var(--text-muted); transition: transform .15s; }
.form-gruppe-klappbar[open] > .form-gruppe-kopf .form-gruppe-pfeil { transform: rotate(180deg); }
.form-gruppe-klappbar[open] > .form-gruppe-kopf { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.form-gruppe .field input, .form-gruppe .field textarea, .form-gruppe .field select { background-color: var(--weiss); }
.form-gruppe + .meta, .form-gruppe ~ .meta { margin-top: 18px; }

/* Eingabe mit Einheit (Euro) und Datum */
.input-einheit { position: relative; }
.input-einheit input { padding-right: 36px !important; text-align: right; font-variant-numeric: tabular-nums; }
.input-einheit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.datum-feld { position: relative; max-width: 220px; }
.field .datum-feld input[type=text] { padding-right: 44px; font-variant-numeric: tabular-nums; }
.datum-knopf {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 36px; height: 36px;
    border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer;
}
.datum-knopf:hover { background: var(--modul-hell); color: var(--modul-text); }
.datum-knopf:focus-visible { outline: 2px solid var(--modul); outline-offset: 1px; }
.datum-knopf .icon { width: 18px; height: 18px; }
.datum-picker { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.info-feld {
    display: flex; align-items: center; min-height: 44px; padding: 0 14px;
    border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
    background: #f7f7f9; font-size: 15px; color: var(--text);
}
.field-info .label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.ausgabe-feld {
    display: flex; align-items: center; justify-content: flex-end;
    width: 100%; height: 44px; padding: 0 36px 0 14px;
    border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
    background: #f7f7f9; font-size: 15px; font-weight: 600; color: var(--text);
    font-variant-numeric: tabular-nums;
}
.field input[type=date] { font-variant-numeric: tabular-nums; }

/* Rechte-Matrix (Benutzergruppen) */
.rechte-hinweis { margin: -6px 0 16px; }
.rechte-matrix { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 20px; }
.rechte-matrix table { width: 100%; border-collapse: collapse; }
.rechte-matrix th, .rechte-matrix td { padding: 9px 16px; text-align: left; font-size: 14.5px; }
.rechte-matrix thead th {
    background: #fafafb; border-bottom: 1px solid var(--border);
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
    vertical-align: bottom;
}
.rechte-matrix tbody th[scope=row] { font-weight: 500; }
.rechte-matrix tbody tr + tr { border-top: 1px solid #f0f0f3; }
.rechte-matrix tbody tr:not(.rechte-gruppe):hover { background: #fbfbfc; }
.rechte-gruppe th {
    padding-top: 14px !important; padding-bottom: 6px !important;
    font-size: 11px !important; font-weight: 700 !important;
    text-transform: uppercase; letter-spacing: .08em; color: var(--awo-rot);
    background: var(--weiss);
}
.rechte-spalte { width: 130px; text-align: center !important; }
.rechte-spalte > span { display: block; }
.rechte-alle {
    display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
    font-size: 11.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted);
    cursor: pointer;
}
.rechte-alle input { width: 14px; height: 14px; accent-color: var(--awo-rot); cursor: pointer; }
.recht-check { display: inline-grid; place-items: center; cursor: pointer; padding: 4px; }
.recht-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.recht-check span {
    display: grid; place-items: center;
    width: 22px; height: 22px;
    border: 2px solid var(--border-strong); border-radius: 6px;
    background: var(--weiss);
    transition: background .12s, border-color .12s;
}
.recht-check span::after {
    content: ""; width: 10px; height: 5px; margin-top: -3px;
    border-left: 2.5px solid var(--weiss); border-bottom: 2.5px solid var(--weiss);
    transform: rotate(-45deg); opacity: 0;
}
.recht-check:hover span { border-color: var(--awo-rot); }
.recht-check input:checked + span { background: var(--awo-rot); border-color: var(--awo-rot); }
.recht-check input:checked + span::after { opacity: 1; }
.recht-check input:focus-visible + span { box-shadow: var(--focus); }
.recht-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 99px;
    font-size: 12.5px; font-weight: 600;
}
.recht-chip b { font-variant-numeric: tabular-nums; }
.recht-bearbeiten { background: #e0f4fc; color: #00739f; }
.recht-loeschen { background: var(--awo-rot-hell); color: var(--awo-rot-dunkel); }

/* Benutzerkonto */
.check-gross { align-items: flex-start !important; gap: 12px !important; font-size: 15px !important; }
.check-gross input { width: 18px !important; height: 18px !important; margin-top: 2px; }
.check-gross .field-hint { display: block; margin-top: 2px; }
.login-badge {
    display: inline-flex; align-items: center; gap: 4px;
    margin-left: 4px; padding: 2px 8px; border-radius: 99px;
    background: #eff7e6; color: #3b5f12; font-size: 12px; font-weight: 600;
    vertical-align: middle;
}
.login-badge .icon { width: 12px; height: 12px; }

/* Personen */
.person-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.person-link:hover strong { color: var(--awo-rot); }
.avatar {
    flex: none;
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 14px; font-weight: 700; letter-spacing: .02em;
}
.avatar-0 { background: #eceefa; color: var(--awo-violett); }
.avatar-1 { background: #fff6d6; color: #7a5b00; }
.avatar-2 { background: #fdeedf; color: #b25600; }
.avatar-3 { background: #e0f4fc; color: #00739f; }
.avatar-4 { background: #edf6e2; color: #4d7a17; }
.small { font-size: 13px; }
.kontakt-liste { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.kontakt-liste li { display: flex; align-items: center; gap: 7px; line-height: 1.7; }
.kontakt-liste .icon { width: 14px; height: 14px; color: #a5a5ad; }
.kontakt-liste a { text-decoration: none; color: var(--text); }
.kontakt-liste a:hover { color: var(--awo-rot); text-decoration: underline; }
.col-user { width: 210px; }
.user-tag {
    display: inline-block; padding: 2px 8px;
    border-radius: 6px; background: #f0f0f4;
    font: 600 13px ui-monospace, SFMono-Regular, Consolas, monospace;
}
.plain-link { text-decoration: none; }
.ext-link { display: inline-flex; align-items: center; gap: 5px; color: var(--text); text-decoration: none; font-size: 14px; }
.ext-link .icon { width: 13px; height: 13px; color: #a5a5ad; }
.ext-link:hover { color: var(--awo-rot); }
.ext-link:hover .icon { color: var(--awo-rot); }
.col-neben { font-size: 14px; }
.cell-strong a.tag { font-weight: 700; }
a.tag { text-decoration: none; }
a.tag:hover { filter: brightness(.96); text-decoration: underline; }
.plain-link:hover { color: var(--awo-rot); text-decoration: underline; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 10px;
    border-radius: 99px;
    background: var(--awo-rot-hell); color: var(--awo-rot-dunkel);
    font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.chip .icon { width: 15px; height: 15px; }
.chip:hover { background: #fbd9d8; }
.info-box {
    display: flex; gap: 12px; align-items: flex-start;
    margin: 4px 0 20px; padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: #f6f6f9; font-size: 14px;
}
.info-box .icon { color: var(--awo-rot); margin-top: 2px; }
.info-box a { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------------
   Meldungen
   -------------------------------------------------------------------------- */
.flash {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 12px 12px 16px;
    margin-bottom: 18px;
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    font-weight: 500;
    animation: flash-in .25s ease-out;
}
.flash-erfolg { background: #eff7e6; border-color: var(--awo-gruen); color: #3b5f12; }
.flash-fehler { background: var(--awo-rot-hell); border-color: var(--awo-rot); color: #8d0403; }
.flash-info   { background: #e6f5fc; border-color: var(--awo-blau); color: #005f87; }
.flash-close {
    display: grid; place-items: center;
    width: 28px; height: 28px; border: 0; border-radius: 7px;
    background: transparent; color: inherit; opacity: .6; cursor: pointer;
}
.flash-close:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
.flash.is-leaving { opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }

@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } }

/* --------------------------------------------------------------------------
   Dialog
   -------------------------------------------------------------------------- */
.dialog {
    width: min(440px, calc(100vw - 32px));
    padding: 0;
    border: 0; border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
    color: var(--text);
}
.dialog > form { padding: 28px; }
.dialog::backdrop { background: rgba(20, 20, 20, .45); backdrop-filter: blur(2px); }
.dialog[open] { animation: dialog-in .18s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialog-icon {
    display: grid; place-items: center;
    width: 48px; height: 48px; margin-bottom: 14px;
    border-radius: 14px;
    background: var(--awo-rot-hell); color: var(--awo-rot);
}
.dialog-icon .icon { width: 24px; height: 24px; }
.dialog h2 { margin: 0 0 8px; font-size: 20px; }
.dialog p { margin: 0; color: var(--text-muted); }
.dialog p strong { color: var(--text); }
.dialog-form { width: min(580px, calc(100vw - 32px)); }
.dialog-form .field { margin-bottom: 16px; }
.dialog-form .field-hint { margin: -4px 0 0; }
.dialog-kopf { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.dialog-kopf .dialog-icon { margin-bottom: 0; flex: none; }
.dialog-kopf h2 { margin: 2px 0 4px; }
.dialog-icon-neutral { background: #eceefa; color: var(--awo-violett); }
.field-ok {
    margin: 8px 0 0; padding: 8px 12px;
    border-radius: 8px; background: #eff7e6; color: #3b5f12;
    font-size: 13.5px; font-weight: 600;
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }


/* ==========================================================================
   Anmeldung & Benutzerkonto
   ========================================================================== */
.seite-einfach {
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 50% -10%, var(--awo-rot-hell), transparent 70%),
        var(--bg);
}
.einfach { width: min(440px, calc(100vw - 32px)); margin: 0 auto; padding: 56px 0 48px; }
.einfach-marke { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; }
.einfach-marke .brand-text strong { font-size: 19px; }
.einfach-marke .brand-text small { color: var(--text-muted); }
.einfach-karte {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--awo-rot);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 30px 26px;
}
.einfach-karte h1 { font-size: 24px; margin-bottom: 6px; }
.einfach-sub { margin: 0 0 20px; color: var(--text-muted); }
.einfach-link { margin: 18px 0 0; text-align: center; font-size: 14px; }
.einfach-link a { color: var(--text-muted); }
.einfach-link a:hover { color: var(--awo-rot); }
.btn-breit { width: 100%; height: 46px; margin-top: 6px; }
.einfach-karte code { font-size: 13px; background: #f0f0f4; padding: 1px 5px; border-radius: 5px; }

.passwort-eingabe { position: relative; }
.passwort-eingabe input { padding-right: 48px !important; }
.passwort-zeigen { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.passwort-zeigen.is-aktiv { color: var(--awo-rot); }
.field-hint.ok { color: #4d7a17; font-weight: 600; }

/* Benutzer in der Seitenleiste */

/* Hinweisfenster "Keine Berechtigung" */
.dialog > .dialog-inhalt { padding: 28px; }
.dialog-icon-warnung { background: #fff6d6; color: #7a5b00; }

/* Benutzerkonto im Personenformular */
.feldgruppe { border: 0; margin: 0; padding: 0; min-width: 0; }
.feldgruppe[disabled] { opacity: .6; }
.combobox.is-gesperrt .combobox-input { background: #f5f5f7; cursor: not-allowed; }
.hinweis-zeile {
    display: flex; gap: 8px; align-items: flex-start;
    margin: -6px 0 16px; padding: 10px 12px;
    border-radius: var(--radius-sm); background: #f6f6f9;
    font-size: 13.5px; color: var(--text-muted);
}
.hinweis-zeile .icon { width: 16px; height: 16px; margin-top: 2px; color: #a5a5ad; }
.konto-status {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin: 4px 0 20px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.konto-status > div:first-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.konto-status .login-badge { margin-left: 0; }
.konto-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.konto-aktionen .btn { height: 36px; font-size: 13.5px; }
.einmal-link p { margin: 2px 0 10px; }
.kopier-zeile { display: flex; gap: 8px; }
.kopier-zeile input {
    flex: 1; min-width: 0; height: 38px; padding: 0 10px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font: 12.5px ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--weiss);
}

/* Mein Konto */
.angaben { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0 0 6px; }
.angaben div { min-width: 0; }
.angaben dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.angaben dd { margin: 3px 0 0; font-size: 15px; overflow-wrap: anywhere; }

/* Anmeldeprotokoll */
.protokoll-status { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; }
.protokoll-status i { width: 8px; height: 8px; border-radius: 50%; }
.protokoll-status.ok i { background: var(--awo-gruen); }
.protokoll-status.fehler i { background: var(--awo-rot); }
.protokoll-status.fehler { color: var(--awo-rot-dunkel); }
.rechte-zusatz { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Mobil
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .kopf-suche input, .kopf-suche input:focus { width: 220px; }
    .kopf-knopf-text { display: none; }
    .kopf-knopf { width: 38px; padding: 0; justify-content: center; }
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed; left: 0; z-index: 50;
        transform: translateX(-100%);
        transition: transform .22s ease-out;
    }
    body.menu-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    body.menu-open::after {
        content: ""; position: fixed; inset: 0; z-index: 40;
        background: rgba(20, 20, 20, .4);
    }

    .kopfzeile { padding: 0 10px; gap: 8px; height: 56px; }
    .kopfzeile .menu-toggle { display: inline-grid; }
    .kopf-trenner, .kopf-titel, .kopf-knopf-text, .benutzer-menue-name { display: none; }
    .kopf-bereich span:last-child { overflow: hidden; text-overflow: ellipsis; }
    .kopf-rechts { flex: none; gap: 4px; }
    .benutzer-menue > summary { padding-right: 2px; }
    .kopf-knopf { width: 38px; padding: 0; justify-content: center; }
    .kopf-suche { display: none; }
    .kopf-suche-mobil { display: inline-flex; }

    .content { padding: 22px 16px 48px; }
    h1 { font-size: 25px; }
    .page-head .btn { width: 100%; }

    .col-date { display: none; }
    .col-kurz { width: auto; }
    .col-num { display: none; }
    .col-firma { width: auto; }
    .select-wrap { flex: 1 1 100%; }
    .select-wrap select { max-width: none; width: 100%; }
    .field-row { grid-template-columns: 110px 1fr; gap: 12px; }
    .field-row-half { grid-template-columns: 1fr; gap: 0; }
    .form-gruppe-kopf { padding: 12px 14px; }
    .form-gruppe-inhalt { padding: 2px 14px; }
    .col-kontakt { display: none; }
    .col-user { display: none; }
    .angaben { grid-template-columns: 1fr; }
    .einfach { padding-top: 32px; }
    .einfach-karte { padding: 24px 20px; }
    .status { font-size: 12px; padding: 2px 8px 2px 7px; }
    .table td.col-neben:nth-child(n+3), .table th.col-neben:nth-child(n+3) { display: none; }
    .foto-feld { flex-direction: column; }
    .foto-vorschau { width: 100%; }
    .thumb { width: 36px; height: 36px; }
    .col-actions { width: 84px; }
    .icon-btn { width: 34px; }
    .table th, .table td { padding: 12px 12px; }
    .card-form { padding: 20px; }
    .field-short { max-width: none; }
}
