/* RadioControl appearance and persisted theme. Loaded after page styles. */
.theme-toggle{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:9px;background:transparent;color:var(--ink);font-weight:700;white-space:nowrap}
.theme-toggle:hover{border-color:var(--accent);color:var(--accent)}
.login-shell{display:grid;grid-template-columns:minmax(280px,1fr) minmax(340px,440px);width:min(100%,1020px);min-height:550px;align-items:stretch;border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:0 24px 70px #30151b1a;background:#fff}
.login-intro{position:relative;display:flex;flex-direction:column;justify-content:center;padding:56px;background:linear-gradient(145deg,#2e2e2e,#431f2a 75%,#743042);color:#fff;overflow:hidden}
.login-intro .brand{position:absolute;top:38px;left:48px;color:#ff7189}.login-intro .brand-light{color:#ff9bad}
.login-intro .login-kicker{font-size:11px;font-weight:800;letter-spacing:.18em;color:#ff9bad}.login-intro h2{max-width:390px;margin:14px 0;font-size:clamp(2rem,4vw,3.4rem);line-height:1.08;letter-spacing:-.055em;color:#fff}.login-intro p{max-width:330px;color:#ebd6dd}
.login-wave{display:flex;align-items:center;gap:10px;height:70px;margin-top:30px;opacity:.65}.login-wave i{display:block;width:9px;border-radius:99px;background:#ff7189;height:24px}.login-wave i:nth-child(2n){height:48px}.login-wave i:nth-child(3n){height:34px}.login-wave i:nth-child(5){height:65px}
.login-shell .login-card{max-width:none;border:0;border-radius:0;box-shadow:none;padding:52px 44px;align-self:center}.login-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:44px}.login-card-top .brand{margin:0;color:#ff7189}.login-card-top .brand-light{color:#ff9bad}.login-card h1{font-size:2.25rem}.login-card input:not([type=hidden]){border-radius:10px;border-color:#cbc8ce;padding:12px 14px}.login-card input:focus{border-color:#c9253d}.login-card .primary{border-radius:10px;box-shadow:0 8px 18px #c9253d30}.login-card .primary:hover{background:#a91f36}
.dj-email-form{display:grid;gap:7px;padding:10px 0;border-top:1px solid var(--line)}.dj-email-form label{display:grid;gap:6px;font-size:12px;font-weight:700}.dj-email-form select{max-width:240px;min-height:38px;padding:7px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink)}
.dj-email-match{display:grid;gap:2px;margin:4px 0 6px;font-size:12px;overflow-wrap:anywhere}.dj-email-match strong{color:var(--ink)}.dj-email-match span{color:var(--muted)}
:root[data-theme=dark]{color-scheme:dark;--ink:#f2edf0;--muted:#b9b0b7;--accent:#ff7189;--teal:#ff7189;--line:#454047;--surface:#18171b}
[data-theme=dark] body,[data-theme=dark] .auth-main{background:#18171b;color:var(--ink)}
[data-theme=dark] .content,[data-theme=dark] .main{background:#18171b}
[data-theme=dark] .topbar,[data-theme=dark] .card,[data-theme=dark] .hero,[data-theme=dark] .dial-card,[data-theme=dark] .login-card,[data-theme=dark] .login-shell,[data-theme=dark] .hub-bulk,[data-theme=dark] .hub-row,[data-theme=dark] .user-row,[data-theme=dark] .live-panel,[data-theme=dark] .modal-content,[data-theme=dark] dialog{background:#242228;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .sidebar{background:#242228;border-color:#39343b}
[data-theme=dark] .topbar .quiet,[data-theme=dark] .quiet,[data-theme=dark] .theme-toggle{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .topbar .quiet:hover,[data-theme=dark] .quiet:hover{background:#3c3740}
[data-theme=dark] h1,[data-theme=dark] h2,[data-theme=dark] h3,[data-theme=dark] .card .health-value,[data-theme=dark] .hero h2{color:var(--ink)}
[data-theme=dark] .muted,[data-theme=dark] .card p,[data-theme=dark] .footer,[data-theme=dark] dt{color:var(--muted)}
[data-theme=dark] input:not([type=checkbox]):not([type=radio]),[data-theme=dark] select,[data-theme=dark] textarea{background:#302d34;color:var(--ink);border-color:#5b535e}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#ada2ac}
[data-theme=dark] .neutral{background:#39383f;color:#e8dfe6}[data-theme=dark] .good{background:#183b30;color:#9be9c2}[data-theme=dark] .bad,[data-theme=dark] .error{background:#45272d;color:#ffd3d8}
[data-theme=dark] .hub-user-art,[data-theme=dark] .card-icon{background:#49303a;color:#ff9bad}
[data-theme=dark] .hub-conflict{background:#403526;color:#f3dfbd}[data-theme=dark] .hub-done{background:#2a3030}
[data-theme=dark] .login-intro{background:linear-gradient(145deg,#17161a,#35202a 75%,#602a3b)}
[data-theme=dark] .login-shell{box-shadow:0 24px 70px #0008}
@media(max-width:760px){.login-shell{grid-template-columns:1fr;min-height:0}.login-intro{min-height:220px;padding:72px 28px 24px}.login-intro .brand{top:24px;left:28px}.login-intro h2{font-size:2rem}.login-intro p,.login-wave{display:none}.login-shell .login-card{padding:28px}.login-card-top{margin-bottom:26px}}
.sidebar .brand{font-size:18px;white-space:nowrap}

/* Keep page-level workspaces on the same dark surfaces as shared cards. */
[data-theme=dark] .broadcast-control-panel,[data-theme=dark] .live-stat,[data-theme=dark] .mix-action-card,[data-theme=dark] .live-fader-panel,[data-theme=dark] .email-alert-options .settings-switch,[data-theme=dark] .taxonomy-grid .managed-tag form,[data-theme=dark] .taxonomy-grid .managed-type form{background:#242228;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .broadcast-control-heading strong,[data-theme=dark] .mount-list-heading strong,[data-theme=dark] .taxonomy-grid .tag-actions button{color:var(--ink)}
[data-theme=dark] .broadcast-restart,[data-theme=dark] .broadcast-cancel,[data-theme=dark] .taxonomy-grid .tag-actions button:not([value=delete]){background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .broadcast-restart:hover:not(:disabled){background:#3c3740}

/* Page workspaces that supply light-only surfaces and inherit dark-theme text. */
[data-theme=dark] .settings-jump a,[data-theme=dark] .transition-presets button,[data-theme=dark] .health-ranges button[aria-pressed=true],[data-theme=dark] .live-button-secondary,[data-theme=dark] .access-secondary,[data-theme=dark] .media-tool-card,[data-theme=dark] #library-screen .filter-clear,[data-theme=dark] .taxonomy-grid .tag-actions button:not([value=delete]){background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .settings-jump a:hover,[data-theme=dark] .settings-jump a:focus-visible{background:var(--action-primary);color:#fff;border-color:var(--action-primary)}
[data-theme=dark] .transition-presets button[aria-pressed=true]{background:#49303a;border-color:#ff7189;color:var(--ink)}
[data-theme=dark] .health-ranges{background:#302d34}
[data-theme=dark] .health-ranges button{color:var(--muted)}
[data-theme=dark] .health-ranges button[aria-pressed=true]{color:var(--ink)}
[data-theme=dark] .media-tool-card:hover,[data-theme=dark] .live-button-secondary:hover,[data-theme=dark] .access-secondary:hover{background:#3c3740}
[data-theme=dark] .media-tool-card.is-active{background:#49303a}
[data-theme=dark] .taxonomy-grid .tag-actions button[value=delete]{background:#45272d;color:#ffd3d8;border-color:#75414b}
[data-theme=dark] .report-shell,[data-theme=dark] .access-stats article,[data-theme=dark] .icecast-health,[data-theme=dark] .icecast-output,[data-theme=dark] .news-sequence-summary,[data-theme=dark] .news-airing-form,[data-theme=dark] .preset-section,[data-theme=dark] .backup-card,[data-theme=dark] .transition-field,[data-theme=dark] .transition-range,[data-theme=dark] .transition-summary,[data-theme=dark] .settings-switch,[data-theme=dark] .settings-rotation-fields>div{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] #stream-mounts p,[data-theme=dark] .icecast-output,[data-theme=dark] .live-fader output{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .icecast-section-heading p:last-child,[data-theme=dark] #stream-summary,[data-theme=dark] #stream-mounts,[data-theme=dark] .icecast-output-heading strong,[data-theme=dark] .icecast-output-heading span,[data-theme=dark] .icecast-output-foot,[data-theme=dark] .server-limit-note{color:var(--ink)}
[data-theme=dark] .icecast-page #server-form input:not([type=checkbox]),[data-theme=dark] .icecast-page #server-form select,[data-theme=dark] .report-filter-grid select,[data-theme=dark] #library-screen .library-filter-fields input,[data-theme=dark] #library-screen .library-filter-fields select{background:#302d34;color:var(--ink);border-color:#5b535e}
[data-theme=dark] .access-role-card details summary{color:#ff9bad}
[data-theme=dark] .news-schedule-link,[data-theme=dark] .news-sequence-summary a,[data-theme=dark] .news-actions button,[data-theme=dark] .news-airing-form button[type=submit],[data-theme=dark] .report-actions button[type=submit],[data-theme=dark] .access-primary,[data-theme=dark] .integrations button[type=submit],[data-theme=dark] .integrations a.button{background:var(--action-primary);color:#fff;border-color:var(--action-primary)}
[data-theme=dark] #report-filters input,[data-theme=dark] #report-filters select{background:#302d34;color:var(--ink);border-color:#5b535e}
[data-theme=dark] .integrations button:not(.hub-reject),[data-theme=dark] .integrations .button{background:var(--action-primary);color:#fff;border-color:var(--action-primary)}

/* Dashboard, library, reporting and administration surfaces. */
[data-theme=dark] .dashboard-now,[data-theme=dark] .dashboard-now-primary,[data-theme=dark] .dashboard-detail,[data-theme=dark] .dashboard-time-strip,[data-theme=dark] .dashboard-timing-bubble,[data-theme=dark] .status-item,[data-theme=dark] .dashboard-live-card,[data-theme=dark] .dashboard-live-person,[data-theme=dark] .playlist-library,[data-theme=dark] .widget-workspace,[data-theme=dark] .stats-card,[data-theme=dark] .stats-panel,[data-theme=dark] .ranking-card,[data-theme=dark] .health-overall,[data-theme=dark] .health-check,[data-theme=dark] .health-resource-card,[data-theme=dark] .access-user-card,[data-theme=dark] #library-screen .library-metric{background:#242228;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .dashboard-now-primary .dashboard-detail,[data-theme=dark] .dashboard-now-primary .dashboard-live-card,[data-theme=dark] .dashboard-waiting-dj,[data-theme=dark] .widget-preview-panel,[data-theme=dark] .widget-install-notes,[data-theme=dark] .ranking-shell,[data-theme=dark] .report-stat,[data-theme=dark] .health-retention-note,[data-theme=dark] .access-search,[data-theme=dark] .news-enable,[data-theme=dark] .news-setup,[data-theme=dark] .news-source-fields,[data-theme=dark] .backup-schedule-summary>div,[data-theme=dark] .live-guidance{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .dashboard-now-primary #programme-start,[data-theme=dark] .dashboard-now-primary #programme-end,[data-theme=dark] .dashboard-now-primary .dashboard-timing-row,[data-theme=dark] .dashboard-now-primary #dashboard-up-next .up-next-item:nth-child(odd),[data-theme=dark] .dashboard-now-primary #dashboard-history li:nth-child(odd),[data-theme=dark] .dashboard-now-primary #dashboard-hard-start,[data-theme=dark] .dashboard-storage-notice,[data-theme=dark] .widget-browser-bar,[data-theme=dark] .preview-size,[data-theme=dark] .health-chart-grid canvas{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .dashboard-heading-subtitle,[data-theme=dark] .clock-zone,[data-theme=dark] .dashboard-now-label,[data-theme=dark] .dashboard-now-primary .eyebrow,[data-theme=dark] .dashboard-detail .muted,[data-theme=dark] .status-label,[data-theme=dark] .digital-clock-face .clock-date{color:var(--muted)}
[data-theme=dark] .clock-date,[data-theme=dark] .dashboard-waiting-dj strong,[data-theme=dark] .dashboard-live-card strong{color:var(--ink)}
[data-theme=dark] #library-screen .library-metric strong,[data-theme=dark] #library-screen .library-metric small,[data-theme=dark] .playlist-library h2,[data-theme=dark] .playlist-library h3{color:var(--ink)}
[data-theme=dark] #library-screen .library-table-scroll,[data-theme=dark] #library-screen .library-table td,[data-theme=dark] #library-screen .library-table th,[data-theme=dark] #library-screen .library-summary>span,[data-theme=dark] #library-screen .library-summary>a,[data-theme=dark] #library-screen .library-empty,[data-theme=dark] .playlist-empty,[data-theme=dark] .playlist-library .empty-state{background:#242228;color:var(--ink);border-color:var(--line)}
[data-theme=dark] #library-screen .filter-toggles,[data-theme=dark] #library-screen #refresh-library,[data-theme=dark] #library-screen .library-table tbody tr:nth-child(even):not(.duplicate-group-row),[data-theme=dark] #library-screen .library-table th{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .widget-icon,[data-theme=dark] .stats-icon,[data-theme=dark] .health-resource-icon,[data-theme=dark] .access-stat-icon,[data-theme=dark] .access-avatar,[data-theme=dark] .access-role-symbol,[data-theme=dark] .settings-icon,[data-theme=dark] .media-tool-icon{background:#49303a;color:#ff9bad}
[data-theme=dark] .stats-icon,[data-theme=dark] .access-stat-icon.active,[data-theme=dark] .access-stat-icon.disabled{color:#ff9bad}
[data-theme=dark] .listener-map,[data-theme=dark] .map-empty,[data-theme=dark] .stats-map,[data-theme=dark] .health-retention-note>span{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .health-check .good{color:#9be9c2}

/* Form labels and inline help need light text on dark panels. */
[data-theme=dark] .taxonomy-create-form label,[data-theme=dark] .taxonomy-grid .edit-tag-form label,[data-theme=dark] .taxonomy-grid .edit-type-form label,[data-theme=dark] .settings-playout-form label,[data-theme=dark] .settings-rotation-form label,[data-theme=dark] .news-source-choice label,[data-theme=dark] .news-field-grid label,[data-theme=dark] .icecast-page #server-form .helptext,[data-theme=dark] .broadcast-control-heading span:not(.broadcast-status-light),[data-theme=dark] .live-page label{color:var(--muted)}
[data-theme=dark] .preset-state,[data-theme=dark] .transition-result{color:#ff9bad!important}
[data-theme=dark] .news-flow-note,[data-theme=dark] .news-playlist-shortcut,[data-theme=dark] .settings-emergency-current,[data-theme=dark] .news-days label,[data-theme=dark] .news-activity li{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .news-source-choice select,[data-theme=dark] .news-field-grid input,[data-theme=dark] .settings-playout-form select,[data-theme=dark] .settings-playout-form input[type=file],[data-theme=dark] .settings-rotation-form select,[data-theme=dark] .settings-rotation-form input{background:#302d34;color:var(--ink);border-color:#5b535e}
[data-theme=dark] .live-guidance strong,[data-theme=dark] .live-guidance span{color:var(--ink)}
[data-theme=dark] .dashboard-now-primary .dashboard-detail strong,[data-theme=dark] .dashboard-now-primary .dashboard-live-card strong,[data-theme=dark] .dashboard-now-primary .dashboard-detail small{color:var(--ink)}
[data-theme=dark] .dashboard-now-primary .dashboard-detail .status-label,[data-theme=dark] .dashboard-now-primary .dashboard-timing-row small,[data-theme=dark] .dashboard-live-status,[data-theme=dark] .dashboard-now-primary .muted{color:var(--muted)}
[data-theme=dark] .dashboard-now-primary summary,[data-theme=dark] .dashboard-now-primary .eyebrow{color:#ff9bad}
[data-theme=dark] .calendar-options label,[data-theme=dark] .playlist-search>span,[data-theme=dark] .health-resource-card>span{color:var(--muted)}
[data-theme=dark] #library-screen .library-main,[data-theme=dark] #library-screen .library-table-scroll,[data-theme=dark] .report-table th{background:#242228;color:var(--ink);border-color:var(--line)}
[data-theme=dark] #library-screen .media-tool-icon{background:#49303a;color:#ff9bad}
[data-theme=dark] .report-table th{background:#302d34;color:var(--muted)}
[data-theme=dark] .health-check .good,[data-theme=dark] .health-overall .good{background:#183b30;color:#9be9c2}

/* Icecast mount and public URL cards. Keep live state colours legible on dark surfaces. */
[data-theme=dark] .icecast-page #stream-mounts .broadcast-mount,[data-theme=dark] .icecast-page .icecast-output{background:#29262d;border-color:#4a424d;box-shadow:0 6px 20px #0000001a}
[data-theme=dark] .icecast-page .broadcast-mount-label strong,[data-theme=dark] .icecast-page .icecast-output-heading strong{color:var(--ink)}
[data-theme=dark] .icecast-page .broadcast-mount-label small,[data-theme=dark] .icecast-page .icecast-output-heading>div>span,[data-theme=dark] .icecast-page .icecast-output-foot,[data-theme=dark] .icecast-page .icecast-section-heading p:last-child{color:var(--muted)}
[data-theme=dark] .icecast-page .broadcast-mount-uptime{background:#35313a;border-color:#514954;color:#ddd5dc}
[data-theme=dark] .icecast-page .broadcast-mount-actions button{background:#35313a;border-color:#5c525e;color:#f2edf0}
[data-theme=dark] .icecast-page .broadcast-mount-actions button:hover:not(:disabled){background:#453e49}
[data-theme=dark] .icecast-page .broadcast-mount-actions button[data-mount-action=on]:not(:disabled){border-color:#477e62;color:#a7e8c1}
[data-theme=dark] .icecast-page .broadcast-mount-actions button[data-mount-action=off]:not(:disabled){border-color:#8a4b5b;color:#ffb7c3}
[data-theme=dark] .icecast-page .broadcast-mount-actions button[data-mount-edit]{background:#40313f;border-color:#735267;color:#f1bed5}
[data-theme=dark] .icecast-page .mount-add-button{background:#432d38;border-color:#8b5066;color:#ffd0de}
[data-theme=dark] .icecast-page .mount-add-button:hover{background:#543543}
[data-theme=dark] .icecast-page .icecast-url-row input{background:#201e24!important;border-color:#5b515d!important;color:#f2edf0!important}
[data-theme=dark] .icecast-page .icecast-output-heading a,[data-theme=dark] .icecast-page .icecast-output-foot a{color:#ff9bad}
[data-theme=dark] .icecast-page .icecast-copy-status{color:#9ce5bb}
[data-theme=dark] .icecast-page .mount-listener-badge{background:#183b30;border-color:#356a51;color:#a9e8c4}
[data-theme=dark] .icecast-page .mount-listener-badge[data-state=offline],[data-theme=dark] .icecast-page .mount-listener-badge[data-state=disabled],[data-theme=dark] .icecast-page .mount-listener-badge[data-state=stopped]{background:#353139;border-color:#59515d;color:#ddd4dc}
[data-theme=dark] .icecast-page .mount-listener-badge[data-capacity=full]{background:#483921;border-color:#846539;color:#ffdda2}
[data-theme=dark] .icecast-page .broadcast-mount-state{background:#183b30;border-color:#356a51;color:#a9e8c4}
[data-theme=dark] .icecast-page .broadcast-mount-state[data-state=offline]{background:#482832;border-color:#834456;color:#ffb8c5}
[data-theme=dark] .icecast-page .broadcast-mount-state[data-state=stopped],[data-theme=dark] .icecast-page .broadcast-mount-state[data-state=disabled]{background:#353139;border-color:#59515d;color:#ddd4dc}
[data-theme=dark] .settings-playout-form label,[data-theme=dark] .settings-rotation-form label{color:var(--ink)}
[data-theme=dark] .transition-info summary span:first-child,[data-theme=dark] .backup-info summary span:first-child{background:var(--action-primary);color:#fff}
[data-theme=dark] #dashboard-now-source,[data-theme=dark] #dashboard-timing,[data-theme=dark] .dashboard-now-primary #dashboard-timing{color:var(--muted)}
[data-theme=dark] #programme-name,[data-theme=dark] .dashboard-now-primary #programme-name{color:var(--ink)}
[data-theme=dark] .dashboard-timing-help summary{color:#ff9bad;border-color:#ff9bad}
[data-theme=dark] .dashboard-timing-bubble{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .calendar-toolbar,[data-theme=dark] .calendar-scroll,[data-theme=dark] .calendar-day{background:#242228;color:var(--ink);border-color:var(--line)}
[data-theme=dark] #calendar{background:var(--line)}
[data-theme=dark] .calendar-day h3,[data-theme=dark] .calendar-day.is-today h3{background:#49303a;color:var(--ink)}
[data-theme=dark] #library-screen .library-filter-heading strong,[data-theme=dark] #library-screen .library-filter-fields label,[data-theme=dark] #library-screen #filter-status{color:var(--muted)}
[data-theme=dark] .health-resource-label span:not(.health-resource-icon){color:var(--muted)}
[data-theme=dark] .ranking-card-heading>span{background:#49303a;color:#ff9bad}
[data-theme=dark] .calendar-cell-controls label{color:var(--muted)}
[data-theme=dark] #library-screen #filter-status{background:#302d34;color:var(--muted);border-color:var(--line)}
[data-theme=dark] .map-empty span,[data-theme=dark] .live-stat-icon{background:#49303a;color:#ff9bad}
[data-theme=dark] .access-dialog-heading>button{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .media-modal-close,[data-theme=dark] .upload-hero-icon,[data-theme=dark] .upload-empty-icon{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .media-ingest-modal #dropzone{background:#242228!important;color:var(--ink)}
[data-theme=dark] .media-ingest-modal .upload-hero,[data-theme=dark] .media-ingest-modal .upload-queue-row,[data-theme=dark] .media-ingest-modal .upload-queue-empty{background:#302d34;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .media-ingest-modal .upload-choice{background:var(--action-primary);color:#fff;border-color:var(--action-primary)}
[data-theme=dark] .media-modal .media-modal-inner{background:#242228;color:var(--ink)}
[data-theme=dark] .media-modal .media-modal-header{border-color:var(--line)}
[data-theme=dark] .media-modal .processing-panel,[data-theme=dark] .media-modal .sftp-panel,[data-theme=dark] .media-modal .processing-panel>summary,[data-theme=dark] .media-modal .sftp-panel>summary{background:#302d34;color:var(--ink);border-color:var(--line)}

/* Consistent depth and readable controls across the dark workspace. */
:root[data-theme=dark]{--ink:#f5f2f4;--muted:#c9c0c7;--line:#514a54;--surface:#18171b;--dark-raised:#242228;--dark-inset:#302d34;--dark-hover:#3d3741;--dark-link:#ff9bad}
[data-theme=dark] .main p>a:not([class]),[data-theme=dark] .main li>a:not([class]){color:var(--dark-link)}
[data-theme=dark] :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid #ffa8b7;outline-offset:2px}
[data-theme=dark] :is(.card,.hero,.dial-card,.playlist-library,.report-shell,.stats-card,.health-overall){box-shadow:0 8px 24px #0b080d30}
[data-theme=dark] :is(table,thead,tbody,tr,td,th){border-color:var(--line)}
[data-theme=dark] :is(th,legend,.eyebrow){color:#e3c4ce}
[data-theme=dark] :is(.helptext,.field-hint,.form-hint,.caption,figcaption){color:var(--muted)}
[data-theme=dark] :is(hr,fieldset){border-color:var(--line)}
[data-theme=dark] :is(input,select,textarea):disabled{opacity:.7}
[data-theme=dark] input[type=color]{background:var(--dark-inset)!important;color:var(--ink)!important;border-color:var(--line)!important}
[data-theme=dark] .icon-button{color:var(--ink);background:var(--dark-inset);border-color:var(--line)}
[data-theme=dark] .icon-button:hover{background:var(--dark-hover)}
[data-theme=dark] ::selection{background:#8b3b52;color:#fff}

/* Playlist builder: the page's light-only rows and labels otherwise disappear. */
[data-theme=dark] .playlist-builder>.card,[data-theme=dark] .playlist-settings-panel{background:var(--dark-raised);border-color:var(--line);box-shadow:0 8px 24px #0b080d30}
[data-theme=dark] .pool-tabs,[data-theme=dark] .playlist-entry-count,[data-theme=dark] .entry-position{background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .pool-tab{color:var(--muted)}
[data-theme=dark] .pool-tab.is-active{background:#4b303b;color:#ffe4ea;box-shadow:inset 0 0 0 1px #965268}
[data-theme=dark] .pool-item,[data-theme=dark] .playlist-order li.playlist-entry-card{background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .pool-item:hover,[data-theme=dark] .playlist-order li.playlist-entry-card:hover{background:var(--dark-hover);border-color:#bd778a}
[data-theme=dark] .pool-item-copy strong,[data-theme=dark] .playlist-entry-copy strong{color:var(--ink)}
[data-theme=dark] .pool-item small,[data-theme=dark] .playlist-order li small,[data-theme=dark] .playlist-duration-summary,[data-theme=dark] .playlist-duration-summary small,[data-theme=dark] .playlist-entry-copy .media-filename,[data-theme=dark] .pool-item-copy .media-filename{color:var(--muted)}
[data-theme=dark] .playlist-duration-summary strong,[data-theme=dark] .playlist-entry-copy .playlist-entry-duration,[data-theme=dark] .playlist-entry-copy .playlist-entry-kind{color:#ffabb9}
[data-theme=dark] .pool-pagination,[data-theme=dark] .playlist-order-heading{border-color:var(--line)}
[data-theme=dark] .pool-search button,[data-theme=dark] .pool-search-clear,[data-theme=dark] .pool-pagination a,[data-theme=dark] .entry-move,[data-theme=dark] .entry-delete button{background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .pool-search button:hover,[data-theme=dark] .pool-search-clear:hover,[data-theme=dark] .entry-move:hover:not(:disabled){background:var(--dark-hover);color:#fff}
[data-theme=dark] .playlist-entry-meta .media-filename,[data-theme=dark] .playlist-entry-meta .playlist-entry-duration,[data-theme=dark] .playlist-order-empty{background:#39343d;border-color:var(--line)}
[data-theme=dark] .playlist-field>label,[data-theme=dark] .duration-picker>legend,[data-theme=dark] .playlist-settings-panel label{color:var(--ink)}
[data-theme=dark] .playlist-settings-panel :is(.field-hint,.helptext,.check-row small){color:var(--muted)}
[data-theme=dark] .playlist-settings-panel :is(.artwork-field,.playlist-advanced,.duration-presets button){background:var(--dark-inset);border-color:var(--line);color:var(--ink)}
[data-theme=dark] .playlist-settings-panel :is(.artwork-override,.artwork-stop-sync){background:var(--dark-raised);border-color:var(--line)}
[data-theme=dark] .playlist-settings-panel .artwork-sync-badge{background:#1d4435;color:#9de9c1}
[data-theme=dark] .playlist-settings-panel .artwork-sync-off{background:#403b46;color:var(--muted)}
[data-theme=dark] .playlist-settings-panel :is(.artwork-placeholder,.duration-presets button>span){background:#49303a;color:#ffb0bf;border-color:var(--line)}
[data-theme=dark] .playlist-settings-panel :is(.playlist-advanced summary,.duration-presets button strong,.check-row,.duration-summary){color:var(--ink)}
[data-theme=dark] .playlist-settings-panel :is(.playlist-advanced summary small,.duration-presets button small){color:var(--muted)}
[data-theme=dark] .entry-notice summary{color:#ffb0bf;border-color:#c46a82}
[data-theme=dark] .playlist-order.drop-ready,[data-theme=dark] .playlist-order li.playlist-drop-placeholder{background:#3d2732;color:#ffe3e9}
[data-theme=dark] .entry-notice ul{background:#393023;color:#f7e9cd;border-color:#9a7949}
[data-theme=dark] .stream-pending-notice{background:#342d40;border-color:#8067a9;color:#f4eaff}
[data-theme=dark] .stream-pending-notice[data-kind=output]{background:#3c3024;border-color:#a27a43;color:#ffe9c5}
[data-theme=dark] .stream-pending-notice strong,[data-theme=dark] .stream-pending-notice small{color:inherit}
[data-theme=dark] .playlist-assignment-links a{color:var(--dark-link)}

/* Tag colors stay recognizable as a border and dot; text stays readable. */
[data-theme=dark] :is(.tag-chip,.playlist-tag-pill,.pool-item.pool-tag){background:#39343d!important;color:#f7f3f5!important;border:1px solid var(--tag-color,#9d8698)!important}
[data-theme=dark] :is(.tag-chip,.playlist-tag-pill,.pool-item.pool-tag) :is(strong,span){color:inherit!important}
[data-theme=dark] .pool-item.pool-tag{min-height:48px;border-radius:10px!important;padding:8px 10px;box-shadow:inset 3px 0 var(--tag-color,#9d8698)}
[data-theme=dark] .pool-item.pool-tag:hover{background:#48404a!important;box-shadow:inset 3px 0 var(--tag-color,#9d8698),0 3px 12px #0b080d3b}
[data-theme=dark] .pool-item.pool-tag .pool-add-icon{background:#714153;color:#fff!important}
[data-theme=dark] .playlist-entry-copy .playlist-tag-pill{padding:5px 10px;border-radius:7px;font-weight:750}

/* Keep the station name clear of the account actions in the desktop header. */
@media(min-width:1001px){.topbar-station{position:static;transform:none;min-width:0;margin-right:auto}.topbar-station>span{overflow:hidden;text-overflow:ellipsis}}
@media(min-width:721px) and (max-width:1000px){.topbar-station{display:none}}

/* Shared dark interaction palette: pale light-theme hover fills cannot carry light text. */
:root[data-theme=dark]{--dark-accent-fill:#49303a;--dark-accent-hover:#5a3948;--dark-accent-border:#a56c7e;--dark-accent-text:#ffb6c3}
[data-theme=dark] :is(.report-table,.library-table,.processing-history-table) tbody tr:hover,
[data-theme=dark] :is(.report-table,.library-table,.processing-history-table) tbody tr:focus-within,
[data-theme=dark] #library-screen .library-table tbody tr:hover:not(.duplicate-group-row){background:var(--dark-hover);color:var(--ink)}
[data-theme=dark] .processing-history-table tbody tr:is(:hover,:focus-within) td,
[data-theme=dark] #media-list .duplicate-group-row:hover td{background:var(--dark-hover);color:var(--ink)}
[data-theme=dark] :is(.report-table,.library-table,.processing-history-table) tbody tr:is(:hover,:focus-within) :is(td,th,strong,span,small){color:inherit}
[data-theme=dark] .report-table tbody a{color:var(--dark-accent-text)}
[data-theme=dark] .report-table tbody a:hover{color:#ffe0e6;text-decoration:underline}
[data-theme=dark] :is(.calendar-slot[role=button],.event-duration-presets button,.duration-presets button,.permission-picker li label,.permission-picker #id_permissions>div label):is(:hover,:focus-visible){background:var(--dark-accent-fill);color:var(--ink);border-color:var(--dark-accent-border)}
[data-theme=dark] :is(.broadcast-mount-actions button,.mount-add-button,.broadcast-reload,.news-row-actions .news-delete-button,.media-modal-close,.modal-close,.backup-info-close,.icon-button-danger,.media-ingest-modal .media-modal-close):hover:not(:disabled),
[data-theme=dark] :is(.track-action-menu a,.track-action-menu button,.taxonomy-grid .managed-tag details summary,.taxonomy-grid .managed-type details summary,.taxonomy-grid .tag-actions button:not([value=delete]),.dj-action-menu>summary):is(:hover,:focus-visible){background:var(--dark-accent-fill);color:var(--dark-accent-text);border-color:var(--dark-accent-border)}
[data-theme=dark] :is(.taxonomy-grid .tag-actions button[value=delete],.settings-layout .settings-panel .backup-actions button[type=submit],.track-action-menu .delete-track):is(:hover,:focus-visible){background:#61313e;color:#ffe4e9;border-color:#b66b7f}
[data-theme=dark] :is(.report-actions a,.library-summary>a,.media-back-link,.pool-pagination a,.sftp-copy):is(:hover,:focus-visible){background:var(--dark-accent-fill);color:var(--dark-accent-text);border-color:var(--dark-accent-border)}
[data-theme=dark] :is(.report-actions a,.report-pagination button,.library-summary>a,.track-action-menu a,.track-action-menu button){background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .report-actions button[type=submit]:is(:hover,:focus-visible),[data-theme=dark] .report-actions a:is(:hover,:focus-visible){background:var(--dark-accent-hover);color:#fff;border-color:var(--dark-accent-border)}
[data-theme=dark] :is(.report-shell,.report-table,.report-stat){border-color:var(--line)}
[data-theme=dark] .report-table th{background:var(--dark-inset);color:#e3c4ce}

/* Keep field geometry and focus treatment consistent in every workspace. */
[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]),select,textarea){box-sizing:border-box;min-height:38px;border:1px solid #655b67;border-radius:9px;background:var(--dark-inset);color:var(--ink);box-shadow:inset 0 1px 2px #0002;transition:border-color .15s,box-shadow .15s,background .15s}
[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]),select,textarea):hover:not(:disabled){border-color:#a77888;background:#38333c}
[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]),select,textarea):focus{border-color:#ff9bad;outline:2px solid #ff9bad;outline-offset:1px;box-shadow:0 0 0 4px #c9253d38}
[data-theme=dark] :is(input,select,textarea)::placeholder{color:#c2b5be;opacity:1}

/* News exposes sequence controls only after the source is enabled. */
[data-theme=dark] .news-panel :is(.news-sequence-list li,.news-sequence-list li.news-sequence-feed,.news-days label,.news-sequence-position){background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .news-panel .news-sequence-list li.news-sequence-feed{background:#3e2d37;border-color:#805063}
[data-theme=dark] .news-panel .news-sequence-position,[data-theme=dark] .news-panel .news-number{background:var(--dark-accent-fill);color:var(--dark-accent-text)}
[data-theme=dark] .news-panel .news-sequence-actions button,[data-theme=dark] .news-row-actions :is(a,button){background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .news-panel .news-sequence-actions button:is(:hover,:focus-visible),[data-theme=dark] .news-row-actions :is(a,button):is(:hover,:focus-visible){background:var(--dark-accent-fill);color:var(--dark-accent-text);border-color:var(--dark-accent-border)}
[data-theme=dark] .news-panel .news-row-actions .news-delete-button{background:#45272d;color:#ffd3d8;border-color:#75414b}
[data-theme=dark] .news-panel .news-row-actions .news-delete-button:is(:hover,:focus-visible){background:#61313e;color:#ffe4e9;border-color:#b66b7f}
[data-theme=dark] .news-panel :is(.news-sequence-add-actions,.news-airing-actions,.news-actions) button{background:var(--action-primary);color:#fff;border-color:var(--action-primary)}
[data-theme=dark] .news-panel :is(.news-sequence-add-actions,.news-airing-actions,.news-actions) button:is(:hover,:focus-visible){background:var(--action-primary-hover);color:#fff;border-color:var(--action-primary-hover)}
[data-theme=dark] .news-panel :is(.news-sequence-add input,.news-sequence-add select,.news-airing-grid input,.news-airing-grid select,.news-field-grid input,.news-field-grid select,.news-source-choice select){background:var(--dark-inset);color:var(--ink);border-color:#655b67}
[data-theme=dark] .news-panel .news-airing-row{border-color:var(--line)}

/* Media Library filter and bulk tag tools have light gradients and hidden states. */
[data-theme=dark] #library-screen .library-filter{background:linear-gradient(145deg,#2c2630,#242228);border-color:var(--line)!important;box-shadow:0 8px 24px #0b080d40}
[data-theme=dark] #library-screen .library-filter-heading{border-color:var(--line)}
[data-theme=dark] #library-screen .library-filter-heading strong{color:var(--ink)}
[data-theme=dark] #library-screen .library-filter-fields :is(input[type=search],select),
[data-theme=dark] #library-screen .bulk-edit-group :is(input,select){background:var(--dark-inset);color:var(--ink);border-color:#655b67;box-shadow:inset 0 1px 2px #0002}
[data-theme=dark] #library-screen .library-filter-fields :is(input[type=search],select):is(:hover,:focus),
[data-theme=dark] #library-screen .bulk-edit-group :is(input,select):is(:hover,:focus){border-color:#ff9bad}
[data-theme=dark] #library-screen .filter-toggles,[data-theme=dark] #library-screen #filter-status{background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] #library-screen #filter-status.is-loading{background:#493b29;color:#ffe3b0;border-color:#8c704a}
[data-theme=dark] #library-screen :is(#refresh-library,.filter-clear){background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] #library-screen :is(#refresh-library,.filter-clear):is(:hover,:focus-visible){background:var(--dark-accent-fill);color:var(--dark-accent-text);border-color:var(--dark-accent-border)}
[data-theme=dark] #library-screen .bulk-tag-bar{background:#30272f;color:var(--ink);border-color:#765263;box-shadow:0 6px 18px #0b080d30}
[data-theme=dark] #library-screen .bulk-tag-bar :is(strong,label){color:var(--ink)}
[data-theme=dark] #library-screen .bulk-tag-bar .library-primary{background:var(--action-primary);color:#fff;border-color:var(--action-primary)}
[data-theme=dark] #library-screen .bulk-tag-bar .library-primary:is(:hover,:focus-visible){background:var(--action-primary-hover);color:#fff;border-color:var(--action-primary-hover)}
[data-theme=dark] #library-screen .bulk-tag-bar .quiet{background:var(--dark-inset);color:var(--ink);border-color:var(--line)}
[data-theme=dark] #library-screen .bulk-tag-bar .quiet:is(:hover,:focus-visible){background:var(--dark-accent-fill);color:var(--dark-accent-text);border-color:var(--dark-accent-border)}

/* Tags and Types uses inset rows and controls within the two cards. */
[data-theme=dark] .taxonomy-grid>.card{background:var(--dark-raised);border-color:var(--line)}
[data-theme=dark] .taxonomy-grid :is(.managed-tag,.managed-type){background:var(--dark-inset);border-color:var(--line)}
[data-theme=dark] .taxonomy-grid :is(.managed-tag,.managed-type):is(:hover,:has(details[open])){background:#3b303a;border-color:#805063}
[data-theme=dark] .taxonomy-grid :is(.tag-count,.managed-type code,.type-key-note code){background:#3c3540;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .taxonomy-grid :is(.managed-tag,.managed-type) form{background:var(--dark-raised);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .taxonomy-grid :is(.managed-tag,.managed-type) details summary{background:#443840;color:#ffcfda;border-color:#805063}
[data-theme=dark] .taxonomy-grid :is(.managed-tag,.managed-type) details summary:is(:hover,:focus-visible){background:#5a3b4b;color:#fff;border-color:#b66b7f}
[data-theme=dark] .taxonomy-grid .tag-actions button:not([value=delete]):is(:hover,:focus-visible){background:#4a3d48;color:#fff;border-color:#8a6376}
[data-theme=dark] .taxonomy-grid .tag-actions button[value=delete]:is(:hover,:focus-visible){background:#61313e;color:#ffe4e9;border-color:#b66b7f}
[data-theme=dark] .playlist-library{background:var(--dark-raised);border-color:var(--line)}
[data-theme=dark] .playlist-row{background:var(--dark-inset);border-color:var(--line)}
[data-theme=dark] .playlist-row:is(:hover,:focus-within){background:#3b303a;border-color:#805063}
[data-theme=dark] .playlist-count{background:#3c3540;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .playlist-row-copy span{color:var(--muted)}
[data-theme=dark] .playlist-row-actions .icon-button{background:#443840;color:#ffcfda;border-color:#805063}
[data-theme=dark] .playlist-row-actions .icon-button:is(:hover,:focus-visible){background:#5a3b4b;color:#fff;border-color:#b66b7f}
[data-theme=dark] .playlist-row-actions .icon-button-danger{background:#45272d;color:#ffd3d8;border-color:#75414b}
[data-theme=dark] .playlist-row-actions .icon-button-danger:is(:hover,:focus-visible){background:#61313e;color:#ffe4e9;border-color:#b66b7f}
[data-theme=dark] .playlist-search-copy label{color:var(--ink)}
[data-theme=dark] .playlist-search{background:var(--dark-inset);color:var(--muted);border-color:#655b67;box-shadow:inset 0 1px 2px #0002}
[data-theme=dark] .playlist-search:hover{background:#39333d;border-color:#8b7888}
[data-theme=dark] .playlist-search:focus-within{background:#39333d;border-color:var(--action-focus);box-shadow:0 0 0 3px #df8b2440}
[data-theme=dark] .playlist-search input[type=search]{background:transparent;color:var(--ink);border:0;box-shadow:none}
[data-theme=dark] .playlist-search-clear{background:#514450;color:#f0d8e0;border:0}
[data-theme=dark] .playlist-search-clear:is(:hover,:focus-visible){background:#694958;color:#fff}
[data-theme=dark] .settings-rotation-option{background:#39343d;border-color:var(--line);color:var(--ink)}
[data-theme=dark] .settings-rotation-weights textarea{background:var(--dark-inset);border-color:#655b67;color:var(--ink)}
[data-theme=dark] .selection-log-item{background:var(--dark-inset);border-color:var(--line)}
[data-theme=dark] .selection-log-outcome{background:#183b30;color:#a9e8c4}
[data-theme=dark] .selection-log-outcome[data-outcome=exhausted],[data-theme=dark] .selection-log-outcome[data-outcome=failed]{background:#483921;color:#ffdda2}

/* Station Settings inner panels, popovers and backup controls. */
[data-theme=dark] .settings-layout .settings-panel,[data-theme=dark] .settings-layout .settings-playout-grid>.settings-panel{background:var(--dark-raised);border-color:var(--line);color:var(--ink)}
[data-theme=dark] .settings-layout :is(.autodj-fields>div,.autodj-options label,.relay-preset-item,.transition-info-bubble,.backup-info-bubble,.backup-table-scroll){background:var(--dark-inset);border-color:var(--line);color:var(--ink)}
[data-theme=dark] .settings-layout :is(.transition-info-bubble,.backup-info-bubble)::before{background:var(--dark-inset);border-color:var(--line)}
[data-theme=dark] .settings-layout :is(.transition-info summary,.backup-info summary){background:#45303a;border-color:#805266;color:#ffd2dd}
[data-theme=dark] .settings-layout :is(.transition-range output,.settings-rotation-fields>div){background:#39343d;border-color:var(--line);color:var(--ink)}
[data-theme=dark] .settings-layout :is(.relay-edit-form,.transition-actions,.settings-rotation-footer,.backup-table th,.backup-table td,.email-test-form,.email-alert-form){border-color:var(--line)}
[data-theme=dark] .settings-layout :is(.relay-preset-actions button,.relay-edit-actions button:last-child,.relay-delete-actions button:first-child,.backup-actions a,.backup-actions button:not([type=submit]),.backup-restore-actions button:not([type=submit])){background:#39343d;border-color:#655a67;color:var(--ink)}
[data-theme=dark] .settings-layout :is(.relay-preset-actions button,.relay-edit-actions button:last-child,.relay-delete-actions button:first-child,.backup-actions a,.backup-actions button:not([type=submit]),.backup-restore-actions button:not([type=submit])):hover:not(:disabled){background:#4a424e;border-color:#a47485;color:#fff}
[data-theme=dark] .settings-layout .backup-actions button[type=submit]{background:#482832;border-color:#8a4b5b;color:#ffc0cb}
[data-theme=dark] .settings-layout .backup-actions button[type=submit]:hover:not(:disabled){background:#61313e;border-color:#b66b7f;color:#ffe4e9}
[data-theme=dark] .settings-layout :is(.backup-restore-warning,.backup-feedback){background:#482832;border-color:#8a4b5b;color:#ffd4dd}
[data-theme=dark] .settings-layout .backup-info-close{background:#49313d;color:#ffd0de}
[data-theme=dark] .settings-layout .backup-info-close:hover{background:#603a4b}
[data-theme=dark] .settings-layout .email-secret-state{color:var(--muted)}
[data-theme=dark] .settings-layout :is(.relay-preset-summary span,.backup-table td small,.backup-table th){color:var(--muted)}
[data-theme=dark] .settings-layout .backup-card :is(input[type=file],input:not([type=checkbox]),select),[data-theme=dark] .settings-layout .station-branding input[type=file]{background:var(--dark-inset);border-color:#655b67;color:var(--ink)}
[data-theme=dark] .settings-messages p,[data-theme=dark] .settings-layout :is(.autodj-feedback,.email-feedback){background:#183b30;border-color:#356a51;color:#a9e8c4}
