/* Digital-SAT — Slate Blue Dark Theme */

:root {
    --bg-base: #0f172a;
    --bg-surface: rgba(255,255,255,0.03);
    --bg-surface-hover: rgba(255,255,255,0.06);
    --bg-active: rgba(59,130,246,0.12);
    --border: rgba(255,255,255,0.08);
    --border-active: rgba(59,130,246,0.25);
    --accent: #3b82f6;
    --accent-violet: #6366f1;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    --status-online: #22c55e;
    --status-standby: #f59e0b;
    --status-offline: #ef4444;
    --radius: 10px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Preset-Editor-Modal */
.preset-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.preset-modal {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    width: min(640px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.preset-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.preset-modal-close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}
.preset-modal-close:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.preset-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 4px;
}
.preset-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.preset-row-head {
    font-family: var(--sig-mono, 'IBM Plex Mono', monospace);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 4px;
}
.preset-slot {
    width: 32px;
    font-family: var(--sig-mono, 'IBM Plex Mono', monospace);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}
.preset-input {
    margin: 0;
    padding: 6px 10px;
    font-size: 13px;
    flex: 1;
}
.preset-input[type="number"] { flex: 1; }
.preset-btn-del {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    color: #ef4444;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.preset-btn-del:hover { background: rgba(239, 68, 68, 0.12); border-color: #ef4444; }

/* Install-zum-Home-Bildschirm Banner */
#install-prompt {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 120;
    animation: install-slide-in 0.3s ease-out;
}
#install-prompt.hide {
    animation: install-slide-out 0.25s ease-in forwards;
}
@keyframes install-slide-in {
    from { transform: translateY(110%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes install-slide-out {
    from { transform: translateY(0);    opacity: 1; }
    to   { transform: translateY(110%); opacity: 0; }
}
.install-card {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 44px 14px 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    position: relative;
    color: var(--text-primary);
    max-width: 480px;
    margin: 0 auto;
}
.install-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}
.install-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.install-body strong {
    color: var(--text-primary);
    font-weight: 600;
}
.install-share {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    color: var(--accent, #3b82f6);
    flex-shrink: 0;
}
.install-action {
    margin-top: 10px;
    background: var(--accent, #3b82f6);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.install-action:hover { filter: brightness(1.1); }
.install-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.install-close:hover { color: var(--text-primary); border-color: var(--text-secondary); }

/* Blazor-Reconnect-Modal (Circuit-Disconnect-Overlay) — erbt sonst body-color
   = weiss und hat selbst weissen Hintergrund → unlesbar. Explizit dunkel. */
#components-reconnect-modal {
    background: rgba(15, 23, 42, 0.92) !important;
    color: var(--text-primary) !important;
    backdrop-filter: blur(4px);
}
#components-reconnect-modal > div,
#components-reconnect-modal h5,
#components-reconnect-modal p,
#components-reconnect-modal button {
    color: var(--text-primary) !important;
}
#components-reconnect-modal button {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}


/* ─── App Layout ─── */

.app-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* ─── Sidebar ─── */

.sidebar {
    background: rgba(15,23,42,0.95);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ─── Receiver List ─── */

.receiver-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
    border-left: 3px solid transparent;
    font-size: 15px;
}

.receiver-item:hover {
    background: var(--bg-surface-hover);
}

.receiver-item.active {
    background: var(--bg-active);
    border-left-color: var(--accent);
}

/* ─── Status Dot ─── */

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--status-online);
    box-shadow: 0 0 6px var(--status-online);
}

.status-dot.standby {
    background: var(--status-standby);
    box-shadow: 0 0 6px var(--status-standby);
}

.status-dot.offline {
    background: var(--status-offline);
}

/* ─── Detail Panel ─── */

.detail-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-base);
}

.detail-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

/* ─── Badge ─── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0.625rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge.online {
    background: rgba(34,197,94,0.12);
    color: var(--status-online);
    border: 1px solid rgba(34,197,94,0.2);
}

.badge.standby {
    background: rgba(245,158,11,0.12);
    color: var(--status-standby);
    border: 1px solid rgba(245,158,11,0.2);
}

.badge.offline {
    background: rgba(239,68,68,0.12);
    color: var(--status-offline);
    border: 1px solid rgba(239,68,68,0.2);
}

/* ─── Remote Pad ─── */

/* Side-by-side: phone-remote on the left, channel list on the right */
.remote-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .remote-grid {
        grid-template-columns: 1fr;
    }
}

.remote-pad {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    width: 320px;
    margin: 0;
}

.remote-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}
.remote-row-top {
    justify-content: space-between;
    padding: 0 0.25rem 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
}

.remote-brand {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.remote-power {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(239,68,68,0.14);
    border: 1px solid rgba(239,68,68,0.35);
    color: #f87171;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.remote-power:hover { background: rgba(239,68,68,0.22); }
.remote-power:active { transform: scale(0.93); }

.remote-icon {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.remote-icon:hover { background: var(--bg-surface-hover); border-color: var(--border-active); }
.remote-icon:active { transform: scale(0.96); }
.remote-icon.large { flex: 1; height: 48px; }

.remote-ch-vol {
    justify-content: space-between;
    gap: 0.5rem;
}

.remote-rocker {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem;
    min-width: 56px;
}

.remote-rocker-btn {
    width: 44px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.15s;
}
.remote-rocker-btn:hover { background: var(--bg-surface-hover); }

.remote-rocker-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 2px 0;
}

.remote-nav-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 0.4rem;
}

.remote-colors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.remote-color {
    height: 10px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    opacity: 0.75;
}
.remote-color:hover { opacity: 1; }
.remote-color:active { transform: scaleY(0.7); }
.remote-color.red    { background: #ef4444; }
.remote-color.green  { background: #22c55e; }
.remote-color.yellow { background: #eab308; }
.remote-color.blue   { background: #3b82f6; }

.remote-media {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
}
.remote-media .remote-btn {
    padding: 0.55rem 0;
    font-size: 13px;
}
.remote-btn.rec {
    color: #f87171;
    font-weight: 700;
    font-size: 11px;
    padding-left: 0;
    padding-right: 0;
}

.numpad-wide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.numpad-btn {
    padding: 0.85rem 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.numpad-btn:hover { background: var(--bg-surface-hover); border-color: var(--border-active); }
.numpad-btn:active { transform: scale(0.96); }
.numpad-zero { grid-column: 1 / -1; }

.dpad {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    grid-template-rows: repeat(3, 56px);
    gap: 6px;
    width: fit-content;
    margin: 0.25rem auto;
}

.dpad-btn {
    width: 56px;
    height: 56px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.dpad-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-active);
    color: var(--text-primary);
}

.dpad-btn:active {
    background: var(--bg-active);
    transform: scale(0.96);
}

.ok-btn {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: opacity 0.15s, transform 0.1s;
}

.ok-btn:hover {
    opacity: 0.85;
}

.remote-btn {
    padding: 0.7rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.remote-btn:active {
    transform: scale(0.97);
}

.remote-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-active);
    color: var(--text-primary);
}

/* ─── Numpad ─── */

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    gap: 6px;
    width: fit-content;
}

/* ─── Channel List ─── */

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0 0.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow-y: auto;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.9rem;
    margin: 0 0.5rem;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
    color: var(--text-primary);
    font-size: 14px;
}
.channel-item:hover { background: var(--bg-surface-hover); }
.channel-item.active {
    background: rgba(59,130,246,0.12);
    color: #dbeafe;
}

.channel-num {
    flex-shrink: 0;
    min-width: 44px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}
.channel-item:hover .channel-num {
    background: rgba(59,130,246,0.14);
    color: #c7d2fe;
}

.channel-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-star {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, transform 0.1s;
    flex-shrink: 0;
}
.channel-star:hover { background: rgba(255,255,255,0.06); color: #fbbf24; }
.channel-star.active { color: #fbbf24; }
.channel-star:active { transform: scale(0.9); }

.channel-section-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.5rem;
}

.channel-toolbar {
    position: sticky;
    top: 0;
    background: rgba(15,23,42,0.96);
    backdrop-filter: blur(8px);
    z-index: 5;
    padding: 0.85rem 1rem;
    border-radius: 18px 18px 0 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.channel-tabs {
    display: flex;
    gap: 0.3rem;
    background: rgba(255,255,255,0.04);
    padding: 4px;
    border-radius: 10px;
}

.channel-tab {
    flex: 1;
    padding: 7px 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.channel-tab:hover { color: var(--text-primary); }
.channel-tab.active {
    background: var(--bg-base);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.channel-tab-count {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.06);
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}
.channel-tab.active .channel-tab-count {
    background: rgba(59,130,246,0.15);
    color: #c7d2fe;
}

.channel-controls {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.channel-controls .channel-search {
    max-width: none;
    flex: 1;
}

.channel-sort-btn,
.channel-filter-chip {
    flex-shrink: 0;
    min-width: 42px;
    height: 34px;
    padding: 0 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.channel-sort-btn:hover,
.channel-filter-chip:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}
.channel-sort-btn.active,
.channel-filter-chip.active {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.35);
    color: #c7d2fe;
}

.channel-quality {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59,130,246,0.14);
    color: #93c5fd;
    margin-right: 2px;
}
.channel-quality.uhd {
    background: rgba(168,85,247,0.14);
    color: #d8b4fe;
}

.channel-groups {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 2px;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}
.channel-groups::-webkit-scrollbar { height: 4px; }

.channel-group {
    flex-shrink: 0;
    padding: 5px 11px;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.channel-group:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}
.channel-group.active {
    background: rgba(59,130,246,0.14);
    border-color: rgba(59,130,246,0.3);
    color: #c7d2fe;
    font-weight: 600;
}

.channel-group-count {
    font-size: 10px;
    color: var(--text-muted);
    padding: 0 5px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    font-weight: 600;
}
.channel-group.active .channel-group-count {
    background: rgba(59,130,246,0.18);
    color: #dbeafe;
}

.channel-search {
    flex: 1;
    max-width: 240px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.channel-search:focus {
    border-color: var(--accent);
    background: rgba(59,130,246,0.06);
}
.channel-search::placeholder { color: var(--text-muted); }

.channel-list-hint {
    padding: 0.9rem 1.1rem;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}

.channel-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.channel-item.active {
    background: var(--bg-active);
    color: var(--text-primary);
}

/* ─── Section Label ─── */

.section-label {
    padding: 0.85rem 1.25rem 0.35rem;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* ─── Auth Pages ─── */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.auth-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.auth-input::placeholder {
    color: var(--text-muted);
}

.auth-input:focus {
    border-color: var(--accent);
    background: rgba(59,130,246,0.06);
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    opacity: 0.8;
}

.error-msg {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: var(--radius);
    color: #fca5a5;
    padding: 0.625rem 0.875rem;
    margin-bottom: 1rem;
    font-size: 13px;
}

/* ─── Command Center Layout ─── */

.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.5rem;
    background: rgba(15,23,42,0.95);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;                                     /* erlaubt truncation im flex-parent */
}

.brand-logo {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}

.brand-title {
    font-weight: 700;
    font-size: 19px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.brand-version {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 1px 7px;
    border-radius: 999px;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.top-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.top-btn {
    padding: 9px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.top-btn:hover { background: var(--bg-surface-hover); border-color: var(--border); }

.status-pill {
    padding: 6px 14px;
    border-radius: 14px;
    background: rgba(34,197,94,0.12);
    color: var(--status-online);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(34,197,94,0.25);
}

/* Site switcher pills */
.site-pills {
    display: flex;
    gap: 0.35rem;
    max-width: 45vw;
    overflow-x: auto;
    padding-right: 0.25rem;
}
.site-pills::-webkit-scrollbar { height: 4px; }

.site-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.site-pill:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}
.site-pill.active {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.35);
    color: #c7d2fe;
    font-weight: 600;
}

.site-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.site-pill-dot.online { background: var(--status-online); box-shadow: 0 0 4px var(--status-online); }
.site-pill-dot.offline { background: var(--text-muted); }

.status-pill.offline {
    background: rgba(239,68,68,0.1);
    color: var(--status-offline);
    border-color: rgba(239,68,68,0.2);
}


/* Main workspace */
.workspace {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Receiver card in workspace */
.cc-receiver {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.cc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.cc-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    letter-spacing: -0.01em;
}

.cc-back {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: color 0.15s;
}
.cc-back:hover { color: var(--accent); }

.cc-meta {
    font-size: 14px;
    color: var(--text-secondary);
}

.cc-channel-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}

.cc-channel-btn {
    padding: 1.1rem 0.5rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s, transform 0.1s;
}
.cc-channel-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.12);
}
.cc-channel-btn:active { transform: scale(0.97); }
.cc-channel-btn.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(99,102,241,0.15));
    border-color: rgba(59,130,246,0.4);
    color: #c7d2fe;
    box-shadow: 0 0 0 1px rgba(59,130,246,0.15);
}

.cc-control-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.625rem;
}

.cc-control-btn {
    padding: 1.1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s, transform 0.1s;
}
.cc-control-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.1);
}
.cc-control-btn:active { transform: scale(0.97); }
.cc-control-btn.power {
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.25);
    color: var(--status-online);
    font-weight: 600;
}
.cc-control-btn.power:hover {
    background: rgba(34,197,94,0.18);
}

/* ─── Receiver Panel Grid (alle Receiver geöffnet) ─── */

.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-muted);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.panel.online { border-left-color: var(--status-online); }
.panel.standby { border-left-color: var(--status-standby); }
.panel.offline { border-left-color: var(--status-offline); opacity: 0.75; }

.panel-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.6rem;
}
.panel-head-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    text-transform: uppercase;
}
.panel-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-head-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.panel-power {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239,68,68,0.14);
    border: 1px solid rgba(239,68,68,0.35);
    color: #f87171;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.panel-power.amino {
    background: rgba(59,130,246,0.14);
    border-color: rgba(59,130,246,0.35);
    color: #93c5fd;
}
.panel-power:hover { background: rgba(239,68,68,0.22); }
.panel-power:active:not(:disabled) { transform: scale(0.93); }
.panel-power:disabled { opacity: 0.4; cursor: not-allowed; }

.panel-type { flex-shrink: 0; }

.panel-meta {
    font-size: 12px;
    color: var(--text-muted);
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.panel-favs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.panel-fav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.55rem 0.4rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    overflow: hidden;
    min-height: 52px;
}
.panel-fav:hover {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.3);
}
.panel-fav:active { transform: scale(0.96); }

.panel-fav-num {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.panel-fav-name {
    font-size: 12px;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-hint {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 0.5rem;
}

.panel-remote {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

.panel-btn {
    padding: 0.55rem 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.panel-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-active);
}
.panel-btn:active { transform: scale(0.96); }
.panel-btn.ok {
    background: rgba(59,130,246,0.18);
    border-color: rgba(59,130,246,0.4);
    color: #dbeafe;
    font-weight: 700;
}


.cc-empty {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto;
}
.cc-empty p:first-of-type {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.cc-empty-icon {
    font-size: 64px;
    margin-bottom: 1.25rem;
    opacity: 0.35;
}

/* Slide-out panels (agent setup, add receiver) */
.side-panel {
    position: fixed;
    right: 1.5rem;
    top: 60px;
    width: 360px;
    max-width: calc(100vw - 3rem);
    background: rgba(15,23,42,0.98);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 50;
}

.side-panel-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* ─── Admin Panel (Executive Dashboard Pattern) ─── */

.admin-shell {
    min-height: 100vh;
    background: var(--bg-base);
    padding: 0;
}


.admin-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.admin-body {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}


.expiry {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(34,197,94,0.12);
    color: var(--status-online);
    border: 1px solid rgba(34,197,94,0.25);
}
.expiry.warn {
    background: rgba(245,158,11,0.14);
    color: var(--status-standby);
    border-color: rgba(245,158,11,0.3);
}
.expiry.expired {
    background: rgba(239,68,68,0.15);
    color: var(--status-offline);
    border-color: rgba(239,68,68,0.35);
}


/* Data table */
.data-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.data-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    gap: 1rem;
    flex-wrap: wrap;
}

.data-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.data-table thead {
    background: rgba(255,255,255,0.02);
}

.data-table th {
    padding: 0.85rem 1.5rem;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-primary);
    vertical-align: middle;
    font-size: 15px;
}

.data-table tbody tr {
    transition: background 0.1s;
}
.data-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-subtext {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 3px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form input, .inline-form select {
    padding: 9px 14px;
    font-size: 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.inline-form input:focus, .inline-form select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(59,130,246,0.06);
}

.btn-sm {
    padding: 9px 16px;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.15s, transform 0.1s;
    font-weight: 600;
}
.btn-sm:active { transform: scale(0.97); }
.btn-sm.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    color: white;
}
.btn-sm.primary:hover { opacity: 0.9; }
.btn-sm.ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-sm.ghost:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.btn-sm.danger {
    background: transparent;
    color: var(--status-offline);
}
.btn-sm.danger:hover { background: rgba(239,68,68,0.1); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.pill-online {
    background: rgba(34,197,94,0.12);
    color: var(--status-online);
    border: 1px solid rgba(34,197,94,0.2);
}
.pill-standby {
    background: rgba(245,158,11,0.12);
    color: var(--status-standby);
    border: 1px solid rgba(245,158,11,0.2);
}
.pill-offline {
    background: rgba(239,68,68,0.1);
    color: var(--status-offline);
    border: 1px solid rgba(239,68,68,0.2);
}
.pill-admin {
    background: rgba(99,102,241,0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.2);
}
.pill-operator {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.copy-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: var(--accent);
    cursor: pointer;
    max-width: 240px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.copy-code:hover { background: rgba(59,130,246,0.08); }

.empty-row td {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 240px;
    }

    .detail-panel {
        overflow: auto;
    }
}

/* === Master-Detail Layout === */
.master-detail-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.receiver-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.receiver-sidebar .sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.receiver-sidebar .sidebar-title { font-size: 15px; font-weight: 600; }
.receiver-sidebar .sidebar-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.receiver-list { flex: 1; overflow-y: auto; padding: 0.5rem 0.45rem; }

/* Sidebar-scoped: bewusst spezifischer als globale .receiver-item-Regel oben */
.receiver-sidebar .receiver-item {
    display: block;                         /* blockt globales flex der .receiver-item */
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius);
    border-left: 3px solid transparent;     /* konstant, nur Farbe toggelt → kein Flicker */
    cursor: pointer;
    margin-bottom: 3px;
    font-size: 15px;
    transition: background 0.15s, border-color 0.15s;
}
.receiver-sidebar .receiver-item:hover { background: rgba(255,255,255,0.04); }
.receiver-sidebar .receiver-item.active {
    background: rgba(59,130,246,0.12);
    border-left-color: var(--accent);
}

.receiver-sidebar .receiver-item-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.3rem;
}
.receiver-sidebar .receiver-item-name {
    flex: 1;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;                           /* ermoeglicht text-overflow im flex-item */
}

.receiver-type-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}
.badge-skyq { background: rgba(59,130,246,0.18); color: #93c5fd; }
.badge-dazn { background: rgba(245,158,11,0.18); color: #fcd34d; }
.badge-vuplus { background: rgba(139,92,246,0.18); color: #c4b5fd; }
.badge-digiturk { background: rgba(239,68,68,0.18); color: #fca5a5; }

.receiver-sidebar .receiver-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.receiver-sidebar .receiver-item-channel {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.receiver-sidebar .receiver-power-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.receiver-power-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.receiver-power-btn:disabled {
    opacity: 0.5;                                     /* war 0.3 — zu unsichtbar, wirkte wie fehlend */
    cursor: not-allowed;
    color: var(--text-muted);
}
.receiver-power-btn.power-skyq:hover:not(:disabled) { border-color: #ef4444; color: #ef4444; }
.receiver-power-btn.power-dazn:hover:not(:disabled) { border-color: #3b82f6; color: #3b82f6; }
.receiver-power-btn.power-vuplus:hover:not(:disabled) { border-color: #8b5cf6; color: #8b5cf6; }
.receiver-power-btn.power-digiturk:hover:not(:disabled) { border-color: #ef4444; color: #ef4444; }

.receiver-item-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 2rem 0.75rem;
}

.receiver-item-add {
    text-align: center;
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin: 0.5rem;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.receiver-item-add:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59,130,246,0.05);
}

/* ─── Sidebar Footer ─── */
.sidebar-footer {
    padding: 0.6rem;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.15);                     /* leicht abgesetzt vom List-Bg */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-agent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.sidebar-agent:hover { background: rgba(255,255,255,0.06); }

.sidebar-agent-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--status-offline);                     /* Default: offline rot, nicht muted */
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.sidebar-agent-status.online { color: var(--status-online); }

.sidebar-setup {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem;
    font-size: 12.5px;
    margin-top: 0.3rem;
}

.sidebar-download-btn {
    display: block;
    text-align: center;
    padding: 0.7rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 13px;
    transition: filter 0.15s;
}
.sidebar-download-btn:hover { filter: brightness(1.1); }

.sidebar-agent-key {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.6rem;
    font-family: ui-monospace, Menlo, Monaco, monospace;
    font-size: 11.5px;
    color: var(--text-primary);
    cursor: pointer;
}

.sidebar-copy-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    text-align: center;
}

.sidebar-link {
    display: block;
    text-align: center;
    padding: 0.6rem 0.5rem;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: rgba(59,130,246,0.08); }
.sidebar-link.muted {
    color: var(--text-secondary);                     /* war --text-muted (zu dunkel) */
}
.sidebar-link.muted:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}

.detail-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* === Vu+ Channel List === */
.vuplus-channel-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 500px;
    overflow-y: auto;
}

.vuplus-channel {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.vuplus-channel:hover { background: rgba(255,255,255,0.04); }
.vuplus-channel.active {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.3);
}
.vuplus-channel:disabled { opacity: 0.4; cursor: default; }
}

/* === Admin Layout === */
.admin-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.admin-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(15,23,42,0.95);
    flex-shrink: 0;
    gap: 1rem;
}
/* Legacy-Klasse — falls noch irgendwo verwendet */
.admin-top-title { font-size: 19px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-base);
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
}
.kpi-card:hover { border-color: var(--accent); background: rgba(59,130,246,0.04); }
.kpi-card.active { border-color: var(--accent); background: rgba(59,130,246,0.08); }
.kpi-card.pulse { border-color: #f59e0b; animation: kpi-pulse 2s ease-in-out infinite; }
@keyframes kpi-pulse { 0%, 100% { border-color: #f59e0b; } 50% { border-color: transparent; } }

.kpi-card-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.kpi-card-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-top: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-card-detail { font-size: 11px; color: var(--text-muted); margin-top: 0.5rem; }
.kpi-card-detail .up { color: var(--status-online); font-weight: 600; }

.admin-body-split {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.admin-nav {
    width: 210px;
    min-width: 210px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    padding: 0.85rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border: none;
    border-left: 3px solid transparent;                /* konstant — kein padding-flicker */
    background: transparent;
    color: var(--text-secondary);
    font-size: 14.5px;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}
.admin-nav-item.active {
    background: rgba(59,130,246,0.12);
    color: var(--accent);
    font-weight: 600;
    border-left-color: var(--accent);
}

.admin-nav-badge {
    background: #f59e0b;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 22px;
    text-align: center;
    line-height: 1.3;
}

.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.admin-content-header {
    margin-bottom: 1.25rem;
}

/* === Onboarding-Wizard (erster Besuch, 0 Receiver) === */
.onboarding {
    max-width: 720px;
    margin: 2rem auto;
    padding: 2rem 1rem;
}
.onboarding-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.onboarding-icon {
    font-size: 56px;
    margin-bottom: 0.75rem;
}
.onboarding-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.onboarding-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.onboarding-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: opacity 0.2s, border-color 0.2s;
}
.onboarding-step.active {
    border-color: rgba(59,130,246,0.45);
    background: rgba(59,130,246,0.05);
    box-shadow: 0 4px 16px rgba(59,130,246,0.08);
}
.onboarding-step.done {
    opacity: 0.65;
}
.onboarding-step.done .step-num {
    background: var(--status-online);
    color: #052e16;
}
.onboarding-step.pending {
    opacity: 0.55;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    margin-top: 2px;
}
.onboarding-step.active .step-num {
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    color: #fff;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}

.step-body h3 {
    margin: 0 0 0.35rem;
    font-size: 16.5px;
    font-weight: 600;
    color: var(--text-primary);
}
.step-body p {
    margin: 0 0 0.75rem;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.step-body p:last-child { margin-bottom: 0; }
.step-hint {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    font-style: italic;
    margin-top: 0.5rem !important;
}

.step-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.btn-primary-lg, .btn-secondary-lg {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: filter 0.15s, background 0.15s, border-color 0.15s;
}
.btn-primary-lg {
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    color: #fff;
}
.btn-primary-lg:hover { filter: brightness(1.1); }
.btn-secondary-lg {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary-lg:hover { background: rgba(255,255,255,0.08); border-color: var(--accent); }

.pulse-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    margin-left: 0.4rem;
    animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* === "Läuft gerade" Banner (AminoDetail & co.) === */
.now-playing {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    padding: 0.95rem 1.2rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(99,102,241,0.08));
    border: 1px solid rgba(59,130,246,0.28);
    border-radius: 14px;
}
.now-playing-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}
.now-playing-value {
    font-size: 22px;
    font-weight: 700;
    color: #c7d2fe;
    letter-spacing: -0.01em;
}

.cc-feedback {
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
}

/* === Admin Action-Buttons in Tabellenzeilen === */
.action-row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    min-height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn-action:hover:not(:disabled) {
    background: rgba(59,130,246,0.1);
    border-color: rgba(59,130,246,0.4);
    color: var(--accent);
}
.btn-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.btn-action .btn-icon {
    font-size: 14px;
    line-height: 1;
}

.btn-action-danger {
    border-color: rgba(239,68,68,0.3);
}
.btn-action-danger:hover:not(:disabled) {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.5);
    color: #fca5a5;
}

/* === Admin — gruppierte Sektionen innerhalb einer Kategorie === */
.admin-section {
    margin-bottom: 1.5rem;
}
.admin-section:last-child { margin-bottom: 0; }

.admin-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
}

.admin-section-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.02));
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
}
.admin-section-warning .admin-section-title {
    color: #fbbf24;
    margin-bottom: 0.5rem;
}
.admin-section-warning .data-panel {
    background: transparent;
    border: none;
}
