/**
 * Donkere modus voor dagoverzicht + statushandleiding.
 * Schakel met html[data-theme="dark"] (zet theme-init in <head> + knop).
 */

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] .daily-overview-page {
    background: linear-gradient(180deg, #1c1917 0%, #0c0a09 100%);
    color: #e7e5e4;
}

html[data-theme="dark"] .daily-header {
    background: #292524;
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .daily-title {
    color: #fafaf9;
}

html[data-theme="dark"] .back-link {
    color: #a8a29e;
}

html[data-theme="dark"] .back-link:hover {
    background: #3f3e3a;
    color: #fafaf9;
}

html[data-theme="dark"] .status-guide-link,
html[data-theme="dark"] .theme-toggle-btn {
    color: #d6d3d1;
    border-color: #57534e;
    background: #1c1917;
}

html[data-theme="dark"] .status-guide-link:hover,
html[data-theme="dark"] .theme-toggle-btn:hover {
    background: #3f3e3a;
    color: #fafaf9;
}

html[data-theme="dark"] .auth-user-label {
    color: #d6d3d1;
}

html[data-theme="dark"] .auth-logout-btn {
    color: #d6d3d1;
    border-color: #57534e;
    background: #1c1917;
}

html[data-theme="dark"] .auth-logout-btn:hover:not(:disabled) {
    background: #3f3e3a;
    color: #fafaf9;
}

html[data-theme="dark"] .header-user-menu .header-user-menu-trigger {
    border-color: #57534e;
    background: #1c1917;
    color: #e7e5e4;
}

html[data-theme="dark"] .header-user-menu .header-user-menu-trigger:hover {
    background: #3f3e3a;
}

html[data-theme="dark"] .header-user-avatar {
    background: #44403c;
    color: #e7e5e4;
}

html[data-theme="dark"] .header-user-menu-meta {
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .header-user-menu-name-full {
    color: #fafaf9;
}

html[data-theme="dark"] .header-user-menu-email {
    color: #a8a29e;
}

html[data-theme="dark"] .header-user-menu-item {
    color: #d6d3d1;
}

html[data-theme="dark"] .header-user-menu-item:hover {
    background: #3f3e3a;
}

html[data-theme="dark"] .header-user-menu-logout {
    color: #fdba74;
}

html[data-theme="dark"] .header-user-menu-logout:hover {
    background: rgba(251, 146, 60, 0.12);
    color: #fed7aa;
}

html[data-theme="dark"] .auth-gate {
    background: linear-gradient(180deg, #1c1917 0%, #0c0a09 100%);
}

html[data-theme="dark"] .auth-gate-card {
    background: #292524;
    border-color: #44403c;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .auth-gate-brand {
    color: #a8a29e;
}

html[data-theme="dark"] .auth-gate-title {
    color: #fafaf9;
}

html[data-theme="dark"] .auth-gate-lead,
html[data-theme="dark"] .auth-gate-checking-text {
    color: #a8a29e;
}

html[data-theme="dark"] .auth-gate-spinner {
    border-color: #44403c;
    border-top-color: #a8a29e;
}

html[data-theme="dark"] .auth-gate-primary-btn {
    background: #e7e5e4;
    color: #1c1917;
}

html[data-theme="dark"] .auth-gate-primary-btn:hover {
    background: #fafaf9;
}

html[data-theme="dark"] .auth-gate-primary-btn:focus-visible {
    outline-color: #fafaf9;
}

html[data-theme="dark"] .auth-error-banner {
    color: #fecaca;
    background: #450a0a;
    border-color: #7f1d1d;
}

html[data-theme="dark"] .auth-error-banner--soft {
    color: #a8a29e;
    background: #1c1917;
    border-color: #44403c;
}

html[data-theme="dark"] .status-legend {
    color: #a8a29e;
}

html[data-theme="dark"] .search-bar {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .search-bar::placeholder {
    color: #78716c;
}

html[data-theme="dark"] .search-bar:focus {
    border-color: #a8a29e;
}

html[data-theme="dark"] .phone-intake-bar {
    border-top-color: #44403c;
}

html[data-theme="dark"] .phone-intake-field label,
html[data-theme="dark"] .phone-intake-field label.phone-intake-section-title {
    color: #d6d3d1;
}

html[data-theme="dark"] .phone-intake-field input,
html[data-theme="dark"] .phone-intake-field select,
html[data-theme="dark"] .phone-intake-field textarea {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .phone-intake-suggestions {
    background: #292524;
    border-color: #44403c;
}

html[data-theme="dark"] .phone-intake-suggestion {
    border-bottom-color: #44403c;
    color: #e7e5e4;
}

html[data-theme="dark"] .phone-intake-suggestion:hover {
    background: #3f3e3a;
}

html[data-theme="dark"] .phone-intake-suggestion small {
    color: #a8a29e;
}

html[data-theme="dark"] .phone-intake-submit-btn {
    background: #292524;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .phone-intake-actions small {
    color: #a8a29e;
}

html[data-theme="dark"] .sync-status-banner {
    background: #292524;
    border-color: #44403c;
    color: #d6d3d1;
}

html[data-theme="dark"] .refresh-btn {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .refresh-btn:hover {
    background: #3f3e3a;
}

html[data-theme="dark"] .retry-btn {
    background: #292524;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .retry-btn:hover {
    background: #3f3e3a;
    border-color: #78716c;
}

html[data-theme="dark"] .loading-state,
html[data-theme="dark"] .error-state,
html[data-theme="dark"] .empty-state {
    color: #a8a29e;
}

html[data-theme="dark"] .loading-spinner {
    border-color: #44403c;
    border-top-color: #a8a29e;
}

html[data-theme="dark"] .fallback-link {
    color: #a8a29e;
}

html[data-theme="dark"] .fallback-link:hover {
    color: #fafaf9;
}

html[data-theme="dark"] .daily-overview-body.canvas-open {
    background: linear-gradient(180deg, #1c1917 0%, #0c0a09 100%);
}

html[data-theme="dark"] .daily-overview-body.canvas-open .detail-canvas {
    background: #1c1917;
}

html[data-theme="dark"] .detail-canvas-close {
    color: #a8a29e;
}

html[data-theme="dark"] .detail-canvas-close:hover {
    background: #3f3e3a;
    color: #fafaf9;
}

html[data-theme="dark"] .detail-canvas-title {
    color: #fafaf9;
}

html[data-theme="dark"] .detail-canvas-placeholder,
html[data-theme="dark"] .detail-canvas-note {
    color: #a8a29e;
}

html[data-theme="dark"] .detail-canvas-section-title {
    color: #d6d3d1;
}

html[data-theme="dark"] .detail-canvas-av-header,
html[data-theme="dark"] .detail-canvas-av-meta-label {
    color: #a8a29e;
}

html[data-theme="dark"] .detail-canvas-av-meta-value,
html[data-theme="dark"] .detail-canvas-line-desc {
    color: #e7e5e4;
}

html[data-theme="dark"] .detail-canvas-av-meta-row,
html[data-theme="dark"] .detail-canvas-lines-table th,
html[data-theme="dark"] .detail-canvas-lines-table td,
html[data-theme="dark"] .detail-canvas-line {
    border-color: #44403c;
}

html[data-theme="dark"] .detail-canvas-lines-table-wrap {
    border-color: #44403c;
}

html[data-theme="dark"] .detail-canvas-lines-table th {
    background: #292524;
    color: #d6d3d1;
}

html[data-theme="dark"] .detail-canvas-line-qty,
html[data-theme="dark"] .detail-canvas-line-px {
    color: #a8a29e;
}

html[data-theme="dark"] .detail-canvas-note .detail-canvas-code {
    background: #292524;
    color: #d6d3d1;
}

/* Canvas-inhoud: lichte modus-kleuren (#1c1917, #fff) zijn op donkere achtergrond onleesbaar */
html[data-theme="dark"] .detail-canvas-content {
    color: #e7e5e4;
}

html[data-theme="dark"] .detail-canvas-placeholder strong {
    color: #fafaf9;
}

html[data-theme="dark"] .canvas-skeleton-bar {
    background: linear-gradient(90deg, #3f3e3a 25%, #57534e 50%, #3f3e3a 75%);
    background-size: 200% 100%;
}

html[data-theme="dark"] .canvas-domain-header {
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .canvas-domain-title {
    color: #fafaf9;
}

html[data-theme="dark"] .canvas-domain-detail {
    color: #a8a29e;
}

html[data-theme="dark"] .canvas-kv-row {
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .canvas-action-hint {
    color: #a8a29e;
}

html[data-theme="dark"] .canvas-todo-panel {
    background: #292524;
    border-color: #57534e;
}

html[data-theme="dark"] .canvas-todo-panel-title {
    color: #d6d3d1;
}

html[data-theme="dark"] .canvas-todo-panel-list {
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-procurement-group {
    border-top-color: #44403c;
}

html[data-theme="dark"] .canvas-procurement-group-title {
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-creditor-filter-wrap {
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .canvas-creditor-filter-input {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-creditor-filter-input:focus {
    background: #292524;
    border-color: #818cf8;
    outline-color: #6366f1;
}

html[data-theme="dark"] .canvas-creditor-filter-input::placeholder {
    color: #78716c;
}

html[data-theme="dark"] .canvas-creditor-trigger {
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-creditor-trigger-label--placeholder {
    color: #78716c;
}

html[data-theme="dark"] .canvas-creditor-option-name {
    color: #fafaf9;
}

html[data-theme="dark"] .canvas-creditor-option-nr {
    color: #a8a29e;
}

html[data-theme="dark"] .canvas-creditor-options-stack::-webkit-scrollbar-thumb {
    background: #57534e;
}

html[data-theme="dark"] .canvas-placeholder-muted {
    color: #a8a29e;
}

html[data-theme="dark"] .canvas-doc-open-btn {
    background: #292524;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-doc-open-btn:hover {
    background: #3f3e3a;
}

html[data-theme="dark"] .canvas-delivery-match {
    background: #292524;
    border-color: #44403c;
    color: #d6d3d1;
}

html[data-theme="dark"] .canvas-doc-stack {
    border-top-color: #44403c;
}

html[data-theme="dark"] .canvas-doc-stack-title {
    color: #d6d3d1;
}

html[data-theme="dark"] .canvas-doc-item {
    background: #292524;
    border-color: #44403c;
}

html[data-theme="dark"] .canvas-doc-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .canvas-doc-thumb-img,
html[data-theme="dark"] .canvas-doc-thumb-placeholder {
    background: #1c1917;
}

html[data-theme="dark"] .canvas-doc-meta,
html[data-theme="dark"] .canvas-doc-date {
    color: #a8a29e;
}

html[data-theme="dark"] .canvas-doc-ref {
    color: #78716c;
}

html[data-theme="dark"] .canvas-status-banner {
    border-color: #44403c;
    background: #292524;
}

html[data-theme="dark"] .canvas-status-banner.status-ok {
    border-color: #166534;
    background: #052e16;
}

html[data-theme="dark"] .canvas-status-banner.status-partial {
    border-color: #9a3412;
    background: #431407;
}

html[data-theme="dark"] .canvas-status-banner.status-todo {
    border-color: #44403c;
    background: #292524;
}

html[data-theme="dark"] .canvas-status-title {
    color: #fafaf9;
}

html[data-theme="dark"] .canvas-status-desc {
    color: #d6d3d1;
}

html[data-theme="dark"] .canvas-status-steps li {
    color: #a8a29e;
}

html[data-theme="dark"] .canvas-status-steps li::before {
    border-color: #78716c;
}

html[data-theme="dark"] .canvas-doc-empty-hint {
    color: #78716c;
}

html[data-theme="dark"] .detail-canvas-content .canvas-procurement-so-table th,
html[data-theme="dark"] .detail-canvas-content .canvas-procurement-so-table td {
    border-color: #44403c;
    color: #e7e5e4;
}

html[data-theme="dark"] .detail-canvas-content .canvas-procurement-so-table th {
    background: #292524;
    color: #d6d3d1;
}

/* AV orderheader-patch in detailcanvas (zelfde markup als e-mail overlay) */
html[data-theme="dark"] .detail-canvas-content .overlay-av-order-header-wrap {
    border-top-color: #44403c;
}

html[data-theme="dark"] .detail-canvas-content .overlay-av-order-header-intro {
    color: #a8a29e;
}

html[data-theme="dark"] .detail-canvas-content .overlay-av-order-header-intro.overlay-av-order-resolving {
    color: #d6d3d1;
}

html[data-theme="dark"] .detail-canvas-content .overlay-av-order-header-feedback {
    border-color: #44403c;
    background: #292524;
    color: #e7e5e4;
}

html[data-theme="dark"] .detail-canvas-content .overlay-av-order-header-feedback--success {
    border-color: #166534;
    background: #052e16;
    color: #bbf7d0;
}

html[data-theme="dark"] .detail-canvas-content .overlay-av-order-header-feedback--error {
    border-color: #991b1b;
    background: #450a0a;
    color: #fecaca;
}

html[data-theme="dark"] .detail-canvas-content .overlay-av-order-header-feedback--info {
    border-color: #1e40af;
    background: #1e3a5f;
    color: #bae6fd;
}

html[data-theme="dark"] .detail-canvas-content .overlay-av-field span {
    color: #d6d3d1;
}

html[data-theme="dark"] .detail-canvas-content .overlay-av-field input,
html[data-theme="dark"] .detail-canvas-content .overlay-av-field textarea {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .detail-canvas-content .overlay-timeline-list li,
html[data-theme="dark"] .detail-canvas-content .overlay-lifecycle-list li {
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .detail-canvas-content .overlay-timeline-type {
    color: #e7e5e4;
}

html[data-theme="dark"] .day-card {
    background: #292524;
    border-color: #44403c;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .day-card-header {
    background: #1c1917;
    border-bottom-color: #44403c;
    color: #d6d3d1;
}

html[data-theme="dark"] .thread-card {
    background: #1c1917;
    border-color: #44403c;
}

html[data-theme="dark"] .thread-card-header:hover {
    background: #292524;
}

html[data-theme="dark"] .thread-card-title {
    color: #fafaf9;
}

html[data-theme="dark"] .thread-card-company {
    color: #e7e5e4;
    background: #3f3e3a;
    border-color: #57534e;
}

html[data-theme="dark"] .thread-card-secondary {
    border-left-color: #44403c;
    border-top-color: #44403c;
}

html[data-theme="dark"] .thread-card-meta,
html[data-theme="dark"] .thread-customer,
html[data-theme="dark"] .thread-card-pending-label {
    color: #a8a29e;
}

html[data-theme="dark"] .thread-status-badge.status-action_needed {
    background: #450a0a;
    color: #fecaca;
    border-color: #7f1d1d;
}

html[data-theme="dark"] .thread-status-badge.status-in_progress {
    background: #431407;
    color: #fdba74;
    border-color: #9a3412;
}

html[data-theme="dark"] .thread-status-badge.status-waiting {
    background: #1e1b4b;
    color: #c7d2fe;
    border-color: #4338ca;
}

html[data-theme="dark"] .thread-status-badge.status-completed {
    background: #052e16;
    color: #bbf7d0;
}

html[data-theme="dark"] .thread-status-badge.status-in_progress.has-quote,
html[data-theme="dark"] .status-pill.in_progress.has-quote {
    background: #052e16;
    color: #bbf7d0;
    border-color: #166534;
}

html[data-theme="dark"] .wis-status-badge {
    background: #1e1b4b;
    color: #c7d2fe;
    border-color: #4338ca;
}

html[data-theme="dark"] .wis-status-badge.wis-status-1 {
    background: #172554;
    color: #93c5fd;
    border-color: #1d4ed8;
}

html[data-theme="dark"] .wis-status-badge.wis-status-2 {
    background: #431407;
    color: #fdba74;
    border-color: #c2410c;
}

html[data-theme="dark"] .wis-status-badge.wis-status-3,
html[data-theme="dark"] .wis-status-badge.wis-status-5 {
    background: #052e16;
    color: #86efac;
    border-color: #166534;
}

html[data-theme="dark"] .wis-status-badge.wis-status-4 {
    background: #3b0764;
    color: #e9d5ff;
    border-color: #7e22ce;
}

html[data-theme="dark"] .wis-status-badge.wis-status-6 {
    background: #450a0a;
    color: #fecaca;
    border-color: #991b1b;
}

html[data-theme="dark"] .wis-status-badge-mini {
    font-size: 10px;
    padding: 2px 7px;
}

html[data-theme="dark"] .overview-tabs {
    background: #292524;
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .overview-tabs-toolbar {
    border-top-color: #44403c;
}

html[data-theme="dark"] .overview-tab {
    color: #a8a29e;
    border-color: transparent;
}

html[data-theme="dark"] .overview-tab:hover {
    color: #e7e5e4;
    background: #3f3e3a;
}

html[data-theme="dark"] .overview-tab.active {
    color: #fafaf9;
    border-bottom-color: #2dd4bf;
    background: transparent;
}

html[data-theme="dark"] #linkCustomerSearch {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .link-customer-suggestions {
    background: #292524;
    border-color: #44403c;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .link-customer-suggestions .link-customer-suggestion {
    background: #292524;
    color: #e7e5e4;
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .link-customer-suggestions .link-customer-suggestion:hover {
    background: #3f3e3a;
}

html[data-theme="dark"] .link-customer-suggestions .link-customer-suggestion small {
    color: #a8a29e;
}

html[data-theme="dark"] .email-overlay-content {
    background: #292524;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .email-overlay-content.has-configurator .email-overlay-left {
    border-right-color: #44403c;
}

html[data-theme="dark"] .email-overlay-header {
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .email-overlay-close {
    background: #1c1917;
    color: #a8a29e;
}

html[data-theme="dark"] .email-overlay-close:hover {
    background: #3f3e3a;
    color: #fafaf9;
}

html[data-theme="dark"] .email-overlay-section-title {
    color: #a8a29e;
}

html[data-theme="dark"] .email-overlay-section-original {
    background: #2e1065;
    border-left-color: #7c3aed;
}
html[data-theme="dark"] .email-overlay-section-original .email-overlay-section-title {
    color: #c4b5fd;
}

html[data-theme="dark"] .email-overlay-body {
    color: #e7e5e4;
}

html[data-theme="dark"] .email-overlay-body textarea,
html[data-theme="dark"] .email-overlay-body input[type="text"] {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .wedervraag-toggle-btn {
    color: #a8a29e;
}

html[data-theme="dark"] .email-overlay-right-sections {
    border-left-color: #44403c;
    background: #1c1917;
}

html[data-theme="dark"] .overlay-section-title {
    color: #d6d3d1;
}

html[data-theme="dark"] .overlay-section-content {
    color: #a8a29e;
}

html[data-theme="dark"] .overlay-offerte-item:hover {
    background: #292524;
}

html[data-theme="dark"] .overlay-offerte-summary {
    color: #a8a29e;
}

html[data-theme="dark"] .overlay-fallback {
    color: #78716c;
}

html[data-theme="dark"] .unmatched-tab-state {
    color: #a8a29e;
}

html[data-theme="dark"] .unmatched-card {
    background: #292524;
    border-color: #44403c;
}

html[data-theme="dark"] .unmatched-card-meta {
    color: #a8a29e;
}

html[data-theme="dark"] .unmatched-card-identifiers,
html[data-theme="dark"] .unmatched-card-payload {
    color: #d6d3d1;
}

html[data-theme="dark"] .btn-unmatched-link,
html[data-theme="dark"] .btn-unmatched-ignore {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .btn-unmatched-ignore {
    background: transparent;
}

html[data-theme="dark"] .btn-unmatched-link:hover,
html[data-theme="dark"] .btn-unmatched-ignore:hover {
    background: #3f3e3a;
}

html[data-theme="dark"] .link-unmatched-form label {
    color: #d6d3d1;
}

html[data-theme="dark"] .link-unmatched-form select {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .link-unmatched-form select:disabled {
    background: #292524;
    color: #78716c;
}

html[data-theme="dark"] .status-guide-card {
    background: #292524;
    border-color: #44403c;
}

html[data-theme="dark"] .status-guide-large .status-guide-card h2 {
    color: #fafaf9;
}

html[data-theme="dark"] .status-guide-large .status-guide-card h3 {
    color: #e7e5e4;
}

html[data-theme="dark"] .status-guide-card p {
    color: #a8a29e;
}

html[data-theme="dark"] .status-guide-large .status-guide-card p {
    color: #d6d3d1;
}

html[data-theme="dark"] .status-guide-list,
html[data-theme="dark"] .status-guide-faq,
html[data-theme="dark"] .status-guide-scenarios {
    color: #d6d3d1;
}

html[data-theme="dark"] .status-guide-faq dt {
    color: #fafaf9;
}

html[data-theme="dark"] .status-guide-faq dd {
    color: #a8a29e;
}

html[data-theme="dark"] .status-guide-table th,
html[data-theme="dark"] .status-guide-table td {
    border-top-color: #44403c;
}

html[data-theme="dark"] .status-guide-table th {
    color: #a8a29e;
}

html[data-theme="dark"] .status-guide-large .status-guide-table th {
    color: #78716c;
}

html[data-theme="dark"] .status-guide-scenarios li {
    border-top-color: #44403c;
}

html[data-theme="dark"] .canvas-kv-label {
    color: #a8a29e;
}

html[data-theme="dark"] .canvas-kv-value {
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-subsection {
    border-color: #44403c;
}

html[data-theme="dark"] .canvas-action-btn {
    background: #3f3e3a;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-action-btn:hover {
    background: #57534e;
}

html[data-theme="dark"] .canvas-action-btn:disabled,
html[data-theme="dark"] .canvas-action-btn[disabled] {
    opacity: 0.45;
}

/* ─── Transport booking form (dark) ─── */

html[data-theme="dark"] .canvas-transport-booking-form {
    background: #1c1917;
    border-color: #44403c;
}

html[data-theme="dark"] .canvas-transport-booking-form h4 {
    color: #d6d3d1;
}

html[data-theme="dark"] .canvas-form-grid label {
    color: #a8a29e;
}

html[data-theme="dark"] .canvas-form-grid input {
    background: #292524;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-action-book-transport {
    background: #3f3e3a;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-action-book-transport:hover {
    background: #57534e;
}

html[data-theme="dark"] .canvas-action-cancel-transport {
    background: #7f1d1d;
    border-color: #991b1b;
    color: #fecaca;
}

html[data-theme="dark"] .canvas-action-cancel-transport:hover {
    background: #991b1b;
}

html[data-theme="dark"] .trace-unknown { background: #44403c; color: #a8a29e; }
html[data-theme="dark"] .trace-pending { background: #451a03; color: #fcd34d; }
html[data-theme="dark"] .trace-active  { background: #1e3a5f; color: #93c5fd; }
html[data-theme="dark"] .trace-delivered { background: #14532d; color: #86efac; }
html[data-theme="dark"] .trace-exception { background: #450a0a; color: #fca5a5; }

html[data-theme="dark"] .transport-advanced-toggle summary {
    color: #a8a29e;
}

html[data-theme="dark"] .transport-form-section h5 {
    color: #a8a29e;
}

html[data-theme="dark"] .transport-checkbox-label {
    color: #d6d3d1;
}

html[data-theme="dark"] .transport-instructions-label {
    color: #a8a29e;
}

html[data-theme="dark"] .transport-instructions-label textarea {
    background: #292524;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .canvas-procurement-creditor-cell select,
html[data-theme="dark"] .canvas-procurement-creditor-cell input {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .daily-overview-body .splitter {
    background: linear-gradient(90deg, transparent 0%, #44403c 20%, #44403c 80%, transparent 100%);
}

html[data-theme="dark"] .daily-overview-body .splitter:hover {
    background: linear-gradient(90deg, transparent 0%, #0d9488 20%, #0d9488 80%, transparent 100%);
}

html[data-theme="dark"] .daily-overview-body .splitter::before {
    background: #57534e;
}

html[data-theme="dark"] .daily-overview-body .splitter.is-dragging {
    background: linear-gradient(90deg, transparent 0%, #0f766e 20%, #0f766e 80%, transparent 100%);
}

html[data-theme="dark"] .thread-card.canvas-active-thread {
    box-shadow: 0 0 0 2px #2dd4bf;
}

/* Modals (children van body.daily-overview-page) */
html[data-theme="dark"] .daily-overview-page .modal-content {
    background-color: #292524;
    border-color: #44403c;
    color: #e7e5e4;
}

html[data-theme="dark"] .daily-overview-page .modal-header {
    border-bottom-color: #44403c;
}

html[data-theme="dark"] .daily-overview-page .modal-header h2,
html[data-theme="dark"] .daily-overview-page .modal-body h3 {
    color: #fafaf9;
}

html[data-theme="dark"] .daily-overview-page .modal-body p,
html[data-theme="dark"] .daily-overview-page #linkUnmatchedModalIntro {
    color: #d6d3d1;
}

html[data-theme="dark"] .daily-overview-page .close-button {
    color: #a8a29e;
}

html[data-theme="dark"] .daily-overview-page .close-button:hover,
html[data-theme="dark"] .daily-overview-page .close-button:focus {
    color: #fafaf9;
}

html[data-theme="dark"] .daily-overview-page .modal-footer {
    border-top-color: #44403c;
}

html[data-theme="dark"] .daily-overview-page .btn {
    background: #3f3e3a;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .daily-overview-page .btn:hover {
    background: #57534e;
}

html[data-theme="dark"] .daily-overview-page .btn-primary {
    background: #0d9488;
    border-color: #0f766e;
    color: #fff;
}

html[data-theme="dark"] .daily-overview-page .btn-primary:hover {
    background: #14b8a6;
}

html[data-theme="dark"] .daily-overview-page .modal-body input[type="text"] {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
}

html[data-theme="dark"] .attachment-image-viewer-box {
    background: #292524;
    color: #e7e5e4;
}

html[data-theme="dark"] .attachment-image-viewer-close {
    color: #a8a29e;
}

html[data-theme="dark"] .attachment-image-viewer-close:hover {
    color: #fafaf9;
    background: #3f3e3a;
}

html[data-theme="dark"] .attachment-image-viewer-filename {
    color: #d6d3d1;
}

html[data-theme="dark"] .order-progress-ref {
    color: #a8a29e;
    border-color: #57534e;
    background: #292524;
}

html[data-theme="dark"] .order-progress-chip,
html[data-theme="dark"] .issue-dossier-chip {
    background: #292524;
    border-color: #57534e;
    color: #d6d3d1;
}

html[data-theme="dark"] .order-progress-chip.state-not_connected,
html[data-theme="dark"] .order-progress-chip.state-unknown,
html[data-theme="dark"] .issue-dossier-chip.state-unknown,
html[data-theme="dark"] .issue-dossier-chip.state-none {
    color: #a8a29e;
    border-color: #57534e;
    background: #1c1917;
}

html[data-theme="dark"] .order-progress-chip.state-pending,
html[data-theme="dark"] .issue-dossier-chip.state-in_progress {
    color: #fdba74;
    border-color: #c2410c;
    background: #431407;
}

html[data-theme="dark"] .order-progress-chip.state-ok,
html[data-theme="dark"] .issue-dossier-chip.state-resolved {
    color: #86efac;
    border-color: #166534;
    background: #052e16;
}

html[data-theme="dark"] .order-progress-chip.state-attention,
html[data-theme="dark"] .issue-dossier-chip.state-open {
    color: #fcd34d;
    border-color: #b45309;
    background: #422006;
}

html[data-theme="dark"] .order-progress-chip.state-blocked {
    color: #fca5a5;
    border-color: #b91c1c;
    background: #450a0a;
}

html[data-theme="dark"] .order-progress-chip-av.state-invoiced {
    color: #6ee7b7;
    border-color: #065f46;
    background: #022c22;
}

html[data-theme="dark"] .status-picker-dropdown {
    background: #292524;
    border-color: #44403c;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .status-picker-option {
    color: #e7e5e4;
}

html[data-theme="dark"] .status-picker-option:hover,
html[data-theme="dark"] .status-picker-option.active {
    background: #3f3e3a;
}

html[data-theme="dark"] .status-picker-option-archive {
    color: #86efac;
}

html[data-theme="dark"] .status-picker-option-archive:hover {
    background: #052e16;
}

html[data-theme="dark"] .status-picker-divider {
    border-top-color: #44403c;
}

/* ── Cross-tab zoekresultaten (dark) ───────────────────────── */

html[data-theme="dark"] .search-result-tab-badge.badge-werkvoorraad { background: #7c2d12; color: #fed7aa; }
html[data-theme="dark"] .search-result-tab-badge.badge-offertefase  { background: #312e81; color: #c7d2fe; }
html[data-theme="dark"] .search-result-tab-badge.badge-uitvoering   { background: #064e3b; color: #a7f3d0; }
html[data-theme="dark"] .search-result-tab-badge.badge-archief      { background: #44403c; color: #a8a29e; }

html[data-theme="dark"] .search-result-count { color: #a8a29e; }

html[data-theme="dark"] .thread-card.search-highlight {
    animation: search-highlight-pulse-dark 2s ease-out;
}
@keyframes search-highlight-pulse-dark {
    0%   { box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.5); }
    100% { box-shadow: none; }
}

/* ── WIS-archief kaarten (dark) ─────────────────────────────── */
html[data-theme="dark"] .wis-archive-card {
    background: #1c1917;
    border-color: #44403c;
    border-left-color: #d97706;
}
html[data-theme="dark"] .wis-archive-card:hover { box-shadow: 0 1px 6px rgba(0,0,0,0.3); }
html[data-theme="dark"] .wis-archive-card.wis-status-accoord { border-left-color: #10b981; background: #022c22; }
html[data-theme="dark"] .wis-archive-card.wis-status-afgewezen { border-left-color: #6b7280; background: #1f2937; }

html[data-theme="dark"] .wis-badge { background: #b45309; color: #fefce8; }
html[data-theme="dark"] .wis-offerte-id { color: #e7e5e4; }
html[data-theme="dark"] .wis-status-chip.wis-status-nieuw { background: #451a03; color: #fbbf24; }
html[data-theme="dark"] .wis-status-chip.wis-status-accoord { background: #064e3b; color: #6ee7b7; }
html[data-theme="dark"] .wis-status-chip.wis-status-afgewezen { background: #374151; color: #9ca3af; }
html[data-theme="dark"] .wis-archive-card-meta { color: #a8a29e; }
html[data-theme="dark"] .btn-wis-ignore { background: #292524; border-color: #57534e; color: #a8a29e; }
html[data-theme="dark"] .btn-wis-ignore:hover { background: #44403c; }

html[data-theme="dark"] .wis-enrich-chip.wis-enrich-ok { background: #064e3b; color: #6ee7b7; }
html[data-theme="dark"] .wis-enrich-chip.wis-enrich-warn { background: #451a03; color: #fbbf24; }
html[data-theme="dark"] .wis-enrich-chip.wis-enrich-info { background: #1e1b4b; color: #a5b4fc; }
html[data-theme="dark"] .wis-enrich-chip.wis-enrich-muted { background: #374151; color: #9ca3af; }
html[data-theme="dark"] .wis-note { color: #a8a29e; }
html[data-theme="dark"] .wis-note-label { color: #d6d3d1; }
