/* ==========================================================================
   AMPLO JURÍDICO - ESTILOS GLOBAIS E REGRAS DE IMPRESSÃO
   ========================================================================== */

:root {
  --brand-50: #f5f7fa;
  --brand-100: #e8ecf2;
  --brand-200: #c7d2e1;
  --brand-700: #1e3a5f;
  --brand-800: #0f2642;
  --brand-900: #0a192f;
  --brand-950: #050d19;
  --gold-400: #e2bc68;
  --gold-500: #c5a059;
  --gold-600: #a9843f;
  --gold-700: #85662d;
  --surface-ground: #f8fafc;
  --surface-card: #ffffff;
  --surface-border: #e2e8f0;
}

/* Tipografia e Base */
body {
  background-color: var(--surface-ground);
  color: #1e293b;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Otimização de Abas */
.tab-btn {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 2px solid transparent;
}

.tab-btn.tab-active {
  background-color: #ffffff !important;
  color: var(--brand-900) !important;
  border-color: var(--gold-500) !important;
  box-shadow: 0 4px 12px -2px rgba(10, 25, 47, 0.08);
}

/* Animação suave para troca de abas */
.tab-pane {
  animation: fadeIn 0.22s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badge de Destaque Dourado */
.badge-gold {
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.12) 0%, rgba(197, 160, 89, 0.25) 100%);
  color: var(--gold-700);
  border: 1px solid rgba(197, 160, 89, 0.35);
}

/* Estilização moderna do elemento nativo <dialog> */
dialog#leadModal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
}

dialog#leadModal::backdrop {
  background: rgba(5, 13, 25, 0.65);
  backdrop-filter: blur(4px);
  animation: backdropFade 0.2s ease-out;
}

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

/* Estilo para Scrollbars sutis */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   REGRAS DE IMPRESSÃO / GERAÇÃO DE RELATÓRIO PDF (@media print)
   ========================================================================== */
.print-only {
  display: none;
}

@media print {
  @page {
    margin: 15mm;
    size: A4 portrait;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
  }

  /* Oculta tudo que não faz parte do relatório oficial */
  .no-print,
  nav,
  header,
  footer,
  dialog,
  button,
  .faq-section,
  .seo-guide-section {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  /* Mantém as abas ativas visíveis para impressão */
  .tab-pane.hidden {
    display: none !important;
  }

  .tab-pane:not(.hidden) {
    display: block !important;
  }

  /* Garante formatação limpa de tabelas e cartões no papel */
  .card-print {
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 16px;
  }

  .table-print {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .table-print th,
  .table-print td {
    border: 1px solid #e2e8f0 !important;
    padding: 6px 8px !important;
    font-size: 9.5pt !important;
  }

  .table-print th {
    background-color: #f8fafc !important;
    color: #0a192f !important;
  }
}
