/* Raleway als variable Schrift (Schnitte 100 bis 900), lokal gebündelt, Lizenz SIL OFL 1.1 */
@font-face {
    font-family: Raleway;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/Raleway-Variable.woff2") format("woff2");
}

:root {
    color-scheme: light;

    /* Corporate Identity RaDigSol */
    --wz-azure: #005077;
    --wz-azure-dark: #003d5c;
    --wz-fiber-green: #95c11f;
    --wz-cobalt: #00223e;

    /* Semantische Farben, getrennt vom Akzent */
    --wz-danger: #b3261e;
    --wz-danger-bg: #fbe9e7;
    --wz-warning: #b26a00;
    --wz-warning-bg: #fff4e0;
    --wz-info-bg: #e6f0f5;

    --wz-text: #1b1b1b;
    --wz-muted: #5a5a5a;
    --wz-background: #f4f6f8;
    --wz-surface: #ffffff;
    --wz-border: #c9d1d8;
    --wz-link: #005077;
    --wz-heading: #00223e;
    --wz-touch: 48px;
    --wz-radius: 8px;
}

/* Dunkel: automatisch nach Gerät oder ausdrücklich gewählt. Kontrast bleibt hoch (Sonne, Handschuhe). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --wz-azure: #2a8fc0;
        --wz-azure-dark: #1f759f;
        --wz-danger: #ff8a80;
        --wz-danger-bg: #3a1c1a;
        --wz-warning: #ffb74d;
        --wz-warning-bg: #3a2a10;
        --wz-info-bg: #12303f;
        --wz-text: #e8edf2;
        --wz-muted: #a7b1bb;
        --wz-background: #0f1720;
        --wz-surface: #182230;
        --wz-border: #2e3d4d;
        --wz-link: #6fc3ec;
        --wz-heading: #e8edf2;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --wz-azure: #2a8fc0;
    --wz-azure-dark: #1f759f;
    --wz-danger: #ff8a80;
    --wz-danger-bg: #3a1c1a;
    --wz-warning: #ffb74d;
    --wz-warning-bg: #3a2a10;
    --wz-info-bg: #12303f;
    --wz-text: #e8edf2;
    --wz-muted: #a7b1bb;
    --wz-background: #0f1720;
    --wz-surface: #182230;
    --wz-border: #2e3d4d;
    --wz-link: #6fc3ec;
    --wz-heading: #e8edf2;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: Raleway, "Segoe UI", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.45;
    color: var(--wz-text);
    background: var(--wz-background);
}

h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 0.5rem; color: var(--wz-heading); }
h1:focus { outline: none; }
h2 { font-size: 1.2rem; font-weight: 600; margin: 0 0 0.75rem; color: var(--wz-azure); }
p { margin: 0 0 1rem; }
a { color: var(--wz-link); }
.muted { color: var(--wz-muted); }

/* App-Rahmen */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-header {
    display: flex; align-items: center; gap: 1rem;
    min-height: 56px; padding: 0 1rem;
    background: var(--wz-cobalt); color: #fff;
}
.brand { color: #fff; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.tenant-badge { display: flex; align-items: center; gap: 0.5rem; margin-right: auto; color: #cfe3ee; font-size: 0.95rem; min-width: 0; }
.tenant-badge img { height: 32px; width: auto; max-width: 120px; border-radius: 4px; background: #fff; padding: 2px; }
.tenant-badge span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .tenant-badge span { display: none; } }
.hours { display: flex; flex-direction: column; gap: 0.4rem; }
.hours-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.hours-day { min-width: 9rem; }
.time { font: inherit; min-height: var(--wz-touch); padding: 0 0.6rem; border: 2px solid var(--wz-border); border-radius: var(--wz-radius); background: var(--wz-surface); color: var(--wz-text); }
.logo-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logo-preview { max-height: 96px; max-width: 240px; background: #fff; padding: 4px; border-radius: var(--wz-radius); }
.user { font-weight: 600; }
.user-link { display: inline-flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; min-height: var(--wz-touch); }
/* Menü am eigenen Namen (WZ-215): Profil und weiteres Gerät anmelden. */
button.user-link { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.user-menu { position: relative; }
.user-menu-backdrop { position: fixed; inset: 0; z-index: 20; }
.user-menu-list {
    position: absolute; right: 0; top: calc(100% + 0.25rem); z-index: 21; min-width: 15rem;
    display: flex; flex-direction: column; padding: 0.25rem;
    background: var(--wz-surface); border: 1px solid var(--wz-border); border-radius: var(--wz-radius);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
}
.user-menu-list a, .user-menu-list button { display: flex; align-items: center; min-height: var(--wz-touch); padding: 0 0.75rem; color: var(--wz-text); text-decoration: none; font-weight: 600; border-radius: calc(var(--wz-radius) - 2px); }
.user-menu-list a:hover, .user-menu-list a:focus-visible, .user-menu-list button:hover, .user-menu-list button:focus-visible { background: var(--wz-background); }
/* Abmelden steht abgesetzt unten, damit es nicht aus Versehen statt des Profils getroffen wird. */
.user-menu-logout { font: inherit; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; margin-top: 0.25rem; border-top: 1px solid var(--wz-border) !important; border-radius: 0 0 calc(var(--wz-radius) - 2px) calc(var(--wz-radius) - 2px) !important; }
/* Am Handy steht der Name mitten in der Kopfzeile; ein am Namen ausgerichtetes Menü ragte links aus dem Bild. */
@media (max-width: 600px) {
    .user-menu-list { position: fixed; top: calc(56px + 0.25rem); left: 0.5rem; right: 0.5rem; min-width: 0; }
}

/* QR-Code für ein weiteres Gerät und Scanner (WZ-215) */
.pairing { text-align: center; }
.pairing-qr svg { width: min(18rem, 100%); height: auto; background: #fff; padding: 0.75rem; border-radius: var(--wz-radius); }
.pairing-timer { margin-top: 0.75rem; }
.qr-scanner { display: flex; flex-direction: column; gap: 0.5rem; }
.qr-scanner-video { width: 100%; max-height: 60vh; border-radius: var(--wz-radius); background: #000; object-fit: cover; }
.avatar { border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; letter-spacing: 0.02em; }
.profile-head { display: flex; align-items: center; gap: 1rem; }
.profile-name { font-size: 1.3rem; }
@media (max-width: 480px) { .user { display: none; } }
.page { flex: 1; width: 100%; max-width: 64rem; margin: 0 auto; padding: 1rem 1rem 5rem; }
/* Neue Version (WZ-1208): oben angeheftet, damit sie auch weiter unten auf der Seite nicht übersehen wird. */
.update-banner {
    position: sticky; top: 0; z-index: 15;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
    padding: 0.5rem 1rem; background: var(--wz-info-bg); color: var(--wz-text);
    border-bottom: 3px solid var(--wz-azure);
}
.update-banner-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
/* Auf der Anmeldung steht der Hinweis oben im Fluss; die Karte bleibt im restlichen Platz mittig und wird nicht verdeckt. */
.login-shell .update-banner { align-self: stretch; margin: -1rem -1rem auto; }
.login-shell .update-banner + .login-card { margin-bottom: auto; }
.app-footer { order: 99; text-align: center; font-size: 0.8rem; padding: 0.5rem 1rem 5rem; color: var(--wz-muted); }
.app-footer a { color: inherit; }
@media (min-width: 900px) { .app-footer { padding-bottom: 1rem; } }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.9em; }

/* Navigation: unten am Handy, oben am Desktop */
.app-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
    display: flex; justify-content: space-around;
    background: var(--wz-surface); border-top: 1px solid var(--wz-border);
}
.nav-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 60px; min-width: var(--wz-touch); flex: 1; padding: 0.4rem;
    color: var(--wz-muted); font-weight: 600; font-size: 0.85rem; text-decoration: none;
}
.nav-link.active { color: var(--wz-azure); box-shadow: inset 0 3px 0 var(--wz-azure); }
.nav-icon { font-size: 1.4rem; }
/* Beschriftungen nie ineinanderlaufen lassen: lieber abgeschnitten als unlesbar. */
.nav-link > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link.nav-more { font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; }

/* „Mehr“: am Handy ein Feld über der Leiste, am Desktop aufgelöst in eine Reihe. */
.nav-group { display: none; }
.nav-group.open {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    position: absolute; bottom: 100%; left: 0; right: 0;
    background: var(--wz-surface); border-top: 1px solid var(--wz-border);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 0.35); padding: 0.25rem;
}

@media (min-width: 900px) {
    .app-nav { position: static; justify-content: flex-start; padding: 0 1rem; border-top: 0; border-bottom: 1px solid var(--wz-border); }
    .nav-link { flex: 0 0 auto; flex-direction: row; gap: 0.5rem; min-height: 52px; padding: 0 1rem; }
    .nav-link.active { box-shadow: inset 0 -3px 0 var(--wz-azure); }
    .nav-link.nav-more { display: none; }
    /* display: contents – die Einträge stehen wieder unmittelbar in der Leiste, nichts ist verborgen. */
    .nav-group, .nav-group.open { display: contents; }
    .page { padding-bottom: 2rem; }
}

/* Karten und Tabellen */
.card { background: var(--wz-surface); border: 1px solid var(--wz-border); border-radius: var(--wz-radius); padding: 1rem; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; background: var(--wz-surface); border: 1px solid var(--wz-border); border-radius: var(--wz-radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--wz-border); vertical-align: middle; }
.table th { font-weight: 600; color: var(--wz-azure); }
.table tr.inactive td { color: var(--wz-muted); }
.table .actions { white-space: nowrap; }

/* Formulare: große Ziele, hoher Kontrast */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form-narrow { max-width: 28rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; }
.field input, .field select {
    font: inherit; font-weight: 400; min-height: var(--wz-touch); padding: 0 0.75rem;
    border: 2px solid var(--wz-border); border-radius: var(--wz-radius); background: var(--wz-surface); color: var(--wz-text);
}
.field input:focus, .field select:focus { outline: 3px solid var(--wz-fiber-green); outline-offset: 1px; border-color: var(--wz-azure); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: var(--wz-touch); min-width: var(--wz-touch); padding: 0 1.25rem;
    font: inherit; font-weight: 600; border-radius: var(--wz-radius); border: 2px solid transparent;
    cursor: pointer; text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--wz-fiber-green); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary { background: var(--wz-azure); color: #fff; }
.theme-toggle { min-width: var(--wz-touch); padding: 0 0.6rem; font-size: 1.2rem; }
.login-theme { display: flex; justify-content: center; margin-top: 1rem; }
.login-theme .btn-ghost { color: var(--wz-muted); }
.btn-primary:hover { background: var(--wz-azure-dark); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.app-header .btn-ghost { color: #fff; }
.btn-block { width: 100%; }

.alert { padding: 0.75rem 1rem; border-radius: var(--wz-radius); margin: 0; font-weight: 600; }
.alert-error { background: var(--wz-danger-bg); color: var(--wz-danger); border-left: 4px solid var(--wz-danger); }
.alert-info { background: var(--wz-info-bg); color: var(--wz-text); border-left: 4px solid var(--wz-azure); }

/* Farben wählen */
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.swatch { width: var(--wz-touch); height: var(--wz-touch); border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.selected { border-color: var(--wz-cobalt); box-shadow: 0 0 0 3px #fff inset; }
.swatch-input { font: inherit; min-height: var(--wz-touch); width: 8rem; padding: 0 0.75rem; border: 2px solid var(--wz-border); border-radius: var(--wz-radius); }
.color-dot { display: inline-block; width: 1.25rem; height: 1.25rem; border-radius: 50%; vertical-align: middle; }
.actions-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Auswahllisten */
.two-columns { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-columns { grid-template-columns: 1fr 1.4fr; align-items: start; } }
.pick-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; width: 100%; min-height: var(--wz-touch); padding: 0.6rem 0.9rem; font: inherit; text-align: left; background: var(--wz-surface); border: 2px solid var(--wz-border); border-radius: var(--wz-radius); cursor: pointer; }
.pick.selected { border-color: var(--wz-azure); background: var(--wz-info-bg); }
.pick.inactive strong { color: var(--wz-muted); text-decoration: line-through; }
.check-list { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1rem; }
.check { display: flex; align-items: center; gap: 0.75rem; min-height: var(--wz-touch); padding: 0 0.5rem; border-radius: var(--wz-radius); cursor: pointer; }
.check:hover { background: var(--wz-background); }
.check input { width: 1.5rem; height: 1.5rem; accent-color: var(--wz-azure); }
h3 { font-size: 1rem; margin: 0.75rem 0 0.5rem; color: var(--wz-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Arbeiten */
.work-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.work-card { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.75rem 1rem; background: var(--wz-surface); border: 1px solid var(--wz-border); border-left: 6px solid var(--wz-azure); border-radius: var(--wz-radius); }
.work-card.high { border-left-color: var(--wz-danger); }
.work-number { font-size: 0.85rem; color: var(--wz-muted); font-weight: 600; }
.choice { border: 0; padding: 0; margin: 0; }
.choice legend { font-weight: 600; margin-bottom: 0.25rem; }
textarea { font: inherit; padding: 0.5rem 0.75rem; border: 2px solid var(--wz-border); border-radius: var(--wz-radius); }

.work-title { font-weight: 700; color: var(--wz-heading); text-decoration: none; }
.work-title:hover { text-decoration: underline; }
.select { font: inherit; min-height: var(--wz-touch); padding: 0 0.75rem; border: 2px solid var(--wz-border); border-radius: var(--wz-radius); background: var(--wz-surface); }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }

/* Fotos und große Handlungen */
.btn-big { min-height: 64px; font-size: 1.15rem; margin-bottom: 0.75rem; }
.photo-button { cursor: pointer; margin-bottom: 0.75rem; }
.photo-preview { display: block; max-width: 100%; max-height: 40vh; border-radius: var(--wz-radius); margin-bottom: 0.5rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--wz-radius); display: block; }
.photo-grid a { text-decoration: none; font-size: 0.8rem; }

/* Arbeitsliste und Kanban */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; }
.field-inline { flex: 1 1 14rem; }
/* Datumsfeld (WZ-1203): das native Feld zeigt die Schreibweise des Browsers, daneben steht sie österreichisch. */
.date-field { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.date-field .input { flex: 1 1 10rem; }
.date-field-readout { color: var(--wz-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.segmented { display: inline-flex; border: 2px solid var(--wz-azure); border-radius: var(--wz-radius); overflow: hidden; }
.segmented button { font: inherit; font-weight: 600; min-height: var(--wz-touch); padding: 0 1.25rem; border: 0; background: var(--wz-surface); color: var(--wz-azure); cursor: pointer; }
.segmented button.active { background: var(--wz-azure); color: #fff; }
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; align-items: start; }
.kanban-column { background: var(--wz-background); border: 1px solid var(--wz-border); border-radius: var(--wz-radius); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; min-height: 14rem; }
.kanban-column h2 { display: flex; justify-content: space-between; margin: 0 0 0.25rem; font-size: 1rem; }
.count { background: var(--wz-surface); border-radius: 999px; padding: 0 0.6rem; color: var(--wz-muted); }
a.work-card { text-decoration: none; color: inherit; }
.work-card.overdue { border-left-color: var(--wz-danger); background: var(--wz-danger-bg); }
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; margin-left: 0.4rem; vertical-align: middle; }
.badge-high { background: var(--wz-danger); color: #fff; }
.badge-overdue { background: var(--wz-danger-bg); color: var(--wz-danger); }
.badge-warning { background: var(--wz-warning-bg); color: var(--wz-warning); }
.alert-warning { background: var(--wz-warning-bg); color: var(--wz-warning); }
.badge-done { background: var(--wz-fiber-green); color: #00223e; }
.sync-state { text-decoration: none; display: inline-flex; align-items: center; }
.table tr.overdue td:first-child { box-shadow: inset 4px 0 0 var(--wz-danger); }
.table tr.high td:first-child { box-shadow: inset 4px 0 0 var(--wz-warning); }
.table-note { padding: 0.5rem 0.75rem; }

/* Mitarbeiteransicht: große Karten, hoher Kontrast, mit Handschuhen bedienbar */
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.task { display: flex; flex-direction: column; gap: 0.3rem; min-height: 88px; padding: 0.9rem 1rem 0.9rem 1.1rem; background: var(--wz-surface); border: 2px solid var(--wz-border); border-left: 10px solid var(--task-color, var(--wz-azure)); border-radius: var(--wz-radius); color: var(--wz-text); text-decoration: none; }
.task:active { background: var(--wz-info-bg); }
.task.overdue { border-color: var(--wz-danger); border-left-color: var(--wz-danger); }
.task.high:not(.overdue) { border-color: var(--wz-warning); }
.task-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.task-category { font-size: 0.85rem; font-weight: 700; color: var(--wz-azure); text-transform: uppercase; letter-spacing: 0.03em; }
.task-title { font-size: 1.25rem; font-weight: 700; line-height: 1.25; color: var(--wz-heading); }
.task-meta { font-size: 0.95rem; color: var(--wz-muted); }
.task .badge { margin: 0; font-size: 0.8rem; padding: 0.2rem 0.6rem; }
.empty { text-align: center; padding: 2rem 1rem; }
.stand { margin-top: 1.5rem; font-size: 0.85rem; }
.desktop-only { display: none; }
@media (min-width: 900px) { .desktop-only { display: inline-flex; } }

/* Kanban: Ziehen und Ablegen */
.kanban-card { position: relative; }
.drag-handle { position: absolute; right: 0.4rem; top: 0.4rem; width: var(--wz-touch); height: var(--wz-touch); display: flex; align-items: center; justify-content: center; border-radius: var(--wz-radius); color: var(--wz-muted); cursor: grab; touch-action: none; user-select: none; font-size: 1.3rem; }
.drag-handle:active { cursor: grabbing; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 2000; pointer-events: none; opacity: 0.85; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.drag-source { opacity: 0.4; }
.kanban-wrap.dragging [data-drop] { outline: 2px dashed var(--wz-border); outline-offset: -2px; }
.kanban-wrap.dragging [data-drop].drop-allowed { outline-color: var(--wz-fiber-green); }
.kanban-wrap.dragging [data-drop].drop-blocked { outline-color: var(--wz-danger); opacity: 0.55; }
[data-drop].drop-over { background: var(--wz-info-bg) !important; }
.assign-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0.75rem; margin-bottom: 1rem; border: 2px dashed var(--wz-border); border-radius: var(--wz-radius); background: var(--wz-surface); opacity: 0.55; transition: opacity 0.15s; }
.kanban-wrap.dragging .assign-bar { opacity: 1; border-color: var(--wz-azure); }
.assign-bar strong { width: 100%; }
.assign-box { min-height: var(--wz-touch); min-width: 8rem; padding: 0 0.75rem; display: inline-flex; align-items: center; gap: 0.5rem; border: 2px solid var(--wz-border); border-radius: var(--wz-radius); background: var(--wz-background); font-weight: 600; }

/* Compliance */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 0; }
.facts dt { font-weight: 700; color: var(--wz-azure); }
.facts dd { margin: 0; }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 0.5rem; } }
.retention { width: 5.5rem; text-align: center; margin: 0 0.35rem; }
.segmented { margin-bottom: 1rem; }

/* Anmeldung */
.login-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; background: var(--wz-cobalt); }
.login-card { width: 100%; max-width: 24rem; background: var(--wz-surface); border-radius: 12px; padding: 1.5rem; }
.login-title { text-align: center; color: var(--wz-azure); font-size: 2rem; margin: 0; }
.login-subtitle { text-align: center; color: var(--wz-muted); margin-bottom: 1.25rem; }

.loading { display: flex; align-items: center; justify-content: center; min-height: 100vh; color: var(--wz-azure); font-size: 1.25rem; }

#blazor-error-ui {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    padding: 1rem 3rem 1rem 1rem; background: var(--wz-warning-bg); color: var(--wz-text);
    border-top: 4px solid var(--wz-warning); font-weight: 600;
}
#blazor-error-ui .reload { color: inherit; }
#blazor-error-ui .dismiss { position: absolute; right: 1rem; top: 1rem; cursor: pointer; }

/* Warteschlange (WZ-604) */
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { padding: 0.75rem 0; border-bottom: 1px solid var(--wz-border); }
.queue li:last-child { border-bottom: 0; }
.queue li.rejected { border-left: 4px solid var(--wz-danger); padding-left: 0.75rem; }
.queue .alert { margin: 0.5rem 0; }

/* Hinweiskarte auf der Startseite (WZ-608) */
.notice-card { display: flex; flex-direction: column; gap: 0.25rem; text-decoration: none; color: inherit; border-left: 4px solid var(--wz-warning); }
.field.check { flex-direction: row; align-items: center; gap: 0.5rem; }

/* Sperrbildschirm (WZ-203) */
.lock-screen { max-width: 28rem; margin: 2rem auto; padding: 1.5rem; background: var(--wz-surface); border: 1px solid var(--wz-border); border-radius: var(--wz-radius); display: flex; flex-direction: column; gap: 0.75rem; }
.lock-screen .form { gap: 0.75rem; }

.queue li.unread { border-left: 4px solid var(--wz-azure); padding-left: 0.75rem; }

/* Karte (E7) */
.map { width: 100%; height: 22rem; border-radius: var(--wz-radius); border: 1px solid var(--wz-border); }
.map.large { height: calc(100vh - 14rem); min-height: 20rem; }
/* Vorschau an der Arbeit (WZ-708): groß genug zum Erkennen der Straße, klein genug, um daran vorbeizublättern. */
.map.map-preview { height: 14rem; margin-top: 0.5rem; }
.geo-results { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.geo-results li button { width: 100%; text-align: left; }

/* Nachweis und Druck (WZ-1003/1004) */
.proof { max-width: 52rem; }
.proof .photo-grid img { max-height: 18rem; object-fit: contain; }
.proof table { width: 100%; border-collapse: collapse; }
.proof th, .proof td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--wz-border); vertical-align: top; }
@media print {
    .app-header, .app-nav, .app-footer, .no-print, .sync-state { display: none !important; }
    .page { padding: 0; }
    body { background: #fff; color: #000; }
    .card { border: 0; box-shadow: none; page-break-inside: avoid; }
    a { color: #000; text-decoration: none; }
}

/* Betreiberbereich (WZ-105) */
.platform .app-header { margin-bottom: 1rem; }
.login-card-inline { max-width: 26rem; }
.detail-row > td { background: rgba(0, 80, 119, 0.06); }
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.log-list li { border-bottom: 1px solid var(--wz-border); padding-bottom: 0.35rem; }

/* Einladung mit QR-Code (WZ-213) */
.invitation-card { max-width: 32rem; }
.invitation-card .qr { display: flex; justify-content: center; padding: 1rem 0; }
.invitation-card .qr svg { width: 100%; max-width: 16rem; height: auto; }
.invitation-card input { font-family: ui-monospace, monospace; font-size: 0.85rem; }

/* Einrichtung (WZ-906) */
.steps { margin: 0.5rem 0 0 1.2rem; display: grid; gap: 0.35rem; }

/* WZ-216: Einmalcodes groß und gut lesbar, zum Abschreiben und Ausdrucken. */
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem 1.5rem; padding-left: 1.5rem; font-size: 1.15rem; }
.recovery-codes code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.05em; }
