/* ==========================================================================
   DiagnósticoV3 — ESTILO MODERNO, CLEAN & RESPONSIVO (style.css)
   Cores do Sistema Original: Branco & Laranja 8DLeads
   ========================================================================== */

:root {
  /* Cores Base - Branco & Tons Quentes Suaves */
  --bg-page: #FBF9F5;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #FFF8F4;
  --bg-card-hover: #FFF3EC;
  --border-color: #EAE5DC;
  --border-focus: #FF4500;

  /* Laranja Energético Oficial 8DLeads */
  --primary: #FF4500;
  --primary-hover: #E03E00;
  --primary-light: #FF5500;
  --primary-subtle: #FFF0EB;
  --primary-glow: rgba(255, 69, 0, 0.28);

  --orange-primary: #FF4500;
  --orange-dark: #E03E00;
  --orange-light: #FF5500;
  --orange-pastel: #FFF0EB;
  --orange-glow: rgba(255, 69, 0, 0.28);

  /* Acentos Complementares */
  --yellow-accent: #FFB800;
  --yellow-pastel: #FFF8E6;
  --green-accent: #10B981;
  --green-pastel: #ECFDF5;
  --red-accent: #EF4444;
  --red-pastel: #FEF2F2;

  /* Tipografia & Textos */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-primary: #18181B;
  --text-secondary: #52525B;
  --text-muted: #71717A;
  --text-light: #A1A1AA;

  /* Formas & Sombras */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 16px 36px rgba(24, 24, 27, 0.06), 0 4px 12px rgba(24, 24, 27, 0.02);
  --shadow-orange: 0 8px 24px rgba(255, 69, 0, 0.32);
}

/* Reset Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fundo Elegante Minimalista com Formas Laranja Suaves */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 10% 5%, rgba(255, 69, 0, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(255, 184, 0, 0.04) 0%, transparent 45%);
}

/* Container Central */
.app-container {
  width: 100%;
  max-width: 680px;
  padding: 24px 20px 60px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Topbar Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.brand-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
}

.brand-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-sep {
  color: var(--text-muted);
  font-size: 11px;
}

.brand-sub {
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
}

.badge-audit {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--orange-pastel);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 69, 0, 0.2);
}

/* Telas / Transições */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   0. HERO SCREEN (TELA INICIAL CLEAN EM BRANCO E LARANJA)
   ========================================================================== */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #FF6611, #FF4500, #E03E00);
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--orange-pastel);
  border: 1px solid rgba(255, 69, 0, 0.25);
  border-radius: var(--radius-pill);
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
  text-align: left;
}

.highlight-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  transition: transform 0.2s, border-color 0.2s;
}

.highlight-box:hover {
  border-color: rgba(255, 69, 0, 0.3);
  transform: translateY(-2px);
}

.highlight-box .icon {
  font-size: 22px;
  margin-bottom: 8px;
}

.highlight-box h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.highlight-box p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.btn-hero {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

/* ==========================================================================
   1. FORM SCREEN (STEPPER EM 8 ETAPAS)
   ========================================================================== */
.stepper-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border-color);
}

.stepper-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.btn-back-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back-step:hover {
  background: var(--orange-pastel);
  border-color: rgba(255, 69, 0, 0.3);
  color: var(--primary);
}

.step-label-center {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.step-count-pill {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  background: var(--orange-pastel);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 69, 0, 0.25);
}

/* Barra de Progresso Laranja Suave */
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, #FF6611, #FF4500);
  border-radius: 4px;
  transition: width 0.35s ease;
}

/* Card do Formulário */
.form-card-body {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

.step-card {
  display: none;
}

.step-card.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
}

.step-question {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.step-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Preset Chips de Valor Rápido (Branco e Laranja) */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip-btn {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: var(--orange-pastel);
  color: var(--primary);
  border-color: rgba(255, 69, 0, 0.3);
}

.chip-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(255, 69, 0, 0.35);
}

/* Campo Customizado de Entrada */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.custom-input {
  width: 100%;
  height: 52px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  font-family: var(--font-family);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.custom-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--orange-pastel);
}

.currency-input {
  padding-left: 48px;
}

.currency-prefix {
  position: absolute;
  left: 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  pointer-events: none;
}

.input-unit {
  position: absolute;
  right: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

/* Grid de Opções de Rádio (Etapas 4 e 5) */
.option-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-card {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-card:hover {
  border-color: rgba(255, 69, 0, 0.3);
  background: var(--bg-card-subtle);
}

.option-card input[type="radio"] {
  display: none;
}

.option-radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #D4D4D8;
  margin-right: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.option-radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.option-card input[type="radio"]:checked + .option-radio-dot {
  border-color: var(--primary);
}

.option-card input[type="radio"]:checked + .option-radio-dot::after {
  opacity: 1;
  transform: scale(1);
}

.option-card:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: var(--orange-pastel);
}

.option-content {
  display: flex;
  flex-direction: column;
}

.option-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.option-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Formulário de Captura (Etapa 8) */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.custom-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF4500' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  cursor: pointer;
}

.privacy-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
}

/* Mensagens de Erro */
.error-msg {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--red-accent);
  margin-top: 10px;
}

.error-msg.visible {
  display: block;
}

/* Botões de Ação (Laranja Energético) */
.form-actions {
  margin-top: 32px;
  display: flex;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #FF5500 0%, #E03E00 100%);
  color: #ffffff;
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #FF6611 0%, #EA4400 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 69, 0, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   2. TELA DE CARREGAMENTO / ANÁLISE
   ========================================================================== */
.loading-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 60px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.spinner-modern {
  width: 48px;
  height: 48px;
  border: 3px solid var(--orange-pastel);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.loading-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ==========================================================================
   3. TELA DE RESULTADOS (MODERNA & AUDITÁVEL)
   ========================================================================== */
.results-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cards de Impacto (KPIs) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.kpi-card.highlight {
  border-color: rgba(255, 69, 0, 0.4);
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8F4 100%);
  box-shadow: 0 4px 16px rgba(255, 69, 0, 0.08);
}

.kpi-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.kpi-card.highlight .kpi-tag {
  color: var(--primary);
}

.kpi-val {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.kpi-card.highlight .kpi-val {
  color: var(--primary);
}

.kpi-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Card de Manchete Principal */
.headline-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.headline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.badge-pronto {
  background: var(--orange-pastel);
  color: var(--primary);
  border: 1px solid rgba(255, 69, 0, 0.3);
}

.badge-info {
  background: #F4F4F5;
  color: var(--text-primary);
  border: 1px solid #E4E4E7;
}

.headline-main-val {
  font-size: 34px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.headline-sub-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.headline-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tabela Demonstrativa Auditável */
.breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title-row h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.audit-table th {
  text-align: left;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border-color);
}

.audit-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.audit-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--text-primary);
}

.audit-table tr.total-row td {
  padding-top: 18px;
  border-bottom: none;
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
}

/* Card 8DLeads / Breakeven */
.solution-card {
  background: linear-gradient(135deg, #FFF9F5 0%, #FFF0EB 100%);
  border: 1.5px solid rgba(255, 69, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.solution-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
}

.solution-card h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.solution-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.breakeven-highlight {
  color: var(--primary);
  font-weight: 900;
}

/* Bloco B: Oportunidade Adicional */
.opportunity-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.opportunity-card h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--green-accent);
  margin-bottom: 6px;
}

.opportunity-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Card Download do PDF Executivo */
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.download-card h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
}

.download-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.btn-restart {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  margin: 14px auto 0;
  display: block;
}

.btn-restart:hover {
  color: var(--primary);
}

/* Footer */
.app-footer {
  margin-top: auto;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 36px;
}

/* Responsividade */
@media (max-width: 640px) {
  .hero-card { padding: 32px 20px; }
  .hero-title { font-size: 26px; }
  .hero-highlights-grid { grid-template-columns: 1fr; }
  .form-card-body { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .headline-main-val { font-size: 28px; }
}

/* ==========================================================================
   4. TEMPLATE OFICIAL DE PDF TIMBRADO (EXATAMENTE IGUAL AO ORIGINAL @site)
   ========================================================================== */
.pdf-premium-container {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 794px;
  height: 1123px;
  background-color: #FFFFFF;
  color: #18181B;
  font-family: var(--font-family);
  box-sizing: border-box;
  z-index: -1;
}

/* Imagem de fundo do papel timbrado posicionada absolutamente */
.pdf-timbrado-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 794px;
  height: 1123px;
  z-index: 0;
  display: block;
}

/* Wrapper de conteúdo que fica sobre a imagem de fundo */
.pdf-content-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 216px 62px 48px 62px; /* topo livre do logo do timbrado (tinta ate y=188) */
  display: flex;
  flex-direction: column;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-right: 120px;
}

.pdf-doc-badge {
  background: #FFF0EB;
  color: #FF4500;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.pdf-header-meta {
  text-align: right;
  font-size: 11px;
  color: #52525B;
  display: flex;
  gap: 16px;
}

.pdf-main-title {
  font-size: 18px;
  font-weight: 900;
  color: #18181B;
  text-align: center;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-transform: uppercase;
  border-bottom: 2px solid #FF4500;
  padding-bottom: 8px;
}

.pdf-client-info {
  background: rgba(250, 250, 250, 0.95);
  border: 1px solid #E4E4E7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pdf-client-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdf-label {
  font-size: 9px;
  font-weight: 800;
  color: #71717A;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdf-value {
  font-size: 12px;
  color: #18181B;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-headline-card {
  border: 2px solid #FF4500;
  background: #FFF9F5;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.pdf-headline-tag {
  font-size: 10px;
  font-weight: 800;
  color: #FF4500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.pdf-headline-val {
  font-size: 30px;
  font-weight: 900;
  color: #FF4500;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.pdf-headline-sub {
  font-size: 13px;
  font-weight: 800;
  color: #18181B;
  margin-bottom: 4px;
}

.pdf-headline-body {
  font-size: 11px;
  color: #52525B;
  line-height: 1.4;
}

.pdf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.pdf-kpi-card {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-top-width: 4px;
  border-radius: 8px;
  padding: 10px 12px;
}

.border-orange { border-top-color: #FF4500; }
.border-red { border-top-color: #DC2626; }
.border-dark { border-top-color: #18181B; }

.text-orange { color: #FF4500; }
.text-red { color: #DC2626; }
.text-dark { color: #18181B; }

.pdf-kpi-title {
  font-size: 9px;
  color: #71717A;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.pdf-kpi-val {
  font-size: 18px;
  font-weight: 900;
}

.pdf-table-section {
  margin-bottom: 16px;
}

.pdf-table-title {
  font-size: 12px;
  font-weight: 800;
  color: #18181B;
  margin: 0 0 8px;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.pdf-table th {
  background: #F4F4F5;
  color: #18181B;
  font-weight: 800;
  padding: 8px 10px;
  border-bottom: 2px solid #E4E4E7;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
}

.pdf-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #F4F4F5;
  color: #52525B;
}

.pdf-table td strong {
  color: #18181B;
}

.text-right { text-align: right !important; }
.font-900 { font-weight: 900 !important; }

.row-total-month td {
  background: #FFF5F5;
  border-bottom: 1px solid #FECACA;
  color: #EF4444;
}

.row-total-year td {
  background: #FEF2F2;
  border-bottom: 2px solid #FCA5A5;
  color: #DC2626;
}

.pdf-pitch-card {
  background: #F0FDF4;
  border: 1px solid #10B981;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.pdf-pitch-header {
  color: #065F46;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.pdf-pitch-body {
  color: #047857;
  font-size: 11px;
  line-height: 1.4;
}

.pdf-timbrado-footer-links {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #FF4500;
  margin-top: auto;
  padding-bottom: 4px;
}

.pdf-timbrado-footer-links a {
  color: #FF4500;
  text-decoration: underline;
}

.pdf-timbrado-footer-links .sep {
  margin: 0 8px;
  color: #94A3B8;
}

/* ==========================================================================
   5. REGRAS DE IMPRESSÃO A4 (@media print + window.print())
   ========================================================================== */
@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html, body {
    background: #FFFFFF !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body > *:not(#pdf-premium-template) {
    display: none !important;
  }

  #pdf-premium-template.pdf-premium-container {
    display: block !important;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    width: 210mm !important;
    height: 296.8mm !important;   /* 297mm exatos empurram uma 2ª folha em branco */
    overflow: hidden !important;
    z-index: auto !important;
    box-shadow: none !important;
    background-color: #FFFFFF !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    break-inside: avoid;
    page-break-inside: avoid;
    break-after: avoid;
    page-break-after: avoid;
  }

  #pdf-premium-template .pdf-timbrado-bg-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    display: block !important;
  }

  #pdf-premium-template .pdf-content-wrapper {
    position: relative !important;
    z-index: 1 !important;
  }

  #pdf-premium-template *,
  #pdf-premium-template *::before,
  #pdf-premium-template *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #pdf-premium-template table,
  #pdf-premium-template tr,
  #pdf-premium-template .pdf-kpi-card,
  #pdf-premium-template .pdf-headline {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}
