/* =========================================================
   WILLY DARK MODE
   Deze laag staat na de component-styles en verandert alleen
   presentatie. Functionaliteit en statuskleuren blijven intact.
   ========================================================= */

html[data-theme="dark"] {
    color-scheme: dark;
    --bepacom-dark: #f1f3f5;
    --bepacom-bg: #0f1115;
    --bepacom-card: #191c21;
    --bepacom-border: #343942;
    --badge-text: #f1f3f5;
    --badge-text-muted: rgba(241, 243, 245, .82);
    --willy-bg: #0f1115;
    --willy-surface: #191c21;
    --willy-surface-raised: #20242b;
    --willy-surface-soft: #252a32;
    --willy-border: #353b45;
    --willy-border-soft: #2c3139;
    --willy-text: #f0f2f4;
    --willy-muted: #a5adb8;
    --willy-muted-strong: #c0c6ce;
    --willy-red-soft: rgba(227, 6, 19, .15);
    --bs-body-bg: #0f1115;
    --bs-body-color: #f0f2f4;
    --bs-border-color: #353b45;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background: var(--willy-bg);
    color: var(--willy-text);
}

html[data-theme="dark"] body {
    scrollbar-color: #555d68 #15181d;
}

html[data-theme="dark"] ::selection {
    color: #fff;
    background: rgba(227, 6, 19, .62);
}

html[data-theme="dark"] :is(input, select, textarea) {
    color: var(--willy-text);
    border-color: #414853;
    background-color: #20242a;
}

html[data-theme="dark"] :is(input, textarea)::placeholder {
    color: #838c98;
}

html[data-theme="dark"] option {
    color: var(--willy-text);
    background: #20242a;
}

html[data-theme="dark"] :is(input, select, textarea):focus {
    border-color: #d04a53;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .14);
}

/* Theme control */
html[data-theme="dark"] .willy-theme-toggle {
    color: #f5c451;
    border-color: #3a4049;
    background: #20242a;
}

html[data-theme="dark"] .willy-theme-toggle:hover {
    color: #ffda76;
    border-color: #4b535f;
    background: #292e36;
}

html[data-theme="dark"] .willy-theme-moon {
    opacity: 0;
    transform: rotate(25deg) scale(.65);
}

html[data-theme="dark"] .willy-theme-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.empty-layout-theme-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
}

/* App-shell en navigatie */
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .willy-main {
    background: var(--willy-bg);
}

html[data-theme="dark"] .willy-topbar {
    border-bottom-color: rgba(255, 255, 255, .09);
    background: rgba(20, 22, 27, .94);
}

html[data-theme="dark"] .willy-brand {
    color: var(--willy-text);
}

html[data-theme="dark"] .willy-brand-copy small,
html[data-theme="dark"] .willy-user-chip small,
html[data-theme="dark"] .willy-mobile-user small {
    color: #969eaa;
}

html[data-theme="dark"] .willy-primary-nav {
    background: #252930;
}

html[data-theme="dark"] .willy-primary-nav .willy-nav-link,
html[data-theme="dark"] .willy-tools-trigger {
    color: #b4bbc5;
}

html[data-theme="dark"] .willy-primary-nav .willy-nav-link:hover,
html[data-theme="dark"] .willy-primary-nav .willy-nav-link.active,
html[data-theme="dark"] .willy-tools-trigger:hover,
html[data-theme="dark"] .willy-tools-trigger.active {
    color: #fff;
    background: #343941;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] .willy-tools-dropdown,
html[data-theme="dark"] .willy-user-chip,
html[data-theme="dark"] .willy-notification-btn,
html[data-theme="dark"] .willy-menu-btn,
html[data-theme="dark"] .willy-mobile-nav {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface-raised);
}

html[data-theme="dark"] .willy-tools-dropdown .willy-tool-link {
    color: var(--willy-text);
}

html[data-theme="dark"] .willy-tools-dropdown .willy-tool-link:hover,
html[data-theme="dark"] .willy-tools-dropdown .willy-tool-link.active {
    background: #2b3038;
}

html[data-theme="dark"] .willy-tools-dropdown .willy-tool-link small,
html[data-theme="dark"] .willy-tools-label,
html[data-theme="dark"] .willy-mobile-section-label {
    color: #9ca5b1;
}

html[data-theme="dark"] .willy-notification-btn {
    color: #c7cdd5;
}

html[data-theme="dark"] .willy-notification-btn:hover {
    color: #fff;
    background: #2b3038;
}

html[data-theme="dark"] .willy-menu-btn span {
    background: #e8ebef;
}

html[data-theme="dark"] .willy-mobile-nav {
    border-top-color: #343941;
    box-shadow: 0 18px 30px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .willy-mobile-nav .willy-nav-link {
    color: #c3c9d1;
}

html[data-theme="dark"] .willy-mobile-nav .willy-nav-link.active {
    color: #ff9ba2;
    background: rgba(227, 6, 19, .15);
}

html[data-theme="dark"] .willy-mobile-user {
    background: #292e35;
}

/* Algemene en oudere WILLY-componenten */
html[data-theme="dark"] :is(.panel, .card-bepacom, .detail-card, .ios-card, .ibs-card, .pwa-card) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] :is(.input-bepacom, .ibs-modal-textarea, .ibs-dp-textarea) {
    color: var(--willy-text);
    border-color: #414853;
    background: #20242a;
}

html[data-theme="dark"] .btn-ghost {
    color: var(--willy-text);
    border-color: var(--willy-border);
}

html[data-theme="dark"] .btn-ghost:hover {
    background: #292e35;
}

html[data-theme="dark"] .badge {
    color: var(--willy-text) !important;
    border-color: var(--willy-border);
    background: #242830;
}

html[data-theme="dark"] :is(.notification-panel, .calendar-modal, .ibs-modal, .ibs-editor) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .48);
}

html[data-theme="dark"] :is(.notification-header, .ibs-modal-header, .ibs-editor-headerbar) {
    border-color: var(--willy-border-soft);
    background: #20242a;
}

html[data-theme="dark"] .notification-item {
    color: var(--willy-text);
    border-color: var(--willy-border-soft);
    background: #1d2026;
}

html[data-theme="dark"] .notification-item.is-unread {
    background: rgba(227, 6, 19, .09);
}

html[data-theme="dark"] .notification-meta,
html[data-theme="dark"] .muted {
    color: var(--willy-muted);
}

html[data-theme="dark"] .toast-notification {
    color: #fff;
    border-color: #4a5059;
    background: #272c33;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
}

/* Paginabasis en componentvariabelen */
html[data-theme="dark"] :is(.home-page, .calendar-page, .hours-page, .library-page, .work-page, .rights-page, .calculation-page) {
    color: var(--willy-text);
}

html[data-theme="dark"] .projects-page {
    --project-ink: var(--willy-text);
    --project-muted: var(--willy-muted);
    --project-line: var(--willy-border);
}

html[data-theme="dark"] .rights-page {
    --rights-navy: var(--willy-text);
    --rights-blue: #e30613;
    --rights-blue-soft: rgba(227, 6, 19, .12);
    --rights-green: #59c995;
    --rights-red: #ff7e85;
    --rights-border: var(--willy-border);
    --rights-muted: var(--willy-muted);
}

html[data-theme="dark"] .calculation-page {
    --ink: var(--willy-text);
    --muted: var(--willy-muted);
    --line: var(--willy-border);
    --soft: var(--willy-surface-soft);
}

html[data-theme="dark"] .technique-shell {
    --tech-ink: var(--willy-text);
    --tech-muted: var(--willy-muted);
}

html[data-theme="dark"] .result-shell {
    --result-ink: var(--willy-text);
    --result-muted: var(--willy-muted);
    --result-line: var(--willy-border);
}

/* Startpagina */
html[data-theme="dark"] :is(.home-focus-section, .home-section) {
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] :is(.home-focus-card, .home-tool-card, .home-coming-card) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.home-focus-card, .home-tool-card):hover {
    border-color: #555d68;
    box-shadow: 0 15px 32px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .home-secondary-action {
    color: var(--willy-text);
    border-color: #424952;
    background: #242830;
}

html[data-theme="dark"] :is(.home-section-header > p, .home-focus-copy p, .home-tool-card p, .home-mobile-copy p) {
    color: var(--willy-muted);
}

/* Kalender */
html[data-theme="dark"] .calendar-board {
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] :is(.calendar-refresh, .calendar-close) {
    color: #d5dae0;
    border-color: #414750;
    background: #22262c;
}

html[data-theme="dark"] :is(.calendar-refresh, .calendar-close):hover {
    color: #fff;
    background: #2b3037;
}

html[data-theme="dark"] .calendar-legend,
html[data-theme="dark"] .calendar-note {
    color: var(--willy-muted-strong);
    background: #23272e;
}

html[data-theme="dark"] .calendar-board-title > span {
    color: #c0c6cf;
    background: #2a2f36;
}

html[data-theme="dark"] .calendar-modal {
    color: var(--willy-text);
    border-color: #424852;
    background: var(--willy-surface);
}

html[data-theme="dark"] .calendar-modal-header,
html[data-theme="dark"] .calendar-detail-section {
    border-color: var(--willy-border-soft);
}

html[data-theme="dark"] .calendar-detail-item {
    border-color: var(--willy-border);
    background: #22262c;
}

html[data-theme="dark"] .calendar-people > span {
    color: #d7dbe1;
    border-color: #404650;
    background: #23272d;
}

html[data-theme="dark"] .calendar-stage .fc {
    --fc-page-bg-color: #191c21;
    --fc-neutral-bg-color: #22262c;
    --fc-neutral-text-color: #aab2bd;
    --fc-border-color: #383e47;
    --fc-button-text-color: #e8ebee;
    --fc-button-bg-color: #24282e;
    --fc-button-border-color: #424852;
    --fc-button-hover-bg-color: #30353d;
    --fc-button-hover-border-color: #535b66;
    --fc-button-active-bg-color: #383d45;
    --fc-button-active-border-color: #606976;
    --fc-today-bg-color: rgba(227, 6, 19, .08);
    color: var(--willy-text);
}

html[data-theme="dark"] .calendar-stage .fc .fc-button-primary,
html[data-theme="dark"] .calendar-stage .fc-weekend-toggle {
    color: #dce0e5 !important;
    border-color: #414852 !important;
    background: #24282e !important;
}

html[data-theme="dark"] .calendar-stage .fc .fc-button-primary:hover,
html[data-theme="dark"] .calendar-stage .fc-weekend-toggle:hover {
    color: #fff !important;
    background: #30353d !important;
}

html[data-theme="dark"] .calendar-stage .fc .fc-col-header-cell {
    color: #aeb6c1;
    background: #20242a;
}

html[data-theme="dark"] .calendar-stage .fc :is(.fc-daygrid-day-number, .fc-col-header-cell-cushion, .fc-timegrid-slot-label-cushion) {
    color: #cdd2d9;
}

/* Mijn werk */
html[data-theme="dark"] :is(.work-switcher, .work-search, .work-files, .work-empty, .work-loading, .work-message) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
}

html[data-theme="dark"] :is(.work-tab, .work-secondary-button, .work-icon-button, .work-upload-button) {
    color: #c8ced6;
    border-color: #404751;
    background: #22262c;
}

html[data-theme="dark"] .work-tab.is-active {
    color: #fff;
    background: #343941;
}

html[data-theme="dark"] :is(.work-project-card, .cloud-row, .cloud-folder-button) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.work-project-card, .cloud-row, .cloud-folder-button):hover {
    background: #292e35;
}

html[data-theme="dark"] :is(.work-project-copy small, .work-project-count, .cloud-file-meta) {
    color: var(--willy-muted);
}

/* Uren */
html[data-theme="dark"] :is(.hours-loading, .hours-message, .hours-week-heading, .day-card, .summary-card, .hours-editor, .hours-confirm) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .week-chip {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] .week-chip:hover:not(:disabled) {
    border-color: #555d68;
}

html[data-theme="dark"] .week-chip.is-active {
    border-color: #e30613;
    background: rgba(227, 6, 19, .08);
}

html[data-theme="dark"] :is(.day-card-header, .editor-header, .editor-actions) {
    border-color: var(--willy-border-soft);
    background: #20242a;
}

html[data-theme="dark"] .hour-line {
    color: var(--willy-text);
    border-color: #2e333a;
    background: var(--willy-surface);
}

html[data-theme="dark"] .hour-line:hover:not(:disabled) {
    background: #23272d;
}

html[data-theme="dark"] .add-line {
    color: #c2c8d0;
    border-color: #3b4149;
    background: #20242a;
}

html[data-theme="dark"] :is(.editor-header button, .quick-hours button, .cancel-editor) {
    color: #d0d5dc;
    border-color: #414852;
    background: #24282e;
}

html[data-theme="dark"] .project-results {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .project-results button {
    color: var(--willy-text);
    border-color: var(--willy-border-soft);
    background: transparent;
}

html[data-theme="dark"] .project-results button:hover {
    background: #2b3037;
}

/* Projecten */
html[data-theme="dark"] :is(.project-search-panel, .project-card-shell, .disciplines-panel, .planning-panel, .project-folder-card) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 9px 28px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] :is(.project-search-box, .project-browser-toolbar, .folder-breadcrumbs) {
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] .project-result {
    color: var(--willy-text);
    border-color: var(--willy-border-soft);
    background: #1e2228;
}

html[data-theme="dark"] .project-result:hover,
html[data-theme="dark"] .project-result.is-selected {
    border-color: #59616d;
    background: #292e35;
}

html[data-theme="dark"] :is(.project-facts, .planning-metrics, .cabinet-facts) {
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.project-fact, .planning-metrics > span, .cabinet-facts > span) {
    border-color: var(--willy-border);
}

html[data-theme="dark"] :is(.project-folder-toggle, .panel-heading, .planning-detail-header, .planning-section-heading) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.project-browser, .project-folder-content, .planning-section, .discipline-list) {
    border-color: var(--willy-border-soft);
    background: #171a1f;
}

html[data-theme="dark"] :is(.project-entry-row, .discipline-card, .stage-card, .delivery-card, .planning-notes) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.project-entry-row, .discipline-card):hover,
html[data-theme="dark"] .discipline-card.is-selected {
    background: #292e35;
}

html[data-theme="dark"] :is(.stage-card > header, .stage-fields, .stage-field) {
    border-color: var(--willy-border-soft);
    background: #20242a;
}

html[data-theme="dark"] .stage-card > header {
    background: #282d34;
}

html[data-theme="dark"] :is(.project-search-panel p, .result-copy small, .discipline-copy small, .stage-field small, .planning-notes p) {
    color: var(--willy-muted);
}

/* Rechtenbeheer */
html[data-theme="dark"] .rights-hero {
    border: 1px solid #353b45;
    background: radial-gradient(circle at 92% 0%, rgba(227, 6, 19, .28), transparent 34%), linear-gradient(132deg, #181b20 0%, #292e35 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .rights-kicker {
    color: #ff9da3;
}

html[data-theme="dark"] .rights-hero p {
    color: #c8cdd4;
}

html[data-theme="dark"] .rights-stat-grid {
    border-color: rgba(255, 255, 255, .13);
    background: rgba(0, 0, 0, .16);
}

html[data-theme="dark"] .rights-stat {
    color: #f4f5f6;
    background: transparent;
}

html[data-theme="dark"] .rights-stat span {
    color: #bfc5cd;
}

html[data-theme="dark"] .rights-alert {
    color: #ffb6bb;
    border-color: rgba(239, 89, 98, .4);
    background: rgba(150, 20, 30, .16);
}

html[data-theme="dark"] .rights-loading,
html[data-theme="dark"] .rights-result-count {
    color: var(--willy-muted);
}

html[data-theme="dark"] .rights-spinner {
    border-color: #414852;
    border-top-color: #e30613;
}

html[data-theme="dark"] .rights-toolbar {
    color: var(--willy-text);
    background: transparent;
}

html[data-theme="dark"] :is(.rights-search, .rights-filter) {
    color: var(--willy-text);
    border-color: #414852;
    background-color: #20242a;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .12);
}

html[data-theme="dark"] .rights-search:focus-within,
html[data-theme="dark"] .rights-filter:focus {
    border-color: #d04a53;
    box-shadow: 0 0 0 4px rgba(227, 6, 19, .12);
}

html[data-theme="dark"] .rights-search svg {
    stroke: #a5adb8;
}

html[data-theme="dark"] .rights-search input {
    color: var(--willy-text);
}

html[data-theme="dark"] .person-card {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .person-card.is-expanded {
    border-color: #545c68;
    box-shadow: 0 15px 38px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .person-card.is-dirty {
    border-color: #a87326;
}

html[data-theme="dark"] .person-summary {
    color: var(--willy-text);
    background: transparent;
}

html[data-theme="dark"] .person-summary:hover {
    background: #20242a;
}

html[data-theme="dark"] .person-editor {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #15181d;
}

html[data-theme="dark"] .person-avatar {
    color: #ffb6bb;
    background: rgba(227, 6, 19, .14);
}

html[data-theme="dark"] .person-username,
html[data-theme="dark"] :is(.permission-intro p, .permission-section-heading small, .permission-copy small) {
    color: var(--willy-muted);
}

html[data-theme="dark"] .person-you {
    color: #ffb6bb;
    background: rgba(227, 6, 19, .14);
}

html[data-theme="dark"] .person-open-copy {
    color: #e0a3a7;
}

html[data-theme="dark"] .person-chevron {
    stroke: #aab1bb;
}

html[data-theme="dark"] .access-pill.is-off {
    color: #b5bdc7;
    background: #292e35;
}

html[data-theme="dark"] .access-pill.is-on {
    color: #91dfbb;
    background: rgba(22, 135, 93, .18);
}

html[data-theme="dark"] .access-pill.is-admin {
    color: #d5b8ff;
    background: rgba(126, 81, 183, .2);
}

html[data-theme="dark"] .unsaved-dot {
    background: #e9a23b;
    box-shadow: 0 0 0 4px rgba(233, 162, 59, .16);
}

html[data-theme="dark"] .permission-intro,
html[data-theme="dark"] .permission-section-heading {
    color: var(--willy-text);
    background: transparent;
}

html[data-theme="dark"] .self-protection-note {
    color: #b9d5ff;
    border-color: rgba(83, 143, 224, .34);
    background: rgba(50, 100, 170, .14);
}

html[data-theme="dark"] .login-blocked-note {
    color: #c1c7cf;
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] .permission-option {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] .permission-option:hover {
    border-color: #59616d;
    background: #292e35;
}

html[data-theme="dark"] .permission-option.is-enabled {
    border-color: rgba(227, 6, 19, .38);
    background: rgba(227, 6, 19, .1);
}

html[data-theme="dark"] .permission-option.is-sensitive.is-enabled {
    border-color: rgba(154, 109, 211, .52);
    background: rgba(126, 81, 183, .13);
}

html[data-theme="dark"] .permission-option:has(input:disabled) {
    color: #9ba3ad;
    border-color: #303640;
    background: #1a1e23;
    opacity: .66;
}

html[data-theme="dark"] .permission-switch {
    background: #555d68;
}

html[data-theme="dark"] .permission-switch span {
    background: #f4f5f6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .38);
}

html[data-theme="dark"] .permission-option input:checked + .permission-switch {
    background: #e30613;
}

html[data-theme="dark"] .permission-option.is-sensitive input:checked + .permission-switch {
    background: #8d61c7;
}

html[data-theme="dark"] .permission-option input:focus-visible + .permission-switch {
    box-shadow: 0 0 0 4px rgba(227, 6, 19, .2);
}

html[data-theme="dark"] .person-actions {
    border-color: var(--willy-border);
}

html[data-theme="dark"] .save-feedback {
    color: #e2b878;
}

html[data-theme="dark"] .save-success {
    color: #91dfbb;
}

html[data-theme="dark"] .rights-secondary {
    color: #d1d6dc;
    border-color: #414852;
    background: #24282e;
}

html[data-theme="dark"] .rights-secondary:hover:not(:disabled) {
    color: #fff;
    border-color: #59616d;
    background: #30353d;
}

html[data-theme="dark"] .rights-secondary.is-danger {
    color: #ff9da3;
}

html[data-theme="dark"] .rights-primary {
    color: #fff;
    border-color: #c91420;
    background: #e30613;
    box-shadow: 0 6px 14px rgba(227, 6, 19, .18);
}

html[data-theme="dark"] .rights-primary:hover:not(:disabled) {
    background: #bf101a;
}

html[data-theme="dark"] .rights-empty {
    color: var(--willy-muted);
}

html[data-theme="dark"] .rights-empty strong {
    color: var(--willy-text);
}

/* Bibliotheek */
html[data-theme="dark"] :is(.library-panel, .library-loading, .library-modal, .function-builder-card, .function-inline-palette) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .library-tabs {
    background: #24282e;
}

html[data-theme="dark"] .library-tabs button {
    color: #aeb6c1;
}

html[data-theme="dark"] .library-tabs button.active {
    color: #fff;
    background: #353a42;
}

html[data-theme="dark"] :is(.library-save-state, .library-secondary, .function-row-action, .quick-buttons button, .protocol-buttons button, .palette-add, .remove) {
    color: #d0d5db;
    border-color: #414852;
    background: #24282e;
}

html[data-theme="dark"] :is(.materials-toolbar, .functions-toolbar, .library-panel-heading, .function-editor-header, .material-editor-header, .library-modal-header) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.materials-table-scroll, .functions-table-scroll, .function-editor-body, .material-editor-body, .library-modal > main) {
    background: #15181d;
}

html[data-theme="dark"] :is(.materials-table, .functions-table, .groups-table) :is(th, td) {
    color: var(--willy-text);
    border-color: var(--willy-border-soft);
    background: var(--willy-surface);
}

html[data-theme="dark"] :is(.materials-table, .functions-table, .groups-table) th {
    color: #a8b0bb;
    background: #252a31;
}

html[data-theme="dark"] :is(.material-table-row, .function-table-row):hover td {
    background: #252a31;
}

html[data-theme="dark"] :is(.materials-search, .functions-search, .library-search, .palette-search, .syntess-search) {
    border-color: #414852;
    background: #20242a;
}

html[data-theme="dark"] :is(.functions-filter-hint, .library-bulk-bar, .bulk-labor-form, .syntess-browser, .drop-zone, .rto-card, .architecture-note, .labor-not-applicable) {
    color: var(--willy-muted-strong);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.composition-row, .palette-item, .syntess-result, .expansion-row, .io-capacity-row, .communication-capacity-row, .controller-license-row, .concept-group-row, .bulk-function-row) {
    color: var(--willy-text);
    border-color: var(--willy-border-soft);
    background: #252a31;
}

html[data-theme="dark"] :is(.function-editor-steps, .material-editor-footer, .function-editor-footer, .library-modal-footer) {
    border-color: var(--willy-border);
    background: #1d2026;
}

html[data-theme="dark"] .function-editor-steps button {
    color: #aeb6c1;
}

html[data-theme="dark"] .function-editor-steps button > span {
    color: #c5cbd3;
    border-color: #48505b;
    background: #292e35;
}

html[data-theme="dark"] .function-editor-steps button.active {
    color: #fff;
    background: #292e35;
}

html[data-theme="dark"] :is(.library-form-grid, .labor-grid, .group-labor-grid, .license-calculation-fields, .rates-grid) :is(input, select, textarea),
html[data-theme="dark"] :is(.composition-row, .expansion-picker, .bulk-labor-form) :is(input, select) {
    color: var(--willy-text);
    border-color: #414852;
    background: #20242a;
}

/* Calculatieopbouw */
html[data-theme="dark"] :is(.calculation-stage-nav, .calculation-panel, .calculation-sidebar, .calculation-canvas, .calculation-dialog) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] :is(.calculation-start-hero, .calculation-workspace-header, .calculation-cabinet-header) {
    border-color: var(--willy-border);
}

html[data-theme="dark"] :is(.calculation-project-list > button, .calculation-totals article, .calculation-cabinet, .calculation-group, .calculation-palette-item) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] .calculation-project-list > button:hover,
html[data-theme="dark"] .calculation-palette-item:hover {
    background: #292e35;
}

html[data-theme="dark"] :is(.calculation-cabinet-metrics, .calculation-group-header, .calculation-expansions, .calculation-search, .cabinet-wiring-method > div) {
    color: var(--willy-text);
    border-color: var(--willy-border-soft);
    background: #252a31;
}

html[data-theme="dark"] :is(.calculation-function, .calculation-expansion-row) {
    border-color: var(--willy-border-soft);
}

html[data-theme="dark"] .calculation-function:hover {
    background: #252a31;
}

html[data-theme="dark"] :is(.calculation-secondary, .calculation-back, .calculation-card-actions button, .function-delete, .calculation-expansion-row button, .compatible-expansions button) {
    color: #d0d5db;
    border-color: #414852;
    background: #24282e;
}

html[data-theme="dark"] :is(.calculation-secondary, .calculation-back, .calculation-card-actions button, .function-delete):hover {
    color: #fff;
    background: #30353d;
}

html[data-theme="dark"] :is(.calculation-drop-empty, .calculation-group-drop, .calculation-canvas-empty) {
    color: var(--willy-muted);
    border-color: #4a515c;
    background: #171a1f;
}

/* Techniekblad */
html[data-theme="dark"] :is(.technique-mode-card, .technique-progress, .cabinet-tabs button, .technique-board, .technique-demand-panel, .technique-controller-panel, .technique-result-panel) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .technique-mode-card.complete {
    border-color: #46505d;
    background: linear-gradient(115deg, #191c21, #22272e);
}

html[data-theme="dark"] :is(.mode-switch, .demand-tabs, .requirement-tabs) {
    border-color: var(--willy-border);
    background: #292e35;
}

html[data-theme="dark"] :is(.mode-switch button, .demand-tabs button, .requirement-tabs button) {
    color: #aeb6c1;
}

html[data-theme="dark"] :is(.mode-switch button.active, .demand-tabs button.active, .requirement-tabs button.active, .cabinet-tabs button.active) {
    color: #fff;
    border-color: #59616d;
    background: #3a4049;
}

html[data-theme="dark"] :is(.demand-card, .controller-card, .io-module-bank, .communication-module-bank, .result-section, .requirement-function-summary, .requirement-row) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.io-bank-header, .communication-bank-header, .result-section-toggle, .requirement-drawer > header, .requirement-drawer > footer) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #252a31;
}

html[data-theme="dark"] :is(.io-channel, .communication-link, .capacity-slot, .terminal-contact, .material-choice, .communication-allocation) {
    color: var(--willy-text);
    border-color: #3d444e;
    background: #272c33;
}

html[data-theme="dark"] :is(.io-channel.free, .capacity-slot.free, .communication-empty, .channel-empty) {
    color: #8f98a4;
    background: #1b1e23;
}

html[data-theme="dark"] .requirement-drawer {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #191c21;
    box-shadow: -18px 0 50px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .requirement-drawer-body,
html[data-theme="dark"] .result-section-content {
    background: #171a1f;
}

/* Eindblad en prijsopbouw */
html[data-theme="dark"] :is(.result-heading, .result-panel, .result-cabinet-heading, .cost-summary, .labor-summary, .result-margin-panel, .specification-dialog) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: var(--willy-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] :is(.result-heading, .result-cabinet-heading) {
    background: linear-gradient(135deg, #1c2026, #252a31);
}

html[data-theme="dark"] :is(.result-total-grid > article, .cabinet-overview-row, .signal-group, .compact-cost-card, .compact-labor-card, .cost-breakdown-summary article, .cost-breakdown-full-detail, .cost-breakdown-section, .cost-direct-lines, .cost-function) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.cabinet-overview-head, .compact-cost-card > header, .compact-labor-card > header, .cost-function > header, .result-table-head, .signal-group > header) {
    color: #b1b9c4;
    border-color: var(--willy-border-soft);
    background: #292e35;
}

html[data-theme="dark"] :is(.cabinet-overview-row, .result-table-row, .signal-group) {
    border-color: var(--willy-border-soft);
}

html[data-theme="dark"] .result-table-row:nth-child(odd) {
    background: #1d2026;
}

html[data-theme="dark"] .result-table-row.pending {
    background: rgba(216, 138, 29, .1);
}

html[data-theme="dark"] :is(.signal-group-list, .cost-breakdown-full-detail-body, .cost-breakdown-section-body, .cost-lines-block) {
    border-color: var(--willy-border-soft);
    background: #171a1f;
}

html[data-theme="dark"] .cost-breakdown-dialog {
    color: var(--willy-text);
    border-color: #444b55;
    background: #15181d;
}

html[data-theme="dark"] .cost-breakdown-header {
    background: linear-gradient(120deg, #20242a, #30353d);
}

html[data-theme="dark"] .cost-breakdown-footer,
html[data-theme="dark"] .specification-dialog > footer,
html[data-theme="dark"] .specification-dialog > header {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] .specification-project-preview {
    border-color: var(--willy-border);
    background: var(--willy-border);
}

html[data-theme="dark"] .specification-project-preview > span {
    background: #20242a;
}

html[data-theme="dark"] :is(.specification-fields, .specification-contents) :is(input, textarea) {
    color: var(--willy-text);
    border-color: #414852;
    background: #20242a;
}

html[data-theme="dark"] :is(.specification-open, .result-cabinet-actions > button, .margin-save, .requirement-reset) {
    color: #d2d8df;
    border-color: #414852;
    background: #24282e;
}

html[data-theme="dark"] :is(.cost-lines-table, .labor-table) :is(th, td) {
    color: var(--willy-text);
    border-color: var(--willy-border-soft);
    background: #20242a;
}

html[data-theme="dark"] :is(.cost-lines-table, .labor-table) th {
    color: #aeb6c1;
    background: #292e35;
}

/* Rustigere teksten op alle nieuwe pagina's */
html[data-theme="dark"] :is(
    .home-focus-copy span,
    .home-tool-card span,
    .calendar-detail-item small,
    .hour-line-main small,
    .field-help,
    .project-fact small,
    .planning-metrics small,
    .material-description-cell small,
    .function-primary-cell small,
    .composition-name span,
    .palette-subtitle,
    .calculation-project-meta,
    .function-kind,
    .function-space,
    .mode-copy p,
    .cabinet-tab-copy small,
    .demand-copy small,
    .module-header-meta,
    .result-heading p,
    .result-panel header p,
    .cost-breakdown-summary span,
    .cost-breakdown-summary small
) {
    color: var(--willy-muted);
}

/* Fout- en waarschuwingvlakken blijven herkenbaar zonder fel wit vlak. */
html[data-theme="dark"] :is(.calendar-error, .hours-message.is-error, .hours-inline-error, .editor-error, .calculation-alert, .technique-alert, .result-error, .cost-breakdown-error) {
    color: #ffb6bb;
    border-color: rgba(239, 89, 98, .4);
    background: rgba(150, 20, 30, .16);
}

html[data-theme="dark"] :is(.hours-inline-success, .save-success, .result-ready-state.ready) {
    color: #91dfbb;
    border-color: rgba(54, 201, 135, .34);
    background: rgba(22, 135, 93, .15);
}

/* Sales */
html[data-theme="dark"] {
    --assumption-title-color: #f2f4f6;
    --assumption-title-bg: #20252b;
    --assumption-title-border: #505863;
    --assumption-title-hover: #a95d64;
    --assumption-title-focus: #ef6672;
    --assumption-title-ring: rgba(239,102,114,.12);
}

html[data-theme="dark"] .sales-page {
    --sales-ink: #f3f5f7;
    --sales-muted: #9ba5b1;
    --sales-line: #3a4049;
    --assumption-title-color: #f2f4f6;
    --assumption-title-bg: #20252b;
    --assumption-title-border: #505863;
    --assumption-title-hover: #a95d64;
    --assumption-title-focus: #ef6672;
    --assumption-title-ring: rgba(239,102,114,.12);
    color: #f3f5f7;
}

html[data-theme="dark"] :is(
    .sales-tabs, .sales-state, .dashboard-card, .sales-dashboard-panel, .recent-card, .offer-filter-card,
    .offer-table-card, .sales-modal, .kpi-card, .customer-insight-card, .selected-project, .condition-block,
    .position-card, .offer-facts, .total-choice, .execution-window
) {
    border-color: #3a4049;
    background: #242930;
    color: #f1f4f7;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .kpi-card.primary {
    border-color: #e30613;
    background: linear-gradient(145deg, #d50714, #8f1018);
}

html[data-theme="dark"] :is(.sales-tabs > button, .status-list button, .hot-offer-list > button, .customer-ranking > button, .recent-list > button, .calculation-list > button, .offer-row, .create-results button, .option-grid button, .template-grid button) {
    color: #edf1f5;
    background: #242930;
    border-color: #373d45;
}

html[data-theme="dark"] :is(.sales-tabs > button:hover, .status-list button:hover, .hot-offer-list > button:hover, .customer-ranking > button:hover, .recent-list > button:hover, .calculation-list > button:hover, .offer-row:hover, .create-results button:hover) {
    color: #fff;
    background: #2d333b;
}

html[data-theme="dark"] :is(.sales-tabs > button.active, .option-grid button.selected, .template-grid button.selected) {
    border-color: #8e4148;
    color: #ff9da4;
    background: #3a272c;
}

html[data-theme="dark"] :is(.dashboard-filters select, .refresh-button, .scope-toggle, .mine-filter, .sales-secondary, .modal-close, .line-actions button, .condition-line > button, .payment-line > button, .table-pagination button) {
    border-color: #48505a;
    color: #dce1e6;
    background: #2b3037;
}

html[data-theme="dark"] :is(.sales-search, .editor-content input, .editor-content textarea, .editor-content select, .sales-field input, .sales-field textarea, .money-input) {
    border-color: #48505a;
    color: #f0f3f6;
    background: #20252b;
}

/* Houd alle zoekvelden in Sales donker, ook tijdens focus en browser-autofill. */
html[data-theme="dark"] .sales-page .sales-search,
html[data-theme="dark"] .sales-page .sales-search:focus-within {
    border-color: #48505a;
    color: #f0f3f6;
    background: #20252b !important;
}

html[data-theme="dark"] .sales-page .sales-search:focus-within {
    border-color: #ef4d58;
    box-shadow: 0 0 0 3px rgba(239, 77, 88, .15);
}

html[data-theme="dark"] .sales-page .sales-search input,
html[data-theme="dark"] .sales-page .sales-search input:focus {
    color: #f3f5f7;
    caret-color: #ff6d77;
    background: transparent !important;
    color-scheme: dark;
}

html[data-theme="dark"] .sales-page .sales-search input::placeholder {
    color: #89939f;
    opacity: 1;
}

html[data-theme="dark"] .sales-page .sales-search input:-webkit-autofill,
html[data-theme="dark"] .sales-page .sales-search input:-webkit-autofill:hover,
html[data-theme="dark"] .sales-page .sales-search input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f3f5f7;
    box-shadow: 0 0 0 1000px #20252b inset;
    caret-color: #ff6d77;
}

html[data-theme="dark"] :is(.monthly-chart, .editor-nav, .offer-table-head, .table-pagination, .sales-modal > footer, .condition-block > header, .position-card > header, .position-card > footer, .editor-lock) {
    border-color: #3a4049;
    color: #dce1e6;
    background-color: #2a3037;
}

html[data-theme="dark"] .monthly-chart {
    background-image: linear-gradient(to bottom, transparent 24%, #3a4048 25%, transparent 25%, transparent 49%, #3a4048 50%, transparent 50%, transparent 74%, #3a4048 75%, transparent 75%);
}

html[data-theme="dark"] .editor-content { background: #20252b; }
html[data-theme="dark"] .editor-nav button { color: #b7c0ca; }
html[data-theme="dark"] .editor-nav button:hover { background: #30363e; }
html[data-theme="dark"] .editor-nav button.active { border-color: #8e4148; color: #ff9da4; background: #3a272c; }
html[data-theme="dark"] .offer-facts { background: #3a4049; }
html[data-theme="dark"] .offer-facts > div { background: #242930; }
html[data-theme="dark"] .execution-label { border-color: #754047; color: #ffabb0; background: #3b272b; }
html[data-theme="dark"] .selected-project { border-color: #35634e; background: #21352c; }
html[data-theme="dark"] .sales-message:not(.error):not(.success),
html[data-theme="dark"] .inline-loading,
html[data-theme="dark"] .empty-offers { color: #aab3bd; background: #282e35; }
html[data-theme="dark"] .sales-message.error { border-color: #754047; color: #ffabb0; background: #3b272b; }
html[data-theme="dark"] .sales-message.success { border-color: #36634f; color: #92dfba; background: #20362c; }
html[data-theme="dark"] .editor-lock { border-color: #745d38; color: #f0ca86; background: #3a3224; }
html[data-theme="dark"] :is(.kpi-card p, .empty-offers strong, .status-list strong, .recent-list strong, .calculation-list strong) { color: #eef2f5; }
html[data-theme="dark"] .customer-rank { color: #c2cad2; background: #353c44; }
html[data-theme="dark"] .customer-ranking > button:nth-child(-n+3) .customer-rank { color: #ff9da4; background: #43282d; }
html[data-theme="dark"] .customer-score.score-good { color: #91dfbb; background: #203a30; }
html[data-theme="dark"] .customer-score.score-warning { color: #f0ca86; background: #3a3224; }
html[data-theme="dark"] .customer-score.score-low { color: #ffabb0; background: #3b272b; }
html[data-theme="dark"] .customer-score.score-pending { color: #aab3bd; background: #353c44; }
html[data-theme="dark"] .customer-value.score strong { color: #91dfbb; }
html[data-theme="dark"] .customer-ranking-empty { border-color: #373d45; color: #aab3bd; background: #242930; }
html[data-theme="dark"] .filter-chips { background: #1d2228; }
html[data-theme="dark"] .hot-score.is-critical { color: #ff9da4; background: #43282d; }
html[data-theme="dark"] .hot-score.is-high { color: #f0ca86; background: #3a3224; }
html[data-theme="dark"] .hot-score.is-watch { color: #c2cad2; background: #353c44; }
html[data-theme="dark"] .hot-offer-copy em { color: #c0c8d1; background: #353c44; }
html[data-theme="dark"] .hot-offer-copy em.is-option { color: #91dfbb; background: #203a30; }
html[data-theme="dark"] .hot-offer-empty { border-color: #373d45; color: #aab3bd; }
html[data-theme="dark"] .hot-offer-empty strong { color: #eef2f5; }
html[data-theme="dark"] .customer-insight-navigation button { border-color: #48505a; color: #dce1e6; background: #2b3037; }
html[data-theme="dark"] .customer-insight-navigation button:hover { border-color: #8e4148; color: #ff9da4; background: #3a272c; }
html[data-theme="dark"] .customer-insight-grid { scrollbar-color: #545d68 transparent; }

/* Mailtemplate configurator */
html[data-theme="dark"] .mail-template-page {
    --mt-ink: #f2f4f7;
    --mt-muted: #a0a9b4;
    --mt-line: #3b424b;
    --mt-surface: #242930;
    --mt-soft: #20252b;
}

html[data-theme="dark"] .mail-template-page :is(input, select, textarea) {
    color: #f1f4f7;
    background: #20252b;
    color-scheme: dark;
}

html[data-theme="dark"] .mail-template-page :is(.template-preview p, .placeholder-list code) { color: #b1bac4; }
html[data-theme="dark"] .mail-template-page .placeholder-list button:hover { border-color: #8e4148; color: #ffabb0; background: #3b272b; }

html[data-theme="dark"] .mail-template-choice { border-color: #654047; background: #33262a; }
html[data-theme="dark"] .mail-template-choice select { border-color: #62474b; color: #f1f4f7; background: #20252b; color-scheme: dark; }
html[data-theme="dark"] .filter-chips button { color: #aeb7c1; }
html[data-theme="dark"] .filter-chips button.active { color: #ff9da4; background: #3a272c; }
html[data-theme="dark"] .offer-status { border-color: color-mix(in srgb, var(--status-color) 48%, #30363d); color: #f4f6f8; background: color-mix(in srgb, var(--status-color) 24%, #242930); }
html[data-theme="dark"] .status-edit-trigger { border-color: #48505a; color: #c5ccd4; background: #2b3037; }
html[data-theme="dark"] .status-edit-trigger:hover { border-color: #815159; color: #ff9da4; background: #3b292d; }
html[data-theme="dark"] .status-picker-modal > header p,
html[data-theme="dark"] .status-picker-current > b,
html[data-theme="dark"] .status-picker-modal > footer > span { color: #aeb7c1; }
html[data-theme="dark"] .status-picker-current {
    border-color: color-mix(in srgb, var(--status-color) 48%, #3a4049);
    background: color-mix(in srgb, var(--status-color) 17%, #242930);
}
html[data-theme="dark"] .status-picker-section.final-statuses { border-color: #3a4049; }
html[data-theme="dark"] .status-option { border-color: #3a4049; color: #edf1f5; background: #282e35; }
html[data-theme="dark"] .status-option:not(:disabled):hover,
html[data-theme="dark"] .status-option.current { border-color: color-mix(in srgb, var(--status-color) 52%, #48505a); background: color-mix(in srgb, var(--status-color) 15%, #282e35); }
html[data-theme="dark"] .status-option.final { border-color: #684048; }
html[data-theme="dark"] .status-option small { color: #aab3bd; }
html[data-theme="dark"] :is(.create-contact-choice, .contact-field-button, .contact-option, .contact-search) {
    border-color: #3a4049;
    color: #edf1f5;
    background: #282e35;
}
html[data-theme="dark"] .create-contact-choice.missing { border-color: #6e5934; background: #373023; }
html[data-theme="dark"] :is(.create-contact-choice div > span, .contact-option small, .contact-picker-modal > header p, .contact-picker-modal > footer > span) { color: #aab3bd; }
html[data-theme="dark"] :is(.create-contact-choice > button, .contact-field-button) { border-color: #48505a; color: #ff9da4; background: #2b3037; }
html[data-theme="dark"] :is(.create-contact-choice > button:hover, .contact-field-button:not(:disabled):hover, .contact-option:hover) { border-color: #815159; background: #3b292d; }
html[data-theme="dark"] .contact-option.selected { border-color: #815159; background: #3b292d; box-shadow: inset 3px 0 #ef4d58; }
html[data-theme="dark"] .contact-empty strong { color: #edf1f5; }
html[data-theme="dark"] .contact-avatar { color: #ff9da4; background: #43282d; }
html[data-theme="dark"] :is(.status-transition > span, .status-confirm-modal) { border-color: #3a4049; background: #242930; }
html[data-theme="dark"] .status-transition > span.target { border-color: #754047; background: #3b272b; }
html[data-theme="dark"] .status-confirm-modal p { color: #aeb7c1; }
html[data-theme="dark"] .assumptions-block { background: #20252b; }
html[data-theme="dark"] :is(.assumption-summary, .assumption-group, .assumption-empty) {
    border-color: #3a4049;
    color: #e7ebef;
    background: #242930;
}
html[data-theme="dark"] .assumption-group > header {
    border-color: #3a4049;
    background: #2a3037;
}
html[data-theme="dark"] .assumption-group > header input {
    color: #f2f4f6 !important;
    background: transparent !important;
}
html[data-theme="dark"] .assumption-group > header .assumption-title-control input {
    color: #f2f4f6 !important;
    -webkit-text-fill-color: #f2f4f6 !important;
    border-color: #505863 !important;
    background: #20252b !important;
    box-shadow: none !important;
    caret-color: #ef6672;
    opacity: 1;
}
html[data-theme="dark"] .assumption-group > header .assumption-title-control input:hover { border-color: #a95d64 !important; }
html[data-theme="dark"] .assumption-group > header .assumption-title-control input:focus {
    border-color: #ef6672 !important;
    box-shadow: 0 0 0 3px rgba(239,102,114,.12) !important;
}
html[data-theme="dark"] .assumption-title-control svg { stroke: #ff7f89; }
html[data-theme="dark"] .revision-button {
    border-color: #7c4a50 !important;
    color: #ff9da4 !important;
    background: #38272b !important;
}
html[data-theme="dark"] .revision-button:hover:not(:disabled) { border-color: #b35f67 !important; background: #442b30 !important; }
html[data-theme="dark"] .withdraw-signature-button {
    border-color: #826039;
    color: #f2c985;
    background: #392f22;
}
html[data-theme="dark"] .withdraw-signature-button:hover:not(:disabled) { border-color: #ad7b40; background: #463724; }
html[data-theme="dark"] .withdraw-confirm-button { border-color: #c1843b; background: #a9610f; }
html[data-theme="dark"] :is(.revision-flow > span, .revision-note) {
    border-color: #444b54;
    color: #c4cbd2;
    background: #292f36;
}
html[data-theme="dark"] .revision-flow > span.target { border-color: #7d4c52; background: #38272b; }
html[data-theme="dark"] .withdraw-flow > span.target { border-color: #826039; background: #392f22; }
html[data-theme="dark"] .assumption-count,
html[data-theme="dark"] .assumption-row-number { color: #c3cad1; background: #363d45; }
html[data-theme="dark"] :is(.assumption-group-actions button, .assumption-row-actions button) {
    border-color: #48505a;
    color: #dce1e6;
    background: #2b3037;
}
html[data-theme="dark"] .assumption-row-actions button.danger { color: #ff9da4; }
html[data-theme="dark"] .assumption-insert { border-color: #444b54; color: #aeb7c1; }
html[data-theme="dark"] .assumption-group > footer { border-color: #3a4049; background: #282e35; }
html[data-theme="dark"] .assumption-group > footer button:last-child { color: #c1c8cf; }
html[data-theme="dark"] .assumption-empty strong { color: #eef2f5; }
html[data-theme="dark"] .assumption-empty button { border-color: #754047; color: #ffabb0; background: #3b272b; }

/* =========================================================
   Razor CSS-isolatie: samengestelde componentselectors
   ========================================================= */

/* Mobiele appbalk en afspraakdetail */
html[data-theme="dark"] body .willy-topbar,
html[data-theme="dark"] body .willy-topbar-inner {
    background-color: rgba(20, 22, 27, .97) !important;
}

html[data-theme="dark"] body .calendar-modal-header {
    color: var(--willy-text) !important;
    border-bottom-color: var(--willy-border) !important;
    background: rgba(25, 28, 33, .97) !important;
}

html[data-theme="dark"] body .calendar-modal-body {
    color: var(--willy-text) !important;
    background: var(--willy-surface) !important;
}

/* Project zoeken, feiten en planningskengetallen */
html[data-theme="dark"] body .projects-page .project-search-box,
html[data-theme="dark"] body .projects-page .project-search-box:focus-within {
    color: var(--willy-text) !important;
    border-color: #454c56 !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .projects-page .project-search-box:focus-within {
    border-color: #e30613 !important;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .14) !important;
}

html[data-theme="dark"] body .projects-page .project-search-box input {
    color: var(--willy-text) !important;
    background: transparent !important;
}

html[data-theme="dark"] body .projects-page .project-fact,
html[data-theme="dark"] body .projects-page .planning-metrics > div,
html[data-theme="dark"] body .projects-page .detail-grid > div,
html[data-theme="dark"] body .projects-page .stage-field {
    color: var(--willy-text) !important;
    border-color: var(--willy-border-soft) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .projects-page :is(.project-fact, .planning-metrics > div, .detail-grid > div, .stage-field) small {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .projects-page :is(.project-fact, .planning-metrics > div, .detail-grid > div, .stage-field) strong {
    color: var(--willy-text) !important;
}

/* Calculatie: startformulier, navigatie en kastheaders */
html[data-theme="dark"] body .calculation-page .calculation-start-grid > .calculation-panel,
html[data-theme="dark"] body .calculation-page .calculation-start-grid .calculation-recent,
html[data-theme="dark"] body .calculation-page .calculation-dialog {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: var(--willy-surface) !important;
}

html[data-theme="dark"] body .calculation-page .calculation-form-grid input,
html[data-theme="dark"] body .calculation-page .calculation-dialog-field input,
html[data-theme="dark"] body .calculation-page .calculation-search input,
html[data-theme="dark"] body .calculation-page .function-quantity input {
    color: var(--willy-text) !important;
    border-color: #414852 !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .calculation-page .calculation-form-grid input:focus,
html[data-theme="dark"] body .calculation-page .calculation-dialog-field input:focus,
html[data-theme="dark"] body .calculation-page .calculation-search:focus-within {
    border-color: #d04a53 !important;
    background: #24282e !important;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .14) !important;
}

html[data-theme="dark"] body .calculation-page .calculation-stage-nav,
html[data-theme="dark"] body .calculation-page .calculation-scope-control > div {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .calculation-page .calculation-stage-nav > button {
    color: #aeb6c1 !important;
    background: transparent !important;
}

html[data-theme="dark"] body .calculation-page .calculation-stage-nav > button > span {
    color: #d1d6dc !important;
    background: #343a42 !important;
}

html[data-theme="dark"] body .calculation-page .calculation-stage-nav > button.active {
    color: #fff !important;
    background: #343941 !important;
}

html[data-theme="dark"] body .calculation-page :is(
    .calculation-cabinet-header,
    .calculation-cabinet-metrics,
    .calculation-group-header,
    .calculation-panel-heading,
    .calculation-canvas-heading
) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border-soft) !important;
    background: #252a31 !important;
}

html[data-theme="dark"] body .calculation-page :is(.calculation-panel-heading, .calculation-canvas-heading) {
    background: transparent !important;
}

html[data-theme="dark"] body .calculation-page :is(
    .calculation-project-list > button,
    .calculation-totals article,
    .calculation-cabinet,
    .calculation-group,
    .calculation-palette-item
) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .calculation-page .calculation-project-list > button:hover,
html[data-theme="dark"] body .calculation-page .calculation-palette-item:hover,
html[data-theme="dark"] body .calculation-page .calculation-function:hover {
    background: #292e35 !important;
}

html[data-theme="dark"] body .calculation-page :is(.calculation-empty-small, .calculation-canvas-empty, .calculation-drop-empty) strong,
html[data-theme="dark"] body .calculation-page :is(.calculation-empty-small, .calculation-canvas-empty, .calculation-drop-empty) h2 {
    color: var(--willy-muted-strong) !important;
}

html[data-theme="dark"] body .calculation-page .calculation-cabinet-zone.empty {
    border-color: #4a515c !important;
    background: rgba(255, 255, 255, .025) !important;
}

/* Techniekblad: interne kolommen, headers en echte I/O-modules */
html[data-theme="dark"] body .technique-shell :is(.technique-board, .technique-demand-panel, .technique-controller-panel, .technique-result-panel) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #171a1f !important;
}

html[data-theme="dark"] body .technique-shell :is(.technique-demand-panel, .technique-controller-panel, .technique-result-panel) > header {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #24282e !important;
}

html[data-theme="dark"] body .technique-shell :is(.demand-scroll, .controller-scroll, .result-scroll) {
    color: var(--willy-text) !important;
    background: #171a1f !important;
}

html[data-theme="dark"] body .technique-shell :is(.demand-card, .controller-card, .material-choice, .license-result, .requirement-row, .requirement-function-summary) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .technique-shell .controller-card > header {
    color: var(--willy-text) !important;
    border-color: #444b55 !important;
    background: linear-gradient(180deg, #353b43, #292e35) !important;
}

html[data-theme="dark"] body .technique-shell :is(.capacity-grid, .io-channel-grid, .communication-port-area) {
    background-color: #20242a !important;
    background-image: none !important;
}

html[data-theme="dark"] body .technique-shell .capacity-slot {
    color: var(--willy-text) !important;
    border-color: #56606d !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .technique-shell :is(.io-module-bank, .communication-module-bank) {
    color: var(--willy-text) !important;
    border-color: #555f6c !important;
    background: linear-gradient(180deg, #353b43, #2a2f36) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 3px 8px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] body .technique-shell :is(.io-bank-header, .communication-bank-header) {
    color: var(--willy-text) !important;
    border-color: #555f6c !important;
    background: linear-gradient(180deg, #414851, #343a42) !important;
}

html[data-theme="dark"] body .technique-shell :is(.io-channel, .communication-allocation, .communication-empty) {
    color: var(--willy-text) !important;
    border-color: #606a77 !important;
    background: #272c33 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .25) !important;
}

html[data-theme="dark"] body .technique-shell :is(.io-module-bank, .communication-module-bank) > footer {
    color: #c2c8d0 !important;
    border-color: #555f6c !important;
    background: #30363e !important;
}

html[data-theme="dark"] body .technique-shell :is(.channel-empty strong, .communication-empty strong) {
    color: #d4d9df !important;
}

html[data-theme="dark"] body .technique-shell :is(.requirement-editor-button, .controller-mode-hint, .scope-check) {
    color: #d6dbe2 !important;
    border-color: #414a55 !important;
    background: #252b33 !important;
}

html[data-theme="dark"] body .technique-shell .requirement-drawer,
html[data-theme="dark"] body .technique-shell .requirement-drawer-body {
    color: var(--willy-text) !important;
    background: #171a1f !important;
}

html[data-theme="dark"] body .technique-shell .requirement-drawer > :is(header, footer) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #24282e !important;
}

html[data-theme="dark"] body .technique-shell .controller-card.module-drop-target.technique-drop-compatible > header {
    background: #343f4c !important;
}

html[data-theme="dark"] body .technique-shell .controller-card.module-drop-target.technique-drop-active > header,
html[data-theme="dark"] body .technique-shell .technique-drop-active {
    color: #fff !important;
    background: #293e58 !important;
}

/* Mijn werk: IBS-inbox en rapportregels */
html[data-theme="dark"] body .work-page .ibs-inbox,
html[data-theme="dark"] body .work-page .ibs-report-card {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: var(--willy-surface) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22) !important;
}

html[data-theme="dark"] body .work-page :is(.ibs-filter, .ibs-search, .ibs-report-editor, .ibs-state) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .work-page .ibs-search:focus-within {
    border-color: #59616d !important;
    background: #24282e !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .05) !important;
}

html[data-theme="dark"] body .work-page .ibs-search input {
    color: var(--willy-text) !important;
    background: transparent !important;
}

html[data-theme="dark"] body .work-page :is(.ibs-refresh, .ibs-filter button.is-active, .ibs-search button, .ibs-state button, .ibs-open-report.is-open) {
    color: #d2d7dd !important;
    border-color: #414852 !important;
    background: #30353d !important;
}

html[data-theme="dark"] body .work-page .ibs-report-badges > span {
    color: #bdc4cd !important;
    border-color: #3e454f !important;
    background: #252a31 !important;
}

html[data-theme="dark"] body .work-page .ibs-report-badges strong,
html[data-theme="dark"] body .work-page .ibs-report-progress strong {
    color: var(--willy-text) !important;
}

/* Bibliotheek: formulieren, tabellen en leesbare codes */
html[data-theme="dark"] body .library-page .library-canvas > .library-panel-heading:first-child {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: rgba(25, 28, 33, .97) !important;
}

html[data-theme="dark"] body .library-page :is(.material-editor-body, .function-editor-body) {
    color: var(--willy-text) !important;
    background: #15181d !important;
}

html[data-theme="dark"] body .library-page :is(.library-wide-field textarea, .library-form-grid input, .library-form-grid select, .composition-row input, .composition-row select, .rto-card input, .rto-card textarea, .labor-grid input, .group-labor-grid input) {
    color: var(--willy-text) !important;
    border-color: #414852 !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .library-page :is(.materials-search input, .functions-search input, .palette-search):focus {
    color: var(--willy-text) !important;
    border-color: #d04a53 !important;
    background: #24282e !important;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .14) !important;
}

html[data-theme="dark"] body .library-page :is(.materials-table, .functions-table, .groups-table) th {
    color: #b1b9c4 !important;
    border-color: var(--willy-border) !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .library-page :is(.materials-table, .functions-table, .groups-table) td {
    color: var(--willy-text) !important;
    border-color: var(--willy-border-soft) !important;
    background: var(--willy-surface) !important;
}

html[data-theme="dark"] body .library-page :is(.material-table-row, .function-table-row):hover td {
    background: #252a31 !important;
}

html[data-theme="dark"] body .library-page .material-code-button,
html[data-theme="dark"] body .library-page .function-primary-cell strong,
html[data-theme="dark"] body .library-page .function-name-cell strong,
html[data-theme="dark"] body .library-page :is(.materials-empty-row, .functions-empty-row) strong {
    color: #f0f2f4 !important;
}

html[data-theme="dark"] body .library-page :is(.material-primary-cell, .material-type-cell, .material-manufacturer-cell, .material-status-cell, .function-connections-cell) small,
html[data-theme="dark"] body .library-page :is(.material-editor-header, .function-editor-header) p,
html[data-theme="dark"] body .library-page :is(.library-form-grid label, .library-wide-field) > span,
html[data-theme="dark"] body .library-page :is(.function-step-heading, .function-card-heading) p,
html[data-theme="dark"] body .library-page .function-card-heading small {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .library-page :is(.function-step-heading, .function-card-heading) h3,
html[data-theme="dark"] body .library-page .function-editor-steps button strong {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .library-page .function-editor-steps button.active,
html[data-theme="dark"] body .library-page :is(.material-editor-header, .function-editor-header, .library-modal-header, .material-editor-footer, .function-editor-footer, .library-modal-footer) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .library-page .function-price-summary {
    border-color: #444b55 !important;
    background: #292f36 !important;
}

html[data-theme="dark"] body .library-page .function-price-summary > strong {
    color: #f3f5f7 !important;
}

html[data-theme="dark"] body .library-page .function-price-summary > :is(span, small) {
    color: #aeb7c1 !important;
}

html[data-theme="dark"] body .library-page .function-price-summary > em {
    background: #43292d !important;
    color: #ff9ca4 !important;
}

html[data-theme="dark"] body .library-page .function-action-dot {
    box-shadow: inset 0 0 0 2px #24282e !important;
}

/* Prijsopbouw: expliciete hiërarchie op donkere oppervlakken */
html[data-theme="dark"] body .cost-breakdown-dialog {
    color: var(--willy-text) !important;
    border-color: #444b55 !important;
    background: #15181d !important;
}

html[data-theme="dark"] body .cost-breakdown-dialog :is(h2, h3, h4) {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .cost-breakdown-header {
    color: #fff !important;
    border-color: #454c56 !important;
    background: linear-gradient(120deg, #20242a, #30353d) !important;
}

html[data-theme="dark"] body .cost-breakdown-header :is(h2, strong) {
    color: #fff !important;
}

html[data-theme="dark"] body .cost-breakdown-header :is(p, small, div:first-child > span) {
    color: #c3cad3 !important;
}

html[data-theme="dark"] body .cost-breakdown-summary article {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .cost-breakdown-summary article.total {
    color: #fff !important;
    border-color: #4a515b !important;
    background: linear-gradient(120deg, #30353d, #3c424b) !important;
}

html[data-theme="dark"] body .cost-breakdown-summary strong {
    color: #f4f5f7 !important;
}

html[data-theme="dark"] body .cost-breakdown-summary :is(span, small) {
    color: #aeb6c1 !important;
}

html[data-theme="dark"] body .cost-breakdown-summary .total :is(span, small) {
    color: #d0d5dc !important;
}

html[data-theme="dark"] body .cost-breakdown-note {
    color: #d2d7de !important;
    border-color: #424a54 !important;
    background: #252a31 !important;
}

html[data-theme="dark"] body :is(.compact-cost-card, .compact-labor-card, .cost-breakdown-full-detail, .cost-breakdown-section, .cost-direct-lines, .cost-function) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body :is(.compact-cost-card, .compact-labor-card) > header,
html[data-theme="dark"] body .cost-function > header {
    color: var(--willy-text) !important;
    border-color: var(--willy-border-soft) !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body :is(.compact-cost-card, .compact-labor-card) > header strong,
html[data-theme="dark"] body .compact-source-name b,
html[data-theme="dark"] body .compact-labor-row b,
html[data-theme="dark"] body .compact-cost-row > strong,
html[data-theme="dark"] body .cost-breakdown-full-detail > summary strong,
html[data-theme="dark"] body .section-name strong,
html[data-theme="dark"] body .section-total strong,
html[data-theme="dark"] body .cost-subheading span,
html[data-theme="dark"] body .function-copy strong,
html[data-theme="dark"] body .cost-function > header .function-total strong,
html[data-theme="dark"] body .cost-lines-block h4,
html[data-theme="dark"] body .cost-lines-block > header > strong,
html[data-theme="dark"] body .cost-lines-block > header span {
    color: #eef1f4 !important;
}

html[data-theme="dark"] body :is(.compact-cost-card, .compact-labor-card) > header :is(span, small),
html[data-theme="dark"] body .compact-cost-head,
html[data-theme="dark"] body .compact-source-name small,
html[data-theme="dark"] body .compact-labor-row small,
html[data-theme="dark"] body .cost-breakdown-full-detail > summary small,
html[data-theme="dark"] body :is(.section-name, .section-split, .section-total) small,
html[data-theme="dark"] body .cost-subheading small,
html[data-theme="dark"] body .function-copy small,
html[data-theme="dark"] body .cost-function > header > span small,
html[data-theme="dark"] body .cost-breakdown-footer span,
html[data-theme="dark"] body .cost-net-price small,
html[data-theme="dark"] body .labor-formula {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body :is(.compact-cost-row, .compact-labor-row) {
    color: #c4cad2 !important;
    border-color: var(--willy-border-soft) !important;
}

html[data-theme="dark"] body :is(.section-split b, .cost-function > header > span b, .cost-lines-block > header span b) {
    color: #c9cfd7 !important;
}

html[data-theme="dark"] body :is(.cost-breakdown-full-detail, .cost-breakdown-section) > summary:hover {
    background: #292e35 !important;
}

html[data-theme="dark"] body :is(.cost-breakdown-full-detail-body, .cost-breakdown-section-body, .cost-function-lines) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border-soft) !important;
    background: #171a1f !important;
}

html[data-theme="dark"] body .section-code,
html[data-theme="dark"] body .function-marker,
html[data-theme="dark"] body .cost-basis {
    color: #cbd8ea !important;
    background: #343b44 !important;
}

html[data-theme="dark"] body .cost-lines-table-wrap {
    border-color: var(--willy-border) !important;
    background: #1b1e23 !important;
}

html[data-theme="dark"] body :is(.cost-lines-table, .labor-table) th {
    color: #aeb6c1 !important;
    border-color: var(--willy-border) !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body :is(.cost-lines-table, .labor-table) td {
    color: #d0d5dc !important;
    border-color: var(--willy-border-soft) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body :is(.cost-lines-table, .labor-table) td:first-child {
    color: #f0f2f4 !important;
}

html[data-theme="dark"] body :is(.cost-lines-table, .labor-table) tbody tr:hover td {
    background: #292e35 !important;
}

html[data-theme="dark"] body .cost-breakdown-loading strong {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .cost-breakdown-loading span {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .cost-breakdown-footer {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

/* WILLY-installatie op de startpagina */
html[data-theme="dark"] body .home-page .home-mobile-section {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: linear-gradient(145deg, #20242a, #191c21) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .22) !important;
}

html[data-theme="dark"] body .home-page .home-mobile-section :is(h2, strong) {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .home-page .home-mobile-copy p {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .home-page .home-pwa-details .pwa-card {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: var(--willy-surface) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] body .home-page .home-pwa-details :is(.pwa-card-title, .pwa-install-card-title, .pwa-install-card strong) {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .home-page .home-pwa-details :is(.muted, .pwa-small-status, .pwa-install-card li) {
    color: var(--willy-muted-strong) !important;
}

html[data-theme="dark"] body .home-page .home-pwa-details .pwa-install-card {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #252a31 !important;
}

html[data-theme="dark"] body .home-page .home-pwa-details .pwa-toggle-btn {
    color: #e5e8ec !important;
    border-color: #454c56 !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .home-page .home-pwa-details .pwa-toggle-btn:hover {
    color: #fff !important;
    background: #343a42 !important;
}

html[data-theme="dark"] body .home-page .home-pwa-details .pwa-status.ok {
    color: #91dfbb !important;
    background: rgba(22, 135, 93, .16) !important;
}

html[data-theme="dark"] body .home-page .home-pwa-details .pwa-status.danger {
    color: #ffadb3 !important;
    background: rgba(227, 6, 19, .14) !important;
}

/* Projectmapkop: ook tijdens hover en geopend donker houden */
html[data-theme="dark"] body .projects-page .project-folder-toggle,
html[data-theme="dark"] body .projects-page .project-folder-toggle:hover,
html[data-theme="dark"] body .projects-page .project-folder-card.is-open .project-folder-toggle {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .projects-page .project-folder-toggle:hover {
    background: #292e35 !important;
}

html[data-theme="dark"] body .projects-page .project-folder-heading > strong {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .projects-page .project-folder-heading > span {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .projects-page .project-folder-count {
    color: #c7cdd5 !important;
    background: #343a42 !important;
}

/* Calculatie-eindblad: alle overzichtskaarten en interactiestaten */
html[data-theme="dark"] body .result-shell .result-heading,
html[data-theme="dark"] body .result-shell .result-margin-panel,
html[data-theme="dark"] body .result-shell .result-panel,
html[data-theme="dark"] body .result-shell .result-cabinet-heading {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: var(--willy-surface) !important;
    box-shadow: 0 7px 22px rgba(0, 0, 0, .2) !important;
}

html[data-theme="dark"] body .result-shell :is(.result-heading, .result-cabinet-heading) {
    background: linear-gradient(135deg, #20242a, #292e35) !important;
}

html[data-theme="dark"] body .result-shell :is(.result-heading h2, .result-panel h3, .result-cabinet-heading h2, .margin-panel-copy h3) {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .result-shell :is(.result-heading p, .result-panel header p, .result-cabinet-title p, .margin-panel-copy p) {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .result-shell .result-kicker {
    color: #ff9299 !important;
}

html[data-theme="dark"] body .result-shell :is(.specification-open, .result-cabinet-actions > button) {
    color: #e0e4e9 !important;
    border-color: #454c56 !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .result-shell :is(.specification-open, .result-cabinet-actions > button):hover:not(:disabled) {
    color: #fff !important;
    border-color: #5b646f !important;
    background: #343a42 !important;
}

html[data-theme="dark"] body .result-shell :is(.specification-open small, .result-cabinet-title small) {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .result-shell .result-margin-panel > label > span:first-child,
html[data-theme="dark"] body .result-shell .result-margin-panel > label > small {
    color: var(--willy-muted-strong) !important;
}

html[data-theme="dark"] body .result-shell .margin-input,
html[data-theme="dark"] body .result-shell .margin-input:focus-within {
    color: var(--willy-text) !important;
    border-color: #454c56 !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .result-shell .margin-input:focus-within {
    border-color: #d04a53 !important;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .14) !important;
}

html[data-theme="dark"] body .result-shell .margin-input input {
    color: var(--willy-text) !important;
    background: transparent !important;
}

html[data-theme="dark"] body .result-shell .margin-input b {
    color: #c7cdd5 !important;
    border-color: #454c56 !important;
    background: #30353d !important;
}

html[data-theme="dark"] body .result-shell :is(.margin-preview strong, .summary-sale-price strong, .cost-summary-values strong, .labor-row > strong) {
    color: #eef1f4 !important;
}

html[data-theme="dark"] body .result-shell :is(.margin-preview small, .summary-sale-price small, .cost-summary-values small, .labor-row small) {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .result-shell .result-total {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
    box-shadow: 0 4px 13px rgba(0, 0, 0, .18) !important;
}

html[data-theme="dark"] body .result-shell .result-total > :is(span, small) {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .result-shell .result-total > strong {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .result-shell .result-total.primary {
    color: #fff !important;
    border-color: #575f6a !important;
    background: linear-gradient(135deg, #30353d, #414852) !important;
}

html[data-theme="dark"] body .result-shell .result-total.primary > :is(span, small) {
    color: #d2d7de !important;
}

html[data-theme="dark"] body .result-shell .result-total.margin {
    color: #91dfbb !important;
    border-color: rgba(54, 201, 135, .32) !important;
    background: rgba(22, 135, 93, .13) !important;
}

html[data-theme="dark"] body .result-shell .result-total.technical {
    border-color: #46505b !important;
    background: #22272e !important;
}

html[data-theme="dark"] body .result-shell .result-panel > header,
html[data-theme="dark"] body .result-shell :is(.cost-summary, .labor-summary) > header {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #252a31 !important;
}

html[data-theme="dark"] body .result-shell :is(.cost-summary, .labor-summary) > header > strong {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .result-shell .result-panel-count {
    color: #d5dae0 !important;
    background: #343a42 !important;
}

html[data-theme="dark"] body .result-shell .cabinet-overview-head {
    color: #aeb6c1 !important;
    border-color: var(--willy-border) !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .result-shell .cabinet-overview-row {
    color: var(--willy-text) !important;
    border-color: var(--willy-border-soft) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .result-shell .cabinet-overview-row:hover {
    color: #fff !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .result-shell .cabinet-overview-row.selected {
    color: #fff !important;
    background: #30363e !important;
    box-shadow: inset 3px 0 0 #e30613, inset 0 0 0 1px #4a515c !important;
}

html[data-theme="dark"] body .result-shell .cabinet-overview-row span > small,
html[data-theme="dark"] body .result-shell .cabinet-overview-name small {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .result-shell .cabinet-overview-row span > strong,
html[data-theme="dark"] body .result-shell .cabinet-overview-name strong {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .result-shell .cabinet-price {
    color: #91dfbb !important;
}

html[data-theme="dark"] body .result-shell .cabinet-facts {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .result-shell .cabinet-facts span {
    border-color: var(--willy-border-soft) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .result-shell .cabinet-facts small {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .result-shell .cabinet-facts strong {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .result-shell :is(.cost-ratio, .labor-row > i) {
    background: #343a42 !important;
}

html[data-theme="dark"] body .result-shell .signal-group-list {
    background: #171a1f !important;
}

html[data-theme="dark"] body .result-shell .signal-group {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .result-shell .signal-group > header,
html[data-theme="dark"] body .result-shell .signal-group.has-open > header {
    color: var(--willy-text) !important;
    border-color: var(--willy-border-soft) !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .result-shell .signal-group-title small,
html[data-theme="dark"] body .result-shell .result-table-row span > small {
    color: var(--willy-muted) !important;
}

html[data-theme="dark"] body .result-shell .result-table-head {
    color: #aeb6c1 !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .result-shell .result-table-row,
html[data-theme="dark"] body .result-shell .result-table-row:nth-child(odd) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border-soft) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .result-shell .result-table-row:nth-child(odd) {
    background: #1d2026 !important;
}

html[data-theme="dark"] body .result-shell .result-table-row.pending {
    background: rgba(216, 138, 29, .11) !important;
}

html[data-theme="dark"] body .result-shell .result-table-row span > strong {
    color: var(--willy-text) !important;
}

html[data-theme="dark"] body .result-shell .channel-code.type {
    color: #c9ddf7 !important;
    background: #344250 !important;
}

/* Functionele kleurcodering van de sleepbibliotheek behouden */
html[data-theme="dark"] body .calculation-page .calculation-palette-item.cabinet-item {
    border-color: #454c56 !important;
    border-left-color: #8b96a5 !important;
}

html[data-theme="dark"] body .calculation-page .calculation-palette-item.group-item {
    border-color: #454c56 !important;
    border-left-color: #4f8cff !important;
}

html[data-theme="dark"] body .calculation-page .calculation-palette-item.function-item {
    border-color: #454c56 !important;
    border-left-color: #36c98b !important;
}

html[data-theme="dark"] body .calculation-page .calculation-palette-item.group-item:hover {
    border-left-color: #79a8ff !important;
    box-shadow: 0 5px 15px rgba(79, 140, 255, .16) !important;
}

html[data-theme="dark"] body .calculation-page .calculation-palette-item.function-item:hover {
    border-left-color: #68ddb0 !important;
    box-shadow: 0 5px 15px rgba(54, 201, 139, .14) !important;
}

/* Overige interactieve staten en detailheaders */
html[data-theme="dark"] body .calculation-page .calculation-location {
    color: #d3d8df !important;
    background: transparent !important;
}

html[data-theme="dark"] body .calculation-page .calculation-location:hover {
    color: #fff !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .calculation-page .calculation-location.selected {
    color: #fff !important;
    border-color: #606975 !important;
    background: #343a42 !important;
}

html[data-theme="dark"] body .calculation-page .calculation-location .location-icon {
    color: #d2d7de !important;
    background: #30353d !important;
}

html[data-theme="dark"] body .calculation-page :is(.calculation-step-badge, .calculation-count) {
    color: #ff9ba2 !important;
    background: rgba(227, 6, 19, .15) !important;
}

html[data-theme="dark"] body .calculation-page .calculation-technical-summary > span {
    color: #91dfbb !important;
    background: rgba(22, 135, 93, .16) !important;
}

html[data-theme="dark"] body .calculation-page .calculation-technical-summary > span.shortage {
    color: #ffadb3 !important;
    background: rgba(227, 6, 19, .14) !important;
}

html[data-theme="dark"] body .calculation-page .group-origin {
    color: #b9d5ff !important;
    background: rgba(62, 123, 211, .18) !important;
}

html[data-theme="dark"] body .calculation-page .group-origin.custom {
    color: #f0cb82 !important;
    background: rgba(216, 138, 29, .16) !important;
}

html[data-theme="dark"] body .result-shell :is(
    .result-panel > header,
    .cost-summary > header,
    .labor-summary > header,
    .io-list-panel > header,
    .communication-list-panel > header
) {
    color: var(--willy-text) !important;
    border-color: var(--willy-border) !important;
    background: #252a31 !important;
}

html[data-theme="dark"] body .result-shell :is(.result-inline-error, .result-error) {
    color: #ffb6bb !important;
    border-color: rgba(239, 89, 98, .4) !important;
    background: rgba(150, 20, 30, .16) !important;
}

html[data-theme="dark"] body :is(.cost-lines-empty, .cost-breakdown-no-groups) {
    color: var(--willy-muted) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .library-page .library-list-item:hover {
    color: var(--willy-text) !important;
    background: #292e35 !important;
}

html[data-theme="dark"] body .library-page :is(.function-editor-alert, .license-not-applicable) {
    color: var(--willy-muted-strong) !important;
    border-color: var(--willy-border) !important;
    background: #20242a !important;
}

html[data-theme="dark"] body .library-page .functions-filter-hint.is-filtered {
    color: #f0cb82 !important;
    background: rgba(216, 138, 29, .14) !important;
}

html[data-theme="dark"] body .library-page :is(.material-labor-help, .material-labor-note, .labor-name-cell small, .material-connection-scope small) {
    color: #e3b763 !important;
}

html[data-theme="dark"] body .library-page :is(.material-source-badge.is-syntess, .function-type-cell span) {
    color: #b9d5ff !important;
    background: rgba(62, 123, 211, .18) !important;
}

html[data-theme="dark"] body .library-page :is(.material-source-badge.is-custom, .material-status-badge.is-inactive) {
    color: #c0c6ce !important;
    background: #30353d !important;
}

html[data-theme="dark"] body .library-page .material-status-badge.is-active {
    color: #91dfbb !important;
    background: rgba(22, 135, 93, .16) !important;
}

html[data-theme="dark"] body .projects-page :is(.search-clear, .breadcrumb-part, .project-folder-icon, .project-entry-icon, .project-file-type) {
    color: #d0d5dc !important;
    border-color: #414852 !important;
    background: #30353d !important;
}

html[data-theme="dark"] body .projects-page :is(.search-clear, .breadcrumb-part):hover {
    color: #fff !important;
    background: #3a4049 !important;
}

html[data-theme="dark"] body .technique-shell :is(.progress-state.open, .cabinet-placement-state.pending) {
    color: #f0cb82 !important;
    background: rgba(216, 138, 29, .16) !important;
}

html[data-theme="dark"] body .technique-shell :is(.progress-state.ready, .cabinet-placement-state.ready) {
    color: #91dfbb !important;
    background: rgba(22, 135, 93, .16) !important;
}

@media (max-width: 940px) {
    html[data-theme="light"] body .willy-topbar,
    html[data-theme="light"] body .willy-topbar-inner {
        color: #191c21 !important;
        background-color: rgba(255, 255, 255, .97) !important;
    }
}

/* Aanvullende subpanelen en compacte bediening */
html[data-theme="dark"] .field-group > span {
    color: #cbd1d8;
}

html[data-theme="dark"] .field-group :is(input, select, textarea),
html[data-theme="dark"] :is(.calculation-dialog-field input, .function-quantity input, .requirement-function-select select) {
    color: var(--willy-text);
    border-color: #414852;
    background: #20242a;
}

html[data-theme="dark"] :is(.work-project-toggle, .work-file-action) {
    color: var(--willy-text);
}

html[data-theme="dark"] .work-project-toggle:hover,
html[data-theme="dark"] .work-file-browser .cloud-row:hover {
    background: #292e35;
}

html[data-theme="dark"] :is(.work-file-browser, .work-project-empty) {
    color: var(--willy-muted);
    border-color: var(--willy-border);
    background: #171a1f;
}

html[data-theme="dark"] .work-file-browser .work-file-action {
    color: #d0d5dc;
    border-color: #414852;
    background: #24282e;
}

html[data-theme="dark"] :is(.project-loading, .projects-message, .folder-state, .project-browser-empty, .empty-disciplines, .inline-empty, .detail-grid > div) {
    color: var(--willy-muted);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.projects-message strong, .folder-state strong, .project-browser-empty strong, .empty-disciplines strong) {
    color: var(--willy-text);
}

html[data-theme="dark"] :is(.folder-back, .folder-upload, .project-download, .projects-message button, .folder-state button) {
    color: #d0d5dc;
    border-color: #414852;
    background: #24282e;
}

html[data-theme="dark"] :is(.folder-back, .folder-upload, .project-download):hover {
    color: #fff;
    border-color: #59616d;
    background: #30353d;
}

html[data-theme="dark"] :is(.demand-edit, .module-order-handle, .channel-point-actions button, .allocation-chip button) {
    color: #d0d5dc;
    border-color: #414852;
    background: #30353d;
}

html[data-theme="dark"] .allocation-chip {
    color: #d0d5dc;
    background: #30353d;
}

html[data-theme="dark"] .license-result {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] .license-result.active {
    border-color: rgba(227, 6, 19, .38);
    background: rgba(227, 6, 19, .09);
}

html[data-theme="dark"] .result-empty {
    color: var(--willy-muted);
}

html[data-theme="dark"] .result-empty strong {
    color: var(--willy-muted-strong);
}

html[data-theme="dark"] .result-empty > span {
    color: #d7dde5;
    background: #292e35;
}

html[data-theme="dark"] #blazor-error-ui {
    color: #f4f4f4;
    border-top-color: #643238;
    background: #2b2022;
}

@media (max-width: 520px) {
    .empty-layout-theme-toggle {
        top: 12px;
        right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .willy-theme-toggle,
    .willy-theme-toggle svg {
        transition: none;
    }
}

/* Projectmail */
html[data-theme="dark"] body .mail-composer {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #171a1f;
}

html[data-theme="dark"] body :is(.mail-composer-header, .mail-composer-footer) {
    border-color: var(--willy-border);
    background: #1c2025;
}

html[data-theme="dark"] body :is(.mail-close, .mail-secondary, .mail-state button, .mail-account-bar button, .mail-attachment-picker) {
    color: #d8dde4;
    border-color: #414852;
    background: #292e35;
}

html[data-theme="dark"] body :is(.mail-close, .mail-account-bar button, .mail-attachment-picker):hover {
    color: #fff;
    background: #343a43;
}

html[data-theme="dark"] body :is(.mail-state strong, .mail-connect h3, .mail-account-bar strong, .mail-section-heading strong, .mail-attachment-list strong, .mail-result strong) {
    color: var(--willy-text);
}

html[data-theme="dark"] body :is(.mail-state, .mail-connect p, .mail-account-bar em, .mail-form label > span, .mail-copy-grid label > span, .mail-recipient-field > label, .mail-recipient-hint, .mail-section-heading small, .mail-attachment-list small, .mail-composer-footer > span, .mail-result p, .mail-result small) {
    color: var(--willy-muted-strong);
}

html[data-theme="dark"] body .mail-account-bar {
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] body :is(.mail-form input, .mail-form textarea) {
    color: var(--willy-text);
    border-color: #414852;
    background: #20242a;
}

html[data-theme="dark"] body :is(.mail-form input, .mail-form textarea):focus {
    border-color: #ca5c64;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .12);
}

html[data-theme="dark"] body .mail-recipient-suggestions {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] body .mail-recipient-suggestions button {
    color: var(--willy-text);
    border-color: var(--willy-border-soft);
}

html[data-theme="dark"] body .mail-recipient-suggestions button:hover {
    background: #2a2f36;
}

html[data-theme="dark"] body :is(.mail-recipient-suggestions small, .mail-recipient-suggestions em, .mail-recipient-state) {
    color: var(--willy-muted-strong);
}

html[data-theme="dark"] body .mail-recipient-state.is-error {
    color: #ffb6bb;
    background: rgba(150, 20, 30, .16);
}

html[data-theme="dark"] body .mail-inline-error {
    color: #ffb6bb;
    border-color: rgba(239, 89, 98, .4);
    background: rgba(150, 20, 30, .16);
}

html[data-theme="dark"] body :is(.mail-attachments, .mail-signature) {
    border-color: var(--willy-border);
    background: #1c2025;
}

html[data-theme="dark"] body .mail-attachment-list > div {
    background: #24282e;
}

html[data-theme="dark"] body .mail-attachment-list > .mail-prepared-attachment {
    color: #eef2f5;
    border: 1px solid #35634e;
    background: #20362c !important;
}

html[data-theme="dark"] body .mail-prepared-attachment small {
    color: #b7c9bf;
}

html[data-theme="dark"] body .mail-prepared-attachment .mail-attachment-lock {
    color: #dcf7e9;
    background: #155b3f;
}

html[data-theme="dark"] body .mail-attachment-list button {
    color: #ffb6bb;
    background: #30353d;
}

html[data-theme="dark"] body .mail-signature summary {
    color: #d0d5dc;
    background: #24282e;
}

/* Bewust wit: dit is de daadwerkelijke ontvangersweergave van de handtekening. */
html[data-theme="dark"] body .mail-signature-preview {
    color: #202329;
    background: #fff;
}

/* Offerte-ondertekening en WEB-takencentrum */
html[data-theme="dark"] :is(.signature-flow, .signature-note) {
    border-color: #454c56;
    color: #c8cfd7;
    background: #2a3037;
}

html[data-theme="dark"] .signer-option {
    border-color: #454c56;
    color: #eef2f5;
    background: #242930;
}

html[data-theme="dark"] .signer-option:hover:not(:disabled),
html[data-theme="dark"] .signer-option.selected {
    border-color: #92525a;
    color: #fff;
    background: #3a272c;
}

html[data-theme="dark"] .signature-request-button {
    border-color: #92525a;
    color: #ffabb0;
    background: #3a272c;
}

html[data-theme="dark"] .signature-empty strong { color: #eef2f5; }

html[data-theme="dark"] .task-page {
    --task-ink: #f2f4f7;
    --task-muted: #aeb5c0;
    --task-line: #3b414b;
    --task-surface: #20242b;
    --task-soft: #282d35;
}

html[data-theme="dark"] .task-modal-backdrop {
    --task-ink: #f2f4f7;
    --task-muted: #aeb5c0;
    --task-line: #3b414b;
    --task-surface: #20242b;
    --task-soft: #282d35;
}

html[data-theme="dark"] :is(.task-summary, .task-workspace) { box-shadow: none; }
html[data-theme="dark"] :is(.task-search input, .task-modal, .reject-modal textarea) { color: var(--task-ink); }
html[data-theme="dark"] .decision-banner.approved { color: #9ee0bd; background: #193b2b; }
html[data-theme="dark"] :is(.decision-banner.rejected, .task-message.error) { color: #ffb5bd; background: #48242a; }
html[data-theme="dark"] .decision-banner.cancelled { color: #f2c985; background: #40311f; }
html[data-theme="dark"] .task-message.success { color: #9ee0bd; background: #193b2b; }

/* Offerterappels in Sales en het takencentrum */
html[data-theme="dark"] :is(.reminder-modal, .current-reminder-card, .reminder-form) {
    color: var(--willy-text);
    border-color: var(--willy-border);
    background: #20242a;
}

html[data-theme="dark"] :is(.reminder-modal > header, .reminder-modal > footer, .reminder-history) {
    border-color: var(--willy-border);
}

html[data-theme="dark"] .reminder-modal > footer { background: #1c2025; }
html[data-theme="dark"] :is(.reminder-modal > header p, .current-reminder-card p, .current-reminder-card small, .reminder-timeline span, .reminder-timeline small, .reminder-modal > footer > span) { color: var(--willy-muted-strong); }
html[data-theme="dark"] :is(.reminder-trigger, .reminder-quick-dates button, .reminder-form input, .reminder-form select, .reminder-form textarea) { color: var(--willy-text); border-color: #454c56; background: #292e35; }
html[data-theme="dark"] :is(.reminder-trigger:hover, .reminder-trigger.active, .reminder-quick-dates button:hover) { color: #ffabb0; border-color: #92525a; background: #3a272c; }
html[data-theme="dark"] .reminder-trigger.active::after { border-color: #292e35; }
html[data-theme="dark"] .reminder-unavailable { border-color: var(--willy-border); background: #24282e; }
html[data-theme="dark"] .reminder-unavailable > span { color: #d6dce3; background: #30353d; }
html[data-theme="dark"] .reminder-timeline p { color: #d0d5dc; }
html[data-theme="dark"] .reminder-timeline article > i { border-color: #20242a; }
html[data-theme="dark"] .cancel-form { border-color: #6d373d; background: #2c2023; }

html[data-theme="dark"] .rappel-page,
html[data-theme="dark"] .rappel-modal-backdrop {
    --r-ink: #f2f4f7;
    --r-muted: #aeb5c0;
    --r-line: #3b414b;
    --r-soft: #282d35;
    --r-surface: #20242b;
}

html[data-theme="dark"] :is(.rappel-page .task-kind-nav, .task-page .task-kind-nav) { box-shadow: none; }
html[data-theme="dark"] :is(.rappel-page .task-kind-nav a.active, .task-page .task-kind-nav a.active) { color: #ffabb0; background: #3a272c; }
html[data-theme="dark"] :is(.rappel-search input, .rappel-modal input, .rappel-modal textarea) { color: var(--r-ink); }
html[data-theme="dark"] :is(.rappel-note p, .rappel-history p) { color: #d0d5dc; }
html[data-theme="dark"] .rappel-status { color: #ffabb0; background: #3a272c; }
html[data-theme="dark"] .rappel-closed { color: #9ee0bd; background: #193b2b; }
html[data-theme="dark"] .rappel-actions button > span { color: #ffd98a; background: #493a1e; }
html[data-theme="dark"] .rappel-actions button.complete > span { color: #9ee0bd; background: #193b2b; }
html[data-theme="dark"] .rappel-history article > i { border-color: var(--r-surface); }
html[data-theme="dark"] .rappel-modal :is(input, textarea) { border-color: #454c56; background: #292e35; }
