/* ==========================================================================
   TEMA CLARO APPLE / NIBO CLEAN — SHOP DISPLAY CRM
   Estilo visual em tons claros, elegante, corporativo e com alta legibilidade.
   Inspirado no Design System Apple & no Painel de Acompanhamento Nibo.
   Ativado pela classe: body.tema-apple-light / html.tema-apple-light
   ========================================================================== */

/* VARIÁVEIS DO TEMA CLARO */
html.tema-apple-light,
body.tema-apple-light {
  --bg-app: #f4f6f8;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f8fafc;
  --bg-surface-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --accent-blue: #0284c7;
  --accent-blue-hover: #0369a1;
  --accent-blue-light: #e0f2fe;
  --accent-green: #10b981;
  --accent-green-light: rgba(16, 185, 129, 0.12);
  --accent-green-text: #047857;
  --accent-red: #ef4444;
  --accent-red-light: rgba(239, 68, 68, 0.12);
  --accent-red-text: #b91c1c;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-modal: 0 20px 45px rgba(0, 0, 0, 0.15);
}

/* 1. ESTRUTURA GERAL E FUNDO */
body.tema-apple-light {
  background-color: #f4f6f8 !important;
  color: #0f172a !important;
}

body.tema-apple-light #app-system {
  background-color: #f4f6f8 !important;
}

body.tema-apple-light main {
  background-color: #f4f6f8 !important;
}

/* Scrollbars finas e elegantes para o tema claro */
body.tema-apple-light ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
body.tema-apple-light ::-webkit-scrollbar-track {
  background: #f1f5f9;
}
body.tema-apple-light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
body.tema-apple-light ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 2. SIDEBAR LATERAL ESQUERDA (ESTILO APPLE WHITE / CLEAN) */
body.tema-apple-light #crm-sidebar {
  background-color: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 2px 0 14px rgba(0, 0, 0, 0.04) !important;
}

body.tema-apple-light #crm-sidebar.hover-expand:hover {
  box-shadow: 6px 0 28px rgba(0, 0, 0, 0.12) !important;
}

body.tema-apple-light .sidebar-brand-wrapper {
  border-bottom: 1px solid #e2e8f0 !important;
}

body.tema-apple-light .sidebar-brand-title {
  color: #0f172a !important;
}

body.tema-apple-light .sidebar-role-badge {
  background: rgba(2, 132, 199, 0.1) !important;
  color: #0284c7 !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

body.tema-apple-light .sidebar-pin-btn {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}
body.tema-apple-light .sidebar-pin-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.tema-apple-light .sidebar-section-header .sidebar-label {
  color: #64748b !important;
}

body.tema-apple-light .sidebar-item {
  color: #334155 !important;
  background: transparent !important;
}

body.tema-apple-light .sidebar-item:hover:not(.active) {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

body.tema-apple-light .sidebar-item.active {
  background-color: #e0f2fe !important;
  color: #0284c7 !important;
  font-weight: 700 !important;
}

body.tema-apple-light .sidebar-item.active::before {
  background: #0284c7 !important;
}

body.tema-apple-light .sidebar-item.active .sidebar-icon {
  filter: drop-shadow(0 1px 2px rgba(2, 132, 199, 0.3));
}

body.tema-apple-light .sidebar-icon {
  color: #475569 !important;
}

body.tema-apple-light .sidebar-text {
  color: inherit !important;
}

body.tema-apple-light .badge-atalho-key {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

body.tema-apple-light .sidebar-item.active .badge-atalho-key {
  background: #ffffff !important;
  border-color: #93c5fd !important;
  color: #0284c7 !important;
}

body.tema-apple-light .badge-total-arquivados {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

body.tema-apple-light .sidebar-home-custom-box {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
}
body.tema-apple-light .sidebar-home-checkbox:checked + .sidebar-home-custom-box {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
}

body.tema-apple-light .btn-logout {
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  background: rgba(239, 68, 68, 0.06) !important;
}
body.tema-apple-light .btn-logout:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

body.tema-apple-light #crm-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
}

/* 3. CABEÇALHOS, MONITOR FIREBASE E BOTÕES DE NAVEGAÇÃO */
body.tema-apple-light .badge-firebase-header {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
body.tema-apple-light .badge-fb-verde {
  color: #059669 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: rgba(16, 185, 129, 0.08) !important;
}
body.tema-apple-light .badge-fb-amarelo {
  color: #d97706 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  background: rgba(245, 158, 11, 0.08) !important;
}
body.tema-apple-light .badge-fb-vermelho {
  color: #dc2626 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

body.tema-apple-light .nav-tabs button {
  background: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}
body.tema-apple-light .nav-tabs button.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}
body.tema-apple-light .nav-tabs button:hover:not(.active) {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* 4. PAINEL DE KPIS / INDICADORES DO KANBAN */
body.tema-apple-light .kpi-section-wrapper {
  background: transparent !important;
}
body.tema-apple-light .kpi-toggle-header span {
  color: #475569 !important;
}
body.tema-apple-light #btn-toggle-kpi {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}
body.tema-apple-light #btn-toggle-kpi:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

body.tema-apple-light .kpi-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  border-radius: 10px !important;
}

body.tema-apple-light .kpi-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
}
body.tema-apple-light .kpi-title {
  color: #64748b !important;
}
body.tema-apple-light .kpi-value {
  color: #0f172a !important;
}
body.tema-apple-light .kpi-sub {
  color: #64748b !important;
}
body.tema-apple-light .kpi-card.kpi-card-clickable:hover {
  background: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.18) !important;
}

/* 5. BARRA DE FILTROS DO KANBAN E FORMULÁRIOS */
body.tema-apple-light .filter-bar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  border-radius: 10px !important;
}

body.tema-apple-light .filter-bar input,
body.tema-apple-light .filter-bar select,
body.tema-apple-light .form-group input,
body.tema-apple-light .form-group select,
body.tema-apple-light .form-group textarea,
body.tema-apple-light input[type="text"],
body.tema-apple-light input[type="number"],
body.tema-apple-light input[type="date"],
body.tema-apple-light select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.tema-apple-light input::placeholder,
body.tema-apple-light textarea::placeholder {
  color: #94a3b8 !important;
}

body.tema-apple-light .filter-bar input:focus,
body.tema-apple-light .filter-bar select:focus,
body.tema-apple-light .form-group input:focus,
body.tema-apple-light .form-group select:focus,
body.tema-apple-light .form-group textarea:focus,
body.tema-apple-light input:focus,
body.tema-apple-light select:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
  outline: none !important;
}

body.tema-apple-light .btn-action {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}
body.tema-apple-light .btn-action:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.tema-apple-light .btn-action-primary {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}
body.tema-apple-light .btn-action-primary:hover {
  background: #0369a1 !important;
}

body.tema-apple-light #btn-toggle-colunas-kanban {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.tema-apple-light #popover-colunas-kanban {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}
body.tema-apple-light #popover-colunas-kanban span {
  color: #0284c7 !important;
}

/* 6. COLUNAS DO KANBAN E CARDS DE PEDIDO */
body.tema-apple-light .kanban-col {
  background: #eef2f6 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
}

body.tema-apple-light .kanban-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  border-radius: 10px 10px 0 0 !important;
}

body.tema-apple-light .kanban-header-badge {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

body.tema-apple-light .kanban-header-soma {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #047857 !important;
}

body.tema-apple-light .kanban-cards.drag-over {
  background: rgba(2, 132, 199, 0.08) !important;
}

body.tema-apple-light .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
  border-radius: 8px !important;
}

body.tema-apple-light .card:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.12) !important;
}

body.tema-apple-light .card-title {
  color: #0f172a !important;
}

body.tema-apple-light .card-sub {
  color: #475569 !important;
}

body.tema-apple-light .card-attendant {
  background: rgba(2, 132, 199, 0.1) !important;
  color: #0284c7 !important;
}

body.tema-apple-light .card-price {
  color: #047857 !important;
}

body.tema-apple-light .card-notes {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

body.tema-apple-light .card-actions {
  border-top: 1px solid #f1f5f9 !important;
}

body.tema-apple-light .kanban-col-pagination button {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}
body.tema-apple-light .kanban-col-pagination button:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Status de Prazos */
body.tema-apple-light .card-prazo.normal {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
}
body.tema-apple-light .card-prazo.hoje {
  background: rgba(249, 115, 22, 0.15) !important;
  color: #c2410c !important;
}
body.tema-apple-light .card-prazo.atrasado {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #b91c1c !important;
}
body.tema-apple-light .card-prazo.finalizado {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
}
body.tema-apple-light .card-prazo.retrabalho {
  background: rgba(236, 72, 153, 0.12) !important;
  color: #be185d !important;
  border-color: rgba(236, 72, 153, 0.3) !important;
}

/* 7. MODAIS DO SISTEMA & PAINEL DE CONFIGURAÇÕES */
body.tema-apple-light .modal-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
}

body.tema-apple-light .modal-header {
  border-bottom: 1px solid #e2e8f0 !important;
}
body.tema-apple-light .modal-header h3 {
  color: #0f172a !important;
}
body.tema-apple-light .modal-header button {
  color: #64748b !important;
}
body.tema-apple-light .modal-header button:hover {
  color: #0f172a !important;
}

body.tema-apple-light .tab-usuarios-nav {
  border-bottom: 1px solid #e2e8f0 !important;
}
body.tema-apple-light .tab-usuarios-nav button {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
body.tema-apple-light .tab-usuarios-nav button:hover:not(.active) {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
body.tema-apple-light .tab-usuarios-nav button.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

body.tema-apple-light .perm-group {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
}
body.tema-apple-light .perm-title {
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
body.tema-apple-light .perm-item label {
  color: #334155 !important;
}

body.tema-apple-light #cfg-menus-badge-usuario {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

body.tema-apple-light .btn-submit {
  background: #0284c7 !important;
  color: #ffffff !important;
}
body.tema-apple-light .btn-submit:hover {
  background: #0369a1 !important;
}

/* 8. MÓDULO DE LANÇAMENTOS FINANCEIROS (ESTILO APPLE LIGHT CLEAN) */
body.tema-apple-light .lancamentos-module-container {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

body.tema-apple-light .lancamentos-top-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.tema-apple-light .btn-toggle-filtros,
body.tema-apple-light .btn-filtro-pilula,
body.tema-apple-light .btn-modo-mes,
body.tema-apple-light .btn-repetir-fixos,
body.tema-apple-light .btn-financas-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

body.tema-apple-light .btn-toggle-filtros:hover,
body.tema-apple-light .btn-filtro-pilula:hover:not(.active),
body.tema-apple-light .btn-modo-mes:hover:not(.active),
body.tema-apple-light .btn-repetir-fixos:hover,
body.tema-apple-light .btn-financas-pill:hover:not(.active) {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

body.tema-apple-light .btn-filtro-pilula.active,
body.tema-apple-light .btn-modo-mes.active,
body.tema-apple-light .btn-financas-pill.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

body.tema-apple-light .total-badge-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
body.tema-apple-light .total-badge-card .total-label {
  color: #64748b !important;
}
body.tema-apple-light .total-badge-card .total-valor {
  color: #0f172a !important;
}

body.tema-apple-light .lancamentos-filtros-drawer {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08) !important;
}

body.tema-apple-light .lancamentos-coluna-mes {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  border-radius: 10px !important;
}

body.tema-apple-light .coluna-mes-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  border-radius: 10px 10px 0 0 !important;
}

body.tema-apple-light .mini-card-teto {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
}
body.tema-apple-light .mini-card-teto .teto-label {
  color: #64748b !important;
}
body.tema-apple-light .mini-card-teto .teto-consumo {
  color: #0f172a !important;
}

body.tema-apple-light .teto-progresso-track {
  background: #e2e8f0 !important;
}

body.tema-apple-light .gasto-item-row {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
}
body.tema-apple-light .gasto-item-row:hover {
  background: #f8fafc !important;
}
body.tema-apple-light .gasto-desc {
  color: #0f172a !important;
}
body.tema-apple-light .gasto-cat {
  color: #64748b !important;
}
body.tema-apple-light .gasto-valor {
  color: #0f172a !important;
}

body.tema-apple-light .badge-natureza.fixo {
  background: rgba(2, 132, 199, 0.1) !important;
  color: #0284c7 !important;
}
body.tema-apple-light .badge-natureza.variavel {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
}

/* 9. MATRIZ DRE CONTÁBIL (INSPIRADO NA CAPTURA DE TELA NIBO / SHOP DISPLAY) */
body.tema-apple-light .dre-wrapper-container {
  background-color: transparent !important;
}

body.tema-apple-light .dre-toolbar-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  border-radius: 10px !important;
}

body.tema-apple-light .dre-toolbar-badge {
  background: rgba(2, 132, 199, 0.1) !important;
  color: #0284c7 !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

body.tema-apple-light .btn-dre-action {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}
body.tema-apple-light .btn-dre-action:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
body.tema-apple-light .btn-dre-action.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

body.tema-apple-light .dre-chart-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  border-radius: 10px !important;
}
body.tema-apple-light .dre-chart-title {
  color: #0f172a !important;
}
body.tema-apple-light .legenda-item {
  color: #64748b !important;
}

body.tema-apple-light .dre-table-responsive-scroll {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  border-radius: 10px !important;
}

body.tema-apple-light .dre-contabil-table {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.tema-apple-light .dre-contabil-table th,
body.tema-apple-light .dre-contabil-table td {
  border-bottom: 1px solid #e2e8f0 !important;
  border-right: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
}

body.tema-apple-light .dre-contabil-table thead th {
  background: #eaedf1 !important; /* Cabeçalho estilo Nibo */
  color: #475569 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

body.tema-apple-light .dre-contabil-table th.col-fixa-categoria,
body.tema-apple-light .dre-contabil-table td.col-fixa-categoria {
  background: #ffffff !important;
  color: #0f172a !important;
  border-right: 2px solid #e2e8f0 !important;
}

body.tema-apple-light .dre-contabil-table thead th.col-fixa-categoria {
  background: #eaedf1 !important;
  color: #1e293b !important;
}

body.tema-apple-light .dre-contabil-table th.col-destaque-total,
body.tema-apple-light .dre-contabil-table td.col-destaque-total {
  background: #f8fafc !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  border-left: 2px solid #e2e8f0 !important;
}

body.tema-apple-light .dre-contabil-table th.col-destaque-media,
body.tema-apple-light .dre-contabil-table td.col-destaque-media {
  background: #f8fafc !important;
  color: #64748b !important;
}

/* Linha de Grupo (ex: RECEITAS OPERACIONAIS, CUSTOS OPERACIONAIS) */
body.tema-apple-light .dre-section-title-row,
body.tema-apple-light .dre-section-title-row td {
  background: #eef2f6 !important; /* Faixa de destaque cinza-azulada como na captura */
  color: #0f172a !important;
  font-weight: 800 !important;
}

body.tema-apple-light .dre-row-total,
body.tema-apple-light .dre-row-total td {
  background: #f1f5f9 !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

body.tema-apple-light .dre-row-resultado,
body.tema-apple-light .dre-row-resultado td {
  background: #e0f2fe !important;
  font-weight: 900 !important;
  color: #0369a1 !important;
}

body.tema-apple-light .cell-vazia {
  color: #cbd5e1 !important;
}

body.tema-apple-light .dre-row-input:hover td {
  background-color: #f8fafc !important;
}

/* 10. DEMAIS MÓDULOS: CLIENTES, TAREFAS, AGENDA, PREÇOS, ARQUIVADOS, DASHBOARD */
body.tema-apple-light .clientes-container,
body.tema-apple-light .tarefas-container,
body.tema-apple-light .dashboard-container,
body.tema-apple-light .tabela-precos-container,
body.tema-apple-light .faturamento-container,
body.tema-apple-light .arquivados-container {
  background: transparent !important;
}

/* Tabelas Genéricas */
body.tema-apple-light table {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
}
body.tema-apple-light table thead th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}
body.tema-apple-light table tbody td {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
}
body.tema-apple-light table tbody tr:hover {
  background: #f8fafc !important;
}

/* Calendário */
body.tema-apple-light .cal-header h2 {
  color: #0f172a !important;
}
body.tema-apple-light .cal-header button {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}
body.tema-apple-light .cal-header button:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
body.tema-apple-light .cal-weekday {
  color: #64748b !important;
}
body.tema-apple-light .cal-day {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
body.tema-apple-light .cal-day.has-items {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}
body.tema-apple-light .cal-day-num {
  color: #475569 !important;
}

/* Dashboard Executivo */
body.tema-apple-light .dash-kpi-card,
body.tema-apple-light .dash-chart-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  border-radius: 10px !important;
}
body.tema-apple-light .dash-kpi-title,
body.tema-apple-light .dash-chart-title {
  color: #475569 !important;
}
body.tema-apple-light .dash-kpi-val {
  color: #0f172a !important;
}

/* Dropzone de PDF */
body.tema-apple-light .pdf-dropzone {
  background: #ffffff !important;
  border: 2px dashed #cbd5e1 !important;
}
body.tema-apple-light .pdf-dropzone:hover {
  border-color: #0284c7 !important;
  background: #f0f9ff !important;
}

/* ==========================================================================
   CARDS DE SELEÇÃO DE TEMA NO MODAL DE CONFIGURAÇÕES
   ========================================================================== */
.tema-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 10px;
  margin-bottom: 14px;
}

.tema-card-option {
  position: relative;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
}

body.tema-apple-light .tema-card-option {
  background: #ffffff;
  border-color: #e2e8f0;
}

.tema-card-option:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.15);
}

body.tema-apple-light .tema-card-option:hover {
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
}

.tema-card-option.is-selected {
  border-color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.08) !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25) !important;
}

.tema-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tema-card-title {
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
}
body.tema-apple-light .tema-card-title {
  color: #0f172a;
}

.tema-card-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tema-card-option.is-selected .tema-card-radio {
  border-color: #0284c7;
  background: #0284c7;
}

.tema-card-option.is-selected .tema-card-radio::after {
  content: "";
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
}

.tema-preview-box {
  border-radius: 8px;
  height: 72px;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.tema-apple-light .tema-preview-box {
  border-color: #e2e8f0;
}

/* Miniatura Dark Slate */
.tema-preview-dark {
  background: #0f172a;
}
.tema-preview-dark .mini-sb {
  width: 24px;
  background: #1e293b;
  border-right: 1px solid #334155;
}
.tema-preview-dark .mini-content {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tema-preview-dark .mini-bar {
  height: 12px;
  background: #162032;
  border-radius: 4px;
}
.tema-preview-dark .mini-cards {
  display: flex;
  gap: 6px;
  flex: 1;
}
.tema-preview-dark .mini-c {
  flex: 1;
  background: #1e293b;
  border-radius: 4px;
  border: 1px solid #334155;
}

/* Miniatura Apple Light */
.tema-preview-light {
  background: #f4f6f8;
}
.tema-preview-light .mini-sb {
  width: 24px;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
}
.tema-preview-light .mini-content {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tema-preview-light .mini-bar {
  height: 12px;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}
.tema-preview-light .mini-cards {
  display: flex;
  gap: 6px;
  flex: 1;
}
.tema-preview-light .mini-c {
  flex: 1;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.tema-card-desc {
  font-size: 11px;
  line-height: 1.4;
  color: #94a3b8;
}
body.tema-apple-light .tema-card-desc {
  color: #64748b;
}

.tema-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.tema-badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

/* ==========================================================================
   TEMA INTERMEDIÁRIO: BRANCO GELO / SLATE FROST (SEM BRILHO EXCESSIVO)
   Ativado por: body.tema-ice-white / html.tema-ice-white
   ========================================================================== */
html.tema-ice-white,
body.tema-ice-white {
  --bg-app: #e9edf2;
  --bg-surface: #f4f7fa;
  --border-light: #cbd5e1;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
}

body.tema-ice-white {
  background-color: #e9edf2 !important;
  color: #0f172a !important;
}

body.tema-ice-white #app-system,
body.tema-ice-white main {
  background-color: #e9edf2 !important;
}

/* Sidebar em Branco Gelo Fosco */
body.tema-ice-white #crm-sidebar {
  background-color: #edf2f7 !important;
  border-right: 1px solid #cbd5e1 !important;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.04) !important;
}

body.tema-ice-white .sidebar-brand-wrapper {
  border-bottom: 1px solid #cbd5e1 !important;
}

body.tema-ice-white .sidebar-brand-title {
  color: #0f172a !important;
}

body.tema-ice-white .sidebar-role-badge {
  background: rgba(2, 132, 199, 0.12) !important;
  color: #0369a1 !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

body.tema-ice-white .sidebar-section-header .sidebar-label {
  color: #64748b !important;
}

body.tema-ice-white .sidebar-item {
  color: #334155 !important;
  background: transparent !important;
}

body.tema-ice-white .sidebar-item:hover:not(.active) {
  background-color: #dde4ed !important;
  color: #0f172a !important;
}

body.tema-ice-white .sidebar-item.active {
  background-color: #dbeafe !important;
  color: #1d4ed8 !important;
  font-weight: 700 !important;
}

body.tema-ice-white .sidebar-item.active::before {
  background: #2563eb !important;
}

body.tema-ice-white .sidebar-icon {
  color: #475569 !important;
}

body.tema-ice-white .badge-atalho-key {
  background: #dde4ed !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

/* KPIs, Filtros & Barras Superiores */
body.tema-ice-white .kpi-container,
body.tema-ice-white .filter-bar,
body.tema-ice-white .lancamentos-top-bar,
body.tema-ice-white .dre-toolbar-card {
  background: #f4f7fa !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.tema-ice-white .kpi-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}
body.tema-ice-white .kpi-title,
body.tema-ice-white .kpi-sub {
  color: #475569 !important;
}
body.tema-ice-white .kpi-value {
  color: #0f172a !important;
}

/* Colunas e Cards do Kanban */
body.tema-ice-white .kanban-col {
  background: #dde4ed !important;
  border: 1px solid #cbd5e1 !important;
}

body.tema-ice-white .kanban-header {
  background: #e2e8f0 !important;
  border-bottom: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.tema-ice-white .kanban-header-badge {
  background: #cbd5e1 !important;
  color: #1e293b !important;
}

body.tema-ice-white .card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.tema-ice-white .card:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15) !important;
}

body.tema-ice-white .card-title {
  color: #0f172a !important;
}

body.tema-ice-white .card-sub {
  color: #475569 !important;
}

body.tema-ice-white .card-notes {
  background: #edf2f7 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

body.tema-ice-white .card-attendant {
  background: rgba(2, 132, 199, 0.12) !important;
  color: #0369a1 !important;
}

body.tema-ice-white .card-price {
  color: #047857 !important;
}

/* Inputs, Selects & Botões */
body.tema-ice-white input[type="text"],
body.tema-ice-white input[type="number"],
body.tema-ice-white input[type="date"],
body.tema-ice-white select,
body.tema-ice-white textarea,
body.tema-ice-white .filter-bar input,
body.tema-ice-white .filter-bar select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.tema-ice-white .btn-action,
body.tema-ice-white #btn-toggle-colunas-kanban,
body.tema-ice-white #btn-toggle-kpi,
body.tema-ice-white .btn-toggle-filtros,
body.tema-ice-white .btn-filtro-pilula,
body.tema-ice-white .btn-modo-mes,
body.tema-ice-white .btn-dre-action {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

body.tema-ice-white .btn-action:hover,
body.tema-ice-white #btn-toggle-colunas-kanban:hover,
body.tema-ice-white #btn-toggle-kpi:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Modais & Painel de Configurações */
body.tema-ice-white .modal-box {
  background: #f4f7fa !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
body.tema-ice-white .modal-header {
  border-bottom: 1px solid #cbd5e1 !important;
}
body.tema-ice-white .modal-header h3 {
  color: #0f172a !important;
}
body.tema-ice-white .tab-usuarios-nav button {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}
body.tema-ice-white .tab-usuarios-nav button.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}
body.tema-ice-white .perm-group {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}
body.tema-ice-white .perm-title {
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
body.tema-ice-white .perm-item label {
  color: #334155 !important;
}

/* Módulo de Lançamentos Financeiros & DRE Matriz */
body.tema-ice-white .lancamentos-module-container {
  background-color: #e9edf2 !important;
  color: #0f172a !important;
}
body.tema-ice-white .lancamentos-coluna-mes {
  background: #f4f7fa !important;
  border: 1px solid #cbd5e1 !important;
}
body.tema-ice-white .coluna-mes-header {
  background: #e2e8f0 !important;
  border-bottom: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
body.tema-ice-white .mini-card-teto {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
}
body.tema-ice-white .gasto-item-row {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
body.tema-ice-white .dre-table-responsive-scroll,
body.tema-ice-white .dre-chart-card {
  background: #f4f7fa !important;
  border: 1px solid #cbd5e1 !important;
}
body.tema-ice-white .dre-contabil-table thead th {
  background: #dde4ed !important;
  color: #334155 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}
body.tema-ice-white .dre-contabil-table th.col-fixa-categoria,
body.tema-ice-white .dre-contabil-table td.col-fixa-categoria {
  background: #f4f7fa !important;
  color: #0f172a !important;
  border-right: 2px solid #cbd5e1 !important;
}
body.tema-ice-white .dre-section-title-row td {
  background: #dde4ed !important;
  color: #0f172a !important;
  font-weight: 800 !important;
}

/* Miniatura Branco Gelo na tela de Configurações */
.tema-preview-ice {
  background: #e9edf2;
}
.tema-preview-ice .mini-sb {
  width: 24px;
  background: #edf2f7;
  border-right: 1px solid #cbd5e1;
}
.tema-preview-ice .mini-content {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tema-preview-ice .mini-bar {
  height: 12px;
  background: #f4f7fa;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}
.tema-preview-ice .mini-cards {
  display: flex;
  gap: 6px;
  flex: 1;
}
.tema-preview-ice .mini-c {
  flex: 1;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}
