/* =========================================
   SIMULADOR ROI LOGÍSTICO — V4 Company
   Tema Oficial: Vermelho · Verde · Preto · Rosa
   ========================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* === V4 BRAND COLORS === */
  --v4-red:          #E61B1B;    /* Vermelho primário — logo sobre branco */
  --v4-red-dark:     #B91515;    /* Vermelho escuro */
  --v4-red-light:    #FF3D3D;    /* Vermelho claro / hover */
  --v4-green:        #3D6B41;    /* Verde escuro — fundo brandbook */
  --v4-green-mid:    #4C7950;    /* Verde médio */
  --v4-green-light:  #5E9464;    /* Verde claro */
  --v4-rose:         #BE6F74;    /* Rosa/salmão accent */
  --v4-rose-light:   #D4888D;    /* Rosa claro */

  /* === NEUTRALS (Dark Theme) === */
  --v4-black:        #0A0A0A;
  --v4-dark:         #111111;
  --v4-dark-2:       #1A1A1A;
  --v4-dark-3:       #232323;
  --v4-dark-4:       #2E2E2E;
  --v4-white:        #FFFFFF;
  --v4-gray-100:     #F0F0F0;
  --v4-gray-200:     #E0E0E0;
  --v4-gray-400:     #9A9A9A;
  --v4-gray-600:     #5A5A5A;

  /* === SEMANTIC === */
  --bg-page:         #0F0F0F;
  --bg-card:         #181818;
  --bg-card-2:       #212121;
  --text-primary:    #FFFFFF;
  --text-secondary:  #BBBBBB;
  --text-muted:      #707070;
  --border:          #282828;
  --border-light:    #333333;
  --border-focus:    var(--v4-red);

  /* === STATUS === */
  --color-success:   #22C55E;
  --color-danger:    #EF4444;
  --color-warning:   #F59E0B;

  /* === SHADOWS === */
  --shadow-sm: 0 1px 4px rgba(0,0,0,.5);
  --shadow-md: 0 4px 20px rgba(0,0,0,.6);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.7);
  --shadow-red: 0 4px 24px rgba(230,27,27,0.28);
  --shadow-green: 0 4px 24px rgba(61,107,65,0.3);

  /* === RADIUS === */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --font: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===========================
   HEADER
   =========================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--v4-black);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 20px rgba(0,0,0,.7);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-brand { display: flex; align-items: center; gap: 14px; }

.brand-logo {
  width: 42px; height: 42px;
  background: var(--v4-red);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-red);
}
.brand-logo-text {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  font-family: var(--font);
}

.brand-divider {
  width: 1px; height: 30px;
  background: var(--border-light);
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--v4-white);
  display: block;
  letter-spacing: .2px;
}
.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.header-steps {
  display: flex; align-items: center; gap: 6px;
}
.header-steps .sep {
  color: var(--border-light);
  font-size: 10px;
  margin: 0 1px;
}
.step-pill {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; gap: 7px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.step-pill .sp-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  transition: all .2s;
}
.step-pill.active {
  border-color: var(--v4-red);
  color: var(--v4-white);
  background: rgba(230,27,27,0.1);
}
.step-pill.active .sp-num { background: var(--v4-red); color: #fff; }
.step-pill.done { border-color: var(--color-success); color: var(--color-success); }
.step-pill.done .sp-num { background: var(--color-success); color: #fff; }
.step-pill:hover:not(.active):not(.done) {
  border-color: var(--v4-gray-600);
  color: var(--text-secondary);
}

/* ===========================
   LAYOUT
   =========================== */
#app { padding: 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 48px 24px 72px; }

.step-section { display: none; }
.step-section.active { display: block; animation: fadeUp .3s ease both; }

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

/* ===========================
   SECTION INTRO
   =========================== */
.section-intro {
  text-align: center;
  margin-bottom: 48px;
  padding-top: 8px;
}
.section-intro::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--v4-red);
  margin: 0 auto 24px;
  border-radius: 2px;
}
.section-intro h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: var(--v4-white);
  margin-bottom: 14px;
  line-height: 1.2;
  letter-spacing: -.5px;
}
.section-intro p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.highlight { color: var(--v4-red); }

/* ===========================
   CARD FORM
   =========================== */
.card-form {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.card-form-header {
  background: var(--v4-black);
  border-bottom: 1px solid var(--border-light);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-form-header i { font-size: 17px; color: var(--v4-red); }
.card-form-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--v4-white);
  letter-spacing: .3px;
  text-transform: uppercase;
}

/* ===========================
   COST BLOCKS
   =========================== */
.cost-block {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}
.cost-block:last-child { border-bottom: none; }

.cost-block--logistica {
  background: rgba(61,107,65,0.06);
  border-left: 3px solid var(--v4-green-mid);
}
.cost-block--marketing {
  background: rgba(230,27,27,0.05);
  border-left: 3px solid var(--v4-red);
}

.cost-block-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.cost-block-title i { color: var(--v4-red); font-size: 14px; }
.cost-block--logistica .cost-block-title i { color: var(--v4-green-light); }

/* ===========================
   FORM GRID & FIELDS
   =========================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px 20px;
}
.field-full { grid-column: 1 / -1; }

.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.field-group small { font-size: 11px; color: var(--v4-gray-600); line-height: 1.4; }

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.input-wrap:focus-within {
  border-color: var(--v4-red);
  box-shadow: 0 0 0 3px rgba(230,27,27,0.12);
}

.input-prefix, .input-suffix {
  padding: 0 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--v4-dark-4);
  border-right: 1px solid var(--border-light);
  height: 44px;
  display: flex; align-items: center;
  flex-shrink: 0;
}
.input-suffix { border-right: none; border-left: 1px solid var(--border-light); }

.input-wrap input[type="number"],
.input-wrap input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 12px;
  height: 44px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--v4-white);
  background: transparent;
}
input[type="number"]::-webkit-inner-spin-button { opacity: 0.25; }

.pct-display {
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  height: 44px;
  display: flex; align-items: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--v4-red);
  gap: 10px;
}
.pct-display.double { justify-content: space-between; }
.pct-badge {
  background: var(--v4-red);
  color: #fff;
  padding: 2px 9px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 700;
}

.receita-display {
  background: var(--v4-black);
  border: 1px solid var(--v4-red);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-red);
}
.receita-display #receita-calculada {
  font-size: 28px;
  font-weight: 900;
  color: var(--v4-white);
  letter-spacing: -.5px;
}
.receita-display small {
  color: var(--text-muted);
  font-size: 11px;
  text-align: right;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ===========================
   TOOLTIP
   =========================== */
.tooltip-wrap { position: relative; cursor: pointer; margin-left: auto; }
.tooltip-icon { color: var(--text-muted); font-size: 13px; }
.tooltip-box {
  display: none;
  position: absolute;
  right: 0; bottom: calc(100% + 8px);
  background: var(--v4-dark-2);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  width: 260px;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  line-height: 1.55;
}
.tooltip-wrap:hover .tooltip-box { display: block; }

/* ===========================
   MARKETING INSIGHT
   =========================== */
.mkt-insight {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(230,27,27,0.07);
  border: 1px solid rgba(230,27,27,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.mkt-insight i { color: var(--v4-red); margin-top: 2px; flex-shrink: 0; }
.mkt-insight strong { color: var(--v4-red-light); }

/* ===========================
   RESUMO STEP 1
   =========================== */
.resumo-card {
  background: var(--v4-black);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--v4-red);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-md);
}
.resumo-card.hidden { display: none !important; }

.resumo-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.resumo-header i { color: var(--v4-red); font-size: 17px; }
.resumo-header h3 { font-size: 15px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }

.resumo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.resumo-item {
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.resumo-item.receita { border-top: 2px solid var(--v4-green-light); }
.resumo-item.custo   { border-top: 2px solid var(--v4-rose); }
.resumo-item.lucro   { border-top: 2px solid var(--v4-red); }
.resumo-item.margem  { border-top: 2px solid var(--v4-gray-600); }

.ri-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.ri-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--v4-white);
  letter-spacing: -.3px;
}
.ri-value.positive { color: var(--color-success); }
.ri-value.negative { color: var(--v4-red); }

/* ===========================
   STEP ACTIONS
   =========================== */
.step-actions {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-top: 36px;
}

.btn-primary {
  background: var(--v4-red);
  color: #fff;
  border: none;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  padding: 13px 32px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: var(--shadow-red);
  letter-spacing: .5px;
  text-transform: uppercase;
}
.btn-primary:hover {
  background: var(--v4-red-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(230,27,27,0.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-lg { font-size: 14px; padding: 15px 40px; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 12px;
  padding: 10px 22px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: all .2s;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.btn-secondary:hover { border-color: var(--v4-red); color: var(--v4-red); }

.step-hint { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.step-hint i { color: var(--color-success); }

/* ===========================
   COMPARE WRAPPER
   =========================== */
.compare-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 48px;
}

/* ===========================
   COMPARE CARDS
   =========================== */
.compare-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare-card--parceiro {
  border-color: var(--v4-red);
  box-shadow: 0 4px 32px rgba(230,27,27,0.15);
}

.cc-header {
  padding: 22px;
  background: var(--v4-black);
  border-bottom: 1px solid var(--border-light);
}
.compare-card--atual    .cc-header { border-top: 3px solid var(--v4-gray-600); }
.compare-card--parceiro .cc-header { border-top: 3px solid var(--v4-red); }

.cc-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cc-badge--atual {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}
.cc-badge--parceiro {
  background: rgba(230,27,27,0.15);
  color: var(--v4-red);
  border: 1px solid rgba(230,27,27,0.3);
}
.cc-header h2 {
  font-size: 18px; font-weight: 800;
  color: var(--v4-white);
  margin-bottom: 5px;
  letter-spacing: -.2px;
}
.cc-header p { font-size: 13px; color: var(--text-muted); line-height: 1.45; }

.cc-body { padding: 4px 0; }
.cc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 22px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.cc-row span { color: var(--text-secondary); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.cc-row span i { font-size: 11px; }
.cc-row strong { font-weight: 700; font-size: 13px; color: var(--text-primary); text-align: right; }

.cc-row--highlight  { background: rgba(61,107,65,0.07); }
.cc-row--fee        { background: rgba(230,27,27,0.06); }
.cc-row--marketing  { background: rgba(190,111,116,0.06); }
.cc-row--systems-off{ background: rgba(34,197,94,0.05); }

.cc-row--total {
  background: var(--bg-card-2);
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
}
.cc-row--total strong { font-size: 15px; }

.cc-row--resultado { padding: 14px 22px; }
.cc-row--resultado strong { font-size: 19px; font-weight: 900; }

.cc-row--positivo { background: rgba(34,197,94,0.07); }
.cc-row--negativo { background: rgba(230,27,27,0.07); }
.cc-row--margem   { padding: 10px 22px 14px; }
.cc-divider { height: 1px; background: var(--border-light); }

.positive { color: var(--color-success) !important; }
.negative { color: var(--v4-red) !important; }
.text-green { color: var(--color-success) !important; }

.parceiro-fees-note {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(230,27,27,0.05);
  border-top: 1px solid rgba(230,27,27,0.15);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.parceiro-fees-note i { color: var(--v4-red); margin-top: 2px; flex-shrink: 0; }
.parceiro-fees-note strong { color: var(--text-secondary); }

/* ===========================
   ARROW / GANHO
   =========================== */
.compare-arrow {
  display: flex; align-items: center; justify-content: center;
  padding-top: 90px;
}
.arrow-inner {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--v4-red);
}
.arrow-gain {
  background: var(--v4-dark-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
  min-width: 120px;
}
.ag-label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 4px;
}
.ag-value {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -.3px;
  margin-bottom: 4px;
}
.ag-value.ag-positive { color: var(--color-success); }
.ag-value.ag-negative { color: var(--v4-red); }

/* ===========================
   GAIN HIGHLIGHT
   =========================== */
.gain-highlight {
  background: var(--v4-black);
  border: 1px solid var(--v4-green);
  border-left: 4px solid var(--v4-green);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: var(--v4-white);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-green);
}
.gain-highlight.hidden { display: none !important; }
.gain-highlight.gain-negative {
  border-color: var(--v4-red);
  border-left-color: var(--v4-red);
  box-shadow: var(--shadow-red);
}

.gh-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 200px; }
.gh-left i { color: var(--v4-green-light); font-size: 28px; }
.gain-negative .gh-left i { color: var(--v4-red); }
.gh-left h3 { font-size: 17px; font-weight: 800; margin-bottom: 3px; }
.gh-left p  { font-size: 13px; color: var(--text-muted); }

.gh-right { text-align: center; flex-shrink: 0; }
.gh-right span {
  display: block;
  font-size: 34px; font-weight: 900;
  color: var(--color-success);
  letter-spacing: -.5px;
  line-height: 1;
}
.gain-negative .gh-right span { color: var(--v4-red); }
.gh-right small { font-size: 12px; color: var(--text-muted); }

.gh-anual {
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  text-align: center;
}
.gh-anual span  { font-size: 10px; color: var(--text-muted); display: block; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.gh-anual strong { color: var(--v4-white); font-size: 18px; font-weight: 900; display: block; }

/* ===========================
   CHARTS
   =========================== */
.chart-section { margin-bottom: 40px; }
.chart-section h2 {
  font-size: 16px; font-weight: 700;
  margin-bottom: 20px;
  color: var(--v4-white);
  display: flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: .4px;
}
.chart-section h2 i { color: var(--v4-red); }

.charts-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 16px;
}
.chart-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.chart-wrap h3 {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: .7px;
}

/* ===========================
   STEP 3 — ALAVANCAGEM
   =========================== */
.alavanca-controls { margin-bottom: 28px; }

.slider-wrap {
  display: flex; align-items: center; gap: 14px;
  height: 44px;
}
input[type="range"] {
  flex: 1;
  accent-color: var(--v4-red);
  height: 4px;
  cursor: pointer;
}
.slider-val {
  background: var(--v4-red);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 800;
  min-width: 50px;
  text-align: center;
  letter-spacing: .3px;
}

.alavanca-flow {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.af-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  text-align: center;
  flex: 1; min-width: 155px;
  box-shadow: var(--shadow-sm);
}
.af-step--highlight {
  background: var(--v4-black);
  border-color: var(--v4-red);
  box-shadow: var(--shadow-red);
}
.af-step--highlight .af-label { color: var(--text-muted); }
.af-step--highlight .af-value { color: var(--v4-white); }

.af-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 18px;
}
.af-icon--gain    { background: rgba(34,197,94,0.12);  color: var(--color-success); }
.af-icon--invest  { background: rgba(230,27,27,0.12);  color: var(--v4-red); }
.af-icon--receita { background: rgba(230,27,27,0.18);  color: var(--v4-red-light); }

.af-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 6px;
}
.af-value { font-size: 22px; font-weight: 900; color: var(--v4-white); letter-spacing: -.3px; }
.af-arrow { color: var(--border-light); font-size: 18px; align-self: center; }

.projecao-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}
.proj-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px; box-shadow: var(--shadow-sm);
  text-align: center;
}
.proj-card--destaque {
  background: var(--v4-black);
  border-color: var(--v4-red);
  box-shadow: var(--shadow-red);
}
.proj-card--destaque .proj-label { color: var(--text-muted); }
.proj-card--destaque .proj-value { color: var(--v4-white); }
.proj-icon { font-size: 20px; margin-bottom: 10px; color: var(--v4-red); }
.proj-card--destaque .proj-icon { color: var(--v4-rose-light); }
.proj-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .7px;
  margin-bottom: 6px;
}
.proj-value { font-size: 20px; font-weight: 900; color: var(--v4-white); letter-spacing: -.3px; }
.proj-badge {
  display: inline-block;
  background: var(--color-success);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  margin-top: 8px; letter-spacing: .3px;
}

/* ===========================
   V4 CTA BLOCK
   =========================== */
.v4-cta-block {
  background: var(--v4-black);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--v4-red);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 0 60px rgba(230,27,27,0.08);
  position: relative;
}
.v4-cta-block::after {
  content: 'V4';
  position: absolute;
  right: -20px; bottom: -30px;
  font-size: 200px; font-weight: 900;
  color: rgba(230,27,27,0.04);
  pointer-events: none;
  line-height: 1;
  letter-spacing: -8px;
  font-family: var(--font);
}
.v4-cta-inner { padding: 36px; position: relative; z-index: 1; }

.v4-logo-area {
  display: flex; align-items: flex-start; gap: 20px;
  margin-bottom: 28px; flex-wrap: wrap;
}
.v4-big-badge {
  background: var(--v4-red);
  color: #fff;
  font-size: 28px; font-weight: 900;
  width: 66px; height: 66px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-red);
  letter-spacing: -2px;
}
.v4-logo-area h3 {
  font-size: 20px; font-weight: 800;
  color: var(--v4-white);
  margin-bottom: 8px; line-height: 1.3;
}
.v4-logo-area h3 strong { color: var(--v4-red); }
.v4-logo-area p {
  font-size: 14px; color: var(--text-secondary);
  max-width: 560px; line-height: 1.65;
}

.v4-lista {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0;
}
.v4-lista li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-secondary); font-weight: 500;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.v4-lista li:last-child { border-bottom: none; }
.v4-lista li i { color: var(--color-success); font-size: 14px; flex-shrink: 0; }

/* ===========================
   RESUMO FINAL
   =========================== */
.resumo-final {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}
.resumo-final.hidden { display: none !important; }
.resumo-final h2 {
  font-size: 15px; font-weight: 700;
  color: var(--v4-white);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: .5px;
}
.resumo-final h2 i { color: var(--v4-red); }

.rf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.rf-block {
  background: var(--bg-card-2);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border);
}
.rf-block--parceiro { border-top: 2px solid var(--v4-red); }
.rf-block--alavanca { border-top: 2px solid var(--color-success); }

.rf-block h4 {
  font-size: 10px; font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .8px;
}
.rf-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.rf-row:last-child { border-bottom: none; }
.rf-row span { color: var(--text-muted); }
.rf-row strong { font-weight: 700; font-size: 13px; color: var(--text-primary); }
.rf-row--dest {
  background: rgba(255,255,255,0.03);
  margin: 4px -8px; padding: 10px 8px;
  border-radius: var(--radius-xs);
}
.rf-block--alavanca .rf-row--dest strong { color: var(--color-success); }

/* ===========================
   FOOTER
   =========================== */
#site-footer {
  background: var(--v4-black);
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 20px 24px;
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 4px 20px;
  font-size: 12px; align-items: center;
}
.footer-inner strong { color: var(--text-secondary); }

/* ===========================
   UTILITIES
   =========================== */
.hidden { display: none !important; }

/* ===========================
   MODAL LEAD
   =========================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn .2s ease both;
}
.modal-overlay.modal--open {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-box {
  background: var(--v4-dark-2);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--v4-red);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  padding: 36px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(230,27,27,0.08);
  animation: modalSlideUp .28s cubic-bezier(0.16, 1, 0.3, 1) both;
  max-height: 90vh;
  overflow-y: auto;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--v4-dark-3);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
}
.modal-close:hover {
  background: var(--v4-red);
  border-color: var(--v4-red);
  color: #fff;
}

/* Modal header */
.modal-header {
  text-align: center;
  margin-bottom: 28px;
}
.modal-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.modal-brand-logo {
  background: var(--v4-red);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -1.5px;
  width: 52px; height: 52px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-red);
}
.modal-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--v4-white);
  margin-bottom: 8px;
  line-height: 1.25;
  letter-spacing: -.3px;
}
.modal-header p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto;
}

/* Modal fields */
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.modal-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.modal-field label i { color: var(--v4-red); font-size: 12px; }
.modal-field input {
  background: var(--bg-card-2);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--v4-white);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.modal-field input::placeholder { color: var(--text-muted); font-weight: 400; }
.modal-field input:focus {
  border-color: var(--v4-red);
  box-shadow: 0 0 0 3px rgba(230,27,27,0.15);
}

/* Erro */
.lead-erro {
  font-size: 13px;
  color: var(--v4-red);
  font-weight: 600;
  min-height: 18px;
  margin-bottom: 4px;
  display: none;
  align-items: center;
  gap: 6px;
}
.lead-erro.visible { display: flex; }
.lead-erro::before { content: '\f06a'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 13px; }

/* Submit button */
.btn-modal-submit {
  width: 100%;
  justify-content: center;
  font-size: 15px;
  padding: 14px;
  margin-top: 8px;
  border-radius: var(--radius-sm);
}
.btn-modal-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none !important;
}

/* Disclaimer */
.modal-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.5;
}
.modal-disclaimer i { color: var(--color-success); }

/* Benefícios */
.modal-benefits {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.mb-item {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.mb-item i { color: var(--color-success); font-size: 12px; }

/* ===========================
   TOAST NOTIFICATION
   =========================== */
.v4-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--v4-dark-2);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--v4-green);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  max-width: calc(100vw - 48px);
  white-space: normal;
}
.v4-toast i { color: var(--v4-green-light); flex-shrink: 0; }
.v4-toast--error {
  border-left-color: var(--v4-red);
}
.v4-toast--error i { color: var(--v4-red); }
.v4-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}
.toast-link {
  color: var(--v4-red);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 4px;
}
.toast-link:hover { color: var(--v4-red-light); }

/* ===========================
   FIELD SHAKE (validação)
   =========================== */
@keyframes fieldShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.field-shake { animation: fieldShake .4s ease; }

/* ===========================
   PRINT
   =========================== */
@media print {
  body { background: #fff !important; color: #000 !important; }
  #site-header, .step-actions { display: none !important; }
  .step-section { display: block !important; }
  .card-form, .compare-card, .chart-wrap { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .compare-wrapper { grid-template-columns: 1fr; }
  .compare-arrow { padding-top: 0; }
  .arrow-inner { flex-direction: row; }
  .charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 28px 16px 56px; }
  .header-inner { padding: 0 16px; flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; }
  .header-steps { display: none; }
  .card-form-header { padding: 14px 18px; }
  .cost-block { padding: 18px 18px; }
  .cc-row { padding: 10px 16px; }
  .cc-header { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .section-intro h1 { font-size: 24px; }
  .alavanca-flow { flex-direction: column; }
  .af-arrow { transform: rotate(90deg); }
  .v4-cta-inner { padding: 22px; }
  .compare-arrow { padding: 0; }
  .receita-display { flex-direction: column; align-items: flex-start; gap: 6px; }
}
