/* Classic 5: CSS 2.1 layout, pixel sizes, ordinary block elements.
   No rem, calc, transforms, flex/grid, gradients or web fonts. */
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #101c15; color: #edf3ed; font-family: Arial, Helvetica, sans-serif; font-size: 18px; line-height: 24px; }
div, form, p, h1, h2, h3 { display: block; }
h1, h2, h3, p, form { margin: 0; padding: 0; }
h1 { font-size: 32px; line-height: 40px; font-weight: bold; }
h2 { font-size: 24px; line-height: 32px; }
button, input, select, textarea { font-family: Arial, Helvetica, sans-serif; font-size: 18px; }
button { cursor: pointer; color: #edf3ed; }
button, input, select, textarea { outline: none; }
.hidden { display: none !important; }
.muted { color: #afc4b4; }
.small { font-size: 14px; line-height: 20px; }
.eyebrow { font-size: 13px; line-height: 18px; color: #afcbb8; }
.boot { padding: 80px; font-size: 28px; line-height: 36px; }
.shell { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #101c15; }
.sidebar { display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 240px; background: #1a2b20; border-right: 2px solid #42604a; }
.brand { margin: 26px 20px 8px; white-space: nowrap; font-size: 28px; line-height: 42px; font-weight: bold; }
.brand-mark { display: inline-block; width: 38px; height: 38px; line-height: 38px; background: #c0e3c8; color: #173020; font-size: 32px; font-weight: bold; text-align: center; vertical-align: middle; margin-right: 6px; }
.brand-tv { font-size: 18px; color: #c0e3c8; }
.sidebar-caption { margin: 0 22px; font-size: 11px; line-height: 18px; color: #adc3b0; }
#navigation { display: block; margin: 24px 14px 0; }
.nav-item { position: relative; display: block; width: 204px; height: 46px; line-height: 40px; margin: 0 0 8px; padding: 0; border: 3px solid #39513e; background: #1a2b20; color: #d2e2d5; text-align: left; text-indent: 10px; font-size: 19px; }
.nav-item.active { background: #365a42; border-color: #6c9f79; color: #fff; }
.nav-count { position: absolute; right: 8px; top: 0; font-size: 14px; }
.nav-divider { height: 1px; background: #42604a; margin: 18px 0; }
.sidebar-bottom { position: absolute; left: 22px; right: 10px; bottom: 20px; }
.sidebar-bottom strong, .sidebar-bottom span { display: block; }
.sidebar-bottom strong { font-size: 20px; line-height: 28px; }
.provider-label { font-size: 11px; line-height: 18px; color: #adc3b0; }
.version { margin-top: 10px; font-size: 12px; line-height: 18px; color: #adc3b0; }
.main { display: block; position: absolute; left: 272px; right: 24px; top: 24px; bottom: 66px; overflow: auto; padding: 0; margin: 0; }
.page-header { display: block; position: relative; height: 92px; margin-bottom: 14px; }
.page-header h1 { margin-top: 3px; }
.page-header p { margin-top: 3px; font-size: 17px; line-height: 24px; }
.clock { position: absolute; top: 0; right: 4px; font-size: 24px; line-height: 30px; }
.toolbar { display: block; height: 48px; margin: 0 0 12px; }
.search-wrap { float: left; width: 39%; }
.search-wrap input { width: 96%; }
input, select { height: 40px; margin: 0; padding: 0; border: 2px solid #73947a; background: #243b2a; color: #fff; line-height: 36px; }
input { text-indent: 10px; }
.group-select { float: right; width: 35%; }
.refresh-button { float: right; width: 20%; margin-left: 2%; }
.button { height: 40px; margin: 0; padding: 0 10px; border: 2px solid #73947a; background: #2b4833; color: #edf3ed; font-size: 18px; line-height: 36px; }
.button.primary { background: #b9dfc2; border-color: #b9dfc2; color: #142b1b; font-weight: bold; }
.button.compact { font-size: 16px; }
.focusable:focus, .focusable.focused { border-color: #fff; outline: 2px solid #fff; background: #426c4f; color: #fff; }
.section-line { position: relative; height: 28px; }
.section-line h2 { font-size: 18px; line-height: 24px; }
.section-line span { position: absolute; right: 4px; top: 0; font-size: 15px; line-height: 24px; color: #afc4b4; }
.channel-grid { display: block; margin: 0; padding: 0; }
.channel-grid:after { display: block; content: ''; clear: both; }
.channel-card { display: block; position: relative; float: left; width: 45%; height: 106px; margin: 0 16px 10px 0; padding: 0; border: 3px solid #54775b; background: #243b2b; text-align: left; overflow: hidden; }
.channel-card.playing { border-color: #badbc1; }
.channel-meta { display: block; position: absolute; left: 12px; right: 12px; top: 8px; height: 18px; margin: 0; font-size: 13px; line-height: 18px; color: #b8d1bf; }
.channel-meta .star { float: right; color: #f5dc83; font-size: 18px; }
.channel-card h3 { display: block; position: absolute; left: 12px; right: 12px; top: 28px; margin: 0; padding: 0; max-height: 52px; overflow: hidden; font-size: 22px; line-height: 26px; font-weight: bold; }
.channel-group { display: block; position: absolute; left: 12px; right: 12px; bottom: 6px; margin: 0; font-size: 14px; line-height: 18px; color: #b8d1bf; white-space: nowrap; overflow: hidden; }
.pagination { clear: both; position: relative; margin-top: 6px; height: 46px; text-align: center; }
.pagination .button { font-size: 16px; }
.pagination span { display: inline-block; margin: 0 16px; font-size: 16px; }
button[disabled] { color: #91a496; border-color: #42604a; background: #1e3225; }
.key-hints { display: block; position: absolute; left: 272px; right: 24px; bottom: 14px; height: 30px; border-top: 1px solid #42604a; padding-top: 8px; background: #101c15; font-size: 14px; line-height: 22px; color: #b2cab8; white-space: nowrap; }
.key-hints span { display: inline-block; margin-right: 20px; }
.key-hints b { color: #f2f7f3; margin-right: 4px; }
.key-hints b.yellow-key { color: #f5dc83; }
.notice { padding: 10px; margin-bottom: 12px; background: #443b23; border: 1px solid #c2a66c; font-size: 16px; line-height: 24px; }
.empty, .settings-panel { display: block; padding: 20px; border: 1px solid #54775b; background: #1d3224; }
.empty h2 { margin-bottom: 12px; }
.empty p { color: #bfd2c3; font-size: 18px; line-height: 28px; }
.empty .button { margin-top: 18px; }
.setting-row { margin-bottom: 24px; }
.setting-row label { display: block; margin-bottom: 8px; font-size: 20px; font-weight: bold; }
.setting-row select { display: block; width: 95%; max-width: 600px; }
.setting-row p { margin-top: 8px; font-size: 16px; line-height: 24px; color: #bfd2c3; }
.settings-panel .button { margin: 0 10px 10px 0; }
.diagnostic-log { display: block; width: 94%; height: 260px; margin: 16px 0; padding: 8px; border: 2px solid #73947a; background: #101c15; color: #d7e9dd; font-size: 14px; line-height: 20px; overflow: auto; }
.login { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background: #101c15; }
.login-card { width: 520px; margin: 36px auto; padding: 28px; border: 2px solid #6b8f73; background: #1d3224; }
.login-card .brand-mark { margin-bottom: 20px; }
.login-card h1 { font-size: 30px; line-height: 38px; margin: 8px 0 14px; }
.login-card p { font-size: 18px; line-height: 28px; color: #bfd2c3; }
.login-card label { display: block; margin: 20px 0 8px; font-size: 16px; }
.login-card input { display: block; width: 96%; height: 48px; font-size: 28px; line-height: 44px; letter-spacing: 8px; text-align: center; }
.login-card .button { display: block; width: 97%; height: 48px; margin-top: 14px; line-height: 44px; }
.login-card .error { min-height: 28px; margin: 10px 0; color: #ffd5ad; }
.player { position: fixed; z-index: 20; left: 0; top: 0; right: 0; bottom: 0; background: #000; outline: none; }
.video-container, .video-container video, .video-container object { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; }
.player-loading { position: absolute; left: 10%; top: 42%; width: 80%; text-align: center; font-size: 24px; line-height: 32px; color: #d1e5d6; }
.player-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.player-top { position: absolute; top: 0; left: 0; right: 0; padding: 16px 24px; background: #172c1e; }
.live-badge { display: inline-block; padding: 3px 8px; border: 1px solid #badbc1; background: #294a34; font-size: 14px; line-height: 22px; }
.player-mode { float: right; font-size: 16px; line-height: 28px; }
.player-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 24px; background: #172c1e; }
.player-bottom h1 { margin: 6px 0; }
.player-message { margin-bottom: 12px; color: #ffdbad; font-size: 18px; line-height: 26px; }
.player-buttons .button { display: inline-block; margin: 0 8px 10px 0; font-size: 17px; }
.player-hint { margin-top: 8px; }
.toast { position: absolute; z-index: 40; left: 28%; right: 8%; bottom: 70px; padding: 16px; border: 2px solid #e5f5e9; background: #bedfc6; color: #172f20; font-size: 18px; line-height: 26px; text-align: center; }
.channel-number { position: absolute; z-index: 45; right: 6%; top: 6%; padding: 12px 24px; border: 2px solid #bedfc6; background: #243f2d; color: #fff; font-size: 48px; line-height: 56px; }
@media (max-width: 960px) {
    .sidebar { width: 200px; }
    .brand { margin-left: 12px; font-size: 24px; }
    .sidebar-caption { margin-left: 14px; font-size: 10px; }
    #navigation { margin-left: 10px; margin-right: 10px; }
    .nav-item { width: 174px; font-size: 17px; }
    .main, .key-hints { left: 224px; right: 16px; }
    .channel-card { width: 43%; margin-right: 12px; }
    .key-hints span { margin-right: 10px; font-size: 12px; }
}
@media (max-width: 650px) {
    .sidebar { width: 148px; }
    .brand { font-size: 21px; margin-left: 8px; }
    .brand-mark { width: 26px; height: 30px; line-height: 30px; font-size: 24px; margin-right: 3px; }
    .brand-tv { font-size: 12px; }
    .sidebar-caption, .provider-label, .nav-count { display: none; }
    #navigation { margin-left: 6px; margin-right: 6px; }
    .nav-item { width: 130px; font-size: 14px; text-indent: 4px; }
    .sidebar-bottom { left: 10px; }
    .main, .key-hints { left: 166px; right: 10px; }
    .clock { font-size: 16px; }
    .page-header h1 { font-size: 25px; }
    .page-header p { font-size: 14px; }
    .toolbar { height: 100px; }
    .search-wrap { float: none; width: 100%; margin-bottom: 8px; }
    .group-select { width: 61%; }
    .refresh-button { width: 35%; font-size: 12px; }
    .channel-card { float: none; width: 93%; margin-right: 0; }
    .key-hints { overflow: hidden; }
    .key-hints span { margin-right: 10px; }
    .login-card { width: 75%; padding: 20px; }
    .player-buttons .button { font-size: 14px; }
}

/* Provider logos use a plain IMG through our same-origin PHP endpoint. */
.channel-logo { display: block; position: absolute; left: 10px; top: 32px; width: 88px; height: 60px; line-height: 60px; text-align: center; background: #eef3ed; }
.channel-logo img { max-width: 82px; max-height: 54px; border: 0; vertical-align: middle; }
.has-logo h3, .has-logo .channel-group { left: 112px; }
.kino-panel h2 { margin-bottom: 16px; }
.kino-panel p { margin-bottom: 16px; font-size: 18px; line-height: 28px; }
.kino-panel .button { margin-top: 6px; }
.kino-code { margin: 20px 0; color: #e4f4e8; font-family: monospace; font-size: 52px; line-height: 64px; letter-spacing: 8px; font-weight: bold; }
.kino-panel .kino-address { color: #e4f4e8; font-size: 22px; word-wrap: break-word; }

/* Archive, lifecycle and raster panda; keep the old TV layout primitive. */
.brand { margin-top: 20px; margin-bottom: 6px; }
.brand-mark { width: 48px; height: 48px; background: transparent; border: 0; }
#navigation { margin-top: 18px; }
.system-actions { position: absolute; left: 14px; bottom: 132px; height: 42px; }
.system-button { width: 94px; height: 38px; margin-right: 8px; padding: 0; border: 2px solid #73947a; background: #2b4833; color: #fff; font-size: 16px; }
.player-timeline { min-height: 24px; margin: 4px 0 10px; color: #d1e7d6; font-size: 18px; }
.dialog { position: fixed; z-index: 35; left: 0; top: 0; right: 0; bottom: 0; background: #101c15; overflow: auto; }
.dialog-card { width: 620px; margin: 70px auto; padding: 28px; background: #1d3224; border: 2px solid #9abca2; }
.dialog-card h2 { margin-bottom: 10px; }
.dialog-card label { display: block; margin-bottom: 6px; font-size: 18px; }
.archive-date-row { margin-top: 22px; margin-bottom: 18px; }
.archive-date-row select { width: 100%; }
.archive-time-row { height: 82px; }
.archive-time-row div { float: left; width: 46%; margin-right: 3%; }
.archive-time-row select { width: 95%; }
.dialog-card .error { min-height: 30px; color: #ffd5ad; font-size: 16px; line-height: 24px; margin-bottom: 10px; }
.dialog-card .button { margin-right: 12px; }
.archive-help { margin-top: 20px; }
.exit-panda { width: 96px; height: 96px; border: 0; }
@media (max-height: 680px) {
    #navigation { margin-top: 12px; }
    .nav-item { height: 38px; line-height: 34px; margin-bottom: 6px; }
    .nav-divider { margin: 12px 0; }
    .system-actions { bottom: 118px; }
    .dialog-card { margin-top: 28px; }
}
@media (max-width: 960px) { .system-actions { left: 10px; } .system-button { width: 80px; font-size: 14px; } }
@media (max-width: 650px) {
    .brand-mark { width: 32px; height: 32px; }
    .system-actions { left: 6px; }
    .system-button { width: 60px; margin-right: 4px; font-size: 12px; }
    .dialog-card { width: 78%; padding: 18px; margin-top: 24px; }
    .player-buttons .button { height: 34px; line-height: 30px; font-size: 13px; margin-right: 4px; }
}
