:root[data-theme="dark"] {
  color-scheme:dark;
  --bg:#000000;
  --card:#0b0b0b;
  --text:#ffffff;
  --muted:#ffffff;
  --line:#292929;
  --blue:#60a5fa;
  --green:#34d399;
  --yellow:#fbbf24;
  --red:#f87171;
  --dark:#f5f5f5;
  --form-control-border:#333333;
  --form-control-bg:#0a0a0a;
  --form-control-text:#f5f5f5;
  --section-tabs-track:#141414;
  --section-tab-bg:#212121;
  --section-tab-text:#d4d4d4;
  --section-tab-shadow:0 1px 3px #0009;
  --section-tab-hover:#303030;
  --product-sales-month-bg:#141414;
}
:root[data-theme="dark"] body { background:#000000; }
:root[data-theme="dark"] .topbar { background:#050505f2; }
:root[data-theme="dark"] .brand-link,
:root[data-theme="dark"] .receipt-empty h2,
:root[data-theme="dark"] .crm-chart-summary strong,
:root[data-theme="dark"] .crm-rank-row > span b { color:#f5f5f5; }
:root[data-theme="dark"] .brand-section { background:#171717; color:#ffffff; }
:root[data-theme="dark"] .crm-debt-value { color:#fda4af; }
:root[data-theme="dark"] .app-sidebar { border-color:#292929; background:#090909; }
:root[data-theme="dark"] .app-nav-group { border-color:#292929; }
:root[data-theme="dark"] .app-nav-item { color:#d4d4d4; }
:root[data-theme="dark"] .app-nav-item:hover { color:#ffffff; background:#1f1f1f; }
:root[data-theme="dark"] .app-nav-item.active { color:#ffffff; background:#2563eb; }
:root[data-theme="dark"] .app-nav-item.emphasis:not(.active) { color:#bfdbfe; background:#172554; }
:root[data-theme="dark"] .crm-new-client-panel { border-color:#292929; background:#050505; }
:root[data-theme="dark"] .crm-new-client-panel-icon { border-color:#333333; background:#151515; color:#93c5fd; box-shadow:none; }
:root[data-theme="dark"] .crm-new-client-summary-icon { background:#ffffff24; color:#ffffff; }
:root[data-theme="dark"] .crm-new-client-chevron,
:root[data-theme="dark"] .crm-new-client-fields label { color:#ffffff; }
:root[data-theme="dark"] .crm-new-client-fields :is(input,textarea,select) { border-color:#333333; background:#0a0a0a; color:#ffffff; }
:root[data-theme="dark"] .crm-new-client-fields :is(input,textarea,select):focus { border-color:#60a5fa; background:#0a0a0a; box-shadow:0 0 0 3px #1e3a8a; }
:root[data-theme="dark"] .crm-new-client-error { border-color:#7f1d1d; background:#240808; color:#ffffff; }
:root[data-theme="dark"] .crm-new-client-fields label > .crm-new-client-field-error { color:#fca5a5; }
:root[data-theme="dark"] .crm-new-client-fields :is(input,textarea,select)[aria-invalid='true'] { border-color:#ef4444; background:#180606; box-shadow:0 0 0 3px #7f1d1d66; }
:root[data-theme="dark"] .system-health-trigger { border-color:#333333; background:#151515; color:#ffffff; }
:root[data-theme="dark"] .system-health-trigger:hover { border-color:#737373; background:#242424; color:#ffffff; }
:root[data-theme="dark"] .system-health-dot,:root[data-theme="dark"] .system-health-count { border-color:#050505; }
:root[data-theme="dark"] .system-alert-drawer,
:root[data-theme="dark"] .system-alert-drawer-footer,
:root[data-theme="dark"] .system-alert-toast { border-color:#333333; background:#090909; color:#ffffff; box-shadow:none; }
:root[data-theme="dark"] .system-alert-drawer-header { border-color:#333333; }
:root[data-theme="dark"] .system-alert-drawer-header span,
:root[data-theme="dark"] .system-alert-card small,
:root[data-theme="dark"] .system-alert-empty p,
:root[data-theme="dark"] .system-alert-toast-open small { color:#ffffff; }
:root[data-theme="dark"] .system-alert-drawer-header h2,
:root[data-theme="dark"] .system-alert-card strong,
:root[data-theme="dark"] .system-alert-empty strong,
:root[data-theme="dark"] .system-alert-toast-open { color:#ffffff; }
:root[data-theme="dark"] .system-alert-close,
:root[data-theme="dark"] .system-alert-drawer-footer .secondary { border-color:#333333; background:#151515; color:#ffffff; }
:root[data-theme="dark"] .system-alert-card { border-color:#854d0e; background:#211706; }
:root[data-theme="dark"] .system-alert-card.critical { border-color:#7f1d1d; background:#2b0d12; }
:root[data-theme="dark"] .system-alert-empty > span { background:#12351f; color:#86efac; }
:root[data-theme="dark"] .system-alert-toast-open:hover,
:root[data-theme="dark"] .system-alert-toast-close:hover { background:#242424; color:#ffffff; }
:root[data-theme="dark"] .nav-user,
:root[data-theme="dark"] .section-title,
:root[data-theme="dark"] .shipment-meta,
:root[data-theme="dark"] .step-card small,
:root[data-theme="dark"] .workflow-mini small,
:root[data-theme="dark"] .crm-stat .crm-stat-label,
:root[data-theme="dark"] .crm-column > span,
:root[data-theme="dark"] .crm-column small,
:root[data-theme="dark"] .crm-chart-details summary,
:root[data-theme="dark"] .crm-user-form label,
:root[data-theme="dark"] .receipt-stats span,
:root[data-theme="dark"] .payment-stats span,
:root[data-theme="dark"] .payment-stats small { color:#a3a3a3; }
:root[data-theme="dark"] .theme-toggle { border-color:#333333; background:#151515; color:#d4d4d4; }
:root[data-theme="dark"] .theme-toggle:hover { border-color:#737373; background:#242424; color:#ffffff; }
:root[data-theme="dark"] .app-nav-toggle { border-color:#333333; background:#151515; color:#d4d4d4; }
:root[data-theme="dark"] .app-nav-toggle:hover { border-color:#737373; background:#242424; color:#ffffff; }
:root[data-theme="dark"] .nav-logout-button { border-color:#7f1d1d; background:#3f1721; color:#fda4af; }
:root[data-theme="dark"] .nav-logout-button:hover { background:#531c29; }
:root[data-theme="dark"] :is(input[type=text],input[type=email],input[type=password],input[type=number],textarea,select,input[type=datetime-local]) { border-color:var(--form-control-border); background:var(--form-control-bg); color:var(--form-control-text); }
:root[data-theme="dark"] .crm-search { background:#101010; }
:root[data-theme="dark"] .crm-data-card { border-color:#292929; background:#0b0b0b; box-shadow:none; }
:root[data-theme="dark"] .crm-data-toolbar.crm-search { border-color:#292929; background:#0b0b0b; }
:root[data-theme="dark"] .crm-data-table thead th { border-color:#292929; background:#141414; color:#ffffff; }
:root[data-theme="dark"] .crm-data-table tbody td { border-color:#222222; }
:root[data-theme="dark"] .crm-data-row:hover td { background:#151515; }
:root[data-theme="dark"] .crm-data-table code { background:#11343a; color:#5eead4; }
:root[data-theme="dark"] .order-cart-drawer,
:root[data-theme="dark"] .order-cart-header,
:root[data-theme="dark"] .order-cart-checkout,
:root[data-theme="dark"] .order-cart-close { border-color:#292929; background-color:#000000; color:#ffffff; }
:root[data-theme="dark"] .order-submit-bar { border-color:#292929; background:#050505ed; }
:root[data-theme="dark"] .order-cart-item { border-color:#292929; }
:root[data-theme="dark"] .order-cart-columns { border-color:#292929; color:#ffffff; background:#000000; }
:root[data-theme="dark"] .order-cart-remove { color:#fecdd3; background:#3f1721; }
:root[data-theme="dark"] .crm-client-table-row:hover td { background:#151515; }
:root[data-theme="dark"] .crm-client-table-row:hover .crm-client-name-line > a { color:#93c5fd; }
:root[data-theme="dark"] .crm-client-icon-action { border-color:#1e3a5f; background:#10213a; color:#93c5fd; }
:root[data-theme="dark"] .crm-client-icon-action:hover { border-color:#2563eb; background:#172554; color:#bfdbfe; }
:root[data-theme="dark"] .crm-client-icon-action:disabled { border-color:#292929; background:#111111; color:#737373; }
:root[data-theme="dark"] .crm-client-city,
:root[data-theme="dark"] .crm-client-contact-line > span { color:#fff; }
:root[data-theme="dark"] .crm-client-contact-line a { color:#93c5fd; }
:root[data-theme="dark"] .crm-client-contact-line button:disabled { color:#fff; opacity:.58; }
:root[data-theme="dark"] .crm-client-tag { background:#202020; color:#ffffff; }
:root[data-theme="dark"] .crm-client-tag.more { background:#172554; color:#bfdbfe; }
:root[data-theme="dark"] .crm-client-workspace-header { border-color:#292929; background:#050505fa; box-shadow:0 12px 32px #000000cc; }
:root[data-theme="dark"] .crm-client-tabs { border-color:#292929; }
:root[data-theme="dark"] .crm-client-tabs button { color:#ffffff; }
:root[data-theme="dark"] .crm-client-tabs button:hover,
:root[data-theme="dark"] .crm-client-tabs button.active { color:#93c5fd; }
:root[data-theme="dark"] .crm-client-tabs button span { color:#ffffff; background:#1d4ed8; }
:root[data-theme="dark"] .crm-client-back,
:root[data-theme="dark"] .crm-client-title-line p,
:root[data-theme="dark"] .crm-client-summary-strip span,
:root[data-theme="dark"] .crm-client-summary-strip small,
:root[data-theme="dark"] .crm-client-section-heading p,
:root[data-theme="dark"] .crm-client-event-list span,
:root[data-theme="dark"] .crm-client-contact-item > span,
:root[data-theme="dark"] .crm-client-contact-item button:disabled,
:root[data-theme="dark"] .crm-client-task-list span,
:root[data-theme="dark"] .crm-client-all-clear small,
:root[data-theme="dark"] .crm-client-purchase-brief span,
:root[data-theme="dark"] .crm-client-period-summary span,
:root[data-theme="dark"] .crm-client-period-summary small,
:root[data-theme="dark"] .crm-client-legal-list span,
:root[data-theme="dark"] .crm-client-legal-list small,
:root[data-theme="dark"] .crm-client-aliases span { color:#ffffff; }
:root[data-theme="dark"] .crm-client-summary-strip,
:root[data-theme="dark"] .crm-client-period-summary > div,
:root[data-theme="dark"] .crm-client-history-summary { border-color:#292929; background:#0b0b0b; box-shadow:none; }
:root[data-theme="dark"] .crm-client-summary-strip > div,
:root[data-theme="dark"] .crm-client-history-summary > div,
:root[data-theme="dark"] .crm-client-event-list li,
:root[data-theme="dark"] .crm-client-contact-item,
:root[data-theme="dark"] .crm-client-task-list li,
:root[data-theme="dark"] .crm-client-legal-list li { border-color:#292929; }
:root[data-theme="dark"] .crm-client-summary-strip strong,
:root[data-theme="dark"] .crm-client-history-summary strong,
:root[data-theme="dark"] .crm-client-contact-item strong,
:root[data-theme="dark"] .crm-client-period-summary strong { color:#ffffff; }
:root[data-theme="dark"] .crm-client-history-summary span { color:#ffffff; }
:root[data-theme="dark"] .crm-client-directory-series span { background:#17213a; color:#ffffff; }
:root[data-theme="dark"] .crm-client-history-card { border-color:#292929; background:#050505; box-shadow:0 18px 48px #000000b3; }
:root[data-theme="dark"] .crm-client-history-heading h2,
:root[data-theme="dark"] .crm-client-history-series h3,
:root[data-theme="dark"] .crm-history-series-row strong,
:root[data-theme="dark"] .crm-history-series-row b { color:#ffffff; }
:root[data-theme="dark"] .crm-client-history-switch { background:#171717; }
:root[data-theme="dark"] .crm-client-history-switch button { color:#ffffff; }
:root[data-theme="dark"] .crm-client-history-switch button:hover,
:root[data-theme="dark"] .crm-client-history-switch button.active { background:#262626; color:#93c5fd; box-shadow:none; }
:root[data-theme="dark"] .crm-client-sheet-button { border-color:#237a43; background:#102a1b; color:#ffffff; }
:root[data-theme="dark"] .crm-client-sheet-button:hover { border-color:#4ade80; background:#163326; color:#ffffff; }
:root[data-theme="dark"] .my-call-sheet { border-color:#237a43; background:#102a1b; color:#4ade80; }
:root[data-theme="dark"] .crm-client-state { color:#86efac; background:#12351f; }
:root[data-theme="dark"] .crm-client-state.internal { color:#bae6fd; background:#082f49; }
:root[data-theme="dark"] .crm-internal-client-section > td { background:#050505; }
:root[data-theme="dark"] .crm-internal-client-card { border-color:#164e63; background:#0b0b0b; }
:root[data-theme="dark"] .crm-internal-client-title > a { color:#ffffff; }
:root[data-theme="dark"] .crm-internal-client-main > small { color:#bae6fd; background:#082f49; }
:root[data-theme="dark"] .crm-internal-detail-grid :is(th,td) { border-color:#292929; }
:root[data-theme="dark"] .crm-internal-detail-grid th { color:#ffffff; background:#141414; }
:root[data-theme="dark"] .crm-client-purchase-brief > div,
:root[data-theme="dark"] .crm-client-aliases { background:#151515; }
:root[data-theme="dark"] .crm-client-event-dot { box-shadow:0 0 0 3px #292929; }
:root[data-theme="dark"] .crm-client-event-dot.shipment { box-shadow:0 0 0 3px #172554; }
:root[data-theme="dark"] .crm-client-event-dot.payment { box-shadow:0 0 0 3px #12351f; }
:root[data-theme="dark"] .crm-client-event-dot.communication,
:root[data-theme="dark"] .crm-client-event-dot.email,
:root[data-theme="dark"] .crm-client-event-dot.call,
:root[data-theme="dark"] .crm-client-event-dot.call_transcript { box-shadow:0 0 0 3px #2e1065; }
:root[data-theme="dark"] .crm-client-empty,
:root[data-theme="dark"] .crm-value-empty,
:root[data-theme="dark"] .crm-no-comparison { color:#ffffff; }
:root[data-theme="dark"] .crm-debt-value.crm-debt-normal { color:#ffffff; }
:root[data-theme="dark"] .crm-status.compact { color:#ffffff; }
:root[data-theme="dark"] .crm-row-actions summary { color:#ffffff; }
:root[data-theme="dark"] .crm-row-actions summary:hover,
:root[data-theme="dark"] .crm-row-actions details[open] summary { background:#262626; color:#ffffff; }
:root[data-theme="dark"] .crm-row-actions details > div { border-color:#333333; background:#141414; box-shadow:0 18px 45px #000000cc; }
:root[data-theme="dark"] .crm-row-actions details > div a { color:#ffffff; }
:root[data-theme="dark"] .crm-row-actions details > div a:hover { background:#262626; color:#ffffff; }
:root[data-theme="dark"] .crm-call-card { border-color:#292929; background:#141414; }
:root[data-theme="dark"] .crm-call-transcript { border-color:#333333; background:#090909; }
:root[data-theme="dark"] .crm-call-error { color:#fda4af; }
:root[data-theme="dark"] .crm-communication-stats > div,
:root[data-theme="dark"] .crm-email-thread,
:root[data-theme="dark"] .crm-email-message { border-color:#333; background:#101010; }
:root[data-theme="dark"] .crm-communication-overview { border-color:#333; background:#111; }
:root[data-theme="dark"] .crm-next-action,
:root[data-theme="dark"] .crm-email-message.outgoing { border-color:#444; background:#181818; }
:root[data-theme="dark"] .crm-topic-chips span,
:root[data-theme="dark"] .crm-communication-tag,
:root[data-theme="dark"] .crm-bulk-label { background:#242424; color:#fff; }
:root[data-theme="dark"] .crm-awaiting-reply { background:#3b1018; color:#fff; }
:root[data-theme="dark"] .crm-communication-filters button { border-color:#333; background:#111; color:#fff; }
:root[data-theme="dark"] .crm-communication-filters button.active { border-color:#3b82f6; background:#172554; color:#fff; }
:root[data-theme="dark"] .crm-mail-periods a { color:#fff; }
:root[data-theme="dark"] .crm-mail-periods a:hover { border-color:#333; background:#111; }
:root[data-theme="dark"] .crm-mail-periods a.active { border-color:#2563eb; background:#172554; color:#fff; }
:root[data-theme="dark"] .crm-source-tabs a { border-color:#333; background:#111; color:#fff; }
:root[data-theme="dark"] .crm-source-tabs a span { background:#242424; color:#fff; }
:root[data-theme="dark"] .crm-source-tabs a.active { border-color:#2563eb; background:#172554; color:#fff; }
:root[data-theme="dark"] .crm-source-tabs a.active span { background:#1d4ed8; color:#fff; }
:root[data-theme="dark"] .crm-conversation-workspace,:root[data-theme="dark"] .crm-conversation-dialog { border-color:#2b2b2b; background:#050505; }
:root[data-theme="dark"] .crm-conversation-queue,:root[data-theme="dark"] .crm-conversation-context { border-color:#2b2b2b; background:#0b0b0b; }
:root[data-theme="dark"] .crm-conversation-queue-item { border-color:#262626; color:#fff; }
:root[data-theme="dark"] .crm-conversation-queue-item:hover,:root[data-theme="dark"] .crm-conversation-queue-item.active { background:#141414; }
:root[data-theme="dark"] .crm-conversation-queue-item p,:root[data-theme="dark"] .crm-conversation-event summary p,:root[data-theme="dark"] .crm-conversation-context section p { color:#fff; }
:root[data-theme="dark"] .crm-conversation-queue-item > b { background:#321b0c; color:#fdba74; }
:root[data-theme="dark"] .crm-conversation-head { border-color:#2b2b2b; background:#050505ed; }
:root[data-theme="dark"] :is(.crm-call-audio, .crm-call-summary > div) { border-color:#2b2b2b; background:#0a0a0a; }
:root[data-theme="dark"] .crm-call-turn:not(.employee) { border-color:#2b2b2b; background:#141414; color:#f5f5f5; }
:root[data-theme="dark"] .crm-open-question { border-color:#7c2d12; background:#291207; }
:root[data-theme="dark"] .crm-open-question span { color:#fdba74; }
:root[data-theme="dark"] .crm-conversation-event,:root[data-theme="dark"] .crm-conversation-event.outgoing { border-color:#303030; background:#111; }
:root[data-theme="dark"] .crm-conversation-event.outgoing { border-color:#1d4ed8; background:#0b1730; }
:root[data-theme="dark"] .crm-conversation-event-icon { background:#1b1b1b; color:#93c5fd; }
:root[data-theme="dark"] .crm-context-stat { background:#111b38; }
:root[data-theme="dark"] .crm-context-pair > div { border-color:#303030; background:#111; }
:root[data-theme="dark"] .crm-conversation-context section { border-color:#292929; }
:root[data-theme="dark"] .crm-mail-message,:root[data-theme="dark"] .crm-mail-message.outgoing { border-color:#303030; background:#101010; color:#fff; }
:root[data-theme="dark"] .crm-mail-subject-separator strong { color:#fff; }
:root[data-theme="dark"] .crm-mail-message.outgoing { border-color:#1d4ed8; background:#0b1730; }
:root[data-theme="dark"] .crm-conversation-queue-row.active,:root[data-theme="dark"] .crm-conversation-queue-row .crm-conversation-queue-item:hover { background:#111827; }
:root[data-theme="dark"] .crm-reply-status button { border-color:#a16207; background:#2b2107; color:#fde68a; }
:root[data-theme="dark"] .crm-load-more,:root[data-theme="dark"] .crm-mail-attachment { border-color:#303030; background:#111; color:#fff; }
:root[data-theme="dark"] .crm-mail-composer { border-color:#333; background:#050505; color:#fff; box-shadow:0 18px 70px #000c; }
:root[data-theme="dark"] .crm-mail-composer-head { background:#171717; }
:root[data-theme="dark"] .crm-mail-address-row,:root[data-theme="dark"] .crm-mail-extra-addresses,:root[data-theme="dark"] .crm-mail-subject,:root[data-theme="dark"] .crm-mail-composer footer { border-color:#303030 !important; }
:root[data-theme="dark"] .crm-mail-selected-files > div { border-color:#303030; background:#111; color:#fff; }
:root[data-theme="dark"] .crm-mail-attach-button { color:#fff; }
:root[data-theme="dark"] .crm-mail-attach-button:hover { background:#181818; }
:root[data-theme="dark"] .crm-link-conversation { border-color:#7c2d12; background:#291207; color:#fff; }
:root[data-theme="dark"] .crm-link-conversation p { color:#fff; }
:root[data-theme="dark"] .crm-source-routing { border-color:#1d4ed8; background:#0b1730; color:#fff; }
:root[data-theme="dark"] .crm-source-routing p { color:#fff; }
:root[data-theme="dark"] .crm-source-category-button { border-color:#334155; background:#111; color:#fff; }
:root[data-theme="dark"] .crm-source-category-button.active { border-color:#3b82f6; background:#1d4ed8; }
:root[data-theme="dark"] .crm-source-category-reset { border-color:#7f1d1d; background:#30171d; color:#fff; }
:root[data-theme="dark"] .crm-call-reading,:root[data-theme="dark"] .crm-call-reading.outgoing { border-color:#303030; background:#101010; color:#fff; }
:root[data-theme="dark"] .crm-call-reading.outgoing { border-color:#1d4ed8; background:#0b1730; }
:root[data-theme="dark"] .price-filters { border-color:#292929; background:#101010; }
:root[data-theme="dark"] .price-filter-reset { border-color:#7f1d1d; color:#fda4af; background:#30171d; }
:root[data-theme="dark"] .price-filter-reset:hover { border-color:#be123c; color:#ffffff; background:#4c1724; }
:root[data-theme="dark"] .price-table thead th { border-color:#292929; background:#141414; }
:root[data-theme="dark"] .price-brand-row th { border-color:#333333; background:#102044; color:#ffffff; }
:root[data-theme="dark"] .price-section-row th { border-color:#333333; background:#181818; color:#ffffff; }
:root[data-theme="dark"] .price-description p { color:#ffffff; }
:root[data-theme="dark"] .price-description summary,
:root[data-theme="dark"] .price-name { color:#ffffff; }
:root[data-theme="dark"] .order-description summary { color:#ffffff; }
:root[data-theme="dark"] .order-description summary:hover { color:#93c5fd; }
:root[data-theme="dark"] .order-submit-bar { border-color:#292929; background:#0a0a0aeb; box-shadow:0 -8px 24px #00000080; }
:root[data-theme="dark"] .order-detail-header p,
:root[data-theme="dark"] .order-detail-meta dt,
:root[data-theme="dark"] .order-history-table td:first-child small,
:root[data-theme="dark"] .order-checkout-field > span { color:#ffffff; }
:root[data-theme="dark"] .order-status { color:#ffffff; }
:root[data-theme="dark"] .price-stock.available { color:#86efac; background:#163326; }
:root[data-theme="dark"] .price-stock.empty { color:#fda4af; background:#3f1721; }
:root[data-theme="dark"] .price-stock.unknown { color:#fde68a; background:#30250e; }
:root[data-theme="dark"] .price-refresh-report { border-color:#854d0e; background:#201b0d; }
:root[data-theme="dark"] .price-refresh-report summary { color:#ffffff; }
:root[data-theme="dark"] .price-refresh-report[open] summary { border-color:#854d0e; }
:root[data-theme="dark"] .price-warning-group { border-color:#854d0e; background:#0b0b0b; }
:root[data-theme="dark"] .price-warning-group h3,
:root[data-theme="dark"] .price-warning-item,
:root[data-theme="dark"] .price-warning-item small { color:#ffffff; }

.product-sales-table .product-sales-comparison :is(th,td) { background:var(--card); }
.product-sales-comparison-heading {
  color:var(--muted);
  font-weight:700;
}
.product-sales-comparison .product-sales-comparison-heading td,
.product-sales-comparison td.product-sales-comparison-empty { background:var(--soft, var(--bg)); }
.product-sales-table .product-sales-total :is(th,td):not(.product-sales-comparison-empty) {
  background:color-mix(in srgb,var(--blue) 9%,var(--card));
  font-weight:700;
}
.product-sales-comparison :is(.product-sales-comparison-quantity,.product-sales-month-cell,.product-sales-comparison-empty) {
  border-inline-start-color:color-mix(in srgb,var(--text) 38%,var(--card));
}
.product-sales-sold-brand {
  margin-inline-start:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:400;
}

:root[data-theme="dark"] .crm-filter-control > span { color:#a3a3a3; }
:root[data-theme="dark"] .crm-search-input { border-color:#333333; background:#080808; }
:root[data-theme="dark"] .crm-search-input:focus-within { border-color:#737373; box-shadow:0 0 0 4px #242424; }
:root[data-theme="dark"] .crm-search-input input[type=search] { color:#f5f5f5; }
:root[data-theme="dark"] :is(input,textarea)::placeholder { color:#737373; }
:root[data-theme="dark"] th { background:#141414; color:#d4d4d4; }
:root[data-theme="dark"] .ghost { background:#262626; color:#f5f5f5; }
:root[data-theme="dark"] :is(.crm-period,.crm-stat,.completion-card,.payment-stats > div,.payment-duplicate-row,.payment-cancellation-summary > div,.deal-card) { background:#0b0b0b; }
:root[data-theme="dark"] .crm-period { background:#0b0b0bf5; box-shadow:0 12px 32px #00000099; }
:root[data-theme="dark"] :is(.step-card,.workflow-mini,.history-item,.operation-step,.rules-card,.info-file,.info-step,.info-split-note p,.info-flow > div,.info-admin-note,.step,.stage-summary,.stage-alert,.stage-details,.receipt-list-item,.receipt-stats > div,.receipt-help-grid article,.pipeline-column) { border-color:#292929; background:#141414; }
:root[data-theme="dark"] :is(.history-tabs:where(:not(.section-tabs)),.crm-period-presets,.crm-metric-switch) { background:#141414; }
:root[data-theme="dark"] .history-tab:where(.history-tabs:not(.section-tabs) > *) { color:#a3a3a3; }
:root[data-theme="dark"] .history-tab:where(.history-tabs:not(.section-tabs) > *):hover { background:#262626; color:#f5f5f5; }
:root[data-theme="dark"] .crm-table-note { color:#fff; }
:root[data-theme="dark"] .crm-client-shipment-copy-menu[open] > summary { border-color:#60a5fa; background:#172554; color:#bfdbfe; }
:root[data-theme="dark"] .crm-client-shipment-copy-menu > div { border-color:#333333; background:#111111; box-shadow:0 18px 45px #00000080; }
:root[data-theme="dark"] .crm-client-shipment-copy-choice { color:#ffffff; }
:root[data-theme="dark"] .crm-client-shipment-copy-choice:hover { background:#202020; color:#93c5fd; }
:root[data-theme="dark"] .crm-client-shipment-copy-toast { border-color:#166534; background:#102a23; color:#ffffff; }
:root[data-theme="dark"] .crm-client-shipment-copy-toast.failed { border-color:#7f1d1d; background:#30171d; color:#ffffff; }
:root[data-theme="dark"] .crm-client-shipment-copy-manual { background:#000000b8; }
:root[data-theme="dark"] .crm-client-shipment-copy-manual > div { border-color:#333333; background:#111111; box-shadow:0 24px 70px #000000cc; }
:root[data-theme="dark"] .crm-client-shipment-copy-manual p { color:#ffffff; }
:root[data-theme="dark"] .crm-client-shipment-copy-manual textarea { border-color:#404040; background:#080808; color:#ffffff; }
:root[data-theme="dark"] :is(.crm-period-picker,.crm-period-arrow) { border-color:#333333; background:#141414; color:#d4d4d4; }
:root[data-theme="dark"] .crm-period-picker:focus-within { border-color:#737373; background:#080808; box-shadow:0 0 0 4px #242424; }
:root[data-theme="dark"] .crm-range-input[type=text] { color:#f5f5f5; }
:root[data-theme="dark"] .crm-period-preset { color:#a3a3a3; }
:root[data-theme="dark"] .crm-period-preset:hover,
:root[data-theme="dark"] .crm-period-preset.active,
:root[data-theme="dark"] .crm-metric-switch button:hover,
:root[data-theme="dark"] .crm-metric-switch button.active { background:#262626; color:#ffffff; box-shadow:none; }
:root[data-theme="dark"] .crm-column-track { background:repeating-linear-gradient(to top,#292929 0,#292929 1px,transparent 1px,transparent 25%); }
:root[data-theme="dark"] .crm-column.future .crm-column-track,
:root[data-theme="dark"] .crm-rank-track,
:root[data-theme="dark"] .crm-bar-row > div { background:#292929; }
:root[data-theme="dark"] .crm-sku-row > span strong code { background:#11343a; color:#5eead4; }
:root[data-theme="dark"] .crm-attention { border-color:#713f12; background:#2b2112; }
:root[data-theme="dark"] .crm-attention.inactive { border-color:#7f1d1d; background:#2f171d; }
:root[data-theme="dark"] .inventory-filters,
:root[data-theme="dark"] .inventory-table thead th,
:root[data-theme="dark"] .inventory-table thead .inventory-sticky-sku,
:root[data-theme="dark"] .inventory-table thead .inventory-sticky-name { border-color:#292929; background:#141414; }
:root[data-theme="dark"] .inventory-filters input,
:root[data-theme="dark"] .inventory-filters select { border-color:#333333; background:#080808; color:#f5f5f5; }
:root[data-theme="dark"] .inventory-category-filter summary,
:root[data-theme="dark"] .inventory-category-filter > div,
:root[data-theme="dark"] .inventory-month-controls button { border-color:#333333; background:#0a0a0a; color:#d4d4d4; }
:root[data-theme="dark"] .inventory-category-filter label { color:#d4d4d4; }
:root[data-theme="dark"] .inventory-category-filter label:hover { background:#202020; }
:root[data-theme="dark"] .inventory-month-controls button.active { border-color:#60a5fa; background:#172554; color:#bfdbfe; }
:root[data-theme="dark"] .inventory-table .inventory-month.season { background:#102019; }
:root[data-theme="dark"] .inventory-table thead .inventory-month.season { color:#86efac; background:#163326; }
:root[data-theme="dark"] .inventory-legend i { background:#163326; }
:root[data-theme="dark"] .inventory-help-hero { border-color:#333333; background:#111111; }
:root[data-theme="dark"] .inventory-help-hero p,
:root[data-theme="dark"] .inventory-help-grid p,
:root[data-theme="dark"] .inventory-help-list dd,
:root[data-theme="dark"] .inventory-help-steps { color:#b8b8b8; }
:root[data-theme="dark"] .inventory-help-list div,
:root[data-theme="dark"] .inventory-help-statuses > div,
:root[data-theme="dark"] .inventory-future-grid article { border-color:#292929; background:#141414; }
:root[data-theme="dark"] .documents-hero { border-color:#333333; background:#111111; }
:root[data-theme="dark"] .document-card { border-color:#292929; box-shadow:none; }
:root[data-theme="dark"] .document-icon { color:#4ade80; background:#102a1b; }
:root[data-theme="dark"] .document-card.folder .document-icon { color:#93c5fd; background:#172554; }
:root[data-theme="dark"] :is(
  p,small,label,th,td,li,dd,dt,.muted,.nav-user,.section-title,
  .app-nav-item,.app-nav-group > strong,.document-source,.document-meta,
  .crm-filter-control > span,.crm-period-preset,.history-tab:where(.history-tabs:not(.section-tabs) > *),
  .inventory-category-filter summary,.inventory-category-filter label
) { color:#ffffff; }
:root[data-theme="dark"] .document-card.sheet .document-source { color:#4ade80; }
:root[data-theme="dark"] .document-card.folder .document-source,
:root[data-theme="dark"] .document-open-hint { color:#60a5fa; }
:root[data-theme="dark"] .document-actions .button { border-color:#333333; background:#171717; color:#ffffff; }
:root[data-theme="dark"] .document-actions .button:hover { border-color:#60a5fa; background:#172554; color:#ffffff; }
:root[data-theme="dark"] :is(.processed-notice,.step-card.done,.workflow-mini.done,.operation-step.done,.completion-panel,.stage-summary.success,.info-file-note,.receipt-result) { border-color:#166534; background:#102a23; color:#86efac; }
:root[data-theme="dark"] :is(.workflow-mini.warn,.stage-alert.warning,.payment-duplicates,.payment-non-client,.receipt-alert.warning) { border-color:#854d0e; background:#30250e; color:#fde68a; }
:root[data-theme="dark"] :is(.history-error,.operation-step.failed,.receipt-cancel-box,.payment-cancellation) { border-color:#7f1d1d; background:#30171d; color:#fda4af; }
:root[data-theme="dark"] .payment-restoration { border-color:#1d4ed8; background:#071225; color:#fff; }
:root[data-theme="dark"] .crm-digest-calm { border:1px solid #166534; background:#102a23; color:#ffffff; }
:root[data-theme="dark"] .crm-day-nav input { border-color:#333333; background:#0a0a0a; color:#ffffff; }
:root[data-theme="dark"] .crm-task-create-form,
:root[data-theme="dark"] .crm-task-toolbar,
:root[data-theme="dark"] .crm-task-lane,
:root[data-theme="dark"] .crm-task-lane > header,
:root[data-theme="dark"] .crm-task-card { border-color:#292929; background:#0b0b0b; color:#ffffff; box-shadow:none; }
:root[data-theme="dark"] .crm-task-lane { background:#050505; }
:root[data-theme="dark"] .crm-task-lane > header b,
:root[data-theme="dark"] .crm-task-empty span { background:#262626; color:#ffffff; }
:root[data-theme="dark"] .crm-task-priority { background:#262626; color:#ffffff; }
:root[data-theme="dark"] .crm-task-priority.high { background:#3f1717; color:#fca5a5; }
:root[data-theme="dark"] .crm-task-priority.low { background:#102a43; color:#7dd3fc; }
:root[data-theme="dark"] .crm-task-card:hover { border-color:#60a5fa; box-shadow:0 8px 22px #00000066; }
:root[data-theme="dark"] :is(.workflow-mini.ready,.operation-panel,.operation-step.active,.loading-banner) { border-color:#3b82f6; background:#151515; color:#93c5fd; }
:root[data-theme="dark"] .async-skeleton-grid span,:root[data-theme="dark"] .async-skeleton-lines span { background:linear-gradient(90deg,#181818 20%,#292929 45%,#181818 70%); background-size:220% 100%; }
:root[data-theme="dark"] .flatpickr-calendar { border-color:#333333; background:#0b0b0b; box-shadow:0 24px 70px #000000cc; }
:root[data-theme="dark"] .flatpickr-calendar.arrowTop::before { border-bottom-color:#333333; }
:root[data-theme="dark"] .flatpickr-calendar.arrowTop::after { border-bottom-color:#0b0b0b; }
:root[data-theme="dark"] .flatpickr-months .flatpickr-month,
:root[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
:root[data-theme="dark"] .flatpickr-current-month input.cur-year,
:root[data-theme="dark"] .flatpickr-day { color:#f5f5f5; fill:#f5f5f5; }
:root[data-theme="dark"] .flatpickr-day.prevMonthDay,
:root[data-theme="dark"] .flatpickr-day.nextMonthDay { color:#737373; }
:root[data-theme="dark"] .flatpickr-day:hover { border-color:#404040; background:#262626; }
:root[data-theme="dark"] .flatpickr-day.today { border-color:#60a5fa; color:#ffffff; }
:root[data-theme="dark"] .flatpickr-day.selected,
:root[data-theme="dark"] .flatpickr-day.startRange,
:root[data-theme="dark"] .flatpickr-day.endRange,
:root[data-theme="dark"] .flatpickr-day.selected:hover,
:root[data-theme="dark"] .flatpickr-day.startRange:hover,
:root[data-theme="dark"] .flatpickr-day.endRange:hover { border-color:#60a5fa; background:#2563eb; color:#ffffff; box-shadow:none; }
:root[data-theme="dark"] .flatpickr-day.inRange { border-color:#172554; background:#172554; color:#ffffff; box-shadow:-5px 0 0 #172554,5px 0 0 #172554; }
.crm-client-contact-editor { display:block; margin-top:10px; padding:14px; border:1px solid var(--line); border-radius:14px; background:#f8fafc; }
.crm-client-contact-city { width:min(100%,510px); margin-bottom:10px; }
.crm-client-contact-grid { display:grid; width:min(100%,1120px); grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.crm-client-contact-editor :is(input,textarea) { background:var(--card); }
.crm-client-contact-editor textarea { min-height:76px; resize:vertical; }
.crm-client-contact-footer { display:flex; width:min(100%,1120px); align-items:center; justify-content:space-between; gap:16px; margin-top:12px; }
.crm-client-contact-footer > p { max-width:520px; margin:0; font-size:11px; line-height:1.4; }
.crm-client-contact-footer > button { flex:0 0 auto; margin:0; }
:root[data-theme="dark"] .crm-client-contact-editor { background:#0f0f0f; }
:root[data-theme="dark"] .crm-shipment-month-arrow { border-color:#333; background:#111; color:#fff; }
:root[data-theme="dark"] .crm-shipment-month-arrow:hover { border-color:#60a5fa; background:#171717; }
:root[data-theme="dark"] .crm-shipment-month-arrow.disabled { color:#666; }
:root[data-theme="dark"] .crm-shipment-weekdays,
:root[data-theme="dark"] .crm-shipment-week-total { border-color:#292929; background:#111; }
:root[data-theme="dark"] .crm-shipment-week { border-color:#292929; }
:root[data-theme="dark"] .crm-shipment-day { border-color:#292929; background:#080808; color:#fff; }
:root[data-theme="dark"] .crm-shipment-day.outside { background:#050505; color:#666; }
:root[data-theme="dark"] .crm-shipment-day.active { background:#151515; }
:root[data-theme="dark"] .crm-shipment-day-link:hover { background:#1d1d1d; }
:root[data-theme="dark"] .crm-shipment-year-month > header,
:root[data-theme="dark"] .crm-shipment-year-month > footer { border-color:#292929; background:#111; color:#fff; }
:root[data-theme="dark"] .crm-internal-transfer-summary { border-color:#134e4a; background:#071a18; }
:root[data-theme="dark"] .crm-internal-transfer-summary strong,
:root[data-theme="dark"] .crm-internal-transfer-summary b { color:#5eead4; }
:root[data-theme="dark"] .crm-internal-transfer-summary small { color:#d4d4d4; }
@media (max-width:720px) {
  .crm-client-contact-editor { padding:12px; }
  .crm-client-contact-grid { grid-template-columns:1fr; }
  .crm-client-contact-footer { align-items:stretch; flex-direction:column; gap:10px; }
  .crm-client-contact-footer > button { width:100%; }
}
/* «В базе 2ГИС: …» beside a call or a letter with no client (crm_center_views.center_hint). */
.center-hint { display:block; margin:4px 0; color:var(--muted); font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.center-hint strong { color:var(--text); font-weight:600; }
