:root {
  --bg: #121212;
  --side: #1a1a1a;
  --panel: #1e1e1e;
  --line: #2e2e2e;
  --text: #ececec;
  --muted: #8d8d8d;
  --blue: #1e88e5;
  --sel: #0d47a1;
  --green: #2e7d32;
  --red: #c62828;
  --input: #252525;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.45 "Segoe UI", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app { display: grid; grid-template-columns: auto 1fr; min-height: 100vh; }
.sidebar {
  width: 232px;
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  font-weight: 700;
  font-size: 15px;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1565c0; color: #fff; font-weight: 800;
}
nav { padding: 8px 10px 16px; display: flex; flex-direction: column; gap: 4px; }
nav > a, nav .group > summary {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: #ececec;
  font-size: 13.5px;
  font-weight: 650;
}
nav > a:hover, nav .group > summary:hover { background: #2a2a2a; color: #fff; }
nav > a.on { background: #1565c0; color: #fff; }
.group { margin: 0; }
.group summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 28px;
}
.group summary::-webkit-details-marker { display: none; }
.group summary:after {
  content: "▸";
  position: absolute;
  right: 10px;
  top: 10px;
  color: #888;
  font-size: 10px;
}
.group[open] {
  background: #111;
  border: 1px solid #2c2c2c;
  border-radius: 8px;
  padding-bottom: 6px;
}
.group[open] > summary { color: #90caf9; font-weight: 700; }
.group[open] > summary:after { content: "▾"; color: #90caf9; }
.subs { display: none; padding: 2px 6px 4px; }
.group[open] > .subs { display: block; }
.subs a {
  display: block;
  padding: 6px 10px 6px 16px;
  margin: 1px 0;
  border-radius: 4px;
  color: #8b8b8b;
  font-size: 12px;
  font-weight: 400;
}
.subs a:hover { background: #1f1f1f; color: #ddd; }
.subs a.on { background: #0d47a1; color: #fff; font-weight: 600; }
.side-bottom { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid var(--line); }
.night { display: flex; align-items: center; gap: 10px; color: #bbb; cursor: pointer; }
.night input { position: absolute; opacity: 0; }
.night span {
  width: 36px; height: 20px; border-radius: 999px; background: #333; position: relative;
}
.night span:after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: .15s;
}
.night input:checked + span { background: var(--blue); }
.night input:checked + span:after { transform: translateX(16px); }
.ver { color: #666; font-size: 11px; margin-top: 10px; }

.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 48px;
  background: #1565c0;
  border-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 5;
  color: #fff;
}
.top-search input {
  width: min(280px, 100%);
  background: rgba(0,0,0,.18);
  border: 0;
  color: #fff;
  border-radius: 4px;
  padding: 8px 10px;
}
.top-search input::placeholder { color: rgba(255,255,255,.75); }
.top-title { font-weight: 600; font-size: 15px; text-align: center; color: #fff; }
.top-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.who { color: rgba(255,255,255,.85); font-size: 12px; }
.ws-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 12px 0;
  background: #0d47a1;
  min-height: 36px;
  align-items: flex-end;
  overflow-x: auto;
}
.ws-tab {
  padding: 8px 14px;
  color: rgba(255,255,255,.82);
  border-radius: 6px 6px 0 0;
  font-weight: 650;
  white-space: nowrap;
}
.ws-tab:hover { background: rgba(255,255,255,.12); color: #fff; }
.ws-tab.on { background: var(--bg); color: #fff; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; color: #fff; }
.icon-btn:hover { background: rgba(0,0,0,.15); }
.logo-row { display: flex; align-items: center; gap: 6px; padding: 12px 10px 8px; }
.hamburger { border: 0; background: none; color: #ccc; font-size: 18px; width: 32px; height: 32px; }
.sidebar.thin { width: 64px; }
.sidebar.thin .logo-text, .sidebar.thin nav .group summary, .sidebar.thin nav a, .sidebar.thin .night, .sidebar.thin .ver { display: none; }
.sidebar.thin nav .group[open] a { display: none; }

main { padding: 14px 16px 28px; }
.alert { padding: 8px 12px; border-radius: 4px; margin: 0 0 12px; }
.alert.good { background: #12351a; color: #b7e0bd; }
.alert.bad { background: #3a1515; color: #ffb4b4; }

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 40px 14px 16px;
  background: #2e7d32;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.toast[hidden] { display: none !important; }
.toast.bad { background: #8b1e1e; }
.toast-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid #fff;
  position: relative;
}
.toast-ico::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.toast.bad .toast-ico::after { left: 8px; top: 3px; width: 2px; height: 12px; border-width: 0 2px 0 0; transform: none; }
.toast-copy { min-width: 0; }
.toast-copy strong { display: block; font-size: 15px; line-height: 1.2; }
.toast-copy span { display: block; margin-top: 2px; font-size: 13px; opacity: .95; }
.toast-x {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: .85;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin: 0 0 12px;
}
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; align-items: start; }
.split .panel { margin: 0; }
.split > :last-child {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.sports-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-head.compact { margin-bottom: 8px; }
.eyebrow { font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-weight: 650; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.page-description { display: none; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
table.compact { min-width: 0; }
.src-kinds { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 2px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #2a2a2a; }
th { color: #8a8a8a; font-size: 11px; font-weight: 600; background: #191919; }
tr:hover td { background: #222; }
.sel-row td, tr[style*="outline"] td, tr.cat-ord-row.on td, tr.js-mass-row.on td { background: var(--sel) !important; }
tr.click-row.hidden-cat td { background: #2a2a2a; color: #c8c8c8; }
tr.click-row.hidden-cat:hover td { background: #333; }
tr.click-row.hidden-cat.sel-row td, tr.click-row.hidden-cat.on td { background: #3a3a3a !important; color: #c8c8c8; }
.click-row td { padding: 0; }
.click-row { cursor: pointer; }
.cat-ord-row, .js-mass-row { user-select: none; -webkit-user-select: none; }
.click-row a.stretch {
  display: block;
  padding: 9px 10px;
  color: inherit;
  position: relative;
  z-index: 1;
}
.empty { padding: 24px; text-align: center; color: var(--muted); }
.ord-th { width: 92px; }
.ord-cell { width: 92px; position: relative; z-index: 3; padding: 4px 6px !important; white-space: nowrap; vertical-align: middle; }
.ord-btns { display: inline-flex; gap: 2px; align-items: center; margin: 0; }
.ord-btns button { width: 28px; min-width: 28px; padding: 4px 0; }
.drag-h {
  cursor: grab;
  color: #888;
  padding: 4px 2px;
  user-select: none;
  display: inline-block;
  letter-spacing: -2px;
  font-weight: 700;
}
.drag-h:active { cursor: grabbing; }
tr.dragging td { opacity: .45; }
tr.drag-over td { box-shadow: inset 0 2px 0 var(--blue); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #bbb; }

label { display: grid; gap: 5px; color: #bbb; font-size: 12px; margin: 8px 0; }
input, select, textarea {
  width: 100%;
  background: var(--input);
  color: #fff;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 8px 10px;
  outline: none;
}
input[type="radio"],
input[type="checkbox"] {
  width: auto;
  height: auto;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  accent-color: #1e88e5;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
textarea { min-height: 70px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: #ddd; }
.check input { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-form label { flex: 1; min-width: 140px; }

.primary, .btn-save {
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 10px 14px;
  font-weight: 700;
}
.primary.wide, .wide { width: 100%; }
.danger {
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 10px 14px;
  font-weight: 700;
  width: 100%;
  margin-top: 8px;
}
.btn-ghost, .actions button, .actions a.badge {
  background: #2a2a2a;
  color: #eee;
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  padding: 10px 12px;
  text-align: center;
  display: inline-block;
  font-weight: 650;
}
.btn-ghost.dim { opacity: .35; pointer-events: none; }
.btn-new {
  display: block;
  text-align: center;
  border: 1px solid #3d7eb0;
  color: #d6ecff;
  padding: 12px;
  border-radius: 4px;
  margin-top: 14px;
  font-weight: 700;
}
.up-actions, .btn-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
.sched-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.sched-bar .check { margin: 0; }
.sched-bar select { width: auto; margin: 0; }
.sched-bar .btn-ghost { padding: 6px 10px; }
.btn-row form { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions form { margin: 0; }
.badge { display: inline-flex; padding: 4px 8px; border: 1px solid #3d3d3d; border-radius: 4px; font-size: 11px; color: #ccc; }
.status.off { color: #ef9a9a; }
.status.on { color: #81c784; }
.status.dim { color: #9e9e9e; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 10000; padding: 24px; overflow: auto; }
.modal.open { display: grid; place-items: center; }
.modal-card { position: relative; z-index: 1; width: min(520px, 100%); background: #1b1b1b; border: 1px solid #3a3a3a; border-radius: 8px; padding: 22px; pointer-events: auto; }
.wide-modal { width: min(720px, 100%); }
.settings-modal { width: min(860px, 100%); }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; align-items: start; margin-bottom: 16px; }
.set-grid h4 { margin: 0 0 10px; font-size: 15px; font-weight: 650; color: #ddd; }
.set-inline { display: flex; align-items: center; gap: 10px; }
.set-inline input.set-num { width: 88px; margin: 0; }
.set-shift { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: end; margin: 10px 0 4px; }
.set-shift label { margin: 0; }
.shift-times { color: #9aa; font-size: 12px; line-height: 1.55; padding-bottom: 6px; }
.set-dummy-text { margin: 0 0 8px 26px; }
.set-dummy-text input { margin: 0; }
@media (max-width: 800px) {
  .set-grid, .set-shift { grid-template-columns: 1fr; }
}
.prov-modal { width: min(920px, 100%); }
.prov-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.prov-grid h4 { margin: 0 0 8px; font-size: 15px; }
@media (max-width: 800px) { .prov-grid { grid-template-columns: 1fr; } }
.close { position: absolute; right: 12px; top: 8px; border: 0; background: none; color: #888; font-size: 26px; }
.ns-modal { width: min(760px, 100%); padding: 26px 32px 22px; }
.ns-modal h3 { text-align: center; font-size: 16px; font-weight: 650; margin: 0 0 8px; color: #ddd; }
.ns-modal .close {
  width: 26px; height: 26px; border: 1px solid #777; border-radius: 50%;
  font-size: 16px; display: grid; place-items: center; line-height: 1;
  right: 12px; top: 12px; color: #bbb;
}
.ns-row { display: grid; grid-template-columns: 160px 1fr; gap: 18px; }
.ns-epg { display: grid; grid-template-columns: 1fr 160px; gap: 18px; }
.ns-checks { display: flex; justify-content: space-between; gap: 24px; margin: 8px 0 16px; }
.ns-checks .check { margin: 0; }
.ns-modal .btn-save { margin-top: 4px; padding: 12px; font-size: 15px; }
.ns-modal label { margin: 10px 0; }
@media (max-width: 640px) {
  .ns-row, .ns-epg { grid-template-columns: 1fr; }
}

.radio-list { display: grid; gap: 8px; margin: 12px 0; }
.radio-list label {
  display: flex; gap: 10px; align-items: flex-start; justify-content: flex-start; margin: 0;
  padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #171717;
  color: #e6e6e6; font-size: 14px; font-weight: 500; line-height: 1.35;
}
.radio-list label input { margin-top: 3px; }
.conn { margin: 8px 0 4px; color: #9aa; }
.conn summary { cursor: pointer; }

.log-card { border: 1px solid #5a5a5a; border-radius: 4px; padding: 18px 18px 14px; margin: 16px 0 10px; background: #161616; }
.log-card time { display: block; color: #bdbdbd; margin: 0 0 16px; text-align: center; font-size: 14px; }
.log-kind { font-weight: 700; margin: 14px 0 6px; color: #d0d0d0; }
.log-line { margin: 4px 0 6px; color: #e6e6e6; }
.log-export { width: 100%; margin-top: 16px; }
.log-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.log-nav .btn-ghost { flex: 1; min-width: 160px; text-align: center; }
.linkish { background: none; border: 0; color: #64b5f6; padding: 0; cursor: pointer; }
.run-overlay {
  position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.88);
  display: grid; place-items: center; padding: 24px;
}
.run-overlay[hidden] { display: none !important; }
.run-overlay.is-on { display: grid !important; }
body.run-busy { overflow: hidden; }
.run-overlay-box {
  text-align: center; padding: 42px 40px 36px; width: min(560px, 94vw);
  background: #161616; border: 1px solid #6a6a6a; border-radius: 4px;
}
.run-overlay-box h2 { margin: 18px 0 10px; font-size: 28px; font-weight: 700; letter-spacing: .02em; }
.run-overlay-box p { margin: 0; color: #bdbdbd; line-height: 1.45; }
.run-spin {
  width: 58px; height: 58px; margin: 0 auto;
  border: 5px solid #2a2a2a; border-top-color: #1e88e5; border-radius: 50%;
  animation: runspin .8s linear infinite;
}
@keyframes runspin { to { transform: rotate(360deg); } }
.log-detail-card { width: min(920px, 100%); max-height: 86vh; }
#updLogNav { margin: 10px 0 0; }
#updLogNav[hidden] { display: none !important; }
#updLogHead[hidden] { display: none !important; }
#updLogModal .upd-sec { font-weight: 700; }
#updLogModal .upd-sub { padding-left: 28px; }
#updLogModal .upd-sub + .upd-cat-rows .upd-row { padding-left: 52px; }
.upd-log-table { border: 1px solid #3a3a3a; margin-top: 18px; max-height: 64vh; overflow: auto; }
.upd-log-head, .upd-row {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid #333; align-items: center;
}
#updLogModal[data-cols="count"] .upd-log-head,
#updLogModal[data-cols="count"] .upd-row { grid-template-columns: 1fr 88px; }
#updLogModal[data-cols="sync"] .upd-log-head,
#updLogModal[data-cols="sync"] .upd-row { grid-template-columns: 1fr 1fr; }
.upd-log-head { color: #9e9e9e; font-size: 13px; position: sticky; top: 0; background: #161616; z-index: 1; }
.upd-cat {
  display: grid; grid-template-columns: 16px 1fr; gap: 8px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid #333; color: #eee;
  text-align: left; padding: 11px 14px; cursor: pointer; font-size: 14px; align-items: center;
}
#updLogModal[data-cols="count"] .upd-cat { grid-template-columns: 16px 1fr 88px; }
#updLogModal[data-cols="sync"] .upd-cat { grid-template-columns: 16px 1fr 1fr; }
.upd-cat:before { content: "▸"; color: #888; }
.upd-cat.open:before { content: "▾"; }
.upd-cat-rows { background: #121212; }
.upd-row { color: #ddd; font-size: 13px; padding-left: 36px; }
.upd-row span { overflow-wrap: anywhere; }

.upd-log-overlay {
  position: fixed; inset: 0; z-index: 10050; background: rgba(0,0,0,.82);
  display: none; place-items: center; padding: 20px; pointer-events: auto;
}
.upd-log-overlay[hidden] { display: none !important; }
.upd-log-overlay.is-on,
.upd-log-overlay.is-on[hidden] { display: grid !important; }
.wiz-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.78); z-index: 10000; display: grid; place-items: center; padding: 20px; }
.wiz-overlay[hidden], .wiz-steps[hidden], .wiz-pane[hidden], [data-maps][hidden],
#newPlXtream[hidden], #newPlM3uUrl[hidden], #newPlFile[hidden],
#addPlXtream[hidden], #addPlM3uUrl[hidden], #addPlFile[hidden] { display: none !important; }
.wiz-card { width: min(820px,100%); background: #161616; border: 1px solid #5a5a5a; border-radius: 4px; padding: 22px 36px 20px; position: relative; max-height: 94vh; overflow: auto; }
.wiz-card.wiz-sm { width: min(460px,100%); padding: 28px 32px 24px; }
.wiz-card h2 { text-align: center; margin: 0; font-size: 22px; font-weight: 650; }
.wiz-sub { text-align: center; color: #8b8b8b; margin: 6px 0 0; }
.wiz-x {
  position: absolute; right: 12px; top: 12px; width: 26px; height: 26px;
  border: 1px solid #777; border-radius: 50%; color: #bbb; font-size: 16px;
  display: grid; place-items: center; line-height: 1;
}
.wiz-steps { display: flex; justify-content: center; margin: 28px 24px 22px; position: relative; z-index: 2; }
.wiz-step { flex: 1; max-width: 200px; text-align: center; background: none; border: 0; color: #6b7280; cursor: pointer; position: relative; z-index: 1; pointer-events: auto; }
.wiz-step:not(:last-child):after {
  content: ""; position: absolute; top: 23px; left: 50%; width: 100%; height: 2px;
  background: #3a3a3a; z-index: 0; pointer-events: none;
}
.wiz-step.on:not(:last-child):after,
.wiz-step.done:not(:last-child):after { background: #1565c0; }
.wiz-step .ico {
  width: 46px; height: 46px; border-radius: 50%; background: #2a2a2a; color: #8a8a8a;
  margin: 0 auto 8px; display: grid; place-items: center; position: relative; z-index: 1;
  pointer-events: none;
}
.wiz-step small { letter-spacing: .14em; font-size: 10px; pointer-events: none; }
.wiz-step.on .ico, .wiz-step.done .ico { background: #1565c0; color: #fff; }
.wiz-step.on, .wiz-step.done { color: #c5c5c5; }
.wiz-tab-radio,
input.wiz-tab-radio[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.wiz-card:has(.wiz-tab-radio) .wiz-pane,
.wiz-card:has(.wiz-tab-radio) [data-maps] { display: none; }
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) .wiz-pane[data-pane="1"],
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) .wiz-pane[data-newpane="1"],
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) .wiz-pane[data-addpane="1"],
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) .wiz-pane[data-rstpane="1"],
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-pane[data-pane="2"],
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-pane[data-newpane="2"],
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-pane[data-addpane="2"],
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-pane[data-rstpane="2"],
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-pane[data-pane="3"],
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-pane[data-newpane="3"],
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-pane[data-addpane="3"],
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-pane[data-rstpane="3"],
.wiz-card:has(.wiz-tab-radio[value="live"]:checked) .wiz-pane[data-pane="live"],
.wiz-card:has(.wiz-tab-radio[value="live"]:checked) [data-maps="live"],
.wiz-card:has(.wiz-tab-radio[value="movie"]:checked) .wiz-pane[data-pane="movie"],
.wiz-card:has(.wiz-tab-radio[value="movie"]:checked) [data-maps="movie"],
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-pane[data-pane="series"],
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) [data-maps="series"] { display: block; }
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) .wiz-step[data-wiz="1"],
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-step[data-wiz="2"],
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-step[data-wiz="3"],
.wiz-card:has(.wiz-tab-radio[value="live"]:checked) .wiz-step[data-wiz="live"],
.wiz-card:has(.wiz-tab-radio[value="movie"]:checked) .wiz-step[data-wiz="movie"],
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-step[data-wiz="series"],
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-step[data-wiz="1"],
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-step[data-wiz="1"],
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-step[data-wiz="2"],
.wiz-card:has(.wiz-tab-radio[value="movie"]:checked) .wiz-step[data-wiz="live"],
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-step[data-wiz="live"],
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-step[data-wiz="movie"] { color: #c5c5c5; }
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) .wiz-step[data-wiz="1"] .ico,
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-step[data-wiz="2"] .ico,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-step[data-wiz="3"] .ico,
.wiz-card:has(.wiz-tab-radio[value="live"]:checked) .wiz-step[data-wiz="live"] .ico,
.wiz-card:has(.wiz-tab-radio[value="movie"]:checked) .wiz-step[data-wiz="movie"] .ico,
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-step[data-wiz="series"] .ico,
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-step[data-wiz="1"] .ico,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-step[data-wiz="1"] .ico,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-step[data-wiz="2"] .ico,
.wiz-card:has(.wiz-tab-radio[value="movie"]:checked) .wiz-step[data-wiz="live"] .ico,
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-step[data-wiz="live"] .ico,
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-step[data-wiz="movie"] .ico { background: #1565c0; color: #fff; }
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) .wiz-step[data-wiz="1"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-step[data-wiz="1"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .wiz-step[data-wiz="2"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-step[data-wiz="1"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) .wiz-step[data-wiz="2"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="live"]:checked) .wiz-step[data-wiz="live"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="movie"]:checked) .wiz-step[data-wiz="live"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="movie"]:checked) .wiz-step[data-wiz="movie"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-step[data-wiz="live"]:not(:last-child):after,
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) .wiz-step[data-wiz="movie"]:not(:last-child):after { background: #1565c0; }
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) #wizPrev,
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) #addPlPrev,
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) #srPrev,
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) #newPlPrev,
.wiz-card:has(.wiz-tab-radio[value="1"]:checked) .adv-prev { display: none; }
#rstCard:has(.wiz-tab-radio[value="1"]:checked) #rstPrev { display: inline-flex; }
.wiz-card.wiz-one:has(.wiz-tab-radio[value="1"]:checked) #newPlPrev { display: inline-flex; }
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) #wizNext,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) #addPlNext,
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) #srNext,
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .adv-next,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) #newPlNext,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) #rstNext { display: none; }
.wiz-card:has(.wiz-tab-radio) #wizCreate,
.wiz-card:has(.wiz-tab-radio) #addPlCreate,
.wiz-card:has(.wiz-tab-radio) #srApply,
.wiz-card:has(.wiz-tab-radio) .adv-apply,
.wiz-card:has(.wiz-tab-radio) #newPlCreate,
.wiz-card:has(.wiz-tab-radio) #rstRestore { display: none; }
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) #wizCreate,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) #addPlCreate,
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) #srApply,
.wiz-card:has(.wiz-tab-radio[value="2"]:checked) .adv-apply,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) #newPlCreate,
.wiz-card:has(.wiz-tab-radio[value="3"]:checked) #rstRestore,
.wiz-card.wiz-one:has(.wiz-tab-radio[value="1"]:checked) #newPlCreate { display: inline-flex; }
.wiz-foot #wizSave { display: inline-flex; }
.wiz-card.wiz-one:has(.wiz-tab-radio[value="1"]:checked) #newPlNext { display: none; }
.wiz-card:has(.wiz-tab-radio[value="live"]:checked) #wizPrev { visibility: hidden; }
.wiz-card:has(.wiz-tab-radio[value="series"]:checked) #wizNext { display: none; }
.wiz-pane { max-width: 640px; margin: 0 auto; }
.wiz-pane-h { text-align: center; margin: 0 0 18px; font-size: 16px; font-weight: 650; }
.wiz-checks { display: grid; gap: 11px; max-width: 540px; margin: 0 auto; }
.wiz-maps { margin: 18px auto 0; max-width: 620px; }
.wiz-foot { display: flex; align-items: center; margin-top: 28px; gap: 12px; }
.wiz-foot .btn-ghost {
  min-width: 120px; text-transform: uppercase; background: #1a1a1a;
  border: 1px solid #8d8d8d; color: #fff; font-weight: 650;
}
.wiz-foot #wizNext, .wiz-foot #wizCreate, .wiz-foot .ml-auto { margin-left: auto; }
.wiz-foot .primary { min-width: 120px; text-transform: uppercase; background: #1565c0; border: 0; }
.wiz-next-full { width: 100%; min-width: 0; text-transform: none; font-size: 15px; padding: 12px 16px; }
.radio-plain { display: grid; gap: 14px; margin: 8px 0 8px; justify-items: start; }
.radio-plain label {
  display: flex; gap: 10px; align-items: flex-start; justify-content: flex-start;
  width: auto; max-width: 100%; margin: 0;
  padding: 0; border: 0; background: none;
  color: #e8e8e8; font-size: 14px; font-weight: 500; line-height: 1.4;
}
.radio-plain label input[type="radio"],
.radio-plain label input[type="checkbox"] { margin-top: 3px; }
.wiz-prov-head { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin: 0 0 12px; }
.wiz-prov-head label { margin: 0; }
.btn-reset {
  background: transparent; border: 1px solid #1565c0; color: #fff;
  border-radius: 4px; padding: 9px 16px; font-weight: 700; letter-spacing: .04em;
  height: 38px;
}

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #101010; }
.login-card { width: min(400px,100%); background: #1b1b1b; border: 1px solid #333; border-radius: 10px; padding: 28px; }
.login-card .logo-mark { margin-bottom: 12px; }
.login-card h1 { font-size: 22px; margin: 4px 0 16px; }

.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 16px; }
.pl-head > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pl-head h2 { font-size: 20px; font-weight: 600; margin: 0; white-space: nowrap; }
.pl-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 4px 10px; border-radius: 999px;
  background: #252525; border: 1px solid #3a3a3a; color: #ddd;
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.pl-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pl-order-btn {
  width: 40px; height: 40px; border-radius: 6px;
  background: #2a2a2a; border: 1px solid #3a3a3a; color: #eee;
  display: grid; place-items: center; padding: 0;
}
.pl-order-btn:hover { background: #333; border-color: #4a4a4a; }
.pl-order-ico {
  width: 14px; height: 18px; position: relative; display: block;
}
.pl-order-ico::before,
.pl-order-ico::after {
  content: ""; position: absolute; left: 50%; width: 0; height: 0;
  border: 5px solid transparent; margin-left: -5px;
}
.pl-order-ico::before { top: 0; border-bottom: 6px solid #eee; border-top: 0; }
.pl-order-ico::after { bottom: 0; border-top: 6px solid #eee; border-bottom: 0; }
.pl-now { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #2e84bd; color: #fff; font-size: 12px; font-weight: 600; vertical-align: middle; }
.pl-card {
  display: grid;
  grid-template-columns: minmax(160px,1.3fr) minmax(140px,.9fr) 90px 120px 150px auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #1a1a1a;
}
.pl-card strong { font-size: 15px; }
.pl-stats { color: #bdbdbd; font-size: 12px; line-height: 1.55; }
.pl-meta { color: #9e9e9e; font-size: 12px; }
.pl-icons { display: flex; gap: 6px; position: relative; justify-content: flex-end; }
.addpl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 640px; margin: 0 auto; }
.addpl-cols .check { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
@media (max-width: 700px) { .addpl-cols { grid-template-columns: 1fr; } }
@media (max-width: 1100px) {
  .pl-card { grid-template-columns: 1fr 1fr; }
  .pl-icons { grid-column: 1 / -1; justify-content: flex-start; }
}

.sports-table { max-height: 70vh; }
.table-search { max-width: 420px; margin-bottom: 10px; }

.top-search { display: flex; align-items: center; gap: 8px; }
.filter-ico {
  width: 34px; height: 34px; border-radius: 6px;
  background: rgba(255,255,255,.08); border: 0; color: #fff;
  display: grid; place-items: center; padding: 0; cursor: pointer;
}
.filter-ico:hover, .filter-ico.on { background: #1565c0; }
.filter-ico svg { display: block; }
.ed-filters {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 6px 12px 8px;
  border-bottom: 1px solid #2a2a2a;
  background: #161616;
  flex: 0 0 auto;
}
.ed-filters[hidden] { display: none !important; }
.ed-filters .col-f, .ed-filters [data-uf] {
  width: 100%;
  margin: 0;
  min-width: 0;
  height: 28px;
  padding: 4px 8px;
  font-size: 12px;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 4px;
  color: #eee;
}
.ed-filters.ch-filters {
  grid-template-columns: 16px 40px 1.1fr 1.4fr .7fr .35fr;
}
.ed-filters.epg-filters {
  grid-template-columns: 16px 40px 1fr .9fr .35fr;
}
.ed-filters.lg-filters { grid-template-columns: 16px 52px 1fr; }
.ed-filters.se-filters { grid-template-columns: 16px 52px 1fr 70px; }
.ed-filters.user-filters { grid-template-columns: 70px 1fr 160px; padding-left: 12px; }
.pl-menu {
  display: none; position: absolute; right: 0; top: 40px; z-index: 10001;
  background: #141414; border: 1px solid #3f3f3f; border-radius: 6px; min-width: 270px; padding: 6px;
  pointer-events: auto; box-shadow: 0 14px 32px rgba(0,0,0,.55);
}
.pl-menu.open { display: grid; gap: 1px; }
.pl-menu .menu-h {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: #7a7a7a; padding: 8px 12px 6px; font-weight: 700;
}
.pl-menu .menu-sep { height: 1px; background: #2e2e2e; margin: 5px 6px; }
.pl-menu a, .pl-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: #eee; padding: 10px 12px; border-radius: 4px; font-size: 13px; line-height: 1.25;
}
.pl-menu a:hover, .pl-menu button:hover { background: #2a2a2a; }
.pl-menu form { margin: 0; }
.pl-menu .menu-danger { color: #ef9a9a; }
.pl-ico {
  width: 36px; height: 36px; border-radius: 5px;
  background: #2a2a2a; color: #eee; border: 1px solid #3a3a3a;
  display: grid; place-items: center; font-size: 14px;
  position: relative; text-decoration: none;
}
.pl-ico:hover { background: #353535; border-color: #4a4a4a; color: #fff; }
.pl-ico[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #000; color: #fff; font-size: 11px; padding: 5px 8px; border-radius: 4px;
  white-space: nowrap; pointer-events: none; z-index: 20;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.pl-svg { width: 16px; height: 16px; display: block; background: currentColor; }
.pl-svg-tv {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M8 3l2 3h4l2-3h2l-2.5 3.5A3 3 0 0120 9v9a3 3 0 01-3 3H7a3 3 0 01-3-3V9a3 3 0 012.5-2.5L4 3h4zm-1 7v8h10V10H7z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M8 3l2 3h4l2-3h2l-2.5 3.5A3 3 0 0120 9v9a3 3 0 01-3 3H7a3 3 0 01-3-3V9a3 3 0 012.5-2.5L4 3h4zm-1 7v8h10V10H7z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pl-svg-save {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V7l-4-4zm-5 16a3 3 0 110-6 3 3 0 010 6zm3-10H5V5h10v4z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V7l-4-4zm-5 16a3 3 0 110-6 3 3 0 010 6zm3-10H5V5h10v4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pl-svg-cam {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17 10.5V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17 10.5V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pl-svg-users {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M16 11a4 4 0 10-4-4 4 4 0 004 4zM8 13a4 4 0 10-4-4 4 4 0 004 4zm8 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zM8 15c-.29 0-.62.02-.97.05C4.86 15.42 2 16.7 2 19v2h6v-2c0-1.46.66-2.56 1.67-3.35A11.2 11.2 0 008 15z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M16 11a4 4 0 10-4-4 4 4 0 004 4zM8 13a4 4 0 10-4-4 4 4 0 004 4zm8 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zM8 15c-.29 0-.62.02-.97.05C4.86 15.42 2 16.7 2 19v2h6v-2c0-1.46.66-2.56 1.67-3.35A11.2 11.2 0 008 15z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pl-svg-upd {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 4V1L8 5l4 4V6a6 6 0 11-6 6H4a8 8 0 108-8z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 4V1L8 5l4 4V6a6 6 0 11-6 6H4a8 8 0 108-8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pl-svg-info {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pl-svg-more {
  width: 12px; height: 12px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pl-order-modal { width: min(480px, 100%); padding: 18px 20px 16px; }
.pl-order-title { text-align: center; margin: 4px 28px 16px; font-size: 18px; font-weight: 600; }
.pl-order-list {
  border: 1px solid #4a4a4a; border-radius: 4px; background: #1a1a1a;
  max-height: min(58vh, 420px); overflow: auto; margin-bottom: 14px;
}
.pl-order-row {
  display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid #333; cursor: grab; color: #eee;
}
.pl-order-row:last-child { border-bottom: 0; }
.pl-order-row.dragging { opacity: .55; background: #222; }
.pl-order-row.drag-over { background: #243044; }
.pl-order-grip {
  width: 12px; height: 18px; justify-self: center;
  background-image: radial-gradient(#6a6a6a 1.15px, transparent 1.2px);
  background-size: 5px 5px; opacity: .9;
}
.pl-order-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-order-save { width: 100%; margin: 0; background: #2e7d32; border: 0; }
main.flush { padding: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; }
main.flush .alert { margin: 8px 16px; flex: 0 0 auto; }
main.flush .ed-layout { flex: 1; min-height: 0; }

body.ed-locked { overflow: hidden; }
body.ed-locked .app,
body.ed-locked .workspace { height: 100vh; min-height: 0; overflow: hidden; }
body.ed-locked main.flush { overflow: hidden; }

.ed-layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.2fr); height: 100%; min-height: 0; }
.ed-layout.ch-ed { grid-template-columns: minmax(300px, 1fr) minmax(420px, 1.15fr); }
.ed-layout.users-layout { grid-template-columns: minmax(260px, .72fr) minmax(480px, 1.35fr); }
.ed-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; border-right: 1px solid #333; background: #161616; }
.ed-pl { padding: 8px 10px; border-bottom: 1px solid #333; margin: 0; }
.ed-pl select { margin: 0; }
.ed-head {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr .7fr .4fr;
  padding: 8px 12px;
  color: #888;
  font-size: 11px;
  font-weight: 700;
  background: #191919;
  border-bottom: 1px solid #333;
}
.ed-cats { overflow: auto; flex: 1; min-height: 0; }
.ed-cat-h {
  width: 100%;
  text-align: left;
  background: #191919;
  border: 0;
  border-bottom: 1px solid #2a2a2a;
  color: #fff;
  padding: 9px 12px;
  font-weight: 650;
}
.ed-cat-h:before { content: "▸ "; color: #888; font-size: 10px; }
.ed-cat.open .ed-cat-h { background: #222; }
.ed-cat.hidden-cat .ed-cat-h { background: #2a2a2a; color: #c8c8c8; }
.ed-cat.open.hidden-cat .ed-cat-h { background: #333; }
.ed-row.sync { background: #1a3d1a; color: #d6ffd6; }
.ed-row.sync:hover { background: #224822; }
.ed-row.sync.on { background: #2a5c2a; }
.ed-row.sync .c-url, .ed-row.sync .c-epg { color: #a8d0a8; }
.ed-row.hid,
.ed-row.cat-hid,
.ed-cat.hidden-cat .ed-row { background: #2a2a2a; color: #c8c8c8; }
.ed-row.hid:hover,
.ed-row.cat-hid:hover,
.ed-cat.hidden-cat .ed-row:hover { background: #333; }
.ed-row.hid.on,
.ed-row.cat-hid.on,
.ed-cat.hidden-cat .ed-row.on { background: #3a3a3a; }
.ed-row.hid .c-url, .ed-row.hid .c-epg,
.ed-row.cat-hid .c-url, .ed-row.cat-hid .c-epg,
.ed-cat.hidden-cat .ed-row .c-url,
.ed-cat.hidden-cat .ed-row .c-epg { color: #9a9a9a; }
.ed-row.expired { background: #4a1520; color: #ffd6dc; }
.ed-row.expired:hover { background: #5c1c28; }
.ed-row.expired.on { background: #6e2432; }
.ed-row.expired .c-expire { color: #ffb3bc; }
.ed-row.expiring { background: #3d3420; color: #ffe9b0; }
.ed-row.expiring:hover { background: #4a3f26; }
.ed-row.expiring.on { background: #5a4a2a; }
.ed-row.expiring .c-expire { color: #ffd666; }
.ed-cat.hidden-cat .ed-row.sync,
.ed-cat.hidden-cat .ed-row.sync:hover,
.ed-cat.hidden-cat .ed-row.sync.on { background: #2a2a2a; color: #c8c8c8; }
.ed-cat.hidden-cat .ed-row.sync.on { background: #3a3a3a; }
.tv-logo { width: 52px; height: 40px; object-fit: contain; background: #111; border-radius: 4px; }
.ed-cat.open .ed-cat-h:before { content: "▾ "; }
.ed-cat-b { display: none; }
.ed-cat.open .ed-cat-b { display: block; }
.ed-row {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr .7fr .4fr;
  padding: 7px 12px 7px 22px;
  border-bottom: 1px solid #222;
  font-size: 12px;
  color: #ddd;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.ed-row > * { pointer-events: none; }
.ed-row > .se-grip { pointer-events: auto; cursor: grab; }
.ed-row > .se-grip:active, .ed-row.dragging > .se-grip { cursor: grabbing; }
.ed-row.dragging { opacity: .45; }
.ed-row:hover { background: #222; }
.ed-row.on { background: var(--sel); }
.ed-row, .ep-row, .cat-ord-row, .js-mass-row { user-select: none; -webkit-user-select: none; }
.ed-head.ch-head, .ed-row.ch-row {
  grid-template-columns: 16px 40px 1.1fr 1.4fr .7fr .35fr;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
}
.ch-thumb {
  width: 40px; height: 28px; object-fit: contain; background: #0c0c0c;
  border: 1px solid #333; border-radius: 3px;
}
.ch-thumb.empty { display: block; }
.ed-num { position: relative; }
.ed-num input { padding-left: 22px; }
.ed-num:before { content: "#"; position: absolute; left: 10px; bottom: 9px; color: #8a8a8a; pointer-events: none; }
.c-url, .c-epg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9aa; font-size: 11px; }
.ed-row em { color: #9e9e9e; font-style: normal; font-size: 10px; }
.ed-pane {
  padding: 18px 22px 28px;
  overflow: auto;
  background: #1a1a1a;
  min-height: 0;
  height: 100%;
  position: sticky;
  top: 0;
  align-self: stretch;
}
.ed-pane.is-loading,
.se-pane.is-loading,
.lg-pane.is-loading {
  opacity: 0.72;
  pointer-events: none;
}
.ed-ident { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; }
.ed-name { margin: 0; }
.tv-ico {
  width: 52px; height: 40px;
  border: 2px solid #ccc; border-radius: 4px;
  display: grid; place-items: center;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #ccc;
}
.ed-epg-num { display: grid; grid-template-columns: 1fr 88px; gap: 8px; }
.ed-move { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: end; }
.ed-move label { margin: 8px 0; }
.btn-move { background: #455a64; color: #fff; border: 0; border-radius: 4px; padding: 10px 14px; font-weight: 700; height: 38px; }
.btn-dup { background: #1565c0; color: #fff; border: 0; border-radius: 4px; padding: 10px 14px; font-weight: 700; height: 38px; }
.btn-top { background: #1a237e; color: #fff; border: 0; border-radius: 4px; padding: 10px; font-weight: 700; margin-top: 8px; }
.ed-top-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}
.ed-top-row .btn-top { margin-top: 0; width: 100%; }
.ed-top-form, .ed-sort-form { margin: 0; }
.btn-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 88px;
  background: #111;
  color: #eee;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 10px 12px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-sort.za { border-color: #5a5a5a; }
.btn-sort.za .btn-sort-ico::before { border-bottom-color: #666; }
.btn-sort.za .btn-sort-ico::after { border-top-color: #fff; }
.btn-sort:disabled, .ed-top-row .btn-top:disabled { opacity: .45; }
.btn-sort-ico {
  width: 11px;
  height: 15px;
  position: relative;
  flex: 0 0 11px;
}
.btn-sort-ico::before,
.btn-sort-ico::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  margin-left: -5px;
}
.btn-sort-ico::before { top: -1px; border-bottom: 5px solid #ddd; border-top: 0; }
.btn-sort-ico::after { bottom: -1px; border-top: 5px solid #ddd; border-bottom: 0; }
.ed-row.on { background: var(--sel); }
.ed-checks { display: flex; gap: 16px; flex-wrap: wrap; }
.tb-menus, .tb-drop { display: inline-flex; position: relative; z-index: 6; }
.tb-menus { gap: 4px; }
.tb-menu { right: 0; top: 36px; min-width: 280px; z-index: 10001; }
.tb-menu-btn { width: 34px; height: 34px; border-radius: 5px; background: rgba(0,0,0,.12); }
.tb-menu-btn:hover { background: rgba(0,0,0,.22); }
.tb-ico-adv, .tb-ico-more {
  width: 16px; height: 16px; display: block; background: currentColor;
}
.tb-ico-adv {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 8a4 4 0 100 8 4 4 0 000-8zm9.4 3l-1.1-.6.2-1.3 1.5-2.1-1.8-1.8-2.2 1.4-1.2.1-.7-1.1L15 3h-2.5l-.2 1.5-.7 1.1-1.2-.1-2.2-1.4L6.4 5.9l1.5 2.1.2 1.3-1.1.6L5 12l1.8 1 .6 1.2-.2 1.3-1.5 2.1 1.8 1.8 2.2-1.4 1.2-.1.7 1.1.2 1.5H15l.2-1.5.7-1.1 1.2.1 2.2 1.4 1.8-1.8-1.5-2.1-.2-1.3.6-1.2L21.4 12l-1.8-1z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 8a4 4 0 100 8 4 4 0 000-8zm9.4 3l-1.1-.6.2-1.3 1.5-2.1-1.8-1.8-2.2 1.4-1.2.1-.7-1.1L15 3h-2.5l-.2 1.5-.7 1.1-1.2-.1-2.2-1.4L6.4 5.9l1.5 2.1.2 1.3-1.1.6L5 12l1.8 1 .6 1.2-.2 1.3-1.5 2.1 1.8 1.8 2.2-1.4 1.2-.1.7 1.1.2 1.5H15l.2-1.5.7-1.1 1.2.1 2.2 1.4 1.8-1.8-1.5-2.1-.2-1.3.6-1.2L21.4 12l-1.8-1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tb-ico-more {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 8a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 8a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tb-ico-info {
  width: 16px; height: 16px; display: block; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pl-menu-flat { min-width: 260px; padding: 8px 6px; border-radius: 4px; background: #121212; border: 1px solid #3a3a3a; }
.pl-menu-flat .menu-h {
  text-align: left; color: #8a8a8a; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; padding: 6px 12px 8px; font-weight: 600;
}
.pl-menu-flat a, .pl-menu-flat button {
  padding: 10px 12px; border-radius: 2px; font-size: 13.5px; color: #f0f0f0;
}
.pl-menu-flat a:hover, .pl-menu-flat button:hover { background: #2a2a2a; }
.pl-menu-flat .menu-sep { background: #333; margin: 6px 8px; }

.wiz-card.pl-tool {
  width: min(560px, 100%);
  background: #1a1a1a;
  border: 1px solid #4a4a4a;
  border-radius: 6px;
  padding: 18px 28px 16px;
}
.wiz-card.pl-tool h2 { font-size: 18px; font-weight: 600; margin-bottom: 0; }
.wiz-card.pl-tool .wiz-steps { margin: 22px 48px 18px; }
.wiz-card.pl-tool .wiz-step { max-width: 140px; }
.wiz-card.pl-tool .wiz-step .ico {
  width: 42px; height: 42px; font-size: 16px; background: #2a2a2a; color: #bbb;
}
.wiz-card.pl-tool .wiz-step.on .ico { background: #1e88e5; color: #fff; }
.wiz-card.pl-tool .wiz-foot {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px;
  padding-top: 8px; border-top: 0;
}
.wiz-card.pl-tool .adv-next,
.wiz-card.pl-tool #srNext {
  min-width: 88px; background: transparent; border: 1px solid #5a5a5a;
  color: #eee; border-radius: 3px; padding: 8px 16px; text-transform: uppercase;
  letter-spacing: .04em; font-size: 12px; font-weight: 650;
}
.wiz-card.pl-tool .adv-apply,
.wiz-card.pl-tool #srApply {
  min-width: 88px; border-radius: 3px; text-transform: uppercase;
  letter-spacing: .04em; font-size: 12px;
}
.pl-tool-lead { margin: 0 0 10px; color: #ddd; font-size: 14px; text-align: left; }
.pl-tool-ex { margin: 0 0 14px; color: #9aa; font-size: 13px; text-align: left; }
.pl-tool-input {
  width: 100%; margin: 0 0 14px; background: #141414; border: 1px solid #3a3a3a;
  border-radius: 3px; color: #fff; padding: 11px 12px;
}
.pl-tool-input:focus { border-color: #5c6bc0; outline: none; }
.pl-tool-opts { gap: 10px; margin: 0 0 12px; }
.pl-tool-lab { display: block; margin: 0 0 10px; color: #bbb; font-size: 12px; }
.pl-tool-lab input { margin-top: 6px; }
.pl-tool-urlgrid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.pl-confirm { width: min(420px, 100%); }
.pl-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@media (max-width: 700px) {
  .pl-tool-urlgrid { grid-template-columns: 1fr; }
}
.menu-h { padding: 8px 10px 4px; color: #888; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.pl-menu hr { border: 0; border-top: 1px solid #444; margin: 6px 0; }
.ed-pane select,
.ed-move select,
.ed-pl select,
.sr-cat select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #1a1a1a;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #eee;
  padding: 10px 34px 10px 12px;
}
.ed-pane select:focus,
.ed-move select:focus,
.ed-pl select:focus,
.sr-cat select:focus { border-color: #5a5a5a; outline: none; }
.cat-drop { border: 1px solid #3a3a3a; border-radius: 4px; margin: 8px 0; background: #1f1f1f; }
.cat-drop summary { padding: 10px 12px; cursor: pointer; list-style: none; color: #ddd; }
.cat-drop summary::-webkit-details-marker { display: none; }
.cat-drop summary:after { content: "▾"; float: right; color: #888; font-size: 11px; }
.cat-drop > div { max-height: 180px; overflow: auto; padding: 0 10px 8px; }
.cat-drop:hover { border-color: #4a4a4a; }
.user-head, .user-row { grid-template-columns: 70px 1fr 160px !important; padding-left: 12px; }
.sort-h { color: #888; font-weight: 700; font-size: 11px; }
.sort-h:hover, .sort-h.on { color: #fff; }
.sort-h.on.asc:after { content: " ▲"; font-size: 9px; }
.sort-h.on.desc:after { content: " ▼"; font-size: 9px; }
.user-btns { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin: 12px 0 8px; }
.user-btns .gear { background: #333; width: 42px; height: 42px; border-radius: 4px; }
.user-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; align-items: stretch; }
.user-foot form { margin: 0; }
.user-foot .danger { margin-top: 0; width: 100%; height: 100%; }
.btn-user-move {
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 10px 14px;
  font-weight: 700;
  width: 100%;
}
.btn-user-move:disabled { opacity: .4; cursor: not-allowed; }
.move-modal { width: min(440px, 94vw); }
.move-title { margin: 0 0 14px; font-size: 18px; }
.move-pl-list { max-height: min(48vh, 360px); overflow: auto; margin: 4px 0 16px; }
.move-pl { padding: 8px 4px; border-bottom: 1px solid #2a2a2a; margin: 0; }
.move-modal .btn-user-move { margin-top: 0; }
.wiz-cats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.wiz-cats .cat-drop { margin: 0; }
.gen-field { display: grid; grid-template-columns: 36px 1fr; }
.gen { background: #1565c0; color: #fff; border: 0; border-radius: 4px 0 0 4px; }
.gen-field input { border-radius: 0 4px 4px 0; }
.gen-field.suffix { grid-template-columns: 1fr 36px; }
.gen-field.suffix input { border-radius: 4px 0 0 4px; }
.gen-field.suffix .gen { border-radius: 0 4px 4px 0; }
.prov-block { margin: 10px 0 8px; }
.prov-label { font-size: 11px; color: #8a8a8a; margin: 0 0 6px; }
.prov-list { display: grid; gap: 6px; }
.prov-list input, .prov-list select { font-size: 12px; width: 100%; }
.btn-sync {
  background: #1565c0; color: #fff; border: 0; border-radius: 4px;
  padding: 11px 16px; font-weight: 700; width: 100%; margin: 0 0 8px;
}

@media (max-width: 1000px) {
  .ed-layout, .wiz-cats { grid-template-columns: 1fr; }
  .ed-head, .ed-row { grid-template-columns: 1fr; }
  .ed-layout.ch-ed .ch-head, .ed-layout.ch-ed .ch-row {
    grid-template-columns: 16px 40px 1fr !important;
  }
  .c-url, .c-epg, .c-shift { display: none; }
  body.ed-locked { overflow: auto; }
  body.ed-locked .app,
  body.ed-locked .workspace { height: auto; overflow: visible; }
  .ed-list { height: auto; overflow: visible; }
  .ed-pane {
    position: sticky;
    top: 48px;
    z-index: 4;
    height: auto;
    max-height: 46vh;
    border-bottom: 1px solid #333;
  }
  .split > :last-child { position: static; max-height: none; }
}
@media (max-width: 650px) {
  .grid2, .inline-form, .up-actions, .btn-row { display: block; }
}

.ed-layout.logo-ed { grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.2fr); }
.lg-head, .lg-row { grid-template-columns: 16px 52px 1fr !important; align-items: center; gap: 8px; }
.lg-head { padding-left: 12px; }
.lg-row { padding-left: 12px; }
.lg-thumb {
  width: 40px; height: 28px; object-fit: contain; background: #0c0c0c;
  border: 1px solid #333; border-radius: 3px;
}
.lg-thumb.empty { display: block; }
.lg-pane { border-left: 1px solid #333; }
.lg-ident { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; }
.lg-preview {
  width: 88px; height: 64px; object-fit: contain; background: #111;
  border: 1px solid #3a3a3a; border-radius: 4px;
}
.lg-preview.tv-ico, .tv-ico.lg-preview {
  width: 88px; height: 64px; font-size: 11px;
}
.lg-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0 6px; }
.lg-actions .danger, .lg-actions .btn-save, .lg-actions .btn-nologo { width: 100%; margin: 0; }
.btn-nologo { background: #8b1e1e; color: #fff; border: 0; border-radius: 4px; padding: 10px 8px; font-weight: 700; }
.lg-h { font-size: 13px; font-weight: 650; margin: 18px 0 8px; }
.lg-auto { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lg-auto button {
  background: #252525; color: #ddd; border: 1px solid #3a3a3a; border-radius: 4px;
  padding: 12px 10px; font-weight: 650;
}
.lg-auto button:hover { background: #1a3658; border-color: #2e84bd; }
.lg-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; margin: 0 0 10px; }
.lg-search input { margin: 0; }
.lg-search .primary { margin: 0; }
.lg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lg-hit {
  min-height: 72px; background: #141414; border: 1px solid #333; border-radius: 4px;
  display: grid; place-items: center; padding: 6px; overflow: hidden;
}
.lg-hit img { max-width: 100%; max-height: 64px; object-fit: contain; }
.lg-hit.empty { pointer-events: none; }
@media (max-width: 1000px) {
  .ed-layout.logo-ed { grid-template-columns: 1fr; }
}

.reset-modal { width: min(440px, 100%); }
.reset-modal .reset-copy { text-align: left; color: #ddd; font-size: 13px; line-height: 1.45; margin: 0 0 14px; }
.reset-checks { text-align: left; margin: 0 0 12px; }
.reset-perm { margin-top: 8px; }
.reset-sure-h { text-align: left; margin: 14px 0 4px; font-weight: 650; }
.reset-del { width: auto; min-width: 120px; margin-top: 16px; }
.reset-del:disabled { opacity: .4; cursor: not-allowed; }
.info-modal { width: min(640px, 100%); padding: 18px 20px 16px; }
.info-title { text-align: center; margin: 0 28px 14px; font-size: 20px; font-weight: 650; }
.info-tab-radio,
input.info-tab-radio[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.info-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 14px; position: relative; z-index: 4; }
.info-tab {
  display: inline-flex; align-items: center; justify-content: center;
  background: #252525; color: #9bb8d0; border: 0; border-radius: 6px;
  padding: 8px 14px; font-weight: 650; cursor: pointer; position: relative; z-index: 4;
  margin: 0; font-size: 13px; gap: 0; line-height: 1.2;
}
.info-tab.on,
#userInfoM3u:checked ~ .info-tabs [for="userInfoM3u"],
#userInfoXtream:checked ~ .info-tabs [for="userInfoXtream"] { background: #1565c0; color: #fff; }
.info-pane { display: none; }
.info-pane.on { display: block; }
#userInfoM3u:checked ~ .info-pane { display: none; }
#userInfoXtream:checked ~ .info-pane { display: none; }
#userInfoM3u:checked ~ .info-pane[data-pane="m3u"],
#userInfoXtream:checked ~ .info-pane[data-pane="xtream"] { display: block; }
.info-warn { margin: 0 0 12px; color: #eee; font-size: 13px; line-height: 1.45; }
.info-box { background: #141414; border: 1px solid #2e2e2e; border-radius: 8px; padding: 14px 14px 8px; }
.info-box label { margin-bottom: 12px; }
.info-note { color: #8a8a8a; font-size: 11px; margin: 4px 0 8px; }
.copy-row { display: grid; grid-template-columns: 1fr 38px; gap: 8px; align-items: stretch; }
.copy-field { position: relative; }
.copy-field input { width: 100%; padding-left: 38px; margin: 0; position: relative; z-index: 1; }
.copy-ico, .gen-ico {
  position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: #64b5f6; padding: 0; font-size: 15px; line-height: 1;
  z-index: 3; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center;
  pointer-events: auto;
}
.copy-ico.copied { color: #81c784; }
.gen-ico { font-size: 18px; }
.info-ico {
  width: 38px; height: 38px; border: 0; border-radius: 4px;
  background: #1565c0; color: #fff; font-size: 16px; display: grid; place-items: center;
}
.info-modal .tb-drop { display: block; }
.info-modal .tb-menu { min-width: 180px; z-index: 10001; }
.btn-export {
  background: #1565c0; color: #fff; border: 0; border-radius: 4px;
  padding: 12px 16px; font-weight: 700; width: 100%; margin-top: 14px;
}

.ed-layout.series-ed { grid-template-columns: minmax(300px, 1fr) minmax(420px, 1.1fr); }
.se-head, .se-row {
  grid-template-columns: 16px 40px 1fr 52px !important;
  align-items: center;
  gap: 8px;
}
.se-head { padding-left: 12px; }
.se-row { padding-left: 12px; }
.se-grip {
  width: 12px; height: 18px; justify-self: center;
  background-image: radial-gradient(#6a6a6a 1.15px, transparent 1.2px);
  background-size: 5px 5px;
  opacity: .85;
  touch-action: none;
}
.se-thumb, .lg-thumb.se-thumb {
  width: 28px; height: 40px; object-fit: cover; background: #111;
  border: 1px solid #333; border-radius: 2px;
}
.se-thumb.empty { display: block; }
.c-rate { color: #bbb; font-size: 12px; text-align: right; }
.se-pane { overflow: auto; }
.se-ident {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}
.se-poster {
  width: 92px; height: 128px; object-fit: cover; background: #111;
  border: 1px solid #3a3a3a; border-radius: 4px;
}
.se-poster.tv-ico { display: grid; place-items: center; font-size: 12px; }
.se-fields label { margin: 0 0 8px; }
.se-meta-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.se-rating { position: relative; }
.se-star { position: absolute; left: 8px; bottom: 9px; color: #f6c945; pointer-events: none; }
.se-rating input { padding-left: 26px; }
.se-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 8px; }
.se-actions .btn-save, .se-actions .danger { width: 100%; margin: 0; }
.btn-episodes {
  display: block; text-align: center;
  background: transparent; color: #ddd; border: 1px solid #4a4a4a;
  border-radius: 4px; padding: 10px 12px; font-weight: 650; width: 100%; margin: 8px 0 14px;
}
.btn-episodes:disabled { opacity: .45; }
.se-card {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px;
  background: #141414; border: 1px solid #333; border-radius: 8px; padding: 12px;
}
.se-card-poster { width: 72px; height: 100px; object-fit: cover; border-radius: 4px; background: #111; }
.se-card-poster.tv-ico { display: grid; place-items: center; height: 100px; font-size: 11px; }
.se-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.se-card-top strong { font-size: 16px; }
.se-card-meta { color: #9aa; font-size: 12px; margin: 6px 0; }
.se-card-h { font-size: 12px; color: #ccc; margin: 8px 0 4px; }
.se-card-plot { color: #cfcfcf; font-size: 12px; line-height: 1.45; margin: 0; max-height: 140px; overflow: auto; }
.se-ring {
  --p: 0;
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: conic-gradient(#21d07a calc(var(--p) * 1%), #333 0);
  box-shadow: inset 0 0 0 4px #141414;
}
.lg-ident.se-cover { grid-template-columns: 92px 1fr; }
.lg-preview.se-poster { width: 92px; height: 128px; object-fit: cover; }
.ed-layout.logo-ed .se-head, .ed-layout.logo-ed .se-row {
  grid-template-columns: 16px 40px 1fr 52px !important;
}

.ep-modal { z-index: 10000; }
.ep-card { width: min(980px, 100%); padding: 18px 16px 16px; }
.ep-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; min-height: 420px; }
.ep-list { border: 1px solid #3a3a3a; border-radius: 4px; overflow: auto; max-height: 70vh; }
.ep-head, .ep-row {
  display: grid; grid-template-columns: 1fr 70px 70px;
  padding: 8px 12px; gap: 8px; align-items: center;
}
.ep-head { color: #888; font-size: 11px; font-weight: 700; border-bottom: 1px solid #333; }
.ep-row { border-bottom: 1px solid #222; color: #ddd; font-size: 12px; cursor: pointer; }
.ep-row > * { pointer-events: none; }
.ep-row:hover { background: #222; }
.ep-row.on { background: var(--sel); }
.ep-title-row { display: grid; grid-template-columns: 1fr 88px 88px; gap: 8px; }
.ep-move { margin: 12px 0; }
.btn-new-ep {
  width: 100%; background: #252525; color: #eee; border: 1px solid #3a3a3a;
  border-radius: 4px; padding: 12px; font-weight: 700; margin-top: 8px;
}
@media (max-width: 1000px) {
  .ed-layout.series-ed, .ep-layout, .se-ident, .se-card, .lg-ident.se-cover { grid-template-columns: 1fr; }
  .se-head, .se-row, .ed-layout.logo-ed .se-head, .ed-layout.logo-ed .se-row { grid-template-columns: 16px 40px 1fr 40px !important; }
  .ep-title-row { grid-template-columns: 1fr; }
}

.ed-layout.epg-ed { grid-template-columns: minmax(300px, 1fr) minmax(420px, 1.1fr); }
.epg-head, .epg-row {
  grid-template-columns: 16px 40px 1.2fr .9fr 48px !important;
  align-items: center;
  gap: 8px;
}
.epg-head { padding-left: 12px; }
.epg-row { padding-left: 12px; }
.epg-set {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  align-items: end;
}
.epg-set label { margin: 8px 0 0; }
.epg-set .btn-set {
  height: 38px;
  margin: 0;
  background: #1565c0;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-weight: 700;
}
.epg-load {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
}
.epg-load label { margin: 0; }
.epg-load .btn-set, .epg-load .primary {
  height: 38px;
  margin: 0;
  background: #1565c0;
  color: #fff;
  border: 0;
  min-width: 72px;
}
.epg-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px 0 8px;
}
.epg-actions .btn-save, .epg-actions .danger, .epg-actions .btn-remove-epg {
  width: 100%;
  margin: 0;
}
.btn-remove-epg {
  background: transparent;
  color: #ef9a9a;
  border: 1px solid #8b1e1e;
  border-radius: 4px;
  padding: 10px 8px;
  font-weight: 700;
}
.epg-auto-h { margin: 16px 0 8px; font-weight: 650; color: #ddd; }
.epg-auto { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.epg-auto + .epg-auto { margin-top: 8px; }
.epg-auto.epg-fill-solo { grid-template-columns: 1fr; margin: 0 0 12px; }
.epg-auto button {
  background: #1565c0;
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 11px 12px;
  font-weight: 700;
  width: 100%;
  margin: 0;
}
.epg-auto button:disabled { opacity: .4; }
#epgFillStatus { margin: 8px 0 0; }
.epg-hits { display: grid; gap: 0; border: 1px solid #333; margin: 8px 0 12px; max-height: 220px; overflow: auto; }
.epg-hit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: #141414;
  color: #ddd;
  border: 0;
  border-bottom: 1px solid #2a2a2a;
  padding: 10px 12px;
  cursor: pointer;
}
.epg-hit:hover, .epg-hit:focus { background: var(--sel); }
.epg-guide { border: 1px solid #333; margin-top: 14px; background: #141414; }
.epg-guide-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #2a2a2a;
  align-items: start;
}
.epg-guide-item strong { display: block; font-size: 13px; }
.epg-guide-item p { margin: 4px 0 0; color: #9aa; font-size: 12px; line-height: 1.35; }
.epg-guide-item time { color: #9aa; font-size: 12px; white-space: nowrap; }
.epg-more { display: block; text-align: center; padding: 10px; }
@media (max-width: 1000px) {
  .ed-layout.epg-ed { grid-template-columns: 1fr; }
  .epg-head, .epg-row { grid-template-columns: 16px 40px 1fr !important; }
  .epg-row .c-epg, .epg-row .c-shift, .epg-head .c-epg, .epg-head .c-shift { display: none; }
  .epg-actions { grid-template-columns: 1fr; }
}

.sr-card { width: min(920px, 100%); }
.wiz-card.pl-tool.sr-card { width: min(720px, 100%); }
.sr-pane { max-width: 820px; }
.sr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 48px; align-items: start; }
.sr-word { margin: 0 0 18px; }
.sr-word-row { display: flex; align-items: center; gap: 10px; }
.sr-word-row input { margin: 0; flex: 1; }
.sr-ok {
  width: 22px; height: 22px; border-radius: 50%;
  background: #2e7d32; color: #fff; font-size: 13px; font-weight: 700;
  display: grid; place-items: center; flex: none;
}
.sr-ops { gap: 14px; }
.sr-replace-line { flex-wrap: wrap; align-items: center; }
.sr-replace-line input[name=to] {
  width: 120px; flex: none; margin: 0 0 0 6px; padding: 6px 8px;
}
.sr-regex { margin: 18px 0 0; }
.sr-where { margin-top: 22px; }
.sr-num {
  width: 52px; flex: none; margin: 0 0 0 6px; padding: 4px 8px; text-align: center;
}
.sr-scope { max-width: 480px; margin: 4px 0 0; }
.sr-cat { margin: 0 0 4px 26px !important; }
.sr-cat select { width: 100%; }
@media (max-width: 800px) {
  .sr-grid { grid-template-columns: 1fr; }
}
