/* =========================================================
   SIN Homepage – globale Styles
   ========================================================= */

:root {
    --sin-rot: #b5123a;
    --text: #1f2937;
    --text-muted: #5b6472;
    --bg: #fafaf8;
    --line: #e3e5e8;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 4px 14px rgba(17, 24, 39, 0.06);
    --shadow-hover: 0 4px 10px rgba(17, 24, 39, 0.08), 0 12px 28px rgba(17, 24, 39, 0.12);
    /* Standard-Farbschema (wird durch .theme-* überschrieben) */
    --accent: #475569;
    --accent-soft: #f1f5f9;
    --accent-line: #d8dee6;
}

/* ---------- Farbschemata je Bereich ---------- */
.theme-neutral { --accent: #475569; --accent-soft: #f1f5f9; --accent-line: #d8dee6; }
.theme-start { --accent: #b5123a; --accent-soft: #fdf0f3; --accent-line: #f1c4cf; }
.theme-verein { --accent: #0e7490; --accent-soft: #e9f2f5; --accent-line: #bcd8e0; }
.theme-aktuelles { --accent: #15803d; --accent-soft: #eaf6ee; --accent-line: #c3e6cd; }
.theme-mitmachen { --accent: #b45309; --accent-soft: #fdf3e7; --accent-line: #f3d5ae; }
.theme-vorstand { --accent: #6d28d9; --accent-soft: #f3eefe; --accent-line: #d9c8fb; }
.theme-praktisches { --accent: #1d5fa8; --accent-soft: #eaf2fb; --accent-line: #c5d9f1; }
.theme-rechtliches { --accent: #be123c; --accent-soft: #fdecf0; --accent-line: #f4c2ce; }
.theme-allgemein { --accent: #475569; --accent-soft: #f1f5f9; --accent-line: #d8dee6; }

/* ---------- Grundlagen ---------- */
html {
    font-size: 17px;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.65;
}

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--text);
}

h1:focus {
    outline: none;
}

a {
    color: var(--accent);
    text-underline-offset: 0.15em;
}

    a:hover {
        color: var(--text);
    }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

p {
    margin-bottom: 1rem;
}

.text-muted-sin {
    color: var(--text-muted);
}

.small-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---------- Icon-Kreis (weiße Icons auf Akzentfarbe) ---------- */
.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

    .icon-circle img {
        width: 58%;
        height: 58%;
        object-fit: contain;
    }

.icon-circle-lg {
    width: 4.5rem;
    height: 4.5rem;
}

/* ---------- Inhaltsblöcke ---------- */
.content-section {
    margin-bottom: 2rem;
    padding: 1.75rem 2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    scroll-margin-top: calc(var(--kopf-hoehe) + 0.75rem); /* Platz für den oben stehenden Kopfbereich */
}

    .content-section > h2 {
        position: relative;
        margin: 0 0 1.25rem;
        padding-bottom: 0.6rem;
        font-size: 1.55rem;
        font-weight: 700;
    }

        .content-section > h2::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 3.5rem;
            height: 4px;
            border-radius: 2px;
            background: var(--accent);
        }

    .content-section h3 {
        margin: 1.5rem 0 0.6rem;
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--accent);
    }

    .content-section > :last-child {
        margin-bottom: 0;
    }

@media (max-width: 576px) {
    .content-section {
        padding: 1.25rem 1.1rem;
    }
}

/* Hervorgehobener Kasten in Akzentfarbe */
.highlight-box {
    margin: 1.25rem 0;
    padding: 1.1rem 1.35rem;
    border-left: 5px solid var(--accent);
    border-radius: 0 10px 10px 0;
    background: var(--accent-soft);
    font-weight: 600;
}

    .highlight-box > :last-child {
        margin-bottom: 0;
    }

/* Sprungmarken-Navigation innerhalb einer Seite */
.page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

    .page-nav a {
        padding: 0.35rem 1rem;
        border: 1px solid var(--accent-line);
        border-radius: 999px;
        background: #fff;
        color: var(--accent);
        font-weight: 600;
        text-decoration: none;
    }

        .page-nav a:hover, .page-nav a:focus-visible {
            background: var(--accent-soft);
        }

/* Schlagwörter / Chips */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

    .chip-list li {
        padding: 0.3rem 0.9rem;
        border: 1px solid var(--accent-line);
        border-radius: 999px;
        background: var(--accent-soft);
        color: var(--accent);
        font-weight: 600;
        font-size: 0.95rem;
    }

/* Kennzahlen-Leiste */
.fact-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.fact {
    padding: 1rem 1.25rem;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius);
    background: var(--accent-soft);
    text-align: center;
}

.fact-value {
    display: block;
    color: var(--accent);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.fact-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Karten-Raster */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.info-card {
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--accent-line);
    border-top: 5px solid var(--accent);
    border-radius: 10px;
    background: #fff;
}

    .info-card h3 {
        margin: 0 0 0.5rem;
        font-size: 1.1rem;
        color: var(--accent);
    }

    .info-card p:last-child {
        margin-bottom: 0;
    }

/* ---------- Buttons ---------- */
.btn-accent, .btn-accent-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-accent {
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
}

    .btn-accent:hover, .btn-accent:focus-visible {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    }

.btn-accent-outline {
    border: 2px solid var(--accent);
    background: #fff;
    color: var(--accent);
}

    .btn-accent-outline:hover, .btn-accent-outline:focus-visible {
        background: var(--accent-soft);
        color: var(--accent);
    }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ---------- Zeitstrahl (Geschichte) ---------- */
.timeline {
    position: relative;
    margin: 1.5rem 0 0;
    padding: 0 0 0 1.75rem;
    list-style: none;
}

    .timeline::before {
        content: "";
        position: absolute;
        left: 0.45rem;
        top: 0.4rem;
        bottom: 0.4rem;
        width: 3px;
        background: var(--accent-line);
    }

    .timeline li {
        position: relative;
        margin-bottom: 1rem;
    }

        .timeline li::before {
            content: "";
            position: absolute;
            left: -1.75rem;
            top: 0.35rem;
            width: 1.2rem;
            height: 1.2rem;
            border: 3px solid var(--accent);
            border-radius: 50%;
            background: #fff;
        }

        .timeline li:last-child::before {
            background: var(--accent);
        }

.timeline-year {
    display: inline-block;
    min-width: 4.5rem;
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Organigramm ---------- */
.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.org-level {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

    .org-level + .org-level::before {
        content: "";
        position: absolute;
        top: -1.5rem;
        left: 50%;
        width: 2px;
        height: 1.5rem;
        background: var(--accent-line);
    }

.org-box {
    flex: 0 1 220px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--accent-line);
    border-top: 5px solid var(--accent);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    box-shadow: var(--shadow);
}

.org-box-main {
    background: var(--accent);
    color: #fff;
}

    .org-box-main .org-role, .org-box-main .org-name {
        color: #fff;
    }

.org-role {
    display: block;
    color: var(--accent);
    font-weight: 700;
}

.org-name {
    display: block;
    color: var(--text);
}

.org-vacant {
    color: var(--text-muted);
    font-style: italic;
}

/* Arbeitskreise Stadtseniorenrat */
.ak-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.ak-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.ak-title {
    padding: 0.6rem 0.9rem;
    color: #fff;
    font-weight: 700;
}

.ak-body {
    padding: 0.75rem 0.9rem;
}

    .ak-body ul {
        margin: 0.25rem 0 0.4rem;
        padding-left: 1.1rem;
    }

.ak-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------- Termine ---------- */
.termin-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.termin {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

    .termin:last-child {
        border-bottom: none;
    }

.termin-datum {
    flex-shrink: 0;
    width: 5rem;
    padding: 0.4rem 0;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    text-align: center;
    line-height: 1.15;
}

    .termin-datum .tag {
        display: block;
        font-size: 1.6rem;
        font-weight: 700;
    }

    .termin-datum .monat {
        display: block;
        font-size: 0.85rem;
        text-transform: uppercase;
    }

.termin-thema {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    white-space: pre-line;
}

.termin-thema-area {
    min-height: 105px;
    resize: vertical;
    line-height: 1.5;
    white-space: pre-wrap;
}

.termin-meta {
    margin: 0;
    color: var(--text-muted);
}

.empty-state {
    padding: 1.25rem 1.35rem;
    border: 2px dashed var(--accent-line);
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--text-muted);
}

/* =========================================================
   Bilder in Inhalten & automatische Layout-Anpassung
   ========================================================= */
.section-mit-bild {
    margin: 1.25rem 0 1.5rem;
    width: 100%;
}

.section-mit-bild figure {
    margin: 0;
}

.section-mit-bild .content-bild {
    display: block;
    width: 100%;
    border-radius: 12px;
    border: 1.5px solid var(--accent-line);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    background-color: var(--card-bg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.section-mit-bild .content-bild:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.section-mit-bild.bild-oben .bild-aufmacher {
    margin-bottom: 1.25rem;
    max-width: 100%;
}

.section-mit-bild.bild-oben .content-bild {
    max-height: 420px;
    object-fit: cover;
}

.section-mit-bild.bild-rechts,
.section-mit-bild.bild-links {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
}

.section-mit-bild.bild-rechts .text-spalte,
.section-mit-bild.bild-links .text-spalte {
    flex: 1 1 58%;
    min-width: 0;
}

.section-mit-bild.bild-rechts .bild-spalte,
.section-mit-bild.bild-links .bild-spalte {
    flex: 0 0 38%;
    max-width: 38%;
}

.section-mit-bild.bild-rechts .content-bild,
.section-mit-bild.bild-links .content-bild {
    max-height: 340px;
    object-fit: cover;
}

.bild-unterschrift {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.35;
    text-align: center;
}

.info-card .section-mit-bild {
    display: flex;
    flex-direction: column !important;
    margin: 0.5rem 0;
}

.info-card .section-mit-bild .bild-spalte {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    order: -1;
    margin-bottom: 0.75rem;
}

/* Responsiver Breakpoint für Bilder (Mobil / Tablet) */
@media (max-width: 820px) {
    .section-mit-bild.bild-rechts,
    .section-mit-bild.bild-links {
        flex-direction: column;
        gap: 1.15rem;
    }

    .section-mit-bild.bild-rechts .bild-spalte,
    .section-mit-bild.bild-links .bild-spalte {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        order: -1; /* Auf dem Smartphone das Bild über dem Text anzeigen */
    }

    .section-mit-bild.bild-rechts .text-spalte,
    .section-mit-bild.bild-links .text-spalte {
        flex: 1 1 100%;
        width: 100%;
    }

    .section-mit-bild .content-bild {
        max-height: 280px;
    }
}

/* ---------- Downloads ---------- */
.download-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.download {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--accent-line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

    .download:hover, .download:focus-visible {
        background: var(--accent-soft);
        color: var(--text);
    }

.download-badge {
    flex-shrink: 0;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.download-title {
    display: block;
    font-weight: 700;
}

.download-desc {
    display: block;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ---------- Adress- / Definitionslisten ---------- */
.kv-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1.25rem;
    margin: 0 0 1rem;
}

    .kv-list dt {
        font-weight: 700;
    }

    .kv-list dd {
        margin: 0;
    }

@media (max-width: 576px) {
    .kv-list {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

        .kv-list dd {
            margin-bottom: 0.6rem;
        }
}

/* Externe Links */
.link-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

    .link-list li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--line);
    }

        .link-list li:last-child {
            border-bottom: none;
        }

    .link-list a {
        font-weight: 700;
    }

/* ---------- Schritte (Mitglied werden) ---------- */
.steps {
    counter-reset: schritt;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

    .steps li {
        position: relative;
        margin-bottom: 0.9rem;
        padding-left: 3rem;
        min-height: 2.2rem;
    }

        .steps li::before {
            counter-increment: schritt;
            content: counter(schritt);
            position: absolute;
            left: 0;
            top: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.1rem;
            height: 2.1rem;
            border-radius: 50%;
            background: var(--accent);
            color: #fff;
            font-weight: 700;
        }

    .steps li p {
        margin: 0;
    }

    .steps.edit-mode li {
        min-height: 3.2rem;
        margin-bottom: 1.25rem;
    }

    .steps.edit-mode li .edit-block {
        margin: 0;
    }

    .steps.edit-mode li .edit-text {
        min-height: 48px;
    }

/* ---------- Beiträge ---------- */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.price-card {
    padding: 1.25rem;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
    text-align: center;
}

.price {
    display: block;
    color: var(--accent);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.2;
}

.price-label {
    color: var(--text-muted);
}

/* Vorstand Stadtseniorenrat: kompakte Kästen */
.stsr-vorstand .org-box {
    flex: 1 1 170px;
    max-width: 210px;
}

/* =========================================================
   Admin-Bereich
   ========================================================= */
.admin-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--accent-line);
    border-left: 8px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

    .admin-hero h1 {
        margin: 0;
        color: var(--accent);
        font-size: clamp(1.6rem, 3.2vw, 2.2rem);
        font-weight: 700;
    }

.admin-kicker {
    margin: 0 0 0.2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-subtitle {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
}

/* Auswahl-Kacheln */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--accent-line);
    border-left: 6px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

    .admin-tile:hover, .admin-tile:focus-visible {
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
        background: #fff;
        color: var(--text);
    }

.admin-tile-text {
    display: flex;
    flex-direction: column;
}

.admin-tile-title {
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.admin-tile-status {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Meldungen */
.admin-meldung {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    width: fit-content;
    min-width: min(340px, 92vw);
    max-width: min(640px, 96vw);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.93rem;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.admin-meldung-ok {
    border: 1px solid #86efac;
    background: #f0fdf4;
    color: #15803d;
    box-shadow: 0 4px 14px rgba(22, 101, 52, 0.08);
}

.admin-meldung-ok > span::before {
    content: "✓ ";
    font-weight: 800;
    margin-right: 0.35rem;
    color: #16a34a;
}

.admin-meldung-fehler {
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.08);
}

.admin-meldung-fehler > span::before {
    content: "⚠ ";
    font-weight: 800;
    margin-right: 0.35rem;
    color: #dc2626;
}

.admin-meldung .btn-mini {
    margin-left: 0;
    padding: 0;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: currentColor;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.admin-meldung .btn-mini:hover,
.admin-meldung .btn-mini:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.12);
    transform: scale(1.08);
}

/* Formulare */
.form-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem 1.25rem;
    margin-bottom: 0.5rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.form-field .form-control {
    font-size: 1rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
}

    .form-field .form-control:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 0.2rem var(--accent-line);
    }

.form-field-wide {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 220px 1fr 1fr;
    }

    .form-field-wide {
        grid-column: auto;
    }
}

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

.validation-message {
    margin-top: 0.25rem;
    color: #be123c;
    font-size: 0.9rem;
}

.invalid {
    border-color: #be123c !important;
}

/* Tabelle */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table th {
        padding: 0.6rem 0.75rem;
        border-bottom: 2px solid var(--accent-line);
        color: var(--text-muted);
        font-size: 0.85rem;
        text-align: left;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .admin-table td {
        padding: 0.7rem 0.75rem;
        border-bottom: 1px solid var(--line);
        vertical-align: middle;
    }

    .admin-table tr.is-past td {
        color: var(--text-muted);
    }

    .admin-table tr.is-editing td {
        background: var(--accent-soft);
    }

.badge-past {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 600;
}

.confirm-text {
    margin-right: 0.4rem;
    font-weight: 700;
    color: #9f1239;
}

.btn-mini {
    margin-left: 0.3rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: #fff;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

    .btn-mini:hover, .btn-mini:focus-visible {
        background: var(--accent-soft);
    }

.btn-mini-danger {
    border-color: #f4c2ce;
    color: #be123c;
}

    .btn-mini-danger:hover, .btn-mini-danger:focus-visible {
        background: #fdecf0;
    }

.btn-accent:disabled, .btn-accent-outline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Organigramm im Bearbeitungsmodus */
.org-chart-edit .org-box {
    flex: 0 1 260px;
    text-align: left;
}

.org-role-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.org-role-input {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    border: 1px solid var(--accent-line);
    background: #fff;
    width: 100%;
    margin-bottom: 0.35rem;
    transition: all 0.15s ease;
}

.org-role-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem var(--accent-line);
}

.org-box-lead {
    background: var(--accent-soft);
    border-top-width: 6px;
}

.org-input {
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
}

    .org-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 0.2rem var(--accent-line);
    }

    .org-input::placeholder {
        color: #9ca3af;
        font-style: italic;
    }

.org-box.is-changed {
    border-color: #f59e0b;
    border-top-color: #f59e0b;
    background: #fffbeb;
}

.org-changed-hint {
    display: inline-block;
    margin-top: 0.35rem;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Textbausteine bearbeiten */
.text-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.text-edit-card {
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--accent-line);
    border-top: 5px solid var(--accent);
    border-radius: 10px;
    background: #fff;
}

    .text-edit-card.is-changed {
        border-color: #f59e0b;
        border-top-color: #f59e0b;
        background: #fffbeb;
    }

    .text-edit-card .form-control {
        font-size: 1rem;
        border-radius: 8px;
    }

.text-edit-area {
    min-height: 9rem;
    line-height: 1.55;
    resize: vertical;
}

.form-label-strong {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

/* Dokument (Satzung) */
.doc-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--accent-line);
    border-radius: 10px;
    background: var(--accent-soft);
}

.upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

    .upload-row .form-control {
        flex: 1 1 280px;
        border-radius: 8px;
    }

.form-grid-2 {
    grid-template-columns: 1fr 1fr !important;
}

@media (max-width: 640px) {
    .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* Meldung bleibt beim Scrollen sichtbar */
.admin-meldung-sticky {
    position: sticky;
    top: calc(var(--kopf-hoehe) + 0.75rem); /* unter dem stehenden Kopfbereich */
    z-index: 1000;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: meldungToastSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes meldungToastSlide {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-grid-1 {
    grid-template-columns: minmax(0, 480px) !important;
}

/* Listen bearbeiten (Beiträge usw.) */
.list-edit {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.list-edit-head,
.list-edit-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(180px, 2fr) auto;
    gap: 0.6rem;
    align-items: center;
}

.list-edit-head {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.list-edit-row .form-control {
    font-size: 1rem;
    border-radius: 8px;
}

.list-edit-actions {
    white-space: nowrap;
}

.btn-mini:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .list-edit-head {
        display: none;
    }

    .list-edit-row {
        grid-template-columns: 1fr;
        padding-bottom: 0.6rem;
        border-bottom: 1px solid var(--line);
    }
}

/* =========================================================
   Admin: Bearbeiten im Aussehen der Homepage („wysiwyg“)
   ========================================================= */
.edit-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.legend-swatch {
    display: inline-block;
    width: 1.4rem;
    height: 0.9rem;
    margin-right: 0.3rem;
    vertical-align: -0.1rem;
    border: 2px dashed var(--accent-line);
    border-radius: 4px;
    background: #fff;
}

    .legend-swatch.legend-changed {
        border: 2px solid #f59e0b;
        background: #fffbeb;
    }

/* Eingabefelder, die wie normaler Text aussehen */
.edit-inline {
    display: block;
    width: 100%;
    padding: 0.2rem 0.45rem;
    border: 2px dashed var(--accent-line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.75);
    color: inherit;
    font: inherit;
    line-height: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

    .edit-inline:hover {
        border-color: var(--accent);
    }

    .edit-inline:focus {
        outline: none;
        border-style: solid;
        border-color: var(--accent);
        background: #fff;
        box-shadow: 0 0 0 3px var(--accent-soft);
    }

    .edit-inline::placeholder {
        color: #a3a9b3;
        font-style: italic;
    }

.edit-heading {
    margin: 0 0 0.75rem;
    font-weight: 700;
    color: var(--text);
}

.edit-h2 {
    font-size: 1.55rem;
}

.edit-h3 {
    margin-top: 1.25rem;
    font-size: 1.2rem;
    color: var(--accent);
}

.edit-text {
    resize: vertical;
    min-height: 3.2rem;
}

.highlight-box .edit-text {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.55);
}

/* Block mit Speichern-Leiste */
.edit-block {
    position: relative;
    margin: 0 -0.6rem 0.9rem;
    padding: 0.5rem 0.6rem 0.35rem;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .edit-block.is-changed {
        border-color: #f59e0b;
        background: #fffbeb;
    }

    .edit-block .highlight-box {
        margin: 0.25rem 0 0;
    }

.edit-block-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.9rem;
    margin-top: 0.3rem;
}

    .edit-block-bar .btn-mini {
        margin-left: 0;
    }

.edit-hint {
    color: #9aa1ab;
    font-size: 0.8rem;
}

.edit-group {
    margin-bottom: 1.5rem;
}

.edit-group-label {
    margin: 0 0 0.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Kennzahlen */
.fact-edit {
    position: relative;
    padding-bottom: 2.4rem;
}

    .fact-edit .edit-inline {
        text-align: center;
        margin-bottom: 0.3rem;
    }

    .fact-edit .fact-value {
        color: var(--accent);
        font-size: 1.4rem;
        font-weight: 700;
    }

    .fact-edit .fact-label {
        color: var(--text-muted);
        font-size: 0.95rem;
    }

    .fact-edit .list-edit-actions {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0.5rem;
        text-align: center;
    }

/* Schlagwörter */
.chip-list.edit-mode li.chip-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.35rem 0.2rem 0.4rem;
}

    .chip-list.edit-mode li.chip-edit .edit-inline {
        width: auto;
        padding: 0.1rem 0.35rem;
        border-width: 1px;
        color: var(--accent);
        font-weight: 600;
    }

    .chip-list.edit-mode li.chip-edit .btn-mini {
        margin-left: 0.1rem;
        padding: 0.05rem 0.4rem;
        font-size: 0.75rem;
    }

/* Zeitstrahl */
.timeline.edit-mode .timeline-edit {
    display: grid;
    grid-template-columns: 6.5rem 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

    .timeline.edit-mode .timeline-edit .timeline-year {
        color: var(--accent);
        font-weight: 700;
    }

@media (max-width: 640px) {
    .timeline.edit-mode .timeline-edit {
        grid-template-columns: 1fr;
    }
}

/* Arbeitskreise */
.ak-title-edit {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.ak-name-input {
    border-color: rgba(255, 255, 255, 0.6) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    font-weight: 700;
}

    .ak-name-input:focus {
        background: rgba(0, 0, 0, 0.15) !important;
        box-shadow: none !important;
    }

.ak-color-input {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.ak-namen {
    margin: 0.3rem 0 0.4rem;
    line-height: 1.5;
    resize: vertical;
}

.org-box.is-changed .org-input {
    border-color: #f59e0b;
}

/* Werkzeugleiste unter Textfeldern */
.edit-block-bar {
    flex-wrap: wrap;
    justify-content: space-between;
}

.edit-tools {
    display: inline-flex;
    gap: 0.35rem;
}

.edit-tool {
    padding: 0.2rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

    .edit-tool:hover, .edit-tool:focus-visible, .edit-tool.active {
        border-color: var(--accent);
        color: var(--accent);
        background: var(--accent-soft);
    }

/* Admin Bildzuweisung im TextBlockEditor */
.edit-bild-kasten {
    margin-top: 0.65rem;
    padding: 0.75rem 0.95rem;
    border-radius: 9px;
    background: #f8fafc;
    border: 1.5px solid var(--accent-line);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.edit-bild-kasten.is-inaktiv {
    background: #fafafa;
    border-color: #e2e8f0;
    opacity: 0.95;
}

.edit-bild-inaktiv-box {
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.45;
}

.badge-status-ok {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #e6f4ea;
    color: #137333;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-status-inaktiv {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 0.78rem;
    font-weight: 600;
}

.btn-mini-success {
    background: #1e7e34 !important;
    color: #fff !important;
    border-color: #1e7e34 !important;
}

.btn-mini-success:hover {
    background: #155724 !important;
    border-color: #155724 !important;
}

.edit-bild-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.88rem;
}

.edit-bild-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.edit-bild-vorschau {
    width: 80px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.edit-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-mini-save {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

    .btn-mini-save:hover, .btn-mini-save:focus-visible {
        background: var(--accent);
        color: #fff;
        filter: brightness(1.1);
    }

.edit-hint {
    color: #6b7280;
    font-size: 0.85rem;
}

.ak-zusatz {
    padding: 0.1rem 0.4rem;
    border-width: 1px;
}

/* Feste, nicht bearbeitbare Elemente im Admin */
.edit-fixed {
    opacity: 0.55;
    pointer-events: none;
}

/* =========================================================
   Einheitliche Speichern-Anzeige (Komponente SpeichernLeiste)
   ========================================================= */
.save-bar {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.save-state {
    font-size: 0.9rem;
    font-weight: 700;
}

.save-done {
    color: #6b7280;
    font-weight: 600;
}

.save-pending {
    color: #b45309;
}

.save-busy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #6b7280;
}

.save-spinner {
    width: 0.95rem;
    height: 0.95rem;
    border: 2px solid #d1d5db;
    border-top-color: #b45309;
    border-radius: 50%;
    animation: save-dreh 0.8s linear infinite;
}

@keyframes save-dreh {
    to { transform: rotate(360deg); }
}

/* Auffälliger Knopf: hier muss noch gespeichert werden */
.btn-save-pending {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.3rem;
    border: 2px solid #b45309;
    border-radius: 999px;
    background: #d97706;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.55);
    animation: save-puls 1.8s ease-out infinite;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

    .btn-save-pending:hover, .btn-save-pending:focus-visible {
        background: #b45309;
        transform: translateY(-1px);
    }

    .btn-save-pending:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        animation: none;
        transform: none;
    }

.save-icon {
    width: 1.05rem;
    height: 1.05rem;
}

@keyframes save-puls {
    0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(217, 119, 6, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .btn-save-pending, .save-spinner {
        animation: none;
    }
}

.btn-discard {
    padding: 0.4rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

    .btn-discard:hover, .btn-discard:focus-visible {
        border-color: #9ca3af;
        background: #f3f4f6;
    }

.save-sperrgrund {
    flex-basis: 100%;
    color: #9f1239;
    font-size: 0.85rem;
}

/* kompakte Variante (unter Textfeldern) */
.save-bar-kompakt .btn-save-pending {
    padding: 0.3rem 0.95rem;
    font-size: 0.9rem;
}

.save-bar-kompakt .btn-discard {
    padding: 0.25rem 0.8rem;
    font-size: 0.85rem;
}

.save-bar-kompakt .save-state {
    font-size: 0.85rem;
}

/* ---------- Ladeanzeige ---------- */
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-top: 15vh;
}

    .app-loading img {
        width: 260px;
        max-width: 70vw;
        height: auto;
    }

.loading-progress {
    position: relative;
    display: block;
    width: 5rem;
    height: 5rem;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.5rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--sin-rot);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    margin-top: -1rem;
    font-weight: 600;
    color: var(--text-muted);
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Wird geladen");
    }

/* ---------- Fehleranzeige (Blazor) ---------- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1.25rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Es ist ein Fehler aufgetreten.";
    }

/* Hinweis/Speichern-Leiste immer rechts, auch ohne Formatier-Knöpfe */
.edit-block-bar > :last-child { margin-left: auto; }

/* Admin: Kachel „Allgemeine Daten / Downloads“ über die ganze Breite */
.admin-tile-wide { grid-column: 1 / -1; }

/* Admin Allgemein: ein Kasten je Download */
.download-edit-card {
    border: 1px solid var(--accent-line);
    border-left: 6px solid var(--accent);
    border-radius: 12px;
    padding: 1rem 1.25rem 1.25rem;
    margin-bottom: 1.5rem;
    background: #fff;
}
.download-edit-card > h3 { margin-top: 0; color: var(--accent); }

/* Admin Mitmachen: Beitragskästen und Info-Karten im Seitenlook */
.price-edit {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
    .price-edit .edit-inline { text-align: center; }
    .price-edit .edit-inline.price { color: var(--accent); font-size: 1.9rem; font-weight: 800; }
    .price-edit .edit-inline.price-label { color: var(--text-muted); font-size: 1rem; }
    .price-edit .list-edit-actions { text-align: center; }

.card-edit {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
    .card-edit .card-edit-title {
        color: var(--accent);
        font-size: 1.1rem;
        font-weight: 700;
    }
    .card-edit .list-edit-actions { text-align: right; }

/* Admin: Werte, die an anderer Stelle gepflegt werden (nur Anzeige) */
.edit-zentral {
    margin: 0.25rem 0 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #f1f3f5;
    color: var(--text-muted);
}
    .edit-zentral .kv-list dd { color: var(--text-muted); }
.edit-zentral-link {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.legend-swatch.legend-zentral {
    border: none;
    background: #e5e7eb;
}

/* Kleiner grauer Hinweistext (TextBlockEditor Stil="notiz") */
.edit-notiz .edit-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    min-height: 2.4rem;
}

/* Admin: Linkliste */
.link-list.edit-mode .link-edit {
    display: grid;
    gap: 0.35rem;
}
    .link-edit .link-edit-title {
        color: var(--accent);
        font-weight: 700;
    }
    .link-edit .link-edit-text { color: var(--text-muted); }
    .link-edit .link-edit-url {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
        font-size: 0.85rem;
        color: var(--text-muted);
    }
        .link-edit .link-edit-url span { white-space: nowrap; }
        .link-edit .link-edit-url .edit-inline { font-size: 0.85rem; }
    .link-edit .list-edit-actions { text-align: right; }

/* Admin: gelber Hinweis (z. B. Rechtstexte) */
.admin-meldung-hinweis {
    border: 1px solid #f3d38a;
    background: #fffbeb;
    color: #78350f;
}

/* Admin-Anmeldung */
.login-box { max-width: 520px; margin-left: auto; margin-right: auto; }
.password-row { display: flex; gap: 0.5rem; align-items: center; }
    .password-row .form-control { flex: 1; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .form-grid-3 { grid-template-columns: 1fr; } }

/* =========================================================
   Startseite (vorher Home.razor.css – global, damit Admin sie nutzt)
   ========================================================= */
/* ---------- Aufmacher ---------- */
.home-hero {
    max-width: 820px;
    margin: 0 auto 2.25rem;
    text-align: center;
}

.home-kicker {
    margin-bottom: 0.5rem;
    color: var(--sin-rot);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    font-weight: 800;
}

.home-lead {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ---------- Kacheln 2 × 3 ---------- */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.nav-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.5rem 1.5rem 1.25rem;
    border: 1px solid var(--accent-line);
    border-top: 6px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

    .nav-tile:hover, .nav-tile:focus-visible {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        background: #fff;
        color: var(--text);
    }

.tile-title {
    margin-top: 0.4rem;
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
}

.tile-text {
    flex: 1;
    color: var(--text-muted);
    font-size: 1rem;
}

.tile-more {
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Info-Bereich ---------- */
.home-info {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* ---------- Mitmach-Aufruf ---------- */
.home-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border: 1px solid var(--accent-line);
    border-left: 8px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

    .home-cta > div {
        flex: 1;
    }

    .home-cta h2 {
        margin: 0 0 0.35rem;
        color: var(--accent);
        font-size: 1.5rem;
        font-weight: 700;
    }

    .home-cta p {
        margin: 0;
    }

@media (max-width: 900px) {
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-info {
        grid-template-columns: 1fr;
    }
}

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

    .home-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.35rem;
    }
}

/* Admin Startseite */
.theme-start { --accent: #b5123a; --accent-soft: #fdf0f3; --accent-line: #f1c4cf; }
.edit-kicker {
    margin: 0 auto 0.5rem;
    color: var(--sin-rot);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}
.edit-h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    text-align: center;
}
.home-hero .edit-text { text-align: center; color: var(--text-muted); font-size: 1.15rem; }
.nav-tile.tile-edit { cursor: default; }
    .nav-tile.tile-edit:hover { transform: none; }
    .nav-tile.tile-edit .edit-block { width: calc(100% + 1.2rem); margin-bottom: 0; }
    .nav-tile.tile-edit .edit-text { font-size: 0.95rem; color: var(--text-muted); }
.edit-fest {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* Admin Startseite: Kachel-Beschriftung und Farbe */
.edit-kachel {
    margin: 0.3rem 0 0.4rem;
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 700;
}
.farb-zeile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.35rem 0.5rem;
    border: 1px dashed var(--accent-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}
    .farb-zeile.is-changed { border: 2px solid #f59e0b; background: #fffbeb; }
    .farb-zeile label { margin: 0; font-weight: 600; }
    .farb-zeile code { color: var(--text-muted); }
    .farb-zeile .btn-mini { margin-left: auto; }
.farb-waehler {
    width: 2.6rem;
    height: 1.9rem;
    padding: 0;
    border: 1px solid #c9c9c9;
    border-radius: 6px;
    background: none;
    cursor: pointer;
}

.farb-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
    .farb-panel-rechts { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.btn-klein { padding: 0.3rem 0.8rem; font-size: 0.9rem; }
.farb-speichern { width: 100%; }
.farb-speichern .save-bar { flex-wrap: wrap; }

/* Admin: einheitlicher Seitenabschluss (AdminFuss) */
.admin-fuss {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 2px solid var(--accent-line, #e3e5e8);
}
    .admin-fuss-rechts {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-left: auto;
    }

/* =========================================================
   „Homepage im Aufbau“ (Sichtschutz mit PIN)
   ========================================================= */
.aufbau-laden {
    display: grid;
    place-items: center;
    min-height: 100vh;
}
    .aufbau-laden img { width: 120px; opacity: 0.6; }

.aufbau {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    background: radial-gradient(circle at 20% 10%, #fdf0f3 0, transparent 45%),
                radial-gradient(circle at 85% 90%, #eaf2fb 0, transparent 45%),
                var(--bg);
}

.aufbau-karte {
    position: relative;
    width: 100%;
    max-width: 560px;
    overflow: hidden;
    padding: 2.75rem 2rem 1.75rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-hover);
    text-align: center;
}

/* Baustellen-Band oben */
.aufbau-band {
    position: absolute;
    inset: 0 0 auto 0;
    height: 12px;
    background: repeating-linear-gradient(-45deg, #f2b705 0 14px, #2b2b2b 14px 28px);
}

.aufbau-logo {
    width: 140px;
    max-width: 50%;
    margin-bottom: 1rem;
}

.aufbau-kicker {
    margin-bottom: 0.35rem;
    color: var(--sin-rot);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.aufbau h1 {
    margin: 0 0 0.9rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
}

.aufbau-text {
    margin: 0 auto 1.75rem;
    max-width: 440px;
    color: var(--text-muted);
}

.aufbau-form {
    padding: 1.1rem 1rem 0.9rem;
    border: 1px dashed #d8dbe0;
    border-radius: 12px;
    background: #fafaf8;
}
    .aufbau-form label {
        display: block;
        margin-bottom: 0.55rem;
        color: var(--text-muted);
        font-size: 0.9rem;
        font-weight: 600;
    }

.aufbau-eingabe {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}
    .aufbau-eingabe .form-control {
        max-width: 150px;
        font-size: 1.15rem;
        letter-spacing: 0.3em;
        text-align: center;
    }

.aufbau-knopf {
    padding: 0.5rem 1.1rem;
    border: 2px solid var(--sin-rot);
    border-radius: 999px;
    background: var(--sin-rot);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}
    .aufbau-knopf:disabled { opacity: 0.55; }
    .aufbau-knopf:not(:disabled):hover { background: #fff; color: var(--sin-rot); }

.aufbau-fehler {
    margin: 0.6rem 0 0;
    color: #b91c1c;
    font-weight: 600;
}

.aufbau-fuss {
    margin: 1.5rem 0 0;
    color: #9aa1ab;
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .aufbau-eingabe { flex-direction: column; align-items: center; }
}

/* Admin: Schalter „Homepage im Aufbau“ */
.aufbau-schalter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 2rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 2px solid #e3e5e8;
    background: #fafaf8;
}
    .aufbau-schalter.ist-an { border-color: #f2b705; background: #fffbeb; }
    .aufbau-schalter.ist-aus { border-color: #86efac; background: #f0fdf4; }
.aufbau-pin-feld { min-width: 160px; margin: 0; }
.schalter {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    cursor: pointer;
    font-weight: 700;
}
    .schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter-bahn {
    position: relative;
    flex: none;
    width: 3.2rem;
    height: 1.8rem;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.15s ease;
}
    .schalter-bahn::after {
        content: "";
        position: absolute;
        top: 0.2rem;
        left: 0.2rem;
        width: 1.4rem;
        height: 1.4rem;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
        transition: transform 0.15s ease;
    }
.schalter input:checked + .schalter-bahn { background: #d97706; }
    .schalter input:checked + .schalter-bahn::after { transform: translateX(1.4rem); }
.schalter input:focus-visible + .schalter-bahn { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Hinweis auf den Ersteller (Admin-Übersicht) */
.ersteller-admin {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    align-items: baseline;
    margin-top: 1.5rem;
    padding: 0.8rem 1.1rem;
    border: 1px dashed #d8dbe0;
    border-radius: 10px;
    background: #fafaf8;
    color: var(--text-muted);
    font-size: 0.9rem;
}
    .ersteller-admin strong { color: var(--text); }

/* Höhe des stehenden Kopfbereichs (Banner + Navigationsleiste + 4 px Linie; mobil kompakter mit Burger-Menü)
   – damit Sprungziele (#anker) und Admin-Meldungen nicht dahinter verschwinden */
:root { --kopf-hoehe: calc(clamp(70px, 10vw, 120px) + 1rem + 4px + 44px); }
@media (max-width: 820px) { :root { --kopf-hoehe: 80px; } }
@media (max-width: 640px) { :root { --kopf-hoehe: 80px; } }
html { scroll-padding-top: calc(var(--kopf-hoehe) + 0.75rem); }

/* =========================================================
   Hauptnavigation unter dem Header (Edles Rahmendesign)
   ========================================================= */
.site-nav {
    background-color: #fafaf8;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
    padding: 0.4rem 0.75rem 0.5rem;
}

.site-nav .nav-frame,
.site-nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap; /* Garantiert alles in EINER einzigen Zeile auf Desktop */
    gap: clamp(0.2rem, 0.45vw, 0.45rem);
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.35rem 0.45rem;
    background: #ffffff;
    border: 1.5px solid #d5d9e0;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.site-nav .nav-frame::-webkit-scrollbar,
.site-nav .nav-inner::-webkit-scrollbar {
    display: none;
}

.site-nav .nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0; /* Verteilt alle 7 Buttons gleichmäßig und verhindert Umbruch */
    min-width: 0;
    gap: clamp(0.22rem, 0.4vw, 0.42rem);
    padding: 0.42rem clamp(0.32rem, 0.5vw, 0.7rem);
    border-radius: 8px;
    /* Angenehme, einheitliche und edle Hintergrundfarbe */
    background: #2a2f35;
    background: linear-gradient(180deg, #323840 0%, #24282e 100%);
    border: 1.5px solid #48515c;
    color: #ffffff !important;
    font-size: clamp(0.76rem, 0.84vw, 0.88rem);
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 1.3;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 3px rgba(0, 0, 0, 0.16);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-sizing: border-box;
}

.site-nav .nav-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(1rem, 1.1vw, 1.15rem);
    height: clamp(1rem, 1.1vw, 1.15rem);
    flex-shrink: 0;
    opacity: 0.95;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav .nav-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.site-nav .nav-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-nav .nav-item-arrow {
    display: none;
}

/* Hover und Fokus: Professioneller Farbverlauf (Gradient) der jeweiligen Button-Farbe */
.site-nav .nav-item:hover,
.site-nav .nav-item:focus-visible {
    background: var(--accent) !important;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--accent) 85%, #ffffff) 0%,
        var(--accent) 55%,
        color-mix(in srgb, var(--accent) 70%, #000000) 100%
    ) !important;
    border-color: color-mix(in srgb, var(--accent) 85%, #ffffff) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent),
                inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-1.5px);
    text-decoration: none !important;
}

.site-nav .nav-item:hover .nav-item-icon,
.site-nav .nav-item:focus-visible .nav-item-icon {
    opacity: 1;
    transform: scale(1.1);
}

.site-nav .nav-item:hover .nav-item-icon img,
.site-nav .nav-item:focus-visible .nav-item-icon img {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

/* Aktiver Menüpunkt: dauerhaft edel gerahmt mit Farbverlauf */
.site-nav .nav-item.active {
    background: var(--accent) !important;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--accent) 85%, #ffffff) 0%,
        var(--accent) 55%,
        color-mix(in srgb, var(--accent) 70%, #000000) 100%
    ) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 45%, transparent),
                inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    text-decoration: none !important;
}

.site-nav .nav-item.active .nav-item-icon {
    opacity: 1;
    transform: scale(1.08);
}

@media (max-width: 820px) {
    .site-nav {
        background-color: transparent;
        padding: 0.5rem 0.65rem 0.8rem;
        border-bottom: none;
    }

    .site-nav .nav-frame,
    .site-nav .nav-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 0.65rem;
        gap: 0.4rem;
        background: #ffffff;
        border: 1.5px solid #d5d9e0;
        border-radius: 14px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    }

    .site-nav .nav-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex: 1 1 auto;
        gap: 0.85rem;
        padding: 0.65rem 0.95rem;
        border-radius: 10px;
        font-size: 0.95rem;
        font-weight: 600;
        background: #2a2f35;
        background: linear-gradient(180deg, #323840 0%, #24282e 100%);
        border: 1.5px solid #48515c;
        color: #ffffff !important;
        white-space: normal;
        transform: none !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 5px rgba(0, 0, 0, 0.15) !important;
        text-decoration: none !important;
    }

    .site-nav .nav-item-icon {
        width: 1.9rem;
        height: 1.9rem;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.1);
        padding: 0.25rem;
        box-shadow: none;
        opacity: 1;
        transition: all 0.2s ease;
    }

    .site-nav .nav-item-icon img {
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    }

    .site-nav .nav-item-arrow {
        display: inline-block;
        margin-left: auto;
        color: #cbd5e1;
        font-size: 1.25rem;
        font-weight: 300;
        line-height: 1;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    /* Auf Touch / Hover / Aktiv im Mobilmenü */
    .site-nav .nav-item:hover,
    .site-nav .nav-item:focus-visible,
    .site-nav .nav-item.active {
        background: var(--accent) !important;
        background: linear-gradient(135deg,
            color-mix(in srgb, var(--accent) 85%, #ffffff) 0%,
            var(--accent) 55%,
            color-mix(in srgb, var(--accent) 70%, #000000) 100%
        ) !important;
        border-color: #ffffff !important;
        color: #ffffff !important;
        font-weight: 700;
        text-decoration: none !important;
        box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    }

    .site-nav .nav-item:hover .nav-item-icon,
    .site-nav .nav-item:focus-visible .nav-item-icon,
    .site-nav .nav-item.active .nav-item-icon {
        background: rgba(255, 255, 255, 0.25);
    }

    .site-nav .nav-item:hover .nav-item-arrow,
    .site-nav .nav-item.active .nav-item-arrow {
        color: #ffffff;
        transform: translateX(4px);
    }
}

/* =========================================================
   Eleganter Floating Top-Button (Nach oben)
   ========================================================= */
.scroll-top-button {
    position: fixed;
    right: clamp(1.2rem, 3vw, 2.2rem);
    bottom: clamp(1.2rem, 3vw, 2.2rem);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Edle Satin-Anthrazit Grundfarbe mit feinem Rahmen */
    background: #2a2f35;
    background: linear-gradient(145deg, #353b44 0%, #202429 100%);
    border: 1.5px solid #4d5764;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.28s ease,
                background 0.22s ease,
                border-color 0.22s ease,
                box-shadow 0.22s ease;
    outline: none;
}

.scroll-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scroll-top-svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover & Fokus: Strahlender SIN-Rot Farbverlauf & Schwebung */
.scroll-top-button:hover,
.scroll-top-button:focus-visible {
    background: var(--sin-rot);
    background: linear-gradient(135deg, #d81c47 0%, var(--sin-rot) 50%, #850b28 100%);
    border-color: #ff6082;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(181, 18, 58, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: translateY(-3px) scale(1.05);
}

.scroll-top-button:hover .scroll-top-svg,
.scroll-top-button:focus-visible .scroll-top-svg {
    transform: translateY(-2px);
}

.scroll-top-button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 3px 10px rgba(181, 18, 58, 0.35);
}

@media (max-width: 576px) {
    .scroll-top-button {
        width: 42px;
        height: 42px;
        right: 1rem;
        bottom: 1.25rem;
    }

    .scroll-top-svg {
        width: 19px;
        height: 19px;
    }
}

/* =========================================================
   Fußbereich Links (Einheitliche Textfarbe für alle Links inkl. PDF & E-Mail)
   ========================================================= */
.site-footer a,
.site-footer .footer-link {
    color: #d6d8da !important;
    text-decoration: none;
    border-bottom: 1px solid rgba(214, 216, 218, 0.4);
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus,
.site-footer a:focus-visible,
.site-footer .footer-link:hover,
.site-footer .footer-link:focus,
.site-footer .footer-link:focus-visible {
    color: #ffffff !important;
    border-bottom-color: #ffffff;
}

/* =========================================================
   Admin Layout Shell & Vertikale Seitenleiste mit klickbaren Farb-Buttons
   ========================================================= */
.admin-shell {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
    background-color: #f6f8fa;
    position: relative;
}

/* Mobiler oberer Streifen (nur < 900px) */
.admin-mobile-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: #1c2025;
    border-bottom: 2px solid var(--sin-rot);
    color: #ffffff;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.admin-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2b313a;
    border: 1px solid #404956;
    color: #ffffff;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-mobile-burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 14px;
    height: 10px;
}

.admin-mobile-burger span {
    display: block;
    height: 1.8px;
    width: 100%;
    background: #ffffff;
    border-radius: 1px;
}

.admin-mobile-brand {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.03em;
}

.admin-mobile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(181, 18, 58, 0.2);
    border: 1px solid rgba(181, 18, 58, 0.4);
    color: #ff6584;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.admin-sidebar-backdrop {
    display: none;
}

/* Vertikale Seitenleiste */
.admin-sidebar {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #1c2025;
    background: linear-gradient(180deg, #22272e 0%, #191c21 100%);
    border-right: 1.5px solid #2e353e;
    color: #e2e8f0;
    z-index: 1050;
    box-shadow: 2px 0 14px rgba(0, 0, 0, 0.15);
}

.admin-sidebar-top {
    padding: 1.25rem 1.15rem 1.1rem;
    border-bottom: 1px solid #2e353e;
}

.admin-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none !important;
}

.admin-brand-logo {
    width: 44px;
    height: auto;
    border-radius: 6px;
    background: #ffffff;
    padding: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.admin-brand-info {
    display: flex;
    flex-direction: column;
}

.admin-brand-name {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.admin-brand-badge {
    align-self: flex-start;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #ff6584;
    background: rgba(181, 18, 58, 0.2);
    border: 1px solid rgba(181, 18, 58, 0.4);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

/* Navigations-Bereich mit den Buttons */
.admin-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.9rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    scrollbar-width: thin;
    scrollbar-color: #38424d transparent;
}

.admin-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.admin-sidebar-nav::-webkit-scrollbar-thumb {
    background: #38424d;
    border-radius: 3px;
}

.admin-nav-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #8b99a8;
    padding: 0.75rem 0.5rem 0.25rem;
}

/* Einzelne Bereiche als hochwertige klickbare Buttons in jeweiliger Farbe */
.admin-nav-item,
a.admin-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 9px;
    
    /* Farbverlauf in der jeweiligen Farbe des Bereichs */
    background: var(--accent);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--accent) 80%, #ffffff 20%) 0%,
        var(--accent) 55%,
        color-mix(in srgb, var(--accent) 70%, #000000 30%) 100%
    ) !important;
    
    /* Hochwertiger Kontur-Rahmen */
    border: 1.5px solid color-mix(in srgb, var(--accent) 72%, #ffffff 28%) !important;
    
    /* Weiße fette Schrift, kein Textunterstrich */
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 650;
    letter-spacing: 0.015em;
    text-decoration: none !important;
    
    /* Dreidimensionale Tiefe & edler Farbschatten */
    box-shadow: 0 3px 8px color-mix(in srgb, var(--accent) 45%, rgba(0, 0, 0, 0.45)),
                inset 0 1px 0 rgba(255, 255, 255, 0.35);
    
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-sizing: border-box;
}

/* Icon Kachel */
.admin-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.admin-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.admin-nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.admin-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Pfeil rechts als klarer Klickbarkeits-Indikator */
.admin-nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 300;
    line-height: 1;
    color: rgba(255, 255, 255, 0.7);
    margin-left: auto;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Hover-Zustand */
.admin-nav-item:hover,
.admin-nav-item:focus-visible,
a.admin-nav-item:hover,
a.admin-nav-item:focus-visible {
    border-color: #ffffff !important;
    filter: brightness(1.12);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 65%, rgba(0, 0, 0, 0.5)),
                inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
    transform: translateX(4px) translateY(-1px);
    color: #ffffff !important;
    text-decoration: none !important;
}

.admin-nav-item:hover .admin-nav-icon,
.admin-nav-item:focus-visible .admin-nav-icon {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.1);
}

.admin-nav-item:hover .admin-nav-arrow,
.admin-nav-item:focus-visible .admin-nav-arrow {
    transform: translateX(3px);
    color: #ffffff;
}

/* Klick / Gedrückt */
.admin-nav-item:active,
a.admin-nav-item:active {
    transform: translateX(2px) translateY(1px);
    filter: brightness(0.96);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--accent) 50%, rgba(0, 0, 0, 0.5)),
                inset 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Aktiver Bereich (aktuelle Seite) */
.admin-nav-item.active,
a.admin-nav-item.active {
    border-color: #ffffff !important;
    border-width: 2px !important;
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, #ffffff);
    outline-offset: 1px;
    box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 75%, transparent),
                inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    filter: brightness(1.15);
    font-weight: 700;
    transform: translateX(4px);
    color: #ffffff !important;
    text-decoration: none !important;
}

.admin-nav-item.active .admin-nav-icon {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.12);
}

.admin-nav-item.active .admin-nav-arrow {
    color: #ffffff;
    transform: translateX(3px);
}

/* Untere Funktions-Buttons */
.admin-sidebar-bottom {
    padding: 0.9rem 0.75rem 1rem;
    border-top: 1px solid #2e353e;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.admin-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.52rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid;
    width: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 4px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

.admin-btn-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.admin-btn-back {
    background: #252a31;
    border-color: #3d4653;
    color: #c5d1de !important;
}

.admin-btn-back:hover,
.admin-btn-back:focus-visible {
    background: #323944;
    border-color: #556274;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.admin-btn-home {
    background: #20242a;
    border-color: #38404c;
    color: #94a3b8 !important;
}

.admin-btn-home:hover,
.admin-btn-home:focus-visible {
    background: #2d343e;
    border-color: #4f5a6b;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.admin-btn-logout {
    background: rgba(181, 18, 58, 0.14);
    border-color: rgba(181, 18, 58, 0.45);
    color: #ff6b87 !important;
    margin-top: 0.15rem;
}

.admin-btn-logout:hover,
.admin-btn-logout:focus-visible {
    background: var(--sin-rot);
    border-color: #ff4d6d;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(181, 18, 58, 0.4);
    transform: translateY(-1px);
}

.admin-content-area {
    flex: 1;
    min-width: 0;
    padding: 2rem 2.5rem 3.5rem;
    background: #f6f8fa;
    box-sizing: border-box;
}

.admin-loading-state {
    padding: 4rem 1rem;
    text-align: center;
}

@media (max-width: 900px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-mobile-bar {
        display: flex;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: none;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .admin-sidebar-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1045;
        backdrop-filter: blur(2px);
    }

    .admin-content-area {
        padding: 1.25rem 1rem 2.5rem;
    }
}

/* =========================================================
   Mediathek / Bilder-Verwaltung im Admin-Bereich
   ========================================================= */
.mediathek-upload-box {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.mediathek-upload-box:focus-within {
    border-color: var(--sin-rot);
}

.mediathek-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.mediathek-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mediathek-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.mediathek-card.is-confirming-delete {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px #ef4444;
}

.mediathek-img-container {
    height: 180px;
    position: relative;
    background: #f8fafc;
    background-image: 
        linear-gradient(45deg, #f1f5f9 25%, transparent 25%), 
        linear-gradient(-45deg, #f1f5f9 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #f1f5f9 75%), 
        linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem;
}

.mediathek-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.mediathek-badge-id {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    backdrop-filter: blur(2px);
}

.mediathek-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.45rem;
}

.mediathek-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon-edit {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0 0.25rem;
    font-size: 0.9rem;
    line-height: 1;
}

.btn-icon-edit:hover {
    color: #0f172a;
}

.mediathek-meta {
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mediathek-filename {
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334155;
    font-weight: 600;
}

.mediathek-url-row {
    margin-top: 0.25rem;
    background: #f1f5f9;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    overflow: hidden;
}

.mediathek-url {
    font-size: 0.72rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.mediathek-card-actions {
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mediathek-delete-confirm {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    width: 100%;
}

.mediathek-badge-usage {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.mediathek-badge-usage.badge-in-use {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.mediathek-badge-usage.badge-free {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.mediathek-usage-list {
    background: #fefce8;
    border: 1px solid #fef08a;
    border-left: 3px solid #d97706;
    border-radius: 6px;
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
    color: #451a03;
}

.mediathek-usage-title {
    display: block;
    color: #92400e;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.mediathek-usage-items {
    margin: 0;
    padding-left: 1.1rem;
    max-height: 80px;
    overflow-y: auto;
}

.mediathek-usage-items li {
    line-height: 1.25;
    margin-bottom: 0.15rem;
}

.mediathek-usage-free {
    background: #f0fdf4;
    border: 1px dashed #bbf7d0;
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    color: #166534;
}

.btn-mini-disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
    cursor: not-allowed !important;
    opacity: 0.85;
}

.mediathek-upload-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 0.75rem;
}

.mediathek-upload-preview-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

/* Bildauswahl-Grid im TextBlockEditor */
.db-bilder-auswahl-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.db-bild-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem 0.35rem 0.35rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.8rem;
    color: #334155;
    transition: all 0.15s ease;
    user-select: none;
}

.db-bild-option:hover {
    border-color: var(--sin-rot);
    background: #fff5f7;
    color: var(--sin-rot);
}

.db-bild-option.is-selected {
    border-color: var(--sin-rot);
    background: #fff0f3;
    color: var(--sin-rot);
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(181, 18, 58, 0.2);
}

.db-bild-thumb {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Header- und Logo-Editor in Admin Allgemein */
.brand-image-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    height: 100%;
}

.brand-image-preview-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.85rem;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-header-preview {
    max-height: 110px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.brand-logo-preview {
    max-height: 70px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
