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

:root {
    --primary: #dc2626;
    --primary-hover: #b91c1c;
    --primary-soft: #fef2f2;
    --primary-soft-border: #fecaca;
    --nav-bg: #0a0a0a;
    --nav-text: rgba(255,255,255,.82);
    --danger: #dc2626;
    --bg: #f4f4f5;
    --card-bg: #ffffff;
    --border: #e4e4e7;
    --text: #18181b;
    --text-muted: #71717a;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
    background: var(--nav-bg);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    height: 56px;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .3px;
    margin-right: 2rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #fff;
    text-decoration: none;
}
.nav-logo { height: 40px; width: 40px; }
.nav-links {
    list-style: none;
    display: flex;
    gap: .25rem;
    flex: 1;
    align-items: stretch;
}
.nav-links a {
    color: var(--nav-text);
    text-decoration: none;
    padding: .4rem .75rem;
    border-radius: var(--radius);
    transition: background .15s;
    display: flex;
    align-items: center;
    gap: .3rem;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}
.nav-links a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-links a.active { background: var(--primary); color: #fff; }

.nav-dropdown { position: relative; display: flex; align-items: stretch; }
.nav-dropdown > a { display: flex; align-items: center; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    min-width: 180px;
    list-style: none;
    z-index: 300;
    border: 1px solid var(--border);
    padding: .35rem 0;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li a {
    display: block;
    padding: .55rem 1rem;
    color: var(--text);
    font-size: 14px;
    border-radius: 0;
}
.nav-dropdown-menu li a:hover { background: var(--primary-soft); color: var(--primary); }
.dropdown-arrow { font-size: 11px; opacity: .8; }
.dropdown-divider { height: 1px; background: var(--border); margin: .3rem 0; }

.nav-links-secondary { margin-left: auto; flex: 0; }
.nav-right {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-left: 1rem;
}
.nav-username { color: var(--nav-text); font-size: 13px; white-space: nowrap; }
.nav-right form { display: inline; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: .25rem .5rem;
    margin-left: auto;
}

@media (max-width: 880px) {
    .navbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: .5rem 1rem; }
    .nav-brand { margin-right: 0; font-size: 1rem; }
    .nav-toggle { display: block; }
    .nav-links, .nav-links-secondary {
        display: none;
        flex-direction: column;
        width: 100%;
        flex-basis: 100%;
        margin: .5rem 0 0;
        gap: .1rem;
    }
    .navbar.mobile-open .nav-links,
    .navbar.mobile-open .nav-links-secondary { display: flex; }
    .nav-right {
        display: none;
        width: 100%;
        flex-basis: 100%;
        margin: .5rem 0 0;
        padding: .5rem 0 0;
        border-top: 1px solid rgba(255,255,255,.2);
        justify-content: space-between;
    }
    .navbar.mobile-open .nav-right { display: flex; }
    .nav-dropdown { flex-direction: column; }
    .nav-dropdown-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        border-radius: 6px;
        margin: .15rem 0 .35rem;
    }
    .nav-links a { padding: .65rem .75rem; }
    .container { padding: 1rem; }
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
/* Alle Seiten nutzen die volle Bildschirmbreite (nur ein schmaler Innenabstand) */
.container { max-width: none; margin: 0; padding: 1.25rem 1rem; }

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .45rem 1rem;
    border: none;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-sm { padding: .3rem .65rem; font-size: 13px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #e4e4e7; color: var(--text); }
.btn-secondary:hover { background: #d4d4d8; }
.btn-nav { background: rgba(255,255,255,.1); color: #fff; }
.btn-nav:hover { background: var(--primary); }

/* ── Formulare ────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .35rem; }
label { font-size: 13px; font-weight: 500; }
input, textarea, select {
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    color: var(--text);
    background: var(--card-bg);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}

.alert { border-radius: 6px; padding: .65rem 1rem; font-size: .875rem; margin-bottom: 1rem; border: 1px solid; }
.alert-error { background: var(--primary-soft); border-color: var(--primary-soft-border); color: var(--primary-hover); }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.badge-gray { background: #f4f4f5; color: #52525b; border: 1px solid var(--border); }
.badge-red { background: var(--primary-soft); color: var(--primary-hover); }

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: linear-gradient(160deg, var(--nav-bg) 0 45%, var(--bg) 45% 100%);
}
.login-card {
    background: var(--card-bg);
    border-radius: 12px;
    border-top: 4px solid var(--primary);
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
}
.login-card .logo { width: 120px; height: 120px; margin-bottom: 1rem; }
.logo-on-dark { display: none; }
body.dark .logo-on-light { display: none; }
body.dark .logo-on-dark { display: inline-block; }
.login-card h1 { font-size: 1.3rem; font-weight: 700; margin-bottom: .2rem; }
.login-card p { font-size: .875rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.login-card .form-group { text-align: left; margin-bottom: 1rem; }
.login-card label { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.login-card .btn { width: 100%; margin-top: .5rem; padding: .75rem; font-size: 1rem; }

/* ── Startseite ───────────────────────────────────────────────────────────── */
.hero {
    background: var(--nav-bg);
    color: #fff;
    border-radius: 12px;
    padding: 2.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.75rem;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.hero::after {
    content: "";
    position: absolute;
    right: -60px; top: -60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220,38,38,.55), rgba(220,38,38,0) 70%);
    pointer-events: none;
}
.hero-logo { width: 120px; height: 120px; flex-shrink: 0; position: relative; z-index: 1; }
.hero-text { position: relative; z-index: 1; }
.hero-date {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #f87171;
    margin-bottom: .35rem;
}
.hero h1 { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.hero p { color: rgba(255,255,255,.72); margin-top: .4rem; }

.section-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: .85rem;
}
.section-title::before {
    content: "";
    width: 4px; height: 14px;
    background: var(--primary);
    border-radius: 2px;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.tile {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.15rem 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
a.tile:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.tile-disabled { opacity: .78; }
.tile-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--nav-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
a.tile:hover .tile-icon { background: var(--primary); }
.tile-icon svg { width: 22px; height: 22px; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .2rem; }
.tile h3 { font-size: 15px; font-weight: 700; }
.tile p { font-size: 13px; color: var(--text-muted); }

@media (max-width: 600px) {
    .hero { flex-direction: column; align-items: flex-start; padding: 1.75rem 1.25rem; gap: 1rem; }
    .hero-logo { width: 80px; height: 80px; }
    .hero h1 { font-size: 1.4rem; }
}

/* ── Seiten & Panels ──────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-left: .75rem;
    border-left: 4px solid var(--primary);
}
.page-header h1 { font-size: 1.4rem; font-weight: 700; }

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    align-items: start;
}
.panel-header {
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--nav-bg);
}
.panel-header h2 { font-size: 15px; font-weight: 700; color: #fff; }
.panel-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.panel-body .alert { margin-bottom: 0; }
.panel-actions { display: flex; justify-content: flex-end; }
.hint { font-size: 12px; color: var(--text-muted); }

.info-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .6rem 1.25rem;
    padding: 1.25rem;
}
.info-list dt { color: var(--text-muted); font-size: 13px; }
.info-list dd { font-weight: 500; }

.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
body.dark .alert-success { background: #0f2417; border-color: #166534; color: #86efac; }
body.dark .panel-header { background: #000; }

@media (max-width: 400px) {
    .panel-grid { grid-template-columns: 1fr; }
}

/* ── Kontakte & Netzwerk ───────────────────────────────────────────────────── */
:root { --netz-bg: #ffffff; --navbar-h: 59px; }
body.dark { --netz-bg: #000000; }

/* Karte füllt die ganze Fläche unter der Navigation, rechts die Seitenleiste */
.netz-main { height: calc(100vh - var(--navbar-h)); height: calc(100dvh - var(--navbar-h)); overflow: hidden; }
.netz-seite { display: flex; height: 100%; }
.netz-karte { position: relative; flex: 1; min-width: 0; background: var(--netz-bg); }
.netz-canvas { position: absolute; inset: 0; background: var(--netz-bg); }
.netz-canvas.verbinden-modus { cursor: crosshair; outline: 2px dashed var(--primary); outline-offset: -3px; }

.netz-toolbar {
    position: absolute;
    top: .75rem;
    left: .75rem;
    right: .75rem;
    z-index: 6;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    pointer-events: none;           /* Karte zwischen den Buttons bleibt bedienbar */
}
.netz-toolbar > * { pointer-events: auto; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.netz-toolbar .checkbox-label {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .4rem .7rem;
    margin-left: 0;
}
.netz-toolbar .search-input { margin-left: auto; width: 150px; }
.search-input { width: 240px; max-width: 100%; }
.checkbox-label { display: flex; align-items: center; gap: .4rem; font-size: 13px; cursor: pointer; }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--primary); }
.btn-aktiv, .btn-aktiv:hover { background: var(--primary); color: #fff; }

.netz-hinweis {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 1.5rem);
    z-index: 5;
    background: var(--nav-bg);
    color: #fff;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: .5rem 1rem;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    pointer-events: none;
}
body.dark .netz-hinweis { background: #18181b; }
.netz-hinweis[hidden] { display: none; }

/* Werkzeug "Erfassen": Fläche über der Karte zum Aufziehen eines Auswahlrahmens */
.erfassen-flaeche { position: absolute; inset: 0; z-index: 4; cursor: crosshair; touch-action: none; }
.erfassen-flaeche[hidden] { display: none; }
.erfassen-rahmen {
    position: absolute;
    border: 1.5px dashed var(--primary);
    background: rgba(220,38,38,.08);
    border-radius: 3px;
    pointer-events: none;
}
.erfassen-rahmen[hidden] { display: none; }
.netz-karte.erfassen-modus { outline: 2px dashed var(--primary); outline-offset: -3px; }
/* Stichwörter (mehrere Werte pro Eigenschaft) */
.tag-feld { display: flex; flex-direction: column; gap: .4rem; }
.tag-liste { display: flex; flex-wrap: wrap; gap: .3rem; min-height: 1.6rem; align-items: center; }
.tag {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .15rem .55rem;
    border-radius: 6px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary-soft-border);
    font-size: 12px; font-weight: 600; line-height: 1.5;
}
.tag-alt { background: var(--bg); color: var(--text-muted); border-style: dashed; }
.tag-x { background: none; border: none; padding: 0 .1rem; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; opacity: .7; }
.tag-x:hover { opacity: 1; }
.tag-leer { font-size: 12px; color: var(--text-muted); }
.tag-klein { font-size: 11px; padding: .05rem .45rem; }
.dk-infos dd .tag { margin: 0 .2rem .2rem 0; }
.netz-seite.lesemodus .tag-x, .netz-seite.lesemodus .tag-neu { display: none; }

/* Beziehung zur Gruppe: Körperschaften mit Beziehungen */
[data-nur-gruppe][hidden] { display: none; }
.zg-liste { display: flex; flex-direction: column; gap: .5rem; }
.zg-karte { border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius); padding: .5rem .6rem; display: flex; flex-direction: column; gap: .4rem; }
.zg-kopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.zg-name { font-weight: 700; font-size: 13px; }
.zg-ohne .zg-name { color: var(--text-muted); font-style: italic; }
.zg-karte .tag-x { color: var(--text-muted); }
.dk-zg { font-weight: 600; }

/* Bearbeitungsmodus */
.btn:disabled { opacity: .45; cursor: not-allowed; }
.nur-lesemodus { display: none; }
.netz-seite.lesemodus .nur-lesemodus { display: inline; }
.netz-seite.lesemodus .nur-bearbeiten-btn { display: none !important; }
.netz-seite.lesemodus #panelPerson input:disabled,
.netz-seite.lesemodus #panelPerson select:disabled,
.netz-seite.lesemodus #panelPerson textarea:disabled,
.netz-seite.lesemodus #panelVerbindung input:disabled { opacity: 1; background: var(--bg); color: var(--text); cursor: default; }
.netz-seite.lesemodus .farbwahl-item, .netz-seite.lesemodus .symbolwahl-item { cursor: default; pointer-events: none; }
.panel-werkzeuge { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.panel-werkzeuge .btn[hidden] { display: none; }

/* Detailansicht */
.detail-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.detail-overlay[hidden] { display: none; }
.detail-fenster {
    background: var(--card-bg);
    border-radius: 12px;
    border-top: 4px solid var(--primary);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    width: min(960px, 100%);
    max-height: min(82vh, 820px);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.detail-kopf {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.detail-titel h2 { font-size: 1.2rem; font-weight: 700; }
.detail-info { color: var(--text-muted); font-size: 13px; margin-top: .15rem; }
.detail-pfad { font-size: 12px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .2rem; }
.detail-pfad button { background: none; border: none; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.detail-pfad button:hover { text-decoration: underline; }
.detail-aktionen { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.detail-zu { font-size: 16px; padding: .35rem .5rem; }
.detail-inhalt { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; }
.detail-hinweis { margin-bottom: .75rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.detail-kachel {
    text-align: left; font: inherit; color: var(--text);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem .85rem;
    display: flex; flex-direction: column; gap: .5rem;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.detail-kachel:hover, .detail-kachel:focus-visible { border-color: var(--primary); box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-1px); outline: none; }
.dk-kopf { display: flex; align-items: center; gap: .5rem; }
.dk-kopf img, .dk-punkt { width: 18px; height: 18px; flex-shrink: 0; }
.dk-punkt { border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.dk-name { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; }
.dk-badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.dk-beziehung { background: var(--bg); border-radius: 6px; padding: .4rem .55rem; font-size: 12.5px; display: flex; flex-direction: column; gap: .15rem; }
.dk-beziehung .pfeil { color: var(--primary); }
.dk-beziehung b { font-weight: 600; }
.dk-infos { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .6rem; font-size: 12px; }
.dk-infos dt { color: var(--text-muted); }
.dk-infos dd { overflow-wrap: anywhere; }
.dk-notiz { font-size: 12px; color: var(--text-muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Gruppen: Angehörige und Beziehungen zu Angehörigen */
.gruppen-box { display: flex; flex-direction: column; gap: .7rem; border-top: 1px solid var(--border); padding-top: .85rem; }
.gruppen-box #vGbBox { display: flex; flex-direction: column; gap: .6rem; }
.gruppen-box #vGbBox[hidden] { display: none; }
.gruppen-box[hidden], .mf-alle[hidden] { display: none; }
.badge-angehoerig { background: var(--primary-soft); color: var(--primary); }

/* Eine Person mit mehreren verbinden */
.mf-alle { display: flex; flex-direction: column; gap: .45rem; padding: .75rem; background: var(--bg); border-radius: var(--radius); }
.mf-alle .btn { align-self: flex-start; }
.mf-felder { display: flex; flex-direction: column; gap: .4rem; }
.mf-liste { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.mf-eintrag { border: 1px solid var(--border); border-radius: var(--radius); padding: .65rem .75rem; display: flex; flex-direction: column; gap: .4rem; }
.mf-kopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.mf-kopf strong { font-size: 14px; }
.mf-eintrag label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.mf-eintrag input { width: 100%; }
.badge-bestehend { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.auswahl-namen { list-style: none; display: flex; flex-direction: column; gap: .3rem; font-size: 13px; }

.netz-leer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 15px;
}
.netz-leer[hidden] { display: none; }

.netz-panel {
    width: 360px;
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    background: var(--card-bg);
    border-left: 1px solid var(--border);
}
/* Seitenleiste auf-/zuklappen */
.netz-panel { transition: width .2s ease; }
.netz-seite.panel-zu .netz-panel { width: 0; border-left: none; overflow: hidden; }
.panel-griff {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 22px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 8px rgba(0,0,0,.08);
    cursor: pointer;
    padding: 0;
}
.panel-griff:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.panel-griff svg { transition: transform .2s ease; }
.netz-seite.panel-zu .panel-griff svg { transform: rotate(180deg); }

.properties-link { color: var(--primary); text-decoration: none; margin-top: -.35rem; }
.properties-link:hover { text-decoration: underline; }
.netz-panel .panel-body { gap: .85rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.label { font-size: 13px; font-weight: 500; }
.stats { font-size: 15px; }
.hilfe-liste { list-style: none; display: flex; flex-direction: column; gap: .45rem; font-size: 13px; color: var(--text-muted); }
.hilfe-liste b { color: var(--text); font-weight: 600; }

.legende { display: flex; flex-wrap: wrap; gap: .4rem .9rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.legende-item { display: inline-flex; align-items: center; gap: .35rem; font-size: 12px; color: var(--text-muted); }
.farbpunkt { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); flex-shrink: 0; }
body.dark .farbpunkt { border-color: rgba(255,255,255,.35); }

.farbwahl { display: flex; flex-wrap: wrap; gap: .45rem; }
.farbwahl-item { cursor: pointer; }
.farbwahl-item input { position: absolute; opacity: 0; pointer-events: none; }
.farbwahl-item .farbpunkt { width: 28px; height: 28px; transition: transform .1s, box-shadow .1s; }
.farbwahl-item:hover .farbpunkt { transform: scale(1.1); }
.farbwahl-item input:checked + .farbpunkt { box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--primary); }
.farbwahl-item input:focus-visible + .farbpunkt { outline: 2px solid var(--primary); outline-offset: 3px; }

.symbolwahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.symbolwahl-item { cursor: pointer; }
.symbolwahl-item input { position: absolute; opacity: 0; pointer-events: none; }
.symbol-kachel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .45rem .25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    transition: border-color .1s, color .1s, background .1s;
}
.symbolwahl-item:hover .symbol-kachel { border-color: var(--text-muted); color: var(--text); }
.symbolwahl-item input:checked + .symbol-kachel { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.symbolwahl-item input:focus-visible + .symbol-kachel { outline: 2px solid var(--primary); outline-offset: 2px; }
.legende-symbol svg { width: 16px; height: 16px; color: var(--text-muted); }

.panel-actions-split { justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.panel-actions-split > div { display: flex; gap: .5rem; }
.btn-danger-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary-soft-border); }
.btn-danger-outline:hover { background: var(--primary-soft); }
.btn-danger-outline[hidden] { display: none; }

.verbindungsliste { border-top: 1px solid var(--border); padding-top: .75rem; }
.verbindungsliste ul { list-style: none; margin-top: .4rem; display: flex; flex-direction: column; gap: .3rem; font-size: 13px; }
.link-button { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--primary); cursor: pointer; }
.link-button:hover { text-decoration: underline; }

.verbindung-paar { font-size: 15px; font-weight: 700; text-align: center; padding: .5rem; background: var(--bg); border-radius: var(--radius); }
.verbindung-paar .pfeil { color: var(--primary); margin: 0 .4rem; }

/* Tooltip von vis-network */
div.vis-tooltip {
    font-family: inherit !important;
    font-size: 13px !important;
    background: var(--nav-bg) !important;
    color: #fff !important;
    border: none !important;
    border-left: 3px solid var(--primary) !important;
    border-radius: 6px !important;
    padding: .5rem .75rem !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.25) !important;
    white-space: normal !important;
}
.netz-tooltip strong { display: block; margin-bottom: .15rem; }
.netz-tooltip div { color: rgba(255,255,255,.8); }

@media (max-width: 980px) {
    .netz-main { height: auto; overflow: visible; }
    .netz-seite { flex-direction: column; }
    .netz-karte { height: 70vh; min-height: 420px; flex: none; }
    .netz-panel { width: 100%; height: auto; border-left: none; border-top: 1px solid var(--border); }
    .netz-toolbar .search-input { margin-left: 0; width: 100%; }
    .panel-griff { display: none; }
    .netz-seite.panel-zu .netz-panel { width: 100%; }
}

/* ── Properties ───────────────────────────────────────────────────────────── */
.page-intro { color: var(--text-muted); margin: -.5rem 0 1.25rem; }
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    align-items: start;
}
.properties-grid .panel-header { display: flex; align-items: center; justify-content: space-between; }
.panel-count {
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: .05rem .55rem;
}
.auswahl-liste { list-style: none; }
.auswahl-zeile {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem .45rem .5rem;
    border-bottom: 1px solid var(--border);
}
.auswahl-zeile:hover { background: var(--bg); }
.auswahl-sortieren { display: flex; flex-direction: column; }
.auswahl-umbenennen { flex: 1; display: flex; gap: .4rem; min-width: 0; }
.auswahl-umbenennen input {
    flex: 1;
    min-width: 0;
    border-color: transparent;
    background: transparent;
    padding: .3rem .5rem;
}
.auswahl-umbenennen input:hover { border-color: var(--border); }
.auswahl-umbenennen input:focus { background: var(--card-bg); }
.auswahl-umbenennen button[hidden] { display: none; }
.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    padding: .15rem .3rem;
    border-radius: 4px;
}
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--border); }
.icon-btn:disabled { opacity: .25; cursor: default; }
.icon-btn-danger { font-size: 14px; }
.icon-btn-danger:hover:not(:disabled) { color: #fff; background: var(--primary); }
.auswahl-leer { padding: 1rem 1.25rem; color: var(--text-muted); font-size: 13px; }
.auswahl-neu { display: flex; gap: .5rem; padding: .85rem 1rem; background: var(--bg); border-top: 1px solid var(--border); }
.auswahl-neu input { flex: 1; min-width: 0; }
.page-header .btn { font-size: 13px; }
.alert-success, .alert-error { margin-bottom: 1rem; }

.properties-abschnitt { margin-top: 1.5rem; }
.properties-hinweis { margin: -.4rem 0 .85rem; }
[data-nur-person][hidden] { display: none; }

/* Verknüpfungen (Properties) */
.verknuepfungen { margin-top: 1.25rem; }
.verknuepfungen .panel-header { display: flex; align-items: center; justify-content: space-between; }
.vk-liste { list-style: none; border: 1px solid var(--border); border-radius: var(--radius); }
.vk-zeile { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.vk-zeile:last-child { border-bottom: none; }
.vk-zeile form { margin-left: auto; }
.vk-feld { color: var(--text-muted); }
.vk-pfeil { color: var(--primary); font-weight: 700; }
.vk-neu { display: flex; flex-direction: column; gap: .75rem; padding: .85rem 1rem; background: var(--bg); border-radius: var(--radius); }
.vk-regel { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.vk-regel select { min-width: 150px; }
.vk-wort { font-weight: 600; font-size: 13px; }
.vk-aktionen { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }

/* ── Finanzen ─────────────────────────────────────────────────────────────── */
.reiter { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.25rem; flex-wrap: wrap; }
.reiter-link {
    padding: .6rem 1.1rem; text-decoration: none; color: var(--text-muted); font-weight: 600;
    border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: var(--radius) var(--radius) 0 0;
}
.reiter-link:hover { color: var(--text); background: var(--card-bg); }
.reiter-link.aktiv { color: var(--primary); border-bottom-color: var(--primary); background: var(--card-bg); }
.fin-block { margin-bottom: 1.25rem; }
.fin-block .panel-header { display: flex; align-items: center; justify-content: space-between; }
.fin-gehalt { flex-direction: row; align-items: center; gap: .75rem; flex-wrap: wrap; }
.betrag-feld { display: inline-flex; align-items: center; gap: .35rem; }
.betrag-feld input { width: 9rem; text-align: right; font-variant-numeric: tabular-nums; }
.fin-gehalt .betrag-feld input { width: 12rem; font-size: 1.05rem; font-weight: 600; }
.fin-gehalt-anzeige { display: none; font-size: 1.35rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
body.lesemodus .fin-gehalt-anzeige { display: inline; }
body.lesemodus .fin-gehalt .betrag-feld { display: none; }
.table-wrapper { overflow-x: auto; }
.fin-tabelle { width: 100%; border-collapse: collapse; }
.fin-tabelle th {
    text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted); padding: .6rem .75rem; border-bottom: 1px solid var(--border); background: var(--bg);
}
.fin-tabelle td { padding: .4rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.fin-tabelle td > input, .fin-tabelle td > select { width: 100%; }
.fin-tabelle tbody input:not(:focus), .fin-tabelle tbody select:not(:focus) { border-color: transparent; background: transparent; }
.fin-tabelle tbody tr:hover input, .fin-tabelle tbody tr:hover select { border-color: var(--border); }
.fin-tabelle .zahl { text-align: right; white-space: nowrap; }
.fin-tabelle .aktionen-spalte { width: 1%; white-space: nowrap; text-align: right; }
.fin-tabelle .aktionen-spalte form { display: inline; }
.fin-tabelle tfoot td { background: var(--bg); border-bottom: none; }
.fin-speichern { color: #16a34a; font-size: 15px; font-weight: 700; }
.fin-speichern[hidden] { display: none; }
.empty-state { text-align: center; color: var(--text-muted); padding: 1.5rem !important; }
.fin-hinweis { padding: .75rem 1rem; }
.fin-hinweis a, .fin-bilanz a { color: var(--primary); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fin-bilanz { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; border-top: 4px solid #16a34a; }
.fin-bilanz.negativ { border-top-color: var(--primary); }
.bilanz-zeile { display: flex; justify-content: space-between; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bilanz-ergebnis { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); padding-top: .6rem; font-weight: 600; }
.bilanz-ergebnis strong { font-size: 1.8rem; font-weight: 800; color: #16a34a; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.fin-bilanz.negativ .bilanz-ergebnis strong { color: var(--primary); }
.bilanz-balken { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bilanz-balken div { height: 100%; background: var(--primary); border-radius: 999px; }
.bilanz-kategorien { display: flex; flex-wrap: wrap; gap: .35rem; }
.fin-kat-neu { display: flex; gap: .5rem; }
.fin-kat-neu input { flex: 1; max-width: 360px; }
body.dark .fin-speichern, body.dark .bilanz-ergebnis strong { color: #4ade80; }
body.dark .fin-bilanz.negativ .bilanz-ergebnis strong { color: var(--primary); }

/* Assets */
.container-voll { max-width: none; }
.container-ganz { max-width: none; }
.fin-breit { max-width: none; }
.depot-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.depot-kachel { padding: .85rem 1rem; display: flex; flex-direction: column; gap: .15rem; border-top: 3px solid var(--nav-bg); }
.depot-kachel span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }
.depot-kachel strong { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.depot-kachel.plus { border-top-color: #16a34a; } .depot-kachel.plus strong { color: #16a34a; }
.depot-kachel.minus { border-top-color: var(--primary); } .depot-kachel.minus strong { color: var(--primary); }
body.dark .depot-kachel { border-top-color: #3f3f46; }
.depot-stand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.lade-punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: .3rem; animation: puls 1s infinite alternate; }
@keyframes puls { from { opacity: .3; } to { opacity: 1; } }
.asset-tabelle td { padding: .45rem .6rem; }
.asset-tabelle th { padding: .55rem .6rem; }
.asset-name { font-weight: 600; font-size: 13.5px; }
.asset-meta { font-size: 11.5px; color: var(--text-muted); }
.asset-zelle { min-width: 180px; }
.perf { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.perf.plus { color: #16a34a; } .perf.minus { color: var(--primary); }
body.dark .perf.plus, body.dark .depot-kachel.plus strong { color: #4ade80; }
.asset-tabelle .betrag-feld input { width: 6.5rem; }
.stueck-feld { width: 7.5rem; text-align: right; font-variant-numeric: tabular-nums; }
/* Vorrang vor ".fin-tabelle td > input { width: 100% }" – sonst schrumpft die Spalte */
.fin-tabelle td > input.stueck-feld { width: 7.5rem; min-width: 7.5rem; }
.sparplan-zelle { min-width: 130px; } .sparplan-zelle .tag { margin: .1rem 0; }
.kurs-warnung { color: #d97706; cursor: help; }
.asset-neu { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; padding: .9rem 1rem; background: var(--bg); border-top: 1px solid var(--border); }
.asset-neu-kuerzel { display: flex; gap: .4rem; }
.asset-neu-kuerzel input { width: 15rem; text-transform: uppercase; }
.asset-vorschau { flex-basis: 100%; font-size: 13px; padding: .5rem .75rem; border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--border); }
.asset-vorschau.ok { border-color: #86efac; background: #f0fdf4; }
.asset-vorschau.fehler { border-color: var(--primary-soft-border); background: var(--primary-soft); color: var(--primary-hover); }
body.dark .asset-vorschau.ok { background: #0f2417; border-color: #166534; }
.asset-vorschau[hidden] { display: none; }
.sp-inaktiv td { opacity: .55; }
.live-kopf { display: inline-flex; align-items: center; gap: .3rem; }
.live-punkt { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; animation: puls 1.4s infinite alternate; }
.live-tag { font-weight: 700; white-space: nowrap; }
.live-pfeil { display: inline-block; width: 1em; font-size: 11px; margin-right: .15rem; }
.abgleich { margin-top: .35rem; font-size: 12px; }
.abgleich summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.abgleich-form { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.abgleich-form .betrag-feld input { width: 10rem; }
.abgleich-knoepfe { display: flex; gap: .4rem; }

/* ── Kapitalfluss ─────────────────────────────────────────────────────────── */
.fluss-kopf { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.fluss-summen { flex: 1; min-width: 300px; margin-bottom: 0; }
.fluss-chart { width: 100%; min-height: 380px; position: relative; padding: .5rem 0 1rem; }
.fluss-chart svg { display: block; }
.sankey-strom { opacity: .45; transition: opacity .15s; stroke-width: 0; }
.sankey-zeile { stroke-width: 1px; } /* feine Trennlinie zwischen lückenlos gestapelten Zeilen */
body.dark .sankey-strom { opacity: .55; }
.fluss-chart svg.hover .sankey-strom { opacity: .2; }
.fluss-chart svg.hover .sankey-strom:hover { opacity: .85; }
.sankey-balken { cursor: default; }
.sankey-text { font-size: 12.5px; paint-order: stroke; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.sankey-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--nav-bg); color: #fff; font-size: 12.5px;
    padding: .4rem .65rem; border-radius: 6px; border-left: 3px solid var(--primary); box-shadow: 0 6px 18px rgba(0,0,0,.3); white-space: nowrap; }
.sankey-tip[hidden] { display: none; }
.fluss-legende { display: flex; gap: 1.1rem; flex-wrap: wrap; padding: .75rem 1.1rem 0; font-size: 12.5px; color: var(--text-muted); }
.fluss-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.fluss-legende .fluss-konto { background: #18181b; } body.dark .fluss-legende .fluss-konto { background: #e4e4e7; }
.fluss-leer { padding: 2.5rem 1.5rem; text-align: center; color: var(--text-muted); }
.fluss-dialog { margin: auto; /* globales * { margin: 0 } hebt sonst die Zentrierung auf */ border: none; border-top: 4px solid var(--primary); border-radius: 12px; padding: 0; width: min(1100px, 96vw);
    max-height: 90vh; background: var(--card-bg); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.fluss-dialog::backdrop { background: rgba(0,0,0,.5); }
.fluss-dialog .detail-inhalt { max-height: calc(90vh - 90px); }
.fluss-dialog .detail-aktionen form { display: inline; }
.fluss-sparten { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin-bottom: 1.25rem; }
.fluss-sparte { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.fluss-sparte h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; padding: .55rem .8rem; color: #fff; }
.fluss-quelle h3 { background: #16a34a; } .fluss-konto h3 { background: var(--nav-bg); } .fluss-aufwand h3 { background: var(--primary); }
body.dark .fluss-konto h3 { background: #3f3f46; }
.fluss-sparte .auswahl-liste { flex: 1; }
.fluss-sparte .auswahl-neu { padding: .6rem .7rem; }
.fluss-h3 { font-size: 14px; margin-bottom: .5rem; }
.fluss-pfeil { color: var(--primary); font-weight: 700; text-align: center; width: 1%; }
@media (max-width: 800px) { .fluss-sparten { grid-template-columns: 1fr; } }

/* ── Globaler Bearbeitungsmodus ───────────────────────────────────────────── */
.modus-karte { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.25rem; margin-bottom: 1.5rem; border-left: 4px solid var(--border); }
.modus-karte.aktiv { border-left-color: var(--primary); }
.modus-text { display: flex; flex-direction: column; gap: .15rem; }
.modus-karte.aktiv strong { color: var(--primary); }
.nav-modus { color: #fff; background: var(--primary); font-size: 12px; font-weight: 600; padding: .2rem .55rem;
    border-radius: 999px; text-decoration: none; white-space: nowrap; }
/* Lesemodus: Eingaben wie Text darstellen, Hinzufügen-/Löschen-Elemente ausblenden */
body.lesemodus input:disabled:not([type="checkbox"]):not([type="radio"]),
body.lesemodus select:disabled, body.lesemodus textarea:disabled {
    background: transparent; border-color: transparent; color: var(--text); -webkit-text-fill-color: var(--text);
    opacity: 1; cursor: default; box-shadow: none; }
body.lesemodus select:disabled { appearance: none; -webkit-appearance: none; }
body.lesemodus .fin-neu, body.lesemodus .auswahl-neu, body.lesemodus .vk-neu, body.lesemodus .asset-neu,
body.lesemodus .fin-kat-neu, body.lesemodus .auswahl-sortieren, body.lesemodus .icon-btn-danger,
body.lesemodus .fin-gehalt button, body.lesemodus [data-nur-bearbeiten], body.lesemodus .abgleich { display: none !important; }

/* ── Einklappbare Karten ──────────────────────────────────────────────────── */
.panel-header.mit-klapp { display: flex; align-items: center; gap: .6rem; }
.panel-header.mit-klapp h2 { flex: 1; }
.karte-klapp { background: none; border: none; color: #fff; opacity: .75; cursor: pointer; padding: .2rem;
    border-radius: 4px; display: inline-flex; line-height: 0; }
.karte-klapp:hover { opacity: 1; background: rgba(255,255,255,.12); }
.karte-klapp svg { transition: transform .15s ease; }
.panel.zugeklappt .karte-klapp svg { transform: rotate(-90deg); }
.panel.zugeklappt > :not(.panel-header) { display: none !important; }

/* ── Fehlerseite ──────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-page .code { font-size: 4rem; font-weight: 800; color: var(--primary); line-height: 1; }
.error-page p { color: var(--text-muted); margin: .75rem 0 1.5rem; }

/* ── Dark Mode ────────────────────────────────────────────────────────────── */
body.dark {
    --primary: #ef4444;
    --primary-hover: #dc2626;
    --primary-soft: #2a1212;
    --primary-soft-border: #7f1d1d;
    --nav-bg: #000000;
    --bg: #0c0c0d;
    --card-bg: #18181b;
    --border: #2e2e33;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --shadow: 0 1px 3px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4);
}
body.dark .btn-secondary { background: #27272a; color: var(--text); }
body.dark .btn-secondary:hover { background: #3f3f46; }
body.dark .badge-gray { background: #27272a; color: #d4d4d8; }
body.dark .badge-red { color: #fca5a5; }
body.dark .alert-error { color: #fca5a5; }
body.dark .hero { border: 1px solid var(--border); }
body.dark .tile-icon { background: #27272a; }
body.dark .login-page { background: linear-gradient(160deg, #000 0 45%, var(--bg) 45% 100%); }

/* ── Management: Logs & Jobs ──────────────────────────────────────────────── */
.log-kopf { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.segment { display: inline-flex; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; gap: 3px; }
.segment-link { padding: .35rem .85rem; border-radius: 6px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 13px; white-space: nowrap; }
.segment-link:hover { color: var(--text); }
.segment-link.aktiv { background: var(--primary); color: #fff; }
.segment-zahl { font-weight: 500; opacity: .75; margin-left: .2rem; }
.log-filter { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.log-filter select, .log-filter input[type="search"] { width: auto; min-width: 11rem; }
.log-check { display: inline-flex; align-items: center; gap: .35rem; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.log-tabelle td, .job-tabelle td { vertical-align: top; padding-top: .55rem; padding-bottom: .55rem; }
.log-nowrap { white-space: nowrap; }
.log-zeit-spalte { white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
.log-zeit { display: block; }
.log-wdh, .log-ip { display: block; font-size: 11.5px; color: var(--text-muted); }
.log-text { width: 100%; min-width: 18rem; }
.log-details summary { cursor: pointer; list-style: none; }
.log-details summary::-webkit-details-marker { display: none; }
.log-details summary::after { content: " ▸"; color: var(--text-muted); font-size: 11px; }
.log-details[open] summary::after { content: " ▾"; }
.log-details ul { margin: .4rem 0 .1rem; padding-left: 1rem; color: var(--text-muted); font-size: 12.5px; }
.log-details li.eingerueckt { margin-left: 1rem; list-style: circle; }
.log-badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: .1rem .5rem; border-radius: 999px;
    background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.log-angelegt, .log-ok { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.log-geaendert { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.log-geloescht, .log-badge-fehler { background: var(--primary-soft); color: var(--primary-hover); border-color: var(--primary-soft-border); }
.log-laeuft { background: #fffbeb; color: #b45309; border-color: #fde68a; }
tr.log-fehler td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.log-seiten { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .75rem; }
.log-hinweis { margin-top: -.5rem; }
.log-hinweis code { font-size: 11.5px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 .3rem; }
.job-name { min-width: 16rem; }
.job-name strong, .job-rhythmus { display: block; }
.job-name .hint, .job-rhythmus .hint, .log-nowrap .hint { display: block; margin-top: .15rem; white-space: normal; }
.job-rhythmus { min-width: 10rem; }
.job-ergebnis { min-width: 10rem; }
body.dark .log-angelegt, body.dark .log-ok { background: #0f2a1a; color: #4ade80; border-color: #14532d; }
body.dark .log-geaendert { background: #10203f; color: #93c5fd; border-color: #1e3a8a; }
body.dark .log-geloescht, body.dark .log-badge-fehler { color: #fca5a5; }
body.dark .log-laeuft { background: #2a2108; color: #fcd34d; border-color: #78350f; }
.mgmt-block { margin-bottom: 1.25rem; }
.mgmt-block .panel-header { display: flex; align-items: center; justify-content: space-between; }
.log-hinweis a { color: var(--primary); }

/* ── Laufende Verbindlichkeiten ───────────────────────────────────────────── */
.depot-kachel em { font-style: normal; }
.vb-tabelle td { vertical-align: middle; }
.vb-tabelle td > input[type="text"] { min-width: 7rem; }
.vb-tabelle input[type="date"] { width: 8.6rem; min-width: 8.6rem; padding-left: .4rem; padding-right: .3rem; }
.vb-tabelle .betrag-feld input { width: 5.6rem; }
.vb-tabelle td, .vb-tabelle th { padding-left: .45rem; padding-right: .45rem; }
.vb-offen { white-space: nowrap; }
.vb-balken { display: block; height: 4px; margin-top: .25rem; background: var(--border); border-radius: 2px; overflow: hidden; min-width: 4rem; }
.vb-balken span { display: block; height: 100%; background: #16a34a; }
.vb-ueberfaellig td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.vb-hinweis { display: block; font-size: 11.5px; font-weight: 600; color: var(--primary); }
.vb-erledigt { opacity: .7; }
.vb-zahlung { display: inline-flex !important; align-items: center; gap: .3rem; margin-right: .25rem; }
.vb-zahlung .betrag-feld input { width: 4.6rem; }
.vb-summe td { background: var(--bg); border-bottom: 2px solid var(--border); }

/* ── Politik: Weltkarte (Reiter über die ganze Bildschirmfläche) ─────────── */
/* Die Karte bleibt auch im hellen Design dunkel, damit die Grenzen leuchten. */
.politik-main { --politik-leiste: 42px; }
.politik-leiste { height: var(--politik-leiste); display: flex; align-items: center; gap: .5rem 1rem; padding: 0 1rem;
    background: var(--card-bg); border-bottom: 1px solid var(--border); }
.politik-leiste h1 { font-size: 15px; font-weight: 700; padding-right: 1rem; border-right: 1px solid var(--border); }
.reiter.reiter-schmal { border-bottom: none; margin: 0; align-self: stretch; align-items: stretch; flex-wrap: nowrap; }
.reiter-schmal .reiter-link { display: flex; align-items: center; padding: 0 .9rem; font-size: 13px; border-radius: 0;
    margin-bottom: 0; background: transparent; }
.reiter-schmal .reiter-link.aktiv { background: transparent; }
.politik-hilfe { flex: 1; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weltkarte-zoom { display: flex; gap: .3rem; }
.weltkarte-zoom .btn { min-width: 2rem; padding: .15rem .55rem; }
.weltkarte { position: relative; height: calc(100vh - 56px - var(--politik-leiste)); min-height: 300px;
    background: radial-gradient(ellipse at 50% 45%, #0a1a33 0%, #050b16 55%, #03060d 100%);
    cursor: grab; touch-action: none; user-select: none; overflow: hidden; }
.weltkarte.zieht { cursor: grabbing; }
.weltkarte svg { display: block; width: 100%; height: 100%; }
.weltkarte-laden { padding: 2rem; text-align: center; color: #7c8aa5; }
.wk-glow { fill: none; stroke: rgba(37, 140, 255, .32); stroke-width: 3.5px; stroke-linejoin: round;
    vector-effect: non-scaling-stroke; pointer-events: none; }
.wk-land { fill: transparent; stroke: #4cc4ff; stroke-width: .8px; stroke-linejoin: round; vector-effect: non-scaling-stroke;
    transition: fill .15s ease; }
.wk-land.aktiv { fill: rgba(56, 189, 248, .14); }
.wk-hervor { fill: none; stroke: #e0f2fe; stroke-width: 1.6px; stroke-linejoin: round; vector-effect: non-scaling-stroke;
    pointer-events: none; filter: drop-shadow(0 0 3px rgba(125, 211, 252, .95)) drop-shadow(0 0 8px rgba(59, 130, 246, .8)); }
.weltkarte.zieht .wk-land.aktiv { fill: transparent; }
.wk-tip { position: absolute; pointer-events: none; background: rgba(3, 10, 22, .92); color: #e0f2fe; border: 1px solid #1e4b7a;
    box-shadow: 0 0 12px rgba(56, 189, 248, .35); border-radius: 6px; padding: .3rem .6rem; font-size: 13px; font-weight: 600; white-space: nowrap; }
.weltkarte-quelle { position: fixed; right: .75rem; bottom: .4rem; font-size: 11px; color: #4b5b78; pointer-events: none; }

/* ── Detailübersicht (Klick auf ein Land) – im Design der übrigen Seite, immer dunkel ──
   Alle Regeln gelten nur innerhalb von .land-dialog (Klassen wie .detail-kopf gibt es auch bei Kontakte). */
.land-dialog { --lu-bg: #0c0c0d; --lu-karte: #18181b; --lu-kopf: #000; --lu-rand: #2e2e33; --lu-text: #f4f4f5;
    --lu-leise: #a1a1aa; --lu-rot: #ef4444;
    margin: auto; width: min(1180px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 0;
    background: var(--lu-bg); color: var(--lu-text); border: 1px solid var(--lu-rand); border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .7); }
.land-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.land-dialog:focus { outline: none; }

/* Kopf wie die Navigationsleiste: schwarz mit roter Unterkante */
.land-dialog .detail-kopf { display: flex; align-items: center; gap: 1rem; padding: .9rem 3.5rem .9rem 1.25rem;
    background: var(--lu-kopf); border-bottom: 3px solid var(--lu-rot); }
.land-dialog .detail-kopf > div:not(.land-flagge) { flex: 1; min-width: 0; }
.land-dialog .land-flagge { width: 64px; height: 48px; flex-shrink: 0; border-radius: 4px; overflow: hidden;
    border: 1px solid var(--lu-rand); background: var(--lu-karte); display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 800; color: var(--lu-leise); }
.land-dialog .land-flagge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.land-dialog .detail-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--lu-leise); font-weight: 600; }
.land-dialog .detail-kopf h2 { font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1.25; }
.land-dialog .land-schliessen { position: absolute; top: 1rem; right: 1rem; width: 2rem; height: 2rem; border-radius: 6px;
    border: 1px solid var(--lu-rand); background: #27272a; color: var(--lu-text); font-size: 14px; cursor: pointer; }
.land-dialog .land-schliessen:hover { background: var(--lu-rot); border-color: var(--lu-rot); color: #fff; }
.land-dialog .land-schliessen:focus-visible { outline: 2px solid var(--lu-rot); outline-offset: 2px; }

/* Drei Karten wie .card.panel (schwarze Kopfzeile, dunkle Fläche) */
.land-dialog .detail-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.25fr);
    gap: 1rem; padding: 1.25rem; align-items: start; }
.land-dialog .detail-bereich { background: var(--lu-karte); border: 1px solid var(--lu-rand); border-radius: var(--radius);
    overflow: hidden; min-width: 0; }
.land-dialog .detail-bereich > h3 { background: var(--lu-kopf); color: #fff; font-size: 15px; font-weight: 700;
    padding: .75rem 1rem; border-bottom: 1px solid var(--lu-rand); }
.land-dialog .detail-bereich > h3 span { font-size: 12px; font-weight: 500; color: var(--lu-leise); margin-left: .4rem; }
.land-dialog .detail-bereich > :not(h3) { margin-left: 1rem; margin-right: 1rem; }
.land-dialog .detail-bereich > :last-child { margin-bottom: 1rem; }

/* Länderdaten: Kennzahlen-Zeilen */
.land-dialog .land-daten { display: block; margin-top: .25rem; }
.land-dialog .land-daten > div { padding: .7rem 0; border-bottom: 1px solid var(--lu-rand); }
.land-dialog .land-daten > div:last-child { border-bottom: none; }
.land-dialog .land-daten dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--lu-leise); font-weight: 600; }
.land-dialog .land-daten dd { font-size: 1.15rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; margin-top: .1rem; }
.land-dialog .land-daten dd small { display: block; font-size: 11.5px; font-weight: 400; color: var(--lu-leise); }
.land-dialog .land-leer { color: var(--lu-leise); font-weight: 400; font-size: .95rem; }
.land-dialog .detail-quelle { font-size: 11px; color: #71717a; padding-top: .6rem; border-top: 1px solid var(--lu-rand); }

/* Zentralbank */
.land-dialog .bank-name { font-size: 1.05rem; font-weight: 700; color: #fff; margin-top: .9rem; }
.land-dialog .bank-hinweis { font-size: 12.5px; color: var(--lu-leise); margin-top: .2rem; }
.land-dialog .detail-zentralbank h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--lu-leise);
    font-weight: 600; margin: 1rem 0 .4rem; }
.land-dialog .zins-liste { list-style: none; border: 1px solid var(--lu-rand); border-radius: 6px; overflow: hidden; }
.land-dialog .zins-liste li { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .55rem .75rem; background: var(--lu-bg); border-bottom: 1px solid var(--lu-rand); }
.land-dialog .zins-liste li:last-child { border-bottom: none; }
.land-dialog .zins-name { display: block; font-size: 13.5px; font-weight: 600; color: #fff; }
.land-dialog .zins-info { display: block; font-size: 11.5px; color: var(--lu-leise); }
.land-dialog .zins-satz { font-size: 1.1rem; font-weight: 700; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Nächster Zinsentscheid: Datum + Countdown, rot markiert */
.land-dialog .entscheid-zeile { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .65rem .8rem; background: var(--lu-kopf); border: 1px solid var(--lu-rand); border-left: 3px solid var(--lu-rot);
    border-radius: 6px; }
.land-dialog .entscheid-datum { display: block; font-size: 13.5px; font-weight: 700; color: #fff; }
.land-dialog .entscheid-countdown { font-size: 1.15rem; font-weight: 700; color: var(--lu-rot); white-space: nowrap;
    font-variant-numeric: tabular-nums; }
.land-dialog .entscheid-form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .5rem; }
.land-dialog .entscheid-form input { width: auto; padding: .3rem .5rem; font-size: 13px; background: var(--lu-bg);
    color: var(--lu-text); border: 1px solid var(--lu-rand); border-radius: 6px; color-scheme: dark; }
.land-dialog .entscheid-form .btn-secondary { background: #27272a; color: var(--lu-text); }
.land-dialog .entscheid-form .btn-secondary:hover { background: #3f3f46; }
.land-dialog .entscheid-fehler { font-size: 12px; color: #fca5a5; flex-basis: 100%; }
.land-dialog .entscheid-fehler:empty { display: none; }

/* Artikel- und Meldungslisten */
.land-dialog .land-artikel ul, .land-dialog .meldungen { list-style: none; }
.land-dialog .land-artikel ul { margin-top: .25rem; }
.land-dialog .land-artikel li, .land-dialog .meldungen li { border-bottom: 1px solid var(--lu-rand); }
.land-dialog .land-artikel li:last-child, .land-dialog .meldungen li:last-child { border-bottom: none; }
.land-dialog .land-artikel a, .land-dialog .meldungen a { display: block; padding: .65rem 0; text-decoration: none; color: var(--lu-text); }
.land-dialog .land-artikel a:hover .land-artikel-titel, .land-dialog .meldungen a:hover .land-artikel-titel { color: var(--lu-rot); }
.land-dialog .land-artikel-meta { display: flex; align-items: center; gap: .4rem; font-size: 11.5px; color: var(--lu-leise); }
.land-dialog .land-artikel-titel { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.4; margin-top: .15rem;
    color: #fff; transition: color .12s; }
.land-dialog .land-artikel-hinweis { font-size: 13px; color: var(--lu-leise); padding: .6rem 0; }
.land-dialog .land-artikel-plus { font-size: 10px; font-weight: 700; color: #fff; background: var(--lu-rot); border-radius: 3px;
    padding: .05rem .35rem; letter-spacing: .02em; }
.land-dialog .quelle-badge { font-size: 10px; font-weight: 700; border-radius: 3px; padding: .05rem .35rem;
    color: #d4d4d8; background: #27272a; border: 1px solid #3f3f46; }

@media (max-width: 1000px) {
    .land-dialog .detail-raster { grid-template-columns: 1fr 1fr; }
    .land-dialog .detail-artikel { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
    .land-dialog .detail-raster { grid-template-columns: 1fr; padding: 1rem; }
}

/* Länder auf der Weltkarte sind anklickbar */
.wk-land { cursor: pointer; }
.weltkarte.zieht .wk-land { cursor: grabbing; }

/* ── Detailübersicht: Reiter und Inlandspolitik ──────────────────────────── */
.land-dialog .detail-reiter { display: flex; gap: .25rem; padding: 0 1.25rem; background: var(--lu-kopf); border-bottom: 1px solid var(--lu-rand); }
.land-dialog .detail-reiter-link { background: none; border: none; border-bottom: 3px solid transparent; color: var(--lu-leise);
    font: inherit; font-weight: 600; font-size: 14px; padding: .7rem 1rem; cursor: pointer; margin-bottom: -1px; }
.land-dialog .detail-reiter-link:hover { color: #fff; }
.land-dialog .detail-reiter-link.aktiv { color: #fff; border-bottom-color: var(--lu-rot); }
.land-dialog .inland { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.land-dialog .inland[hidden], .land-dialog .detail-raster[hidden], .land-dialog .inland > [hidden] { display: none; }
.land-dialog .inland-leiste { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.land-dialog .inland-umschalter { min-width: 8.5rem; font-weight: 700; letter-spacing: .02em; }
.land-dialog .inland-umschalter::after { content: " \21C4"; font-weight: 400; opacity: .8; }
.land-dialog .inland-hinweis { font-size: 12.5px; color: var(--lu-leise); }
.land-dialog .inland-stand { margin-left: auto; font-size: 12px; color: #71717a; }
.land-dialog .inland-bereich { margin-bottom: 1rem; }
.land-dialog .inland-bereich > h3 span { font-size: 12px; font-weight: 500; color: var(--lu-leise); margin-left: .4rem; }
.land-dialog .inland-leer { color: var(--lu-leise); font-size: 13px; padding: .8rem 0; }
.land-dialog .inland-laden { display: flex; align-items: center; gap: .75rem; padding: 1.5rem 1rem; color: var(--lu-leise); font-size: 13.5px;
    background: var(--lu-karte); border: 1px solid var(--lu-rand); border-radius: var(--radius); }
.land-dialog .inland-spinner { width: 20px; height: 20px; flex-shrink: 0; border: 3px solid var(--lu-rand); border-top-color: var(--lu-rot);
    border-radius: 50%; animation: inland-drehen .9s linear infinite; }
@keyframes inland-drehen { to { transform: rotate(360deg); } }
.land-dialog .inland-quelle { border-top: none; text-align: right; }

/* Kammern mit Halbkreis-Sitzdiagramm */
.land-dialog .kammern { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin: 1rem; }
.land-dialog .kammer { background: var(--lu-bg); border: 1px solid var(--lu-rand); border-radius: 6px; padding: .85rem 1rem 1rem; }
.land-dialog .kammer-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.land-dialog .kammer-kopf strong { color: #fff; font-size: 14.5px; }
.land-dialog .kammer-kopf span { color: var(--lu-leise); font-size: 12.5px; white-space: nowrap; }
.land-dialog .halbkreis { display: block; width: 100%; max-width: 440px; margin: .6rem auto .4rem; }
.land-dialog .halbkreis circle { stroke: rgba(255, 255, 255, .3); stroke-width: .006; }  /* heller Rand: auch schwarze Parteien sichtbar */
.land-dialog .halbkreis-zahl { fill: #fff; font-size: .2px; font-weight: 800; text-anchor: middle; }
.land-dialog .legende { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .25rem .9rem; }
.land-dialog .legende li { display: flex; align-items: center; gap: .45rem; font-size: 12.5px; min-width: 0; }
.land-dialog .legende-farbe { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(255, 255, 255, .25); }
.land-dialog .legende-name { color: var(--lu-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.land-dialog .legende-zahl { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Personen (Staats-/Regierungsspitze, Regierung) */
.land-dialog .personen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem .75rem; margin: 1rem; }
.land-dialog .personen-spitze { grid-template-columns: repeat(auto-fit, minmax(200px, 240px)); justify-content: center; }
.land-dialog .person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; min-width: 0; }
.land-dialog .person-bild { width: 92px; height: 92px; border-radius: 50%; border: 4px solid #71717A; overflow: hidden; background: var(--lu-bg);
    display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: var(--lu-leise); margin-bottom: .25rem; }
.land-dialog .person-gross .person-bild { width: 140px; height: 140px; border-width: 5px; font-size: 3rem; }
.land-dialog .person-bild img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.land-dialog .person-amt { font-size: 11.5px; color: var(--lu-leise); line-height: 1.3; }
.land-dialog .person-gross .person-amt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.land-dialog .person-name { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.25; }
.land-dialog .person-gross .person-name { font-size: 16px; }
.land-dialog .person-partei { display: inline-block; font-size: 11.5px; font-weight: 700; padding: .12rem .55rem; border-radius: 999px;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Parteien */
.land-dialog .parteien { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .75rem; margin: 1rem; }
.land-dialog .partei { background: var(--lu-bg); border: 1px solid var(--lu-rand); border-left: 4px solid #71717A; border-radius: 6px; padding: .7rem .85rem; }
.land-dialog .partei-kopf { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.land-dialog .partei-voll { font-size: 12.5px; color: var(--lu-text); }
.land-dialog .partei-sitze { margin-left: auto; font-size: 11.5px; color: var(--lu-leise); }
.land-dialog .partei-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.land-dialog .partei-tags span { font-size: 11px; padding: .08rem .45rem; border-radius: 4px; background: #27272a; color: #d4d4d8; border: 1px solid #3f3f46; }
.land-dialog .partei-tags .tag-ausrichtung { background: #3f1d1d; border-color: #7f1d1d; color: #fecaca; font-weight: 600; }
.land-dialog .partei-text { font-size: 12.5px; color: var(--lu-text); line-height: 1.5; margin-top: .5rem; }

/* Wahlen */
.land-dialog .wahl-fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; margin: 1rem; }
.land-dialog .wahl-fakten > div { background: var(--lu-bg); border: 1px solid var(--lu-rand); border-left: 3px solid var(--lu-rot); border-radius: 6px; padding: .6rem .8rem; }
.land-dialog .wahl-fakten dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--lu-leise); font-weight: 600; }
.land-dialog .wahl-fakten dd { font-size: 14.5px; font-weight: 700; color: #fff; margin-top: .15rem; }
.land-dialog .wahl-spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin: 0 1rem 1rem; }
.land-dialog .wahl-block h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--lu-leise); font-weight: 600; margin-bottom: .5rem; }
.land-dialog .wahl-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.land-dialog .wahl-tabelle th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--lu-leise); font-weight: 600;
    padding: .35rem .5rem; border-bottom: 1px solid var(--lu-rand); }
.land-dialog .wahl-tabelle td { padding: .45rem .5rem; border-bottom: 1px solid var(--lu-rand); color: var(--lu-text); }
.land-dialog .wahl-tabelle td.wahl-partei { font-weight: 700; color: #fff; }
.land-dialog .umfrage-info { font-size: 12.5px; color: var(--lu-leise); margin-bottom: .5rem; }
.land-dialog .umfrage { display: flex; flex-direction: column; gap: .35rem; }
.land-dialog .umfrage-zeile { display: grid; grid-template-columns: 9rem 1fr 3.6rem; align-items: center; gap: .6rem; font-size: 13px; }
.land-dialog .umfrage-name { color: var(--lu-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.land-dialog .umfrage-spur { height: 14px; background: var(--lu-bg); border-radius: 3px; overflow: hidden; }
.land-dialog .umfrage-balken { display: block; height: 100%; border-radius: 3px; }
.land-dialog .umfrage-wert { text-align: right; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.land-dialog .umfrage-quelle { display: inline-block; margin-top: .6rem; font-size: 12px; color: var(--lu-rot); }
@media (max-width: 760px) {
    .land-dialog .wahl-spalten { grid-template-columns: 1fr; }
    .land-dialog .parteien { grid-template-columns: 1fr; }
}
.land-dialog .person-bild { box-shadow: 0 0 0 1px #52525b, 0 2px 8px rgba(0, 0, 0, .5); }
.land-dialog .person-partei { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.land-dialog .partei { box-shadow: inset 4px 0 0 rgba(255, 255, 255, .08); }

/* ── Politik: Karte der Verbandsgemeinde Leiningerland ─────────────────────── */
.gemeindekarte .gk-gemeinde { fill: transparent; stroke: #4cc4ff; stroke-width: 1px; vector-effect: non-scaling-stroke;
    stroke-linejoin: round; cursor: pointer; transition: fill .15s ease; }
.gemeindekarte .gk-gemeinde.aktiv { fill: rgba(56, 189, 248, .16); }
.gemeindekarte .gk-vg-glow { fill: none; stroke: rgba(239, 68, 68, .35); stroke-width: 7px; vector-effect: non-scaling-stroke;
    stroke-linejoin: round; pointer-events: none; }
.gemeindekarte .gk-vg { fill: none; stroke: #ef4444; stroke-width: 2.2px; vector-effect: non-scaling-stroke; stroke-linejoin: round;
    pointer-events: none; }
.gemeindekarte .gk-hervor { fill: none; stroke: #e0f2fe; stroke-width: 2.4px; vector-effect: non-scaling-stroke; stroke-linejoin: round;
    pointer-events: none; filter: drop-shadow(0 0 3px rgba(125, 211, 252, .9)); }
.gemeindekarte .gk-namen { pointer-events: none; fill: #cfe3ff; font-weight: 600; text-anchor: middle; dominant-baseline: middle;
    paint-order: stroke; stroke: #03060d; stroke-width: .25em; stroke-linejoin: round; }
.gemeindekarte + .weltkarte-quelle { max-width: calc(100vw - 1.5rem); text-align: right; }
.wk-tip strong { display: block; }
.wk-tip span { display: block; font-size: 11.5px; font-weight: 500; color: #9fb7d6; margin-top: .1rem; }
.gemeindekarte .gk-umgebung { fill: rgba(161, 161, 170, .06); stroke: #71717a; stroke-width: 1px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; cursor: help; }
.gemeindekarte .gk-umgebung.aktiv { fill: rgba(161, 161, 170, .14); }
.gemeindekarte .gk-namen .gk-umgebung-name { fill: #a1a1aa; font-style: italic; font-weight: 500; }

/* VG-Außengrenze schwarz (mit hellem Saum, damit sie auf dem dunklen Kartengrund sichtbar bleibt) */
.gemeindekarte .gk-vg-glow { stroke: rgba(226, 232, 240, .28); stroke-width: 5px; }
.gemeindekarte .gk-vg { stroke: #000; stroke-width: 3.5px; }
/* Angrenzende Gebiete: ruhig, ohne Ortsaufteilung */
.gemeindekarte .gk-umgebung { fill: rgba(148, 163, 184, .07); stroke: #64748b; stroke-width: 1px; stroke-dasharray: none; }
.gemeindekarte .gk-umgebung.aktiv { fill: rgba(148, 163, 184, .16); }
.gemeindekarte .gk-namen .gk-umgebung-name { fill: #94a3b8; font-style: italic; font-weight: 500; }

/* Detailübersicht einer Ortsgemeinde (nutzt die Gestaltung der Länder-Detailübersicht) */
.land-dialog.og-dialog .og-inhalt { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.land-dialog .og-raster { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.6fr); gap: 1rem; align-items: start; }
.land-dialog .og-raster .personen { margin: 1rem; }
.land-dialog .og-rat-spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.25rem; margin: 1rem; align-items: start; }
.land-dialog .og-rat-diagramm { background: var(--lu-bg); border: 1px solid var(--lu-rand); border-radius: 6px; padding: .75rem 1rem; }
.land-dialog .og-sitz { cursor: help; transition: opacity .12s; }
.land-dialog .halbkreis:hover .og-sitz { opacity: .55; }
.land-dialog .halbkreis .og-sitz:hover { opacity: 1; stroke: #fff; stroke-width: .02; }
.land-dialog .og-sitz-info { font-size: 12.5px; color: var(--lu-leise); text-align: center; min-height: 1.2em; }
.land-dialog .og-fraktionen { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.land-dialog .og-fraktion { background: var(--lu-bg); border: 1px solid var(--lu-rand); border-left: 4px solid #71717A; border-radius: 6px; padding: .55rem .7rem; }
.land-dialog .og-fraktion-kopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.land-dialog .og-fraktion-zahl { font-size: 12px; color: var(--lu-leise); white-space: nowrap; }
.land-dialog .og-fraktion ul { list-style: none; display: flex; flex-direction: column; gap: .15rem; }
.land-dialog .og-fraktion li { font-size: 13px; color: var(--lu-text); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.land-dialog .og-rolle { font-size: 10.5px; font-weight: 700; color: #fecaca; background: #3f1d1d; border: 1px solid #7f1d1d; border-radius: 3px; padding: 0 .3rem; }
@media (max-width: 1000px) {
    .land-dialog .og-raster { grid-template-columns: 1fr 1fr; }
    .land-dialog .og-rat-spalten { grid-template-columns: 1fr; }
}
@media (max-width: 680px) { .land-dialog .og-raster { grid-template-columns: 1fr; } }

/* Sitzungsprotokolle der Ortsgemeinden / der VG (Verzeichnisse) */
.land-dialog .og-protokoll-hinweis { font-size: 12px; color: var(--lu-leise); margin: .8rem 1rem 0; }
.land-dialog .og-ordner-liste { display: flex; flex-direction: column; gap: .5rem; margin: .8rem 1rem 1rem; }
.land-dialog .og-ordner { background: var(--lu-bg); border: 1px solid var(--lu-rand); border-radius: 6px; }
.land-dialog .og-ordner-rat { border-left: 3px solid var(--lu-rot); }
.land-dialog .og-ordner summary { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; cursor: pointer; list-style: none; }
.land-dialog .og-ordner summary::-webkit-details-marker { display: none; }
.land-dialog .og-ordner summary::after { content: "▸"; color: var(--lu-leise); margin-left: .25rem; }
.land-dialog .og-ordner[open] summary::after { content: "▾"; }
.land-dialog .og-ordner-symbol { font-size: 15px; }
.land-dialog .og-ordner-name { flex: 1; font-weight: 700; color: #fff; font-size: 13.5px; }
.land-dialog .og-ordner-zahl { font-size: 12px; color: var(--lu-leise); white-space: nowrap; }
.land-dialog .og-ordner ul { list-style: none; border-top: 1px solid var(--lu-rand); max-height: 320px; overflow-y: auto; }
.land-dialog .og-ordner li a { display: grid; grid-template-columns: 6.2rem 1fr auto; gap: .75rem; align-items: center; padding: .45rem .8rem;
    text-decoration: none; color: var(--lu-text); border-bottom: 1px solid var(--lu-rand); font-size: 13px; }
.land-dialog .og-ordner li:last-child a { border-bottom: none; }
.land-dialog .og-ordner li a:hover { background: var(--lu-karte); }
.land-dialog .og-ordner li a:hover .og-protokoll-titel, .land-dialog .og-ordner li a:hover .og-protokoll-link { color: var(--lu-rot); }
.land-dialog .og-protokoll-datum { font-variant-numeric: tabular-nums; color: var(--lu-leise); }
.land-dialog .og-protokoll-link { font-size: 12px; color: var(--lu-leise); white-space: nowrap; }
.land-dialog .og-hinweis { font-size: 10.5px; color: #71717a; margin-top: .15rem; }
.politik-leiste #vgDetailKnopf { white-space: nowrap; }
.politik-leiste #kreisDetailKnopf { white-space: nowrap; }
.land-dialog .og-presse-link { display: inline-block; margin: .8rem 1rem 0; }

/* Lokalpolitik: Kreiskarte mit Lupe für die VG Leiningerland */
.gemeindekarte .gk-orte, .gemeindekarte .gk-ort-namen, .gemeindekarte .gk-lupe-rand { display: none; }
.gemeindekarte.gk-lupe-an .gk-orte, .gemeindekarte.gk-lupe-an .gk-ort-namen, .gemeindekarte.gk-lupe-an .gk-lupe-rand { display: inline; }
.gemeindekarte.gk-lupe-an .gk-lupe-name { display: none; }
.gemeindekarte.gk-lupe-an .gk-lupe-einheit { pointer-events: none; }
.gemeindekarte .gk-lupe-rand { fill: none; stroke: #000; stroke-width: 2.5px; vector-effect: non-scaling-stroke; pointer-events: none; }
.gemeindekarte .gk-einheit-name { font-weight: 700; }
.gemeindekarte .gk-zurueck { position: absolute; left: 12px; top: 12px; z-index: 2; }
.land-dialog .og-lupe { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; margin-right: .75rem; white-space: nowrap; }
.land-dialog .og-lupe-symbol { width: 18px; height: 18px; }
.gemeindekarte .gk-zurueck[hidden] { display: none; }

/* ── Aktienübersicht (Finanzen) und Betriebsübersicht je Aktie ── */
.aktien-hinweis { margin-bottom: .9rem; }
.aktien-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.aktien-karte { display: flex; flex-direction: column; gap: .7rem; padding: .95rem 1rem; text-decoration: none; color: var(--text);
    border-top: 3px solid var(--border); transition: border-color .15s, transform .15s, box-shadow .15s; }
.aktien-karte:hover { border-top-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.aktien-kopf { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.aktien-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aktien-kuerzel { font-size: 12px; color: var(--text-muted); }
.aktien-kurs { display: flex; align-items: baseline; gap: .6rem; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aktien-tag { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.aktien-tag.plus { color: #16a34a; } .aktien-tag.minus { color: var(--primary); }
body.dark .aktien-tag.plus { color: #4ade80; }
.aktien-fuss { display: flex; align-items: center; gap: .55rem; font-size: 12.5px; color: var(--text-muted); margin-top: auto;
    border-top: 1px solid var(--border); padding-top: .6rem; }
.aktien-zahl { font-weight: 600; color: var(--text); }
.aktien-zahl.leer { font-weight: 400; color: var(--text-muted); }
.aktien-letzte { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; }
.aktien-pfeil { margin-left: auto; color: var(--text-muted); }
.aktien-karte:hover .aktien-pfeil { color: var(--primary); }

/* Kategorie-Abzeichen */
.aktien-kat { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
    padding: .15rem .45rem; border-radius: 4px; color: #fff; background: #71717a; }
.kat-uebernahme { --kat: #7c3aed; } .kat-vorstand { --kat: #0891b2; } .kat-deal { --kat: #16a34a; } .kat-zahlen { --kat: #2563eb; }
.kat-kapital { --kat: #ca8a04; } .kat-standort { --kat: #ea580c; } .kat-recht { --kat: #dc2626; } .kat-ankuendigung { --kat: #db2777; }
.kat-weitere { --kat: #71717a; }
.aktien-kat[class*="kat-"] { background: var(--kat); }

.betrieb-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.2rem 1.4rem;
    border-top: 3px solid var(--primary); margin-bottom: 1rem; }
.betrieb-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.betrieb-titel h1 { margin: .15rem 0 .2rem; font-size: 1.6rem; }
.betrieb-meta { font-size: 13px; color: var(--text-muted); }
.betrieb-kurs { text-align: right; }
.betrieb-kurs > strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.betrieb-perf { display: flex; gap: .9rem; justify-content: flex-end; margin-top: .3rem; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.betrieb-perf span { display: flex; flex-direction: column; align-items: flex-end; }
.betrieb-perf small { font-size: 10.5px; font-weight: 500; color: var(--text-muted); }
.betrieb-filter { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.betrieb-chip { border: 1px solid var(--border); background: var(--card-bg); color: var(--text); border-radius: 999px; padding: .32rem .8rem;
    font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.betrieb-chip span { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.betrieb-chip[class*="kat-"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--kat); }
.betrieb-chip:hover { border-color: var(--text-muted); }
.betrieb-chip.aktiv { background: var(--text); color: var(--card-bg); border-color: var(--text); }
.betrieb-chip.aktiv span { color: inherit; opacity: .75; }
.betrieb-liste { padding: .4rem 1.4rem 1rem; }
.betrieb-tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
    margin: 1.1rem 0 .3rem; padding-bottom: .35rem; border-bottom: 1px solid var(--border); }
.betrieb-meldung { display: grid; grid-template-columns: 11.5rem 1fr; gap: 1rem; align-items: start; padding: .75rem 0;
    border-bottom: 1px solid var(--border); }
.betrieb-meldung:last-child, .betrieb-meldung + .betrieb-tag { border-bottom: none; }
.betrieb-meldung .aktien-kat { justify-self: start; margin-top: .15rem; }
.betrieb-inhalt h3 { margin: 0 0 .25rem; font-size: 15px; line-height: 1.35; }
.betrieb-inhalt h3 a { color: var(--text); text-decoration: none; }
.betrieb-inhalt h3 a:hover { color: var(--primary); text-decoration: underline; }
.betrieb-inhalt p { margin: 0 0 .3rem; font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }
.betrieb-quelle { font-size: 12px; color: var(--text-muted); }
.betrieb-leer { padding: 1.5rem 0; color: var(--text-muted); }
.betrieb-fuss { margin-top: .8rem; }
@media (max-width: 640px) {
    .betrieb-meldung { grid-template-columns: 1fr; gap: .4rem; }
    .betrieb-kurs { text-align: left; } .betrieb-perf { justify-content: flex-start; }
}
.aktien-zahl { white-space: nowrap; }
.aktien-letzte { overflow: hidden; white-space: nowrap; }
.aktien-letzte .aktien-kat { overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 11rem; }

/* ── Lieferkette in der Betriebsübersicht ── */
.lk-panel { margin-bottom: 1rem; }
.lk-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lk-kopf h2 span { font-size: 12.5px; font-weight: 400; color: var(--text-muted); margin-left: .5rem; }
.lk-legende .lk-gestrichelt { color: var(--text-muted); font-style: italic; }
.lk-chart { min-height: 260px; }
.sankey-unbekannt { opacity: .2; }
body.dark .sankey-unbekannt { opacity: .26; }
.fluss-chart svg.hover .sankey-unbekannt { opacity: .12; }
.fluss-chart svg.hover .sankey-unbekannt:hover { opacity: .6; }
.lk-hinweise { padding: 0 1.25rem 1rem; font-size: 13px; color: var(--text-muted); display: flex; flex-direction: column; gap: .35rem; }
.lk-hinweise strong { color: var(--text); }
.lk-quelle a { color: inherit; }
.lk-pruefung { margin: .75rem 1.25rem 0; }
.lk-dialog { padding: 1.1rem 1.3rem; }
.lk-dialog .fluss-dialog-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.lk-dialog h2 { font-size: 1.15rem; }
.lk-angaben { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem .8rem; align-items: end; margin-bottom: 1.1rem;
    padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.lk-angaben label { display: flex; flex-direction: column; gap: .25rem; font-size: 12px; color: var(--text-muted); }
.lk-angaben .lk-breit { grid-column: 1 / -1; }
.lk-angaben button { justify-self: start; }
.lk-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: .9rem; }
.lk-tabelle th, .lk-tabelle td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lk-tabelle th { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.lk-tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.lk-neu { display: grid; grid-template-columns: 9rem 1.2fr 1.5fr 9rem 1fr 1fr auto; gap: .45rem; margin-bottom: .6rem; }
@media (max-width: 900px) { .lk-angaben, .lk-neu { grid-template-columns: 1fr; } }
.sankey-text-oben { font-size: 13.5px; }
.sankey-spalte { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.betrieb-meldung[hidden], .betrieb-tag[hidden] { display: none; }

/* ── Obersülzen: Gebäudekarte ── */
.hauskarte .hk-nachbar { fill: rgba(148, 163, 184, .05); stroke: #475569; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.hauskarte .hk-gemeinde { fill: rgba(56, 189, 248, .03); stroke: none; }
.hauskarte .hk-flurstueck { fill: none; stroke: rgba(148, 163, 184, .16); stroke-width: .6px; vector-effect: non-scaling-stroke; }
.hauskarte .hk-haus { stroke-width: .8px; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .12s; }
.hauskarte .hk-haus.hk-wohnen { fill: rgba(76, 196, 255, .38); stroke: #4cc4ff; }
.hauskarte .hk-haus.hk-wirtschaft { fill: rgba(245, 158, 11, .30); stroke: #f59e0b; }
.hauskarte .hk-haus.hk-oeffentlich { fill: rgba(168, 85, 247, .38); stroke: #c084fc; }
.hauskarte .hk-haus.hk-neben { fill: rgba(148, 163, 184, .22); stroke: #94a3b8; }
.hauskarte .hk-haus.aktiv { fill: rgba(255, 255, 255, .55); stroke: #fff; }
.hauskarte .hk-haus.gewaehlt { fill: var(--primary, #ef4444); stroke: #fff; stroke-width: 1.6px; }
.hauskarte .hk-strasse { fill: #e2e8f0; font-weight: 600; font-style: italic; text-anchor: middle; paint-order: stroke;
    stroke: rgba(3, 10, 22, .85); stroke-width: .25em; pointer-events: none; }
.hauskarte .hk-nummern { display: none; }
.hauskarte.hk-nah .hk-nummern { display: inline; }
.hauskarte .hk-nummern text { fill: #fff; text-anchor: middle; dominant-baseline: middle; pointer-events: none;
    paint-order: stroke; stroke: rgba(3, 10, 22, .75); stroke-width: .22em; }
.hauskarte .hk-legende { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: 12px;
    color: #cbd5e1; background: rgba(3, 10, 22, .78); border: 1px solid #1e3a5f; border-radius: 6px; padding: .45rem .7rem; pointer-events: none; }
.hauskarte .hk-legende span { display: inline-flex; align-items: center; gap: .35rem; }
.hauskarte .hk-legende i { width: 12px; height: 12px; border-radius: 2px; border: 1px solid; }
.hauskarte .hk-legende i.hk-wohnen { background: rgba(76, 196, 255, .38); border-color: #4cc4ff; }
.hauskarte .hk-legende i.hk-wirtschaft { background: rgba(245, 158, 11, .30); border-color: #f59e0b; }
.hauskarte .hk-legende i.hk-oeffentlich { background: rgba(168, 85, 247, .38); border-color: #c084fc; }
.hauskarte .hk-legende i.hk-neben { background: rgba(148, 163, 184, .22); border-color: #94a3b8; }
.land-dialog.haus-dialog { width: min(640px, 94vw); }
.land-dialog .haus-inhalt { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.land-dialog .haus-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.land-dialog .haus-raster .land-daten { margin: .8rem 1rem 1rem; }
.land-dialog .haus-hinweis { font-size: 13px; color: var(--lu-leise); background: var(--lu-bg); border: 1px solid var(--lu-rand);
    border-left: 3px solid #94a3b8; border-radius: 6px; padding: .6rem .8rem; }
.land-dialog .haus-id { margin: 0; }
@media (max-width: 560px) { .land-dialog .haus-raster { grid-template-columns: 1fr; } }
.hauskarte .hk-strasse { display: none; }
.hauskarte.hk-mittel .hk-strasse { display: inline; }

/* Obersülzen: Umschalter Häuser / Flurstücke und Flurstücksansicht */
.hauskarte .hk-modus { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; gap: 6px; }
.hauskarte .hk-modus-knopf { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; cursor: pointer;
    background: rgba(3, 10, 22, .85); color: #94a3b8; border: 1px solid #1e3a5f; transition: color .12s, border-color .12s, background .12s; }
.hauskarte .hk-modus-knopf svg { width: 24px; height: 24px; }
.hauskarte .hk-modus-knopf:hover { color: #e2e8f0; border-color: #4cc4ff; }
.hauskarte .hk-modus-knopf.aktiv { color: #fff; background: var(--primary, #ef4444); border-color: var(--primary, #ef4444); }
.hauskarte .hk-flurstueck { pointer-events: none; }
.hauskarte .hk-flst-texte, .hauskarte .hk-legende-flst { display: none; }
.hauskarte.hk-modus-flst .hk-haeuser, .hauskarte.hk-modus-flst .hk-nummern, .hauskarte.hk-modus-flst .hk-legende-haus { display: none; }
.hauskarte.hk-modus-flst .hk-flst-texte { display: inline; }
.hauskarte.hk-modus-flst .hk-legende-flst { display: flex; }
.hauskarte.hk-modus-flst .hk-flurstueck { pointer-events: all; cursor: pointer; fill: var(--brw); stroke: rgba(226, 232, 240, .55); stroke-width: .8px; }
.hauskarte.hk-modus-flst .hk-flurstueck.aktiv { stroke: #fff; stroke-width: 2px; filter: brightness(1.35); }
.hauskarte.hk-modus-flst .hk-flurstueck.gewaehlt { stroke: var(--primary, #ef4444); stroke-width: 2.4px; }
.hauskarte .hk-flst-texte text { fill: #f8fafc; text-anchor: middle; pointer-events: none; paint-order: stroke;
    stroke: rgba(3, 10, 22, .8); stroke-width: .25em; font-size: inherit; }
.hauskarte .hk-flst-nr { font-weight: 700; }
.hauskarte .hk-flst-brw { fill: #fde68a; }
.hauskarte .hk-legende-flst strong { width: 100%; font-size: 11px; letter-spacing: .04em; color: #e2e8f0; }
.land-dialog .haus-liste { list-style: none; margin: .7rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; font-size: 13px; color: var(--lu-text); }

/* Obersülzen: neutrale, graue Karte – Farbe nur durch die politische Orientierung der Bewohner */
.weltkarte.hauskarte { background: radial-gradient(ellipse at 50% 45%, #1e1f22 0%, #141517 60%, #0c0c0e 100%); }
.hauskarte .hk-nachbar { fill: rgba(255, 255, 255, .025); stroke: #3f3f46; }
.hauskarte .hk-gemeinde { fill: rgba(255, 255, 255, .03); }
.hauskarte .hk-flurstueck { stroke: rgba(212, 212, 216, .14); }
.hauskarte .hk-haus { fill: #4b5563; stroke: #9ca3af; stroke-width: .7px; }
.hauskarte .hk-haus.hk-bewohnt { fill: #6b7280; stroke: #d1d5db; }
.hauskarte .hk-haus.hk-gefaerbt { stroke: rgba(255, 255, 255, .7); stroke-width: .9px; }
.hauskarte .hk-haus.aktiv { fill: #9ca3af; stroke: #fff; stroke-width: 1.8px; filter: brightness(1.2); }
.hauskarte .hk-haus.gewaehlt { fill: #9ca3af; stroke: #fff; stroke-width: 2.6px; }
.hauskarte .hk-strasse { fill: #e5e7eb; stroke: rgba(12, 12, 14, .88); }
.hauskarte .wk-tip { background: rgba(20, 20, 23, .95); border-color: #3f3f46; color: #f4f4f5; }
.hauskarte .hk-legende { background: rgba(14, 14, 16, .88); border-color: #3f3f46; color: #d4d4d8; }
.hauskarte .hk-legende-haus strong { width: 100%; font-size: 11px; letter-spacing: .04em; color: #e4e4e7; }
.hauskarte .hk-legende i { border-color: rgba(255, 255, 255, .35); }
.hauskarte .hk-modus-knopf { background: rgba(20, 20, 23, .9); border-color: #3f3f46; color: #a1a1aa; }
.hauskarte .hk-modus-knopf:hover { border-color: #a1a1aa; color: #f4f4f5; }

/* Haushalt in der Detailübersicht eines Hauses */
.land-dialog.haus-dialog { width: min(760px, 95vw); }
.land-dialog .haus-haushalt-inhalt { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .7rem; }
.land-dialog .haus-feld { display: flex; flex-direction: column; gap: .3rem; font-size: 12px; color: var(--lu-leise); }
.land-dialog .haus-feld input, .land-dialog .haus-feld textarea, .land-dialog .haus-bewohner-zeile input:not([type=color]),
.land-dialog .haus-bewohner-zeile select, .land-dialog .haus-neue-orientierung input:not([type=color]) {
    background: var(--lu-bg); color: var(--lu-text); border: 1px solid var(--lu-rand); border-radius: 6px; padding: .4rem .55rem; font: inherit; font-size: 13.5px; }
.land-dialog .haus-feld textarea { resize: vertical; min-height: 4.5rem; }
.land-dialog .haus-unterkopf { font-size: 12px; color: var(--lu-leise); margin-bottom: -.3rem; }
.land-dialog .haus-bewohner { display: flex; flex-direction: column; gap: .4rem; }
.land-dialog .haus-bewohner-zeile { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.land-dialog .haus-bewohner-zeile > input:not([type=color]) { flex: 1 1 11rem; min-width: 8rem; }
.land-dialog .haus-bewohner-zeile select { flex: 0 1 11rem; }
.land-dialog .haus-bewohner-neu { padding-top: .45rem; border-top: 1px dashed var(--lu-rand); }
.land-dialog .haus-farbpunkt { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 1px solid rgba(255, 255, 255, .35); }
.land-dialog .haus-plus { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.land-dialog .haus-neue-orientierung { display: inline-flex; align-items: center; gap: .35rem; }
.land-dialog .haus-neue-orientierung[hidden] { display: none; }
.land-dialog input[type=color] { width: 34px; height: 30px; padding: 0 2px; border: 1px solid var(--lu-rand); border-radius: 6px; background: var(--lu-bg); cursor: pointer; }
.land-dialog .haus-aktionen { display: flex; align-items: center; gap: .7rem; }
.land-dialog .haus-gespeichert { font-size: 12px; color: #4ade80; }
.land-dialog .haus-orientierungen summary { cursor: pointer; font-size: 12.5px; color: var(--lu-leise); margin-bottom: .45rem; }
.land-dialog .haus-orientierungen .haus-bewohner-zeile { margin-bottom: .35rem; }
.land-dialog .haus-fehler { font-size: 12.5px; color: #fca5a5; }
.land-dialog .haus-bewohner-liste { list-style: none; display: flex; flex-direction: column; gap: .35rem; font-size: 13.5px; color: var(--lu-text); }
.land-dialog .haus-bewohner-liste li { display: flex; align-items: center; gap: .5rem; }
.land-dialog .haus-bewohner-liste small { color: var(--lu-leise); font-size: 12px; }
.land-dialog .haus-leer, .land-dialog .haus-hinweis-klein { font-size: 12.5px; color: var(--lu-leise); }
.land-dialog .haus-notizen-text { font-size: 13.5px; color: var(--lu-text); white-space: pre-wrap; background: var(--lu-bg);
    border: 1px solid var(--lu-rand); border-radius: 6px; padding: .55rem .7rem; }
/* Tortendiagramm der Orientierungen im Haushalt */
.land-dialog .haus-torte { display: flex; align-items: center; gap: 1.2rem; padding: .3rem 0 .6rem; border-bottom: 1px solid var(--lu-rand); }
.land-dialog .haus-torte-grafik { width: 118px; height: 118px; flex: none; }
.land-dialog .haus-torte-stueck { stroke: rgba(255, 255, 255, .6); stroke-width: 1.1; stroke-linejoin: round; }
.land-dialog .haus-torte-legende { list-style: none; display: flex; flex-direction: column; gap: .35rem; font-size: 13.5px; color: var(--lu-text); }
.land-dialog .haus-torte-legende li { display: grid; grid-template-columns: 12px minmax(6rem, auto) 3.2rem auto; align-items: center; gap: .5rem; }
.land-dialog .haus-torte-legende strong { text-align: right; font-variant-numeric: tabular-nums; }
.land-dialog .haus-torte-legende small { color: var(--lu-leise); font-size: 12px; }

/* Obersülzen: Import aus Excel */
.land-dialog.import-dialog { width: min(720px, 95vw); }
.land-dialog .import-zeilen { display: flex; flex-direction: column; gap: .55rem; padding: .8rem 1rem 1rem; }
.land-dialog .import-zeile { display: grid; grid-template-columns: 12rem 1fr; align-items: center; gap: .8rem; font-size: 13.5px; color: var(--lu-text); }
.land-dialog .import-zeile input:not([type=file]), .land-dialog .import-zeile select {
    background: var(--lu-bg); color: var(--lu-text); border: 1px solid var(--lu-rand); border-radius: 6px; padding: .4rem .55rem; font: inherit; font-size: 13.5px; }
.land-dialog .import-datei { display: flex; flex-direction: column; gap: .2rem; }
.land-dialog .import-datei small { font-size: 11.5px; color: var(--lu-leise); }
.land-dialog .import-erklaerung { padding: 0 1rem 1rem; }
.land-dialog .import-zahlen { margin: .4rem 0; }
.land-dialog .import-neu { font-size: 13px; color: var(--lu-text); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.land-dialog .import-partei { display: inline-flex; align-items: center; gap: .3rem; }
.land-dialog .import-fehlend summary { cursor: pointer; font-size: 13px; color: #fca5a5; }
.land-dialog .import-fehlend ul { margin: .4rem 0 0 1.2rem; font-size: 12.5px; color: var(--lu-leise); max-height: 180px; overflow-y: auto; }
.hauskarte .hk-import-knopf.aktiv { background: rgba(20, 20, 23, .9); }
@media (max-width: 560px) { .land-dialog .import-zeile { grid-template-columns: 1fr; gap: .3rem; } }

/* ── Politik → Gemeinderat Obersülzen: Auswertung der Ratsprotokolle (immer dunkel wie die Karten) ── */
.rat-seite { --lu-bg: #0c0c0d; --lu-karte: #18181b; --lu-kopf: #000; --lu-rand: #2e2e33; --lu-text: #f4f4f5;
    --lu-leise: #a1a1aa; --lu-rot: #ef4444;
    min-height: calc(100vh - 56px - var(--politik-leiste)); background: var(--lu-bg); color: var(--lu-text);
    padding: 1rem clamp(.75rem, 2vw, 1.75rem) 3rem; }
.rat-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
    padding-bottom: .9rem; border-bottom: 3px solid var(--lu-rot); }
.rat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--lu-leise); font-weight: 600; }
.rat-kopf h2 { font-size: 1.6rem; font-weight: 800; margin: .1rem 0; }
.rat-untertitel { color: var(--lu-leise); font-size: 13px; }
.rat-aktionen { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.rat-aktionen .btn-secondary, .rat-seite .btn-secondary, .rat-dialog .btn-secondary { background: #27272a; color: var(--lu-text); border-color: #3f3f46; }
.rat-hochladen { cursor: pointer; }
.rat-hochladen.gesperrt { opacity: .5; cursor: not-allowed; }
.rat-ki { font-size: 12px; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--lu-rand); color: var(--lu-leise); white-space: nowrap; }
.rat-ki::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .4rem; background: #71717a; }
.rat-ki.an::before { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.rat-ki.halb::before { background: #f59e0b; }
.rat-ki.aus::before { background: var(--lu-rot); }
.rat-hinweis { margin-top: .8rem; padding: .55rem .8rem; border-left: 3px solid #f59e0b; background: #1c1917; color: #fcd34d; font-size: 13px; }
.rat-sprung { position: sticky; top: 0; z-index: 3; display: flex; gap: .2rem; flex-wrap: wrap; margin: 1rem 0 .5rem; padding: .4rem 0;
    background: var(--lu-bg); border-bottom: 1px solid var(--lu-rand); }
.rat-sprung a { color: var(--lu-leise); text-decoration: none; font-size: 13px; padding: .25rem .6rem; border-radius: 6px; }
.rat-sprung a:hover { color: #fff; background: #27272a; }
.rat-leer { color: var(--lu-leise); padding: 2rem 0; text-align: center; }
.rat-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0; }
.rat-kacheln.klein { margin: .25rem 0 1rem; }
.rat-kachel { background: var(--lu-karte); border: 1px solid var(--lu-rand); border-top: 3px solid var(--lu-rot); border-radius: var(--radius); padding: .8rem 1rem; }
.rat-kachel strong { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.rat-kacheln.klein .rat-kachel strong { font-size: 1.25rem; }
.rat-kachel span { font-size: 12px; color: var(--lu-leise); }
.rat-block { background: var(--lu-karte); border: 1px solid var(--lu-rand); border-radius: var(--radius); margin: 1rem 0; padding: 0 1.1rem 1.1rem;
    scroll-margin-top: 3.2rem; }
.rat-block > h3 { margin: 0 -1.1rem 1rem; padding: .8rem 1.1rem; background: var(--lu-kopf); border-bottom: 1px solid var(--lu-rand);
    border-radius: var(--radius) var(--radius) 0 0; font-size: 16px; font-weight: 800; }
.rat-block > h3 span { font-size: 12px; font-weight: 500; color: var(--lu-leise); margin-left: .5rem; }
.rat-block h4, .rat-pruef h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--lu-leise); margin: 1.2rem 0 .5rem; font-weight: 700; }
.rat-h4-zeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.rat-notiz { font-size: 12px; color: #8b8b94; margin: .5rem 0; }
.rat-zusammenfassung { font-size: 13.5px; margin: .8rem 0; }
.rat-zwei { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 980px) { .rat-zwei { grid-template-columns: minmax(0, 1fr); } }
.rat-tabelle-rahmen { overflow-x: auto; }
.rat-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.rat-tabelle th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--lu-leise); font-weight: 700;
    padding: .45rem .55rem; border-bottom: 2px solid var(--lu-rand); white-space: nowrap; }
.rat-tabelle td { padding: .42rem .55rem; border-bottom: 1px solid var(--lu-rand); vertical-align: top; }
.rat-tabelle tbody tr:hover td { background: #1f1f23; }
.rat-tabelle .zahl, .rat-edit .zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rat-tabelle .mitte { text-align: center; }
.rat-tabelle small { color: var(--lu-leise); }
.rat-rot { color: #f87171; }
.rat-gruen { color: #4ade80; }
.rat-kampf td:first-child { box-shadow: inset 3px 0 0 var(--lu-rot); }
.rat-zeilen-aktion { white-space: nowrap; text-align: right; }
.rat-mini { background: none; border: 1px solid transparent; color: var(--lu-leise); border-radius: 4px; padding: 0 .35rem; cursor: pointer; font-size: 13px; }
.rat-mini:hover { border-color: var(--lu-rand); color: #fff; }
.rat-mini.gefahr:hover { color: #fff; background: var(--lu-rot); border-color: var(--lu-rot); }
.rat-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0; }
.rat-chip { display: inline-block; font-size: 11.5px; padding: .1rem .5rem; border-radius: 999px; background: #27272a; border: 1px solid #3f3f46;
    color: #e4e4e7; margin-left: .25rem; white-space: nowrap; }
.rat-chips .rat-chip { margin-left: 0; }
.rat-chip.rot { background: rgba(239, 68, 68, .15); border-color: #7f1d1d; color: #fca5a5; }
.rat-chip.gelb { background: rgba(245, 158, 11, .14); border-color: #78350f; color: #fcd34d; }
.rat-chip.gruen { background: rgba(34, 197, 94, .12); border-color: #14532d; color: #86efac; }
.rat-textliste { margin: .4rem 0 0 1.1rem; font-size: 13px; }
.rat-textliste li { margin: .3rem 0; }
.rat-textliste small { color: var(--lu-leise); }

/* Balkendiagramme (HTML, damit sie mit der Seite mitwachsen) */
.rat-diagramm { margin: .5rem 0 1rem; }
.rat-balken { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) auto; gap: .32rem .7rem; align-items: center; }
.rat-balken-zeile { display: contents; }
.rat-balken-label { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.rat-balken-zeile.kampf .rat-balken-label { color: #fca5a5; }
.rat-spur { position: relative; display: flex; height: 18px; background: #222226; border-radius: 3px; overflow: hidden; }
.rat-balken.mit-skala .rat-spur { background: repeating-linear-gradient(90deg, #2a2a2f 0 1px, transparent 1px 25%), #1d1d21; }
.rat-teil { height: 100%; display: flex; align-items: center; justify-content: center; min-width: 2px; transition: width .4s ease; }
.rat-teil span { font-size: 10.5px; font-weight: 700; color: rgba(0, 0, 0, .78); }
.rat-balken-wert { font-size: 12px; color: var(--lu-leise); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 4.5rem; }
.rat-balken-skala { display: contents; }
.rat-skala { position: relative; height: 1rem; font-size: 10.5px; color: #71717a; }
.rat-skala span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.rat-skala span:first-child { transform: none; }
.rat-skala span:last-child { transform: translateX(-100%); }
.t-hoch { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.t-mittel { background: linear-gradient(90deg, #9a3412, #f97316); }
.t-niedrig { background: linear-gradient(90deg, #713f12, #eab308); }
.v-einst, .s-ja, .t-pos { background: #22c55e; }
.v-nicht, .s-nein, .t-krit { background: #ef4444; }
.v-wider { background: #eab308; }
.s-enth, .t-sach { background: #a1a1aa; }
.rat-legende { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: 12px; color: var(--lu-leise); margin-top: .5rem; }
.rat-legende i { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.rat-legende i.kampf-zeichen { display: none; }
@media (max-width: 640px) { .rat-balken { grid-template-columns: minmax(90px, 120px) minmax(0, 1fr) auto; } }

/* Lager, Profile */
.rat-gruppen, .rat-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.rat-karten.profile { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rat-gruppe, .rat-karte { position: relative; background: var(--lu-bg); border: 1px solid var(--lu-rand); border-left: 3px solid var(--lu-rot);
    border-radius: 6px; padding: .7rem .85rem; font-size: 13px; }
.rat-gruppe h5, .rat-karte h5 { font-size: 14px; font-weight: 700; margin-bottom: .3rem; }
.rat-gruppe small, .rat-karte h5 small { color: var(--lu-leise); font-weight: 400; }
.rat-karte p { color: #d4d4d8; margin-top: .3rem; }
.rat-profil-titel { font-size: 12px; color: #fca5a5; font-weight: 600; }
.rat-profil-edit { position: absolute; top: .5rem; right: .5rem; }
.rat-profil input, .rat-profil textarea { width: 100%; margin: .3rem 0; background: #111113; color: var(--lu-text); border: 1px solid var(--lu-rand);
    border-radius: 5px; padding: .35rem .5rem; font: inherit; }
.rat-vorschlag { margin-top: .6rem; padding: .55rem .65rem; border: 1px dashed #f59e0b; border-radius: 6px; background: #1c1917; }
.rat-vorschlag strong { font-size: 12px; color: #fcd34d; }
.rat-punkte { color: var(--lu-rot); letter-spacing: -.05em; font-size: 15px; }
.rat-matrix td:first-child, .rat-matrix th:first-child { white-space: nowrap; }
.rat-matrix td.mitte small { color: var(--lu-leise); font-size: 10.5px; }
.rat-wechsel { margin-top: 1rem; padding: .7rem .9rem; border: 1px solid var(--lu-rand); border-left: 3px solid #f59e0b; border-radius: 6px; background: var(--lu-bg); font-size: 13px; }
.rat-wechsel h4 { margin-top: 0; }
.rat-wechsel p { margin: .35rem 0; }
.rat-knopfreihe { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }

/* Warteschlange der hochgeladenen Protokolle */
.rat-dokumente { display: grid; gap: .5rem; margin-top: 1rem; }
.rat-dokument { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; background: var(--lu-karte);
    border: 1px solid var(--lu-rand); border-left: 3px solid #71717a; border-radius: 6px; padding: .6rem .85rem; font-size: 13px; }
.rat-dokument.s-pruefen { border-left-color: #f59e0b; }
.rat-dokument.s-fehler { border-left-color: var(--lu-rot); }
.rat-dokument.s-laeuft { border-left-color: #38bdf8; }
.rat-dokument small { color: var(--lu-leise); }
.rat-dok-status { color: var(--lu-leise); font-size: 12.5px; margin-top: .2rem; }
.rat-dok-status .rat-chip { margin-left: 0; }
.rat-dreht { display: inline-block; width: .8rem; height: .8rem; border: 2px solid #38bdf8; border-right-color: transparent; border-radius: 50%;
    animation: rat-drehen 1s linear infinite; vertical-align: -2px; margin-right: .3rem; }
@keyframes rat-drehen { to { transform: rotate(360deg); } }
.rat-fertig { margin-top: .5rem; font-size: 12.5px; color: var(--lu-leise); }
.rat-fertig summary { cursor: pointer; }
.rat-fertig ul { margin: .3rem 0 0 1.2rem; }
.rat-start p { margin-bottom: .8rem; }

/* Prüffenster und Mitgliederverwaltung */
.rat-dialog { width: min(1320px, calc(100vw - 2rem)); }
.rat-pruef { padding: 1rem 1.25rem 1.25rem; }
.rat-pruef-block { margin-bottom: 1rem; }
.rat-meldungen { padding: .6rem .85rem; border: 1px solid #78350f; border-left: 3px solid #f59e0b; border-radius: 6px; background: #1c1917; color: #fde68a; font-size: 13px; }
.rat-meldungen ul { margin: .3rem 0 0 1.1rem; }
.rat-felder { display: flex; flex-wrap: wrap; gap: .6rem; }
.rat-feld { display: flex; flex-direction: column; gap: .2rem; font-size: 12px; color: var(--lu-leise); min-width: 140px; }
.rat-feld.schmal { min-width: 70px; }
.rat-feld.breit { flex: 1 1 240px; }
.rat-dialog input:not([type=checkbox]), .rat-dialog select { background: #111113; color: var(--lu-text); border: 1px solid var(--lu-rand); border-radius: 5px;
    padding: .3rem .45rem; font: inherit; font-size: 13px; color-scheme: dark; width: 100%; min-width: 0; }
.rat-dialog input[type=number] { width: 4.2rem; }
.rat-dialog input.schmal { width: 4.5rem; }
.rat-dialog select.fehlt { border-color: #f59e0b; }
.rat-anwesenheit-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .4rem; }
.rat-anw { display: grid; grid-template-columns: 1fr 7.5rem auto; gap: .35rem; align-items: center; font-size: 13px; padding: .25rem .4rem;
    border-radius: 5px; border: 1px solid var(--lu-rand); }
.rat-anw.ja { border-color: #14532d; }
.rat-anw.nein { border-color: #7f1d1d; background: rgba(239, 68, 68, .07); }
.rat-anw.offen { border-color: #78350f; background: rgba(245, 158, 11, .08); }
.rat-neu-mitglied { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; font-size: 12.5px; color: var(--lu-leise); }
.rat-neu-mitglied input, .rat-neu-mitglied select { width: auto !important; flex: 1 1 180px; }
.rat-edit { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: .4rem; }
.rat-edit th { text-align: left; font-size: 10.5px; text-transform: uppercase; color: var(--lu-leise); padding: .3rem; border-bottom: 1px solid var(--lu-rand); white-space: nowrap; }
.rat-edit td { padding: .2rem .25rem; border-bottom: 1px solid #222226; vertical-align: middle; }
.rat-pruef-fuss { position: sticky; bottom: -1.25rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .8rem 0;
    background: var(--lu-bg); border-top: 1px solid var(--lu-rand); }
.rat-ersetzen { font-size: 12.5px; color: var(--lu-leise); margin-right: auto; display: flex; gap: .35rem; align-items: center; }
.rat-status { font-size: 12.5px; color: #fca5a5; }
.rat-edit input:not([type=checkbox]):not([type=number]):not(.schmal) { min-width: 210px; }
.rat-edit select { min-width: 130px; width: auto !important; }
.rat-edit input[type=number] { width: 4rem !important; }
.rat-edit input.schmal { width: 3.6rem !important; min-width: 0; }
.rat-edit td:has(> input[type=checkbox]) { text-align: center; }
.rat-edit input.mittel { width: 8rem !important; min-width: 0; }

/* Obersülzen: Gebäude je Flurstück gruppieren (Hauptgebäude gibt Farbe und Partei vor) */
.hauskarte .hk-gruppe-knopf:not(.aktiv) { color: #a1a1aa; }
.land-dialog .haus-gruppe-inhalt { display: grid; gap: .6rem; }
.land-dialog .haus-gruppe-erbe { font-size: 13.5px; padding: .5rem .7rem; border-left: 3px solid var(--lu-rot); background: var(--lu-bg); border-radius: 4px; }
.land-dialog .haus-gruppe-liste { list-style: none; border: 1px solid var(--lu-rand); border-radius: 6px; overflow: hidden; }
.land-dialog .haus-gruppe-liste li { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; padding: .45rem .7rem;
    border-bottom: 1px solid var(--lu-rand); background: var(--lu-bg); font-size: 13px; }
.land-dialog .haus-gruppe-liste li:last-child { border-bottom: none; }
.land-dialog .haus-gruppe-liste li.aktuell { background: #1f1f23; box-shadow: inset 3px 0 0 #a1a1aa; }
.land-dialog .haus-gruppe-liste small { color: var(--lu-leise); margin-left: auto; }
.land-dialog .haus-gruppe-link { background: none; border: none; padding: 0; color: var(--lu-text); font: inherit; cursor: pointer; text-align: left; }
.land-dialog .haus-gruppe-link:hover { color: var(--lu-rot); text-decoration: underline; }
.land-dialog .haus-gruppe-erbe .haus-gruppe-link { font-weight: 700; }
.land-dialog .haus-gruppe-marke { font-size: 11px; font-weight: 700; color: #fca5a5; border: 1px solid #7f1d1d; background: rgba(239, 68, 68, .14);
    padding: .05rem .45rem; border-radius: 999px; }

/* Zwei-Faktor-Anmeldung (Persönlich → Konto, Anmeldung) */
.zf-panel { grid-column: 1 / -1; }
.zf-panel .panel-header { display: flex; align-items: center; justify-content: space-between; }
.zf-panel .panel-body { display: grid; gap: .8rem; }
.badge-gruen { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
body.dark .badge-gruen { background: #052e16; color: #86efac; border-color: #166534; }
.zf-zeile { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.zf-zeile input { width: auto; flex: 0 1 14rem; }
.zf-schritte { margin-left: 1.2rem; display: grid; gap: .6rem; }
.zf-qr { margin: .6rem 0; }
.zf-qr svg { width: 220px; height: 220px; display: block; border-radius: 6px; }
.zf-manuell { margin-top: .4rem; }
.zf-schluessel { font-size: 1.05rem; letter-spacing: .06em; user-select: all; }
.zf-codes { border: 1px dashed var(--primary); border-radius: var(--radius); padding: .8rem 1rem; }
.zf-codes ol { columns: 2; margin: .6rem 0 .6rem 1.5rem; font-size: 1.05rem; }
.zf-codes code { letter-spacing: .05em; }
.zf-aus summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
.zf-aus form { margin-top: .5rem; }
.zf-code-eingabe { font-size: 1.4rem; letter-spacing: .25em; text-align: center; }
.zf-zurueck { margin-top: 1rem; font-size: 13px; }
@media print {
    body * { visibility: hidden; }
    .zf-codes, .zf-codes * { visibility: visible; }
    .zf-codes { position: absolute; left: 0; top: 0; border: none; }
    .zf-codes button { display: none; }
}
