/* ==========================================================================
   TELEMETRIA CJ — PREFERENCIAS VISUAIS V1
   A camada e carregada por ultimo. Ela nao altera cores semanticas de status;
   apenas troca canvas, superficies, texto, bordas e estados de interacao.
   ========================================================================== */

.cj-auth-account-panel {
  width: min(286px, calc(100vw - 24px));
}

.cj-auth-account-identity {
  display: grid;
  gap: 3px;
}

.cj-auth-account-identity strong { font-size: 16px; }

.cj-auth-theme-picker {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #e2e8f0;
}

.cj-auth-theme-picker > span {
  color: #42516a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cj-auth-theme-picker > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.cj-auth-account-panel .cj-auth-theme-picker button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  margin: 0;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  background: #f8fafc;
  color: #42516a;
  font-size: 12px;
  font-weight: 850;
}

.cj-auth-account-panel .cj-auth-theme-picker button:hover,
.cj-auth-account-panel .cj-auth-theme-picker button.active {
  border-color: #66c58f;
  background: #eaf8f0;
  color: #087443;
  box-shadow: inset 0 0 0 1px rgba(10,166,83,.1);
}

.cj-auth-theme-picker button i { font-size: 15px; font-style: normal; }
.cj-auth-theme-picker > small { color: #7b8aa0; font-size: 10px; line-height: 1.35; }

.cj-auth-account-panel .cj-auth-account-logout {
  width: 100%;
}

:root[data-theme="dark"] {
  --text: #e8eef7;
  --muted: #9aabc0;
  --line: #294a68;
  --bg: #071b2e;
  --card: #0b2238;
  --shadow: 0 18px 44px rgba(0,0,0,.34);
  --green: #20d271;
  --green-dark: #2bd47b;
  --orange: #ff963f;
  --blue: #55a4ff;
  --chart-current: #27d678;
  --chart-current-soft: #123327;
  --chart-comparison: #64aaff;
  --chart-comparison-soft: #172c49;
  --chart-target: #ff9d46;
  --chart-target-soft: #3b2a19;
  --chart-projection: #3bc8f5;
  --chart-projection-soft: #15343f;
  --cj-value-surface-bg: #102a44;
  --cj-value-surface-border: #285071;
  --cj-value-surface-text: #eef6ff;
  --cj-dark-canvas: #071b2e;
  --cj-dark-surface: #0b2238;
  --cj-dark-surface-2: #102a44;
  --cj-dark-surface-3: #163753;
  --cj-dark-line: #294a68;
  --cj-dark-text: #e8eef7;
  --cj-dark-muted: #9aabc0;
  --cj-dark-green-soft: #123327;
  --cj-dark-blue-soft: #172c49;
  --cj-dark-orange-soft: #3b2a19;
  --cj-dark-red-soft: #3b2024;
  --ops-ok-soft: #123327;
  --ops-info-soft: #172c49;
  --ops-warn-soft: #3b2a19;
  --ops-bad-soft: #3b2024;

  /* Contrato semantico unico do tema. Componentes usam estes papeis em vez
     de escolher tons isolados por pagina. */
  --cj-theme-canvas: var(--cj-dark-canvas);
  --cj-theme-surface: var(--cj-dark-surface);
  --cj-theme-surface-raised: var(--cj-dark-surface-2);
  --cj-theme-surface-hover: var(--cj-dark-surface-3);
  --cj-theme-control: #172f49;
  --cj-theme-line: var(--cj-dark-line);
  --cj-theme-text: var(--cj-dark-text);
  --cj-theme-muted: var(--cj-dark-muted);
  --cj-theme-focus: #55a4ff;
  --cj-mobile-ink: var(--cj-dark-text);
  --cj-mobile-muted: var(--cj-dark-muted);
  --cj-mobile-line: var(--cj-dark-line);
  --cj-mobile-surface: var(--cj-dark-surface-2);
  --cj-mobile-soft: var(--cj-dark-surface-3);
  --cj-mobile-shadow: none;
}

/* ========================================================================
   INVARIANTES CANONICAS DO TEMA ESCURO
   Esta e a unica camada autorizada a converter estrutura clara em escura.
   Cores de negocio (sucesso, atencao, erro e series dos graficos) continuam
   nos seletores semanticos especificos e nunca sao neutralizadas aqui.
   ======================================================================== */

html[data-theme="dark"] :where(
  .cj-access-activity-head,
  .cj-user-actions,
  .supply-modal > article,
  .seller-goal-chart,
  .cj-sidebar-padronizada-v8,
  .rupture-supplier-policies,
  .rupture-supplier-policy-card,
  .supplier-policy-modal-head,
  .supplier-policy-current,
  .supplier-policy-form,
  .supplier-policy-history,
  .supplier-policy-readonly,
  .supplier-policy-history-card,
  .cj-fg-modelos-modal-card,
  .abc-gov-pareto-fieldset,
  .abc-gov-xyz-fieldset,
  .abc-gov-audit-footer,
  .abc-status-drill-card,
  .abc-matrix-cell-card,
  .inventory-efficiency-header,
  .inventory-efficiency-kpi,
  .inventory-efficiency-panel,
  .inventory-efficiency-curve,
  .inventory-efficiency-modal > article
) {
  border-color: var(--cj-theme-line) !important;
  background: var(--cj-theme-surface) !important;
  color: var(--cj-theme-text) !important;
}

html[data-theme="dark"] :where(
  .cj-permission-modes span,
  .cj-access-preview-grid article,
  .supply-cutoff,
  .rupture-lead-stages > article,
  .abc-strategy-explainer span,
  .abc-matrix-table tbody tr,
  .abc-status-drill-totals article,
  .inventory-efficiency-dates article
) {
  border-color: var(--cj-theme-line) !important;
  background: var(--cj-theme-surface-raised) !important;
  color: var(--cj-theme-text) !important;
}

html[data-theme="dark"] :where(
  .supply-causes button,
  .supply-toolbar input,
  .supply-toolbar select,
  .mini-filters button,
  .seller-treatment-fields select,
  .seller-treatment-fields input,
  .seller-treatment-fields textarea,
  .cj-ms-search,
  .rupture-supplier-policy-toolbar input,
  .rupture-supplier-policy-toolbar select,
  .supplier-policy-form input,
  .supplier-policy-form select,
  .supplier-policy-form textarea,
  .rupture-supplier-policy-close,
  .itens-page-jump input,
  .cidades4-modelos-toolbar input,
  .cidades4-modelos-toolbar select,
  .cj-fg-toolbar input,
  .cj-fg-toolbar select,
  .cj-fg-modelos-toolbar input,
  .cj-fg-modelos-toolbar select,
  .cj-fg-modelos-modal-toolbar input,
  .cj-fg-modelos-modal-toolbar select,
  .seller-summary-goal-edit .seller-goal-actions input,
  .seller-guarantee-client-grid button,
  .rupture-catalog-mode button,
  .rupture-equivalent-analysis-error button,
  .rupture-detail-tabs button,
  .rupture-branch-analysis-button,
  .abc-status-drill-error button,
  .abc-status-drill-actions button,
  .inventory-efficiency-clear
) {
  border-color: var(--cj-theme-line) !important;
  background: var(--cj-theme-control) !important;
  color: var(--cj-theme-text) !important;
  -webkit-text-fill-color: var(--cj-theme-text) !important;
}

html[data-theme="dark"] .abc-comparativo-table td:first-child {
  border-color: var(--cj-theme-line) !important;
  background: var(--cj-theme-surface-raised) !important;
  color: var(--cj-theme-text) !important;
}

html[data-theme="dark"] .ops-timeline-step i {
  border-color: var(--cj-theme-line) !important;
  background: var(--cj-theme-surface-raised) !important;
}

/* O Dashboard do Vendedor declara apenas papeis locais no CSS de layout.
   A conversao para o azul CJ pertence exclusivamente a esta camada. */
html[data-theme="dark"] .seller-dashboard-v2 {
  --seller-v2-canvas: var(--cj-theme-canvas);
  --seller-v2-panel: rgba(11,34,56,.94);
  --seller-v2-panel-strong: var(--cj-theme-surface-raised);
  --seller-v2-line: var(--cj-theme-line);
  --seller-v2-text: #edf5fc;
  --seller-v2-muted: #9db2c8;
  --seller-v2-blue: #39a0ff;
  --seller-v2-green: #29d47d;
  --seller-v2-orange: #ff8a2a;
}

html[data-theme="dark"] .seller-v2-communication,
html[data-theme="dark"] .seller-v2-kpi-groups > article,
html[data-theme="dark"] .seller-v2-panel,
html[data-theme="dark"] .seller-v2-opportunities {
  box-shadow: 0 14px 34px rgba(1,10,20,.22);
}

html[data-theme="dark"] { background: var(--cj-dark-canvas); }

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 91% 2%, rgba(255,122,26,.09), transparent 26rem),
    radial-gradient(circle at 6% 96%, rgba(16,180,91,.08), transparent 30rem),
    var(--cj-dark-canvas);
  color: var(--cj-dark-text);
}

html[data-theme="dark"] ::selection { background: rgba(55,176,255,.34); color: #fff; }
html[data-theme="dark"] * { scrollbar-color: #41536a #0b2238; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #0b2238; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #41536a; border: 3px solid #0b2238; border-radius: 999px; }

html[data-theme="dark"] :where(.layout,.main,.view) { color: var(--cj-dark-text); }

html[data-theme="dark"] .topbar {
  border-color: var(--cj-dark-line);
  background: rgba(7,27,46,.92);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

html[data-theme="dark"] :where(.eyebrow,h1,h2,h3,h4,h5,h6) { color: var(--cj-dark-text); }
html[data-theme="dark"] :where(p,small,.muted) { color: var(--cj-dark-muted); }

html[data-theme="dark"] :where(input,select,textarea,.date-filter,.date-filter-control,.cj-ms-btn) {
  border-color: var(--cj-dark-line) !important;
  background-color: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(input,textarea)::placeholder { color: #70839a; }
html[data-theme="dark"] :where(input,select,textarea,button):focus-visible {
  outline-color: rgba(85,164,255,.72) !important;
}

html[data-theme="dark"] .date-filter output,
html[data-theme="dark"] .date-filter span { color: var(--cj-dark-text); }

html[data-theme="dark"] .date-filter-control input[type="date"] {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}

html[data-theme="dark"] .date-filter-control input[type="date"]::-webkit-calendar-picker-indicator {
  -webkit-text-fill-color: initial;
}

html[data-theme="dark"] .notification,
html[data-theme="dark"] .user-box {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface);
  box-shadow: 0 8px 22px rgba(0,0,0,.2);
}

html[data-theme="dark"] .cj-auth-user-trigger small { color: var(--cj-dark-muted); }

/* Navegacao */
html[data-theme="dark"] .layout > .sidebar,
html[data-theme="dark"] .layout > .sidebar .cj-clean-sidebar-v8 {
  border-color: var(--cj-dark-line) !important;
  background: rgba(11,34,56,.97) !important;
}

html[data-theme="dark"] .layout > .sidebar:hover .cj-clean-sidebar-v8,
html[data-theme="dark"] .layout > .sidebar:focus-within .cj-clean-sidebar-v8,
html[data-theme="dark"] body.cj-sidebar-pinned .layout > .sidebar .cj-clean-sidebar-v8 {
  box-shadow: 14px 0 34px rgba(0,0,0,.36);
}

html[data-theme="dark"] :where(.cj-sidebar-rail-head > strong,.cj-menu-entry-label span,.cj-menu-group-btn b) {
  color: #cad6e5;
}

html[data-theme="dark"] .cj-sidebar-pin {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface-2);
  color: #d7e2ef;
  box-shadow: 0 5px 14px rgba(0,0,0,.2);
}

html[data-theme="dark"] :where(.cj-menu-main,.cj-menu-group-btn,.cj-menu-subitem) {
  color: #b8c7d8;
}

html[data-theme="dark"] :where(.cj-menu-main:hover,.cj-menu-group-btn:hover,.cj-menu-subitem:hover) {
  border-color: #38506a !important;
  background: #163753 !important;
  color: #fff;
}

html[data-theme="dark"] .cj-menu-subitems {
  border-color: var(--cj-dark-line);
  background: #0b2238;
}

html[data-theme="dark"] .cj-menu-group.has-active .cj-menu-group-btn {
  border-color: #276b4a;
  background: #143426;
  color: #7ce7aa;
}

/* Dashboard e superficies comuns */
html[data-theme="dark"] .culture-card {
  border-color: var(--cj-dark-line);
  background:
    radial-gradient(circle at 88% 80%, rgba(255,122,26,.15), transparent 24rem),
    linear-gradient(135deg,#0b2238,#102a44 62%,#163753);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .culture-copy,
html[data-theme="dark"] .scope-badge {
  border-color: var(--cj-dark-line);
  background: rgba(11,34,56,.82);
}

html[data-theme="dark"] :where(
  .kpi,.panel,.page-panel,.chart-panel,.ranking-panel,.clientes-full-panel,.itens-full-panel,
  .client-360-panel,.seller-workspace,.seller-central-card,.admin-ops,.ops-card,
  .abc-page,.abc-analysis-section,.abc-matrix-panel,.abc-run-panel-v7,.abc-gov-shell,
  .aud-page,.aud-card,.aud2-page,.cidades4-page,.cidades4-summary,
  .supply-panel,.supply-kpi,.supply-pattern-card,.inventory-efficiency-page,
  .cj-access-page,.cj-rast-v8
) {
  border-color: var(--cj-dark-line) !important;
  background-color: var(--cj-dark-surface) !important;
  color: var(--cj-dark-text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] :where(.kpi,.panel,.chart-panel) strong { color: var(--cj-dark-text); }

/* Dashboard administrativo
   O dashboard usa componentes proprios para metas e calendario. No tema
   escuro eles formam uma unica superficie, sem cartoes brancos recortados. */
html[data-theme="dark"] .sales-performance-panel {
  border-color: var(--cj-dark-line) !important;
  background:
    radial-gradient(circle at 82% 8%, rgba(59,200,245,.045), transparent 30rem),
    linear-gradient(180deg,#121d2a 0%,#0b2238 100%) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
}

html[data-theme="dark"] .cj-role-home-performance-slot>#sales-performance-panel {
  border-color: var(--cj-dark-line) !important;
  background:
    radial-gradient(circle at 82% 8%, rgba(59,200,245,.055), transparent 24rem),
    linear-gradient(180deg,#121d2a 0%,#0b2238 100%) !important;
}

html[data-theme="dark"] .sales-executive-column.target .sales-executive-bar {
  background: linear-gradient(180deg,#ffd07e 0%,#f29a35 48%,#bd5708 100%) !important;
}

html[data-theme="dark"] .sales-executive-column.projection .sales-executive-bar {
  background: linear-gradient(180deg,#7be3ff 0%,#28b0df 48%,#0f6d8d 100%) !important;
}

html[data-theme="dark"] :where(
  .sales-performance-toolbar,.sales-performance-summary,.sales-chart-heading,
  .sales-branch-progress,.sales-executive-empty
) { border-color: #294a68 !important; }

html[data-theme="dark"] :where(.sales-control > span,.sales-goal-hint) {
  color: #91a4bb;
}

html[data-theme="dark"] :where(.sales-compare-input-wrap button,.sales-goal-input-wrap) {
  border-color: #34485f !important;
  background: #172435 !important;
  color: var(--cj-dark-text);
}

html[data-theme="dark"] .sales-compare-input-wrap button {
  color: #9db0c6;
}

html[data-theme="dark"] .sales-compare-input-wrap button:hover,
html[data-theme="dark"] .sales-compare-input-wrap button:focus-visible {
  background: #203249 !important;
  color: #fff;
}

html[data-theme="dark"] .sales-goal-input-wrap > span {
  color: #9eb1c8;
}

html[data-theme="dark"] .sales-goal-input-wrap button {
  border-color: #315541;
  background: #153526;
  color: #77e6a7;
}

html[data-theme="dark"] .sales-goal-input-wrap button:hover,
html[data-theme="dark"] .sales-goal-input-wrap button:focus-visible {
  background: #1b4932;
}

html[data-theme="dark"] .sales-goal-input-wrap.consolidated {
  border-color: #315541 !important;
  background: linear-gradient(90deg,#153526,#172435 42%) !important;
}

html[data-theme="dark"] .sales-goal-input-wrap.consolidated input,
html[data-theme="dark"] .sales-goal-consolidated-value {
  background: transparent !important;
  color: #8cebb4 !important;
}

html[data-theme="dark"] :where(.sales-executive-legend span,.sales-branch-legend .legend-item) {
  border-color: #34485f;
  background: rgba(23,36,53,.78);
  color: #bdcad9;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

html[data-theme="dark"] :where(.sales-executive-bars,.sales-branch-group,.sales-branch-plot) {
  border-color: #34465a !important;
}

html[data-theme="dark"] :where(
  .sales-executive-column strong,.sales-executive-group h4,.sales-executive-empty strong,
  .sales-chart-heading strong,.sales-branch-group h4
) { color: #e8eef7; }

html[data-theme="dark"] :where(.sales-executive-empty,.sales-chart-heading small) {
  color: #91a4bb;
}

html[data-theme="dark"] .sales-executive-delta {
  background: #163753;
  color: #aebed1;
}

html[data-theme="dark"] .sales-executive-delta.positive,
html[data-theme="dark"] .sales-branch-projection-pace.positive {
  background: #123327;
  color: #77e6a7;
}

html[data-theme="dark"] .sales-executive-delta.negative,
html[data-theme="dark"] .sales-branch-projection-pace.negative {
  background: #3b2024;
  color: #ff9ea4;
}

html[data-theme="dark"] .sales-calendar-strip {
  border-radius: 10px;
  background: linear-gradient(90deg,rgba(12,20,31,.28),rgba(24,38,55,.3),rgba(12,20,31,.28));
}

html[data-theme="dark"] .sales-calendar-card {
  border-color: #2d4056;
  background: linear-gradient(145deg,#172536,#142131);
  box-shadow: 0 10px 24px rgba(0,0,0,.13), inset 0 1px 0 rgba(255,255,255,.025);
}

html[data-theme="dark"] .sales-calendar-card.month {
  border-color: #286443;
  background:
    radial-gradient(circle at 90% 10%,rgba(39,214,120,.1),transparent 11rem),
    linear-gradient(145deg,#163326,#14263a);
}

html[data-theme="dark"] .sales-calendar-card > span { color: #9eb0c5; }
html[data-theme="dark"] .sales-calendar-card > strong { color: #edf4fb; }
html[data-theme="dark"] .sales-calendar-card > small { color: #c4d1df; }
html[data-theme="dark"] .sales-calendar-card > em {
  border-color: #2c3d51;
  color: #879ab2;
}

html[data-theme="dark"] .sales-calendar-card.blue {
  background: linear-gradient(145deg,#172b43,#142131);
}

html[data-theme="dark"] .sales-calendar-card.orange {
  background: linear-gradient(145deg,#33271d,#172131);
}

html[data-theme="dark"] .sales-calendar-card.holiday.attention {
  background: linear-gradient(145deg,#35291d,#172131);
}

html[data-theme="dark"] .sales-branch-grid {
  border-radius: 10px;
  background: linear-gradient(180deg,rgba(18,29,42,.3),rgba(10,17,27,.08));
}

html[data-theme="dark"] .sales-branch-column.monthly::before { background: #34465a; }
html[data-theme="dark"] .sales-branch-projection-pace {
  background: #15343f;
  color: #72d7f5;
}

html[data-theme="dark"] .sales-chart-loading {
  color: #9aacbf;
  background: rgba(16,26,39,.82);
}

html[data-theme="dark"] .sales-chart-error {
  color: #ff9ea4;
  background: rgba(59,32,36,.84);
}

/* Contraste global e cobertura transversal dos modulos. */
html[data-theme="dark"] .layout {
  background: var(--cj-dark-canvas) !important;
}

html[data-theme="dark"] :where(.main,.view,.content,.content-area) {
  background-color: transparent !important;
}

html[data-theme="dark"] :where(.filter-input,.itens-advanced-details,.ranking-note) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(.secondary-filter-btn,.clientes-page-btn,.itens-page-btn,.aud2-page-btn) {
  border-color: #34485f !important;
  background: #1a293c !important;
  color: #c9d6e5 !important;
}

html[data-theme="dark"] :where(.secondary-filter-btn,.clientes-page-btn,.itens-page-btn,.aud2-page-btn):hover:not(:disabled) {
  border-color: #477099 !important;
  background: #22364d !important;
  color: #fff !important;
}

html[data-theme="dark"] :where(.progress,.mini-progress,.seller-goal-track) {
  background: #25364a !important;
}

html[data-theme="dark"] :where(.ranking-table,.clientes-table,.itens-table,.aud2-table,.cidades4-table,.cj-access-table) {
  background: transparent !important;
}

/* Menu V8: nenhum estado expandido ou recolhido volta para a paleta clara. */
html[data-theme="dark"] :where(.cj-menu-main,.cj-menu-group-btn) {
  border-color: #2d4056 !important;
  background: #102a44 !important;
  color: #c7d4e4 !important;
}

html[data-theme="dark"] .cj-menu-subitem {
  border-color: transparent !important;
  background: transparent !important;
  color: #b9c8d9 !important;
}

html[data-theme="dark"] :where(.cj-menu-main.active,.cj-menu-subitem.active) {
  border-color: #2c8b59 !important;
  background: #153a29 !important;
  color: #8deab5 !important;
  box-shadow: inset 3px 0 #27d678 !important;
}

html[data-theme="dark"] .cj-menu-group.has-active .cj-menu-group-btn {
  border-color: #315a46 !important;
  background: #173326 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] .cj-menu-entry-label i {
  border-color: #34485f !important;
  background: #163753 !important;
  color: #dce7f2 !important;
}

html[data-theme="dark"] :where(.cj-menu-main,.cj-menu-group-btn)[data-tone="green"] .cj-menu-entry-label i {
  border-color: #286746 !important;
  background: #153a29 !important;
  color: #72e6a4 !important;
}

html[data-theme="dark"] :where(.cj-menu-main,.cj-menu-group-btn)[data-tone="blue"] .cj-menu-entry-label i {
  border-color: #315b86 !important;
  background: #182f4b !important;
  color: #7bb7ff !important;
}

html[data-theme="dark"] :where(.cj-menu-main,.cj-menu-group-btn)[data-tone="orange"] .cj-menu-entry-label i {
  border-color: #74502f !important;
  background: #38291c !important;
  color: #ffb36f !important;
}

html[data-theme="dark"] :where(.cj-menu-main,.cj-menu-group-btn)[data-tone="teal"] .cj-menu-entry-label i {
  border-color: #2d6966 !important;
  background: #153837 !important;
  color: #74ded8 !important;
}

html[data-theme="dark"] :where(.cj-menu-main,.cj-menu-group-btn)[data-tone="navy"] .cj-menu-entry-label i {
  border-color: #435773 !important;
  background: #1b2a40 !important;
  color: #a8bce0 !important;
}

@media (min-width: 1181px) {
  html[data-theme="dark"] body:not(.cj-sidebar-pinned) .layout > .sidebar:not(:hover):not(:focus-within) .cj-menu-group.has-active .cj-menu-group-btn {
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-theme="dark"] body:not(.cj-sidebar-pinned) .layout > .sidebar:not(:hover):not(:focus-within) .cj-menu-group.has-active .cj-menu-entry-label i,
  html[data-theme="dark"] body:not(.cj-sidebar-pinned) .layout > .sidebar:not(:hover):not(:focus-within) .cj-menu-main.active .cj-menu-entry-label i {
    border-color: #2c8b59 !important;
    background: #153a29 !important;
    color: #8deab5 !important;
    box-shadow: 0 7px 16px rgba(0,0,0,.24) !important;
  }
}

/* Central do Vendedor, ranking, clientes e itens. */
html[data-theme="dark"] :where(
  .seller-workspace-header,.seller-workspace-tabs,.seller-workspace-content,
  .seller-central-loading,.seller-central-empty,.seller-central-kpis article,
  .seller-goal-panel,.seller-goal-grid article,.seller-central-section,
  .seller-central-status-strip > div,.seller-treatment-dialog form,
  .seller-treatment-dialog header,.seller-treatment-dialog footer,
  .itens-filter-panel,.itens-pager,.clientes-summary > div
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .seller-workspace-tabs button {
  border-color: transparent !important;
  background: transparent !important;
  color: #a9bacd !important;
}

html[data-theme="dark"] .seller-workspace-tabs button.active {
  border-color: #315a46 !important;
  background: #153a29 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] :where(
  .seller-workspace-header p,.seller-central-kpis span,.seller-central-kpis small,
  .seller-goal-head small,.seller-goal-foot > span,.seller-central-section-head small,
  .seller-central-table td small,.ranking-note,.clientes-summary span
) { color: #a7b8cb !important; }

html[data-theme="dark"] :where(
  .seller-central-kpis strong,.seller-goal-grid strong,.seller-central-section-head h3,
  .clientes-summary strong
) { color: #edf4fb !important; }

html[data-theme="dark"] :where(.seller-central-table tr.client-clickable:hover td,.ranking-table tr:hover td,.clientes-table tr:hover td,.itens-table tr:hover td) {
  background: #1d3044 !important;
}

/* Cidades e frota. */
html[data-theme="dark"] :where(
  .cidades4-toolbar,.cidades4-summary > div,.cidades4-table-wrap,.cidades4-drill-table-wrap,
  .cidades4-frota-box,.cidades4-modelos-box,.cidades4-modelos-table-wrap,
  .cj-frota-geral-tabs,.cj-fg-header,.cj-fg-cards div,.cj-fg-tipo-card,
  .cj-fg-table-wrap,.cj-fg-modelos-box,.cj-fg-loading,.cj-fg-empty,
  .cj-fg-modelos-modal,.cj-fg-modal-table-wrap
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(.cj-frota-geral-tabs button,.cidades4-marca-chip,.cj-fg-modal-marcas button) {
  border-color: #34485f !important;
  background: #172435 !important;
  color: #b9c8d9 !important;
}

html[data-theme="dark"] :where(.cj-frota-geral-tabs button.active,.cidades4-marca-chip.active,.cj-fg-modal-marcas button.active) {
  border-color: #2c8b59 !important;
  background: #153a29 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] :where(.cidades4-row:hover td,.cidades4-cliente-row:hover td) {
  background: #1d3044 !important;
}

/* Auditoria de precos e Curva ABC. */
html[data-theme="dark"] :where(
  .aud2-pager,.abc-unified-operation,.abc-run-card,.abc-run-card-v2,.abc-run-card-v3,
  .abc-run-card-v4,.abc-run-card-v5,.abc-run-panel-v6,.abc-run-panel-v7,
  .abc-run-meta-v6 span,.abc-run-meta-v7 article,.abc-comp-card,
  .abc-legenda-panel-v7,.abc-legenda-panel-v7 header,.abc-legenda-grid-v7 article
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(
  .abc-run-info-v5 strong,.abc-run-rules-v5 b,.abc-run-main-v6 > strong,
  .abc-run-meta-v6 b,.abc-run-header-v7 strong,.abc-run-meta-v7 span
) { color: #edf4fb !important; }

html[data-theme="dark"] :where(
  .abc-run-info-v5 span,.abc-run-info-v5 small,.abc-run-meta-v6 span,
  .abc-run-header-v7 p,.abc-run-meta-v7 b,.aud2-produto small
) { color: #a7b8cb !important; }

html[data-theme="dark"] :where(.abc-colchooser-btn,.cj-ms-actions button) {
  border-color: #34485f !important;
  background: #1a293c !important;
  color: #c9d6e5 !important;
}

/* Ruptura e Abastecimento: titulos, filtros, tabela, hover e drill-down. */
html[data-theme="dark"] :where(
  .rupture-abc-header,.rupture-abc-cutoff,.rupture-abc-guide,.rupture-abc-axis,
  .rupture-abc-axis > header,.rupture-abc-workbench,.rupture-abc-workbench-head,
  .rupture-funnel-header,.rupture-funnel-breadcrumb,.rupture-funnel-question,
  .rupture-filter-panel,.rupture-check-filter summary,.rupture-check-filter[open] > div,
  .rupture-funnel-section-head,.rupture-abc-pagination
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(
  .rupture-abc-header h2,.rupture-funnel-header h2,.rupture-funnel-question h3,
  .rupture-abc-workbench-head h3,.rupture-check-filter summary
) { color: #edf4fb !important; }

html[data-theme="dark"] :where(
  .rupture-abc-header p,.rupture-abc-cutoff span,.rupture-abc-cutoff small,
  .rupture-abc-guide small,.rupture-abc-axis > header p,.rupture-abc-axis > header small,
  .rupture-funnel-header p,.rupture-funnel-breadcrumb,.rupture-funnel-question p,
  .rupture-filter-search-count,.rupture-global-row td > small,.rupture-global-row td > em,
  .rupture-global-purchase > small,.rupture-global-equivalent > small,
  .rupture-global-purchase > em,.rupture-global-equivalent > em
) { color: #9fb2c8 !important; }

html[data-theme="dark"] .rupture-abc-curve-card:hover,
html[data-theme="dark"] .rupture-abc-table tbody tr:hover td,
html[data-theme="dark"] .rupture-global-row.has-equivalents:hover td {
  background: #203348 !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .rupture-global-row.has-equivalents[aria-expanded="true"] td {
  border-color: #315a46 !important;
  background: #173428 !important;
}

html[data-theme="dark"] :where(.rupture-check-options label:hover,.rupture-abc-curve-card.active) {
  background: #19392b !important;
  color: #dff7e9 !important;
}

html[data-theme="dark"] :where(.rupture-filter-shortcuts button,.rupture-funnel-section-head button,.rupture-abc-pagination button) {
  border-color: #3a5b49 !important;
  background: #173428 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] :where(.rupture-global-purchase.fiscal,.rupture-global-equivalent.review) {
  background: #33281d !important;
}

html[data-theme="dark"] :where(.rupture-global-purchase.arrived,.rupture-global-equivalent.available) {
  background: #153a29 !important;
}

html[data-theme="dark"] .rupture-global-purchase.overdue {
  background: #3b2024 !important;
}

/* Usuarios, Central Tecnica e Central Operacional. */
html[data-theme="dark"] :where(
  .cj-access-metrics,.cj-access-table,.cj-access-icon-btn,.cj-access-state.off,
  .cj-rast-v8 .card,.cj-rast-v8 .section,.cj-memory-meta-item,.cj-memory-icon-btn,
  .cj-tech-nav-icon,.ops-summary-card,.ops-gauge-item,.ops-gauge::before,
  .ops-refresh,.ops-technical-details details,.ops-history-list,
  .admin-ops .admin-docs-list,.admin-ops .admin-doc-view
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .cj-access-metrics > div {
  border-color: var(--cj-dark-line) !important;
}

html[data-theme="dark"] .cj-access-metrics strong {
  color: var(--cj-dark-text) !important;
  -webkit-text-fill-color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .cj-access-metrics span {
  color: var(--cj-dark-muted) !important;
  -webkit-text-fill-color: var(--cj-dark-muted) !important;
}

html[data-theme="dark"] .cj-ms-summary {
  color: var(--cj-dark-text) !important;
  -webkit-text-fill-color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .cj-access-icon-btn:hover {
  border-color: #477099 !important;
  background: #22364d !important;
  color: #86bdff !important;
}

html[data-theme="dark"] :where(.cj-tech-badge,.cj-access-state.on,.ops-badge.ok) {
  border-color: #2c6a48 !important;
  background: #153a29 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] :where(.ops-status-banner,.ops-alert,.ops-badge,.ops-summary-card,.ops-gauge-item) p,
html[data-theme="dark"] :where(.ops-summary-card,.ops-gauge-item) small {
  color: #a7b8cb !important;
}

html[data-theme="dark"] .ops-status-banner.warn,
html[data-theme="dark"] .ops-alert.warn {
  border-color: #70502f !important;
  background: #33281d !important;
}

html[data-theme="dark"] .ops-status-banner.bad,
html[data-theme="dark"] .ops-alert.bad {
  border-color: #6e343a !important;
  background: #3b2024 !important;
}

/* Titulos de cultura e metadados pequenos precisam permanecer legiveis
   inclusive durante a transicao automatica de frases. */
html[data-theme="dark"] .culture-card .culture-copy h2 {
  color: #f0f5fb !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.28);
}

html[data-theme="dark"] .culture-card .culture-copy p,
html[data-theme="dark"] .culture-card .scope-badge :where(span,small) {
  color: #aebed1 !important;
}

html[data-theme="dark"] :where(
  .rupture-abc-table td > small,.rupture-abc-table td > em,
  .rupture-abc-table th,.rupture-filter-shortcuts > span,
  .rupture-global-purchase.empty,.rupture-global-equivalent.empty
) { color: #a7b9cd !important; }

/* Novidades do sistema e dialogos globais. */
html[data-theme="dark"] :where(
  .cj-system-news-dialog,.cj-system-news-dialog-header,.cj-system-news-dialog-footer,
  .cj-system-news-list-region,.cj-system-news-list-item,.cj-system-news-detail,
  .cj-system-news-close,.cj-system-news-secondary
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .cj-system-news-dialog-header {
  background: linear-gradient(125deg,#153526 0%,#172536 54%,#33271d 100%) !important;
}

html[data-theme="dark"] :where(.cj-system-news-dialog-header h2,.cj-system-news-list-title,.cj-system-news-detail-title) {
  color: #edf4fb !important;
}

html[data-theme="dark"] :where(
  .cj-system-news-dialog-header p,.cj-system-news-list-meta,
  .cj-system-news-detail-meta,.cj-system-news-status
) { color: #a7b8cb !important; }

html[data-theme="dark"] :where(.cj-system-news-list-item:hover,.cj-system-news-list-item.active) {
  border-color: #2c8b59 !important;
  background: #153a29 !important;
}

html[data-theme="dark"] :where(
  .ranking-table-wrap,.table-wrap,.clientes-table-wrap,.itens-table-wrap,.aud-table-wrap,
  .aud2-table-scroll,.cidades4-table-wrap,.cj-fg-table-wrap,.cj-access-table-wrap,
  .abc-table-wrap,.abc-table-scroll-v4,.rupture-abc-table-wrap,.rupture-network-table,
  .inventory-efficiency-table-wrap
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface) !important;
}

html[data-theme="dark"] table { color: var(--cj-dark-text); }
html[data-theme="dark"] table :where(th,td) { border-color: var(--cj-dark-line) !important; }
html[data-theme="dark"] table th {
  background: #182536 !important;
  color: #aebed0 !important;
}
html[data-theme="dark"] table td { background: transparent !important; color: #dce5f0; }
html[data-theme="dark"] table tbody tr:nth-child(even) td { background: rgba(255,255,255,.014) !important; }
html[data-theme="dark"] table tbody tr:hover td { background: #1a293b !important; }
html[data-theme="dark"] table tbody tr.selected td { background: #173728 !important; }

html[data-theme="dark"] :where(.btn-secondary,.cj-auth-secondary,.abc-gov-btn,.abc-method-tab,.ops-tab) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: #d5dfeb !important;
}

html[data-theme="dark"] :where(.btn-primary,.cj-auth-primary) {
  box-shadow: 0 8px 22px rgba(16,180,91,.18);
}

html[data-theme="dark"] :where(.badge,.abc-badge,.cidades4-pill,.cj-access-status) {
  border-color: rgba(255,255,255,.1);
}

html[data-theme="dark"] :where(svg text,.chart-label) { fill: #aebed0 !important; color: #aebed0; }
html[data-theme="dark"] :where(.grid-line,svg .domain,svg .tick line) { stroke: #31445a !important; }

/* Multi-selects, filtros, menus suspensos e paginacao */
html[data-theme="dark"] :where(
  .cj-ms-panel,.abc-colchooser-panel,.aud-colunas-panel,.rupture-check-filter[open] > div,
  .rupture-filter-popover-head,.cj-pager,.abc-pager,.supply-pagination
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text);
  box-shadow: 0 18px 44px rgba(0,0,0,.34) !important;
}

html[data-theme="dark"] :where(.cj-ms-option,.rupture-check-options label) { color: #d2ddea; }
html[data-theme="dark"] :where(.cj-ms-option:hover,.rupture-check-options label:hover) { background: #213249; }

/* Ruptura e abastecimento */
html[data-theme="dark"] :where(
  .rupture-funnel-page,.rupture-funnel-queue,.rupture-funnel-filters,.rupture-filter-panel,
  .rupture-owner-card,.rupture-branch-panel,.rupture-investigation-card,.rupture-minimum-card,
  .rupture-equivalent-inline,.rupture-equivalent-analysis,.rupture-equivalent-modal-panel,
  .rupture-equivalent-inline-grid article,.rupture-equivalent-analysis-kpis article,
  .rupture-equivalent-selection-toolbar,.rupture-equivalent-selection-proof,
  .rupture-equivalent-analysis-scroll,.rupture-minimum-kpis article,
  .rupture-minimum-formula,.rupture-minimum-formula-flow article,.rupture-minimum-method
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(
  .rupture-funnel-queue .rupture-abc-toolbar,.rupture-minimum-controls,
  .rupture-equivalent-modal-panel > header,.rupture-equivalent-analysis > header,
  .rupture-equivalent-card-choice,.rupture-funnel-section-head
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
}

html[data-theme="dark"] :where(
  .rupture-equivalent-inline-grid article > div > strong,
  .rupture-equivalent-inline-grid article footer b,
  .rupture-equivalent-last-entry > strong,
  .rupture-equivalent-analysis-kpis strong,
  .rupture-equivalent-analysis-tables h6,
  .rupture-equivalent-modal-panel > header h3,
  .rupture-minimum-formula > header h4,
  .rupture-minimum-formula-flow article strong
) { color: var(--cj-dark-text) !important; }

html[data-theme="dark"] :where(
  .rupture-equivalent-inline-grid article > p,.rupture-equivalent-inline-note,
  .rupture-equivalent-last-entry > small,.rupture-equivalent-analysis-note,
  .rupture-equivalent-analysis-kpis small,.rupture-equivalent-modal-panel > header p,
  .rupture-minimum-formula > header small,.rupture-minimum-formula-flow article small
) { color: var(--cj-dark-muted) !important; }

html[data-theme="dark"] .rupture-equivalent-inline-grid article.selected,
html[data-theme="dark"] .rupture-equivalent-inline-grid article.chosen {
  border-color: #2c8b59 !important;
  background: #132e23 !important;
}

html[data-theme="dark"] .rupture-equivalent-inline-grid article.chosen .rupture-equivalent-card-choice,
html[data-theme="dark"] .rupture-equivalent-analysis-action,
html[data-theme="dark"] .rupture-minimum-conclusion.state-igual,
html[data-theme="dark"] .rupture-minimum-formula-flow article.result {
  border-color: #277e50 !important;
  background: var(--cj-dark-green-soft) !important;
  color: #a9f2c7 !important;
}

html[data-theme="dark"] :where(.rupture-equivalent-unit-warning,.rupture-equivalent-analysis.attention > header) {
  border-color: #8d672f !important;
  background: var(--cj-dark-orange-soft) !important;
  color: #ffd29a !important;
}

html[data-theme="dark"] .rupture-equivalent-modal-backdrop { background: rgba(3,7,12,.78); }
html[data-theme="dark"] .rupture-global-row td { background: rgba(16,180,91,.025) !important; }

/* Curva ABC, Auditoria e operacao */
html[data-theme="dark"] :where(
  .abc-filters,.abc-product-filters,.abc-governanca,.abc-gov-form,.abc-gov-job,
  .abc-resumo-box,.abc-comp-card,.abc-strategy-card,.abc-status-drill-panel,
  .aud-filters,.aud2-filters,.aud-note,.ops-toolbar,.ops-summary,.ops-section,
  .inventory-efficiency-toolbar,.inventory-efficiency-card,.inventory-efficiency-block
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(.abc-gov-progress-overlay,.abc-legenda-overlay-v7) { background: rgba(3,7,12,.78); }
html[data-theme="dark"] :where(.abc-gov-progress-panel,.abc-legenda-panel-v7,.abc-gov-confirm-panel) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface) !important;
  color: var(--cj-dark-text) !important;
}

/* Autenticacao, conta e usuarios */
html[data-theme="dark"] :where(.cj-auth-entry,.cj-auth-account-panel,.cj-access-drawer,.cj-user-editor) {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface);
  color: var(--cj-dark-text);
  box-shadow: 0 24px 64px rgba(0,0,0,.48);
}

html[data-theme="dark"] .cj-auth-account-panel { box-shadow: 0 22px 56px rgba(0,0,0,.48); }
html[data-theme="dark"] .cj-auth-account-identity :where(span,small) { color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-auth-theme-picker { border-color: var(--cj-dark-line); }
html[data-theme="dark"] .cj-auth-theme-picker > span { color: #c9d6e5; }
html[data-theme="dark"] .cj-auth-account-panel .cj-auth-theme-picker button {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface-2);
  color: #c7d4e4;
}
html[data-theme="dark"] .cj-auth-account-panel .cj-auth-theme-picker button:hover,
html[data-theme="dark"] .cj-auth-account-panel .cj-auth-theme-picker button.active {
  border-color: #35ad6b;
  background: var(--cj-dark-green-soft);
  color: #83e9ad;
}
html[data-theme="dark"] .cj-auth-account-panel .cj-auth-account-logout {
  border-color: #6e343a;
  background: #2b1b20;
  color: #ff9098;
}

html[data-theme="dark"] :where(.cj-access-hero,.cj-access-tabs,.cj-access-preview,.cj-access-note) {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface-2);
}

html[data-theme="dark"] :where(.cj-network-mode-grid label,.cj-network-allowlist) {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface-2);
}
html[data-theme="dark"] .cj-network-allowlist textarea {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface);
  color: var(--cj-dark-text);
  -webkit-text-fill-color: var(--cj-dark-text);
}
html[data-theme="dark"] :where(.cj-network-mode-grid strong,.cj-network-current strong) { color: var(--cj-dark-text); }
html[data-theme="dark"] :where(.cj-network-mode-grid small,.cj-network-current,.cj-network-allowlist > small) { color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-network-friction-note {
  border-color: #2c6a48;
  background: var(--cj-dark-green-soft);
  color: #a8cbb7;
}
html[data-theme="dark"] .cj-access-network-state {
  border-color: #70502f;
  background: #33281d;
  color: #ffc17a !important;
}
html[data-theme="dark"] .cj-user-decision-map {
  border-color: var(--cj-dark-line);
  background: rgba(11, 31, 49, .96);
}
html[data-theme="dark"] .cj-user-decision-map a { border-color: var(--cj-dark-line); color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-user-decision-map a:hover,
html[data-theme="dark"] .cj-user-decision-map a:focus-visible { background: var(--cj-dark-blue-soft); color: #70b7ff; }
html[data-theme="dark"] :where(.cj-role-example,.cj-planned-roles,.cj-planned-roles > small,.cj-scope-select small,.cj-scope-callout span,.cj-mfa-roadmap small) { color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-user-access-column { border-color: var(--cj-dark-line); background: var(--cj-dark-surface-2); }
html[data-theme="dark"] .cj-user-access-column-head { border-color: var(--cj-dark-line); background: #102c47; }
html[data-theme="dark"] .cj-user-access-column-head strong { color: var(--cj-dark-text); }
html[data-theme="dark"] .cj-user-access-column-head small { color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-user-editor label > span,
html[data-theme="dark"] .cj-permission-copy strong { color: var(--cj-dark-text) !important; }
html[data-theme="dark"] :where(.cj-permission-copy small,.cj-permission-origin) { color: var(--cj-dark-muted); }
html[data-theme="dark"] :where(.cj-permission-item.is-allow,.cj-permission-item.is-deny) .cj-permission-origin { color: #ffc17a; }
html[data-theme="dark"] .cj-permission-new-tool-rule { border-color: #355b84; background: var(--cj-dark-blue-soft); }
html[data-theme="dark"] .cj-permission-new-tool-rule strong { color: #9fcaff; }
html[data-theme="dark"] .cj-permission-new-tool-rule span { color: var(--cj-dark-muted); }
html[data-theme="dark"] :where(.cj-scope-select,.cj-access-preview-grid article,.cj-mfa-roadmap) {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface);
  color: var(--cj-dark-text);
}
html[data-theme="dark"] :where(.cj-all-branches-choice,.cj-branch-selection,.cj-permission-folder) {
  border-color: var(--cj-dark-line);
  background: var(--cj-dark-surface);
  color: var(--cj-dark-text);
}
html[data-theme="dark"] :where(.cj-all-branches-choice strong,.cj-branch-selection > strong,.cj-permission-folder summary strong) { color: var(--cj-dark-text); }
html[data-theme="dark"] :where(.cj-all-branches-choice small,.cj-permission-folder summary small) { color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-permission-folder .cj-permission-list { border-color: var(--cj-dark-line); background: var(--cj-dark-surface-2); }
html[data-theme="dark"] :where(.cj-folder-icon,.cj-permission-folder summary > b) { background: #1a3853; color: #b8c9da; }
html[data-theme="dark"] .cj-permission-folder.has-active summary > b { background: var(--cj-dark-green-soft); color: #83e9ad; }
html[data-theme="dark"] .cj-permission-folder.has-custom { border-color: #8f642e; }
html[data-theme="dark"] .cj-permission-folder.has-custom summary > b { background: #33281d; color: #ffc17a; }
html[data-theme="dark"] .cj-permission-result { background: var(--cj-dark-green-soft); color: #83e9ad; }
html[data-theme="dark"] .cj-permission-item.is-blocked .cj-permission-result { background: #3b2024; color: #ff969c; }
html[data-theme="dark"] .cj-permission-modes span { border-color: var(--cj-dark-line) !important; background: var(--cj-dark-surface) !important; color: var(--cj-dark-muted) !important; }
html[data-theme="dark"] .cj-permission-item.is-effective .cj-permission-allow span { border-color: #2f8b5a !important; background: var(--cj-dark-green-soft) !important; color: #83e9ad !important; }
html[data-theme="dark"] .cj-permission-item.is-blocked .cj-permission-deny span { border-color: #7e3b40 !important; background: #3b2024 !important; color: #ff969c !important; }
html[data-theme="dark"] .cj-permission-restore { color: #70b7ff; }
html[data-theme="dark"] :where(.cj-role-example,.cj-scope-callout) {
  border-color: #355b84;
  background: var(--cj-dark-blue-soft);
}
html[data-theme="dark"] .cj-planned-roles > strong { color: var(--cj-dark-text); }
html[data-theme="dark"] .cj-planned-roles > span { border-color: var(--cj-dark-line); background: var(--cj-dark-surface-2); color: #b8c9da; }
html[data-theme="dark"] .cj-scope-callout strong { color: #70b7ff; }
html[data-theme="dark"] .cj-access-preserved {
  background: var(--cj-dark-green-soft);
  color: #a8cbb7;
}
html[data-theme="dark"] .cj-access-preserved strong { color: #83e9ad; }
html[data-theme="dark"] :where(.cj-mfa-roadmap strong,.cj-access-preview-grid strong) { color: var(--cj-dark-text); }

/* Editor de usuarios — opcao 1 */
html[data-theme="dark"] .cj-access-drawer-head,
html[data-theme="dark"] .cj-user-quick-summary,
html[data-theme="dark"] .cj-user-actions {
  border-color: var(--cj-dark-line);
  background: rgba(11,31,49,.98);
  color: var(--cj-dark-text);
}
html[data-theme="dark"] :where(.cj-access-drawer-head strong,.cj-access-drawer-head button,.cj-user-quick-summary strong,.cj-user-access-title h3,.cj-access-module-main strong) { color: var(--cj-dark-text); }
html[data-theme="dark"] :where(.cj-user-quick-summary article > span,.cj-user-access-title p,.cj-access-module-main small,.cj-access-module-main b,.cj-permission-origin) { color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-user-quick-summary article { border-color: var(--cj-dark-line); }
html[data-theme="dark"] .cj-user-quick-summary .cj-home-summary { background: #102c47; }
html[data-theme="dark"] .cj-user-quick-summary button { border-color: var(--cj-dark-line); background: var(--cj-dark-surface-2); color: #70b7ff; }
html[data-theme="dark"] .cj-home-choice { border-color: var(--cj-dark-line); background: var(--cj-dark-surface); }
html[data-theme="dark"] .cj-home-choice strong,
html[data-theme="dark"] .cj-communication-group-grid strong { color: var(--cj-dark-text); }
html[data-theme="dark"] .cj-home-choice small,
html[data-theme="dark"] .cj-communication-group-grid small,
html[data-theme="dark"] :where(.cj-experience-note,.cj-feature-roadmap) { color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-home-choice:has(input:checked) { border-color: #35b978; background: var(--cj-dark-green-soft); }
html[data-theme="dark"] .cj-communication-group-grid label { border-color: #77484b; background: #33252c; }
html[data-theme="dark"] .cj-communication-group-grid label:has(input:checked) { border-color: #34765a; background: var(--cj-dark-green-soft); }
html[data-theme="dark"] .cj-user-profile-config { border-color: var(--cj-dark-line); background: var(--cj-dark-surface-2); }
html[data-theme="dark"] .cj-user-profile-config > summary { border-color: var(--cj-dark-line); }
html[data-theme="dark"] .cj-user-profile-config > summary strong { color: var(--cj-dark-text); }
html[data-theme="dark"] .cj-user-profile-config > summary small { color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-user-profile-config > summary b { background: var(--cj-dark-blue-soft); color: #70b7ff; }
html[data-theme="dark"] .cj-user-profile-config[open] > summary { background: #102c47; }
html[data-theme="dark"] .cj-access-module-card { border-color: var(--cj-dark-line); background: var(--cj-dark-surface); box-shadow: none; }
html[data-theme="dark"] .cj-access-module-card.is-open { border-color: #426989; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
html[data-theme="dark"] .cj-access-module-body { border-color: var(--cj-dark-line); background: var(--cj-dark-surface-2); }
html[data-theme="dark"] .cj-permission-item { border-color: var(--cj-dark-line); }
html[data-theme="dark"] .cj-permission-result,
html[data-theme="dark"] .cj-permission-item.is-blocked .cj-permission-result { background: transparent; color: #ff969c; }
html[data-theme="dark"] .cj-permission-item.is-effective .cj-permission-result { background: transparent; color: #83e9ad; }
html[data-theme="dark"] .cj-new-tool-note { background: var(--cj-dark-blue-soft); color: var(--cj-dark-muted); }
html[data-theme="dark"] .cj-new-tool-note strong { color: #9fcaff; }

/* Novidades do sistema */
html[data-theme="dark"] :where(
  .cj-system-news-panel,.cj-system-news-card,.cj-system-news-empty,.cj-system-news-detail
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .cj-system-news-layer { background: rgba(3,7,12,.76); }

/* Central Tecnica injeta parte do CSS via JavaScript; esta especificidade
   preserva a leitura sem alterar o contrato operacional. */
html[data-theme="dark"] .cj-rast-v8 :where(
  .cj-tech-search-box,.cj-memory-search,.cj-memory-document,.cj-memory-toc,
  .cj-tech-project-list,.cj-tech-project-detail,.cj-tech-summary-item,
  .cj-tech-token-grid > *,pre,code
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] a { color: #72b5ff; }
html[data-theme="dark"] hr { border-color: var(--cj-dark-line); }

/* Fechamento da cascata escura.
   Estas regras ficam deliberadamente no fim do arquivo para impedir que
   estados claros legados reaparecam em hover, selecao ou expansao. */
html[data-theme="dark"] table thead {
  background: #182536 !important;
  color: #aebed0 !important;
}

html[data-theme="dark"] table tbody tr:hover,
html[data-theme="dark"] table tbody tr:hover > td {
  background: #1c2d40 !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] :where(
  .rupture-global-row:hover,
  .rupture-global-row.has-equivalents:hover,
  .rupture-abc-table tbody tr:hover
) {
  background: #203348 !important;
}

html[data-theme="dark"] :where(
  .rupture-global-row:hover > td,
  .rupture-global-row.has-equivalents:hover > td,
  .rupture-abc-table tbody tr:hover > td
) {
  border-color: #3a5068 !important;
  background: #203348 !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] :where(
  .rupture-global-row:hover > td *,
  .rupture-global-row.has-equivalents:hover > td *,
  .rupture-abc-table tbody tr:hover > td *
) {
  color: inherit;
}

html[data-theme="dark"] .rupture-global-row.has-equivalents[aria-expanded="true"],
html[data-theme="dark"] .rupture-global-row.has-equivalents[aria-expanded="true"] > td {
  border-color: #315a46 !important;
  background: #173428 !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] :where(
  .seller-analysis-periods article.ownership,
  .seller-analysis-periods article.history,
  .commercial-analysis-note.ownership,
  .commercial-analysis-note.history,
  .ops-update-band
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(.tm-badge.ok,.ops-badge.ok) {
  border-color: #2c6a48 !important;
  background: #153a29 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] :where(.tm-badge.warn,.ops-badge.warn) {
  border-color: #70502f !important;
  background: #33281d !important;
  color: #ffd29a !important;
}

html[data-theme="dark"] :where(.tm-badge.danger,.ops-badge.bad) {
  border-color: #6e343a !important;
  background: #3b2024 !important;
  color: #ff9ea4 !important;
}

html[data-theme="dark"] .cj-identity-flow {
  opacity: .2 !important;
  filter: brightness(.58) saturate(1.18) contrast(1.08);
}

html[data-theme="dark"] .commercial-analysis-windows article {
  border-color: #35506d !important;
  border-left-color: #4d94df !important;
  background: #172536 !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .commercial-analysis-windows article.history {
  border-color: #315a46 !important;
  border-left-color: #25b96a !important;
  background: #153126 !important;
}

html[data-theme="dark"] .commercial-analysis-windows :where(span,small) {
  color: #a7b9cd !important;
}

html[data-theme="dark"] .commercial-analysis-windows strong {
  color: #edf4fb !important;
}

html[data-theme="dark"] #clientes-atualizar {
  border: 1px solid #2c8b59 !important;
  background: #147b44 !important;
  color: #f2fff7 !important;
}

html[data-theme="dark"] :where(.abc-methods,.abc-loading) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: #a7b9cd !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .cj-rast-v8 :where(.cj-tech-title,h1,h2,h3,h4) {
  color: #edf4fb !important;
}

html[data-theme="dark"] .ops-gauge {
  background: conic-gradient(var(--ops-color) calc(var(--ops-value) * 1%), #294a68 0) !important;
}

html[data-theme="dark"] .ops-gauge::before {
  background: #102a44 !important;
}

html[data-theme="dark"] .ops-gauge :where(strong,span) {
  color: #dfe8f3 !important;
}

html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table tr:not(.rupture-equivalent-detail-row):not(.rupture-brand-group),
html[data-theme="dark"] .rupture-branch-table tr {
  border-color: #31465e !important;
  background: #0b2238 !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.16) !important;
}

html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table tr:not(.rupture-equivalent-detail-row):not(.rupture-brand-group) > td,
html[data-theme="dark"] .rupture-branch-table tr > td {
  border-color: #294a68 !important;
  background: #0b2238 !important;
  color: #dce7f3 !important;
}

html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table tr:nth-child(even):not(.rupture-equivalent-detail-row):not(.rupture-brand-group) > td {
  background: #162335 !important;
}

html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table tr:not(.rupture-equivalent-detail-row):not(.rupture-brand-group) > td::before,
html[data-theme="dark"] .rupture-branch-table tr > td::before {
  color: #8fa6bf !important;
}

html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table .rupture-global-row:hover > td,
html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table .rupture-global-row.has-equivalents:hover > td {
  border-color: #3a5068 !important;
  background: #203348 !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] .rupture-product-identifiers span {
  border-color: #3b526c !important;
  background: #203146 !important;
  color: #c8d7e8 !important;
}

html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table tr.rupture-global-row:has(> td:hover) {
  border-color: #3a6b54 !important;
  background: #203348 !important;
  box-shadow: inset 3px 0 #20d271, 0 8px 22px rgba(0,0,0,.2) !important;
}

html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table tr.rupture-global-row:has(> td:hover) > td {
  border-color: #3a5068 !important;
  background: #203348 !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table tr.rupture-global-row:nth-child(even):has(> td:hover) > td,
html[data-theme="dark"] .rupture-funnel-queue .rupture-abc-table tr.rupture-global-row:nth-child(odd):has(> td:hover) > td {
  border-color: #3a5068 !important;
  background: #203348 !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] :where(.cidades4-pill,.cidades4-frota-btn) {
  border-color: #2c6a48 !important;
  background: #153a29 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] .cidades4-frota-btn:hover {
  border-color: #36a96b !important;
  background: #1b4932 !important;
  color: #a9f2c7 !important;
}

html[data-theme="dark"] :where(.cidades4-bar,.mini-progress) {
  background: #294a68 !important;
}

/* HML11 - fechamento de consistencia visual em componentes legados.
   O tema usa superficies escuras reais, preserva cores semanticas e impede
   que expansoes, linhas internas e textos fixos retornem para a paleta clara. */

/* Dashboard: a legenda por filial deve seguir o mesmo contrato da executiva. */
html[data-theme="dark"] .sales-branch-legend .legend-item {
  border-color: #34485f !important;
  background: #172435 !important;
  color: #c5d2e1 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
}

html[data-theme="dark"] :where(
  .sales-branch-column-label,
  .sales-branch-column-label.current,
  .sales-branch-column-label.comparison,
  .sales-branch-column-label.target,
  .sales-branch-column-label.monthly,
  .sales-branch-column-label.projection
) {
  border-color: #34485f !important;
  background: #172435 !important;
  color: #d9e4f0 !important;
}

/* Ranking, clientes, cidades e itens: superfícies de drill-down. */
html[data-theme="dark"] :where(
  .drill-row > td,.client-items-row > td,
  .cidades4-drill-row > td,.cidades4-itens-row > td
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(
  .drill-box,.client-items-box,.cidades4-drill,.cidades4-itens-content,
  .drill-table,.client-item-table,.cidades4-drill-table,.cidades4-itens-table
) {
  border-color: var(--cj-dark-line) !important;
  background: linear-gradient(135deg,#102a44,#0b2238) !important;
  color: var(--cj-dark-text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] :where(
  .drill-table td,.client-item-table td,
  .cidades4-drill-table td,.cidades4-itens-table td
) {
  border-color: var(--cj-dark-line) !important;
  background: #0b2238 !important;
  color: #dce5f0 !important;
}

html[data-theme="dark"] :where(
  .drill-table tbody tr:nth-child(even) td,
  .client-item-table tbody tr:nth-child(even) td,
  .cidades4-drill-table tbody tr:nth-child(even) td,
  .cidades4-itens-table tbody tr:nth-child(even) td
) {
  background: #162335 !important;
}

html[data-theme="dark"] :where(
  .drill-header strong,.client-items-title strong,.client-items-summary strong,
  .cidades4-drill-title,.cidades4-drill-title strong,
  .produto-cell strong,.produto-cell .produto-desc,.produto-desc,
  .marca-cell strong,.drill-itens-table td:nth-child(3) strong,
  .client-item-table td:nth-child(4) strong
) {
  color: #edf4fb !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .drill-header span,.client-items-title span,.client-items-summary span,
  .drill-table small,.client-item-table small,.cidades4-itens-table td small,
  .produto-cell small,.produto-meta,.produto-meta span,.marca-cell small,
  .cidades4-footer
) {
  color: #9fb2c8 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .client-items-summary div {
  border-color: var(--cj-dark-line) !important;
  background: #1a2839 !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(.drill-help,.drill-btn.secondary) {
  border-color: #34485f !important;
  background: #1b2a3c !important;
  color: #c7d4e4 !important;
}

html[data-theme="dark"] :where(
  .ranking-table,.clientes-table,.itens-table,
  .drill-table,.client-item-table,.cidades4-table,
  .cidades4-drill-table,.cidades4-itens-table
) :where(th,td) {
  border-color: var(--cj-dark-line) !important;
}

/* Curva ABC: configuração, resumos e grade oficial compartilham tokens. */
html[data-theme="dark"] :where(
  .abc-info-card,.abc-param-card,.abc-param-card-v5,.abc-legend-card,
  .abc-legend-card-v5,.abc-percent-grid > div,.abc-percent-grid-v5 > div,
  .abc-legend-grid > div,.abc-legend-grid-v5 > div,.abc-box-help,
  .abc-table-title,.abc-pager,.abc-table-wrap,.abc-mini-table-scroll,
  .abc-resumo-box,.abc-analysis-section,.abc-table-scroll-v4
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] :where(
  .abc-info-card strong,.abc-param-title strong,.abc-percent-grid b,
  .abc-percent-grid-v5 b,.abc-legend-card h3,.abc-legend-card-v5 h3,
  .abc-legend-grid b,.abc-legend-grid-v5 b,.abc-table-title strong,
  .abc-resumo-box h3,.abc-products-table-v4 .abc-prod-main-cell strong
) {
  color: #edf4fb !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .abc-info-card span,.abc-info-card small,.abc-param-title span,
  .abc-param-grid label,.abc-percent-grid small,.abc-percent-grid-v5 small,
  .abc-legend-grid span,.abc-legend-grid-v5 span,.abc-legend-card p,
  .abc-box-help,.abc-table-title small,.abc-products-table-v4 .abc-prod-main-cell small
) {
  color: #9fb2c8 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .abc-param-grid input,.abc-param-button,.abc-pager input,.abc-pager button
) {
  border-color: #3a4d64 !important;
  background: #1a2839 !important;
  color: #dce7f3 !important;
}

html[data-theme="dark"] .abc-products-table-v4 :where(
  td[data-col="produto"],td[data-col="marca"],td[data-col="grupo"],
  td[data-col="subgrupo"],td[data-col="custo"],td[data-col="valor_estoque"]
) {
  color: #e7eef7 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .abc-products-table-v4 :where(
  td[data-col="custo"],td[data-col="valor_estoque"]
) {
  font-weight: 800 !important;
}

html[data-theme="dark"] .abc-products-table-v4 tbody tr:hover > td {
  background: #203348 !important;
  color: #f3f7fc !important;
}

@media (max-width: 760px) {
  .cj-auth-account-panel { right: 12px; top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] *,
  html[data-theme="light"] * { scroll-behavior: auto !important; }
}

/* HML12 - governanca e configuracao oficial da Curva ABC. */
html[data-theme="dark"] .abc-gov-shell {
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(
  .abc-gov-header,.abc-gov-active,.abc-gov-job-wrap,.abc-gov-form,
  .abc-gov-history,.abc-gov-readonly,.abc-gov-load-error,
  .abc-gov-audit-line,.abc-gov-active-note,.abc-gov-job-wrap > header,
  .abc-gov-parameter-section,.abc-gov-percent-fieldset,
  .abc-gov-form-grid > label,.abc-gov-advanced-grid > article,
  .abc-gov-advanced-grid > label,.abc-gov-derived-details,
  .abc-gov-derived,.abc-gov-derived > div,.abc-gov-concepts > article,
  .abc-gov-preview-result,.abc-gov-history-item,
  .abc-gov-confirm-summary,.abc-gov-confirm-summary > div
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .abc-unified-operation .abc-gov-form {
  border-color: var(--cj-dark-line) !important;
  background: linear-gradient(180deg,#102a44 0,#0b2238 180px) !important;
}

html[data-theme="dark"] :where(
  .abc-gov-header h2,.abc-gov-form-intro strong,
  .abc-gov-active-grid strong,.abc-gov-source strong,
  .abc-gov-active-note strong,.abc-gov-job strong,
  .abc-gov-job > b,.abc-gov-parameter-section > header strong,
  .abc-gov-form .abc-gov-curve-label b,
  .abc-gov-derived strong,.abc-gov-concepts b,
  .abc-gov-history-item strong,.abc-gov-confirm-summary strong
) {
  color: #edf4fb !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .abc-gov-header p,.abc-gov-form-intro p,.abc-gov-audit-line small,
  .abc-gov-active-grid span,.abc-gov-active-grid small,
  .abc-gov-source small,.abc-gov-active-percent > span,
  .abc-gov-active-note span,.abc-gov-job-wrap > header small,
  .abc-gov-job span,.abc-gov-job small,.abc-gov-form label > span,
  .abc-gov-form label > small,.abc-gov-percent-fieldset legend,
  .abc-gov-parameter-section > header small,
  .abc-gov-form .abc-gov-curve-label small,
  .abc-gov-derived span,.abc-gov-derived small,
  .abc-gov-concepts span,.abc-gov-preview-result span,
  .abc-gov-preview-result small,.abc-gov-history-item small,
  .abc-gov-history-item p,.abc-gov-confirm-summary span,
  .abc-gov-confirm-summary small
) {
  color: #9fb2c8 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .abc-gov-form input,.abc-gov-form textarea,
  .abc-gov-form-unified.is-readonly input:disabled,
  .abc-gov-input-suffix em
) {
  border-color: #3a4d64 !important;
  background: #0b2238 !important;
  color: #e8eef7 !important;
  -webkit-text-fill-color: #e8eef7 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .abc-gov-progress {
  background: #294a68 !important;
}

html[data-theme="dark"] :where(.abc-gov-policy,.abc-gov-manual-badge,.abc-legenda-btn-v7) {
  border-color: #3a5d83 !important;
  background: #182f4b !important;
  color: #8ec3ff !important;
}

html[data-theme="dark"] .abc-gov-percent-inputs > label {
  border-color: #3a4d64 !important;
  background: #1a2839 !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] .abc-gov-percent-inputs .abc-gov-p-a {
  border-color: #2f7952 !important;
  background: #153a29 !important;
}

html[data-theme="dark"] .abc-gov-percent-inputs .abc-gov-p-b {
  border-color: #315b86 !important;
  background: #182f4b !important;
}

html[data-theme="dark"] .abc-gov-percent-inputs .abc-gov-p-c {
  border-color: #74502f !important;
  background: #38291c !important;
}

html[data-theme="dark"] :where(
  .abc-gov-percent-inputs .abc-gov-p-d,
  .abc-gov-percent-inputs .abc-gov-p-e
) {
  border-color: #4a5367 !important;
  background: #232a3a !important;
}

html[data-theme="dark"] :where(
  .abc-gov-percent,.abc-gov-percent-sum,
  .abc-gov-derived-details > summary
) {
  border-color: #3a4d64 !important;
  background: #1a2839 !important;
  color: #dce7f3 !important;
}

html[data-theme="dark"] .abc-gov-percent-sum.is-ok {
  border-color: #2f7952 !important;
  background: #153a29 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] .abc-gov-percent-sum.is-error {
  border-color: #71383e !important;
  background: #3b2024 !important;
  color: #ff9ea4 !important;
}

html[data-theme="dark"] .abc-gov-derived .abc-gov-current-excluded,
html[data-theme="dark"] :where(.abc-run-stock-lag,.abc-gov-stock-lag-note) {
  border-color: #70502f !important;
  background: #33281d !important;
  color: #ffd29a !important;
}

html[data-theme="dark"] .abc-gov-derived .abc-gov-current-excluded strong {
  color: #ffbf78 !important;
}

html[data-theme="dark"] .abc-gov-concepts .abc-gov-no-channel {
  border-color: #70502f !important;
  background: #33281d !important;
}

html[data-theme="dark"] .abc-gov-concepts .abc-gov-no-channel b {
  color: #ffd29a !important;
}

html[data-theme="dark"] .abc-gov-xyz-ranges span {
  border-color: #3a4d64 !important;
  background: #1a2839 !important;
  color: #c8d6e6 !important;
}

html[data-theme="dark"] .abc-gov-xyz-ranges .is-x {
  border-color: #2f7952 !important;
  background: #153a29 !important;
  color: #8deab5 !important;
}

html[data-theme="dark"] .abc-gov-xyz-ranges .is-y {
  border-color: #70502f !important;
  background: #33281d !important;
  color: #ffd29a !important;
}

html[data-theme="dark"] .abc-gov-xyz-ranges .is-z {
  border-color: #71383e !important;
  background: #3b2024 !important;
  color: #ff9ea4 !important;
}

/* HML13 - contraste final das explicacoes da governanca ABC/XYZ */
html[data-theme="dark"] .abc-gov-advanced-grid article strong {
  color: #edf4fb !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .abc-gov-advanced-grid article span,
  .abc-gov-advanced-grid article small,
  .abc-gov-advanced-grid label > span,
  .abc-gov-advanced-grid label > small
) {
  color: #9fb2c8 !important;
  opacity: 1 !important;
}

/* HML14 - estados abertos e leitura hierarquica sem retorno à paleta clara. */
html[data-theme="dark"] .ranking-table tbody tr.rank-clickable.row-open > td,
html[data-theme="dark"] .ranking-table tbody tr.rank-clickable:hover > td,
html[data-theme="dark"] .drill-table tbody tr.client-clickable.client-open > td,
html[data-theme="dark"] .drill-table tbody tr.client-clickable:hover > td,
html[data-theme="dark"] .clientes-table tbody tr.client-clickable.client-open > td,
html[data-theme="dark"] .clientes-table tbody tr.client-clickable:hover > td,
html[data-theme="dark"] .cidades4-table tbody tr.cidades4-clickable.row-open > td,
html[data-theme="dark"] .cidades4-table tbody tr.cidades4-clickable:hover > td {
  border-color: #3a4d64 !important;
  background: #203348 !important;
  color: #f1f6fc !important;
  -webkit-text-fill-color: #f1f6fc !important;
}

html[data-theme="dark"] .ranking-table tbody tr.rank-clickable.row-open .drill-hint,
html[data-theme="dark"] .drill-table tbody tr.client-clickable.client-open small,
html[data-theme="dark"] .clientes-table tbody tr.client-clickable.client-open small {
  color: #62dda0 !important;
  -webkit-text-fill-color: #62dda0 !important;
}

html[data-theme="dark"] .produto-cell .produto-desc,
html[data-theme="dark"] .drill-itens-table .produto-cell .produto-desc,
html[data-theme="dark"] .client-item-table .produto-cell .produto-desc,
html[data-theme="dark"] .itens-table .produto-cell .produto-desc,
html[data-theme="dark"] .cidades4-itens-table .produto-cell .produto-desc {
  color: #f0f5fb !important;
  -webkit-text-fill-color: #f0f5fb !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .produto-cell .produto-meta,
html[data-theme="dark"] .produto-cell .produto-meta span,
html[data-theme="dark"] .cidades4-itens-table .produto-meta,
html[data-theme="dark"] .cidades4-itens-table .produto-meta span {
  color: #aebed0 !important;
  -webkit-text-fill-color: #aebed0 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .tp-badge.ven {
  border: 1px solid #2f7952 !important;
  background: #153a29 !important;
  color: #79e7aa !important;
  -webkit-text-fill-color: #79e7aa !important;
}

html[data-theme="dark"] .tp-badge.dev {
  border: 1px solid #71383e !important;
  background: #3b2024 !important;
  color: #ff9ea4 !important;
  -webkit-text-fill-color: #ff9ea4 !important;
}

/* Curva ABC: cabeçalhos e linhas interativas permanecem na mesma superfície. */
html[data-theme="dark"] .abc-analysis-section .abc-mini-table-v6 thead th,
html[data-theme="dark"] .abc-analysis-section .abc-mini-table-v6 thead th:first-child {
  border-color: #3a4d64 !important;
  background: #1d2b3e !important;
  color: #b9d6f5 !important;
  -webkit-text-fill-color: #b9d6f5 !important;
}

html[data-theme="dark"] .abc-analysis-section .abc-mini-table-v6 tbody tr.abc-click-row:hover > td,
html[data-theme="dark"] .abc-analysis-section .abc-mini-table-v6 tbody tr.abc-click-row.active-analysis-row > td {
  border-color: #3a4d64 !important;
  background: #203348 !important;
  color: #f1f6fc !important;
  -webkit-text-fill-color: #f1f6fc !important;
}

html[data-theme="dark"] .abc-analysis-section.status > header strong,
html[data-theme="dark"] .abc-analysis-section.status .abc-status-overview-row td,
html[data-theme="dark"] .abc-analysis-section.status .abc-status-overview-row .abc-badge {
  color: #edf4fb !important;
  -webkit-text-fill-color: #edf4fb !important;
  opacity: 1 !important;
}

/* Ruptura: referência e classificação não dependem de hover. */
html[data-theme="dark"] .rupture-global-row .rupture-product-identifiers b,
html[data-theme="dark"] .rupture-global-row .rupture-product-identifiers span,
html[data-theme="dark"] .rupture-product-identifiers b,
html[data-theme="dark"] .rupture-product-identifiers span {
  color: #b9c9db !important;
  -webkit-text-fill-color: #b9c9db !important;
  opacity: 1 !important;
}

/* Central Técnica e Memória Mestra usam superfícies escuras também no hover. */
html[data-theme="dark"] .cj-rast-v8 .cj-tech-nav-row,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-nav-row:hover,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-project-button,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-project-button:hover,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-project-button.active {
  border-color: #34485f !important;
  background: #172435 !important;
  color: #edf4fb !important;
  -webkit-text-fill-color: #edf4fb !important;
}

html[data-theme="dark"] .cj-rast-v8 .cj-tech-nav-copy strong,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-section-head h2,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-title,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-body,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-body h1,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-body h2,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-body h3,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-body h4 {
  color: #edf4fb !important;
  -webkit-text-fill-color: #edf4fb !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .cj-rast-v8 .cj-tech-nav-copy span,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-subtitle,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-section-head p,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-body p,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-body li {
  color: #aebed0 !important;
  -webkit-text-fill-color: #aebed0 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .cj-rast-v8 .cj-memory-document,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-toc,
html[data-theme="dark"] .cj-rast-v8 .cj-memory-meta-item,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-token,
html[data-theme="dark"] .cj-rast-v8 .cj-tech-search-box {
  border-color: #34485f !important;
  background: #172435 !important;
  color: #edf4fb !important;
  box-shadow: none !important;
}

/* HML15: o elemento da linha expandida tambem conserva a superficie escura. */
html[data-theme="dark"] .ranking-table tbody tr.rank-clickable.row-open,
html[data-theme="dark"] .drill-table tbody tr.client-clickable.client-open,
html[data-theme="dark"] .clientes-table tbody tr.client-clickable.client-open,
html[data-theme="dark"] .cidades4-table tbody tr.cidades4-clickable.row-open {
  background: #203348 !important;
}

/* HML15: badges operacionais sem branco sobre fundos pastel. */
html[data-theme="dark"] .abc-analysis-section.status .abc-status-giro-normal {
  background: #153a29 !important;
  border-color: #2f7952 !important;
  color: #8deab5 !important;
  -webkit-text-fill-color: #8deab5 !important;
}

html[data-theme="dark"] .abc-analysis-section.status .abc-status-em-maturacao,
html[data-theme="dark"] .abc-analysis-section.status .abc-status-sem-giro-janela-com-historico {
  background: #33281d !important;
  border-color: #70502f !important;
  color: #ffd29a !important;
  -webkit-text-fill-color: #ffd29a !important;
}

html[data-theme="dark"] .abc-analysis-section.status .abc-status-estoque-sem-giro {
  background: #3b2024 !important;
  border-color: #71383e !important;
  color: #ff9ea4 !important;
  -webkit-text-fill-color: #ff9ea4 !important;
}

html[data-theme="dark"] .abc-analysis-section.status .abc-status-sem-giro-sem-estoque {
  background: #252d3a !important;
  border-color: #4a5367 !important;
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
}

html[data-theme="dark"] .abc-analysis-section.status .abc-status-movimento-negativo {
  background: #3a2a1d !important;
  border-color: #7b4f2b !important;
  color: #ffbd83 !important;
  -webkit-text-fill-color: #ffbd83 !important;
}

html[data-theme="dark"] .abc-analysis-section.status .abc-status-novo-com-estoque {
  background: #182f4b !important;
  border-color: #3a5d83 !important;
  color: #8ec3ff !important;
  -webkit-text-fill-color: #8ec3ff !important;
}

html[data-theme="dark"] .abc-analysis-section.status .abc-status-novo-sem-estoque {
  background: #2d2342 !important;
  border-color: #604887 !important;
  color: #d6b5ff !important;
  -webkit-text-fill-color: #d6b5ff !important;
}

/* HML16: Central do Vendedor inteira na paleta escura, inclusive o resumo. */
html[data-theme="dark"] :where(
  .goal-color-guide,
  .seller-overview-panel,
  .seller-summary-top-kpis article,
  .seller-summary-progress,
  .seller-summary-metrics article,
  .seller-goal-decision,
  .seller-goal-decision-line,
  .seller-goal-decision-line > div,
  .seller-goal-decision-form,
  .seller-goal-monthly-preview,
  .seller-history-basis > div,
  .seller-month-chart,
  .seller-summary-action-grid > article,
  .seller-overview-source
) {
  border-color: #34485f !important;
  background: #172435 !important;
  color: #edf4fb !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .seller-summary-identity {
  border-color: #34485f !important;
}

html[data-theme="dark"] :where(
  .seller-summary-identity h3,
  .seller-summary-top-kpis strong,
  .seller-summary-progress-head > div > span,
  .seller-summary-track-labels strong,
  .seller-summary-metrics strong,
  .seller-goal-decision-line strong,
  .seller-history-basis strong,
  .seller-month-column > strong,
  .seller-summary-action-grid > article > span,
  .seller-overview-source strong
) {
  color: #edf4fb !important;
  -webkit-text-fill-color: #edf4fb !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .seller-summary-identity p,
  .seller-summary-top-kpis span,
  .seller-summary-top-kpis small,
  .seller-summary-track-labels,
  .seller-summary-track-scale,
  .seller-summary-metrics span,
  .seller-goal-decision-line small,
  .seller-goal-decision-head small,
  .seller-goal-monthly-preview small,
  .seller-history-basis span,
  .seller-history-basis small,
  .seller-month-column > span:not(.seller-month-bar-area),
  .seller-month-column > small,
  .seller-month-chart-note,
  .seller-overview-source,
  .seller-summary-action-grid ul,
  .seller-summary-action-grid li,
  .goal-color-guide span
) {
  color: #aebed0 !important;
  -webkit-text-fill-color: #aebed0 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .seller-commercial-kpis article.returns {
  border-top-color: #d68136 !important;
  background: #33281d !important;
}

html[data-theme="dark"] .seller-commercial-kpis article.net {
  border-top-color: #2f9b61 !important;
  background: #153a29 !important;
}

html[data-theme="dark"] .seller-commercial-kpis article.tm {
  border-top-color: #4e8ee2 !important;
  background: #182f4b !important;
}

html[data-theme="dark"] .seller-summary-metrics article.weekdays,
html[data-theme="dark"] .seller-summary-metrics article.realized,
html[data-theme="dark"] .seller-summary-metrics article.positive,
html[data-theme="dark"] .seller-goal-decision-line > div.positive {
  background: #153a29 !important;
}

html[data-theme="dark"] .seller-summary-metrics article.saturday {
  background: #182f4b !important;
}

html[data-theme="dark"] .seller-summary-metrics article.expected {
  background: #33281d !important;
}

html[data-theme="dark"] .seller-summary-metrics article.negative,
html[data-theme="dark"] .seller-goal-decision-line > div.negative {
  background: #3b2024 !important;
}

html[data-theme="dark"] :where(
  .seller-goal-decision-form input,
  .seller-goal-decision-form button.secondary
) {
  border-color: #40566e !important;
  background: #1d2b3e !important;
  color: #edf4fb !important;
  -webkit-text-fill-color: #edf4fb !important;
}

/* HML V3: carteira e Cliente 360 completos no azul escuro. Os seletores
   alcancam as celulas e formularios, que antes mantinham o fundo claro. */
html[data-theme="dark"] :where(
  .seller-portfolio-toolbar,
  .seller-portfolio-type-filter,
  .seller-portfolio-type-menu,
  .seller-central-table,
  .seller-central-table th,
  .seller-central-table td
) {
  border-color: var(--cj-dark-line) !important;
  background: var(--cj-dark-surface-2) !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(
  .seller-portfolio-toolbar input,
  .seller-portfolio-toolbar select,
  .seller-portfolio-type-filter summary
) {
  border-color: #405a73 !important;
  background: #172f49 !important;
  color: #edf5fc !important;
  -webkit-text-fill-color: #edf5fc !important;
}

html[data-theme="dark"] :where(
  .seller-portfolio-toolbar label > span,
  .seller-portfolio-type-filter legend,
  .seller-central-table th
) {
  color: #aebed1 !important;
  -webkit-text-fill-color: #aebed1 !important;
}

html[data-theme="dark"] .seller-central-table tbody tr td {
  border-top-color: #294a68 !important;
  background: #102a44 !important;
}

html[data-theme="dark"] .seller-central-table tbody tr.client-clickable:hover td,
html[data-theme="dark"] .seller-central-table tbody tr.client-clickable:focus-within td {
  background: #193b59 !important;
}

html[data-theme="dark"] :where(
  .seller-central-table td strong,
  .seller-central-table td:not(:has(small))
) {
  color: #edf5fc !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .seller-central-table td small {
  color: #aebed1 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .client-360-dialog,
  .client-360-shell,
  .client-360-body,
  .client-360-section,
  .client-360-loading,
  .client-360-error
) {
  border-color: var(--cj-dark-line) !important;
  background: #0b2238 !important;
  color: var(--cj-dark-text) !important;
}

html[data-theme="dark"] :where(
  .client-360-header,
  .client-360-summary,
  .client-360-summary article,
  .client-360-history-wrap,
  .client-360-history th,
  .client-360-history td,
  .client-360-guarantee-grid,
  .client-360-guarantee-grid article,
  .client-360-items-summary,
  .client-360-contact-list > div,
  .client-360-official-links > div,
  .client-360-treatment-list > div,
  .client-360-goal-line,
  .client-360-goal-line > div,
  .client-360-profile-status,
  .client-360-detail-panel
) {
  border-color: #294a68 !important;
  background: #102a44 !important;
  color: #edf5fc !important;
}

html[data-theme="dark"] .client-360-header {
  background: #0f2a43 !important;
  box-shadow: 0 8px 22px rgba(1, 10, 20, .28);
}

html[data-theme="dark"] :where(
  .client-360-header h2,
  .client-360-section-head h3,
  .client-360-summary strong,
  .client-360-guarantee-grid strong,
  .client-360-items-summary strong,
  .client-360-contact-list strong,
  .client-360-official-links strong,
  .client-360-treatment-list strong,
  .client-360-goal-line strong,
  .client-360-detail-group summary
) {
  color: #edf5fc !important;
  -webkit-text-fill-color: #edf5fc !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .client-360-header p,
  .client-360-section-head small,
  .client-360-summary small,
  .client-360-guarantee-grid small,
  .client-360-rule-note,
  .client-360-items-content,
  .client-360-items-summary small,
  .client-360-contact-list span,
  .client-360-contact-list small,
  .client-360-official-links span,
  .client-360-official-links small,
  .client-360-treatment-list span,
  .client-360-treatment-list small,
  .client-360-goal-line small,
  .client-360-inline-form > small,
  .client-360-goal-form > small,
  .client-360-empty,
  .client-360-detail-group summary span,
  .client-360-history td small
) {
  color: #aebed1 !important;
  -webkit-text-fill-color: #aebed1 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .client-360-history th {
  background: #172f49 !important;
  color: #b9c9da !important;
  -webkit-text-fill-color: #b9c9da !important;
}

html[data-theme="dark"] .client-360-history td {
  border-top-color: #294a68 !important;
  background: #102a44 !important;
  color: #edf5fc !important;
  -webkit-text-fill-color: #edf5fc !important;
}

html[data-theme="dark"] :where(
  .client-360-profile-form input,
  .client-360-profile-form select,
  .client-360-inline-form input,
  .client-360-inline-form select,
  .client-360-goal-form input,
  .client-360-items-controls select
) {
  border-color: #405a73 !important;
  background: #172f49 !important;
  color: #edf5fc !important;
  -webkit-text-fill-color: #edf5fc !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .client-360-profile-form input:disabled,
  .client-360-profile-form select:disabled,
  .client-360-inline-form input:disabled,
  .client-360-inline-form select:disabled,
  .client-360-goal-form input:disabled
) {
  background: #1a2b3e !important;
  color: #91a6bc !important;
  -webkit-text-fill-color: #91a6bc !important;
  opacity: .78 !important;
}

html[data-theme="dark"] :where(
  .client-360-header > button,
  .client-360-section-head > .client-360-detail-close,
  .client-360-table-action,
  .client-360-goal-form button.secondary
) {
  border-color: #405a73 !important;
  background: #172f49 !important;
  color: #dbe8f4 !important;
  -webkit-text-fill-color: #dbe8f4 !important;
}

html[data-theme="dark"] :where(
  .client-360-section-head > button:disabled,
  .client-360-inline-form button:disabled,
  .client-360-goal-form button:disabled,
  .client-360-profile-form button:disabled
) {
  border-color: #40566e !important;
  background: #26394d !important;
  color: #aebed1 !important;
  -webkit-text-fill-color: #aebed1 !important;
  opacity: .82 !important;
}

html[data-theme="dark"] .client-360-summary-clickable:hover,
html[data-theme="dark"] .client-360-summary-clickable:focus-within,
html[data-theme="dark"] .client-360-summary-clickable.is-active {
  background: #163c32 !important;
}

html[data-theme="dark"] .client-360-official-links > div.platform,
html[data-theme="dark"] .client-360-goal-line > div.positive {
  background: #153a29 !important;
}

html[data-theme="dark"] .client-360-detail-panel[data-client-360-detail-panel="devolucoes"],
html[data-theme="dark"] .client-360-goal-line > div.negative {
  background: #3b2024 !important;
}

html[data-theme="dark"] .client-360-detail-panel[data-client-360-detail-panel="garantias"] {
  background: #33281d !important;
}

html[data-theme="dark"] .client-360-return {
  color: #ff8f86 !important;
  -webkit-text-fill-color: #ff8f86 !important;
}

/* Complemento V3: superficies internas do Cliente 360 e menus da carteira.
   Mantem o azul-marinho em Chrome/Chromium independentemente do sistema
   operacional e conserva verde, laranja e vermelho apenas como semantica. */
html[data-theme="dark"] .seller-portfolio-type-menu label:hover,
html[data-theme="dark"] .seller-portfolio-type-menu label:focus-within {
  background: #193b59 !important;
}

html[data-theme="dark"] :where(
  .client-360-seller-contribution,
  .client-goal-progress,
  .client-goal-values,
  .client-goal-values > div,
  .client-360-contribution-grid,
  .client-360-contribution-grid > div,
  .client-360-allocation,
  .client-360-finance-strip,
  .client-360-finance-grid,
  .client-360-finance-grid article,
  .client-360-month-column,
  .client-360-month-bar-area,
  .client-360-month-bars,
  .client-360-chart-legend,
  .client-360-detail-group
) {
  border-color: #294a68 !important;
  background-color: #102a44 !important;
  color: #edf5fc !important;
}

html[data-theme="dark"] :where(
  .client-360-contribution-grid span,
  .client-goal-progress-head > div > span,
  .client-goal-values span,
  .client-360-finance-grid article > span,
  .client-360-finance-grid article small,
  .client-360-month-column > span,
  .client-360-month-column > small,
  .client-360-chart-note,
  .client-360-chart-legend
) {
  color: #aebed1 !important;
  -webkit-text-fill-color: #aebed1 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] :where(
  .client-360-contribution-grid strong,
  .client-goal-progress-head > div > strong,
  .client-goal-values strong,
  .client-360-finance-head h3,
  .client-360-finance-grid article strong,
  .client-360-month-column > strong
) {
  color: #edf5fc !important;
  -webkit-text-fill-color: #edf5fc !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .client-360-finance-strip.has-overdue,
html[data-theme="dark"] .client-360-allocation.acima_da_meta_vendedor,
html[data-theme="dark"] .client-360-allocation.sem_clientes_para_ratear,
html[data-theme="dark"] .client-360-allocation.sem_meta_vendedor {
  border-color: #70502f !important;
  background: #33281d !important;
  color: #ffd29a !important;
}

html[data-theme="dark"] .client-360-finance-grid article.attention strong,
html[data-theme="dark"] .client-goal-values .negative strong {
  color: #ff8f86 !important;
  -webkit-text-fill-color: #ff8f86 !important;
}

html[data-theme="dark"] .client-360-finance-grid article.regular strong,
html[data-theme="dark"] .client-goal-values .positive strong {
  color: #7ce7aa !important;
  -webkit-text-fill-color: #7ce7aa !important;
}

html[data-theme="dark"] .client-goal-track {
  border-color: #405a73 !important;
  background: #193550 !important;
}

/* Planejamento de Investimento: tema escuro centralizado. */
html[data-theme="dark"] .inv-page{color:var(--cj-dark-text)}
html[data-theme="dark"] :where(.inv-hero,.inv-workbench,.inv-kpis article,.inv-decision-board,.inv-items-panel,.inv-group-row,.inv-lineage-grid article,.inv-evidence-dialog){border-color:var(--cj-dark-line);background:var(--cj-dark-surface);color:var(--cj-dark-text)}
html[data-theme="dark"] .inv-hero{background:linear-gradient(135deg,#0b2238,#102a44)}
html[data-theme="dark"] :where(.inv-hero h2,.inv-kpis strong,.inv-decision-board h3,.inv-items-panel h3,.inv-group-name b,.inv-group-row>span>b,.inv-items td:first-child b,.inv-lineage-grid b,.inv-proof-grid b){color:var(--cj-dark-text)}
html[data-theme="dark"] :where(.inv-hero p,.inv-decision-board p,.inv-items-panel p,.inv-kpis small,.inv-group-name small,.inv-items td small,.inv-lineage-grid small,.inv-proof-grid small,.inv-proof-version){color:var(--cj-dark-muted)}
html[data-theme="dark"] .inv-hero-state{border-color:#28604d;background:#123327}
html[data-theme="dark"] :where(.inv-workbench select,.inv-workbench input,.inv-money-input,.inv-quick-budgets button,.inv-board-actions button,.inv-search,.inv-inline-money,.inv-items input){border-color:var(--cj-dark-line);background:var(--cj-dark-surface-2);color:var(--cj-dark-text)}
html[data-theme="dark"] :where(.inv-modebar,.inv-group-head,.inv-items th,.inv-loading,.inv-lineage,.inv-proof-grid article){border-color:var(--cj-dark-line);background:var(--cj-dark-surface-2);color:var(--cj-dark-text)}
html[data-theme="dark"] .inv-group-row:hover,html[data-theme="dark"] .inv-group-row.open{background:var(--cj-dark-surface-3)}
html[data-theme="dark"] .inv-items tr.changed td{background:#172c49}
html[data-theme="dark"] .inv-kpis article.ok{background:#123327}
html[data-theme="dark"] .inv-kpis article.danger{background:#3b2024}
html[data-theme="dark"] .inv-kpis article.accent{background:#172c49}
html[data-theme="dark"] .inv-contract{background:#3b2a19;color:#f2c991}
html[data-theme="dark"] :where(.inv-filter-panel,.inv-filter-popover,.inv-filter-search,.inv-filter-control>summary){border-color:var(--cj-dark-line);background:var(--cj-dark-surface);color:var(--cj-dark-text)}
html[data-theme="dark"] :where(.inv-filter-panel h3,.inv-filter-search input,.inv-filter-options>label){color:var(--cj-dark-text)}
html[data-theme="dark"] .inv-filter-control>summary span{color:#eef5fc}
html[data-theme="dark"] .inv-filter-control>summary b{color:#63dfa0}
html[data-theme="dark"] :where(.inv-filter-panel p,.inv-filter-control>summary small,.inv-filter-options>label small){color:var(--cj-dark-muted)}
html[data-theme="dark"] .inv-filter-control[open]>summary{border-color:#29b66d;background:#123327}
html[data-theme="dark"] .inv-filter-control[open]>summary span{color:#72e5a5}
html[data-theme="dark"] .inv-filter-actions button{border-color:var(--cj-dark-line);background:var(--cj-dark-surface-2);color:var(--cj-dark-text)}
html[data-theme="dark"] .inv-filter-options>label:hover{background:var(--cj-dark-surface-3)}
html[data-theme="dark"] .inv-filter-options>label.special{background:#3b2a19}
html[data-theme="dark"] .inv-filter-result{border-color:var(--cj-dark-line);background:#123327;color:var(--cj-dark-muted)}
html[data-theme="dark"] .inv-inline-items,html[data-theme="dark"] .inv-inline-items>header{border-color:#29b66d;background:#102a44}
html[data-theme="dark"] :where(.inv-group-name b,.inv-group-row>span>b){color:#f2f7fc!important}
html[data-theme="dark"] .inv-group-row>span{color:#d7e3ef}
html[data-theme="dark"] :where(.inv-group-name small,.inv-group-row>span>small){color:#9fb3c7}

/* Ranking de Vendas por Marcas: tema escuro centralizado. */
html[data-theme="dark"] :where(.br-hero,.br-workbench,.br-dimensions,.br-taxonomy,.br-period-summary,.br-kpis article,.br-ranking-panel,.br-row,.br-breakdown-grid>section,.br-branch-panel,.br-products,.br-lineage-grid article,.br-tax-popover,.br-coverage-explainer,.br-coverage-facts article,.br-coverage-formula article){border-color:var(--cj-dark-line);background:var(--cj-dark-surface);color:var(--cj-dark-text)}
html[data-theme="dark"] .br-hero{background:linear-gradient(135deg,#0b2238,#102a44)}
html[data-theme="dark"] :where(.br-hero h2,.br-dimensions b,.br-taxonomy h3,.br-period-summary strong,.br-kpis strong,.br-kpis>article>b,.br-ranking-panel h3,.br-row>span>b,.br-detail h4,.br-detail h5,.br-breakdown-list b,.br-branches b,.br-product-list span>b,.br-lineage-grid b,.br-option-list b,.br-coverage-body header b,.br-coverage-facts strong,.br-coverage-formula strong){color:var(--cj-dark-text)}
html[data-theme="dark"] :where(.br-hero p,.br-taxonomy p,.br-period-summary small,.br-kpis small,.br-ranking-panel p,.br-row>span>small,.br-detail p,.br-breakdown-list small,.br-branches small,.br-product-list span>small,.br-lineage-grid small,.br-option-list small,.br-coverage-body small,.br-coverage-body>footer>p){color:var(--cj-dark-muted)}
html[data-theme="dark"] .br-engine{border-color:#28604d;background:#123327}
html[data-theme="dark"] :where(.br-periods button,.br-curve-filter button,.br-dimensions button,.br-taxonomy button,.br-workbench input,.br-search,.br-option-search,.br-tax-filter>summary){border-color:var(--cj-dark-line);background:var(--cj-dark-surface-2);color:var(--cj-dark-text)}
html[data-theme="dark"] :where(.br-search input,.br-option-search input){color:var(--cj-dark-text)}
html[data-theme="dark"] :where(.br-head,.br-toolbar,.br-product-head,.br-loading,.br-detail-loading,.br-lineage,.br-taxonomy>footer){border-color:var(--cj-dark-line);background:var(--cj-dark-surface-2);color:var(--cj-dark-text)}
html[data-theme="dark"] .br-row:hover,html[data-theme="dark"] .br-row.open{background:var(--cj-dark-surface-3)}
html[data-theme="dark"] .br-sort{color:var(--cj-dark-muted)}
html[data-theme="dark"] .br-sort:hover,html[data-theme="dark"] .br-sort.active{color:#8deab5}
html[data-theme="dark"] .br-period-summary article.current{background:#123327}
html[data-theme="dark"] .br-period-summary article.previous,html[data-theme="dark"] .br-kpis article.accent{background:#172c49}
html[data-theme="dark"] .br-coverage-explainer[open]>summary{border-color:var(--cj-dark-line);background:#123327}
html[data-theme="dark"] .br-coverage-explainer>summary,html[data-theme="dark"] .br-coverage-explainer>summary>em{color:#8deab5}
html[data-theme="dark"] .br-detail{border-color:#29b66d;background:#102a44}
html[data-theme="dark"] .br-warning{background:#3b2a19;color:#f2c991}
html[data-theme="dark"] .br-option-finish{border-color:var(--cj-dark-line);background:var(--cj-dark-surface)}
html[data-theme="dark"] .br-row>span>b,
html[data-theme="dark"] .br-product-list span>b,
html[data-theme="dark"] .br-breakdown-list b,
html[data-theme="dark"] .br-branches b{color:var(--cj-dark-text)!important;-webkit-text-fill-color:var(--cj-dark-text)!important}
html[data-theme="dark"] .br-row .br-current>b,
html[data-theme="dark"] .br-product-list .br-current>b{color:#8deab5!important;-webkit-text-fill-color:#8deab5!important}
html[data-theme="dark"] .br-row .br-previous>b{color:#9fcaff!important;-webkit-text-fill-color:#9fcaff!important}

@media(max-width:760px){
  html[data-theme="dark"] .inv-group-row>span::before{color:var(--cj-dark-muted)!important}
  html[data-theme="dark"] .br-current{background:#123327}
  html[data-theme="dark"] .br-previous{background:#172c49}
  html[data-theme="dark"] .br-row>span::before,
  html[data-theme="dark"] .br-product-list article>span::before{color:var(--cj-dark-muted)}
}

/* Central de Comunicação CJ: conversão escura permanece exclusivamente aqui. */
html[data-theme="dark"] .cj-comm-shell {
  --comm-border: #294c6a;
  --comm-muted: #a8bfd4;
  --comm-surface: #102c43;
  --comm-soft: #0c2438;
  --comm-ink: #eef7ff;
}

html[data-theme="dark"] .cj-comm-hero {
  border-color: #294c6a;
  background: linear-gradient(125deg, #102c43 0%, #12344e 68%, #103b3c 100%) !important;
}

html[data-theme="dark"] .cj-comm-message.is-own {
  border-color: #2b73a5;
  background: #153b58 !important;
}

html[data-theme="dark"] .cj-comm-quiet {
  border-color: #7e3948;
  background: #3c2028 !important;
  color: #ffb7bd !important;
}

html[data-theme="dark"] .cj-comm-thread-top b,
html[data-theme="dark"] .cj-comm-area {
  background: #173b57 !important;
  color: #a9d8ff !important;
}

html[data-theme="dark"] .area-gerencia {
  background: #143c31 !important;
  color: #78e4ad !important;
}

html[data-theme="dark"] .area-compras {
  background: #173b57 !important;
  color: #a9d8ff !important;
}

html[data-theme="dark"] .area-marketing {
  background: #49331d !important;
  color: #ffc77d !important;
}

html[data-theme="dark"] .area-diretoria {
  background: #332b55 !important;
  color: #d0bfff !important;
}

html[data-theme="dark"] .area-vendedor {
  background: #26394b !important;
  color: #c2d3e2 !important;
}

/* Homes por função, navegação móvel e conversa flutuante.
 * Toda conversão escura destes componentes vive nesta camada canônica. */
html[data-theme="dark"] {
  --cj-mobile-ink: #eef5fb;
  --cj-mobile-muted: #a8bbce;
  --cj-mobile-line: #315574;
  --cj-mobile-surface: #102a43;
  --cj-mobile-soft: #173a59;
  --cj-mobile-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] .cj-role-home-hero {
  background: linear-gradient(125deg, #102a43 0%, #12324f 65%, #103b3a 100%) !important;
}

html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-home-kpis {
  border-color: #0d5961 !important;
  background: #062b3d !important;
}

html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-kpi {
  color: #f5fffb !important;
  background:
    linear-gradient(122deg, rgba(116,255,199,.16) 0%, rgba(116,255,199,0) 48%),
    linear-gradient(142deg, #071b31 0%, #073b46 58%, #086350 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), inset 0 -18px 32px rgba(0,0,0,.16) !important;
}

html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-kpi:nth-child(2),
html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-kpi:nth-child(3) {
  background:
    linear-gradient(122deg, rgba(255,204,96,.20) 0%, rgba(255,204,96,0) 49%),
    linear-gradient(142deg, #0a263b 0%, #08444a 58%, #44512f 100%) !important;
}

html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-kpi:nth-child(4) {
  background:
    linear-gradient(122deg, rgba(88,215,255,.18) 0%, rgba(88,215,255,0) 48%),
    linear-gradient(142deg, #082840 0%, #07505b 58%, #0b665f 100%) !important;
}

html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-kpi :is(span,small) {
  color: rgba(229,250,245,.78) !important;
}

html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-kpi strong {
  color: #fff !important;
}

html[data-theme="dark"] #view-dashboard.cj-role-home-manager .sales-performance-header,
html[data-theme="dark"] #view-dashboard.cj-role-home-manager .sales-branch-progress,
html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-team-panel,
html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-team-all,
html[data-theme="dark"] #view-dashboard.cj-role-home-manager .cj-role-home-grid > .cj-role-home-panel:last-child {
  border-color: var(--cj-dark-line) !important;
  background: linear-gradient(145deg, #102a43, #132f4a) !important;
  color: var(--cj-dark-text);
}

/* O cabeçalho da equipe é uma superfície própria no mobile; no escuro ele
 * acompanha o azul-petróleo do painel em vez de permanecer claro. */
html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-team-panel > header {
  border-color: #315574 !important;
  background: linear-gradient(132deg, #102a43 0%, #123b4e 62%, #104640 100%) !important;
  color: #eef5fb !important;
}

html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-team-panel > header p {
  color: #aac2d4 !important;
}

html[data-theme="dark"] #view-dashboard .cj-role-home .cj-role-team-panel > header > small {
  background: #123f3b !important;
  color: #72e1a8 !important;
}

html[data-theme="dark"] .cj-role-shortcut > i {
  background: #123f3b !important;
  color: #54d79a !important;
}

html[data-theme="dark"] .cj-role-list i {
  background: #163c5f !important;
  color: #7fbdff !important;
}

html[data-theme="dark"] .cj-role-home-contexts button.active {
  border-color: #2f8b66 !important;
  background: #123f3b !important;
  color: #71e0a9 !important;
}

html[data-theme="dark"] .cj-role-home-note {
  border-color: #357cac !important;
  background: #14334d !important;
  color: #c9deef !important;
}

html[data-theme="dark"] .cj-home-choice-icon,
html[data-theme="dark"] .cj-access-switch i {
  background: #173a59 !important;
  color: #d9e8f4 !important;
}

html[data-theme="dark"] .cj-comm-dock {
  --dock-bg: #102a43;
  --dock-soft: #173a59;
  --dock-ink: #f1f6fb;
  --dock-muted: #a9bfd2;
  --dock-border: #315574;
  background: var(--dock-bg) !important;
}

html[data-theme="dark"] .cj-comm-dock > header button,
html[data-theme="dark"] .cj-dock-actions button,
html[data-theme="dark"] .cj-dock-reply button,
html[data-theme="dark"] .cj-dock-commit-form button,
html[data-theme="dark"] .cj-dock-commitments button {
  background: #173a59 !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] .cj-dock-actions button:first-child,
html[data-theme="dark"] .cj-dock-reply button[type="submit"],
html[data-theme="dark"] .cj-dock-commit-form button[type="submit"] {
  background: #0a9754 !important;
  color: #fff !important;
}

html[data-theme="dark"] .cj-dock-thread:hover,
html[data-theme="dark"] .cj-dock-thread.active,
html[data-theme="dark"] .cj-dock-message {
  background: #173a59 !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] .cj-dock-message.own {
  border-color: #24766e !important;
  background: #124b48 !important;
}

html[data-theme="dark"] .cj-dock-commitments article {
  background: #3d3424 !important;
}

html[data-theme="dark"] .cj-dock-commitments article.done {
  background: #233a50 !important;
}

@media (max-width: 760px) {
  html[data-theme="dark"] .topbar {
    background: rgba(11, 34, 56, .98) !important;
  }

  html[data-theme="dark"] body.cj-mobile-menu-open .layout > .sidebar {
    background: rgba(11, 34, 56, .99) !important;
  }

  html[data-theme="dark"] .cj-mobile-bottom-nav {
    border-color: #315574 !important;
    background: rgba(11, 34, 56, .97) !important;
  }

  html[data-theme="dark"] .cj-mobile-bottom-nav button {
    color: #a9bfd2 !important;
  }

  html[data-theme="dark"] .cj-mobile-bottom-nav button.active {
    background: linear-gradient(135deg, #0d5b57 0%, #0e3d58 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(111, 225, 168, .24) !important;
    color: #86efba !important;
  }

  html[data-theme="dark"] .cj-mobile-menu-close {
    border-color: #315574 !important;
    background: #173a59 !important;
    color: #eef5fb !important;
  }

  html[data-theme="dark"] .top-actions > .cj-communication-trigger.has-unread {
    border-color: #2f8b66 !important;
    background: #123f3b !important;
    color: #71e0a9 !important;
  }
}

html[data-theme="dark"] .cj-managed-branches { border-color:var(--cj-dark-line); background:var(--cj-dark-surface-soft); }

/* Autenticação e Usuários no mobile: superfície e texto devem mudar juntos. */
html[data-theme="dark"] .cj-auth-overlay {
  background: rgba(3, 16, 29, .9) !important;
}

html[data-theme="dark"] .cj-auth-entry {
  border-color: #315574 !important;
  background: #0f2a43 !important;
  color: #eef5fb !important;
}

html[data-theme="dark"] .cj-auth-brand strong,
html[data-theme="dark"] .cj-auth-form label > span {
  color: #eef5fb !important;
  -webkit-text-fill-color: #eef5fb !important;
}

html[data-theme="dark"] .cj-auth-brand small {
  color: #adc0d2 !important;
  -webkit-text-fill-color: #adc0d2 !important;
}

html[data-theme="dark"] .cj-auth-form input,
html[data-theme="dark"] .cj-auth-form input:-webkit-autofill,
html[data-theme="dark"] .cj-auth-form input:-webkit-autofill:hover,
html[data-theme="dark"] .cj-auth-form input:-webkit-autofill:focus {
  border-color: #3a6384 !important;
  background: #173a59 !important;
  color: #f1f7fc !important;
  -webkit-text-fill-color: #f1f7fc !important;
  -webkit-box-shadow: 0 0 0 1000px #173a59 inset !important;
  caret-color: #fff !important;
}

html[data-theme="dark"] .cj-auth-form input::placeholder {
  color: #91a7bb !important;
  -webkit-text-fill-color: #91a7bb !important;
}

@media (max-width: 760px) {
  html[data-theme="dark"] .cj-access-table tbody tr {
    border-color: #315574 !important;
    border-left-color: #22bd70 !important;
    background: #102a43 !important;
    color: #edf5fb !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22) !important;
  }

  html[data-theme="dark"] .cj-access-table td,
  html[data-theme="dark"] .cj-access-table td strong {
    border-color: #315574 !important;
    background: transparent !important;
    color: #edf5fb !important;
    -webkit-text-fill-color: #edf5fb !important;
  }

  html[data-theme="dark"] .cj-access-table td::before,
  html[data-theme="dark"] .cj-access-table td small {
    color: #a9bdd0 !important;
    -webkit-text-fill-color: #a9bdd0 !important;
  }

  html[data-theme="dark"] .cj-access-table .cj-access-state.on {
    border-color: #2d8056 !important;
    background: #153d2b !important;
    color: #84e7af !important;
    -webkit-text-fill-color: #84e7af !important;
  }

  html[data-theme="dark"] .cj-access-table .cj-access-icon-btn {
    border-color: #3b6384 !important;
    background: #173a59 !important;
    color: #9acbff !important;
    -webkit-text-fill-color: #9acbff !important;
  }
}

/* Novos elementos do mensageiro continuam sob a camada escura canônica. */
html[data-theme="dark"] .cj-comm-modal {
  --comm-border: #315574;
  --comm-muted: #a9bfd2;
  --comm-surface: #102a43;
  --comm-soft: #173a59;
  --comm-ink: #f1f6fb;
  background: #102a43 !important;
}

html[data-theme="dark"] :where(.cj-dock-directory-head label,.cj-dock-contact,.cj-dock-branch summary) {
  border-color: #315574 !important;
  background: transparent !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] .cj-dock-branch summary i {
  background: #123f3b !important;
  color: #71e0a9 !important;
}

html[data-theme="dark"] .cj-dock-branch-message,
html[data-theme="dark"] .cj-comm-direct-recipient {
  border-color: #2f8b66 !important;
  background: #123f3b !important;
  color: #dff8ea !important;
}

html[data-theme="dark"] .cj-comm-direct-recipient strong {
  color: #f1f6fb !important;
}

html[data-theme="dark"] .cj-comm-direct-recipient :where(small,em) {
  color: #a9bfd2 !important;
}

html[data-theme="dark"] :where(.cj-comm-compose-picker,.cj-comm-compose-fields,.cj-comm-dialog form>footer) {
  border-color: #315574 !important;
  background: #102a43 !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] :where(.cj-compose-search,.cj-compose-scopes button) {
  border-color: #315574 !important;
  background: #173a59 !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] .cj-compose-scopes button[aria-pressed="true"] {
  border-color: #2f8b66 !important;
  background: #123f3b !important;
  color: #dff8ea !important;
}

html[data-theme="dark"] :where(.cj-compose-scopes button>i,.cj-compose-directory h4>i) {
  background: #123f3b !important;
  color: #71e0a9 !important;
}

html[data-theme="dark"] .cj-compose-contact {
  border-color: #315574 !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] .cj-compose-contact.is-selected {
  background: #123f3b !important;
}

/* Central V3: superfícies escuras do mensageiro integrado. */
html[data-theme="dark"] :where(.cj-comm-sidebar,.cj-comm-sidebar>header,.cj-comm-sidebar>footer,.cj-comm-side-search,.cj-comm-side-tabs,.cj-comm-chat-filters,.cj-comm-detail) {
  border-color: #315574 !important;
  background: #102a43 !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] :where(.cj-comm-side-search input,.cj-comm-sidebar>header>button,.cj-comm-chat-filters select,.cj-comm-first-meta input,.cj-comm-first-meta select,.cj-comm-inline-action input) {
  border-color: #315574 !important;
  background: #173a59 !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] .cj-comm-side-tabs button[aria-selected="true"] {
  border-color: #55d995 !important;
  color: #76e5aa !important;
}

html[data-theme="dark"] :where(.cj-comm-directory-list details,.cj-comm-directory-list summary,.cj-comm-person,.cj-comm-group) {
  border-color: #315574 !important;
  color: #f1f6fb !important;
}

html[data-theme="dark"] :where(.cj-comm-person:hover,.cj-comm-group,.cj-comm-group:hover) {
  background: #173a59 !important;
}

html[data-theme="dark"] :where(.cj-comm-directory-list summary>i,.cj-comm-group>i) {
  background: #123f3b !important;
  color: #71e0a9 !important;
}

html[data-theme="dark"] .cj-comm-welcome>i,
html[data-theme="dark"] .cj-comm-draft-empty>i {
  background: linear-gradient(145deg,#123f3b,#173a59) !important;
}

html[data-theme="dark"] .cj-comm-welcome>strong,
html[data-theme="dark"] .cj-comm-draft-empty>strong {
  color: #f1f6fb !important;
}

html[data-theme="dark"] .cj-comm-welcome>div span {
  border-color: #2f8b66 !important;
  background: #123f3b !important;
  color: #9af0c1 !important;
}

html[data-theme="dark"] .cj-comm-message>footer button {
  border-color: #315574 !important;
  background: #173a59 !important;
  color: #dbeafa !important;
}

html[data-theme="dark"] .cj-comm-message>footer button:first-child {
  border-color: #2f8b66 !important;
  background: #123f3b !important;
  color: #9af0c1 !important;
}

html[data-theme="dark"] .cj-comm-linked-action,
html[data-theme="dark"] .cj-comm-inline-action {
  border-color: #8d6732 !important;
  background: #3b3020 !important;
  color: #f7e5c5 !important;
}

html[data-theme="dark"] .cj-comm-linked-action.is-done {
  border-color: #546d82 !important;
  background: #21384a !important;
  color: #c2d0dc !important;
}
html[data-theme="dark"] .cj-managed-branches>div:first-child strong { color:var(--cj-dark-text); }
html[data-theme="dark"] .cj-managed-branches>div:first-child small { color:var(--cj-dark-muted); }

@media(max-width:760px){
  html[data-theme="dark"] #view-ranking .ranking-table tr.rank-clickable,
  html[data-theme="dark"] #view-curva-abc .abc-products-table-v4 tr{border-color:var(--cj-dark-line);background:var(--cj-dark-surface);box-shadow:none}
  html[data-theme="dark"] #view-ranking .ranking-table tr.rank-clickable>td:nth-child(1){background:#173b5e!important;color:#8bc8ff}
  html[data-theme="dark"] #view-ranking .ranking-table tr.rank-clickable>td:nth-child(5),
  html[data-theme="dark"] #view-curva-abc .abc-products-table-v4 .abc-prod-main-cell{border-color:var(--cj-dark-line)!important}

  html[data-theme="dark"] :where(
    #view-clientes .clientes-table,
    #view-itens .itens-table,
    #view-cidades .cidades4-table,
    #view-cidades .cidades4-drill-table,
    #view-cidades .cidades4-itens-table,
    #view-auditoria-precos .aud2-table,
    #view-meu-espaco .seller-central-table,
    .drill-table,
    .drill-itens-table,
    .client-item-table
  ) tbody>tr:not(.client-items-row):not(.cidades4-drill-row):not(.cidades4-itens-row):not(.drill-row){border-color:var(--cj-dark-line)!important;background:var(--cj-dark-surface-2)!important;box-shadow:none!important}
  html[data-theme="dark"] :where(
    #view-clientes .clientes-table,
    #view-itens .itens-table,
    #view-cidades .cidades4-table,
    #view-cidades .cidades4-drill-table,
    #view-cidades .cidades4-itens-table,
    #view-auditoria-precos .aud2-table,
    #view-meu-espaco .seller-central-table,
    .drill-table,
    .drill-itens-table,
    .client-item-table
  ) tbody>tr>td{color:var(--cj-dark-text)!important}
  html[data-theme="dark"] :where(
    #view-clientes .clientes-table,
    #view-itens .itens-table,
    #view-cidades .cidades4-table,
    #view-cidades .cidades4-drill-table,
    #view-cidades .cidades4-itens-table,
    #view-auditoria-precos .aud2-table,
    #view-meu-espaco .seller-central-table,
    .drill-table,
    .drill-itens-table,
    .client-item-table
  ) tbody>tr>td::before{color:var(--cj-dark-muted)!important;-webkit-text-fill-color:var(--cj-dark-muted)}
  html[data-theme="dark"] :where(
    #view-clientes .clientes-table,
    #view-itens .itens-table,
    #view-cidades .cidades4-table,
    #view-cidades .cidades4-drill-table,
    #view-cidades .cidades4-itens-table,
    #view-auditoria-precos .aud2-table,
    #view-meu-espaco .seller-central-table,
    .drill-table,
    .drill-itens-table,
    .client-item-table
  ) tbody>tr>td :where(strong,.produto-desc){color:#f3f7fc!important}
  html[data-theme="dark"] :where(
    #view-clientes .clientes-table,
    #view-itens .itens-table,
    #view-cidades .cidades4-table,
    #view-cidades .cidades4-drill-table,
    #view-cidades .cidades4-itens-table,
    #view-auditoria-precos .aud2-table,
    #view-meu-espaco .seller-central-table,
    .drill-table,
    .client-item-table
  ) tbody>tr>td :where(small,.produto-meta,.produto-meta span){color:#a9bfd2!important}

  html[data-theme="dark"] :where(.cj-pager.itens-pager,.aud2-pager,.itens-filter-panel,.cidades4-toolbar,.aud2-table-title){border-color:var(--cj-dark-line)!important;background:var(--cj-dark-surface-2)!important;color:var(--cj-dark-text)!important}
  html[data-theme="dark"] :where(.cj-pager-info,.cj-pager-info strong,.cj-pager-info span,.aud2-pager-left,.aud2-pager-left strong,.aud2-pager-left span,.itens-page-jump,.aud2-page-jump){color:var(--cj-dark-text)!important;-webkit-text-fill-color:var(--cj-dark-text)}
  html[data-theme="dark"] :where(.cj-pager-actions button,.aud2-pager-right button,.itens-page-jump input,.aud2-page-jump input){border-color:#3b6384!important;background:#173a59!important;color:#eef6ff!important;-webkit-text-fill-color:#eef6ff}
  html[data-theme="dark"] :where(.cj-pager-actions button,.aud2-pager-right button):disabled{opacity:.48!important}

  html[data-theme="dark"] #view-curva-abc :where(.abc-analysis-heading,.abc-analysis-section,.abc-resumo-box,.abc-mini-table-scroll){border-color:var(--cj-dark-line)!important;background:var(--cj-dark-surface)!important;color:var(--cj-dark-text)!important;box-shadow:none!important}
  html[data-theme="dark"] #view-curva-abc .abc-analysis-section.official{background:linear-gradient(180deg,#0e2d2b 0,var(--cj-dark-surface) 130px)!important}
  html[data-theme="dark"] #view-curva-abc :where(.abc-analysis-heading strong,.abc-analysis-section>header strong,.abc-resumo-box h3){color:#f3f7fc!important;-webkit-text-fill-color:#f3f7fc}
  html[data-theme="dark"] #view-curva-abc :where(.abc-analysis-heading small,.abc-analysis-section>header small,.abc-box-help){color:#a9bfd2!important;-webkit-text-fill-color:#a9bfd2}
  html[data-theme="dark"] #view-curva-abc .abc-analysis-section .abc-mini-table-v6 :where(tbody,tfoot)>tr{border-color:var(--cj-dark-line)!important;background:var(--cj-dark-surface-2)!important;box-shadow:none!important}
  html[data-theme="dark"] #view-curva-abc .abc-analysis-section .abc-mini-table-v6 tr>td{border-color:var(--cj-dark-line)!important;background:transparent!important;color:var(--cj-dark-text)!important}
  html[data-theme="dark"] #view-curva-abc .abc-analysis-section .abc-mini-table-v6 tr>td::before{color:var(--cj-dark-muted)!important;-webkit-text-fill-color:var(--cj-dark-muted)}
  html[data-theme="dark"] #view-curva-abc .abc-analysis-section .abc-mini-table-v6 tr.active-analysis-row{border-color:#2c8b59!important;background:#123f3b!important}
}

/* ===== TEMA FORNECEDORES CENTRALIZADO: INICIO ===== */
/* Migrado mecanicamente do componente; manter apenas nesta camada canonica. */
html[data-theme="dark"] .sa-save-notice{ border-color:#376d52; color:#93e9be; background:#143d2d; }
html[data-theme="dark"] .sa-form-feedback{ color:#b6cad9; }
html[data-theme="dark"] .sa-form-feedback[data-tone=error]{ color:#ffb4ab; }
html[data-theme="dark"] .sa-form-feedback[data-tone=pending]{ color:#f5cb7a; }
html[data-theme="dark"] .sa-cnpj-result{ border-color:#376d52; color:#c6e5d7; background:#143d2d; }
html[data-theme="dark"] .sa-cnpj-result[data-tone=error]{ border-color:#79423a; color:#ffb4ab; background:#472421; }
html[data-theme="dark"] .sa-cnpj-result[data-tone=pending]{ border-color:#71592f; color:#f5cb7a; background:#453719; }
html[data-theme="dark"] .sa-cnpj-result-grid b,html[data-theme="dark"] .sa-cnpj-result>header b{ color:#e5f0e9; }
html[data-theme="dark"] .sa-cnpj-result-grid span,html[data-theme="dark"] .sa-cnpj-result>small{ color:#a9c2b7; }
html[data-theme="dark"] .sa-history-range{ border-color:#31506b; background:#112d46; }
html[data-theme="dark"] .sa-history-range label{ color:#a8bed0; }
html[data-theme="dark"] .sa-attention-banner{ border-color:#73372f; border-left-color:#f97066; background:linear-gradient(105deg,#311c21,#261d26); }
html[data-theme="dark"] .sa-attention-banner b,html[data-theme="dark"] .sa-attention-banner span{ color:#ffb4ab; }
html[data-theme="dark"] .sa-reading-drill,html[data-theme="dark"] .sa-metric-drill,html[data-theme="dark"] .sa-drill-row{ border-color:#34536b; background:#12304a; }
html[data-theme="dark"] .sa-reading-drill.is-open,html[data-theme="dark"] .sa-metric-drill.is-open,html[data-theme="dark"] .sa-card-drill{ background:#102a41; }
html[data-theme="dark"] .sa-card-drill>header,html[data-theme="dark"] .sa-drill-row{ border-color:#34536b; }
html[data-theme="dark"] .sa-reading-drill b,html[data-theme="dark"] .sa-metric-drill b,html[data-theme="dark"] .sa-card-drill>header b,html[data-theme="dark"] .sa-drill-row header b,html[data-theme="dark"] .sa-drill-row header span,html[data-theme="dark"] .sa-drill-dates b{ color:#e5f0f8; }
html[data-theme="dark"] .sa-reading-drill span,html[data-theme="dark"] .sa-reading-drill small,html[data-theme="dark"] .sa-metric-drill span,html[data-theme="dark"] .sa-metric-drill small,html[data-theme="dark"] .sa-card-drill>p,html[data-theme="dark"] .sa-drill-row p,html[data-theme="dark"] .sa-drill-row header small,html[data-theme="dark"] .sa-drill-row>small,html[data-theme="dark"] .sa-drill-dates span{ color:#a9bed0; }
html[data-theme="dark"] .sa-drill-product{ border-color:#34536b; background:#102a41; }
html[data-theme="dark"] .sa-drill-product-head{ background:linear-gradient(105deg,#123b43,#112b45); }
html[data-theme="dark"] .sa-drill-product-head b{ color:#e5f0f8; }
html[data-theme="dark"] .sa-drill-product-head strong{ color:#bed4e4; }
html[data-theme="dark"] .sa-deadline.good{ color:#93e9be !important; border-color:#376d52; background:#143d2d; }
html[data-theme="dark"] .sa-deadline.watch{ color:#f5cb7a !important; border-color:#71592f; background:#453719; }
html[data-theme="dark"] .sa-deadline.risk{ color:#ffb4ab !important; border-color:#79423a; background:#472421; }
html[data-theme="dark"] .sa-deadline.neutral{ color:#bdd0df !important; border-color:#3a566b; background:#19384f; }
html[data-theme="dark"] .sa-item-totalizer{ border-color:#34536b; background:#102a41; }
html[data-theme="dark"] .sa-item-totalizer .sa-table-wrap{ border-color:#34536b; }
html[data-theme="dark"] .sa-item-total-row:hover,html[data-theme="dark"] .sa-item-total-row.is-open{ background:#14354e; }
html[data-theme="dark"] .sa-item-total-row td b,html[data-theme="dark"] .sa-item-order-detail>header b{ color:#e4f1f9; }
html[data-theme="dark"] .sa-item-toggle b{ color:#8fe3bd !important; }
html[data-theme="dark"] .sa-item-total-row td small,html[data-theme="dark"] .sa-item-order-detail>p{ color:#a9bed0; }
html[data-theme="dark"] .sa-item-detail-row>td,html[data-theme="dark"] .sa-item-order-detail{ border-color:#345f57; background:#102e41; }
html[data-theme="dark"] .sa-item-order-detail .sa-table-wrap{ border-color:#34536b; background:#102a41; }
html[data-theme="dark"] .sa-item-order-detail tbody tr.attention{ background:#40282b; }
html[data-theme="dark"] .sa-item-order-detail>header span{ color:#8fe3bd; }
html[data-theme="dark"] .sa-item-detail-state{ color:#b6cad9; }
html[data-theme="dark"] .sa-item-total-row td.attention b,html[data-theme="dark"] .sa-item-total-row td.late b,html[data-theme="dark"] .sa-item-order-detail td.attention b,html[data-theme="dark"] .sa-item-order-detail td.late b{ color:#ffb4ab; }
html[data-theme="dark"] .sa-reading-split,html[data-theme="dark"] .sa-reading-segment{ border-color:#34536b; background:#12304a; }
html[data-theme="dark"] .sa-reading-segment:hover,html[data-theme="dark"] .sa-reading-segment.is-open{ background:#14394b; }
html[data-theme="dark"] .sa-reading-segment b{ color:#e5f0f8; }
html[data-theme="dark"] .sa-reading-segment span,html[data-theme="dark"] .sa-reading-segment small{ color:#a9bed0; }
html[data-theme="dark"] .sa-filter-close{ color:#8fe3bd; }
html[data-theme="dark"] .sa-reading-segment:hover{ border-color:#34536b; background:#12304a; }
html[data-theme="dark"] .sa-item-sort:hover,html[data-theme="dark"] .sa-item-sort.active,html[data-theme="dark"] .sa-item-sort i{ color:#8fe3bd; }
html[data-theme="dark"] .sa-collapse-supplier{ border-color:#3a6f5d; color:#8fe3bd; background:#14382f; }
html[data-theme="dark"] .sa-collapse-supplier:hover{ border-color:#57a884; background:#194538; }
html[data-theme="dark"] .sa-order-sort:hover,html[data-theme="dark"] .sa-order-sort.active,html[data-theme="dark"] .sa-order-sort i{ color:#8fe3bd; }
html[data-theme="dark"] .sa-lead-average{ color:#9be8c4; background:#173d32; }
@media (max-width:720px) {
html[data-theme="dark"] .sa-item-totalizer>.sa-table-wrap>table>tbody>.sa-item-total-row,html[data-theme="dark"] .sa-item-order-detail tbody tr{ border-color:#34536b; background:#102a41; }
}
@media (max-width:720px) {
html[data-theme="dark"] .sa-item-totalizer>.sa-table-wrap>table>tbody>.sa-item-total-row>td,html[data-theme="dark"] .sa-item-order-detail tbody tr>td{ border-color:#29465b; }
}
@media (max-width:720px) {
html[data-theme="dark"] .sa-item-totalizer>.sa-table-wrap>table>tbody>.sa-item-total-row>td:first-child,html[data-theme="dark"] .sa-item-order-detail tbody tr>td:first-child{ background:#14354e; }
}
@media (max-width:720px) {
html[data-theme="dark"] .sa-item-totalizer>.sa-table-wrap>table>tbody>.sa-item-total-row>td::before,html[data-theme="dark"] .sa-item-order-detail tbody tr>td::before{ color:#9db3c4; }
}
@container supplier-items (max-width:1250px) {
html[data-theme="dark"] .sa-item-totalizer>.sa-table-wrap>table>tbody>.sa-item-total-row,html[data-theme="dark"] .sa-item-order-detail tbody tr{ border-color:#34536b; background:#102a41; }
}
@container supplier-items (max-width:1250px) {
html[data-theme="dark"] .sa-item-totalizer>.sa-table-wrap>table>tbody>.sa-item-total-row>td,html[data-theme="dark"] .sa-item-order-detail tbody tr>td{ border-color:#29465b; }
}
@container supplier-items (max-width:1250px) {
html[data-theme="dark"] .sa-item-totalizer>.sa-table-wrap>table>tbody>.sa-item-total-row>td:first-child,html[data-theme="dark"] .sa-item-order-detail tbody tr>td:first-child{ background:#14354e; }
}
@container supplier-items (max-width:1250px) {
html[data-theme="dark"] .sa-item-totalizer>.sa-table-wrap>table>tbody>.sa-item-total-row>td::before,html[data-theme="dark"] .sa-item-order-detail tbody tr>td::before{ color:#9db3c4; }
}
html[data-theme="dark"] .sa-item-pager{ color:#a9bed0; }
html[data-theme="dark"] .sa-item-pager b{ color:#e4f1f9; }
html[data-theme="dark"] .sa-item-pager button{ border-color:#3a6f5d; color:#8fe3bd; background:#14382f; }
/* ===== TEMA FORNECEDORES CENTRALIZADO: FIM ===== */

/* ===== COBERTURA CANONICA GERADA: INICIO ===== */
/* Nao editar manualmente: execute scripts/gerar_cobertura_tema_escuro.py --write. */

html[data-theme="dark"] .cj-tecnicon-search input,
html[data-theme="dark"] .br-error,
html[data-theme="dark"] .br-error button,
html[data-theme="dark"] .cj-export-header > button,
html[data-theme="dark"] .cj-export-context,
html[data-theme="dark"] .cj-export-layout-toolbar input,
html[data-theme="dark"] .cj-export-layout-toolbar select,
html[data-theme="dark"] .cj-export-form-grid input,
html[data-theme="dark"] .cj-export-form-grid select,
html[data-theme="dark"] .cj-export-selected-row input,
html[data-theme="dark"] .cj-export-layout-toolbar button,
html[data-theme="dark"] .cj-export-footer button,
html[data-theme="dark"] .cj-export-add-constant,
html[data-theme="dark"] .cj-export-row-actions button,
html[data-theme="dark"] .cj-export-field-actions button,
html[data-theme="dark"] .cj-export-setup,
html[data-theme="dark"] .cj-export-compose,
html[data-theme="dark"] .cj-export-column-name input:hover,
html[data-theme="dark"] .cj-export-column-name input:focus,
html[data-theme="dark"] .cj-export-footer,
html[data-theme="dark"] .sales-daily-legend span,
html[data-theme="dark"] .sales-daily-scroll,
html[data-theme="dark"] .rpm-visual,
html[data-theme="dark"] .sales-control input,
html[data-theme="dark"] .cj-fg-head,
html[data-theme="dark"] .rupture-funnel-detail,
html[data-theme="dark"] .sa-toolbar,
html[data-theme="dark"] .sa-workspace,
html[data-theme="dark"] .sa-supplier:hover,
html[data-theme="dark"] .sa-metric,
html[data-theme="dark"] .sa-form,
html[data-theme="dark"] .sa-brands,
html[data-theme="dark"] .sa-items,
html[data-theme="dark"] .sa-contract,
html[data-theme="dark"] .sa-guide-grid article,
html[data-theme="dark"] .sa-listing,
html[data-theme="dark"] .sa-expand,
html[data-theme="dark"] .sa-reading-grid article,
html[data-theme="dark"] .sa-drill-empty,
html[data-theme="dark"] .cj-system-news-detail-back {
  border-color: var(--cj-theme-line) !important;
  background: var(--cj-theme-surface-raised) !important;
  color: #dbe8f4 !important;
  -webkit-text-fill-color: #dbe8f4 !important;
}

html[data-theme="dark"] .cj-auth-toast,
html[data-theme="dark"] .cj-access-status.ready,
html[data-theme="dark"] .cj-tecnicon-results > button.selected .cj-tecnicon-result-action,
html[data-theme="dark"] .cj-menu-module-editor,
html[data-theme="dark"] .cj-linked-sellers > div,
html[data-theme="dark"] .cj-access-preview-head > b.ready,
html[data-theme="dark"] .br-curve-cell i,
html[data-theme="dark"] .br-row.open .br-open,
html[data-theme="dark"] .br-item-curves i,
html[data-theme="dark"] .br-coverage-body>footer>span,
html[data-theme="dark"] .cj-export-section-title > span,
html[data-theme="dark"] .cj-export-selected-fields,
html[data-theme="dark"] .cj-export-preview-meta,
html[data-theme="dark"] .rupture-export-button,
html[data-theme="dark"] .sales-daily-bar,
html[data-theme="dark"] .supply-table th,
html[data-theme="dark"] .supply-table tbody tr:hover,
html[data-theme="dark"] .supply-close,
html[data-theme="dark"] .supply-detail-kpis div,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .seller-central-action-cell button,
html[data-theme="dark"] .seller-treatment-reopen,
html[data-theme="dark"] .seller-central-status.em_ritmo,
html[data-theme="dark"] .seller-central-status.compra_recente,
html[data-theme="dark"] .aud-table th.sortable:hover,
html[data-theme="dark"] .aud-table th.sorted,
html[data-theme="dark"] .aud-tm-normal,
html[data-theme="dark"] .aud2-table th.sorted,
html[data-theme="dark"] .aud2-table th.sortable:hover,
html[data-theme="dark"] .abc-table th.sorted,
html[data-theme="dark"] .abc-a,
html[data-theme="dark"] .abc-normal,
html[data-theme="dark"] .abc-run-rules span,
html[data-theme="dark"] .abc-percent-a,
html[data-theme="dark"] .abc-mini-table th.sorted,
html[data-theme="dark"] .abc-mode-card,
html[data-theme="dark"] .abc-colchooser-head button,
html[data-theme="dark"] .abc-rule-a,
html[data-theme="dark"] .abc-badge.abc-a,
html[data-theme="dark"] .abc-mini-curve-a,
html[data-theme="dark"] .supplier-policy-contract-notice.ready,
html[data-theme="dark"] .state-allows .supplier-policy-state,
html[data-theme="dark"] .supplier-policy-state.state-allows,
html[data-theme="dark"] .policy-analysis-badge.applied,
html[data-theme="dark"] .aud2-context-note,
html[data-theme="dark"] .abc-A,
html[data-theme="dark"] .giro-badge.giro-normal,
html[data-theme="dark"] .cidades4-frota-tipo-click:hover,
html[data-theme="dark"] .cidades4-modelos-close,
html[data-theme="dark"] .cidades4-modelos-aplicar,
html[data-theme="dark"] .cj-fg-refresh,
html[data-theme="dark"] .cj-fg-aplicar,
html[data-theme="dark"] .cj-fg-modelos-btn,
html[data-theme="dark"] .cj-fg-refresh:hover,
html[data-theme="dark"] .cj-fg-aplicar:hover,
html[data-theme="dark"] .cj-fg-modelos-btn:hover,
html[data-theme="dark"] .cj-fg-modelos-aplicar,
html[data-theme="dark"] .cj-fg-modelos-close,
html[data-theme="dark"] .cj-fg-modelos-aplicar:hover,
html[data-theme="dark"] .cj-fg-modelos-close:hover,
html[data-theme="dark"] .cj-fg-modelos-modal-head button,
html[data-theme="dark"] .cj-fg-modal-footer button,
html[data-theme="dark"] .cj-fg-modelos-modal-head button:hover,
html[data-theme="dark"] .cj-fg-modal-footer button:hover,
html[data-theme="dark"] .goal-status-no-ritmo .goal-pace-badge,
html[data-theme="dark"] .seller-central-table tr.seller-client-selectable:hover,
html[data-theme="dark"] .seller-central-table tr.seller-client-selectable:focus,
html[data-theme="dark"] .seller-client-open-button,
html[data-theme="dark"] .rupture-abc-curve-card .letter,
html[data-theme="dark"] .rupture-criticality.level-adequado,
html[data-theme="dark"] .rupture-criticality.level-baixa,
html[data-theme="dark"] .rupture-abc-badges .abc-A,
html[data-theme="dark"] .rupture-purchase-cell.confirmed,
html[data-theme="dark"] .rupture-decision,
html[data-theme="dark"] .rupture-similarity > header,
html[data-theme="dark"] .rupture-similarity-conclusion .state-ok,
html[data-theme="dark"] .rupture-lead-stages > article.total,
html[data-theme="dark"] .rupture-order-card.state-complete > header > span,
html[data-theme="dark"] .rupture-transfer-card.received > header > span,
html[data-theme="dark"] .rupture-branch-table .branch-open,
html[data-theme="dark"] .rupture-check-actions button,
html[data-theme="dark"] .rupture-global-diagnosis.logistics,
html[data-theme="dark"] .rupture-equivalent-analysis-divider,
html[data-theme="dark"] .rupture-equivalent-analysis-loading,
html[data-theme="dark"] .rupture-abc-badges .xyz-X,
html[data-theme="dark"] .abc-gov-percent-a,
html[data-theme="dark"] .abc-gov-percent-a b,
html[data-theme="dark"] .abc-gov-history-item.is-current,
html[data-theme="dark"] .abc-badge.abc-x,
html[data-theme="dark"] .abc-matrix-table td.best,
html[data-theme="dark"] .abc-gov-preview-result .abc-gov-stock-freeze,
html[data-theme="dark"] .abc-xyz-x,
html[data-theme="dark"] .abc-gov-official-audit,
html[data-theme="dark"] .abc-gov-progress-icon,
html[data-theme="dark"] .abc-status-drill-user-chip,
html[data-theme="dark"] .abc-status-drill-user-avatar,
html[data-theme="dark"] .abc-registration-user,
html[data-theme="dark"] .abc-status-overview-row[aria-expanded="true"] td,
html[data-theme="dark"] .abc-matrix-up,
html[data-theme="dark"] .abc-matrix-cell-card.best,
html[data-theme="dark"] .sa-hero-note,
html[data-theme="dark"] .sa-secondary,
html[data-theme="dark"] .sa-supplier-head i,
html[data-theme="dark"] .sa-guide-grid,
html[data-theme="dark"] .sa-supplier-grid:hover,
html[data-theme="dark"] .sa-tabs,
html[data-theme="dark"] .sa-tabs button:hover,
html[data-theme="dark"] .cj-system-news-trigger.has-pending,
html[data-theme="dark"] .cj-system-news-release,
html[data-theme="dark"] .cj-system-news-read-state {
  border-color: #2c6a48 !important;
  background: var(--cj-dark-green-soft) !important;
  color: #8deab5 !important;
  -webkit-text-fill-color: #8deab5 !important;
}

html[data-theme="dark"] .cj-access-step code,
html[data-theme="dark"] .cj-access-activity-summary,
html[data-theme="dark"] .cj-access-privacy-note,
html[data-theme="dark"] .cj-tecnicon-results > button:hover,
html[data-theme="dark"] .cj-permission-intro,
html[data-theme="dark"] .br-feedback,
html[data-theme="dark"] .br-curve-cell .curve-B,
html[data-theme="dark"] .br-curve-cell .curve-N,
html[data-theme="dark"] .br-open,
html[data-theme="dark"] .br-branches article>span,
html[data-theme="dark"] .br-item-curves i.xyz,
html[data-theme="dark"] .cj-export-dialog,
html[data-theme="dark"] .cj-export-header,
html[data-theme="dark"] .cj-export-layout-toolbar,
html[data-theme="dark"] .cj-export-selected-row,
html[data-theme="dark"] .cj-export-order,
html[data-theme="dark"] .cj-export-preview-table th,
html[data-theme="dark"] #view-dashboard.cj-role-home-manager .sales-daily-performance:not([hidden]),
html[data-theme="dark"] .sidebar-telemetria-v2,
html[data-theme="dark"] .seller-goal-legend > div,
html[data-theme="dark"] .seller-goal-legend > div.other,
html[data-theme="dark"] .seller-central-status,
html[data-theme="dark"] .seller-central-status.ativo_com_equipe,
html[data-theme="dark"] .seller-central-method,
html[data-theme="dark"] .aud-table th,
html[data-theme="dark"] .aud-badge,
html[data-theme="dark"] .aud-tm-alta,
html[data-theme="dark"] .abc-mini-table th,
html[data-theme="dark"] .abc-table th,
html[data-theme="dark"] .abc-badge,
html[data-theme="dark"] .abc-b,
html[data-theme="dark"] .abc-n,
html[data-theme="dark"] .abc-novo-com-estoque,
html[data-theme="dark"] .abc-novo-sem-estoque,
html[data-theme="dark"] .abc-param-field-v5,
html[data-theme="dark"] .abc-percent-b,
html[data-theme="dark"] .abc-percent-n,
html[data-theme="dark"] .abc-mode-comparativo,
html[data-theme="dark"] .abc-mini-table tfoot td,
html[data-theme="dark"] .abc-comp-curva-mini span,
html[data-theme="dark"] .abc-mini-curve-pill,
html[data-theme="dark"] .abc-rule-b,
html[data-theme="dark"] .abc-badge.abc-b,
html[data-theme="dark"] .abc-badge.abc-n,
html[data-theme="dark"] .abc-mini-curve-b,
html[data-theme="dark"] .abc-mini-curve-n,
html[data-theme="dark"] .abc-comp-metrics-v5 span,
html[data-theme="dark"] .rupture-supplier-policy-head,
html[data-theme="dark"] .rupture-supplier-physical-rule,
html[data-theme="dark"] .supplier-policy-contract-notice,
html[data-theme="dark"] .supplier-policy-state,
html[data-theme="dark"] .rupture-supplier-policy-metrics > span,
html[data-theme="dark"] .supplier-policy-current-grid > span,
html[data-theme="dark"] .rupture-supplier-policy-empty,
html[data-theme="dark"] .rupture-supplier-policy-modal > article,
html[data-theme="dark"] .supplier-policy-unknown-copy,
html[data-theme="dark"] .supplier-policy-form-note,
html[data-theme="dark"] .abc-comp-metrics-v6 span,
html[data-theme="dark"] .abc-help-dot,
html[data-theme="dark"] .abc-legenda-close-v7,
html[data-theme="dark"] .abc-legenda-section-v7,
html[data-theme="dark"] .abc-B,
html[data-theme="dark"] .abc-N,
html[data-theme="dark"] .giro-badge,
html[data-theme="dark"] .giro-badge.sem-giro-sem-estoque,
html[data-theme="dark"] .giro-badge.novo-com-estoque,
html[data-theme="dark"] .giro-badge.novo-sem-estoque,
html[data-theme="dark"] .aud-colunas-actions button,
html[data-theme="dark"] .cidades4-frota-row > td,
html[data-theme="dark"] .cidades4-frota-tipo,
html[data-theme="dark"] .cidades4-modelos-table th,
html[data-theme="dark"] .cj-fg-table th,
html[data-theme="dark"] .cj-fg-top-tipos span,
html[data-theme="dark"] .cj-fg-modelos-row > td,
html[data-theme="dark"] .cj-fg-modelos-table th,
html[data-theme="dark"] .cj-fg-modal-table th,
html[data-theme="dark"] .ops-manual-update,
html[data-theme="dark"] .ops-manual-start:disabled,
html[data-theme="dark"] .ops-history-head,
html[data-theme="dark"] .admin-ops .admin-doc-item,
html[data-theme="dark"] .seller-attention-list button,
html[data-theme="dark"] .culture-phrase-dot,
html[data-theme="dark"] .scope-update-progress,
html[data-theme="dark"] .rupture-abc-curve-card.curve-B .letter,
html[data-theme="dark"] .rupture-abc-curve-card.curve-D .letter,
html[data-theme="dark"] .rupture-abc-curve-card.curve-E .letter,
html[data-theme="dark"] .rupture-abc-curve-card.curve-N .letter,
html[data-theme="dark"] .rupture-abc-badges b,
html[data-theme="dark"] .rupture-abc-badges .abc-B,
html[data-theme="dark"] .rupture-abc-badges .abc-I,
html[data-theme="dark"] .rupture-abc-owner,
html[data-theme="dark"] .rupture-abc-owner.owner-logistica,
html[data-theme="dark"] .rupture-abc-owner.owner-compras_e_logistica,
html[data-theme="dark"] .rupture-investigation-modal > article,
html[data-theme="dark"] .rupture-investigation-close,
html[data-theme="dark"] .rupture-decision.owner-LOGISTICA,
html[data-theme="dark"] .rupture-decision.owner-logistica,
html[data-theme="dark"] .rupture-similarity-conclusion .state-logistics,
html[data-theme="dark"] .rupture-similarity-grid h4,
html[data-theme="dark"] .rupture-similarity-grid tr.inactive,
html[data-theme="dark"] .rupture-lead-owner,
html[data-theme="dark"] .rupture-order-card > header > span,
html[data-theme="dark"] .rupture-transfer-card > header > span,
html[data-theme="dark"] .rupture-delivery-progress,
html[data-theme="dark"] .rupture-order-dates span,
html[data-theme="dark"] .rupture-equivalent-analysis-concepts span,
html[data-theme="dark"] .rupture-abc-badges .xyz-N,
html[data-theme="dark"] .rupture-abc-badges .xyz-I,
html[data-theme="dark"] .rupture-minimum-classification-role,
html[data-theme="dark"] .rupture-global-evidence-note,
html[data-theme="dark"] .abc-gov-percent-b,
html[data-theme="dark"] .abc-gov-percent-b b,
html[data-theme="dark"] .abc-gov-percent-d,
html[data-theme="dark"] .abc-gov-percent-e,
html[data-theme="dark"] .abc-badge.abc-m,
html[data-theme="dark"] .abc-badge.abc-i,
html[data-theme="dark"] .rupture-abc-curve-card.curve-M .letter,
html[data-theme="dark"] .abc-matrix-switch,
html[data-theme="dark"] .abc-strategy-card.info,
html[data-theme="dark"] .abc-matrix-product-segments-3d>code,
html[data-theme="dark"] .abc-analysis-unavailable,
html[data-theme="dark"] .abc-gov-progress-stage,
html[data-theme="dark"] .abc-gov-progress-meter,
html[data-theme="dark"] .abc-gov-progress-params > div,
html[data-theme="dark"] .abc-status-drill-loading,
html[data-theme="dark"] .abc-status-drill-tabs,
html[data-theme="dark"] .abc-matrix-card-group,
html[data-theme="dark"] .abc-matrix-cell-card.empty,
html[data-theme="dark"] .sa-hero,
html[data-theme="dark"] .sa-page input,
html[data-theme="dark"] .sa-page select,
html[data-theme="dark"] .sa-page textarea,
html[data-theme="dark"] .sa-suppliers,
html[data-theme="dark"] .sa-detail,
html[data-theme="dark"] .sa-detail-tags i,
html[data-theme="dark"] .sa-commercial-summary article,
html[data-theme="dark"] .sa-page th,
html[data-theme="dark"] .sa-guide,
html[data-theme="dark"] .sa-listing-head,
html[data-theme="dark"] .sa-column-head,
html[data-theme="dark"] .sa-interpretation,
html[data-theme="dark"] .cj-system-news-text-section,
html[data-theme="dark"] .cj-system-news-detail-back span {
  border-color: #355b84 !important;
  background: var(--cj-dark-blue-soft) !important;
  color: #9fcaff !important;
  -webkit-text-fill-color: #9fcaff !important;
}

html[data-theme="dark"] .cj-access-status.warning,
html[data-theme="dark"] .cj-permission-master-note,
html[data-theme="dark"] .cj-access-preview-head > b,
html[data-theme="dark"] .br-curve-cell .curve-C,
html[data-theme="dark"] .seller-central-status.atencao,
html[data-theme="dark"] .seller-central-status.sem_recompra,
html[data-theme="dark"] .seller-central-status.risco,
html[data-theme="dark"] .commercial-analysis-note.goal-history,
html[data-theme="dark"] .aud-tm-negativa,
html[data-theme="dark"] .aud-tm-baixa,
html[data-theme="dark"] .abc-c,
html[data-theme="dark"] .abc-d,
html[data-theme="dark"] .abc-movimento-liq-negativo,
html[data-theme="dark"] .abc-em-maturacao,
html[data-theme="dark"] .abc-warning-box,
html[data-theme="dark"] .abc-percent-c,
html[data-theme="dark"] .abc-percent-d,
html[data-theme="dark"] .abc-rule-c,
html[data-theme="dark"] .abc-rule-d,
html[data-theme="dark"] .abc-badge.abc-c,
html[data-theme="dark"] .abc-badge.abc-d,
html[data-theme="dark"] .abc-mini-curve-c,
html[data-theme="dark"] .abc-mini-curve-d,
html[data-theme="dark"] .supplier-policy-contract-notice.waiting,
html[data-theme="dark"] .state-no-backorder .supplier-policy-state,
html[data-theme="dark"] .supplier-policy-state.state-no-backorder,
html[data-theme="dark"] .policy-analysis-badge.waiting,
html[data-theme="dark"] .supplier-policy-flash,
html[data-theme="dark"] .summary-note-wide,
html[data-theme="dark"] .abc-C,
html[data-theme="dark"] .abc-D,
html[data-theme="dark"] .giro-badge.em-maturacao,
html[data-theme="dark"] .giro-badge.movimento-negativo,
html[data-theme="dark"] .cj-frota-ocultos-toggle,
html[data-theme="dark"] .cj-frota-ocultos-toggle button,
html[data-theme="dark"] .cj-frota-ocultos-toggle button:hover,
html[data-theme="dark"] .goal-status-atencao .goal-pace-badge,
html[data-theme="dark"] .rupture-abc-curve-card.curve-C .letter,
html[data-theme="dark"] .rupture-criticality.level-alto,
html[data-theme="dark"] .rupture-criticality.level-alta,
html[data-theme="dark"] .rupture-criticality.level-medio,
html[data-theme="dark"] .rupture-criticality.level-media,
html[data-theme="dark"] .rupture-abc-badges .abc-C,
html[data-theme="dark"] .rupture-abc-owner.owner-compras,
html[data-theme="dark"] .rupture-decision.owner-COMPRAS,
html[data-theme="dark"] .rupture-decision.owner-compras,
html[data-theme="dark"] .rupture-similarity-conclusion .state-attention,
html[data-theme="dark"] .rupture-similarity-monitor,
html[data-theme="dark"] .rupture-network-state.high,
html[data-theme="dark"] .rupture-order-card.state-partial > header > span,
html[data-theme="dark"] .rupture-transfer-card.untracked > header > span,
html[data-theme="dark"] .rupture-global-diagnosis.high,
html[data-theme="dark"] .rupture-equivalent-analysis tr.discontinued td,
html[data-theme="dark"] .rupture-abc-badges .xyz-Y,
html[data-theme="dark"] .rupture-minimum-conclusion.state-telemetria_maior,
html[data-theme="dark"] .abc-gov-percent-c,
html[data-theme="dark"] .abc-gov-percent-c b,
html[data-theme="dark"] .abc-gov-confirm-check,
html[data-theme="dark"] .abc-badge.abc-y,
html[data-theme="dark"] .abc-strategy-card.caution,
html[data-theme="dark"] .abc-strategy-safety,
html[data-theme="dark"] .abc-unified-operation .abc-run-stock-card.is-lagged,
html[data-theme="dark"] .abc-gov-stock-freeze.is-lagged,
html[data-theme="dark"] .abc-xyz-y,
html[data-theme="dark"] .abc-gov-progress-warning,
html[data-theme="dark"] .sa-alert-grid article,
html[data-theme="dark"] .sa-evaluation,
html[data-theme="dark"] .sa-contract li.wait {
  border-color: #70502f !important;
  background: var(--cj-dark-orange-soft) !important;
  color: #ffd29a !important;
  -webkit-text-fill-color: #ffd29a !important;
}

html[data-theme="dark"] .br-feedback.error,
html[data-theme="dark"] .supply-error-card,
html[data-theme="dark"] .seller-central-status.inativo,
html[data-theme="dark"] .aud-sem-custo,
html[data-theme="dark"] .aud-sem-preco,
html[data-theme="dark"] .aud-base-nao-mapeada,
html[data-theme="dark"] .abc-e,
html[data-theme="dark"] .abc-giro-nulo-real,
html[data-theme="dark"] .abc-percent-e,
html[data-theme="dark"] .abc-rule-e,
html[data-theme="dark"] .abc-badge.abc-e,
html[data-theme="dark"] .abc-mini-curve-e,
html[data-theme="dark"] .abc-E,
html[data-theme="dark"] .giro-badge.estoque-sem-giro,
html[data-theme="dark"] .goal-status-critico .goal-pace-badge,
html[data-theme="dark"] .rupture-criticality.level-critico,
html[data-theme="dark"] .rupture-criticality.level-critica,
html[data-theme="dark"] .rupture-similarity-conclusion .state-critical,
html[data-theme="dark"] .rupture-network-state.critical,
html[data-theme="dark"] .rupture-order-card.state-missing > header > span,
html[data-theme="dark"] .rupture-global-diagnosis.critical,
html[data-theme="dark"] .rupture-equivalent-analysis.critical > header,
html[data-theme="dark"] .rupture-equivalent-analysis.critical > header > b,
html[data-theme="dark"] .rupture-equivalent-analysis-kpis .gap,
html[data-theme="dark"] .rupture-abc-badges .xyz-Z,
html[data-theme="dark"] .abc-gov-confirm-error,
html[data-theme="dark"] .abc-badge.abc-z,
html[data-theme="dark"] .abc-strategy-card.critical,
html[data-theme="dark"] .abc-xyz-z,
html[data-theme="dark"] .abc-gov-progress-overlay.is-error .abc-gov-progress-icon,
html[data-theme="dark"] .sa-save-notice.error {
  border-color: #6e343a !important;
  background: var(--cj-dark-red-soft) !important;
  color: #ff9ea4 !important;
  -webkit-text-fill-color: #ff9ea4 !important;
}

html[data-theme="dark"] .br-curve-cell .curve-D,
html[data-theme="dark"] .br-curve-cell .curve-E,
html[data-theme="dark"] .aud-tm-muito-alta,
html[data-theme="dark"] .abc-gov-percent-d b,
html[data-theme="dark"] .abc-gov-percent-e b,
html[data-theme="dark"] .sa-warranty {
  border-color: #5a477a !important;
  background: #2c2343 !important;
  color: #d7c0ff !important;
  -webkit-text-fill-color: #d7c0ff !important;
}
/* ===== COBERTURA CANONICA GERADA: FIM ===== */

/* ===== GALERIA CULTURAL CJ — COBERTURA ESCURA CANÔNICA ===== */
html[data-theme="dark"] .culture-card.cj-art-editorial {
  --culture-paper: #0c2135;
  --culture-ink: #f1f5fa;
  border-color: #3b5065;
  background: var(--culture-paper);
}

html[data-theme="dark"] .culture-card.cj-art-editorial .culture-artwork {
  background: #172b3d;
}

html[data-theme="dark"] .culture-card.cj-art-editorial .culture-artwork::before {
  background: linear-gradient(90deg, var(--culture-paper) 0%, rgba(12, 33, 53, .74) 30%, rgba(12, 33, 53, 0) 100%);
}

html[data-theme="dark"] .culture-card.cj-art-editorial .culture-copy {
  border: 0 !important;
  background: linear-gradient(90deg, var(--culture-paper) 0%, var(--culture-paper) 82%, rgba(12, 33, 53, .88) 100%) !important;
}

html[data-theme="dark"] .culture-card.cj-art-editorial .culture-copy h2 {
  color: var(--culture-ink) !important;
}

html[data-theme="dark"] .culture-card.cj-art-editorial .culture-copy > p:not(.culture-method) {
  color: #bac8d6 !important;
}

html[data-theme="dark"] .culture-card.cj-art-editorial .culture-method span {
  color: #d2b987 !important;
}

html[data-theme="dark"] .culture-card.cj-art-editorial .scope-badge {
  border-color: rgba(116, 148, 177, .42);
  background: rgba(8, 27, 45, .88);
}

html[data-theme="dark"] .culture-reader,
html[data-theme="dark"] .culture-reader-page {
  background-color: #0b1f31;
  color: #eef4f9;
}

html[data-theme="dark"] .culture-reader-topbar {
  border-color: #334c63;
  background: rgba(10, 31, 49, .92);
}

html[data-theme="dark"] .culture-reader-topbar strong,
html[data-theme="dark"] .culture-reader-close,
html[data-theme="dark"] .culture-reader-introduction h2,
html[data-theme="dark"] .culture-reader-reading h2 {
  color: #eef4f9;
}

html[data-theme="dark"] .culture-reader-close,
html[data-theme="dark"] .culture-reader-reading,
html[data-theme="dark"] .culture-reader-symbol {
  border-color: #334c63;
  background: rgba(18, 48, 72, .78);
}

html[data-theme="dark"] .culture-reader-introduction > p,
html[data-theme="dark"] .culture-reader-reading article > p,
html[data-theme="dark"] .culture-reader-symbol p,
html[data-theme="dark"] .culture-reader-footer span,
html[data-theme="dark"] .culture-reader-footer p {
  color: #b7c6d4;
}

html[data-theme="dark"] .culture-reader-reading blockquote p {
  color: #edf4f9;
}
/* ===== GALERIA CULTURAL CJ — FIM ===== */
