:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#172431;background:#f3f6f8;line-height:1.5}*{box-sizing:border-box}body{margin:0}.topbar{display:flex;align-items:center;gap:1.5rem;flex-wrap:wrap;background:#102b3a;color:#fff;padding:.8rem max(1rem,calc((100vw - 1100px)/2))}.topbar a{color:#fff;text-decoration:none}.brand{font-size:1.25rem;font-weight:750}.topbar nav{display:flex;gap:1rem;flex-wrap:wrap}.logout{margin-left:auto}.container{max-width:1100px;margin:2rem auto;padding:0 1rem}.card{background:#fff;border:1px solid #dce5ea;border-radius:12px;padding:1.5rem;margin:1rem 0;box-shadow:0 3px 12px #1232}.narrow{max-width:420px;margin:4rem auto}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}.grid .card{margin:0}h1{font-size:1.8rem}h2{font-size:1.25rem;margin-top:0}.muted{color:#536471}.error{color:#9b1c1c;background:#fff0f0;padding:.7rem;border-radius:6px}label{display:block;font-weight:600;margin:.8rem 0 .3rem}input,select{font:inherit;width:100%;padding:.7rem;border:1px solid #a9b9c3;border-radius:6px;background:#fff}button{font:inherit;background:#087d68;color:#fff;border:0;border-radius:6px;padding:.7rem 1rem;cursor:pointer;margin-top:1rem;font-weight:650}button:hover{background:#066753}button.secondary{background:transparent;border:1px solid #d3e4e8;margin:0}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0 1rem}.form-action{align-self:end}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;min-width:600px}th,td{text-align:left;padding:.65rem;border-bottom:1px solid #e2eaee;vertical-align:top;overflow-wrap:anywhere}th{background:#eef4f6}@media(max-width:600px){.topbar{gap:.7rem}.logout{margin-left:0}.container{margin:1rem auto}.card{padding:1rem}}
.epg-event{display:grid;grid-template-columns:150px 1fr;gap:1rem;margin:.6rem 0}.epg-event h2{margin:0 0 .4rem}.epg-when{display:flex;flex-direction:column;color:#415665}.epg-event summary{cursor:pointer;color:#087d68;font-weight:600}@media(max-width:600px){.epg-event{grid-template-columns:1fr}.epg-when{flex-direction:row;gap:1rem}}
.channel-list{list-style:none;margin:1rem 0;padding:0;background:#fff;border-top:2px solid #087d68}.channel-list li{border-bottom:1px solid #dce5ea}.channel-list li:nth-child(even){background:#f8fbfc}.channel-list a{display:block;padding:.7rem 1rem;color:#175167;text-decoration:none;font-weight:600}.channel-list a:hover,.channel-list a:focus-visible{background:#e9f4f3;text-decoration:underline}
.danger{background:#a52a2a}.danger:hover{background:#842020}
.timer-row button.secondary{color:#175167;border-color:#b8cbd2}.timer-row button.secondary:hover{background:#eef4f6}
.timer-status{font-weight:700}.timer-status--waiting{color:#1559a6}.timer-status--running{color:#9a5b00}.timer-status--finished{color:#166534}.timer-status--disabled{color:#b42318}
.timer-repeat{display:block;color:#087d68;font-size:.86rem;font-weight:650;margin-top:.18rem}
.timer-list{background:#fff;border-top:2px solid #087d68}.timer-list-head,.timer-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.7fr) minmax(0,.9fr) minmax(0,1.2fr) minmax(0,1.5fr);gap:.8rem;padding:.8rem 1rem}.timer-list--user .timer-list-head,.timer-list--user .timer-row{grid-template-columns:minmax(0,2fr) minmax(0,1.7fr) minmax(0,.9fr) minmax(0,1.5fr)}.timer-list-head{background:#e9f0f3;color:#415665;font-size:.85rem;font-weight:700}.timer-row{border-bottom:1px solid #dce5ea;align-items:start;overflow-wrap:anywhere}.timer-row:nth-of-type(even){background:#f8fbfc}.timer-row:hover{background:#f0f7f8}.timer-identity h2{font-size:1rem;line-height:1.35;margin:0 .0rem .2rem}.timer-identity .muted{font-size:.9rem}.timer-when{font-size:.9rem;font-variant-numeric:tabular-nums}.timer-when span:nth-child(2),.timer-when span:last-child{display:block}.timer-time-separator,.timer-mobile-label{display:none}.timer-owner{font-size:.9rem}.timer-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.4rem}.timer-actions form{margin:0}.timer-actions button{margin:0;padding:.42rem .65rem;font-size:.88rem}.timer-delete-details summary{cursor:pointer;color:#9b1c1c;font-weight:650;padding:.45rem .2rem}.timer-delete-details[open]{flex-basis:100%}.timer-delete-details p{font-size:.88rem;margin:.5rem 0}.timer-delete-details .danger{margin:0}
@media(max-width:850px){.timer-list-head{display:none}.timer-row,.timer-list--user .timer-row{display:block;padding:.85rem 1rem}.timer-row>div{margin:.2rem 0}.timer-row .timer-identity{margin-bottom:.5rem}.timer-mobile-label{display:inline;color:#536471;font-weight:600}.timer-when span:nth-child(2),.timer-when span:last-child{display:inline}.timer-time-separator{display:inline}.timer-actions{margin-top:.6rem!important}}
.audit-list{background:#fff;border-top:2px solid #087d68}.audit-list-head,.audit-summary{display:grid;grid-template-columns:170px minmax(210px,1.8fr) minmax(110px,.8fr) 100px minmax(120px,1fr);gap:1rem;align-items:center;padding:.7rem 1rem}.audit-list-head{background:#e9f0f3;color:#415665;font-size:.85rem;font-weight:700}.audit-row{border-bottom:1px solid #dce5ea}.audit-row:nth-of-type(even){background:#f8fbfc}.audit-summary{font-size:.93rem}.audit-summary>*{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.audit-summary time{font-variant-numeric:tabular-nums}.audit-action{font-weight:650}.audit-outcome{font-weight:700}.audit-outcome--success{color:#166534}.audit-outcome--failure{color:#b42318}.audit-ip{font-variant-numeric:tabular-nums}.audit-expanded{padding:0 1rem .55rem}.audit-expanded summary{cursor:pointer;color:#175167;font-size:.88rem;font-weight:650;list-style-position:inside;padding:.2rem 0}.audit-expanded[open]{background:#f1f7f8;padding-bottom:1rem}.audit-expanded[open] summary{padding:.55rem 0}.audit-fields{display:grid;grid-template-columns:minmax(150px,190px) minmax(0,1fr);gap:.4rem 1rem;margin:.3rem 0 1rem}.audit-fields dt{color:#536471;font-weight:650}.audit-fields dd{min-width:0;margin:0;overflow-x:auto}.audit-expanded h2{font-size:.95rem;margin:1rem 0 .5rem}.audit-meta{border-top:1px solid #dce5ea;padding-top:.65rem}.audit-meta dd{white-space:nowrap}.audit-empty{padding:1rem}
@media(max-width:850px){.audit-list-head{display:none}.audit-summary{grid-template-columns:minmax(0,1fr) auto;gap:.2rem .8rem}.audit-summary time{grid-column:1}.audit-action{grid-column:1;grid-row:2}.audit-summary>span:nth-child(3){grid-column:1;grid-row:3}.audit-outcome{grid-column:2;grid-row:1}.audit-ip{grid-column:2;grid-row:3;text-align:right}.audit-fields{grid-template-columns:minmax(110px,150px) minmax(0,1fr)}}
@media(max-width:520px){.audit-summary{padding:.7rem}.audit-expanded{padding-left:.7rem;padding-right:.7rem}.audit-fields{display:block}.audit-fields dt{margin-top:.55rem}.audit-fields dd{margin-top:.1rem}}
.recording-list{background:#fff;border-top:2px solid #087d68}.recording-list-head,.recording-row{display:grid;grid-template-columns:minmax(0,2fr) 170px 90px 110px;gap:.75rem 1rem;padding:.75rem 1rem}.recording-list-head{background:#e9f0f3;color:#415665;font-size:.85rem;font-weight:700}.recording-row{border-bottom:1px solid #dce5ea;align-items:start}.recording-row:nth-of-type(even){background:#f8fbfc}.recording-title h2{font-size:1rem;line-height:1.35;margin:0 0 .2rem}.recording-title .muted{font-size:.9rem}.recording-row>div:not(.recording-title){font-size:.92rem;font-variant-numeric:tabular-nums}.recording-description{grid-column:1/-1}.recording-description summary{cursor:pointer;color:#175167;font-size:.88rem;font-weight:650}.recording-description p{margin:.5rem 0;max-width:80ch}.recording-mobile-label{display:none}
@media(max-width:700px){.recording-list-head{display:none}.recording-row{display:block}.recording-row>div{margin:.25rem 0}.recording-title{margin-bottom:.5rem!important}.recording-description{margin-top:.5rem}.recording-mobile-label{display:inline;font-weight:650;color:#536471}}

.theme-toggle{white-space:nowrap}.theme-toggle--guest{margin-left:auto!important}.weekday-picker{border:1px solid #dce5ea;border-radius:8px;margin:1.2rem 0;padding:.8rem 1rem}.weekday-picker legend{font-weight:700;padding:0 .35rem}.weekday-picker p{margin:.1rem 0 .5rem}.weekday-options{display:flex;flex-wrap:wrap;gap:.45rem}.weekday-options label{display:flex;align-items:center;gap:.35rem;background:#eef4f6;border:1px solid #dce5ea;border-radius:999px;margin:0;padding:.42rem .7rem;cursor:pointer}.weekday-options input{width:auto;margin:0;accent-color:#087d68}

:root[data-theme="dark"]{color-scheme:dark;color:#e5edf2;background:#0e171d}:root[data-theme="dark"] .topbar{background:#081218}:root[data-theme="dark"] a{color:#78d6c5}:root[data-theme="dark"] .topbar a{color:#f4f8fa}:root[data-theme="dark"] .card,:root[data-theme="dark"] .channel-list,:root[data-theme="dark"] .timer-list,:root[data-theme="dark"] .audit-list,:root[data-theme="dark"] .recording-list{background:#17242c;border-color:#334751}:root[data-theme="dark"] input,:root[data-theme="dark"] select{color:#edf4f7;background:#101b22;border-color:#526873}:root[data-theme="dark"] .muted,:root[data-theme="dark"] .epg-when,:root[data-theme="dark"] .timer-mobile-label,:root[data-theme="dark"] .recording-mobile-label,:root[data-theme="dark"] .audit-fields dt{color:#aabcc6}:root[data-theme="dark"] .error{color:#ffb4ab;background:#3a1718}:root[data-theme="dark"] th,:root[data-theme="dark"] .timer-list-head,:root[data-theme="dark"] .audit-list-head,:root[data-theme="dark"] .recording-list-head{color:#c6d5dc;background:#22343d}:root[data-theme="dark"] th,:root[data-theme="dark"] td,:root[data-theme="dark"] .channel-list li,:root[data-theme="dark"] .timer-row,:root[data-theme="dark"] .audit-row,:root[data-theme="dark"] .recording-row,:root[data-theme="dark"] .audit-meta{border-color:#334751}:root[data-theme="dark"] .channel-list li:nth-child(even),:root[data-theme="dark"] .timer-row:nth-of-type(even),:root[data-theme="dark"] .audit-row:nth-of-type(even),:root[data-theme="dark"] .recording-row:nth-of-type(even){background:#1b2a32}:root[data-theme="dark"] .channel-list a:hover,:root[data-theme="dark"] .channel-list a:focus-visible,:root[data-theme="dark"] .timer-row:hover,:root[data-theme="dark"] .timer-row button.secondary:hover{background:#243942}:root[data-theme="dark"] .audit-expanded[open]{background:#20323a}:root[data-theme="dark"] .weekday-picker{border-color:#3b505b}:root[data-theme="dark"] .weekday-options label{background:#22343d;border-color:#3b505b}:root[data-theme="dark"] .timer-status--waiting{color:#78b7ff}:root[data-theme="dark"] .timer-status--finished,:root[data-theme="dark"] .audit-outcome--success{color:#73d798}:root[data-theme="dark"] .timer-status--disabled,:root[data-theme="dark"] .audit-outcome--failure{color:#ff8f87}:root[data-theme="dark"] button.secondary{color:#d7e8ed;border-color:#526873}
:root[data-theme="dark"] .timer-repeat{color:#78d6c5}:root[data-theme="dark"] .timer-status--running{color:#ffc266}
