.fi-logo{display:block;width:230px;max-width:100%;height:auto;background:#fff;border-radius:4px;padding:4px}
.fi-brandmark{display:block;position:relative;width:230px;max-width:100%;padding:4px;flex-shrink:0}
.fi-brandmark .fi-logo{width:100%;padding:0}
.fi-emblem{display:none;position:absolute;left:4px;top:4px;width:calc(100% - 8px);height:auto;clip-path:ellipse(11.28% 42.33% at 11.28% 42.33%)}
.theme-toggle{border:1px solid var(--border);background:var(--card);color:var(--text);padding:7px 12px;cursor:pointer;white-space:nowrap;font:inherit;border-radius:7px}
.theme-toggle:focus-visible{outline:2px solid #519aca;outline-offset:3px}
.auth-card>.theme-toggle{margin-top:16px}
@media screen {
html[data-theme=dark]{color-scheme:dark;--bg:#111923;--card:#1b2734;--text:#e3eaf1;--muted:#adbdcc;--border:#3a4b5d;--border-dark:#53687c;--fia-dark:#e3eaf1;--fia-dark-2:#cbd9e5;--fia-accent:#8dc8ee;--fia-accent-light:#253e52;--success:#a5dfb5;--success-bg:#183e30;--warning:#f6d28b;--warning-bg:#443619;--danger:#ffc0c0;--danger-bg:#482a31}
html[data-theme=dark] body{background:var(--bg);color:var(--text)}
html[data-theme=dark] :is(.topbar,.card,.card-title,.auth-card){background:var(--card);color:var(--text);border-color:var(--border)}
html[data-theme=dark] :is(input,select,textarea){background:#131e2a;color:var(--text);border-color:#53687c}
html[data-theme=dark] :is(a,.top-link){color:#9bd2f5!important}
html[data-theme=dark] :is(.button,button){background:#2b4053;color:#edf5fb;border-color:#53687c}
html[data-theme=dark] .button.primary{background:#245f85;color:white!important}
html[data-theme=dark] :is(.muted,.muted-small,.section-note,.source-line,.subtitle,.field-help,.analysis-stat-label,.overview-label,.overview-facts dt,.bm-data dt,.page-head p){color:var(--muted)}
html[data-theme=dark] :is(.source-box,.admin-check,.legal-box,.analysis-stat,.workspace-nav,.upload-zone){background:#223243;color:var(--text);border-color:var(--border)}
html[data-theme=dark] :is(.admin-check-title,.analysis-stat-number){color:var(--text)}
html[data-theme=dark] :is(.case-table th,.workspace-nav a[aria-current=page]){background:#2b4053;color:var(--text)}
html[data-theme=dark] :is(.case-table td,.bm-data details,.output-list li,.document-list li){border-color:var(--border)}
html[data-theme=dark] :is(.case-table tr:hover td,.case-table tbody tr:hover,.top-link:hover,.upload-zone:hover){background:#25394a}
html[data-theme=dark] :is(.open-point,.flash,.badge-warning){background:var(--warning-bg);color:var(--warning);border-color:#806839}
html[data-theme=dark] :is(.badge-ai,.status-inspektor_beauftragt){background:#1d3b56;color:#a5d6ff;border-color:#466d91}
html[data-theme=dark] :is(.badge-confirmed,.status-active){background:var(--success-bg);color:var(--success);border-color:#3e7458}
html[data-theme=dark] :is(.badge-danger,.status-inactive){background:var(--danger-bg);color:var(--danger);border-color:#80525c}
html[data-theme=dark] :is(.badge-missing,.badge-neutral,.status-administration){background:#334252;color:#d4dfe8;border-color:#596d81}
html[data-theme=dark] .tech-status-match{color:var(--success)}
html[data-theme=dark] :is(.tech-status-review,.bm-open){color:var(--warning)}
html[data-theme=dark] .tech-status-danger{color:var(--danger)}
html[data-theme=dark] .tech-status-neutral{color:var(--muted)}
/* Preserve the existing artwork: light lettering, red emblem, no white tile. */
html[data-theme=dark] .fi-logo{background:transparent;filter:invert(1) hue-rotate(180deg);mix-blend-mode:screen}
html[data-theme=dark] .fi-brandmark .fi-logo{clip-path:inset(0 0 0 23%)}
html[data-theme=dark] .fi-emblem{display:block}
html[data-theme=dark] :is(table,.case-table){background:var(--card);color:var(--text)}
html[data-theme=dark] :is(th,td,fieldset,legend){border-color:var(--border)}
html[data-theme=dark] :is(label,.field label,legend,summary,.admin-check-value){color:var(--text)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#aabac9;opacity:1}
html[data-theme=dark] :is(.bm-approved,.status-vorpruefung,.status-abgeschlossen){color:var(--success)}
html[data-theme=dark] :is(.admin-block-complete>.card-title,.notice.success){background:var(--success-bg);color:var(--success)}
html[data-theme=dark] :is(.notice.warning,.notice.error){background:var(--warning-bg);color:var(--warning)}
html[data-theme=dark] .admin-block-feedback[data-error=true]{color:var(--danger)}
html[data-theme=dark] .review-point-link{background:transparent;color:inherit;border:0}
html[data-theme=dark] :is(.review-point-open,.review-point-done,.review-point-ready) :is(label,summary,th){color:inherit}
}
@media(max-width:760px){.fi-logo,.fi-brandmark{width:190px}}
@media print{.theme-toggle{display:none!important}}
