@charset "UTF-8";
:root {
    color-scheme: dark;
    --bg: #0b1120;
    --bg-soft: #101827;
    --panel: rgba(18, 28, 46, 0.88);
    --panel-strong: #121c2e;
    --border: rgba(148, 163, 184, 0.16);
    --text: #edf4ff;
    --muted: #8fa0b8;
    --primary: #4f8cff;
    --primary-hover: #69a0ff;
    --success: #42d392;
    --danger: #ff6b7a;
    --warning: #ffbf47;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    /* Abgeleitete Farben, von den Themes unten überschrieben */
    --accent-rgb: 79 140 255;
    --accent-text: #9fc1ff;
    --panel-rgb: 18 28 46;
    --line-rgb: 148 163 184;
    --text-soft: #c8d4e4;
    --surface-deep: #0c1422;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgb(var(--accent-rgb) / 0.14), transparent 32%),
        radial-gradient(circle at 95% 20%, rgba(66, 211, 146, 0.08), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 64px;
}

.topbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.eyebrow,
.panel-kicker {
    display: inline-block;
    color: var(--accent-text);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin: 8px 0 8px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.topbar p {
    margin-bottom: 0;
    color: var(--muted);
}

.counter-card {
    min-width: 145px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgb(var(--panel-rgb) / 0.72);
    box-shadow: var(--shadow);
}

.counter-card span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.counter-card strong {
    display: block;
    margin-top: 2px;
    font-size: 2rem;
}

.layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.55fr);
    gap: 22px;
    align-items: start;
}

.panel {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.form-panel {
    position: sticky;
    top: 24px;
}

.panel-heading {
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--border);
}

.panel-heading h2 {
    margin: 5px 0 0;
    font-size: 1.28rem;
}

.list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.location-form {
    padding: 24px;
}

label {
    display: block;
    margin-bottom: 18px;
}

label span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    border: 1px solid rgb(var(--line-rgb) / 0.22);
    border-radius: 12px;
    background: var(--surface-deep);
    color: var(--text);
    outline: none;
    transition: 0.18s ease;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    padding: 13px 14px;
}

input[type="date"] {
    color-scheme: dark;
}

input[type="search"] {
    padding: 10px 38px 10px 13px;
}

input:focus {
    border-color: rgb(var(--accent-rgb) / 0.8);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.13);
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 750;
    transition: 0.18s ease;
}

.button-primary {
    background: var(--primary);
    color: white;
}

.button-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.button-secondary {
    background: rgb(var(--line-rgb) / 0.1);
    color: var(--text-soft);
}

.search-form {
    position: relative;
    width: min(300px, 100%);
}


.location-list {
    padding: 12px;
}

.location-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: 0.18s ease;
}

.location-card + .location-card {
    margin-top: 6px;
}

.location-card:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.025);
}

.location-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
}

.location-main h3 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.location-main code {
    color: var(--muted);
    font-size: 0.84rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(66, 211, 146, 0.09);
}

.location-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.location-actions form {
    margin: 0;
}

/* Neutraler Punkt, solange es noch keine Erreichbarkeitsprüfung gibt */
.status-dot.is-unknown,
.status-dot.status-unknown {
    background: var(--muted);
    box-shadow: 0 0 0 5px rgba(100, 116, 139, 0.12);
}

.status-dot.is-bad {
    background: var(--danger);
    box-shadow: 0 0 0 5px rgba(255, 107, 122, 0.12);
}

.status-dot.is-warn {
    background: var(--warning);
    box-shadow: 0 0 0 5px rgba(255, 191, 71, 0.12);
}

.icon-button {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgb(var(--line-rgb) / 0.06);
    color: var(--text-soft);
    cursor: pointer;
    text-decoration: none;
}

.icon-button:hover {
    background: rgb(var(--line-rgb) / 0.12);
}

.icon-button.danger:hover {
    border-color: rgba(255, 107, 122, 0.35);
    background: rgba(255, 107, 122, 0.1);
    color: var(--danger);
}

.empty-state {
    padding: 60px 24px;
    text-align: center;
    color: var(--muted);
}

.empty-icon {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 2.8rem;
}

.empty-state h3 {
    margin-bottom: 6px;
    color: var(--text);
}

.notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgb(var(--panel-rgb) / 0.85);
}

.notice ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.notice-success {
    border-color: rgba(66, 211, 146, 0.25);
}

.notice-error {
    border-color: rgba(255, 107, 122, 0.3);
}

/* ---------------------------------------------------------------------------
   Version 1.1: Status, Detailseite, Journal
   --------------------------------------------------------------------------- */

.muted {
    color: var(--muted);
    font-weight: 400;
}

.hint {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.counter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 10px;
}

.counter-row .counter-card {
    min-width: 0;
}

.counter-card.is-ok strong { color: var(--success); }
.counter-card.is-bad strong { color: var(--danger); }
.counter-card.is-warn strong { color: var(--warning); }

a.location-main {
    flex: 1;
    text-decoration: none;
}

.location-text {
    min-width: 0;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgb(var(--line-rgb) / 0.08);
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge.is-ok {
    border-color: rgba(66, 211, 146, 0.3);
    background: rgba(66, 211, 146, 0.1);
    color: var(--success);
}

.badge.is-bad {
    border-color: rgba(255, 107, 122, 0.32);
    background: rgba(255, 107, 122, 0.1);
    color: var(--danger);
}

.badge.is-warn {
    border-color: rgba(255, 191, 71, 0.32);
    background: rgba(255, 191, 71, 0.1);
    color: var(--warning);
}

.badge.is-unknown,
.badge.is-neutral {
    color: var(--muted);
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

.back-link:hover {
    color: var(--text);
}

h1.with-dot {
    display: flex;
    align-items: center;
    gap: 16px;
}

h1.with-dot .status-dot {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.status-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.tile-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-tile small {
    color: var(--muted);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.8fr);
    gap: 22px;
    align-items: start;
}

.advanced {
    margin: 4px 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.advanced summary {
    cursor: pointer;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.advanced[open] summary {
    margin-bottom: 14px;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

label.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

label.checkbox span {
    margin: 0;
    font-weight: 600;
}

label.checkbox input {
    margin-top: 3px;
}

.inline-form {
    padding: 0 24px 22px;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-text);
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
}

.link-button.danger {
    color: var(--danger);
}

.link-button:disabled {
    color: var(--muted);
    cursor: not-allowed;
    text-decoration: none;
}

.filter-form {
    padding: 18px 24px 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.filter-grid label {
    margin: 0;
    min-width: 0;
}

.filter-grid label:nth-child(-n+2) {
    grid-column: span 2;
}

.filter-grid .span-2 {
    grid-column: span 2;
}

.date-time {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 8px;
    margin: 0 !important;
}

.filter-form input,
.filter-form select {
    padding: 10px 12px;
}

input[type="time"] {
    width: 100%;
    border: 1px solid rgb(var(--line-rgb) / 0.22);
    border-radius: 12px;
    background: var(--surface-deep);
    color: var(--text);
    color-scheme: dark;
    outline: none;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.sync-range {
    padding: 12px 24px 4px;
    font-size: 0.84rem;
}

.entry-list {
    padding: 12px 16px 16px;
}

.entry-row {
    display: grid;
    grid-template-columns: var(--entry-cols, 108px 110px 112px 44px 150px minmax(0, 1fr));
    gap: 12px;
    align-items: center;
    padding: 9px 12px;
    font-size: 0.86rem;
}

.entry-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entry-head {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.entry-row-wrap {
    border-top: 1px solid var(--border);
}

.entry-row-wrap summary {
    cursor: pointer;
    list-style: none;
}

.entry-row-wrap summary::-webkit-details-marker {
    display: none;
}

.entry-row-wrap summary:hover,
.entry-row-wrap[open] summary {
    background: rgba(255, 255, 255, 0.03);
}

.entry-time {
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.entry-header {
    font-weight: 700;
}

.entry-row-wrap .entry-header::before {
    content: "\25B8  ";
    color: var(--muted);
}

.entry-row-wrap[open] .entry-header::before {
    content: "\25BE  ";
}

.filter-link {
    color: var(--accent-text);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.filter-link:hover {
    text-decoration: underline;
}

.entry-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 4px 12px 10px;
    font-size: 0.8rem;
}

.entry-facts dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.entry-facts dd {
    margin: 2px 0 0;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.entry-detail {
    margin: 0 12px 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-deep);
    color: var(--text-soft);
    font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 4px 16px 22px;
}

body.is-busy {
    cursor: progress;
}

button:disabled {
    opacity: 0.7;
    cursor: progress;
}

@media (max-width: 1000px) {
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .counter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .location-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-form label {
        flex: 1 1 140px;
    }

    .entry-head {
        display: none;
    }

    .entry-row {
        grid-template-columns: auto 1fr;
        gap: 2px 10px;
    }

    .entry-row .entry-header {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-grid label:nth-child(-n+2),
    .filter-grid .span-2 {
        grid-column: 1 / -1;
    }

    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 24px;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .counter-card {
        width: 100%;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .form-panel {
        position: static;
    }

    .list-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form {
        width: 100%;
    }
}

/* ---------------------------------------------------------------------------
   Version 1.3: Navigation, Server-Status, Warnungen, Regel-Baukasten
   --------------------------------------------------------------------------- */

[hidden] {
    display: none !important;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: -24px 0 30px;
    padding: 10px 14px 10px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgb(var(--panel-rgb) / 0.72);
}

.topnav .brand {
    font-weight: 800;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 6px;
    flex: 1;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgb(var(--line-rgb) / 0.1);
    color: var(--text);
}

.nav-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    color: var(--surface-deep);
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
}

.nav-count.is-warn { background: var(--warning); }
.nav-count.is-bad { background: var(--danger); }

.host-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgb(var(--line-rgb) / 0.06);
    color: var(--text-soft);
    cursor: pointer;
    font-weight: 700;
}

.host-chip:hover {
    background: rgb(var(--line-rgb) / 0.12);
}

.host-chip .status-dot {
    width: 9px;
    height: 9px;
    flex-basis: 9px;
}

.host-dialog {
    width: min(560px, calc(100% - 32px));
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--panel-strong);
    color: var(--text);
    box-shadow: var(--shadow);
}

.host-dialog::backdrop {
    background: rgba(5, 10, 20, 0.6);
    backdrop-filter: blur(2px);
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 14px;
    border-bottom: 1px solid var(--border);
}

.dialog-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 4px;
    font-size: 1.3rem;
}

.dialog-head p {
    margin: 0;
}

.host-checks {
    display: grid;
    gap: 14px;
    padding: 18px 22px 6px;
}

.host-check-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.host-check small {
    color: var(--muted);
    font-size: 0.82rem;
}

.meter {
    height: 8px;
    margin-bottom: 6px;
    border-radius: 999px;
    background: rgb(var(--line-rgb) / 0.14);
    overflow: hidden;
}

.meter span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--success);
}

.meter span.is-warn { background: var(--warning); }
.meter span.is-bad { background: var(--danger); }

.host-dialog .hint {
    padding: 0 22px 20px;
}

/* Warnungen */
.alert-strip {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.alert-item {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    align-items: baseline;
    padding: 12px 16px;
    border: 1px solid rgba(255, 191, 71, 0.35);
    border-left-width: 4px;
    border-radius: 12px;
    background: rgba(255, 191, 71, 0.07);
}

.alert-item.is-bad {
    border-color: rgba(255, 107, 122, 0.4);
    background: rgba(255, 107, 122, 0.07);
}

.alert-item .alert-links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 0.85rem;
}

.alert-item a,
.alert-title a {
    color: var(--accent-text);
}

.panel.spaced {
    margin-top: 22px;
}

.alert-list,
.rule-list {
    padding: 8px 16px 16px;
}

.alert-row,
.rule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 12px;
    border-top: 1px solid var(--border);
}

.alert-row:first-child,
.rule-row:first-child {
    border-top: 0;
}

.alert-row {
    border-left: 3px solid var(--warning);
    padding-left: 14px;
}

.alert-row.is-bad {
    border-left-color: var(--danger);
}

.alert-main,
.rule-main {
    min-width: 0;
}

.alert-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.alert-message {
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.alert-meta {
    margin-top: 4px;
    font-size: 0.8rem;
}

.alert-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.alert-actions form {
    margin: 0;
}

.alert-actions .button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.86rem;
}

.rule-row.is-disabled {
    opacity: 0.55;
}

/* Regel-Baukasten */
.page-shell.narrow {
    width: min(980px, calc(100% - 32px));
}

.nav-shell {
    padding-bottom: 0;
}

.nav-shell + .page-shell {
    padding-top: 0;
}

/* Server-Punkt und Benutzer-Kreis nie umbrechen */
.host-chip,
.user-menu summary {
    white-space: nowrap;
}

.topnav {
    gap: 14px;
}

.nav-links {
    gap: 2px;
}

.nav-links a {
    padding: 7px 10px;
}


.topnav {
    flex-wrap: wrap;
}

@media (max-width: 1100px) {
    .nav-links {
        order: 3;
        flex-basis: 100%;
        flex-wrap: wrap;
    }

    .host-chip {
        margin-left: auto;
    }
}

.rule-form {
    padding: 4px 0 0;
}

.rule-section {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.rule-section h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.rule-section h3 + .hint {
    margin-top: -6px;
    margin-bottom: 12px;
}

.rule-sentence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.rule-sentence select,
.rule-sentence input {
    width: auto;
    padding: 10px 12px;
}

input.mini {
    width: 90px !important;
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.segmented label {
    margin: 0;
    cursor: pointer;
}

.segmented input {
    position: absolute;
    opacity: 0;
}

.segmented label > span {
    display: block;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgb(var(--line-rgb) / 0.05);
    color: var(--text);
    font-size: 0.95rem;
}

.segmented label > span small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 500;
}

.segmented input:checked + span {
    border-color: rgb(var(--accent-rgb) / 0.8);
    background: rgb(var(--accent-rgb) / 0.12);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.13);
}

.segmented input:focus-visible + span {
    outline: 2px solid var(--primary);
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 6px 14px;
    max-height: 260px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: auto;
}

.check-grid label.checkbox {
    margin: 0;
}

.check-grid label.checkbox span {
    color: var(--muted);
    font-weight: 500;
}

.check-grid label.checkbox.used span {
    color: var(--text);
    font-weight: 700;
}

label.checkbox.standalone {
    align-self: end;
    margin-bottom: 30px;
}

.rule-actions {
    padding: 20px 24px 24px;
}

@media (max-width: 820px) {
    .topnav {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: -8px;
    }

    .nav-links {
        order: 3;
        flex-basis: 100%;
    }

    .host-chip {
        margin-left: auto;
    }

    .alert-row,
    .rule-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .alert-actions {
        justify-content: flex-start;
    }

    .segmented {
        grid-template-columns: 1fr;
    }
}

.rule-section .hint + h3 {
    margin-top: 26px;
}

/* ---------------------------------------------------------------------------
   Version 1.4: Anmeldung, Benutzermenü, Dialog-Formulare, Protokoll
   --------------------------------------------------------------------------- */

.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px 0;
}

.login-box {
    width: min(420px, 100%);
}

.heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.heading-actions .search-form {
    width: min(280px, 100%);
}


.location-text h3 code {
    margin-left: 8px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.location-text .badges {
    margin-top: 6px;
}

.location-card {
    padding: 13px 16px;
}

.form-dialog {
    width: min(480px, calc(100% - 32px));
}

.form-dialog .location-form {
    padding: 18px 22px 22px;
}

/* Benutzermenü */
.user-menu {
    position: relative;
}

.user-menu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    color: var(--text-soft);
    font-weight: 700;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.avatar {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: rgb(var(--accent-rgb) / 0.22);
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 800;
}

.user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 20;
    display: grid;
    gap: 10px;
    min-width: 210px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.user-menu-panel a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.user-menu-panel form {
    margin: 0;
}

/* Hell/Dunkel-Umschalter im Benutzermenü */
.theme-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.theme-switch span {
    grid-column: 1 / -1;
    padding: 2px 6px 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-switch button {
    padding: 6px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.theme-switch button.active {
    background: var(--primary);
    color: #fff;
}

.brand-name {
    color: var(--primary);
    font-weight: 900;
    letter-spacing: -0.02em;
}

/* Schnellfilter-Knöpfe in der Journal-Liste */
button.filter-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

/* Protokoll */
.audit-row {
    grid-template-columns: 110px 120px 190px 190px minmax(0, 1fr) !important;
}

.audit-list .audit-row:not(.entry-head) {
    border-top: 1px solid var(--border);
}

.empty-state.big {
    padding: 90px 24px;
}

.empty-state.big h1 {
    margin: 0 0 6px;
}

@media (max-width: 820px) {

    .heading-actions {
        width: 100%;
        justify-content: stretch;
    }

    .heading-actions .search-form {
        flex: 1;
        width: auto;
    }

    .audit-row {
        grid-template-columns: auto 1fr !important;
    }
}

/* Journal: Eintragstext vollständig (mehrzeilig) statt abgeschnitten */
.entry-row {
    align-items: start;
}

.entry-row > span.entry-header {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.entry-facts .fact-wide {
    flex-basis: 100%;
}

.entry-facts .fact-wide dd {
    font-weight: 700;
    color: var(--text);
    overflow-wrap: anywhere;
}

.raw-data {
    margin: 0 12px 12px;
}

.raw-data summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.raw-data[open] summary {
    margin-bottom: 6px;
}

.raw-data .entry-detail {
    margin: 0;
    max-height: 360px;
    overflow: auto;
}

/* Standortseite: JLog-Zugang einklappbar, Journal in voller Breite */
.detail-stack {
    display: grid;
    gap: 18px;
}

.collapsible > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

.collapsible > summary::-webkit-details-marker {
    display: none;
}

.collapsible:not([open]) > summary {
    border-bottom: 0;
}

.collapsible > summary h2 .muted {
    font-size: 0.9rem;
}

.collapsible-hint {
    font-size: 0.8rem;
    white-space: nowrap;
}

.collapsible-hint::after {
    content: " \25BE ";
}

.collapsible[open] .collapsible-hint::after {
    content: " \25B4 ";
}

.collapsible-body .location-form {
    max-width: 640px;
}

.collapsible-body .inline-form {
    max-width: 640px;
}

@media (max-width: 820px) {
    .nav-links {
        flex-wrap: wrap;
    }
}

/* Nerd-Statistik im Server-Dialog */
.nerd-stats {
    margin: 14px 22px 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgb(var(--line-rgb) / 0.04);
}

.nerd-stats summary {
    cursor: pointer;
    color: var(--text-soft);
    font-weight: 800;
    font-size: 0.9rem;
}

.nerd-stats summary::before {
    content: "\1F913  ";
}

.nerd-stats dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    margin: 12px 0 2px;
}

.nerd-stats dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nerd-stats dd {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
}

.host-dialog {
    max-height: calc(100vh - 40px);
    overflow: auto;
}

@media (max-width: 520px) {
    .nerd-stats dl {
        grid-template-columns: 1fr;
    }
}

/* Protokoll: Netz-Tags und Filter */
.badge.is-info {
    border-color: rgb(var(--accent-rgb) / 0.35);
    background: rgb(var(--accent-rgb) / 0.12);
    color: var(--accent-text);
}

.audit-ip {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.audit-filter-grid label:nth-child(-n+2) {
    grid-column: auto;
}

@media (max-width: 820px) {
    .audit-filter-grid label:nth-child(-n+2) {
        grid-column: auto;
    }
}

/* Einklappbarer Filter mit Chips */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px 24px 4px;
}

.filter-panel > summary {
    list-style: none;
    gap: 8px;
}

.filter-panel > summary::-webkit-details-marker {
    display: none;
}

.filter-panel[open] {
    flex-basis: 100%;
    order: 2;
}

.filter-panel[open] > summary {
    background: rgb(var(--accent-rgb) / 0.16);
    color: var(--text);
}

.filter-panel .filter-form {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.filter-count {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    place-items: center;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
}

.filter-icon {
    display: inline-block;
    transform: rotate(-45deg);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    order: 1;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid rgb(var(--accent-rgb) / 0.35);
    border-radius: 999px;
    background: rgb(var(--accent-rgb) / 0.1);
    color: var(--text-soft);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.filter-chip:hover {
    border-color: rgba(255, 107, 122, 0.5);
    background: rgba(255, 107, 122, 0.12);
}

.filter-chip.static {
    border-color: var(--border);
    background: none;
    color: var(--muted);
    cursor: default;
}

.filter-chip.clear {
    border-style: dashed;
    background: none;
    color: var(--muted);
}

.filter-bar + .sync-range {
    padding-top: 6px;
}

/* ---------------------------------------------------------------------------
   Version 1.5: Wünsche (Feature-Requests) und Anhänge
   --------------------------------------------------------------------------- */

.notice-info {
    border-color: rgb(var(--accent-rgb) / 0.35);
}

.notice-info a {
    color: var(--accent-text);
    font-weight: 700;
}

.nav-count.is-info { background: var(--primary); }

.counter-row.three {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
}

.button-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.85rem;
}

.button-danger {
    border: 1px solid rgba(255, 107, 122, 0.35);
    background: rgba(255, 107, 122, 0.1);
    color: var(--danger);
}

.button-danger:hover {
    background: rgba(255, 107, 122, 0.2);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgb(var(--line-rgb) / 0.22);
    border-radius: 12px;
    background: var(--surface-deep);
    color: var(--text);
    font: inherit;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    transition: 0.18s ease;
}

textarea:focus {
    border-color: rgb(var(--accent-rgb) / 0.8);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.13);
}

kbd {
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: rgb(var(--line-rgb) / 0.1);
    font-family: inherit;
    font-size: 0.8em;
}

/* Art-Auswahl */
.type-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.type-picker legend {
    margin-bottom: 8px;
    padding: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.radio-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgb(var(--line-rgb) / 0.06);
    cursor: pointer;
    font-weight: 700;
}

.radio-chip:has(input:checked) {
    border-color: rgb(var(--accent-rgb) / 0.6);
    background: rgb(var(--accent-rgb) / 0.16);
}

.radio-chip input {
    accent-color: var(--primary);
}

/* Liste */
.wish-list {
    display: flex;
    flex-direction: column;
}

.wish-row {
    display: grid;
    grid-template-columns: 10px 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.15s ease;
}

.wish-row:first-child {
    border-top: 0;
}

.wish-row:hover {
    background: rgb(var(--accent-rgb) / 0.06);
}

.unread-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.wish-row.is-unread .unread-dot {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.18);
}

.wish-row.is-unread .wish-title {
    font-weight: 800;
}

.wish-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    line-height: 1.1;
}

.wish-votes strong {
    color: var(--text);
    font-size: 1.1rem;
}

.wish-votes small {
    font-size: 0.7rem;
}

.wish-votes.mine {
    border-color: rgb(var(--accent-rgb) / 0.5);
    background: rgb(var(--accent-rgb) / 0.1);
}

.wish-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.wish-title {
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wish-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.wish-counts {
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Detail */
.wish-head h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.wish-head .wish-meta {
    margin-top: 10px;
}

.eyebrow a {
    text-decoration: none;
}

.vote-form {
    margin: 0;
}

.vote-button {
    display: flex;
    min-width: 76px;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgb(var(--panel-rgb) / 0.72);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: 0.15s ease;
}

.vote-button strong {
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1.1;
}

.vote-button:hover:not(:disabled) {
    border-color: rgb(var(--accent-rgb) / 0.6);
}

.vote-button.is-active {
    border-color: rgb(var(--accent-rgb) / 0.7);
    background: rgb(var(--accent-rgb) / 0.16);
    color: var(--text-soft);
}

.vote-button:disabled {
    cursor: default;
    opacity: 0.7;
}

.wish-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.wish-main-col,
.wish-side-col {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 22px;
}

.wish-description .panel-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inline-edit > summary {
    list-style: none;
}

.inline-edit > summary::-webkit-details-marker {
    display: none;
}

.inline-edit[open] {
    flex-basis: 100%;
}

.inline-edit[open] > summary {
    margin-bottom: 4px;
}

.inline-edit .location-form {
    padding: 16px 0 0;
}

.wish-text {
    padding: 20px 24px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.wish-text a {
    color: var(--accent-text);
}

.timeline {
    margin: 0;
    padding: 18px 24px 6px;
    list-style: none;
}

.timeline > li {
    position: relative;
    margin-bottom: 16px;
}

.tl-comment {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
}

.tl-bubble {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.tl-comment.is-new .tl-bubble {
    border-color: rgb(var(--accent-rgb) / 0.5);
}

.tl-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.tl-head a {
    text-decoration: none;
}

.tl-bubble .wish-text {
    padding: 12px 14px;
}

.tl-bubble .attachments {
    padding: 0 14px 14px;
}

.tl-system {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-left: 10px;
    color: var(--muted);
    font-size: 0.86rem;
}

.tl-system strong {
    color: var(--text);
}

.tl-system a {
    color: var(--accent-text);
}

.tl-dot {
    width: 8px;
    height: 8px;
    margin-right: 14px;
    border-radius: 50%;
    background: var(--muted);
}

.tl-system.is-new .tl-dot {
    background: var(--primary);
}

.comment-form {
    padding: 8px 24px 24px;
    border-top: 1px solid var(--border);
}

.comment-form textarea {
    margin-top: 16px;
}

.comment-form .upload-field {
    margin-top: 12px;
}

.dev-panel {
    border-color: rgb(var(--accent-rgb) / 0.35);
}

.dev-panel .location-form {
    padding: 18px 20px 20px;
}

.side-facts {
    padding: 18px 20px;
}

.side-facts dl {
    margin: 0;
}

.side-facts dl > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
}

.side-facts dl > div:first-child {
    border-top: 0;
}

.side-facts dt {
    color: var(--muted);
}

.side-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.side-facts h3 {
    margin: 16px 0 6px;
    font-size: 0.95rem;
}

.dupe-list {
    margin: 0;
    padding-left: 18px;
    font-size: 0.88rem;
}

.dupe-list a {
    color: var(--accent-text);
}

/* Anhänge */
.attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 24px 20px;
}

.att-thumb {
    display: block;
    width: 150px;
    height: 110px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-deep);
}

.att-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.att-thumb:hover img {
    transform: scale(1.04);
}

.att-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 280px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
}

.att-file strong {
    display: block;
    overflow: hidden;
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.att-file small {
    color: var(--muted);
}

.att-file:hover {
    border-color: rgb(var(--accent-rgb) / 0.5);
}

.att-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: none;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 107, 122, 0.15);
    color: var(--danger);
    font-size: 0.7rem;
    font-weight: 800;
}

/* Upload-Feld */
.upload-field {
    margin-bottom: 18px;
}

.upload-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.upload-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 16px;
    border: 1px dashed rgb(var(--line-rgb) / 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.88rem;
    text-align: center;
    transition: 0.15s ease;
}

.upload-drop span {
    margin: 0;
    color: var(--text-soft);
    font-weight: 500;
}

.upload-drop strong {
    color: var(--accent-text);
}

.upload-drop small {
    font-size: 0.78rem;
}

.upload-drop input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-drop:hover,
.upload-field.is-drag .upload-drop {
    border-color: rgb(var(--accent-rgb) / 0.7);
    background: rgb(var(--accent-rgb) / 0.08);
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.upload-field.has-files .upload-preview {
    margin-top: 10px;
}

.upload-item {
    position: relative;
    display: flex;
    width: 132px;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-deep);
}

.upload-item img {
    width: 100%;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.upload-item .att-icon {
    width: 100%;
    height: 80px;
}

.upload-meta {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(11, 17, 32, 0.85);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.upload-remove:hover {
    background: var(--danger);
}

.upload-warning {
    flex-basis: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255, 191, 71, 0.35);
    border-radius: 10px;
    color: var(--warning);
    font-size: 0.82rem;
}

/* Großansicht */
.lightbox {
    max-width: min(96vw, 1600px);
    max-height: 94vh;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-deep);
    color: var(--text);
}

.lightbox::backdrop {
    background: rgba(3, 6, 14, 0.82);
}

.lightbox form {
    position: absolute;
    top: 10px;
    right: 10px;
}

.lightbox img {
    display: block;
    max-width: calc(min(96vw, 1600px) - 26px);
    max-height: calc(94vh - 70px);
    margin: 0 auto;
    border-radius: 8px;
}

.lightbox-open {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-text);
    font-size: 0.85rem;
}

@media (max-width: 1000px) {
    .wish-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .wish-side-col {
        order: -1;
    }
}

@media (max-width: 820px) {
    .wish-row {
        grid-template-columns: 8px 44px minmax(0, 1fr);
        padding: 12px 16px;
    }

    .wish-counts {
        grid-column: 3;
    }

    .wish-title {
        white-space: normal;
    }

    .counter-row.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .wish-head {
        flex-direction: column;
        align-items: stretch;
    }

    .vote-button {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
}

/* =============================================================================
 * Celona-Themes (Umschalter im Benutzermenü, je Benutzer gespeichert)
 *   dark  = „Espresso“ (Standard)   light = „Finca“ – ab 1.18 überschrieben vom Interna-Look am Dateiende
 *   Vorlagen und Vorschaubilder: intern/redesign/ (nicht im Git)
 * ========================================================================== */

/* espresso */
html[data-theme="dark"] { --accent-rgb: 200 61 35; --accent-text: #ffb08f; --panel-rgb: 38 29 24; --line-rgb: 255 226 196; --text-soft: #ead9c2; --surface-deep: #1d1612; --bg: #17110e; --bg-soft: #201814; --panel: rgba(38, 29, 24, 0.94); --panel-strong: #2a1f19; --border: rgba(255, 226, 196, 0.12); --text: #fff1d5; --muted: #bfa892; --primary: #c83d23; --primary-hover: #dc3545; --success: #8fd19e; --danger: #ff7a66; --warning: #ffd479; }
html[data-theme="dark"] body { background: radial-gradient(circle at 8% 0%, rgba(200, 61, 35, 0.22), transparent 34%), radial-gradient(circle at 96% 18%, rgba(255, 230, 156, 0.07), transparent 30%), var(--bg); }
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .panel-kicker { color: #f0a07e; }
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] select { background: #1d1612; border-color: rgba(255, 226, 196, 0.16); }
html[data-theme="dark"] label span,
html[data-theme="dark"] .advanced summary { color: #ead9c2; }
html[data-theme="dark"] .link-button,
html[data-theme="dark"] .filter-link,
html[data-theme="dark"] .alert-item a,
html[data-theme="dark"] .alert-title a { color: #ffb08f; }
html[data-theme="dark"] .topnav { background: rgba(38, 29, 24, 0.85); }
html[data-theme="dark"] .topnav .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.05rem; }
html[data-theme="dark"] .topnav .brand::before { content: ""; width: 8px; height: 28px; border-radius: 6px; background: linear-gradient(#dc3545, #c83d23); }
html[data-theme="dark"] .button-primary { box-shadow: 0 8px 24px rgba(200, 61, 35, 0.35); }
html[data-theme="dark"] .counter-card,
html[data-theme="dark"] .status-tile { background: rgba(38, 29, 24, 0.8); }
html[data-theme="dark"] .entry-detail { background: #1d1612; color: #ead9c2; }
html[data-theme="dark"] .avatar { background: rgba(200, 61, 35, 0.3); color: #ffd9c9; }
html[data-theme="dark"] .location-main code,
html[data-theme="dark"] .location-text h3 code { color: #bfa892; }
html[data-theme="dark"] h1 { letter-spacing: -0.035em; }

/* finca */
html[data-theme="light"] { --accent-rgb: 220 53 69; --accent-text: #c83d23; --panel-rgb: 255 253 249; --line-rgb: 120 90 60; --text-soft: #4a4038; --surface-deep: #fff; color-scheme: light; --bg: #fff1d5; --bg-soft: #fff6e4; --panel: #fffdf9; --panel-strong: #fffdf9; --border: #eadfce; --text: #302b26; --muted: #746a60; --primary: #dc3545; --primary-hover: #c83d23; --success: #2f9e5b; --danger: #c8283a; --warning: #d68a00; --shadow: 0 6px 22px rgba(76, 50, 16, 0.08); }
html[data-theme="light"] body { background: radial-gradient(circle at 0% 0%, rgba(255, 230, 156, 0.55), transparent 38%), var(--bg); color: var(--text); }
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .panel-kicker { color: #c83d23; }
html[data-theme="light"] .panel,
html[data-theme="light"] .counter-card,
html[data-theme="light"] .status-tile,
html[data-theme="light"] .topnav { background: var(--panel); backdrop-filter: none; }
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="time"],
html[data-theme="light"] select { background: #fff; color: var(--text); border-color: #d9cbb6; color-scheme: light; }
html[data-theme="light"] label span,
html[data-theme="light"] .advanced summary,
html[data-theme="light"] .tile-label { color: #5b5047; }
html[data-theme="light"] .button-secondary { background: #f4e9d8; color: #4a4038; }
html[data-theme="light"] .icon-button { background: #fbf4e8; color: #5b5047; border-color: #eadfce; }
html[data-theme="light"] .icon-button:hover { background: #f4e9d8; }
html[data-theme="light"] .link-button,
html[data-theme="light"] .filter-link,
html[data-theme="light"] .alert-item a,
html[data-theme="light"] .alert-title a,
html[data-theme="light"] .back-link { color: #c83d23; }
html[data-theme="light"] .back-link:hover { color: #302b26; }
html[data-theme="light"] .nav-links a { color: #746a60; }
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active { background: #fff1d5; color: #302b26; }
html[data-theme="light"] .host-chip { background: #fffdf9; color: #302b26; }
html[data-theme="light"] .topnav .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.05rem; }
html[data-theme="light"] .topnav .brand::before { content: ""; width: 9px; height: 30px; border-radius: 8px; background: #dc3545; }
html[data-theme="light"] .badge { background: #faf3e7; color: #5b5047; border-color: #eadfce; }
html[data-theme="light"] .badge.is-ok { background: #e7f5ec; color: #217a45; border-color: #bfe3cd; }
html[data-theme="light"] .badge.is-bad { background: #fdebec; color: #b01f30; border-color: #f4c2c7; }
html[data-theme="light"] .badge.is-warn { background: #ffe69c; color: #6b4a00; border-color: #f2d27a; }
html[data-theme="light"] .badge.is-unknown,
html[data-theme="light"] .badge.is-neutral { color: #746a60; }
html[data-theme="light"] .location-card:hover { background: #fff8ec; border-color: #eadfce; }
html[data-theme="light"] .location-main code,
html[data-theme="light"] .location-text h3 code,
html[data-theme="light"] .muted { color: #8a7d70; }
html[data-theme="light"] .status-dot.is-unknown { box-shadow: 0 0 0 5px rgba(116, 106, 96, 0.12); }
html[data-theme="light"] .entry-detail { background: #faf3e7; color: #3d352f; }
html[data-theme="light"] .entry-row-wrap summary:hover,
html[data-theme="light"] .entry-row-wrap[open] summary { background: #fff8ec; }
html[data-theme="light"] .entry-time,
html[data-theme="light"] .entry-meta strong { color: #4a4038; }
html[data-theme="light"] .notice { background: #fffdf9; }
html[data-theme="light"] .alert-item { background: #fff6dc; border-color: #f2d27a; }
html[data-theme="light"] .alert-item.is-bad { background: #fdebec; border-color: #f4c2c7; }
html[data-theme="light"] .avatar { background: #dc3545; color: #fff; }
html[data-theme="light"] .user-menu summary,
html[data-theme="light"] .user-menu-panel a { color: #302b26; }
html[data-theme="light"] .host-dialog,
html[data-theme="light"] .user-menu-panel { background: #fffdf9; color: #302b26; }
html[data-theme="light"] .meter { background: #f1e6d6; }
html[data-theme="light"] .counter-card.is-ok strong { color: #2f9e5b; }
html[data-theme="light"] .counter-card.is-bad strong { color: #c8283a; }
html[data-theme="light"] .counter-card.is-warn strong { color: #d68a00; }

/* Journal: Spaltenauswahl */
.column-menu {
    position: relative;
}

.column-menu summary {
    list-style: none;
}

.column-menu summary::-webkit-details-marker {
    display: none;
}

.column-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    display: grid;
    gap: 8px;
    min-width: 200px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.column-menu-panel .link-button {
    justify-self: start;
    margin-top: 4px;
}
.entry-row > span.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Standortseite kompakt: Status als Zeile unter dem Namen, Details im Zahnrad-Bereich */
.compact-head {
    align-items: center;
    margin-bottom: 18px;
}

.compact-head h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0;
}

.gear-button {
    width: 30px;
    height: 30px;
    font-size: 1rem;
}

.settings-dialog {
    width: min(760px, calc(100% - 32px));
}

.settings-dialog .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 22px 8px;
}

/* Regel-Baukasten: Arten, Bedingungen und Ausnahmen im gleichen Kasten-Stil */
.cond-box {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.cond-label {
    font-size: 0.86rem;
    font-weight: 700;
}

.check-grid.in-box {
    margin: 0 0 6px;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

.condition-row {
    display: grid;
    grid-template-columns: 160px 210px minmax(0, 1fr);
    gap: 8px;
}

.condition-row select,
.condition-row input,
select.inline-select {
    padding: 6px 10px;
    font-size: 0.86rem;
}

select.inline-select {
    width: auto;
    margin: 0 4px;
}

@media (max-width: 720px) {
    .condition-row {
        grid-template-columns: 1fr;
    }
}


/* Benutzermenü: „Abmelden“ (Formular-Button) sieht aus wie „Passwort ändern“ (Link) */
.user-menu-panel button.link-button {
    padding: 0;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.user-menu-panel a:hover,
.user-menu-panel button.link-button:hover {
    color: var(--primary);
}

/* Server-Ampel nur als Punkt (Name im Tooltip und im Server-Fenster) */
.host-chip {
    padding: 9px;
}

/* System-Log (Admin) */
.syslog-filter {
    display: grid;
    grid-template-columns: 200px 240px minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    padding: 18px 24px 4px;
}

.entry-row.syslog-row {
    grid-template-columns: 108px 150px 80px minmax(0, 1fr);
}

.entry-row > span.syslog-message {
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
}

.log-link {
    margin: 12px 22px 0;
}

.hint.pad {
    padding: 0 24px 16px;
}

@media (max-width: 820px) {
    .syslog-filter {
        grid-template-columns: 1fr;
    }
}

/* Live-Suche: dezenter Hinweis, solange im Hintergrund gesucht wird */
body.is-searching [data-live-region="results"] {
    opacity: 0.6;
    transition: opacity 0.15s;
}

/* Journal: sortierbare Spaltenüberschriften */
button.sort-head {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

button.sort-head:hover,
button.sort-head.active {
    color: var(--text);
}

/* Verwaltung: Seitenmenü links */
.admin-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-menu {
    position: sticky;
    top: 16px;
    padding: 16px 12px;
}

.admin-menu .panel-kicker {
    padding: 0 8px 8px;
}

.admin-menu nav {
    display: grid;
    gap: 2px;
}

.admin-menu a {
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgb(var(--line-rgb) / 0.1);
    color: var(--text);
}

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

    .admin-menu {
        position: static;
    }

    .admin-menu nav {
        grid-auto-flow: column;
        overflow-x: auto;
    }
}

/* Versionsnummer unten, Release Notes */
.app-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 0.8rem;
}

.app-footer a {
    color: var(--muted);
    text-decoration: none;
}

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

.release-notes {
    padding: 8px 24px;
}

.release {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.release:last-child {
    border-bottom: 0;
}

.release h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.release h3 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.release ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.55;
}

/* Gruppen: Rechte je Bereich, Gruppenwahl beim Benutzer */
.perm-area,
.group-pick {
    border: 1px solid rgb(var(--line-rgb) / 0.22);
    border-radius: 12px;
    padding: 10px 14px 12px;
    margin: 0;
    display: grid;
    gap: 6px;
}

.perm-area legend,
.group-pick legend {
    padding: 0 6px;
}

.perm-area > label.checkbox {
    padding-left: 22px;
}

/* Hinzufügen-Knopf: nur „+“ */
.button.add-button {
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    flex: 0 0 auto;
}

/* Gruppen: Rechte kompakt als Chips, Details aufklappbar */
.perm-summary {
    margin-top: 8px;
}

.perm-summary > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
}

.perm-summary > summary::-webkit-details-marker {
    display: none;
}

.perm-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 3px 10px;
    border: 1px solid rgb(var(--line-rgb) / 0.22);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.perm-chip small {
    opacity: 0.75;
}

.perm-chip.is-full {
    border-color: rgb(var(--line-rgb) / 0.4);
    color: var(--text);
}

.perm-more {
    font-size: 0.8rem;
    color: var(--text-soft);
    text-decoration: underline dotted;
}

.perm-summary[open] .perm-more {
    opacity: 0.5;
}

.perm-detail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px 20px;
    margin-top: 12px;
}

.perm-detail-area ul {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
}

.perm-detail-area li.is-off {
    opacity: 0.45;
}

.group-row .rule-main {
    min-width: 0;
    flex: 1;
}

/* Fälle */
.case-add {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.case-add select,
.case-add input[type="text"] {
    flex: 1 1 180px;
    min-width: 0;
}

.case-row {
    color: inherit;
    text-decoration: none;
}

.case-row:hover {
    background: rgb(var(--line-rgb) / 0.05);
}

.evidence-row {
    --entry-cols: 150px 140px 140px minmax(0, 1fr);
}

.entry-detail-box {
    padding: 4px 12px 14px;
}

.evidence-note {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    margin: 10px 0 6px;
}

.evidence-note label {
    flex: 1 1 260px;
    display: grid;
    gap: 4px;
}

.member-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 6px;
}

.member-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.case-log > summary {
    cursor: pointer;
}

.case-log-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
    font-size: 0.85rem;
    max-height: 420px;
    overflow: auto;
}

.member-panel > :not(.panel-heading) {
    margin-left: 20px;
    margin-right: 20px;
}

.member-panel > :last-child {
    margin-bottom: 20px;
}

.member-panel > .case-log {
    margin-top: 18px;
}

.entry-detail-box .raw-data,
.entry-detail-box .link-button {
    margin-top: 8px;
}

.member-panel > .member-add {
    margin: 0;
}

.member-panel > .member-list {
    margin-top: 14px;
}

/* =============================================================================
 * Interna-Look (ab 1.18): Farben, Schrift und Formen wie interna.celona.de
 *   hell = Sand + weiße Karten, dunkel = Anthrazit; rote Navigationsleiste
 *   Liegt bewusst am Ende und überschreibt Espresso/Finca oben.
 *   Schrift: Source Sans 3 (SIL Open Font License), lokal in assets/fonts/
 * ========================================================================== */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(fonts/source-sans-3-latin-wght-normal.woff2) format("woff2"); }

body { font-family: "Source Sans 3", system-ui, "Segoe UI", Arial, sans-serif; font-size: 16px; }
h1 { letter-spacing: -0.01em !important; font-weight: 700; }

/* gemeinsame Formen: flach, kleine Ecken */
.panel, .topnav, .host-dialog, .user-menu-panel, .counter-card, .status-tile, .location-card, .admin-menu, .column-menu-panel { border-radius: 6px !important; box-shadow: 0 1px 2px rgba(0,0,0,.06) !important; backdrop-filter: none !important; }
.button, .icon-button, input, select, textarea { border-radius: 5.5px !important; }
.button-primary { background: #c43f2b !important; border-color: #c43f2b !important; color: #fff !important; box-shadow: none !important; }
.button-primary:hover { background: #a73625 !important; }
.badge { border-radius: 50rem; }

/* rote Navigationsleiste wie in Interna */
.topnav { background: #c43f2b !important; border-color: #c43f2b !important; }
.topnav .brand, .topnav .brand * { color: #fff !important; }
.topnav .brand::before { background: #fff1d5 !important; }
.nav-links a { color: #fff1d5 !important; }
.nav-links a:hover, .nav-links a.active { background: rgba(255, 241, 213, .18) !important; color: #fff !important; }
.topnav .avatar { background: #fff1d5 !important; color: #c43f2b !important; }
.host-chip { background: rgba(255,255,255,.15) !important; border-color: transparent !important; }

/* hell: Sand-Hintergrund, weiße Karten */
html[data-theme="light"] { --bg: #f1dcbd; --bg-soft: #f6e7d0; --panel: #fff; --panel-strong: #fff; --panel-rgb: 255 255 255; --border: #ececec; --line-rgb: 37 37 37; --text: #252525; --text-soft: #3a3a3a; --muted: #757575; --primary: #c43f2b; --primary-hover: #a73625; --accent-rgb: 196 63 43; --accent-text: #c43f2b; --success: #4f9a2c; --danger: #d9302c; --warning: #c98a00; }
html[data-theme="light"] body { background: #f1dcbd; }
html[data-theme="light"] .eyebrow, html[data-theme="light"] .panel-kicker { color: #c43f2b; }
html[data-theme="light"] .button-secondary { background: #f9f9f9; color: #252525; border: 1px solid #e2e2e2; }
html[data-theme="light"] .badge { background: #f9f9f9; color: #505050; border-color: #e2e2e2; }
html[data-theme="light"] .badge.is-ok { background: #eef8e6; color: #3d7a1f; border-color: #aadb89; }
html[data-theme="light"] .badge.is-bad { background: #fde8e7; color: #b8231f; border-color: #f25f5c; }
html[data-theme="light"] .badge.is-warn { background: #fff6d6; color: #7a5a00; border-color: #ffd665; }
html[data-theme="light"] .badge.is-info { background: #eaf6fc; color: #1f6a8c; border-color: #97d0ec; }
html[data-theme="light"] .entry-detail { background: #f9f9f9; color: #252525; }
html[data-theme="light"] .entry-row-wrap summary:hover, html[data-theme="light"] .entry-row-wrap[open] summary, html[data-theme="light"] .location-card:hover { background: #fff8ec; }
html[data-theme="light"] .muted { color: #757575; }
html[data-theme="light"] input[type], html[data-theme="light"] select, html[data-theme="light"] textarea { border-color: #d4d4d4; background: #fff; }
html[data-theme="light"] .icon-button { background: #f9f9f9; border-color: #e2e2e2; color: #3a3a3a; }

/* dunkel: neutrales Anthrazit statt Braun */
html[data-theme="dark"] { --bg: #1f1f1f; --bg-soft: #252525; --panel: #252525; --panel-strong: #2b2b2b; --panel-rgb: 37 37 37; --border: #3a3a3a; --line-rgb: 226 226 226; --text: #f9f9f9; --text-soft: #e2e2e2; --muted: #b5b5b5; --surface-deep: #1a1a1a; --primary: #c43f2b; --primary-hover: #a73625; --accent-rgb: 196 63 43; --accent-text: #f79f9d; --success: #aadb89; --danger: #f25f5c; --warning: #ffd665; }
html[data-theme="dark"] body { background: #1f1f1f; }
html[data-theme="dark"] .eyebrow, html[data-theme="dark"] .panel-kicker { color: #edd0a6; }
html[data-theme="dark"] input[type], html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #1a1a1a !important; border-color: #505050 !important; }
html[data-theme="dark"] .entry-detail { background: #1a1a1a; color: #e2e2e2; }
html[data-theme="dark"] label span { color: #e2e2e2; }
html[data-theme="dark"] .link-button, html[data-theme="dark"] .filter-link, html[data-theme="dark"] .alert-title a { color: #edd0a6; }
html[data-theme="dark"] .avatar { background: #c43f2b; color: #fff; }
html[data-theme="dark"] .button-secondary { background: #353535; color: #f9f9f9; }
.topnav .nav-count { background: #fff1d5 !important; color: #c43f2b !important; }
.topnav .host-chip .status-dot { box-shadow: 0 0 0 3px rgba(255,255,255,.35) !important; }
html[data-theme="dark"] .counter-card, html[data-theme="dark"] .status-tile { background: var(--panel); }
.user-menu-panel .link-button { color: inherit !important; }

/* Bon-Inhalt immer im Originalformat (feste Schrift, keine Umbrüche); breiter als der Bildschirm = waagerecht scrollen */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.entry-detail {
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    overflow-x: auto;
    max-width: calc(100% - 24px);
    font-size: 13px;
}
.raw-data .entry-detail,
.entry-detail-box .entry-detail { max-width: 100%; }
.entry-list, .entry-row-wrap { min-width: 0; }

/* Spalten-Auswahl: nicht vom Panel abgeschnitten, bei wenig Platz scrollbar */
.panel:has(.column-menu[open]) { overflow: visible; }
.column-menu-panel { max-height: min(70vh, 480px); overflow-y: auto; }

/* Ein-/Ausklappen von Bereichen */
.collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 10px;
    padding: 0;
    vertical-align: middle;
    border: 1px solid var(--border);
    border-radius: 5.5px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.collapse-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(2px) rotate(-135deg);
    transition: transform .15s ease;
}
.collapse-toggle[aria-expanded="false"]::before { transform: translateY(-2px) rotate(45deg); }
.collapse-toggle:hover { color: var(--text); border-color: rgb(var(--line-rgb) / 0.35); }
.panel.is-collapsed > :not(.panel-heading) { display: none !important; }
.panel.is-collapsed > .panel-heading { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .collapse-toggle::before { transition: none; } }
.alert-filter { margin: 0 0 18px; padding: 0; }
@media (min-width: 821px) { .alert-filter { grid-template-columns: 260px minmax(0, 360px); } }
