/* DIS – Verwaltung im Stil von SAP Fiori (Horizon). Keine SAP-Logos/Marken – nur Gestaltungssprache. */
:root {
  --bg: #f5f6f7; --panel: #ffffff; --panel2: #f5f6f7; --line: #e5e5e5; --line2: #c2cad3;
  --text: #1d2d3e; --muted: #556b82; --accent: #0070f2; --accent2: #0064d9; --accentBg: #ebf8ff; --accentLine: #b3d9ff;
  --ok: #256f3a; --okBg: #f5fae5; --okLine: #8fc19d; --warn: #b44f00; --warnBg: #fff8d6; --warnLine: #f5b04d; --bad: #aa0808; --badBg: #ffeaf4; --badLine: #f17b8a;
  --info: #0070f2; --infoBg: #e1f4ff;
  --shell: #ffffff; --shellText: #1d2d3e; --shellLine: #d9d9d9;
  --field: #ffffff; --fieldLine: #556b81; --fieldHover: #0064d9;
  --r: 12px; --rs: 8px; --shadow: 0 0 2px rgba(34,53,72,.16), 0 2px 8px rgba(34,53,72,.10); --shadowHover: 0 0 2px rgba(34,53,72,.2), 0 8px 18px rgba(34,53,72,.16);
  --font: "72", "72full", "Segoe UI", Arial, Helvetica, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12171c; --panel: #1d232a; --panel2: #161b21; --line: #2c3742; --line2: #4e5d6c;
  --text: #eaecee; --muted: #a9b4be; --accent: #4db1ff; --accent2: #78c3ff; --accentBg: #12304a; --accentLine: #1d5384;
  --ok: #6bd3a0; --okBg: #12291f; --okLine: #2c6b4b; --warn: #ffb24d; --warnBg: #2e2410; --warnLine: #7a5a1c; --bad: #ff8888; --badBg: #3a1515; --badLine: #7a2d2d;
  --info: #4db1ff; --infoBg: #12304a;
  --shell: #12171c; --shellText: #eaecee; --shellLine: #2c3742; --field: #1d232a; --fieldLine: #8396a8;
  --shadow: 0 0 2px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.4); --shadowHover: 0 0 2px rgba(0,0,0,.6), 0 8px 18px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.42 var(--font); }
a { color: var(--accent2); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 21px; margin: 0; font-weight: 700; } h2 { font-size: 16px; margin: 0 0 12px; font-weight: 700; } h3 { font-size: 14px; margin: 0 0 8px; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(160deg, #e8f2ff 0%, #f5f6f7 45%, #eef1f4 100%); }
:root[data-theme="dark"] .login { background: linear-gradient(160deg, #0d2033 0%, #12171c 60%); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 16px; padding: 32px 32px 26px; box-shadow: var(--shadowHover); }
.login-card .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 14px; }
.login-card .brand .logo-sq { width: 36px; height: 36px; font-size: 13px; }
.login-card h1 { margin: 20px 0 4px; font-size: 24px; }
.login-card .sub { color: var(--muted); margin-bottom: 20px; }
.login-card .btn { width: 100%; justify-content: center; height: 40px; font-size: 15px; }
.err { background: var(--badBg); color: var(--bad); border: 1px solid var(--badLine); border-left-width: 4px; padding: 9px 12px; border-radius: var(--rs); margin-bottom: 12px; }
.logo-sq { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #0070f2, #0040b0); color: #fff; font-weight: 800; letter-spacing: .02em; font-size: 12px; flex: none; }

/* ---------- Shellbar ---------- */
.shellbar { position: sticky; top: 0; z-index: 40; height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--shell); color: var(--shellText); border-bottom: 1px solid var(--shellLine); box-shadow: 0 1px 3px rgba(34,53,72,.06); }
.shellbar .home { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 2px; border-radius: 8px; color: inherit; font-weight: 700; font-size: 15px; }
.shellbar .home:hover { background: var(--panel2); text-decoration: none; }
.shellbar .apptitle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; font-size: 15px; padding: 6px 10px; border-radius: 8px; cursor: pointer; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shellbar .apptitle:hover { background: var(--panel2); }
.shellbar .apptitle::after { content: '▾'; font-size: 11px; color: var(--muted); }
.shellbar .sp { flex: 1; }
.shell-search { position: relative; width: min(420px, 38vw); }
.shell-search input { height: 34px; border-radius: 18px; padding-left: 34px; background: var(--panel2); border-color: transparent; }
.shell-search input:focus { background: var(--panel); border-color: var(--accent); }
.shell-search::before { content: '⌕'; position: absolute; left: 12px; top: 6px; color: var(--muted); font-size: 16px; pointer-events: none; }
.sh-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--shellText); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.sh-btn:hover { background: var(--panel2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #5d36ff; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: 0; cursor: pointer; }
.avatar.super { background: #d20a0a; }
.conn { font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--muted); padding: 0 6px; white-space: nowrap; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.conn.on i { background: #30914c; box-shadow: 0 0 0 3px rgba(48,145,76,.18); }
@media (max-width: 860px) { .shell-search { display: none; } .conn span { display: none; } .shellbar .home b { display: none; } }

/* Popover / Menüs */
.popover { position: fixed; z-index: 120; background: var(--panel); border-radius: 12px; box-shadow: 0 10px 40px rgba(34,53,72,.25), 0 0 2px rgba(34,53,72,.3); padding: 6px; min-width: 240px; max-height: 80vh; overflow-y: auto; }
.popover .pop-h { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.popover .grp { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 10px 12px 4px; }
.popover .mi { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--text); }
.popover .mi:hover, .popover .mi.on { background: var(--accentBg); text-decoration: none; }
.popover .mi .ic { width: 22px; text-align: center; }
.popover .mi .code { margin-left: auto; font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }

/* ---------- Seitenaufbau (Dynamic Page / Object Page) ---------- */
.content { padding: 0 0 80px; }
.page-head { background: var(--panel); padding: 14px 32px 16px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(34,53,72,.05); }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--accent2); }
.crumbs span.sep { color: var(--line2); }
.page-head .row1 { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 220px; }
.page-head h1 { font-size: 21px; line-height: 1.25; }
.page-head .subtitle { color: var(--muted); margin-top: 2px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-head .attrs { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 14px; }
.page-head .attr .k { font-size: 12px; color: var(--muted); } .page-head .attr .v { font-weight: 700; margin-top: 2px; }
.page-body { padding: 18px 32px; max-width: 1600px; }
.page-head + .tabs { padding: 0 32px; background: var(--panel); margin: 0; border-bottom: 1px solid var(--line); }
.page-head + .tabs + .page-body { padding-top: 18px; }
@media (max-width: 760px) { .page-head { padding: 12px 16px; } .page-body { padding: 14px 16px; } .page-head + .tabs { padding: 0 8px; } }
.content > .card-h, .content > div > .card-h { padding: 14px 32px 0; }

/* ---------- Launchpad ---------- */
.lp { padding: 22px 32px 40px; max-width: 1600px; }
.lp-hello { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.lp-hello h1 { font-size: 24px; } .lp-hello .muted { font-size: 14px; }
.lp-group { margin-top: 26px; }
.lp-group > h2 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.lp-group > h2 .badge { font-weight: 600; }
.tiles { display: flex; flex-wrap: wrap; gap: 16px; }
.tile { width: 176px; height: 176px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; color: var(--text); position: relative; cursor: pointer; transition: box-shadow .15s, transform .15s; text-decoration: none !important; border: 1px solid transparent; }
.tile:hover { box-shadow: var(--shadowHover); transform: translateY(-1px); }
.tile:focus-visible { outline: 2px solid var(--accent); }
.tile .t-title { font-weight: 700; font-size: 15px; line-height: 1.25; padding-right: 26px; }
.tile .t-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.3; }
.tile .t-ic { position: absolute; top: 14px; right: 14px; font-size: 20px; opacity: .85; }
.tile .t-kpi { margin-top: auto; display: flex; align-items: baseline; gap: 6px; }
.tile .t-kpi b { font-size: 32px; font-weight: 300; color: var(--accent2); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile .t-kpi b.good { color: var(--ok); } .tile .t-kpi b.crit { color: var(--warn); } .tile .t-kpi b.bad { color: var(--bad); }
.tile .t-kpi span { color: var(--muted); font-size: 12px; }
.tile .t-foot { color: var(--muted); font-size: 11.5px; margin-top: 6px; display: flex; justify-content: space-between; gap: 6px; }
.tile .t-foot code { font-family: ui-monospace, monospace; }
.tile.wide { width: 368px; }
.tile.sys { border-color: #f5c2c2; } :root[data-theme="dark"] .tile.sys { border-color: #5a2a2a; }

/* ---------- Karten / Abschnitte ---------- */
.card { background: var(--panel); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2 { margin: 0; } .card-h .sp { flex: 1; }
.section-title { font-size: 16px; font-weight: 700; margin: 24px 0 10px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1150px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
/* KPI-Kopf (Object Page Header KPIs) */
.stat { background: var(--panel); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); border-left: 4px solid var(--c, var(--accent)); }
.stat .l { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 28px; font-weight: 300; font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.15; color: var(--text); }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--rs); border: 1px solid var(--accentLine); background: var(--infoBg); margin-bottom: 14px; }
.msg::before { content: 'ℹ'; font-weight: 700; color: var(--info); }
.msg.warn { border-color: var(--warnLine); background: var(--warnBg); } .msg.warn::before { content: '⚠'; color: var(--warn); }
.msg.bad { border-color: var(--badLine); background: var(--badBg); } .msg.bad::before { content: '⛔'; color: var(--bad); }
.msg.ok { border-color: var(--okLine); background: var(--okBg); } .msg.ok::before { content: '✔'; color: var(--ok); }

/* ---------- Buttons (Fiori: emphasized / default / transparent) ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; border: 1px solid var(--line2); background: var(--panel); color: var(--accent2); padding: 0 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--accentBg); border-color: var(--accent2); }
.btn:active { background: var(--accent2); color: #fff; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.pri:hover { background: var(--accent2); border-color: var(--accent2); }
.btn.danger { color: var(--bad); border-color: var(--badLine); } .btn.danger:hover { background: var(--badBg); border-color: var(--bad); }
.btn.pri.danger { background: #d20a0a; border-color: #d20a0a; color: #fff; }
.btn.ok { color: var(--ok); border-color: var(--okLine); } .btn.ok:hover { background: var(--okBg); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--accentBg); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; background: var(--panel); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg-btns { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg-btns button { border: 0; background: var(--panel); color: var(--accent2); padding: 0 12px; height: 34px; font: inherit; font-weight: 600; cursor: pointer; }
.seg-btns button + button { border-left: 1px solid var(--line2); }
.seg-btns button.on { background: var(--accentBg); color: var(--accent2); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Eingabefelder ---------- */
input, select, textarea { font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--fieldLine); border-radius: 6px; padding: 0 10px; height: 36px; width: 100%; }
textarea { height: auto; min-height: 90px; padding: 8px 10px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--fieldHover); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input:disabled, select:disabled, textarea:disabled { background: var(--panel2); color: var(--muted); border-color: var(--line); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
input[type=color] { padding: 2px; height: 34px; width: 46px; }
input[type=range] { height: auto; border: 0; }
.f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.f > label, .lbl { font-size: 13px; color: var(--muted); }
.f .hint { font-size: 12px; color: var(--muted); }
.chk { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 8px; }
.row { display: flex; gap: 12px; } .row > * { flex: 1; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.req::after { content: ' *'; color: var(--bad); }

/* ---------- Filterleiste & Tabellen (List Report) ---------- */
.filterbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; background: var(--panel); padding: 12px 32px 14px; border-bottom: 1px solid var(--line); }
.filterbar .fb { display: flex; flex-direction: column; gap: 3px; min-width: 180px; }
.filterbar .fb label { font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .filterbar { padding: 10px 16px; } }
.tbl-wrap { overflow-x: auto; background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); }
.tbl-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tbl-toolbar h2 { margin: 0; font-size: 15px; } .tbl-toolbar .sp { flex: 1; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 13px; font-weight: 700; color: var(--text); padding: 10px 14px; border-bottom: 1px solid var(--line2); background: var(--panel); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; height: 44px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--panel2); }
.tbl tr.sel td { background: var(--accentBg) !important; }
.tbl tr.nav td:last-child::after { content: '›'; float: right; color: var(--muted); font-size: 20px; line-height: 1; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl input { height: 32px; }
.tbl td .btns { flex-wrap: nowrap; }

/* Objektstatus (Fiori ObjectStatus) */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--okBg); color: var(--ok); border-color: var(--okLine); }
.badge.warn { background: var(--warnBg); color: var(--warn); border-color: var(--warnLine); }
.badge.bad { background: var(--badBg); color: var(--bad); border-color: var(--badLine); }
.badge.info { background: var(--infoBg); color: var(--info); border-color: var(--accentLine); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .ic { font-size: 40px; margin-bottom: 6px; opacity: .8; }
.card.empty { box-shadow: var(--shadow); }

/* IconTabBar */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 12px 14px 10px; text-decoration: none !important; color: var(--text); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; cursor: pointer; }
.tabs a:hover { color: var(--accent2); }
.tabs a.on { color: var(--accent2); border-color: var(--accent); }
.bar { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--ok); border-radius: 8px; }
.pill-set { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-set label { border: 1px solid var(--line2); padding: 4px 10px; border-radius: 16px; cursor: pointer; font-size: 13px; display: flex; gap: 6px; align-items: center; background: var(--panel); }
.pill-set label:has(input:checked) { background: var(--accentBg); border-color: var(--accent); color: var(--accent2); }
.kbd { font-family: ui-monospace, monospace; font-size: 11px; border: 1px solid var(--line2); border-bottom-width: 2px; padding: 0 5px; border-radius: 4px; background: var(--panel); }

/* Fußleiste (Object Page Footer) */
.footerbar { position: sticky; bottom: 0; z-index: 20; margin: 16px -32px -18px; padding: 10px 32px; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(34,53,72,.08); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footerbar .sp { flex: 1; }
@media (max-width: 760px) { .footerbar { margin: 16px -16px -14px; padding: 10px 16px; } }

/* ---------- Dialoge & Meldungen ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.38); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 12px; width: 100%; max-width: 560px; box-shadow: 0 16px 60px rgba(0,0,0,.3); overflow: hidden; }
.modal.wide { max-width: 860px; } .modal.xwide { max-width: 1240px; }
.modal-h { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); } .modal-h h2 { margin: 0; flex: 1; font-size: 16px; }
.modal-b { padding: 18px 20px; max-height: 70vh; overflow-y: auto; }
.modal-f { padding: 10px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: row-reverse; justify-content: flex-start; gap: 8px; background: var(--panel); }
#toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; max-width: min(520px, 90vw); }
.toast { background: rgba(29,45,62,.94); color: #fff; padding: 10px 18px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.3); animation: tin .18s ease-out; text-align: center; }
.toast.bad { background: #aa0808; } .toast.warn { background: #8a4a00; } .toast.ok { background: rgba(29,45,62,.94); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.secret { font-family: ui-monospace, monospace; font-size: 20px; font-weight: 700; background: var(--panel2); border: 1px dashed var(--line2); border-radius: 8px; padding: 12px; text-align: center; user-select: all; letter-spacing: .04em; }

/* ---------- Kolli-Eingabe ---------- */
.entry td input { width: 120px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.entry td input.changed { border-color: var(--warn); background: var(--warnBg); }
.entry .delta { font-size: 11.5px; color: var(--ok); } .entry .delta.neg { color: var(--bad); }
.day-cur td:first-child { box-shadow: inset 4px 0 0 var(--accent); }

/* ---------- Medien / Vorschauen ---------- */
.mini-preview { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.media-it { border-radius: 12px; overflow: hidden; background: var(--panel); cursor: pointer; position: relative; box-shadow: var(--shadow); }
.media-it:hover { box-shadow: var(--shadowHover); }
.media-it.sel { outline: 3px solid var(--accent); }
.media-it .th { aspect-ratio: 4/3; background: repeating-conic-gradient(var(--line) 0 25%, var(--panel2) 0 50%) 0 0/16px 16px; display: flex; align-items: center; justify-content: center; }
.media-it .th img, .media-it .th video { width: 100%; height: 100%; object-fit: contain; }
.media-it .nm { padding: 6px 10px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres-card { overflow: hidden; padding: 0; }
.pres-card .thumb { aspect-ratio: 16/9; background: #000; position: relative; overflow: hidden; }
.pres-card .body { padding: 12px 16px 14px; }
.thumb .sv { pointer-events: none; }

/* Monitor-Playlist (Drag & Drop) */
.pl { display: flex; flex-direction: column; gap: 8px; }
.pl-it { display: grid; grid-template-columns: 26px 36px 168px 1fr auto; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 8px 6px; }
.pl-it.off { opacity: .55; }
.pl-it.dragging { opacity: .4; }
.pl-it.drop-before { box-shadow: 0 -3px 0 var(--accent); } .pl-it.drop-after { box-shadow: 0 3px 0 var(--accent); }
.pl-it.now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accentLine); }
.pl-it .grip { cursor: grab; color: var(--muted); font-size: 18px; text-align: center; user-select: none; }
.pl-it .pos { font-weight: 700; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.pl-it .th { width: 168px; aspect-ratio: 16/9; background: #000; border-radius: 6px; overflow: hidden; position: relative; }
.pl-it .nm { font-weight: 700; } .pl-it .meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pl-it input.dur { width: 74px; height: 30px; text-align: right; }
@media (max-width: 860px) { .pl-it { grid-template-columns: 22px 1fr; } .pl-it .pos, .pl-it .th { display: none; } .pl-it > :last-child { grid-column: 1 / -1; } }
.dev-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accentBg); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.live-box { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; }

/* Rechte */
.perm-grid { columns: 2; column-gap: 28px; } @media (max-width: 760px) { .perm-grid { columns: 1; } }
.perm-grp { break-inside: avoid; margin-bottom: 16px; }
.perm-grp h4 { margin: 0 0 6px; font-size: 13px; color: var(--text); }
.perm-grp .chk { font-size: 13.5px; }
.perm-grp .chk.inh { color: var(--muted); }
.perm-grp .chk.inh::after { content: 'über Rolle'; font-size: 11px; margin-left: auto; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.matrix { overflow: auto; max-height: 70vh; }
.matrix table { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.matrix th, .matrix td { border-bottom: 1px solid var(--line); padding: 6px 10px; background: var(--panel); }
.matrix thead th { position: sticky; top: 0; z-index: 2; vertical-align: bottom; white-space: nowrap; }
.matrix tbody th { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 400; min-width: 280px; }
.matrix td { text-align: center; }
.matrix tr.grp th { font-weight: 700; background: var(--panel2); }
.matrix .yes { color: var(--ok); font-weight: 700; } .matrix .no { color: var(--line2); }
.log { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: #0f1720; color: #d7e2ee; border-radius: 10px; padding: 12px 14px; max-height: 65vh; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.log .lv-warn { color: #ffcf6e; } .log .lv-error { color: #ff8b8b; } .log .ts { color: #7f93a8; }
.drop { border: 2px dashed var(--line2); border-radius: 12px; padding: 26px; text-align: center; background: var(--panel); color: var(--muted); }
.drop.over { border-color: var(--accent); background: var(--accentBg); color: var(--accent2); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: 13.5px; } .kv .k { color: var(--muted); }

/* Seitencontainer: Kopf, Tabs, Filterleiste über volle Breite – Inhalt mit Rand */
.page > .page-head, .page > .filterbar { margin: 0; }
.page > .tabs { margin: 0; padding: 0 32px; background: var(--panel); border-bottom: 1px solid var(--line); }
.page > :not(.page-head):not(.tabs):not(.filterbar):not(.lp):not(.ed):not(.hw) { margin: 18px 32px 0; }
@media (max-width: 760px) { .page > :not(.page-head):not(.tabs):not(.filterbar):not(.lp):not(.ed):not(.hw) { margin: 14px 16px 0; } .page > .tabs { padding: 0 8px; } }
.page > .hw { margin: 0; }
