:root {
  --bg: #f3f4f7;
  --panel: #ffffff;
  --panel-soft: #f7f8fb;
  --text: #111827;
  --muted: #697386;
  --line: #d8dee8;
  --sidebar: #1d2229;
  --sidebar-soft: #171b21;
  --red: #d9141a;
  --red-dark: #b90f14;
  --orange: #f59e0b;
  --blue: #1683ff;
  --cyan: #06b6d4;
  --green: #2eb84a;
  --yellow: #facc15;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Inter", "Segoe UI", Arial, sans-serif; letter-spacing: 0; }
body.dark-mode { --bg: #101318; --panel: #171b22; --panel-soft: #202631; --text: #f8fafc; --muted: #b6c2cf; --line: #343c49; }
a { color: #002f5f; text-decoration: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 300px; background: var(--sidebar); color: #fff; border-right: 4px solid var(--red); z-index: 10; }
.brand { height: 110px; display: flex; align-items: center; gap: 12px; padding: 0 32px; font-size: 28px; font-weight: 900; color: #ff8a2a; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.brand-mark,.brand-dot { background: linear-gradient(135deg, #ff3b1f, #ff9b2f); color: #111; border-radius: 50%; font-weight: 900; display: inline-grid; place-items: center; }
.brand-mark { width: 38px; height: 38px; font-size: 13px; }
.brand-dot { width: 34px; height: 34px; font-size: 11px; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 6px; background: #fff; padding: 3px; }
.sidebar-toggle { position: absolute; right: 22px; top: 74px; background: transparent; color: #fff; min-height: 30px; padding: 0; font-size: 24px; }
.sidebar nav { display: grid; gap: 0; }
.sidebar a { color: #dce3ef; min-height: 58px; display: flex; align-items: center; gap: 18px; padding: 0 26px; font-size: 15px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.03); }
.sidebar a span { width: 24px; color: #fff; text-align: center; }
.sidebar a.active,.sidebar a:hover { background: var(--red); color: #fff; }
.version-badge { margin: 18px 24px; padding: 10px 12px; border-radius: 6px; background: #11161d; color: #9fb4d0; font-size: 11px; overflow-wrap: anywhere; }
.main { margin-left: 300px; min-height: 100vh; }
.topbar { height: 92px; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 22px 0 26px; box-shadow: 0 10px 24px rgba(17,24,39,.06); }
.top-tabs { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 24px; border: 1px solid #edf0f5; box-shadow: 0 10px 24px rgba(17,24,39,.04); }
.top-tabs a { color: #111827; padding: 12px 18px; border-radius: 12px; text-transform: uppercase; font-size: 12px; font-weight: 900; }
.top-tabs a:first-child { background: linear-gradient(135deg, #ef3029, #ff7a1a); color: #fff; }
.account-pill { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-left: 1px solid #edf0f5; }
.platform-language-form { margin: 0; display: inline-flex; align-items: center; }
.platform-language-form select { width: auto; min-width: 104px; min-height: 32px; padding: 5px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.license-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; border: 1px solid transparent; white-space: nowrap; }
.license-pill.license-active { color: #065f46; background: #dcfce7; border-color: #86efac; }
.license-pill.license-warning { color: #92400e; background: #fef3c7; border-color: #fbbf24; }
.license-pill.license-expired { color: #991b1b; background: #fee2e2; border-color: #fca5a5; }
.license-expiry-pop { margin: 14px 24px 0; border-radius: 8px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; font-weight: 800; border: 1px solid transparent; }
.license-expiry-pop span { color: inherit; font-weight: 700; opacity: .9; }
.license-expiry-pop.license-warning { background: #fffbeb; color: #78350f; border-color: #fbbf24; }
.license-expiry-pop.license-expired { background: #fef2f2; color: #7f1d1d; border-color: #f87171; }
.page-head { background: #171717; color: #fff; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 4px solid #e5e7eb; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 850; }
.page-head p { margin: 3px 0 0; color: #cfd4dc; font-size: 13px; }
.live-sync { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 18px; background: #11263d; color: #9ee7f5; border: 1px solid rgba(158,231,245,.35); font-size: 12px; font-weight: 900; }
.messages { margin: 18px 24px 0; background: #fff4cc; border: 1px solid #facc15; border-radius: 8px; padding: 12px 14px; color: #4a3a04; }
.panel,.server-box { margin: 22px 40px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 16px 32px rgba(15,23,42,.08); }
.panel { padding: 16px; }
.server-box { padding: 20px 16px 26px; border-top: 3px solid #111; }
.server-title { font-size: 20px; font-weight: 900; margin: 0 0 18px; }
h2 { font-size: 18px; margin: 0 0 16px; }
.muted { color: var(--muted); font-size: 13px; }
.section-pill { display: inline-flex; align-items: center; border-radius: 16px; background: #e9f0ff; color: #001f45; padding: 7px 12px; margin-right: 8px; font-size: 14px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 26px; }
.metrics.compact { margin: 22px 40px; }
.metrics div { background: #fff; border: 1px solid #dde3ed; border-left: 5px solid var(--blue); border-radius: 14px; min-height: 98px; display: grid; place-items: center; align-content: center; box-shadow: 0 18px 36px rgba(15,23,42,.06); }
.metrics span { font-weight: 900; color: #002f5f; font-size: 14px; margin-bottom: 10px; }
.metrics strong { font-size: 24px; }
.toolbar-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 18px; }
.table-search { max-width: 370px; margin-left: auto; }
.rows-select { max-width: 70px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th { background: #f1f4f8; color: #001f45; text-transform: uppercase; font-size: 13px; font-weight: 900; }
th,td { border: 1px solid #dde3ed; padding: 10px 12px; text-align: center; vertical-align: middle; }
.multi-value { line-height: 1.55; word-break: break-word; }
tbody tr:nth-child(odd) { background: #f0f0f0; }
tbody tr:hover { background: #fff9e8; }
.form-grid { display: grid; grid-template-columns: 190px 1fr; gap: 0; align-items: center; }
.form-grid label { display: contents; color: #111827; font-weight: 800; }
.form-grid label > input,.form-grid label > select,.form-grid label > span { margin: 8px 0; }
.form-section { grid-column: 1 / -1; margin: 14px 0 6px; padding: 8px 10px; border-left: 4px solid var(--blue); background: #eef6ff; color: #0f3c6b; font-weight: 900; }
label { color: #111827; font-weight: 800; font-size: 14px; }
input,select { width: 100%; border: 1px solid #cfd7e3; border-radius: 6px; background: #fff; color: var(--text); font: inherit; min-height: 40px; padding: 9px 12px; }
textarea { width: 100%; border: 1px solid #cfd7e3; border-radius: 6px; background: #fff; color: var(--text); font: inherit; padding: 10px 12px; resize: vertical; }
.fox-form label { border-bottom: 1px dashed #e5e7eb; padding: 10px 0; }
.wide { grid-column: 1 / -1; display: grid !important; grid-template-columns: 190px 1fr; }
.check { display: flex !important; gap: 10px; align-items: center; }
.check input { width: auto; min-height: auto; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 18px; background: #eef4ff; border: 1px solid #dbe6ff; }
.choice-row input { width: auto; min-height: auto; }
.panel-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-title-row h2 { margin-bottom: 4px; }
.channel-create-pro { display: grid; grid-template-columns: minmax(250px, .85fr) minmax(300px, 1fr) minmax(280px, .95fr) minmax(210px, .7fr); gap: 12px; align-items: start; }
.create-group { border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); padding: 12px; display: grid; gap: 9px; }
.create-group h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; color: #002f5f; letter-spacing: 0; }
.create-group label { display: grid; gap: 4px; font-size: 12px; color: #263246; }
.create-group input,.create-group select { min-height: 34px; padding: 7px 9px; font-size: 13px; }
.create-group small { color: var(--muted); font-weight: 600; }
.profile-select { min-height: 170px; font-size: 12px; line-height: 1.35; background: #fffdf0; }
.profile-select option { padding: 7px 9px; border-bottom: 1px solid #eef1f5; }
.profile-matrix { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.profile-option { display: block !important; position: relative; }
.profile-option input { position: absolute; inset: 10px auto auto 10px; width: auto; min-height: auto; }
.profile-option span { min-height: 72px; display: grid; align-content: center; gap: 1px; padding: 9px 10px 9px 34px; border: 1px solid #dbe4f0; border-radius: 6px; background: #fff; }
.profile-option input:checked + span { border-color: var(--blue); background: #eef6ff; box-shadow: inset 4px 0 0 var(--blue); }
.profile-option strong { font-size: 16px; color: #001f45; }
.profile-option em { font-style: normal; color: #1f4f82; font-size: 12px; font-weight: 850; }
.profile-option small { font-size: 11px; line-height: 1.25; }
.mini-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compact-check { display: flex !important; gap: 8px; align-items: center; }
.compact-check input { width: auto; min-height: auto; }
.timing button { width: 100%; margin-top: 4px; }
button,.button-link { border: 0; border-radius: 9px; background: linear-gradient(135deg, #ef3029, #d9141a); color: #fff; min-height: 36px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; cursor: pointer; box-shadow: 0 10px 20px rgba(217,20,26,.18); }
button:hover,.button-link:hover { background: var(--red-dark); color: #fff; }
.secondary,.secondary-link { background: #3667e8; box-shadow: 0 10px 20px rgba(54,103,232,.18); }
.success,.success-link { background: #2eaf4a; box-shadow: 0 10px 20px rgba(46,175,74,.18); }
.danger,.danger-link { background: #df2d2d; }
.warning-link { background: #f59e0b; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; }
.actions form { margin: 0; }
.pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 18px; min-height: 24px; padding: 4px 10px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.pill.blue { background: #dbeafe; color: #0b54c7; border: 1px solid #93c5fd; }
.pill.cyan { background: #dff8ff; color: #06758c; border: 1px solid #9ee7f5; }
.pill.amber { background: #fff4bf; color: #92400e; border: 1px solid #facc15; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.pill.soft { background: #eef2f7; color: #001f45; border: 1px solid #d8dee8; }
.led { width: 15px; height: 15px; display: inline-block; border-radius: 50%; box-shadow: inset 0 -2px 4px rgba(0,0,0,.2), 0 0 8px currentColor; }
.led.green { background: #57d12f; color: #57d12f; }
.led.red { background: #ef3b2d; color: #ef3b2d; }
.led.yellow { background: #facc15; color: #facc15; }
.copy-lines { display: grid; gap: 5px; min-width: 300px; }
.compact-links { min-width: 112px; max-width: 140px; }
.compact-links details { position: relative; }
.compact-links summary { cursor: pointer; list-style: none; border: 1px solid #cfd7e3; border-radius: 7px; min-height: 34px; display: grid; place-items: center; padding: 7px 10px; background: #fff; color: #0f3159; font-size: 12px; font-weight: 900; }
.compact-links summary::-webkit-details-marker { display: none; }
.compact-links details[open] summary { background: #eef6ff; border-color: #93c5fd; }
.compact-links details[open] { z-index: 50; }
.compact-links label { display: grid; gap: 4px; margin-top: 7px; font-size: 11px; color: #38506b; text-align: left; }
.compact-links input { min-height: 32px; font-size: 11px; padding: 6px 8px; }
.link-popover { position: absolute; top: calc(100% + 6px); right: 0; width: min(460px, 52vw); display: grid; gap: 8px; padding: 10px; border: 1px solid #cfd7e3; border-radius: 8px; background: #fff; box-shadow: 0 18px 36px rgba(15,23,42,.2); }
.link-popover label { margin: 0; }
.notice-panel { background: #fff8df; border-color: #facc15; }
.status-version { display: inline-block; margin-top: 8px; padding: 6px 10px; border-radius: 6px; background: #101827; color: #b8d7ff; font-size: 12px; font-weight: 800; }
.alert { margin: 10px 0; padding: 10px 12px; border-radius: 6px; border: 1px solid #fecaca; background: #fff1f2; color: #991b1b; font-weight: 800; }
.code-line { background: #f5f6f9; border: 1px solid #d8dee8; border-radius: 6px; padding: 12px; overflow-wrap: anywhere; font-family: Consolas, monospace; }
.hint-box { background: #eef6ff; border: 1px solid #bfdcff; border-left: 4px solid var(--blue); border-radius: 6px; color: #12395f; padding: 10px 12px; font-size: 13px; }
.settings-layout { display: grid; grid-template-columns: repeat(2, minmax(360px, 1fr)); gap: 22px; margin: 22px 40px; align-items: start; }
.settings-stack { display: grid; gap: 22px; min-width: 0; }
.settings-card { margin: 0; padding: 18px; }
.full-settings-card { grid-column: 1 / -1; }
.settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; border-bottom: 1px solid #e5e9f0; padding-bottom: 12px; }
.settings-card-head h2 { margin: 8px 0 0; }
.settings-form { display: grid; gap: 14px; }
.settings-form label { display: grid; gap: 7px; }
.settings-form .check { display: flex !important; }
.settings-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 14px; }
.server-resource-mini { display: grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); gap: 6px; margin-top: 8px; min-width: 260px; }
.server-resource-mini span { background: #f5f7fb; border: 1px solid #d8dee8; border-radius: 6px; padding: 5px 7px; font-size: 11px; font-weight: 850; color: #38506b; }
.server-resource-mini strong { display: block; color: #001f45; font-size: 13px; margin-top: 2px; }
.server-resource-mini small { grid-column: 1 / -1; color: #b91c1c; overflow-wrap: anywhere; }
.permission-list { min-width: 220px; max-width: 360px; color: #38506b; font-size: 12px; font-weight: 750; line-height: 1.35; }
.compact-form { grid-template-columns: minmax(240px, 1fr) auto; align-items: end; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.server-select-row { margin: 0 0 20px; }
.server-select-row select { background: #fffdf0; }
.events-menu { position: relative; }
.events-menu summary { list-style: none; cursor: pointer; border: 1px solid #cfd7e3; border-radius: 9px; min-height: 36px; padding: 8px 14px; background: #fff; font-weight: 800; }
.events-menu summary::-webkit-details-marker { display: none; }
.events-menu[open] summary { background: #f8fafc; }
.events-menu[open] { z-index: 20; }
.events-menu a { display: block; color: #111827; padding: 11px 14px; white-space: nowrap; }
.events-menu form { margin: 0; background: #fff; border-left: 1px solid #d8dee8; border-right: 1px solid #d8dee8; }
.events-menu form button { width: 100%; justify-content: flex-start; border-radius: 0; box-shadow: none; background: #fff; color: #111827; padding: 11px 14px; min-height: 38px; }
.events-menu form button:hover { background: #fff4bf; color: #001f45; }
.events-menu a:hover { background: #fff4bf; color: #001f45; }
.events-menu[open]::after { content: none; }
.events-menu[open] > a:first-of-type { border-top: 1px solid #edf0f5; }
.events-menu[open] > a { background: #fff; border-left: 1px solid #d8dee8; border-right: 1px solid #d8dee8; }
.events-menu[open] > a:last-child { border-bottom: 1px solid #d8dee8; border-radius: 0 0 10px 10px; box-shadow: 0 18px 30px rgba(15,23,42,.16); }
.epg-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 7px; font-size: 10px; font-weight: 900; color: #fff; background: #ef4444; transform: rotate(-14deg); border-radius: 2px; }
.epg-badge.open { background: #31bf5b; }
.sync-status { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; color: #0f172a; background: #e2e8f0; text-transform: uppercase; }
.sync-running, .sync-queued { color: #075985; background: #bae6fd; }
.sync-pending { color: #92400e; background: #fde68a; }
.sync-done { color: #166534; background: #bbf7d0; }
.sync-failed { color: #991b1b; background: #fecaca; }
.sync-cancelled { color: #475569; background: #e2e8f0; }
.sync-progress { width: 150px; max-width: 100%; height: 9px; margin: 7px auto 3px; overflow: hidden; border-radius: 999px; background: #e5e7eb; box-shadow: inset 0 0 0 1px #dbe3ee; }
.sync-progress > div { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #1683ff, #34d399); transition: width .25s ease; }
.channel-action-menu { display: inline-grid; grid-template-columns: minmax(118px, 1fr) auto; gap: 6px; align-items: center; width: 100%; max-width: 210px; margin: 0; }
.channel-action-menu select { min-height: 34px; padding: 6px 28px 6px 10px; border: 1px solid #cfd7e3; border-radius: 7px; background: #fff; color: #0f172a; font-size: 12px; font-weight: 850; }
.channel-action-menu button { min-height: 34px; padding: 7px 10px; border-radius: 7px; box-shadow: none; }
.table-wrap .channel-action-menu { min-width: 0; }
.channel-bulk-toolbar { align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #dfe6f0; border-radius: 8px; background: #f8fafc; }
.bulk-action-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.bulk-action-form select { width: 220px; min-height: 36px; font-size: 13px; font-weight: 850; }
.bulk-action-form button { min-height: 36px; box-shadow: none; }
.channels-table-wrap { overflow: visible; }
.channels-table { table-layout: fixed; min-width: 1220px; }
.channels-table th,.channels-table td { padding: 7px 8px; font-size: 12px; }
.channels-table th:nth-child(2) { width: 190px; }
.channels-table th:nth-child(3) { width: 170px; }
.channels-table th:nth-child(4) { width: 190px; }
.channels-table th:nth-child(5) { width: 280px; }
.channels-table th:nth-child(6) { width: 58px; }
.channels-table th:nth-child(7) { width: 120px; }
.channels-table th:nth-child(8) { width: 215px; }
.select-col { width: 42px !important; min-width: 42px; }
.select-col input { width: auto; min-height: auto; }
.channel-name-cell { text-align: left; overflow-wrap: anywhere; }
.channel-name-cell strong { display: block; font-size: 13px; color: #0d1b2f; }
.channel-name-cell small { display: block; margin-top: 4px; color: #697386; line-height: 1.3; }
.playing-cell { display: grid; gap: 6px; justify-items: center; }
.playing-cell small { color: #38506b; font-weight: 850; }
.details-cell { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: center; }
.details-cell small { flex: 1 1 100%; color: #38506b; font-weight: 750; line-height: 1.35; }
.status-cell { text-align: center; }
.channel-links-cell { position: relative; overflow: visible; }
.channels-table td.actions { overflow: visible; }
.channels-table .pill { min-height: 22px; padding: 3px 8px; font-size: 11px; }
.channels-table .sync-progress { width: 126px; }
.channels-table .sync-status { min-width: 62px; font-size: 10px; padding: 3px 7px; }
.channels-table .epg-badge { transform: none; font-size: 9px; padding: 3px 5px; }
.studio-layout { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.35fr); gap: 24px; margin: 22px 40px; align-items: start; }
.studio-layout .panel { margin: 0; }
.studio-panel { min-width: 0; }
.playlist-filter-panel { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px) minmax(240px, 360px); gap: 14px; align-items: end; }
.playlist-filter-panel .muted { margin: 4px 0 0; }
.playlist-filter-panel label { display: grid; gap: 6px; }
.form-stack { display: grid; gap: 12px; }
.form-stack label { display: grid; gap: 7px; color: #111827; }
.form-stack .check { display: flex !important; }
.profile-picker span { border-radius: 6px; background: #fff7c7; border-color: #f1df6c; }
.library-table td { text-align: center; }
.library-table .text-left { text-align: left; min-width: 250px; }
.library-table .text-left input { margin-top: 7px; min-height: 34px; font-size: 12px; }
.playlist-table { table-layout: fixed; min-width: 980px; }
.playlist-table th:nth-child(1) { width: 82px; }
.playlist-table th:nth-child(2) { width: 360px; }
.playlist-table th:nth-child(3) { width: 300px; }
.playlist-table th:nth-child(4) { width: 180px; }
.playlist-table th:nth-child(5) { width: 80px; }
.playlist-table th:nth-child(6) { width: 100px; }
.title-input-cell input { min-width: 320px; font-size: 14px; font-weight: 850; }
.available-video-table { table-layout: fixed; min-width: 1040px; }
.available-video-table th:nth-child(1) { width: 46px; }
.available-video-table th:nth-child(2) { width: 260px; }
.available-video-table th:nth-child(3) { width: 170px; }
.available-video-table th:nth-child(4) { width: 90px; }
.available-video-table th:nth-child(5) { width: 100px; }
.available-video-table th:nth-child(6) { width: 80px; }
.available-video-table th:nth-child(7) { width: 260px; }
.advanced-row td { background: #f8fafc; padding: 8px 12px; }
.advanced-item { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; align-items: end; }
.advanced-item label { display: grid; gap: 5px; font-size: 12px; color: #41516a; }
.advanced-item .title-wide { grid-column: 1 / -1; font-size: 13px; color: #10233f; }
.advanced-item .title-wide input { min-height: 44px; font-size: 15px; font-weight: 800; }
.recommend-box { margin-top: 16px; border: 1px solid #e4e9f1; border-radius: 6px; padding: 14px; }
.recommend-box h3 { margin: 0 0 12px; font-size: 17px; }
.three-cols { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 12px; }
.sticky-save { position: sticky; bottom: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 4px solid var(--red); }
.production-settings { gap: 16px; }
.settings-console { border-top: 4px solid #101827; }
.settings-group { display: grid; gap: 12px; padding: 14px; border: 1px solid #dfe6f0; border-radius: 8px; background: #fbfcfe; }
.settings-group h3 { margin: 0; padding-bottom: 9px; border-bottom: 1px solid #e5eaf2; color: #0f3159; font-size: 13px; text-transform: uppercase; font-weight: 950; }
.settings-group .hint-box { margin: 0; }
.settings-group .wide { grid-column: 1 / -1; display: grid !important; grid-template-columns: 1fr; }
.settings-card.full-settings-card { margin-top: 0; }
.settings-layout-pro { grid-template-columns: minmax(280px, .72fr) minmax(620px, 1.28fr); }
.settings-sidebar-stack .settings-card { position: sticky; top: 112px; }
.pro-disclosure { display: block; padding: 0; overflow: hidden; }
.pro-disclosure > summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border: 1px solid #dfe6f0; border-radius: 8px; background: linear-gradient(180deg, #fff, #f7f9fc); color: #0d1b2f; font-weight: 950; }
.pro-disclosure > summary::-webkit-details-marker { display: none; }
.pro-disclosure > summary small { color: #697386; font-size: 12px; font-weight: 800; text-align: right; }
.pro-disclosure[open] > summary { border-color: #9bc7ff; box-shadow: inset 4px 0 0 var(--blue); }
.pro-disclosure > :not(summary) { margin: 12px; }
.compact-admin-panel { padding: 12px; }
.pro-table { table-layout: fixed; min-width: 920px; }
.pro-table th,.pro-table td { padding: 8px 9px; font-size: 12px; }
.pro-table input,.pro-table select { min-height: 34px; font-size: 12px; padding: 6px 8px; }
.compact-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.header-actions,.ftp-action-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ftp-action-bar { padding: 10px; border: 1px solid #dfe6f0; border-radius: 8px; background: #f8fafc; margin-bottom: 12px; }
.inline-create { min-width: 230px; }
.inline-create > summary { list-style: none; min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 9px; background: #3667e8; color: #fff; font-weight: 900; cursor: pointer; }
.inline-create > summary::-webkit-details-marker { display: none; }
.inline-create form { margin-top: 8px; display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 8px; }
.action-stack { min-width: 170px; }
.install-status-cell { display: grid; gap: 5px; justify-items: center; }
.install-state { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 950; background: #e2e8f0; color: #334155; }
.install-state.running { background: #dff8ff; color: #06758c; border: 1px solid #9ee7f5; }
.install-state.done { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.play-channel-button:disabled { background: #94a3b8; color: #e2e8f0; cursor: not-allowed; box-shadow: none; }
.stream-player-panel { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(15,23,42,.64); }
.stream-player-panel[hidden] { display: none; }
.stream-player-card { width: min(980px, calc(100vw - 48px)); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 30px 90px rgba(0,0,0,.38); padding: 16px; }
.stream-player-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid #e5eaf2; margin-bottom: 12px; }
.stream-player-head h2 { margin: 6px 0 0; }
.stream-player-card video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #020617; border-radius: 6px; }
.epg-table th:nth-child(1) { width: 210px; }
.epg-table th:nth-child(2) { width: 110px; }
.epg-table th:nth-child(4) { width: 90px; }
.epg-table th:nth-child(6) { width: 130px; }
.topbar { position: sticky; top: 0; z-index: 9; }
.top-tabs { overflow-x: auto; max-width: calc(100vw - 440px); }
.top-tabs a { white-space: nowrap; }
.panel h2,.server-box h2 { color: #0d1b2f; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--login-bg-color, #101827); padding: 24px; position: relative; overflow: hidden; }
.login-page::before { content: ""; position: fixed; inset: 0; background: radial-gradient(circle at 20% 15%, rgba(22,131,255,.22), transparent 28%), linear-gradient(135deg, rgba(16,24,39,.98), rgba(35,44,60,.9)); pointer-events: none; }
.login-photo-bg::before { background: linear-gradient(135deg, rgba(8,13,23,.82), rgba(15,23,42,.66)), var(--login-bg-image) center/cover no-repeat; }
.login-card { width: min(430px, 100%); background: rgba(255,255,255,.96); padding: 28px; border-radius: 10px; border: 1px solid rgba(255,255,255,.55); border-top: 5px solid var(--red); box-shadow: 0 26px 70px rgba(0,0,0,.28); display: grid; gap: 13px; position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid #e5eaf2; margin-bottom: 2px; }
.login-brand img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid #dfe6f0; padding: 5px; }
.login-brand span { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #ef3029, #ff9b2f); color: #101827; font-weight: 950; font-size: 18px; }
.login-brand h1 { margin: 0; font-size: 24px; color: #0d1b2f; }
.login-brand p { margin: 4px 0 0; color: #697386; font-weight: 800; }
@media (max-width: 980px) {
  .sidebar { position: static; width: 100%; border-right: 0; border-bottom: 4px solid var(--red); }
  .brand { height: 80px; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(120px,1fr)); display: grid; }
  .main { margin-left: 0; }
  .topbar { height: auto; padding: 14px; display: grid; gap: 12px; }
  .panel,.server-box,.metrics.compact { margin: 16px; }
  .studio-layout { grid-template-columns: 1fr; margin: 16px; }
  .channel-create-pro { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; margin: 16px; }
  .top-tabs { max-width: 100%; padding: 0 8px; }
  .settings-grid-2,.compact-form { grid-template-columns: 1fr; }
  .advanced-item,.three-cols { grid-template-columns: 1fr; }
  .form-grid,.wide { grid-template-columns: 1fr; }
}

/* Professional operations UI refresh - keeps behavior intact, fixes broken table flow. */
:root {
  --bg: #eef2f6;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #d8e0ea;
  --sidebar: #171d25;
  --sidebar-soft: #111820;
  --red: #e31b23;
  --red-dark: #bd1018;
  --blue: #1576e8;
  --cyan: #10a7c7;
  --green: #22a447;
}
body {
  background: #eef2f6;
  color: var(--text);
  font-size: 14px;
}
.sidebar {
  width: 280px;
  border-right: 4px solid var(--red);
  box-shadow: 12px 0 30px rgba(15, 23, 42, .10);
}
.main {
  margin-left: 280px;
}
.brand {
  height: 104px;
  padding: 0 24px;
  gap: 12px;
  font-size: 27px;
  line-height: 1.05;
}
.brand > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar a {
  min-height: 54px;
  padding: 0 24px;
  gap: 14px;
  font-size: 14px;
}
.sidebar a span {
  width: 28px;
  font-size: 12px;
  font-weight: 950;
}
.version-badge {
  margin: 16px 22px;
  padding: 9px 11px;
  border-radius: 7px;
}
.topbar {
  height: 82px;
  padding: 0 28px;
  border-bottom: 1px solid #e3e8ef;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}
.top-tabs {
  height: 56px;
  max-width: calc(100vw - 430px);
  gap: 6px;
  padding: 0 12px;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
.top-tabs a {
  border-radius: 11px;
  padding: 11px 15px;
  font-size: 11px;
}
.account-pill {
  min-width: 150px;
  justify-content: flex-end;
}
.page-head {
  margin: 0;
  min-height: 58px;
  padding: 10px 32px;
}
.page-head h1 {
  font-size: 21px;
}
.page-head p {
  margin-top: 2px;
}
.messages {
  margin: 16px 28px 0;
}
.panel,
.server-box,
.metrics.compact {
  margin: 18px 28px;
}
.panel,
.server-box {
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .07);
}
.panel {
  padding: 16px;
}
.server-box {
  padding: 18px;
}
.server-title {
  margin-bottom: 16px;
  font-size: 18px;
}
.metrics {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 16px;
}
.metrics div {
  min-height: 82px;
  border-radius: 10px;
  border-left-width: 4px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .055);
}
.metrics span {
  margin-bottom: 8px;
  font-size: 12px;
}
.metrics strong {
  font-size: 23px;
}
.toolbar-row,
.panel-title-row,
.ftp-action-bar {
  gap: 10px;
}
.table-search {
  width: min(360px, 100%);
  max-width: 360px;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  background: #fff;
}
table,
.pro-table,
.channels-table,
.playlist-table,
.available-video-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.pro-table,
.channels-table {
  min-width: 0;
}
th,
td,
.pro-table th,
.pro-table td,
.channels-table th,
.channels-table td {
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
}
th,
.pro-table th,
.channels-table th {
  background: #eef3f9;
  color: #08213f;
  font-size: 11px;
  letter-spacing: 0;
}
td {
  word-break: normal;
  overflow-wrap: anywhere;
}
tbody tr:nth-child(odd) {
  background: #f7f8fa;
}
tbody tr:hover {
  background: #fff8df;
}
td.actions,
td.playing-cell,
td.details-cell {
  display: table-cell;
}
td.actions > .channel-action-menu,
td.actions > form,
td.actions > .actions {
  margin-left: auto;
  margin-right: auto;
}
.actions:not(td) {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.channel-create-pro {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.create-group {
  min-width: 0;
}
.create-group input,
.create-group select,
.create-group textarea {
  min-width: 0;
}
.profile-select {
  min-height: 148px;
}
button,
.button-link {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 12px;
  white-space: nowrap;
}
input,
select,
textarea {
  min-height: 36px;
  border-radius: 7px;
  font-size: 13px;
}
.pill {
  min-height: 22px;
  max-width: 100%;
  padding: 3px 8px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.led {
  width: 14px;
  height: 14px;
}
.channels-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}
.channels-table {
  min-width: 1120px;
}
.channels-table th:nth-child(1) { width: 42px; }
.channels-table th:nth-child(2) { width: 185px; }
.channels-table th:nth-child(3) { width: 170px; }
.channels-table th:nth-child(4) { width: 190px; }
.channels-table th:nth-child(5) { width: 265px; }
.channels-table th:nth-child(6) { width: 62px; }
.channels-table th:nth-child(7) { width: 112px; }
.channels-table th:nth-child(8) { width: 200px; }
.channel-name-cell strong {
  font-size: 13px;
}
.channel-name-cell small,
.playing-cell small,
.details-cell small {
  font-size: 10px;
}
.playing-cell .pill {
  display: inline-flex;
  max-width: 150px;
}
.details-cell .pill {
  margin: 2px;
}
.sync-progress {
  width: min(124px, 100%);
}
.compact-links {
  min-width: 0;
  max-width: none;
}
.compact-links summary {
  width: 100%;
  min-height: 32px;
}
.link-popover {
  right: 0;
  width: min(420px, 70vw);
  z-index: 90;
}
.channel-action-menu {
  grid-template-columns: minmax(104px, 1fr) auto;
  width: 100%;
  max-width: 190px;
  gap: 6px;
}
.channel-action-menu select,
.channel-action-menu button {
  min-height: 32px;
  font-size: 11px;
}
.ftp-action-bar {
  align-items: center;
}
.ftp-action-bar form,
.toolbar-row form {
  margin: 0;
}
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-form input[type="file"] {
  max-width: 260px;
  min-height: 34px;
  padding: 6px;
  background: #fff;
}
.ftp-table th:nth-child(1) { width: 80px; }
.ftp-table th:nth-child(3) { width: 120px; }
.ftp-table th:nth-child(4) { width: 150px; }
.ftp-table th:nth-child(5) { width: 240px; }
.action-stack {
  min-width: 0;
}
.action-stack a,
.action-stack button,
.action-stack form {
  width: auto;
}
.stream-player-panel {
  backdrop-filter: blur(2px);
}
.stream-player-card {
  width: min(1040px, calc(100vw - 52px));
}
.stream-player-card video {
  max-height: 72vh;
}
.settings-layout,
.studio-layout {
  margin: 18px 28px;
}
@media (max-width: 1320px) {
  .channel-create-pro {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-layout-pro,
  .settings-layout,
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .settings-sidebar-stack .settings-card {
    position: static;
  }
}
@media (max-width: 980px) {
  .sidebar {
    width: 100%;
  }
  .main {
    margin-left: 0;
  }
  .top-tabs {
    max-width: 100%;
  }
  .channel-create-pro {
    grid-template-columns: 1fr;
  }
  .panel,
  .server-box,
  .metrics.compact {
    margin: 14px;
  }
}

/* VOD operations theme inspired by the supplied admin screenshots. */
:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e1e5eb;
  --sidebar: #071d63;
  --sidebar-soft: #0a276f;
  --red: #e31b23;
  --blue: #0a4fb3;
  --blue-soft: #eaf1ff;
}
body {
  background: #f4f6fa;
  color: #222b37;
  font-size: 13px;
}
.sidebar {
  width: 238px;
  background: linear-gradient(180deg, #071d63 0%, #06184f 100%);
  border-right: 0;
  box-shadow: 8px 0 22px rgba(6, 24, 79, .18);
  overflow-y: auto;
}
.main {
  margin-left: 238px;
}
.brand {
  height: 86px;
  padding: 0 18px;
  color: #fff;
  font-size: 20px;
  text-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo {
  width: 38px;
  height: 38px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  color: #fff;
  background: #0ea5e9;
}
.sidebar nav {
  padding: 12px 12px 20px;
  gap: 3px;
}
.nav-section-label {
  margin: 14px 0 6px;
  padding: 0 2px;
  color: rgba(255,255,255,.48);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.sidebar a {
  min-height: 38px;
  padding: 0 11px;
  gap: 9px;
  border: 0;
  border-radius: 6px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 750;
}
.sidebar a span {
  width: 24px;
  color: rgba(255,255,255,.68);
  font-size: 11px;
}
.sidebar a.active {
  background: #fff;
  color: #071d63;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}
.sidebar a.active span {
  color: #071d63;
}
.sidebar a:hover:not(.active) {
  background: rgba(255,255,255,.10);
  color: #fff;
}
.version-badge {
  margin: 8px 12px 16px;
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.58);
  font-size: 10px;
}
.topbar {
  height: 66px;
  padding: 0 30px;
  background: #fff;
  border-bottom: 1px solid #dfe4eb;
  box-shadow: none;
}
.top-tabs {
  height: 44px;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.top-tabs a,
.top-tabs a:first-child {
  min-height: 34px;
  padding: 9px 13px;
  border-radius: 5px;
  background: transparent;
  color: #0f2e66;
  font-size: 11px;
  font-weight: 800;
}
.top-tabs a:hover {
  background: #eef4ff;
}
.account-pill {
  border-left: 1px solid #e5e7eb;
  color: #111827;
}
.brand-dot {
  width: 32px;
  height: 32px;
  background: #ff6b2b;
  color: #111827;
}
.page-head {
  min-height: 58px;
  padding: 14px 28px;
  background: transparent;
  color: #1f2937;
  border-bottom: 1px solid #e3e7ee;
}
.page-head h1 {
  color: #2b3442;
  font-size: 20px;
  font-weight: 650;
}
.page-head p {
  color: #6b7280;
}
.live-sync {
  background: #eef4ff;
  color: #0a4fb3;
  border-color: #cddcff;
}
.messages {
  margin: 14px 28px 0;
  border-radius: 4px;
}
.panel,
.server-box,
.metrics.compact {
  margin: 18px 28px;
}
.panel,
.server-box {
  border: 1px solid #dfe4eb;
  border-radius: 5px;
  box-shadow: none;
}
.panel {
  padding: 16px;
}
.panel h2,
.server-box h2,
.server-title {
  color: #2b3442;
  font-size: 17px;
  font-weight: 650;
}
.server-box {
  border-top: 1px solid #dfe4eb;
}
.metrics {
  gap: 14px;
}
.metrics div {
  min-height: 76px;
  border: 1px solid #dfe4eb;
  border-left: 4px solid #0b63ce;
  border-radius: 6px;
  box-shadow: none;
}
.metrics span {
  color: #0d3572;
  font-size: 11px;
}
.metrics strong {
  font-size: 21px;
}
.toolbar-row,
.panel-title-row,
.ftp-action-bar {
  margin-bottom: 12px;
  padding: 0;
}
.channel-bulk-toolbar,
.ftp-action-bar {
  padding: 10px;
  border-radius: 4px;
  background: #f8fafc;
}
.table-wrap {
  border: 1px solid #dfe4eb;
  border-radius: 4px;
}
table,
.pro-table,
.channels-table,
.playlist-table,
.available-video-table {
  table-layout: fixed;
  background: #fff;
}
th,
td,
.pro-table th,
.pro-table td,
.channels-table th,
.channels-table td {
  padding: 8px 9px;
  border-color: #e3e7ee;
  font-size: 12px;
}
th,
.pro-table th,
.channels-table th {
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}
tbody tr:nth-child(odd) {
  background: #f1f1f1;
}
tbody tr:nth-child(even) {
  background: #fff;
}
tbody tr:hover {
  background: #edf4ff;
}
button,
.button-link {
  min-height: 32px;
  border-radius: 4px;
  background: #5d6875;
  box-shadow: none;
  font-size: 12px;
}
button:hover,
.button-link:hover {
  background: #46515e;
}
.secondary,
.secondary-link {
  background: #0b63ce;
}
.success,
.success-link {
  background: #16a34a;
}
.danger,
.danger-link {
  background: #dc2626;
}
input,
select,
textarea {
  min-height: 34px;
  border-radius: 3px;
  border-color: #dfe4eb;
  font-size: 12px;
}
.create-group,
.settings-group {
  border-radius: 4px;
  background: #fbfcfe;
}
.section-pill,
.pill {
  border-radius: 999px;
}
.channels-table {
  min-width: 1180px;
}
.channels-table th:nth-child(2) { width: 170px; }
.channels-table th:nth-child(3) { width: 150px; }
.channels-table th:nth-child(4) { width: 180px; }
.channels-table th:nth-child(5) { width: 250px; }
.channels-table th:nth-child(7) { width: 104px; }
.channels-table th:nth-child(8) { width: 185px; }
.channel-action-menu {
  max-width: 175px;
}
.channel-action-menu select,
.channel-action-menu button {
  border-radius: 4px;
}
.compact-links summary {
  border-radius: 4px;
}
.link-popover {
  border-radius: 5px;
}
.ftp-table th:nth-child(2) {
  width: auto;
}
.ftp-table th:nth-child(5) {
  width: 230px;
}
.settings-layout,
.studio-layout {
  margin: 18px 28px;
}
.stream-player-card {
  border-radius: 6px;
}
.row-actions-menu {
  display: inline-block;
  position: relative;
  min-width: 104px;
  text-align: left;
}
.row-actions-menu > summary {
  list-style: none;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cfd7e3;
  border-radius: 4px;
  background: #5d6875;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.row-actions-menu > summary::-webkit-details-marker {
  display: none;
}
.row-actions-menu[open] {
  z-index: 120;
}
.row-actions-menu[open] > summary {
  background: #46515e;
}
.row-actions-menu > a,
.row-actions-menu > form,
.row-actions-menu > span,
.row-actions-menu > button {
  display: block;
  margin: 0;
  background: #fff;
  border-left: 1px solid #dfe4eb;
  border-right: 1px solid #dfe4eb;
}
.row-actions-menu > a,
.row-actions-menu > span {
  color: #1f2937;
  padding: 9px 12px;
  font-weight: 750;
}
.row-actions-menu > form button,
.row-actions-menu > button {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  border-radius: 0;
  background: #fff;
  color: #1f2937;
  box-shadow: none;
}
.row-actions-menu > form button:hover,
.row-actions-menu > button:hover,
.row-actions-menu > a:hover {
  background: #edf4ff;
  color: #0a4fb3;
}
.row-actions-menu > form:last-child,
.row-actions-menu > a:last-child,
.row-actions-menu > button:last-child {
  border-bottom: 1px solid #dfe4eb;
}
.inline-edit-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.compact-cell input {
  min-width: 0;
}
.users-table { min-width: 1280px; }
.users-table th:nth-child(1) { width: 95px; }
.users-table th:nth-child(2) { width: 135px; }
.users-table th:nth-child(4) { width: 120px; }
.users-table th:nth-child(5) { width: 150px; }
.users-table th:nth-child(6) { width: 190px; }
.users-table th:nth-child(8) { width: 70px; }
.users-table th:nth-child(9) { width: 70px; }
.users-table th:nth-child(10) { width: 250px; }
.users-table th:nth-child(11) { width: 120px; }
.lb-table { min-width: 1120px; }
.lb-table th:nth-child(1) { width: 160px; }
.lb-table th:nth-child(2) { width: 220px; }
.lb-table th:nth-child(3) { width: 300px; }
.lb-table th:nth-child(5) { width: 150px; }
.lb-table th:nth-child(7) { width: 145px; }
.servers-table { min-width: 1060px; }
.servers-table th:last-child { width: 140px; }
.rsync-table { min-width: 980px; }
.rsync-table th:nth-child(1) { width: 180px; }
.rsync-table th:nth-child(4) { width: 170px; }
.rsync-table th:nth-child(6) { width: 130px; }
.security-table { min-width: 860px; }
.security-log-table { min-width: 1080px; }
.security-log-table th:nth-child(8) { width: 120px; }
.backup-table { min-width: 940px; }
.backup-table th:nth-child(1) { width: 300px; }
.backup-table th:nth-child(6) { width: 120px; }
.profiles-table { min-width: 820px; }
.epg-table { min-width: 940px; }
.dashboard-channels-table { min-width: 920px; }
.dashboard-channels-table th:nth-child(7) { width: 90px; }
.bouquets-table { min-width: 840px; }
.user-direct-links-table { min-width: 760px; }
.logo-recommend-table { min-width: 520px; }
.migration-status {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d9e2ef;
  border-radius: 6px;
  background: #f8fbff;
}
.migration-head,
.step-top,
.step-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.migration-head {
  margin-bottom: 12px;
}
.migration-head small,
.migration-step-card small {
  display: block;
  color: #536276;
  line-height: 1.35;
}
.migration-head small {
  max-height: 54px;
  overflow: auto;
}
.migration-step-card small {
  max-height: 72px;
  overflow: auto;
  word-break: break-word;
}
.migration-head .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.migration-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}
.migration-step-card {
  min-height: 128px;
  padding: 12px;
  border: 1px solid #dce5f1;
  border-left: 4px solid #2684ff;
  border-radius: 6px;
  background: #fff;
}
.progress-line {
  height: 8px;
  overflow: hidden;
  margin: 10px 0 7px;
  border-radius: 999px;
  background: #e7edf5;
}
.progress-line span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2088ff, #44d7b6);
  transition: width .25s ease;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9eef6;
  color: #233044;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.status-running,
.status-queued {
  background: #dbeafe;
  color: #0755b8;
}
.status-done {
  background: #d8f8e6;
  color: #08743e;
}
.status-failed,
.status-interrupted {
  background: #ffe0e0;
  color: #b42318;
}
@media (max-width: 1220px) {
  .migration-steps-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}
@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: 100%;
  }
  .main {
    margin-left: 0;
  }
  .sidebar nav {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
  .nav-section-label {
    grid-column: 1 / -1;
  }
  .migration-steps-grid {
    grid-template-columns: 1fr;
  }
}
