﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --evo-primary: #890038;
  --evo-secondary: #772244;
  --evo-gray: #606060;
  --evo-light: #c6c6c6;
  --evo-primary-hover: #6d002d;
  --evo-primary-light: #fcf0f4;
  --evo-primary-10: rgba(137, 0, 56, 0.10);
  --evo-primary-15: rgba(137, 0, 56, 0.15);
  --evo-primary-20: rgba(137, 0, 56, 0.20);
  --evo-bg: #f8f9fa;
  --evo-surface: #ffffff;
  --evo-text: #1a202c;
  --evo-text-secondary: #4a5568;
  --evo-border: #e2e8f0;
  --evo-border-light: #edf2f7;
  --sem-success: #2f855a;
  --sem-success-bg: #f0fff4;
  --sem-warning: #c05621;
  --sem-warning-bg: #fffaf0;
  --sem-error: #c53030;
  --sem-error-bg: #fff5f5;
  --sem-info: #2b6cb0;
  --sem-info-bg: #ebf8ff;
  --font-primary: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
  --bg: var(--evo-bg);
  --surface: var(--evo-surface);
  --line: var(--evo-border);
  --text: var(--evo-text);
  --muted: var(--evo-text-secondary);
  --accent: var(--evo-primary);
  --accent-dark: var(--evo-primary-hover);
  --warn: var(--sem-warning);
  --danger: var(--sem-error);
  --ok: var(--sem-success);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, var(--evo-primary-10), transparent 34rem),
    linear-gradient(180deg, #ffffff 0, var(--evo-bg) 26rem);
  color: var(--evo-text);
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--evo-primary); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  padding: 22px clamp(20px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--evo-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--evo-primary), var(--evo-secondary));
}

.topbar h1 {
  margin: 0;
  color: var(--evo-primary);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar p {
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--evo-text-secondary);
  font-size: 0.92rem;
}

.status-pill {
  min-width: 92px;
  padding: 8px 13px;
  border: 1px solid var(--evo-primary-15);
  border-radius: var(--radius-full);
  background: var(--evo-primary-light);
  color: var(--evo-primary);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  width: min(1500px, calc(100% - 32px));
  margin: 28px auto 48px;
  align-items: start;
}

.main-column { min-width: 0; }

.resume-banner,
.section,
.result-panel {
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--evo-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.resume-banner {
  padding: 22px;
  margin-bottom: 18px;
  border-left: 3px solid var(--evo-primary);
}

.resume-banner strong {
  display: block;
  margin-bottom: 4px;
  color: var(--evo-text);
  font-size: 1rem;
  font-weight: 700;
}

.resume-banner p {
  margin: 0 0 16px;
  color: var(--evo-text-secondary);
}

form { display: grid; gap: 18px; }

.quote-locked .section:not(:first-of-type),
.quote-locked .actions { display: none; }

.quote-locked.broker-identified #sectionEmpresa { display: block; }

.quote-progress {
  position: sticky;
  top: 96px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(8, minmax(86px, 1fr));
  gap: 10px;
  padding: 16px;
  overflow-x: auto;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--evo-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.quote-progress-line { display: none; }

.quote-step {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--evo-gray);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.quote-step span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--evo-border);
  background: #fff;
  color: var(--evo-text-secondary);
  font-weight: 800;
  transition: all 180ms ease;
}

.quote-step-corretor span,
.broker-identified .quote-step-empresa span,
form:not(.quote-locked) .quote-step span {
  background: var(--evo-primary);
  color: #fff;
  border-color: var(--evo-primary);
  box-shadow: 0 0 0 4px var(--evo-primary-15), 0 2px 8px var(--evo-primary-20);
}

.broker-identified .quote-step-corretor strong,
form:not(.quote-locked) .quote-step strong { color: var(--evo-primary); }

.section {
  position: relative;
  padding: 24px;
  overflow: visible;
  transition: box-shadow 250ms ease, transform 250ms ease, border-color 250ms ease;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--evo-primary);
}

.section:hover { box-shadow: var(--shadow-md); }

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--evo-border-light);
}

.section-heading.inline { justify-content: space-between; }
.section-heading.inline > div { display: flex; align-items: center; gap: 12px; }

.section-heading span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--evo-primary-light);
  color: var(--evo-primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
}

.section-heading h2,
.result-panel h2 {
  margin: 0;
  color: var(--evo-text);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.grid { display: grid; gap: 16px; }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.compact { gap: 12px; }
.grid.cnpj-start { grid-template-columns: minmax(260px, 520px) 230px minmax(220px, 1fr); align-items: end; }
.grid.resume-start { grid-template-columns: minmax(260px, 1fr) 230px; align-items: end; }

.subsection-title {
  margin: 22px 0 12px;
  color: var(--evo-primary);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

label {
  position: relative;
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 700;
}

.wide { grid-column: span 2; }
.full { grid-column: 1 / -1; }

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--evo-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--evo-text);
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea { resize: vertical; min-height: 104px; }
input::placeholder, textarea::placeholder { color: #a0aec0; }
input:hover, select:hover, textarea:hover { border-color: #a0aec0; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--evo-primary);
  box-shadow: 0 0 0 3px var(--evo-primary-15);
}
input.invalid, select.invalid, textarea.invalid {
  border-color: var(--sem-error);
  background: var(--sem-error-bg);
}

.field-error {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 3;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: var(--sem-error-bg);
  color: var(--sem-error);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}
.field-error:empty { display: none; }

.lookup-status,
.draft-status {
  min-height: 18px;
  color: var(--evo-text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}
.draft-status { display: flex; align-items: center; margin-top: 10px; }
.lookup-status[data-state="success"], .draft-status[data-state="success"] { color: var(--sem-success); }
.lookup-status[data-state="error"], .draft-status[data-state="error"] { color: var(--sem-error); }
.lookup-status[data-state="loading"], .draft-status[data-state="loading"] { color: var(--evo-primary); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--evo-border);
  border-radius: var(--radius-lg);
  background: #fff;
}

table { width: 100%; min-width: 850px; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid var(--evo-border-light); padding: 10px 12px; text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: var(--evo-text-secondary); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
td input { min-height: 36px; }
td:last-child { width: 110px; font-weight: 700; }
tbody tr:hover { background: #fafbfc; }

.actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: 18px 0 0;
  background: linear-gradient(180deg, rgba(248,249,250,0), var(--evo-bg) 32%);
}

.section-actions { display: flex; justify-content: flex-end; margin-top: 18px; }

button,
.download {
  min-height: 42px;
  border: 1px solid var(--evo-primary);
  border-radius: var(--radius-md);
  padding: 0 18px;
  background: var(--evo-primary);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
button:hover, .download:hover { background: var(--evo-primary-hover); border-color: var(--evo-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--evo-primary-20); }
button:active, .download:active { transform: scale(0.98); }
button:disabled { opacity: 0.55; cursor: wait; pointer-events: none; box-shadow: none; }
button.secondary { background: #fff; color: var(--evo-primary); border-color: var(--evo-primary); }
button.secondary:hover { background: var(--evo-primary-light); color: var(--evo-primary); }

.result-panel {
  position: sticky;
  top: 118px;
  padding: 22px;
}
.result-panel p { color: var(--evo-text-secondary); line-height: 1.55; }
.result-panel .download { width: 100%; margin-top: 10px; }
.message { margin-top: 10px; color: var(--sem-error); font-weight: 700; }
.match { color: var(--sem-success); }
.mismatch { color: var(--sem-warning); }

@media (max-width: 1120px) {
  .shell { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .grid.four, .grid.three, .grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cnpj-start, .grid.resume-start { grid-template-columns: 1fr; }
  .quote-progress { top: 88px; grid-template-columns: repeat(7, minmax(78px, 1fr)); }
}

@media (max-width: 720px) {
  .topbar { position: static; align-items: flex-start; flex-direction: column; padding: 20px; }
  .shell { width: min(100% - 20px, 1500px); margin-top: 18px; }
  .section, .resume-banner, .result-panel { padding: 16px; }
  .grid.four, .grid.three, .grid.five { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .actions { flex-direction: column; }
  button, .download { width: 100%; }
  .quote-progress { position: static; grid-template-columns: repeat(7, minmax(74px, 1fr)); }
}

.minhas-shell {
  display: block;
  width: min(1100px, calc(100% - 32px));
}

.minhas-shell table {
  min-width: 760px;
}

.minhas-shell small {
  color: var(--evo-text-secondary);
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status.EXCEL_GERADO { background: var(--sem-success-bg); color: var(--sem-success); }
.status.AGUARDANDO_ANALISE_INTERNA,
.status.IA_PROCESSANDO,
.status.IA_PROCESSADA { background: var(--sem-info-bg); color: var(--sem-info); }
.status.CANCELADA { background: var(--sem-error-bg); color: var(--sem-error); }
.status.EXPIRADA { background: #f1f5f9; color: #64748b; }

/* EVO polish layer: brand, motion and centered product layout */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 12% 8%, rgba(137, 0, 56, 0.10), transparent 22rem),
    radial-gradient(circle at 88% 18%, rgba(119, 34, 68, 0.12), transparent 28rem),
    linear-gradient(135deg, #ffffff 0%, #fff7fa 38%, #f8f9fa 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.36;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(137, 0, 56, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 0, 56, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
}

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

@keyframes evoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes evoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(137, 0, 56, 0.18); }
  50% { box-shadow: 0 0 0 9px rgba(137, 0, 56, 0.02); }
}

.topbar {
  justify-content: center;
  padding-inline: clamp(20px, 5vw, 72px);
}

.topbar .status-pill {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
}

.brand-lockup {
  width: min(1340px, 100%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(137, 0, 56, 0.18));
  animation: evoFloat 4.5s ease-in-out infinite;
}

.brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--evo-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--evo-primary);
  animation: evoPulse 2.4s ease-in-out infinite;
}

.shell {
  width: min(1380px, calc(100% - 40px));
  grid-template-columns: minmax(0, 1060px) minmax(280px, 320px);
  justify-content: center;
  gap: 28px;
}

.shell:has(.result-panel[hidden]) {
  grid-template-columns: minmax(0, 1120px);
}

.resume-banner,
.quote-progress,
.section,
.result-panel {
  animation: evoFadeUp 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.quote-progress { animation-delay: 70ms; }
.section:nth-of-type(1) { animation-delay: 120ms; }
.section:nth-of-type(2) { animation-delay: 170ms; }
.section:nth-of-type(3) { animation-delay: 220ms; }
.section:nth-of-type(4) { animation-delay: 270ms; }
.section:nth-of-type(5) { animation-delay: 320ms; }
.section:nth-of-type(6) { animation-delay: 370ms; }

.resume-banner {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border-left: 0;
}

.resume-banner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--evo-primary), var(--evo-secondary));
}

.resume-banner::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--evo-primary-10), transparent 70%);
  pointer-events: none;
}

.resume-banner strong,
.resume-banner p,
.resume-banner .grid,
.resume-banner .draft-status {
  position: relative;
  z-index: 1;
}

.resume-banner strong {
  font-size: 1.14rem;
  letter-spacing: -0.01em;
}

.quote-progress {
  padding: 18px 20px;
  border-color: rgba(137, 0, 56, 0.12);
  overflow: hidden;
}

.quote-progress::before {
  content: "";
  position: absolute;
  left: 48px;
  right: 48px;
  top: 34px;
  height: 2px;
  background: var(--evo-border);
}

.quote-progress::after {
  content: "";
  position: absolute;
  left: 48px;
  top: 34px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--evo-primary), var(--evo-secondary));
  transition: width 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.broker-identified .quote-progress::after { width: calc((100% - 96px) / 6); }
form:not(.quote-locked) .quote-progress::after { width: calc(100% - 96px); }

.quote-step {
  position: relative;
  z-index: 1;
}

.quote-step span {
  width: 38px;
  height: 38px;
  background: #fff;
}

.quote-step strong {
  color: var(--evo-text-secondary);
  transition: color 180ms ease, transform 180ms ease;
}

.quote-step-corretor span,
.broker-identified .quote-step-empresa span,
form:not(.quote-locked) .quote-step span {
  transform: scale(1.03);
}

.section {
  border-color: rgba(137, 0, 56, 0.10);
  box-shadow: 0 12px 30px rgba(26, 32, 44, 0.05);
}

.section:hover {
  transform: translateY(-2px);
  border-color: rgba(137, 0, 56, 0.22);
  box-shadow: 0 18px 38px rgba(26, 32, 44, 0.08);
}

.section::before {
  background: linear-gradient(180deg, var(--evo-primary), var(--evo-secondary));
}

.section-heading h2 {
  font-size: 1.16rem;
}

.section-heading span {
  box-shadow: inset 0 0 0 1px rgba(137, 0, 56, 0.08);
}

input,
select,
textarea {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
}

button,
.download {
  min-height: 46px;
}

button::selection,
.download::selection {
  background: transparent;
}

.actions {
  justify-content: flex-end;
}

.result-panel {
  border-top: 3px solid var(--evo-primary);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1120px) {
  .topbar { justify-content: space-between; }
  .topbar .status-pill { position: static; }
  .shell,
  .shell:has(.result-panel[hidden]) { grid-template-columns: 1fr; }
  .quote-progress::before,
  .quote-progress::after { display: none; }
}

@media (max-width: 720px) {
  .brand-lockup { align-items: flex-start; }
  .brand-logo { width: 46px; height: 46px; }
  .topbar .status-pill { align-self: stretch; }
  .resume-banner { padding: 20px; }
}

body.no-result .shell {
  grid-template-columns: minmax(0, 1120px);
}

body.has-result .shell {
  grid-template-columns: minmax(0, 1060px) minmax(280px, 320px);
}

/* Stepper state correction */
.brand-logo {
  animation: none !important;
}

.quote-progress::after {
  width: 0 !important;
}

.quote-progress[data-current-step="2"]::after { width: calc((100% - 96px) * 0.1667) !important; }
.quote-progress[data-current-step="3"]::after { width: calc((100% - 96px) * 0.3334) !important; }
.quote-progress[data-current-step="4"]::after { width: calc((100% - 96px) * 0.5) !important; }
.quote-progress[data-current-step="5"]::after { width: calc((100% - 96px) * 0.6667) !important; }
.quote-progress[data-current-step="6"]::after { width: calc((100% - 96px) * 0.8334) !important; }
.quote-progress[data-current-step="7"]::after { width: calc(100% - 96px) !important; }

.quote-progress .quote-step span,
.broker-identified .quote-progress .quote-step span,
form:not(.quote-locked) .quote-progress .quote-step span {
  background: #fff;
  color: var(--evo-text-secondary);
  border-color: var(--evo-border);
  box-shadow: none;
  transform: none;
}

.quote-progress .quote-step strong,
.broker-identified .quote-progress .quote-step strong,
form:not(.quote-locked) .quote-progress .quote-step strong {
  color: var(--evo-text-secondary);
}

.quote-progress .quote-step.is-done span,
.quote-progress .quote-step.is-active span {
  background: var(--evo-primary) !important;
  color: #fff !important;
  border-color: var(--evo-primary) !important;
  box-shadow: 0 0 0 4px var(--evo-primary-15), 0 2px 8px var(--evo-primary-20) !important;
  transform: scale(1.03) !important;
}

.quote-progress .quote-step.is-done strong,
.quote-progress .quote-step.is-active strong {
  color: var(--evo-primary) !important;
}

.quote-progress .quote-step.is-active span {
  animation: evoPulse 2.4s ease-in-out infinite;
}

/* Guided carousel journey */
.main-column {
  display: grid;
  gap: 18px;
}

.resume-banner {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto 6px;
}

.resume-banner summary {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.resume-banner summary::-webkit-details-marker { display: none; }

.resume-banner summary span {
  color: var(--evo-primary);
  font-size: 1rem;
  font-weight: 800;
}

.resume-banner summary small {
  color: var(--evo-text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.resume-banner summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  border: 1px solid var(--evo-primary-15);
  background: var(--evo-primary-light);
  color: var(--evo-primary);
  font-weight: 800;
}

.resume-banner[open] summary::after { content: "-"; }
.resume-banner:not([open]) p,
.resume-banner:not([open]) .grid,
.resume-banner:not([open]) .draft-status { display: none; }

.quote-carousel {
  position: relative;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  gap: 16px;
}

.quote-carousel::before {
  content: "Identificar corretor/vendedor";
  display: block;
  padding: 18px 22px;
  border: 1px solid rgba(137, 0, 56, 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff, var(--evo-primary-light));
  color: var(--evo-primary);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-sm);
}

.quote-carousel[data-carousel-step="2"]::before { content: "Dados da empresa"; }
.quote-carousel[data-carousel-step="3"]::before { content: "Dados da cota\0000E7\0000E3o"; }
.quote-carousel[data-carousel-step="4"]::before { content: "Operadora atual"; }
.quote-carousel[data-carousel-step="5"]::before { content: "Resumo de sa\0000FAde"; }
.quote-carousel[data-carousel-step="6"]::before { content: "Perfil de vidas"; }
.quote-carousel[data-carousel-step="7"]::before { content: "Dados complementares"; }
.quote-carousel[data-carousel-step="8"]::before { content: "Revis\0000E3o e finaliza\0000E7\0000E3o"; }

.quote-carousel .section[hidden] {
  display: none !important;
}

.quote-carousel .section.is-active {
  display: block;
  min-height: 460px;
  animation: carouselSlideIn 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes carouselSlideIn {
  from { opacity: 0; transform: translateX(18px) scale(0.99); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.quote-carousel .section-heading {
  align-items: flex-start;
  flex-wrap: wrap;
}

.quote-carousel .section-heading h2 {
  font-size: clamp(1.18rem, 2vw, 1.45rem);
}

.step-helper {
  flex-basis: 100%;
  margin: -6px 0 0 44px;
  color: var(--evo-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.carousel-nav {
  position: sticky;
  top: 184px;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(137, 0, 56, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.carousel-nav-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.carousel-nav-copy strong {
  color: var(--evo-text);
  font-size: 0.9rem;
  font-weight: 800;
}

.carousel-nav-copy span {
  color: var(--evo-text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

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

.quote-progress {
  top: 96px;
}

.quote-step {
  cursor: pointer;
  user-select: none;
}

.quote-step.is-locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.quote-step.is-locked span {
  background: #f8fafc !important;
  color: #94a3b8 !important;
  border-color: var(--evo-border) !important;
}

.quote-step.is-done span::after {
  content: "✓";
  font-size: 0.78rem;
}

.quote-step.is-done span {
  font-size: 0;
}

.quote-carousel .actions.final-actions {
  position: static;
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--evo-border-light);
  background: transparent;
}

.quote-carousel[data-carousel-step="8"] .carousel-nav {
  margin-bottom: 0;
}

.quote-carousel[data-carousel-step="8"] #carouselSaveButton,
.quote-carousel[data-carousel-step="8"] #carouselNextButton {
  display: none;
}

.quote-carousel .section-actions {
  justify-content: flex-start;
  padding-top: 14px;
  border-top: 1px solid var(--evo-border-light);
}

.result-panel {
  max-width: 1120px;
  width: 100%;
}

@media (max-width: 1120px) {
  .carousel-nav {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }

  .carousel-nav-actions {
    justify-content: stretch;
  }

  .carousel-nav-actions button {
    flex: 1;
  }
}

@media (max-width: 720px) {
  .resume-banner summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-carousel::before {
    padding: 16px;
  }

  .step-helper {
    margin-left: 0;
  }

  .carousel-nav-actions {
    flex-direction: column;
  }
}

/* Align company CNPJ action with the input field */
#sectionEmpresa .grid.cnpj-start {
  align-items: start;
}

#sectionEmpresa #confirmCnpjButton {
  margin-top: 28px;
  height: 58px;
}

@media (max-width: 1120px) {
  #sectionEmpresa #confirmCnpjButton {
    margin-top: 0;
    height: 46px;
  }
}


/* EVO loading states */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.evo-spinner,
button.is-loading::before,
.draft-status[data-state="loading"]::before,
.lookup-status[data-state="loading"]::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid var(--evo-border);
  border-top-color: var(--evo-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}

button.is-loading {
  position: relative;
  gap: 10px;
}

button.is-loading::before {
  border-color: rgba(255,255,255,0.45);
  border-top-color: #fff;
}

button.secondary.is-loading::before {
  border-color: var(--evo-primary-15);
  border-top-color: var(--evo-primary);
}

.draft-status[data-state="loading"],
.lookup-status[data-state="loading"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quote-carousel.is-busy .section.is-active::after {
  content: "";
  position: absolute;
  inset: auto 24px 18px 24px;
  height: 7px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--evo-border-light) 25%, var(--evo-primary-light) 50%, var(--evo-border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.25s infinite;
  pointer-events: none;
}

.loading-skeleton {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.loading-skeleton span {
  display: block;
  height: 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--evo-border-light) 25%, #f8fafc 50%, var(--evo-border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.loading-skeleton span:nth-child(1) { width: 42%; }
.loading-skeleton span:nth-child(2) { width: 78%; }
.loading-skeleton span:nth-child(3) { width: 58%; }

.status.ENVIADA, .status.ENVIADA_AO_CLIENTE { background: var(--sem-success-bg); color: var(--sem-success); }
.status.IA_PROCESSANDO { background: var(--sem-info-bg); color: var(--sem-info); }
.status.IA_PROCESSADA { background: var(--sem-success-bg); color: var(--sem-success); }

.privacy-note {
  margin: -4px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(137, 0, 56, 0.14);
  border-radius: var(--radius-md);
  background: var(--evo-primary-light);
  color: var(--evo-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.health-cases-grid {
  display: grid;
  gap: 16px;
}

.health-case-section {
  border: 1px solid var(--evo-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, #fff7fa);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.health-case-section__head,
.health-case-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.health-case-section h3 {
  margin: 0;
  color: var(--evo-primary);
  font-size: 1rem;
}

.health-case-section p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.no-case-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 140px;
  font-size: 0.86rem;
  color: var(--muted);
}

.no-case-toggle input { width: auto; }

.health-case-list {
  display: grid;
  gap: 12px;
}

.health-case-card {
  padding: 16px;
  border: 1px solid var(--evo-border-light);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 220ms ease both;
}

.health-case-card__head strong {
  color: var(--evo-text);
}

.ghost-button {
  border: 1px solid var(--evo-primary-15);
  background: #fff;
  color: var(--evo-primary);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-weight: 700;
}

.add-health-case { margin-top: 12px; }

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

.commercial-location-card {
  display: grid;
  gap: 4px;
  margin: 4px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-left: 4px solid var(--evo-primary);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff, #fff7fb);
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 220ms ease both;
}

.commercial-location-card[hidden] {
  display: none !important;
}

.commercial-location-card strong {
  color: var(--evo-text);
  font-size: 0.95rem;
}

.commercial-location-card span {
  color: var(--evo-primary);
  font-weight: 800;
}

.commercial-location-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.commercial-location-card[data-type="UBERABA"] {
  border-left-color: var(--sem-info);
  background: linear-gradient(135deg, #fff, #eff6ff);
}

.inline-alert {
  border: 1px solid rgba(137, 0, 56, 0.22);
  border-radius: 14px;
  background: rgba(137, 0, 56, 0.06);
  color: var(--evo-primary);
  font-weight: 700;
  line-height: 1.5;
  padding: 1rem 1.1rem;
}

.field-label-with-help {
  align-items: center;
  display: inline-flex;
  gap: 0.55rem;
  min-width: 0;
}

.smart-tooltip {
  display: inline-flex;
  line-height: 1;
  position: relative;
  z-index: 12;
}

.help-dot {
  align-items: center;
  appearance: none;
  background: linear-gradient(135deg, #fff, #fff4f8);
  border: 1px solid rgba(137, 0, 56, 0.24);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(137, 0, 56, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--evo-primary);
  cursor: help;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  height: 1.55rem;
  justify-content: center;
  padding: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
  width: 1.55rem;
}

.help-dot:hover,
.help-dot:focus-visible,
.smart-tooltip.is-open .help-dot {
  background: var(--evo-primary);
  border-color: var(--evo-primary);
  box-shadow: 0 14px 30px rgba(137, 0, 56, 0.24);
  color: #fff;
  outline: none;
  transform: translateY(-1px) scale(1.04);
}

.smart-tooltip.is-emphasis .help-dot {
  animation: helpPulse 1.8s ease-in-out infinite;
}

.smart-tooltip__bubble {
  backdrop-filter: blur(10px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 250, 0.98));
  border: 1px solid rgba(137, 0, 56, 0.18);
  border-radius: 18px;
  bottom: calc(100% + 0.85rem);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18), 0 8px 20px rgba(137, 0, 56, 0.10);
  color: var(--evo-text);
  display: grid;
  gap: 0.62rem;
  left: 50%;
  line-height: 1.45;
  max-width: min(28rem, calc(100vw - 2rem));
  min-width: 21rem;
  opacity: 0;
  padding: 1rem 1.05rem;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, 10px) scale(0.96);
  transform-origin: 50% 100%;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 180ms ease;
  visibility: hidden;
  z-index: 40;
}

.smart-tooltip__bubble::after {
  background: rgba(255, 250, 252, 0.98);
  border-bottom: 1px solid rgba(137, 0, 56, 0.18);
  border-right: 1px solid rgba(137, 0, 56, 0.18);
  bottom: -7px;
  content: "";
  height: 14px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
}

.smart-tooltip__bubble strong {
  color: var(--evo-primary);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.smart-tooltip__bubble span,
.smart-tooltip__bubble em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 600;
}

.smart-tooltip__bubble b {
  color: var(--evo-text);
}

.smart-tooltip__bubble em {
  background: rgba(137, 0, 56, 0.07);
  border-left: 3px solid var(--evo-primary);
  border-radius: 10px;
  color: var(--evo-primary);
  padding: 0.58rem 0.68rem;
}

.smart-tooltip:hover .smart-tooltip__bubble,
.smart-tooltip:focus-within .smart-tooltip__bubble,
.smart-tooltip.is-open .smart-tooltip__bubble {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  visibility: visible;
}

@keyframes helpPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(137, 0, 56, 0.12), 0 0 0 0 rgba(137, 0, 56, 0.18); }
  50% { box-shadow: 0 12px 28px rgba(137, 0, 56, 0.20), 0 0 0 7px rgba(137, 0, 56, 0.08); }
}

@media (max-width: 720px) {
  .smart-tooltip__bubble {
    left: auto;
    min-width: min(21rem, calc(100vw - 2rem));
    right: -1rem;
    transform: translateY(10px) scale(0.96);
  }

  .smart-tooltip__bubble::after {
    left: auto;
    right: 1.3rem;
    transform: rotate(45deg);
  }

  .smart-tooltip:hover .smart-tooltip__bubble,
  .smart-tooltip:focus-within .smart-tooltip__bubble,
  .smart-tooltip.is-open .smart-tooltip__bubble {
    transform: translateY(0) scale(1);
  }
}
/* Contracting help tooltip: keep it above the journey surface and button-sized. */
.quote-carousel,
.quote-carousel .section,
.quote-carousel .grid,
.quote-carousel label {
  overflow: visible;
}

.quote-carousel .section:has(#contratacaoHelp) {
  position: relative;
  z-index: 90;
}

.smart-tooltip {
  isolation: isolate;
  z-index: 220;
}

button.help-dot,
.help-dot {
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  flex: 0 0 1.25rem;
  font-size: 0.72rem;
  height: 1.25rem;
  line-height: 1;
  max-height: 1.25rem;
  max-width: 1.25rem;
  min-height: 1.25rem;
  min-width: 1.25rem;
  padding: 0 !important;
  width: 1.25rem;
}

.smart-tooltip__bubble {
  bottom: auto;
  top: calc(100% + 0.72rem);
  transform: translate(-50%, -8px) scale(0.96);
  transform-origin: 50% 0;
  z-index: 9999;
}

.smart-tooltip__bubble::after {
  border-bottom: 0;
  border-left: 1px solid rgba(137, 0, 56, 0.18);
  border-right: 0;
  border-top: 1px solid rgba(137, 0, 56, 0.18);
  bottom: auto;
  top: -7px;
}

.smart-tooltip:hover .smart-tooltip__bubble,
.smart-tooltip:focus-within .smart-tooltip__bubble,
.smart-tooltip.is-open .smart-tooltip__bubble {
  transform: translate(-50%, 0) scale(1);
}

@media (max-width: 720px) {
  .smart-tooltip__bubble {
    transform: translateY(-8px) scale(0.96);
  }

  .smart-tooltip__bubble::after {
    bottom: auto;
    top: -7px;
  }

  .smart-tooltip:hover .smart-tooltip__bubble,
  .smart-tooltip:focus-within .smart-tooltip__bubble,
  .smart-tooltip.is-open .smart-tooltip__bubble {
    transform: translateY(0) scale(1);
  }
}
.broker-helper {
  color: var(--evo-text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
  margin: -4px 0 18px 44px;
  max-width: 760px;
}

@media (max-width: 720px) {
  .broker-helper {
    margin-left: 0;
  }
}

.lives-minimum-alert {
  margin: 0 0 18px;
}

