/* Gov BR DS: tipografia Rawline recomendada; Public Sans como alternativa (ver docs/GOVBR_DS.md) */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&display=swap');

/* Gov BR Design System - Tokens de cores (Padrão Digital de Governo) */
/* Ref: https://www.gov.br/ds/fundamentos-visuais/cores */

/* Light mode - tokens Gov BR */
:root,
[data-mantine-color-scheme="light"] {
  /* Superfície */
  --govbr-surface-0: #ffffff;
  --govbr-surface-2: #f8f8f8;
  /* Leitura */
  --govbr-reading-80: #333333;
  --govbr-reading-on-dark: #ffffff;
  /* Interação (Blue Warm Vivid 70 / 20 dark) */
  --govbr-interactive-70: #1351B4;
  --govbr-interactive-20: #C5D4EB;
  /* Feedback */
  --govbr-feedback-success: #168821;
  --govbr-feedback-success-bg: #E3F5E1;
  --govbr-feedback-alert: #FFCD07;
  --govbr-feedback-alert-bg: #FFF5C2;
  --govbr-feedback-error: #E52207;
  --govbr-feedback-error-bg: #FDE0DB;
  --govbr-feedback-info: #155BCB;
  --govbr-feedback-info-bg: #D4E5FF;
  /* Aliases para compatibilidade (cofi = cofinanciamento) */
  --cofi-primary: var(--govbr-interactive-70);
  --cofi-secondary: #155BCB;
  --cofi-accent: var(--govbr-feedback-alert);
  --cofi-white: var(--govbr-surface-0);
  --cofi-gray-light: var(--govbr-surface-2);
  --cofi-gray-border: #e3e8ef;
  --cofi-shadow: rgba(0, 31, 77, 0.12);
  --cofi-black: var(--govbr-reading-80);
}

/* Dark mode - tokens Gov BR */
[data-mantine-color-scheme="dark"] {
  /* Superfície escura (Blue Warm Vivid 90 / 80) */
  --govbr-surface-dark-90: #071D41;
  --govbr-surface-dark-80: #0C326F;
  /* Superfície e leitura em dark (cards e texto) */
  --govbr-surface-2: #0C326F;
  --govbr-reading-80: #E2E8F0;
  /* Leitura em fundo escuro */
  --govbr-reading-on-dark: #ffffff;
  /* Interação em fundo escuro (Blue Warm 20) */
  --govbr-interactive-20: #C5D4EB;
  /* Feedback - cores mais vivas para ícones e badges no dark */
  --govbr-feedback-info: #81AEFC;
  --govbr-feedback-info-bg: rgba(129, 174, 252, 0.28);
  --govbr-feedback-success: #4ADE80;
  --govbr-feedback-success-bg: rgba(74, 222, 128, 0.24);
  --govbr-feedback-alert: #FACC15;
  --govbr-feedback-alert-bg: rgba(250, 204, 21, 0.24);
  --govbr-feedback-error: #F87171;
  --govbr-feedback-error-bg: rgba(248, 113, 113, 0.24);
  /* Aliases - dark */
  --cofi-primary: var(--govbr-interactive-20);
  --cofi-secondary: #81AEFC;
  --cofi-accent: #FFBE2E;
  --cofi-white: var(--govbr-surface-dark-80);
  --cofi-gray-light: var(--govbr-surface-dark-90);
  --cofi-gray-border: #334155;
  --cofi-shadow: rgba(0, 0, 0, 0.5);
  --cofi-black: var(--govbr-reading-on-dark);
}

/* Global styles */
body {
  font-family: 'Public Sans', 'Inter', system-ui, sans-serif;
  background-color: var(--cofi-gray-light);
  margin: 0;
  padding: 0;
  color: var(--cofi-black);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Gov BR Feedback - Alerts (sucesso, alerta, erro, informação) */
.mantine-Alert-root[data-color="green"] {
  --alert-bg: var(--govbr-feedback-success-bg, #E3F5E1);
  --alert-border: var(--govbr-feedback-success, #168821);
}
.mantine-Alert-root[data-color="yellow"] {
  --alert-bg: var(--govbr-feedback-alert-bg, #FFF5C2);
  --alert-border: var(--govbr-feedback-alert, #FFCD07);
}
.mantine-Alert-root[data-color="red"] {
  --alert-bg: var(--govbr-feedback-error-bg, #FDE0DB);
  --alert-border: var(--govbr-feedback-error, #E52207);
}
.mantine-Alert-root[data-color="blue"] {
  --alert-bg: var(--govbr-feedback-info-bg, #D4E5FF);
  --alert-border: var(--govbr-feedback-info, #155BCB);
}

/* Gov BR Acessibilidade - Foco visível (navegação por teclado) */
.mantine-Button-root:focus-visible {
  outline: 2px solid var(--cofi-primary);
  outline-offset: 2px;
}
.mantine-NavLink-root:focus-visible {
  outline: 2px solid var(--cofi-primary);
  outline-offset: 2px;
}
a:focus-visible {
  outline: 2px solid var(--cofi-primary);
  outline-offset: 2px;
}
[data-mantine-color-scheme="dark"] .mantine-Button-root:focus-visible,
[data-mantine-color-scheme="dark"] .mantine-NavLink-root:focus-visible,
[data-mantine-color-scheme="dark"] a:focus-visible {
  outline-color: var(--cofi-primary);
}

/* Gov BR - Drawer de Termos de Uso e Privacidade */
.terms-drawer-content {
  color: var(--govbr-reading-80);
}
.terms-drawer-content a {
  color: var(--govbr-interactive-70);
}
.terms-drawer-content a:hover {
  color: var(--govbr-interactive-70);
  text-decoration: underline;
}
[data-mantine-color-scheme="dark"] .terms-drawer-content {
  color: var(--govbr-reading-80);
}
[data-mantine-color-scheme="dark"] .terms-drawer-content a {
  color: var(--govbr-interactive-20);
}
[data-mantine-color-scheme="dark"] .terms-drawer-content a:hover {
  color: var(--govbr-interactive-20);
  text-decoration: underline;
}

/* AppShell - garantir espaço para sidebar com margens */
.mantine-AppShell-root {
  overflow: visible;
}

/* Main: reserva espaço para a faixa (20px); no hover da sidebar, 300px (20 + 280) */
.mantine-AppShell-main {
  padding-top: 0;
  margin-left: 20px;
  transition: margin-left 0.4s ease;
}

.mantine-AppShell-root:has(.sidebar-hover-wrapper:hover) .mantine-AppShell-main {
  margin-left: 300px;
}

/* Sidebar hover: wrapper com faixa + painel (expandir ao passar o mouse) */
.sidebar-hover-wrapper {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  z-index: 100;
  display: flex;
  flex-direction: row;
}

.sidebar-tab {
  width: 20px;
  min-width: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--cofi-white) 0%, rgba(245, 247, 251, 0.9) 100%);
  border: 1px solid var(--cofi-gray-border);
  border-right: none;
  border-radius: 16px 0 0 16px;
  margin: 12px 0 12px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: default;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-mantine-color-scheme="dark"] .sidebar-tab {
  background: linear-gradient(180deg, var(--cofi-white) 0%, rgba(30, 41, 59, 0.6) 100%);
  border-color: var(--cofi-gray-border);
}

.sidebar-panel {
  width: 0;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.4s ease;
}

.sidebar-hover-wrapper:hover .sidebar-panel {
  width: 280px;
}

/* Sidebar fixada (switch "Manter menu aberto" ligado) */
.sidebar-hover-wrapper.sidebar-pinned .sidebar-panel {
  width: 280px;
}

.mantine-AppShell-root:has(.sidebar-hover-wrapper.sidebar-pinned) .mantine-AppShell-main {
  margin-left: 300px;
}

/* Navbar dentro do painel: continuação visual da tab (bordas só à direita, sem junta) */
.sidebar-panel .mantine-AppShell-navbar {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  margin: 12px 12px 12px 0;
  height: calc(100vh - 24px);
  border-radius: 0 16px 16px 0;
  border-left: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 2px 0 4px rgba(0, 0, 0, 0.04);
}

/* AppShell Navbar (estilos base; dentro do painel o posicionamento é sobrescrito acima) */
.mantine-AppShell-navbar {
  background: linear-gradient(180deg, var(--cofi-white) 0%, rgba(245, 247, 251, 0.5) 100%);
  border: 1px solid var(--cofi-gray-border);
  border-radius: 16px;
  margin: 12px 0 12px 12px;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - 24px);
  position: fixed;
  top: 12px;
  left: 0;
  z-index: 100;
}

/* Dark mode: Background da sidebar */
[data-mantine-color-scheme="dark"] .mantine-AppShell-navbar {
  background: linear-gradient(180deg, var(--cofi-white) 0%, rgba(30, 41, 59, 0.3) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  border-color: var(--cofi-gray-border);
}

/* Sidebar nav stack - padding e espaçamento */
.sidebar-nav-stack {
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

/* Navigation Links */
.mantine-NavLink-root {
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--cofi-black);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding-left: 0.75rem;
}

.mantine-NavLink-root:hover {
  background-color: var(--cofi-primary) !important;
  color: var(--cofi-white) !important;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(15, 47, 107, 0.15);
}

.mantine-NavLink-root[data-active="true"] {
  background-color: var(--cofi-primary) !important;
  color: var(--cofi-white) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: pulse-subtle 2s ease-in-out infinite;
  transform: none;
}

.mantine-NavLink-root[data-active="true"]:hover {
  transform: translateX(4px); /* Permitir hover mesmo quando ativo */
}

/* Animação de pulse sutil no link ativo */
@keyframes pulse-subtle {
  0%, 100% {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 2px 8px rgba(15, 47, 107, 0.2);
  }
}

[data-mantine-color-scheme="dark"] .mantine-NavLink-root[data-active="true"] {
  animation: pulse-subtle-dark 2s ease-in-out infinite;
}

@keyframes pulse-subtle-dark {
  0%, 100% {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  }
}

/* Barra lateral indicadora no link ativo */
.mantine-NavLink-root[data-active="true"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background-color: var(--cofi-white);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

/* Dark mode: NavLinks - texto e ícones visíveis */
[data-mantine-color-scheme="dark"] .mantine-NavLink-root {
  color: #e2e8f0 !important;
}

[data-mantine-color-scheme="dark"] .mantine-NavLink-root svg {
  color: #e2e8f0 !important;
  fill: currentColor !important;
}

/* Dark mode: hover e item selecionado - destaque bem visível */
[data-mantine-color-scheme="dark"] .mantine-NavLink-root:hover,
[data-mantine-color-scheme="dark"] .mantine-NavLink-root[data-active="true"] {
  background-color: #1e40af !important; /* blue-800 - destaque forte no fundo escuro */
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.4);
}

[data-mantine-color-scheme="dark"] .mantine-NavLink-root:hover svg,
[data-mantine-color-scheme="dark"] .mantine-NavLink-root[data-active="true"] svg {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* Barra lateral do link ativo no dark - contraste com o novo fundo */
[data-mantine-color-scheme="dark"] .mantine-NavLink-root[data-active="true"]::before {
  background-color: #93c5fd;
  box-shadow: 0 0 6px rgba(147, 197, 253, 0.6);
}

/* Textos de seção (Gestão, Ajuda) no dark mode */
[data-mantine-color-scheme="dark"] .mantine-Text-root[data-dimmed="true"],
[data-mantine-color-scheme="dark"] .mantine-Text-root.c-dimmed {
  color: #94a3b8 !important; /* slate-400 - mais claro que dimmed padrão */
}

/* Dark mode: Textos "Gestão" e "Ajuda" na sidebar - brancos */
[data-mantine-color-scheme="dark"] .mantine-AppShell-navbar .mantine-Text-root[data-dimmed="true"][data-fw="600"],
[data-mantine-color-scheme="dark"] .mantine-AppShell-navbar .mantine-Text-root.c-dimmed[data-fw="600"] {
  color: #ffffff !important; /* Branco puro */
}

/* Dark mode: Divider mais visível */
[data-mantine-color-scheme="dark"] .mantine-Divider-root {
  border-color: #334155 !important; /* slate-700 - mais visível */
}

/* Sidebar divider - estilo melhorado */
.sidebar-divider {
  margin-top: 1.5rem !important;
  margin-bottom: 1rem !important;
  opacity: 0.6;
  border-color: var(--cofi-gray-border);
}

[data-mantine-color-scheme="dark"] .sidebar-divider {
  opacity: 0.8;
  border-color: #475569 !important; /* slate-600 */
}

/* Títulos de seção melhorados */
.section-title {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.7rem !important;
  margin-bottom: 0.5rem;
}

.mantine-AppShell-navbar .mantine-Group-root .mantine-Text-root.section-title {
  margin-bottom: 0;
}

/* Ícones dos títulos de seção */
.mantine-AppShell-navbar .mantine-Group-root svg {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

[data-mantine-color-scheme="dark"] .mantine-AppShell-navbar .mantine-Group-root svg {
  opacity: 0.8;
}

/* Scrollbar customizada para sidebar */
.mantine-AppShell-navbar::-webkit-scrollbar {
  width: 6px;
}

.mantine-AppShell-navbar::-webkit-scrollbar-track {
  background: transparent;
}

.mantine-AppShell-navbar::-webkit-scrollbar-thumb {
  background: var(--cofi-primary);
  border-radius: 3px;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.mantine-AppShell-navbar::-webkit-scrollbar-thumb:hover {
  opacity: 0.8;
}

[data-mantine-color-scheme="dark"] .mantine-AppShell-navbar::-webkit-scrollbar-thumb {
  background: var(--cofi-secondary);
  opacity: 0.6;
}

[data-mantine-color-scheme="dark"] .mantine-AppShell-navbar::-webkit-scrollbar-thumb:hover {
  opacity: 0.9;
}

/* Modal - Footer Paper */
.modal-footer-paper {
  position: sticky;
  bottom: 0;
  background-color: var(--cofi-white);
  z-index: 5;
  transition: background-color 0.3s ease;
}

/* Modal Fullscreen - Melhor aproveitamento do espaço */
#modal-preencher-plano .mantine-Modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
}

#modal-preencher-plano .mantine-Modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--mantine-spacing-md);
}

/* Dark mode: Modal */
[data-mantine-color-scheme="dark"] .modal-footer-paper {
  background-color: var(--cofi-white) !important; /* slate-800 */
}

/* Dark mode: Ícone do título do modal */
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-title svg {
  color: var(--cofi-primary) !important;
}

/* Dark mode: Tabs no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Tabs-tab {
  color: #e2e8f0 !important; /* slate-200 - texto claro */
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Tabs-tab[data-active="true"] {
  color: var(--cofi-primary) !important;
  border-color: var(--cofi-primary) !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Tabs-tab:hover {
  background-color: rgba(59, 130, 246, 0.1) !important; /* azul com transparência */
  color: var(--cofi-primary) !important;
}

/* Dark mode: Cards e Papers dentro do modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Card-root,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Paper-root {
  background-color: var(--cofi-white) !important; /* slate-800 */
  border-color: var(--cofi-gray-border) !important;
}

/* Dark mode: Textos dimmed no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Text-root[data-dimmed="true"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Text-root.c-dimmed {
  color: #94a3b8 !important; /* slate-400 */
}

/* Dark mode: Alert no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Alert-root {
  background-color: rgba(59, 130, 246, 0.1) !important; /* azul claro com transparência */
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Alert-root[data-color="red"] {
  background-color: rgba(239, 68, 68, 0.1) !important; /* vermelho claro com transparência */
}

/* Dark mode: Badge no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Badge-root {
  color: #e2e8f0 !important; /* texto claro */
}

/* Dark mode: Título do modal de plano */
[data-mantine-color-scheme="dark"] #modal-plano-titulo {
  color: #e2e8f0 !important; /* slate-200 - texto claro */
}

/* Dark mode: Texto dimmed abaixo do título do modal */
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-title .mantine-Text-root[data-dimmed="true"],
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-title .mantine-Text-root.c-dimmed,
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-title .mantine-Stack .mantine-Text-root {
  color: #94a3b8 !important; /* slate-400 - mais claro que dimmed padrão */
}

/* Dark mode: Badge do tipo de plano no título */
[data-mantine-color-scheme="dark"] #modal-plano-tipo-badge {
  color: #e2e8f0 !important; /* texto claro */
  background-color: rgba(59, 130, 246, 0.2) !important; /* azul com transparência */
  border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Dark mode: Group do título do modal */
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-title .mantine-Group-root {
  color: inherit;
}

/* Dark mode: Ícone no título do modal de plano */
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-title svg {
  color: var(--cofi-primary) !important; /* azul primário */
}

/* Dark mode: Ícones nos títulos dos modais */
[data-mantine-color-scheme="dark"] .mantine-Modal-title svg {
  color: var(--cofi-primary) !important;
}

/* Dark mode: Modal de alterar status - ícone teal */
[data-mantine-color-scheme="dark"] [id*="alterar-status"] .mantine-Modal-title svg {
  color: #14b8a6 !important; /* teal-500 */
}

/* Dark mode: Modal de auditoria - ícone gray */
[data-mantine-color-scheme="dark"] [id*="auditoria"] .mantine-Modal-title svg {
  color: #94a3b8 !important; /* slate-400 */
}

/* Dark mode: Inputs e Textareas no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-TextInput-input,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Textarea-input,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Select-input,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-PasswordInput-input {
  background-color: var(--cofi-gray-light) !important; /* slate-900 */
  border-color: var(--cofi-gray-border) !important;
  color: var(--cofi-black) !important; /* slate-100 */
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-TextInput-input:focus,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Textarea-input:focus,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input:focus,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Select-input:focus,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-PasswordInput-input:focus {
  border-color: var(--cofi-primary) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* Light mode: Campos disabled - melhorar legibilidade */
.mantine-Modal-body .mantine-TextInput-input[data-disabled="true"],
.mantine-Modal-body .mantine-TextInput-input:disabled,
.mantine-Modal-body .mantine-TextInput-input[readonly],
.mantine-Modal-body .mantine-Textarea-input[data-disabled="true"],
.mantine-Modal-body .mantine-Textarea-input:disabled,
.mantine-Modal-body .mantine-Textarea-input[readonly],
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"],
.mantine-Modal-body .mantine-NumberInput-input:disabled,
.mantine-Modal-body .mantine-NumberInput-input[readonly],
.mantine-Modal-body .mantine-Select-input[data-disabled="true"],
.mantine-Modal-body .mantine-Select-input:disabled {
  background-color: #f8f9fa !important; /* cinza muito claro */
  color: #212529 !important; /* texto escuro para contraste */
  opacity: 1 !important; /* remover opacidade padrão do Mantine */
  cursor: not-allowed;
}

/* Light mode: Campos calculados disabled - manter cores */
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #f0fdf4"],
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#f0fdf4"] {
  background-color: #f0fdf4 !important; /* verde PSB */
  color: #065f46 !important; /* texto verde escuro */
  opacity: 1 !important;
}

.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #fffbeb"],
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#fffbeb"] {
  background-color: #fffbeb !important; /* laranja PSE */
  color: #92400e !important; /* texto laranja escuro */
  opacity: 1 !important;
}

.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #dbeafe"],
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#dbeafe"] {
  background-color: #dbeafe !important; /* azul destaque */
  color: #1e40af !important; /* texto azul escuro */
  opacity: 1 !important;
}

.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #dcfce7"],
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#dcfce7"] {
  background-color: #dcfce7 !important; /* verde total */
  color: #065f46 !important; /* texto verde escuro */
  opacity: 1 !important;
}

.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #fed7aa"],
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#fed7aa"] {
  background-color: #fed7aa !important; /* laranja total PSE */
  color: #92400e !important; /* texto laranja escuro */
  opacity: 1 !important;
}

/* Light mode: Campos extraordinário disabled */
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #eef2ff"],
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#eef2ff"] {
  background-color: #eef2ff !important; /* indigo claro */
  color: #4338ca !important; /* texto indigo escuro */
  opacity: 1 !important;
}

.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #c7d2fe"],
.mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#c7d2fe"] {
  background-color: #c7d2fe !important; /* indigo médio */
  color: #4338ca !important; /* texto indigo escuro */
  opacity: 1 !important;
}

/* Dark mode: Labels e descrições no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Input-label,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Input-description {
  color: #e2e8f0 !important; /* slate-200 */
}

/* Dark mode: Campos disabled - melhorar legibilidade */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-TextInput-input[data-disabled="true"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-TextInput-input:disabled,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-TextInput-input[readonly],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Textarea-input[data-disabled="true"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Textarea-input:disabled,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Textarea-input[readonly],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input:disabled,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[readonly],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Select-input[data-disabled="true"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Select-input:disabled {
  background-color: #334155 !important; /* slate-700 - mais claro que o padrão */
  color: #e2e8f0 !important; /* texto claro */
  opacity: 1 !important;
  cursor: not-allowed;
}

/* Dark mode: Campos calculados disabled - manter cores com melhor contraste */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #f0fdf4"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#f0fdf4"] {
  background-color: rgba(16, 185, 129, 0.2) !important; /* verde com transparência */
  color: #6ee7b7 !important; /* verde claro */
  opacity: 1 !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #fffbeb"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#fffbeb"] {
  background-color: rgba(245, 158, 11, 0.2) !important; /* laranja com transparência */
  color: #fcd34d !important; /* laranja claro */
  opacity: 1 !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #dbeafe"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#dbeafe"] {
  background-color: rgba(59, 130, 246, 0.2) !important; /* azul com transparência */
  color: #93c5fd !important; /* azul claro */
  opacity: 1 !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #dcfce7"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#dcfce7"] {
  background-color: rgba(16, 185, 129, 0.25) !important; /* verde total com transparência */
  color: #6ee7b7 !important; /* verde claro */
  opacity: 1 !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #fed7aa"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#fed7aa"] {
  background-color: rgba(245, 158, 11, 0.25) !important; /* laranja total com transparência */
  color: #fcd34d !important; /* laranja claro */
  opacity: 1 !important;
}

/* Dark mode: Campos extraordinário disabled */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #eef2ff"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#eef2ff"] {
  background-color: rgba(99, 102, 241, 0.2) !important; /* indigo com transparência */
  color: #a5b4fc !important; /* indigo claro */
  opacity: 1 !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color: #c7d2fe"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[data-disabled="true"][style*="background-color:#c7d2fe"] {
  background-color: rgba(99, 102, 241, 0.3) !important; /* indigo médio com transparência */
  color: #a5b4fc !important; /* indigo claro */
  opacity: 1 !important;
}

/* Dark mode: SegmentedControl no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-SegmentedControl-root {
  background-color: var(--cofi-gray-light) !important; /* slate-900 */
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-SegmentedControl-control[data-active="true"] {
  background-color: var(--cofi-primary) !important;
  color: #ffffff !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-SegmentedControl-control {
  color: #e2e8f0 !important; /* slate-200 */
}

/* Dark mode: Títulos e textos gerais no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Title-root,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Text-root {
  color: #e2e8f0 !important; /* slate-200 */
}

/* Dark mode: Ícones dentro dos formulários do modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body svg {
  color: inherit !important; /* Herda a cor do elemento pai */
}

/* Dark mode: Grupos e Stacks no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Group-root,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Stack-root {
  color: inherit;
}

/* Dark mode: LoadingOverlay no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-LoadingOverlay-root {
  background-color: rgba(15, 23, 42, 0.8) !important; /* slate-900 com transparência */
}

/* Dark mode: Progress bar no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Progress-root {
  background-color: var(--cofi-gray-light) !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Progress-section {
  background-color: var(--cofi-primary) !important;
}

/* Dark mode: Select dropdown no modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Select-dropdown {
  background-color: var(--cofi-white) !important; /* slate-800 */
  border-color: var(--cofi-gray-border) !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Select-option {
  color: #e2e8f0 !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Select-option:hover {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Select-option[data-selected="true"] {
  background-color: var(--cofi-primary) !important;
  color: #ffffff !important;
}

/* Labels de campos disabled */
.mantine-Modal-body .mantine-Input-wrapper[data-disabled="true"] .mantine-Input-label,
.mantine-Modal-body .mantine-Input-wrapper[data-disabled="true"] .mantine-Input-description {
  opacity: 0.8; /* leve redução mas ainda legível */
}

[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Input-wrapper[data-disabled="true"] .mantine-Input-label,
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-Input-wrapper[data-disabled="true"] .mantine-Input-description {
  opacity: 0.9; /* no dark mode, manter mais legível */
}

/* Dark mode: Inputs com background color customizado (ex: campos destacados) */
[data-mantine-color-scheme="dark"] .mantine-Modal-body input[style*="background-color: #c7d2fe"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body input[style*="background-color:#c7d2fe"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[style*="background-color: #c7d2fe"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body .mantine-NumberInput-input[style*="background-color:#c7d2fe"] {
  background-color: rgba(59, 130, 246, 0.2) !important; /* azul com transparência */
  color: #e2e8f0 !important; /* texto claro */
  border-color: var(--cofi-primary) !important;
}

/* Dark mode: Cards com background color customizado */
[data-mantine-color-scheme="dark"] .mantine-Modal-body [style*="background-color: #eef2ff"],
[data-mantine-color-scheme="dark"] .mantine-Modal-body [style*="background-color:#eef2ff"] {
  background-color: rgba(59, 130, 246, 0.1) !important; /* azul muito claro com transparência */
}

/* Card de Informações Importantes */
.info-card {
  background-color: #ecfeff; /* cyan-50 */
  transition: background-color 0.3s ease;
}

/* Dark mode: Card de Informações Importantes */
[data-mantine-color-scheme="dark"] .info-card {
  background-color: rgba(59, 130, 246, 0.15) !important; /* azul com transparência */
  border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Dark mode: Título do card de informações */
[data-mantine-color-scheme="dark"] .info-card .mantine-Title-root {
  color: #67e8f9 !important; /* cyan-300 - mais claro */
}

/* Dark mode: Ícone do card de informações */
[data-mantine-color-scheme="dark"] .info-card svg {
  color: #22d3ee !important; /* cyan-400 */
}

/* Dark mode: Textos do card de informações */
[data-mantine-color-scheme="dark"] .info-card .mantine-Text-root {
  color: #e2e8f0 !important; /* slate-200 - texto claro */
}

/* Dark mode: Textos em negrito do card de informações */
[data-mantine-color-scheme="dark"] .info-card .mantine-Text-root[data-fw="600"],
[data-mantine-color-scheme="dark"] .info-card .mantine-Text-root span[data-fw="600"] {
  color: #cffafe !important; /* cyan-200 - mais claro para destaque */
}

/* Dark mode: List items do card de informações */
[data-mantine-color-scheme="dark"] .info-card .mantine-ListItem-root {
  color: #e2e8f0 !important;
}

/* Accordion do card Informações Importantes - dark (mesmas cores da página de dúvidas, azul não cinza) */
[data-mantine-color-scheme="dark"] .info-card [class*="Accordion-item"],
[data-mantine-color-scheme="dark"] .info-card .mantine-Accordion-item {
  background-color: #0C326F !important; /* govbr surface dark 80 - azul */
  border-color: rgba(197, 212, 235, 0.3) !important; /* interactive-20 com transparência */
}

[data-mantine-color-scheme="dark"] .info-card [class*="Accordion-control"],
[data-mantine-color-scheme="dark"] .info-card .mantine-Accordion-control {
  color: #e2e8f0 !important;
}

[data-mantine-color-scheme="dark"] .info-card [class*="Accordion-control"]:hover,
[data-mantine-color-scheme="dark"] .info-card .mantine-Accordion-control:hover {
  background-color: rgba(197, 212, 235, 0.15) !important;
}

[data-mantine-color-scheme="dark"] .info-card [class*="Accordion-panel"],
[data-mantine-color-scheme="dark"] .info-card .mantine-Accordion-panel {
  color: #e2e8f0 !important;
  background-color: #0C326F !important;
}

/* Página de Dúvidas - Dark Mode */

/* Dark mode: Ícones na página de dúvidas */
[data-mantine-color-scheme="dark"] #faq-page-container svg {
  color: var(--cofi-primary) !important; /* azul primário */
}

/* Dark mode: Títulos das seções */
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Title-root {
  color: #e2e8f0 !important; /* slate-200 */
}

/* Dark mode: Textos dimmed */
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Text-root[data-dimmed="true"],
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Text-root.c-dimmed {
  color: #94a3b8 !important; /* slate-400 */
}

/* Dark mode: Links de navegação rápida */
[data-mantine-color-scheme="dark"] .faq-nav-link {
  color: #e2e8f0 !important; /* slate-200 */
}

[data-mantine-color-scheme="dark"] .faq-nav-link:hover {
  background-color: rgba(59, 130, 246, 0.2) !important;
  color: var(--cofi-primary) !important;
}

/* Dark mode: Campo de busca - shortcut key */
.faq-search-shortcut {
  padding: 0 8px;
  border: 1px solid var(--cofi-gray-border);
  border-radius: 4px;
  background: var(--cofi-gray-light);
  transition: all 0.3s ease;
}

[data-mantine-color-scheme="dark"] .faq-search-shortcut {
  border-color: var(--cofi-gray-border) !important;
  background-color: var(--cofi-gray-light) !important; /* slate-900 */
  color: #94a3b8 !important; /* slate-400 */
}

/* Dark mode: Accordion */
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Accordion-item {
  background-color: var(--cofi-white) !important; /* slate-800 */
  border-color: var(--cofi-gray-border) !important;
}

[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Accordion-control {
  color: #e2e8f0 !important; /* slate-200 */
}

[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Accordion-control:hover {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Accordion-panel {
  color: #e2e8f0 !important; /* slate-200 */
}

/* Dark mode: List items */
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-ListItem-root {
  color: #e2e8f0 !important; /* slate-200 */
}

/* Dark mode: Textos em negrito */
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Text-root[data-fw="600"],
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Text-root span[data-fw="600"] {
  color: #cffafe !important; /* cyan-200 - mais claro para destaque */
}

/* Dark mode: Alerts na página de dúvidas */
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Alert-root {
  background-color: rgba(59, 130, 246, 0.1) !important; /* azul com transparência */
}

[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Alert-root[data-color="yellow"] {
  background-color: rgba(234, 179, 8, 0.1) !important; /* amarelo com transparência */
}

[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Alert-root[data-color="red"] {
  background-color: rgba(239, 68, 68, 0.1) !important; /* vermelho com transparência */
}

/* Dark mode: Cards na página de dúvidas */
[data-mantine-color-scheme="dark"] #faq-page-container .mantine-Card-root {
  background-color: var(--cofi-white) !important; /* slate-800 */
  border-color: var(--cofi-gray-border) !important;
}

/* Dark mode: Input de busca */
[data-mantine-color-scheme="dark"] #faq-search-input .mantine-TextInput-input {
  background-color: var(--cofi-gray-light) !important; /* slate-900 */
  border-color: var(--cofi-gray-border) !important;
  color: var(--cofi-black) !important; /* slate-100 */
}

[data-mantine-color-scheme="dark"] #faq-search-input .mantine-TextInput-input:focus {
  border-color: var(--cofi-primary) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}


/* Dark mode: Header do modal - background azulado */
[data-mantine-color-scheme="dark"] .mantine-Modal-header {
  background-color: var(--cofi-white) !important; /* slate-800 - azulado */
  border-bottom-color: var(--cofi-gray-border) !important;
}

/* Dark mode: Header do modal de plano - específico e mais forte */
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-header,
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-header > *,
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-header[style],
[data-mantine-color-scheme="dark"] [id="modal-preencher-plano"] .mantine-Modal-header {
  background-color: var(--cofi-white) !important; /* slate-800 - azulado */
  background: var(--cofi-white) !important; /* slate-800 - azulado */
}

/* Dark mode: Modal content - background azulado */
[data-mantine-color-scheme="dark"] .mantine-Modal-content {
  background-color: var(--cofi-white) !important; /* slate-800 - azulado */
}

/* Dark mode: Modal content do modal de plano - específico */
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-content,
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-content[style],
[data-mantine-color-scheme="dark"] [id="modal-preencher-plano"] .mantine-Modal-content {
  background-color: var(--cofi-white) !important; /* slate-800 - azulado */
  background: var(--cofi-white) !important; /* slate-800 - azulado */
}

/* Dark mode: Body do modal - background azulado */
[data-mantine-color-scheme="dark"] .mantine-Modal-body {
  background-color: var(--cofi-white) !important; /* slate-800 - azulado */
}

/* Dark mode: Body do modal de plano - específico */
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-body,
[data-mantine-color-scheme="dark"] #modal-preencher-plano .mantine-Modal-body[style],
[data-mantine-color-scheme="dark"] [id="modal-preencher-plano"] .mantine-Modal-body {
  background-color: var(--cofi-white) !important; /* slate-800 - azulado */
  background: var(--cofi-white) !important; /* slate-800 - azulado */
}

/* Dark mode: Forçar background azulado em todos os elementos do modal de plano */
[data-mantine-color-scheme="dark"] [id="modal-preencher-plano"] {
  --mantine-color-body: var(--cofi-white) !important;
}

[data-mantine-color-scheme="dark"] [id="modal-preencher-plano"] .mantine-Modal-header,
[data-mantine-color-scheme="dark"] [id="modal-preencher-plano"] .mantine-Modal-content,
[data-mantine-color-scheme="dark"] [id="modal-preencher-plano"] .mantine-Modal-body {
  background-color: #1e293b !important; /* slate-800 diretamente */
  background: #1e293b !important; /* slate-800 diretamente */
}

/* Dark mode: Overlay do modal */
[data-mantine-color-scheme="dark"] .mantine-Modal-overlay {
  background-color: rgba(0, 0, 0, 0.7) !important; /* overlay mais escuro */
}

/* Cards */
.mantine-Card-root {
  background-color: var(--cofi-white);
  border: 1px solid var(--cofi-gray-border);
  transition: all 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.mantine-Card-root:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px var(--cofi-shadow);
}

/* Buttons */
.mantine-Button-root {
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Paper Header */
.mantine-Paper-root {
  background-color: var(--cofi-white);
  transition: background-color 0.3s ease;
}

/* Tabs */
.mantine-Tabs-tab[data-active="true"] {
  border-bottom-color: var(--cofi-primary);
  color: var(--cofi-primary);
}

.mantine-Tabs-tab:hover {
  background-color: var(--cofi-gray-light);
}

/* Logo container */
.logo-container {
  padding: 1.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--cofi-gray-border);
  margin-bottom: 1.5rem;
  margin-top: -12px;
  margin-left: -12px;
  margin-right: -12px;
  padding-top: 1.5rem;
  border-radius: 16px 16px 0 0;
  background: var(--cofi-white);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Dark mode: Título na sidebar */
[data-mantine-color-scheme="dark"] .logo-container .mantine-Title-root {
  color: #e2e8f0 !important; /* slate-200 - texto claro */
}

.logo-container img {
  display: block;
  max-width: 120px;
  height: auto;
  margin: 0 auto 0.5rem;
}

.page-hero-card {
  background: linear-gradient(135deg, var(--cofi-primary) 0%, var(--cofi-secondary) 60%, #5fa8ff 100%);
  color: var(--cofi-white);
}

.page-hero-card .mantine-Text-root,
.page-hero-card .mantine-Title-root {
  color: var(--cofi-white) !important;
}

/* Light mode: Hero - texto e ícones brancos */
.page-hero-card svg,
.page-hero-card .mantine-Group-root svg,
.page-hero-card .mantine-Group svg {
  color: #ffffff !important;
  fill: currentColor !important;
}

/* Dark mode: Hero - gradiente mais saturado e todos os elementos brancos */
[data-mantine-color-scheme="dark"] .page-hero-card {
  background: linear-gradient(135deg, #0C326F 0%, #155BCB 50%, #1e40af 100%) !important;
  color: #ffffff !important;
}

[data-mantine-color-scheme="dark"] .page-hero-card .mantine-Title-root,
[data-mantine-color-scheme="dark"] .page-hero-card .mantine-Text-root,
[data-mantine-color-scheme="dark"] .page-hero-card [class*="mantine-"] {
  color: #ffffff !important;
}

[data-mantine-color-scheme="dark"] .page-hero-card svg,
[data-mantine-color-scheme="dark"] .page-hero-card .mantine-Group-root svg,
[data-mantine-color-scheme="dark"] .page-hero-card .mantine-Group svg,
[data-mantine-color-scheme="dark"] .page-hero-card [class*="mantine-"] svg {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* Ícone específico de Dúvidas Frequentes - forçar branco */
.page-hero-card .mantine-Group svg[data-icon="tabler:question-mark"],
.page-hero-card .mantine-Group svg[data-icon="tabler:help-circle"] {
  filter: brightness(0) invert(1) !important;
  color: #ffffff !important;
}

[data-mantine-color-scheme="dark"] .page-hero-card .mantine-Group svg[data-icon="tabler:question-mark"],
[data-mantine-color-scheme="dark"] .page-hero-card .mantine-Group svg[data-icon="tabler:help-circle"] {
  filter: brightness(0) invert(1) !important;
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* Badges nos hero cards */
[data-mantine-color-scheme="dark"] .page-hero-card .mantine-Badge-root {
  color: #ffffff !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cofi-gray-light);
  transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb {
  background: var(--cofi-primary);
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cofi-secondary);
}

/* Dashboard KPI Cards - Hover effects */
.mantine-Card-root[id*="kpi"] {
  transition: all 0.2s ease;
}

.mantine-Card-root[id*="kpi"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--cofi-shadow) !important;
}

[data-mantine-color-scheme="dark"] .mantine-Card-root[id*="kpi"]:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

/* Graph containers */
.graph-container {
  background: var(--cofi-white);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 4px var(--cofi-shadow);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Stats cards */
.stat-card {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--cofi-primary) 0%, var(--cofi-secondary) 100%);
  color: var(--cofi-white);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px var(--cofi-shadow);
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px var(--cofi-shadow);
}

@media (max-width: 768px) {
  .logo-container {
    padding: 1rem;
  }
  .logo-container img {
    max-width: 96px;
  }
  .page-hero-card {
    padding: 1rem !important;
  }
  
  /* Sidebar responsiva (hover: tab + painel) */
  .sidebar-tab {
    margin: 8px 0 8px 8px;
    border-radius: 10px 0 0 10px;
  }
  .sidebar-panel .mantine-AppShell-navbar {
    margin: 8px 8px 8px 0;
    height: calc(100vh - 16px);
  }
  .mantine-AppShell-navbar {
    margin: 8px 0 8px 8px;
    border-radius: 12px;
    height: calc(100vh - 16px);
    top: 8px;
  }
  
  .logo-container {
    margin-top: -8px;
    margin-left: -8px;
    margin-right: -8px;
    border-radius: 12px 12px 0 0;
  }
  
  .sidebar-nav-stack {
    padding: 0.75rem !important;
  }
  
  .mantine-NavLink-root {
    margin-bottom: 0.4rem;
    padding-left: 0.5rem;
  }
  
  .section-title {
    font-size: 0.65rem !important;
  }
  
  .mantine-AppShell-navbar .mantine-Group-root {
    padding-left: 0.5rem !important;
  }
}

/* Login styles */
#login-messages .mantine-Alert-root {
  margin: 1rem 1.5rem;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Login button hover */
#login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

/* Password input */
.mantine-PasswordInput-input {
  border: 1px solid var(--cofi-gray-border);
  border-radius: 0.5rem;
  transition: border-color 0.3s ease;
}

.mantine-PasswordInput-input:focus {
  border-color: var(--cofi-primary);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
}

[data-mantine-color-scheme="dark"] .mantine-PasswordInput-input:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Login card animation */
.mantine-Card-root {
  animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Transição suave do conteúdo ao trocar de página (hash) */
.page-fade-in {
  animation: pageFadeIn 0.25s ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Overlay de transição de página: fade suave ao mostrar/ocultar */
#page-transition-overlay,
#page-transition-overlay .mantine-LoadingOverlay-overlay {
  transition: opacity 0.2s ease-out;
}
