/* Dark theme: fixes for components that had light colours written into them (selected states were light text on a light fill).
   Only applies when the dark theme is on. */
html[data-theme="dark"] .adm-view button.on,
html[data-theme="dark"] .draft-chip.on,html[data-theme="dark"] .draft-chip.on:hover:not(:disabled),
html[data-theme="dark"] .seg-btn.active,
html[data-theme="dark"] .bg-filters button.on,
html[data-theme="dark"] .draft-source.on b{background:#3a3550;border-color:#5a4f80;color:#efe9ff}
html[data-theme="dark"] .draft-chip.on b,html[data-theme="dark"] .bg-filters button.on b{color:inherit;opacity:.85}
html[data-theme="dark"] .adm-view button{background:var(--surface);color:var(--muted)}
html[data-theme="dark"] .adm-view button.on{color:#efe9ff}

/* Tables: the hover row was nearly white */
html[data-theme="dark"] .user-table tr:hover td{background:#222226}
html[data-theme="dark"] .user-table th{background:#202024;color:#b8b8c2}
html[data-theme="dark"] .user-table td{color:var(--ink)}
html[data-theme="dark"] .adm-pill{background:#2b2b31;color:#b8b8c2}
html[data-theme="dark"] .adm-pill.on{background:var(--good-bg);color:var(--good-ink)}
html[data-theme="dark"] .adm-menu>div{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .del-btn:hover:not(:disabled){background:var(--bad-bg);border-color:#7a3b3b}

/* Setup and picker components */
html[data-theme="dark"] .brand-upload,html[data-theme="dark"] .brand-upload:hover,html[data-theme="dark"] .brand-upload.has-file{background:#1d1d20;border-color:#3a3a40;color:var(--ink)}
html[data-theme="dark"] .ind-body,html[data-theme="dark"] .chip span,html[data-theme="dark"] .kit-swatch,html[data-theme="dark"] .upload-thumb,
html[data-theme="dark"] .onb-connections .conn-card,html[data-theme="dark"] .conn,html[data-theme="dark"] .focus-add button{background:#1d1d20;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .kit-found.warn,html[data-theme="dark"] .research-disclaimer{background:var(--warn-bg);border-color:#8a6a1f;color:var(--warn-ink)}
html[data-theme="dark"] .bg-card,html[data-theme="dark"] .bg-modal-card{background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .bg-badge.draft{background:var(--warn-bg);color:var(--warn-ink)}
html[data-theme="dark"] .bg-badge.published{background:var(--good-bg);color:var(--good-ink)}
html[data-theme="dark"] .bg-badge.failed{background:var(--bad-bg);color:var(--bad-ink)}
html[data-theme="dark"] .bg-badge.busy{background:#1d2a3b;color:#8ab8ff}
html[data-theme="dark"] .cs-pill{background:#26262a;color:var(--ink)}
html[data-theme="dark"] .an-chip.li{background:#1d2a3b;color:#8ab8ff}
html[data-theme="dark"] .anx-heat i.fut{background:transparent}

/* Calendar entries: the base colours were dark grey, unreadable on the dark calendar */
html[data-theme="dark"] .calendar-event,
html[data-theme="dark"] .calendar-event.pending,
html[data-theme="dark"] .calendar-event.scheduled{color:#e6e6ec;background:#26262b;border-color:#5a5a64}
html[data-theme="dark"] .calendar-event.hc-series{border-left-color:#2fb3b9!important}
html[data-theme="dark"] .calendar-event.festival-event{border-left-color:#f4c542!important}
html[data-theme="dark"] .calendar-event.queued,html[data-theme="dark"] .calendar-event.generating{color:var(--warn-ink);background:var(--warn-bg)}
html[data-theme="dark"] .calendar-event.created,html[data-theme="dark"] .calendar-event.completed{color:var(--good-ink);background:var(--good-bg)}
html[data-theme="dark"] .calendar-event.failed{color:var(--bad-ink);background:var(--bad-bg)}
html[data-theme="dark"] .calendar-day.past .calendar-event{opacity:.9}
html[data-theme="dark"] .calendar-day strong{color:var(--ink)}
html[data-theme="dark"] .calendar-day.past strong{color:var(--muted)}
html[data-theme="dark"] .cal-more{color:#c9b6ff}
