/* =====================================================================
   temas.css · 2 propostas de design para comparar (26/11/2026)
   html[data-tema="claro"]  = Proposta A (menu branco, estilo app moderno)
   html[data-tema="azul"]   = Proposta B (menu azul da marca, ação em amarelo)
   Só de 769 px para cima: o celular continua como era.
   ===================================================================== */
@media (min-width: 769px) {

/* ======================= PROPOSTA A · CLARO ======================= */
html[data-tema="claro"] { --bg: #F7F8FA; }
html[data-tema="claro"] body { background: #F7F8FA; }

html[data-tema="claro"] .sidebar { background: #FFFFFF; border-right: 1px solid #EAECF0; }
html[data-tema="claro"] .sidebar-brand { border-bottom: 1px solid #F2F4F7; }
html[data-tema="claro"] .brand-text { color: #0F2A4A; font-size: 21px; letter-spacing: -.6px; }
html[data-tema="claro"] .nav-grupo { color: #98A2B3; }
html[data-tema="claro"] .nav-item { color: #475467; }
html[data-tema="claro"] .nav-item svg { opacity: .7; }
html[data-tema="claro"] .nav-item:hover { background: #F2F4F7; color: #101828; }
html[data-tema="claro"] .nav-item.active { background: #EEF4FF; color: #14539B; box-shadow: none; font-weight: 700; }
html[data-tema="claro"] .nav-item.active svg { opacity: 1; }
html[data-tema="claro"] .sidebar-footer { color: #98A2B3; border-top: 1px solid #F2F4F7; }
html[data-tema="claro"] .sidebar-footer span { color: #475467; }
html[data-tema="claro"] body.menu-recolhido .nav-grupo { background: #EAECF0; }
html[data-tema="claro"] .sidebar-nav { scrollbar-color: #D0D5DD transparent; }

html[data-tema="claro"] .topbar { background: rgba(247,248,250,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid #EAECF0; box-shadow: none; }

html[data-tema="claro"] .dash-title,
html[data-tema="claro"] .page-header h1 { font-size: 32px; font-weight: 800; letter-spacing: -.035em; }

html[data-tema="claro"] .dash-kpi,
html[data-tema="claro"] .stat-card {
  background: #fff; border: 0; border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px -8px rgba(16,24,40,.10);
  padding: 20px 22px;
}
html[data-tema="claro"] .dash-kpi:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,.05), 0 14px 30px -10px rgba(16,24,40,.18); }
html[data-tema="claro"] .dash-kpi-icon { width: 42px; height: 42px; border-radius: 12px; }
html[data-tema="claro"] .dash-kpi-val { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
html[data-tema="claro"] .dash-kpi-lbl { font-size: 11.5px; letter-spacing: .07em; color: #667085; }
html[data-tema="claro"] .dash-kpi-lucro { background: linear-gradient(140deg, #1A5FB0 0%, #0B3D78 100%); box-shadow: 0 16px 34px -14px rgba(11,61,120,.6); }

html[data-tema="claro"] .dash-chart-card,
html[data-tema="claro"] .dash-section-card,
html[data-tema="claro"] .card,
html[data-tema="claro"] .exc-card,
html[data-tema="claro"] .table-wrapper {
  border: 0; border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px -8px rgba(16,24,40,.10);
}
html[data-tema="claro"] .dash-chart-title { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
html[data-tema="claro"] .dash-periodo-btns { background: #EEF0F3; border: 0; border-radius: 12px; padding: 4px; }
html[data-tema="claro"] .dash-per-btn { border-radius: 9px; }

html[data-tema="claro"] .tabs { background: #EEF0F3; }
html[data-tema="claro"] .btn-primary { background: #14539B; }

/* ======================= PROPOSTA B · AZUL ibexGo ======================= */
html[data-tema="azul"] { --bg: #F3F6FA; --blue: #0E4A8F; }
html[data-tema="azul"] body { background: #F3F6FA; }

html[data-tema="azul"] .sidebar { background: linear-gradient(180deg, #0F55A3 0%, #0B3F7C 55%, #08305F 100%); border-right: 0; }
html[data-tema="azul"] .sidebar-brand { border-bottom: 1px solid rgba(255,255,255,.12); }
html[data-tema="azul"] .brand-text { font-size: 22px; letter-spacing: -.7px; }
html[data-tema="azul"] .brand-arrow { color: #FFCB05; }
html[data-tema="azul"] .nav-grupo { color: rgba(255,255,255,.55); }
html[data-tema="azul"] .nav-item { color: rgba(255,255,255,.82); }
html[data-tema="azul"] .nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
html[data-tema="azul"] .nav-item.active { background: #FFFFFF; color: #0B3F7C; font-weight: 700; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); }
html[data-tema="azul"] .nav-item.active svg { color: #0E4A8F; }
html[data-tema="azul"] .sidebar-footer { border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.5); }
html[data-tema="azul"] body.menu-recolhido .nav-grupo { background: rgba(255,255,255,.18); }
/* menu recolhido: a marca vira só o "›" amarelo */
html[data-tema="azul"] body.menu-recolhido .sidebar-brand { padding: 0; justify-content: center; }
html[data-tema="azul"] body.menu-recolhido .brand-text { font-size: 0; letter-spacing: 0; }
html[data-tema="azul"] body.menu-recolhido .brand-text b::after { content: none; }
html[data-tema="azul"] body.menu-recolhido .brand-arrow {
  display: inline-block; font-size: 0; width: 17px; height: 17px;
  border-top: 5px solid #FFCB05; border-right: 5px solid #FFCB05; border-radius: 2px;
  transform: translateX(-4px) rotate(45deg);
}
/* o nome do item aparece num balão (melhorias.js), não no ::after que era cortado */
body.menu-recolhido .nav-item::after { display: none !important; }
.nav-dica {
  position: fixed; z-index: 500; pointer-events: none;
  background: #101828; color: #fff; padding: 7px 12px; border-radius: 9px;
  font: 600 13px 'DM Sans', system-ui, sans-serif; white-space: nowrap;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.45);
  transform: translateY(-50%); opacity: 0; transition: opacity .12s;
}
.nav-dica.on { opacity: 1; }
.nav-dica::before {
  content: ""; position: absolute; left: -5px; top: 50%; margin-top: -5px;
  border: 5px solid transparent; border-left: 0; border-right-color: #101828;
}

html[data-tema="azul"] .topbar { background: #fff; border-bottom: 1px solid #E3E8EF; }
html[data-tema="azul"] .main-wrapper { background: linear-gradient(180deg, #E6EEF8 0px, #F3F6FA 340px); }

html[data-tema="azul"] .dash-title,
html[data-tema="azul"] .page-header h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: #0B2545; }

html[data-tema="azul"] .dash-kpi,
html[data-tema="azul"] .stat-card {
  background: #fff; border: 1px solid #E3E8EF; border-radius: 20px;
  box-shadow: 0 10px 24px -14px rgba(14,74,143,.25);
}
html[data-tema="azul"] .dash-kpi-icon { width: 42px; height: 42px; border-radius: 50%; }
html[data-tema="azul"] .dash-kpi-val { font-size: 25px; font-weight: 800; letter-spacing: -.03em; color: #0B2545; }
html[data-tema="azul"] .dash-kpi-lucro { background: linear-gradient(140deg, #1462B8 0%, #0B3F7C 100%); border-color: #0B3F7C; box-shadow: 0 16px 32px -14px rgba(11,63,124,.65); }
html[data-tema="azul"] .dash-kpi-lucro .dash-kpi-val,
html[data-tema="azul"] .dash-kpi-lucro .dash-kpi-lbl,
html[data-tema="azul"] .dash-kpi-lucro .dash-kpi-trend { color: #FFFFFF !important; }
html[data-tema="azul"] .dash-kpi-lucro .dash-kpi-icon { background: rgba(255,255,255,.16) !important; color: #FFFFFF !important; }

html[data-tema="azul"] .dash-chart-card,
html[data-tema="azul"] .dash-section-card,
html[data-tema="azul"] .card,
html[data-tema="azul"] .exc-card,
html[data-tema="azul"] .table-wrapper { border: 1px solid #E3E8EF; border-radius: 20px; box-shadow: 0 10px 24px -16px rgba(14,74,143,.22); }
html[data-tema="azul"] .dash-chart-title { font-size: 15px; font-weight: 800; color: #0B2545; }

html[data-tema="azul"] .btn-primary { background: #0E4A8F; color: #FFFFFF; box-shadow: 0 6px 14px -6px rgba(14,74,143,.55); }
html[data-tema="azul"] .btn-primary:hover { background: #0B3F7C; }
html[data-tema="azul"] .dash-per-btn.active,
html[data-tema="azul"] .tab-btn.active { color: #0B3F7C; }
html[data-tema="azul"] .tabs { background: #E3EAF3; }

/* (seletor de comparação: removido do index.html em 26/11, azul escolhido) */
.tema-seletor {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9999;
  display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(16,24,40,.92); box-shadow: 0 14px 30px -10px rgba(0,0,0,.45);
  font-family: 'DM Sans', system-ui, sans-serif;
}
.tema-seletor span { color: rgba(255,255,255,.55); font-size: 12px; font-weight: 600; padding: 7px 8px 7px 12px; }
.tema-seletor button {
  border: 0; cursor: pointer; border-radius: 999px; padding: 7px 14px;
  background: transparent; color: #fff; font: 600 13px 'DM Sans', system-ui, sans-serif;
}
.tema-seletor button.on { background: #FFCB05; color: #111; }
}
@media (max-width: 768px) { .tema-seletor { display: none; } }

/* =====================================================================
   CELULAR · azul (26/11): só cores e o menu de baixo.
   Tamanhos, espaçamentos e alinhamento das telas continuam os de antes.
   ===================================================================== */
@media (max-width: 768px) {
  /* gaveta do menu: igual ao menu do computador (grupos, botões arredondados,
     item ativo em branco) */
  html[data-tema="azul"] .sidebar { width: 272px; background: linear-gradient(180deg, #0F55A3 0%, #0B3F7C 55%, #08305F 100%); box-shadow: 12px 0 40px -12px rgba(0,0,0,.45); }
  html[data-tema="azul"] .sidebar-brand { padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
  html[data-tema="azul"] .brand-text { font-size: 22px; letter-spacing: -.7px; }
  html[data-tema="azul"] .brand-arrow { color: #FFCB05; }
  html[data-tema="azul"] .sidebar-nav { padding: 6px 0 12px; }
  html[data-tema="azul"] .nav-grupo {
    display: block; padding: 14px 24px 5px;
    font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: rgba(255,255,255,.55);
  }
  html[data-tema="azul"] .nav-item {
    margin: 2px 12px; padding: 10px 12px; border-radius: 12px; border-left: 0;
    color: rgba(255,255,255,.85); font-size: 15px; gap: 12px;
  }
  html[data-tema="azul"] .nav-item svg { width: 20px; height: 20px; }
  html[data-tema="azul"] .nav-item:active { background: rgba(255,255,255,.12); }
  html[data-tema="azul"] .nav-item.active {
    background: #fff; color: #0B3F7C; font-weight: 700;
    box-shadow: 0 6px 16px -6px rgba(0,0,0,.35);
  }
  html[data-tema="azul"] .nav-item.active svg { color: #0E4A8F; }
  html[data-tema="azul"] .sidebar-footer { border-top-color: rgba(255,255,255,.12); color: rgba(255,255,255,.5); }
  html[data-tema="azul"] .sidebar-overlay.visible { background: rgba(8,24,48,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

  /* menu de baixo: barra flutuante azul, item ativo em botão branco */
  html[data-tema="azul"] .bottomnav {
    left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding: 6px; gap: 2px;
    border: 0; border-radius: 24px;
    background: linear-gradient(180deg, #0F55A3 0%, #0B3F7C 100%);
    box-shadow: 0 16px 32px -12px rgba(8,48,95,.6), 0 2px 6px rgba(8,48,95,.18);
  }
  html[data-tema="azul"] .bottomnav-item {
    min-height: 52px; padding: 6px 2px 5px; border-radius: 18px;
    color: rgba(255,255,255,.72); font-size: 10.5px; font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    transition: background .2s, color .2s, transform .12s;
  }
  html[data-tema="azul"] .bottomnav-item svg { width: 22px; height: 22px; transition: transform .2s; }
  html[data-tema="azul"] .bottomnav-item.ativo {
    background: #fff; color: #0B3F7C; font-weight: 700;
    box-shadow: 0 6px 14px -6px rgba(0,0,0,.4);
  }
  html[data-tema="azul"] .bottomnav-item.ativo svg { transform: translateY(-1px); }
  html[data-tema="azul"] .bottomnav-item:active { background: rgba(255,255,255,.14); transform: scale(.96); }
  html[data-tema="azul"] .bottomnav-item.ativo:active { background: #fff; }

  /* espaço no fim da página para a barra flutuante não cobrir conteúdo */
  html[data-tema="azul"] .content { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  html[data-tema="azul"] .toast-container { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  html[data-tema="azul"] .bottomnav-item { transition: none; }
}
