/* =========================================================
   EPG Planer – Stil angelehnt an PlyCast (Modern Theme)
   ========================================================= */

:root {
    color-scheme: dark;

    --bg-main: #0e1115;
    --bg-panel: #14181e;
    --bg-panel-light: #1c222a;
    --bg-row: #161b21;
    --bg-row-hover: #1e252e;
    --surface-head: #11151a;

    --border: rgba(255, 255, 255, .08);
    --border-soft: rgba(255, 255, 255, .045);

    --text: #e9edf2;
    --text-secondary: #8a95a3;
    --text-dark: #5a6470;

    --accent: #4c8dff;
    --accent-soft: rgba(76, 141, 255, .15);
    --onair: #f04a5b;
    --next: #3ccf8e;
    --warning: #f2b14c;

    --r-lg: 10px;
    --r-md: 7px;
    --r-sm: 5px;
    --ring: 0 0 0 3px rgba(76, 141, 255, .25);
    --mono: "Cascadia Mono", Consolas, monospace;

    --agenda-w: 400px;
    --editor-w: 380px;
    --px-hour: 96px;
    --px-snap: 8px;
    --snap-line: transparent;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    font: 13px/1.4 Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    letter-spacing: .1px;
    color: var(--text);
    background: var(--bg-main);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.app { display: flex; flex-direction: column; height: 100vh; }

/* ---------- Buttons & Eingaben ---------- */
button {
    padding: 7px 13px; font: inherit; font-size: 12px; color: var(--text);
    background: var(--bg-panel-light); border: 1px solid var(--border); border-radius: var(--r-md);
    cursor: pointer; transition: background 120ms, border-color 120ms, color 120ms, box-shadow 120ms;
}
button:hover:not(:disabled) { background: #252d37; border-color: rgba(255,255,255,.14); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
button.primary { background: rgba(76,141,255,.16); border-color: rgba(76,141,255,.45); color: #9cc0ff; font-weight: 600; }
button.primary:hover:not(:disabled) { background: rgba(76,141,255,.28); }
button.danger { background: transparent; border-color: rgba(240,74,91,.4); color: #ff6b7a; }
button.danger:hover:not(:disabled), button.danger[data-confirm="1"] { background: var(--onair); border-color: var(--onair); color: #fff; }
.icon-btn { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; font-size: 18px; line-height: 1; background: transparent; border-color: transparent; color: var(--text-secondary); }

.input {
    width: 100%; padding: 8px 10px; font: inherit; color: var(--text);
    background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--r-md); outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
textarea.input { resize: vertical; min-height: 130px; line-height: 1.5; }

/* ---------- Topbar ---------- */
.topbar { flex: 0 0 auto; display: flex; align-items: stretch; gap: 10px; padding: 10px; background: var(--bg-main); border-bottom: 1px solid var(--border); }
.tb-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 4px; }
.tb-logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff; background: linear-gradient(135deg, var(--accent), #1a5fae); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset; }
.tb-title { font-size: 15px; font-weight: 700; letter-spacing: .3px; }
.tb-sub { max-width: 220px; font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tb-block { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 8px 14px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--r-lg); }
.tb-onair { flex: 1.6 1 0; min-width: 260px; }
.tb-next { flex: 1 1 0; min-width: 180px; }
.tb-clock { flex: 0 0 190px; align-items: flex-end; }
.tb-label { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 10px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--text-dark); }
.tb-clock .tb-label { color: var(--accent); }
.tb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); }
.tb-elapsed { flex: 0 0 auto; margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tb-counter { margin-top: 2px; font-size: 26px; font-weight: 650; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-onair .tb-counter { color: var(--onair); }
.tb-counter.is-warning { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { opacity: .35; } }
.tb-progress { height: 3px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.06); }
.tb-progress > div { width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--onair), #ff7a6b); transition: width 1s linear; }
.tb-state { flex: 0 0 auto; padding: 3px 9px; border-radius: 99px; font-size: 10px; letter-spacing: .6px; color: var(--text-secondary); background: var(--bg-panel-light); }
.tb-state[data-state="onair"] { color: #fff; background: var(--onair); box-shadow: 0 0 10px rgba(240,74,91,.55); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 2px rgba(240,74,91,.2); } }
.tb-tag-next { padding: 2px 9px; border-radius: 99px; color: var(--next); background: rgba(60,207,142,.15); border: 1px solid rgba(60,207,142,.35); }
#nextStart { letter-spacing: .3px; text-transform: none; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tb-next-name { margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--next); }

/* ---------- Toolbar ---------- */
.toolbar { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--surface-head); border-bottom: 1px solid var(--border); }
.toolbar .input { width: auto; padding: 6px 8px; }
.range-label { margin: 0 8px; font-size: 15px; font-weight: 650; white-space: nowrap; }
.range-label span { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.seg { display: inline-flex; padding: 2px; background: var(--bg-panel-light); border: 1px solid var(--border); border-radius: var(--r-md); }
.seg button { padding: 4px 12px; font-weight: 600; color: var(--text-secondary); background: transparent; border: 0; border-radius: var(--r-sm); }
.seg button:hover:not(:disabled) { background: transparent; color: var(--text); }
.seg button.is-active { background: var(--accent-soft); color: var(--text); }
.spacer { flex: 1 1 auto; }

/* ---------- Layout ---------- */
.layout { flex: 1 1 auto; min-height: 0; display: flex; }
.panel-head {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-height: 40px; padding: 6px 10px 6px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .9px;
    text-transform: uppercase; color: var(--text-secondary); background: var(--surface-head); border-bottom: 1px solid var(--border);
}
#agendaInfo { font-weight: 600; letter-spacing: .3px; text-transform: none; color: var(--text-dark); }
.warn { color: var(--warning); }
.err { color: var(--onair); }

/* ---------- Seitenleiste links: Programm / Sendungen ---------- */
.side { flex: 0 0 var(--agenda-w); display: flex; flex-direction: column; min-width: 0; background: var(--bg-panel); border-right: 1px solid var(--border); }
.side-tabs { flex: 0 0 auto; display: flex; gap: 2px; padding: 6px 8px 0; background: var(--surface-head); border-bottom: 1px solid var(--border); }
.side-tabs button { padding: 7px 14px; font-weight: 600; color: var(--text-secondary); background: transparent; border: 1px solid transparent; border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; }
.side-tabs button:hover:not(:disabled) { background: transparent; border-color: transparent; color: var(--text); }
.side-tabs button.is-active { color: var(--text); background: var(--bg-panel); border-color: var(--border); box-shadow: inset 0 2px 0 var(--accent); }
#libCount { margin-left: 6px; font-weight: 500; letter-spacing: 0; color: var(--text-dark); }
#libCount:empty { display: none; }

/* Programm + Sendungen übereinander */
.side-split { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.side-split > .side-agenda { flex: 0 0 var(--split, 55%); min-height: 110px; }
.side-split > .side-library { flex: 1 1 0; min-height: 130px; border-top: 1px solid var(--border); }
.splitter { flex: 0 0 7px; margin: -3px 0 -4px; position: relative; z-index: 2; cursor: row-resize; }
.splitter::after { content: ""; position: absolute; left: 50%; top: 2px; width: 36px; height: 3px; margin-left: -18px; border-radius: 99px; background: var(--border); transition: background 120ms; }
.splitter:hover::after, body.is-splitting .splitter::after { background: var(--accent); }
body.is-splitting, body.is-splitting * { cursor: row-resize !important; user-select: none; }
.lib-head { justify-content: flex-start; gap: 0; padding-top: 7px; padding-bottom: 0; }
.lib-head .spacer { flex: 1; }
.lib-head .link { letter-spacing: 0; text-transform: none; font-weight: 600; }
.side-library.is-archive .lib-head #libTitle { color: var(--warning); }
.side-library.is-archive .lib-item { opacity: .75; }
.side-pane { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.panel-sub { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--text-secondary); }
.side-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 8px; }
.empty { padding: 40px 16px; text-align: center; line-height: 1.7; color: var(--text-dark); }

.ag-row {
    display: grid; grid-template-columns: 3px 62px 64px minmax(0, 1fr); gap: 10px; align-items: center;
    min-height: 50px; margin-bottom: 2px; padding: 6px 10px 6px 0;
    background: var(--bg-row); border: 1px solid transparent; border-radius: var(--r-md); cursor: pointer; user-select: none;
}
.ag-row:hover { background: var(--bg-row-hover); }
.ag-status { align-self: stretch; margin: -6px 0; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--c, transparent); opacity: .85; }
.ag-rep { margin-left: 5px; color: var(--text-dark); font-weight: 400; }
.ag-row.is-onair { background: linear-gradient(90deg, rgba(240,74,91,.18), rgba(240,74,91,.04) 60%, var(--bg-row)); border-color: rgba(240,74,91,.4); }
.ag-row.is-onair .ag-status { background: var(--onair); opacity: 1; }
.ag-row.is-sel { background: var(--accent-soft); border-color: rgba(76,141,255,.35); }
.ag-row.is-sel .ag-status { background: var(--accent); opacity: 1; }
.ag-row.is-past { opacity: .45; }
.ag-row.is-overlap { border: 1px dashed rgba(240,74,91,.6); }
.ag-row.is-draft { border: 1px dashed rgba(76,141,255,.55); }
.ag-time { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ag-time b { font-size: 12px; font-weight: 500; }
.ag-time small { font-size: 10px; color: var(--text-secondary); }
.ag-thumb { width: 64px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-sm); background: #0b0e12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.ag-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ag-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ag-title, .ag-sub, .ag-miss { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ag-title { font-size: 13px; font-weight: 500; }
.ag-sub { font-size: 11px; color: var(--text-secondary); }
.ag-sub:empty { display: none; }
.ag-miss { font-size: 10.5px; color: var(--warning); }

.ag-gap {
    display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; padding: 6px 12px; font-size: 11px;
    color: var(--warning); background: rgba(242,177,76,.06); border: 1px dashed rgba(242,177,76,.35); border-radius: var(--r-md); cursor: pointer;
}
.ag-gap span { font-weight: 700; }
.ag-gap small { font-family: var(--mono); color: var(--text-secondary); }
.ag-gap em { margin-left: auto; font-style: normal; opacity: 0; transition: opacity 120ms; }
.ag-gap:hover { background: rgba(242,177,76,.12); }
.ag-gap:hover em { opacity: 1; }

/* ---------- Wochenraster ---------- */
.grid-wrap { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: var(--bg-main); }
.grid-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.grid-head { position: sticky; top: 0; z-index: 20; display: grid; background: var(--surface-head); border-bottom: 1px solid var(--border); }
.gh-day {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden;
    padding: 7px 10px; text-align: left; background: transparent; border: 0; border-left: 1px solid var(--border-soft); border-radius: 0;
}
.gh-day:hover:not(:disabled) { background: var(--bg-row-hover); border-color: var(--border-soft); }
.gh-day b { font-size: 12px; font-weight: 650; }
.gh-day small { font-size: 10.5px; color: var(--text-secondary); }
.gh-day.is-today b { color: var(--accent); }
.gh-day.is-sel { background: var(--accent-soft); }
.gh-day .cov { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--next); opacity: .7; }

.grid { position: relative; display: grid; }
.gutter { position: relative; }
.gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--text-dark); }
.col {
    position: relative; border-left: 1px solid var(--border-soft); cursor: crosshair; touch-action: none;
    background-image:
        linear-gradient(to bottom, var(--border) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border-soft) 1px, transparent 1px),
        linear-gradient(to bottom, var(--snap-line) 1px, transparent 1px);
    background-size: 100% var(--px-hour), 100% calc(var(--px-hour) / 2), 100% var(--px-snap);
}
.col.is-today { background-color: rgba(76,141,255,.025); }
.now-line { position: absolute; left: 0; right: 0; z-index: 15; border-top: 2px solid var(--onair); pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--onair); }

.ev {
    position: absolute; z-index: 5; overflow: hidden; padding: 3px 7px 3px 9px; font-size: 11.5px; line-height: 1.25;
    background: var(--bg-panel-light); border: 1px solid var(--border); border-radius: var(--r-sm);
    box-shadow: inset 3px 0 0 var(--c, var(--accent)); cursor: grab; user-select: none; touch-action: none;
}
.ev:hover { z-index: 6; background: #232b35; }
.ev.is-onair { background: linear-gradient(90deg, rgba(240,74,91,.22), rgba(240,74,91,.08)); border-color: rgba(240,74,91,.45); box-shadow: inset 3px 0 0 var(--onair); }
.ev.is-past { opacity: .5; }
.ev.is-sel { z-index: 7; background: rgba(76,141,255,.22); border-color: var(--accent); }
.ev.is-overlap { border: 1px dashed var(--onair); }
.ev.is-draft { background: rgba(76,141,255,.12); border: 1px dashed var(--accent); }
.ev-time { font-family: var(--mono); font-size: 10px; color: var(--text-secondary); white-space: nowrap; }
.ev-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.ev-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-secondary); }
.ev.is-tiny { display: flex; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.ev.is-tiny .ev-sub { display: none; }
.ev-img { float: right; width: 56px; aspect-ratio: 16 / 9; margin: 2px 0 2px 6px; object-fit: cover; border-radius: 3px; pointer-events: none; -webkit-user-drag: none; }
.ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ev-resize:hover { background: rgba(255,255,255,.1); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }

/* Zeit unter der Maus im Raster */
.hover-time { position: fixed; z-index: 30; height: 0; border-top: 1px dashed rgba(156,192,255,.65); pointer-events: none; }
.hover-time span {
    position: absolute; left: 3px; top: -9px; padding: 1px 6px; font: 600 10.5px/1.4 var(--mono); white-space: nowrap;
    color: #fff; background: var(--accent); border-radius: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
body.is-dragging .hover-time, body.is-splitting .hover-time { display: none; }

/* ---------- Editor rechts ---------- */
.editor { flex: 0 0 var(--editor-w); display: flex; flex-direction: column; min-width: 0; background: var(--bg-panel); border-left: 1px solid var(--border); }
.ed-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 14px 14px; }
.label { display: flex; justify-content: space-between; margin: 14px 0 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text-dark); }
.count { font-weight: 500; letter-spacing: 0; text-transform: none; }
.row2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; }
.hint { margin-top: 6px; font-size: 11px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.hint.error { color: var(--onair); }

.drop {
    position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer;
    background: var(--bg-main); border: 1px dashed rgba(255,255,255,.14); border-radius: var(--r-md); transition: border-color 120ms, background 120ms;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop-hint { text-align: center; font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.drop-hint small { color: var(--text-dark); }
.drop-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,7,10,.6); }
.drop-busy::after { content: ""; width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.drop img.is-fallback { opacity: .45; }
.drop-tag { position: absolute; left: 8px; top: 8px; padding: 2px 8px; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-secondary); background: rgba(5,7,10,.7); border-radius: 99px; }
.img-row { display: flex; gap: 6px; margin-top: 6px; }
.img-row .input { padding: 6px 8px; font-size: 11px; }
.img-row button { flex: 0 0 32px; padding: 0; }
.ed-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-head); border-top: 1px solid var(--border); }

/* ---------- Bibliothek ---------- */
.lib-bar { flex: 0 0 auto; display: flex; gap: 6px; padding: 8px 8px 2px; }
.lib-bar .input { padding: 7px 9px; }
.lib-bar button { flex: 0 0 auto; white-space: nowrap; }
.lib-hint { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px 5px 14px; font-size: 11px; color: var(--text-dark); border-top: 1px solid var(--border-soft); }
button.link { padding: 3px 8px; font-size: 11px; color: var(--text-secondary); background: transparent; border-color: transparent; }
button.link:hover:not(:disabled), button.link.is-on { color: var(--text); background: var(--accent-soft); border-color: transparent; }

.lib-item {
    display: grid; grid-template-columns: 3px 64px minmax(0, 1fr) auto; gap: 10px; align-items: center;
    min-height: 50px; margin-bottom: 2px; padding: 6px 10px 6px 0; background: var(--bg-row);
    border: 1px solid transparent; border-radius: var(--r-md); cursor: grab; user-select: none;
}
.lib-item::before { content: ""; align-self: stretch; margin: -6px 0; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--c); }
.lib-item:hover { background: var(--bg-row-hover); }
.lib-item.is-sel { background: var(--accent-soft); border-color: rgba(76,141,255,.35); }
.lib-thumb { width: 64px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-sm); background: #0b0e12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.lib-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lib-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lib-title, .lib-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lib-title { font-size: 13px; font-weight: 500; }
.lib-sub { font-size: 11px; color: var(--text-secondary); }
.lib-sub:empty { display: none; }
.lib-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lib-meta b { font-size: 11px; font-weight: 500; }
.lib-meta small { font-size: 10px; color: var(--text-dark); }

/* ---------- EPG-Links ---------- */
.feeds { display: inline-flex; align-items: center; padding: 2px; background: var(--bg-panel-light); border: 1px solid var(--border); border-radius: var(--r-md); }
.feeds span { padding: 0 8px 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .8px; color: var(--text-dark); }
.feeds a { padding: 4px 9px; font-size: 11px; font-weight: 600; color: var(--text-secondary); text-decoration: none; border-radius: var(--r-sm); }
.feeds a:hover { color: var(--text); background: var(--accent-soft); }

/* ---------- Editor: Zusätze ---------- */
.row3 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .9fr); gap: 8px; }
.show-pick { position: relative; display: flex; gap: 6px; }

/* Vorschläge beim Eingeben der Sendung */
.suggest {
    position: absolute; top: calc(100% + 4px); left: 0; right: 42px; z-index: 60; max-height: 330px; overflow-y: auto; padding: 4px;
    background: var(--bg-panel-light); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-md); box-shadow: 0 14px 34px rgba(0,0,0,.5);
}
.sg-item { display: grid; grid-template-columns: 3px 44px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 5px 8px 5px 0; border-radius: var(--r-sm); cursor: pointer; }
.sg-item::before { content: ""; align-self: stretch; margin: -5px 0; border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--c); }
.sg-item.is-active, .sg-item:hover { background: var(--accent-soft); }
.sg-thumb { width: 44px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px; background: #0b0e12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.sg-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sg-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sg-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.sg-title mark { color: #9cc0ff; background: none; font-weight: 700; }
.sg-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--text-secondary); }
.sg-meta { font-family: var(--mono); font-size: 10.5px; color: var(--text-dark); text-align: right; }
.sg-arch { padding: 1px 6px; font-family: inherit; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--warning); background: rgba(242,177,76,.12); border-radius: 99px; }
.sg-new { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-top: 2px; font-size: 12.5px; color: var(--warning); border-top: 1px solid var(--border-soft); border-radius: var(--r-sm); cursor: pointer; }
.sg-new.is-active, .sg-new:hover { background: rgba(242,177,76,.1); }
.sg-empty { padding: 10px; font-size: 12px; color: var(--text-dark); }

/* Genre-Finder */
.genre-pick .suggest { right: 0; }
.gf-item { grid-template-columns: 44px minmax(0, 1fr); padding: 6px 10px; }
.gf-item::before { display: none; }
.gf-code { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: #9cc0ff; }
@keyframes gf-flash { from { box-shadow: 0 0 0 2px var(--accent, #4c8dff); } to { box-shadow: 0 0 0 2px transparent; } }
.flash { animation: gf-flash .9s ease-out; }
.show-pick button { flex: 0 0 36px; padding: 0; }
select.input { cursor: pointer; }
.input.color { height: 35px; padding: 3px; cursor: pointer; }
.rep-box { margin-top: 8px; padding: 10px; background: var(--bg-main); border: 1px solid var(--border-soft); border-radius: var(--r-md); }
.rep-box .label { margin-top: 10px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.days button { padding: 6px 0; font-weight: 600; color: var(--text-secondary); background: transparent; }
.days button.is-on { color: var(--text); background: var(--accent-soft); border-color: rgba(76,141,255,.45); }
.series-note { margin-top: 8px; padding: 7px 10px; font-size: 12px; color: #9cc0ff; background: var(--accent-soft); border-radius: var(--r-md); }
.section { display: flex; align-items: baseline; justify-content: space-between; margin: 20px -14px 0; padding: 8px 14px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-secondary); background: var(--surface-head); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section small { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-dark); }
.scope-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.scope-list button { padding: 10px 12px; text-align: left; font-size: 13px; }
.scope-list button:hover:not(:disabled) { background: var(--accent-soft); border-color: rgba(76,141,255,.45); }

/* ---------- Ausstehende Änderungen / Freigaben ---------- */
.badge { margin-left: 4px; padding: 1px 6px; font-size: 10px; font-weight: 700; color: #1b1406; background: var(--warning); border-radius: 99px; }
.badge:empty { display: none; }
.ev.is-pending { outline: 1px dashed var(--warning); outline-offset: -2px; }
.ev.is-pending .ev-time::after, .ag-row.is-pending .ag-title::after, .lib-item.is-pending .lib-title::before { content: "●"; margin-left: 5px; font-size: 9px; color: var(--warning); }
.lib-item.is-pending .lib-title::before { margin: 0 5px 0 0; }
.appr-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 8px 8px 2px; }
.appr-bar .hint { flex: 1 1 auto; margin: 0 0 0 6px; }
.appr-bar button { white-space: nowrap; }
.appr-item { position: relative; margin-bottom: 4px; padding: 9px 10px 9px 12px; background: var(--bg-row); border: 1px solid transparent; border-radius: var(--r-md); box-shadow: inset 3px 0 0 var(--k, var(--warning)); }
.appr-item[data-kind="new"] { --k: var(--next); }
.appr-item[data-kind="deleted"] { --k: var(--onair); }
.appr-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.appr-kind { flex: 0 0 auto; padding: 1px 7px; font-size: 9.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--k, var(--warning)); background: color-mix(in srgb, var(--k, var(--warning)) 14%, transparent); border-radius: 99px; }
.appr-title { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.appr-item[data-kind="deleted"] .appr-title { text-decoration: line-through; color: var(--text-secondary); }
.appr-info, .appr-before, .appr-meta { margin-top: 3px; font-size: 11px; color: var(--text-secondary); }
.appr-before { color: var(--text-dark); text-decoration: line-through; }
.appr-meta { color: var(--text-dark); }
.appr-actions { display: flex; gap: 4px; margin-top: 7px; }
.appr-actions button { padding: 4px 10px; font-size: 11px; }
.appr-ok { background: rgba(60,207,142,.12); border-color: rgba(60,207,142,.35); color: var(--next); }
.appr-ok:hover:not(:disabled) { background: rgba(60,207,142,.22) !important; border-color: rgba(60,207,142,.5) !important; }
.vs-user { color: var(--text-secondary); }
.vs-user b { color: var(--text); font-weight: 600; }

/* ---------- Sendung (Popup) ---------- */
.modal-card.show-card { width: min(820px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.show-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; padding: 0 20px 20px; }
.show-body .label:first-child { margin-top: 10px; }
.show-body .uses { line-height: 1.6; }
.show-card .ed-actions { padding: 12px 20px; }
@media (max-width: 760px) { .show-body { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Einstellungen ---------- */
body:not(.is-admin) .admin-only { display: none !important; }
.modal-card.set-card { width: min(760px, 100%); height: min(680px, calc(100vh - 40px)); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#settings.is-forced .set-card { height: auto; }
.set-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 20px; }
.set-head h3 { margin: 0; }
.set-tabs { flex: 0 0 auto; display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.set-tabs button { padding: 8px 14px; font-weight: 600; color: var(--text-secondary); background: transparent; border: 0; border-radius: var(--r-md) var(--r-md) 0 0; }
.set-tabs button:hover:not(:disabled) { background: transparent; color: var(--text); }
.set-tabs button.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.set-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 20px 20px; }
.set-section { margin: 22px -20px 0; padding-left: 20px; padding-right: 20px; }
.set-pane .modal-actions { align-items: center; gap: 8px; }
.set-pane .modal-actions .hint { margin: 0; }
.set-intro { margin: 12px 0 14px; color: var(--text-secondary); line-height: 1.55; }
.row2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.empty.small { padding: 22px 16px; font-size: 12px; }
.seg-full { display: flex; width: 100%; }
.seg-full button { flex: 1 1 0; padding: 6px 8px; }

/* Raster */
.grid-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.grid-pick button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 12px 0 10px; }
.grid-pick b { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.grid-pick small { font-size: 10.5px; color: var(--text-secondary); }
.grid-pick button.is-active { background: var(--accent-soft); border-color: rgba(76,141,255,.55); box-shadow: var(--ring); }
.grid-pick button.is-active b { color: #9cc0ff; }
.grid-preview { margin: 18px 4px 6px; padding: 0 18px; }
.gp-bar { position: relative; height: 34px; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--r-md); }
.gp-bar i { position: absolute; top: 6px; bottom: 6px; width: 1px; background: rgba(76,141,255,.45); }
.gp-bar i.is-hour { top: 0; bottom: 0; background: var(--text-secondary); }
.gp-labels { position: relative; height: 18px; margin-top: 4px; }
.gp-labels span { position: absolute; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; color: var(--text-dark); white-space: nowrap; }
#gridHint { line-height: 1.6; }

/* EPG-Ausgabe */
.set-block { margin-top: 12px; padding: 4px 14px 14px; background: var(--bg-row); border: 1px solid var(--border-soft); border-radius: var(--r-lg); }
.set-block-head { margin: 10px 0 -4px; font-weight: 650; }
.set-block .hint { line-height: 1.55; }
.switch { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; flex: 0 0 34px; height: 20px; background: var(--bg-panel-light); border: 1px solid var(--border); border-radius: 99px; transition: background 120ms; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--text-secondary); border-radius: 50%; transition: transform 120ms, background 120ms; }
.switch input:checked + .switch-ui { background: rgba(60,207,142,.25); border-color: rgba(60,207,142,.5); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); background: var(--next); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--ring); }
.token-new { display: flex; gap: 6px; margin-top: 12px; }
.token-new button { flex: 0 0 auto; white-space: nowrap; }
#tokenHint { color: var(--warning); }
#tokenHint:empty { display: none; }
.token-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.tk-card { padding: 10px 12px; background: var(--bg-row); border: 1px solid var(--border-soft); border-radius: var(--r-lg); }
.tk-top { display: flex; align-items: center; gap: 10px; }
.tk-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; font-size: 15px; color: var(--next); background: rgba(60,207,142,.12); border-radius: 8px; }
.tk-who { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.tk-who b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.tk-who small { font-size: 11px; color: var(--text-dark); }
.tk-top button { padding: 4px 10px; font-size: 11px; }
.tk-code { display: block; margin: 8px 0 0; padding: 6px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11.5px; color: var(--text-secondary); background: var(--bg-main); border-radius: var(--r-sm); user-select: all; }
.tk-links { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.tk-links span { margin-right: 4px; font-size: 11px; color: var(--text-dark); }
.tk-links button { padding: 3px 10px; font-size: 11px; font-weight: 600; }
.tk-links a { margin-left: auto; font-size: 11px; color: var(--text-secondary); text-decoration: none; }
.tk-links a:hover { color: var(--accent); }

/* Benutzer */
.avatar { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; font-size: 13px; font-weight: 700; letter-spacing: .3px; color: #fff; background: color-mix(in srgb, var(--c, var(--accent)) 55%, #0e1115); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 70%, transparent); border-radius: 50%; }
.me-card { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; background: linear-gradient(135deg, rgba(76,141,255,.10), rgba(76,141,255,.02)); border: 1px solid rgba(76,141,255,.25); border-radius: var(--r-lg); }
.me-card .avatar { flex-basis: 44px; width: 44px; height: 44px; font-size: 15px; }
.me-who { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.me-who b { display: block; font-size: 14px; font-weight: 650; }
.me-who small { font-family: var(--mono); font-size: 11px; color: var(--text-secondary); }
.pw-form { margin-top: 8px; padding: 2px 14px 14px; background: var(--bg-row); border: 1px solid var(--border-soft); border-radius: var(--r-lg); }
.forced-only { display: none; }
#settings.is-forced .forced-only { display: block; margin-top: 12px; color: var(--warning); }
#settings.is-forced #setClose, #settings.is-forced #setTabs, #settings.is-forced #pwCurWrap,
#settings.is-forced #pwCancel, #settings.is-forced .team { display: none !important; }
.team { margin-top: 20px; }
.team-head { display: flex; align-items: center; gap: 8px; }
.team-title { font-size: 13px; font-weight: 650; }
#teamStats { font-size: 11px; color: var(--text-dark); }
.team-head .input { width: 170px; padding: 6px 9px; }
.team-head button { white-space: nowrap; }
.user-new { margin-top: 10px; padding: 2px 14px 14px; background: var(--bg-row); border: 1px solid rgba(76,141,255,.3); border-radius: var(--r-lg); }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; gap: 8px; margin-top: 10px; }
.user-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--bg-row); border: 1px solid var(--border-soft); border-radius: var(--r-lg); }
.user-card:hover { border-color: var(--border); }
.user-card.is-me { border-color: rgba(76,141,255,.3); }
.uc-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.uc-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.uc-name { width: 100%; margin-left: -5px; padding: 2px 5px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); outline: none; text-overflow: ellipsis; }
.uc-name:hover { border-color: var(--border); }
.uc-name:focus { background: var(--bg-main); border-color: var(--accent); box-shadow: var(--ring); }
.uc-who small { font-family: var(--mono); font-size: 11px; color: var(--text-dark); }
.uc-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.uc-tags .user-tag { margin: 0; }
.uc-meta { font-size: 11px; color: var(--text-dark); }
.uc-actions { display: flex; gap: 6px; }
.uc-actions:not(:has(button:not([hidden]))) { display: none; }
.uc-actions button { padding: 4px 10px; font-size: 11px; }
.uc-actions .danger { margin-left: auto; }
.user-tag { padding: 1px 6px; font-family: inherit; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--warning); background: rgba(242,177,76,.12); border-radius: 99px; white-space: nowrap; }
.user-tag.is-me { color: #9cc0ff; background: var(--accent-soft); }
.pw-note { margin-top: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.6; color: var(--text); background: rgba(60,207,142,.1); border: 1px solid rgba(60,207,142,.35); border-radius: var(--r-md); }
.pw-note code { padding: 2px 7px; font-family: var(--mono); font-size: 13px; background: var(--bg-main); border-radius: var(--r-sm); user-select: all; }
.pw-note button { margin-left: 6px; padding: 2px 8px; font-size: 11px; }

/* Explizite Inhalte */
.badge-e {
    display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px; vertical-align: 1px;
    font-size: 9.5px; font-weight: 800; line-height: 1; color: #fff; background: var(--onair); border-radius: 3px;
}
/* Explizit: dezente Checkbox unter der Beschreibung, «E» nur wenn angehakt */
.explicit-check { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--text-dark); cursor: pointer; user-select: none; }
.explicit-check input { width: 13px; height: 13px; margin: 0; accent-color: var(--onair); cursor: pointer; }
.explicit-check:hover, .explicit-check:has(input:checked) { color: var(--text-secondary); }
.explicit-check .badge-e { display: none; margin-left: 0; }
.explicit-check input:checked ~ .badge-e { display: inline-grid; }

/* Redaktion ohne Freigabe */
.uc-direct { margin-top: -2px; font-size: 12px; font-weight: 500; }
.uc-direct .switch-ui { flex-basis: 30px; height: 18px; }
.uc-direct .switch-ui::after { width: 12px; height: 12px; }
.uc-direct input:checked + .switch-ui::after { transform: translateX(12px); }

/* Sprachen des Senders */
.lang-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lang-chips button { padding: 4px 9px; font-family: var(--mono); font-size: 11px; color: var(--text-secondary); background: transparent; }
.lang-chips button.is-on { color: var(--text); background: var(--accent-soft); border-color: rgba(76,141,255,.45); }

/* Sender & Logo */
.ch-grid { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 4px; }
.ch-logo {
    position: relative; display: grid; place-items: center; aspect-ratio: 1; margin-top: 14px; overflow: hidden; cursor: pointer;
    background: repeating-conic-gradient(#1a1f26 0 25%, #12161b 0 50%) 0 0 / 16px 16px;
    border: 1px dashed rgba(255,255,255,.18); border-radius: var(--r-lg); transition: border-color 120ms;
}
.ch-logo:hover, .ch-logo.is-over { border-color: var(--accent); }
.ch-logo img { max-width: 82%; max-height: 82%; object-fit: contain; }
.ch-logo-hint { text-align: center; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.ch-logo-hint small { color: var(--text-dark); }
.ch-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.ch-actions button { padding: 5px 11px; font-size: 11.5px; }
.ch-actions .hint { margin: 0 0 0 6px; }
.tb-logo.has-img { padding: 4px; background: var(--bg-panel-light); box-shadow: 0 0 0 1px var(--border) inset; }
.tb-logo img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 640px) { .ch-grid { grid-template-columns: 1fr; } }

/* Sprache */
.lang-pick button { padding: 4px 9px; font-size: 11px; letter-spacing: .4px; }
.login-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.login-head h3 { margin: 0; }
#settings.is-forced #langPick { display: none; }

/* ---------- Fusszeile ---------- */
.statusbar { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; min-height: 28px; padding: 0 14px; font-size: 11.5px; white-space: nowrap; background: var(--surface-head); border-top: 1px solid var(--border); }
.vs-label { font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-secondary); }
.vs-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: .4px; color: var(--text-dark); }
.vs-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.vs-state[data-state="online"] { color: var(--next); }
.vs-state[data-state="online"]::before { box-shadow: 0 0 6px var(--next); }
.vs-state[data-state="error"] { color: var(--onair); }
.vs-state[data-state="error"]::before { box-shadow: 0 0 6px var(--onair); }
.vs-last { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); }
.vs-last.is-error { color: var(--onair); }
.vs-keys { color: var(--text-dark); }
.statusbar button, .statusbar .btn { padding: 2px 9px; font-size: 11px; }
.btn { display: inline-block; color: var(--text); text-decoration: none; background: var(--bg-panel-light); border: 1px solid var(--border); border-radius: var(--r-md); }
.btn:hover { background: #252d37; border-color: rgba(255,255,255,.14); }
.section small a { color: #9cc0ff; text-decoration: none; }
.section small a:hover { text-decoration: underline; }

/* ---------- Modal & Toast ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(5,7,10,.6); backdrop-filter: blur(6px); }
.modal-card { width: min(340px, 100%); padding: 20px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.modal-card h3 { margin: 0 0 4px; font-size: 16px; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.toast {
    position: fixed; left: 50%; bottom: 44px; z-index: 1100; transform: translateX(-50%); max-width: min(560px, 90vw);
    padding: 9px 16px; font-size: 12.5px; background: var(--bg-panel-light); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.toast.error { color: #ffb3ba; background: #2a161a; border-color: rgba(240,74,91,.5); }

/* ---------- Scrollbars ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border: 2px solid transparent; background-clip: padding-box; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.22); }

/* ---------- Schmale Fenster ---------- */
@media (max-width: 1400px) { :root { --agenda-w: 330px; --editor-w: 340px; } .vs-keys { display: none; } }
@media (max-width: 1150px) { .tb-next, .tb-brand .tb-sub { display: none; } }
@media (max-width: 1000px) { .side { display: none; } }

/* Sicherheitswarnung (nur Admins) */
.sec-warn { position: fixed; top: 10px; left: 50%; z-index: 300; transform: translateX(-50%); display: flex; gap: 12px; align-items: flex-start; width: min(760px, calc(100vw - 32px));
    padding: 10px 12px 10px 14px; font-size: 12.5px; color: #fff; background: #4a1218; border: 1px solid var(--onair); border-radius: var(--r-md); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.sec-warn[hidden] { display: none; }
.sec-warn b { flex: none; padding-top: 1px; color: #ff9aa5; text-transform: uppercase; letter-spacing: .5px; font-size: 11px; }
.sec-warn ul { flex: 1; margin: 0; padding-left: 16px; line-height: 1.45; }
.sec-warn button { flex: none; padding: 0 6px; font-size: 16px; color: #ff9aa5; background: none; border: 0; cursor: pointer; }

/* Öffentliche Demo: Projekt-Leiste */
.sb-bar { position: fixed; bottom: 40px; left: 50%; z-index: 250; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px);
    padding: 6px 8px 6px 14px; font-size: 12px; color: var(--text-secondary); background: rgba(22,27,34,.96); border: 1px solid rgba(242,177,76,.45); border-radius: 99px; box-shadow: 0 10px 28px rgba(0,0,0,.45); white-space: nowrap; }
.sb-bar[hidden] { display: none; }
.sb-bar b { color: var(--warning); text-transform: uppercase; letter-spacing: .6px; font-size: 10.5px; }
.sb-bar code { font-family: var(--mono); color: var(--text); }
.sb-bar button { padding: 4px 11px; font: 600 11.5px Inter, system-ui, sans-serif; color: #9cc0ff; background: rgba(76,141,255,.14); border: 1px solid rgba(76,141,255,.4); border-radius: 99px; cursor: pointer; }
.sb-bar button:hover { background: rgba(76,141,255,.26); }
.sb-bar button:disabled { opacity: .6; cursor: wait; }
#sbReset { color: var(--text-secondary); background: transparent; border-color: var(--border); }
@media (max-width: 900px) { .sb-creds { display: none; } }
