/* SOREVA · Celeste: shared tokens and components, loaded after module CSS. */
@font-face {
    font-family: Inter;
    src: url('/fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
:root {
    --soreva-primary-900: #1D4664;
    --soreva-primary-700: #285F86;
    --soreva-primary-500: #75AADB;
    --soreva-primary-100: #CDE6F6;
    --soreva-accent-700: #285F86;
    --soreva-accent-500: #75AADB;
    --soreva-accent-100: #EAF4FC;
    --soreva-surface: #FFFFFF;
    --soreva-background: #F5FAFE;
    --soreva-text: #223748;
    --soreva-muted: #5D7283;
    --soreva-border: #CADFEF;
    --soreva-field-border: #5D7283;
    --soreva-focus: #2563EB;
    --soreva-success: #2F6D52;
    --soreva-warning: #8A641F;
    --soreva-danger: #A13D3D;
    --soreva-danger-soft: #FBEDED;
    --soreva-radius: 12px;
    --soreva-shadow: 0 4px 16px rgba(34, 55, 72, .045);
    --soreva-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* Compatibility with existing modules; semantic status colors stay separate. */
    --primary: var(--soreva-primary-700);
    --mid: var(--soreva-primary-900);
    --accent: var(--soreva-accent-700);
    --light: var(--soreva-primary-100);
    --rowalt: var(--soreva-accent-100);
    --bg: var(--soreva-background);
    --flaeche: var(--soreva-background);
    --text: var(--soreva-text);
    --gray: var(--soreva-muted);
    --muted: var(--soreva-muted);
    --line: var(--soreva-border);
    --linie: var(--soreva-border);
    --petrol: var(--soreva-primary-700);
    --deep: var(--soreva-primary-900);
    --tint: var(--soreva-primary-100);
    --green: var(--soreva-success);
    --gruen: var(--soreva-success);
    --amber: var(--soreva-warning);
    --red: var(--soreva-danger);
    --rot: var(--soreva-danger);
}
html { color-scheme: light; }
body { background: var(--soreva-background); color: var(--soreva-text); font-family: var(--soreva-font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--soreva-font); }
a { color: var(--soreva-primary-700); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--soreva-text); line-height: 1.25; }
h1 { font-size: clamp(24px, 2.5vw, 30px); letter-spacing: -.025em; }
h2 { font-size: 20px; letter-spacing: -.015em; }
::selection { background: var(--soreva-primary-100); color: var(--soreva-text); }

/* Light header with dark navigation labels in all legacy header variants. */
.topbar, .hub-topbar, .login-kopf { background: var(--soreva-primary-100); color: var(--soreva-text); border-bottom: 1px solid var(--soreva-border); box-shadow: none; }
.topbar-inner, .hub-zeile1, .hub-zeile2-inner { max-width: 1200px; padding-left: 24px; padding-right: 24px; }
.brand, .marke, .hub-marke, .login-kopf { display: flex; align-items: center; gap: 10px; }
.soreva-brandmark { width: 40px; height: 40px; flex: 0 0 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--soreva-surface); }
.soreva-brandmark img { width: 34px; height: 34px; display: block; object-fit: contain; }
.brand-wordmark { color: var(--soreva-text); font-size: 18px; font-weight: 750; letter-spacing: .14em; line-height: 1; }
.brand-sub, .hub-label, .login-sub { color: var(--soreva-primary-900); border-color: var(--soreva-primary-500); font-size: 13px; letter-spacing: .04em; text-transform: none; }
.topbar :is(.brand, .hauptnav a, .benutzer-name, .nav-user, .zurueck, .abmelden),
.hub-topbar :is(.hub-rechts a, .hub-user, .hub-zeile2 a) { color: var(--soreva-primary-900); }
.topbar :is(.hauptnav a, .abmelden, .zurueck), .hub-rechts a { min-height: 40px; display: inline-flex; align-items: center; }
.topbar :is(.hauptnav a:hover, .abmelden:hover, .zurueck:hover),
.hub-topbar :is(.hub-rechts a:hover, .hub-zeile2 a:hover) { background: var(--soreva-accent-100); color: var(--soreva-primary-900); }
.topbar .hauptnav a.aktiv, .hub-topbar .hub-zeile2 a.aktiv { background: var(--soreva-surface); color: var(--soreva-primary-900); box-shadow: inset 0 -3px var(--soreva-primary-700); border-bottom-color: transparent; }
.hub-zeile2 { background: var(--soreva-accent-100); border-top: 1px solid var(--soreva-border); }
.hub-zeile2 a { border-radius: 7px 7px 0 0; }
.hub-trenner, .nav-trenner { background: var(--soreva-primary-500); }
.hub-fuss, .fusszeile, .seitenfuss { color: var(--soreva-muted); font-size: 13px; }

/* Common surfaces. Domain-specific floorplan geometry is unchanged. */
.inhalt, .hub-fuss { max-width: 1200px; }
.hero, .dash-hero { background: var(--soreva-accent-100); border: 1px solid var(--soreva-border); border-radius: var(--soreva-radius); }
.hero h1, .dash-hero h1, .hero-ikon { color: var(--soreva-primary-900); }
.hero-claim, .dash-claim { color: var(--soreva-muted); font-size: 15px; }
.tool, .karte, .panel, .tabelle-rahmen, .login-card, .fb-card, .dash-block, .kat-karte { border-color: var(--soreva-border); border-radius: var(--soreva-radius); box-shadow: var(--soreva-shadow); }
.intro { margin-bottom: 24px; }
.intro h1 { font-size: clamp(26px, 3vw, 34px); }
.intro p { font-size: 16px; color: var(--soreva-muted); }
.tool-raster { gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.tool { padding: 22px; min-height: 210px; }
.tool:hover { border-color: var(--soreva-primary-500); box-shadow: 0 6px 18px rgba(34, 55, 72, .09); transform: translateY(-2px); }
.tool-icon, .kat-ikon { background: var(--soreva-primary-100); color: var(--soreva-primary-700); }
.tool h2 { font-size: 18px; color: var(--soreva-text); }
.tool p { font-size: 15px; }
.tool-fuss .oeffnen { color: var(--soreva-primary-700); font-weight: 650; }
.tool-fuss .zugang, .platzhalter h2, .platzhalter p { color: var(--soreva-muted); }
.platzhalter { box-shadow: none; }
.kpi span, .lbl, .stat-label, .feld-hinweis, .mini-hinweis, .hinweis-zeile, .fb-meta { font-size: 13px; color: var(--soreva-muted); }
.kpi b, .stat-wert, .tabelle, .liste, table.g, table.zs { font-variant-numeric: tabular-nums; }

/* Explicit search styling closes gaps in older module selectors. */
input:where(:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=range]):not([type=color])), select, textarea {
    font-family: var(--soreva-font); font-size: 15px; line-height: 1.4;
    border: 1px solid var(--soreva-field-border); border-radius: 8px; padding: 10px 12px;
    background: var(--soreva-surface); color: var(--soreva-text); max-width: 100%; min-height: 44px; box-sizing: border-box;
}
.feld input[type=search], .fb-feld input, .fb-feld select, .fb-feld textarea { width: 100%; }
.feld input:not([type=checkbox]):not([type=radio]), .feld :is(select, textarea), .login-feld input, .fb-main :is(input, select, textarea) { font-family: var(--soreva-font); font-size: 15px; border-color: var(--soreva-field-border); background: var(--soreva-surface); color: var(--soreva-text); }
input::placeholder, textarea::placeholder { color: var(--soreva-muted); opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--soreva-primary-700); }
.feld label, .fb-feld label, .login-feld label { font-size: 14px; color: var(--soreva-text); }
.suche.gross { border: 1px solid var(--soreva-field-border); overflow: visible; }
.suche.gross input[type=search] { border-radius: 8px; }
.filter-zeile .feld { min-width: 0; }

.btn, .fb-btn, .qbtn, button:not(.tisch) { font-family: var(--soreva-font); font-size: 15px; min-height: 40px; }
.btn-primary, .fb-btn, .qbtn:not(.ghost) { background: var(--soreva-primary-700); border-color: var(--soreva-primary-700); color: #FFFFFF; }
.btn-primary:hover, .fb-btn:hover, .qbtn:not(.ghost):hover { background: var(--soreva-primary-900); border-color: var(--soreva-primary-900); color: #FFFFFF; }
.btn.grau, .btn.btn-sek, .fb-btn.fb-ghost, .qbtn.ghost { background: var(--soreva-surface); color: var(--soreva-primary-700); border: 1px solid var(--soreva-field-border); }
.btn.grau:hover, .btn.btn-sek:hover, .fb-btn.fb-ghost:hover, .qbtn.ghost:hover { background: var(--soreva-accent-100); }
/* Danger must not inherit secondary/action blue. */
.btn.btn-gefahr, button.rot, .btn.rot, .act-del, .fb-rot { color: var(--soreva-danger); background: var(--soreva-surface); border: 1px solid var(--soreva-danger); }
.btn.btn-gefahr:hover, button.rot:hover, .btn.rot:hover, .act-del:hover, .fb-rot:hover { color: var(--soreva-danger); background: var(--soreva-danger-soft); border-color: var(--soreva-danger); }
.chip, .tabs a, .filter-gruppe a { min-height: 36px; }
.tabelle th, .liste th, .fb-table th { background: var(--soreva-accent-100); color: var(--soreva-primary-900); font-size: 13px; }
.tabelle tbody tr:hover { background: var(--soreva-background); }
.soreva-test-hinweis { background: var(--soreva-accent-100); color: var(--soreva-primary-900); border: 1px solid var(--soreva-border); border-left: 4px solid var(--soreva-primary-500); border-radius: 8px; padding: 10px 14px; font-size: 14px; line-height: 1.5; }
.login-wrap { max-width: 420px; }
.login-kopf { padding: 24px 28px; }
.login-feld h1 { color: var(--soreva-text); font-size: 24px; }
.login-feld .btn { min-height: 44px; }
/* Intentional priority: legacy linked-card/field resets must not hide keyboard focus. */
body :focus-visible { outline: 3px solid var(--soreva-focus) !important; outline-offset: 3px !important; box-shadow: 0 0 0 2px var(--soreva-surface) !important; }
@media (max-width: 600px) {
    .topbar-inner, .hub-zeile1, .hub-zeile2-inner { padding-left: 16px; padding-right: 16px; }
    .hub-marke, .brand { flex-wrap: wrap; }
    .hub-rechts { margin-left: 0; gap: 12px; }
    .hub-label, .brand-sub { letter-spacing: 0; }
    .brand-wordmark { font-size: 16px; }
    .soreva-brandmark { width: 36px; height: 36px; flex-basis: 36px; }
    .soreva-brandmark img { width: 30px; height: 30px; }
    .filter-zeile .feld.feld-schmal { flex: 1 1 200px; }
    .hero, .dash-hero { padding: 22px; }
    .fb-row2, .dash-spalten { grid-template-columns: 1fr; }
    .tabelle-rahmen { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .tool, .statkarte, .kat-karte { transition: none; }
    .tool:hover, .statkarte:hover, .kat-karte:hover { transform: none; }
}
@media print {
    body { background: #FFFFFF; color: #000000; }
    .tool, .karte, .panel, .login-card { box-shadow: none; }
}

/* Personal account menu: native disclosure works with keyboard and without JS. */
.profil-menu{position:relative;max-width:100%;z-index:30}
.profil-menu summary{display:flex;align-items:center;gap:10px;cursor:pointer;color:var(--soreva-primary-900);padding:5px 10px;border:1px solid var(--soreva-border);border-radius:12px;list-style:none;min-height:44px}
.profil-menu summary::-webkit-details-marker{display:none}
.profil-menu summary small{display:block;font-size:12px;font-weight:400;color:var(--soreva-muted)}
.profil-menu summary>span:nth-child(2){max-width:220px;overflow-wrap:anywhere}
.profil-avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 36px;border-radius:50%;background:var(--soreva-accent-100);color:var(--soreva-primary-900);font-weight:700}
.profil-avatar-gross{width:68px;height:68px;flex-basis:68px;font-size:28px}
.profil-menu-panel{position:absolute;right:0;top:calc(100% + 8px);width:250px;max-width:calc(100vw - 32px);padding:8px;background:var(--soreva-surface);border:1px solid var(--soreva-border);border-radius:12px;box-shadow:0 12px 32px #1d46641f}
.topbar .profil-menu-panel a,.hub-rechts .profil-menu-panel a,.profil-menu-panel button{display:block;text-align:left;width:100%;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:var(--soreva-primary-900);font:inherit;text-decoration:none;cursor:pointer}
.topbar .profil-menu-panel a:hover,.hub-rechts .profil-menu-panel a:hover,.profil-menu-panel button:hover{background:var(--soreva-accent-100);color:var(--soreva-primary-900)}
.profil-menu-panel form{margin:4px 0 0;border-top:1px solid var(--soreva-border);padding-top:4px}
.profil-intro{display:flex;justify-content:space-between;align-items:center;gap:16px}
.profil-eyebrow{color:var(--soreva-primary-700);font-size:12px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;margin:0 0 8px}
.profil-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.profil-grid .karte{margin:0;min-width:0;padding:24px;overflow-wrap:anywhere}
.profil-grid h2{margin:0 0 12px;font-size:20px}
.profil-details{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:12px;margin:20px 0;font-size:14px}
.profil-details dt{color:var(--soreva-muted)}.profil-details dd{margin:0;color:var(--soreva-text)}
.profil-status{display:inline-block;background:var(--soreva-accent-100);color:var(--soreva-primary-900);border-radius:20px;padding:5px 12px;font-size:13px;font-weight:600}
.profil-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.profil-list{list-style:none;margin:12px 0;padding:0}.profil-list li{padding:12px 0;border-bottom:1px solid var(--soreva-border)}.profil-list span{display:block;font-size:13px;color:var(--soreva-muted);margin-top:4px}
.profil-hinweis{padding:16px 20px;background:var(--soreva-accent-100);border:1px solid var(--soreva-border);border-radius:12px;margin-bottom:20px;line-height:1.7}
.profil-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:20px}
.profil-check{display:flex;align-items:center;gap:10px}.profil-check input{width:auto}
.standort-karte{max-width:none;margin:20px 0}.standort-karte .tabelle-rahmen{position:relative;overflow-x:auto}
.standort-karte .feld textarea{width:100%;padding:10px;font:inherit;border:1px solid var(--soreva-field-border);border-radius:8px;resize:vertical}
.standort-karte .feld-hinweis{overflow-wrap:anywhere}
.standort-aktionen{display:flex;flex-wrap:wrap;gap:8px}
.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}
@media(max-width:700px){.profil-grid,.profil-form-grid{grid-template-columns:1fr}.profil-grid .karte{padding:20px}.profil-menu-panel{right:auto;left:0}.profil-details{grid-template-columns:1fr;gap:4px}.profil-details dd{margin-bottom:12px}.profil-intro{align-items:flex-start}}
