/* Digital-SAT — Mobile Overrides (max-width: 768px)
 * Two-View-Pattern: entweder Receiver-Liste ODER Detail-Ansicht sichtbar.
 * Umschaltung per .mobile-view-list / .mobile-view-detail auf .app-shell. */

/* ─── Safe-Area für Notch (iPhone) ─── */
.app-shell.master-detail,
.admin-shell {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* ─── Top-Nav: kompakt ─── */
.top-nav {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
    flex-wrap: nowrap;
}
.brand {
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}
.brand-logo {
    width: 34px;
    height: 34px;
    font-size: 16px;
    flex-shrink: 0;
}
.brand-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-title span { display: none; }   /* Version ausblenden mobile */
.brand-subtitle { display: none; }     /* Subtitle ausblenden mobile */

.top-actions {
    gap: 0.3rem;
    flex-shrink: 0;
}
.top-btn {
    padding: 10px 12px;
    font-size: 13px;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.status-pill {
    padding: 6px 10px;
    font-size: 11px;
}
/* Agent-Download-Button nur Icon mobile */
.top-btn:has(+ :is([href="/admin"], [href="/logout"])) { font-size: 13px; }

/* Site-Pills: volle Breite, unter Brand scrollbar */
.top-actions .site-pills {
    max-width: 100%;
    order: -1;
    flex-basis: 100%;
}

/* ─── Two-View Master/Detail ─── */
.master-detail-body {
    position: relative;
    min-height: 0;
    flex: 1;
}

/* List-Modus: Detail verstecken, Sidebar volle Breite */
.mobile-view-list .receiver-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
}
.mobile-view-list .detail-area {
    display: none;
}

/* Detail-Modus: Sidebar verstecken, Detail volle Breite */
.mobile-view-detail .receiver-sidebar {
    display: none;
}
.mobile-view-detail .detail-area {
    width: 100%;
    padding: 0.9rem 0.75rem 1.25rem;
}

/* ─── Mobile "Zurück zur Übersicht" Button ─── */
.mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 10px 14px;
    margin-bottom: 0.75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mobile-back-btn:active {
    background: var(--bg-surface-hover);
    transform: scale(0.98);
}

/* Desktop: Back-Button immer verstecken (greift nicht — Datei nur mobile geladen,
 * aber zur Sicherheit falls zwischen Breakpoints) */

/* ─── Sidebar / Receiver-Liste mobile ─── */
.receiver-sidebar .sidebar-header {
    padding: 0.9rem 1rem;
}
.receiver-sidebar .sidebar-title { font-size: 15px; }
.receiver-sidebar .sidebar-subtitle { font-size: 12px; }

.receiver-list { padding: 0.5rem 0.6rem; }

.receiver-item {
    padding: 0.85rem 0.9rem;
    margin-bottom: 6px;
    -webkit-tap-highlight-color: transparent;
}
.receiver-item:active {
    background: rgba(59,130,246,0.14);
}
.receiver-item-name { font-size: 15px; }
.receiver-item-channel { font-size: 12px; }

.receiver-type-badge {
    font-size: 11px;
    padding: 2px 7px;
}

/* Power-Button in Sidebar: Touch-Target 44px */
.receiver-power-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
}

.receiver-item-add {
    padding: 0.9rem;
    font-size: 14px;
    margin: 0.6rem 0.5rem;
}

.sidebar-footer { padding: 0.6rem; }
.sidebar-agent { padding: 0.7rem; font-size: 13px; min-height: 44px; }

/* ─── Detail-Area mobile ─── */
.detail-area { padding: 1rem 0.75rem; }

/* cc-receiver Kopfzeile */
.cc-header { flex-wrap: wrap; gap: 0.5rem; }
.cc-title { font-size: 17px; }
.cc-meta { font-size: 12px; }

/* ─── Sky Q Remote (remote-pad) Touch-Targets ─── */
.remote-pad {
    max-width: 100%;
    padding: 0.75rem;
}
.remote-power,
.remote-icon {
    min-width: 48px;
    min-height: 48px;
    font-size: 20px;
}
.remote-icon.large { min-height: 48px; }

.remote-rocker-btn {
    min-width: 48px;
    min-height: 48px;
    font-size: 22px;
}

.dpad {
    gap: 10px;
}
.dpad-btn,
.ok-btn {
    min-width: 56px;
    min-height: 56px;
    font-size: 20px;
}
.ok-btn { font-size: 16px; font-weight: 700; }

.remote-btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
}

.remote-color {
    min-height: 32px;   /* Farbbuttons sind schmal aber lang, 32px reicht ergonomisch */
}

/* ─── Amino / DAZN / Digitürk cc-controls ─── */
.cc-channel-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.cc-channel-btn {
    min-height: 56px;
    font-size: 15px;
    font-weight: 600;
}

.cc-control-row {
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cc-control-btn {
    min-height: 48px;
    flex: 1 1 calc(50% - 0.25rem);
    font-size: 14px;
}

.cc-back {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 13px;
}

/* ─── Vu+ Channel List ─── */
.vuplus-channel {
    min-height: 48px;
    font-size: 14px;
    padding: 0.75rem;
}
.vuplus-channel-list { max-height: none; }

/* ─── Modals / Side-Panel ─── */
.side-panel {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    bottom: 0;
    top: auto;
    max-height: 85vh;
    overflow-y: auto;
}

/* ─── Tap-Highlights global unterdrücken ─── */
button, a, .receiver-item, .site-pill {
    -webkit-tap-highlight-color: transparent;
}

/* Bessere Touch-Scroll-Performance */
.receiver-list,
.detail-area,
.vuplus-channel-list {
    -webkit-overflow-scrolling: touch;
}

/* ────────────────────────────────────────────────────────────────────
   ADMIN — Mobile (<=768px)
   Ziel: Keinerlei horizontal-scroll. Alles innerhalb der Viewport-Breite.
   Nav wird horizontale Chip-Leiste, KPIs 2-spaltig, Tabellen als
   scroll-container mit sichtbarem scrollhint.
   ──────────────────────────────────────────────────────────────────── */

.admin-shell {
    overflow-x: hidden;
    height: 100%;                                 /* statt 100vh — iOS-Safari URL-Bar */
    min-height: 100dvh;
    max-width: 100vw;
}

/* Alle Top-Level-Admin-Container auf max-width:100% begrenzen — Tabellen
   mit vielen Spalten wuerden sonst den Page-Scroll horizontal ausloesen. */
.admin-top-bar,
.admin-body-split,
.admin-body,
.admin-content,
.admin-nav,
.kpi-grid,
.data-panel {
    max-width: 100%;
    min-width: 0;
}
/* Innerhalb einer data-panel: Tabelle bekommt eigenen horizontal-scroll,
   damit sie nicht die Page verbreitert. */
.data-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Top-Bar kompakter, subtitle knapper halten */
.admin-top-bar {
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
}
.admin-top-bar .brand-logo { width: 34px; height: 34px; font-size: 16px; min-width: 34px; }
.admin-top-bar .brand-title { font-size: 16px; }
.admin-top-bar .brand-subtitle {
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* KPI: 5 Spalten -> 2 Spalten (Enrollments rutscht in 3. Reihe allein) */
.kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.75rem 0.75rem;
}
.kpi-card { padding: 0.75rem 0.5rem; }
.kpi-card-value { font-size: 22px; }
.kpi-card-label { font-size: 10.5px; margin-top: 0.25rem; }
.kpi-card-detail { font-size: 10px; margin-top: 0.3rem; white-space: normal; }

/* Nav + Content: nebeneinander -> untereinander */
.admin-body-split {
    flex-direction: column;
    overflow: visible;
}

/* admin-nav: vertikale Sidebar -> horizontale Chip-Leiste */
.admin-nav {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0.5rem;
    gap: 0.35rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    scrollbar-width: thin;
}
.admin-nav::-webkit-scrollbar { height: 4px; }
.admin-nav-item {
    flex-shrink: 0;                               /* keine Kompression im Scroll-Container */
    border-left: none;
    border-bottom: 2px solid transparent;         /* unterstrich statt left-border */
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 13.5px;
    min-height: 40px;
    white-space: nowrap;
}
.admin-nav-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
    background: rgba(59,130,246,0.14);
}

/* Content */
.admin-content {
    padding: 0.85rem 0.75rem;
    width: 100%;
}
.admin-content-header {
    margin-bottom: 0.85rem;
}
.admin-content-header .auth-input {
    width: 100% !important;                       /* inline-style override */
    font-size: 14px !important;
    padding: 9px 12px !important;
    box-sizing: border-box;
}

/* Data-Panels: Padding reduzieren */
.data-panel-header {
    padding: 0.85rem 0.9rem;
    gap: 0.6rem;
}
.data-panel-title { font-size: 16px; }

/* Inline-Form-Inputs (in data-panel-header, z.B. "Neuer Tenant"): full-width */
.inline-form { width: 100%; }
.inline-form input,
.inline-form select {
    flex: 1 1 140px;
    width: auto !important;                       /* override inline style="width:240px" */
    min-width: 0;
    font-size: 14px;
    padding: 9px 12px;
}

/* Data-Table: Scroll-Container mit sichtbarem Hint.
   Table selbst bleibt fluid; an Breakpoint <520 kommt ggf. Card-Layout. */
.data-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}
.data-table {
    font-size: 13.5px;
    min-width: 520px;                             /* sicheres Minimum fuer Lesbarkeit */
}
.data-table th,
.data-table td {
    padding: 0.7rem 0.9rem;
    font-size: 13.5px;
}
.data-table th { font-size: 11px; }

/* Buttons in Tabellen kleiner halten */
.btn-sm {
    padding: 5px 9px !important;
    font-size: 12px !important;
}

/* Sehr schmale Devices: Tabelle bleibt scrollbar, Zellen gedrungener */
@media (max-width: 480px) {
    .kpi-grid { padding: 0.6rem 0.6rem; gap: 0.4rem; }
    .kpi-card-value { font-size: 20px; }
    .data-table { min-width: 460px; }
    .admin-top-bar .brand-subtitle { display: none; }  /* Platz fuer Buttons */
}

/* ────────────────────────────────────────────────────────────────────
   SIGNAL REDESIGN — MOBILE OVERRIDES
   Re-mapped Two-View-Umschaltung auf die neuen .sig-* Klassen.
   Klick auf Receiver-Card setzt mobileView="detail" → Sidebar weg,
   Detail volle Breite. Back-Button im Detail fuehrt zurueck.
   ──────────────────────────────────────────────────────────────────── */

/* ── TopBar: Mehrzeiler + kompakt ─────────────────────────────────── */
.sig-topbar {
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
    row-gap: 8px;
}

.sig-topbar-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
}

.sig-topbar-wordmark {
    font-size: 13px;
    letter-spacing: 1.5px;
}

.sig-topbar-version { display: none; }

/* Indicators haben mobile Platzprobleme — nur AGT behalten */
.sig-indicator { display: none; }
.sig-topbar .sig-indicator:last-of-type { display: flex; }

.sig-topbar-user { display: none; }

.sig-topbar-link {
    padding: 8px 10px;
    font-size: 11px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

.sig-toggle {
    flex: 0 0 auto;
}
.sig-toggle-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
}

/* Site-Filter-Pills: scrollbar, full-width in eigener Zeile */
.sig-site-pills {
    order: 99;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    flex-wrap: nowrap;
    scrollbar-width: thin;
}
.sig-site-pills::-webkit-scrollbar { height: 3px; }
.sig-site-pill {
    flex-shrink: 0;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 12px;
}

/* Die zwei sig-spacer kollabieren auf Mobile */
.sig-topbar .sig-spacer { display: none; }

/* ── Two-View-Umschaltung: Rack vs Detail ─────────────────────────── */

.master-detail-body {
    position: relative;
    min-height: 0;
    flex: 1;
    display: flex;
}

/* Mobile-Standard: List-View zeigt Sidebar, versteckt Detail */
.mobile-view-list .sig-rack {
    width: 100%;
    min-width: 0;
    border-right: none;
    box-shadow: none;
    display: flex;
}
.mobile-view-list .detail-area {
    display: none;
}

/* Detail-View: Sidebar weg, Detail full-width */
.mobile-view-detail .sig-rack {
    display: none;
}
.mobile-view-detail .detail-area {
    width: 100%;
    padding: 0;
    overflow-y: auto;
}

/* ── Signal Rack — mobile Touch-Targets ───────────────────────────── */

.sig-rack-header {
    padding: 12px 14px;
}

.sig-rack-list {
    padding: 8px;
}

.sig-rack-item {
    padding: 14px;
    margin-bottom: 8px;
    min-height: 68px;
    -webkit-tap-highlight-color: transparent;
}

.sig-rack-item:active {
    background: var(--sig-panel2);
    border-color: var(--sig-oxide);
}

.sig-rack-row-1 {
    gap: 10px;
    margin-bottom: 6px;
}

.sig-rack-name {
    font-size: 15px;
}

.sig-rack-site {
    font-size: 12px;
    margin-left: 18px;
}

.sig-rack-channel {
    font-size: 11px;
    margin-left: 18px;
}

.sig-rack-add {
    margin: 10px 8px;
    padding: 14px;
    font-size: 12px;
    min-height: 48px;
}

.sig-rack-footer {
    padding: 10px;
    gap: 6px;
}

.sig-rack-footer .sig-topbar-link {
    min-height: 44px;
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* ── Back-Button (mobile only) im Detail ──────────────────────────── */

.mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 14px;
    margin: 12px 14px 0;
    background: #000;
    border: 1px solid var(--sig-ridge);
    border-radius: 3px;
    color: var(--sig-oxide);
    font-family: var(--sig-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-back-btn:active {
    background: rgba(232, 106, 47, 0.12);
}

/* ── Signal Detail — Padding reduzieren ──────────────────────────── */

.sig-main {
    padding: 12px;
}

.sig-main-admin {
    padding: 12px;
}

.sig-detail-header {
    padding: 14px 16px;
    margin-bottom: 12px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
}

.sig-detail-header-meta {
    min-width: 0;
}

.sig-h1 {
    font-size: 24px;
}

.sig-h1-admin {
    font-size: 22px;
}

.sig-detail-ids {
    font-size: 10px;
    word-break: break-all;
}

.sig-power {
    width: 100%;
    justify-content: center;
    padding: 14px;
    min-height: 52px;
    font-size: 13px;
}

/* Program-Out + Control-Surface: ein Spalte mobile */
.sig-po-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.sig-po-panel,
.sig-cs,
.sig-cb {
    padding: 14px;
}

.sig-po-content {
    padding: 24px 16px 36px;
}

.sig-po-chnum {
    font-size: 42px;
}

.sig-po-chname {
    font-size: 15px;
}

.sig-po-program {
    font-size: 16px;
}

.sig-po-corner {
    font-size: 9px;
}

/* VU-Meter: 4 Spalten auch mobile, aber enger */
.sig-vu-row {
    gap: 8px;
    margin-top: 12px;
}

.sig-vu-head {
    font-size: 8px;
    letter-spacing: 0.5px;
}

.sig-vu-seg {
    height: 6px;
}

/* Control Surface — Touch-friendly */
.sig-hwbtn {
    padding: 14px 4px;
    min-height: 48px;
    font-size: 13px;
}

.sig-cs-grid-3 {
    gap: 6px;
    margin-bottom: 10px;
}

.sig-cs-dpad {
    max-width: 280px;
    gap: 8px;
}

.sig-cs-grid-4 {
    gap: 6px;
    margin-top: 10px;
}

/* Channel Bank — 2-spaltig mobile */
.sig-cb-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.sig-cb-head {
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
}

.sig-cb-search {
    width: 100%;
}

.sig-cb-tile {
    padding: 12px;
    min-height: 82px;
}

.sig-cb-tile-name {
    font-size: 12px;
}

.sig-cb-tile-program {
    font-size: 10px;
}

/* Admin KPI: 2 Spalten mobile */
.sig-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.sig-kpi {
    padding: 14px;
}

.sig-kpi-val {
    font-size: 32px;
}

.sig-kpi-label {
    font-size: 9px;
}

.sig-admin-banner {
    padding: 14px 16px;
    margin-bottom: 12px;
}

/* Admin Tabs: scrollbar, volle Breite */
.sig-tabs-head {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.sig-tabs-head::-webkit-scrollbar { height: 3px; }

.sig-tab {
    padding: 12px 16px;
    font-size: 11px;
    min-height: 44px;
    white-space: nowrap;
    flex-shrink: 0;
}

.sig-tab-body {
    padding: 14px;
}

/* Legacy-ChannelList fit im sig-cb */
.sig-cb .channel-list {
    max-height: none;
}

.sig-cb .channel-toolbar {
    gap: 6px;
    padding-bottom: 10px;
}

.sig-cb .channel-tab,
.sig-cb .channel-sort-btn,
.sig-cb .channel-filter-chip {
    min-height: 40px;
    padding: 8px 12px;
}

.sig-cb .channel-item {
    padding: 10px;
    min-height: 48px;
}

/* ── Sehr schmal: <=360px — noch kompakter ─────────────────────────── */
@media (max-width: 360px) {
    .sig-topbar-wordmark { display: none; }
    .sig-topbar-link { padding: 6px 8px; font-size: 10px; }
    .sig-toggle-btn { padding: 6px 10px; font-size: 11px; }
    .sig-kpi-val { font-size: 28px; }
    .sig-cb-grid { grid-template-columns: 1fr; }
    .sig-h1 { font-size: 20px; }
}

/* ── Tap-Highlights global ───────────────────────────────────────── */
.sig-rack-item,
.sig-hwbtn,
.sig-cb-tile,
.sig-kpi,
.sig-tab,
.sig-site-pill,
.sig-topbar-link,
.sig-toggle-btn {
    -webkit-tap-highlight-color: transparent;
}

/* ─── Vu+ Channel-List — bei vielen Bouquets scrollbar ───
 * Vu+ mit 20+ Bouquets: Chips wrappen vertikal, Kanalliste unten kaum
 * sichtbar. Plus: .channel-list hat max-height mit innerem Scroll, auf
 * Mobile unflüssig. Fix: innerer Scroll aus, Chips horizontal scrollbar
 * (iOS-nativ), Toolbar sticky sodass Suche/Filter beim Scrollen bleiben. */
.channel-list {
    max-height: none !important;
    overflow-y: visible !important;
}
.channel-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-base);
    padding-bottom: 6px;
}
.channel-groups {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.channel-group {
    flex: 0 0 auto !important;
    white-space: nowrap;
}

/* Kein Seitenweiter Horizontal-Scroll. Innere Elemente (Chip-Bar) duerfen
   weiterhin overflow-x:auto haben — das ist ein eigener Scroll-Container. */
html, body, .app-shell {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ─── Root-Cause-Fix: box-sizing für sig-* Buttons ───
 * Desktop-CSS hat .sig-power/.sig-hwbtn mit box-sizing: content-box
 * (Browser-Default bei button). Auf Mobile sprengt padding dadurch die
 * Container-Breite → Power-Button overflowt rechts ueber den Viewport.
 * Hier alle sig-* Interaktiv-Elemente auf border-box normalisieren. */
.sig-power,
.sig-hwbtn,
.sig-back-btn,
.sig-cb-tile,
.sig-po-grab-btn,
.sig-kpi,
.sig-tab,
.sig-site-pill {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

/* Power-Button im Header bekommt volle Breite und wraps unter den Namen. */
.sig-detail-header .sig-power {
    flex: 1 1 100%;
    width: 100%;
}

/* Sky-Q hat zusaetzlich einen SCAN-Button im Header — auch auf eigene Zeile. */
.sig-detail-header > .sig-hwbtn {
    flex: 1 1 100%;
    width: 100%;
}

/* EDIT-Button in Channel-Bank-Head: nicht full-width nehmen. */
.sig-cb-head .sig-hwbtn {
    flex: 0 0 auto;
    width: auto;
}

/* Back-Button "← ÜBERSICHT" als sticky floating Element top-left —
   immer erreichbar beim Scrollen der Detail-View. */
.sig-detail-crumbs .sig-back-btn {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: calc(env(safe-area-inset-left, 0px) + 10px);
    z-index: 90;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
}
/* Platz fuer den fixed Button oben schaffen damit er nichts ueberlappt. */
.sig-detail { padding-top: 52px; }
/* Die alte in-line Position im crumbs-container entfernen (Badge-Unit-Text bleibt). */
.sig-detail-crumbs { padding-left: 0; }

/* Zusaetzliche Sperre gegen horizontalen Overflow in der Receiver-Ansicht. */
.sig-detail,
.sig-po-grid,
.sig-panel {
    max-width: 100%;
    overflow-x: hidden;
}

/* ─── Preset-Editor-Modal (Mobile) ─── */
/* Desktop: Slot | Name | Kanal | ✕  in einer Zeile.
   Mobile: Slot + Name oben, Kanal + ✕ darunter. Vollbreite auf <=480px. */
.preset-modal {
    padding: 1rem;
    width: 100%;
    max-height: 92vh;
    border-radius: 10px;
}
.preset-modal-head { margin-bottom: 10px; }
.preset-row {
    flex-wrap: wrap;
    gap: 6px;
}
.preset-row-head { display: none; }
.preset-slot {
    width: 28px;
    font-size: 12px;
}
.preset-input { min-width: 0; font-size: 14px; }
.preset-input[type="number"] {
    flex: 1 1 70%;
}
.preset-btn-del {
    flex: 0 0 40px;
    margin-left: auto;
}

/* Row umbrechen: Name oben volle Breite, Kanal + Delete unten */
@media (max-width: 480px) {
    .preset-row > .preset-input:not([type="number"]) {
        flex: 1 1 calc(100% - 32px);
        order: 1;
    }
    .preset-slot { order: 0; }
    .preset-row > .preset-input[type="number"] {
        flex: 1 1 auto;
        margin-left: 32px;  /* align mit Name-Input oberhalb */
        order: 2;
    }
    .preset-btn-del { order: 3; }
}

/* ─── Channel-Bank-Head mit EDIT-Button ─── */
/* Auf Mobile kann der EDIT-Button zusammen mit "n PRESETS"-Label und
   Eyebrow-Label in engen Platz laufen. Wrap ist schon gesetzt; sicherstellen
   dass kein Label ueberlaeuft. */
.sig-cb-head .sig-eyebrow {
    min-width: 0;
    flex: 1 1 auto;
}
.sig-cb-head .sig-hwbtn {
    flex: 0 0 auto;
}
.sig-cb-head .sig-cb-count {
    flex: 0 0 auto;
    font-size: 11px;
}
/* Sig-Spacer auf Mobile deaktivieren — bei Wrap pusht er unnoetig in Luft */
@media (max-width: 480px) {
    .sig-cb-head .sig-spacer { display: none; }
}
