/* AirDeck Studio – Broadcast-Design (dunkel, dicht, Neon-Akzente) */
:root {
  --bg: #050b17;
  --bg-2: #081226;
  --panel: rgba(13, 24, 46, .82);
  --panel-solid: #0d182e;
  --panel-2: #12213e;
  --line: rgba(88, 132, 214, .18);
  --line-2: rgba(88, 132, 214, .32);
  --text: #e8eefb;
  --muted: #8195b8;
  --primary: #2f8cff;
  --accent: #8b5cf6;
  --cyan: #22d3ee;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 12px;
  --deck-a: #2f8cff;
  --deck-b: #22c55e;
  --deck-c: #f59e0b;
  --deck-d: #a855f7;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(47, 140, 255, .14), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(139, 92, 246, .12), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 13px/1.35 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
h2 { font-size: 13px; font-weight: 650; margin: 0; letter-spacing: .01em; }
button, select, input, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.hint { color: var(--muted); font-size: 11px; margin: 0 0 8px; }
.ico { flex: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Grundgerüst */
.app { display: flex; height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Seitenleiste */
.sidebar { width: 206px; flex: none; display: flex; flex-direction: column; gap: 14px; padding: 14px 10px; background: linear-gradient(180deg, rgba(10, 20, 40, .96), rgba(6, 12, 26, .96)); border-right: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; font-weight: 800; letter-spacing: .22em; font-size: 16px; color: #fff; }
.logo img { border-radius: 9px; filter: drop-shadow(0 0 10px rgba(47, 140, 255, .55)); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button, .nav a.nav-link { text-decoration: none; }
.nav button, .nav a.nav-link { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 1px solid transparent; border-radius: 9px; padding: 8px 10px; color: #b6c4de; cursor: pointer; text-align: left; }
.nav a.nav-link:hover, .nav button:hover { background: rgba(47, 140, 255, .08); color: #fff; }
.nav button[aria-pressed="true"] { background: linear-gradient(90deg, rgba(47, 140, 255, .35), rgba(47, 140, 255, .12)); border-color: rgba(47, 140, 255, .45); color: #fff; box-shadow: 0 0 18px rgba(47, 140, 255, .18) inset; }
.nav-badge { margin-left: auto; background: #ff3b5c; color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 1px 6px; text-transform: uppercase; }
.side-foot { margin-top: auto; }
.side-label { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 0 8px 6px; }
.side-outputs { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.side-out { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 6px; border-radius: 7px; background: rgba(255, 255, 255, .03); }
.side-out .dot, .st-auto .dot, .chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #475569; flex: none; }
.side-out.on .dot, .chip.on .dot, .st-auto.on .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.side-out.err .dot, .chip.err .dot { background: var(--red); }

/* Kopfzeile */
.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--line); background: rgba(6, 13, 28, .7); backdrop-filter: blur(10px); }
.station-pick { display: flex; align-items: center; gap: 10px; }
.station-logo { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 0 16px rgba(139, 92, 246, .35); }
.station-text { display: flex; flex-direction: column; }
#station-select { background: transparent; border: 0; font-weight: 700; font-size: 15px; padding: 0; cursor: pointer; }
#station-select option { background: var(--panel-solid); }
.brand-sub { color: var(--muted); font-size: 11px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onair { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 12px; letter-spacing: .05em; background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid var(--line); }
.onair .dot { width: 9px; height: 9px; border-radius: 50%; background: #475569; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse 1s infinite; }
.onair[data-state="on"] { color: #86efac; border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .12); }
.onair[data-state="on"] .dot { background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s infinite; }
.onair[data-state="live"] { color: #fecaca; border-color: rgba(239, 68, 68, .6); background: rgba(239, 68, 68, .16); }
.onair[data-state="live"] .dot { background: var(--red); box-shadow: 0 0 10px var(--red); animation: pulse 1s infinite; }
/* Betriebsart: Manuell (selbst live) | 24/7 AutoDJ */
.mode-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mode-switch button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; background: rgba(255, 255, 255, .04); color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing: .04em; cursor: pointer; }
.mode-switch button + button { border-left: 1px solid var(--line); }
.mode-switch button:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.mode-switch #btn-manual[aria-pressed="true"] { color: #fde68a; background: rgba(234, 179, 8, .16); }
.mode-switch #btn-auto[aria-pressed="true"] { color: #86efac; background: rgba(34, 197, 94, .16); }
.deck-vol[hidden] { display: none; }
.mode-chip { padding: 6px 10px; border-radius: 999px; font-weight: 800; font-size: 11px; letter-spacing: .06em; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--muted); }
.mode-chip[data-mode="AUTO"] { color: #86efac; border-color: rgba(34, 197, 94, .5); }
.mode-chip[data-mode="MANUAL"] { color: #fde68a; border-color: rgba(234, 179, 8, .6); background: rgba(234, 179, 8, .12); }
.mode-chip[data-mode="LIVE"] { color: #fecaca; border-color: rgba(239, 68, 68, .6); background: rgba(239, 68, 68, .16); }
.mode-chip[data-mode="EMERGENCY"] { color: #fff; border-color: #ef4444; background: #b91c1c; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.clock { text-align: right; }
#clock-time { font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
#clock-date { color: var(--muted); font-size: 11px; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.conn.ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.top .mobile-only { display: none; }

/* Buttons */
.btn, .toggle, .icon-btn, .deck-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, rgba(30, 50, 90, .7), rgba(18, 33, 62, .7)); border: 1px solid var(--line-2); border-radius: 9px;
  padding: 6px 11px; cursor: pointer; user-select: none; color: var(--text);
}
.btn:hover, .toggle:hover, .icon-btn:hover, .deck-btn:hover { border-color: var(--primary); box-shadow: 0 0 12px rgba(47, 140, 255, .25); }
.btn.small, .toggle.small { padding: 3px 9px; font-size: 12px; }
.btn.primary { background: linear-gradient(180deg, #3b95ff, #1f6fe0); border-color: #3b95ff; color: #fff; font-weight: 650; }
.btn.danger { border-color: rgba(239, 68, 68, .55); color: #fca5a5; }
.toggle { font-weight: 750; letter-spacing: .04em; font-size: 12px; }
.toggle[aria-pressed="true"] { background: linear-gradient(180deg, #2fd46b, #16a34a); border-color: var(--green); color: #03140a; }
#btn-stream[aria-pressed="true"], #btn-mic[aria-pressed="true"], #po-mic[aria-pressed="true"] { background: linear-gradient(180deg, #f25555, #d42a2a); border-color: var(--red); color: #fff; }
.chk { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); cursor: pointer; font-size: 12px; }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none !important; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-height: 0; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .03); }
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.panel-head h2 { margin-right: auto; }
.panel-head input[type=search], .panel-head select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 3px 7px; min-width: 0; max-width: 150px; }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pill { font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: #1e2c49; color: var(--muted); white-space: nowrap; }
.pill.active, .pill.connected, .pill.running { background: rgba(34, 197, 94, .18); color: #86efac; }
.pill.standby, .pill.takeover_pending, .pill.connecting { background: rgba(47, 140, 255, .18); color: #93c5fd; }
.pill.failed, .pill.error, .pill.blocked { background: rgba(239, 68, 68, .2); color: #fca5a5; }
.pill.unsupported, .pill.restarting { background: rgba(245, 158, 11, .2); color: #fcd34d; }
.tabs { display: flex; gap: 3px; flex-wrap: wrap; }
.tabs button { background: none; border: 1px solid transparent; border-radius: 7px; padding: 2px 9px; color: var(--muted); cursor: pointer; font-size: 12px; }
.tabs button[aria-pressed="true"] { background: rgba(47, 140, 255, .18); border-color: rgba(47, 140, 255, .45); color: #fff; }

/* Dashboard-Raster */
.dash { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; padding: 12px; }
.dash-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; }
.row3 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 250px; gap: 12px; min-height: 360px; }
.row3 > .panel { max-height: 520px; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* Decks */
.decks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.deck { --c: var(--deck-a); position: relative; border-radius: var(--radius); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, #0d182e), #0b1528 60%); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 18%, transparent), inset 0 1px 0 rgba(255, 255, 255, .05); overflow: hidden; display: flex; flex-direction: column; }
.deck[data-deck="B"] { --c: var(--deck-b); }
.deck[data-deck="C"] { --c: var(--deck-c); }
.deck[data-deck="D"] { --c: var(--deck-d); }
.deck.drop { outline: 2px solid var(--c); }
.deck[data-status="playing"] { box-shadow: 0 0 30px color-mix(in srgb, var(--c) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, .06); }
.deck-head { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), color-mix(in srgb, var(--c) 12%, transparent)); font-weight: 700; }
.deck-head { white-space: nowrap; overflow: hidden; }
.deck-head .role { color: color-mix(in srgb, var(--c) 60%, #fff); font-weight: 600; }
.deck-status { margin-left: auto; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.deck[data-status="playing"] .deck-status { color: #fff; }
.deck-body { display: grid; grid-template-columns: 58px minmax(0, 1fr) 10px; gap: 10px; padding: 10px; align-items: center; }
.deck-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-artist { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.deck-time { display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: tabular-nums; margin-top: 3px; }
.deck-remain { font-size: 17px; font-weight: 700; }
.deck-remain.warn { color: var(--amber); }
.deck-remain.end { color: var(--red); animation: pulse 1s infinite; }
.vu-deck { width: 8px; height: 58px; border-radius: 4px; background: #0a1427; overflow: hidden; display: flex; align-items: flex-end; }
.vu-deck i { display: block; width: 100%; height: 0; background: linear-gradient(0deg, var(--green) 0 65%, var(--amber) 65% 85%, var(--red) 85%); transition: height .08s linear; }
.progress { height: 5px; margin: 0 10px; background: rgba(255, 255, 255, .08); border-radius: 3px; overflow: hidden; cursor: pointer; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 40%, #fff)); box-shadow: 0 0 8px var(--c); }
.deck-ctrl { display: flex; gap: 5px; align-items: center; padding: 9px 10px 6px; }
.deck-btn { padding: 5px 8px; border-radius: 8px; }
.deck-btn.play { width: 40px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--c) 30%, #0d182e); border-color: var(--c); }
.deck-btn.play[aria-pressed="true"] { background: var(--c); color: #04101f; box-shadow: 0 0 14px var(--c); }
.deck-btn.cue { font-size: 11px; font-weight: 750; letter-spacing: .05em; }
.deck-btn.cue[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #1f1300; }
.deck-ctrl input[type=range] { flex: 1; min-width: 30px; accent-color: var(--c); }
.deck-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 10px 10px; font-size: 11px; }
.deck-stats div { background: rgba(0, 0, 0, .22); border-radius: 6px; padding: 3px 6px; display: flex; flex-direction: column; }
.deck-stats span:first-child { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.deck-stats span:last-child { font-variant-numeric: tabular-nums; font-weight: 650; }

/* Cover */
.cover { width: 58px; height: 58px; border-radius: 9px; overflow: hidden; flex: none; display: grid; place-items: center; font-weight: 800; color: rgba(255, 255, 255, .85); background: linear-gradient(135deg, var(--c, var(--primary)), #1b2a52); font-size: 16px; }
.cover.small { width: 32px; height: 32px; border-radius: 6px; font-size: 11px; }
.cover.big { width: 74px; height: 74px; font-size: 20px; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Cardwall */
.carts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.cart {
  position: relative; border-radius: 11px; padding: 9px 10px; min-height: 84px; cursor: pointer; text-align: left;
  border: 1px solid color-mix(in srgb, var(--c) 70%, #fff 0%); color: #fff; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 85%, #fff 8%), color-mix(in srgb, var(--c) 55%, #000 35%));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform .08s ease;
}
.cart:hover { transform: translateY(-1px); }
.cart:active { transform: scale(.98); }
.cart .cart-top { display: flex; align-items: center; gap: 7px; }
.cart .cart-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.cart.empty { background: rgba(255, 255, 255, .03); border: 1px dashed var(--line-2); color: var(--muted); box-shadow: none; }
.cart.empty .cart-ico { background: rgba(255, 255, 255, .05); }
.cart.playing { outline: 2px solid #fff; box-shadow: 0 0 22px var(--c); }
.cart.drop { outline: 2px dashed #fff; }
.cart-label { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-sub { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-dur { position: absolute; right: 9px; bottom: 7px; font-size: 11px; font-variant-numeric: tabular-nums; opacity: .9; }
.cart-edit { position: absolute; top: 4px; right: 5px; background: none; border: 0; color: inherit; opacity: .75; cursor: pointer; font-size: 14px; }

/* Now Playing */
.np-card { display: flex; gap: 12px; align-items: center; }
.np-text { min-width: 0; }
.np-title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-time { color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 3px; font-size: 12px; }
.np-bar { height: 4px; background: rgba(255, 255, 255, .08); border-radius: 2px; margin: 10px 0; overflow: hidden; }
.np-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--accent)); }
.np-next-head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.next-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.next-list li { display: flex; align-items: center; gap: 8px; }
.next-list .t { min-width: 0; flex: 1; }
.next-list .t div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-list .t div:last-child { color: var(--muted); font-size: 11px; }

/* Listen */
.table-wrap { flex: 1; overflow: auto; min-height: 120px; position: relative; border-radius: 8px; }
.table-wrap.drop { outline: 2px dashed var(--primary); }
table.list { width: 100%; border-collapse: collapse; }
.list th { position: sticky; top: 0; z-index: 1; background: var(--panel-solid); color: var(--muted); font-weight: 550; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); }
.queue-panel .list td:nth-child(2) { max-width: 0; width: 100%; }
.list td { padding: 4px 6px; border-bottom: 1px solid rgba(88, 132, 214, .08); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.list tr[draggable="true"] { cursor: grab; }
.list tbody tr:hover { background: rgba(47, 140, 255, .08); }
.list tbody tr.current td { background: rgba(34, 197, 94, .14); color: #bbf7d0; }
.list tr.drop-before td { box-shadow: 0 2px 0 var(--primary) inset; }
.list .act { text-align: right; width: 1%; }
.list .act button, .list .act select { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; }
.list .act button:hover { color: var(--text); }
.tag { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: rgba(47, 140, 255, .14); color: #9cc4ff; }
.tag.cat { background: color-mix(in srgb, var(--c, #2f8cff) 22%, transparent); color: color-mix(in srgb, var(--c, #2f8cff) 55%, #fff); }
.empty { color: var(--muted); padding: 18px; text-align: center; }

/* Schnelltrigger & Live-Voice */
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.quick button { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text); cursor: pointer; text-align: left; font-size: 12px; }
.quick button:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.quick button .ico { color: var(--c); }
.lv-body { display: grid; grid-template-columns: 14px auto 1fr; gap: 12px; align-items: center; }
.vu-v { width: 10px; height: 76px; border-radius: 5px; background: #0a1427; overflow: hidden; display: flex; align-items: flex-end; }
.vu-v i { display: block; width: 100%; height: 0; background: linear-gradient(0deg, var(--green) 0 65%, var(--amber) 65% 85%, var(--red) 85%); transition: height .08s linear; }
.mic-btn { width: 76px; height: 76px; border-radius: 50%; border: 2px solid rgba(47, 140, 255, .6); background: radial-gradient(circle at 35% 30%, #4aa3ff, #1d5fd0); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 24px rgba(47, 140, 255, .45); }
.mic-btn.on { background: radial-gradient(circle at 35% 30%, #ff6b6b, #c81e1e); border-color: #ff8a8a; box-shadow: 0 0 28px rgba(239, 68, 68, .6); animation: pulse 1.4s infinite; }
.lv-side { display: flex; flex-direction: column; gap: 6px; }

/* Rechte Spalte */
.stream-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.stream-sum div { background: rgba(0, 0, 0, .2); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; }
.stream-sum span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.stream-sum strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.sources, .outputs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.src, .out { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 9px; padding: 7px 8px; display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: center; }
.src.active { border-color: rgba(34, 197, 94, .7); background: rgba(34, 197, 94, .08); box-shadow: 0 0 14px rgba(34, 197, 94, .15); }
.prio { font-weight: 800; font-variant-numeric: tabular-nums; border-radius: 7px; padding: 3px 7px; background: rgba(47, 140, 255, .18); color: #93c5fd; grid-row: span 2; text-align: center; min-width: 36px; }
.src-name, .out-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-meta, .out-meta { color: var(--muted); font-size: 11px; grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-actions { grid-row: span 2; display: flex; gap: 4px; }
.po-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-meta { font-size: 11px; margin: 2px 0 8px; }
.po-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.fader-row, .sys-row { display: grid; grid-template-columns: 62px 1fr 62px; gap: 8px; align-items: center; margin: 4px 0; color: var(--muted); font-size: 12px; }
.fader-row input { accent-color: var(--primary); width: 100%; }
.vu-h { height: 16px; border-radius: 4px; background: repeating-linear-gradient(90deg, #0a1427 0 5px, #081021 5px 7px); overflow: hidden; }
.vu-h i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green) 0 60%, #a3e635 60% 72%, var(--amber) 72% 86%, var(--red) 86%); -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); transition: width .08s linear; }
.meter-row { display: grid; grid-template-columns: 40px 1fr 40px 1fr; gap: 6px; align-items: center; margin-top: 6px; color: var(--muted); font-size: 12px; }
.meter-row.small { grid-template-columns: 52px 1fr 40px; }
.meter { height: 7px; background: #0a1427; border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green) 0 70%, var(--amber) 70% 88%, var(--red) 88%); transition: width .15s linear; }
.meter.gr i { background: var(--accent); }
.sys-row .meter i { background: linear-gradient(90deg, var(--primary), var(--cyan)); }
.silence { margin-top: 8px; padding: 4px 8px; border-radius: 6px; background: rgba(239, 68, 68, .2); color: #fecaca; font-weight: 700; text-align: center; }

/* Statusleiste */
.status { display: flex; align-items: center; gap: 18px; padding: 6px 14px; border-top: 1px solid var(--line); background: rgba(5, 11, 23, .9); font-size: 12px; white-space: nowrap; overflow: hidden; }
.st-auto { display: inline-flex; align-items: center; gap: 6px; }
.st-next strong { font-weight: 600; }
.st-msg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; flex: 1; }
#status-text.err { color: #fca5a5; }
.st-chips { display: flex; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.bottom-nav { display: none; }

/* Mobil-Übersicht */
.m-home { display: none; }
@media (max-width: 900px) {
  .m-home { display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
  .m-np { display: flex; gap: 12px; align-items: center; }
  .m-np-text { min-width: 0; }
  .m-transport { display: flex; justify-content: center; align-items: center; gap: 22px; }
  .m-transport .icon-btn { width: 52px; height: 52px; border-radius: 50%; }
  .m-play { width: 74px; height: 74px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; background: radial-gradient(circle at 35% 30%, #4aa3ff, #1d5fd0); box-shadow: 0 0 26px rgba(47, 140, 255, .5); }
  .m-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .m-tiles button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(30, 50, 90, .6), rgba(18, 33, 62, .6)); color: var(--text); font-size: 12px; cursor: pointer; }
  .m-tiles .ico { color: #6fb1ff; }
  .m-stream { font-size: 12px; }
  .decks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Dialog */
dialog { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(2, 6, 16, .7); backdrop-filter: blur(3px); }
dialog h3 { margin: 0 0 12px; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.field label { color: var(--muted); font-size: 12px; }
.field input, .field select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
.field input[type=checkbox] { align-self: flex-start; }
.field small { color: var(--muted); font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* Responsiv */
@media (max-width: 1500px) {
  .row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .row3 .stack { grid-column: span 2; flex-direction: row; }
  .row3 .stack > .panel { flex: 1; }
  .carts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .6); }
  .top .mobile-only { display: inline-flex; }
  .top-actions { margin-left: 0; width: 100%; order: 5; overflow-x: auto; }
  .clock { margin-left: auto; }
  .row3 { grid-template-columns: minmax(0, 1fr); }
  .row3 .stack { grid-column: auto; flex-direction: column; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .status { display: none; }
  .bottom-nav { display: flex; justify-content: space-around; border-top: 1px solid var(--line); background: rgba(5, 11, 23, .96); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: var(--muted); font-size: 11px; cursor: pointer; }
  .bottom-nav button[aria-pressed="true"] { color: var(--primary); }
}
@media (max-width: 560px) {
  .decks { grid-template-columns: minmax(0, 1fr); }
  .carts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart { min-height: 72px; }
  .dash { padding: 8px; gap: 8px; }
  .brand-sub { display: none; }
  #clock-date { display: none; }
}
/* Bereiche */
.views { margin-left: 4px; }
.view-page { flex: 1; min-height: 0; overflow: auto; padding: 10px; }
.view-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); align-items: start; }
.view-grid .table-wrap { max-height: 420px; }
tr.active-row td { background: rgba(34,197,94,.08); }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.field textarea { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: 12px/1.4 ui-monospace, monospace; color: var(--text); }
.pl { border-bottom: 1px solid var(--line); padding: 6px 0; }
.pl-head { display: flex; align-items: center; gap: 8px; }
.pl-head .act { margin-left: auto; }
.pl-head .act button, .pl-items .act button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; }
.pl-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pl-name { background: none; border: 0; color: var(--text); font-weight: 600; cursor: pointer; padding: 0; text-align: left; }
.pl-items { margin: 6px 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-items li { display: flex; gap: 8px; align-items: center; }
.pl-items li > span:first-child { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-now { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* laut.fm */
.lf-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lf-content { display: flex; flex-direction: column; gap: 10px; }
.lf-split { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 10px; align-items: start; }
.lf-pl { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; }
.lf-pl-item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--text); cursor: pointer; text-align: left; }
.lf-pl-item:hover { border-color: var(--primary); }
.lf-search { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.lf-search input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; min-width: 0; flex: 1 1 120px; }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid rgba(31,45,74,.5); }
.kv > span:last-child { text-align: right; overflow-wrap: anywhere; }
.lf-grid { border-collapse: collapse; width: 100%; font-size: 11px; }
.lf-grid th, .lf-grid td { border: 1px solid var(--line); padding: 2px 4px; }
.lf-grid td { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; height: 20px; }
.lf-grid td:hover { outline: 1px solid var(--primary); }
.lf-form { display: grid; gap: 4px; }
.lf-logo { max-width: 160px; border-radius: 10px; display: block; margin-bottom: 8px; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 120px; margin-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; font-size: 9px; color: var(--muted); }
.bar i { width: 100%; background: linear-gradient(180deg, var(--primary), var(--accent)); border-radius: 3px 3px 0 0; min-height: 2px; }
@media (max-width: 720px) { .lf-split { grid-template-columns: 1fr; } .views { width: 100%; order: 5; } }
.field output.info { display: block; padding: 8px 10px; background: rgba(255,255,255,.04); border-radius: 8px; }

/* ---------- Navigation ---------- */
.nav-group { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 12px 10px 4px; }
.nav-group:first-child { padding-top: 0; }
.nav kbd { margin-left: auto; font: 10px/1 inherit; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; opacity: .7; }
.nav .nav-badge + kbd { margin-left: 6px; }

/* ---------- Fenster-System (Desktop) ---------- */
.dash.ws-mode { display: block; }
.dash.ws-mode > .dash-main, .dash.ws-mode > .side { display: none; }
.ws { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 44px; grid-auto-flow: row dense; gap: 12px; }
.ws > .win { position: relative; overflow: auto; min-width: 0; scrollbar-width: thin; }
.ws > .win > .win-handle { position: sticky; top: -10px; z-index: 2; margin: -10px -12px 8px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.ws:not(.locked) .win-handle { cursor: grab; }
.ws:not(.locked) .win-handle:active { cursor: grabbing; }
.ws.locked .win-resize, .ws.locked .win-tools [data-act] { display: none; }
.win-frame > .decks { flex: 1; }
.win-tools { display: inline-flex; gap: 2px; order: 99; }
.win-btn { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 6px; width: 22px; height: 22px; display: grid; place-items: center; cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }
.win-btn:hover { color: #fff; border-color: var(--line); background: rgba(255, 255, 255, .05); }
.win-resize { position: sticky; float: right; bottom: -10px; right: -12px; width: 16px; height: 16px; margin: -6px -10px -10px auto; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, rgba(140, 170, 220, .5) 50%, transparent 62%, rgba(140, 170, 220, .5) 72%, transparent 80%); border-radius: 0 0 var(--radius) 0; z-index: 3; }
.ws > .win.floating { z-index: 50; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(47, 140, 255, .35); }
.ws > .win.dragging { opacity: .85; z-index: 60; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.ws > .win.drop-before { outline: 2px dashed var(--accent, #2f8cff); outline-offset: 3px; }
.flash { animation: win-flash 1.2s ease-out; }
@keyframes win-flash { 0%, 30% { box-shadow: 0 0 0 3px rgba(47, 140, 255, .8), 0 0 30px rgba(47, 140, 255, .5); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

.station-logo.has-img { background: #0b1628; padding: 0; overflow: hidden; }
.station-logo img { width: 100%; height: 100%; object-fit: cover; }

.ai-pending { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; margin-bottom: 8px; background: rgba(139, 92, 246, .06); }
.ai-pending p { margin: 6px 0; }
.list td.err { color: #ff8a9b; }
.with-list { display: contents; }
.algo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 10px; }
.algo { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: rgba(255, 255, 255, .02); display: flex; flex-direction: column; gap: 6px; }
.algo.on { border-color: rgba(34, 197, 94, .45); }
.algo-head { display: flex; align-items: center; gap: 8px; }
.algo-head .pill { margin-left: auto; }
.algo p { margin: 0; font-size: 12px; }

/* ---------- Nextcloud ---------- */
.nc-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.nc-list { list-style: none; margin: 0; padding: 0; }
.nc-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); min-height: 48px; }
.nc-row.off { opacity: .45; }
.nc-chk { display: grid; place-items: center; height: 100%; }
.nc-chk input { width: 20px; height: 20px; }
.nc-name { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; text-align: left; padding: 12px 6px; cursor: pointer; min-width: 0; font: inherit; }
.nc-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-row.dir .nc-name { font-weight: 600; }
.nc-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 2px; background: var(--panel); }

/* Setup-Assistent */
.wizard-head h3 { margin: 2px 0 8px; }
.wizard-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); margin-bottom: 12px; overflow: hidden; }
.wizard-bar i { display: block; height: 100%; background: var(--accent, #19c3e6); transition: width .2s; }
.wizard-error { color: #fecaca; background: rgba(239, 68, 68, .15); border: 1px solid rgba(239, 68, 68, .5); border-radius: 8px; padding: 8px 10px; }
.track-warn { color: #fbbf24; cursor: help; }
/* Hörer-Posteingang */
.inbox-item { border-top: 1px solid var(--line); padding: 10px 2px; display: grid; gap: 6px; }
.inbox-item.new { border-left: 3px solid var(--accent, #19c3e6); padding-left: 8px; }
