/* ============================================================
   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. AdminStreamStationStationDetail.razor — 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-link {
    text-decoration: none;
}

.admin-nav-group-link:hover {
    text-decoration: none;
}

.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);
}

/* Chevron dreht bei geöffnetem Menü — via Hover (Maus), :focus-within (Tastatur)
   und aria-expanded=true (Klick/Touch-Disclosure). */
.admin-nav-group:hover .admin-nav-group-label::after,
.admin-nav-group:focus-within .admin-nav-group-label::after,
.admin-nav-group-label[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(-0.15em);
}

.admin-nav-group:hover .admin-nav-group-label,
.admin-nav-group:focus-within .admin-nav-group-label,
.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;
}

/* Sichtbar bei: Hover (Maus, Progressive Enhancement), :focus-within (Tastatur-Fokus
   im Button oder in den Links) und expliziter Disclosure via aria-expanded=true
   (Klick/Touch) bzw. .open-Zustand der Gruppe. */
.admin-nav-group:hover .admin-nav-dropdown,
.admin-nav-group:focus-within .admin-nav-dropdown,
.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;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    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__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 {
        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 .flex-grow-1 { 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;
}

.ciblu-thumb-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--surface-alt);
}

/* --- Play Overlay on Thumbnail --- */
.ciblu-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--overlay);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.ciblu-thumb-wrap:hover .ciblu-play-overlay,
.ciblu-thumb-wrap:focus-within .ciblu-play-overlay {
    opacity: 1;
}

@media (hover: none) {
    .ciblu-play-overlay {
        opacity: 0.6;
    }
}

.ciblu-play-overlay svg {
    width: 48px;
    height: 48px;
    color: var(--text-on-primary);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* --- 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;
}

/* ============================================================
   TURNIER-REPORT
   ============================================================ */

.turnier-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.turnier-report-logo {
    max-height: 72px;
    max-width: 220px;
    width: auto;
    object-fit: contain;
}

/* Story #730: die eigene KPI-Kartenfamilie des Reports (.turnier-report-kpi-*) ist entfallen —
   Report und Analytics teilen sich .analytics-kpi-card. Die Druckregeln unten wurden mit
   umgehängt; ein Guard-Test hält den Selektor aus app.css und den Seiten fern. */

@media (max-width: 768px) {
    .turnier-report-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .turnier-report-logo {
        max-height: 56px;
        max-width: 180px;
    }
}

@media print {
    .site-header,
    .site-footer,
    .admin-nav,
    .turnier-report-print-hidden,
    .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;
    }

    .turnier-report-section,
    .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;
}

/* --- 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);
}
