/* ============================================================
   TurnierStream Design System
   Based on Ciblu Brand Identity (Pantone 7629 / Pantone 200)

   Story #682: Brand tokens, semantic color tokens and Bootstrap
   overrides are single-sourced in
   TurnierStream.Web.Shared/wwwroot/css/ciblu-tokens.css
   (linked BEFORE app.css in App.razor). This file must NOT
   redefine those tokens — it only contains VoD-specific styles
   that consume them via var(...).
   ============================================================ */

/* ============================================================
   AUSNAHMELISTE — erlaubte dynamische Inline-Styles (Story #732)
   ------------------------------------------------------------
   Grundregel: statische Layout-/Farbwerte gehören in eine CSS-Klasse
   (Abschnitt "KONSOLIDIERTE INLINE-STYLES" am Dateiende), NIE in ein
   style="…"-Attribut. Diese Liste ist der Ort der Wahrheit für die
   begründeten Ausnahmen — sie wird vom Guard-Test
   AdminInlineStyleGuardTests eingelesen und muss aktuell bleiben.

   Erlaubt bleibt ein Inline-Style ausschließlich, wenn der Wert zur
   LAUFZEIT aus Daten berechnet wird und deshalb nicht als statische
   Klasse ausdrückbar ist (kein CSS-Custom-Property-Umweg, der die
   Regel nur verschieben würde):

     1. StationDiagnosePanel.razor (Admin-Diagnose der Stationsdetailseite,
        Spec 040 §4.8) — Fortschrittsbalken im "Aktive Jobs"-Modal:
        style="width: @($"{progressPercent}%")"
        (0–100 aus StationJobResponse.ProgressPercent bzw. GetStatusProgress)
     2. AdminClipEditor.razor — Fortschrittsbalken des Clip-Backfills:
        style="width: @GetBackfillProgressPercent()%"

   Hinweis zur Story-Vorlage: #732 nannte als Balken-Träger
   "AdminStreamStationJobs/StationJobResultRenderer" — beide Dateien
   enthalten faktisch keinen Fortschrittsbalken (kein .progress-bar).
   Die obige Liste bildet den tatsächlichen Code ab.

   Alles andere in den Hotspot-Dateien ist bewusst klassifiziert; ein neuer
   statischer Inline-Style dort lässt den Guard-Test rot werden.
   ============================================================ */

/* ============================================================
   BASE ELEMENTS
   ============================================================ */

html {
    /* Story #677: safety net; root overflow causes fixed in the mobile breakpoints below */
    overflow-x: clip;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-accent);
    transition: color var(--transition-fast);
}

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

/* ============================================================
   LAYOUT
   ============================================================ */

.main-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    padding: 2rem 0;
}

.content-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */

.site-header {
    background: linear-gradient(135deg, var(--ciblu-primary), var(--ciblu-primary-800));
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-on-primary);
    text-decoration: none;
}

.header-brand:hover {
    color: var(--text-on-primary);
    text-decoration: none;
}

.header-brand-logo {
    height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
}

.header-brand-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
}

.header-brand-product {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.header-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-on-primary);
    text-decoration: none;
}

.header-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-on-primary);
}

.header-nav-link--disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.header-nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Mobile hamburger */
.header-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-on-primary);
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.header-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-mobile-toggle svg {
    width: 24px;
    height: 24px;
}

.header-nav-mobile {
    display: none;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.footer-container a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-container a:hover {
    color: var(--color-primary);
}

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

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

[data-bs-theme="ciblu"] .btn-primary {
    --bs-btn-bg: var(--ciblu-primary);
    --bs-btn-border-color: var(--ciblu-primary);
    --bs-btn-hover-bg: var(--ciblu-primary-700);
    --bs-btn-hover-border-color: var(--ciblu-primary-700);
    --bs-btn-active-bg: var(--ciblu-primary-800);
    --bs-btn-active-border-color: var(--ciblu-primary-800);
    --bs-btn-focus-shadow-rgb: var(--ciblu-secondary-rgb);
}

[data-bs-theme="ciblu"] .btn-outline-primary {
    --bs-btn-color: var(--ciblu-primary);
    --bs-btn-border-color: var(--ciblu-primary);
    --bs-btn-hover-bg: var(--ciblu-primary);
    --bs-btn-hover-border-color: var(--ciblu-primary);
    --bs-btn-active-bg: var(--ciblu-primary);
    --bs-btn-active-border-color: var(--ciblu-primary);
    --bs-btn-focus-shadow-rgb: var(--ciblu-secondary-rgb);
}

.btn-secondary {
    background: var(--surface-alt);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-on-primary);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-hover);
    border-color: var(--danger-hover);
}

.btn:focus,
.btn:active:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--ciblu-secondary-rgb), 0.25);
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================================
   ADMIN SUB-NAVIGATION
   ============================================================ */

.admin-page-breadcrumb {
    margin-bottom: 1rem;
}

.admin-page-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.admin-page-breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-page-breadcrumb li + li::before {
    content: "/";
    color: var(--text-muted);
}

.admin-page-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.admin-page-breadcrumb a:hover {
    color: var(--color-primary);
}

.admin-page-breadcrumb [aria-current="page"] {
    color: var(--text-primary);
    font-weight: 600;
}

/* Tab-Overflow-Entscheid (Story #713): einzeilige, horizontal scrollbare Leiste.
   Kein flex-wrap, keine Dropdown-Gruppierung — Tabs behalten bei 9 Zielen ihre feste
   Reihenfolge und Position. Die Region ist per tabindex="0" tastaturscrollbar. */
.admin-page-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.375rem;
    margin-bottom: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.admin-page-tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.admin-page-tabs:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.admin-page-tab-link:hover {
    background: var(--surface-alt);
    color: var(--color-primary);
    text-decoration: none;
}

.admin-page-tab-link.active {
    background: rgba(var(--ciblu-primary-rgb), 0.1);
    color: var(--color-primary);
}

/* ============================================================
   FORMS
   ============================================================ */

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-accent);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

/* ============================================================
   LIST GROUPS (e.g., Arena/Live Selection)
   ============================================================ */

.list-group-item.active,
.list-group-item.active:focus,
.list-group-item.active:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: var(--text-on-primary) !important;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background-color: rgba(var(--ciblu-primary-rgb), 0.06);
}

/* ============================================================
   SPINNER / LOADING
   ============================================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

/* ============================================================
   LIVE INDICATOR
   ============================================================ */

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: var(--danger);
    font-size: 0.875rem;
}

.live-indicator::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.live-card-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.live-card-info {
    flex: 1 1 auto;
    min-width: 0;
}

.live-card-logo-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.live-card-logo {
    display: block;
    width: auto;
    height: 3.2rem;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

.live-card {
    border-left: 4px solid var(--color-accent);
}

.live-card .live-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.live-card .live-card-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Upcoming List --- */

.upcoming-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    white-space: nowrap;
    overflow: hidden;
}

.upcoming-row .upcoming-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.upcoming-row .upcoming-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* --- Header Live Dot (smaller variant for nav) --- */
.header-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse-live 1.5s ease-in-out infinite;
    flex-shrink: 0;
    margin-left: 0.125rem;
}

/* ============================================================
   VIDEO PLAYER
   ============================================================ */

.ciblu-video-player {
    background: var(--media-chrome);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ciblu-video-player video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--media-stage);
}

.ciblu-video-player-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.ciblu-video-player-toolbar .btn-sm {
    padding: 0.2rem 0.75rem;
    font-size: 0.8125rem;
}

.ciblu-video-player-status {
    padding: 0.625rem 0.75rem;
    background: var(--warning-bg);
    color: var(--text-primary);
    border-left: 3px solid var(--warning);
    font-size: 0.875rem;
}

/* ============================================================
   MODAL / OVERLAY
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-custom {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--surface-alt);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width var(--transition-normal);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 420px;
    animation: slide-in-right 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.toast-success {
    border-left: 4px solid var(--success);
}

.toast.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.toast-close {
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.7;
    filter: invert(1);
}

.toast-close:hover {
    opacity: 1;
}

.toast.toast-fade-out {
    animation: fade-out-right 0.3s ease forwards;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fade-out-right {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* --- Modal Buttons --- */

.modal-content-custom .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.modal-content-custom h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-content-custom p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.modal-content-custom .modal-warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--warning);
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.skip-nav {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 999;
    background: var(--surface);
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-nav:focus {
    top: 1rem;
}

/* ============================================================
   ADMIN NAVIGATION
   ============================================================ */

.admin-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.admin-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0.25rem;
    align-items: stretch;
}

/* Dashboard-Link (kein Dropdown) */
.admin-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.admin-nav-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.admin-nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Dropdown-Gruppe */
.admin-nav-group {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.admin-nav-group-label {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    user-select: none;
}

/* Disclosure-Button: Button-Reset auf gemeinsame Label-Optik zurückführen. */
.admin-nav-group-button {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: inherit;
}

.admin-nav-group-label:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.admin-nav-group-label::after {
    content: "";
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-left: 0.4em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-0.15em);
    transition: transform var(--transition-fast);
}

/* Spec 040 §4.1: Klick statt Hover — der Chevron dreht nur bei geöffnetem Menü
   (aria-expanded=true nach Klick/Tipp/Enter/Space). */
.admin-nav-group-label[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(-0.15em);
}

.admin-nav-group-label[aria-expanded="true"],
.admin-nav-group-label.active {
    color: var(--color-primary);
}

.admin-nav-group-label.active {
    border-bottom-color: var(--color-primary);
}

/* Dropdown-Panel */
.admin-nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 100;
    padding: 0.25rem 0;
}

/* Spec 040 §4.1: sichtbar NUR bei expliziter Disclosure (aria-expanded=true bzw. .open) —
   kein Hover-Öffnen, das auf Touch-Geräten nie zuverlässig war. */
.admin-nav-group.open .admin-nav-dropdown,
.admin-nav-group-label[aria-expanded="true"] + .admin-nav-dropdown {
    display: flex;
}

@media (prefers-reduced-motion: reduce) {
    .admin-nav-group-label::after {
        transition: none;
    }
}

/* Dropdown-Items */
.admin-nav-dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.admin-nav-dropdown-item:hover {
    background: var(--surface-alt);
    color: var(--color-primary);
    text-decoration: none;
}

.admin-nav-dropdown-item.active {
    color: var(--color-primary);
    font-weight: 500;
    background: var(--surface-alt);
}

/* --- Klickbare Tabellenzeilen als echte Navigationslinks --- */

/* Zeile mit zeilenfüllendem Navigations-Link: die primäre Zelle enthält ein <a>,
   dessen ::after-Overlay die ganze Zeile klickbar macht (Ctrl/Middle-Click-fähig,
   tastaturfokussierbar). Verschachtelte interaktive Elemente bleiben bedienbar,
   da sie per position/z-index über dem Overlay liegen. */
tr.row-link {
    position: relative;
    cursor: pointer;
}

.row-link-cell {
    position: static;
}

a.stretched-row-link {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

a.stretched-row-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}

a.stretched-row-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

a.stretched-row-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

/* Interaktive Elemente innerhalb einer Zeile mit zeilenfüllendem Link müssen über
   dem Overlay liegen, damit sie eigenständig klickbar bleiben. */
tr.row-link button,
tr.row-link a:not(.stretched-row-link),
tr.row-link input,
tr.row-link select,
tr.row-link label {
    position: relative;
    z-index: 2;
}

/* --- Admin Dashboard: Handlungsblock "Offene Fälle" (Story #727) --- */

.admin-open-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
}

.admin-open-case {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
    min-height: 24px;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    transition: box-shadow var(--transition-normal);
}

.admin-open-case:hover {
    box-shadow: var(--shadow-md);
    color: inherit;
    text-decoration: none;
}

.admin-open-case:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.admin-open-case--open {
    border-left-color: var(--warning);
    background: var(--warning-bg);
}

.admin-open-case__count {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--color-primary);
}

.admin-open-case--open .admin-open-case__count {
    color: var(--warning);
}

.admin-open-case__label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.admin-open-case__hint {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* --- Admin Dashboard: Live-Betriebsstatus (Story #727) --- */

.admin-live-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.admin-live-status__panel {
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.admin-live-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
}

.admin-live-item:hover {
    background: var(--surface-alt);
    color: inherit;
    text-decoration: none;
}

.admin-live-item:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.admin-live-item__title {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-live-item__meta {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Admin Dashboard Cards --- */

.admin-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.admin-card-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.admin-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.admin-card-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.admin-card-hint {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.admin-streamstation-download {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    color: var(--text-on-primary);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 34%),
        linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: var(--shadow-md);
}

.admin-streamstation-download h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    color: inherit;
}

.admin-streamstation-download code {
    color: inherit;
}

.admin-streamstation-download__eyebrow {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.admin-streamstation-download h2 + .admin-streamstation-download__entry {
    margin-top: 0.25rem;
}

.admin-streamstation-download__entry {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
}

.admin-streamstation-download__content {
    min-width: 0;
}

.admin-streamstation-download__label {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: inherit;
}

.admin-streamstation-download__button {
    white-space: nowrap;
    color: var(--color-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .admin-nav-container {
        padding: 0 1rem;
        flex-wrap: wrap;
    }

    .admin-nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .admin-nav-group-label {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .admin-dashboard-cards {
        grid-template-columns: 1fr;
    }

    .admin-streamstation-download__entry {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-streamstation-download__button {
        width: 100%;
    }
}

/* ============================================================
   DISCIPLINE TABLE (Drag & Drop)
   ============================================================ */

.discipline-drag-handle {
    cursor: grab;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    font-size: 1.125rem;
    user-select: none;
    line-height: 1;
}

.discipline-drag-handle:active {
    cursor: grabbing;
}

.discipline-row-dragging {
    opacity: 0.5;
    background: var(--surface-alt);
}

.discipline-row-dragover {
    border-top: 2px solid var(--color-accent);
}

/* ============================================================
   SPONSOR TABLE (Drag & Drop)
   ============================================================ */

.sponsor-drag-handle {
    cursor: grab;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    font-size: 1.125rem;
    user-select: none;
    line-height: 1;
}

.sponsor-drag-handle:active {
    cursor: grabbing;
}

.sponsor-row-dragging {
    opacity: 0.5;
    background: var(--surface-alt);
}

.sponsor-row-dragover {
    border-top: 2px solid var(--color-accent);
}

.sponsor-row-editing {
    outline: 2px solid var(--ciblu-primary);
    outline-offset: -1px;
    background: rgba(var(--ciblu-primary-rgb), 0.04);
}

/* ============================================================
   BLAZOR ERROR UI
   ============================================================ */

#blazor-error-ui {
    background: var(--danger);
    color: var(--text-on-primary);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 0.75rem;
    text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
    .site-content { padding: 1.5rem 0; }
    .content-container { padding: 0 1.25rem; }
    .card { padding: 1.25rem; }
}

@media (max-width: 768px) {
    .header-container {
        height: 60px;
    }

    .header-brand-logo {
        height: 36px;
    }

    .header-brand-divider,
    .header-brand-product {
        display: none;
    }

    .header-nav {
        display: none;
    }

    .header-mobile-toggle {
        display: flex;
    }

    .header-nav-mobile.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--ciblu-primary);
        box-shadow: var(--shadow-lg);
        padding: 0.5rem;
        z-index: 99;
    }

    .header-nav-mobile .header-nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        width: 100%;
    }

    .site-content {
        padding: 1rem 0;
    }

    .content-container {
        padding: 0 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-page-tabs {
        gap: 0.375rem;
        margin-bottom: 1rem;
    }

    .admin-page-tab-link {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 0.25rem;
    }

    /* Home: Live card mobile — Story #677: constrain logo width to prevent horizontal overflow */
    .live-card-body { padding: 1rem; }
    .live-card .live-card-title { font-size: 1.1rem; }
    .live-card .live-card-info { flex: 1 1 0; min-width: 0; }
    .live-card-logo { height: 2.9rem; max-width: 6rem; }
    .live-card .btn { width: 100%; }

    /* Touch-targets */
    .btn { min-height: 44px; }
    .form-select, .form-control { min-height: 44px; }
    .list-group-item-action { min-height: 44px; display: flex; align-items: center; }
    .ciblu-btn-download { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 576px) {
    body { font-size: 1rem; }
    .site-content { padding: 0.75rem 0; }
    .content-container { padding: 0 0.75rem; }
    .card { padding: 1rem; }
    .upcoming-row { flex-wrap: wrap; white-space: normal; }
    .upcoming-row .upcoming-meta { flex-basis: 100%; font-size: 0.8125rem; }
    .footer-separator { display: none; }
    .ciblu-badge, .ciblu-badge-soft { font-size: 0.75rem; padding: 0.2rem 0.625rem; }
    .page-header h1 { font-size: 1.25rem; }

    /* Story #677: clip-list-row compact wraps at 375px — ensure text area doesn't shrink below min width */
    .clip-list-row-compact { flex-wrap: wrap; }
    .clip-list-row-compact .clip-tile-link { min-width: 0; max-width: 100%; }
}

/* ============================================================
   MINIMAL LAYOUT (Clip View)
   ============================================================ */

.minimal-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Clip View Page --- */

.clip-view-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.clip-view-player {
    margin-bottom: 1.5rem;
}

.clip-view-info {
    padding: 0 0.25rem;
}

.clip-view-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.clip-view-horse {
    font-weight: 400;
    color: var(--text-secondary);
}

.clip-view-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.clip-view-meta-separator {
    color: var(--text-muted);
}

.clip-view-message {
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: 480px;
    margin: 0 auto;
}

.clip-view-message h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}

.clip-view-message p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.clip-view-message-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.clip-view-message-icon--error {
    background: var(--danger-bg);
    color: var(--danger);
}

.clip-view-message-icon--warning {
    background: var(--warning-bg);
    color: var(--warning);
}

/* --- Share Link in Admin --- */

.share-link-group {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.share-link-group .form-control {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    max-width: 220px;
}

@media (max-width: 768px) {
    .clip-view-message {
        padding: 2rem 1rem;
    }

    .share-link-group .form-control {
        max-width: 160px;
    }
}

/* ============================================================
   CIBLU COMPONENT CLASSES
   Used across Videos, VideosRider, VideosHorse, Live pages
   ============================================================ */

.ciblu-alert {
    background: rgba(var(--ciblu-primary-rgb), 0.06);
    border: 1px solid rgba(var(--ciblu-primary-rgb), 0.12);
    color: var(--text-primary);
    border-radius: var(--radius-md);
}

.ciblu-badge {
    background: var(--color-primary);
    color: var(--text-on-primary);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.ciblu-badge-soft {
    background: rgba(var(--ciblu-primary-rgb), 0.10);
    color: var(--color-primary);
    border: 1px solid rgba(var(--ciblu-primary-rgb), 0.20);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Semantische ciblu-badge-Varianten (STYLEGUIDE §4).
   Dunkler Text auf hellem Tint → gemessener Kontrast weit über 4.5:1
   (Warnung: --text-primary auf --warning-bg = 17.5:1;
    Neutral: --text-primary auf --surface-alt = 14.6:1). */
.ciblu-badge-warning {
    background: var(--warning-bg);
    color: var(--text-primary);
    border: 1px solid var(--warning);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.ciblu-badge-neutral {
    background: var(--surface-alt);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* ------------------------------------------------------------
   Zustandsflächen: Empty / Error (Story #724)

   .admin-state-block ist die geteilte Basis des Baukastens (AdminEmptyState/
   AdminErrorState). Die beiden historisch konkurrierenden Klassen
   .ciblu-empty-state und .empty-state-container bleiben als Aliase erhalten —
   sie werden von ~28 noch nicht migrierten Razor-Dateien benutzt, ein Rename
   wäre eine stille visuelle Regression.

   Nur die Rahmen-/Flächenregeln (background/border/padding/text-align) gelten für
   alle drei Selektoren. Die svg/h3/p-Regeln gelten bewusst NUR für
   .admin-state-block und .empty-state-container: .ciblu-empty-state hatte sie noch
   nie, und sie nachträglich dorthin zu ziehen wäre eine visuelle Änderung auf den
   noch nicht migrierten Seiten (AC9: keine Regression außerhalb der Migration).
   AdminComponentKitCssGuardTests friert das ein.
   ------------------------------------------------------------ */

.admin-state-block,
.ciblu-empty-state,
.empty-state-container {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.admin-state-block svg,
.empty-state-container svg {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.admin-state-block h3,
.empty-state-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.admin-state-block p,
.empty-state-container p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Aktionszeile im Empty-/Error-State — der Recovery-Pfad (ui-foundations: kein Dead-End). */
.admin-state-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Fehler-Zustand: Icon in Warnfarbe, damit er sich vom neutralen Empty-State abhebt.
   Status ist zusätzlich über role="alert" und den Text erkennbar, nie nur über Farbe. */
.admin-error-state svg {
    color: var(--danger);
}

/* ------------------------------------------------------------
   Bulk-Aktionsleiste des AdminDataTable (Story #724)
   Erscheint erst ab einer Selektion; nennt die Anzahl und die primäre Aktion.
   ------------------------------------------------------------ */

.admin-bulk-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--surface-alt);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.75rem;
}

.admin-bulk-bar .admin-bulk-count {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.admin-bulk-bar .admin-bulk-errors {
    width: 100%;
    margin: 0;
    padding-left: 1.25rem;
    color: var(--danger);
    font-size: 0.8125rem;
}

/* ------------------------------------------------------------
   Duale Select-All-Leiste (Story #725, AC4)
   Bietet "Seite" und "Alle N im Filter" getrennt an, sobald Paging aktiv ist.
   ------------------------------------------------------------ */

.admin-selectall-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.25rem 0 0.5rem;
    font-size: 0.8125rem;
}

/* Mengenangaben werden verglichen ("12 von 347") — tabular-nums verhindert das
   Springen der Ziffernbreite beim Seitenwechsel (ui-foundations MUST). */
.admin-item-count {
    font-variant-numeric: tabular-nums;
}

/* Sortier-Header: der ganze Spaltenkopf ist ein Button (admin-density MUST),
   sieht aber wie ein Tabellenkopf aus. */
.admin-sort-header {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.admin-sort-header .admin-sort-arrow {
    color: var(--text-muted);
}

/* Zahlenspalten rechtsbündig mit tabular-nums (admin-density MUST). */
.admin-cell-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Schmale Statusspalte (Punkt/Badge ohne Titel). */
.admin-col-narrow {
    width: 32px;
}

/* Filter-Chips: aktive Filter sichtbar und einzeln entfernbar. */
.admin-filter-chips {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.admin-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--surface-alt);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.125rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Hit-Target >= 24px trotz kleinem Visual (ui-foundations). */
.admin-filter-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    background: none;
    border: 0;
    padding: 0;
    color: var(--text-muted);
    cursor: pointer;
}

.admin-filter-chip-remove:hover {
    color: var(--text-primary);
}

/* ============================================================
   ACCESSIBILITY (Story #706)
   ============================================================ */

/* Skip-to-content-Link (WCAG 2.4.1) — analog PublicSite (.skip-nav).
   Erstes fokussierbares Element im AdminLayout; off-screen bis :focus. */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1100;
    background: var(--surface);
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-nav:focus {
    top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    .skip-nav {
        transition: none;
    }
}

/* Sticky Tabellen-Header (admin-density MUST) — scrollender Container mit
   begrenzter Höhe hält den <thead> sichtbar. Fokusring darf nicht verdeckt
   werden: der sticky Header liegt unter fokussierten Zeilen-Controls (z-index). */
.admin-table-sticky-wrap {
    max-height: 70vh;
    overflow-y: auto;
}

.admin-table-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-alt);
}

/* ============================================================
   ANALYTICS CHART DATENZUSAMMENFASSUNG (Story #706)
   ============================================================ */

/* SR-lesbare/dezente Datentabelle als Alternative zum SVG-Chart (WCAG 1.1.1).
   <details> bleibt sichtbar zuklappbar; Tabelle scrollt bei vielen Tagen. */
.analytics-chart-summary {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.analytics-chart-summary > summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
}

.analytics-chart-summary .table-responsive {
    max-height: 16rem;
    overflow-y: auto;
    margin-top: 0.5rem;
}

/* ============================================================
   WIZARD STEP-INDICATOR (Story #706)
   ============================================================ */

.admin-wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.admin-wizard-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-wizard-step__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.admin-wizard-step--current {
    border-color: var(--color-primary);
    background: rgba(var(--ciblu-primary-rgb), 0.08);
    color: var(--text-primary);
    font-weight: 600;
}

.admin-wizard-step--current .admin-wizard-step__index {
    background: var(--color-primary);
    color: var(--text-on-primary);
    border-color: var(--color-primary);
}

.admin-wizard-step--done {
    border-color: var(--success);
    color: var(--text-primary);
}

.admin-wizard-step--done .admin-wizard-step__index {
    background: var(--success);
    color: var(--text-on-primary);
    border-color: var(--success);
}

/* ============================================================
   STREAMSTATION OPERATIONS UI
   ============================================================ */

.streamstation-dashboard-cards {
    align-items: stretch;
}

.streamstation-kpi-card {
    position: relative;
    overflow: hidden;
}

.streamstation-kpi-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ciblu-primary), var(--ciblu-secondary));
}

.streamstation-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.streamstation-section-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.streamstation-section-header p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
}

.streamstation-presence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

/* Live-Cockpit (Story #739) — Zielmodell-Leiste + geteilte Aktionsleiste + Live-Kacheln */
.streamstation-cockpit {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.streamstation-cockpit__toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.streamstation-action-bar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.streamstation-action-bar__target {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.streamstation-action-bar__feedback {
    background: var(--surface-alt);
    border-radius: var(--radius-md, 0.5rem);
    padding: 0.6rem 0.85rem;
}

.streamstation-action-bar__results {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.streamstation-live-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.streamstation-live-tile {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.streamstation-live-tile.is-inactive {
    opacity: 0.75;
}

.streamstation-live-tile.is-selected {
    border-color: var(--ciblu-primary);
    box-shadow: 0 0 0 2px var(--ciblu-primary);
}

.streamstation-live-tile__head {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    min-width: 0;
}

.streamstation-live-tile__identity {
    min-width: 0;
    flex: 1;
}

.streamstation-live-tile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.streamstation-live-tile__facts {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0;
}

.streamstation-live-tile__fact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.streamstation-live-tile__fact dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    font-weight: 600;
}

.streamstation-live-tile__fact dd {
    margin: 0;
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

.streamstation-live-tile__upload {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.75rem;
}

.streamstation-live-tile__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}

.streamstation-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.streamstation-progress-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.streamstation-progress-card__header,
.streamstation-progress-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.streamstation-progress-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.streamstation-progress-card__meta {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.streamstation-progress-card__body {
    display: flex;
    flex-direction: column;
}

.streamstation-progress-bar {
    height: 0.7rem;
    background: var(--surface-alt);
    border-radius: 999px;
    overflow: hidden;
}

.streamstation-progress-card__footer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.streamstation-presence-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.streamstation-presence-card.is-active {
    border-color: rgba(46, 125, 50, 0.35);
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.10);
}

.streamstation-presence-card.is-inactive {
    border-color: rgba(92, 100, 114, 0.35);
    background: linear-gradient(180deg, var(--surface), var(--surface-faint));
}

.streamstation-presence-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.streamstation-presence-card__title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
}

.streamstation-presence-card__meta {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.streamstation-presence-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.streamstation-presence-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Story #738 Teil A — geteilte StreamStation-Baukastenkomponenten
   (StationBadge / StationPresenceLine / StationJobStatusLine). Bewusst nur Layout: Farben und
   Abstände kommen aus den bestehenden Tokens, damit Leitstand und Jobs-Ziele identisch aussehen. */

.streamstation-badge--compact {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
}

.streamstation-presence-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.streamstation-job-status {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.streamstation-job-status__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.streamstation-job-status__hint {
    line-height: 1.35;
}

.streamstation-insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
    gap: 1rem;
}

.streamstation-device-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.streamstation-device-list__item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.9rem 0;
    border-top: 1px solid var(--border-subtle);
}

.streamstation-device-list__item:first-child {
    padding-top: 0;
    border-top: none;
}

.streamstation-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.streamstation-multi-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem;
    max-height: 12rem;
    overflow-y: auto;
    padding: 0.25rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.streamstation-multi-select-option {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid transparent;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}

.streamstation-multi-select-option:hover {
    border-color: rgba(var(--ciblu-secondary-rgb), 0.25);
}

.streamstation-multi-select-option input {
    margin-top: 0.2rem;
}

.streamstation-context-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.streamstation-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.streamstation-log-entry {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
}

.streamstation-log-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

.streamstation-log-entry__message {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.streamstation-log-entry__exception {
    margin: 0.5rem 0 0;
    padding: 0.875rem;
    border-radius: var(--radius-sm);
    background: var(--surface-inverse);
    color: var(--text-on-inverse);
    font-size: 0.8125rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 992px) {
    .streamstation-insights-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .streamstation-section-header,
    .streamstation-progress-card__header,
    .streamstation-progress-card__footer,
    .streamstation-presence-card__header,
    .streamstation-presence-card__footer,
    .streamstation-device-list__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .streamstation-quick-actions {
        grid-template-columns: 1fr;
    }

    .streamstation-log-entry,
    .streamstation-progress-card,
    .streamstation-presence-card {
        padding: 1rem;
    }
}

.ciblu-link {
    color: var(--color-accent);
    transition: color var(--transition-fast);
}

.ciblu-link:hover {
    color: var(--color-primary);
}

.ciblu-icon-inline {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 0.125rem;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.ciblu-link:hover .ciblu-icon-inline {
    opacity: 1;
}

/* ============================================================
   CLIP-KACHEL (Story #768) - gemeinsames Muster aller Clip-Darstellungen
   (ClipCard, ClipListRowCompact, Highlights, Gerade aufgenommen,
   Starterkarte). Block ist in AdminSite- und PublicSite-app.css identisch
   (ClipTileCssParityTests).
   - Ein Primaerelement (.clip-tile-link) deckt per ::after die ganze Kachel ab.
   - Sekundaere Ziele liegen darueber: Namenslinks (.clip-tile-name, inline im
     Text, keine Extrazeile) und Aktionen (.clip-tile-above, >= 44px hoch).
   - Fokusring um die ganze Kachel (:has), nicht am Thumbnail abgeschnitten.
   ============================================================ */
.clip-tile {
    position: relative;
}

.clip-tile-link {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: start;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

.clip-tile-link:hover {
    color: var(--text-primary);
}

.clip-tile-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.clip-tile .clip-tile-link:focus-visible {
    outline: none;
}

.clip-tile:has(.clip-tile-link:focus-visible) {
    outline: 3px solid var(--ciblu-secondary);
    outline-offset: 2px;
}

@supports not selector(:has(*)) {
    .clip-tile .clip-tile-link:focus-visible::after {
        outline: 3px solid var(--ciblu-secondary);
        outline-offset: -3px;
    }
}

.clip-tile-title {
    overflow-wrap: anywhere;
}

.clip-tile:hover:not(:has(.clip-tile-above:hover, .clip-tile-name:hover)) .clip-tile-title,
.clip-tile:has(.clip-tile-link:focus-visible) .clip-tile-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Sekundaere Ziele (Teilen, ActionContent) ueber der Klickflaeche */
.clip-tile-above,
.clip-tile-actions {
    position: relative;
    z-index: 2;
}

/* Namenslink (Reiter-/Pferdeseite): der sichtbare Name selbst, inline im Text ueber der
   Klickflaeche. Keine min-height (Ausnahme Inline-Ziel, WCAG 2.5.8) - die Zeile waechst nicht.
   Dezente Dauer-Unterstreichung macht ihn als Link erkennbar, kraeftig bei Hover/Fokus. */
.clip-tile-name {
    position: relative;
    z-index: 2;
    display: inline;
    color: inherit;
    text-decoration: underline dotted;
    text-decoration-color: var(--text-secondary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.clip-tile-name:focus-visible {
    outline: 3px solid var(--ciblu-secondary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.clip-tile-name:hover,
.clip-tile-name:focus-visible {
    color: inherit;
    text-decoration-style: solid;
    text-decoration-color: currentColor;
}

/* Aktive Kachel (Inline-Player der Token-Seiten): Rahmen + Text, nie nur Farbe */
.clip-tile--active::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border: 2px solid var(--ciblu-primary);
    border-radius: inherit;
    pointer-events: none;
}

.clip-tile-now-playing {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ciblu-primary);
}

/* Gemeinsames Vorschaubild (ClipThumb.razor) */
.clip-thumb {
    --clip-play-size: 48px;
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(180deg, var(--surface-inverse) 0%, var(--media-chrome) 50%, var(--ciblu-primary-800) 100%);
}

.clip-thumb--card {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.clip-thumb--live {
    background: linear-gradient(180deg, var(--media-chrome) 0%, var(--surface-inverse) 55%, var(--ciblu-primary-700) 100%);
}

.clip-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

/* Play-Kreis: immer sichtbar. Volle Flaeche --media-chrome + heller Ring -
   Kontrast unabhaengig vom Bildinhalt (Icon 18.9:1; Ring bzw. Flaeche >= 3:1 auf hell UND dunkel). */
.clip-thumb-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--clip-play-size);
    height: var(--clip-play-size);
    margin: calc(var(--clip-play-size) / -2) 0 0 calc(var(--clip-play-size) / -2);
    border-radius: 50%;
    background: var(--media-chrome);
    box-shadow: 0 0 0 2px var(--text-on-primary);
    color: var(--text-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.clip-thumb-play svg {
    width: 55%;
    height: 55%;
}

.clip-tile:hover:not(:has(.clip-tile-above:hover, .clip-tile-name:hover)) .clip-thumb-play,
.clip-tile:has(.clip-tile-link:focus-visible) .clip-thumb-play {
    background: var(--ciblu-primary);
}

.clip-tile:hover:not(:has(.clip-tile-above:hover, .clip-tile-name:hover)) .clip-thumb-img {
    transform: scale(1.03);
}

.clip-tile:has(.clip-tile-link:active) .clip-thumb-play {
    background: var(--ciblu-primary-800);
}

.clip-tile:has(.clip-tile-link:active) {
    transform: scale(0.99);
}

.clip-thumb-top {
    position: absolute;
    left: 6px;
    top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    height: 18px;
    padding: 0 0.375rem;
    border-radius: 4px;
    background: var(--surface);
    color: var(--ciblu-primary);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.clip-thumb-top--live {
    background: var(--ciblu-secondary);
    color: var(--text-on-primary);
}

.clip-thumb-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-on-primary);
}

.clip-thumb-band {
    position: absolute;
    left: 0;
    bottom: 6px;
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 0.375rem 0 0.3125rem;
    border-radius: 0 3px 3px 0;
    background: var(--ciblu-primary);
    color: var(--text-on-primary);
    font-size: 0.6875rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Dauer-Badge: volle Flaeche statt --overlay - Weiss auf halbtransparentem Schwarz fiel ueber
   hellen Bildern auf 3.95:1 (< 4.5:1); auf --media-chrome 18.9:1. */
.clip-thumb-duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 0.3125rem;
    border-radius: 3px;
    background: var(--media-chrome);
    color: var(--text-on-primary);
    font-size: 0.6875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .clip-tile,
    .clip-thumb-img,
    .clip-thumb-play {
        transition: none;
    }

    .clip-tile:has(.clip-tile-link:active),
    .clip-tile:hover .clip-thumb-img {
        transform: none;
    }
}

/* Kompakte Zeile (ClipListRowCompact): ganze Zeile klickbar, Thumbnail 16:9 (96x54) */
.clip-list-row-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.clip-thumb--row {
    --clip-play-size: 30px;
    flex: none;
    width: 96px;
    border-radius: var(--radius-sm);
}

.clip-list-row-compact .clip-tile-link {
    flex: 1 1 0;
    display: block;
    min-width: 0;
    min-height: 44px;
}

.clip-list-row-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
}

.clip-list-row-meta {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
/* === Ende Clip-Kachel (Story #768) === */

/* --- Compact Download Buttons --- */
.ciblu-btn-download {
    min-width: 2.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

/* ── Legal pages (Datenschutz, Impressum) ── */

.legal-content {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-sm);
}

.legal-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
}

.legal-content h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem;
}

.legal-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
}

.legal-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.legal-content ul {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.legal-content a:hover {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .legal-content {
        padding: 1.5rem 1.25rem;
    }
}

/* ============================================================
   UTILITY CLASSES (replacing recurring inline styles)
   ============================================================ */

/* --- Max-Width Utilities --- */
.mw-120 { max-width: 120px; }
.mw-150 { max-width: 150px; }
.mw-160 { max-width: 160px; }
.mw-200 { max-width: 200px; }
.mw-600 { max-width: 600px; }

/* --- Cursor --- */
.cursor-pointer { cursor: pointer; }

/* --- Scrollable Container --- */
.scrollable-sm { max-height: 400px; overflow-y: auto; }

/* --- Compact Table --- */
.table-compact { font-size: 0.85rem; }
.table-compact-xs { font-size: 0.8rem; }

/* --- Image Thumbnails (admin logos, sponsors) --- */
.img-thumb-sm { max-height: 30px; max-width: 60px; }
.img-thumb-md { max-height: 40px; max-width: 120px; }
.img-thumb-lg { max-height: 60px; max-width: 200px; }
.img-thumb-xl { max-height: 80px; max-width: 300px; }

/* --- Drag Handle (disabled state) --- */
.drag-handle-disabled { opacity: 0.3; cursor: default; }

/* --- Inline Button Compact --- */
.btn-compact { font-size: 0.7rem; }

/* ============================================================
   ANALYTICS
   ============================================================ */

.analytics-kpi-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* Story #730: der Turnier-Report zeigt 4 KPIs pro Zeile (vorher Bootstrap col-xl-3).
   Muss VOR den responsiven Regeln unten stehen — die bleiben für schmale Schirme führend. */
.analytics-kpi-cards--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.analytics-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.analytics-kpi-card--accent {
    border-left: 3px solid var(--color-accent);
}

/* Story #730: KPI-Karte darf zwei Rasterspalten belegen (Report-Geräteverteilung ist Fließtext,
   keine Zahl). Nur dort, wo überhaupt mehrspaltig gerastert wird — darunter ist span 2 sinnlos. */
@media (min-width: 1201px) {
    .analytics-kpi-card--wide {
        grid-column: span 2;
    }
}

.analytics-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
}

/* Fließtext-KPI (z.B. "Desktop 41% · Mobil 52% · Tablet 7%") statt einer großen Zahl. */
.analytics-kpi-value-sm {
    font-size: 1.125rem;
    line-height: 1.4;
}

.analytics-kpi-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.analytics-chart-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.analytics-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.analytics-chart-grid {
    stroke: var(--border-subtle);
    stroke-width: 1;
}

.analytics-chart-label {
    font-size: 11px;
    fill: var(--text-muted);
    font-family: system-ui, -apple-system, sans-serif;
}

.analytics-bar-pv {
    fill: var(--color-primary);
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.analytics-bar-pv:hover {
    opacity: 1;
}

.analytics-bar-uv {
    fill: var(--color-accent);
    opacity: 0.65;
    transition: opacity var(--transition-fast);
}

.analytics-bar-uv:hover {
    opacity: 1;
}

.analytics-bar-feedback-up {
    fill: var(--success);
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.analytics-bar-feedback-up:hover {
    opacity: 1;
}

.analytics-bar-feedback-down {
    fill: var(--danger);
    opacity: 0.75;
    transition: opacity var(--transition-fast);
}

.analytics-bar-feedback-down:hover {
    opacity: 1;
}

.analytics-tooltip-label {
    cursor: help;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--border-color);
    text-underline-offset: 0.18em;
}

.analytics-stacked-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.analytics-stacked-bar__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.analytics-stacked-bar__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.analytics-stacked-bar__total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.analytics-stacked-bar__svg {
    display: block;
    width: 100%;
    height: 28px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.analytics-stacked-bar__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.analytics-stacked-bar__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.analytics-stacked-bar__swatch {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.analytics-stacked-bar__legend-label {
    font-weight: 600;
    color: var(--text-primary);
}

.analytics-stacked-bar__legend-value,
.analytics-stacked-bar__legend-percent {
    white-space: nowrap;
}

.analytics-stacked-bar__swatch.analytics-bar-pv {
    background: var(--color-primary);
    opacity: 0.85;
}

.analytics-stacked-bar__swatch.analytics-bar-uv {
    background: var(--color-accent);
    opacity: 0.65;
}

.analytics-bar-desktop {
    fill: var(--color-primary);
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.analytics-bar-mobile {
    fill: var(--color-accent);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.analytics-bar-tablet {
    fill: var(--info);
    opacity: 0.75;
    transition: opacity var(--transition-fast);
}

.analytics-stacked-bar__swatch.analytics-bar-desktop {
    background: var(--color-primary);
    opacity: 0.85;
}

.analytics-stacked-bar__swatch.analytics-bar-mobile {
    background: var(--color-accent);
    opacity: 0.8;
}

.analytics-stacked-bar__swatch.analytics-bar-tablet {
    background: var(--info);
    opacity: 0.75;
}

.analytics-stacked-bar__swatch.analytics-bar-feedback-up {
    background: var(--success);
    opacity: 0.85;
}

.analytics-stacked-bar__swatch.analytics-bar-feedback-down {
    background: var(--danger);
    opacity: 0.75;
}

.analytics-bar-desktop:hover,
.analytics-bar-mobile:hover,
.analytics-bar-tablet:hover {
    opacity: 1;
}

/* ============================================================
   API-DOKUMENTATION
   ============================================================ */

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

.api-overview-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.api-overview-card:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--ciblu-secondary-rgb), 0.35);
}

.api-overview-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.api-overview-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.api-overview-title {
    margin: 0.25rem 0 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.api-overview-description {
    margin: 0;
    color: var(--text-secondary);
}

.api-overview-link {
    color: var(--color-accent);
    font-weight: 600;
}

.api-auth-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.api-auth-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.api-endpoint-accordion .accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.api-endpoint-accordion .accordion-item + .accordion-item {
    margin-top: 1rem;
}

.api-endpoint-accordion .accordion-button {
    background: var(--surface);
    color: var(--text-primary);
    gap: 1rem;
}

.api-endpoint-accordion .accordion-button:not(.collapsed) {
    background: var(--surface-alt);
    box-shadow: none;
}

.api-endpoint-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--ciblu-secondary-rgb), 0.15);
}

.api-endpoint-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.api-method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.api-method-badge--get {
    background: var(--success-bg);
    color: var(--success);
}

.api-method-badge--post {
    background: var(--info-bg);
    color: var(--info);
}

.api-method-badge--put {
    background: var(--warning-bg);
    color: var(--warning);
}

.api-method-badge--delete {
    background: var(--danger-bg);
    color: var(--danger);
}

.api-method-badge--default {
    background: var(--surface-alt);
    color: var(--text-secondary);
}

.api-route-code {
    font-size: 0.875rem;
    color: var(--color-primary);
    word-break: break-word;
}

.api-endpoint-summary {
    color: var(--text-secondary);
}

.api-endpoint-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.api-response-list {
    display: grid;
    gap: 1rem;
}

.api-response-card {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.api-response-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.api-response-description {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.api-schema-card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.api-schema-card--compact {
    background: var(--surface-alt);
}

.api-schema-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.75rem;
}

.api-schema-card-title {
    font-weight: 700;
    color: var(--text-primary);
}

.api-schema-card-description {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.api-schema-type {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

.api-schema-table th {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 700;
}

.api-schema-table td code,
.api-response-card code,
.api-endpoint-meta code {
    color: var(--color-primary);
}

.api-field-description {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.api-nested-details {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    padding: 0.625rem 0.75rem;
}

.api-nested-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
}

.api-schema-empty {
    padding: 0.875rem 1rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .api-overview-card-header,
    .api-schema-card-header,
    .api-response-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .api-endpoint-header {
        align-items: flex-start;
    }
}

.analytics-kpi-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .analytics-kpi-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .analytics-kpi-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .analytics-kpi-cards {
        grid-template-columns: 1fr;
    }

    .analytics-kpi-value {
        font-size: 1.5rem;
    }
}

/* --- Hourly Distribution Bar Chart --- */

.analytics-hourly-bar {
    fill: var(--color-accent);
    opacity: 0.75;
    transition: opacity var(--transition-fast);
}

.analytics-hourly-bar:hover {
    opacity: 1;
}

/* ============================================================
   DRUCKANSICHT
   ============================================================ */

@media print {
    .site-header,
    .site-footer,
    .admin-nav,
    .btn {
        display: none !important;
    }

    body {
        background: var(--surface);
        color: var(--text-primary);
        font-size: 11pt;
    }

    .site-content,
    .content-container {
        padding: 0 !important;
        max-width: none !important;
    }

    .card,
    .analytics-kpi-card,
    .table-responsive {
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
    }

    .analytics-kpi-card,
    .table {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .table-light,
    .table-light > th,
    .table-light > td,
    .table > :not(caption) > * > * {
        background: var(--surface) !important;
        color: var(--text-primary) !important;
    }
}

/* ============================================================
   ANNOUNCEMENT BANNER (Landing Page)
   ============================================================ */

.announcement-banner {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.announcement-banner p:last-child {
    margin-bottom: 0;
}

.announcement-banner a {
    color: var(--color-accent);
    text-decoration: underline;
}

.announcement-banner a:hover {
    color: var(--color-primary);
}

/* ============================================================
   FEEDBACK WIDGET (Public Footer)
   ============================================================ */

.feedback-widget {
    position: relative;
    display: inline-flex;
}

.feedback-trigger {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
    font-family: inherit;
    line-height: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.feedback-smiley {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.feedback-trigger:hover {
    color: var(--color-primary);
}

/* Header variant — nav-link style button with icon and label */
.feedback-trigger--header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.feedback-trigger--header .feedback-smiley {
    width: 20px;
    height: 20px;
}

.feedback-trigger--header:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-on-primary);
}

/* Header widget: popup opens downward */
.feedback-widget--header {
    display: flex;
    align-items: center;
}

.feedback-widget--header .feedback-popup {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 0.5rem;
    animation: feedback-slide-down var(--transition-normal) ease-out;
}

@keyframes feedback-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-backdrop {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: transparent;
}

.feedback-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    z-index: 251;
    width: 320px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    margin-bottom: 0.5rem;
    animation: feedback-slide-up var(--transition-normal) ease-out;
}

@keyframes feedback-slide-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feedback-close-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.feedback-close-btn:hover {
    color: var(--text-primary);
}

.feedback-rating-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.feedback-rating-btn {
    width: 48px;
    height: 48px;
    font-size: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.feedback-rating-btn:hover {
    border-color: var(--color-accent);
    background: var(--surface-alt);
}

.feedback-rating-btn.selected {
    border-color: var(--color-primary);
    background: rgba(var(--ciblu-primary-rgb), 0.08);
}

.feedback-rating-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface);
    resize: vertical;
    margin-bottom: 0.75rem;
    transition: border-color var(--transition-fast);
}

.feedback-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--ciblu-secondary-rgb), 0.15);
}

.feedback-textarea::placeholder {
    /* WCAG 1.4.3: Placeholder-Text braucht >=4.5:1 auf weißem Surface.
       --text-placeholder (= --text-secondary) misst 5.96:1. */
    color: var(--text-placeholder);
    opacity: 1;
}

/* Globaler Placeholder-Kontrast für Bootstrap-Formularfelder auf hellem Surface.
   Bootstrap dimmt den Standard-Placeholder unter die WCAG-1.4.3-Schwelle;
   --text-placeholder stellt >=4.5:1 sicher (measure, don't eyeball). */
.form-control::placeholder,
.form-select::placeholder {
    color: var(--text-placeholder);
    opacity: 1;
}

.feedback-submit {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--surface);
    background: var(--color-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.feedback-submit:hover:not(:disabled) {
    background: var(--color-primary-hover);
}

.feedback-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   RICHTER PLAYER
   ============================================================ */

.richter-player {
    --richter-surface: color-mix(in srgb, var(--text-primary) 96%, var(--surface));
    --richter-surface-alt: color-mix(in srgb, var(--text-primary) 92%, var(--surface));
    --richter-surface-muted: color-mix(in srgb, var(--text-primary) 86%, var(--surface));
    --richter-border: color-mix(in srgb, var(--surface) 24%, var(--text-primary));
    --richter-text: color-mix(in srgb, var(--surface) 92%, var(--text-primary));
    --richter-text-muted: color-mix(in srgb, var(--surface) 60%, var(--text-primary));
    --richter-track: color-mix(in srgb, var(--surface) 18%, var(--text-primary));
    --richter-video-bg: color-mix(in srgb, var(--text-primary) 100%, var(--surface));
    background: var(--richter-surface);
    border: 1px solid var(--richter-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    outline: none;
}

.richter-player:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(var(--ciblu-secondary-rgb), 0.25), var(--shadow-lg);
}

.richter-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: var(--richter-video-bg);
}

.richter-title {
    padding: 0.75rem 1rem;
    color: var(--richter-text);
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid var(--richter-border);
}

.richter-status {
    padding: 0.625rem 1rem;
    background: color-mix(in srgb, var(--warning-bg) 82%, var(--richter-surface));
    color: var(--richter-text);
    font-size: 0.875rem;
    border-bottom: 1px solid color-mix(in srgb, var(--warning) 45%, var(--richter-border));
}

.richter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.875rem 1rem 1rem;
    background: var(--richter-surface-alt);
    border-top: 1px solid var(--richter-border);
}

.richter-controls-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.richter-controls-group--grow {
    flex: 1 1 100%;
}

.richter-btn {
    min-height: 2rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--richter-border);
    border-radius: var(--radius-sm);
    background: var(--richter-surface-muted);
    color: var(--richter-text);
    font-size: 0.875rem;
    line-height: 1.2;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.richter-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--richter-surface-muted) 82%, var(--surface));
    border-color: color-mix(in srgb, var(--richter-border) 70%, var(--color-accent));
}

.richter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.richter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--surface);
}

.richter-speed-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.richter-scrubbar-container {
    position: relative;
    flex: 1 1 100%;
    padding-top: 0.5rem;
}

.richter-scrubbar {
    width: 100%;
    margin: 0;
    appearance: none;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--richter-track);
    outline: none;
}

.richter-scrubbar::-webkit-slider-runnable-track {
    height: 0.375rem;
    border-radius: 999px;
    background: var(--richter-track);
}

.richter-scrubbar::-webkit-slider-thumb {
    appearance: none;
    width: 1rem;
    height: 1rem;
    margin-top: -0.3125rem;
    border: none;
    border-radius: 50%;
    background: var(--color-accent);
}

.richter-scrubbar::-moz-range-track {
    height: 0.375rem;
    border: none;
    border-radius: 999px;
    background: var(--richter-track);
}

.richter-scrubbar::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border: none;
    border-radius: 50%;
    background: var(--color-accent);
}

.richter-loop-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0.125rem;
    background: var(--color-accent);
    transform: translateX(-50%);
    pointer-events: none;
}

.richter-frame-display {
    margin-left: auto;
    color: var(--richter-text-muted);
    font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.richter-buffer-btn {
    background: color-mix(in srgb, var(--color-primary) 22%, var(--richter-surface-muted));
    border-color: color-mix(in srgb, var(--color-primary) 48%, var(--richter-border));
}

.richter-buffer-progress {
    width: min(16rem, 100%);
    height: 0.25rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--richter-track);
}

.richter-buffer-progress-bar {
    height: 100%;
    background: var(--color-accent);
    transition: width var(--transition-fast);
}

/* Feedback widget mobile: bottom sheet */
@media (max-width: 768px) {
    .feedback-popup {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        margin-bottom: 0;
        margin-top: 0;
        animation: feedback-slide-up-mobile var(--transition-normal) ease-out;
    }

    @keyframes feedback-slide-up-mobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .feedback-backdrop {
        background: var(--overlay);
    }

    .feedback-trigger--header {
        padding: 0.75rem 1rem;
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.9375rem;
        gap: 0.5rem;
        width: 100%;
        border-radius: 8px;
    }

    .feedback-trigger--header:hover {
        background: rgba(255, 255, 255, 0.15);
        color: var(--text-on-primary);
    }
}

.streamstation-station-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.95fr);
    gap: 1rem;
    align-items: start;
}

.streamstation-station-card {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.streamstation-station-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.streamstation-action-section {
    display: grid;
    gap: 0.75rem;
}

.streamstation-action-section + .streamstation-action-section {
    padding-top: 0.25rem;
    border-top: 1px solid var(--border-subtle);
}

.streamstation-action-section__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.streamstation-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.streamstation-station-facts {
    display: grid;
    gap: 0.75rem;
}

.streamstation-station-fact {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.streamstation-station-fact--secondary {
    background: var(--surface);
}

.streamstation-station-fact__label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.streamstation-station-fact__value {
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.streamstation-collapsible-card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    overflow: hidden;
}

.streamstation-collapsible-card__summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    list-style: none;
}

.streamstation-collapsible-card__summary::-webkit-details-marker {
    display: none;
}

.streamstation-collapsible-card__summary--compact {
    padding: 0.75rem 1rem;
}

.streamstation-collapsible-card__body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border-subtle);
}

@media (max-width: 1200px) {
    .streamstation-station-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .streamstation-station-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .streamstation-collapsible-card__summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .streamstation-action-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   TV-Modus Layout (Story #631, #650)
   ============================================================
   Layout-Schichten:
   - .tv-layout:       Vollbild-Container, schwarzer Hintergrund
   - .tv-streams:      Flex-Row für 1–2 Stream-Container (Portrait: Column)
   - .tv-stream-wrapper: Einzelner Stream-Container, nimmt gleiche Breite
   - .tv-stream-wrapper iframe: Füllt den Container (width/height 100%)
     HINWEIS: object-fit wirkt NICHT auf iframes (kein replaced content).
     Die Darstellung des externen Players kann per CSS nicht gesteuert werden.
   - 1 Stream:         max-width: 177.78vh (16:9-Begrenzung für Ultrawide)
   - 2 Streams:        border-left als Trenner
   - Portrait-Viewport: flex-direction: column (Media Query)
   ============================================================ */

.tv-layout {
    position: fixed;
    inset: 0;
    background: var(--media-stage);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Container für alle aktiven Streams (1 oder 2) */
.tv-streams {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
}

/* Einzelner Stream-Container */
.tv-stream-wrapper {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 1 Stream: 16:9-Begrenzung für Ultrawide-Viewports */
.tv-streams:has(.tv-stream-wrapper:only-child) .tv-stream-wrapper {
    max-width: calc(177.78vh);
}

/* 2 Streams: Trenner zwischen den Containern */
.tv-stream-wrapper + .tv-stream-wrapper {
    border-left: 2px solid var(--tv-border);
}

/* iframe füllt den Layout-Container vollständig aus */
.tv-stream-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Label am unteren Rand jedes Stream-Containers */
.tv-stream-label {
    position: absolute;
    bottom: 0.5rem;
    left: 0.75rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    pointer-events: none;
    z-index: 2;
    /* Kein Overflow in angrenzende Stream-Flächen */
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Platzhalter wenn kein Stream-Kanal konfiguriert */
.tv-stream-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--tv-text-muted);
    text-align: center;
    padding: 2rem;
}

/* Portrait/Hochformat: Streams untereinander statt nebeneinander */
@media (orientation: portrait) {
    .tv-streams {
        flex-direction: column;
    }

    .tv-stream-wrapper + .tv-stream-wrapper {
        border-left: none;
        border-top: 2px solid var(--tv-border);
    }
}

/* Kein Stream aktiv */

.tv-context-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.85);
    border-top: 1px solid var(--tv-border-subtle);
    color: var(--tv-text-dim);
    font-size: 0.8rem;
    min-height: 0;
}

.tv-context-bar img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.tv-context-bar .tv-turnier-name {
    font-weight: 600;
    color: var(--text-on-primary);
}

/* Kein Stream aktiv */
.tv-no-stream {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--tv-text-muted);
    text-align: center;
    padding: 2rem;
    gap: 0.5rem;
}

.tv-hint-banner {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30,30,30,0.92);
    color: var(--tv-text-dim);
    font-size: 0.78rem;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    z-index: 100;
    white-space: nowrap;
    animation: tv-hint-fade 8s ease forwards;
    pointer-events: none;
}

@keyframes tv-hint-fade {
    0%   { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}


/* ── Story #719: Turnierzentrierte Clip-Verwaltung ─────────────────────────
   Zahlenvergleich in dichten Tabellen (StartNr/Dauer/Aufnahme) braucht
   tabellarische Ziffern, sonst springen die Spalten optisch (admin-density). */
.ciblu-num {
    font-variant-numeric: tabular-nums;
}

/* Accordion-Trigger der Tag-Gruppen: echter <button>, aber in Kartenkopf-Optik.
   Bewusst ohne Transition — kein Motion, damit auch keine reduced-motion-Falle. */
.ciblu-accordion-trigger {
    background: none;
    border: 0;
    padding: 0;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
}

.ciblu-accordion-trigger:focus-visible {
    outline: 2px solid var(--ciblu-primary);
    outline-offset: 2px;
}

/* ============================================================
   KONSOLIDIERTE INLINE-STYLES (Story #732)
   ------------------------------------------------------------
   Reine Konsolidierung: jede Regel hier ersetzt 1:1 ein vorher
   inline gesetztes style="…"-Attribut der Hotspot-Dateien. Werte
   sind daher unverändert übernommen (pixel-identisches Ergebnis).
   Farben laufen ausnahmslos über Tokens (ciblu-tokens.css).
   Die begründeten Rest-Ausnahmen stehen im Kommentarblock
   "AUSNAHMELISTE" am Dateianfang.
   ============================================================ */

/* --- Generische Admin-Utilities --- */
.admin-inline-icon {
    vertical-align: middle;
}

/* Formularsteuerung, die sich auf ihren Inhalt zusammenzieht statt die
   volle Spaltenbreite zu belegen (Filterleisten). */
.admin-field-auto {
    width: auto;
}

/* Scrollende Detailfläche innerhalb einer Karte/eines Panels. */
.admin-scroll-pane {
    max-height: 300px;
    overflow-y: auto;
}

/* Abdunklung hinter einem manuell gerenderten Bootstrap-Modal
   (.modal.show.d-block ohne .modal-backdrop-Element). */
.admin-modal-backdrop {
    background: var(--overlay);
}

/* --- StationJobResultRenderer: Schlüssel-Wert-Ergebnistabellen --- */
.station-result-kv td:first-child {
    width: 220px;
}

.station-result-kv--label-md td:first-child {
    width: 200px;
}

.station-result-kv--label-sm td:first-child {
    width: 180px;
}

.station-result-toggle {
    cursor: pointer;
}

.station-result-log {
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* --- ArenaManager: Spaltenraster der Arena-Tabelle --- */
.arena-table__col--order {
    width: 3%;
}

.arena-table__col--arena {
    width: 19%;
}

.arena-table__col--display-name {
    width: 24%;
}

.arena-table__col--channel {
    width: 18%;
}

.arena-table__col--live,
.arena-table__col--public,
.arena-table__col--doorman {
    width: 8%;
}

.arena-table__col--status {
    width: 10%;
}

.arena-table__col--actions {
    width: 2%;
}

/* --- DisciplineManager: Spaltenraster der Prüfungstabelle --- */
.discipline-table__col--order {
    width: 40px;
}

.discipline-table__col--tag {
    width: 60px;
}

.discipline-table__col--start,
.discipline-table__col--pruefung-id {
    width: 120px;
}

.discipline-table__col--arena {
    width: 160px;
}

.discipline-table__col--group {
    width: 50px;
}

.discipline-table__col--actions {
    width: 100px;
}

/* --- DisciplineManager: einklappbare Arena-/Tag-Gruppen ---
   Kopfzeile ist ein echter <button> (ciblu-accordion-trigger, Fokusring dort).
   Der Chevron dreht beim Aufklappen; reduced-motion schaltet die Drehung ab. */
.discipline-group__toggle {
    min-height: 2rem;
    font-weight: inherit;
}

.discipline-group__chevron {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.discipline-group__chevron.is-open {
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    .discipline-group__chevron {
        transition: none;
    }
}

/* --- AdminStreamStationStationDetail --- */
.streamstation-station-fact__value--truncate {
    max-width: 20rem;
}

.streamstation-inventory-filter__select {
    width: auto;
    min-width: 180px;
}

.streamstation-inventory-filter__select--status {
    width: auto;
    min-width: 160px;
}

/* --- AdminStreamStationJobs: Importformular "Datei zuordnen" --- */
.station-import-field--event {
    width: 220px;
}

.station-import-field--discipline {
    width: 240px;
}

.station-import-field--starter {
    width: 300px;
}

.station-import-field--fallback-starter {
    width: 320px;
}

.station-import-field--startnr {
    width: 90px;
}

.station-import-field--name {
    width: 140px;
}

/* --- AdminClipEditor --- */
.clip-editor-table__col--select {
    width: 30px;
}

.clip-editor-table__col--preview {
    width: 60px;
}

.clip-editor-thumb {
    width: 60px;
    height: 34px;
    object-fit: cover;
    border-radius: 4px;
}

.clip-editor-field--startnr {
    width: 80px;
}

.clip-editor-field--cut {
    width: 90px;
}

.clip-editor-link-group {
    max-width: 22rem;
}

/* --- AdminS3Explorer --- */
.s3-explorer-table__col--name {
    width: 50%;
}

.s3-explorer-table__col--size,
.s3-explorer-table__col--modified {
    width: 25%;
}

.s3-explorer-detail-card {
    top: 1rem;
}

.s3-explorer-kv__label {
    width: 40%;
}

/* ============================================================================
   Speicher-Leitstand (Story #760, Spec 038 §10)
   Farben und Abstaende ausschliesslich ueber Tokens aus ciblu-tokens.css —
   Roh-Hex ist hier durch AdminInlineStyleAndTokenGuardTests ausgeschlossen.
   ============================================================================ */

.storage-kpi .admin-card-count {
    font-variant-numeric: tabular-nums;
}

/* --- Vorschlagskarten --------------------------------------------------- */

.storage-suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: var(--space-md);
}

.storage-suggestion-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    /* min-width:0 ist Pflicht, damit die Pfadzeile truncaten kann (ui-foundations). */
    min-width: 0;
}

.storage-suggestion-card--alter {
    border-left: 3px solid var(--warning);
}

.storage-suggestion-card--hinweis {
    background: var(--surface-alt);
}

.storage-suggestion-card__title {
    font-size: var(--font-size-md);
    margin: 0;
}

.storage-suggestion-card__path {
    margin: 0;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.storage-suggestion-card__text {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.storage-suggestion-card__facts {
    display: flex;
    gap: var(--space-md);
    margin: 0;
}

.storage-suggestion-card__facts dt {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 400;
}

.storage-suggestion-card__facts dd {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.storage-suggestion-card__note {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin: 0;
    font-size: var(--font-size-xs);
    color: var(--success);
}

.storage-suggestion-card__blocked {
    margin: 0;
    font-size: var(--font-size-xs);
    color: var(--warning);
}

/* --- Treeview ----------------------------------------------------------- */

.storage-tree__row.is-selected {
    background: var(--info-bg);
}

.storage-tree__row.is-blocked {
    color: var(--text-secondary);
}

.storage-tree__row:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

.storage-tree__cell-select {
    width: 2.5rem;
}

.storage-tree__name {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    /* Einruecktiefe kommt als Custom Property von der Zeile (rekursive Ebene). */
    padding-left: calc(var(--storage-tree-depth, 0) * var(--space-md));
    min-width: 0;
}

.storage-tree__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.storage-tree__toggle {
    /* Zielgroesse >= 24px (WCAG 2.5.8), auch wenn das Chevron kleiner ist. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
}

.storage-tree__toggle:hover {
    background: var(--surface-alt);
    color: var(--text-primary);
}

.storage-tree__toggle-spacer {
    display: inline-block;
    width: 1.5rem;
}

.storage-tree__chevron {
    transition: transform var(--transition-fast);
}

.storage-tree__chevron.is-open {
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    .storage-tree__chevron {
        transition: none;
    }
}

.storage-tree__blocked {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 400;
    color: var(--warning);
}

.storage-tree__cell-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.storage-tree__cell-artefakt,
.storage-tree__cell-age {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.storage-tree__cell-cohorts {
    min-width: 8rem;
}

.storage-tree__row--meta > td {
    background: var(--surface-alt);
}

/* --- Kohorten-Balken ---------------------------------------------------- */

.storage-cohort-bar {
    display: flex;
    height: 0.5rem;
    width: 100%;
    min-width: 6rem;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--border-subtle);
}

.storage-cohort-bar__seg {
    display: block;
    flex-basis: 0;
    min-width: 2px;
}

.storage-cohort-bar__seg--frisch { background: var(--info); }
.storage-cohort-bar__seg--jung { background: var(--success); }
.storage-cohort-bar__seg--mittel { background: var(--warning); }
.storage-cohort-bar__seg--alt { background: var(--color-primary); }
.storage-cohort-bar__seg--sehr-alt { background: var(--color-accent); }

/* --- Bulk-Bar ----------------------------------------------------------- */

.storage-bulkbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.storage-bulkbar__count {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* --- Plan-Panel --------------------------------------------------------- */

.storage-plan-panel__facts {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin: 0;
}

.storage-plan-panel__facts dt {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 400;
}

.storage-plan-panel__facts dd {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.storage-plan-panel__classes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
}

.storage-plan-panel__classes li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
}

/* Planexpansion: die von der Station gemeldete Menge, optisch von der Schätzung abgesetzt. */
.storage-plan-panel__facts--plan {
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
}

.storage-plan-panel__scope-hint {
    font-style: italic;
}

/* Dreiteilung der Schätzung (§8.2.1) — dieselbe Farbzuordnung wie im Alters-Dialog, damit
   "wird freigegeben / gesperrt / jünger" an beiden Orten dasselbe bedeutet. */
.storage-plan-panel__facts > div[class*="storage-plan-panel__fact--"] {
    padding-left: var(--space-sm);
    border-left: 3px solid var(--border-color);
}

.storage-plan-panel__fact--release { border-left-color: var(--success); }
.storage-plan-panel__fact--blocked { border-left-color: var(--danger); }
.storage-plan-panel__fact--young { border-left-color: var(--info); }

.storage-plan-panel__fact-sub {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 400;
    color: var(--text-secondary);
}

.storage-plan-panel__blocked {
    font-size: var(--font-size-sm);
}

.storage-plan-panel__blocked ul {
    margin: 0;
    padding-left: var(--space-md);
}

/* --- Alters-Dialog ------------------------------------------------------ */

.storage-age-dialog__group {
    margin-top: var(--space-md);
    border: 0;
    padding: 0;
}

.storage-age-dialog__legend {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.storage-age-dialog__options {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.storage-age-dialog__preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.storage-age-dialog__figure {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    border-left: 3px solid var(--border-color);
}

.storage-age-dialog__figure--release { border-left-color: var(--success); }
.storage-age-dialog__figure--blocked { border-left-color: var(--danger); }
.storage-age-dialog__figure--young { border-left-color: var(--info); }

.storage-age-dialog__figure-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.storage-age-dialog__figure-value {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.storage-age-dialog__figure-sub {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.storage-age-dialog__cutoff,
.storage-age-dialog__after {
    margin: var(--space-sm) 0 0;
    font-size: var(--font-size-sm);
}

.storage-age-dialog__disclaimer {
    margin: var(--space-xs) 0 0;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* ── Recovery-Inbox (Spec 041 §5): Liste links, Detail rechts ───────────────── */
.recovery-inbox {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: start;
}

@media (max-width: 992px) {
    .recovery-inbox {
        grid-template-columns: minmax(0, 1fr);
    }
}

.recovery-inbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.recovery-inbox-list > li + li {
    border-top: 1px solid var(--border-subtle);
}

.recovery-inbox-list__item {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    text-align: left;
    color: var(--text-primary);
}

.recovery-inbox-list__item:hover {
    background: var(--surface-alt);
}

.recovery-inbox-list__item:focus-visible {
    outline: 2px solid var(--ciblu-primary);
    outline-offset: -2px;
}

.recovery-inbox-list__item.is-selected {
    background: var(--surface-alt);
    border-left-color: var(--ciblu-primary);
}

.recovery-inbox-list__thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 36px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-faint);
}

.recovery-inbox-list__thumb--leer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.recovery-inbox-list__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.recovery-inbox-list__line {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    min-width: 0;
}

.recovery-inbox-list__zeit {
    flex: 0 0 auto;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.recovery-inbox-list__klasse,
.recovery-inbox-list__hinweis {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.recovery-inbox-list__hinweis--vorschlag {
    color: var(--ciblu-primary);
    font-weight: 600;
}

.recovery-inbox-detail {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    min-width: 0;
}

.recovery-inbox-detail__media {
    margin-bottom: var(--space-md);
}

.recovery-inbox-detail__keine-vorschau {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.recovery-inbox-detail__fakten {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--space-xs) var(--space-md);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
}

.recovery-inbox-detail__fakten dt {
    font-weight: 600;
    color: var(--text-secondary);
}

.recovery-inbox-detail__fakten dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.recovery-inbox-vorschlag {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 2px solid var(--ciblu-primary);
    border-radius: var(--radius-md);
}

.recovery-inbox-vorschlag--ohne {
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
}

.recovery-inbox-vorschlag__label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.recovery-inbox-vorschlag__starter {
    font-size: var(--font-size-lg);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.recovery-inbox-detail__aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.recovery-inbox-zuordnen {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.recovery-inbox-zuordnen__treffer {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
}

.recovery-inbox-zuordnen__option {
    font-variant-numeric: tabular-nums;
}

.recovery-inbox-zuordnen__gruppe {
    margin-top: var(--space-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ============================================================
   040 mobil — Spec 040 §2.3/§5.2/§5.3/§5.4 (Slice L4a)
   ------------------------------------------------------------
   EINE angehängte CSS-Schicht für die vier Kernseiten (Heute,
   Turnier, Fälle, Stationsdetail) und die Shell. Farben, Abstände,
   Größen ausschließlich aus css/admin-v2-tokens.css (--v2-*).
   Grau nur für :disabled; Schrift >= 16 px; Touch >= 44 px,
   Knopf 48 px, Hauptaktion 56 px. Kein Hover-Zwang, kein Quer-Scroll.
   ============================================================ */

/* --- Icons ----------------------------------------------------- */
.v2-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.v2-i {
    width: var(--v2-icon);
    height: var(--v2-icon);
    flex: 0 0 auto;
    vertical-align: middle;
}

.v2-num {
    font-variant-numeric: var(--v2-num);
}

/* --- Statuswort (Zeichenlegende §2.1.6) ------------------------ */
.v2-status {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s1);
    font-size: var(--v2-fs-16);
    font-weight: var(--v2-fw-bold);
    color: var(--v2-ink);
}

.v2-status--ok { color: var(--v2-ok); }
.v2-status--warn { color: var(--v2-warn); }
.v2-status--bad { color: var(--v2-bad); }
.v2-status--info { color: var(--v2-info); }
.v2-status--unk { color: var(--v2-unk); }
.v2-status--off { color: var(--v2-ink); font-weight: var(--v2-fw-medium); }

.v2-status--live {
    color: var(--v2-on-fill);
    background: var(--v2-live);
    border-radius: var(--v2-r-pill);
    padding: 0 var(--v2-s3) 0 var(--v2-s1);
}

/* --- Knöpfe ---------------------------------------------------- */
.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--v2-s2);
    min-height: var(--v2-btn-h);
    padding: 0 var(--v2-s4);
    font-size: var(--v2-fs-16);
    font-weight: var(--v2-fw-medium);
    border-radius: var(--v2-r-s);
}

.v2-btn--haupt {
    min-height: var(--v2-btn-h-l);
}

.v2-btn--links {
    justify-content: flex-start;
    text-align: left;
}

.v2-btn:focus-visible,
.v2-link:focus-visible,
.v2-schalter:focus-visible,
.v2-leiste__ziel:focus-visible,
.v2-station__pc:focus-visible {
    outline: none;
    box-shadow: var(--v2-focus-ring);
}

.v2-link {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s1);
    min-height: var(--v2-touch);
    font-size: var(--v2-fs-16);
    font-weight: var(--v2-fw-medium);
    color: var(--v2-brand-text);
}

/* --- Kopfzeile: Verweigerung, Konto, Abmelden, Menü ------------ */
.v2-kopf {
    display: flex;
    align-items: center;
    gap: var(--v2-s2);
    min-width: 0;
}

.v2-konto {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s1);
    color: var(--v2-on-fill);
    font-size: var(--v2-fs-16);
    min-width: 0;
}

.v2-konto__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14rem;
}

/* Fokus auf Burgund: weiß statt blau (Spec 040 §2.2.16, blau auf Burgund 2,2:1). */
.site-header .v2-btn:focus-visible,
.site-header a:focus-visible {
    outline: 3px solid var(--v2-on-fill);
    outline-offset: 2px;
    box-shadow: none;
}

.v2-burger {
    display: none;
}

/* --- Leiste der Streamleitung (Heute · Turnier · Fälle) -------- */
.v2-leiste {
    display: flex;
    gap: var(--v2-s2);
    background: var(--v2-surface);
    border-bottom: 1px solid var(--v2-line);
    padding: 0 var(--v2-s4);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.v2-leiste__ziel {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s2);
    min-height: var(--v2-btn-h);
    padding: 0 var(--v2-s4);
    font-size: var(--v2-fs-16);
    font-weight: var(--v2-fw-medium);
    color: var(--v2-ink);
    text-decoration: none;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
}

.v2-leiste__ziel.active {
    color: var(--v2-brand-text);
    border-bottom-color: var(--v2-brand);
    font-weight: var(--v2-fw-bold);
}

.v2-zaehler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 var(--v2-s1);
    border-radius: var(--v2-r-pill);
    background: var(--v2-brand);
    color: var(--v2-on-fill);
    font-size: var(--v2-fs-16);
    font-variant-numeric: var(--v2-num);
}

.v2-leiste__weitere {
    position: relative;
}

.v2-leiste__menue {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 14rem;
    background: var(--v2-surface);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-r-s);
    z-index: 100;
}

.v2-leiste__weitere.open .v2-leiste__menue {
    display: flex;
    flex-direction: column;
}

/* --- Verbindungsleiste (§5.4) ---------------------------------- */
.v2-verbindung {
    display: none;
}

.v2-verbindung[data-sichtbar] {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: var(--v2-unk-bg);
    color: var(--v2-unk);
    border-bottom: 2px dashed var(--v2-unk);
}

.v2-verbindung__inhalt {
    display: flex;
    align-items: center;
    gap: var(--v2-s2);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--v2-s2) var(--v2-s4);
    font-size: var(--v2-fs-16);
    font-weight: var(--v2-fw-bold);
}

.v2-verbindung__neu-laden {
    display: none;
    margin-left: auto;
}

.v2-verbindung[data-sichtbar="dauerhaft"] .v2-verbindung__neu-laden {
    display: inline-flex;
}

#blazor-error-ui {
    display: none;
}

.blazor-error-ui__inhalt {
    display: flex;
    gap: var(--v2-s4);
    align-items: center;
    justify-content: space-between;
    padding: var(--v2-s3) var(--v2-s5);
}

/* --- Heute: Lagekopf, Abweichungsband, Abschnitte -------------- */
.v2-heute {
    display: grid;
    gap: var(--v2-s4);
    color: var(--v2-ink);
    font-size: var(--v2-fs-16);
}

.v2-lage {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--v2-s3);
    flex-wrap: wrap;
}

.v2-lage h1 {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s2);
    margin: 0;
    font-size: var(--v2-fs-24);
    font-weight: var(--v2-fw-bold);
    line-height: var(--v2-lh-tight);
}

.v2-lage--ok h1 { color: var(--v2-ok); }
.v2-lage--warn h1 { color: var(--v2-warn); }
.v2-lage--unk h1 { color: var(--v2-unk); }

.v2-lage__stand {
    font-variant-numeric: var(--v2-num);
    font-weight: var(--v2-fw-medium);
}

.v2-lage__veraltet {
    display: none;
    align-items: center;
    gap: var(--v2-s1);
    color: var(--v2-warn);
    font-weight: var(--v2-fw-bold);
}

.v2-lage__stand[data-veraltet] .v2-lage__stand-zeit { display: none; }
.v2-lage__stand[data-veraltet] .v2-lage__veraltet { display: inline-flex; }

.v2-devs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--v2-s1);
}

.v2-dev {
    display: flex;
    align-items: center;
    gap: var(--v2-s3);
    flex-wrap: wrap;
    padding: var(--v2-s2) var(--v2-s3) var(--v2-s2) var(--v2-s4);
    border-left: var(--v2-rule) solid var(--v2-warn);
    background: var(--v2-warn-bg);
}

.v2-dev--unk {
    border-left-style: dashed;
    border-left-color: var(--v2-unk);
    background: var(--v2-unk-bg);
}

.v2-dev__text {
    flex: 1 1 12rem;
    min-width: 0;
    font-weight: var(--v2-fw-bold);
}

.v2-sec {
    display: grid;
    gap: var(--v2-s3);
    padding: var(--v2-s4);
    background: var(--v2-surface);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-r-m);
    min-width: 0;
}

.v2-sec__kopf {
    display: flex;
    align-items: center;
    gap: var(--v2-s2) var(--v2-s3);
    flex-wrap: wrap;
}

.v2-sec__titel {
    margin: 0;
    font-size: var(--v2-fs-20);
    font-weight: var(--v2-fw-bold);
    line-height: var(--v2-lh-tight);
}

.v2-sec__aktionen {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s3);
    margin-left: auto;
    flex-wrap: wrap;
}

/* --- Arenen-Panel ---------------------------------------------- */
.v2-arenen,
.v2-stationen {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-arena,
.v2-station {
    display: flex;
    align-items: center;
    gap: var(--v2-s2) var(--v2-s4);
    flex-wrap: wrap;
    padding: var(--v2-s3) 0;
    border-top: 1px solid var(--v2-line);
    min-width: 0;
}

.v2-arena__info {
    display: grid;
    gap: var(--v2-s1);
    flex: 1 1 14rem;
    min-width: 0;
}

.v2-arena__name {
    font-size: var(--v2-fs-18);
    font-weight: var(--v2-fw-bold);
}

.v2-arena__aktionen {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s4);
    flex-wrap: wrap;
}

.v2-oeffentlich,
.v2-nicht-oeffentlich {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s1);
    font-weight: var(--v2-fw-bold);
}

.v2-oeffentlich { color: var(--v2-brand-text); }
.v2-nicht-oeffentlich { color: var(--v2-ink); }

/* Öffentlich-Schalter: Burgund = öffentlich; aus = weiß mit dunklem Rand (nie grau, §2.1.3).
   Er bewegt sich erst, wenn der Server bestätigt hat (die Seite liest neu). */
.v2-schalter {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s2);
    min-height: var(--v2-touch);
    padding: 0 var(--v2-s1);
    background: none;
    border: 0;
    color: var(--v2-ink);
    font-size: var(--v2-fs-16);
    font-weight: var(--v2-fw-bold);
}

.v2-schalter__spur {
    position: relative;
    width: 52px;
    height: 32px;
    border-radius: var(--v2-r-pill);
    border: 2px solid var(--v2-line-strong);
    background: var(--v2-surface);
    transition: background-color var(--v2-d-base) var(--v2-ease-out), border-color var(--v2-d-base) var(--v2-ease-out);
}

.v2-schalter__spur::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: var(--v2-r-pill);
    background: var(--v2-line-strong);
    transition: transform var(--v2-d-base) var(--v2-ease-out);
}

.v2-schalter[aria-checked="true"] .v2-schalter__spur {
    background: var(--v2-brand);
    border-color: var(--v2-brand);
}

.v2-schalter[aria-checked="true"] .v2-schalter__spur::after {
    transform: translateX(20px);
    background: var(--v2-on-fill);
}

.v2-schalter:disabled {
    color: var(--v2-ink-disabled);
}

.v2-ergebnis {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s2);
    flex-wrap: wrap;
}

/* --- Stationszeilen -------------------------------------------- */
.v2-station {
    border-left: var(--v2-rule) solid transparent;
    padding-left: var(--v2-s3);
}

.v2-station--warn { border-left-color: var(--v2-warn); }
.v2-station--unk { border-left: var(--v2-rule) dashed var(--v2-unk); }

.v2-station__name {
    display: grid;
    flex: 1 1 10rem;
    min-width: 0;
}

.v2-station__pc {
    display: inline-flex;
    align-items: center;
    min-height: var(--v2-touch);
    font-size: var(--v2-fs-18);
    font-weight: var(--v2-fw-bold);
    color: var(--v2-ink);
}

.v2-station__zustand,
.v2-station__aufnahme,
.v2-station__stream,
.v2-station__uploads {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s1) var(--v2-s2);
    flex-wrap: wrap;
}

.v2-station__klasse {
    font-weight: var(--v2-fw-bold);
}

.v2-hinweis,
.v2-leer {
    display: flex;
    align-items: center;
    gap: var(--v2-s2);
    flex-wrap: wrap;
    margin: 0;
}

/* --- Abbau-Karte (§4.6) ---------------------------------------- */
.v2-abbau {
    display: grid;
    gap: var(--v2-s3);
    padding: var(--v2-s4);
    background: var(--v2-surface);
    border: 1px solid var(--v2-line);
    border-left: var(--v2-rule) solid var(--v2-brand);
    border-radius: var(--v2-r-m);
}

.v2-abbau__punkte {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--v2-s2);
}

.v2-abbau__station {
    display: flex;
    align-items: center;
    gap: var(--v2-s2) var(--v2-s3);
    flex-wrap: wrap;
}

.v2-abbau__aktionen {
    display: flex;
    gap: var(--v2-s3);
    flex-wrap: wrap;
}

/* --- Stationsdetail, Befehle, Hilfe-Karte (§4.8) --------------- */
.v2-zurueck {
    margin-bottom: var(--v2-s2);
}

.v2-titel {
    margin: 0;
    font-size: var(--v2-fs-24);
    font-weight: var(--v2-fw-bold);
    line-height: var(--v2-lh-tight);
}

.v2-seitenkopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--v2-s2) var(--v2-s4);
    flex-wrap: wrap;
    margin-bottom: var(--v2-s4);
}

.v2-seitenkopf__arena {
    font-size: var(--v2-fs-18);
    font-weight: var(--v2-fw-medium);
    margin-left: var(--v2-s2);
}

.v2-seitenkopf__zustand {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s2);
}

.v2-kv {
    display: grid;
    grid-template-columns: minmax(8rem, max-content) 1fr;
    gap: var(--v2-s2) var(--v2-s4);
    margin: 0;
}

.v2-kv dt {
    display: inline-flex;
    align-items: center;
    gap: var(--v2-s2);
    font-weight: var(--v2-fw-regular);
}

.v2-kv dd {
    margin: 0;
    font-weight: var(--v2-fw-medium);
    min-width: 0;
    overflow-wrap: anywhere;
}

.v2-befehle,
.v2-hilfe__aktionen {
    display: flex;
    gap: var(--v2-s2);
    flex-wrap: wrap;
}

.v2-befehl,
.v2-sperrgrund {
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--v2-s2) var(--v2-s3);
    flex-wrap: wrap;
}

.v2-sperrgrund {
    font-weight: var(--v2-fw-medium);
    color: var(--v2-ink);
}

.v2-hilfe {
    border-left: var(--v2-rule) solid var(--v2-warn);
}

.v2-hilfe__schritte {
    margin: 0;
    padding-left: var(--v2-s5);
    display: grid;
    gap: var(--v2-s1);
}

.v2-hilfe__rolle {
    font-weight: var(--v2-fw-regular);
}

/* --- Bewegung: nur Zustandswechsel, reduced-motion = 0 ms (Tokens) */
@media (prefers-reduced-motion: reduce) {
    .v2-schalter__spur,
    .v2-schalter__spur::after {
        transition: none;
    }
}

/* --- Mobil (<= 768 px) ------------------------------------------ */
@media (max-width: 768px) {
    /* Admin: Hauptnavigation hinter „Menü" (Burger), aufgeklappt als Liste. */
    .v2-burger {
        display: inline-flex;
    }

    .admin-nav {
        display: none;
    }

    .admin-nav.admin-nav--offen {
        display: block;
    }

    .admin-nav--offen .admin-nav-container {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-nav--offen .admin-nav-link,
    .admin-nav--offen .admin-nav-group-label,
    .admin-nav--offen .admin-nav-dropdown-item {
        min-height: var(--v2-touch);
        font-size: var(--v2-fs-16);
    }

    .admin-nav--offen .admin-nav-group {
        flex-direction: column;
    }

    .admin-nav--offen .admin-nav-dropdown {
        position: static;
        box-shadow: none;
        border: 0;
    }

    /* Kopfzeile: nur Icons + kurze Wörter, nichts läuft quer. */
    .v2-konto__name {
        max-width: 7rem;
    }

    .v2-kopf__abmelden span,
    .v2-burger span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .v2-kopf .v2-btn {
        min-width: var(--v2-btn-h);
        padding: 0 var(--v2-s2);
    }

    /* Streamleitung: Bottom-Leiste mit drei Zielen, Handschuh-tauglich. */
    .v2-leiste {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        margin: 0;
        padding: 0 0 env(safe-area-inset-bottom);
        border-bottom: 0;
        border-top: 1px solid var(--v2-line);
        gap: 0;
    }

    .v2-leiste__ziel,
    .v2-leiste__weitere {
        flex: 1 1 0;
    }

    .v2-leiste__ziel {
        flex-direction: column;
        justify-content: center;
        gap: 0;
        min-height: var(--v2-btn-h-l);
        width: 100%;
        padding: var(--v2-s1);
        border-bottom: 0;
        border-top: 3px solid transparent;
    }

    .v2-leiste__ziel.active {
        border-top-color: var(--v2-brand);
    }

    .v2-leiste .v2-zaehler {
        position: absolute;
        top: var(--v2-s1);
        left: calc(50% + 6px);
    }

    .v2-leiste__menue {
        top: auto;
        bottom: 100%;
        left: auto;
        right: 0;
    }

    .main-layout--leiste .site-content {
        padding-bottom: calc(var(--v2-btn-h-l) + var(--v2-s5) + env(safe-area-inset-bottom));
        scroll-padding-bottom: calc(var(--v2-btn-h-l) + env(safe-area-inset-bottom));
    }

    .main-layout {
        min-height: 100dvh;
    }

    /* Kernseiten: Touch >= 44 px auch für Checkbox/Switch/Radio (§5.3.1). */
    .v2-heute input[type="checkbox"],
    .v2-heute input[type="radio"],
    .v2-sec input[type="checkbox"],
    .v2-sec input[type="radio"] {
        min-width: var(--v2-touch);
        min-height: var(--v2-touch);
    }

    .v2-lage h1 {
        font-size: var(--v2-fs-20);
    }

    .v2-dev__aktion,
    .v2-abbau .v2-btn,
    .v2-befehle .v2-btn,
    .v2-hilfe__aktionen .v2-btn {
        width: 100%;
    }

    .v2-sec__aktionen {
        margin-left: 0;
    }

    .v2-kv {
        grid-template-columns: 1fr;
        gap: 0 var(--v2-s2);
    }

    .v2-kv dd {
        margin-bottom: var(--v2-s2);
    }
}
/* 040 L4b ──────────────────────────────────────────────────────────────────────
   Spec 040 §5.3 — Kernseiten Turnier (Arenen, Startliste + Verweigerung) und Fälle
   (Recovery-Inbox) mobil: Schrift ≥ 16 px, Touch ≥ 44 px (Knopf 48, Hauptaktion 56),
   Tabellen ≤ 768 px gestapelt mit data-label, Listen mit fester Höhe + Scroll (dvh),
   Statuskante 4 px links. Nur Tokens aus ciblu-tokens.css. Prototyp #lead-4 … #lead-7.
   ──────────────────────────────────────────────────────────────────────────── */

.verweigerung .btn,
.arena-verwaltung .btn,
.recovery-inbox .btn,
.faelle-ergebnis .btn,
.startliste-kopf .btn {
    min-height: 48px;
    font-size: var(--font-size-md);
}

.verweigerung .form-control,
.verweigerung .form-select,
.verweigerung-seite .form-select,
.arena-verwaltung .form-control,
.arena-verwaltung .form-select,
.recovery-inbox .form-control,
.recovery-inbox .form-select {
    min-height: 48px;
    font-size: var(--font-size-md);
}

/* ── Verweigerung (§7) ─────────────────────────────────────────────────────── */

.verweigerung-seite {
    display: grid;
    gap: var(--space-lg);
    max-width: 40rem;
}

.verweigerung {
    display: grid;
    gap: var(--space-md);
}

.verweigerung__label {
    font-weight: 600;
}

.verweigerung__eingabe {
    display: flex;
    gap: var(--space-sm);
}

.verweigerung__eingabe .form-control {
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--font-size-lg);
    font-variant-numeric: tabular-nums;
}

.verweigerung__fehler {
    margin: var(--space-xs) 0 0;
    color: var(--danger);
}

.verweigerung-puffer {
    list-style: none;
    margin: 0;
    padding: var(--space-sm) var(--space-md);
    border-left: 4px solid var(--info);
    background: var(--info-bg);
    border-radius: var(--radius-sm);
}

.verweigerung-puffer__eintrag {
    font-variant-numeric: tabular-nums;
}

.verweigerung__ansage:empty {
    display: none;
}

.verweigerung__ergebnis {
    padding: var(--space-sm) var(--space-md);
    border-left: 4px solid var(--success);
    background: var(--success-bg);
    border-radius: var(--radius-sm);
}

.verweigerung__ergebnis-text,
.verweigerung__ergebnis-starter,
.verweigerung__teilen-text {
    margin: 0;
}

.verweigerung__ergebnis-text {
    font-weight: 600;
}

.verweigerung__zeit {
    font-variant-numeric: tabular-nums;
    margin-left: var(--space-xs);
}

.verweigerung__bestaetigung {
    display: grid;
    gap: var(--space-sm);
    padding: var(--space-md);
    border: 2px solid var(--ciblu-primary);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.verweigerung__nr {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.verweigerung__starter {
    margin: 0;
    font-size: var(--font-size-lg);
}

.verweigerung__konsequenz {
    margin: 0;
    font-weight: 600;
}

.verweigerung__aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.verweigerung__haupt {
    min-height: 56px;
}

.verweigerung__weitere {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-sm);
}

.verweigerung__option {
    width: 100%;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.verweigerung__liste-titel {
    margin: var(--space-sm) 0 0;
    font-size: var(--font-size-lg);
}

.verweigerung__zahl {
    font-variant-numeric: tabular-nums;
}

.verweigerung__leer {
    margin: 0;
}

.verweigerung-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 50dvh;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.verweigerung-liste__zeile {
    display: grid;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
}

.verweigerung-liste__zeile + .verweigerung-liste__zeile {
    border-top: 1px solid var(--border-subtle);
}

.verweigerung-liste__kopf {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    align-items: baseline;
    min-width: 0;
}

.verweigerung-liste__nr {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.verweigerung-liste__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.verweigerung-liste__zeit {
    font-variant-numeric: tabular-nums;
}

/* ── Startliste (Zeile tippbar ⇒ Verweigerung vorgewählt) ──────────────────── */

.startliste-kopf {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.startliste-kopf__zahl {
    font-size: var(--font-size-md);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.startliste-kopf__meldung {
    margin: 0 0 var(--space-sm);
}

.startliste {
    list-style: none;
    margin: 0 0 var(--space-lg);
    padding: 0;
    max-height: 60dvh;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.startliste > li + li {
    border-top: 1px solid var(--border-subtle);
}

.startliste__zeile {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    min-height: 56px;
    padding: var(--space-sm) var(--space-md);
    border: 0;
    border-left: 4px solid transparent;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    font-size: var(--font-size-md);
}

.startliste__zeile:focus-visible {
    outline: 2px solid var(--ciblu-primary);
    outline-offset: -2px;
}

.startliste__zeile.is-verweigert {
    border-left-color: var(--danger);
}

.startliste__nr {
    flex: 0 0 auto;
    min-width: 3ch;
    font-size: var(--font-size-lg);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.startliste__text {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.startliste__reiter,
.startliste__pferd {
    overflow-wrap: anywhere;
}

.startliste__status {
    flex: 0 0 auto;
    font-weight: 600;
    color: var(--danger);
}

/* ── Arenen (F14: Kanal + Öffentlich) ──────────────────────────────────────── */

.arena-verwaltung,
.arena-verwaltung .table {
    font-size: var(--font-size-md);
}

.arena-verwaltung__admin {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.arena-verwaltung__quellname {
    overflow-wrap: anywhere;
}

.arena-verwaltung .form-switch .form-check-input {
    width: 3rem;
    height: 1.75rem;
    margin: 0.5rem 0;
}

.arena-wort {
    display: block;
}

.arena-status {
    font-weight: 600;
    white-space: nowrap;
}

.arena-status--live {
    color: var(--ciblu-secondary);
}

.arena-status--warn {
    font-weight: 600;
}

.arena-kanal-ergebnis {
    margin: var(--space-xs) 0 0;
    color: var(--success);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .arena-tabelle thead {
        display: none;
    }

    .arena-tabelle,
    .arena-tabelle tbody,
    .arena-tabelle tr,
    .arena-tabelle td {
        display: block;
        width: 100%;
    }

    .arena-tabelle tr {
        padding: var(--space-sm) var(--space-md);
        border-bottom: 1px solid var(--border-subtle);
    }

    .arena-tabelle td {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: var(--space-sm);
        padding: var(--space-xs) 0;
        border: 0;
        text-align: left;
    }

    .arena-tabelle td::before {
        content: attr(data-label);
        font-weight: 600;
    }

    .arena-tabelle td > .form-select,
    .arena-tabelle td > .input-group {
        flex: 1 1 100%;
    }

    .arena-wort {
        display: inline;
    }
}

/* ── Fälle: Aufnahmen (§4.7) ───────────────────────────────────────────────── */

.faelle-ergebnis:empty {
    display: none;
}

.faelle-ergebnis {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-left: 4px solid var(--success);
    background: var(--success-bg);
    border-radius: var(--radius-sm);
}

.faelle-ergebnis--fehler {
    border-left-color: var(--danger);
    background: var(--danger-bg);
}

.faelle-ergebnis__text {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.recovery-inbox-list {
    max-height: calc(100dvh - 220px);
}

.recovery-inbox-list__item {
    min-height: 56px;
}

.recovery-inbox-list__zeit,
.recovery-inbox-list__klasse,
.recovery-inbox-list__hinweis,
.recovery-inbox-detail__fakten,
.recovery-inbox-vorschlag__label,
.recovery-inbox-zuordnen__gruppe {
    font-size: var(--font-size-md);
}

.recovery-inbox-list__hinweis--uebergeben {
    font-weight: 600;
    color: var(--text-primary);
}

.recovery-inbox-detail__zurueck {
    display: none;
    padding-left: 0;
    min-height: 48px;
}

.recovery-inbox-detail__uebergabe {
    margin: 0 0 var(--space-md);
    padding: var(--space-xs) var(--space-md);
    border-left: 4px solid var(--warning);
    background: var(--warning-bg);
    font-weight: 600;
}

.recovery-inbox-detail__abspielen {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    color: var(--text-primary);
    overflow: hidden;
}

.recovery-inbox-detail__abspielen:focus-visible {
    outline: 2px solid var(--ciblu-primary);
    outline-offset: 2px;
}

.recovery-inbox-detail__vorschaubild {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.recovery-inbox-detail__vorschaubild + .recovery-inbox-detail__abspielen-text {
    position: absolute;
    inset: auto auto var(--space-sm) var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.recovery-inbox-detail__abspielen-text {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 600;
}

.recovery-inbox-vorschlag__nr {
    font-size: 2rem;
    font-weight: 700;
}

.recovery-inbox-vorschlag__uebernehmen {
    min-height: 56px;
}

.recovery-startfolge {
    list-style: none;
    margin: 0 0 var(--space-md);
    padding: 0;
    display: grid;
    gap: var(--space-xs);
    font-variant-numeric: tabular-nums;
}

.recovery-startfolge > li {
    padding: var(--space-xs) var(--space-sm);
    border-left: 4px solid var(--border-color);
}

.recovery-startfolge > li.recovery-startfolge__diese {
    font-weight: 700;
    border-left-color: var(--ciblu-primary);
}

.recovery-inbox-zuordnen__hinweis {
    padding: var(--space-sm);
}

.recovery-inbox-zuordnen__option {
    min-height: 44px;
    display: flex;
    align-items: center;
}

@media (max-width: 992px) {
    .recovery-inbox-detail__zurueck {
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
    }

    .recovery-inbox-list {
        max-height: 40dvh;
    }
}

/* 040 Gate-Befund (375 px): Logo und „Verweigerung" überlappten in der Kopfzeile.
   Unter 430 px trägt die Kopfzeile nur Icons; die Wörter bleiben für Screenreader lesbar. */
@media (max-width: 430px) {
    .header-brand {
        flex-shrink: 0;
    }

    .v2-kopf__aktion span:not(.v2-i),
    .v2-konto__name {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* Interne Turnier-Analytics: auf schmalen Schirmen bleibt die erste Tabellenspalte beim seitlichen Scrollen stehen. */
@media (max-width: 767.98px) {
    .intern-sticky-first th:first-child,
    .intern-sticky-first td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background-color: var(--bs-body-bg);
    }
}

/* KPI-Karte: Erklär-Knopf (Touch/Tastatur statt nur title) */
.analytics-kpi-label-row {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.analytics-kpi-info {
    color: var(--bs-secondary-color);
    line-height: 1;
    min-width: 24px;
    min-height: 24px;
}

.analytics-kpi-info:hover,
.analytics-kpi-info[aria-expanded="true"] {
    color: var(--bs-link-color);
}

.analytics-kpi-info-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.analytics-kpi-info-text[hidden] {
    display: none;
}
