/* ============================================================
   SIMULADOR CAIXA - ESTILOS PREMIUM
   Design: Glassmorphism + Gradientes + Micro-animações
   ============================================================ */

/* ─── VARIÁVEIS CSS ──────────────────────────────────────────── */
:root {
  /* Cores principais */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #3B82F6;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --secondary: #7C3AED;
  --secondary-dark: #6D28D9;
  --accent: #0891B2;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #0891B2;

  /* Background */
  --bg-primary: #F8FAFF;
  --bg-secondary: #EEF2FF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-glass-strong: rgba(255, 255, 255, 0.92);
  --bg-nav: rgba(255, 255, 255, 0.9);

  /* Texto */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-white: #FFFFFF;

  /* Bordas */
  --border: rgba(148, 163, 184, 0.2);
  --border-strong: rgba(148, 163, 184, 0.4);

  /* Gradientes */
  --grad-primary: linear-gradient(135deg, #1D4ED8 0%, #2563EB 50%, #3B82F6 100%);
  --grad-hero: linear-gradient(135deg, #0F172A 0%, #1E293B 40%, #1D4ED8 100%);
  --grad-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(238,242,255,0.95) 100%);
  --grad-success: linear-gradient(135deg, #059669, #10B981);
  --grad-warning: linear-gradient(135deg, #D97706, #F59E0B);
  --grad-danger: linear-gradient(135deg, #DC2626, #EF4444);
  --grad-secondary: linear-gradient(135deg, #6D28D9, #7C3AED);

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.04);
  --shadow-lg: 0 10px 40px rgba(15,23,42,0.12), 0 4px 16px rgba(15,23,42,0.06);
  --shadow-xl: 0 20px 60px rgba(15,23,42,0.15), 0 8px 24px rgba(15,23,42,0.08);
  --shadow-glow: 0 0 40px rgba(37,99,235,0.15), 0 0 80px rgba(37,99,235,0.05);
  --shadow-card-hover: 0 16px 48px rgba(37,99,235,0.15), 0 6px 20px rgba(15,23,42,0.08);

  /* Bordas arredondadas */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Blur */
  --blur: blur(20px);
  --blur-strong: blur(40px);

  /* Transições */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Tamanho base */
  --nav-height: 72px;
}

/* Tema Escuro */
[data-theme="dark"] {
  --bg-primary: #080E1A;
  --bg-secondary: #0F172A;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.6);
  --bg-glass-strong: rgba(15, 23, 42, 0.95);
  --bg-nav: rgba(8, 14, 26, 0.92);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #475569;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3), 0 2px 6px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.3);
  --grad-card: linear-gradient(145deg, rgba(15,23,42,0.9) 0%, rgba(30,41,59,0.95) 100%);
  --grad-hero: linear-gradient(135deg, #020409 0%, #0A0F1E 40%, #0F1A3D 100%);
}

/* ─── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ─── SCROLLBAR CUSTOMIZADA ─────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ─── SELEÇÃO ────────────────────────────────────────────────── */
::selection { background: var(--primary-glow); color: var(--primary); }

/* ─── TIPOGRAFIA ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-secondary); }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ─── NAVEGAÇÃO ──────────────────────────────────────────────── */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.main-nav.scrolled {
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--border-strong);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: var(--grad-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-brand .brand-icon svg { width: 22px; height: 22px; color: white; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-size: 0.95rem; font-weight: 700; }
.brand-sub { font-size: 0.65rem; color: var(--text-muted); font-weight: 400; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-glow);
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-glow);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-theme {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.btn-theme:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-theme svg { width: 18px; height: 18px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── LAYOUT PRINCIPAL ───────────────────────────────────────── */
.page-main { padding-top: var(--nav-height); }

.page-section { display: none; }
.page-section.active { display: block; }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HERO SECTION ───────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  background: var(--grad-hero);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(37,99,235,0.3), transparent),
              radial-gradient(ellipse 50% 50% at 20% 80%, rgba(124,58,237,0.2), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 24px;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.35);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: #93C5FD;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #93C5FD;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #60A5FA, #818CF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--grad-primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  box-shadow: 0 8px 32px rgba(37,99,235,0.4);
  position: relative;
  overflow: hidden;
}

.btn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}

.btn-hero:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 48px rgba(37,99,235,0.5);
}

.btn-hero:hover::before { background: rgba(255,255,255,0.1); }
.btn-hero:active { transform: translateY(-1px) scale(1.01); }

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-bounce);
  backdrop-filter: blur(10px);
}

.btn-hero-ghost:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat .stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
}

.hero-stat .stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
}

/* Casas no fundo */
.hero-illustration {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 55%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
}

.houses-scene {
  position: relative;
  width: 100%;
  height: 90%;
}

/* ─── SECTION TITLES ─────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  padding: 6px 18px;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── SIMULADOR SECTION ──────────────────────────────────────── */
.simulator-section {
  padding: 80px 0;
  background: var(--bg-primary);
  min-height: 100vh;
}

/* ─── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card:hover::before { opacity: 1; }

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon svg { width: 24px; height: 24px; color: var(--primary); }

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── FORMULÁRIO ─────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-group.full-width { grid-column: 1 / -1; }

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.input, input[type="text"], input[type="number"], input[type="email"],
input[type="tel"], select, textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}

.input:hover:not(:focus), input:hover:not(:focus), select:hover:not(:focus) {
  border-color: var(--primary-light);
}

.input.input-error, input.input-error, select.input-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.input.input-success, input.input-success, select.input-success {
  border-color: var(--success);
}

.field-error {
  display: none;
  font-size: 0.76rem;
  color: var(--danger);
  font-weight: 500;
}

/* Input com prefixo */
.input-group {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

.input-group input {
  padding-left: 44px;
}

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
}

/* Entrada indicator */
.entrada-indicator {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-top: 4px;
}
.entrada-indicator.good { background: rgba(5,150,105,0.1); color: var(--success); }
.entrada-indicator.ok { background: rgba(217,119,6,0.1); color: var(--warning); }
.entrada-indicator.low { background: rgba(220,38,38,0.1); color: var(--danger); }

/* Radio e Checkbox Customizados */
.radio-group, .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  user-select: none;
}

.radio-label:hover, .checkbox-label:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 600;
}

/* Range Slider */
.range-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.range-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.range-value { font-size: 0.95rem; font-weight: 700; color: var(--primary); }

input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--primary) 0%, var(--primary) 50%, var(--border-strong) 50%, var(--border-strong) 100%);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  border: none;
  box-shadow: none;
  padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
  cursor: pointer;
  transition: var(--transition-bounce);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
}

/* ─── BOTÕES ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  border: none;
  outline: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}

.btn:hover::after { background: rgba(255,255,255,0.12); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,99,235,0.45);
}

.btn-secondary {
  background: var(--grad-secondary);
  color: white;
  box-shadow: 0 4px 16px rgba(124,58,237,0.25);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.4);
}

.btn-success {
  background: var(--grad-success);
  color: white;
  box-shadow: 0 4px 16px rgba(5,150,105,0.25);
}

.btn-danger {
  background: var(--grad-danger);
  color: white;
  box-shadow: 0 4px 16px rgba(220,38,38,0.25);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
  transform: translateY(-2px);
}

.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: 0.8rem; }
.btn-xl { padding: 20px 52px; font-size: 1.1rem; letter-spacing: 0.3px; }

.btn-calcular {
  min-width: 280px;
  background: var(--grad-primary);
  color: white;
  padding: 18px 48px;
  font-size: 1.05rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(37,99,235,0.35), 0 0 0 0 rgba(37,99,235,0);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-calcular:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 48px rgba(37,99,235,0.5), 0 0 0 4px rgba(37,99,235,0.1);
}

.btn-calcular.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-calcular.loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Botões de ação */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

/* ─── DASHBOARD / RESULTADO ──────────────────────────────────── */
#resultado-container {
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-slow);
  pointer-events: none;
}

#resultado-container.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--blur);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 0 0 0 80px;
  opacity: 0.06;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card:hover::after { opacity: 0.12; }

.stat-card.primary::after { background: var(--primary); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger::after { background: var(--danger); }
.stat-card.secondary::after { background: var(--secondary); }

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card.primary .stat-value { color: var(--primary); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.secondary .stat-value { color: var(--secondary); }

.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.stat-card.primary .stat-icon { background: var(--primary-glow); }
.stat-card.success .stat-icon { background: rgba(5,150,105,0.1); }
.stat-card.warning .stat-icon { background: rgba(217,119,6,0.1); }
.stat-card.danger .stat-icon { background: rgba(220,38,38,0.1); }
.stat-card.secondary .stat-icon { background: rgba(124,58,237,0.1); }

.stat-card .stat-icon svg {
  width: 18px;
  height: 18px;
}
.stat-card.primary .stat-icon svg { color: var(--primary); }
.stat-card.success .stat-icon svg { color: var(--success); }
.stat-card.warning .stat-icon svg { color: var(--warning); }
.stat-card.danger .stat-icon svg { color: var(--danger); }
.stat-card.secondary .stat-icon svg { color: var(--secondary); }

.stat-card .stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── BARRA DE PROGRESSO ─────────────────────────────────────── */
.progress-bar-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  height: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─── INSIGHTS ──────────────────────────────────────────────────  */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.insight-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  border-left: 4px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  backdrop-filter: var(--blur);
}

.insight-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.insight-card.insight-success { border-left-color: var(--success); background: rgba(5,150,105,0.04); }
.insight-card.insight-error { border-left-color: var(--danger); background: rgba(220,38,38,0.04); }
.insight-card.insight-warning { border-left-color: var(--warning); background: rgba(217,119,6,0.04); }
.insight-card.insight-info { border-left-color: var(--info); background: rgba(8,145,178,0.04); }

.insight-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.insight-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.insight-title-group { flex: 1; }

.insight-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.insight-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 4px;
}

.insight-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ─── TABELAS ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: left;
}

thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
thead th:last-child { border-radius: 0 var(--radius-md) 0 0; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

tbody tr:hover { background: var(--primary-glow); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 12px 16px;
  color: var(--text-primary);
  white-space: nowrap;
}

tbody tr.reticencias td {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 16px;
  background: var(--bg-secondary);
}

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }

/* Mini bar */
.mini-bar {
  width: 60px;
  height: 6px;
  background: rgba(220,38,38,0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mini-bar-amort {
  height: 100%;
  background: var(--success);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ─── GRÁFICOS ───────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--blur);
}

.chart-card canvas { display: block; }

/* ─── TABS ────────────────────────────────────────────────────── */
.tabs-container { }

.tabs-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 5px;
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover { color: var(--primary); background: var(--bg-card); }

.tab-btn.active {
  background: white;
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .tab-btn.active { background: var(--bg-card); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── COMPARAÇÃO SAC x PRICE ─────────────────────────────────── */
.comparison-table {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.comp-col {
  padding: 28px;
}

.comp-col.sac { border-right: 1px solid var(--border); }
.comp-col.diff { background: var(--bg-secondary); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; min-width: 120px; }

.comp-col-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.comp-col-header .system-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.comp-col.sac .system-badge { background: rgba(37,99,235,0.12); color: var(--primary); }
.comp-col.price .system-badge { background: rgba(124,58,237,0.12); color: var(--secondary); }

.comp-col-title { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.comp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.comp-row:last-child { border-bottom: none; }
.comp-row .comp-key { font-size: 0.82rem; color: var(--text-secondary); }
.comp-row .comp-val { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }

.comp-winner-badge {
  background: var(--grad-success);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  white-space: nowrap;
}

/* ─── MCMV ────────────────────────────────────────────────────── */
.mcmv-card {
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.mcmv-card.mcmv-aprovado {
  background: linear-gradient(135deg, rgba(5,150,105,0.05), rgba(16,185,129,0.08));
  border-color: rgba(5,150,105,0.25);
}

.mcmv-card.mcmv-nao {
  background: var(--bg-card);
}

.mcmv-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--grad-success);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.mcmv-badge.mcmv-badge-no {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.mcmv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.mcmv-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
}

.mcmv-item span { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.mcmv-item strong { font-size: 1rem; color: var(--text-primary); }

.mcmv-faixas { margin-top: 20px; }
.mcmv-faixas h4 { margin-bottom: 12px; font-size: 0.9rem; color: var(--text-secondary); }

.faixa-item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  border-left: 3px solid var(--primary);
}

.faixa-item strong { font-size: 0.85rem; color: var(--text-primary); }
.faixa-item span { font-size: 0.8rem; color: var(--text-muted); }

/* ─── CUSTOS ──────────────────────────────────────────────────── */
.custos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.custo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.custo-item span { font-size: 0.82rem; color: var(--text-secondary); }
.custo-item strong { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.custo-item.total { background: var(--primary-glow); border-color: var(--primary); grid-column: 1 / -1; }
.custo-item.total span { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.custo-item.total strong { color: var(--primary); font-size: 1.2rem; }

/* ─── HISTÓRICO ───────────────────────────────────────────────── */
.historico-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.hist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.hist-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.hist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.hist-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.hist-badge-sac { background: rgba(37,99,235,0.12); color: var(--primary); }
.hist-badge-price { background: rgba(124,58,237,0.12); color: var(--secondary); }

.hist-date { font-size: 0.72rem; color: var(--text-muted); }

.hist-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.hist-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hist-item span { font-size: 0.72rem; color: var(--text-muted); }
.hist-item strong { font-size: 0.9rem; color: var(--text-primary); }

.hist-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ─── COMPARADOR ─────────────────────────────────────────────── */
.comparador-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.comp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.comp-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.comp-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.comp-remove:hover { background: var(--danger); color: white; border-color: var(--danger); }

.comp-info { display: flex; flex-direction: column; gap: 8px; }
.comp-info span { font-size: 0.82rem; color: var(--text-secondary); }

.comp-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.comp-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.comp-result-card.comp-winner {
  border-color: var(--success);
  box-shadow: 0 0 0 2px rgba(5,150,105,0.2), var(--shadow-md);
}

.comp-result-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.comp-result-item:last-child { border-bottom: none; }
.comp-result-item span { color: var(--text-secondary); }
.comp-result-item strong { color: var(--text-primary); }

/* ─── CALCULADORAS AUXILIARES ────────────────────────────────── */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.calc-card h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 1rem;
}

.calc-result {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.calc-result span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.calc-result strong { font-size: 1.25rem; font-weight: 800; }
.calc-result small { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.text-xl { font-size: 1.5rem !important; }

/* ─── MODAL ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  padding: 40px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(217,119,6,0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
}

.modal h3 { text-align: center; margin-bottom: 16px; font-size: 1.25rem; }

.modal p {
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: center;
}

/* ─── TOAST NOTIFICATIONS ────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-glass-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show { transform: translateX(0); }

.toast-icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast-message { flex: 1; font-size: 0.875rem; color: var(--text-primary); line-height: 1.4; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.2rem; line-height: 1; padding: 0; }
.toast-close:hover { color: var(--text-primary); }

.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon svg { color: var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-error .toast-icon svg { color: var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-warning .toast-icon svg { color: var(--warning); }
.toast-info { border-left: 3px solid var(--info); }
.toast-info .toast-icon svg { color: var(--info); }

/* ─── SCROLL REVEAL ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 40px;
  color: var(--text-muted);
}

.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.4; }
.empty-state p { font-size: 0.95rem; margin-bottom: 20px; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand { }
.footer-brand .brand-name { font-size: 1.25rem; font-weight: 800; margin-bottom: 12px; color: var(--text-primary); }
.footer-brand p { font-size: 0.82rem; line-height: 1.7; }

.footer-links h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 14px; color: var(--text-primary); }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links li { font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.footer-links li:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); }

/* ─── AVISO LEGAL BANNER ─────────────────────────────────────── */
.aviso-legal {
  background: linear-gradient(135deg, rgba(217,119,6,0.08), rgba(245,158,11,0.05));
  border: 1px solid rgba(217,119,6,0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.aviso-legal .aviso-icon { font-size: 1.25rem; flex-shrink: 0; }
.aviso-legal p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.6; }
.aviso-legal strong { color: var(--warning); }

/* ─── SEÇÃO DICAS ────────────────────────────────────────────── */
.dicas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.dica-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.dica-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.dica-num {
  font-size: 3rem;
  font-weight: 900;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.dica-card h4 { margin-bottom: 8px; font-size: 1rem; }
.dica-card p { font-size: 0.84rem; line-height: 1.7; }

/* ─── BADGE ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-primary { background: var(--primary-glow); color: var(--primary); }
.badge-success { background: rgba(5,150,105,0.1); color: var(--success); }
.badge-warning { background: rgba(217,119,6,0.1); color: var(--warning); }
.badge-danger { background: rgba(220,38,38,0.1); color: var(--danger); }

/* ─── SEPARADORES ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ─── CONTATO ────────────────────────────────────────────────── */
.contato-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.contato-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.contato-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.contato-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.contato-icon svg { width: 28px; height: 28px; color: var(--primary); }
.contato-card h4 { margin-bottom: 8px; }
.contato-card p { font-size: 0.85rem; }

/* ─── LOADING ─────────────────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.5s ease;
}

.page-loader.fade-out { opacity: 0; pointer-events: none; }

.loader-logo {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loader-pulse 1.5s ease infinite;
  box-shadow: 0 0 40px rgba(37,99,235,0.4);
}

@keyframes loader-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(37,99,235,0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(37,99,235,0.6); }
}

.loader-logo svg { width: 40px; height: 40px; color: white; }
.loader-text { font-size: 1rem; font-weight: 600; color: var(--text-secondary); }

.loader-bar {
  width: 200px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  animation: loader-bar 1.5s ease-in-out infinite;
}

@keyframes loader-bar {
  0% { width: 0; margin-left: 0; }
  50% { width: 80%; margin-left: 0; }
  100% { width: 0; margin-left: 100%; }
}

/* ─── FORM SECTIONS ──────────────────────────────────────────── */
.form-section {
  margin-bottom: 40px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-glow);
}

.form-section-title svg { width: 20px; height: 20px; }

/* ─── PRINT ───────────────────────────────────────────────────── */
@media print {
  .main-nav, .hero-section, .actions-row, .btn, #toast-container, .modal-overlay,
  .page-loader, .tabs-nav, .aviso-legal { display: none !important; }
  .page-section { display: block !important; }
  .page-main { padding-top: 0 !important; }
  body { background: white; color: black; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; margin-bottom: 16px; }
  #resultado-container { opacity: 1 !important; transform: none !important; pointer-events: all !important; }
  .tab-panel { display: block !important; }
  .dashboard-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ─── ANIMAÇÕES EXTRAS ───────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-fadeIn { animation: fadeIn 0.4s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.4s ease forwards; }

/* Delay classes */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Stat card hover glow */
.stat-card.primary:hover { box-shadow: 0 12px 40px rgba(37,99,235,0.2), var(--shadow-lg); }
.stat-card.success:hover { box-shadow: 0 12px 40px rgba(5,150,105,0.2), var(--shadow-lg); }
.stat-card.warning:hover { box-shadow: 0 12px 40px rgba(217,119,6,0.2), var(--shadow-lg); }
.stat-card.danger:hover  { box-shadow: 0 12px 40px rgba(220,38,38,0.2), var(--shadow-lg); }
.stat-card.secondary:hover { box-shadow: 0 12px 40px rgba(124,58,237,0.2), var(--shadow-lg); }

/* Floating label effect */
.form-group:focus-within label { color: var(--primary); }

/* Badge animado */
.nav-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  vertical-align: middle;
  margin-left: 4px;
}

/* Gradiente texto */
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass card extra */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-xl);
}

[data-theme="dark"] .glass-card {
  border-color: rgba(255,255,255,0.08);
}

/* Hover card com brilho */
.shine-card {
  position: relative;
  overflow: hidden;
}

.shine-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 60%;
  height: 200%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.04), transparent);
  transform: rotate(30deg);
  transition: left 0.6s ease;
}

.shine-card:hover::after {
  left: 120%;
}

/* Seção ativa com indicador */
.nav-link.active::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  margin: 0 auto;
  margin-top: 2px;
}

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.72rem;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
  font-family: 'Poppins', sans-serif;
}

[data-tooltip]:hover::after { opacity: 1; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .charts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .comparison-table { grid-template-columns: 1fr; }
  .comp-col.diff { display: none; }
}

@media (max-width: 1024px) {
  .hero-illustration { display: none; }
  .hero-content { max-width: 100%; }
  .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .mcmv-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .nav-menu.open { transform: translateY(0); }
  .nav-link { justify-content: flex-start; border-radius: var(--radius-md); padding: 12px 16px; }

  .menu-toggle { display: flex; }
  .menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-title { font-size: 2.2rem; }
  .hero-stats { gap: 24px; }

  .form-grid { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .insights-grid { grid-template-columns: 1fr; }
  .mcmv-grid { grid-template-columns: 1fr; }

  .card { padding: 20px; border-radius: var(--radius-lg); }
  .section-header { margin-bottom: 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .tabs-nav { flex-wrap: nowrap; }

  #toast-container { bottom: 12px; right: 12px; left: 12px; max-width: unset; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-content { padding: 60px 0; }
  .hero-cta { flex-direction: column; }
  .btn-hero, .btn-hero-ghost { width: 100%; justify-content: center; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stat-card .stat-value { font-size: 1.25rem; }
  .calc-grid { grid-template-columns: 1fr; }
  .btn-calcular { min-width: auto; width: 100%; }
  .actions-row { flex-direction: column; align-items: stretch; }
  .actions-row .btn { width: 100%; justify-content: center; }
  .comp-results-grid { grid-template-columns: 1fr; }
}
