/* ==========================================================================
   GERENCIADOR SELECT — FOREST & GOLD DESIGN SYSTEM (v1.0)
   Tema Claro: Verde Floresta (#405C4E) + Dourado (#B68B4C) + Fundo Quente (#F8F7F3)
   Tema Escuro: Verde Floresta (#435B4E) + Café Quente (#3E3730) + Container Bege (#534A40) + Champagne (#D9B680)
   Sobrescreve apenas a camada visual sobre style.css + obsidian-theme.css.
   Zero alteração de lógica JS ou regras de negócio.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS — TEMA ESCURO (PADRÃO / body.dark-mode)
   -------------------------------------------------------------------------- */
:root,
body.dark-mode {
    --fg-topbar: #435B4E;
    --fg-sidebar: #435B4E;
    --fg-sidebar-border: rgba(255, 255, 255, 0.12);
    --fg-sidebar-text: #E8EFEA;
    --fg-sidebar-muted: #AFC4B8;
    --fg-sidebar-hover: rgba(255, 255, 255, 0.10);
    --fg-sidebar-active-bg: rgba(255, 255, 255, 0.17);
    --fg-sidebar-active-border: rgba(217, 182, 128, 0.42);
    --fg-sidebar-active-text: #FFFFFF;

    --fg-bg: #443D35;
    --fg-card: #5E5449;
    --fg-card-subtle: #534A40;
    --fg-card-hover: #695D51;
    --fg-input: #3D352D;
    --fg-border: rgba(245, 226, 192, 0.36);
    --fg-border-hover: rgba(245, 226, 192, 0.58);
    --fg-border-gold: #E8C589;
    --fg-shadow: 0 2px 10px rgba(20, 16, 12, 0.22);

    --fg-text: #FFFFFF;
    --fg-text-muted: #EFE7DC;
    --fg-text-soft: #D6CCBF;

    --fg-gold: #E4BE7E;
    --fg-gold-hover: #F0CE93;
    --fg-gold-btn-text: #1F1812;
    --fg-gold-soft: rgba(228, 190, 126, 0.26);
    --fg-gold-text: #F7DAA4;

    --fg-ok-bg: rgba(52, 211, 153, 0.20);
    --fg-ok-text: #4ADE80;
    --fg-warn-bg: rgba(251, 191, 36, 0.22);
    --fg-warn-text: #FCD34D;
    --fg-err-bg: rgba(251, 113, 133, 0.22);
    --fg-err-text: #FF7B8E;
    --fg-info-bg: rgba(96, 165, 250, 0.22);
    --fg-info-text: #7CC4FF;

    /* Sincronização com tokens legados do sistema */
    --bg-main: var(--fg-bg);
    --bg-surface: var(--fg-card-subtle);
    --card-bg: var(--fg-card);
    --card-border: var(--fg-border);
    --input-bg: var(--fg-input);
    --glass: var(--fg-card);
    --hover-bg: rgba(255, 255, 255, 0.05);

    --primary: var(--fg-gold);
    --primary-hover: var(--fg-gold-hover);
    --primary-glow: rgba(217, 182, 128, 0.24);
    --accent: #56D68B;
    --error: #F08A78;
    --warn: #E7C58E;
    --info: #92C2EA;

    --text-main: var(--fg-text);
    --text-muted: var(--fg-text-muted);

    --obs-bg: var(--fg-bg);
    --obs-sidebar: var(--fg-sidebar);
    --obs-surface: var(--fg-card);
    --obs-surface-2: var(--fg-card-subtle);
    --obs-border: var(--fg-border);
    --obs-border-hover: var(--fg-border-hover);
    --obs-sheen: inset 0 1px 0 rgba(255, 245, 228, 0.07);
    --obs-shadow: var(--fg-shadow);
}

/* --------------------------------------------------------------------------
   2. TOKENS — TEMA CLARO (body.light-mode)
   -------------------------------------------------------------------------- */
body.light-mode {
    --fg-topbar: #3A5447;
    --fg-sidebar: #405C4E;
    --fg-sidebar-border: rgba(255, 255, 255, 0.11);
    --fg-sidebar-text: #E8EFEA;
    --fg-sidebar-muted: #A7BCB0;
    --fg-sidebar-hover: rgba(255, 255, 255, 0.09);
    --fg-sidebar-active-bg: linear-gradient(90deg, #C09353 0%, #AD8043 100%);
    --fg-sidebar-active-border: rgba(255, 255, 255, 0.16);
    --fg-sidebar-active-text: #FFFFFF;

    --fg-bg: #F6F4EE;
    --fg-card: #FFFFFF;
    --fg-card-subtle: #F4F1EA;
    --fg-card-hover: #FAF8F3;
    --fg-input: #FFFFFF;
    --fg-border: #CCC5B7;
    --fg-border-hover: #B0A694;
    --fg-border-gold: #A97932;
    --fg-shadow: 0 1px 3px rgba(34, 48, 40, 0.07), 0 4px 12px -4px rgba(34, 48, 40, 0.06);

    --fg-text: #111A15;
    --fg-text-muted: #3A4740;
    --fg-text-soft: #56635C;

    --fg-gold: #A67732;
    --fg-gold-hover: #8D6223;
    --fg-gold-btn-text: #FFFFFF;
    --fg-gold-soft: #F7E8CC;
    --fg-gold-text: #7A5218;

    --fg-ok-bg: #DCFCE7;
    --fg-ok-text: #15803D;
    --fg-warn-bg: #FEF3C7;
    --fg-warn-text: #B45309;
    --fg-err-bg: #FEE2E2;
    --fg-err-text: #DC2626;
    --fg-info-bg: #E0F2FE;
    --fg-info-text: #0369A1;

    /* Sincronização com tokens legados */
    --bg-main: var(--fg-bg);
    --bg-surface: var(--fg-card);
    --card-bg: var(--fg-card);
    --card-border: var(--fg-border);
    --input-bg: var(--fg-input);
    --glass: var(--fg-card);
    --hover-bg: #F2F0E8;

    --primary: var(--fg-gold);
    --primary-hover: var(--fg-gold-hover);
    --primary-glow: rgba(182, 139, 76, 0.16);
    --accent: #226B43;
    --error: #B83939;
    --warn: #9E6920;
    --info: #2D5F85;

    --text-main: var(--fg-text);
    --text-muted: var(--fg-text-muted);

    --obs-bg: var(--fg-bg);
    --obs-sidebar: var(--fg-sidebar);
    --obs-surface: var(--fg-card);
    --obs-surface-2: var(--fg-card-subtle);
    --obs-border: var(--fg-border);
    --obs-border-hover: var(--fg-border-hover);
    --obs-sheen: none;
    --obs-shadow: var(--fg-shadow);
}

/* --------------------------------------------------------------------------
   3. FUNDO GLOBAL & TIPOGRAFIA
   -------------------------------------------------------------------------- */
html,
body,
body.dark-mode,
body.light-mode {
    background-color: var(--fg-bg) !important;
    background-image: none !important;
    color: var(--fg-text) !important;
}

main.content {
    background: transparent !important;
    color: var(--fg-text) !important;
}

h1, h2, h3, h4, .page-title, .obs-panel-title {
    color: var(--fg-text) !important;
}

.dashboard-section-title,
body.light-mode .dashboard-section-title,
body.dark-mode .dashboard-section-title {
    color: var(--fg-text-muted) !important;
}

.dashboard-section-title::after,
body.light-mode .dashboard-section-title::after,
body.dark-mode .dashboard-section-title::after {
    background: var(--fg-border) !important;
}

/* --------------------------------------------------------------------------
   4. SIDEBAR VERDE FLORESTA (AMBOS OS TEMAS)
   -------------------------------------------------------------------------- */
aside.sidebar,
body.dark-mode aside.sidebar,
body.light-mode aside.sidebar {
    background: var(--fg-sidebar) !important;
    border-right: 1px solid var(--fg-sidebar-border) !important;
    box-shadow: none !important;
    color: var(--fg-sidebar-text) !important;
}

aside.sidebar .obs-sidebar-logo,
body.light-mode aside.sidebar .obs-sidebar-logo,
body.dark-mode aside.sidebar .obs-sidebar-logo {
    background: var(--fg-topbar) !important;
    border-bottom: 1px solid var(--fg-sidebar-border) !important;
    padding: 0 1rem !important;
}

aside.sidebar .obs-sidebar-logo .sidebar-banner,
body.light-mode aside.sidebar .obs-sidebar-logo .sidebar-banner,
body.dark-mode aside.sidebar .obs-sidebar-logo .sidebar-banner {
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    max-width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    object-fit: contain !important;
}

aside.sidebar .obs-nav-divider {
    background: var(--fg-sidebar-border) !important;
}

aside.sidebar nav .nav-item,
aside.sidebar nav a.nav-item,
aside.sidebar nav a.nav-item:link,
aside.sidebar nav a.nav-item:visited,
body.dark-mode aside.sidebar nav .nav-item,
body.dark-mode aside.sidebar nav a.nav-item,
body.light-mode aside.sidebar nav .nav-item,
body.light-mode aside.sidebar nav a.nav-item,
body.light-mode aside.sidebar nav a.nav-item:link,
body.light-mode aside.sidebar nav a.nav-item:visited,
body.dark-mode .sidebar nav .nav-item,
body.light-mode .sidebar nav .nav-item {
    color: #EBF1ED !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
}

aside.sidebar nav .nav-item span,
aside.sidebar nav .nav-item div,
body.light-mode aside.sidebar nav .nav-item span,
body.light-mode aside.sidebar nav .nav-item div,
body.dark-mode aside.sidebar nav .nav-item span,
body.dark-mode aside.sidebar nav .nav-item div {
    color: #EBF1ED !important;
}

aside.sidebar nav .nav-item i,
body.dark-mode aside.sidebar nav .nav-item i,
body.light-mode aside.sidebar nav .nav-item i,
body.dark-mode .sidebar nav .nav-item i,
body.light-mode .sidebar nav .nav-item i {
    color: #CFE0D6 !important;
}

aside.sidebar nav .nav-item:hover,
aside.sidebar nav .nav-item:hover span,
body.dark-mode aside.sidebar nav .nav-item:hover,
body.dark-mode aside.sidebar nav .nav-item:hover span,
body.light-mode aside.sidebar nav .nav-item:hover,
body.light-mode aside.sidebar nav .nav-item:hover span,
body.dark-mode .sidebar nav .nav-item:hover,
body.light-mode .sidebar nav .nav-item:hover {
    background: var(--fg-sidebar-hover) !important;
    color: #FFFFFF !important;
}

aside.sidebar nav .nav-item:hover span,
body.light-mode aside.sidebar nav .nav-item:hover span,
body.dark-mode aside.sidebar nav .nav-item:hover span {
    background: transparent !important;
}

aside.sidebar nav .nav-item:hover i,
body.dark-mode aside.sidebar nav .nav-item:hover i,
body.light-mode aside.sidebar nav .nav-item:hover i,
body.dark-mode .sidebar nav .nav-item:hover i,
body.light-mode .sidebar nav .nav-item:hover i {
    color: #FFFFFF !important;
}

aside.sidebar nav .nav-item.active,
body.dark-mode aside.sidebar nav .nav-item.active,
body.light-mode aside.sidebar nav .nav-item.active,
body.dark-mode .sidebar nav .nav-item.active,
body.light-mode .sidebar nav .nav-item.active {
    background: var(--fg-sidebar-active-bg) !important;
    color: var(--fg-sidebar-active-text) !important;
    border: 1px solid var(--fg-sidebar-active-border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16) !important;
    font-weight: 600 !important;
}

aside.sidebar nav .nav-item.active span,
aside.sidebar nav .nav-item.active i,
body.light-mode aside.sidebar nav .nav-item.active span,
body.light-mode aside.sidebar nav .nav-item.active i,
body.dark-mode aside.sidebar nav .nav-item.active span,
body.dark-mode aside.sidebar nav .nav-item.active i {
    color: #FFFFFF !important;
    background: transparent !important;
}

/* Rodapé / Monitores da Sidebar */
aside.sidebar .obs-sidebar-monitors,
body.light-mode aside.sidebar .obs-sidebar-monitors,
body.dark-mode aside.sidebar .obs-sidebar-monitors {
    border-top: 1px solid var(--fg-sidebar-border) !important;
    background: rgba(0, 0, 0, 0.12) !important;
}

aside.sidebar .obs-monitor-icon-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--fg-sidebar-text) !important;
}

aside.sidebar .obs-monitor-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16) !important;
}

/* --------------------------------------------------------------------------
   5. TOPBAR VERDE FLORESTA (AMBOS OS TEMAS)
   -------------------------------------------------------------------------- */
body main.content > header.obs-topbar,
header.obs-topbar,
body.light-mode main.content > header.obs-topbar,
body.light-mode header.obs-topbar,
body.dark-mode main.content > header.obs-topbar,
body.dark-mode header.obs-topbar {
    background: var(--fg-topbar) !important;
    border-bottom: 1px solid var(--fg-sidebar-border) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12) !important;
}

body main.content > header.obs-topbar h1#page-title,
body.light-mode header.obs-topbar h1#page-title,
body.dark-mode header.obs-topbar h1#page-title {
    color: #FFFFFF !important;
}

header.obs-topbar .mobile-only-btn,
body.light-mode header.obs-topbar .mobile-only-btn {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

header.obs-topbar .obs-ghost-icon,
body.light-mode header.obs-topbar .obs-ghost-icon,
body.dark-mode header.obs-topbar .obs-ghost-icon {
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 999px !important;
}

header.obs-topbar .obs-ghost-icon:hover,
body.light-mode header.obs-topbar .obs-ghost-icon:hover,
body.dark-mode header.obs-topbar .obs-ghost-icon:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #FFFFFF !important;
}

header.obs-topbar .obs-theme-icon-btn,
body.light-mode header.obs-topbar .obs-theme-icon-btn,
body.dark-mode header.obs-topbar .obs-theme-icon-btn {
    color: #F3D49B !important;
}

header.obs-topbar .obs-avatar-btn,
body.light-mode header.obs-topbar .obs-avatar-btn {
    background: #E8EFEA !important;
    border: 1.5px solid rgba(217, 182, 128, 0.65) !important;
    color: #2E4539 !important;
}

header.obs-topbar .obs-avatar-btn:hover {
    border-color: #E4C492 !important;
}

/* Dropdown de Conta */
.obs-user-dropdown,
body.light-mode .obs-user-dropdown,
body.dark-mode .obs-user-dropdown {
    background: var(--fg-card) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25) !important;
}

.obs-user-dropdown-meta {
    color: var(--fg-text-muted) !important;
}

.obs-user-dropdown-divider {
    background: var(--fg-border) !important;
}

/* --------------------------------------------------------------------------
   6. CARDS, KPIs, VENCIMENTOS E PAINÉIS
   -------------------------------------------------------------------------- */
.card,
.premium-card,
.obs-kpi-card,
.venc-card,
.obs-chart-panel,
.obs-today-panel,
.summary-mini-card,
.modal-content,
.table-container,
body.dark-mode .card,
body.dark-mode .premium-card,
body.dark-mode .obs-kpi-card,
body.dark-mode #dashboard-tab .venc-card,
body.dark-mode .venc-card,
body.dark-mode .obs-chart-panel,
body.dark-mode .modal-content,
body.dark-mode .table-container,
body.dark-mode #clients-tab .table-container,
body.light-mode .card,
body.light-mode .premium-card,
body.light-mode .obs-kpi-card,
body.light-mode .venc-card,
body.light-mode .obs-chart-panel,
body.light-mode .modal-content,
body.light-mode .table-container {
    background: var(--fg-card) !important;
    border: 1px solid var(--fg-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--fg-shadow) !important;
    color: var(--fg-text) !important;
}

.obs-kpi-card:hover,
.venc-card:hover,
body.dark-mode .venc-card:hover,
body.light-mode .venc-card:hover {
    border-color: var(--fg-border-gold) !important;
    background: var(--fg-card-hover) !important;
}

.obs-kpi-label,
.obs-panel-sub,
.obs-kpi-sub,
body.light-mode .obs-kpi-sub,
.venc-card .venc-value,
body.dark-mode .venc-card .venc-value,
body.light-mode .venc-card .venc-value {
    color: var(--fg-text-muted) !important;
}

.obs-kpi-value,
.obs-venc-grid .venc-count,
.venc-card .venc-count,
body.dark-mode .venc-card .venc-count,
body.light-mode .obs-kpi-value,
body.light-mode .obs-venc-grid .venc-count,
.obs-kpi-sub b,
body.light-mode .obs-kpi-sub b,
.obs-prev-month-pill strong,
body.light-mode .obs-prev-month-pill strong {
    color: var(--fg-text) !important;
}

.venc-card .venc-title,
body.dark-mode .venc-card .venc-title,
body.light-mode .obs-venc-grid .venc-title {
    color: var(--fg-text) !important;
}

.obs-kpi-icon {
    background: var(--fg-gold-soft) !important;
    color: var(--fg-gold-text) !important;
    border: 1px solid var(--fg-border) !important;
}

.obs-kpi-icon.emerald {
    background: var(--fg-ok-bg) !important;
    color: var(--fg-ok-text) !important;
}

.obs-kpi-pill.emerald {
    background: var(--fg-ok-bg) !important;
    color: var(--fg-ok-text) !important;
    border: none !important;
}

.obs-kpi-pill.indigo {
    background: var(--fg-gold-soft) !important;
    color: var(--fg-gold-text) !important;
    border: none !important;
}

.obs-kpi-pill.muted,
.venc-card .venc-badge,
body.dark-mode .venc-card .venc-badge,
.obs-prev-month-pill,
body.light-mode .obs-prev-month-pill {
    background: var(--fg-card-subtle) !important;
    color: var(--fg-text-muted) !important;
    border: 1px solid var(--fg-border) !important;
}

/* Destaque dourado sutil no card Vence Hoje */
.venc-card.venc-hoje {
    border-color: var(--fg-border-gold) !important;
}

/* --------------------------------------------------------------------------
   7. BOTÕES, FILTROS EM PILL & INPUTS
   -------------------------------------------------------------------------- */
button.btn.primary,
.btn.primary,
.btn-new-client-icon,
body.dark-mode button.btn.primary,
body.dark-mode .btn-new-client-icon,
body.light-mode button.btn.primary,
body.light-mode .btn-new-client-icon {
    background: var(--fg-gold) !important;
    color: var(--fg-gold-btn-text) !important;
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14) !important;
}

button.btn.primary:hover,
.btn.primary:hover,
.btn-new-client-icon:hover {
    background: var(--fg-gold-hover) !important;
    filter: none !important;
}

button.btn.secondary,
.btn.secondary,
body.dark-mode button.btn.secondary,
body.light-mode button.btn.secondary {
    background: var(--fg-card-subtle) !important;
    color: var(--fg-text) !important;
    border: 1px solid var(--fg-border) !important;
    border-radius: 999px !important;
}

button.btn.secondary:hover,
.btn.secondary:hover,
body.dark-mode button.btn.secondary:hover {
    border-color: var(--fg-border-gold) !important;
    background: var(--fg-card-hover) !important;
}

/* Filtros da aba Clientes */
#clients-tab #status-filter-buttons .filter-btn,
body.dark-mode #clients-tab #status-filter-buttons .filter-btn,
body.light-mode #clients-tab #status-filter-buttons .filter-btn {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text-muted) !important;
    border-radius: 999px !important;
}

#clients-tab #status-filter-buttons .filter-btn:hover,
body.dark-mode #clients-tab #status-filter-buttons .filter-btn:hover,
body.light-mode #clients-tab #status-filter-buttons .filter-btn:hover {
    border-color: var(--fg-border-gold) !important;
    color: var(--fg-text) !important;
}

#clients-tab #status-filter-buttons .filter-btn.active,
body.dark-mode #clients-tab #status-filter-buttons .filter-btn.active,
body.light-mode #clients-tab #status-filter-buttons .filter-btn.active {
    background: var(--fg-gold-soft) !important;
    border-color: var(--fg-border-gold) !important;
    color: var(--fg-gold-text) !important;
    font-weight: 600 !important;
}

#clients-tab #status-filter-buttons .filter-btn.filter-danger.active,
body.dark-mode #clients-tab #status-filter-buttons .filter-btn.filter-danger.active,
body.light-mode #clients-tab #status-filter-buttons .filter-btn.filter-danger.active {
    background: var(--fg-err-bg) !important;
    border-color: var(--fg-err-text) !important;
    color: var(--fg-err-text) !important;
}

#clients-tab #status-filter-buttons .filter-btn.filter-warn.active,
body.dark-mode #clients-tab #status-filter-buttons .filter-btn.filter-warn.active,
body.light-mode #clients-tab #status-filter-buttons .filter-btn.filter-warn.active {
    background: var(--fg-warn-bg) !important;
    border-color: var(--fg-warn-text) !important;
    color: var(--fg-warn-text) !important;
}

#clients-tab #status-filter-buttons .filter-btn.filter-info.active,
body.dark-mode #clients-tab #status-filter-buttons .filter-btn.filter-info.active,
body.light-mode #clients-tab #status-filter-buttons .filter-btn.filter-info.active {
    background: var(--fg-info-bg) !important;
    border-color: var(--fg-info-text) !important;
    color: var(--fg-info-text) !important;
}

/* Inputs, Selects e Textareas */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea,
.custom-input,
.search-box input,
body.dark-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.dark-mode select,
body.dark-mode textarea,
body.light-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.light-mode select,
body.light-mode textarea {
    background: var(--fg-input) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
    border-radius: 10px !important;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus,
.custom-input:focus {
    border-color: var(--fg-border-gold) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
    outline: none !important;
}

/* Caixa de busca com borda dourada elegante (estilo Estoque/Pesquisa da referência) */
.search-box,
.search-bar,
.obs-search-bar {
    border-color: var(--fg-border-gold) !important;
}

/* Popover de Filtros Extras */
#custom-dropdown-menu.obs-filters-popover,
body.light-mode #custom-dropdown-menu.obs-filters-popover {
    background: var(--fg-card) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
}

.obs-ef-chip,
body.light-mode .obs-ef-chip {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text-muted) !important;
}

.obs-ef-chip.active,
body.light-mode .obs-ef-chip.active {
    background: var(--fg-gold-soft) !important;
    border-color: var(--fg-border-gold) !important;
    color: var(--fg-gold-text) !important;
}

/* --------------------------------------------------------------------------
   8. TABELAS (CLIENTES, HISTÓRICO, OPERAÇÕES)
   -------------------------------------------------------------------------- */
table thead,
table thead tr,
table thead th,
body.dark-mode #clients-table thead,
body.dark-mode #clients-table thead tr,
body.dark-mode #clients-table thead th,
body.dark-mode table thead,
body.dark-mode table thead tr,
body.dark-mode table thead th,
body.light-mode table thead,
body.light-mode table thead tr,
body.light-mode table thead th,
body.light-mode th {
    background: var(--fg-card-subtle) !important;
    color: var(--fg-text-muted) !important;
    border-bottom: 1px solid var(--fg-border) !important;
}

table tbody tr,
body.dark-mode #clients-tab table tbody tr,
body.dark-mode table tbody tr,
body.light-mode table tbody tr,
body.light-mode tr {
    background: transparent !important;
    border-bottom: 1px solid var(--fg-border) !important;
}

table tbody tr:hover td,
body.dark-mode #clients-tab table tbody tr:hover td,
body.dark-mode table tbody tr:hover td,
body.light-mode tr:hover,
body.light-mode table tbody tr:hover td {
    background: var(--hover-bg) !important;
}

table td,
body.dark-mode table td,
body.light-mode td {
    color: var(--fg-text) !important;
}

#clients-table .col-actions .icon-btn,
body.dark-mode #clients-table .col-actions .icon-btn,
body.light-mode #clients-table .col-actions .icon-btn {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text-muted) !important;
}

#clients-table .col-actions .icon-btn:hover:not(:disabled),
body.dark-mode #clients-table .col-actions .icon-btn:hover:not(:disabled),
body.light-mode #clients-table .col-actions .icon-btn:hover:not(:disabled) {
    border-color: var(--fg-border-gold) !important;
    color: var(--fg-gold-text) !important;
}

/* --------------------------------------------------------------------------
   9. MODAIS, SWEETALERT2 E BOTTOM NAV MOBILE
   -------------------------------------------------------------------------- */
.modal,
body.dark-mode .modal {
    background: rgba(20, 17, 14, 0.68) !important;
    backdrop-filter: blur(4px) !important;
}

.swal2-popup {
    background: var(--fg-card) !important;
    color: var(--fg-text) !important;
    border: 1px solid var(--fg-border) !important;
    border-radius: 16px !important;
}

.swal2-confirm {
    background: var(--fg-gold) !important;
    color: var(--fg-gold-btn-text) !important;
    border-radius: 999px !important;
}

#mobile-bottom-nav,
body.dark-mode #mobile-bottom-nav,
body.light-mode #mobile-bottom-nav {
    background: var(--fg-topbar) !important;
    border-top: 1px solid var(--fg-sidebar-border) !important;
}

#mobile-bottom-nav .bottom-nav-item {
    color: var(--fg-sidebar-muted) !important;
}

#mobile-bottom-nav .bottom-nav-item.active {
    color: #F3D49B !important;
}

/* --------------------------------------------------------------------------
   10. TELA DE LOGIN (login.html) — FOREST & GOLD
   -------------------------------------------------------------------------- */
body.login-body,
body.login-body.dark-mode {
    background-color: #443D35 !important;
    background-image:
        radial-gradient(ellipse 75% 45% at 50% -10%, rgba(67, 91, 78, 0.55), transparent 65%),
        radial-gradient(ellipse 45% 35% at 85% 90%, rgba(217, 182, 128, 0.16), transparent 60%) !important;
    color: #FAF6F0 !important;
}

body.login-body .login-card {
    background: #5E5449 !important;
    border: 1px solid rgba(238, 218, 184, 0.30) !important;
    box-shadow: 0 24px 60px -16px rgba(18, 14, 10, 0.50) !important;
}

body.login-body .login-brand-logo {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 230px !important;
    height: auto !important;
}

body.login-body .login-header h1 {
    color: #F7F3EC !important;
    -webkit-text-fill-color: #F7F3EC !important;
}

body.login-body .login-header p {
    color: #CFC6BA !important;
}

body.login-body .btn-login,
body.login-body button[type="submit"] {
    background: #D9B680 !important;
    color: #2B241D !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 999px !important;
}

body.login-body .btn-login:hover,
body.login-body button[type="submit"]:hover {
    background: #E4C492 !important;
}

/* --------------------------------------------------------------------------
   11. VARREDURA COMPLETA — ELIMINAÇÃO DE CORES RESIDUAIS (AZUL/ROXO/PRETO)
   -------------------------------------------------------------------------- */

/* 11.1 Tabelas: cabeçalhos e containers internos (Recebimentos, Histórico, Fila, Clientes) */
body.dark-mode .card .table-container,
body.dark-mode .obs-receipts-scroll,
body.dark-mode #logs-tab .table-container,
body.dark-mode #mensagens-tab .table-container,
body.dark-mode #operations-tab .table-container,
body.dark-mode #manual-actions-tab .table-container,
body.light-mode .card .table-container,
body.light-mode .obs-receipts-scroll {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
}

body.dark-mode table thead,
body.dark-mode table thead tr,
body.dark-mode table thead th,
body.dark-mode #daily-receipts-table thead,
body.dark-mode #daily-receipts-table thead tr,
body.dark-mode #daily-receipts-table thead th,
body.dark-mode #clients-table thead,
body.dark-mode #clients-table thead tr,
body.dark-mode #clients-table thead th,
body.dark-mode #logs-table thead th,
body.dark-mode #queue-table thead th,
body.dark-mode th,
body.light-mode table thead,
body.light-mode table thead tr,
body.light-mode table thead th,
body.light-mode #daily-receipts-table thead th,
body.light-mode #clients-table thead th,
body.light-mode th {
    background: var(--fg-input) !important;
    background-color: var(--fg-input) !important;
    color: var(--fg-text-muted) !important;
    border-bottom: 1px solid var(--fg-border) !important;
}

body.dark-mode table tbody,
body.dark-mode table tbody tr,
body.dark-mode table tbody td,
body.light-mode table tbody,
body.light-mode table tbody tr,
body.light-mode table tbody td {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--fg-text) !important;
}

body.dark-mode table tbody tr:hover td,
body.dark-mode #clients-tab table tbody tr:hover td,
body.light-mode table tbody tr:hover td {
    background: var(--hover-bg) !important;
    background-color: var(--hover-bg) !important;
}

/* 11.2 Pills de Resumo Inline (Total, Custo, Lucro) e Contador de Clientes */
body.dark-mode .obs-inline-pills .summary-mini-card,
body.light-mode .obs-inline-pills .summary-mini-card,
.obs-inline-pills .summary-mini-card {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
}

body.dark-mode .obs-inline-pills .summary-mini-card .label,
body.light-mode .obs-inline-pills .summary-mini-card .label,
.obs-inline-pills .summary-mini-card .label {
    color: var(--fg-text-muted) !important;
}

body.dark-mode .obs-inline-pills .summary-mini-card .value,
body.light-mode .obs-inline-pills .summary-mini-card .value,
.obs-inline-pills .summary-mini-card .value {
    color: var(--fg-text) !important;
}

body.dark-mode .obs-inline-pills .summary-mini-card.lucro,
body.light-mode .obs-inline-pills .summary-mini-card.lucro,
.obs-inline-pills .summary-mini-card.lucro {
    background: var(--fg-ok-bg) !important;
    border-color: var(--fg-ok-text) !important;
}

body.dark-mode .obs-inline-pills .summary-mini-card.lucro .value,
body.light-mode .obs-inline-pills .summary-mini-card.lucro .value,
.obs-inline-pills .summary-mini-card.lucro .value {
    color: var(--fg-ok-text) !important;
}

.obs-count-chip,
body.dark-mode .obs-count-chip,
body.light-mode .obs-count-chip {
    background: var(--fg-gold-soft) !important;
    border: 1px solid var(--fg-border-gold) !important;
    color: var(--fg-gold-text) !important;
}

/* 11.3 Sub-navegação (Mensagens & Configurações) — sem roxo/azul */
.config-nav-btn,
.msg-nav-btn,
body.dark-mode .config-nav-btn,
body.dark-mode .msg-nav-btn,
body.light-mode .config-nav-btn,
body.light-mode .msg-nav-btn {
    color: var(--fg-text-muted) !important;
    background: transparent !important;
    border-radius: 10px !important;
}

.config-nav-btn:hover,
.msg-nav-btn:hover,
body.dark-mode .config-nav-btn:hover,
body.dark-mode .msg-nav-btn:hover,
body.light-mode .config-nav-btn:hover,
body.light-mode .msg-nav-btn:hover {
    background: var(--hover-bg) !important;
    color: var(--fg-text) !important;
}

.config-nav-btn.active-highlight,
.msg-nav-btn.active-highlight,
body.dark-mode .config-nav-btn.active-highlight,
body.dark-mode .msg-nav-btn.active-highlight,
body.light-mode .config-nav-btn.active-highlight,
body.light-mode .msg-nav-btn.active-highlight {
    background: var(--fg-gold) !important;
    color: var(--fg-gold-btn-text) !important;
    border: 1px solid transparent !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16) !important;
    font-weight: 600 !important;
}

.config-nav-btn.active-highlight i,
.msg-nav-btn.active-highlight i,
body.dark-mode .config-nav-btn.active-highlight i,
body.dark-mode .msg-nav-btn.active-highlight i,
body.light-mode .config-nav-btn.active-highlight i,
body.light-mode .msg-nav-btn.active-highlight i {
    color: var(--fg-gold-btn-text) !important;
}

/* 11.4 Cards internos (Modelos, Cobranças, WhatsApp, Geral, Backup, Opções) */
body.dark-mode .card .card,
body.dark-mode #msg-cobrancas-body .card,
body.dark-mode #msg-templates-body .card,
body.dark-mode #options-manager-container .opt-modern-card,
body.dark-mode #wa-config-body,
body.dark-mode #sub-geral .card > div[style*="border-radius"],
body.dark-mode #sub-backup .card > div[style*="border-radius"],
body.dark-mode .config-sidebar-nav .card,
body.light-mode .card .card,
body.light-mode #msg-cobrancas-body .card,
body.light-mode #msg-templates-body .card,
body.light-mode #options-manager-container .opt-modern-card,
body.light-mode #wa-config-body,
body.light-mode .config-sidebar-nav .card {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
    box-shadow: none !important;
}

body.dark-mode #msg-cobrancas-body .card:hover,
body.dark-mode #msg-templates-body .card:hover,
body.dark-mode #options-manager-container .opt-modern-card:hover,
body.light-mode #msg-cobrancas-body .card:hover,
body.light-mode #msg-templates-body .card:hover {
    background: var(--fg-card-hover) !important;
    border-color: var(--fg-border-gold) !important;
}

/* Blocos internos escuros dentro de Cobranças (ex: "2 clientes") e WhatsApp */
body.dark-mode #msg-cobrancas-body .card [style*="background"],
body.dark-mode #msg-templates-body .card [style*="background: rgba(15"],
body.dark-mode #wa-config-body [style*="background: rgba(15"],
body.dark-mode #wa-config-body [style*="background:#0"],
body.dark-mode #wa-config-body [style*="background: #0"] {
    background: var(--fg-input) !important;
    border-color: var(--fg-border) !important;
}

/* Painel de aviso/dica inferior e caixas de info */
body.dark-mode .info-banner,
body.dark-mode .wa-tip-box,
body.dark-mode #sub-whatsapp-config > div:last-child,
body.dark-mode #config-sistema-tab .alert-info,
body.light-mode .info-banner {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text-muted) !important;
}

/* 11.5 Dropdowns de Filtros Extras e Gestor de Campos */
body.dark-mode #clients-tab #dropdown-extra-filters .dropdown-menu,
body.light-mode #clients-tab #dropdown-extra-filters .dropdown-menu {
    background: var(--fg-card) !important;
    border: 1px solid var(--fg-border) !important;
}

body.dark-mode #dropdown-extra-filters .dropdown-trigger,
body.light-mode #dropdown-extra-filters .dropdown-trigger {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text-muted) !important;
}

body.dark-mode #dropdown-extra-filters.has-filters .dropdown-trigger,
body.light-mode #dropdown-extra-filters.has-filters .dropdown-trigger {
    background: var(--fg-gold-soft) !important;
    border-color: var(--fg-border-gold) !important;
    color: var(--fg-gold-text) !important;
}

body.dark-mode #options-manager-container .opt-item-row:hover,
body.light-mode #options-manager-container .opt-item-row:hover {
    background: var(--fg-gold-soft) !important;
    border-color: var(--fg-border-gold) !important;
}

/* 11.6 Abas internas (Pendentes / Histórico / Falhas na Fila de Envio) */
.queue-tab-btn.active,
.sub-tab-btn.active,
body.dark-mode .queue-tab-btn.active,
body.light-mode .queue-tab-btn.active {
    color: var(--fg-gold-text) !important;
    border-bottom-color: var(--fg-border-gold) !important;
}

/* --------------------------------------------------------------------------
   12. CORES RESIDUAIS: TABELAS (THEAD/CONTAINER), SELECTS, 2FA E NOC
   -------------------------------------------------------------------------- */

/* 12.1 Tabelas: elimina fundo cinza frio e thead azul-marinho em TODAS as abas */
body .content .table-container,
body.dark-mode .content .table-container,
body.dark-mode .table-container,
body.dark-mode #clients-tab .table-container,
body.dark-mode #logs-tab .table-container,
body.dark-mode #dashboard-tab .table-container,
body.dark-mode #mensagens-tab .table-container,
body.dark-mode #manual-actions-tab .table-container,
body.dark-mode #config-sistema-tab .table-container,
body.dark-mode #client-info-modal .table-container,
body.dark-mode .table-container table,
body.dark-mode .card .table-container,
body.dark-mode .obs-receipts-scroll,
body.dark-mode #users-table,
body.dark-mode #queue-pending-table,
body.dark-mode #daily-receipts-table,
body.dark-mode #manual-actions-tab table,
body.light-mode .content .table-container,
body.light-mode .table-container,
body.light-mode #clients-tab .table-container,
body.light-mode #logs-tab .table-container,
body.light-mode #dashboard-tab .table-container,
body.light-mode #mensagens-tab .table-container,
body.light-mode #manual-actions-tab .table-container,
body.light-mode #config-sistema-tab .table-container,
body.light-mode #client-info-modal .table-container,
body.light-mode .table-container table {
    background: var(--fg-card-subtle) !important;
    background-color: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
}

body .content .table-container thead,
body .content .table-container thead tr,
body .content .table-container thead th,
body.dark-mode .table-container thead,
body.dark-mode .table-container thead tr,
body.dark-mode .table-container thead th,
body.dark-mode .card table thead,
body.dark-mode .card table thead tr,
body.dark-mode .card table thead th,
body.dark-mode #users-table thead,
body.dark-mode #users-table thead tr,
body.dark-mode #users-table thead th,
body.dark-mode #queue-pending-table thead,
body.dark-mode #queue-pending-table thead tr,
body.dark-mode #queue-pending-table thead th,
body.dark-mode #manual-actions-tab thead,
body.dark-mode #manual-actions-tab thead tr,
body.dark-mode #manual-actions-tab thead th,
body.light-mode .table-container thead,
body.light-mode .table-container thead tr,
body.light-mode .table-container thead th {
    background: var(--fg-input) !important;
    background-color: var(--fg-input) !important;
    color: var(--fg-text-muted) !important;
    border-bottom: 1px solid var(--fg-border) !important;
}

/* 12.2 Selects (Gerenciar Usuários, Ações Manuais, Filtros) — sem preto #080c14 */
body .custom-select,
body.dark-mode .custom-select,
body.dark-mode select.custom-select,
body.dark-mode .card select,
body.light-mode .custom-select,
body.light-mode select.custom-select {
    background: var(--fg-input) !important;
    background-color: var(--fg-input) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
}

body.dark-mode .custom-select option,
body.dark-mode select option,
body.light-mode .custom-select option,
body.light-mode select option {
    background: var(--fg-card) !important;
    color: var(--fg-text) !important;
}

/* 12.3 Segurança e Autenticação (2FA) */
body.dark-mode .twofa-status-card,
body.light-mode .twofa-status-card,
.twofa-status-card {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
}

body.dark-mode .twofa-status-card.enabled,
body.light-mode .twofa-status-card.enabled {
    border-left: 3px solid var(--accent) !important;
}

body.dark-mode .twofa-status-card .btn-2fa,
body.light-mode .twofa-status-card .btn-2fa {
    background: var(--fg-input) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
}

body.dark-mode .twofa-status-card .btn-2fa:hover,
body.light-mode .twofa-status-card .btn-2fa:hover {
    border-color: var(--fg-border-gold) !important;
}

/* 12.4 Centro de Operações (NOC) — 100% Forest & Gold */
#operations-tab.noc-theme,
body.dark-mode #operations-tab.noc-theme,
body.light-mode #operations-tab.noc-theme {
    --noc-bg: var(--fg-card) !important;
    --noc-card-bg: var(--fg-card-subtle) !important;
    --noc-card-hover: var(--fg-card-hover) !important;
    --noc-card-border: var(--fg-border) !important;
    --noc-primary: var(--fg-gold) !important;
    --noc-text-main: var(--fg-text) !important;
    --noc-text-secondary: var(--fg-text-muted) !important;
    --noc-text-muted: var(--fg-text-muted) !important;
    background: var(--fg-card) !important;
    background-image: none !important;
    border: 1px solid var(--fg-border) !important;
    border-radius: 16px !important;
    color: var(--fg-text) !important;
}

#operations-tab .noc-cockpit-wrapper,
#operations-tab .noc-section-card,
#operations-tab .noc-alarm-stack,
#operations-tab .noc-empty-alarms,
#operations-tab .noc-incidents-container,
body.dark-mode #operations-tab .noc-cockpit-wrapper,
body.dark-mode #operations-tab [class*="noc-"] {
    --noc-bg: var(--fg-card) !important;
    --noc-primary: var(--fg-gold) !important;
}

body.dark-mode #operations-tab .noc-cockpit-wrapper,
body.light-mode #operations-tab .noc-cockpit-wrapper {
    background: var(--fg-card) !important;
    background-image: none !important;
}

body.dark-mode #operations-tab .ops-btn.active,
body.light-mode #operations-tab .ops-btn.active,
body.dark-mode #operations-tab .noc-tab-btn.active,
body.light-mode #operations-tab .noc-tab-btn.active,
#operations-tab .noc-nav-tab.active,
#operations-tab .ops-tab-btn.active {
    background: var(--fg-gold) !important;
    color: var(--fg-gold-btn-text) !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
    font-weight: 700 !important;
}

body.dark-mode #operations-tab .ops-nav-container,
body.dark-mode #operations-tab .ops-section-container,
body.dark-mode #operations-tab .ops-section-container > div:not(.ops-section-header),
body.dark-mode #operations-tab .noc-alarm-box,
body.dark-mode #operations-tab .noc-alarms-panel,
body.dark-mode #operations-tab .noc-table-wrapper,
body.dark-mode #operations-tab .noc-empty-state,
body.dark-mode #operations-tab .noc-status-bar,
body.dark-mode #operations-tab .ops-view-all-btn,
body.light-mode #operations-tab .ops-nav-container,
body.light-mode #operations-tab .ops-section-container,
body.light-mode #operations-tab .noc-alarm-box,
body.light-mode #operations-tab .noc-alarms-panel,
body.light-mode #operations-tab .noc-table-wrapper {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text) !important;
}

/* 12.5 Barra de aviso inferior (Configurações / Usuários / WhatsApp) */
body.dark-mode #config-sistema-tab .card + div,
body.dark-mode #sub-usuarios + div,
body.dark-mode .wa-help-banner,
body.dark-mode .help-banner {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: var(--fg-text-muted) !important;
}

/* --------------------------------------------------------------------------
   13. REALCE DE CONTRASTE — LETRAS, BOTÕES, TABELAS, STATUS E AÇÕES
   (TEMA ESCURO E TEMA CLARO)
   -------------------------------------------------------------------------- */

/* 13.1 Placeholders mais nítidos */
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder,
body.dark-mode .search-box input::placeholder {
    color: #D0C6B8 !important;
    opacity: 1 !important;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder,
body.light-mode .search-box input::placeholder {
    color: #5C6962 !important;
    opacity: 1 !important;
}

/* 13.2 Cabeçalhos de tabela mais fortes e legíveis */
body.dark-mode table thead th,
body.dark-mode #clients-table thead th,
body.dark-mode #clients-tab table thead th,
body.dark-mode .table-container thead th {
    color: #F5EDE0 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

body.light-mode table thead,
body.light-mode table thead tr,
body.light-mode table thead th,
body.light-mode #clients-table thead,
body.light-mode #clients-table thead tr,
body.light-mode #clients-table thead th,
body.light-mode .table-container thead,
body.light-mode .table-container thead tr,
body.light-mode .table-container thead th {
    background: #ECE8DE !important;
    background-color: #ECE8DE !important;
    color: #202E27 !important;
    font-weight: 700 !important;
    border-bottom: 1.5px solid #C8C1B2 !important;
}

/* 13.3 Colunas da tabela de clientes (Nome, Usuário, WhatsApp, Pgto, Valor, Vencimento) */
body.dark-mode .table-container .col-contato strong,
body.dark-mode #clients-table .col-contato strong,
body.dark-mode .table-container .col-valor,
body.dark-mode #clients-table .col-valor,
body.dark-mode #clients-table .clean-valor {
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

body.dark-mode .table-container .clean-user,
body.dark-mode #clients-table .clean-user,
body.dark-mode .table-container .col-zap,
body.dark-mode #clients-table .col-zap,
body.dark-mode #clients-table .clean-zap,
body.dark-mode .table-container .clean-pgto,
body.dark-mode #clients-table .clean-pgto,
body.dark-mode .table-container .col-venc,
body.dark-mode #clients-table .col-venc,
body.dark-mode #clients-table .clean-venc {
    color: #EFE8DE !important;
}

body.light-mode .table-container .col-contato strong,
body.light-mode #clients-table .col-contato strong,
body.light-mode .table-container .col-valor,
body.light-mode #clients-table .col-valor,
body.light-mode #clients-table .clean-valor {
    color: #0E1712 !important;
    font-weight: 700 !important;
}

body.light-mode .table-container .clean-user,
body.light-mode #clients-table .clean-user,
body.light-mode .table-container .col-zap,
body.light-mode #clients-table .col-zap,
body.light-mode #clients-table .clean-zap,
body.light-mode .table-container .clean-pgto,
body.light-mode #clients-table .clean-pgto,
body.light-mode .table-container .col-venc,
body.light-mode #clients-table .col-venc,
body.light-mode #clients-table .clean-venc {
    color: #27342D !important;
    font-weight: 500 !important;
}

/* Pill Depix com alto contraste em ambos os temas */
body.dark-mode #clients-table .clean-pgto.pgto-depix-pill {
    background: rgba(255, 248, 236, 0.14) !important;
    border: 1px solid rgba(245, 226, 192, 0.42) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

body.light-mode #clients-table .clean-pgto.pgto-depix-pill {
    background: #EFECE3 !important;
    border: 1px solid #B6AE9E !important;
    color: #111A15 !important;
    font-weight: 600 !important;
}

/* 13.4 Cores de Servidor (restaura cores vivas no Tema Claro e realça no Tema Escuro) */
body.dark-mode #clients-table .clean-server,
body.dark-mode .table-container .clean-server {
    color: var(--srv-dark, #FFFFFF) !important;
    font-weight: 700 !important;
}

body.light-mode #clients-table .clean-server,
body.light-mode .table-container .clean-server {
    color: var(--srv-light, #1E293B) !important;
    font-weight: 700 !important;
}

/* 13.5 Cores de Status (restaura cores semânticas no Tema Claro e realça no Tema Escuro) */
body.dark-mode .table-container .clean-status,
body.dark-mode #clients-table .clean-status,
body.light-mode .table-container .clean-status,
body.light-mode #clients-table .clean-status {
    font-weight: 700 !important;
}

body.dark-mode .table-container .clean-status.sucesso,
body.dark-mode .table-container .clean-status.success,
body.dark-mode #clients-table .clean-status.sucesso {
    color: #4ADE80 !important;
}

body.dark-mode .table-container .clean-status.erro,
body.dark-mode #clients-table .clean-status.erro {
    color: #FF7488 !important;
}

body.dark-mode .table-container .clean-status.aviso,
body.dark-mode #clients-table .clean-status.aviso {
    color: #FCD34D !important;
}

body.dark-mode .table-container .clean-status.info,
body.dark-mode #clients-table .clean-status.info {
    color: #6CC4FF !important;
}

body.light-mode .table-container .clean-status.sucesso,
body.light-mode .table-container .clean-status.success,
body.light-mode #clients-table .clean-status.sucesso {
    color: #15803D !important;
}

body.light-mode .table-container .clean-status.erro,
body.light-mode #clients-table .clean-status.erro {
    color: #DC2626 !important;
}

body.light-mode .table-container .clean-status.aviso,
body.light-mode #clients-table .clean-status.aviso {
    color: #C25E00 !important;
}

body.light-mode .table-container .clean-status.info,
body.light-mode #clients-table .clean-status.info {
    color: #0369A1 !important;
}

/* Indicador N e ícone silenciado bem legíveis */
body.dark-mode #clients-table .clean-point-n {
    color: #C4B5FD !important;
    font-weight: 800 !important;
}

body.light-mode #clients-table .clean-point-n {
    color: #7C3AED !important;
    font-weight: 800 !important;
}

/* Linhas secundárias (N): apaga apenas as partes escritas, mantendo os botões de ação e o selo N nítidos */
body.dark-mode #clients-body tr.row-secondary td:not(.col-recibo) > *,
body.light-mode #clients-body tr.row-secondary td:not(.col-recibo) > * {
    opacity: 0.42 !important;
}

body.dark-mode #clients-body tr.row-secondary td.col-recibo > *,
body.light-mode #clients-body tr.row-secondary td.col-recibo > * {
    opacity: 1 !important;
}

body.dark-mode #clients-body tr.row-secondary td .clean-point-n,
body.light-mode #clients-body tr.row-secondary td .clean-point-n {
    opacity: 0.9 !important;
}

body.dark-mode #clients-body tr.row-secondary:hover td:not(.col-recibo) > *,
body.light-mode #clients-body tr.row-secondary:hover td:not(.col-recibo) > * {
    opacity: 0.82 !important;
}

/* 13.6 Botões da Coluna Ações — sem chips/caixinhas, compactos e ícones vivos */
body.dark-mode .table-container .col-actions .icon-btn,
body.dark-mode .table-container td .icon-btn,
body.dark-mode #clients-table .col-actions .icon-btn {
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #F7F1E8 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    font-size: 0.98rem !important;
}

body.dark-mode #clients-table .col-actions .icon-btn:hover:not(:disabled),
body.dark-mode .table-container td .icon-btn:hover:not(:disabled) {
    background: rgba(228, 190, 126, 0.22) !important;
    border: none !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
}

body.dark-mode #clients-table .col-actions .icon-btn .ph-currency-circle-dollar {
    color: #34D399 !important;
}

body.dark-mode #clients-table .col-actions .icon-btn .ph-bell-ringing {
    color: #FBBF24 !important;
}

body.dark-mode #clients-table .col-actions .icon-btn:not(:disabled) .ph-paper-plane-tilt {
    color: #58C4FF !important;
}

body.dark-mode #clients-table .col-actions .icon-btn .ph-note-pencil {
    color: #F7F1E8 !important;
}

body.dark-mode #clients-table .col-actions .icon-btn.delete,
body.dark-mode #clients-table .col-actions .icon-btn.delete .ph-trash {
    color: #FF8596 !important;
}

body.dark-mode #clients-table .col-actions .icon-btn.delete:hover:not(:disabled) {
    background: rgba(251, 113, 133, 0.22) !important;
    border: none !important;
    color: #FF9AA8 !important;
}

body.light-mode .table-container .col-actions .icon-btn,
body.light-mode .table-container td .icon-btn,
body.light-mode #clients-table .col-actions .icon-btn {
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #1F2D26 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    font-size: 0.98rem !important;
}

body.light-mode #clients-table .col-actions .icon-btn:hover:not(:disabled),
body.light-mode .table-container td .icon-btn:hover:not(:disabled) {
    background: rgba(166, 119, 50, 0.16) !important;
    border: none !important;
    color: #111A15 !important;
    transform: translateY(-1px) !important;
}

body.light-mode #clients-table .col-actions .icon-btn .ph-currency-circle-dollar {
    color: #059669 !important;
}

body.light-mode #clients-table .col-actions .icon-btn .ph-bell-ringing {
    color: #D97706 !important;
}

body.light-mode #clients-table .col-actions .icon-btn:not(:disabled) .ph-paper-plane-tilt {
    color: #0284C7 !important;
}

body.light-mode #clients-table .col-actions .icon-btn .ph-note-pencil {
    color: #1F2D26 !important;
}

body.light-mode #clients-table .col-actions .icon-btn.delete,
body.light-mode #clients-table .col-actions .icon-btn.delete .ph-trash {
    color: #DC2626 !important;
}

body.light-mode #clients-table .col-actions .icon-btn.delete:hover:not(:disabled) {
    background: #FEE2E2 !important;
    border: none !important;
    color: #B91C1C !important;
}

body.dark-mode #clients-table .col-actions .icon-btn:disabled,
body.light-mode #clients-table .col-actions .icon-btn:disabled {
    opacity: 0.38 !important;
    cursor: not-allowed !important;
}

/* Linhas mais compactas na tabela Gestão de Clientes (desktop) */
@media (min-width: 769px) {
    body.dark-mode #clients-table tbody td,
    body.light-mode #clients-table tbody td {
        padding-top: 0.36rem !important;
        padding-bottom: 0.36rem !important;
        line-height: 1.25 !important;
    }

    body.dark-mode #clients-table thead th,
    body.light-mode #clients-table thead th {
        padding-top: 0.48rem !important;
        padding-bottom: 0.48rem !important;
    }
}

/* 13.7 Botões de Filtro (Pills), Dropdown Mais Filtros e Botões Gerais */
body.dark-mode #clients-tab #status-filter-buttons .filter-btn,
body.dark-mode #dropdown-extra-filters .dropdown-trigger,
body.dark-mode #dropdown-extra-filters .dropdown-trigger span {
    background: #5C5247 !important;
    border: 1px solid rgba(245, 226, 192, 0.38) !important;
    color: #F4EDE4 !important;
    font-weight: 500 !important;
}

body.dark-mode #dropdown-extra-filters .dropdown-trigger span,
body.light-mode #dropdown-extra-filters .dropdown-trigger span {
    background: transparent !important;
    border: none !important;
}

body.dark-mode #clients-tab #status-filter-buttons .filter-btn:hover,
body.dark-mode #dropdown-extra-filters .dropdown-trigger:hover,
body.dark-mode #dropdown-extra-filters .dropdown-trigger:hover span {
    background: #6A5E52 !important;
    border-color: #E8C589 !important;
    color: #FFFFFF !important;
}

body.dark-mode #dropdown-extra-filters .dropdown-trigger:hover span,
body.light-mode #dropdown-extra-filters .dropdown-trigger:hover span {
    background: transparent !important;
    border: none !important;
}

body.dark-mode #clients-tab #status-filter-buttons .filter-btn.active {
    background: rgba(228, 190, 126, 0.28) !important;
    border: 1.5px solid #E8C589 !important;
    color: #FFF2D6 !important;
    font-weight: 700 !important;
}

body.light-mode #clients-tab #status-filter-buttons .filter-btn,
body.light-mode #dropdown-extra-filters .dropdown-trigger,
body.light-mode #dropdown-extra-filters .dropdown-trigger span {
    background: #F4F1EA !important;
    border: 1px solid #C5BEB0 !important;
    color: #1F2D26 !important;
    font-weight: 600 !important;
}

body.light-mode #clients-tab #status-filter-buttons .filter-btn:hover,
body.light-mode #dropdown-extra-filters .dropdown-trigger:hover,
body.light-mode #dropdown-extra-filters .dropdown-trigger:hover span {
    background: #EDE8DC !important;
    border-color: #A97932 !important;
    color: #111A15 !important;
}

body.light-mode #clients-tab #status-filter-buttons .filter-btn.active {
    background: #F6E5C5 !important;
    border: 1.5px solid #A67732 !important;
    color: #6B4510 !important;
    font-weight: 700 !important;
}

/* Botões Primários e Secundários mais marcantes */
body.dark-mode button.btn.primary,
body.dark-mode .btn.primary,
body.dark-mode .btn-new-client-icon {
    background: #E4BE7E !important;
    color: #1C150F !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24) !important;
}

body.dark-mode button.btn.secondary,
body.dark-mode .btn.secondary {
    background: #62574C !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(245, 226, 192, 0.44) !important;
    font-weight: 600 !important;
}

body.light-mode button.btn.primary,
body.light-mode .btn.primary,
body.light-mode .btn-new-client-icon {
    background: #A67732 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(138, 94, 30, 0.28) !important;
}

body.light-mode button.btn.secondary,
body.light-mode .btn.secondary {
    background: #F4F1EA !important;
    color: #111A15 !important;
    border: 1px solid #BDB6A6 !important;
    font-weight: 600 !important;
}

/* 13.8 Pills de Resumo (Total, Custo, Lucro) e Contador */
body.dark-mode .obs-inline-pills .summary-mini-card {
    background: #554C42 !important;
    border: 1px solid rgba(245, 226, 192, 0.40) !important;
}

body.dark-mode .obs-inline-pills .summary-mini-card .label {
    color: #E8DFD3 !important;
}

body.dark-mode .obs-inline-pills .summary-mini-card .value {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

body.dark-mode .obs-inline-pills .summary-mini-card.lucro {
    background: rgba(52, 211, 153, 0.22) !important;
    border: 1.5px solid #4ADE80 !important;
}

body.dark-mode .obs-inline-pills .summary-mini-card.lucro .label,
body.dark-mode .obs-inline-pills .summary-mini-card.lucro .value {
    color: #6EE7A0 !important;
    font-weight: 700 !important;
}

body.light-mode .obs-inline-pills .summary-mini-card {
    background: #F4F1EA !important;
    border: 1px solid #C5BEB0 !important;
}

body.light-mode .obs-inline-pills .summary-mini-card .label {
    color: #36433C !important;
    font-weight: 600 !important;
}

body.light-mode .obs-inline-pills .summary-mini-card .value {
    color: #111A15 !important;
    font-weight: 700 !important;
}

body.light-mode .obs-inline-pills .summary-mini-card.lucro {
    background: #DCFCE7 !important;
    border: 1.5px solid #16A34A !important;
}

body.light-mode .obs-inline-pills .summary-mini-card.lucro .label,
body.light-mode .obs-inline-pills .summary-mini-card.lucro .value {
    color: #15803D !important;
    font-weight: 700 !important;
}

body.dark-mode .obs-count-chip {
    background: rgba(228, 190, 126, 0.22) !important;
    border: 1px solid #E8C589 !important;
    color: #FFF0D1 !important;
    font-weight: 700 !important;
}

body.dark-mode .obs-count-chip span,
body.dark-mode .obs-count-chip i {
    color: #FFF0D1 !important;
}

body.light-mode .obs-count-chip {
    background: #F6E5C5 !important;
    border: 1px solid #A67732 !important;
    color: #6B4510 !important;
    font-weight: 700 !important;
}

body.light-mode .obs-count-chip span,
body.light-mode .obs-count-chip i {
    color: #6B4510 !important;
}

/* 13.9 Janela flutuante de Alertas (.alerta-tooltip e #alertTooltipPortal) — Forest & Gold */
body.dark-mode .alerta-tooltip,
body.dark-mode #clients-body .alerta-tooltip,
body.dark-mode #alertTooltipPortal {
    background: #4E453B !important;
    border: 1px solid #E8C589 !important;
    box-shadow: 0 18px 40px rgba(15, 11, 8, 0.58) !important;
    color: #FFFFFF !important;
}

body.dark-mode .alerta-badge:not(.tooltip-up) .alerta-tooltip::after,
body.dark-mode #alertTooltipPortal[data-placement="bottom"]::after {
    border-color: transparent transparent #E8C589 transparent !important;
}

body.dark-mode .alerta-badge.tooltip-up .alerta-tooltip::after,
body.dark-mode #alertTooltipPortal[data-placement="top"]::after {
    border-color: #E8C589 transparent transparent transparent !important;
}

body.dark-mode .alerta-tooltip .tooltip-header,
body.dark-mode #alertTooltipPortal .tooltip-header {
    color: #F7DAA4 !important;
    border-bottom: 1px solid rgba(245, 226, 192, 0.28) !important;
}

body.dark-mode .alerta-tooltip .tooltip-item,
body.dark-mode #alertTooltipPortal .tooltip-item {
    background: #3D352D !important;
}

body.dark-mode .alerta-tooltip .tooltip-item-msg,
body.dark-mode #alertTooltipPortal .tooltip-item-msg {
    color: #F2EBE1 !important;
}

body.dark-mode .alerta-tooltip .tooltip-item-date,
body.dark-mode #alertTooltipPortal .tooltip-item-date {
    color: #D4CABE !important;
    opacity: 0.9 !important;
}

body.dark-mode .alerta-tooltip .tooltip-footer,
body.dark-mode #alertTooltipPortal .tooltip-footer {
    color: #F7DAA4 !important;
    opacity: 1 !important;
}

body.light-mode .alerta-tooltip,
body.light-mode #clients-body .alerta-tooltip,
body.light-mode #alertTooltipPortal {
    background: #FFFFFF !important;
    border: 1.5px solid #A97932 !important;
    box-shadow: 0 14px 32px rgba(34, 48, 40, 0.18) !important;
    color: #111A15 !important;
}

body.light-mode .alerta-badge:not(.tooltip-up) .alerta-tooltip::after,
body.light-mode #alertTooltipPortal[data-placement="bottom"]::after {
    border-color: transparent transparent #A97932 transparent !important;
}

body.light-mode .alerta-badge.tooltip-up .alerta-tooltip::after,
body.light-mode #alertTooltipPortal[data-placement="top"]::after {
    border-color: #A97932 transparent transparent transparent !important;
}

body.light-mode .alerta-tooltip .tooltip-header,
body.light-mode #alertTooltipPortal .tooltip-header {
    color: #7A5218 !important;
    border-bottom: 1px solid #DFD9CA !important;
}

body.light-mode .alerta-tooltip .tooltip-item,
body.light-mode #alertTooltipPortal .tooltip-item {
    background: #F4F1EA !important;
}

body.light-mode .alerta-tooltip .tooltip-item-msg,
body.light-mode #alertTooltipPortal .tooltip-item-msg {
    color: #27342D !important;
}

body.light-mode .alerta-tooltip .tooltip-item-date,
body.light-mode #alertTooltipPortal .tooltip-item-date {
    color: #56635C !important;
    opacity: 1 !important;
}

body.light-mode .alerta-tooltip .tooltip-footer,
body.light-mode #alertTooltipPortal .tooltip-footer {
    color: #7A5218 !important;
    opacity: 1 !important;
}

/* 13.10 Modais (Editar Cliente, Pagamento, Alertas, etc.) — Forest & Gold */
body.dark-mode .modal-footer,
body.dark-mode .client-modal-footer,
body.dark-mode .payment-modal-footer,
body.dark-mode #client-modal .modal-footer,
body.dark-mode .modal form .modal-footer {
    background: transparent !important;
    background-color: transparent !important;
    border-top: 1px solid var(--fg-border) !important;
}

body.light-mode .modal-footer,
body.light-mode .client-modal-footer,
body.light-mode .payment-modal-footer,
body.light-mode #client-modal .modal-footer,
body.light-mode .modal form .modal-footer {
    background: transparent !important;
    background-color: transparent !important;
    border-top: 1px solid var(--fg-border) !important;
}

body.dark-mode .modal-tabs,
body.light-mode .modal-tabs {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
}

body.dark-mode .modal-tab-btn,
body.light-mode .modal-tab-btn {
    color: var(--fg-text-muted) !important;
}

body.dark-mode .modal-tab-btn:hover,
body.light-mode .modal-tab-btn:hover {
    color: var(--fg-text) !important;
    background: var(--hover-bg) !important;
}

body.dark-mode .modal-tab-btn.active,
body.light-mode .modal-tab-btn.active {
    background: var(--fg-gold) !important;
    color: var(--fg-gold-btn-text) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22) !important;
    font-weight: 700 !important;
}

body.dark-mode .modal-content .switch-label,
body.dark-mode .modal-content label,
body.light-mode .modal-content .switch-label,
body.light-mode .modal-content label {
    color: var(--fg-text) !important;
}

body.dark-mode .modal-content .icon-btn {
    background: var(--fg-card-subtle) !important;
    border: 1px solid var(--fg-border) !important;
    color: #F7F1E8 !important;
}

body.dark-mode .modal-content .icon-btn:hover {
    background: var(--fg-card-hover) !important;
    border-color: var(--fg-border-gold) !important;
    color: #FFFFFF !important;
}

body.light-mode .modal-content .icon-btn {
    background: #F4F1EA !important;
    border: 1px solid #C5BEB0 !important;
    color: #1F2D26 !important;
}

body.light-mode .modal-content .icon-btn:hover {
    background: #F7E8CC !important;
    border-color: #A97932 !important;
    color: #111A15 !important;
}

/* 13.11 Cabeçalhos de tabelas por ID (Pagamentos no perfil, Fila, Histórico, Ações Manuais, NOC) */
body.dark-mode #profile-payments-table thead,
body.dark-mode #profile-payments-table thead tr,
body.dark-mode #profile-payments-table thead th,
body.dark-mode #queue-history-table thead,
body.dark-mode #queue-history-table thead tr,
body.dark-mode #queue-history-table thead th,
body.dark-mode #queue-failed-table thead,
body.dark-mode #queue-failed-table thead tr,
body.dark-mode #queue-failed-table thead th,
body.dark-mode #manual-actions-table thead,
body.dark-mode #manual-actions-table thead tr,
body.dark-mode #manual-actions-table thead th,
body.dark-mode #logs-table thead,
body.dark-mode #logs-table thead tr,
body.dark-mode #logs-table thead th,
body.dark-mode .noc-table-v2 thead,
body.dark-mode .noc-table-v2 thead tr,
body.dark-mode .noc-table-v2 thead th {
    background: #3D352D !important;
    background-color: #3D352D !important;
    color: #F5EDE0 !important;
    border-bottom: 1px solid var(--fg-border) !important;
    box-shadow: none !important;
}

body.light-mode #profile-payments-table thead,
body.light-mode #profile-payments-table thead tr,
body.light-mode #profile-payments-table thead th,
body.light-mode #queue-history-table thead,
body.light-mode #queue-history-table thead tr,
body.light-mode #queue-history-table thead th,
body.light-mode #queue-failed-table thead,
body.light-mode #queue-failed-table thead tr,
body.light-mode #queue-failed-table thead th,
body.light-mode #manual-actions-table thead,
body.light-mode #manual-actions-table thead tr,
body.light-mode #manual-actions-table thead th,
body.light-mode #logs-table thead,
body.light-mode #logs-table thead tr,
body.light-mode #logs-table thead th,
body.light-mode .noc-table-v2 thead,
body.light-mode .noc-table-v2 thead tr,
body.light-mode .noc-table-v2 thead th {
    background: #ECE8DE !important;
    background-color: #ECE8DE !important;
    color: #202E27 !important;
    border-bottom: 1.5px solid #C8C1B2 !important;
}

body.dark-mode #client-info-modal .stat-card-mini .stat-value.depix-stat-val {
    color: #D8C4FF !important;
}

body.light-mode #client-info-modal .stat-card-mini .stat-value.depix-stat-val {
    color: #6D28D9 !important;
}



