/* iOS-Look (Neues Design): wird nach Default.css/app.css/public.css geladen und überschreibt nur das Aussehen.
   Farbschema bleibt fase24 (Grün #E2EFDF / Limette #C0D22F / Grau-Grün #4B5547, Blau nur im Versicherungsbereich), Struktur und Klassen bleiben unverändert.
   Orientierung: Apple HIG – Systemschrift, gruppierter Hintergrund, abgerundete Karten, Pill-Buttons, Frosted-Glass-Navigation. */

:root {
    --ios-blue: #004C93;              /* nur Versicherungsbereich */
    --ios-accent: #4B5547;            /* Grau-Grün für Links, Fokus, Akzente */
    --ios-accent-rgb: 75, 85, 71;
    --ios-green: #C0D22F;
    --ios-icon-green: #7C8F00;         /* fase-Grün, abgedunkelt für Kontrast auf Weiß */
    --ios-green-soft: #E2EFDF;
    --ios-red: #D70015;
    --ios-bg: #F2F5F0;                 /* gruppierter Hintergrund, leicht grün getönt */
    --ios-card: #FFFFFF;
    --ios-fill: #F2F2F7;               /* Füllfarbe für Eingaben/Zebra */
    --ios-fill-2: #E5E5EA;
    --ios-separator: rgba(60, 60, 67, 0.18);
    --ios-label: #1C1C1E;
    --ios-label-2: #6C6C70;
    --ios-radius: 16px;
    --ios-radius-sm: 10px;
    --ios-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
    --ios-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---------- Grundlagen ---------- */
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Open Sans", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: var(--ios-label);
    background: var(--ios-bg);
    background-image: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hintergrundbild der Alt-Version (Rennrad): Arbeitsbereiche zeigen nur einen weich auslaufenden Streifen im Kopfbereich,
   Login und öffentliche Kundenseiten (PublicLayout) das Bild ganzflächig, diffus und aufgehellt. */
body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 760px;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(242, 245, 240, 0.35) 0%, rgba(242, 245, 240, 0.6) 100%),
        url(images/background.jpg) center top / cover no-repeat;
    filter: blur(4px) saturate(0.85);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 100%);
}
body:has(.login_site_content)::before,
body:has(.public-bg)::before {
    position: fixed;
    inset: -24px;
    height: auto;
    background:
        linear-gradient(180deg, rgba(242, 245, 240, 0.25) 0%, rgba(242, 245, 240, 0.55) 100%),
        url(images/background.jpg) center / cover no-repeat;
    filter: blur(6px) saturate(0.85);
    -webkit-mask-image: none;
    mask-image: none;
}
/* Öffentliche Registrierung: ohne Hintergrundbild */
body:has(.regHeader)::before { display: none; }

h1, h2, h3 { letter-spacing: -0.02em; color: var(--ios-label); }
main h1 { font-size: 28px; font-weight: 700; margin: 18px 0 12px; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }

a { color: var(--ios-accent); }
a:hover { text-decoration: none; opacity: 0.7; transition: opacity 0.2s var(--ios-ease); }
nav a, .nodecoration, a.button, .footer_copyright a { text-decoration: none; }

::selection { background: rgba(192, 210, 47, 0.45); }

/* ---------- Seitenrahmen ---------- */
.site_content {
    background: transparent;
    border-radius: 0;
    /* kein min() mit % bei display:table (Altsystem): Chrome behandelt die Breite dann als auto, Prozent-Floats (PolBox) rutschen untereinander. */
    display: flow-root;
    width: 94%;
    max-width: 1200px;
    padding-bottom: 20px;
}
.container_text { margin-left: auto; margin-right: auto; }

/* Admin-Suche: Ergebnisliste nutzt die gesamte Seitenbreite (20px Rand), unabhängig vom Seitenrahmen */
.ResultsFullWidth { width: calc(100vw - 40px); margin-left: calc(50% - 50vw + 20px); overflow-x: auto; }
.ResultsFullWidth .ResultList { width: 100%; }
@media (max-width: 1400px) { .ResultList.cards th, .ResultList.cards td { padding: 8px 6px; font-size: 13px; } }
/* Ergebnislisten (table.cards): sobald die Tabelle breiter als der Platz wird (Klasse .stacked, gesetzt von confirm.js), wird jede Zeile zur Karte, alle Angaben bleiben sichtbar */
.ResultsFullWidth:has(.ResultList.stacked) { width: calc(100% + 24px); margin-left: -12px; overflow-x: visible; }
.ResultList.cards.stacked { width: 100% !important; margin: 0 !important; }
.ResultList.cards.stacked, .ResultList.cards.stacked tbody { display: block; background: transparent; }
.ResultList.cards.stacked thead { display: none; }
.ResultList.cards.stacked tbody tr {
    display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: flex-start;
    background: var(--ios-card); border-radius: var(--ios-radius); box-shadow: var(--ios-shadow); padding: 10px 14px; margin: 0 0 12px;
    height: auto !important;
}
.ResultList.cards.stacked td:nth-child(n) { display: block; border: 0; padding: 2px 0; text-align: left !important; min-width: 0; overflow-wrap: anywhere; }
.ResultList.cards.stacked td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--ios-label-2); }
.ResultList.cards.stacked td[data-label]:empty { display: none; }
.ResultList.cards.stacked td[data-label] { flex: 1 1 150px; }
    .ResultList.cards.stacked td.c-dealer { flex-basis: 100%; font-weight: 600; }
    .ResultList.cards.stacked td.ico, .ResultList.cards.stacked td.act { flex: 0 0 auto; }

.header_bg { height: auto; padding: 18px 0 8px; display: block; }
.headerContainer { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.Logo { margin-top: 0; float: none; display: block; }
.headerContent { float: none; padding: 0; font-size: 15px; font-weight: 500; color: var(--ios-label-2); }

main { padding: 4px 0 10px; }

/* Footer */
.page_line { background: var(--ios-separator); height: 1px; margin-top: 24px; opacity: 0.6; }
.footer_copyright { font-family: inherit; color: var(--ios-label-2); font-size: 12px; }

/* Copyright-Zeile: eine Zeile, links/rechts verteilt, immer am unteren Seitenrand */
.container:has(> .site_content) { min-height: 100vh; display: flex; flex-direction: column; }
.container > .site_content { flex: 1 0 auto; display: flex; flex-direction: column; box-sizing: border-box; }
.site_content > .container_text:last-child { margin-top: auto; width: 100%; }
/* Login-Karte: nur so hoch wie ihr Inhalt; der Footer liegt als eigenes Element darunter am Seitenende */
.container > .login_site_content { flex: 0 0 auto; }
.container > .page_footer { margin-top: auto; width: 94%; max-width: 1200px; }
.footer_content { display: block; width: 100%; padding-top: 0; }
.footer_end { display: block; width: 100%; padding: 0 0 14px; }
/* Moderner Footer: schwebende Glas-Leiste wie die Navigation, dezente Typografie */
.footer_copyright {
    display: flex; float: none; width: 100%; box-sizing: border-box;
    justify-content: space-between; align-items: center; gap: 8px 16px;
    padding: 6px 4px; line-height: 16px;
    font-size: 11px; letter-spacing: 0.01em; color: var(--ios-label-2); opacity: 0.75;
    background: none; border: 0; border-radius: 0; box-shadow: none;
}
.footer_copyright a { color: inherit; font-weight: 400; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.footer_copyright a:hover { color: var(--ios-label); border-bottom-color: currentColor; }
@media (max-width: 560px) { .footer_copyright { flex-direction: column; align-items: flex-start; } }

/* ---------- Navigation (Frosted Glass, wie iOS-Tab-/Navigationsleiste) ---------- */
nav {
    position: sticky;
    top: 8px;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
    margin: 4px 0 8px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 0.5px solid var(--ios-separator);
    border-radius: 22px;
    box-shadow: var(--ios-shadow);
}
nav ul { display: block; padding: 0; margin: 0; letter-spacing: 0; }
nav ul li {
    background: transparent;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 16px;
    transition: background 0.2s var(--ios-ease);
}
nav ul li:hover {
    background: rgba(192, 210, 47, 0.18);
    color: var(--ios-icon-green);
    box-shadow: none;
    border-radius: 16px;
}
nav ul li a, nav .la { color: var(--ios-icon-green); }
nav .la-2x { font-size: 1.6em; vertical-align: middle; }

/* Untermenü als iOS-Kontextmenü */
nav ul li ul {
    top: calc(100% + 6px);
    width: 280px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    border: 0.5px solid var(--ios-separator);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
nav ul li:hover ul { border-radius: 14px; }
/* Unsichtbare Brücke über die Lücke (6px) zwischen Menüpunkt und Untermenü, damit :hover beim Hinunterfahren nicht abreißt */
nav ul li ul::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
nav ul li ul li { background: transparent; color: var(--ios-label); padding: 10px 12px; border-radius: 10px; }
nav ul li ul li a { color: var(--ios-icon-green); display: block; }
nav ul li ul li:hover { background: rgba(192, 210, 47, 0.35); border-radius: 10px; }

nav form.nav-logout button { color: var(--ios-icon-green); }

/* ---------- Karten (PolBox & Co) ---------- */
.PolBox {
    background: var(--ios-card);
    border-radius: var(--ios-radius);
    box-shadow: var(--ios-shadow);
    overflow: hidden;
    margin-left: 0;
    margin-right: 16px;
    margin-top: 16px;
}
.PolBoxHeader {
    background: var(--ios-green-soft);
    height: auto;
    padding: 12px 16px;
    border-radius: 0;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 0.5px solid var(--ios-separator);
}
.PolBoxText { font-size: 14px; padding: 14px 16px 18px; }

.site_content.printSection, .rightContainer, .navigation, .confirm-dialog {
    border-radius: var(--ios-radius);
}
.rightContainer, .navigation { box-shadow: var(--ios-shadow); }
.printSection { background: var(--ios-card); }

/* ---------- Formularelemente ---------- */
input, select, textarea {
    font-family: inherit;
    font-size: 15px;
    color: var(--ios-label);
    background: var(--ios-card);
    border: 1px solid var(--ios-separator);
    border-radius: var(--ios-radius-sm);
    padding: 8px 12px;
    transition: border-color 0.2s var(--ios-ease), box-shadow 0.2s var(--ios-ease);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ios-accent);
    box-shadow: 0 0 0 4px rgba(var(--ios-accent-rgb), 0.15);
}

/* Pflichtfeld- und Disabled-Leuchten des Altsystems entschärfen */
:required, .RequiredField {
    font-family: inherit;
    font-size: 15px;
    border: 1px solid var(--ios-separator);
    box-shadow: none;
}
:required:focus { box-shadow: 0 0 0 4px rgba(var(--ios-accent-rgb), 0.15); border-color: var(--ios-accent); }
input:required:invalid:not(:placeholder-shown):not(:focus) { border-color: var(--ios-red); }
/* Pflichtfelder dezent kennzeichnen: zarte Grüntönung und schmaler Balken im Grün der App (--ios-green-soft / --ios-icon-green) links (ohne Layoutverschiebung).
   Markiert wird per aria-required="true" (kein Browser-Pflichtfeld-Popup, die Prüfung bleibt serverseitig) oder required. */
:is(input, select, textarea)[aria-required="true"], :is(input, select, textarea):required {
    background-color: color-mix(in srgb, var(--ios-green-soft) 55%, transparent);
    box-shadow: inset 3px 0 0 var(--ios-icon-green);
}
:is(input, select, textarea)[aria-required="true"]:focus, :is(input, select, textarea):required:focus {
    box-shadow: inset 3px 0 0 var(--ios-icon-green), 0 0 0 4px rgba(var(--ios-accent-rgb), 0.15);
}
/* Ruhendes Label liegt im Feld: keine weiße Fläche auf der Tönung */
.did-floating-input[aria-required="true"]:placeholder-shown:not(:focus) ~ .did-floating-label { background: transparent; }
input[type=checkbox][aria-required="true"], input[type=radio][aria-required="true"], input[type=checkbox]:required, input[type=radio]:required {
    background-color: transparent;
    box-shadow: none;
}
:disabled {
    color: var(--ios-label-2);
    font-size: inherit;
    background: var(--ios-fill);
    border: 1px solid var(--ios-separator);
    box-shadow: none;
    padding: inherit;
    margin: inherit;
}
button:disabled, input[type=submit]:disabled, .button:disabled { opacity: 0.4; cursor: default; }

.did-floating-input, .did-floating-select { height: 44px; font-size: 15px; padding: 0 16px; border-radius: var(--ios-radius-sm); }
.did-floating-label { left: 12px; top: 12px; color: var(--ios-label-2); background: var(--ios-card); border-radius: 6px; font-size: 15px; }
.did-floating-input:focus ~ .did-floating-label,
.did-floating-select:focus ~ .did-floating-label,
.did-floating-input:not(:placeholder-shown) ~ .did-floating-label,
.did-floating-select:not([value=""]):valid ~ .did-floating-label,
.did-floating-select:disabled ~ .did-floating-label {   /* deaktivierte Felder (Nur-Lesen) gelten nie als :valid */
    top: -9px; font-size: 12px; font-weight: 500; color: var(--ios-label-2);
}
.did-floating-input:focus ~ .did-floating-label,
.did-floating-select:focus ~ .did-floating-label { color: var(--ios-accent); }
.did-floating-select:not([multiple]):not([size]) { background-position: right 14px top 50%; }
/* Dropdowns zeigen die Beschriftung immer oben auf dem Rand: Wert etwas nach unten, damit er nicht unter der Beschriftung klebt. */
select.did-floating-select { padding-top: 10px; padding-bottom: 0; }
textarea.did-floating-input { padding: 10px 16px; }

/* Radio/Checkbox: Systemakzent im Markenblau */
input[type=radio], input[type=checkbox] { accent-color: var(--ios-accent); height: 22px; width: 22px; box-shadow: none; }
input[type=file] { background: transparent; border: none; }
input[type=file]::file-selector-button {
    font-family: inherit; border: none; border-radius: 999px; padding: 8px 16px; margin-right: 10px;
    background: var(--ios-green-soft); color: var(--ios-label); cursor: pointer;
}

.validation-error, [role=alert], .error { color: var(--ios-red) !important; }
[role=status] { color: #248A3D; }
.ValidationSummary { color: var(--ios-red); font-weight: 600; }
.PolBoxText .hinweis, .hinweis { color: var(--ios-label-2); }

/* ---------- Buttons (Pill, gefüllt) ---------- */
input[type="submit"], .button, main button[type=submit], main a.button {
    background: var(--ios-green);
    color: #1C1C1E;
    height: auto;
    min-height: 44px;
    line-height: 1.25;
    padding: 10px 22px;
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.15s var(--ios-ease), filter 0.2s var(--ios-ease), opacity 0.2s var(--ios-ease);
}
input[type="submit"], main button[type=submit] { line-height: normal; }
input:hover[type="submit"], .button:hover, main button[type=submit]:hover, main a.button:hover {
    box-shadow: none;
    filter: brightness(0.96);
    text-decoration: none;
    opacity: 1;
}
input[type="submit"]:active, .button:active, main button[type=submit]:active, main a.button:active { transform: scale(0.97); filter: brightness(0.9); }
input[type="submit"]:focus-visible, .button:focus-visible, main button:focus-visible, main a.button:focus-visible {
    outline: none; box-shadow: 0 0 0 4px rgba(var(--ios-accent-rgb), 0.25);
}

/* Sekundäre Aktionen (Abbrechen/Zurück) */
.confirm-dialog-actions button:first-child:not(:last-child) { color: var(--ios-accent); }

/* Link-/Icon-Buttons bleiben transparent und ohne Pill */
main button.iconbtn, main button.linkbtn, main th button.sortbtn, nav form.nav-logout button {
    background: none; border-radius: 0; box-shadow: none; filter: none; transform: none; height: auto; line-height: inherit; padding: 0;
}
main button.linkbtn { color: var(--ios-accent); text-decoration: none; font-weight: 500; }
main button.iconbtn { color: var(--ios-accent); }
/* main button[type=submit] (app.css) setzt font-family: inherit und würde die Icon-Schrift überschreiben */
main button.iconbtn.la { font-family: "Line Awesome Free"; font-weight: 900; font-size: 2em; }
.nodecoration.la, a .la.nodecoration { color: var(--ios-accent); }

.navigation { background: var(--ios-card); padding: 14px 16px; }
.action_footer { text-align: right; }

/* ---------- Tabellen / Listen ---------- */
.ResultList {
    background: var(--ios-card);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--ios-radius);
    overflow: hidden;
    box-shadow: var(--ios-shadow);
    font-size: 14px;
}
.ResultList th, .ResultList td { padding: 10px 12px; border-bottom: 0.5px solid var(--ios-separator); }
.ResultList tr:last-child td { border-bottom: none; }
.ResultList thead th, .TableHeader, .StickyTableHeader {
    background: var(--ios-fill);
    color: var(--ios-label-2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: none;
    height: auto;
}
.StickyTableHeader { border-bottom: 0.5px solid var(--ios-separator); }
main th button.sortbtn { font-size: 12px; color: var(--ios-label-2); text-transform: uppercase; letter-spacing: 0.04em; }
/* Zebra: einheitlich dezent statt der kräftigen Altsystem-Farben */
.ResultList.alt-green tbody tr:nth-child(even),
.ResultList.alt-light tbody tr:nth-child(even),
.ResultList.alt-grey tbody tr:nth-child(even),
.ResultList.alt-dark tbody tr:nth-child(even) { background-color: rgba(226, 239, 223, 0.45); }
.ResultList tr:hover { background-color: rgba(var(--ios-accent-rgb), 0.07) !important; }
.ResultCount { color: var(--ios-label-2); }

/* ---------- Overlay / Dialoge (Alert-Sheet) ---------- */
.overlay {
    background: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.confirm-dialog {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    color: var(--ios-label);
    animation: ios-pop 0.22s var(--ios-ease);
}
@keyframes ios-pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
.progress-circle { border-color: rgba(255, 255, 255, 0.25); border-top-color: var(--ios-green); }

/* ---------- Login ---------- */
.login_site_content { width: 30%; min-width: 400px; max-width: 520px; box-sizing: border-box; margin-top: 8%; background: var(--ios-card); border-radius: 24px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1); padding: 24px 24px 8px; }
.login .Field_Login { width: 100%; box-sizing: border-box; height: 44px; }
.login input[type=submit] { width: 100%; }
.login td { padding: 6px 4px; }
.login label { color: var(--ios-label-2); font-size: 13px; }

/* ---------- Öffentliche Seiten (public.css) ---------- */
.text { font-family: inherit; border: 1px solid var(--ios-separator); font-size: 15px; }
.loading {
    font-family: inherit; border: none; border-radius: var(--ios-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.rightContainer, .navigation { background: var(--ios-card); }

/* ---------- Schmale Bildschirme ---------- */
@media only screen and (max-width: 800px) {
    main h1 { font-size: 24px; }
    nav { top: 4px; border-radius: 18px; }
    nav ul li { padding: 6px 10px; }
    .PolBox { margin-right: 0 !important; margin-left: 0 !important; width: 100% !important; }
    .site_content { width: calc(100% - 16px) !important; margin-left: auto !important; margin-right: auto !important; }
    .login_site_content { width: calc(100% - 24px) !important; min-width: 0; }
    .did-floating-input, .did-floating-select { font-size: 16px !important; height: 48px !important; } /* 16px verhindert Auto-Zoom in iOS Safari */
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---------- Druck: iOS-Optik zurücknehmen ---------- */
@media print {
    body { background: #fff !important; }
    body::before { display: none !important; }
    .PolBox, .ResultList, .rightContainer, .printSection { box-shadow: none !important; }
    .PolBoxHeader, .ResultList thead th { background: #eee !important; }
}

/* Angemeldeter Benutzer rechts im Menü (führt zum Profil) */
nav ul.nav-user { margin-left: auto; }
nav ul.nav-user li a { display: flex; align-items: center; gap: 8px; }
nav ul.nav-user .la-2x { font-size: 1.4em; }
nav .nav-user-text { font-size: 14px; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media only screen and (max-width: 800px) { nav .nav-user-text { display: none; } }

/* ---------- Aktionsmenü (Registrierung: „Weitere Aktionen“) ---------- */
.action-menu { display: inline-block; position: relative; margin-right: 6px; }
.action-menu-backdrop { position: fixed; inset: 0; z-index: 9; }
.action-menu-list {
    position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 10;
    margin: 0; padding: 6px; list-style: none; min-width: 280px; text-align: left;
    background: var(--ios-card); border-radius: var(--ios-radius); box-shadow: var(--ios-shadow);
}
.action-menu-list li { background: transparent; padding: 0; }
.action-menu-list button {
    display: block; width: 100%; text-align: left; background: transparent; border: 0;
    padding: 10px 12px; border-radius: var(--ios-radius-sm); color: var(--ios-label); font-size: 15px;
}
.action-menu-list button:hover, .action-menu-list button:focus-visible { background: rgba(192, 210, 47, 0.35); }
.action-menu-list .danger button { color: darkred; }
main .action_footer .action-menu button + button { margin-left: 0; }

/* Zusammenfassung der Adminsuche als Balkendiagramm */
.SummaryChart { background: var(--ios-card); border-radius: var(--ios-radius); box-shadow: var(--ios-shadow); padding: 16px 20px; margin: 12px 0 20px; }
.SummaryChart header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.SummaryChart h2 { margin: 0; font-size: 1.05rem; color: var(--ios-blue); }
.SummaryChart .total { color: #6e6e73; font-size: .85rem; }
.SummaryChart ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.SummaryChart ul { gap: 2px; }
/* Zeile = Schaltfläche: Klick filtert die Trefferliste auf die Gruppe */
main .SummaryChart li button {
    display: grid; grid-template-columns: minmax(90px, 220px) 1fr auto; align-items: center; gap: 12px;
    width: 100%; height: auto; min-height: 0; margin: 0; padding: 5px 8px; border: 0; border-radius: 8px; background: none; box-shadow: none;
    color: inherit; font: inherit; line-height: inherit; letter-spacing: normal; text-align: left; cursor: pointer; filter: none; transform: none;
}
main .SummaryChart li button:hover, main .SummaryChart li button:focus-visible { background: var(--ios-fill); }
main .SummaryChart li button.active { background: rgba(192, 210, 47, 0.35); }
.SummaryChart .filter { margin: 10px 0 0; font-size: .85rem; color: #6e6e73; }
main .SummaryChart .filter button.linkbtn { font-size: inherit; text-decoration: underline; margin: 0; }
.SummaryChart .lbl { font-size: .9rem; overflow-wrap: anywhere; }
.SummaryChart .track { background: var(--ios-fill); border-radius: 999px; height: 14px; overflow: hidden; }
.SummaryChart .bar { display: block; height: 100%; min-width: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--ios-blue), var(--ios-icon-green)); }
.SummaryChart .val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.SummaryChart .val small { font-weight: 400; color: #6e6e73; margin-left: 6px; }
@media (max-width: 520px) { main .SummaryChart li button { grid-template-columns: 1fr auto; } .SummaryChart .track { grid-column: 1 / -1; grid-row: 2; } }

/* Datei-Upload (Shared/FileDrop.razor): ganze Fläche klick- und ablegbar, Zustände leer / gewählt / Fehler / Ziehen */
.file-drop-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 12px 0; }
.file-drop {
    position: relative; display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; min-height: 64px; box-sizing: border-box;
    background: var(--ios-card); border: 1.5px dashed rgba(var(--ios-accent-rgb), 0.35); border-radius: var(--ios-radius-sm);
    transition: border-color .2s var(--ios-ease), background-color .2s var(--ios-ease), box-shadow .2s var(--ios-ease);
}
.file-drop:hover, .file-drop.is-dragover { border-color: var(--ios-accent); background: rgba(192, 210, 47, 0.08); }
.file-drop.is-dragover { box-shadow: 0 0 0 4px rgba(192, 210, 47, 0.35); }
.file-drop:focus-within { border-color: var(--ios-accent); box-shadow: 0 0 0 3px rgba(var(--ios-accent-rgb), 0.25); }
.file-drop.is-filled { border-style: solid; border-color: rgba(124, 143, 0, 0.45); background: #FAFCF5; }
.file-drop.is-invalid { border-color: var(--ios-red); background: #FFF6F7; }
.file-drop.is-busy { opacity: .75; }
/* Unsichtbares, flächendeckendes Dateifeld: Klick und Drop landen direkt im nativen Input */
.file-drop input[type=file].file-drop-input {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
    opacity: 0; cursor: pointer; z-index: 1; font-size: 0;
}
.file-drop input[type=file].file-drop-input:disabled { cursor: progress; }
.file-drop-icon {
    flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: var(--ios-green-soft); color: var(--ios-icon-green); font-size: 18px;
}
.file-drop.is-filled .file-drop-icon { background: var(--ios-icon-green); color: #fff; }
.file-drop.is-invalid .file-drop-icon { background: rgba(215, 0, 21, 0.1); color: var(--ios-red); }
.file-drop-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-drop .file-drop-label { font-weight: 600; font-size: 15px; color: var(--ios-label); cursor: pointer; margin: 0; }
.file-drop-name { font-size: 14px; color: var(--ios-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-drop-meta { font-size: 13px; color: var(--ios-label-2); line-height: 1.35; }
.file-drop-meta strong { color: var(--ios-accent); font-weight: 600; }
.file-drop-ok { color: var(--ios-icon-green); font-weight: 600; }
.file-drop button.file-drop-remove {
    position: relative; z-index: 2; flex: 0 0 32px; width: 32px; height: 32px; min-height: 0; margin: 0; padding: 0;
    border: 0; border-radius: 50%; background: var(--ios-fill); color: var(--ios-label-2); box-shadow: none;
    display: grid; place-items: center; font-size: 14px; cursor: pointer; transform: none; filter: none;
}
.file-drop button.file-drop-remove:hover, .file-drop button.file-drop-remove:focus-visible { background: var(--ios-fill-2); color: var(--ios-red); }
.file-drop-error { margin: 4px 2px 0; font-size: 13px; }
.file-drop-hint { margin: 4px 2px 0; font-size: 13px; color: var(--ios-label-2); }
@media (prefers-reduced-motion: reduce) { .file-drop { transition: none; } }
.file-drop-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.file-drop-desc { font-size: 13px; color: var(--ios-label); }
.file-drop.is-required { border-color: rgba(215, 0, 21, 0.45); }
.file-drop.is-required .file-drop-icon { background: rgba(215, 0, 21, 0.08); color: var(--ios-red); }
.file-drop .doc-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; }
.file-drop .doc-badge-req { background: var(--ios-red); color: #fff; }
.file-drop .doc-badge-opt { background: var(--ios-fill); color: var(--ios-label-2); }
.file-drop-files { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 2px; }
.file-drop-files li { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.file-drop-files .file-drop-name { flex: 1 1 auto; min-width: 0; }
.file-drop-size { flex: 0 0 auto; font-size: 12px; color: var(--ios-label-2); font-variant-numeric: tabular-nums; }
