:root {
    --app-bg: var(--fundo, #f4efe6);
    --app-surface: var(--painel, #fffefa);
    --app-surface-raised: #ffffff;
    --app-surface-soft: #f8f6f1;
    --app-border: var(--linha, #e4d8c8);
    --app-text: var(--texto, #2b2925);
    --app-muted: var(--muted, #7d746a);
    --app-shadow: 0 14px 34px rgba(50, 38, 27, 0.08);
}

html[data-color-mode="dark"] {
    color-scheme: dark;
    --fundo: #0d1411;
    --painel: #151e1a;
    --cinza-suave: #101815;
    --linha: #314039;
    --borda: #314039;
    --texto: #edf4ef;
    --text: #edf4ef;
    --muted: #a8b6ad;
    --app-bg: #0d1411;
    --app-surface: #151e1a;
    --app-surface-raised: #1b2621;
    --app-surface-soft: #111a16;
    --app-border: #314039;
    --app-text: #edf4ef;
    --app-muted: #a8b6ad;
    --app-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
    --app-field: #101a16;
    --app-field-hover: #14211b;
    --app-text-strong: #f4f8f5;
    --app-text-soft: #c4d1c9;
    --app-accent-soft: #283a31;
}

body {
    transition: background-color 180ms ease, color 180ms ease;
}

.app-color-mode-toggle {
    position: fixed;
    z-index: 12000;
    right: 18px;
    bottom: 76px;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--app-border) 76%, var(--app-text));
    border-radius: 50%;
    background: color-mix(in srgb, var(--app-surface-raised) 94%, transparent);
    color: var(--app-text);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.app-color-mode-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--dourado, #c5a47e);
}

.app-color-mode-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--dourado, #c5a47e) 48%, transparent);
    outline-offset: 3px;
}

.app-color-mode-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.is-embedded-budget .app-color-mode-toggle { display: none; }

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

html[data-color-mode="dark"] input,
html[data-color-mode="dark"] select,
html[data-color-mode="dark"] textarea {
    background-color: var(--app-surface-raised);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-color-mode="dark"] input::placeholder,
html[data-color-mode="dark"] textarea::placeholder { color: #84948a; }

html[data-color-mode="dark"] input:focus,
html[data-color-mode="dark"] select:focus,
html[data-color-mode="dark"] textarea:focus {
    border-color: color-mix(in srgb, var(--dourado, #c5a47e) 72%, #fff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--dourado, #c5a47e) 17%, transparent);
}

/* CRM e area de BI */
html[data-color-mode="dark"] .crm-main,
html[data-color-mode="dark"] .crm-dashboard-workspace { background-color: var(--app-bg); }

html[data-color-mode="dark"] .crm-branch-control,
html[data-color-mode="dark"] .crm-user-box,
html[data-color-mode="dark"] .crm-kpi,
html[data-color-mode="dark"] .crm-panel,
html[data-color-mode="dark"] .crm-module,
html[data-color-mode="dark"] .crm-dashboard-editor,
html[data-color-mode="dark"] .crm-module-content,
html[data-color-mode="dark"] .crm-operational-section,
html[data-color-mode="dark"] .crm-architect-directory,
html[data-color-mode="dark"] .crm-modal-card,
html[data-color-mode="dark"] .crm-widget-detail-content {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
    box-shadow: var(--app-shadow);
}

html[data-color-mode="dark"] .crm-page-title,
html[data-color-mode="dark"] .crm-user-box span,
html[data-color-mode="dark"] .crm-header h1,
html[data-color-mode="dark"] .crm-panel h2,
html[data-color-mode="dark"] .crm-kpi strong,
html[data-color-mode="dark"] .crm-module strong,
html[data-color-mode="dark"] .crm-architect-manager h2,
html[data-color-mode="dark"] .crm-modal-head h2,
html[data-color-mode="dark"] .crm-widget-detail-content h3 { color: var(--app-text); }

html[data-color-mode="dark"] .crm-branch-control input,
html[data-color-mode="dark"] .crm-seller-filter input,
html[data-color-mode="dark"] .crm-multiselect-trigger,
html[data-color-mode="dark"] .crm-filial-readonly,
html[data-color-mode="dark"] .crm-multiselect-panel,
html[data-color-mode="dark"] .crm-reset-filters,
html[data-color-mode="dark"] .crm-icon-button,
html[data-color-mode="dark"] .crm-secondary-button,
html[data-color-mode="dark"] .crm-query-source-head button,
html[data-color-mode="dark"] .crm-calculated-fields-head button,
html[data-color-mode="dark"] .crm-table-filter-popover,
html[data-color-mode="dark"] .crm-table-filter-control > button,
html[data-color-mode="dark"] .crm-table-filter-actions button,
html[data-color-mode="dark"] .crm-sql-viewer-editor,
html[data-color-mode="dark"] .crm-query-table-wrap,
html[data-color-mode="dark"] .crm-appearance-panel,
html[data-color-mode="dark"] .crm-calculation-config,
html[data-color-mode="dark"] .crm-table-config,
html[data-color-mode="dark"] .crm-detail-config {
    background: var(--app-surface-raised);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-color-mode="dark"] .crm-multiselect-option,
html[data-color-mode="dark"] .crm-multiselect-option > span { color: var(--app-text) !important; }
html[data-color-mode="dark"] .crm-multiselect-option:hover { background: rgba(197, 164, 126, 0.13); }
html[data-color-mode="dark"] .crm-multiselect-option.is-all { background: rgba(255, 255, 255, 0.025); }

html[data-color-mode="dark"] .crm-dashboard-canvas {
    background-color: #101815;
    background-image:
        linear-gradient(rgba(127, 151, 137, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(127, 151, 137, 0.08) 1px, transparent 1px);
}

html[data-color-mode="dark"] .crm-dashboard-widget {
    border-color: color-mix(in srgb, var(--widget-accent, var(--dourado)) 48%, var(--app-border));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

html[data-color-mode="dark"] .crm-dashboard-widget[style*="--widget-background:#fff"],
html[data-color-mode="dark"] .crm-dashboard-widget[style*="--widget-background:#ffffff"] {
    --widget-background: var(--app-surface-raised) !important;
    --widget-color: var(--app-text) !important;
    --widget-muted: var(--app-muted) !important;
    --widget-line: var(--app-border) !important;
}

html[data-color-mode="dark"] .crm-widget-detail-table,
html[data-color-mode="dark"] .crm-query-table,
html[data-color-mode="dark"] .crm-dashboard-table { color: var(--app-text); }

html[data-color-mode="dark"] .crm-chart-table-real {
    background: #17211c;
    border-color: #3a4a42;
    color: #edf4ef;
    scrollbar-color: #65766c #111a16;
}

html[data-color-mode="dark"] .crm-chart-table-real table {
    background: #17211c;
    color: #edf4ef;
}

html[data-color-mode="dark"] .crm-chart-table-real thead th {
    background: #24322b;
    color: #f3f8f5;
    border-bottom-color: #4a5b52;
    box-shadow: inset 0 -1px 0 #4a5b52;
}

html[data-color-mode="dark"] .crm-chart-table-real tbody td {
    background: #17211c;
    color: #dce7e0;
    border-bottom-color: #334139;
}

html[data-color-mode="dark"] .crm-chart-table-real tbody tr:nth-child(even) td {
    background: #1b2721;
}

html[data-color-mode="dark"] .crm-chart-table-real tbody tr:hover td {
    background: #26362e;
    color: #ffffff;
}

html[data-color-mode="dark"] .crm-chart-table-real .crm-table-filter-control > button {
    background: #1b2822;
    color: #b8c9bf;
}

html[data-color-mode="dark"] .crm-chart-table-real .crm-table-filter-control > button:hover,
html[data-color-mode="dark"] .crm-chart-table-real .crm-table-filter-control.is-active > button {
    background: #35483e;
    color: #ffffff;
}

html[data-color-mode="dark"] .crm-widget-detail-content .crm-table-pagination {
    background: #17211c;
    border-color: #3a4a42;
    color: #b8c7be;
}

html[data-color-mode="dark"] .crm-widget-detail-content .crm-table-pagination button {
    background: #24322b;
    border-color: #4a5b52;
    color: #f3f8f5;
}

html[data-color-mode="dark"] .crm-widget-detail-content .crm-table-pagination button:not(:disabled):hover {
    background: #31443a;
    border-color: #789083;
}

html[data-color-mode="dark"] .crm-widget-detail-table th,
html[data-color-mode="dark"] .crm-query-table th,
html[data-color-mode="dark"] .crm-dashboard-table th,
html[data-color-mode="dark"] .crm-table-filter-values label:first-child {
    background: #202d27;
    color: #dfeae3;
    border-color: var(--app-border);
}

html[data-color-mode="dark"] .crm-widget-detail-table td,
html[data-color-mode="dark"] .crm-query-table td,
html[data-color-mode="dark"] .crm-dashboard-table td,
html[data-color-mode="dark"] .crm-table-filter-values label {
    background: var(--app-surface);
    color: var(--app-text);
    border-color: var(--app-border);
}

html[data-color-mode="dark"] .crm-table-filter-head strong,
html[data-color-mode="dark"] .crm-table-filter-control.is-active > button { color: #d7e7dc; }
html[data-color-mode="dark"] .crm-table-filter-control.is-active > button { background: rgba(197, 164, 126, 0.16); }

/* Auto-filtro de tabelas e tabelas dinamicas */
html[data-color-mode="dark"] .crm-table-filter-menu {
    background: #17211c;
    border-color: #48594f;
    color: var(--app-text);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(255, 255, 255, 0.025);
}

html[data-color-mode="dark"] .crm-table-filter-head {
    padding-bottom: 2px;
}

html[data-color-mode="dark"] .crm-table-filter-head strong {
    color: var(--app-text-strong);
}

html[data-color-mode="dark"] .crm-table-filter-head button {
    background: #223029;
    border-color: #4a5b52;
    color: #cbd8d0;
}

html[data-color-mode="dark"] .crm-table-filter-head button:hover {
    background: #304239;
    border-color: #71857a;
    color: #ffffff;
}

html[data-color-mode="dark"] .crm-table-filter-menu input[type="search"],
html[data-color-mode="dark"] .crm-table-filter-menu input[type="text"],
html[data-color-mode="dark"] .crm-table-filter-menu select {
    background: var(--app-field);
    border-color: #46584e;
    color: var(--app-text-strong);
}

html[data-color-mode="dark"] .crm-table-filter-menu input::placeholder {
    color: #91a198;
}

html[data-color-mode="dark"] .crm-table-filter-menu input:focus,
html[data-color-mode="dark"] .crm-table-filter-menu select:focus {
    border-color: #d0b28d;
    box-shadow: 0 0 0 3px rgba(197, 164, 126, 0.18);
    outline: 0;
}

html[data-color-mode="dark"] .crm-table-filter-values {
    background: #101915;
    border-color: #3c4c43;
    scrollbar-color: #66786e #101915;
}

html[data-color-mode="dark"] .crm-table-filter-values label,
html[data-color-mode="dark"] .crm-table-filter-values label:first-child {
    background: #151f1a;
    border-color: #34443b;
    color: #dce7e0;
}

html[data-color-mode="dark"] .crm-table-filter-values label:hover {
    background: #26372e;
    color: #ffffff;
}

html[data-color-mode="dark"] .crm-table-filter-values label.is-all {
    background: #223129;
    color: #f3f8f5;
}

html[data-color-mode="dark"] .crm-table-filter-values input[type="checkbox"] {
    accent-color: #d0a765;
}

html[data-color-mode="dark"] .crm-table-filter-conditions {
    border-top: 1px solid #34443b;
    padding-top: 10px;
}

html[data-color-mode="dark"] .crm-table-filter-conditions small {
    color: #c2d0c7;
}

html[data-color-mode="dark"] .crm-table-filter-menu option {
    background: #17211c;
    color: var(--app-text);
}

html[data-color-mode="dark"] .crm-table-filter-actions {
    border-top: 1px solid #34443b;
    padding-top: 10px;
}

html[data-color-mode="dark"] .crm-table-filter-actions button {
    background: #223029;
    border-color: #4a5b52;
    color: #edf4ef;
}

html[data-color-mode="dark"] .crm-table-filter-actions button:hover {
    background: #304239;
    border-color: #71857a;
}

html[data-color-mode="dark"] .crm-table-filter-actions button:last-child {
    background: #1f4f38;
    border-color: #3b795a;
    color: #ffffff;
}

html[data-color-mode="dark"] .crm-table-filter-actions button:last-child:hover {
    background: #286447;
    border-color: #55a477;
}

html[data-color-mode="dark"] .crm-modal-backdrop { background: rgba(2, 7, 5, 0.76); }
html[data-color-mode="dark"] .crm-contact-filters,
html[data-color-mode="dark"] .crm-contact-customer,
html[data-color-mode="dark"] .crm-query-help,
html[data-color-mode="dark"] .crm-query-result,
html[data-color-mode="dark"] .crm-sql-viewer-parameters,
html[data-color-mode="dark"] .crm-widget-detail-context,
html[data-color-mode="dark"] .crm-empty-operational {
    background: var(--app-surface-soft);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-color-mode="dark"] .crm-budget-frame-wrap,
html[data-color-mode="dark"] .crm-budget-frame { background: var(--app-bg); border-color: var(--app-border); }

/* Diretorio e cadastro de arquitetos */
html[data-color-mode="dark"] .crm-architect-manager {
    background: #121c17;
    border-color: #304038;
    color: var(--app-text);
}

html[data-color-mode="dark"] .crm-architect-manager-header {
    border-color: var(--app-border);
}

html[data-color-mode="dark"] .crm-architect-manager h2,
html[data-color-mode="dark"] .crm-architect-card-heading strong {
    color: var(--app-text-strong);
}

html[data-color-mode="dark"] .crm-architect-form {
    background: #1a2620;
    border-color: #3a4b42;
    border-left-color: var(--dourado, #c5a47e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

html[data-color-mode="dark"] .crm-architect-form label,
html[data-color-mode="dark"] .crm-architect-search {
    color: #c8d6cd;
}

html[data-color-mode="dark"] .crm-architect-form input,
html[data-color-mode="dark"] .crm-architect-search input {
    background: var(--app-field);
    border-color: #405249;
    color: var(--app-text-strong);
}

html[data-color-mode="dark"] .crm-architect-form input:hover,
html[data-color-mode="dark"] .crm-architect-search input:hover {
    background: var(--app-field-hover);
    border-color: #566c60;
}

html[data-color-mode="dark"] .crm-architect-form input:focus,
html[data-color-mode="dark"] .crm-architect-search input:focus {
    background: #15221c;
    border-color: color-mix(in srgb, var(--dourado, #c5a47e) 72%, #ffffff);
}

html[data-color-mode="dark"] .crm-architect-form-actions button:not(.crm-primary-command),
html[data-color-mode="dark"] .crm-architect-expand,
html[data-color-mode="dark"] .crm-architect-pagination button {
    background: #223029;
    border-color: #465a4f;
    color: #edf4ef;
}

html[data-color-mode="dark"] .crm-architect-form-actions button:not(.crm-primary-command):hover,
html[data-color-mode="dark"] .crm-architect-expand:hover,
html[data-color-mode="dark"] .crm-architect-pagination button:not(:disabled):hover {
    background: #2c3e34;
    border-color: #71897b;
}

html[data-color-mode="dark"] .crm-architect-directory {
    background: transparent;
    box-shadow: none;
}

html[data-color-mode="dark"] .crm-architect-directory-status,
html[data-color-mode="dark"] .crm-architect-document,
html[data-color-mode="dark"] .crm-architect-origin,
html[data-color-mode="dark"] .crm-architect-pagination span,
html[data-color-mode="dark"] .crm-architect-form-actions > span {
    color: #aabbb1;
}

html[data-color-mode="dark"] .crm-architect-card {
    background: #1a2620;
    border-color: #3b4d43;
    border-left-color: color-mix(in srgb, var(--verde-medio, #2d5a27) 68%, #8fb89a);
    color: var(--app-text);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
}

html[data-color-mode="dark"] .crm-architect-card:hover {
    background: #1e2c25;
    border-color: #61786b;
    box-shadow: 0 11px 26px rgba(0, 0, 0, 0.3);
}

html[data-color-mode="dark"] .crm-architect-card-avatar {
    background: #283b32;
    border: 1px solid #40594c;
    color: #e8f2ec;
}

html[data-color-mode="dark"] .crm-architect-cau {
    background: #3a321f;
    border: 1px solid #665730;
    color: #f1d58a;
}

html[data-color-mode="dark"] .crm-architect-card-contacts a {
    color: #d4e1d9;
}

html[data-color-mode="dark"] .crm-architect-card-contacts a svg,
html[data-color-mode="dark"] .crm-architect-origin svg {
    color: #8fac9b;
}

html[data-color-mode="dark"] .crm-architect-card-contacts a:hover {
    color: #ffffff;
}

html[data-color-mode="dark"] .crm-architect-form-actions > span.is-error { color: #ff9a91; }
html[data-color-mode="dark"] .crm-architect-form-actions > span.is-success { color: #83dda0; }

/* Gerador de orcamentos */
html[data-color-mode="dark"] header,
html[data-color-mode="dark"] .results-section,
html[data-color-mode="dark"] .quote-sidebar,
html[data-color-mode="dark"] .quote-footer,
html[data-color-mode="dark"] .product-card,
html[data-color-mode="dark"] .item-quote-edit,
html[data-color-mode="dark"] .pdf-action-card,
html[data-color-mode="dark"] .architect-picker-results {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-color-mode="dark"] .product-card h4,
html[data-color-mode="dark"] .product-card .price,
html[data-color-mode="dark"] .pdf-action-card h2,
html[data-color-mode="dark"] .customer-match-details dd,
html[data-color-mode="dark"] .architect-picker-search,
html[data-color-mode="dark"] .architect-picker-option strong { color: var(--app-text); }

html[data-color-mode="dark"] .item-controls-grid input,
html[data-color-mode="dark"] .architect-picker-search input { background: var(--app-surface-raised); color: var(--app-text); border-color: var(--app-border); }
html[data-color-mode="dark"] .architect-picker-option { border-color: var(--app-border); }
html[data-color-mode="dark"] .architect-picker-option:has(input:checked) { background: rgba(197, 164, 126, 0.13); }
html[data-color-mode="dark"] .pdf-action-close,
html[data-color-mode="dark"] .pdf-action-secondary,
html[data-color-mode="dark"] .btn-history { background: var(--app-surface-raised) !important; color: var(--app-text) !important; }

/* Historico de orcamentos */
html[data-color-mode="dark"] .lista-header,
html[data-color-mode="dark"] .orcamento-card,
html[data-color-mode="dark"] .status-filter-menu,
html[data-color-mode="dark"] .status-filter-toggle,
html[data-color-mode="dark"] .pagination-btn {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-color-mode="dark"] .premium-title,
html[data-color-mode="dark"] .total-valor-bold,
html[data-color-mode="dark"] .select-wrapper label,
html[data-color-mode="dark"] .status-filter-arrow { color: var(--app-text); }
html[data-color-mode="dark"] .card-footer { border-color: var(--app-border); }
html[data-color-mode="dark"] .total-label,
html[data-color-mode="dark"] .validade-row,
html[data-color-mode="dark"] .pagination-summary { color: var(--app-muted); }
html[data-color-mode="dark"] .status-filter-option:hover,
html[data-color-mode="dark"] .status-filter-option.is-selected { background: rgba(197, 164, 126, 0.14); color: var(--app-text); }
html[data-color-mode="dark"] .card-footer .btn-imprimir,
html[data-color-mode="dark"] .btn-imprimir { background: var(--app-surface-raised); color: var(--app-text); border-color: #839d8d !important; }
html[data-color-mode="dark"] .card-footer .btn-negociacao { background: #3b2d13; color: #ffd27a; border-color: #876922; }

/* Login */
html[data-color-mode="dark"] .login-page::after {
    background: linear-gradient(90deg, rgba(5, 13, 22, 0.91), rgba(6, 18, 29, 0.78)), linear-gradient(180deg, rgba(4, 11, 18, 0.28), rgba(4, 11, 18, 0.7));
}
html[data-color-mode="dark"] .login-shell { background: rgba(8, 18, 25, 0.65); border-color: rgba(191, 214, 201, 0.2); }
html[data-color-mode="dark"] .brand-panel { background: linear-gradient(135deg, rgba(15, 31, 40, 0.9), rgba(10, 24, 29, 0.7)); color: var(--app-text); }
html[data-color-mode="dark"] .login-container { background: rgba(15, 27, 34, 0.93); border-color: rgba(191, 214, 201, 0.16); }
html[data-color-mode="dark"] .brand-copy h1,
html[data-color-mode="dark"] .brand-metric strong,
html[data-color-mode="dark"] .login-container h2 { color: #f0f6f2; }
html[data-color-mode="dark"] .brand-copy p,
html[data-color-mode="dark"] .brand-metric span,
html[data-color-mode="dark"] .login-container > p,
html[data-color-mode="dark"] .footer-text,
html[data-color-mode="dark"] label { color: #b8c7cd; }
html[data-color-mode="dark"] .brand-metric { background: rgba(17, 37, 43, 0.7); border-color: rgba(191, 214, 201, 0.16); }
html[data-color-mode="dark"] .login-card-eyebrow { background: rgba(93, 151, 218, 0.15); color: #9fc7f3; }
html[data-color-mode="dark"] .login-container input { background: #17272e; color: #f0f6f2; border-color: #3c5057; }
html[data-color-mode="dark"] .footer-text { border-color: #34474d; }

@media (max-width: 640px) {
    .app-color-mode-toggle { right: 12px; bottom: 68px; width: 40px; height: 40px; }
}

@media print {
    .app-color-mode-toggle { display: none !important; }
}

/* Variante corporativa escura do painel de BI */
html[data-color-mode="dark"] {
    --fundo: #111820;
    --painel: #19232e;
    --linha: #364453;
    --texto: #edf1f5;
    --muted: #a7b1bd;
    --app-bg: #111820;
    --app-surface: #19232e;
    --app-surface-raised: #202c38;
    --app-surface-soft: #151e27;
    --app-border: #364453;
    --app-text: #edf1f5;
    --app-muted: #a7b1bd;
    --app-field: #18232d;
    --app-field-hover: #202d39;
    --app-text-strong: #f7f9fb;
    --app-text-soft: #cbd3dc;
}

html[data-color-mode="dark"] .crm-sidebar {
    background: linear-gradient(180deg, #1c2835 0%, #121a23 100%);
}

html[data-color-mode="dark"] .crm-branch-control,
html[data-color-mode="dark"] .crm-user-box,
html[data-color-mode="dark"] .crm-dashboard-editor {
    background: #19232e;
    border-color: #364453;
}

html[data-color-mode="dark"] .crm-page-title,
html[data-color-mode="dark"] .crm-dashboard-editor strong {
    color: #f1f4f7;
}

html[data-color-mode="dark"] .crm-dashboard-workspace {
    background: #0e151c;
    border-color: #303c49;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

html[data-color-mode="dark"] .crm-dashboard-canvas {
    border-color: #303c49;
    background-color: #141c25;
    background-image: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28);
}

html[data-color-mode="dark"] body.crm-scenario-editing .crm-dashboard-canvas {
    border-color: #4a5968;
    background-color: #141c25;
    background-image:
        linear-gradient(rgba(143, 159, 176, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 159, 176, 0.09) 1px, transparent 1px);
}

html[data-color-mode="dark"] body.crm-scenario-editing .crm-dashboard-editor {
    border-color: #8f7d16;
    background: linear-gradient(90deg, #302d18, #19232e 42%);
}

html[data-color-mode="dark"] .crm-edit-mode-toggle {
    border-color: #4a5968 !important;
    background: #202c38 !important;
    color: #edf1f5 !important;
}

html[data-color-mode="dark"] body.crm-scenario-editing .crm-edit-mode-toggle {
    background: #f2c811 !important;
    color: #252525 !important;
}

html[data-color-mode="dark"] .crm-canvas-height-control,
html[data-color-mode="dark"] .crm-table-pagination,
html[data-color-mode="dark"] .crm-visual-toggle {
    background: #18232d;
    border-color: #364453;
    color: #edf1f5;
}

html[data-color-mode="dark"] .crm-dashboard-widget {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

html[data-color-mode="dark"] .crm-dashboard-widget:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.38);
}

html[data-color-mode="dark"] .crm-chart-table-real,
html[data-color-mode="dark"] .crm-chart-table-real table,
html[data-color-mode="dark"] .crm-chart-table-real tbody td {
    background: #1c2732;
}

html[data-color-mode="dark"] .crm-chart-table-real thead th {
    background: #293746;
    border-bottom-color: #4a5968;
    box-shadow: inset 0 -1px 0 #4a5968;
}

html[data-color-mode="dark"] .crm-chart-table-real tbody tr:nth-child(even) td {
    background: #202c38;
}

html[data-color-mode="dark"] .crm-chart-table-real tbody tr:hover td {
    background: #2b3b4b;
}
