/* Schrift wie XUI: Poppins (SIL Open Font License, liegt im Panel – kein Internet nötig) */
@font-face { font-family: Poppins; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/poppins-300.woff) format('woff'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400.woff) format('woff'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500.woff) format('woff'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700.woff) format('woff'); }
:root {
  --bg: #0f1218; --panel: #161a22; --panel-2: #1c212b; --line: #262c38;
  --text: #e6e9ef; --muted: #8a93a6; --accent: #3b82f6; --accent-2: #2563eb;
  --ok: #22c55e; --warn: #f59e0b; --err: #ef4444; --radius: 10px;
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
.hidden { display: none !important; }
a { color: var(--accent); cursor: pointer; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; gap: 14px; }

/* Layout */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 0 8px 18px; }
.brand.big { font-size: 20px; padding: 0 0 6px; }
.logo { width: 22px; height: 15px; border-radius: 4px; background: var(--accent); box-shadow: 0 7px 0 -5px var(--accent); }
nav { display: grid; gap: 2px; }
nav a { color: var(--muted); text-decoration: none; padding: 9px 12px; border-radius: 8px; }
nav a:hover { background: var(--panel-2); color: var(--text); }
nav a.active { background: rgba(59,130,246,.14); color: #fff; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); padding: 0 8px; }
main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(15,18,24,.92); backdrop-filter: blur(6px); z-index: 5; }
.topbar h1 { font-size: 18px; margin: 0; flex: 1; }
.menu { display: none; }
#view { padding: 24px 28px 60px; }

/* Bausteine */
.btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit; }
.btn:hover { border-color: #3a4252; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: #fca5a5; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn + .btn { margin-left: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.card .v { font-size: 26px; font-weight: 650; margin-top: 6px; }
.card .s { color: var(--muted); font-size: 12px; margin-top: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.panel .body { padding: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--panel-2); }
tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; }
.empty { color: var(--muted); padding: 28px; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: var(--panel-2); color: var(--muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.running, .badge.Active { color: var(--ok); }
.badge.starting { color: var(--warn); }
.badge.error, .badge.Expired, .badge.Disabled { color: var(--err); }
.muted { color: var(--muted); }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
input, select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 9px 11px; border-radius: 8px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(59,130,246,.5); border-color: var(--accent); }
.toolbar input { max-width: 280px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12.5px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
label.check input { width: auto; }
.error { color: #fca5a5; margin: 0; min-height: 1em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { color: var(--muted); font-size: 12px; margin: 0; }

/* Modal */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); padding: 0; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
#modalForm { display: grid; gap: 14px; padding: 22px; }
#modalForm h2 { margin: 0 0 4px; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.picklist { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: grid; gap: 2px; }
.picklist label { padding: 5px 8px; border-radius: 6px; }
.picklist label:hover { background: var(--panel-2); }
video { width: 100%; border-radius: 8px; background: #000; aspect-ratio: 16/9; }
pre.log { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 180px; overflow: auto; font-size: 11.5px; white-space: pre-wrap; margin: 0; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; transition: transform .25s, visibility .25s; z-index: 50; visibility: hidden; max-width: calc(100vw - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); visibility: visible; }
.toast.err { border-color: var(--err); }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; }
  .menu { display: inline-block; }
  .topbar, #view { padding-left: 16px; padding-right: 16px; }
  .grid2 { grid-template-columns: 1fr; }
}

/* Datei-Browser */
.picker { width: min(640px, calc(100vw - 32px)); }
#pickerBody { display: grid; gap: 12px; padding: 20px; }
#pickerBody h2 { margin: 0; font-size: 16px; }
.pick-path { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); word-break: break-all; }
.pick-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.pick-list button { display: flex; width: 100%; gap: 10px; align-items: center; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); padding: 9px 12px; text-align: left; font: inherit; cursor: pointer; }
.pick-list button:last-child { border-bottom: 0; }
.pick-list button:hover { background: var(--panel-2); }
.pick-list .size { margin-left: auto; color: var(--muted); font-size: 12px; }
.source-row { display: flex; gap: 8px; }
.source-row input { flex: 1; }
.cover { width: 34px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--panel-2); vertical-align: middle; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 8px 12px; cursor: pointer; font: inherit; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.season-head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 12px 4px; background: var(--panel-2); }

/* TMDb */
.tmdb-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.tmdb-bar .muted { font-size: 12.5px; }
.tmdb-results { max-height: 56vh; overflow: auto; display: grid; gap: 6px; }
.tmdb-hit { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; color: var(--text); font: inherit; cursor: pointer; }
.tmdb-hit:hover { border-color: var(--accent); }
.tmdb-hit img, .tmdb-hit .noposter { width: 54px; height: 80px; object-fit: cover; border-radius: 4px; flex: none; background: var(--panel-2); display: grid; place-items: center; color: var(--muted); }
.tmdb-hit .ov { color: var(--muted); font-size: 12.5px; }
label > .badge { justify-self: start; }

/* Server */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.srv.off { opacity: .75; }
.srv-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.srv-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.srv-actions .btn + .btn { margin-left: 0; }
.srv-body { padding: 14px 16px; display: grid; gap: 14px; }
.srv-nums, .srv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.srv-nums div, .srv-stats div { display: grid; gap: 3px; font-size: 13px; }
.srv-nums span, .srv-stats span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.srv-stats i { display: block; height: 4px; border-radius: 4px; background: var(--panel-2); position: relative; overflow: hidden; }
.srv-stats i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--accent); border-radius: 4px; }
@media (max-width: 820px) { .srv-grid { grid-template-columns: 1fr; } .srv-nums, .srv-stats { grid-template-columns: repeat(2, 1fr); } }

/* Backups */
.bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; align-items: start; }
.bk-toggle { align-self: center; padding-top: 18px; }
.dbx-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 38px; color: var(--text); font-size: 13.5px; }
.dbx-status .btn + .btn { margin-left: 0; }
.sq { display: inline-block; width: 11px; height: 11px; border-radius: 2px; background: #3a4252; }
.sq.on { background: var(--ok); }
details.hint summary { cursor: pointer; }
@media (max-width: 820px) { .bk-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Layout v2: Kopfzeile mit Live-Zählern + Menü oben (ersetzt Seitenleiste)
   ===================================================================== */
:root { --hdr-a: #0b2a44; --hdr-b: #0e4a5c; --teal: #14b8a6; --sky: #38bdf8; --violet: #a78bfa; --amber: #f59e0b; }
.app { display: block; min-height: 100vh; }
.logo { background: var(--sky); box-shadow: 0 7px 0 -5px var(--sky); }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hdr { position: sticky; top: 0; z-index: 30; }
.hdr-top { display: flex; align-items: center; gap: 18px; padding: 16px 28px; min-height: 76px; background: linear-gradient(100deg, var(--hdr-a), var(--hdr-b) 55%, #0f5f6b); border-bottom: 1px solid rgba(255,255,255,.06); }
.hdr-top .brand { padding: 0; color: #fff; text-decoration: none; font-size: 17px; letter-spacing: .2px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); color: #e6f6ff; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill svg { width: 14px; height: 14px; opacity: .85; }
.pill b { font-weight: 600; }
.pill .up { color: #4ade80; } .pill .down { color: #f87171; }
.pill.alert { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.4); }
.hdr-user { display: flex; align-items: center; gap: 10px; color: #cfe8f5; font-size: 13px; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; }
.user-chip svg { width: 16px; height: 16px; }
.hdr-user .btn { color: #cfe8f5; border-color: rgba(255,255,255,.15); }

.nav { display: flex; gap: 2px; padding: 0 22px; background: #141922; border-bottom: 1px solid var(--line); }
.nav > a, .nav-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--muted); text-decoration: none; background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; border-radius: 0; }
.nav svg { width: 16px; height: 16px; }
.nav > a:hover, .nav-btn:hover, .nav-group:hover .nav-btn { color: var(--text); background: none; }
.nav > a.active, .nav-group.active .nav-btn { color: #fff; border-bottom-color: var(--sky); background: none; }
.nav-btn i { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.nav-group { position: relative; }
.nav-menu { position: absolute; top: 100%; left: 0; min-width: 200px; background: var(--menu-bg, #1a202b); border: 1px solid var(--line); border-radius: 0 0 10px 10px; padding: 6px; display: none; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu, .nav-group.open .nav-menu { display: grid; }
.nav-menu a { padding: 9px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; }
.nav-menu a:hover { background: var(--panel-2); color: var(--text); }
.nav-menu a.active { color: #fff; background: rgba(56,189,248,.12); }

main { max-width: 1680px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 12px; padding: 22px 28px 0; }
.page-head h1 { font-size: 20px; margin: 0; flex: 1; }
#view { padding: 18px 28px 60px; }

@media (max-width: 1100px) { .hdr-user .user-chip #whoami { display: none; } }
@media (max-width: 900px) {
  .hdr-top { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .pills { order: 3; flex-basis: 100%; }
  .hdr-user { margin-left: auto; }
  .menu { display: inline-block; color: #fff; border-color: rgba(255,255,255,.2); }
  .nav { display: none; flex-direction: column; padding: 6px 10px 10px; }
  .app.nav-open .nav { display: flex; }
  .nav > a, .nav-btn { border-bottom: 0; padding: 10px 8px; width: 100%; }
  .nav-menu { display: grid; position: static; box-shadow: none; border: 0; background: none; padding: 0 0 4px 24px; }
  .page-head, #view { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Dashboard ---------- */
.dash-tools { display: flex; gap: 8px; }
.dash-tools select { width: auto; padding: 7px 10px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.tile { position: relative; overflow: hidden; background: linear-gradient(180deg, #19202b, #151b24); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-height: 112px; display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); }
.tile:hover { border-color: #33405a; }
.tile .ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(56,189,248,.12); color: var(--sky); flex: none; z-index: 1; }
.tile .ico svg { width: 20px; height: 20px; }
.tile .num { margin-left: auto; text-align: right; z-index: 1; }
.tile .num b { display: block; font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .num b small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.tile .num span { color: var(--muted); font-size: 13px; }
.tile .spark { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; opacity: .55; pointer-events: none; }
.tile.t-teal .ico { background: rgba(20,184,166,.13); color: var(--teal); }
.tile.t-violet .ico { background: rgba(167,139,250,.14); color: var(--violet); }
.tile.t-amber .ico { background: rgba(245,158,11,.14); color: var(--amber); }
.tile.t-bad .ico { background: rgba(239,68,68,.15); color: #f87171; }
.tile.t-bad .num b { color: #f87171; }
.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-row .panel { min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-h h3 { padding: 0; border: 0; margin: 0; font-size: 14.5px; }
.chart { position: relative; height: 240px; padding: 8px 12px 4px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .gl { stroke: #232a36; stroke-width: 1; }
.chart .ax { fill: var(--muted); stroke: none; font-size: 10.5px; font-family: inherit; }
.chart .hov { stroke: #4b5568; stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tip { position: absolute; pointer-events: none; background: #0b0f15ee; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12px; white-space: nowrap; z-index: 2; display: none; }
.chart-tip div { display: flex; align-items: center; gap: 6px; }
.legend { display: flex; justify-content: center; gap: 16px; padding: 4px 0 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dotc { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-list { padding: 8px 18px 14px; display: grid; gap: 8px; max-height: 268px; overflow: auto; }
.status-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; background: var(--panel-2); font-size: 13.5px; text-decoration: none; color: var(--text); }
.status-item svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.status-item.error svg { color: #f87171; } .status-item.warn svg { color: var(--amber); }
.status-ok { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 210px; color: var(--muted); }
.status-ok svg { width: 40px; height: 40px; color: var(--ok); }
.srv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 16px; }
.scard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.scard-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: linear-gradient(100deg, #1b2a3a, #18303a); }
.scard-h b { letter-spacing: .3px; } .scard-h .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.scard.off .scard-h { background: #2a1d22; }
.scard-b { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 6px 22px; padding: 16px 18px; }
.kv { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; }
.kv span { color: var(--muted); } .kv b { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar { display: grid; grid-template-columns: 42px 1fr 40px; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 0; }
.bar span { color: var(--muted); } .bar em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.bar i { height: 8px; border-radius: 6px; background: #252c38; position: relative; overflow: hidden; }
.bar i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--c, var(--teal)); border-radius: 6px; transition: width .6s; }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .dash-row { grid-template-columns: 1fr; } .srv-cards { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } .scard-b { grid-template-columns: 1fr 1fr; } .scard-b .bars { grid-column: 1 / -1; } }
.tile .spark { width: 100%; }
a.pill, a.btn, a.tile, a.status-item { text-decoration: none; }
.tile .spark { height: 40px; opacity: .45; }
.tile .num, .tile .ico { position: relative; }
@media (max-width: 900px) {
  .page-head { flex-wrap: wrap; }
  .page-head #actions { width: 100%; }
  .dash-tools { width: 100%; }
  .dash-tools select { flex: 1; min-width: 0; }
  .tile { min-height: 96px; padding: 14px 16px; }
}
body { overflow-x: hidden; }

.nav-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.proc-cpu { display: inline-grid; grid-template-columns: 60px 38px; gap: 8px; align-items: center; }
.proc-cpu i { height: 6px; border-radius: 4px; background: #252c38; position: relative; overflow: hidden; }
.proc-cpu i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--c, var(--teal)); }
.tabs-row { display: flex; gap: 6px; }
.tabs-row .btn.active { background: rgba(56,189,248,.15); border-color: var(--sky); color: #fff; }

/* Server-Tabelle (wie XUI) */
.dt-top, .dt-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.dt-per, .dt-search { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dt-per select { width: auto; padding: 5px 8px; }
.dt-search input { width: 220px; padding: 6px 10px; }
.srv-table td { vertical-align: middle; padding: 14px 12px; }
.srv-table td.c, .srv-table th { text-align: center; }
.t-srv th:nth-child(4), .t-srv td:nth-child(4), .t-srv th:nth-child(5), .t-srv td:nth-child(5),
.t-px th:nth-child(2), .t-px td:nth-child(2), .t-px th:nth-child(3), .t-px td:nth-child(3), .t-px th:nth-child(4), .t-px td:nth-child(4) { text-align: left; }
.srv-table tr:nth-child(even) td { background: rgba(255,255,255,.015); }
.row-off td { opacity: .6; }
.small { font-size: 12px; margin-top: 2px; }
.pill2 { display: inline-block; padding: 3px 9px; border-radius: 6px; background: #1d2a3a; color: #cfe8f5; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill2.bad { background: rgba(239,68,68,.15); color: #fca5a5; }
.net { display: grid; gap: 3px; justify-items: center; }
.sdot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #4b5568; }
.sdot.on { background: var(--ok); } .sdot.bad { background: var(--err); } .sdot.warn { background: var(--amber); } .sdot.off { background: #4b5568; }
.donut { width: 46px; height: 46px; }
.donut circle { fill: none; stroke-width: 4.5; stroke-linecap: round; }
.donut .donut-bg { stroke: #262d39; }
.donut text { fill: var(--text); stroke: none; font-size: 9px; font-weight: 600; font-family: inherit; }
.pager { display: flex; gap: 4px; }
.pager .btn + .btn { margin-left: 0; }
.dd { position: relative; display: inline-block; }
.dd-menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 190px; background: var(--menu-bg, #1a202b); border: 1px solid var(--line); border-radius: 9px; padding: 5px; z-index: 20; box-shadow: 0 12px 30px rgba(0,0,0,.45); text-align: left; }
.dd-menu.right { left: auto; right: 0; }
.dd.open .dd-menu { display: grid; }
.dd-menu a { padding: 8px 11px; border-radius: 6px; color: var(--text); text-decoration: none; cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.dd-menu a:hover { background: var(--panel-2); }
.dd-menu a.danger { color: #fca5a5; }
.split-btn { display: inline-flex; }
.split-btn > .btn { border-radius: 8px 0 0 8px; }
.split-btn .dd-toggle { border-radius: 0 8px 8px 0; margin-left: 1px; padding: 8px 10px; }

.srv-table .dd-menu, #actions .dd-menu { position: fixed; top: 0; }

/* Server-Reihenfolge */
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 760px; }
.order-list li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; cursor: grab; user-select: none; }
.order-list li.dragging { opacity: .5; border-style: dashed; }
.order-list .grip { color: var(--muted); letter-spacing: -2px; }
.order-list .pos { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--panel-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.order-list .oname { display: grid; flex: 1; }
.order-list .omove { display: flex; gap: 4px; }
.order-list .omove .btn + .btn { margin-left: 0; }

/* EPG */
.np { display: grid; gap: 2px; max-width: 260px; }
.np span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np small { font-size: 11.5px; }
.np i { height: 3px; border-radius: 3px; background: #252c38; position: relative; overflow: hidden; }
.np i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--sky); }
.warn-input { border-color: var(--amber) !important; }
input.saved { border-color: var(--ok); transition: border-color .3s; }

.t-epg th:nth-child(2), .t-epg td:nth-child(2), .t-epg th:nth-child(3), .t-epg td:nth-child(3) { text-align: left; }
.icon-btns { display: inline-flex; gap: 4px; }
.icon-btns .btn { padding: 6px 8px; margin: 0; }
.icon-btns svg { width: 14px; height: 14px; display: block; }
.dd-menu a[data-tab], .dd-menu #autoMatch { cursor: pointer; }

/* ---------- Lines (XUI-Stil) ---------- */
.ln-filters { justify-content: flex-start; }
.ln-filters .grow { flex: 1 1 260px; min-width: 200px; }
.ln-filters select { width: auto; }
.ln-sum { padding: 0 18px 10px; }
.t-ok { color: var(--ok); } .t-warn { color: var(--amber); } .t-bad { color: #fca5a5; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable::after { content: '⇅'; opacity: .3; margin-left: 5px; font-size: 11px; }
th.sortable.asc::after { content: '▲'; opacity: .8; }
th.sortable.desc::after { content: '▼'; opacity: .8; }
.ico { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; }
.ico svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ico.ok { background: rgba(34,197,94,.14); color: var(--ok); }
.ico.warn { background: rgba(245,158,11,.14); color: var(--amber); }
.ico.bad { background: rgba(239,68,68,.15); color: var(--err); }
.ico.no { color: #5b6678; }
.ico.no svg { stroke-width: 2; width: 12px; height: 12px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.pill2.on { background: rgba(34,197,94,.15); color: #86efac; }
.pill2.full { background: rgba(245,158,11,.16); color: #fcd34d; }
.t-lines td { vertical-align: middle; }
.t-lines .icon-btns { align-items: center; }
.dd-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #7b8798); padding: 8px 11px 3px; border-top: 1px solid var(--line); margin-top: 4px; }
.dd-sep:empty { padding: 0; margin: 4px 0; }
.dd-menu { max-height: calc(100vh - 16px); overflow-y: auto; }

/* ---------- Benutzer / Reseller ---------- */
body.is-reseller [data-admin] { display: none !important; }
.credit-pill { display: inline-block; padding: 3px 10px; border-radius: 6px; background: #a855c7; color: #fff; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.type-tag { display: inline-block; padding: 4px 10px; border-radius: 6px; background: #232c3a; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.type-tag.admin { background: rgba(56,189,248,.14); color: #7dd3fc; }
.type-tag.reseller { background: rgba(168,85,199,.16); color: #e3b4f2; }
.pill2.blue { background: #2563eb; color: #fff; }
.pill.credits { background: rgba(168,85,199,.22); border-color: rgba(168,85,199,.5); }
.credit-hint { background: rgba(168,85,199,.1); border: 1px solid rgba(168,85,199,.3); padding: 8px 12px; border-radius: 8px; }
.my-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.my-tiles .tile { display: block; min-height: 0; }
.my-tiles .big { font-size: 28px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.my-tiles .tile.accent { border-color: rgba(168,85,199,.5); background: linear-gradient(180deg, rgba(168,85,199,.18), #151b24); }
.my-tiles .tile.warn .big { color: var(--amber); }
.my-tiles .tile.bad .big { color: #fca5a5; }
.modal .grid2 > div, #modalForm .grid2 > div { align-content: start; }
.form-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.form-tabs button { background: var(--panel-2); color: var(--muted, #9aa4b2); border: 0; padding: 11px; font: inherit; font-weight: 600; cursor: pointer; display: flex; gap: 8px; align-items: center; justify-content: center; }
.form-tabs button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.form-tabs button.active { background: #3b82f6; color: #fff; }
.form-pane { display: grid; gap: 14px; }
.form-pane[hidden] { display: none; }
.select-clear { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.btn.warn-btn { background: #ea6c0a; border-color: #ea6c0a; color: #fff; min-width: 110px; }
.btn.warn-btn:hover { background: #f97316; }
.strength { margin-top: -6px; font-size: 12px; display: grid; gap: 3px; }
.strength i { display: block; height: 2px; width: 0; background: #64748b; border-radius: 2px; transition: width .2s; }
.strength.weak i { background: var(--err); } .strength.weak span { color: #fca5a5; }
.strength.mid i { background: var(--amber); } .strength.mid span { color: var(--amber); }
.strength.strong i { background: #eab308; } .strength.strong span { color: #facc15; }
.strength.vstrong i { background: var(--ok); } .strength.vstrong span { color: var(--ok); }
.switch-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; }
input.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 13px; background: #334155; position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; padding: 0; border: 0; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; }
input.switch:checked { background: #3b82f6; }
input.switch:checked::after { left: 23px; }
input[type=datetime-local]:disabled { opacity: .45; }
#modalForm h4.sub { margin: 6px 0 -4px; font-size: 13px; color: var(--muted, #9aa4b2); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pick-tools { display: flex; gap: 8px; }
.kv { display: flex; justify-content: space-between; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.kv span { color: var(--muted, #9aa4b2); }
/* Untermenüs wie XUI (Inhalte → Live-Streams › …) */
.nav-sub { position: relative; }
.nav-sub > span { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 9px 12px; border-radius: 7px; color: var(--muted); cursor: pointer; }
.nav-sub > span::after { content: '›'; font-size: 16px; line-height: 1; }
.nav-sub:hover > span, .nav-sub.open > span { background: var(--panel-2); color: var(--text); }
.nav-sub.active > span { color: #fff; }
.nav-submenu { position: absolute; left: calc(100% + 6px); top: -6px; min-width: 200px; background: var(--menu-bg, #1a202b); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: none; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.nav-submenu::before { content: ''; position: absolute; left: -10px; top: 0; bottom: 0; width: 10px; }
.nav-sub:hover .nav-submenu, .nav-sub.open .nav-submenu { display: grid; }
@media (max-width: 900px) {
  .nav-submenu { position: static; display: grid; box-shadow: none; border: 0; background: none; padding: 0 0 4px 14px; }
  .nav-sub > span::after { content: ''; }
}
/* Import */
.imp-sum { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.chip b { color: var(--sky); margin-left: 4px; } .chip i { font-style: normal; font-size: 10.5px; color: #e3b4f2; margin-left: 4px; }
.chip.active { background: #2563eb; border-color: #2563eb; } .chip.active b { color: #fff; }
.imp-logo { height: 22px; max-width: 48px; object-fit: contain; }
.imp-name { padding: 5px 8px; min-width: 220px; }
.imp-url { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* TV-Guide */
.guide-tools { display: flex; gap: 6px; flex-wrap: wrap; } .guide-tools select { width: auto; }
.guide { overflow-x: auto; }
.guide-head, .guide-row { display: grid; grid-template-columns: 210px 1fr; min-width: 900px; }
.guide-head { position: sticky; top: 0; background: var(--panel); z-index: 2; border-bottom: 1px solid var(--line); }
.g-ch { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-right: 1px solid var(--line); min-width: 0; }
.g-ch img { height: 22px; max-width: 40px; object-fit: contain; flex: none; }
.g-ch span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13px; }
.g-time { position: relative; height: 34px; }
.g-time span { position: absolute; top: 9px; transform: translateX(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.guide-row { border-bottom: 1px solid var(--line); }
.g-line { position: relative; height: 50px; }
.g-prog { position: absolute; top: 4px; bottom: 4px; border: 0; border-left: 2px solid #0e131b; background: #1d2633; color: var(--text); text-align: left; padding: 5px 8px; overflow: hidden; cursor: pointer; display: grid; align-content: center; gap: 1px; font: inherit; border-radius: 4px; }
.g-prog:hover { background: #26334a; }
.g-prog.now { background: linear-gradient(180deg, rgba(56,189,248,.25), rgba(56,189,248,.12)); }
.g-prog b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-prog span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.g-empty { position: absolute; left: 12px; top: 16px; font-size: 12.5px; color: var(--muted); }
.g-nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 1; pointer-events: none; }
/* Streams (wie XUI) */
.st-logo { height: 30px; max-width: 64px; object-fit: contain; }
.st-name { font-weight: 600; cursor: pointer; color: var(--text); }
.st-badge { display: inline-block; min-width: 118px; padding: 6px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #fff; text-align: center; font-variant-numeric: tabular-nums; }
.st-badge.run { background: #16a34a; } .st-badge.ondemand { background: #2563eb; } .st-badge.direct { background: #a855c7; }
.st-badge.down { background: #dc2626; } .st-badge.start { background: #d97706; } .st-badge.stop, .st-badge.off { background: #475569; }
.play-btn { background: #2563eb; border-color: #2563eb; color: #fff; }
.play-btn:disabled { background: #334155; border-color: #334155; }
.codec-tag { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #1d2a3a; color: #7dd3fc; font-weight: 700; font-size: 11px; letter-spacing: .03em; }
.t-streams td { vertical-align: middle; }
.enc-info { display: grid; gap: 6px; font-size: 13px; color: var(--muted, #9aa4b2); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.enc-info:empty { display: none; }
.enc-info p { margin: 0; }
/* Vorschau: nur Bild + Ton */
dialog.player-mode { width: min(1100px, calc(100vw - 32px)) !important; background: #000; border-color: #000; overflow: hidden; }
dialog.player-mode #modalForm { padding: 0; display: block; }
.player-only { position: relative; background: #000; }
.player-only video { display: block; width: 100%; max-height: calc(100vh - 40px); aspect-ratio: 16 / 9; background: #000; }
.player-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; cursor: pointer; opacity: 0; transition: opacity .2s; }
.player-title { position: absolute; top: 14px; left: 16px; color: #fff; font-weight: 600; text-shadow: 0 1px 4px #000; opacity: 0; transition: opacity .2s; pointer-events: none; }
.player-only:hover .player-close, .player-only:hover .player-title, .player-close:focus { opacity: 1; }
/* Stream bearbeiten (wie XUI) */
.logo-row { display: grid; grid-template-columns: 1fr 52px; gap: 8px; align-items: center; }
.logo-prev { height: 38px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); overflow: hidden; color: #fca5a5; }
.logo-prev img { max-width: 46px; max-height: 32px; object-fit: contain; }
.src-head { display: grid; grid-template-columns: 1fr 260px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #9aa4b2); padding: 0 4px; }
.src-row { display: grid; grid-template-columns: auto 1fr auto 260px; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 6px; }
[data-rtmp-row].src-row { grid-template-columns: 1fr auto; }
.src-move { display: flex; gap: 2px; } .src-move .btn { padding: 4px 7px; }
.src-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.info-box { background: rgba(20,184,166,.12); border: 1px solid rgba(20,184,166,.35); color: #99f6e4; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.map-table tr[data-map-idx] { cursor: pointer; } .map-table tr[data-map-idx]:hover td { background: var(--panel-2); }
.map-table tr.picked td { background: rgba(37,99,235,.18); }
.pane-nav { display: flex; justify-content: space-between; margin-top: 4px; }
.form-tabs { grid-auto-columns: minmax(0, 1fr); }
.form-tabs button { padding: 10px 6px; font-size: 13px; white-space: nowrap; }
@media (max-width: 760px) { .src-row { grid-template-columns: auto 1fr auto; } .src-row .src-info { grid-column: 1 / -1; } .form-tabs { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); } }
/* Stream → EPG mit zentralem EPG verbinden */
.epg-mode { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.epg-mode button { background: var(--panel-2); color: var(--muted, #9aa4b2); border: 0; padding: 9px; font: inherit; font-weight: 600; cursor: pointer; }
.epg-mode button.active { background: #3b82f6; color: #fff; }
[data-epgpane] { display: grid; gap: 10px; } [data-epgpane][hidden] { display: none; }
.epg-results { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.epg-hit { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 10px; align-items: center; text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--text); font: inherit; cursor: pointer; }
.epg-hit:hover { border-color: #3b82f6; } .epg-hit.picked { border-color: #22c55e; background: rgba(34,197,94,.1); }
.epg-hit img { height: 24px; max-width: 40px; object-fit: contain; }
.epg-chan-sel { width: 100%; min-height: 200px; padding: 4px; }
.epg-chan-sel option { padding: 5px 8px; border-radius: 4px; }
.epg-current { display: grid; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.epg-cur-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 13px; }
.epg-prog { position: relative; padding: 5px 8px; border-radius: 6px; font-size: 13px; overflow: hidden; }
.epg-prog.live { background: rgba(56,189,248,.12); }
.epg-prog.live i { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--w); background: var(--sky); }
.epg-none { font-size: 13px; color: var(--muted, #9aa4b2); }
.sys-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted, #9aa4b2); } .dom-row.src-row { grid-template-columns: 1fr auto auto; }
/* Lastverteilung: nach Zuschauern / nach Traffic */
.lb-mode-panel { margin-bottom: 16px; }
.lb-mode { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; flex-wrap: wrap; }
.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-opt { display: grid; gap: 2px; padding: 9px 16px; cursor: pointer; background: var(--panel-2); min-width: 200px; }
.seg-opt span { font-size: 12px; color: var(--muted, #9aa4b2); }
.seg-opt.active { background: #2563eb; } .seg-opt.active span { color: #dbeafe; }
.seg-opt + .seg-opt { border-left: 1px solid var(--line); }
@media (max-width: 700px) { .seg { grid-auto-flow: row; width: 100%; } .seg-opt + .seg-opt { border-left: 0; border-top: 1px solid var(--line); } }
.seg-opt b { color: var(--text); } .seg-opt.active b { color: #fff; }
.lb-info { margin-bottom: 12px; font-size: 13.5px; } .lb-info a { color: var(--sky); }
.inst-log { max-height: 420px; min-height: 260px; white-space: pre-wrap; }
.inst-state { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--sky); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Pakete */
.st-badge.sm { min-width: 0; padding: 4px 9px; font-size: 11.5px; }
.pkg-info:empty { display: none; }
.pkg-info { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.pkg-info .kv { padding: 2px 0; background: none; border: 0; }
@media (max-width: 560px) { .pkg-info { grid-template-columns: 1fr; } }
/* Benutzer hinzufügen – Seite wie XUI "Add User" */
.xf { max-width: 816px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.xf-tab { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; background: var(--accent, #3b82f6); color: #fff; font-weight: 600; font-size: 14px; }
.xf-tab svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.xf-body { padding: 18px 24px 22px; display: grid; gap: 4px; }
.xf-row { display: grid; grid-template-columns: 264px 1fr; align-items: center; gap: 12px; padding: 9px 0; }
.xf-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }
.xf-input input, .xf-input select, .xf-input textarea { width: 100%; }
.xf-pair { display: flex; gap: 24px; align-items: center; }
.xf-pair select { flex: 1; }
.xf-pair.credits input[name=credits] { width: 108px; flex: none; text-align: center; }
.xf-pair.credits input[name=credits_reason] { flex: 1; }
.xf-clear { background: #ea6a0a; border-color: #ea6a0a; color: #fff; min-width: 108px; justify-content: center; }
.xf-clear:hover { background: #d35f08; }
.xf-foot { display: flex; justify-content: flex-end; padding-top: 14px; }
@media (max-width: 680px) {
  .xf-row { grid-template-columns: 1fr; gap: 6px; padding: 6px 0; }
  .xf-pair { gap: 10px; } .xf-body { padding: 14px 16px 18px; }
}
.xf-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.xf-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; background: var(--panel-2); color: var(--text); border: 0; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.xf-tabs button.active { background: var(--accent); color: #fff; }
.xf-tabs button[hidden] { display: none; }
.xf-tabs:has(button[hidden]) { grid-template-columns: 1fr; }
.xf-tabs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.xf-row[hidden] { display: none; }
.xf-sub { margin: 10px 0 2px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.xf-foot { gap: 10px; }
.xf-label .pill2 { display: inline-block; width: auto; margin-left: 6px; padding: 1px 7px; font-size: 11px; vertical-align: 1px; }
.xf-label .small { font-weight: 400; margin-top: 2px; }
.xf .hint { margin: 2px 0 6px; }
/* Schalter: Text direkt neben dem Knopf */
.switch-row { justify-content: flex-start; gap: 14px; }
.switch-row input.switch { order: -1; }
/* Bouquets als Tabelle (wie XUI) */
.bq-table table { width: 100%; border-collapse: collapse; }
.bq-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bq-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-variant-numeric: tabular-nums; }
.bq-table th.c, .bq-table td.c { text-align: center; }
.bq-table tr[data-bqrow]:hover td { background: var(--panel-2); }
.bq-table tr.sel td { background: #2563eb; color: #fff; }
.bq-table tr.sel:hover td { background: #1d4ed8; }
.bq-table tr.sel b { color: #fff; }
.bq-table input[type=checkbox] { width: 16px; height: 16px; accent-color: #fff; cursor: pointer; }
.bq-table .table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 52vh; }
.bq-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.bq-table.off { opacity: .45; pointer-events: none; }
/* Radio-Vorschau */
.radio-player { display: grid; justify-items: center; gap: 14px; padding: 28px 24px 22px; min-width: min(420px, 90vw); background: var(--panel); border-radius: 12px; }
.radio-player img { width: 140px; height: 140px; object-fit: contain; border-radius: 12px; background: #fff1; }
.radio-player .radio-ico { font-size: 72px; line-height: 1; }
.radio-player .radio-name { font-weight: 700; font-size: 17px; }
.radio-player audio { width: 100%; }
/* Radiosender-Seite (wie XUI "Add Radio Station") */
.xf-tabs.xf-tabs-4 { grid-template-columns: repeat(4, 1fr); }
.xf-row2 { grid-template-columns: 264px auto 1fr 140px; }
/* zwei Schalter in einer Zeile: zweiter Schalter direkt hinter seiner Beschriftung (nicht ganz rechts) */
.xf-row2.mv-sw { grid-template-columns: 264px 120px auto 1fr; }
.xf-row2.mv-sw > .xf-label:nth-child(3) { padding-right: 6px; }
.xf-narrow { flex: 0 0 130px; width: 130px !important; }
.xf-pair.xf-logopair input { flex: 1; } .xf-pair.xf-logopair { gap: 0; }
.xf-eye { border-radius: 0 8px 8px 0; padding: 0 14px; align-self: stretch; }
.xf-eye svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.xf-pair.xf-logopair input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.xf-logo { margin-top: 8px; color: var(--muted); font-size: 13px; }
.xf-logo img { max-height: 90px; max-width: 200px; border-radius: 8px; background: #fff1; padding: 6px; }
.xf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); cursor: pointer; font-size: 13.5px; margin: 0; }
.chip input { margin: 0; accent-color: var(--accent); }
.chip:has(input:checked) { border-color: var(--accent); background: #1e3a8a55; }
.xf-srv { display: grid; gap: 8px; }
.chip.srv { border-radius: 8px; }
.chip.srv small { margin-left: auto; }
.chip .sdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #64748b; }
.chip .sdot.on { background: #22c55e; } .chip .sdot.bad { background: #ef4444; }
.xf-steps { align-items: center; }
.xf-steps .grow { flex: 1; }
.xf-steps [hidden] { display: none; }
.xf-input .hint { margin: 6px 0 0; }
@media (max-width: 680px) { .xf-row2, .xf-row2.mv-sw { grid-template-columns: 1fr auto; } .xf-tabs.xf-tabs-4 { grid-template-columns: 1fr 1fr; } }
.xf-input input.switch, .xf-row2 input.switch { width: 46px; }
.xf .chip input { width: auto; flex: none; }
.xf-pair.xf-logopair input { flex: 1 1 auto; min-width: 0; width: auto; }
.xf-pair.xf-logopair .xf-eye { flex: none; }
.xf-pair select:first-child { flex: 1 1 auto; min-width: 0; }
/* Formular als Seite (wie XUI "Add Stream") */
.xf.xf-wide { max-width: 980px; }
.page-form { display: grid; gap: 10px; padding: 0 24px 22px; }
.page-form > .form-tabs { margin: 0 -24px 10px; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); background: var(--panel-2); display: flex; flex-wrap: wrap; padding: 0; gap: 0; }
.page-form > .form-tabs button { flex: 1 1 0; min-width: 110px; padding: 13px 10px; border-radius: 0; font-weight: 600; font-size: 14px; }
.page-form .form-pane { display: grid; gap: 4px; }
.page-form .form-pane[hidden] { display: none; }
.page-form .form-pane > label:not(.check):not(.switch-row):not(.chip),
.page-form .grid2 > div > label:not(.check):not(.switch-row) { display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.page-form .form-pane > label > input, .page-form .form-pane > label > select, .page-form .form-pane > label > textarea { color: var(--text); font-weight: 400; font-size: 14px; }
.page-form .form-pane > .hint, .page-form .form-pane > p.hint { margin: -4px 0 6px 252px; }
.page-form .switch-row { display: grid !important; grid-template-columns: 240px auto; justify-content: start; gap: 12px; padding: 7px 0; }
.page-form .switch-row span { font-size: 13px; font-weight: 600; color: var(--muted); }
.page-form .switch-row input.switch { order: 0; }
.page-form .grid2 { grid-template-columns: 1fr 1fr; }
.page-form .grid2 .switch-row { grid-template-columns: 1fr auto; padding-right: 24px; }
.page-form .pane-nav { display: none; }
.page-form .modal-actions { margin-top: 8px; display: flex; gap: 10px; align-items: center; }
.page-form .modal-actions [hidden] { display: none; }
.page-form .xf-row { padding: 7px 0; }
@media (max-width: 760px) {
  .page-form { padding: 0 14px 18px; } .page-form > .form-tabs { margin: 0 -14px 10px; }
  .page-form .form-pane > label:not(.check):not(.switch-row):not(.chip), .page-form .switch-row { grid-template-columns: 1fr; }
  .page-form .form-pane > .hint { margin-left: 0; } .page-form .grid2 { grid-template-columns: 1fr; }
}
#modalForm.page-form { padding: 0 24px 22px; margin: 0; }
.page-form > .form-tabs { margin-top: 0; }
.page-form .bq-table { margin-top: 4px; }
.form-tabs button svg { flex: none; }
.page-form .xf-row { grid-template-columns: 240px 1fr; }
@media (max-width: 760px) { .page-form .xf-row { grid-template-columns: 1fr; } }
/* XUI-Fenster (Line bearbeiten) */
dialog.xui-dlg { width: min(1000px, calc(100vw - 32px)) !important; }
dialog.xui-dlg #modalForm.page-form { padding: 0 24px 20px; }
.xui-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -24px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.xui-head h2 { margin: 0 !important; font-size: 16px; }
.xui-x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.xui-x:hover { background: var(--panel-2); color: var(--text); }
dialog.xui-dlg .page-form > .form-tabs { margin-top: 0; }
/* Paare in einer Zeile: links wie alle Zeilen, rechts kompakt (wie XUI „Ablauf … Läuft nie ab“) */
.page-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: center; }
.page-form .grid2 > div { gap: 2px !important; }
.page-form .grid2 > div:first-child > label:not(.check):not(.switch-row) { grid-template-columns: 240px 1fr; }
.page-form .grid2 > div:last-child > label:not(.check):not(.switch-row) { grid-template-columns: auto 1fr; }
.page-form .grid2 > div:first-child > .switch-row { grid-template-columns: 240px auto; padding-right: 0; }
.page-form .grid2 > div:last-child > .switch-row { grid-template-columns: 1fr auto; padding-right: 0; }
.page-form .grid2 > div > .hint { margin: -2px 0 4px; }
.page-form .grid2 > div:first-child > .hint { margin-left: 252px; }
.page-form label > input[type=number] { max-width: 280px; }
.page-form .select-clear { display: flex; gap: 12px; } .page-form .select-clear select { flex: 1; }
.page-form .select-clear .warn-btn { background: #ea6a0a; border-color: #ea6a0a; color: #fff; min-width: 120px; justify-content: center; }
.xf-checks { display: flex; gap: 22px; align-items: center; }
.xf-checks .check { margin: 0; font-weight: 500; color: var(--text); }
.xf-list select[multiple] { width: 100%; margin-top: 10px; min-height: 120px; background: var(--panel-2); }
.xf-pair.list-add { gap: 0; }
.xf-pair.list-add input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.xf-pair.list-add .btn { border-radius: 0; width: 44px; justify-content: center; }
.xf-pair.list-add .btn:last-child { border-radius: 0 8px 8px 0; }
.page-form .kv { margin: 4px 0; }
@media (max-width: 760px) { .page-form .grid2 { grid-template-columns: 1fr; } .page-form .grid2 > div > label:not(.check):not(.switch-row), .page-form .grid2 > div > .switch-row { grid-template-columns: 1fr !important; } .page-form .grid2 > div:first-child > .hint { margin-left: 0; } }
.page-form .strength { margin: -4px 0 4px 252px; }
@media (max-width: 760px) { .page-form .strength { margin-left: 0; } }
.xf-checks .check.muted { color: var(--muted); opacity: .6; cursor: not-allowed; }
.xf-pair.list-add input[readonly] { color: var(--text); }
#geoBox .kv { flex-wrap: wrap; gap: 6px 12px; align-items: center; }
#geoBox .kv b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 500; }
#geoBox .kv .btn.small { padding: 2px 8px; }
/* Einstellungen: Kästen nebeneinander */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 20px; align-items: start; }
/* Reiter auf Seiten: jeder Reiter bekommt seinen Platz, nichts läuft in den Nachbarn */
.page-form > .form-tabs { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.page-form > .form-tabs button { min-width: 0; padding: 13px 8px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; gap: 6px; }
.page-form .btn:focus:not(:focus-visible), .page-form .form-tabs button:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.srv-tools { display: flex; gap: 8px; margin-top: 8px; }
/* Vorschau-Player: eigene Leiste (Abspielen/Pause, Ton, Vollbild) */
.player-only .pbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 26px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; transition: opacity .25s; }
.player-only.pb-show .pbar, .player-only:focus-within .pbar { opacity: 1; }
.player-only.pb-show .player-close, .player-only.pb-show .player-title { opacity: 1; }
.player-only:not(.pb-show) video { cursor: none; }
.pb-btn { background: none; border: 0; color: #fff; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pb-btn:hover { background: rgba(255,255,255,.15); }
.pb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pb-grow { flex: 1; }
.pb-live { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.pb-live i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
.pb-vol { -webkit-appearance: none; appearance: none; width: 110px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #fff var(--p, 100%), rgba(255,255,255,.3) var(--p, 100%)); cursor: pointer; padding: 0; border: 0; outline: none; }
.pb-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.pb-vol::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.pb-vol::-moz-range-track { background: transparent; }
.player-only:fullscreen { display: grid; place-items: center; }
.player-only:fullscreen video { max-height: 100vh; height: 100%; width: 100%; }
.radio-player .pbar { position: static; opacity: 1; background: var(--panel-2); border-radius: 999px; padding: 6px 12px; width: 100%; }
/* Hinweis im Player, z. B. "Vorschau als H.264-Kopie" */
.player-note { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.65); color: #fbbf24; font-size: 12px;
  padding: 4px 10px; border-radius: 999px; pointer-events: none; white-space: nowrap; max-width: 80%; overflow: hidden; text-overflow: ellipsis; }
/* Playlist herunterladen (Lines) */
.pl-row { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
.pl-l { font-weight: 600; padding-top: 9px; }
.pl-in select, .pl-in input:not([type=checkbox]) { width: 100%; }
.pl-in .hint { margin-top: 5px; }
.pl-in.chips { padding-top: 3px; }
.pl-btns { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) { .pl-row { grid-template-columns: 1fr; gap: 6px; } .pl-l { padding-top: 0; } }
.t-lines .icon-btns { gap: 3px; }
.t-lines .icon-btns .btn { padding: 6px 7px; }
.pl-in .chip { white-space: nowrap; }
/* On-Demand-Countdown unter dem Status */
.idle-cd { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.idle-cd.soon { color: #f59e0b; }
/* ---------- Filme (wie XUI „Manage Movies“) ---------- */
.t-movies td { vertical-align: middle; }
.mv-cover { width: 42px; height: 60px; object-fit: cover; border-radius: 4px; display: block; margin: 0 auto; background: var(--panel-2); }
.mv-cover.none { display: block; }
.mv-sub { font-size: 12px; margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.stars { color: #f5b301; letter-spacing: 1px; font-size: 12px; }
.mv-info { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.mv-kbps { display: grid; font-size: 12.5px; line-height: 1.35; min-width: 96px; }
.mv-kbps b { font-weight: 600; }
.mv-kbps span { color: var(--muted); font-variant-numeric: tabular-nums; }
.mv-i { display: grid; justify-items: center; gap: 2px; font-size: 12.5px; min-width: 44px; }
.mv-i svg { width: 15px; height: 15px; stroke: var(--teal, #14b8a6); fill: none; stroke-width: 2; }
.ico.wait { color: var(--muted); }
.ico .spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.ico-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.ico-btn:hover .ico { color: var(--text); background: var(--panel-2); }
.pager { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
/* Import */
.mv-imp { display: grid; gap: 14px; }
.mv-mode { grid-template-columns: 1fr 1fr; }
.mv-review .mv-in { width: 100%; min-width: 200px; padding: 5px 8px; }
.mv-review .mv-in.yr { width: 70px; min-width: 0; text-align: center; }
.mv-review .mv-src { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Player: Fortschrittsbalken für Filme (eigene Zeile, in allen Browsern sichtbar) */
.pbar.pb-vod { flex-wrap: wrap; row-gap: 6px; }
.pb-prog { flex: 0 0 100%; position: relative; height: 18px; cursor: pointer; touch-action: none; outline: none; }
.pb-prog::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); }
.pb-buf, .pb-fill { position: absolute; left: 0; top: 7px; height: 4px; border-radius: 4px; width: 0; pointer-events: none; }
.pb-buf { background: rgba(255,255,255,.4); }
.pb-fill { background: var(--accent, #3b82f6); }
.pb-knob { position: absolute; top: 3px; left: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.5); pointer-events: none; transform: scale(.85); transition: transform .1s; }
.pb-prog:hover::before, .pb-prog:hover .pb-buf, .pb-prog:hover .pb-fill, .pb-prog.drag .pb-fill { top: 6px; height: 6px; }
.pb-prog:hover .pb-knob, .pb-prog.drag .pb-knob { transform: scale(1.15); }
.pb-tip { position: absolute; bottom: 20px; transform: translateX(-50%); background: rgba(0,0,0,.85); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 4px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .1s; font-variant-numeric: tabular-nums; }
.pb-prog:hover .pb-tip, .pb-prog.drag .pb-tip { opacity: 1; }
.pb-time { color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; margin: 0 4px; }
.mv-rtop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pill2.warn { background: rgba(245,158,11,.15); color: #f59e0b; }
/* Film-Fenster (wie XUI) */
.mv-form .xf-pair .icon-btn { flex: none; width: 42px; padding: 0; display: grid; place-items: center; }
.mv-form .xf-narrow2 { max-width: 300px; }
.mv-form .xf-hintrow { margin: -6px 0 14px; }
.mv-form [data-probeinfo]:empty { display: none; }
.mv-form .xf-row.xf-row2 { grid-template-columns: 240px minmax(0, 1fr) 150px minmax(0, 1fr); }
.mv-form .xf-row.xf-row2 > div { min-width: 0; }
.mv-form .xf-pair .icon-btn { align-self: stretch; height: auto; min-height: 38px; font-size: 15px; border-radius: 8px; }
@media (max-width: 760px) { .mv-form .xf-row.xf-row2 { grid-template-columns: 1fr; } }
.mv-form .chip input { width: auto; flex: none; }
.mv-form .xf-srv .chip.srv { justify-content: flex-start; }
/* Transcoding-Profile */
.prof-form { max-width: 1020px; margin: 0 auto; }
.prof-form .body { padding: 18px 24px; }
.xf-tabs.xf-tabs-1 { display: grid; grid-template-columns: 1fr; }
.prof-form .xf-row.xf-row2 { grid-template-columns: 240px minmax(0, 1fr) 210px minmax(0, 1fr); }
.prof-form .xf-row.xf-row2 > div { min-width: 0; }
.prof-form input:disabled, .prof-form select:disabled { opacity: .45; }
@media (max-width: 860px) { .prof-form .xf-row.xf-row2 { grid-template-columns: 1fr; } }
.help { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px; border: 1px solid var(--muted); border-radius: 50%; font-size: 10px; color: var(--muted); cursor: help; vertical-align: 1px; }
.mv-proc { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sky, #38bdf8); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-proc .spin { width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; display: block; }
.mv-proc.wait { color: var(--muted); }
.mv-prof { margin-left: 8px; font-size: 10.5px; vertical-align: 2px; }
.prof-form .xf-label { display: flex; align-items: center; }
/* Film ansehen (wie XUI „View Movie“) */
.mv-view { max-width: 1040px; margin: 0 auto; }
.mv-hero { position: relative; border-radius: 12px 12px 0 0; overflow: hidden; background: #000 var(--bg) center / cover; aspect-ratio: 16 / 9; max-height: 560px; display: grid; place-items: center; }
.mv-hero::before { content: ''; position: absolute; inset: 0; background: inherit; filter: blur(24px) brightness(.5); transform: scale(1.1); }
.mv-hero img { position: relative; max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.mv-hero-empty { display: none; position: relative; text-align: center; color: var(--muted); font-size: 46px; gap: 10px; }
.mv-hero-empty span { display: block; font-size: 13px; }
.mv-hero.none { background: var(--panel-2); aspect-ratio: 21 / 6; }
.mv-hero.none::before { display: none; }
.mv-hero.none .mv-hero-empty { display: grid; }
.mv-tabs-panel { border-radius: 0 0 12px 12px; margin-top: 0; padding: 18px 24px 24px; }
.mv-vtabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.mv-vtabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.mv-vtabs button.active { color: var(--text); border-bottom-color: var(--accent, #3b82f6); }
.mv-info-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.mv-info-grid:not(:has(.mv-poster)) { grid-template-columns: 1fr; }
.mv-poster { width: 200px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.mv-title { margin: 0 0 6px; font-size: 22px; }
.mv-plot { line-height: 1.6; margin: 12px 0 16px; }
.mv-kv .kv { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.mv-kv .kv span { color: var(--muted); }
.mv-kv .kv b { font-weight: 500; word-break: break-word; }
.mv-sw .xf-label { display: flex; align-items: center; }
.btn-group { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 700px) { .mv-info-grid { grid-template-columns: 1fr; } .mv-poster { width: 140px; } .mv-kv .kv { grid-template-columns: 1fr; gap: 2px; } }
/* Filme: Leiste mit Fortschrittsbalken immer sichtbar, unter dem Bild (nicht darüber) */
.player-only.pb-fixed .pbar { position: static; opacity: 1; background: #0b0f17; padding: 8px 14px 10px; }
.player-only.pb-fixed video { cursor: default; max-height: calc(100vh - 140px); }
.player-only.pb-fixed .player-title, .player-only.pb-fixed .player-close { opacity: 1; }
/* im Vollbild wieder über dem Bild und automatisch ausblenden */
.player-only.pb-fixed:fullscreen { display: block; }
.player-only.pb-fixed:fullscreen video { height: 100vh; max-height: 100vh; }
.player-only.pb-fixed:fullscreen .pbar { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.8)); padding: 26px 14px 12px; opacity: 0; }
.player-only.pb-fixed.pb-show:fullscreen .pbar { opacity: 1; }
.player-only.pb-fixed .pb-prog::before, .player-only.pb-fixed .pb-buf, .player-only.pb-fixed .pb-fill { top: 6px; height: 6px; }
.player-only.pb-fixed .pb-prog:hover::before, .player-only.pb-fixed .pb-prog:hover .pb-buf, .player-only.pb-fixed .pb-prog:hover .pb-fill { top: 5px; height: 8px; }
.player-only.pb-fixed .pb-knob { top: 2px; width: 14px; height: 14px; margin-left: -7px; transform: none; }
/* Balken besser erkennbar: feine helle Linie oben und unten */
.player-only.pb-fixed .pbar { border-top: 1px solid rgba(255,255,255,.12); }
.player-only.pb-fixed .pb-prog::before { top: 4px; height: 8px; box-sizing: border-box; border-radius: 5px; background: rgba(255,255,255,.14);
  border-top: 1px solid rgba(255,255,255,.45); border-bottom: 1px solid rgba(255,255,255,.45); }
.player-only.pb-fixed .pb-buf, .player-only.pb-fixed .pb-fill { top: 5px; height: 6px; }
.player-only.pb-fixed .pb-buf { background: rgba(255,255,255,.3); }
.player-only.pb-fixed .pb-prog:hover::before { top: 3px; height: 10px; }
.player-only.pb-fixed .pb-prog:hover .pb-buf, .player-only.pb-fixed .pb-prog:hover .pb-fill { top: 4px; height: 8px; }

/* Serie ansehen: Episoden nach Staffeln */
.mv-hero.sv-hero { aspect-ratio: 21 / 8; max-height: 440px; }
.sv-tools { margin: 4px 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.sv-season { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.sv-season b { font-size: 15px; }
.sv-eps td { vertical-align: middle; }
.sv-ep { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.sv-thumb { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; background: #000; }
.sv-ep-text { min-width: 0; }
.sv-plot { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; }
.mv-hero.sv-hero { width: 100%; }
.mv-hero.sv-hero img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; }

.xf-checks { display: flex; gap: 28px; flex-wrap: wrap; padding: 6px 0; }
.xf-checks .check { margin: 0; }

/* Mehrere Episoden: Liste „Episoden zum Hinzufügen“ */
.ep-add { margin: 4px 0 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ep-add-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; background: var(--panel-2); }
.ep-add-head .grow { flex: 1; }
.ep-add .table-wrap { max-height: 420px; overflow: auto; }
.ep-add-t td { padding-top: 6px; padding-bottom: 6px; }
.ep-add-t .mv-in.yr { width: 70px; }
.ep-file { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Einstellungen: Reiter + API (wie XUI) */
.set-tabs { margin: 0 0 16px; }
.api-set { max-width: 1040px; margin: 0 auto; }
.set-h { margin: 22px 0 6px; font-size: 15px; }
.set-h:first-child { margin-top: 0; }
.api-set .xf-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.api-set form.xf { border: 0; background: none; box-shadow: none; max-width: none; margin: 0; }

/* Dienst-Einrichtung */
#nav .perm-off { display: none !important; }
.svc-t td { vertical-align: middle; }
.xf-checks.col { flex-direction: column; gap: 8px; }
.xf-checks.col { align-items: flex-start; }

/* Kategorien: sortieren per Ziehen (wie XUI) */
.cat-panel { max-width: 900px; margin: 0 auto; padding: 0 20px 20px; }
.cat-tabs { grid-template-columns: repeat(4, 1fr); margin: 0 -20px 14px; }
.cat-list { display: grid; gap: 6px; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; user-select: none; }
.cat-row.dragging { opacity: .85; border-color: var(--accent, #3b82f6); box-shadow: 0 6px 18px rgba(0,0,0,.35); position: relative; z-index: 2; }
.cat-handle { cursor: grab; touch-action: none; color: var(--muted); font-size: 18px; padding: 0 4px; }
.cat-row.dragging .cat-handle { cursor: grabbing; }
.cat-name { flex: 1; font-weight: 600; min-width: 0; }
.cat-adult { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #be123c; color: #fff; margin-left: 6px; vertical-align: middle; }
.cat-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 14px; }
.cat-foot .btn:disabled { opacity: .45; cursor: default; }
.cat-panel > .hint { margin: 0 0 12px; }

/* Sender-Reihenfolge (wie XUI „Channel Order“) */
.ord-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ord-top select { max-width: 320px; }
.ord-top .hint { flex: 1; margin: 0; min-width: 260px; }
.ord-list { height: 56vh; min-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); padding: 4px; user-select: none; }
.ord-row { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.ord-row:hover { background: rgba(255,255,255,.04); }
.ord-row.sel { background: color-mix(in srgb, var(--accent, #3b82f6) 30%, transparent); }
.ord-row.dragging { outline: 1px solid var(--accent, #3b82f6); background: color-mix(in srgb, var(--accent, #3b82f6) 20%, transparent); }
.ord-row .cat-handle { font-size: 15px; }
.ord-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.ord-foot .grow { flex: 1; }
.ord-foot .btn:disabled { opacity: .45; }
.api-set .xf-foot .grow { flex: 1; }

/* Mehrfach bearbeiten */
.mass-row { cursor: pointer; }
.mass-row input { margin: 0; width: auto; flex: none; }
.mass-row .small { flex: none; white-space: nowrap; }
.mass-act { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.mass-act label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); min-width: 170px; flex: 1; }
.t-warn { color: var(--amber, #f59e0b); }
.mass-tabs { grid-template-columns: repeat(7, 1fr); }
.mass-tabs button { padding: 12px 4px; font-size: 13px; }
.mass-act input { width: 100%; }
/* Created Channels */
.cr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cr-list { height: 48vh; min-height: 280px; }
.cr-row { cursor: default; }
.cr-row .ord-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-row .icon-btns { flex: none; }
.cr-n { width: 26px; text-align: right; flex: none; }
.cr-back { cursor: pointer; border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: 4px; }
.cr-head { display: flex; align-items: center; gap: 10px; height: 38px; margin-bottom: 8px; }
.cr-picktabs { grid-template-columns: 1fr 1fr !important; margin: 0 !important; }
@media (max-width: 900px) { .cr-grid { grid-template-columns: 1fr; } }
/* Logs (wie XUI) */
.nav-submenu.nav-cols2 { grid-template-columns: 1fr 1fr; min-width: 400px; column-gap: 4px; grid-auto-flow: column; grid-template-rows: repeat(8, auto); }
@media (max-width: 900px) { .nav-submenu.nav-cols2 { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; min-width: 0; } }
.set-tabs { grid-template-columns: repeat(7, 1fr); }
.lg-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.lg-tabs a { padding: 6px 11px; border-radius: 6px; color: var(--muted); font-size: 13px; text-decoration: none; background: rgba(255,255,255,.03); }
.lg-tabs a:hover { color: var(--text); background: rgba(255,255,255,.07); }
.lg-tabs a.active { background: var(--accent, #3b82f6); color: #fff; }
.lg-hint { margin: 0 0 10px; }
.lg-filters { flex-wrap: wrap; gap: 8px; }
.lg-filters select { width: auto; }
.lg-dates { display: inline-flex; align-items: center; gap: 6px; }
.lg-dates input { width: 150px; }
.lg-table td { vertical-align: middle; font-size: 13px; }
.lg-table th.lg-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.lg-table th.lg-sort:hover { color: var(--text); }
.lg-ua { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--muted); }
.lg-dur { display: inline-block; min-width: 86px; padding: 5px 8px; border-radius: 4px; background: #16a34a; color: #fff; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; }
.lg-dur.live { background: #2563eb; }
.lg-msg { white-space: pre-wrap; word-break: break-word; }
.lg-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 160px; overflow: auto; }
.lg-det summary { cursor: pointer; }
.lg-det pre { white-space: pre-wrap; font-size: 11.5px; max-height: 240px; overflow: auto; background: var(--panel-2); padding: 8px; border-radius: 6px; }
.lg-bar { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.lg-bar i { display: block; height: 100%; background: var(--accent, #3b82f6); }
.lg-ip { display: inline-block; margin: 1px 4px 1px 0; font-family: ui-monospace, monospace; font-size: 12px; }
.lg-set { max-width: 1000px; margin: 0 auto; }
.lg-setrow { align-items: center; }
.lg-setrow { display: grid; grid-template-columns: 1fr auto auto 160px; gap: 10px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lg-setrow .small { margin-top: 3px; }
.lg-set .hint { margin: 14px 0; }
@media (max-width: 700px) { .lg-setrow { grid-template-columns: 1fr auto; } }
/* TV-Archiv */
.arc-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(239,68,68,.15); color: #fca5a5; font-size: 11px; font-weight: 600; vertical-align: middle; }
.arc-disk { display: grid; gap: 8px; margin-bottom: 16px; }
.arc-bar { width: 100%; height: 10px; }
.arc-disk { padding: 16px 20px 0; }
.arc-foot { padding: 10px 20px 14px; margin: 0; }
.arc-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.arc-add select { width: auto; min-width: 180px; }
.arc-add select[name=sid] { flex: 1; min-width: 260px; }
/* Import: erweiterte Optionen */
.imp-adv { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: grid; gap: 12px; }
.imp-adv[open] { padding-bottom: 14px; }
.imp-adv summary { cursor: pointer; font-weight: 600; }
.imp-adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 10px; }
@media (max-width: 700px) { .imp-adv-grid { grid-template-columns: 1fr; } }
.wiz .xf-row2 > .xf-label { display: flex; align-items: center; gap: 6px; }
.wiz .xf-row2 > .xf-label .help { margin: 0; }
.bq-ord { max-width: 900px; margin: 0 auto; }
.bq-ord .ord-list { height: 50vh; }
.bq-ord .xf-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
/* Allgemeine Anzeige-Einstellungen */
body.no-hdr-stats #pills { display: none; }
body.no-images .st-logo, body.no-images .imp-logo, body.no-images .mv-cover img { display: none !important; }
body.no-restarts [title="Neustarts"] { display: none !important; }
/* Suche oben */
.gsearch { position: relative; margin-left: auto; margin-right: 12px; }
.gsearch input { width: 230px; height: 32px; padding: 4px 10px; font-size: 13px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.15); }
.gsearch-res { position: absolute; right: 0; top: 38px; width: 360px; max-height: 60vh; overflow: auto; background: var(--menu-bg, #1a202b); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.45); padding: 6px; z-index: 50; }
.gsearch-res a { display: grid; grid-template-columns: 24px 1fr; gap: 0 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; color: var(--text); text-decoration: none; }
.gsearch-res a span { grid-row: span 2; align-self: center; text-align: center; }
.gsearch-res a small { color: var(--muted); font-size: 11.5px; }
.gsearch-res a:hover, .gsearch-res a.on { background: rgba(59,130,246,.18); }
#captchaBox { display: flex; justify-content: center; }
@media (max-width: 900px) { .gsearch input { width: 140px; } .gsearch-res { width: 300px; } }
/* Einstellungen › Streaming */
.od-scan { margin: 6px 0 4px; display: grid; gap: 8px; }
.od-scan-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.od-scan-head span { flex: 1; min-width: 200px; }
.od-scan .ok { color: var(--ok, #2e9d5b); }
.od-scan .bad { color: var(--bad, #d64545); }
.country-multi { width: 100%; min-height: 170px; }
/* Lines › MAG / Enigma2-Geräte */
.dev-setup { margin-bottom: 16px; }
.dev-cmd input { font-family: ui-monospace, Menlo, Consolas, monospace; }
.dev-on { display: flex; gap: 24px; flex-wrap: wrap; }
.dev-newline[hidden] { display: none; }
.t-ok { color: var(--ok); }
.dev-paired .bq-table { opacity: .4; pointer-events: none; }
[data-ownline][hidden], [data-ownline-off][hidden] { display: none; }
.xf-row[hidden] { display: none; }
@media (max-width: 700px) { .set-tabs { grid-template-columns: repeat(3, 1fr); } }
.api-set .pw-form, .api-set .sub-form { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }

/* ---------- Benutzer-Menü oben rechts ---------- */
.user-dd { position: relative; }
button.user-chip { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
button.user-chip:hover { background: rgba(255,255,255,.08); }
.user-dd .dd-menu { min-width: 180px; top: calc(100% + 6px); z-index: 40; }

/* ---------- Kopfzeilen-Farbe (Mein Profil) ---------- */
body[data-topbar=blue] { --hdr-a: #0b2a5c; --hdr-b: #1d4ed8; --hdr-c: #2563eb; }
body[data-topbar=lightblue] { --hdr-a: #075985; --hdr-b: #0284c7; --hdr-c: #38bdf8; }
body[data-topbar=green] { --hdr-a: #064e3b; --hdr-b: #047857; --hdr-c: #10b981; }
body[data-topbar=red] { --hdr-a: #4c0519; --hdr-b: #9f1239; --hdr-c: #e11d48; }
body[data-topbar=orange] { --hdr-a: #7c2d12; --hdr-b: #c2410c; --hdr-c: #f97316; }
body[data-topbar=purple] { --hdr-a: #2e1065; --hdr-b: #6d28d9; --hdr-c: #8b5cf6; }
body[data-topbar=pink] { --hdr-a: #500724; --hdr-b: #be185d; --hdr-c: #ec4899; }
body[data-topbar=darkgrey] { --hdr-a: #111827; --hdr-b: #1f2937; --hdr-c: #374151; }
body[data-topbar=lightgrey] { --hdr-a: #4b5563; --hdr-b: #6b7280; --hdr-c: #9ca3af; }
body[data-topbar]:not([data-topbar=default]) .hdr-top { background: linear-gradient(100deg, var(--hdr-a), var(--hdr-b) 55%, var(--hdr-c)); }

/* ---------- Helles Design (Mein Profil) ---------- */
body.theme-light { --bg: #f2f4f8; --panel: #ffffff; --panel-2: #eef1f6; --line: #d8dde6; --text: #1a2230; --muted: #5b6676; color-scheme: light; }
body.theme-light .nav { background: #ffffff; }
body.theme-light .nav-btn, body.theme-light .nav > a { color: #475467; }
body.theme-light .nav > a.active, body.theme-light .nav-group.active .nav-btn, body.theme-light .nav-sub.active > span { color: #0f172a; }
body.theme-light .nav-menu, body.theme-light .nav-submenu, body.theme-light .dd-menu { background: #ffffff; box-shadow: 0 12px 30px rgba(15,23,42,.15); }
body.theme-light .nav-menu a.active { color: #0369a1; }
body.theme-light .topbar { background: rgba(242,244,248,.92); }
body.theme-light nav a.active { color: #0f172a; }
body.theme-light .pill2, body.theme-light .codec-tag { background: #e3eaf3; color: #1e3a5f; }
body.theme-light .type-tag { background: #e6ebf2; }
body.theme-light .bar i, body.theme-light .proc-cpu i, body.theme-light .np i, body.theme-light .sq { background: #dfe4ec; }
body.theme-light input.switch { background: #c3cad6; }
body.theme-light input.switch:checked { background: #3b82f6; }
body.theme-light .g-prog { background: #e6ecf5; border-left-color: #f2f4f8; }
body.theme-light .g-prog:hover { background: #d7e2f1; }
body.theme-light .chart-tip { background: #ffffffee; }
body.theme-light .srv-table tr:nth-child(even) td { background: rgba(15,23,42,.025); }
body.theme-light .ord-row:hover { background: rgba(15,23,42,.04); }
body.theme-light .scard.off .scard-h { background: #fde8ec; }
body.theme-light .info-box { color: #0f766e; }
body.theme-light .pill2.bad, body.theme-light .dd-menu a.danger { color: #b91c1c; }
body.theme-light .lg-tabs a:hover { background: rgba(15,23,42,.06); }
body.theme-light .tile { background: linear-gradient(180deg, #ffffff, #f6f8fb); }
body.theme-light .tile:hover { border-color: #b8c3d4; }
body.theme-light .scard-h { background: linear-gradient(180deg, #ffffff, #f1f4f8); }
.user-chip .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; margin-left: 4px; opacity: .8; }
.user-dd .dd-menu a { padding: 8px 14px; }
/* Cache-Seite */
.cache-page { margin-bottom: 18px; }
.cache-bar { height: 10px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-top: 6px; }
.cache-bar i { display: block; height: 100%; background: repeating-linear-gradient(45deg, #14b8a6, #14b8a6 8px, #0d9488 8px, #0d9488 16px); }
.cache-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.cache-tabs button { border: 0; padding: 13px; background: var(--panel-2); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.cache-tabs button.active { background: var(--accent); color: #fff; }
.cache-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px 16px; align-items: center; background: var(--panel-2); border-radius: 8px; padding: 14px 16px; margin: 6px 0 10px; }
.cache-grid > span { color: var(--muted); text-align: center; }
.cache-grid > div { text-align: center; }
.cache-grid select { max-width: 200px; }
.cache-pill { display: inline-block; min-width: 130px; padding: 5px 12px; border-radius: 4px; background: #2563eb; color: #fff; font-variant-numeric: tabular-nums; font-size: 13px; }
.btn.danger-solid { background: #dc2626; border-color: #dc2626; color: #fff; }
.cache-foot { display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) { .cache-grid { grid-template-columns: 1fr 1fr; } }
.plex-tabs { grid-template-columns: repeat(3, 1fr); }
.plex-genres td { vertical-align: middle; }
.plex-genres select { min-width: 220px; }
.gmap-intro { margin: 0 0 4px; }
.gmap { display: flex; flex-direction: column; }
.gmap-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 90px minmax(0, 1fr); gap: 14px 22px; align-items: center; padding: 14px 10px; border-left: 3px solid transparent; }
.gmap-row.gmap-on { border-left-color: #2563eb; }
.gmap-row .xf-label { margin: 0; display: block; }
.gmap-row .gcount { display: block; font-weight: 400; margin-top: 2px; }
.gmap-row details.bqdrop { min-width: 0; }
.gmap-row details.bqdrop > summary { max-width: none; }
@media (max-width: 760px) { .gmap-row { grid-template-columns: 1fr; gap: 6px; } .gmap-row > .xf-label:nth-of-type(2) { display: none; } }
.gseen { color: #22c55e; font-size: 10px; cursor: help; }
details.bqdrop { position: relative; min-width: 240px; }
details.bqdrop > summary { list-style: none; cursor: pointer; padding: 7px 28px 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; position: relative; }
details.bqdrop > summary::-webkit-details-marker { display: none; }
details.bqdrop > summary::after { content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.bqdrop-list { position: absolute; z-index: 30; left: 0; top: calc(100% + 4px); min-width: 100%; max-height: 260px; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.35); padding: 6px; }
.bqdrop-list label { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.bqdrop-list label { justify-content: flex-start; text-align: left; color: var(--text); }
.bqdrop-list input[type=checkbox] { width: 16px; height: 16px; flex: none; margin: 0; padding: 0; box-shadow: none; }
.bqdrop-list label:hover { background: var(--panel-2); }
.hint.warn { color: #f59e0b; }

/* Marke X-ON */
.logo-img { width: 40px; height: 40px; flex: none; border-radius: 50%; filter: drop-shadow(0 0 6px rgba(56,140,255,.55)); }
.brand.big .logo-img { width: 56px; height: 56px; }
.brand-name { font-weight: 800; letter-spacing: 1.5px; }
.hdr-top .brand { font-size: 22px; gap: 12px; }
.brand.big { font-size: 26px; gap: 14px; }
@media (max-width: 760px) { .hdr-top { min-height: 0; padding: 10px 16px; } .logo-img { width: 32px; height: 32px; } .hdr-top .brand { font-size: 19px; } }

/* Wortmarke X-ON (Kopfleiste: X blau, ON weiß) */
.hdr-top .brand.xon { display: inline-flex; align-items: baseline; gap: 2px; font-size: 34px; line-height: 1; letter-spacing: 0; }
.brand.xon b { font-weight: 900; background: linear-gradient(160deg, #6fd0ff, #1e7bff 70%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.brand.xon span { font-weight: 300; color: #fff; font-size: .78em; letter-spacing: 1px; }
/* Anmeldung (blauer Hintergrund, großes X mit kleinem ON in der Ecke) */
.login { position: relative; overflow: hidden; background: linear-gradient(160deg, #1d6fa5 0%, #155b8f 45%, #0d3f73 100%); }
.login-bg { position: absolute; inset: 0; pointer-events: none; }
.login-bg::before, .login-bg::after { content: ''; position: absolute; background: rgba(255,255,255,.05); }
.login-bg::before { left: 7%; top: -10%; width: 55%; height: 40%; transform: skewY(-12deg); }
.login-bg::after { left: -10%; bottom: -15%; width: 50%; height: 45%; transform: skewY(10deg); }
.login-bg i { position: absolute; background: rgba(255,255,255,.08); border-radius: 6px; animation: lgfloat 14s ease-in-out infinite alternate; }
.login-bg i:nth-child(1) { width: 60px; height: 60px; left: 53%; top: 16%; }
.login-bg i:nth-child(2) { width: 104px; height: 104px; left: 64%; top: 33%; animation-delay: -4s; }
.login-bg i:nth-child(3) { width: 64px; height: 64px; left: 80%; top: 12%; animation-delay: -7s; }
.login-bg i:nth-child(4) { width: 84px; height: 84px; left: 92%; top: 58%; animation-delay: -2s; }
.login-bg i:nth-child(5) { width: 48px; height: 48px; left: 70%; top: 70%; animation-delay: -9s; }
.login-bg i:nth-child(6) { width: 110px; height: 110px; left: 57%; top: 84%; animation-delay: -5s; }
.login-bg i:nth-child(7) { width: 70px; height: 70px; left: 12%; top: 62%; animation-delay: -11s; }
@keyframes lgfloat { from { transform: translateY(0) rotate(0); } to { transform: translateY(-18px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .login-bg i { animation: none; } }
.login-wrap { position: relative; width: 100%; max-width: 450px; display: grid; gap: 24px; }
.xon-big { justify-self: center; position: relative; font-weight: 900; font-size: 110px; line-height: .85; color: #fff; letter-spacing: -2px; padding-right: 46px; text-shadow: 0 4px 18px rgba(0,0,0,.18); user-select: none; }
.xon-big span { position: absolute; right: 0; top: 2px; font-size: 26px; font-weight: 300; letter-spacing: 1px; }
.login .login-card { max-width: none; background: #3c4250; border: 0; border-radius: 2px; padding: 34px 36px 30px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.login .login-card label { color: #e5e7eb; font-weight: 600; font-size: 13px; }
.login .login-card input { background: #fff; color: #111827; border: 1px solid #d1d5db; border-radius: 0; }
.login-btn { height: 50px; border: 0; border-radius: 0; cursor: pointer; color: #fff; font-size: 13px; letter-spacing: .5px; background: linear-gradient(90deg, #3a9bb0 0%, #2b7fa8 55%, #0a3d86 100%); box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: filter .15s; }
.login-btn:hover { filter: brightness(1.1); }
.login-btn:disabled { filter: grayscale(.4); cursor: wait; }
.login-lang { justify-self: center; width: auto; margin-top: 4px; background: transparent; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.25); border-radius: 2px; padding: 5px 8px; font: inherit; font-size: 12px; }
.login-lang option { background: #3c4250; color: #eceef2; }
@media (max-width: 760px) { .hdr-top .brand.xon { font-size: 28px; } .xon-big { font-size: 84px; padding-right: 36px; } .xon-big span { font-size: 20px; } .login .login-card { padding: 24px 20px; } }
.login .error:empty { display: none; }

/* ===================== Aussehen wie XUI (Standard-Design) ===================== */
:root {
  --bg: #2d3139; --panel: #383d47; --panel-2: #3f4450; --line: #4a505c; --text: #eceef2; --muted: #a9b0bd;
  --accent: #2f7de1; --accent-2: #1f6ad0; --radius: 3px; --menu-bg: #3a3f49; --row: #3e434e; --input: #474c57;
  --xui-w: 1680px; --xui-pad: max(24px, calc((100vw - var(--xui-w)) / 2));
}
body:not(.theme-light) { font-size: 13px; }
/* Kopfleiste: Türkis -> Blau, Inhalt auf gleicher Breite wie die Seite */
body:not(.theme-light):not([data-topbar]) .hdr-top, body:not(.theme-light)[data-topbar=default] .hdr-top { background: linear-gradient(90deg, #3d93ab 0%, #2f84b0 40%, #1c69b0 72%, #0b4ea2 100%); }
.hdr-top { padding-left: var(--xui-pad); padding-right: var(--xui-pad); border-bottom: 0; }
.nav { padding-left: calc(var(--xui-pad) - 14px); padding-right: var(--xui-pad); }
body:not(.theme-light) .nav { background: #3a3e47; border-bottom: 0; }
body:not(.theme-light) .nav > a, body:not(.theme-light) .nav-btn { color: #e3e6eb; padding-top: 16px; padding-bottom: 16px; }
.nav > a.active, .nav-group.active .nav-btn { border-bottom-color: transparent !important; font-weight: 500; position: relative; }
.nav > a.active::after, .nav-group.active > .nav-btn::after { content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); border: 7px solid transparent; border-bottom-color: var(--bg); }
main { max-width: none; }
#view, .page-head { padding-left: var(--xui-pad); padding-right: var(--xui-pad); }
.page-head h1 { font-size: 19px; font-weight: 500; }
/* Live-Werte oben: kleine dunkle Kästchen wie XUI */
body:not(.theme-light) .pill { border-radius: 2px; background: rgba(4,30,64,.30); border-color: transparent; padding: 4px 9px; }
body:not(.theme-light) .pill b { background: rgba(4,30,64,.45); padding: 1px 6px; border-radius: 2px; }
body:not(.theme-light) .pill.alert { background: rgba(190,40,40,.55); }
body:not(.theme-light) .gsearch input { background: rgba(255,255,255,.16); border-color: transparent; border-radius: 2px; color: #fff; }
body:not(.theme-light) .gsearch input::placeholder { color: rgba(255,255,255,.75); }
/* Flächen, Knöpfe, Felder: eckiger und heller wie XUI */
body:not(.theme-light) .panel, body:not(.theme-light) .scard { border: 0; border-radius: 3px; }
body:not(.theme-light) .btn { border-radius: 2px; }
body:not(.theme-light) .btn.primary { background: var(--accent-2); border-color: var(--accent-2); }
body:not(.theme-light) input, body:not(.theme-light) select, body:not(.theme-light) textarea { background: var(--input); border-color: transparent; border-radius: 2px; }
body:not(.theme-light) input:focus, body:not(.theme-light) select:focus, body:not(.theme-light) textarea:focus { border-color: #5b8fd6; outline: none; }
/* Tabellen: jede Zeile ein eigener Block mit Abstand wie XUI */
body:not(.theme-light) .panel table, body:not(.theme-light) .table-wrap table { border-collapse: separate; border-spacing: 0 7px; padding: 0 14px; }
body:not(.theme-light) .panel th, body:not(.theme-light) .table-wrap th { background: none; color: #dfe3ea; font-weight: 500; border-bottom: 0; padding-top: 14px; }
body:not(.theme-light) .panel td, body:not(.theme-light) .table-wrap td { background: var(--row); border-bottom: 0; }
body:not(.theme-light) .panel tr:hover td, body:not(.theme-light) .table-wrap tr:hover td { background: #444a56; }
/* Dashboard-Kacheln: schräge helle Fläche wie XUI */
body:not(.theme-light) .tile { border: 0; border-radius: 2px; background: linear-gradient(166deg, rgba(255,255,255,.07) 0 34%, transparent 34.2%), #3a3f49; }
body:not(.theme-light) .tile .ico { border-radius: 2px; background: rgba(0,0,0,.16) !important; color: #fff !important; }
body:not(.theme-light) .tile .num b { font-weight: 500; }
body:not(.theme-light) .tile .num span { color: #e3e6eb; }
body:not(.theme-light) .scard-h { background: var(--panel-2); }
body:not(.theme-light) .pill2, body:not(.theme-light) .codec-tag { background: #2f333b; }
/* Anmeldung: Felder hell wie XUI (auch beim automatischen Ausfüllen) */
.login { color-scheme: light; }
.login .login-card input { background: #fff; border-color: transparent; }
.login .login-card input:autofill { background: #fffbd6; }
.login-bg i { background: rgba(255,255,255,.12); }

/* Breite wie XUI: Rand wächst mit dem Bildschirm (ca. 6 % links und rechts) */
:root { --xui-pad: max(16px, 6.2vw); }
/* Leicht durchsichtige Flächen über einem ruhigen Hintergrund */
html, body:not(.theme-light) { background-color: #2b2f38; }
body:not(.theme-light)::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% 15%, rgba(47,125,225,.16), transparent 70%),
    radial-gradient(800px 600px at 10% 90%, rgba(61,147,171,.14), transparent 70%),
    linear-gradient(168deg, transparent 0 22%, rgba(255,255,255,.035) 22% 46%, transparent 46%),
    linear-gradient(12deg, transparent 0 60%, rgba(255,255,255,.03) 60% 78%, transparent 78%),
    linear-gradient(160deg, #323844 0%, #2b2f38 45%, #262a32 100%); }
body:not(.theme-light) .nav { background: rgba(58,62,71,.82); backdrop-filter: blur(10px); }
/* ohne backdrop-filter: der würde Aktions-Menüs (position: fixed) in Tabellen falsch platzieren */
body:not(.theme-light) .panel, body:not(.theme-light) .scard { background: rgba(56,61,71,.8); }
body:not(.theme-light) .tile { background: linear-gradient(166deg, rgba(255,255,255,.07) 0 34%, transparent 34.2%), rgba(58,63,73,.72); backdrop-filter: blur(10px); }
body:not(.theme-light) { --row: rgba(66,72,84,.72); }
body:not(.theme-light) .panel tr:hover td, body:not(.theme-light) .table-wrap tr:hover td { background: rgba(78,85,99,.8); }
body:not(.theme-light) .dd-menu, body:not(.theme-light) .nav-menu, body:not(.theme-light) .nav-submenu { background: rgba(58,63,73,.94); backdrop-filter: blur(12px); }
body:not(.theme-light) .scard.off .scard-h { background: rgba(150,45,55,.28); }
body:not(.theme-light) .scard-h { background: rgba(72,78,90,.6); }

/* X wie XUI: dickes und dünnes schräges Band */
.brand.xon { align-items: center; gap: 3px; }
.brand.xon .xmark { width: 38px; height: 36px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.brand.xon span { font-size: 28px; line-height: 1; margin-top: 2px; }
.xon-big { display: flex; align-items: flex-start; font-size: 0; padding-right: 0; gap: 2px; }
.xon-big .xmark { width: 92px; height: 92px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.18)); }
.xon-big span { position: static; font-size: 26px; margin-top: 0; }
@media (max-width: 760px) { .brand.xon .xmark { width: 28px; height: 28px; } .brand.xon span { font-size: 23px; } .xon-big .xmark { width: 72px; height: 72px; } }

/* Tabellen (Filme, Streams, Serien …): kleinere Schrift wie XUI */
body:not(.theme-light) .srv-table td { font-size: 12px; }
body:not(.theme-light) .srv-table th { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
body:not(.theme-light) .srv-table .st-name { font-size: 12.5px; font-weight: 600; color: #eef0f4; text-decoration: none; }
body:not(.theme-light) .srv-table .st-name:hover { color: #7cc0ff; }
body:not(.theme-light) .srv-table .small, body:not(.theme-light) .srv-table .muted.small { font-size: 11.5px; }
body:not(.theme-light) .mv-sub { font-size: 11.5px; }
body:not(.theme-light) .mv-sub b { font-weight: 600; }
body:not(.theme-light) .stars { font-size: 10.5px; }
body:not(.theme-light) .mv-cover { width: 34px; height: 48px; border-radius: 2px; }
body:not(.theme-light) .mv-kbps, body:not(.theme-light) .mv-i { font-size: 11.5px; }
body:not(.theme-light) .mv-i svg { width: 13px; height: 13px; }
body:not(.theme-light) .srv-table td .pill2 { font-size: 11.5px; padding: 2px 8px; }

/* Anmeldung: Schrift wie XUI (klein, nicht fett) */
.login .login-card { gap: 18px; }
.login .login-card label { font-size: 13px; font-weight: 500; color: #d7dbe2; gap: 8px; }
.login .login-card input { font-size: 13px; font-weight: 400; height: 36px; padding: 6px 14px; color: #222; }
.login-btn { font-family: inherit; font-size: 12.5px; font-weight: 500; letter-spacing: .3px; }
.xon-big .xmark { filter: drop-shadow(0 3px 10px rgba(0,0,0,.25)); }

/* Anmeldung: Logo sehr durchsichtig in den schwebenden Quadraten */
.login-bg i::after { content: ''; position: absolute; inset: 14%; background: url(logo-glow.svg) center / contain no-repeat; opacity: .06; }

html:has(body.theme-light) { background-color: var(--bg); }
/* Eigene Farbe der Kopfleiste (Mein Profil): eine Farbe ohne Verlauf – wie links */
body[data-topbar]:not([data-topbar=default]) .hdr-top { background: var(--hdr-a); }
/* Server-Karten im Dashboard: gleich breit wie die Diagramme darüber (2 Spalten) */
.srv-cards { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .srv-cards { grid-template-columns: 1fr; } }

/* Prozess-Monitor grafisch */
.pm-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.pm-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--panel); border-radius: var(--radius); }
body:not(.theme-light) .pm-card { background: linear-gradient(166deg, rgba(255,255,255,.06) 0 34%, transparent 34.2%), rgba(58,63,73,.72); backdrop-filter: blur(10px); border-radius: 2px; }
.pm-ring { width: 84px; height: 84px; flex: none; }
.pm-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.pm-ring .pm-bg { stroke: rgba(0,0,0,.22); }
.pm-ring text { fill: var(--text); stroke: none; font-size: 17px; font-weight: 600; font-family: inherit; }
.pm-txt { min-width: 0; }
.pm-txt .k { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.pm-txt .v { font-size: 20px; font-weight: 600; margin: 3px 0 2px; white-space: nowrap; }
.pm-txt .s { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-bars { padding-bottom: 10px; margin-bottom: 16px; }
.pm-bar { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 70px 70px; gap: 14px; align-items: center; padding: 7px 18px; font-size: 12.5px; }
.pm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pm-name small { color: var(--muted); font-weight: 400; margin-left: 8px; }
.pm-track { height: 8px; border-radius: 4px; background: rgba(0,0,0,.25); overflow: hidden; }
.pm-track i { display: block; height: 100%; border-radius: 4px; transition: width .6s ease; }
.pm-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.pm-bar .muted { text-align: right; }
@media (max-width: 1200px) { .pm-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .pm-cards { grid-template-columns: 1fr; } .pm-bar { grid-template-columns: 1fr 60px; } .pm-track, .pm-bar .muted { display: none; } }

/* Haken-Kästchen hell und kräftig wie XUI (Filme, Lines, Benutzer …) */
body:not(.theme-light) .ico { border-radius: 2px; width: 26px; height: 26px; }
body:not(.theme-light) .ico.ok { background: #24b263; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
body:not(.theme-light) .ico.warn { background: #f0a020; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
body:not(.theme-light) .ico.bad { background: #e5484d; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
body:not(.theme-light) .ico.no { color: #9aa3b2; }
body:not(.theme-light) .ico.ok svg, body:not(.theme-light) .ico.warn svg, body:not(.theme-light) .ico.bad svg { stroke-width: 3; }

/* Filme-Liste: Schrift wie XUI */
body:not(.theme-light) .t-movies td { font-size: 11px; }
body:not(.theme-light) .t-movies th { font-size: 11px; }
body:not(.theme-light) .t-movies .st-name { font-size: 12px; font-weight: 600; color: #e4e7ec; }
body:not(.theme-light) .t-movies .mv-sub { font-size: 10.5px; margin-top: 3px; }
body:not(.theme-light) .t-movies .mv-sub b { font-weight: 600; }
body:not(.theme-light) .t-movies .stars { font-size: 9.5px; }
body:not(.theme-light) .t-movies .muted.small { font-size: 10.5px; color: #b4bbc7; margin-top: 2px; letter-spacing: .1px; }
body:not(.theme-light) .t-movies td.muted.small { text-transform: uppercase; color: #c3c9d3; }
body:not(.theme-light) .t-movies .mv-kbps { font-size: 10.5px; min-width: 84px; }
body:not(.theme-light) .t-movies .mv-kbps b { font-weight: 400; color: #e4e7ec; }
body:not(.theme-light) .t-movies .mv-i { font-size: 10.5px; min-width: 40px; }
body:not(.theme-light) .t-movies .mv-i svg { width: 12px; height: 12px; stroke: #22c3a6; }
body:not(.theme-light) .t-movies .mv-info { gap: 14px; }
body:not(.theme-light) .t-movies td { padding-top: 8px; padding-bottom: 8px; }

/* Namen in Listen nicht fett, sondern mittel wie XUI (Poppins 500) */
body:not(.theme-light) .srv-table .st-name, body:not(.theme-light) .t-movies .st-name,
body:not(.theme-light) .srv-table td b, body:not(.theme-light) .srv-table td strong,
body:not(.theme-light) .panel table td b, body:not(.theme-light) .table-wrap td b,
body:not(.theme-light) .mv-sub b { font-weight: 500; }
body:not(.theme-light) .srv-table th, body:not(.theme-light) .panel th, body:not(.theme-light) .table-wrap th { font-weight: 500; }

/* Knöpfe oben rechts wie XUI: Hinzufügen · Filter · Neu laden · Menü */
.xui-acts { display: inline-flex; align-items: stretch; gap: 0; }
.xui-acts > .btn, .xui-acts > .dd > .btn { border-radius: 0; margin: 0; }
.xui-acts > .btn.primary { border-radius: 2px 0 0 2px; }
.xui-acts .xa-ico { width: 38px; padding: 0; display: grid; place-items: center; background: #3a3f49; border-color: #3a3f49; color: #e6e9ef; }
.xui-acts .xa-ico:hover { background: #474d58; }
.xui-acts .xa-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xui-acts .xa-red { background: #b84a5c; border-color: #b84a5c; }
.xui-acts .xa-red:hover { background: #c95669; }
.xui-acts > .dd > .btn { border-radius: 0 2px 2px 0; height: 100%; }
.xui-acts .dd-menu { min-width: 210px; }

/* Fenster (Dialoge) mit dem gleichen Hintergrund wie das Dashboard: grau mit blauem/türkisem Schimmer und schrägen Flächen */
body:not(.theme-light) dialog:not(.player-mode) {
  border: 0; border-radius: 3px; box-shadow: 0 24px 70px rgba(0,0,0,.55);
  background:
    radial-gradient(700px 380px at 90% 0%, rgba(47,125,225,.18), transparent 70%),
    radial-gradient(600px 420px at 0% 100%, rgba(61,147,171,.16), transparent 70%),
    linear-gradient(168deg, transparent 0 22%, rgba(255,255,255,.035) 22% 46%, transparent 46%),
    linear-gradient(12deg, transparent 0 60%, rgba(255,255,255,.03) 60% 78%, transparent 78%),
    linear-gradient(160deg, #323844 0%, #2b2f38 45%, #262a32 100%);
}
body:not(.theme-light) dialog::backdrop { background: rgba(10,14,20,.55); }
/* Felder und Reiter im Fenster wie auf den Seiten */
body:not(.theme-light) dialog .form-tabs button { background: rgba(58,63,73,.8); }
body:not(.theme-light) dialog .form-tabs button.active { background: var(--accent-2); color: #fff; }

/* Fenster-Hintergrund auch in Firefox erzwingen (dort blieb der Dialog schwarz):
   Hintergrund direkt am Fenster und zusätzlich am Inhalt, mit fester Grundfarbe */
html body:not(.theme-light) #modal:not(.player-mode) {
  background-color: #2b2f38 !important;
  background-image:
    radial-gradient(700px 380px at 90% 0%, rgba(47,125,225,.18), transparent 70%),
    radial-gradient(600px 420px at 0% 100%, rgba(61,147,171,.16), transparent 70%),
    linear-gradient(168deg, transparent 0 22%, rgba(255,255,255,.035) 22% 46%, transparent 46%),
    linear-gradient(12deg, transparent 0 60%, rgba(255,255,255,.03) 60% 78%, transparent 78%),
    linear-gradient(160deg, #323844 0%, #2b2f38 45%, #262a32 100%) !important;
  color-scheme: dark;
}
html body:not(.theme-light) #modal:not(.player-mode) > #modalForm { background: transparent !important; }

/* Panel-Update */
.upd-panel .body { display: grid; gap: 16px; padding: 22px 24px; }
.upd-ver { display: flex; align-items: center; gap: 28px; }
.upd-ver > div { display: grid; gap: 2px; }
.upd-ver b { font-size: 22px; font-weight: 600; }
.upd-arrow { font-size: 26px; color: var(--muted); }
.upd-btns { display: flex; gap: 10px; }
.upd-drop { display: grid; justify-items: center; gap: 10px; padding: 34px 20px; border: 2px dashed rgba(255,255,255,.18); border-radius: 4px; text-align: center; transition: border-color .15s, background .15s; }
.upd-drop.over { border-color: #3aa0ff; background: rgba(58,160,255,.08); }
.upd-ico { font-size: 34px; line-height: 1; color: #5cc4ff; }
.upd-wait { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(10,14,20,.75); }
.upd-wait > div { display: grid; justify-items: center; gap: 10px; padding: 28px 36px; background: #2f343e; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.upd-wait .spin { width: 30px; height: 30px; border: 3px solid #3aa0ff; border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; }
.upd-wait span { color: var(--muted); max-width: 360px; text-align: center; }
.upd-online { display: grid; gap: 12px; padding: 16px 18px; background: rgba(0,0,0,.14); border-radius: 3px; }
.upd-oh { display: flex; align-items: center; gap: 12px; }
.upd-oh .grow { flex: 1; }
.upd-avail { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; padding: 12px 14px; border-left: 3px solid #24b263; background: rgba(36,178,99,.08); }
.upd-notes { margin: 8px 0 0; max-height: 180px; overflow: auto; white-space: pre-wrap; font: inherit; font-size: 12px; color: var(--muted); }
.upd-src { display: grid; grid-template-columns: 1.4fr 1fr auto auto; gap: 12px; align-items: end; }
.upd-src label.check { align-self: center; white-space: nowrap; }
.upd-src.upd-src2 { grid-template-columns: 1.6fr 1fr auto; }
@media (max-width: 900px) { .upd-src, .upd-src.upd-src2 { grid-template-columns: 1fr; } }
.upd-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px; background: #24b263; color: #fff; font-size: 11px; font-weight: 600; }
.user-chip.has-update::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #24b263; margin-left: 6px; box-shadow: 0 0 0 2px rgba(36,178,99,.3); }
/* Von XUI übernehmen */
.xi-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.xi-t { display: grid; gap: 2px; padding: 12px 14px; background: rgba(0,0,0,.16); border-radius: 3px; }
.xi-t b { font-size: 20px; font-weight: 600; }
.xi-t span { color: var(--muted); font-size: 12px; }
.xi-sec { display: grid; gap: 8px; padding: 14px 16px; background: rgba(0,0,0,.12); border-radius: 3px; }
.xi-row { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 12px; align-items: end; }
.xi-danger { color: #fca5a5; }
@media (max-width: 900px) { .xi-tiles { grid-template-columns: repeat(2, 1fr); } .xi-row { grid-template-columns: 1fr; } }
.xi-vod { margin-top: 10px; align-items: flex-start; } .xi-vodrow { margin-top: 6px; grid-template-columns: 1fr; }

/* Statistik */
.st-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.st-tiles .panel { margin: 0; }
.st-bars { display: flex; align-items: flex-end; gap: 3px; height: 200px; padding: 14px 18px 26px; }
.st-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 4px; }
.st-bar i { display: block; background: linear-gradient(#38bdf8, #1e6fd9); border-radius: 3px 3px 0 0; }
.st-bar span { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.st-heat { display: grid; grid-template-columns: 26px repeat(24, 1fr); gap: 3px; align-items: center; }
.st-heat i { display: block; aspect-ratio: 1; border-radius: 3px; background: #14b8a6; }
.st-kbar { height: 8px; background: var(--panel-2, #2a2f3a); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.st-kbar i { display: block; height: 100%; background: #a78bfa; }
@media (max-width: 760px) { .st-tiles { grid-template-columns: 1fr 1fr; } .st-bar span { display: none; } }
