/* Beteiligungsserver Mecklenburg-Vorpommern - eigene Anpassungen (nach Bootstrap geladen) */
:root {
    --app-primary: #035d90;          /* Farben nach dem Regierungsportal MV (land-mv.de) */
    --app-primary-dark: #024a73;
    --app-primary-rgb: 3, 93, 144;
    --app-bg: #f8f9fa;
    --app-border: #cddfe9;
    --bs-link-color: var(--app-primary);
    --bs-link-color-rgb: var(--app-primary-rgb);
    --bs-link-hover-color: var(--app-primary-dark);
    --bs-primary: var(--app-primary);
    --bs-primary-rgb: var(--app-primary-rgb);
}

body {
    background: var(--app-bg);
    color: #2b3340;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary-dark);
    --bs-btn-hover-border-color: var(--app-primary-dark);
    --bs-btn-active-bg: var(--app-primary-dark);
    --bs-btn-active-border-color: var(--app-primary-dark);
    --bs-btn-disabled-bg: var(--app-primary);
    --bs-btn-disabled-border-color: var(--app-primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
    --bs-btn-active-bg: var(--app-primary-dark);
    --bs-btn-active-border-color: var(--app-primary-dark);
}
.text-bg-primary { background-color: var(--app-primary) !important; }
.nav-pills {
    --bs-nav-pills-link-active-bg: var(--app-primary);
    --bs-nav-link-color: var(--app-primary);
    --bs-nav-link-hover-color: var(--app-primary-dark);
}
.pagination {
    --bs-pagination-color: var(--app-primary);
    --bs-pagination-active-bg: var(--app-primary);
    --bs-pagination-active-border-color: var(--app-primary);
}
.breadcrumb { --bs-breadcrumb-divider-color: #8a96a6; }

/* Kopfleiste */
.app-navbar {
    background: var(--app-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.app-navbar .nav-link.active { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }

/* Fusszeile */
.app-footer { background: #fff; border-top: 1px solid var(--app-border); color: #5b6676; }
.app-footer a { color: inherit; text-decoration: none; }
.app-footer a:hover { text-decoration: underline; }

/* Cockpit: Kopfbereich */
.cockpit-hero { background: #fff; border-bottom: 1px solid var(--app-border); }
.cockpit-hero h1 { font-weight: 300; font-size: calc(1.4rem + 1.2vw); color: var(--app-primary); }
.cockpit-hero h1 strong { font-weight: 700; }
.cockpit-hero .lead { color: #5b6676; font-size: 1.1rem; max-width: 56rem; }

/* Kennzahlen als "Pillen" */
.stat-pill {
    display: inline-flex; align-items: center; gap: .45rem;
    background: #fff; border-radius: 2rem; padding: .55rem 1.1rem;
    box-shadow: 0 1px 6px rgba(20, 40, 60, .12);
    text-decoration: none; color: inherit; border: 1px solid transparent;
}
.stat-pill b { font-weight: 700; }
a.stat-pill:hover, .stat-pill.active { border-color: var(--app-primary); color: var(--app-primary-dark); }
.stat-pill .bi { color: var(--app-primary); font-size: 1.2rem; }

/* Karte */
.cockpit-map { height: 440px; border-radius: var(--app-radius); border: 1px solid var(--app-border); background: #e9eef3; z-index: 0; }
@media (max-width: 575.98px) { .cockpit-map { height: 320px; } }
.map-fehlt { height: 160px; display: flex; align-items: center; justify-content: center; color: #6b7686; }

/* Kategoriekarten */
.kategorie-card { height: 100%; border: 1px solid var(--app-border); border-radius: var(--app-radius); background: #fff; transition: box-shadow .15s; }
.kategorie-card:hover { box-shadow: 0 4px 16px rgba(20, 40, 60, .12); }
.kategorie-card.aktiv { border-color: var(--app-primary); box-shadow: 0 0 0 2px rgba(var(--app-primary-rgb), .25); }
.kategorie-zahl {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.2rem; height: 2.2rem; padding: 0 .55rem; border-radius: 1.2rem;
    background: var(--app-primary); color: #fff; font-weight: 700;
}

/* Verfahrenskarten */
.verfahren-card { background: #fff; border: 1px solid var(--app-border); border-radius: var(--app-radius); overflow: hidden; }
.verfahren-card + .verfahren-card { margin-top: 1rem; }
.verfahren-card .titel a { color: #1d2733; text-decoration: none; }
.verfahren-card .titel a:hover { color: var(--app-primary); text-decoration: underline; }
.verfahren-card.status-aktiv { border-left: 5px solid var(--bs-success); }
.verfahren-card.status-in_aufstellung { border-left: 5px solid var(--bs-warning); }
.verfahren-card.status-abgeschlossen { border-left: 5px solid #6c757d; }
.verfahren-zeitraum { white-space: nowrap; }

/* Logos der Traeger */
.traeger-logo { height: 3rem; width: auto; max-width: 8rem; object-fit: contain; flex-shrink: 0; }
.traeger-logo-gross { height: 6rem; width: auto; max-width: 12rem; object-fit: contain; }
.traeger-logo-leer { aspect-ratio: 1; width: auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef2f6; color: #8a96a6; border-radius: .4rem; font-size: 1.4rem;
}

/* Verwaltung */
.panel { background: #fff; border: 1px solid var(--app-border); border-radius: var(--app-radius); }
.panel-header { padding: .8rem 1.1rem; border-bottom: 1px solid var(--app-border); font-weight: 600; }
.panel-body { padding: 1.1rem; }
.kachel { display: block; text-decoration: none; color: inherit; height: 100%; }
.kachel:hover { box-shadow: 0 4px 16px rgba(20, 40, 60, .12); }
.kachel .bi { font-size: 1.8rem; color: var(--app-primary); }
.table > :not(caption) > * > * { vertical-align: middle; }
.beschreibung-text { white-space: pre-line; }
.form-label { font-weight: 600; }
.pflicht::after { content: " *"; color: var(--bs-danger); }

/* ---- Cockpit: Optik (Kopfbereich, Symbole, Bilder) ---- */
.cockpit-hero {
    background: linear-gradient(120deg, #123f5e 0%, var(--app-primary) 55%, #3f95cf 100%);
    position: relative; overflow: hidden; border-bottom: 0; color: #fff;
}
.cockpit-hero::before {
    content: ""; position: absolute; inset: 0;
    background: url("../img/hero-muster.svg") right center / cover no-repeat; pointer-events: none;
}
.cockpit-hero .container-xl { position: relative; }
.cockpit-hero h1, .cockpit-hero h1 .text-body-secondary { color: #fff !important; }
.cockpit-hero h1 .text-body-secondary { opacity: .85; }
.cockpit-hero .lead { color: rgba(255, 255, 255, .9); }
.cockpit-hero .btn-secondary { --bs-btn-bg: #0f3652; --bs-btn-border-color: #0f3652; --bs-btn-hover-bg: #0b2a40; --bs-btn-hover-border-color: #0b2a40; }
.cockpit-hero .stat-pill { box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.cockpit-hero a.stat-pill:hover, .cockpit-hero .stat-pill.active { border-color: var(--app-primary); background: #eaf4fb; }

.kat-icon { width: 2.5rem; height: 2.5rem; flex-shrink: 0; }
.kat-icon-gross { width: 4rem; height: 4rem; }
.kategorie-card { box-shadow: 0 1px 4px rgba(20, 40, 60, .06); }

.verfahren-card { box-shadow: 0 1px 4px rgba(20, 40, 60, .06); transition: box-shadow .15s; }
.verfahren-card:hover { box-shadow: 0 6px 20px rgba(20, 40, 60, .13); }
.verfahren-bild { position: relative; display: block; flex-shrink: 0; width: 100%; aspect-ratio: 16 / 7; background: #e9eef3; }
.verfahren-bild img:not(.kat-icon) { width: 100%; height: 100%; object-fit: cover; display: block; }
.verfahren-bild-icon { position: absolute; left: .6rem; bottom: .6rem; width: 2.4rem; height: 2.4rem; border-radius: var(--app-radius); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
@media (min-width: 768px) {
    .verfahren-bild { width: 15rem; aspect-ratio: auto; min-height: 9.5rem; }
}
.detail-bild { position: relative; border-radius: var(--app-radius); overflow: hidden; aspect-ratio: 16 / 6.5; background: #e9eef3; border: 1px solid var(--app-border); }
.detail-bild > img:not(.kat-icon) { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-bild .verfahren-bild-icon { width: 3rem; height: 3rem; left: .9rem; bottom: .9rem; }
.cockpit-hero .stat-pill, .cockpit-hero a.stat-pill { color: #1d2733; }
.cockpit-hero a.stat-pill:hover, .cockpit-hero .stat-pill.active { color: var(--app-primary-dark); }

/* ---- Kopfzeile mit Landeslogo ---- */
.app-topbar { background: #fff; border-bottom: 1px solid var(--app-border); padding: .55rem 0; }
.app-logo { height: 2.6rem; width: auto; display: block; }
@media (min-width: 768px) { .app-logo { height: 3.2rem; } }
.app-topbar-text { color: #123f5e; line-height: 1.25; }
.app-footer-logo { height: 1.8rem; width: auto; opacity: .9; }

/* ---- Traegerseiten ---- */
.traeger-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; height: 100%; background: #fff; border: 1px solid var(--app-border); border-radius: var(--app-radius); text-decoration: none; color: inherit; box-shadow: 0 1px 4px rgba(20, 40, 60, .06); transition: box-shadow .15s; }
.traeger-card:hover { box-shadow: 0 6px 20px rgba(20, 40, 60, .13); color: inherit; }
.traeger-logo-karte { height: 4rem; max-width: 6.5rem; }
.traeger-logo-kopf { height: 7.5rem; max-width: 14rem; }
.traeger-kontakt { min-width: 16rem; }

@media (min-width: 992px) { .cockpit-map { height: 520px; } }

/* ---- Startseite: Karte als Hauptelement mit Infokarte darueber ---- */
.map-hero { position: relative; background: #dfe8ef; border-bottom: 1px solid var(--app-border); }
.map-hero .cockpit-map { height: 620px; border: 0; border-radius: 0; }
.map-overlay { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: flex-start; padding-top: 1.25rem; z-index: 500; }
.map-card { pointer-events: auto; width: 100%; max-width: 27rem; background: rgba(255, 255, 255, .96); border-radius: .8rem; padding: 1.25rem; box-shadow: 0 6px 28px rgba(15, 40, 65, .28); border-top: 4px solid var(--app-primary); }
.map-titel { font-size: 1.5rem; font-weight: 300; color: var(--app-primary); line-height: 1.2; }
.map-titel strong { font-weight: 700; }
.map-lead { color: #4b5666; font-size: .95rem; }
.map-card .stat-pill { box-shadow: none; border: 1px solid var(--app-border); padding: .35rem .8rem; font-size: .9rem; }
.map-card a.stat-pill:hover, .map-card .stat-pill.active { border-color: var(--app-primary); background: #eaf4fb; }
@media (max-width: 991.98px) {
    .map-hero .cockpit-map { height: 380px; }
    .map-overlay { position: static; padding: 0; display: block; pointer-events: auto; }
    .map-card { max-width: none; border-radius: 0; box-shadow: none; border-top: 0; border-bottom: 1px solid var(--app-border); }
}
.map-hero .leaflet-control-zoom, .map-hero .leaflet-control-layers { box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }

/* ---- Kontextleiste der Stadt / des Traegers ---- */
.traeger-band { background: #fff; border-bottom: 1px solid var(--app-border); }
.traeger-band .traeger-logo { height: 3.5rem; max-width: 10rem; }
.traeger-band-name { font-weight: 600; font-size: 1.15rem; color: #1d2733; line-height: 1.2; }
.traeger-band .nav-pills .nav-link { padding: .35rem .85rem; font-size: .92rem; }

/* ---- Seiten der Verfahrenstraeger (wirken wie deren eigene Internetseite) ---- */
.portal-leiste { background: #2b3440; font-size: .82rem; padding: .3rem 0; }
.portal-leiste a { color: #d5dbe3; text-decoration: none; }
.portal-leiste a:hover { color: #fff; text-decoration: underline; }
.site-kopf { background: #fff; border-bottom: 1px solid var(--app-border); }
.site-kopf .site-logo { height: 4.5rem; max-width: 12rem; }
.site-name { display: block; font-size: calc(1.15rem + .5vw); font-weight: 600; color: var(--app-primary); text-decoration: none; line-height: 1.2; }
.site-unterzeile { color: #5b6676; font-size: .9rem; }
.site-nav { padding-top: .2rem; padding-bottom: .2rem; }
.traeger-hero { background: linear-gradient(115deg, var(--app-primary-dark) 0%, var(--app-primary) 70%); color: #fff; }
.traeger-hero .hero-art { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; opacity: .85; margin-bottom: .4rem; }
.traeger-hero .hero-titel { font-weight: 300; font-size: calc(1.6rem + 1.2vw); line-height: 1.2; margin-bottom: 1rem; }
.traeger-hero .hero-text { font-size: 1.05rem; opacity: .95; max-width: 46rem; margin-bottom: 0; }
.traeger-hero .btn-light { color: var(--app-primary-dark); font-weight: 600; }
.hero-badge { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .45); font-weight: 500; }
.hero-zahlen { display: flex; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); border-radius: .8rem; overflow: hidden; }
.hero-zahlen > div { flex: 1; text-align: center; padding: 1.1rem .5rem; border-right: 1px solid rgba(255, 255, 255, .25); }
.hero-zahlen > div:last-child { border-right: 0; }
.hero-zahlen b { display: block; font-size: 2rem; font-weight: 300; line-height: 1; }
.hero-zahlen span { font-size: .8rem; opacity: .9; }
.traeger-seite .breadcrumb-item a { color: var(--app-primary); }
.farbvorschau { color: #fff; padding: .6rem .9rem; border-radius: .35rem; font-size: .9rem; }
.traeger-seite #verfahren, .traeger-seite #kontakt { scroll-margin-top: 1rem; }
.site-nav .nav-link { color: rgba(255, 255, 255, .88); padding-left: 1rem; padding-right: 1rem; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: #fff; }

/* ---- Startseite: Karte (2/3) und Infokarte (1/3) in einem Rahmen ---- */
.start-hero { background: linear-gradient(120deg, #123f5e 0%, var(--app-primary) 60%, #3f95cf 100%); position: relative; }
.start-hero::before { content: ""; position: absolute; inset: 0; background: url("../img/hero-muster.svg") center / cover; opacity: .12; pointer-events: none; }
.start-hero .container-xl { position: relative; }
.map-frame { height: 100%; min-height: 360px; border-radius: .9rem; overflow: hidden; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 10px 30px rgba(8, 28, 48, .35); background: #dfe8ef; }
.start-hero .map-frame .cockpit-map { height: 100%; min-height: 360px; border: 0; border-radius: 0; }
@media (min-width: 992px) { .map-frame, .start-hero .map-frame .cockpit-map { min-height: 540px; } }
.start-hero .map-card { height: 100%; max-width: none; border-radius: .9rem; border-top: 0; padding: 1.5rem; box-shadow: 0 10px 30px rgba(8, 28, 48, .35); display: flex; flex-direction: column; justify-content: center; }
.start-hero .map-titel { font-size: 1.7rem; }
@media (max-width: 991.98px) { .start-hero .map-card { height: auto; } }

/* ---- Kopfbereich: praesenter ---- */
.app-topbar { padding: 1rem 0; border-bottom: 0; box-shadow: 0 1px 0 var(--app-border); }
.app-logo { height: 3.4rem; }
@media (min-width: 768px) { .app-logo { height: 4.6rem; } }
.app-topbar-text { border-left: 4px solid var(--app-primary); padding-left: 1rem; }
.app-topbar-text .app-brand { font-size: 1.6rem; font-weight: 700; color: var(--app-primary); line-height: 1.1; letter-spacing: -.01em; }
.app-topbar-text .app-brand span { font-weight: 300; color: #123f5e; }
.app-navbar { padding-top: .35rem; padding-bottom: .35rem; box-shadow: 0 2px 8px rgba(8, 28, 48, .18); }
.app-navbar .nav-link { font-weight: 500; }

/* ---- Unterlagen und Stellungnahme ---- */
.datei-icon { font-size: 2rem; line-height: 1; }
.stn-cta { background: linear-gradient(135deg, var(--app-primary-dark), var(--app-primary)); color: #fff; border-radius: var(--app-radius); padding: 1.25rem; box-shadow: 0 6px 18px rgba(var(--app-primary-rgb), .35); }
.stn-cta .btn-light { color: var(--app-primary-dark); }
.stn-cta-icon { font-size: 1.8rem; line-height: 1; margin-bottom: .4rem; opacity: .95; }

/* ---- Verfahrensseite: eigener Kopf, klar getrennt von der Traegerseite ---- */
.verfahren-kopf { background: #fff; border-bottom: 1px solid var(--app-border); border-top: 4px solid var(--app-primary); }
.verfahren-kopf h1 { color: #1d2733; font-weight: 600; }
.verfahren-kopf .lead { color: #4a5668; font-size: 1.1rem; max-width: 52rem; }
.weitere-verfahren { background: #eef2f6; border-top: 1px solid var(--app-border); }
.weiteres-verfahren { display: block; height: 100%; background: #fff; border: 1px solid var(--app-border); border-radius: var(--app-radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 1px 4px rgba(20, 40, 60, .06); transition: box-shadow .15s; }
.weiteres-verfahren:hover { box-shadow: 0 6px 20px rgba(20, 40, 60, .15); color: inherit; }
.weiteres-verfahren img { width: 100%; height: 7rem; object-fit: cover; display: block; }
.bekanntmachung .panel-body { font-size: .97rem; line-height: 1.6; }
.bekanntmachung .panel-header { background: #f8fafc; }

/* ---- Schnellauswahl Verfahrenstraeger (Startseite) ---- */
.schnellwahl-liste { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; max-height: 13rem; overflow-y: auto; padding-right: .15rem; }
.schnellwahl-eintrag { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; background: #fff; border: 1px solid var(--app-border); border-left: 4px solid var(--app-primary); border-radius: .4rem; text-decoration: none; color: #1d2733; font-size: .85rem; line-height: 1.15; min-width: 0; }
.schnellwahl-eintrag:hover { background: #eaf4fb; color: #1d2733; }
.schnellwahl-logo { height: 1.7rem; width: 1.7rem; max-width: 1.7rem; object-fit: contain; flex: none; }
.schnellwahl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) { .schnellwahl-liste { grid-template-columns: 1fr; } }
.bsl-pin { background: none; border: 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); transition: opacity .15s; }
.schnellwahl-eintrag { padding: 0; }
.schnellwahl-eintrag .schnellwahl-wahl { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; color: inherit; text-decoration: none; min-width: 0; width: 100%; }
.schnellwahl-eintrag.aktiv { background: #eaf4fb; box-shadow: 0 0 0 2px rgba(var(--app-primary-rgb), .45); }
.schnellwahl-eintrag .schnellwahl-logo { height: 1.7rem; width: 1.7rem; max-width: 1.7rem; max-height: 1.7rem; object-fit: contain; flex: none; }
.schnellwahl-eintrag a.schnellwahl-wahl, .schnellwahl-eintrag a.schnellwahl-wahl:hover { text-decoration: none; }
.schnellwahl-eintrag { overflow: hidden; }

/* ---- Schnellauswahl als Eingabefeld mit Vorschlagsliste ---- */
.schnellwahl-liste { display: block; position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 1200; max-height: 13rem; overflow-y: auto; background: #fff; border: 1px solid var(--app-border); border-radius: .4rem; box-shadow: 0 8px 24px rgba(15, 40, 65, .25); padding: .25rem; }
.schnellwahl-liste[hidden], .schnellwahl-eintrag[hidden], .schnellwahl-leer[hidden], .schnellwahl-info[hidden] { display: none !important; }
.schnellwahl-eintrag { margin-bottom: .2rem; }
.schnellwahl-eintrag:last-of-type { margin-bottom: 0; }
.schnellwahl-eintrag.fokus { background: #eaf4fb; box-shadow: 0 0 0 2px rgba(var(--app-primary-rgb), .45); }
.schnellwahl-eintrag .schnellwahl-name { white-space: normal; }
.karten-legende { background: rgba(255, 255, 255, .94); padding: .4rem .6rem; border-radius: .4rem; font-size: .78rem; line-height: 1.5; box-shadow: 0 1px 5px rgba(0, 0, 0, .3); }
.karten-legende i { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: -1px; margin-right: .2rem; }

/* Traegerlogo ueber dem Text: einheitliche Hoehe, linksbuendig mit dem Text */
.karten-logo { display: block; height: 3.25rem; width: 11rem; max-width: 100%; margin-bottom: .75rem; text-decoration: none; }
.karten-logo-img { height: 100%; width: 100%; object-fit: contain; object-position: left center; display: block; max-width: none; max-height: none; }
.karten-logo .traeger-logo-leer { height: 100%; width: auto; display: inline-flex; align-items: center; font-size: 2rem; color: #98a4b3; }
@media (max-width: 575.98px) { .karten-logo { height: 2.75rem; width: 9rem; } }

/* Adresssuche als Feld in der Karte (Mittelpunkt-Auswahl) */
.koord-wrap { position: relative; }
.koord-suche { position: absolute; z-index: 1100; top: .6rem; left: 3.4rem; right: 3.6rem; }
.koord-suche .form-control, .koord-suche .btn { box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.koord-treffer { margin-top: .35rem; max-height: 12rem; overflow-y: auto; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }

.koord-status { margin-top: .35rem; padding: .35rem .6rem; border-radius: .4rem; background: #fff; font-size: .85rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); border-left: 4px solid var(--app-primary); }
.koord-status.fehler { border-left-color: var(--bs-danger); color: var(--bs-danger); }

/* ---- Traeger-Dashboard (Verwaltung) ---- */
.verw-seite { --verw-dunkel: color-mix(in srgb, var(--app-primary-dark) 62%, #0a1822); --verw-dunkel2: color-mix(in srgb, var(--app-primary-dark) 40%, #07121a); }
.verw-layout { display: flex; min-width: 0; }
.verw-side {
    --bs-offcanvas-bg: var(--verw-dunkel); --bs-offcanvas-color: #fff; --bs-offcanvas-width: 17rem;
    background: linear-gradient(180deg, var(--verw-dunkel) 0%, var(--verw-dunkel2) 100%); color: #fff;
    display: flex; flex-direction: column; padding: 1.1rem .9rem; gap: 1rem;
}
@media (min-width: 992px) {
    .verw-side { position: sticky !important; top: 0; flex: 0 0 16.5rem !important; width: 16.5rem !important; height: 100vh !important;
        overflow-y: auto; visibility: visible !important; transform: none !important; border: 0 !important;
        background: linear-gradient(180deg, var(--verw-dunkel) 0%, var(--verw-dunkel2) 100%) !important; z-index: 10; }
}
.verw-marke { display: flex; align-items: center; gap: .75rem; padding: .25rem .35rem .9rem; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.verw-logo { height: 2.6rem; width: 3.6rem; object-fit: contain; background: #fff; border-radius: .45rem; padding: .25rem; flex-shrink: 0; }
.verw-marke .traeger-logo-leer { height: 2.6rem; width: 2.6rem; background: rgba(255, 255, 255, .15); color: #fff; }
.verw-marke-text { min-width: 0; overflow-wrap: anywhere; }
.verw-neu { font-weight: 600; color: var(--verw-dunkel); }
.verw-neu:hover { background: #e8f1f8; color: var(--verw-dunkel); }
.verw-menue { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 auto; }
.verw-menue a { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: var(--app-radius); color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .95rem; }
.verw-menue a .bi { font-size: 1.1rem; width: 1.3rem; text-align: center; }
.verw-menue a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.verw-menue a.aktiv { background: rgba(255, 255, 255, .18); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #fff; }
.verw-trenner { height: 1px; background: rgba(255, 255, 255, .15); margin: .6rem .4rem; }
.verw-konto { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: .9rem; }
.verw-avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: rgba(255, 255, 255, .2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.verw-body { flex: 1 1 auto; min-width: 0; }
.verw-top { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--app-border); position: sticky; top: 0; z-index: 9; }
.verw-haupt .container-xl { max-width: 1280px; }
.verw-fuss { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1rem 1.5rem; font-size: .85rem; color: #6c7a89; border-top: 1px solid var(--app-border); background: #fff; }
.verw-fuss a { color: inherit; }

.dash-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.dash-kopf h1 { font-size: 1.5rem; margin: 0; }
.dash-kachel { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--app-border); border-radius: .7rem; padding: 1rem 1.1rem; height: 100%; text-decoration: none; color: inherit; }
a.dash-kachel:hover { box-shadow: 0 4px 16px rgba(20, 40, 60, .12); color: inherit; }
.dash-icon { width: 2.9rem; height: 2.9rem; border-radius: var(--app-radius); display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0;
    background: rgba(var(--app-primary-rgb), .12); color: var(--app-primary); }
.dash-icon.gruen { background: rgba(25, 135, 84, .13); color: #198754; }
.dash-icon.gelb { background: rgba(255, 193, 7, .2); color: #a87a00; }
.dash-icon.grau { background: #eef1f4; color: #5b6876; }
.dash-zahl { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.dash-label { font-size: .85rem; color: #6c7a89; }
.dash-tabelle thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6c7a89; font-weight: 600; background: #f8fafc; border-bottom: 1px solid var(--app-border); white-space: nowrap; }
.dash-tabelle td { padding-top: .75rem; padding-bottom: .75rem; }
.dash-tabelle .titel a { color: #1d2733; font-weight: 600; text-decoration: none; }
.dash-tabelle .titel a:hover { color: var(--app-primary); text-decoration: underline; }
.dash-balken { display: flex; align-items: flex-end; gap: 4px; height: 4.5rem; }
.dash-balken span { flex: 1 1 0; background: rgba(var(--app-primary-rgb), .75); border-radius: 3px 3px 0 0; min-height: 3px; }
.dash-balken span.null { background: #e3e8ee; }
.dash-balken-achse { display: flex; justify-content: space-between; font-size: .72rem; color: #8a96a6; margin-top: .3rem; }
.dash-beitrag { display: block; padding: .7rem 1.1rem; border-bottom: 1px solid var(--app-border); text-decoration: none; color: inherit; }
.dash-beitrag:last-child { border-bottom: 0; }
.dash-beitrag:hover { background: #f8fafc; color: inherit; }
.dash-beitrag .betreff { font-weight: 600; font-size: .92rem; }
.dash-leer { padding: 1.5rem 1.1rem; color: #6c7a89; font-size: .92rem; }

/* ---- Verfahrensformular: Gliederung ---- */
.schritt { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
    background: var(--app-primary); color: #fff; font-size: .78rem; font-weight: 700; margin-right: .5rem; }
.form-aktionsleiste { position: sticky; bottom: 0; z-index: 8; display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem;
    background: rgba(255, 255, 255, .96); border: 1px solid var(--app-border); border-radius: var(--app-radius); box-shadow: 0 -4px 14px rgba(20, 40, 60, .08); }

/* ---- Startseite: Karte und Suche als eine zusammenhaengende Flaeche ---- */
.start-kombi { display: flex; background: #fff; border-radius: .9rem; overflow: hidden; box-shadow: 0 12px 34px rgba(8, 28, 48, .38); min-height: 560px; }
.start-kombi .map-frame { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0; box-shadow: none; min-height: 560px; height: auto; }
.start-kombi .map-frame .cockpit-map { min-height: 560px; height: 100%; }
.start-kombi .map-card { flex: 0 0 25.5rem; max-width: 40%; height: auto; border-radius: 0; box-shadow: none; border-left: 1px solid var(--app-border); background: #fff; padding: 1.6rem 1.5rem; overflow-y: auto; }
@media (max-width: 991.98px) {
    .start-kombi { flex-direction: column; min-height: 0; }
    .start-kombi .map-frame, .start-kombi .map-frame .cockpit-map { min-height: 340px; }
    .start-kombi .map-card { flex: 0 0 auto; max-width: none; border-left: 0; border-top: 1px solid var(--app-border); }
}

/* Startseite: ohne farbigen Hintergrund, Karte und Suche sitzen wie die uebrigen Karten auf der Seite */
.start-hero { background: transparent; }
.start-hero::before { display: none; }
.start-hero .container-xl { padding-top: 1.5rem !important; padding-bottom: .25rem !important; }
.start-kombi { border: 1px solid var(--app-border); border-radius: var(--app-radius); box-shadow: 0 1px 3px rgba(20, 40, 60, .06); }
.start-kombi .map-card { border-left: 1px solid var(--app-border); }

/* Liste <-> Karte */
.liste-leiste { padding-bottom: .25rem; }
.verfahren-card.karte-markiert, .verfahren-card.karte-aktiv { outline: 2px solid var(--app-primary, #0d6efd); outline-offset: 2px; transition: outline-color .3s; }
.bsl-pin.pin-hell svg { filter: drop-shadow(0 0 5px rgba(0,0,0,.55)); transform: scale(1.18); transform-origin: 50% 100%; }
.bsl-pin svg { transition: transform .15s; }

/* Kopfbereich der Traegerseiten: nichts ueber den Rand */
.site-kopf .site-text { min-width: 0; overflow-wrap: anywhere; }
.site-kopf > .container-xl > a { flex-shrink: 0; }
@media (max-width: 575.98px) {
    .site-kopf .site-logo { height: 3rem; max-width: 6.5rem; object-fit: contain; }
    .site-name { font-size: 1.05rem; }
}

/* Pfeil zum Seitenanfang */
.nach-oben { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1030; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
    background: var(--app-primary, #1f6fa8); color: #fff; font-size: 1.25rem; line-height: 1; box-shadow: 0 .25rem .75rem rgba(0,0,0,.2);
    display: flex; align-items: center; justify-content: center; opacity: .9; transition: opacity .15s, transform .15s; }
.nach-oben[hidden] { display: none; }
.nach-oben:hover, .nach-oben:focus-visible { opacity: 1; transform: translateY(-2px); }
.nach-oben:focus-visible { outline: 3px solid rgba(var(--app-primary-rgb, 31,111,168), .4); outline-offset: 2px; }
@media print { .nach-oben { display: none !important; } }

/* Kategorie-Symbol aus Bootstrap Icons (fuer Kategorien ohne eigenes SVG) */
.kat-icon-bi { display: inline-flex; align-items: center; justify-content: center; border-radius: 19%;
    background: #1f6fa8; color: #fff; font-size: 1.35rem; line-height: 1; }
.kat-icon-gross.kat-icon-bi { font-size: 2.1rem; }
.icon-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .5rem; }
.icon-wahl label { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .5rem .25rem; border: 1px solid var(--app-border, #dee2e6);
    border-radius: var(--app-radius); cursor: pointer; font-size: .75rem; color: #5b6676; text-align: center; }
.icon-wahl label i { font-size: 1.4rem; color: #1f6fa8; }
.icon-wahl input { position: absolute; opacity: 0; pointer-events: none; }
.icon-wahl input:checked + label { border-color: #1f6fa8; background: rgba(31,111,168,.08); color: #1f6fa8; font-weight: 600; }
.icon-wahl input:focus-visible + label { outline: 3px solid rgba(31,111,168,.35); outline-offset: 1px; }

/* Verfahrenskarte: Traegerlogo rechts ueber Status und Zeitraum */
.karten-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; order: -1; }
.karten-meta .karten-logo { margin-bottom: 0; height: 2.75rem; width: 9rem; }
.karten-status { text-align: right; margin-left: auto; }
@media (min-width: 768px) {
    .karten-meta { display: flex; flex-direction: column; align-items: flex-end; order: 0; width: 11rem; }
    .karten-meta .karten-logo { height: 3.25rem; width: 11rem; margin-bottom: .75rem; }
    .karten-meta .karten-logo-img { object-position: right center; }
}

/* ---- Startseite: Karte und Einstiegsbereich als zwei getrennte Flaechen ---- */
.start-raster { display: grid; grid-template-columns: minmax(0, 1fr) 25rem; gap: 1.5rem; align-items: stretch; }
.start-karte { position: relative; border: 1px solid var(--app-border); border-radius: var(--app-radius); overflow: hidden; background: #dfe8ef;
    box-shadow: 0 1px 2px rgba(16, 32, 48, .05), 0 8px 24px rgba(16, 32, 48, .06); min-height: 540px; }
.start-karte .cockpit-map { position: absolute; inset: 0; height: auto; min-height: 0; border: 0; border-radius: 0; }
.start-panel { background: #fff; border: 1px solid var(--app-border); border-radius: var(--app-radius); padding: 2rem 1.75rem 1.75rem;
    box-shadow: 0 1px 2px rgba(16, 32, 48, .05), 0 8px 24px rgba(16, 32, 48, .06); display: flex; flex-direction: column; }
.start-dachzeile { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--app-primary); margin: 0 0 .5rem; }
.start-titel { font-size: 1.65rem; font-weight: 700; line-height: 1.2; color: #14212e; letter-spacing: -.01em; margin: 0 0 .75rem; }
.start-lead { font-size: .95rem; line-height: 1.55; color: #5b6676; margin: 0 0 1.5rem; }
.start-felder { display: grid; gap: 1.1rem; padding-top: 1.5rem; border-top: 1px solid var(--app-border); margin-bottom: 1.5rem; }
.start-label { display: block; font-size: .8rem; font-weight: 600; color: #3b4654; margin-bottom: .35rem; }
.start-eingabe { position: relative; display: flex; align-items: stretch; }
.start-eingabe > .bi { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #7a8594; pointer-events: none; z-index: 3; }
.start-eingabe .form-control { padding: .6rem .9rem .6rem 2.4rem; border-radius: var(--app-radius); border-color: #cfd6df; font-size: .95rem; }
.start-eingabe .form-control:focus { border-color: var(--app-primary); box-shadow: 0 0 0 .2rem rgba(var(--app-primary-rgb), .15); }
.start-eingabe-suche .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.start-eingabe-suche .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; padding-inline: 1.1rem; font-weight: 600; }
.start-eingabe-x { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #7a8594; padding: .3rem .45rem; border-radius: .35rem; z-index: 3; }
.start-eingabe-x:hover { background: #eef2f6; color: #14212e; }
.start-zahlen { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: auto; }
.start-zahl { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .85rem; border: 1px solid var(--app-border); border-radius: var(--app-radius);
    text-decoration: none; color: #14212e; background: #fbfcfd; transition: border-color .15s, background .15s; }
.start-zahl:hover { border-color: var(--app-primary); background: #f3f8fc; color: #14212e; }
.start-zahl.active { border-color: var(--app-primary); background: #eaf4fb; box-shadow: inset 3px 0 0 var(--app-primary); }
.start-zahl-wert { font-size: 1.5rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.start-zahl-text { font-size: .8rem; color: #5b6676; display: flex; align-items: center; gap: .4rem; }
.start-zahl.punkt-aktiv .start-zahl-text::before, .start-zahl.punkt-geplant .start-zahl-text::before, .start-zahl.punkt-ende .start-zahl-text::before {
    content: ""; width: .55rem; height: .55rem; border-radius: 50%; flex: none; }
.start-zahl.punkt-aktiv .start-zahl-text::before { background: #198754; }
.start-zahl.punkt-geplant .start-zahl-text::before { background: #e0a100; }
.start-zahl.punkt-ende .start-zahl-text::before { background: #6c757d; }
@media (max-width: 1199.98px) { .start-raster { grid-template-columns: minmax(0, 1fr) 22rem; } .start-panel { padding: 1.5rem 1.35rem; } }
@media (max-width: 991.98px) {
    .start-raster { grid-template-columns: 1fr; gap: 1rem; }
    .start-karte { min-height: 340px; }
    .start-panel { padding: 1.5rem 1.25rem; }
    .start-titel { font-size: 1.45rem; }
}

/* Aktive Filter als Chips */
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.filter-chips[hidden] { display: none; }
.filter-chips-titel { font-size: .78rem; font-weight: 600; color: #5b6676; margin-right: .1rem; }
.filter-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .5rem .25rem .7rem; border: 1px solid rgba(var(--app-primary-rgb), .35);
    background: rgba(var(--app-primary-rgb), .08); color: var(--app-primary-dark, #174f78); border-radius: 999px; font-size: .8rem; line-height: 1.3;
    text-decoration: none; cursor: pointer; }
.filter-chip .bi { font-size: .7rem; opacity: .75; }
.filter-chip:hover, .filter-chip:focus-visible { background: rgba(var(--app-primary-rgb), .16); color: var(--app-primary-dark, #174f78); }
.filter-chip:hover .bi { opacity: 1; }
.filter-alle { font-size: .8rem; color: #5b6676; margin-left: .2rem; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.filter-alle:hover { color: #14212e; }

/* Titelbild der Karte passt sich der Kartenhoehe an (Bildformat bestimmt nicht die Hoehe) */
@media (min-width: 768px) {
    .verfahren-card .verfahren-bild img:not(.kat-icon) { position: absolute; inset: 0; }
}

/* Titelbild auf der Verfahrensseite: nie hochskalieren oder stark beschneiden; freie Flaeche mit unscharfem Bild fuellen */
.detail-bild { aspect-ratio: auto; display: flex; align-items: center; justify-content: center; min-height: 14rem; max-height: 30rem; isolation: isolate; background: #dfe6ec; }
.detail-bild::before { content: ""; position: absolute; inset: -30px; background: var(--bild) center / cover no-repeat; filter: blur(22px) saturate(1.1); opacity: .55; z-index: -1; }
.detail-bild > img:not(.kat-icon) { position: relative; width: auto; height: auto; max-width: 100%; max-height: 30rem; object-fit: contain; box-shadow: 0 4px 18px rgba(16, 32, 48, .18); }
.detail-bild-voll { aspect-ratio: 16 / 6.5; display: block; min-height: 0; width: 100%; }
.detail-bild-voll::before { display: none; }
.detail-bild-voll > img:not(.kat-icon) { width: 100%; height: 100%; max-height: none; object-fit: cover; box-shadow: none; }

/* ---- Kategorie-Kacheln auf der Startseite ---- */
.kat-karte { display: flex; flex-direction: column; height: 100%; padding: 1.5rem 1.5rem 1.1rem; background: #fff; border: 1px solid var(--app-border);
    border-radius: var(--app-radius); color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(16, 32, 48, .05);
    transition: border-color .15s, box-shadow .15s, transform .15s; }
.kat-karte:hover, .kat-karte:focus-visible { border-color: rgba(var(--app-primary-rgb), .55); box-shadow: 0 10px 28px rgba(16, 32, 48, .10); transform: translateY(-2px); color: inherit; }
.kat-karte:focus-visible { outline: 3px solid rgba(var(--app-primary-rgb), .35); outline-offset: 2px; }
.kat-karte.aktiv { border-color: var(--app-primary); box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), .14); }
.kat-karte-kopf { display: flex; gap: 1.1rem; align-items: flex-start; flex: 1; }
.kat-karte-icon.kat-icon-bi { width: 3.25rem; height: 3.25rem; border-radius: .7rem; font-size: 1.55rem; flex: none;
    background: rgba(var(--app-primary-rgb), .1); color: var(--app-primary); transition: background .15s, color .15s; }
.kat-karte:hover .kat-karte-icon.kat-icon-bi, .kat-karte.aktiv .kat-karte-icon.kat-icon-bi { background: var(--app-primary); color: #fff; }
.kat-karte-titel { font-size: 1.2rem; font-weight: 700; color: #14212e; margin: .15rem 0 .35rem; letter-spacing: -.005em; }
.kat-karte-text { font-size: .92rem; line-height: 1.55; color: #5b6676; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kat-karte-fuss { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid #edf0f4; font-size: .85rem; }
.kat-karte-zahlen { color: #5b6676; display: inline-flex; align-items: center; gap: .75rem; }
.kat-karte-zahlen strong { color: #14212e; font-size: 1rem; font-variant-numeric: tabular-nums; }
.kat-karte-laufend { display: inline-flex; align-items: center; gap: .35rem; }
.kat-karte-laufend::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #198754; }
.kat-karte-aktion { color: var(--app-primary); font-weight: 600; white-space: nowrap; }
.kat-karte-aktion .bi { transition: transform .15s; }
.kat-karte:hover .kat-karte-aktion .bi-arrow-right { transform: translateX(3px); }
.min-w-0 { min-width: 0; }
.kat-karte-zahlen, .kat-karte-laufend { white-space: nowrap; }

/* Sonderzeichen als Kategorie-Symbol (z. B. §) */
.kat-icon-zeichen { font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1; font-size: 1.15em; display: inline-block; transform: translateY(.02em); }
.kat-karte-icon .kat-icon-zeichen { font-size: 1.85rem; }
.icon-wahl-symbol { font-size: 1.4rem; color: #1f6fa8; line-height: 1; height: 1.4rem; display: inline-flex; align-items: center; }
.icon-wahl-symbol .bi { font-size: 1.4rem; }
.kat-icon-svg { width: 1.25em; height: 1.25em; display: block; }
.kat-karte-icon .kat-icon-svg { width: 2rem; height: 2rem; --kat-icon-flaeche: #e8f0f7; }
.kat-karte:hover .kat-karte-icon .kat-icon-svg, .kat-karte.aktiv .kat-karte-icon .kat-icon-svg { --kat-icon-flaeche: var(--app-primary); }
.icon-wahl-symbol .kat-icon-svg { width: 1.6rem; height: 1.6rem; }

/* ===== Barrierefreiheit (BITV 2.0 / WCAG 2.1 AA) ===== */
:root {
    --bs-secondary-color: #5b6573;
    --bs-secondary-rgb: 91, 101, 115;
}
.text-secondary { color: #5b6573 !important; }
.form-text { color: #5b6573; }
.btn-outline-secondary { --bs-btn-color: #4f5864; --bs-btn-border-color: #8a94a0; --bs-btn-hover-bg: #5b6573; --bs-btn-hover-border-color: #5b6573; }
.app-navbar { --bs-navbar-color: #fff; --bs-navbar-hover-color: #fff; --bs-navbar-active-color: #fff; }
.app-navbar .nav-link:hover, .app-navbar .nav-link:focus-visible { text-decoration: underline; text-underline-offset: 6px; }
.verw-fuss, .dash-label, .dash-leer { color: #586573; }
.dash-tabelle thead th { color: #586573; }
.dash-balken-achse { color: #5f6b7a; }
.site-nav .nav-link { color: #fff; }

/* Sichtbarer Tastaturfokus */
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
    outline: 3px solid var(--app-fokus); outline-offset: 2px; box-shadow: 0 0 0 5px #fff;
}
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--app-primary); box-shadow: 0 0 0 .25rem rgba(var(--app-primary-rgb), .35); }
.leaflet-container .leaflet-marker-icon:focus-visible { outline: 3px solid var(--app-fokus); outline-offset: 2px; }
main:focus { outline: none; }

/* Sprunglinks */
.sprunglink {
    position: absolute; left: .75rem; top: -10rem; z-index: 2000;
    background: #111; color: #fff; padding: .6rem 1rem; border-radius: .35rem; font-weight: 600; text-decoration: none;
}
.sprunglink:focus { top: .75rem; color: #fff; }
.sprunglink-innen { position: absolute; left: 1rem; }
.sprunglink-innen:focus { top: 1rem; }
.start-karte { position: relative; }

/* Bewegung reduzieren, wenn im Betriebssystem eingestellt */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Hoher Kontrast (Windows) */
@media (forced-colors: active) {
    .badge, .btn, .typ-karte { border: 1px solid CanvasText; }
}

/* ===== Konto der Teilnehmenden / Stellungnahmen ===== */
.pflicht-stern { color: #b02a37; font-weight: 700; }
.hp-feld { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.konto-panel { border-radius: var(--app-radius); }
.konto-symbol { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 50%;
    background: rgba(var(--app-primary-rgb), .1); color: var(--app-primary); font-size: 2rem; }
.konto-symbol-warn { background: #fff3cd; color: #8a5a00; }
.konto-neu { background: linear-gradient(160deg, #fff 0%, #f1f6fb 100%); }
.konto-vorteile li { padding: .3rem 0; }
.konto-vorteile i { color: var(--app-primary); margin-right: .4rem; }
.typ-wahl .typ-karte {
    display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1rem 1.1rem; cursor: pointer;
    border: 2px solid var(--app-border); border-radius: var(--app-radius); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.typ-wahl .typ-karte > i { font-size: 1.6rem; color: var(--app-primary); }
.typ-wahl .typ-titel { font-weight: 600; }
.typ-wahl .typ-text { font-size: .85rem; color: #5b6573; }
.typ-wahl .typ-karte:hover { border-color: rgba(var(--app-primary-rgb), .5); }
.typ-wahl .btn-check:checked + .typ-karte { border-color: var(--app-primary); box-shadow: 0 0 0 .2rem rgba(var(--app-primary-rgb), .2); background: rgba(var(--app-primary-rgb), .04); }
.typ-wahl .btn-check:focus-visible + .typ-karte { outline: 3px solid #f2b705; outline-offset: 2px; }
.typ-badge { font-weight: 600; }
.typ-privat { background: #e7f1fb; color: #154f7a; }
.typ-firma { background: #efe9fb; color: #4a2d8a; }
.typ-toeb { background: #e3f4ea; color: #155c33; }
.stn-cta-hinweis { opacity: .95; }
.stn-erfolg { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.5rem; border-radius: var(--app-radius); background: #e8f5ee; border: 1px solid #b7dfc8; }
.stn-erfolg-icon { font-size: 2.4rem; color: #157347; line-height: 1; }
.panel-gefahr { border-color: #f1c4c8; }
.panel-gefahr .panel-header { color: #8c1c26; }
.testmail { border: 2px dashed #c08a00; background: #fffbea; border-radius: var(--app-radius); padding: 1rem 1.25rem; margin-bottom: 1rem; font-size: .92rem; }
.testmail-kopf { color: #6b4d00; margin-bottom: .5rem; }
.testmail-meta { font-size: .85rem; color: #4f5864; border-bottom: 1px solid #ecd9a0; padding-bottom: .5rem; margin-bottom: .5rem; }
.testmail-text { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; white-space: normal; word-break: break-word; }
.beitrag-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.beitrag-anlagen a { margin-right: 1rem; }
.seite-text h2 { font-size: 1.35rem; margin-top: 1.6rem; }
.seite-text h3 { font-size: 1.1rem; margin-top: 1.2rem; }
.seite-text h2:first-child { margin-top: 0; }
.platzhalter-text { background: #fff3cd; padding: 0 .2rem; }

/* Unsichtbare Hilfstexte in Tabellen duerfen die Seite nicht verbreitern */
.table-responsive { position: relative; }

/* Passwort-Staerke */
.pw-staerke { margin-top: .35rem; display: flex; align-items: center; gap: .6rem; }
.pw-balken { flex: 0 0 8rem; height: .4rem; border-radius: 1rem; background: #e3e8ee; overflow: hidden; }
.pw-balken span { display: block; height: 100%; width: 0; background: #b02a37; transition: width .2s; }
.pw-staerke[data-stufe="0"] .pw-balken span { width: 10%; }
.pw-staerke[data-stufe="1"] .pw-balken span { width: 30%; background: #b02a37; }
.pw-staerke[data-stufe="2"] .pw-balken span { width: 55%; background: #b26a00; }
.pw-staerke[data-stufe="3"] .pw-balken span { width: 80%; background: #2e7d32; }
.pw-staerke[data-stufe="4"] .pw-balken span { width: 100%; background: #1b5e20; }
.pw-text { color: #4f5864; }
.input-group > .form-control.is-invalid ~ .btn { border-color: #dc3545; }
.input-group + .invalid-feedback, .input-group ~ .invalid-feedback { display: block; }

/* Export */
.export-liste li { display: flex; gap: .6rem; padding: .35rem 0; }
.export-liste li > span { min-width: 0; overflow-wrap: anywhere; }
.export-liste li > i { color: var(--app-primary); font-size: 1.15rem; line-height: 1.3; }

/* Seitennavigation */
.seiten-nav .pagination { --bs-pagination-color: var(--app-primary); --bs-pagination-active-bg: var(--app-primary); --bs-pagination-active-border-color: var(--app-primary); --bs-pagination-disabled-color: #5b6573; gap: .15rem; }
.seiten-nav .page-link { min-width: 2.25rem; min-height: 2.25rem; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; }

/* Kartengruppen (mehrere Verfahren nah beieinander) */
.bsl-gruppe { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(var(--app-primary-rgb), .92);
    color: #fff; font-weight: 700; font-size: .9rem; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(16, 32, 48, .35); cursor: pointer; }
.bsl-gruppe.mit-aktiv { box-shadow: 0 0 0 3px #198754, 0 2px 8px rgba(16, 32, 48, .35); }
.bsl-gruppe:hover { background: var(--app-primary-dark); }
.bsl-gruppe:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.legende-gruppe { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; border-radius: 50%;
    background: var(--app-primary); color: #fff; font-size: .62rem; font-weight: 700; margin-right: .15rem; }
.gruppe-liste { max-height: 14rem; overflow: auto; }
.gruppe-liste li { padding: .2rem 0; border-bottom: 1px solid #eef1f4; }
#verfahrenListe[aria-busy="true"] { opacity: .55; transition: opacity .15s; }

/* ---------------------------------------------------------------
   Abwaegung
   --------------------------------------------------------------- */
.abw-zahl { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: #14294a; }
.abw-zahl-link { display: block; text-decoration: none; color: #1d5ca6; border-radius: var(--app-radius); padding: .1rem .25rem; }
.abw-zahl-link:hover .abw-zahl, .abw-zahl-link:focus .abw-zahl { text-decoration: underline; }
.abw-zahl-link .abw-zahl { color: #1d5ca6; }
.abw-balken { display: flex; height: .9rem; border-radius: .45rem; overflow: hidden; background: #e7ebf0; }
.abw-balken span { display: block; height: 100%; }
.abw-balken-klein { height: .5rem; width: 9rem; max-width: 100%; margin-bottom: .2rem; }
.abw-b-frei { background: #1f7a45; }
.abw-b-entwurf { background: #d08a2e; }
.abw-b-offen { background: #b8c2ce; }
.abw-legende { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.abw-l { display: inline-block; width: .8rem; height: .8rem; border-radius: .2rem; vertical-align: -1px; }
.abw-team li { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; border-bottom: 1px solid #edf0f3; }
.abw-team li:last-child { border-bottom: 0; }
.abw-thema { background: #eef3f9; color: #1d4f8c; border: 1px solid #cfdcec; font-weight: 500; text-decoration: none; padding: .4em .65em; }
.abw-thema:hover, .abw-thema:focus { background: #dfe9f5; color: #14294a; }
.abw-thema.aktiv { background: #1d5ca6; color: #fff; border-color: #1d5ca6; }
.abw-tabelle .abw-check { width: 2.5rem; }
.abw-tabelle .abw-betreff { max-width: 22rem; }
.abw-tabelle .abw-fortschritt { min-width: 10rem; }
.abw-anwesend-klein { color: #7a4a0c; font-size: .8rem; margin-top: .15rem; }

.abw-stand { font-weight: 600; border: 1px solid transparent; }
.abw-stand-offen { background: #eef1f4; color: #3f4a5a; border-color: #d5dbe2; }
.abw-stand-entwurf { background: #fdf0de; color: #7a4a0c; border-color: #f0d3a6; }
.abw-stand-frei { background: #e2f3e8; color: #17603a; border-color: #b7dfc5; }

@media (min-width: 992px) {
    .abw-original { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
}
.abw-wortlaut { font-size: .95rem; line-height: 1.6; }
.abw-wortlaut::selection, .abw-wortlaut *::selection { background: #ffe08a; }
.abw-punkt { scroll-margin-top: 1rem; border-left: 4px solid #b8c2ce; transition: box-shadow .2s; }
.abw-punkt[data-stand="entwurf"] { border-left-color: #d08a2e; }
.abw-punkt[data-stand="freigegeben"] { border-left-color: #1f7a45; }
.abw-punkt.ist-geaendert { box-shadow: 0 0 0 2px #f0c56b; }
.abw-punkt.wird-bearbeitet { box-shadow: 0 0 0 2px #8db4e2; }
.abw-punkt:focus { outline: 3px solid #1d5ca6; outline-offset: 2px; }
.abw-punkt fieldset:disabled .form-control, .abw-punkt fieldset:disabled .form-select { background-color: #f6f8f4; }
.abw-wer { background: #e6effa; color: #14407a; border-radius: 1rem; padding: .1rem .55rem; }
.abw-meta { overflow-wrap: anywhere; }
.abw-aktionen details > summary { list-style: none; }
.abw-aktionen details > summary::-webkit-details-marker { display: none; }
.abw-verlauf[open], .abw-loeschen[open] { flex-basis: 100%; }
.abw-loeschen[open] { text-align: right; }
.abw-verlauf-eintrag { padding: .4rem 0; border-top: 1px solid #edf0f3; }
.abw-verlauf-eintrag summary { color: #1d5ca6; cursor: pointer; display: inline-block; padding: .2rem 0; }
.abw-vergleich { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: .2rem .75rem; }
.abw-vergleich dt { font-weight: 600; }
.abw-vergleich dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .abw-vergleich { grid-template-columns: 1fr; }
    .abw-vergleich dd { margin-bottom: .35rem; }
}
/* hidden-Attribut gewinnt immer (auch gegen d-flex & Co.) */
[hidden] { display: none !important; }

/* Abwaegung: Fundstellen im Wortlaut und Markierungs-Blase */
.abw-original-kopf { position: sticky; top: 0; z-index: 2; background: #fff; }
.abw-fund { padding: 0; border-radius: 2px; color: inherit; cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.abw-fund-offen { background: #eceff3; box-shadow: inset 0 -2px 0 #9aa6b4; }
.abw-fund-entwurf { background: #fdf1e1; box-shadow: inset 0 -2px 0 #d08a2e; }
.abw-fund-freigegeben { background: #e6f4ea; box-shadow: inset 0 -2px 0 #1f7a45; }
.abw-fund-mehrfach { background-image: repeating-linear-gradient(135deg, rgba(20,41,74,.07) 0 4px, transparent 4px 8px); }
.abw-fund[data-nr]::before {
    content: attr(data-nr); display: inline-block; font-size: .68em; font-weight: 700; line-height: 1.35; vertical-align: .35em;
    padding: 0 .35em; margin-right: .2em; border-radius: .6em; background: #14294a; color: #fff; user-select: none;
}
.abw-fund-aktiv { outline: 2px solid #1d5ca6; outline-offset: 1px; }
.abw-fund-neu { animation: abwFundNeu 2.2s ease-out 1; }
@keyframes abwFundNeu { 0% { background-color: #ffe08a; } 100% { } }
@media (prefers-reduced-motion: reduce) { .abw-fund-neu { animation: none; } }
.abw-punkt.abw-karte-hinweis { box-shadow: 0 0 0 2px #1d5ca6; }
.abw-abdeckung { color: #3f4a5a; }
.abw-blase {
    position: fixed; z-index: 1060; width: min(30rem, calc(100vw - 16px)); background: #fff; border: 1px solid #c9d3df; border-radius: var(--app-radius);
    box-shadow: 0 10px 30px rgba(20,41,74,.22); padding: .6rem .7rem; display: flex; flex-direction: column; gap: .45rem;
}
.abw-blase-text { overflow-wrap: anywhere; }
.abw-original:focus-visible { outline: 3px solid #1d5ca6; outline-offset: 2px; }

/* ===== Verwaltung: Kopfzeile, Reiter, Sortierung, Meldungen, Ladezustand ===== */
.verw-kopf { margin-bottom: 1.1rem; }
.verw-krumen .breadcrumb { --bs-breadcrumb-margin-bottom: .25rem; }
.verw-krumen .breadcrumb-item a { color: var(--app-primary); text-decoration: none; }
.verw-krumen .breadcrumb-item a:hover { text-decoration: underline; }
.verw-kopf-zeile { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; }
.verw-kopf-titel { min-width: 0; }
.verw-kopf-titel h1 { overflow-wrap: anywhere; }
.verw-kopf-aktionen { display: flex; flex-wrap: wrap; gap: .5rem; }

.verfahren-reiter { border-bottom: 1px solid var(--app-border); margin: -.25rem 0 1.25rem; overflow-x: auto; }
.verfahren-reiter ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; min-width: max-content; }
.verfahren-reiter a { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .85rem; color: #4b5867; text-decoration: none; font-size: .92rem;
    border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.verfahren-reiter a:hover { color: var(--app-primary-dark); background: rgba(var(--app-primary-rgb), .06); }
.verfahren-reiter a.aktiv { color: var(--app-primary-dark); border-bottom-color: var(--app-primary); font-weight: 600; }

.sort-th { white-space: nowrap; }
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.sort-link .bi { font-size: .75rem; opacity: .35; }
.sort-link:hover .bi, .sort-aktiv .sort-link .bi { opacity: 1; }
.sort-aktiv .sort-link { color: var(--app-primary-dark); }
.sort-link:hover { text-decoration: underline; text-underline-offset: 2px; }

.verw-toasts { position: fixed; top: 1rem; right: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; width: min(26rem, calc(100vw - 2rem)); pointer-events: none; }
.verw-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: .65rem; padding: .75rem .85rem; border-radius: var(--app-radius); background: #fff;
    box-shadow: 0 .5rem 1.5rem rgba(10, 24, 34, .18); border-left: 4px solid #6c7a89; font-size: .92rem; animation: verwToastEin .2s ease-out; }
.verw-toast > .bi { font-size: 1.1rem; line-height: 1.3; }
.verw-toast-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.verw-toast .btn-close { font-size: .7rem; margin-top: .2rem; }
.verw-toast-success { border-left-color: #198754; } .verw-toast-success > .bi { color: #198754; }
.verw-toast-danger { border-left-color: #b02a37; } .verw-toast-danger > .bi { color: #b02a37; }
.verw-toast-warning { border-left-color: #c47f00; } .verw-toast-warning > .bi { color: #9a6400; }
.verw-toast-info { border-left-color: var(--app-primary); } .verw-toast-info > .bi { color: var(--app-primary); }
.verw-toast.weg { opacity: 0; transform: translateX(1rem); transition: opacity .25s, transform .25s; }
@keyframes verwToastEin { from { opacity: 0; transform: translateY(-.5rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .verw-toast { animation: none; } .verw-toast.weg { transition: none; } }

[data-liste] { transition: opacity .15s; }
[data-liste][aria-busy="true"] { opacity: .5; pointer-events: none; }
.verw-laedt { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1100; background: linear-gradient(90deg, transparent, var(--app-primary), transparent);
    background-size: 50% 100%; background-repeat: no-repeat; animation: verwLaedt 1s linear infinite; }
@keyframes verwLaedt { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.btn .verw-spinner { width: .9rem; height: .9rem; border-width: .15em; vertical-align: -.1em; margin-right: .35rem; }
.filter-leiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.filter-leiste .form-label { font-size: .8rem; margin-bottom: .2rem; color: #4b5867; }
.js .filter-senden { display: none; }
.liste-info { font-size: .85rem; color: #5b6676; }
.aenderung-hinweis { font-size: .85rem; color: #9a6400; }
.abw-tabelle tr.abw-gewaehlt > td { background: rgba(var(--app-primary-rgb), .07); }
.abw-sammel .nav-tabs .nav-link { font-size: .9rem; }
/* versteckte Hilfetexte (position:absolute) im scrollbaren Bereich halten, sonst entsteht seitlicher Ueberlauf */
.verfahren-reiter, .verfahren-reiter a, .sort-link, .filter-chip { position: relative; }


/* Thema-Vorschläge */
.sw-wrap { position: relative; }
.sw-vorschlaege { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; margin-top: 2px; background: #fff; border: 1px solid var(--app-border);
    border-radius: .45rem; box-shadow: 0 .4rem 1rem rgba(10, 24, 34, .14); max-height: 16rem; overflow-y: auto; padding: .2rem 0; }
.sw-vorschlaege li { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem .7rem; cursor: pointer; font-size: .875rem; }
.sw-vorschlaege li:hover, .sw-vorschlaege li.aktiv { background: rgba(var(--app-primary-rgb), .1); }
.sw-anzahl { color: #5b6676; font-size: .78rem; white-space: nowrap; }
.abw-thema-link { text-decoration: none; }
.abw-thema-link:hover { text-decoration: underline; }
.abw-thema-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem .9rem;
    border-radius: .55rem; background: rgba(var(--app-primary-rgb), .07); border: 1px solid rgba(var(--app-primary-rgb), .25); font-size: .92rem; }
.abw-thema-punkt.ist-frei { opacity: .75; }
.abw-thema-bisher { background: #f6f8fa; border-radius: .4rem; padding: .45rem .6rem; }
.min-w-0 { min-width: 0; }
@media (min-width: 992px) { .abw-thema-eingabe { position: sticky; top: 1rem; } }

/* Abwägungstabelle (alle Punkte, direkt bearbeitbar) */
.abw-tab { table-layout: fixed; }
.abw-tab td { vertical-align: top; }
.abw-tab thead th { white-space: nowrap; font-size: .85rem; }
.abw-tab-text { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; }
.abw-tab-text.offen { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
.abw-tab-mehr { font-size: .78rem; }
.abw-tab-zeile:not(.ist-frei):not(.im-edit) td[data-feld] { cursor: text; }
.abw-tab-zeile.ist-frei td[data-feld] { color: #3f4a5a; }
.abw-tab tr.im-edit > td { background: rgba(var(--app-primary-rgb), .05); }
.abw-tab-feld { resize: vertical; max-height: 300px; font-size: .85rem; }
.abw-tab-aktionen { display: flex; flex-wrap: wrap; gap: .25rem; }
.abw-tab-meta { font-size: .72rem; margin-top: .25rem; }
.abw-tab tr.abw-tab-gespeichert > td { animation: abwTabOk 1.6s ease-out; }
@keyframes abwTabOk { from { background: rgba(25, 135, 84, .16); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .abw-tab tr.abw-tab-gespeichert > td { animation: none; } }
.abw-tab tr[aria-busy="true"] { opacity: .6; }
.abw-ansichten .nav-link { padding: .35rem .8rem; font-size: .92rem; }
.abw-tab { min-width: 940px; }
.abw-tab td:first-child .small { font-size: .72rem; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .filter-leiste > div { flex: 1 1 100%; max-width: none !important; }
    .filter-leiste .form-select, .filter-leiste .form-control { max-width: none !important; }
}
html:not(.js) .abw-tab-aktionen button { display: none; }

/* Stellungnahmen-Liste: Wortlaut zum Aufklappen */
.abw-tabelle tr.abw-wortlaut-zeile > td { background: #f8fafc; border-top: 0; padding-top: .25rem; padding-bottom: 1rem; }
.abw-tabelle tr.abw-offen > td { border-bottom-color: transparent; }
.abw-wortlaut-liste { max-height: 22rem; overflow: auto; font-size: .9rem; max-width: 60rem; }
.abw-wl-knopf { font-size: .8rem; text-decoration: none; }
html:not(.js) .abw-wortlaut-zeile[hidden] { display: table-row; }
html:not(.js) .abw-wl-knopf { display: none; }

/* GfI-Ansicht der Abwaegung: nur lesend (der Server lehnt Aenderungen ohnehin ab) */
.abw-nur-lesen form[method="post"] button, .abw-nur-lesen #abwWerkzeug, .abw-nur-lesen #neuerPunkt, .abw-nur-lesen #abwBlase,
.abw-nur-lesen .abw-loeschen, .abw-nur-lesen .abw-zuweisen-form, .abw-nur-lesen [data-va-hinweis],
.abw-nur-lesen .abw-thema-eingabe, .abw-thema-form.abw-nur-lesen .form-check-input, .abw-thema-form.abw-nur-lesen label[for="thAlle"] { display: none !important; }
.table-responsive { position: relative; }   /* versteckte Hilfstexte (visually-hidden) bleiben im Rollbereich */
.dash-kachel > div { min-width: 0; } .dash-label { overflow-wrap: anywhere; hyphens: auto; }

/* Anlagen einer Stellungnahme: Inhalt uebernehmen */
.abw-anlagen-liste li + li { border-top: 1px dashed var(--app-border); }
.abw-anlage-tipp { background: rgba(var(--app-primary-rgb), .06); border: 1px solid rgba(var(--app-primary-rgb), .18); }
.abw-anlage-text { font-size: .92rem; line-height: 1.55; min-height: 18rem; }
/* Auswahllisten (Landesplanung, Umwelt): Formular, Marken, Pflege */
.listen-auswahl { border: 1px solid var(--app-border); border-radius: var(--app-radius); padding: .75rem 1rem .5rem; margin-bottom: 1rem; }
.listen-auswahl legend { float: none; width: auto; padding: 0 .25rem; margin-bottom: 0; font-size: 1rem; font-weight: 600; }
.listen-auswahl.is-invalid { border-color: var(--bs-danger, #dc3545); }
.listen-auswahl.kompakt { padding: .5rem .75rem .25rem; margin-bottom: .5rem; }
.listen-auswahl.kompakt legend { font-size: .85rem; }
.listen-optionen { columns: 2 16rem; column-gap: 1.5rem; }
.listen-optionen .form-check { break-inside: avoid; }
.listen-auswahl.kompakt .listen-optionen { columns: 1; font-size: .9rem; }
.listen-marken { margin-bottom: .15rem; }
.listen-marken .listen-name { color: #5b6573; }
.listen-marke { display: inline-block; background: rgba(var(--app-primary-rgb), .08); color: var(--app-primary-dark); border-radius: .35rem; padding: .05rem .4rem; margin: 0 .15rem .15rem 0; font-size: .85em; }
.listen-marken.klein { font-size: .8rem; }
.liste-eintraege .liste-eintrag-aus { color: #6c757d; background: #f8f9fa; }
.punkt-listen summary { cursor: pointer; }
.abw-zuordnung summary { cursor: pointer; }

/* Lange deutsche Komposita (z. B. „Hochwasserrisikomanagementplan“) duerfen umbrechen: in Tabellen, Ueberschriften, Karten und Marken */
.table td, h1, h2, .h1, .h2, .card-title, .verfahren-karte-titel { hyphens: auto; -webkit-hyphens: auto; }
.table td a { overflow-wrap: anywhere; }
.badge-umbruch { white-space: normal; text-align: left; max-width: 100%; hyphens: auto; -webkit-hyphens: auto; }
.text-umbruch { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
h1, .h1 { overflow-wrap: break-word; }

/* Stellungnahme erfassen (Brief, E-Mail, Niederschrift) */
.brief-vorschau { max-height: 75vh; overflow: auto; font-size: .875rem; line-height: 1.5; border: 1px solid #dfe5ec; border-radius: .375rem; background: #fff; }
.brief-teil { white-space: pre-wrap; padding: .75rem 1rem; }
.brief-wortlaut, .brief-legende { background: #f1f6fc; border-left: 3px solid #1d5ca6; }
.brief-legende { display: inline-block; width: 1.4em; height: .9em; vertical-align: -.1em; }
.brief-vorschau mark { background: #fff1b8; padding: 0 .1em; }
.brief-original { display: block; width: 100%; height: 75vh; border: 1px solid #dfe5ec; border-radius: .375rem; object-fit: contain; background: #f5f7fa; }
@media (min-width: 992px) { .brief-haft { position: sticky; top: 1rem; } }

/* ---- Karten: Hinweis "Strg + Mausrad" beim Scrollen ueber der Karte ---- */
.karte-mausrad-hinweis { position: absolute; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    background: rgba(16, 32, 48, .45); color: #fff; font-size: 1.05rem; font-weight: 600; text-align: center; padding: 1rem;
    pointer-events: none; opacity: 0; transition: opacity .25s; }
.karte-mausrad-hinweis.sichtbar { opacity: 1; }

/* ---- Beschreibung: Link-Knoepfe (z. B. "zur Abwaegungsdokumentation") ---- */
.beschreibung-links { margin-top: 1rem; white-space: normal; }
.beschreibung-text a:not(.btn) { overflow-wrap: anywhere; }

/* ---- Gestaltung nach dem Regierungsportal MV (land-mv.de): Farben, Schrift, Rundungen, Kopfzeile ---- */
:root {
    --app-radius: .25rem;
    --app-akzent: #f2b700;          /* Gelb aus dem Logo "MV tut gut." */
    --app-hell: #e7f6fd;
    --app-fokus: #9200eb;           /* Fokusrahmen wie auf land-mv.de */
    --bs-success: #007a2e; --bs-success-rgb: 0, 122, 46;
    --bs-danger: #c72c2c; --bs-danger-rgb: 199, 44, 44;
    --bs-border-radius: .25rem; --bs-border-radius-sm: .125rem; --bs-border-radius-lg: .25rem; --bs-border-radius-xl: .25rem;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    --bs-body-font-size: 1.0625rem;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 500; }

/* Kopfzeile: dunkelblau mit weissem Logo und Wortmarke */
.app-topbar { background: var(--app-primary); box-shadow: none; padding: .9rem 0; }
.app-marke { color: #fff; text-decoration: none; }
.app-marke:hover { color: #fff; }
.app-topbar .app-logo { height: 3.375rem; width: auto; }
.app-marke-text { display: flex; flex-direction: column; font-size: 1.125rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.app-topbar .app-topbar-text { color: #fff; border-left: 0; padding-left: 0; text-align: right; }
.app-topbar .app-topbar-text .app-brand { color: #fff; font-size: 1.35rem; font-weight: 600; }
.app-topbar .app-topbar-text .app-brand span { color: #fff; font-weight: 300; }
.app-topbar .app-topbar-text .text-secondary { color: rgba(255, 255, 255, .85) !important; }

/* Hauptmenue: hell mit blauer Schrift */
.app-navbar.app-hauptnav { background: #fff; border-bottom: 1px solid var(--app-border); box-shadow: 0 2px 6px rgba(8, 28, 48, .06);
    --bs-navbar-color: var(--app-primary); --bs-navbar-hover-color: var(--app-primary-dark); --bs-navbar-active-color: var(--app-primary-dark);
    --bs-navbar-brand-color: var(--app-primary); --bs-navbar-brand-hover-color: var(--app-primary-dark); }
.app-navbar.app-hauptnav .nav-link.active { text-decoration-color: var(--app-akzent); text-decoration-thickness: 3px; }

/* ---- Barrierearm: Darstellung anpassen (Schriftgroesse, hoher Kontrast), Logik in js/darstellung.js ---- */
.darstellung { display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.darstellung-titel { margin-right: .15rem; }
.darstellung-knopf { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: var(--app-radius, .25rem);
    padding: .05rem .5rem; font-size: .875rem; line-height: 1.5; min-width: 2rem; }
.darstellung-knopf:hover:not(:disabled):not([aria-pressed="true"]) { background: rgba(255, 255, 255, .15); }
.darstellung-knopf:disabled { opacity: .45; }
.darstellung-knopf[aria-pressed="true"] { background: #fff; color: var(--app-primary-dark); }
.darstellung-kontrast { margin-left: .5rem; }
.portal-leiste .darstellung-knopf { font-size: .8rem; }
html[data-schrift="1"] { font-size: 115%; }
html[data-schrift="2"] { font-size: 130%; }
html[data-schrift="3"] { font-size: 150%; }
/* Die Knoepfe selbst bleiben gleich gross, damit sie nicht aus der Leiste wandern */
html[data-schrift] .darstellung-knopf, html[data-schrift] .darstellung-titel { font-size: 14px; }

/* Hoher Kontrast: Schwarz auf Weiss, dunkle Akzentfarbe, Links unterstrichen, deutliche Rahmen */
html.kontrast-hoch {
    --app-primary: #00284a; --app-primary-dark: #000; --app-primary-rgb: 0, 40, 74;
    --app-bg: #fff; --app-border: #000; --app-hell: #fff;
    --bs-body-color: #000; --bs-secondary-color: #000; --bs-tertiary-color: #000; --bs-border-color: #000;
}
html.kontrast-hoch body { background: #fff; color: #000; }
html.kontrast-hoch .text-secondary, html.kontrast-hoch .text-muted, html.kontrast-hoch .small.text-secondary { color: #000 !important; }
html.kontrast-hoch a:not(.btn):not(.nav-link):not(.app-marke):not(.navbar-brand) { text-decoration: underline; }
html.kontrast-hoch .panel, html.kontrast-hoch .card, html.kontrast-hoch .verfahren-card, html.kontrast-hoch .kat-karte,
html.kontrast-hoch .start-panel, html.kontrast-hoch .start-karte, html.kontrast-hoch .form-control, html.kontrast-hoch .form-select { border: 2px solid #000; }
html.kontrast-hoch .badge, html.kontrast-hoch .text-bg-secondary, html.kontrast-hoch .text-bg-light { background: #000 !important; color: #fff !important; }
html.kontrast-hoch .app-hauptnav { border-bottom: 2px solid #000; }
html.kontrast-hoch .app-hauptnav .nav-link { color: #000; }
html.kontrast-hoch ::placeholder { color: #333; opacity: 1; }
html.kontrast-hoch a:focus-visible, html.kontrast-hoch button:focus-visible, html.kontrast-hoch .btn:focus-visible, html.kontrast-hoch [tabindex]:focus-visible {
    outline: 3px solid #000; box-shadow: 0 0 0 6px #ffd400; }
/* Wortmarke auf schmalen Bildschirmen / bei grosser Schrift umbrechen statt abschneiden */
.app-marke { min-width: 0; }
@media (max-width: 575.98px) {
    .app-marke-text { white-space: normal; font-size: 1rem; }
    .app-topbar .app-logo { height: 2.75rem; }
}

/* Darstellungs-Knoepfe in der blauen Kopfzeile: schlichte weisse Textknoepfe wie die Zusatzlinks auf land-mv.de */
.app-topbar .darstellung { gap: 0; color: #fff; font-size: .9375rem; }
.app-topbar .darstellung-titel { margin-right: .35rem; opacity: .85; }
.app-topbar .darstellung-knopf { border: 0; border-radius: var(--app-radius); padding: .2rem .45rem; font-size: .9375rem; min-width: 0; }
.app-topbar .darstellung-knopf:hover:not(:disabled) { background: rgba(255, 255, 255, .14); text-decoration: underline; text-underline-offset: 4px; }
.app-topbar .darstellung-knopf[aria-pressed="true"] { background: transparent; color: #fff; text-decoration: underline; text-decoration-color: var(--app-akzent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.app-topbar .darstellung-kontrast { margin-left: .6rem; padding-left: .85rem; border-left: 1px solid rgba(255, 255, 255, .4); border-radius: 0; }
.app-topbar .darstellung-kontrast .bi { margin-right: .3rem; }
@media (max-width: 575.98px) {
    .app-topbar .darstellung-titel, .app-topbar .darstellung-wort { display: none; }
    .app-topbar .darstellung-kontrast { margin-left: .2rem; padding-left: .5rem; }
}
@media (max-width: 575.98px) {
    .app-topbar .container-xl { flex-wrap: wrap; row-gap: .35rem; }
    .app-topbar .darstellung { width: 100%; justify-content: flex-end; flex-wrap: nowrap; border-top: 1px solid rgba(255, 255, 255, .25); padding-top: .3rem; }
    .app-topbar .darstellung-titel { display: inline; }
}

/* ---- BundID-Einstieg (Registrierung, Anmeldung); vorerst nur optisch, siehe BUNDID_AKTIV in config.php ---- */
.bundid-box { background: var(--app-hell, #e7f6fd); border: 1px solid var(--app-border); border-radius: var(--app-radius); padding: 1rem 1.1rem; }
.bundid-symbol { flex-shrink: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #fff; border: 1px solid var(--app-border);
    display: inline-flex; align-items: center; justify-content: center; color: var(--app-primary); font-size: 1.35rem; }
.bundid-badge { background: #fff; color: var(--app-primary-dark); border: 1px solid var(--app-primary); font-weight: 600; vertical-align: .1em; }
.btn-bundid { --bs-btn-bg: #1d2c3c; --bs-btn-color: #fff; --bs-btn-border-color: #1d2c3c; --bs-btn-hover-bg: #0f1a26; --bs-btn-hover-color: #fff;
    --bs-btn-disabled-bg: #fff; --bs-btn-disabled-color: #5b6676; --bs-btn-disabled-border-color: #aab4bf; --bs-btn-disabled-opacity: 1;
    font-weight: 600; padding: .6rem 1rem; }
.btn-bundid .bi { margin-right: .35rem; }
.btn-bundid:disabled { cursor: not-allowed; border-style: dashed; }
.oder-trenner { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; color: #5b6676; font-size: .875rem; }
.oder-trenner::before, .oder-trenner::after { content: ""; flex: 1; border-top: 1px solid var(--app-border); }
.konto-form .oder-trenner { margin-bottom: 0; }
html.kontrast-hoch .bundid-box { background: #fff; border: 2px solid #000; }
html.kontrast-hoch .btn-bundid:disabled { color: #000; border-color: #000; }

/* ---- Traeger-Startseite: Kategorien als Reiter, Verfahrensart und Status als Auswahlfelder ---- */
.traeger-reiter { border-bottom: 1px solid var(--app-border); gap: 0 1.5rem; --bs-nav-underline-border-width: 3px; }
.traeger-reiter .nav-link { color: #3d4754; padding: .55rem 0; }
.traeger-reiter .nav-link:hover { color: var(--app-primary); }
.traeger-reiter .nav-link.active { color: var(--app-primary-dark); font-weight: 600; border-bottom-color: var(--app-primary); }
.reiter-zahl { display: inline-block; min-width: 1.6em; padding: 0 .4em; margin-left: .3rem; border-radius: 1rem; background: var(--app-bg);
    border: 1px solid var(--app-border); font-size: .8rem; font-weight: 600; text-align: center; color: inherit; }
.traeger-reiter .nav-link.active .reiter-zahl { background: var(--app-primary); border-color: var(--app-primary); color: #fff; }
.traeger-werkzeuge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.traeger-auswahl { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.traeger-auswahl .form-select { width: auto; min-width: 11rem; }
@media (max-width: 575.98px) { .traeger-auswahl, .traeger-auswahl .form-select { width: 100%; } .traeger-auswahl .form-select { flex: 1 1 100%; } }
html.kontrast-hoch .traeger-reiter { border-bottom: 2px solid #000; }
html.kontrast-hoch .traeger-reiter .nav-link { color: #000; }
a.hero-badge { color: #fff; text-decoration: none; }
a.hero-badge:hover { background: rgba(255, 255, 255, .32); color: #fff; }
@media (max-width: 575.98px) { .filter-reihe-titel { min-width: 100%; } }
html.kontrast-hoch .filter-reihe-titel { color: #000; }

/* ---- Startkarte: Planungsregionen ---- */
.region-tooltip { font-weight: 600; }
/* Touch: ein Finger scrollt die Seite, zwei Finger bewegen die Karte (Logik in karten.js) */
.leaflet-container.karte-zwei-finger { touch-action: pan-x pan-y !important; }

/* ---- Startkarte: Ortssuche ---- */
.karte-ortssuche { background: #fff; border-radius: var(--app-radius); box-shadow: 0 1px 6px rgba(0, 0, 0, .25); padding: .4rem; width: min(17rem, calc(100vw - 6rem)); }
.ortssuche-form { display: flex; gap: .3rem; }
.ortssuche-meldung:empty { display: none; }
.ortssuche-meldung { margin-top: .3rem; color: #3d4754; }
.ortssuche-liste { list-style: none; margin: .3rem 0 0; padding: 0; max-height: 14rem; overflow-y: auto; border-top: 1px solid var(--app-border); }
.ortssuche-liste button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--app-border); padding: .35rem .3rem; font-size: .875rem; line-height: 1.3; }
.ortssuche-liste button:hover, .ortssuche-liste button:focus-visible { background: var(--app-hell, #e7f6fd); }
.ortssuche-zusatz { display: block; color: #5b6676; font-size: .8rem; }
html.kontrast-hoch .karte-ortssuche { border: 2px solid #000; }
/* Kein Fokus-Rechteck nach Mausklick auf eine Planungsregion (Flaechen sind nicht per Tastatur erreichbar; Ersatz: Seite "Verfahrenstraeger") */
.leaflet-regionen-pane path:focus { outline: none; }

/* Lange Woerter (z. B. "Raumvertraeglichkeitspruefungen") auf schmalen Bildschirmen umbrechen statt ueberstehen */
h1, h2, h3, h4, .kat-karte-titel, .hero-titel, .site-name, .site-text, .beschreibung-text, .rechtstext, .verfahren-card { overflow-wrap: break-word; hyphens: auto; }
.badge { white-space: normal; text-align: left; overflow-wrap: anywhere; }

/* Kartenfenster nach Klick auf einen Pin: Bild, Status, Angaben, Knopf */
.bsl-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: .5rem; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .22); }
.bsl-popup .leaflet-popup-content { margin: 0; width: auto !important; min-width: 260px; max-width: 300px; font-size: .875rem; line-height: 1.4; }
.bsl-popup a.leaflet-popup-close-button { top: 6px; right: 6px; width: 26px; height: 26px; line-height: 24px; font-size: 18px; border-radius: 50%;
    background: rgba(255, 255, 255, .92); color: #222; text-align: center; z-index: 2; }
.bsl-popup a.leaflet-popup-close-button:hover, .bsl-popup a.leaflet-popup-close-button:focus-visible { background: #fff; color: #000; }
.karten-popup-bild { display: block; height: 6px; background: var(--status-farbe, var(--app-primary)); }
.karten-popup-inhalt { padding: .75rem .9rem .85rem; }
.karten-popup-schilder { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; padding-right: 1.6rem; }
.karten-popup-status, .karten-popup-kategorie { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600;
    padding: .12rem .5rem; border-radius: 999px; line-height: 1.4; }
.karten-popup-status { color: #1d1d1b; background: color-mix(in srgb, var(--status-farbe) 16%, #fff); }
.karten-popup-status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--status-farbe); }
.karten-popup-kategorie { color: var(--app-primary); background: var(--app-hell); }
.karten-popup-titel { display: block; font-weight: 700; font-size: .95rem; line-height: 1.3; color: #1d1d1b; text-decoration: none;
    overflow-wrap: break-word; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.karten-popup-titel:hover, .karten-popup-titel:focus-visible { color: var(--app-primary); text-decoration: underline; }
.karten-popup-angaben { margin-top: .45rem; display: grid; gap: .2rem; color: #4a4a4a; font-size: .8rem; }
.karten-popup-zeile { display: flex; gap: .45rem; align-items: baseline; }
.karten-popup-zeile i { color: var(--app-primary); flex: 0 0 auto; }
.karten-popup-text { margin: .5rem 0 0; color: #333; font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.karten-popup-aktionen { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.karten-popup-aktionen .btn { color: #fff; }
.karten-popup-liste { font-size: .8rem; }
html.kontrast-hoch .karten-popup-status, html.kontrast-hoch .karten-popup-kategorie { background: #fff; color: #000; border: 1px solid #000; }
html.kontrast-hoch .karten-popup-angaben, html.kontrast-hoch .karten-popup-text, html.kontrast-hoch .karten-popup-zeile i, html.kontrast-hoch .karten-popup-titel { color: #000; }
html.kontrast-hoch .bsl-popup .leaflet-popup-content-wrapper { border: 2px solid #000; }
/* Kleine Karten (Handy): Fenster kuerzer, damit es ganz in die Karte passt */
.karten-popup.kompakt .karten-popup-text { display: none; }
.karten-popup.kompakt .karten-popup-titel { -webkit-line-clamp: 3; }
.karten-popup.kompakt .karten-popup-inhalt { padding: .6rem .8rem .7rem; }
.karten-popup.kompakt .karten-popup-aktionen { margin-top: .5rem; }
.karten-popup.kompakt .karten-popup-kategorie { display: none; }
/* Legende liegt ueber dem Kartenfenster: solange ein Fenster offen ist, ausblenden */
.fenster-offen .karten-legende { visibility: hidden; }

/* Leaflet faerbt Links im Kartenfenster sonst blau (#0078a8): Portalfarben verwenden */
.bsl-popup .karten-popup-titel { color: #1d1d1b; }
.bsl-popup .karten-popup-titel:hover, .bsl-popup .karten-popup-titel:focus-visible { color: var(--app-primary); }
.bsl-popup .karten-popup-liste { color: var(--app-primary); }
html.kontrast-hoch .bsl-popup .karten-popup-titel, html.kontrast-hoch .bsl-popup .karten-popup-liste { color: #000; }
