/* ==========================================================================
   Atlas CRM — sincronização tema claro/escuro (jun/2026)
   Corrige painéis com fundo escuro fixo + texto claro/escuro inconsistente.
   ========================================================================== */

/* ── Tokens ── */
body {
    --atlas-bg-page: #0D1117;
    --atlas-bg-surface: #161B22;
    --atlas-bg-elevated: #21262D;
    --atlas-bg-input: #0D1117;
    --atlas-border: rgba(255, 255, 255, 0.08);
    --atlas-border-strong: #30363d;
    --atlas-text: #E6EDF3;
    --atlas-text-secondary: #C9D1D9;
    --atlas-text-muted: #8B949E;
    --atlas-text-faint: #484F58;
    --atlas-accent-on: #F5D76E;
    --atlas-accent-on-bg: rgba(245, 215, 110, 0.15);
    --atlas-accent-on-border: rgba(245, 215, 110, 0.3);
    --atlas-sidebar-bg: #0D0C28;
    --atlas-sidebar-border: rgba(124, 58, 237, 0.25);
    --atlas-row-divider: rgba(255, 255, 255, 0.1);
    --atlas-row-divider-strong: rgba(255, 255, 255, 0.16);
    --atlas-gauge-track-edge: rgba(255, 255, 255, 0.2);
    --atlas-gauge-track-bg: rgba(255, 255, 255, 0.1);
}

body.light-mode {
    --atlas-bg-page: #EFF6FF;
    --atlas-bg-surface: #FFFFFF;
    --atlas-bg-elevated: #F8FAFC;
    --atlas-bg-input: #FFFFFF;
    --atlas-border: rgba(10, 37, 64, 0.12);
    --atlas-border-strong: rgba(10, 37, 64, 0.18);
    --atlas-text: #0A2540;
    --atlas-text-secondary: #1E3A8A;
    --atlas-text-muted: #475569;
    --atlas-text-faint: #64748B;
    --atlas-accent-on: #1E3A8A;
    --atlas-accent-on-bg: rgba(30, 58, 138, 0.08);
    --atlas-accent-on-border: #1E3A8A;
    --atlas-sidebar-bg: #FFFFFF;
    --atlas-sidebar-border: rgba(10, 37, 64, 0.1);
    --atlas-row-divider: rgba(10, 37, 64, 0.12);
    --atlas-row-divider-strong: rgba(10, 37, 64, 0.2);
    --atlas-gauge-track-edge: rgba(10, 37, 64, 0.28);
    --atlas-gauge-track-bg: rgba(10, 37, 64, 0.12);

    --bg-universe: #EFF6FF;
    --bg-orbit: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-title: #1E3A8A;
    --text-main: #0A2540;
    --text-muted: #475569;
    --border-glow: rgba(10, 37, 64, 0.12);
}

body.light-mode::before,
body.light-mode::after {
    opacity: 0.35;
}

/* ── Sidebar acompanha o tema ── */
body.light-mode .sidebar {
    background-color: var(--atlas-sidebar-bg) !important;
    border-right-color: var(--atlas-sidebar-border) !important;
    box-shadow: 1px 0 0 rgba(10, 37, 64, 0.04);
}

body.light-mode .sidebar-brand {
    border-bottom-color: rgba(10, 37, 64, 0.08);
}

body.light-mode .menu-item {
    color: #475569;
}

body.light-mode .menu-item:hover {
    color: #0A2540;
    background-color: rgba(30, 58, 138, 0.06);
}

body.light-mode .menu-item.active {
    color: #1E3A8A;
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.12) 0%, rgba(255, 255, 255, 0) 100%);
    border-left-color: #1E3A8A;
    box-shadow: inset 5px 0 10px rgba(30, 58, 138, 0.04);
}

body.light-mode .sidebar-user-trigger:hover,
body.light-mode .sidebar-user-trigger[aria-expanded="true"] {
    background: rgba(30, 58, 138, 0.08);
    border-color: rgba(30, 58, 138, 0.15);
}

body.light-mode .sidebar-user-menu {
    background: #FFFFFF;
    border-color: rgba(10, 37, 64, 0.12);
    box-shadow: 0 8px 24px rgba(10, 37, 64, 0.12);
}

body.light-mode .sidebar-user-menu-item {
    color: #0A2540;
}

body.light-mode .sidebar-user-menu-item:hover {
    background: rgba(30, 58, 138, 0.06);
}

body.light-mode .profile-info .profile-name {
    color: #0A2540;
}

body.light-mode .profile-info .profile-role,
body.light-mode .sidebar-user-trigger .profile-chevron {
    color: #64748B;
}

body.light-mode .brand-text h1 {
    color: #0A2540;
}

body.light-mode .brand-text span {
    color: #64748B;
}

body.light-mode .main-content {
    background-color: var(--atlas-bg-page);
}

/* Painéis gerais — bordas mais visíveis no modo claro */
body.light-mode .ctx,
body.light-mode .gc,
body.light-mode .cb,
body.light-mode .vc {
    border-color: var(--atlas-border-strong) !important;
    box-shadow: 0 1px 3px rgba(10, 37, 64, 0.06);
}

/* ── Filtros .sf — estado ativo só via CSS (sem inline) ── */
.sf.on {
    font-weight: 600 !important;
    color: var(--atlas-accent-on) !important;
    background: var(--atlas-accent-on-bg) !important;
    border-color: var(--atlas-accent-on-border) !important;
}

.sf.sf-green.on {
    color: #22C55E !important;
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

body.light-mode .sf.sf-green.on {
    color: #15803D !important;
    background: rgba(22, 163, 74, 0.1) !important;
    border-color: rgba(22, 163, 74, 0.35) !important;
}

/* ── Painéis com fundo #161B22 / #21262D inline ── */
body.light-mode .pg [style*="background:#161B22"],
body.light-mode .pg [style*="background: #161B22"],
body.light-mode .pg [style*="background:#21262D"],
body.light-mode .pg [style*="background: #21262D"],
body.light-mode #v-extrator [style*="background:#161B22"],
body.light-mode #v-extrator [style*="background: #161B22"],
body.light-mode #v-clientes .cli-toolbar-zone,
body.light-mode #v-clientes .cli-filters-bar {
    background: var(--atlas-bg-surface) !important;
    border-color: var(--atlas-border) !important;
}

body.light-mode #v-extrator [style*="background:#0D1117"],
body.light-mode #v-extrator [style*="background: #0D1117"] {
    background: var(--atlas-bg-input) !important;
    border-color: var(--atlas-border-strong) !important;
}

/* Labels e textos muted inline */
body.light-mode [style*="color:#484F58"],
body.light-mode [style*="color: #484F58"],
body.light-mode [style*="color:#8b949e"],
body.light-mode [style*="color: #8b949e"],
body.light-mode [style*="color:#8B949E"],
body.light-mode [style*="color: #8B949E"] {
    color: var(--atlas-text-muted) !important;
}

body:not(.light-mode) [style*="color:#0A2540"],
body:not(.light-mode) [style*="color: #0A2540"],
body:not(.light-mode) [style*="color:#1E3A8A"],
body:not(.light-mode) [style*="color: #1E3A8A"] {
    color: var(--atlas-text-secondary) !important;
}

body.light-mode [style*="color:#E6EDF3"],
body.light-mode [style*="color: #E6EDF3"],
body.light-mode [style*="color:#c9d1d9"],
body.light-mode [style*="color: #c9d1d9"],
body.light-mode [style*="color:#C9D1D9"],
body.light-mode [style*="color: #C9D1D9"] {
    color: var(--atlas-text) !important;
}

body.light-mode h2[style*="color:#E6EDF3"],
body.light-mode h2[style*="color: #E6EDF3"] {
    color: var(--atlas-text) !important;
}

/* Inputs / selects com tema escuro fixo */
body.light-mode select[style*="background:#0D1117"],
body.light-mode select[style*="background: #0D1117"],
body.light-mode input[style*="background:#0D1117"],
body.light-mode input[style*="background: #0D1117"],
body.light-mode .cli-filters-bar input,
body.light-mode .cli-filters-bar select,
body.light-mode #cli-faixa-gasto {
    background: var(--atlas-bg-input) !important;
    color: var(--atlas-text) !important;
    border-color: var(--atlas-border-strong) !important;
}

body.light-mode .form-group input,
body.light-mode .form-group select {
    background-color: var(--atlas-bg-input) !important;
    color: var(--atlas-text) !important;
    border-color: var(--atlas-border-strong) !important;
}

body.light-mode .perfil-card-panel,
body.light-mode .admin-users-panel {
    background-color: var(--atlas-bg-surface) !important;
    border-color: var(--atlas-border) !important;
    box-shadow: 0 2px 12px rgba(10, 37, 64, 0.06);
}

body.light-mode .panel-subtitle,
body.light-mode .field-hint {
    color: var(--atlas-text-muted) !important;
}

/* Botões .lt (filtro loja) no modo claro */
body.light-mode .lt {
    background: #FFFFFF !important;
    color: var(--atlas-text-muted) !important;
    border-color: var(--atlas-border-strong) !important;
}

body.light-mode .lt:hover,
body.light-mode .lt.on {
    color: var(--atlas-text) !important;
    border-color: #1E3A8A !important;
    background: rgba(30, 58, 138, 0.06) !important;
}

/* Cards Metas Carol — texto legível nos dois temas */
.mc-loja-card {
    border-radius: 10px;
    padding: 12px 13px;
    background: color-mix(in srgb, var(--loja-accent, #3B82F6) 14%, var(--atlas-bg-surface));
    border: 1.5px solid color-mix(in srgb, var(--loja-accent, #3B82F6) 38%, var(--atlas-border));
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body.light-mode .mc-loja-card {
    border-color: color-mix(in srgb, var(--loja-accent, #3B82F6) 45%, rgba(10, 37, 64, 0.2)) !important;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.08);
}

.mc-loja-cod {
    font-size: 9px;
    color: var(--atlas-text-faint);
    margin-bottom: 2px;
}

.mc-loja-nome {
    font-size: 11px;
    font-weight: 700;
    color: var(--atlas-text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.mc-loja-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--atlas-text);
}

.mc-loja-sub {
    font-size: 9px;
    color: var(--atlas-text-muted);
    margin-bottom: 4px;
}

.mc-loja-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.mc-loja-meta-row:last-child {
    margin-bottom: 0;
}

.mc-loja-meta-k {
    font-size: 9px;
    color: var(--atlas-text-faint);
}

.mc-loja-sep {
    border-top: 1px solid var(--atlas-border);
    margin-bottom: 8px;
}

.mc-loja-bar {
    height: 3px;
    background: var(--atlas-border);
    border-radius: 2px;
    margin-bottom: 4px;
    overflow: hidden;
}

.mc-loja-bar > div {
    height: 100%;
    border-radius: 2px;
}

/* Barra resumo rede metascarol */
body.light-mode #mc-rede-bar [style*="background:#161B22"],
body.light-mode #mc-rede-bar [style*="background: #161B22"] {
    background: var(--atlas-bg-surface) !important;
}

/* Toggle tema no header */
body.light-mode #theme-toggle {
    background: rgba(30, 58, 138, 0.08) !important;
    border-color: rgba(30, 58, 138, 0.2) !important;
    color: #0A2540 !important;
}

body:not(.light-mode) #theme-toggle {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #E6EDF3 !important;
}

body.light-mode .live b,
body.light-mode .live {
    color: var(--atlas-text) !important;
}

/* ── Texto utilitário (substitui #484F58 inline) ── */
.atlas-text-main { color: var(--atlas-text) !important; }
.atlas-text-muted { color: var(--atlas-text-muted) !important; }
.atlas-text-sub { color: var(--atlas-text-faint) !important; }

body:not(.light-mode) td[style*="color:#484F58"],
body:not(.light-mode) td[style*="color: #484F58"],
body:not(.light-mode) div[style*="color:#484F58"],
body:not(.light-mode) span[style*="color:#484F58"] {
    color: var(--atlas-text-muted) !important;
}

body.light-mode td[style*="color:#8B949E"],
body.light-mode td[style*="color: #8B949E"],
body.light-mode td[style*="color:#8b949e"] {
    color: var(--atlas-text-muted) !important;
}

/* ── Listas / tabelas — separador de linha padrão ── */
.tw table tbody td,
.cli-table-wrap table tbody td,
#tb-vd tbody td,
#tb-corrida tbody td,
#tb-corrida-full tbody td,
.mini-table table tbody td {
    border-bottom: 1px solid var(--atlas-row-divider-strong) !important;
}

.tw table tbody tr:last-child td,
.cli-table-wrap table tbody tr:last-child td,
#tb-vd tbody tr:last-child td,
#tb-corrida tbody tr:last-child td,
#tb-corrida-full tbody tr:last-child td {
    border-bottom: none !important;
}

.vd-tr td {
    border-bottom: 1px solid var(--atlas-row-divider-strong) !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
}

.tw,
.cli-table-wrap {
    background: var(--atlas-bg-elevated) !important;
    border: 1px solid var(--atlas-border-strong) !important;
    border-radius: 10px;
    overflow: hidden;
}

.tw table thead tr,
.cli-table-wrap table thead tr {
    background: var(--atlas-bg-surface) !important;
    border-bottom: 1px solid var(--atlas-row-divider-strong) !important;
}

body.light-mode .tw,
body.light-mode .cli-table-wrap {
    background: #FFFFFF !important;
    box-shadow: 0 1px 3px rgba(10, 37, 64, 0.06);
}

body.light-mode th {
    color: var(--atlas-text-muted) !important;
}

/* Clientes & Leads — respiro entre tabela e paginação */
.cli-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 4px;
    color: #8b949e;
    font-size: 12px;
}
.cli-pagination-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Nexus — painel lateral com seções espaçadas */
.nexus-side-panel .nexus-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #30363d;
}
.nexus-side-panel .nexus-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.nexus-side-panel #ext-mode-cards {
    gap: 12px !important;
    margin-bottom: 20px !important;
    position: relative;
    z-index: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.nexus-side-panel .ext-mode-card {
    pointer-events: auto;
    position: relative;
    z-index: 3;
}
.nexus-side-panel .ext-mode-card[data-mode="vendas_varias"] {
    grid-column: 1 / -1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 16px !important;
}
.nexus-side-panel .ext-mode-card[data-mode="vendas_varias"] .ext-mode-bot6-title {
    font-size: 13px;
    font-weight: 700;
    color: #14B8A6;
    margin-bottom: 6px;
    line-height: 1.35;
}
.nexus-side-panel .ext-mode-card[data-mode="vendas_varias"] .ext-mode-bot6-sub {
    font-size: 12px;
    color: #8b949e;
    line-height: 1.45;
}
body.light-mode #v-extrator .ext-mode-card[data-mode="vendas_varias"] .ext-mode-bot6-sub {
    color: #64748B !important;
}
.nexus-side-panel #ext-panel-filiais,
.nexus-side-panel #ext-schedule-panel,
.nexus-side-panel #ext-cloud-panel {
    position: relative;
    z-index: 1;
}
.nexus-side-panel #ext-sched-rows {
    gap: 14px !important;
}
.nexus-side-panel .ext-sched-row {
    margin-bottom: 0 !important;
}
.nexus-side-panel #ext-schedule-panel {
    margin-top: 20px;
    padding-top: 20px;
}
.nexus-side-panel .ext-sched-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.nexus-side-panel .ext-sched-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #8b949e;
    text-transform: uppercase;
}
.nexus-side-panel .ext-sched-master-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #c9d1d9;
    cursor: pointer;
    user-select: none;
}
.nexus-side-panel .ext-sched-master-chk {
    accent-color: #14B8A6;
    width: 14px;
    height: 14px;
}
.nexus-side-panel .ext-sched-hint-callout {
    margin: 0 0 12px;
    font-size: 10px;
    color: #484F58;
    line-height: 1.45;
}
.nexus-side-panel .ext-sched-list,
.nexus-side-panel #ext-sched-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nexus-side-panel .ext-sched-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0D1117;
    margin-bottom: 0 !important;
}
.nexus-side-panel .ext-sched-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    min-width: 0;
}
.nexus-side-panel .ext-sched-mode-title {
    font-size: 12px;
    font-weight: 600;
    color: #c9d1d9;
    line-height: 1.3;
}
.nexus-side-panel .ext-sched-en {
    accent-color: #14B8A6;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.nexus-side-panel .ext-sched-controls {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}
.nexus-side-panel .ext-sched-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.nexus-side-panel .ext-sched-field-label {
    font-size: 9px;
    font-weight: 600;
    color: #6e7681;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.nexus-side-panel .ext-sched-tm,
.nexus-side-panel .ext-sched-iv {
    background: #161B22;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 11px;
    padding: 5px 6px;
    font-family: inherit;
}
.nexus-side-panel .ext-sched-tm {
    min-width: 88px;
}
.nexus-side-panel .ext-sched-iv {
    width: 52px;
}
.nexus-side-panel .ext-sched-next {
    margin: 12px 0 10px;
    font-size: 11px;
    color: #8b949e;
    line-height: 1.45;
}
.nexus-side-panel .ext-sched-save-btn {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(20, 184, 166, 0.45);
    border-radius: 8px;
    background: rgba(20, 184, 166, 0.12);
    color: #14B8A6;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.nexus-side-panel .ext-sched-save-btn:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.65);
}
.nexus-side-panel .ext-export-panel {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #21262d;
}
.nexus-side-panel .ext-export-summary {
    padding-top: 4px;
}
.nexus-side-panel .ext-export-summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nexus-side-panel .ext-export-summary-row {
    padding: 10px 10px 9px;
    border: 1px solid #21262d;
    border-radius: 8px;
    background: #0D1117;
}
.nexus-side-panel .ext-export-summary-row--active {
    border-color: rgba(20, 184, 166, 0.45);
    background: rgba(20, 184, 166, 0.06);
}
.nexus-side-panel .ext-export-summary-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.nexus-side-panel .ext-export-summary-row-title {
    font-size: 11px;
    font-weight: 700;
    color: #E6EDF3;
}
.nexus-side-panel .ext-export-summary-when {
    font-size: 11px;
    font-weight: 600;
    color: #14B8A6;
    margin-bottom: 2px;
}
.nexus-side-panel .ext-export-summary-detail {
    font-size: 10px;
    color: #8b949e;
    line-height: 1.45;
    word-break: break-word;
}
.nexus-side-panel .ext-export-summary-dl {
    flex-shrink: 0;
    width: 30px;
    height: 28px;
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 6px;
    background: rgba(20, 184, 166, 0.1);
    color: #14B8A6;
    cursor: pointer;
    font-size: 12px;
}
.nexus-side-panel .ext-export-summary-dl:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.nexus-side-panel .ext-export-summary-dl:not(:disabled):hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.55);
}
.nexus-side-panel .ext-export-summary-filials {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #21262d;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.nexus-side-panel .ext-export-summary-filial {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
}
.nexus-side-panel .ext-export-summary-filial-label {
    font-weight: 600;
    color: #C9D1D9;
    min-width: 52px;
}
.nexus-side-panel .ext-export-summary-filial-when {
    flex: 1;
    color: #8b949e;
}
.nexus-side-panel .ext-export-summary-dl-filial {
    flex-shrink: 0;
    width: 26px;
    height: 24px;
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 5px;
    background: rgba(20, 184, 166, 0.08);
    color: #14B8A6;
    cursor: pointer;
    font-size: 10px;
}
.nexus-side-panel .ext-export-summary-filial--empty .ext-export-summary-filial-when {
  color: #6e7681;
  font-style: italic;
}
.nexus-side-panel .ext-export-summary-dl-filial:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.nexus-side-panel .ext-export-summary-dl-filial:not(:disabled):hover {
    background: rgba(20, 184, 166, 0.18);
}
.nexus-side-panel .ext-btn-export:not(:disabled):hover {
    background: rgba(20, 184, 166, 0.2) !important;
    border-color: rgba(20, 184, 166, 0.65) !important;
}
body.light-mode #v-extrator .ext-export-panel {
    border-top-color: rgba(10, 37, 64, 0.1);
}
body.light-mode #v-extrator .ext-export-summary-row {
    background: #fff;
    border-color: rgba(10, 37, 64, 0.12);
}
body.light-mode #v-extrator .ext-export-summary-row--active {
    border-color: rgba(13, 148, 136, 0.45);
    background: rgba(20, 184, 166, 0.08);
}
body.light-mode #v-extrator .ext-export-summary-row-title {
    color: #0A2540;
}
body.light-mode #v-extrator .ext-export-summary-detail,
body.light-mode #v-extrator #ext-export-summary-hint {
    color: #64748B !important;
}
body.light-mode #v-extrator #ext-export-meta,
body.light-mode #v-extrator #ext-export-hint {
    color: #64748B !important;
}
body.light-mode #v-extrator .ext-btn-export {
    background: rgba(20, 184, 166, 0.1) !important;
    color: #0D9488 !important;
}
.nexus-side-panel #ext-panel-vendas,
.nexus-side-panel #ext-panel-ocr,
.nexus-side-panel #ext-busy-banner {
    margin-bottom: 16px !important;
}

/* ── Botões ghost (Histórico, paginação clientes) ── */
.atlas-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--atlas-bg-elevated);
    border: 1px solid var(--atlas-border-strong);
    color: #58a6ff;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}

.atlas-btn-ghost:hover {
    background: var(--atlas-bg-surface);
    border-color: #58a6ff;
}

body.light-mode .atlas-btn-ghost {
    color: #1D4ED8;
    background: #F0F9FF;
    border-color: rgba(29, 78, 216, 0.25);
}

/* ── Mapa: legenda e Top 10 seguem o tema ── */
#cli-mapa-legend,
#cli-mapa-sem-pin {
    background: var(--atlas-bg-surface) !important;
    border: 1px solid var(--atlas-border-strong) !important;
    color: var(--atlas-text-secondary) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

body:not(.light-mode) #cli-mapa-legend,
body:not(.light-mode) #cli-mapa-sem-pin {
    background: rgba(22, 27, 34, 0.94) !important;
}

#cli-mapa-legend-title,
#cli-mapa-sem-pin-toggle {
    color: var(--atlas-text) !important;
}
body.light-mode #cli-mapa-sem-pin-toggle {
    color: #1D4ED8 !important;
}
body.light-mode #cli-mapa-sem-pin-list .cli-sem-pin-n {
    color: #0369A1 !important;
}

.cli-mapa-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 12px;
}

.cli-mapa-legend-cod {
    color: var(--atlas-text);
    font-weight: 700;
}

.cli-mapa-legend-nome {
    color: var(--atlas-text-muted);
}

#cli-mapa-heat-legend {
    border-top-color: var(--atlas-row-divider-strong) !important;
}

#cli-mapa-heat-legend-title,
.cli-mapa-heat-row {
    color: var(--atlas-text-muted) !important;
}

#cli-mapa-top10,
.cli-mapa-top10-slot {
    background: var(--atlas-bg-elevated) !important;
    border-color: var(--atlas-border-strong) !important;
}

#cli-mapa-top10-title,
.cli-mapa-top10-slot .cli-mapa-top10-title {
    color: var(--atlas-text-muted) !important;
}

.cli-mapa-top10-rank {
    color: var(--atlas-text-muted) !important;
}

.cli-mapa-top10-name {
    color: var(--atlas-text) !important;
}

#cli-mapa-top10-list li {
    border-bottom: 1px solid var(--atlas-row-divider-strong);
    padding-bottom: 10px !important;
    margin-bottom: 6px !important;
}

#cli-mapa-top10-list li:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
}

/* ── Toolbar Clientes — modo claro: pills claras, não pretas ── */
body.light-mode #cli-view-toggle,
body.light-mode #cli-mapa-metric-toggle,
body.light-mode #cli-mapa-pos-toggle,
body.light-mode #cli-mapa-preset-novos,
body.light-mode #cli-mapa-btn-compare,
body.light-mode #cli-faixa-gasto {
    background: var(--atlas-bg-elevated) !important;
    border-color: var(--atlas-border-strong) !important;
    color: var(--atlas-text-muted) !important;
}

body.light-mode #cli-view-toggle button,
body.light-mode #cli-mapa-metric-toggle button,
body.light-mode #cli-mapa-pos-toggle button {
    color: var(--atlas-text-muted) !important;
}

body.light-mode #cli-mapa-metric-bar {
    border-top-color: var(--atlas-row-divider-strong) !important;
}

/* Painel Gerenciar Vendedores */
body.light-mode #v-config > div[style*="background"] {
    background: var(--atlas-bg-surface) !important;
}

/* ==========================================================================
   Bordas e separadores — painéis Atlas (jun/2026)
   ========================================================================== */

/* ── KPI strip (.ms) — borda externa + divisores verticais ── */
.ms {
    background: var(--atlas-bg-surface) !important;
    border: 1px solid var(--atlas-border-strong) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.mi {
    border-right: 1px solid var(--atlas-row-divider-strong) !important;
}

body.light-mode .miv {
    color: #B45309 !important;
    font-weight: 600;
}

body.light-mode .mil {
    color: var(--atlas-text-muted) !important;
}

/* ── Corrida Zeiss — grid de regras ── */
.atlas-rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--atlas-bg-surface);
    border: 1px solid var(--atlas-border-strong);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.atlas-rules-col {
    padding: 16px 18px;
    border-right: 1px solid var(--atlas-row-divider-strong);
}

.atlas-rules-col--last {
    border-right: none;
}

body.light-mode .atlas-rules-col [style*="color:#F5D76E"],
body.light-mode .atlas-rules-col [style*="color: #F5D76E"] {
    color: #B45309 !important;
}

@media (max-width: 768px) {
    .atlas-rules-grid {
        grid-template-columns: 1fr;
    }
    .atlas-rules-col {
        border-right: none;
        border-bottom: 1px solid var(--atlas-row-divider-strong);
    }
    .atlas-rules-col--last {
        border-bottom: none;
    }
}

/* ── Compras — painel por loja ── */
.cp-loja-panel {
    background: var(--atlas-bg-surface);
    border: 1px solid var(--atlas-border-strong);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cp-loja-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--atlas-row-divider-strong);
}

.cp-loja-stripe {
    width: 4px;
    height: 20px;
    border-radius: 2px;
    flex-shrink: 0;
}

.cp-loja-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--atlas-text);
}

.cp-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 10px;
}

.cp-cat-card {
    background: var(--atlas-bg-elevated);
    border: 1px solid var(--atlas-border-strong);
    border-radius: 8px;
    padding: 12px;
}

.cp-cat-card--total {
    border-width: 2px;
    border-color: color-mix(in srgb, var(--cp-accent, #3B82F6) 55%, var(--atlas-border-strong));
    background: color-mix(in srgb, var(--cp-accent, #3B82F6) 8%, var(--atlas-bg-surface));
    position: relative;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--cp-accent, #3B82F6) 12%, transparent);
}

.cp-cat-total-badge {
    position: absolute;
    top: -9px;
    right: 10px;
    background: var(--cp-accent, #3B82F6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.cp-cat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--atlas-row-divider-strong);
}

.cp-cat-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.cp-cat-sub {
    font-size: 9px;
    color: var(--atlas-text-muted);
    margin-top: 1px;
}

.cp-cat-status {
    font-size: 10px;
    font-weight: 600;
}

.cp-cat-rows {
    display: grid;
    gap: 0;
}

.cp-cat-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 5px 0;
    border-bottom: 1px solid var(--atlas-row-divider);
}

.cp-cat-row:last-child,
.cp-cat-row--total {
    border-bottom: none;
}

.cp-cat-row--total {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--atlas-row-divider-strong);
}

.cp-cat-k {
    color: var(--atlas-text-muted);
}

.cp-cat-v {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--atlas-text);
}

.cp-loja-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--atlas-row-divider-strong);
}

.cp-total-box {
    text-align: center;
    padding: 12px 10px;
    border-radius: 8px;
    border: 1px solid var(--atlas-border-strong);
}

.cp-total-box--rx {
    background: color-mix(in srgb, #60A5FA 10%, var(--atlas-bg-surface));
    border-color: color-mix(in srgb, #60A5FA 35%, var(--atlas-border-strong));
}

.cp-total-box--sol {
    background: color-mix(in srgb, #F59E0B 10%, var(--atlas-bg-surface));
    border-color: color-mix(in srgb, #F59E0B 35%, var(--atlas-border-strong));
}

.cp-total-box--geral {
    background: color-mix(in srgb, #22C55E 10%, var(--atlas-bg-surface));
    border-color: color-mix(in srgb, #22C55E 35%, var(--atlas-border-strong));
}

.cp-total-lbl {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--atlas-text-muted);
}

.cp-total-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    margin-top: 2px;
}

/* ── Sugestão de compras por marca ── */
.atlas-sugestao-panel {
    background: var(--atlas-bg-surface);
    border: 1px solid var(--atlas-border-strong);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.atlas-sugestao-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--atlas-row-divider-strong);
}

.atlas-sugestao-stripe {
    width: 6px;
    height: 24px;
    border-radius: 3px;
    flex-shrink: 0;
}

.atlas-sugestao-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--atlas-text);
}

.atlas-sugestao-sub {
    font-size: 10px;
    color: var(--atlas-text-muted);
    margin-top: 2px;
}

.atlas-sugestao-geral {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: color-mix(in srgb, #A371F7 12%, var(--atlas-bg-surface));
    border: 1px solid color-mix(in srgb, #A371F7 35%, var(--atlas-border-strong));
    padding: 8px 14px;
    border-radius: 6px;
}

.atlas-sugestao-geral-lbl {
    font-size: 10px;
    color: #A371F7;
    font-weight: 700;
}

.atlas-sugestao-geral-val {
    font-size: 20px;
    color: #A371F7;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.atlas-sugestao-geral-unit {
    font-size: 10px;
    color: #A371F7;
}

.atlas-sugestao-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.atlas-sugestao-col {
    border: 1px solid var(--atlas-border-strong);
    border-radius: 8px;
    overflow: hidden;
    background: var(--atlas-bg-elevated);
}

.atlas-sugestao-col-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--atlas-row-divider-strong);
}

.atlas-sugestao-col--rx .atlas-sugestao-col-head {
    background: color-mix(in srgb, #60A5FA 12%, var(--atlas-bg-surface));
    border-bottom-color: color-mix(in srgb, #60A5FA 30%, var(--atlas-row-divider-strong));
}

.atlas-sugestao-col--sol .atlas-sugestao-col-head {
    background: color-mix(in srgb, #F59E0B 12%, var(--atlas-bg-surface));
    border-bottom-color: color-mix(in srgb, #F59E0B 30%, var(--atlas-row-divider-strong));
}

.atlas-sugestao-col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.atlas-sugestao-col--rx .atlas-sugestao-col-title { color: #60A5FA; }
.atlas-sugestao-col--sol .atlas-sugestao-col-title { color: #F59E0B; }

.atlas-sugestao-col-sub {
    font-size: 9px;
    color: var(--atlas-text-muted);
    margin-top: 1px;
}

.atlas-sugestao-col-total {
    font-size: 18px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.atlas-sugestao-col--rx .atlas-sugestao-col-total { color: #60A5FA; }
.atlas-sugestao-col--sol .atlas-sugestao-col-total { color: #F59E0B; }

.atlas-sugestao-marcas {
    padding: 4px 0;
}

.atlas-sugestao-marca {
    padding: 8px 12px;
    border-bottom: 1px solid var(--atlas-row-divider);
}

.atlas-sugestao-marca:last-child {
    border-bottom: none;
}

.atlas-sugestao-marca--rayban {
    border-left: 3px solid #EF4444;
    background: color-mix(in srgb, #EF4444 6%, var(--atlas-bg-elevated));
}

.atlas-sugestao-marca-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.atlas-sugestao-marca-nome {
    font-size: 11px;
    color: var(--atlas-text);
    font-weight: 500;
}

.atlas-sugestao-marca-nome--bold {
    font-weight: 700;
}

.atlas-sugestao-marca-qtd {
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.atlas-sugestao-bar {
    height: 3px;
    background: var(--atlas-border);
    border-radius: 2px;
    overflow: hidden;
}

.atlas-sugestao-bar > div {
    height: 100%;
    border-radius: 2px;
}

.atlas-sugestao-soma {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    border-top: 2px solid var(--atlas-row-divider-strong);
}

.atlas-sugestao-soma--rx {
    color: #60A5FA;
    background: color-mix(in srgb, #60A5FA 6%, var(--atlas-bg-elevated));
    border-top-color: #60A5FA;
}

.atlas-sugestao-soma--sol {
    color: #F59E0B;
    background: color-mix(in srgb, #F59E0B 6%, var(--atlas-bg-elevated));
    border-top-color: #F59E0B;
}

.atlas-sugestao-empty {
    font-size: 11px;
    color: #22C55E;
    padding: 16px;
    text-align: center;
}

@media (max-width: 768px) {
    .atlas-sugestao-cols {
        grid-template-columns: 1fr;
    }
    .cp-loja-totals {
        grid-template-columns: 1fr;
    }
}

/* ── Config — painel com borda mais escura ── */
.atlas-config-panel {
    background: var(--atlas-bg-surface) !important;
    border: 1px solid var(--atlas-border-strong) !important;
    border-radius: 12px !important;
    padding: 24px 28px !important;
    box-shadow: 0 2px 12px rgba(10, 37, 64, 0.08);
    display: block !important;
    overflow: visible !important;
}

body.light-mode .atlas-config-panel h2 {
    color: var(--atlas-text) !important;
}

/* ── Perfil — título mais escuro no modo claro ── */
body.light-mode .perfil-card-panel h3,
body.light-mode #v-perfil .perfil-card-panel h3 {
    color: #0A2540 !important;
    font-weight: 700;
}

/* ==========================================================================
   Refino bordas — Top 10, gráficos .cb, share gauges, config (jun/2026)
   ========================================================================== */

/* ── Top 10 mapa — linhas e células mais visíveis ── */
#cli-mapa-top10,
.cli-mapa-top10-slot {
    border: 1px solid var(--atlas-border-strong) !important;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.08);
}

#cli-mapa-top10-title,
.cli-mapa-top10-slot .cli-mapa-top10-title {
    color: var(--atlas-text) !important;
    padding-bottom: 10px;
    margin-bottom: 10px !important;
    border-bottom: 1px solid var(--atlas-row-divider-strong);
}

#cli-mapa-top10-list li {
    border: 1px solid var(--atlas-row-divider-strong) !important;
    border-radius: 8px !important;
    margin-bottom: 6px !important;
    padding: 10px 10px !important;
    background: var(--atlas-bg-elevated) !important;
    align-items: stretch !important;
}

#cli-mapa-top10-list li:hover {
    background: var(--atlas-bg-surface) !important;
    border-color: var(--atlas-border-strong) !important;
}

#cli-mapa-top10-list li.selected {
    border-color: rgba(139, 92, 246, 0.55) !important;
    background: color-mix(in srgb, #8B5CF6 10%, var(--atlas-bg-surface)) !important;
}

.cli-mapa-top10-rank {
    border-right: 1px solid var(--atlas-row-divider-strong);
    padding-right: 8px;
    margin-right: 2px;
    align-self: stretch;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
    color: var(--atlas-text-muted) !important;
}

.cli-mapa-top10-body {
    border-right: 1px solid var(--atlas-row-divider);
    padding-right: 10px;
    margin-right: 2px;
}

.cli-mapa-top10-total {
    padding-left: 4px;
    min-width: 72px;
    text-align: right;
}

body.light-mode .cli-mapa-top10-total--fat {
    color: #B45309 !important;
}

body.light-mode .cli-mapa-top10-name {
    color: var(--atlas-text) !important;
}

body.light-mode .cli-mapa-top10-city,
body.light-mode .cli-mapa-top10-clients {
    color: var(--atlas-text-muted) !important;
}

.cli-mapa-top10-slot li {
    border-bottom: 1px solid var(--atlas-row-divider-strong) !important;
    padding: 8px 6px !important;
}

/* ── Gráficos .cb — painel como referência (print 5) ── */
.cb {
    background: var(--atlas-bg-surface) !important;
    border: 1px solid var(--atlas-border-strong) !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 4px rgba(10, 37, 64, 0.08);
}

.cb .ch {
    padding-bottom: 10px;
    margin-bottom: 12px !important;
    border-bottom: 1px solid var(--atlas-row-divider-strong);
}

.cb .ct {
    color: var(--atlas-text) !important;
}

.cb > div[style*="position:relative"],
.cb-chart-area {
    border: 1px solid var(--atlas-row-divider-strong);
    border-radius: 8px;
    padding: 10px 8px 6px;
    background: var(--atlas-bg-elevated);
}

body.light-mode .cb {
    box-shadow: 0 2px 10px rgba(10, 37, 64, 0.07);
}

/* ── Share de peças / tipo de lente — cards no estilo .cb ── */
.atlas-share-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.atlas-share-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sp-card {
    background: var(--atlas-bg-surface) !important;
    border: 1px solid var(--atlas-border-strong) !important;
    border-radius: 10px !important;
    padding: 16px 14px !important;
    box-shadow: 0 1px 4px rgba(10, 37, 64, 0.08);
    min-width: 0 !important;
}

.sp-card .sp-label {
    padding-top: 4px;
    margin-top: 4px;
    border-top: 1px solid var(--atlas-row-divider);
    width: 100%;
    text-align: center;
}

.sp-card .sp-val {
    color: var(--atlas-text-muted) !important;
}

/* ── Gauges semicirculares — trilha com borda (share peças / tipo lente) ── */
.atlas-gauge-track-edge {
    stroke: var(--atlas-gauge-track-edge);
}

.atlas-gauge-track {
    stroke: var(--atlas-gauge-track-bg);
}

.atlas-gauge-fill {
    /* cor definida inline no SVG */
}

.atlas-gauge-pct {
    dominant-baseline: middle;
    pointer-events: none;
}

body.light-mode .sp-pct {
    font-weight: 700;
}

@media (max-width: 900px) {
    .atlas-share-grid,
    .atlas-share-grid.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .atlas-share-grid,
    .atlas-share-grid.cols-3 {
        grid-template-columns: 1fr;
    }
}

/* ── Config — layout em coluna (sem .ctx flex) ── */
.atlas-config-panel .config-vendedores-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--atlas-row-divider-strong);
}

.atlas-config-panel .config-vendedores-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--atlas-text);
}

.atlas-config-filter {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--atlas-row-divider-strong);
}

.atlas-config-filter label {
    display: block;
    font-size: 11px;
    color: var(--atlas-text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.atlas-config-filter select {
    width: 100%;
    padding: 10px 12px;
    background: var(--atlas-bg-input);
    border: 1px solid var(--atlas-border-strong);
    border-radius: 8px;
    color: var(--atlas-text);
    font-size: 13px;
}

.atlas-config-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--atlas-text-muted);
    border: 1px dashed var(--atlas-border-strong);
    border-radius: 10px;
    background: var(--atlas-bg-elevated);
    font-size: 13px;
}

.atlas-config-panel .config-vendedores-add {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Nexus Extrator — tema claro (agenda, modos, sync) ── */
body.light-mode #v-extrator .ext-sched-title,
body.light-mode #v-extrator .ext-sched-hint-callout,
body.light-mode #v-extrator .ext-sched-next {
    color: var(--atlas-text-muted) !important;
}
body.light-mode #v-extrator .ext-sched-mode-title,
body.light-mode #v-extrator .ext-sched-master-label {
    color: var(--atlas-text) !important;
}
body.light-mode #v-extrator .ext-sched-row {
    background: var(--atlas-bg-input) !important;
    border-color: var(--atlas-border-strong) !important;
}
body.light-mode #v-extrator .ext-sched-row span,
body.light-mode #v-extrator .ext-sched-row label {
    color: var(--atlas-text-secondary) !important;
}
body.light-mode #v-extrator .ext-sched-row input[type="time"],
body.light-mode #v-extrator .ext-sched-row input[type="number"] {
    background: var(--atlas-bg-surface) !important;
    border-color: var(--atlas-border-strong) !important;
    color: var(--atlas-text) !important;
}
body.light-mode #v-extrator .ext-mode-card:not(.ext-mode-active) {
    background: var(--atlas-bg-input) !important;
    border-color: var(--atlas-border-strong) !important;
    color: var(--atlas-text) !important;
}
body.light-mode #v-extrator .ext-mode-card:not(.ext-mode-active) [style*="color:#8b949e"],
body.light-mode #v-extrator .ext-mode-card:not(.ext-mode-active) [style*="color: #8b949e"] {
    color: var(--atlas-text-muted) !important;
}
body.light-mode #v-extrator .ext-sched-save-btn,
body.light-mode #v-extrator #ext-cloud-panel button {
    background: var(--atlas-bg-surface) !important;
    border-color: var(--atlas-border-strong) !important;
    color: var(--atlas-text-secondary) !important;
}
body.light-mode #v-extrator #ext-btn-start {
    color: #fff !important;
}
body.light-mode #v-extrator #ext-btn-stop:not(:disabled) {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

/* ── Catálogo — tema claro ── */
body.light-mode #v-catalogo .cat-kpi,
body.light-mode #v-catalogo .cat-panel,
body.light-mode #v-catalogo .cat-ingest-panel,
body.light-mode #v-catalogo .cat-grid-toolbar,
body.light-mode #v-catalogo .cat-card,
body.light-mode #v-catalogo .cat-modal {
    background: var(--atlas-bg-surface) !important;
    border-color: var(--atlas-border-strong) !important;
}
body.light-mode #v-catalogo .cat-kpi-val,
body.light-mode #v-catalogo .cat-card-brand,
body.light-mode #v-catalogo .cat-modal-header h2 {
    color: var(--atlas-text) !important;
}
body.light-mode #v-catalogo .cat-kpi-lbl,
body.light-mode #v-catalogo .cat-panel-title,
body.light-mode #v-catalogo .cat-zone-label,
body.light-mode #v-catalogo .cat-pager {
    color: var(--atlas-text-muted) !important;
}
body.light-mode #v-catalogo .cat-store-chip {
    background: var(--atlas-bg-input) !important;
    border-color: var(--atlas-border-strong) !important;
}
body.light-mode #v-catalogo .cat-grid-toolbar input,
body.light-mode #v-catalogo .cat-filter-btn {
    background: var(--atlas-bg-input) !important;
    border-color: var(--atlas-border-strong) !important;
    color: var(--atlas-text) !important;
}
body.light-mode #v-catalogo .cat-card-ref,
body.light-mode #v-catalogo .cat-card-estoque,
body.light-mode #v-catalogo .cat-card-meta {
    color: var(--atlas-text-muted) !important;
}
body.light-mode #v-catalogo .cat-card-loja {
    background: #F1F5F9 !important;
    border-color: rgba(10, 37, 64, 0.12) !important;
}
body.light-mode #v-catalogo .cat-card-loja.has {
    background: rgba(22, 163, 74, 0.14) !important;
    border-color: rgba(22, 163, 74, 0.4) !important;
}
body.light-mode #v-catalogo .cat-card-loja.highlight {
    border-color: #7C3AED !important;
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.35) !important;
}
body.light-mode #v-catalogo .cat-card-loja .qty {
    color: #334155 !important;
}
body.light-mode #v-catalogo .cat-card-loja.has .qty {
    color: #15803D !important;
    font-weight: 800;
}
body.light-mode #v-catalogo .cat-card-loja .lbl {
    color: #64748B !important;
}
body.light-mode #v-catalogo .cat-card-loja.has .lbl {
    color: #166534 !important;
}
body.light-mode #v-catalogo .cat-card-preco.muted {
    color: #94A3B8 !important;
}

/* ── Garantias embed — fundo segue tema Atlas ── */
body.light-mode #v-garantias #atlas-garantias-frame {
    background: #EFF6FF;
}
body:not(.light-mode) #v-garantias #atlas-garantias-frame {
    background: #0D1117;
}
