/* ==============================
   DASHBOARD
==============================*/

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    /* Das Portalmenue hebt sich weiterhin vom hellen Arbeitsbereich ab, wirkt mit
       dem aufgehellten Schieferblau aber deutlich freundlicher und weniger schwer. */
    background: #334a62;
    color: white;
    padding: 35px;
}

/* Die zusätzlichen Bedienelemente gehören ausschließlich zur mobilen
   Darstellung. Auf breiten Bildschirmen bleibt die bewährte Seitenleiste stehen. */
.portal-mobile-header,
.portal-menu-backdrop,
.portal-menu-close {
    display: none;
}

.sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.sidebar-logo {
    margin-bottom: 45px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

    .sidebar-logo img {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
        object-fit: contain;
    }

    .sidebar-logo span {
        color: #CBD5E1;
        font-size: 1.05rem;
        font-weight: 700;
    }

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 10px;
}

/* Unterbereiche wie Getränkeautomat und VPN-Clients verwenden dieselbe visuelle
   Hierarchie. Ein dezenter linker Leitstrich und die Einrückung kennzeichnen die
   Zuordnung, ohne Links auf kleinen Bildschirmen schwerer erreichbar zu machen. */
.sidebar .sidebar-submenu {
    margin: 3px 0 2px 31px;
    padding: 4px 0 4px 10px;
    border-left: 3px solid #f0c94b;
    border-radius: 0 0 0 8px;
    background: rgba(8, 17, 31, .18);
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: max-height .24s ease, opacity .18s ease, padding .24s ease, margin .24s ease, visibility .24s ease;
}

/* Mausbenutzer öffnen Untermenüs erst beim Überfahren der Gruppe. focus-within
   bietet dieselbe Funktion ohne Maus und hält die Navigation barrierearm. */
.sidebar .sidebar-nav-group:hover > .sidebar-submenu,
.sidebar .sidebar-nav-group:focus-within > .sidebar-submenu {
    max-height: 320px;
    margin-top: 3px;
    margin-bottom: 2px;
    padding-top: 4px;
    padding-bottom: 4px;
    visibility: visible;
    opacity: 1;
}

.sidebar .sidebar-submenu li {
    margin: 0;
}

.sidebar .sidebar-submenu a {
    position: relative;
    padding: 9px 12px;
    color: #dbe7f3;
    font-size: .86rem;
}

.sidebar .sidebar-submenu a::before {
    position: absolute;
    top: 50%;
    left: -12px;
    width: 10px;
    height: 2px;
    background: #f0c94b;
    content: "";
}

.sidebar .sidebar-nav-group > a {
    margin-bottom: 0;
    background: rgba(255, 255, 255, .06);
    font-weight: 750;
}

.sidebar .sidebar-submenu a i {
    width: 16px;
    text-align: center;
}

.sidebar a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border-radius: 12px;
    transition: .25s;
}

    .sidebar a:hover {
        background: #526d88;
    }

    /* Der Tastaturfokus muss auf der helleren Navigation ebenso klar erkennbar
       bleiben wie der Maus-Hoverzustand. */
    .sidebar a:focus-visible {
        color: #fff;
        background: #526d88;
        outline: 3px solid #f0c94b;
        outline-offset: 2px;
    }

.dashboard-content {
    flex: 1;
    background: #F8FAFC;
    padding: 40px;
}

@media (max-width: 768px) {
    .dashboard {
        display: block;
    }

    /* Die Kopfleiste bleibt beim Scrollen sichtbar, damit das Menü auf jeder
       Unterseite ohne Rücksprung zum Seitenanfang geöffnet werden kann. */
    .portal-mobile-header {
        position: sticky;
        top: 0;
        z-index: 1100;
        display: flex;
        min-height: 64px;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 16px;
        background: #334a62;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .2);
    }

    .portal-menu-toggle,
    .portal-menu-close {
        min-height: 44px;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 12px;
        color: #fff;
        background: rgba(255, 255, 255, .09);
        font-weight: 750;
    }

    .portal-menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 9px 14px;
    }

    .portal-menu-toggle:hover,
    .portal-menu-toggle:focus-visible,
    .portal-menu-close:hover,
    .portal-menu-close:focus-visible {
        color: #0f2742;
        background: #f0c94b;
        outline: 3px solid rgba(240, 201, 75, .35);
        outline-offset: 2px;
    }

    .portal-mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: #fff;
        font-weight: 800;
        text-decoration: none;
    }

    .portal-mobile-brand img {
        width: 38px;
        height: 38px;
        object-fit: contain;
    }

    /* Die Navigation liegt außerhalb der Seite und wird erst durch die vom
       Skript gesetzte Zustandsklasse sichtbar. visibility verhindert zugleich,
       dass geschlossene Menüpunkte per Tastatur erreicht werden. */
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1300;
        width: min(88vw, 340px);
        height: 100vh;
        height: 100dvh;
        padding: 20px;
        overflow-y: auto;
        visibility: hidden;
        box-shadow: 22px 0 48px rgba(8, 17, 31, .34);
        transform: translateX(-105%);
        transition: transform .25s ease, visibility .25s ease;
    }

    .dashboard.is-portal-menu-open .sidebar {
        visibility: visible;
        transform: translateX(0);
    }

    .sidebar-logo {
        margin-bottom: 20px;
    }

    .portal-menu-close {
        display: inline-grid;
        width: 44px;
        flex: 0 0 44px;
        place-items: center;
        padding: 0;
        font-size: 1.2rem;
    }

    .sidebar ul {
        display: block;
    }

    .sidebar li {
        margin-bottom: 8px;
    }

    .sidebar .sidebar-submenu {
        display: block;
        margin: 3px 0 0 30px;
        max-height: none;
        padding-top: 4px;
        padding-bottom: 4px;
        overflow: visible;
        visibility: visible;
        opacity: 1;
    }

    .sidebar .sidebar-submenu li {
        display: block;
    }

    .portal-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: block;
        border: 0;
        visibility: hidden;
        opacity: 0;
        background: rgba(8, 17, 31, .58);
        transition: opacity .25s ease, visibility .25s ease;
    }

    .dashboard.is-portal-menu-open .portal-menu-backdrop {
        visibility: visible;
        opacity: 1;
    }

    body.portal-menu-open {
        overflow: hidden;
    }

    .dashboard-content {
        padding: 20px;
    }
}

/* Admin system dashboard */
.portal-header { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; margin-bottom:32px; }
.portal-header h1 { margin:4px 0 8px; color:#0f172a; font-size:clamp(2rem,4vw,3rem); font-weight:800; }
.portal-header p { color:#64748b; margin:0; }
.eyebrow { color:#b88900; font-size:.78rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.broker-status { display:inline-flex; align-items:center; gap:10px; padding:10px 16px; border-radius:999px; font-weight:800; white-space:nowrap; }
.broker-status.is-online { color:#166534; background:#dcfce7; }
.broker-status.is-offline { color:#991b1b; background:#fee2e2; }
.broker-status.is-running { color:#854d0e; background:#fef9c3; }
.status-dot { width:10px; height:10px; border-radius:50%; background:currentColor; box-shadow:0 0 0 5px rgba(22,101,52,.12); }

/* Kompakte Dienstuebersicht: Jede Karte ist zugleich Statusanzeige und Link zur
   Detailseite. Farbe, Text und Symbol vermitteln gemeinsam denselben Zustand. */
.dashboard-status-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.dashboard-status-card { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:18px; min-height:154px; padding:24px; overflow:hidden; border:1px solid #dbe3ec; border-radius:20px; color:#0f172a; background:#fff; box-shadow:0 12px 35px rgba(15,23,42,.06); text-decoration:none; transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }
.dashboard-status-card::before { content:""; position:absolute; inset:0 auto 0 0; width:6px; background:#94a3b8; }
.dashboard-status-card.status-green::before { background:#22c55e; }
.dashboard-status-card.status-yellow::before { background:#eab308; }
.dashboard-status-card.status-red::before { background:#ef4444; }
.dashboard-status-card:hover { color:#0f172a; border-color:#94a3b8; box-shadow:0 18px 44px rgba(15,23,42,.12); transform:translateY(-3px); }
.dashboard-status-card:focus-visible { color:#0f172a; }
.dashboard-status-lamp { width:34px; height:34px; border:4px solid rgba(15,23,42,.15); border-radius:50%; background:#94a3b8; box-shadow:0 0 0 7px rgba(148,163,184,.16),inset 0 2px 4px rgba(255,255,255,.65); }
.dashboard-status-lamp.green { background:#22c55e; box-shadow:0 0 0 7px rgba(34,197,94,.15),0 0 18px rgba(34,197,94,.42),inset 0 2px 4px rgba(255,255,255,.65); }
.dashboard-status-lamp.yellow { background:#facc15; box-shadow:0 0 0 7px rgba(250,204,21,.16),0 0 18px rgba(234,179,8,.36),inset 0 2px 4px rgba(255,255,255,.65); }
.dashboard-status-lamp.red { background:#ef4444; box-shadow:0 0 0 7px rgba(239,68,68,.14),0 0 18px rgba(239,68,68,.38),inset 0 2px 4px rgba(255,255,255,.65); }
.dashboard-status-content { min-width:0; }
.dashboard-status-content small,.dashboard-status-content strong,.dashboard-status-content>span { display:block; }
.dashboard-status-content small { color:#64748b; font-size:.76rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.dashboard-status-content strong { margin:5px 0 7px; font-size:1.25rem; }
.dashboard-status-content>span { color:#64748b; font-size:.9rem; overflow-wrap:anywhere; }
.dashboard-status-label { padding:6px 10px; border-radius:999px; color:#475569; background:#f1f5f9; font-size:.75rem; font-weight:800; white-space:nowrap; }
.status-green .dashboard-status-label { color:#166534; background:#dcfce7; }
.status-yellow .dashboard-status-label { color:#854d0e; background:#fef9c3; }
.status-red .dashboard-status-label { color:#991b1b; background:#fee2e2; }
.dashboard-status-card>i { color:#94a3b8; }
.dashboard-back-link { display:flex; align-items:center; gap:8px; width:max-content; margin-bottom:15px; color:#475569; font-weight:800; text-decoration:none; }
.dashboard-back-link:hover { color:#0f172a; }
.dashboard-test-stack { display:grid; gap:18px; }
.dashboard-organisation-grid .metric-card { min-height:105px; }
@media(max-width:1180px){.dashboard-status-grid{grid-template-columns:1fr}.dashboard-status-card{min-height:128px}}
@media(max-width:640px){.dashboard-status-card{grid-template-columns:auto minmax(0,1fr) auto;padding:20px}.dashboard-status-label{grid-column:2}.dashboard-status-card>i{grid-column:3;grid-row:1/3}.dashboard-status-lamp{width:28px;height:28px}.dashboard-test-stack .email-test-card form{width:100%}.dashboard-test-stack .email-test-card input{width:100%}}

/* Der HA-Verbund steht vor den normalen Dienstkarten, damit ein Administrator
   sofort erkennt, welcher Knoten die Seite liefert. Die Markierung des aktuellen
   Servers ist rein informativ und löst keinerlei Umschaltaktion aus. */
.infrastructure-status-section{margin-bottom:42px}.infrastructure-heading-row{align-items:flex-start}.infrastructure-heading-row p{margin:7px 0 0;color:#64748b}.current-server-name{color:#0f2742}.infrastructure-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.infrastructure-status-card{min-width:0;padding:22px;border:1px solid #dbe3ec;border-top:4px solid #94a3b8;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(15,23,42,.06)}.infrastructure-status-card.status-green{border-top-color:#22c55e}.infrastructure-status-card.status-yellow{border-top-color:#eab308}.infrastructure-status-card.status-red{border-top-color:#ef4444}.infrastructure-status-card.is-current-server{outline:3px solid rgba(37,99,235,.2);border-color:#60a5fa;background:linear-gradient(145deg,#fff 0%,#eff6ff 100%)}.infrastructure-card-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px}.infrastructure-card-heading small{color:#64748b;font-size:.73rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.infrastructure-card-heading h3{margin:3px 0 0;color:#0f172a;font-size:1.08rem;overflow-wrap:anywhere}.current-server-badge{padding:5px 9px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:.7rem;font-weight:850;white-space:nowrap}.infrastructure-status-card>p{min-height:48px;margin:18px 0;color:#475569;font-size:.9rem}.infrastructure-status-card footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:14px;border-top:1px solid #e2e8f0}.infrastructure-status-card footer small{color:#64748b;font-size:.73rem;text-align:right}.infrastructure-status-card.status-green .dashboard-status-label{color:#166534;background:#dcfce7}.infrastructure-status-card.status-yellow .dashboard-status-label{color:#854d0e;background:#fef9c3}.infrastructure-status-card.status-red .dashboard-status-label{color:#991b1b;background:#fee2e2}
@media(max-width:1180px){.infrastructure-status-grid{grid-template-columns:1fr}.infrastructure-status-card>p{min-height:0}}
@media(max-width:640px){.infrastructure-card-heading{grid-template-columns:auto minmax(0,1fr)}.current-server-badge{grid-column:2}.infrastructure-status-card footer{align-items:flex-start;flex-direction:column}.infrastructure-status-card footer small{text-align:left}}

/* Die HA-Karten sind vollständige, tastaturbedienbare Links. Detailseite und
   Download zeigen ausschließlich den begrenzten Statusverlauf. */
.infrastructure-status-card{display:block;color:inherit;text-decoration:none;transition:transform .2s ease,box-shadow .2s ease}.infrastructure-status-card:hover{color:inherit;box-shadow:0 18px 44px rgba(15,23,42,.12);transform:translateY(-3px)}.infrastructure-status-card:focus-visible{outline:3px solid #2563eb;outline-offset:3px}.infrastructure-card-open{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-top:13px;color:#2563eb;font-size:.78rem;font-weight:800}.infrastructure-detail-heading{align-items:center}.infrastructure-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:34px}.infrastructure-detail-grid article{padding:20px;border:1px solid #dbe3ec;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.05)}.infrastructure-detail-grid span{display:block;color:#64748b;font-size:.75rem;font-weight:800;text-transform:uppercase}.infrastructure-detail-grid strong{display:block;margin-top:7px;color:#0f172a}.infrastructure-log-section{margin-bottom:40px}.infrastructure-log-section .section-heading-row p{margin:5px 0 0;color:#64748b}.infrastructure-log-table-wrap{overflow-x:auto;border:1px solid #dbe3ec;border-radius:16px;background:#fff}.infrastructure-log-table{width:100%;min-width:820px;border-collapse:collapse}.infrastructure-log-table th,.infrastructure-log-table td{padding:13px 15px;border-bottom:1px solid #e2e8f0;text-align:left;vertical-align:top}.infrastructure-log-table th{color:#475569;background:#f1f5f9;font-size:.75rem;text-transform:uppercase}.infrastructure-log-table tbody tr:last-child td{border-bottom:0}@media(max-width:800px){.infrastructure-detail-heading{align-items:flex-start;flex-direction:column}.infrastructure-detail-grid{grid-template-columns:1fr}}

/* Besucherstatistik: Die Balken entstehen serverseitig aus aggregierten
   Tageswerten. Es werden weder Tracking-JavaScript noch Drittanbieter geladen. */
.visitor-statistics-section{margin-top:42px}.visitor-statistics-section .section-heading-row p{margin:6px 0 0;color:#64748b}.visitor-privacy-badge{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;color:#166534;background:#dcfce7;font-size:.78rem;font-weight:800}.visitor-statistics-unconfigured{display:flex;align-items:center;gap:16px;padding:22px;border:1px dashed #94a3b8;border-radius:16px;color:#475569;background:#fff}.visitor-statistics-unconfigured>i{color:#94a3b8;font-size:1.7rem}.visitor-statistics-unconfigured strong,.visitor-statistics-unconfigured span{display:block}.visitor-statistics-unconfigured strong{margin-bottom:4px;color:#0f172a}.visitor-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.visitor-metric-grid article{padding:18px 20px;border:1px solid #dbe3ec;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.05)}.visitor-metric-grid span{display:block;color:#64748b;font-size:.74rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.visitor-metric-grid strong{display:block;margin-top:7px;color:#0f2742;font-size:1.75rem}.visitor-chart-card{padding:24px;border:1px solid #dbe3ec;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(15,23,42,.06)}.visitor-chart-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.visitor-chart-heading h3{margin:0 0 3px;color:#0f172a;font-size:1.1rem}.visitor-chart-heading span,.visitor-chart-heading small{color:#64748b}.visitor-chart{display:grid;grid-template-columns:repeat(30,minmax(25px,1fr));height:250px;align-items:end;gap:5px;overflow-x:auto;padding:18px 4px 2px;border-bottom:1px solid #cbd5e1}.visitor-chart-day{display:grid;height:100%;min-width:25px;grid-template-rows:22px 1fr 36px;align-items:end;text-align:center}.visitor-chart-value{align-self:start;color:#475569;font-size:.68rem;font-weight:800}.visitor-chart-bar{display:block;width:min(70%,28px);height:var(--visitor-bar-height);min-height:0;margin:0 auto;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,#3b82f6,#1d4ed8);box-shadow:0 3px 9px rgba(37,99,235,.2)}.visitor-chart-day time{padding-top:8px;color:#64748b;font-size:.62rem;white-space:nowrap;transform:rotate(-55deg);transform-origin:center}
.visitor-category-human{border-top:3px solid #16a34a!important}.visitor-category-bot{border-top:3px solid #7c3aed!important}.visitor-category-unknown{border-top:3px solid #94a3b8!important}.visitor-classification-note{margin:-4px 0 18px;padding:12px 14px;border-radius:12px;color:#475569;background:#f8fafc;font-size:.82rem}.visitor-area-card{margin-top:18px;padding:24px;border:1px solid #dbe3ec;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(15,23,42,.06)}.visitor-area-table{width:100%;border-collapse:collapse}.visitor-area-table th,.visitor-area-table td{padding:11px 12px;border-bottom:1px solid #e2e8f0;text-align:right}.visitor-area-table th:first-child{text-align:left}.visitor-area-table thead th{color:#64748b;font-size:.72rem;letter-spacing:.04em;text-transform:uppercase}.visitor-area-table tbody th{color:#0f2742}.visitor-area-empty{margin:0;color:#64748b}
@media(max-width:1000px){.visitor-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.visitor-chart{grid-template-columns:repeat(30,28px)}}
@media(max-width:600px){.visitor-statistics-section .section-heading-row{align-items:flex-start;flex-direction:column}.visitor-metric-grid{grid-template-columns:1fr}.visitor-chart-card{padding:18px}.visitor-chart-heading{align-items:flex-start;flex-direction:column;gap:5px}}

.section-heading-row { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.section-heading-row h2 { margin:3px 0 0; font-size:1.45rem; color:#0f172a; font-weight:800; }
.last-check { color:#64748b; font-size:.9rem; }
.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.metric-card { min-height:150px; padding:24px; border:1px solid #e2e8f0; border-radius:18px; background:#fff; box-shadow:0 12px 35px rgba(15,23,42,.06); display:flex; flex-direction:column; justify-content:center; }
.metric-card-wide { grid-column:span 2; }
.metric-card span { color:#64748b; font-size:.9rem; font-weight:700; }
.metric-card strong { display:block; margin:8px 0 4px; color:#0f172a; font-size:clamp(1.65rem,3vw,2.35rem); line-height:1.1; overflow-wrap:anywhere; }
.metric-card small { color:#94a3b8; }
.metric-grid.compact .metric-card { min-height:120px; }
.account-panel { max-width:620px; padding:30px; background:#fff; border:1px solid #e2e8f0; border-radius:18px; box-shadow:0 12px 35px rgba(15,23,42,.06); }
@media (max-width:1100px) { .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) { .portal-header,.section-heading-row { align-items:flex-start; flex-direction:column; } .metric-grid { grid-template-columns:1fr; } .metric-card-wide { grid-column:span 1; } }

.admin-table-wrap { overflow-x:auto; border:1px solid #e2e8f0; border-radius:18px; background:#fff; box-shadow:0 12px 35px rgba(15,23,42,.06); }
.admin-users-table { margin:0; min-width:780px; }
.admin-users-table th { padding:16px 20px; color:#64748b; font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; background:#f8fafc; }
.admin-users-table td { padding:18px 20px; }
.admin-users-table td strong,.admin-users-table td small { display:block; }
.admin-users-table td small { color:#64748b; margin-top:3px; }
/* Empfaengertests stehen unmittelbar hinter dem zu pruefenden Feld. Das Ergebnis
   bleibt in derselben Tabellenzelle und ist zusaetzlich ueber aria-live erfassbar. */
.notification-recipient-panel { max-width:none; }
.notification-recipient-table { min-width:1220px; }
.recipient-test-control { min-width:285px; }
.recipient-test-button { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
.recipient-test-result { display:block; min-height:1.25rem; margin-top:6px; font-size:.78rem; line-height:1.35; }
.recipient-test-result.is-success { color:#166534; font-weight:700; }
.recipient-test-result.is-error { color:#b91c1c; font-weight:700; }
.role-list { display:flex; flex-wrap:wrap; gap:6px; }
.role-list span,.user-state { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:.78rem; font-weight:700; background:#e2e8f0; color:#334155; }
.user-state.active { background:#dcfce7; color:#166534; }
.user-state.inactive { background:#fee2e2; color:#991b1b; }
.admin-form-panel { max-width:760px; }
.role-fieldset { margin:28px 0; }
.role-fieldset legend { margin-bottom:12px; font-size:1rem; font-weight:800; }
.role-option { display:flex; align-items:flex-start; gap:12px; padding:14px; margin-bottom:9px; border:1px solid #e2e8f0; border-radius:12px; cursor:pointer; }
.role-option:hover { border-color:#c59a18; background:#fffbeb; }
.role-option input { margin-top:5px; width:18px; height:18px; }
.role-option span,.role-option strong,.role-option small { display:block; }
.role-option small { color:#64748b; margin-top:2px; }
.status-option { margin-bottom:24px; background:#f8fafc; }

.email-test-card { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px; border:1px solid #e2e8f0; border-radius:18px; background:#fff; box-shadow:0 12px 35px rgba(15,23,42,.06); }
.email-test-card strong { display:block; color:#0f172a; font-size:1.1rem; }
.email-test-card p { margin:6px 0 0; color:#64748b; }
.email-test-card form { flex:0 0 auto; }
@media (max-width:640px) { .email-test-card { align-items:stretch; flex-direction:column; } .email-test-card button { width:100%; } }

/* Backupstatus: lange OneDrive-Pfade und technische Logs bleiben auch auf kleinen
   Displays lesbar, ohne das übrige Dashboard horizontal aufzuziehen. */
.backup-target { overflow-wrap:anywhere; font-size:clamp(1rem,2vw,1.35rem) !important; }
.backup-subheading { margin-top:28px; }
.backup-subheading h3 { margin:0; color:#0f172a; }
.backup-state { display:inline-flex; padding:5px 10px; border-radius:999px; font-size:.82rem; font-weight:800; }
.backup-state.is-success { color:#166534; background:#dcfce7; }
.backup-state.is-failed { color:#991b1b; background:#fee2e2; }
.backup-log-panel { margin-top:18px; border:1px solid #e2e8f0; border-radius:16px; background:#fff; overflow:hidden; }
.backup-log-panel summary { padding:16px 18px; color:#0f172a; font-weight:800; cursor:pointer; }
.backup-log-panel pre { max-height:430px; margin:0; padding:18px; overflow:auto; color:#dbeafe; background:#07111f; font-size:.82rem; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
/* WH.Monitor */
.monitor-control{display:flex;justify-content:space-between;gap:28px;align-items:center;padding:28px;border:1px solid #dbe3ec;border-radius:20px;background:#fff;box-shadow:0 12px 32px rgba(7,22,40,.06)}
.monitor-actions{display:flex;gap:12px;flex-wrap:wrap}.monitor-reports{display:grid;gap:18px}.monitor-report{background:#fff;border:1px solid #dbe3ec;border-left:6px solid #16794b;border-radius:16px;padding:0 22px;box-shadow:0 8px 24px rgba(7,22,40,.05)}
.monitor-report.status-warning{border-left-color:#b7791f}.monitor-report.status-critical{border-left-color:#b42318}.monitor-report summary{display:flex;justify-content:space-between;gap:20px;cursor:pointer;padding:22px 0}.monitor-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;padding:4px 0 20px}.monitor-check{padding:15px;border-radius:12px;background:#f4f8f6;border:1px solid #cce6d8}.monitor-check span{display:block;font-size:.75rem;text-transform:uppercase;color:#16794b}.monitor-check p{margin:.45rem 0 0;color:#536270}.monitor-check.check-warning{background:#fff9eb;border-color:#f2d79b}.monitor-check.check-critical{background:#fff2f0;border-color:#f0b7b0}.monitor-summary{white-space:pre-wrap;font:inherit;background:#f7f9fc;border-radius:12px;padding:18px;max-height:none}.monitor-report h3{font-size:1.1rem}
@media(max-width:760px){.monitor-control{align-items:flex-start;flex-direction:column}.monitor-report summary{flex-direction:column}.monitor-actions{width:100%}.monitor-actions form,.monitor-actions button{width:100%}}

/* SPS-Anlagenportal: Ampelfarben werden nie allein verwendet; jeder Zustand besitzt
   zusaetzlich ein Textlabel und bleibt dadurch auch ohne Farbwahrnehmung verstaendlich. */
.plant-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:20px}.plant-card{display:block;padding:24px;border:1px solid #dbe3ec;border-radius:20px;background:#fff;color:#0f172a;text-decoration:none;box-shadow:0 12px 32px rgba(7,22,40,.06);transition:.2s}.plant-card:hover{color:#0f172a;transform:translateY(-4px);box-shadow:0 18px 42px rgba(7,22,40,.11)}.plant-card-head,.plant-header-actions,.plant-action-row,.simulator-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.plant-card h2{margin:18px 0 4px;font-size:1.35rem}.plant-card>p,.plant-card>small{color:#64748b}.plant-connection{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;font-weight:800;font-size:.82rem}.plant-connection i{width:9px;height:9px;border-radius:50%;background:currentColor}.plant-connection.online{color:#166534;background:#dcfce7}.plant-connection.offline{color:#991b1b;background:#fee2e2}.plant-status{padding:16px;margin:18px 0;background:#f8fafc;border-radius:13px}.plant-status span,.plant-status strong{display:block}.plant-status span{font-size:.78rem;color:#64748b;text-transform:uppercase}.plant-counts{display:flex;gap:10px;margin-bottom:18px}.plant-counts span{flex:1;padding:10px;border-radius:10px;font-size:.86rem}.plant-counts .fault{background:#fff1f2;color:#9f1239}.plant-counts .warning{background:#fffbeb;color:#92400e}.plant-empty{text-align:center;padding:70px;border:2px dashed #cbd5e1;border-radius:20px;background:#fff}.plant-empty>i{font-size:3rem;color:#94a3b8}.plant-live-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:16px}.plant-live-card{min-height:145px;padding:22px;border:1px solid #dbe3ec;border-radius:18px;background:#fff;display:flex;flex-direction:column;justify-content:center}.plant-live-card span{font-size:.8rem;color:#64748b;text-transform:uppercase;font-weight:700}.plant-live-card strong{font-size:1.8rem;margin:8px 0}.plant-live-card small{color:#64748b}.plant-live-card.fault{border-left:6px solid #dc2626}.plant-live-card.warning{border-left:6px solid #e3a008}.plant-action-row{justify-content:flex-start;margin:22px 0}.simulator-actions{padding:8px 12px;background:#eef2f7;border-radius:12px}.simulator-actions form{display:inline}.plant-message-columns,.plant-config-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:26px 0}.plant-message-columns>section{padding:22px;border-radius:18px;background:#fff;border:1px solid #dbe3ec}.plant-message-columns h2,.plant-config-grid h2{font-size:1.25rem;margin-bottom:16px}.active-message{padding:15px;margin-top:10px;border-radius:12px}.active-message.fault{background:#fff1f2;border-left:4px solid #dc2626}.active-message.warning{background:#fffbeb;border-left:4px solid #e3a008}.active-message p{margin:5px 0;color:#475569}.plant-ok{padding:15px;border-radius:12px;background:#ecfdf5;color:#166534}.plant-log-section{margin-top:34px}.plant-log td:first-child{white-space:nowrap}.device-credentials dl{display:grid;grid-template-columns:140px 1fr;gap:6px;margin:12px 0 0}.device-credentials code{user-select:all}.plant-config-grid{grid-template-columns:minmax(300px,.7fr) minmax(0,1.3fr);align-items:start}
.device-panel{margin:22px 0;padding:22px;border:1px solid #dbe3ec;border-radius:18px;background:#fff}.device-panel h2{font-size:1.2rem}.device-panel>div{display:flex;align-items:end;justify-content:space-between;gap:20px}.device-panel dl{display:grid;grid-template-columns:110px 1fr;gap:5px 14px;margin:10px 0}.device-panel dt{color:#64748b}.device-panel dd{margin:0}
@media(max-width:1100px){.plant-live-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.plant-live-grid,.plant-message-columns,.plant-config-grid{grid-template-columns:1fr}.plant-header-actions{align-items:flex-start}.device-credentials dl,.device-panel dl{grid-template-columns:1fr}.device-panel>div{align-items:stretch;flex-direction:column}}

/* Leitstandtabelle der Anlagenübersicht. Ampel und Text bleiben sichtbar; zusätzlich
   färbt sich die gesamte Zeile, damit der Zustand aus größerer Entfernung erkennbar ist. */
.plant-overview-legend{display:flex;flex-wrap:wrap;gap:12px 24px;margin:0 0 20px;padding:14px 18px;border:1px solid #dbe3ec;border-radius:14px;background:#fff}.plant-overview-legend span,.plant-signal-cell{display:flex;align-items:center;gap:12px}.plant-signal{display:inline-block;flex:0 0 auto;width:22px;height:22px;border-radius:50%;border:3px solid rgba(15,23,42,.16);box-shadow:0 0 0 4px rgba(15,23,42,.06)}.plant-signal.green{background:#22c55e}.plant-signal.yellow{background:#facc15}.plant-signal.red{background:#ef4444}.plant-traffic-light{display:inline-flex;flex:0 0 auto;align-items:center;gap:6px;padding:7px 9px;border:2px solid #111827;border-radius:999px;background:#273244;box-shadow:inset 0 2px 4px rgba(0,0,0,.45),0 2px 5px rgba(15,23,42,.2)}.plant-traffic-light i{display:block;width:20px;height:20px;border-radius:50%;border:2px solid rgba(255,255,255,.18);opacity:.2;filter:saturate(.55);box-shadow:inset 0 2px 4px rgba(0,0,0,.65)}.plant-traffic-light i.red{background:#ef4444}.plant-traffic-light i.yellow{background:#facc15}.plant-traffic-light i.green{background:#22c55e}.plant-traffic-light i.active{opacity:1;filter:none;box-shadow:0 0 11px currentColor,inset 0 1px 3px rgba(255,255,255,.5)}.plant-traffic-light i.red.active{color:#ef4444}.plant-traffic-light i.yellow.active{color:#facc15}.plant-traffic-light i.green.active{color:#22c55e}.plant-overview-wrap{overflow-x:auto;border:1px solid #94a3b8;border-radius:18px;background:#fff;box-shadow:0 12px 32px rgba(7,22,40,.06)}.plant-overview-table{width:100%;min-width:880px;border-collapse:collapse}.plant-overview-table th{padding:15px 18px;border:1px solid #94a3b8;background:#e9eef4;color:#475569;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em}.plant-overview-table td{padding:18px;border:1px solid #b8c3cf;vertical-align:middle;background:transparent}.plant-overview-table tbody tr.signal-green{background:#edf9f0}.plant-overview-table tbody tr.signal-yellow{background:#fff8d6}.plant-overview-table tbody tr.signal-red>td{background:#fff5f5;animation:plant-alert-pulse 2.4s ease-in-out infinite}.plant-signal-cell{min-width:225px}.plant-overview-name{font-weight:800;color:#0f2742;text-decoration:none}.plant-overview-name:hover{text-decoration:underline}.plant-overview-table .has-fault{color:#b91c1c;font-weight:700}.plant-overview-table .has-warning{color:#a16207;font-weight:700}.plant-overview-table .is-clear{color:#64748b}.plant-order-heading,.plant-order-actions{text-align:center}.plant-order-actions{white-space:nowrap}.plant-order-actions form{display:inline-block;margin:0 2px}.plant-order-actions .btn{width:36px;height:36px;padding:0}
@keyframes plant-alert-pulse{0%,100%{background-color:#fff}50%{background-color:#fca5a5}}
/* Ein roter Anlagenalarm bleibt auch bei global aktivierter Bewegungsreduktion
   sichtbar blinkend. Diese gezielte Ausnahme betrifft keine dekorative Animation. */
@media (prefers-reduced-motion:reduce){.plant-overview-table tbody tr.signal-red>td{animation:plant-alert-pulse 2.4s ease-in-out infinite!important}}
@media (max-width:767.98px){.plant-overview-legend{align-items:flex-start;flex-direction:column}.plant-overview-table th,.plant-overview-table td{padding:13px 14px}}

/* Offline ist ein eigener aktueller Anlagenzustand. Diese ruhige rote Flaeche
   ersetzt bewusst alle nicht mehr verlaesslichen Status- und Meldungskarten. */
.plant-status-offline{border:1px solid #fecaca;background:#fff1f2;color:#991b1b;text-align:center}.plant-current-offline{display:flex;min-height:170px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:28px;border:2px solid #ef4444;border-radius:18px;background:#fff1f2;color:#991b1b}.plant-current-offline>i{font-size:2.2rem}.plant-current-offline>strong{font-size:2rem}.plant-current-offline>small{color:#7f1d1d}.plant-overview-table .is-offline-value,.plant-overview-table .is-offline-value strong{background:#fff5f5;color:#dc2626!important;font-weight:800}

/* Optionale Teltonika-Ansicht. Die rechte Statusspalte bleibt auch ohne externe
   Kartenbibliothek nutzbar und bricht auf Mobilgeräten unter das Formular. */
.plant-cellular-layout{display:grid;grid-template-columns:minmax(320px,.72fr) minmax(0,1.28fr);gap:24px;align-items:start}.cellular-status-panel{padding:26px;border:1px solid #dbe3ec;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(15,23,42,.06)}.cellular-metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cellular-metric-grid article{min-height:125px;padding:18px;border:1px solid #dbe3ec;border-radius:14px;background:#f8fafc;display:flex;flex-direction:column;justify-content:center}.cellular-metric-grid span{color:#64748b;font-size:.76rem;font-weight:800;text-transform:uppercase}.cellular-metric-grid strong{margin:6px 0;color:#0f172a;font-size:1.3rem;overflow-wrap:anywhere}.cellular-metric-grid small{color:#64748b}.cellular-status-list{display:grid;grid-template-columns:210px 1fr;gap:8px 16px;margin:22px 0}.cellular-status-list dt{color:#64748b}.cellular-status-list dd{margin:0;overflow-wrap:anywhere}.cellular-status-list .is-ok{color:#166534}.cellular-status-list .is-error{color:#b91c1c;font-weight:700}.cellular-location-card{padding:20px;border:1px solid #bfdbfe;border-radius:14px;background:#eff6ff}.cellular-location-card h3{font-size:1.1rem}.cellular-location-card>small{display:block;margin-top:12px;color:#64748b}.plant-empty.compact{padding:35px}.cellular-summary-panel h2 i{color:#2563eb}
@media(max-width:960px){.plant-cellular-layout{grid-template-columns:1fr}.cellular-status-panel{min-width:0}}@media(max-width:600px){.cellular-metric-grid{grid-template-columns:1fr}.cellular-status-list{grid-template-columns:1fr;gap:2px}.cellular-status-list dd{margin-bottom:10px}}

/* Die operative Mobilfunkansicht folgt der Leserichtung Status -> Karte ->
   Konfiguration. Die volle Seitenbreite gibt vier Messwerten und der Karte
   ausreichend Raum, während die mobilen Regeln alle Bereiche sauber stapeln. */
.cellular-status-primary{margin-bottom:24px}.cellular-status-primary .cellular-metric-grid-wide{grid-template-columns:repeat(4,minmax(0,1fr))}.cellular-status-primary .cellular-status-list{margin-bottom:0}.cellular-map-panel{margin-bottom:24px;padding:26px;border:1px solid #dbe3ec;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(15,23,42,.06)}.cellular-map-canvas{position:relative;width:100%;height:440px;margin-top:18px;overflow:hidden;border:1px solid #bfdbfe;border-radius:16px;background:#eaf2fb}.cellular-map-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#1e3a5f;font-weight:700}.cellular-map-loading i{font-size:2rem;color:#2563eb}.cellular-map-loading.is-error{color:#991b1b;background:#fff1f2}.cellular-map-loading.is-error i{color:#dc2626}.cellular-map-meta{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 2px 8px;color:#475569}.cellular-map-meta strong{color:#0f172a}.cellular-map-notice{margin:6px 0 0;padding:12px 14px;border-radius:10px;background:#eff6ff;color:#475569;font-size:.9rem}.cellular-map-notice i{color:#2563eb}.cellular-configuration-panel{max-width:none}
@media(max-width:1100px){.cellular-status-primary .cellular-metric-grid-wide{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:960px){.cellular-map-panel{min-width:0}.cellular-map-canvas{height:380px}}@media(max-width:600px){.cellular-status-primary .cellular-metric-grid-wide{grid-template-columns:1fr}.cellular-map-panel .section-heading-row{align-items:flex-start;flex-direction:column}.cellular-map-panel .section-heading-row .btn{width:100%}.cellular-map-canvas{height:320px}.cellular-map-meta{align-items:flex-start;flex-direction:column;gap:4px}}

/* Projektunabhängige Modemdiagnose: kompakte Eingabe, danach dieselben bewährten
   Status- und Kartenkomponenten wie in der anlagenbezogenen Mobilfunkansicht. */
.modem-locator-form{margin-bottom:24px}.modem-locator-input-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:18px}.modem-locator-privacy{display:inline-flex;align-items:center;gap:8px;color:#166534;font-size:.86rem;font-weight:700}.password-input-group{display:flex}.password-input-group .form-control{border-top-right-radius:0;border-bottom-right-radius:0}.password-input-group .btn{flex:0 0 48px;border-top-left-radius:0;border-bottom-left-radius:0}.modem-locator-error{margin:0 0 24px}.modem-locator-result{margin-bottom:24px}.modem-technical-list{grid-template-columns:repeat(4,minmax(120px,auto) minmax(120px,1fr));padding:18px;border-radius:14px;background:#f8fafc}.modem-technical-list dd{font-weight:700;color:#0f172a}
@media(max-width:1200px){.modem-technical-list{grid-template-columns:repeat(2,minmax(140px,auto) minmax(140px,1fr))}}@media(max-width:820px){.modem-locator-input-grid{grid-template-columns:1fr}.modem-technical-list{grid-template-columns:180px 1fr}}@media(max-width:520px){.modem-technical-list{grid-template-columns:1fr}.modem-technical-list dd{margin-bottom:10px}}

/* VPN-Clientübersicht: klare Serverkonfiguration oben, darunter eine kompakte
   Live-Tabelle. Öffentliche Gegenstellen bleiben ausschließlich im Adminbereich. */
.vpn-clients-header{align-items:center}.vpn-clients-error{display:flex;align-items:center;gap:12px}.vpn-clients-error .btn{margin-left:auto}.vpn-server-summary{margin-bottom:34px;padding:26px;border:1px solid #cbd5e1;border-radius:20px;background:linear-gradient(135deg,#fff 0%,#f1f5f9 100%);box-shadow:0 14px 36px rgba(15,23,42,.07)}.vpn-server-title{display:flex;align-items:center;gap:18px;margin-bottom:24px}.vpn-server-title h2{margin:3px 0 4px}.vpn-server-title p{margin:0;color:#64748b}.vpn-server-icon{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:#0f2742;color:#f6c945;font-size:1.55rem}.vpn-server-facts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:0}.vpn-server-facts div{padding:14px 16px;border:1px solid #dbe3ec;border-radius:14px;background:#fff}.vpn-server-facts dt{margin-bottom:5px;color:#64748b;font-size:.75rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.vpn-server-facts dd{margin:0;color:#0f172a;font-weight:750}.vpn-client-section{margin-bottom:40px}.vpn-client-table-heading{align-items:flex-end}.vpn-client-table-heading p{margin:4px 0 0;color:#64748b}.vpn-client-table-wrap{overflow-x:auto;border:1px solid #cbd5e1;border-radius:18px;background:#fff;box-shadow:0 12px 32px rgba(15,23,42,.06)}.vpn-client-table{width:100%;min-width:1120px;border-collapse:collapse}.vpn-client-table th{padding:14px 16px;border-bottom:1px solid #cbd5e1;background:#e9eef4;color:#475569;font-size:.76rem;letter-spacing:.04em;text-align:left;text-transform:uppercase}.vpn-client-table td{padding:15px 16px;border-bottom:1px solid #e2e8f0;color:#334155;vertical-align:middle}.vpn-client-table tbody tr:last-child td{border-bottom:0}.vpn-client-table tbody tr:hover{background:#f8fafc}.vpn-client-table td:first-child{display:flex;align-items:center;gap:10px;color:#0f2742}.vpn-client-table code{padding:5px 9px;border-radius:8px;background:#e8f1fb;color:#0b4f84;font-size:.9rem;font-weight:750}.vpn-client-online{display:inline-block;flex:0 0 auto;width:10px;height:10px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.14)}.vpn-cipher{display:inline-block;padding:5px 9px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:.78rem;font-weight:800}.vpn-client-empty{display:flex;min-height:190px;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:28px;border:1px dashed #94a3b8;border-radius:18px;background:#f8fafc;color:#64748b;text-align:center}.vpn-client-empty i{font-size:2rem}.vpn-client-empty strong{color:#0f2742;font-size:1.1rem}@media(max-width:1100px){.vpn-server-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.vpn-clients-error{align-items:flex-start;flex-wrap:wrap}.vpn-clients-error .btn{margin-left:0}.vpn-server-summary{padding:20px}.vpn-server-facts{grid-template-columns:1fr}.vpn-client-table-heading{align-items:flex-start;flex-direction:column;gap:14px}}

/* Jede VPN-Verbindung bleibt vollständig in einer einzigen Tabellenzeile. Der
   horizontale Scrollbereich ist auf schmalen Displays verständlicher als ein
   Umbruch von IP, Zeit oder Modemaktion auf mehrere visuelle Zeilen. */
.vpn-client-table{min-width:1760px}.vpn-client-table th,.vpn-client-table td{white-space:nowrap}.vpn-address-cell{display:inline-flex;align-items:center;gap:10px}.vpn-modem-button,.vpn-modem-placeholder{display:inline-flex;min-width:132px;align-items:center;justify-content:center;gap:7px}.vpn-modem-placeholder{pointer-events:none;opacity:.58}
.vpn-copy-address{display:inline-grid;width:32px;height:32px;padding:0;place-items:center;border-radius:8px}.vpn-copy-address.is-copied{border-color:#16a34a;background:#dcfce7;color:#166534}.vpn-copy-address.is-copy-error{border-color:#dc2626;background:#fee2e2;color:#991b1b}
.vpn-project-assignment{display:inline-flex;min-width:310px;align-items:center;gap:8px}.vpn-project-assignment .form-select{min-width:190px}

/* Dauerhaftes VPN-Inventar: Der Statuspunkt bleibt auch bei horizontalem
   Scrollen eindeutig. Offline-Zeilen werden nur dezent eingefärbt, damit die
   gespeicherten technischen Werte weiterhin gut lesbar bleiben. */
.vpn-client-state{display:inline-grid;min-width:26px;min-height:26px;place-items:center;border-radius:50%;font-weight:800}
/* Eine td-Zelle darf nicht als Flexbox gerendert werden: Sonst zeichnet der
   Browser ihren unteren Rahmen unabhängig vom restlichen Tabellenraster. */
.vpn-client-table td:first-child{display:table-cell;vertical-align:middle}
.vpn-client-state-dot{display:inline-block;width:11px;height:11px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.14)}
.vpn-client-state.is-online{color:#166534}.vpn-client-state.is-offline{color:#b91c1c}
.vpn-client-state.is-offline .vpn-client-state-dot{background:#dc2626;box-shadow:0 0 0 4px rgba(220,38,38,.13)}
.vpn-signal{display:inline-flex;height:24px;align-items:flex-end;gap:3px;vertical-align:middle}.vpn-signal>span{display:block;width:5px;border-radius:2px 2px 0 0;background:#cbd5e1}.vpn-signal>span:nth-child(1){height:7px}.vpn-signal>span:nth-child(2){height:12px}.vpn-signal>span:nth-child(3){height:18px}.vpn-signal>span:nth-child(4){height:24px}.vpn-signal[data-level="1"]>span:nth-child(-n+1){background:#dc2626}.vpn-signal[data-level="2"]>span:nth-child(-n+2){background:#f59e0b}.vpn-signal[data-level="3"]>span:nth-child(-n+3),.vpn-signal[data-level="4"]>span:nth-child(-n+4){background:#16a34a}.vpn-signal-value{display:block;margin-top:3px;color:#64748b;font-size:.72rem;font-weight:700}.vpn-signal-unavailable{color:#94a3b8;font-weight:800}
.vpn-client-table tbody tr.vpn-row-offline{background:#fff7f7}.vpn-client-table tbody tr.vpn-row-offline:hover{background:#feecec}
.vpn-location-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:-12px 0 28px}.vpn-location-actions form{margin:0}
.vpn-location-summary{margin-bottom:34px;padding:24px;border:1px solid #cbd5e1;border-radius:18px;background:#fff;box-shadow:0 12px 32px rgba(15,23,42,.06)}
.vpn-location-summary dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0}.vpn-location-summary dl div{padding:14px 16px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}.vpn-location-summary dt{margin-bottom:5px;color:#64748b;font-size:.75rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.vpn-location-summary dd{margin:0;color:#0f2742;font-weight:750}
.vpn-location-history{margin-bottom:44px}.vpn-location-history .section-heading-row p{margin:4px 0 0;color:#64748b}.vpn-location-table{min-width:1280px}.vpn-location-table td small{display:block;margin-top:3px;color:#64748b}
@media(max-width:900px){.vpn-location-summary dl{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.vpn-location-summary dl{grid-template-columns:1fr}.vpn-location-actions{align-items:stretch;flex-direction:column}.vpn-location-actions>*{width:100%}.vpn-location-actions .btn{width:100%}}

.two-factor-setup {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.two-factor-qr svg {
    display: block;
    width: min(240px, 70vw);
    height: auto;
    padding: .75rem;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: .75rem;
}

.two-factor-key {
    display: inline-block;
    overflow-wrap: anywhere;
    font-size: 1rem;
}

.recovery-code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: .75rem;
}

.recovery-code-grid code {
    padding: .75rem;
    text-align: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: .5rem;
}
