:root {
    --primary: #8e44ad;
    --primary-dark: #73368d;
    --background: #ecf0f1;
    --surface: #ffffff;
    --surface-muted: #f7f8f9;
    --border: #dce2e5;
    --text: #263238;
    --muted: #718087;
    --success: #1e9e67;
    --danger: #d64550;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--background); color: var(--text); }
button, input, select { font: inherit; }
a { color: inherit; }
.app-body { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 7px; background: var(--primary); color: #fff; font-size: 20px; font-weight: 900; }
.brand span:last-child { display: flex; flex-direction: column; }
.brand strong { font-size: 17px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; margin-top: 42px; }
.sidebar nav a { padding: 11px 13px; border-radius: 5px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.sidebar nav a:hover { color: var(--primary); background: #f5eef8; }
.sidebar nav a.active { color: #fff; background: var(--primary); }
.sidebar-foot { margin-top: auto; padding: 18px 7px 0; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.link-button { padding: 0; border: 0; background: none; color: var(--primary); cursor: pointer; }
.page { min-width: 0; padding: 40px clamp(22px, 4vw, 58px); }
.page > footer { padding-top: 34px; text-align: center; font-size: 12px; }
.credit-link { color: var(--primary); text-decoration: none; font-weight: 700; }
.credit-link:hover { text-decoration: underline; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: 1.6px; }
.page-head h1, .login-copy h1 { margin: 7px 0 5px; font-size: 32px; letter-spacing: -.8px; }
.page-head p, .login-copy p, .panel-head p { margin: 0; color: var(--muted); font-size: 14px; }
.button { padding: 10px 16px; border: 1px solid transparent; border-radius: 5px; color: #fff; cursor: pointer; font-size: 13px; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button.primary { background: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { color: var(--text); background: #fff; border-color: #cfd7da; }
.button.secondary:hover { background: #f5f6f7; }
.button.danger-soft { color: var(--danger); background: #fff; border-color: #edc9ce; }
.button.compact { padding: 7px 10px; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 13px; margin-bottom: 20px; }
.metrics article { position: relative; padding: 18px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); display: flex; flex-direction: column; gap: 7px; }
.metrics span, .metrics small { color: var(--muted); font-size: 12px; }
.metrics strong { font-size: 27px; letter-spacing: -.8px; }
.metrics strong small { margin-left: 3px; font-size: 14px; }
.metrics .metric-rate { font-size: 21px; letter-spacing: -.4px; }
.metrics .dot { position: absolute; top: 19px; right: 18px; width: 9px; height: 9px; border-radius: 50%; background: #aab3b7; }
.metrics .dot.online { background: var(--success); }
.panel { padding: 21px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.panel.narrow { max-width: 720px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.search { width: 230px; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 13px; }
.channel-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-muted); }
.channel-top { display: grid; grid-template-columns: 49px 1fr auto; gap: 12px; align-items: center; }
.channel-top img { width: 49px; height: 49px; padding: 5px; border: 1px solid var(--border); border-radius: 5px; background: #fff; object-fit: contain; }
.channel-top h3 { margin: 0 0 6px; font-size: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: #9ba7ac; }
.badge.active { color: var(--success); }
.badge.active i { background: var(--success); }
.icon-button { padding: 4px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; }
.channel-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 17px 0; }
.channel-card dl div { min-width: 0; }
.channel-card dt { margin-bottom: 4px; color: #8b989e; font-size: 10px; text-transform: uppercase; }
.channel-card dd { margin: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.stream-link { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.stream-link code { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stream-link button { margin-left: auto; padding: 0; border: 0; background: none; color: var(--primary); cursor: pointer; font-size: 10px; }
.ingest-box { margin: 14px 0 9px; padding: 10px; border: 1px solid #d9c5e2; border-radius: 5px; background: #f7f0fa; }
.ingest-box > small { display: block; margin-bottom: 6px; color: var(--primary); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.ingest-box > div { display: grid; grid-template-columns: 45px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 4px 0; }
.ingest-box span { color: var(--muted); font-size: 9px; }
.ingest-box code { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ingest-box button { padding: 0; border: 0; background: none; color: var(--primary); cursor: pointer; font-size: 9px; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions .button { padding: 8px 12px; }
.channel-actions { align-items: center; }
.channel-actions .stats-button { margin-right: auto; background: #f0e5f4; color: var(--primary-dark); }
.channel-summary { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; padding: 13px 17px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 12px; }
.channel-summary span { display: inline-flex; align-items: center; gap: 7px; }
.channel-summary strong { color: var(--text); font-size: 15px; }
.channel-summary .dot { width: 7px; height: 7px; border-radius: 50%; background: #aab3b7; }
.channel-summary .dot.online { background: var(--success); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 18px; }
.operational-alerts { margin-bottom: 18px; }
.operational-alerts .panel-head { margin-bottom: 13px; }
.monitor-ok { margin: 0; padding: 12px; border-radius: 5px; background: #e7f5ee; color: #18734d; font-size: 12px; }
.monitor-alert-list { display: grid; gap: 8px; }
.monitor-alert { padding: 11px 13px; border-left: 3px solid #d89a15; border-radius: 4px; background: #fffaf0; display: flex; flex-direction: column; gap: 3px; }
.monitor-alert.critical { border-color: var(--danger); background: #fbeaec; }
.monitor-alert strong { font-size: 12px; }
.monitor-alert span { color: var(--muted); font-size: 11px; }
.monitor-http { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 11px; }
.monitor-http strong { color: var(--text); }
.operation-summary .panel-head, .quick-links .panel-head { align-items: flex-start; }
.operation-numbers { display: grid; grid-template-columns: repeat(3, 1fr); margin: 7px 0 22px; border: 1px solid var(--border); border-radius: 6px; }
.operation-numbers div { padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.operation-numbers div + div { border-left: 1px solid var(--border); }
.operation-numbers strong { font-size: 25px; }
.operation-numbers span { color: var(--muted); font-size: 11px; }
.operation-numbers .success-number strong { color: var(--success); }
.quick-links > a { padding: 13px 2px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; color: inherit; text-decoration: none; }
.quick-links > a strong, .quick-links > a span { display: block; }
.quick-links > a span { grid-column: 1; margin-top: 3px; color: var(--muted); font-size: 11px; }
.quick-links > a b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--primary); font-size: 18px; }
.quick-links > a:hover strong { color: var(--primary); }
.channel-stat-head { align-items: center; }
.back-link { display: inline-block; margin-bottom: 15px; color: var(--primary); font-size: 12px; font-weight: 700; text-decoration: none; }
.channel-identity > div { display: flex; align-items: center; gap: 14px; }
.channel-identity img { width: 58px; height: 58px; padding: 5px; border: 1px solid var(--border); border-radius: 7px; background: #fff; object-fit: contain; }
.channel-identity h1 { margin-block: 4px; }
.channel-identity p { max-width: 560px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-actions { display: flex; align-items: center; gap: 8px; }
.health-banner { margin-bottom: 18px; padding: 14px 17px; border: 1px solid var(--border); border-radius: 7px; background: #fff; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.health-banner > i { width: 11px; height: 11px; border-radius: 50%; background: #aab3b7; }
.health-banner > div { display: flex; flex-direction: column; gap: 2px; }
.health-banner > div span { color: var(--muted); font-size: 11px; }
.health-banner.healthy { border-color: #b9dfce; background: #f4fbf7; }
.health-banner.healthy > i { background: var(--success); }
.health-banner.warning { border-color: #ebd39b; background: #fffaf0; }
.health-banner.warning > i { background: #d89a15; }
.health-banner.stopped { border-color: #e2c8cc; background: #fff8f8; }
.stats-metrics strong { font-size: 23px; }
.statistics-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.traffic-panel { min-width: 0; }
.today-total { padding: 6px 9px; border-radius: 4px; background: #f0e5f4; color: var(--primary-dark); font-size: 11px; font-weight: 800; }
.traffic-chart { height: 225px; padding-top: 12px; display: grid; grid-template-columns: repeat(24, 1fr); align-items: end; gap: 4px; border-bottom: 1px solid var(--border); }
.chart-column { height: 100%; display: grid; grid-template-rows: 1fr 24px; gap: 6px; align-items: end; }
.chart-track { height: 100%; display: flex; align-items: end; }
.chart-track i { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--primary); opacity: .78; }
.chart-column:hover .chart-track i { opacity: 1; }
.chart-column span { color: var(--muted); font-size: 8px; text-align: center; }
.traffic-details { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.traffic-details div { display: flex; flex-direction: column; gap: 5px; }
.traffic-details span { color: var(--muted); font-size: 10px; }
.traffic-details strong { font-size: 16px; }
.stats-side { display: grid; gap: 18px; }
.detail-panel .panel-head { margin-bottom: 10px; }
.detail-list { margin: 0; }
.detail-list div { padding: 10px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; }
.detail-list dt { color: var(--muted); font-size: 11px; }
.detail-list dd { margin: 0; font-size: 12px; font-weight: 750; text-align: right; }
.success-text { color: var(--success); }
.danger-text { color: var(--danger); }
.activity-panel { margin-top: 18px; }
.activity-row { padding: 11px 2px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 11px; }
.activity-row > i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.activity-row > div { display: flex; flex-direction: column; gap: 3px; }
.activity-row span { color: var(--muted); font-size: 10px; }
.stats-empty { padding: 50px 20px; color: var(--muted); text-align: center; }
.stats-empty p { max-width: 480px; margin: 7px auto 0; font-size: 12px; }
.empty { grid-column: 1 / -1; padding: 48px 20px; color: var(--muted); text-align: center; }
.empty > span { color: var(--primary); font-size: 34px; }
.empty h3 { margin-bottom: 6px; color: var(--text); }
.empty p { margin-bottom: 20px; }
.modal { width: min(680px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
.modal::backdrop { background: #26323888; }
.modal-head, .modal-actions { display: flex; align-items: center; justify-content: space-between; }
.modal-head { margin-bottom: 21px; }
.modal-head h2 { margin: 6px 0 0; }
.modal-actions { justify-content: flex-end; gap: 10px; margin-top: 21px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.obs-setup { padding: 13px; border: 1px solid #d9c5e2; border-radius: 5px; background: #faf6fc; }
.obs-setup > strong { color: var(--primary-dark); font-size: 13px; }
.obs-setup > p { margin: 6px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.obs-setup > label + label { margin-top: 10px; }
.span-2 { grid-column: span 2; }
label { display: flex; flex-direction: column; gap: 7px; color: #4a585e; font-size: 12px; font-weight: 650; }
label small { color: var(--muted); font-size: 10px; font-weight: 400; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #cfd8dc; border-radius: 5px; outline: none; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
.check { flex-direction: row; align-items: center; }
.check input { width: auto; }
.delete-link { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--danger); cursor: pointer; font-size: 12px; }
.toast, .alert { padding: 12px 15px; border-radius: 5px; margin-bottom: 18px; font-size: 13px; }
.toast { border: 1px solid #b9dfce; background: #e7f5ee; color: #18734d; }
.alert { border: 1px solid #ecc3c8; background: #fbeaec; color: #ad2f3a; }
.login-body { min-height: 100vh; padding: 20px; display: grid; place-items: center; background: var(--background); }
.login-card { width: min(430px, 100%); padding: 37px; border: 1px solid var(--border); border-top: 4px solid var(--primary); border-radius: 7px; background: #fff; }
.login-brand { margin-bottom: 36px; }
.login-copy { margin-bottom: 24px; }
.stack-form { display: flex; flex-direction: column; gap: 16px; }
.login-card .primary { padding: 13px; }
.credits { margin: 27px 0 0; text-align: center; font-size: 11px; }
.settings-form { max-width: 580px; }
.divider { width: 100%; height: 1px; margin: 8px 0; border: 0; background: var(--border); }
.muted { color: var(--muted); font-size: 12px; }
.player-body { min-height: 100vh; overflow: hidden; background: #09070c; color: #fff; }
.player-head { position: fixed; z-index: 30; top: 0; right: 380px; left: 0; height: 84px; border: 0; background: linear-gradient(180deg, rgba(7, 6, 9, .82), transparent); transition: right .28s ease; pointer-events: none; }
.player-head-content { width: 100%; height: 100%; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; }
.player-head .brand, .player-head-actions { pointer-events: auto; }
.player-head .brand { color: #fff; text-shadow: 0 2px 14px #000; }
.player-head .brand-mark { border-radius: 11px; box-shadow: 0 8px 28px rgba(142, 68, 173, .38); }
.player-head-actions, .player-session { display: flex; align-items: center; gap: 14px; }
.customer-name { color: rgba(255, 255, 255, .8); font-size: 12px; font-weight: 700; }
.player-session .link-button { color: #fff; }
.channel-toggle { padding: 9px 13px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px; background: rgba(12, 10, 15, .58); color: #fff; backdrop-filter: blur(12px); cursor: pointer; font-size: 12px; font-weight: 750; }
.channel-toggle span { margin-right: 5px; }
.channel-toggle:hover, .channel-toggle:focus-visible { border-color: rgba(255, 255, 255, .55); background: rgba(142, 68, 173, .72); outline: none; }
.player-page, .player-experience, .video-card, .video-shell { width: 100%; height: 100vh; }
.player-page { margin: 0; padding: 0; }
.player-experience { position: relative; border: 0; border-radius: 0; background: #09070c; overflow: hidden; }
.video-card { min-width: 0; background: #09070c; }
.video-shell { position: relative; overflow: hidden; display: grid; place-items: center; }
.video-shell::after { content: ''; position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 24%, transparent 68%, rgba(0, 0, 0, .52)); pointer-events: none; }
.video-shell video { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-empty { position: relative; z-index: 2; padding: 24px; color: rgba(255, 255, 255, .55); text-align: center; pointer-events: none; }
.video-empty > span { width: 70px; height: 70px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(142, 68, 173, .8); color: #fff; display: inline-grid; place-items: center; padding-left: 4px; font-size: 22px; box-shadow: 0 14px 40px #0008; backdrop-filter: blur(12px); }
.video-empty h2 { margin: 18px 0 6px; color: #fff; font-size: 22px; }
.video-empty p { margin: 0; font-size: 12px; }
.video-message { position: absolute; z-index: 4; top: 94px; left: 50%; max-width: calc(100% - 32px); padding: 10px 13px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; background: rgba(10, 8, 12, .74); color: #fff; font-size: 12px; transform: translateX(-50%); text-align: center; backdrop-filter: blur(14px); }
.video-message button { margin-left: 9px; padding: 5px 8px; border: 0; border-radius: 4px; background: var(--primary); color: #fff; cursor: pointer; font-size: 11px; font-weight: 700; }
.current-channel { position: fixed; z-index: 5; left: 28px; bottom: 28px; width: min(430px, calc(100% - 436px)); min-height: 76px; padding: 11px 14px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 13px; background: rgba(10, 8, 13, .68); color: #fff; display: flex; align-items: center; gap: 13px; box-shadow: 0 15px 45px rgba(0, 0, 0, .3); backdrop-filter: blur(16px); transition: width .28s ease; }
.current-channel img { width: 52px; height: 52px; padding: 4px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 9px; background: #fff; object-fit: contain; }
.current-channel div { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.current-channel small { color: rgba(255, 255, 255, .55); font-size: 9px; letter-spacing: .5px; text-transform: uppercase; }
.current-channel strong { margin: 3px 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.current-channel div span { overflow: hidden; color: rgba(255, 255, 255, .67); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.live-badge { padding: 6px 8px; border-radius: 5px; background: rgba(227, 63, 78, .2); color: #ff7180; font-size: 9px; font-weight: 900; letter-spacing: .7px; }
.player-list { position: fixed; z-index: 20; top: 0; right: 0; width: 380px; height: 100vh; min-height: 0; border-left: 1px solid rgba(255, 255, 255, .13); background: rgba(12, 10, 15, .68); color: #fff; display: flex; flex-direction: column; box-shadow: -18px 0 55px rgba(0, 0, 0, .22); backdrop-filter: blur(22px) saturate(125%); transition: transform .28s ease; }
.player-list-head { padding: 25px 22px 18px; border-bottom: 1px solid rgba(255, 255, 255, .11); display: grid; gap: 15px; }
.player-list-head > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.player-list-head h2 { margin: 0; font-size: 21px; letter-spacing: -.4px; }
.player-list-head p { margin: 0; color: rgba(255, 255, 255, .48); font-size: 10px; }
.channel-search input { padding: 11px 13px; border-color: rgba(255, 255, 255, .14); border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; }
.channel-search input::placeholder { color: rgba(255, 255, 255, .42); }
.channel-search input:focus { border-color: rgba(255, 255, 255, .42); background: rgba(255, 255, 255, .12); }
.player-channels { min-height: 0; padding: 10px; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: rgba(255, 255, 255, .26) transparent; }
.player-channel { width: 100%; min-height: 66px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .76); display: grid; grid-template-columns: 26px 46px minmax(0, 1fr) 20px; align-items: center; gap: 10px; text-align: left; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.player-channel:hover { background: rgba(255, 255, 255, .09); transform: translateX(-2px); }
.player-channel:focus-visible { border-color: rgba(255, 255, 255, .5); outline: none; }
.player-channel.active { border-color: rgba(190, 132, 216, .48); background: linear-gradient(90deg, rgba(142, 68, 173, .48), rgba(142, 68, 173, .18)); color: #fff; }
.channel-number { color: rgba(255, 255, 255, .42); font-size: 10px; text-align: center; }
.player-channel img { width: 46px; height: 46px; padding: 3px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 9px; background: rgba(255, 255, 255, .94); object-fit: contain; }
.channel-copy { min-width: 0; display: flex; flex-direction: column; }
.channel-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.channel-copy small { margin-top: 4px; overflow: hidden; color: rgba(255, 255, 255, .46); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.player-channel i { color: rgba(255, 255, 255, .65); font-size: 9px; font-style: normal; }
.empty-list { padding: 30px 16px; color: rgba(255, 255, 255, .56); text-align: center; font-size: 12px; }
.empty-list button { margin: 14px auto 0; padding: 8px 11px; border: 0; border-radius: 5px; background: var(--primary); color: #fff; display: block; cursor: pointer; }
.player-list .muted { color: rgba(255, 255, 255, .52); }
.channels-collapsed .player-list { transform: translateX(100%); }
.channels-collapsed .player-head { right: 0; }
.channels-collapsed .current-channel { width: min(430px, calc(100% - 56px)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tv-mode .player-head, .tv-mode .player-list { display: none; }
.tv-mode .current-channel { width: min(430px, calc(100% - 56px)); }
.align-end { align-self: end; min-height: 39px; }
.notice { margin-bottom: 18px; padding: 12px 15px; border: 1px solid #dbc7e3; border-radius: 5px; background: #f5eef8; color: #624071; font-size: 13px; }
.notice a { color: var(--primary); font-weight: 700; }
.modal-wide { width: min(900px, calc(100% - 28px)); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.plan-card { padding: 18px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-muted); }
.card-title { display: flex; align-items: flex-start; justify-content: space-between; }
.card-title h2 { margin: 0 0 7px; }
.plan-card > p { min-height: 36px; color: var(--muted); font-size: 12px; }
.plan-stats { display: flex; gap: 22px; padding: 13px 0; border-block: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.plan-stats span { display: flex; flex-direction: column; }
.plan-stats strong { color: var(--text); font-size: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pill { padding: 5px 8px; border-radius: 4px; background: #e7ecee; color: #59686e; font-size: 10px; font-weight: 700; }
.primary-pill { background: #f0e5f4; color: var(--primary-dark); }
.warning-pill { background: #fff0d7; color: #996313; }
.access-all { margin-top: 4px; padding: 12px; border: 1px solid #dbc7e3; border-radius: 5px; background: #f8f2fa; color: var(--primary-dark); }
.selection-section { margin-top: 20px; }
.selection-section p { margin: 4px 0 10px; color: var(--muted); font-size: 11px; }
.selection-grid { max-height: 150px; padding: 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-muted); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; overflow-y: auto; }
.selection-item { min-width: 0; padding: 7px; border-radius: 4px; background: #fff; font-weight: 600; }
.selection-item small { margin-left: auto; }
.table-panel { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 17px; border-bottom: 1px solid var(--border); text-align: left; font-size: 12px; }
.data-table th { background: var(--surface-muted); color: var(--muted); font-size: 10px; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child strong, .data-table td:first-child small { display: block; }
.data-table td:first-child small { margin-top: 3px; color: var(--muted); }
.data-table td:last-child { width: 45px; text-align: right; }
.status-label { display: inline-block; padding: 5px 8px; border-radius: 4px; font-size: 10px; font-weight: 800; }
.status-label.available { background: #e7f5ee; color: #18734d; }
.status-label.blocked { background: #fbeaec; color: #ad2f3a; }
.playlist-access { margin-top: 20px; padding: 14px; border: 1px solid #d9c5e2; border-radius: 5px; background: #faf6fc; }
.playlist-access p { margin: 6px 0 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.playlist-url { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.playlist-url input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.organization-select { margin-top: 14px; }
.sidebar-foot span { display: flex; flex-direction: column; }
.sidebar-foot span small { margin-top: 3px; color: rgba(255, 255, 255, .5); font-size: 9px; text-transform: uppercase; }

@media (max-width: 900px) {
    .app-body { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; padding: 14px 20px; flex-direction: row; align-items: center; }
    .sidebar nav { margin: 0 0 0 auto; flex-direction: row; }
    .sidebar-foot { display: none; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .overview-grid, .statistics-layout { grid-template-columns: 1fr; }
    .page { padding: 28px 20px; }
    .player-head { right: 340px; }
    .player-list { width: 340px; }
    .current-channel { width: min(390px, calc(100% - 396px)); }
}

@media (max-width: 600px) {
    .sidebar nav { overflow-x: auto; }
    .sidebar nav a { white-space: nowrap; }
    .sidebar nav a.player-nav { display: none; }
    .page { padding-inline: 14px; }
    .page-head, .panel-head { align-items: flex-start; flex-direction: column; }
    .metrics, .channel-grid, .form-grid, .selection-grid { grid-template-columns: 1fr; }
    .channel-summary, .stat-actions { align-items: stretch; flex-direction: column; }
    .health-banner { grid-template-columns: auto 1fr; }
    .health-banner > .badge { grid-column: 2; }
    .traffic-chart { gap: 2px; }
    .traffic-details, .operation-numbers { grid-template-columns: 1fr; }
    .operation-numbers div + div { border-top: 1px solid var(--border); border-left: 0; }
    .span-2 { grid-column: auto; }
    .playlist-url { grid-template-columns: 1fr 1fr; }
    .playlist-url input { grid-column: 1 / -1; }
    .search { width: 100%; }
    .login-card { padding: 26px; }
    .player-head { right: 0; height: 72px; }
    .player-head-content { padding-inline: 14px; }
    .player-head .brand-mark { width: 34px; height: 34px; font-size: 17px; }
    .player-head .brand strong, .customer-name { display: none; }
    .player-head-actions { gap: 8px; }
    .channel-toggle { padding: 8px 10px; }
    .video-empty > span { width: 52px; height: 52px; font-size: 17px; }
    .video-empty h2 { margin-top: 12px; font-size: 17px; }
    .video-empty p { font-size: 11px; }
    .current-channel, .channels-collapsed .current-channel { right: 14px; bottom: 14px; left: 14px; width: auto; min-height: 70px; padding: 9px 11px; }
    .current-channel img { width: 46px; height: 46px; }
    .live-badge { display: none; }
    .player-list { top: 72px; width: min(88vw, 350px); height: calc(100vh - 72px); border-top: 1px solid rgba(255, 255, 255, .12); }
    .player-list-head { padding: 18px 16px 14px; }
    .video-message { top: 82px; }
}
