@property --progress {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 0%;
}

:root {
  color-scheme: dark;
  --bg: #06111e;
  --surface: #0c2035;
  --surface-2: #112947;
  --surface-hover: #163354;
  --text: #eef4fb;
  --muted: #9db4cc;
  --border: #1f3d5e;
  --border-strong: #2c5078;
  --primary: #5b8dc2;
  --primary-hover: #6fa0d4;
  --primary-active: #4a7aad;
  --primary-light: rgba(91, 141, 194, 0.14);
  --primary-strong: #d9c08e;
  --gold: #d9c08e;
  --gold-ink: #2f2612;
  --danger: #e07070;
  --success: #6ec49a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.24);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent), 0 12px 30px color-mix(in srgb, var(--primary) 22%, transparent);
  --accent-gradient: linear-gradient(135deg, var(--primary) 0%, #4f7fb8 55%, var(--gold) 130%);
  --grid-line: rgba(255, 255, 255, 0.035);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f4f7fc;
  --surface-hover: #edf2f9;
  --text: #0a2540;
  --muted: #516177;
  --border: #dde4ee;
  --border-strong: #c8d3e2;
  --primary: #15477b;
  --primary-hover: #1a5898;
  --primary-active: #0f3860;
  --primary-light: rgba(21, 71, 123, 0.09);
  --primary-strong: #061b30;
  --gold: #b68012;
  --gold-ink: #241907;
  --danger: #b83232;
  --success: #1a6b47;
  --shadow: 0 20px 55px rgba(18, 39, 64, 0.13);
  --shadow-sm: 0 2px 8px rgba(18, 39, 64, 0.08);
  --shadow-md: 0 10px 24px rgba(18, 39, 64, 0.1);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent), 0 12px 26px color-mix(in srgb, var(--primary) 14%, transparent);
  --accent-gradient: linear-gradient(135deg, var(--primary) 0%, #1a5898 55%, var(--gold) 130%);
  --grid-line: rgba(10, 37, 64, 0.045);
}

* {
  box-sizing: border-box;
}

*:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(91, 141, 194, 0.15), transparent 34rem),
    radial-gradient(circle at bottom right, color-mix(in srgb, var(--gold) 12%, transparent), transparent 38rem),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, var(--grid-line) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(135deg, var(--bg), #081522 68%, var(--bg));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(21, 71, 123, 0.08), transparent 34rem),
    radial-gradient(circle at bottom right, color-mix(in srgb, var(--gold) 10%, transparent), transparent 38rem),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, var(--grid-line) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(135deg, var(--bg), #f8fbff 68%, var(--bg));
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease), filter 160ms var(--ease);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.app-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 52%, transparent), transparent);
}

.topbar::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(360px, 34%);
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 88%, transparent), transparent);
  transform: translateX(120vw);
  animation: topbarLineDrift 4s linear infinite;
  pointer-events: none;
}

@keyframes topbarLineDrift {
  from {
    transform: translateX(120vw);
  }
  to {
    transform: translateX(-420px);
  }
}


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

.brand-logo {
  margin-bottom: -15px;
  display: block;
  flex: none;
  width: 210px;
  height: 114px;
  background: url("./assets/logo-dourado.svg") center / contain no-repeat;
}

:root[data-theme="light"] .brand-logo {
  background-image: url("./assets/logo-azul.svg");
}

.brand-group > div {
  padding-left: 14px;
  border-left: 1px solid var(--border-strong);
  transform: translateY(18px);
}

.brand-kicker {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Botão "Contato" do topo e a janela com WhatsApp e e-mail (ADR-048). */
.topbar-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.contact-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

/* No celular só o ícone: o título fica numa linha e o topo não tem espaço para o texto. */
@media (max-width: 640px) {
  .topbar-actions {
    gap: 8px;
  }

  .contact-button {
    width: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
  }

  .contact-button-text {
    display: none;
  }

  .topbar-actions .icon-button {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 430px) {
  .topbar-actions {
    gap: 6px;
  }

  .contact-button,
  .topbar-actions .icon-button {
    width: 36px;
    min-height: 36px;
    height: 36px;
  }

  .topbar .brand-group h1 {
    font-size: 1.05rem;
  }
}

/* Rodapé da página: link do Aviso de Privacidade, à esquerda (ADR-049). */
.site-footer {
  display: flex;
  justify-content: flex-start;
  /* Computador: fixo no canto inferior esquerdo da tela, sempre visível. */
  position: fixed;
  left: 14px;
  bottom: 12px;
  z-index: 20; /* abaixo das janelas (30) */
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-sm);
}

/* Celular: volta para o fim da página (o rodapé fixo é dos botões Voltar/Próximo). */
@media (max-width: 640px) {
  .site-footer {
    position: static;
    margin-top: 18px;
    padding: 12px 0 8px;
    border: 0;
    background: none;
    box-shadow: none;
  }
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--text);
}

.privacy-inline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.privacy-inline .link-button {
  font-size: inherit;
}

.contact-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-privacy svg {
  flex: none;
  color: var(--gold);
}

.contact-privacy .link-button {
  color: var(--primary-hover);
  text-decoration: underline;
}

.contact-privacy .link-button {
  font-size: inherit;
}

/* Aviso de Privacidade (ADR-049): cabeçalho e rodapé fixos, só o texto rola.
   Letra maior e espaçamento generoso — parte do público tem mais idade. */
.privacy-body {
  will-change: scroll-position;
}

.confirmation-modal.privacy-modal {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(90vh, 920px);
  padding: 0;
  overflow: hidden;
}

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

.privacy-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold);
}

.privacy-heading {
  flex: 1;
  min-width: 0;
}

.privacy-heading .modal-kicker {
  margin-bottom: 2px;
  letter-spacing: 0.04em;
}

.privacy-modal .privacy-heading h3 {
  margin: 0;
}

.privacy-modal .privacy-header .modal-close-button {
  position: static;
  flex: none;
}

.privacy-body {
  flex: 1;
  min-height: 0;
  padding: 20px 22px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.privacy-body:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.privacy-body p,
.privacy-body ul,
.privacy-body dl {
  margin: 0;
}

.privacy-body a {
  color: var(--primary-hover);
}

.privacy-summary {
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--gold) 8%, var(--surface-2));
  color: var(--text);
}

.privacy-summary-title {
  margin-bottom: 8px !important;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.privacy-highlights {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.privacy-highlights li {
  position: relative;
  padding-left: 28px;
}

.privacy-highlights li::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Seções numeradas: facilita localizar e citar ("item 5"). */
.privacy-sections {
  display: grid;
  gap: 4px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: privacy;
}

.privacy-sections > li {
  display: grid;
  gap: 8px;
  padding: 16px 0 16px 44px;
  border-top: 1px solid var(--border);
  counter-increment: privacy;
  position: relative;
}

.privacy-sections > li:first-child {
  border-top: 0;
}

.privacy-sections > li::before {
  content: counter(privacy);
  position: absolute;
  top: 15px;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-hover);
  font-size: 0.85rem;
  font-weight: 800;
}

.privacy-sections h4 {
  margin: 0;
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.4;
}

.privacy-sections ul {
  display: grid;
  gap: 6px;
  padding-left: 20px;
}

.privacy-sections ul li::marker {
  color: var(--gold);
}

.privacy-note {
  font-size: 0.92rem;
}

.privacy-retention {
  display: grid;
  gap: 8px;
}

.privacy-retention > div {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.privacy-retention dt {
  color: var(--text);
  font-weight: 700;
}

.privacy-retention dd {
  margin: 2px 0 0;
}

.privacy-contact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 0;
}

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

.privacy-version {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.privacy-footer .primary-button {
  min-width: 140px;
}

/* Celular: a janela ocupa a tela inteira, com o botão "Entendi" largo no rodapé. */
@media (max-width: 640px) {
  #privacyModal {
    padding: 0;
  }

  .confirmation-modal.privacy-modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .privacy-header {
    padding: 14px 16px 12px;
  }

  .privacy-badge {
    width: 38px;
    height: 38px;
  }

  .privacy-body {
    padding: 16px 16px 8px;
  }

  .privacy-sections > li {
    padding-left: 38px;
  }

  .privacy-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    text-align: center;
  }

  .privacy-footer .primary-button {
    width: 100%;
  }
}

.modal-backdrop[hidden] {
  display: none;
}

.contact-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.contact-option {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-option:hover {
  border-color: var(--primary);
}

.contact-option span {
  color: var(--muted);
}

/* Janela de Contato: ícone, título e cartões grandes, fáceis de tocar. */
.contact-modal {
  width: min(500px, 100%);
}

.contact-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold);
}

.contact-modal .modal-copy {
  margin: 0;
}

.contact-modal .contact-options {
  margin-top: 20px;
}

.contact-modal .contact-option {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
}

.contact-modal .contact-option:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.contact-modal .contact-option:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.contact-option-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff !important;
}

.contact-option-whatsapp .contact-option-icon {
  background: #1f9d55;
}

.contact-option-email .contact-option-icon {
  background: var(--primary);
}

.contact-option-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-option-text strong {
  font-size: 1.02rem;
}

.contact-option-text span {
  overflow-wrap: anywhere;
}

.contact-option-arrow {
  font-size: 1.6rem;
  line-height: 1;
}

.contact-modal .contact-option:hover .contact-option-arrow {
  color: var(--text);
}

#themeIcon {
  display: inline-block;
  position: relative;
  width: 19px;
  height: 19px;
  font-size: 0;
}

#themeIcon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 220ms var(--ease);
}

:root[data-theme="light"] #themeIcon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E") center / contain no-repeat;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(180deg);
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.progress-panel,
.form-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.progress-panel {
  position: sticky;
  top: 24px;
  padding: 22px;
}

.progress-ring {
  display: grid;
  width: 116px;
  height: 116px;
  margin: 2px auto 22px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--progress, 0%), var(--surface-2) 0);
  box-shadow: var(--shadow-sm);
  transition: --progress 560ms var(--ease);
}

.progress-ring span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 1.08rem;
  box-shadow: inset 0 0 0 1px var(--border);
}

.step-list {
  display: grid;
  position: relative;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list::before {
  content: "";
  position: absolute;
  top: 21px;
  bottom: 21px;
  left: 13px;
  width: 1px;
  background: var(--border);
}

.step-list li {
  position: relative;
  min-height: 42px;
}

.step-button {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  text-align: left;
  transition: color 160ms var(--ease);
}

.step-list li.is-available .step-button {
  cursor: pointer;
}

.step-list li.is-available .step-button:hover {
  color: var(--text);
}

.step-list li.is-available .step-button:hover .step-index {
  border-color: var(--border-strong);
}

.step-list li.is-locked .step-button {
  cursor: not-allowed;
  opacity: 0.72;
}

.step-index {
  display: grid;
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
}

.step-list li.is-active .step-button {
  color: var(--text);
}

.step-list li.is-active .step-index {
  border-color: var(--primary);
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step-list li.is-complete .step-index {
  border-color: var(--primary);
  background: var(--primary);
  color: transparent;
}

.step-list li.is-complete .step-index::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #ffffff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 55% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 55% no-repeat;
}

.form-panel {
  position: relative;
  min-height: 670px;
  overflow: hidden;
  padding: clamp(22px, 4vw, 42px);
}

.form-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

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

.mobile-progress {
  display: none;
  margin-bottom: 22px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-gradient);
  transition: width 320ms var(--ease);
}

#mobileStepText {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.step-header {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  animation: stepFadeIn 380ms var(--ease);
}

.step-header h2 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: 0;
}

.step-header p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.legal-text,
.contract-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.legal-text::-webkit-scrollbar,
.contract-scroll::-webkit-scrollbar {
  width: 9px;
}

.legal-text::-webkit-scrollbar-track,
.contract-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.legal-text::-webkit-scrollbar-thumb,
.contract-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background-color: var(--border-strong);
  background-clip: content-box;
  border: 2px solid transparent;
}

.legal-text {
  display: grid;
  gap: 14px;
  max-height: 350px;
  margin: 22px 0;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  line-height: 1.62;
}

.legal-text p {
  margin: 0;
  text-align: justify;
}

.compact-text {
  max-height: none;
}

.welcome-guide {
  display: grid;
  gap: 12px;
  max-width: none;
  color: var(--text);
  line-height: 1.62;
}

.welcome-guide p,
.welcome-guide ul {
  margin: 0;
}

.welcome-guide ul {
  display: grid;
  gap: 4px;
  padding-left: 22px;
}

.welcome-guide li::marker {
  color: var(--gold);
}

.welcome-closing {
  color: var(--gold);
  font-weight: 750;
}

.combobox {
  position: relative;
}

.combobox input {
  width: 100%;
}

.combobox-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  margin: 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.combobox-list[hidden] {
  display: none;
}

.combobox-option,
.combobox-empty {
  padding: 9px 12px;
  border-radius: 8px;
  line-height: 1.35;
}

.combobox-option {
  color: var(--text);
  cursor: pointer;
}

.combobox-option:hover,
.combobox-option.is-active {
  background: var(--primary-light);
}

.combobox-option[aria-selected="true"] {
  font-weight: 750;
}

.combobox-option.is-other {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  color: var(--gold);
}

.combobox-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.combobox-other {
  margin-top: 4px;
}

.attention-note {
  max-width: 780px;
  margin: 0 0 22px;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  color: var(--text);
  line-height: 1.55;
}

.attention-note strong {
  color: var(--gold);
}

/* Página de retorno da DocuSign: sem barra de etapas nem botões do formulário. */
.upload-link-mode .layout {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

.upload-link-mode .form-panel {
  min-height: auto;
}

.upload-link-mode .progress-panel,
.upload-link-mode .mobile-progress,
.upload-link-mode #formActions,
.upload-link-mode .dev-tools {
  display: none !important;
}

.upload-unavailable .signature-step-index {
  background: #c04a4a;
}

.shortcut-card {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.shortcut-card strong {
  color: var(--text);
  font-size: 1.02rem;
}

.shortcut-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.shortcut-button {
  flex-shrink: 0;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 1rem;
}

@media (max-width: 720px) {
  .shortcut-card {
    flex-direction: column;
    align-items: stretch;
  }

  .shortcut-button {
    width: 100%;
  }
}

.flow-opening h3,
.flow-opening h4,
.flow-opening ol,
.flow-opening ul {
  margin: 0;
}

.flow-opening ul {
  display: grid;
  gap: 6px;
  padding-left: 22px;
}

.flow-opening ul li::marker {
  color: var(--gold);
}

.flow-opening .attention-note {
  margin: 0;
}

.flow-opening h3 {
  color: var(--gold);
  font-size: 1.08rem;
}

.flow-opening h4 {
  margin-top: 4px;
  color: var(--text);
  font-size: 0.98rem;
}

.flow-opening ol {
  display: grid;
  gap: 6px;
  padding-left: 22px;
}

.flow-opening li::marker {
  color: var(--gold);
  font-weight: 750;
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  grid-template-rows: auto minmax(20px, auto) auto auto;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.choice-title,
.checkbox-field span {
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}

.field-description {
  display: block;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.field-description.is-empty {
  visibility: hidden;
}

.selected-file {
  color: var(--success);
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 16px;
}

.prescriber-upload-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.legal-documents-upload-grid {
  grid-template-columns: repeat(2, minmax(250px, 1fr));
}

.section-divider {
  display: grid;
  gap: 5px;
  margin: 28px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

.section-divider h3,
.section-divider p {
  margin: 0;
}

.section-divider h3 {
  color: var(--text);
  font-size: 1.04rem;
}

.section-divider p {
  color: var(--muted);
  line-height: 1.45;
}

.compact-divider {
  margin: 4px 0 0;
}

.upload-card {
  display: grid;
  grid-template-rows: minmax(104px, auto) minmax(210px, 1fr) auto 20px;
  gap: 13px;
  min-height: 392px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease);
}

.upload-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.upload-card.is-dragging {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-light);
  transform: translateY(-2px);
}

.upload-card.has-file {
  border-color: color-mix(in srgb, var(--success) 70%, var(--border));
}

.upload-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.upload-card-header h3,
.upload-card-header p {
  margin: 0;
}

.upload-card-header h3 {
  font-size: 1rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.upload-card-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.38;
}

.upload-state {
  align-self: flex-start;
  min-width: max-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.upload-card.has-file .upload-state {
  border-color: color-mix(in srgb, var(--success) 60%, var(--border));
  color: var(--success);
}

.upload-dropzone {
  display: grid;
  position: relative;
  min-height: 210px;
  place-items: center;
  gap: 8px;
  overflow: hidden;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.upload-card:hover .upload-dropzone {
  border-color: var(--primary);
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  position: relative;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: transparent;
  font-weight: 900;
  font-size: 0;
  transition: transform 160ms var(--ease);
}

.upload-card:hover .upload-icon {
  transform: translateY(-2px);
}

.upload-icon::before,
.upload-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--primary);
  border-radius: 2px;
  transform: translate(-50%, -50%);
}

.upload-icon::before {
  width: 2px;
  height: 18px;
}

.upload-icon::after {
  width: 18px;
  height: 2px;
}

.upload-main {
  color: var(--text);
  font-weight: 800;
}

.upload-help {
  color: var(--muted);
  font-size: 0.82rem;
}

.file-preview {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 190px;
  place-items: center;
}

.file-preview-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 6px;
  background: #050b12;
}

.file-preview-document {
  gap: 8px;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  padding: 11px 13px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--border-strong);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.field input[type="file"] {
  padding: 9px;
}

.field-action,
.attention-button {
  width: fit-content;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--gold) 78%, #ffffff);
  border-radius: var(--radius-md);
  background: var(--gold);
  color: var(--gold-ink);
  padding: 10px 16px;
  font-size: 0.94rem;
  font-weight: 850;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--gold) 16%, transparent);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.field-action:hover,
.attention-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--gold) 78%, #ffffff);
  background: var(--gold);
  filter: brightness(1.025);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--gold) 22%, transparent);
  transform: translateY(-1px);
}

.field-action:focus-visible,
.attention-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 46%, transparent);
  outline-offset: 3px;
}

:root[data-theme="light"] .field-action,
:root[data-theme="light"] .attention-button {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(21, 71, 123, 0.16);
}

:root[data-theme="light"] .field-action:hover,
:root[data-theme="light"] .attention-button:hover:not(:disabled) {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  box-shadow: 0 8px 20px rgba(21, 71, 123, 0.22);
}

.inline-action {
  margin-bottom: 18px;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-row {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-text {
  min-height: 18px;
  color: var(--danger);
  font-size: 0.82rem;
}

.field.has-error input {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent);
}

.upload-card.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent);
}

.choice-group {
  display: grid;
  gap: 12px;
}

.choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice-card {
  display: grid;
  position: relative;
  gap: 8px;
  min-height: 118px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease);
}

.choice-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.choice-card:has(input:checked)::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}

.choice-card:has(input:checked)::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 60% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 60% no-repeat;
}

.choice-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.choice-card strong {
  color: var(--text);
  font-size: 1.02rem;
}

.choice-card span {
  color: var(--muted);
  line-height: 1.45;
}

.checkbox-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  color: var(--text);
}

.checkbox-field.long-text span {
  font-weight: 400;
  line-height: 1.55;
}

.checkbox-field.compact {
  margin-top: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.checkbox-field input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.representatives-area {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.representative-block {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.block-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.fixed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 70%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 750;
  border-radius: 6px;
}

.text-button:hover {
  text-decoration: underline;
}

.text-button.neutral {
  color: var(--primary-hover);
}

.add-button {
  width: fit-content;
  min-height: 40px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text);
  padding: 9px 13px;
  font-weight: 750;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
}

.add-button:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-hover);
}

.status-box {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--muted);
}

.status-box strong {
  color: var(--text);
}

.legal-data-token {
  color: var(--gold);
  font-weight: 850;
}

.review-before-confirmations {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.review-grid {
  display: grid;
  gap: 16px;
}

.review-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.review-section dl {
  display: grid;
  grid-template-columns: minmax(130px, 0.38fr) minmax(0, 1fr);
  gap: 9px 14px;
  margin: 0;
}

.review-section dt {
  color: var(--muted);
  font-weight: 750;
}

.review-section dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.review-section h4 {
  margin: 6px 0 0;
  color: var(--gold);
  font-size: 0.92rem;
}

.mini-button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.86rem;
}

.confirmation-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.confirmation-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.confirmation-item {
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.confirmation-item:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.confirmation-item input {
  width: 19px;
  height: 19px;
  margin-top: 3px;
  accent-color: var(--primary);
}

.confirmation-item span {
  display: grid;
  gap: 5px;
  color: var(--muted);
  line-height: 1.5;
}

.confirmation-item strong {
  color: var(--text);
}

.confirmation-item .paragraph-text {
  text-align: justify;
}

.paragraph-text {
  display: grid;
  gap: 10px;
}

.contract-panel {
  display: grid;
  gap: 18px;
}

.contract-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.contract-summary h3,
.contract-summary p {
  margin: 0;
}

.contract-summary p {
  margin-top: 6px;
  color: var(--muted);
}

.contract-badge {
  min-width: max-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 11px;
  font-size: 0.86rem;
  font-weight: 800;
}

.contract-reader-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.contract-reader-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.contract-scroll {
  display: grid;
  gap: 18px;
  max-height: min(72vh, 760px);
  overflow: auto;
  padding: clamp(14px, 2vw, 24px);
}

/* A página do contrato imita papel nos dois temas: os tokens são redefinidos
   aqui para que o conteúdo interno use cores de documento impresso. */
.contract-page {
  --text: #1c2533;
  --muted: #586273;
  --gold: #8a5d08;
  --border: #dde2ea;
  --border-strong: #c3cbd7;
  --surface: #ffffff;
  --surface-2: #f4f6f9;
  --primary: #15477b;
  --primary-hover: #0f3a66;
  --primary-light: rgba(21, 71, 123, 0.08);

  width: min(100%, 780px);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid #d4dae3;
  border-radius: 6px;
  background: #fffefb;
  color: var(--text);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  transition: box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}

.contract-page.is-accepted {
  border-color: #6aa37f;
  box-shadow: 0 0 0 2px rgba(46, 125, 80, 0.28), 0 12px 34px rgba(0, 0, 0, 0.22);
}

.contract-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.contract-page-number {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contract-page-status {
  display: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(46, 125, 80, 0.12);
  color: #2e7d50;
  font-size: 0.76rem;
  font-weight: 800;
}

.contract-page.is-accepted .contract-page-status {
  display: inline-block;
}

.contract-instruction {
  margin: 0;
  color: var(--text);
  font-weight: 750;
  line-height: 1.55;
}

.contract-progress {
  display: grid;
  flex-shrink: 0;
  gap: 8px;
  justify-items: stretch;
}

.contract-progress .contract-badge {
  text-align: center;
}

.contract-progress-track {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.contract-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 240ms var(--ease);
}

.contract-page-content {
  display: grid;
  gap: 12px;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.68;
}

.contract-page-content p {
  margin: 0;
  text-align: justify;
}

.contract-list-item {
  position: relative;
  text-align: justify;
  padding-left: 22px;
}

.contract-list-item::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--gold);
}

/* Parágrafo partido entre duas páginas do contrato (ADR-033). */
.contract-continues {
  text-align-last: justify;
}

.contract-list-item.is-continued::before {
  content: none;
}

.contract-list-level-1 {
  padding-left: 42px;
}

.contract-list-level-1::before {
  content: "–";
  left: 24px;
}

.contract-list-level-2 {
  padding-left: 62px;
}

.contract-list-level-2::before {
  content: "◦";
  left: 44px;
}

.contract-subitem {
  color: var(--text);
}

.contract-fill {
  color: var(--gold);
}

.contract-underline {
  color: var(--primary-hover);
  text-decoration: underline;
}

.contract-example-box {
  display: grid;
  gap: 6px;
  margin: 4px 0;
  padding: 16px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.94rem;
}

.contract-example-box p {
  margin: 0;
}

.contract-field-list {
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 4px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
}

.contract-field-list dt {
  color: var(--muted);
  font-weight: 700;
}

.contract-field-list dd {
  margin: 0;
  color: var(--text);
}

.contract-signature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin: 32px 0 14px;
}

.contract-signature-col {
  display: grid;
  gap: 5px;
  justify-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--muted);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.contract-signature-col strong {
  color: var(--text);
  font-size: 0.96rem;
}

.contract-party-signature {
  display: grid;
  gap: 6px;
  width: min(100%, 360px);
  margin: 44px auto;
  padding-top: 16px;
  border-top: 1px solid var(--muted);
  justify-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.contract-party-signature strong {
  color: var(--text);
  font-size: 0.98rem;
}

.contract-checkpoint {
  margin-top: 28px;
  background: var(--surface-2);
}

.contract-checkpoint.is-locked {
  opacity: 0.7;
}

.contract-checkpoint.is-locked input {
  cursor: not-allowed;
}

.contract-checkpoint.is-unlocked {
  border-color: var(--primary);
}

.signature-flow,
.signature-success-panel {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.signature-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.signature-card-strong {
  border-color: var(--border-strong);
  background: var(--surface);
}

.signature-later-card {
  border-left: 3px solid var(--gold);
}

.signature-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}

.signature-card h3,
.signature-card p {
  margin: 0;
}

.signature-card h3 {
  margin-bottom: 8px;
  color: var(--text);
}

.signature-card h3.success-title {
  color: var(--success);
}

.signature-card p {
  color: var(--muted);
  line-height: 1.55;
}

.protocol-highlight {
  color: var(--gold);
  overflow-wrap: anywhere;
}

.signature-card p + p,
.signature-card .field,
.signature-card button,
.signature-card a {
  margin-top: 12px;
}

.signature-note {
  color: var(--gold) !important;
  font-weight: 750;
}

.signature-upload-field {
  max-width: 520px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  /* Sem backdrop-filter: o desfoque é redesenhado a cada scroll e deixa a página pesada. */
  background: color-mix(in srgb, #020b14 82%, transparent);
}

.confirmation-modal {
  position: relative;
  width: min(560px, 100%);
  padding: 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.modal-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.modal-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.confirmation-modal h3 {
  margin: 0 44px 14px 0;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.modal-copy {
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-copy p {
  margin: 0;
}

.modal-email {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--gold);
  font-size: 1.04rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.link-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.local-actions {
  align-items: center;
  margin-top: 0;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.step-feedback {
  min-height: 22px;
  margin: 24px 0 0;
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 750;
}

.step-feedback:empty {
  display: none;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: var(--radius-md);
  padding: 11px 18px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--primary);
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.primary-button:hover:not(:disabled) {
  border-color: var(--primary-hover);
  filter: brightness(1.06);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.98);
}

.primary-button.attention-button {
  border-color: color-mix(in srgb, var(--gold) 78%, #ffffff);
  background: var(--gold);
  color: var(--gold-ink);
}

.primary-button.attention-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--gold) 78%, #ffffff);
  background: var(--gold);
}

:root[data-theme="light"] .primary-button.attention-button {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

:root[data-theme="light"] .primary-button.attention-button:hover:not(:disabled) {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.is-hidden {
  display: none !important;
}

.submit-feedback {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .app-shell {
    width: min(100% - 24px, 720px);
    padding: 18px 0;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .progress-panel {
    display: none;
  }

  .form-panel {
    min-height: auto;
  }

  .mobile-progress {
    display: block;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-group {
    gap: 10px;
  }

  .brand-logo {
    width: 76px;
    height: 44px;
  }

  .brand-group > div {
    padding-left: 10px;
    transform: none;
  }

  .fields-grid,
  .choice-options,
  .checkbox-grid,
  .review-section dl {
    grid-template-columns: 1fr;
  }

  .file-row,
  .block-heading,
  .contract-summary,
  .contract-reader-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .contract-scroll {
    max-height: 70vh;
    padding: 12px;
  }

  .contract-page {
    min-height: 680px;
    padding: 22px;
  }

  .contract-page-content {
    font-size: 0.92rem;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

/* Pergunta Sim/Não (ex.: especialização registrada no conselho). */
.yes-no-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.yes-no-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  border-radius: 10px;
  cursor: pointer;
}

.yes-no-option:has(input:checked) {
  border-color: var(--accent, #d9b77c);
}

/* Tipo de assinatura (ADR-048): uma opção por linha, com explicação. */
.signature-method-section {
  margin-top: 18px;
}

.signature-method-group {
  display: grid;
  gap: 10px;
}

.signature-method-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  border-radius: 10px;
  cursor: pointer;
}

/* Sem o estilo de caixa de texto dos campos (.field input). */
.field .signature-method-option input {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 3px 0 0;
  padding: 0;
  box-shadow: none;
  accent-color: var(--primary);
}

.signature-method-option span {
  display: grid;
  gap: 3px;
}

.signature-method-option small {
  color: var(--muted, #9aa8bd);
  font-size: 0.9rem;
  line-height: 1.4;
}

.signature-method-option:has(input:checked) {
  border-color: var(--accent, #d9b77c);
}

/* Etapa de assinatura pela DocuSign. */
.signing-intro {
  margin: 18px 0 16px;
  font-weight: 600;
}

.signing-next-steps {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

/* Tela de carregamento ao gerar o cadastro e ao abrir a assinatura. */
.busy-overlay {
  z-index: 60;
}

.busy-card {
  width: min(440px, 100%);
  text-align: center;
}

.busy-card h3 {
  margin: 14px 0 12px;
}

.busy-spinner {
  display: inline-block;
  width: 46px;
  height: 46px;
  border: 4px solid var(--primary-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: busy-spin 0.9s linear infinite;
}

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

.busy-steps {
  display: grid;
  gap: 8px;
  margin: 0 auto;
  padding: 0;
  max-width: 320px;
  list-style: none;
  text-align: left;
}

.busy-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.busy-steps li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
}

.busy-steps li.is-active {
  color: var(--text);
  font-weight: 700;
}

.busy-steps li.is-active::before {
  border-color: var(--gold);
  background: var(--gold);
}

.busy-steps li.is-done::before {
  border-color: var(--success);
  background: var(--success);
}

.busy-hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  .busy-spinner {
    animation-duration: 2.5s;
  }
}

/* Link de correção (ADR-021): aviso da equipe no topo e campos travados. */
.correction-banner {
  display: grid;
  gap: 8px;
  max-width: 860px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--border));
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  color: var(--text);
  line-height: 1.55;
}

.correction-banner strong {
  color: var(--gold);
  font-size: 1.05rem;
}

.correction-banner p {
  margin: 0;
}

.correction-banner p > span {
  font-weight: 700;
}

.correction-chip {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--border));
  border-radius: 999px;
  background: var(--surface);
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
}

.is-correction-locked {
  opacity: 0.62;
}

.is-correction-locked input:disabled,
.is-correction-locked label {
  cursor: not-allowed;
}

.upload-card.is-correction-requested {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 35%, transparent);
}

.correction-status {
  max-width: 640px;
}

/* Link por consultor sem código válido (ADR-044): imagem de contato dos e-mails. */
.consultant-contact {
  display: block;
  width: 440px;
  max-width: 100%;
  height: auto;
  margin-top: 6px;
  border-radius: var(--radius-md);
}

.is-correction-locked input:disabled:not([type="radio"]):not([type="checkbox"]) {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------------------
   Celular (plano de 28/10/2026). O computador continua igual.
   --------------------------------------------------------------------------------------- */

/* "Etapa X de Y" abre a lista de etapas (a lateral some abaixo de 880 px). */
/* Telas só de aviso (link de correção, link sem consultor): sem etapas para mostrar. */
.mobile-step-toggle[hidden] {
  display: none;
}

.mobile-step-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mobile-step-toggle #mobileStepText {
  margin-top: 0;
}

.mobile-step-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-hover);
  font-size: 0.88rem;
  font-weight: 750;
  white-space: nowrap;
}

.mobile-step-hint::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms var(--ease);
}

.mobile-step-toggle.is-open .mobile-step-hint::after {
  transform: translateY(2px) rotate(-135deg);
}

.mobile-step-list {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.mobile-step-list[hidden] {
  display: none;
}

/* Aviso da etapa com botão para ir à etapa que precisa de revisão. */
.step-feedback-action {
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-hover);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 640px) {
  /* Título numa linha só. */
  .topbar h1 {
    font-size: 1.2rem;
    white-space: nowrap;
  }

  /* Barra fixa no rodapé com o aviso e os botões. "overflow: clip" (em vez de hidden) no painel
     para o sticky funcionar. */
  .form-panel {
    overflow: clip;
  }

  .form-footer {
    position: sticky;
    bottom: 0;
    z-index: 20;
    /* Encosta nas bordas do painel (mesmo padding de .form-panel). */
    margin: 24px calc(-1 * clamp(22px, 4vw, 42px)) calc(-1 * clamp(22px, 4vw, 42px));
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 98%, transparent);
  }

  /* Digitando: a barra volta para o fim do formulário (não cobre o campo, a lista de sugestões
     nem o preenchimento automático do teclado). */
  body.is-typing .form-footer {
    position: static;
  }

  .combobox-list {
    z-index: 30;
  }

  .form-footer .step-feedback {
    margin: 0 0 10px;
  }

  .form-footer .form-actions {
    flex-direction: row;
    margin-top: 0;
  }

  /* Contrato e assinatura têm botões próprios: sem aviso, a barra some. */
  .form-footer:has(.form-actions.is-hidden):has(.step-feedback:empty) {
    display: none;
  }

  .form-footer .form-actions .secondary-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 96px;
  }

  .form-footer .form-actions .primary-button {
    flex: 1 1 auto;
    width: auto;
  }

  .form-actions.is-first-step #backButton {
    display: none;
  }

  /* Caixas de aceite: check e título lado a lado; o texto passa por baixo com a largura toda. */
  .confirmation-item > span {
    display: contents;
  }

  .confirmation-item > span > strong {
    grid-column: 2;
    align-self: center;
  }

  .confirmation-item > span > :not(strong) {
    grid-column: 1 / -1;
    color: var(--muted);
  }

  /* Texto alinhado à esquerda: justificado em coluna estreita abre buracos entre as palavras. */
  .legal-text p,
  .confirmation-item .paragraph-text,
  .contract-page-content p,
  .contract-list-item {
    text-align: left;
  }

  .contract-continues {
    text-align-last: auto;
  }

  /* Lista de campos do contrato (prescritor, CRM...): rótulo em cima, valor embaixo. */
  .contract-field-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 12px 14px;
  }

  .contract-field-list dd + dt {
    margin-top: 10px;
  }

  /* A folha do contrato não pode ficar mais larga que a tela: e-mail ou endereço longo (uma
     palavra só) segurava a largura e cortava o lado direito de todo o texto em 360 px. */
  .contract-scroll {
    padding: 8px;
  }

  .contract-page {
    min-width: 0;
    padding: 14px;
  }

  .contract-page-content {
    overflow-wrap: anywhere;
  }
}

/* Celulares estreitos (360 px ou menos): fonte do contrato um pouco menor. */
@media (max-width: 360px) {
  .contract-page-content {
    font-size: 0.88rem;
  }
}

@media (max-width: 380px) {
  .brand-logo {
    width: 64px;
    height: 38px;
  }

  .topbar h1 {
    font-size: 1.08rem;
  }
}

/* Blocos recolhíveis (termos dos prescritores, revisão): só o celular mostra o "abrir/fechar". */
.mobile-collapsible > summary {
  display: none;
}

@media (max-width: 640px) {
  .mobile-collapsible > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--primary-hover);
    font-weight: 750;
    list-style: none;
    cursor: pointer;
  }

  .mobile-collapsible > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-collapsible > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 160ms var(--ease);
  }

  .mobile-collapsible[open] > summary {
    margin-bottom: 12px;
  }

  .mobile-collapsible[open] > summary::after {
    transform: translateY(2px) rotate(-135deg);
  }

  /* Selo "Selecionado/Pendente" numa linha própria, acima do título: ao lado, espremia o título
     (uma palavra por linha dentro do cartão do prescritor). */
  .upload-card-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .upload-card-header .upload-state {
    order: -1;
    justify-self: start;
  }

  /* Prévia dos documentos menor (antes ~530 px por cartão): sem as alturas mínimas do desktop. */
  .upload-card {
    grid-template-rows: auto;
    min-height: 0;
  }

  .upload-dropzone {
    min-height: 120px;
  }

  .upload-card.has-file .upload-dropzone {
    min-height: 0;
    padding: 8px;
  }

  .file-preview {
    min-height: 0;
  }

  .file-preview-image {
    height: 110px;
  }

  .file-preview-document {
    padding: 12px 0;
  }

  /* Revisão: "Editar" pequeno ao lado do título da seção. */
  .review-section > .block-heading:has(.mini-button) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .review-section > .block-heading .mini-button {
    flex: none;
    width: auto;
    min-height: 38px;
    padding: 8px 14px;
  }

  /* Opção escolhida: só a bolinha marcada (sem o ✓ repetido no canto). */
  .choice-card:has(input:checked)::before,
  .choice-card:has(input:checked)::after {
    content: none;
  }

  .choice-card {
    min-height: 0;
  }
}

/* reCAPTCHA v3 no CELULAR: o selo flutuante fica escondido (cobria a barra Voltar/Próximo) e o
   aviso exigido pelo Google aparece em texto no fim de cada etapa. No computador, o selo continua
   e o aviso em texto não aparece. "visibility", não "display": esconder o selo com display
   quebra o reCAPTCHA. */
.recaptcha-notice {
  display: none;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.recaptcha-notice a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .grecaptcha-badge {
    visibility: hidden;
  }

  .recaptcha-notice {
    display: block;
  }
}

.upload-link-mode .recaptcha-notice {
  display: none;
}

/* =====================================================================
   Revisão de UI/UX (09/11/2026) — mesmo padrão das janelas de Contato e
   Aviso de Privacidade: camadas (resumo + detalhe), ícones, avisos com
   tipo claro e letra maior para o público de mais idade.
   ===================================================================== */

/* Cartões de escolha com ícone (CPF / CNPJ). */
.choice-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary-hover);
}

.choice-card.has-icon input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card.has-icon:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.choice-card:has(input:checked) .choice-icon {
  background: var(--primary);
  color: #ffffff;
}

/* Texto diferente para computador e celular. */
.only-mobile {
  display: none;
}

/* Envio de documentos: estado claro e letra maior. */
.upload-state {
  border-color: color-mix(in srgb, var(--gold) 50%, var(--border));
  color: var(--gold);
  text-transform: none;
  font-size: 0.78rem;
}

.upload-card-header p,
.field-description {
  font-size: 0.94rem;
}

.upload-help {
  font-size: 0.88rem;
}

/* Assinatura: ícones no lugar de números (as opções não são passos em sequência). */
.signature-step-index {
  width: 42px;
  height: 42px;
}

.signature-step-index svg {
  display: block;
}

.signature-step-index.is-secondary {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.signature-step-index.is-success {
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
}

.signature-card-strong {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.signature-tag {
  display: inline-block;
  margin: 0 0 6px !important;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold) !important;
  font-size: 0.76rem;
  font-weight: 800;
}

.signature-card-strong .primary-button {
  min-width: 200px;
}

/* Janela de conferência final: mesmo padrão da janela de Contato. */
.final-review-modal {
  width: min(540px, 100%);
}

.final-review-modal .modal-actions .primary-button,
.final-review-modal .modal-actions .secondary-button {
  min-height: 48px;
}

/* Avisos com tipo claro: atenção (dourado) e informação (azul), sempre com ícone. */
.attention-note {
  position: relative;
  padding-left: 46px;
}

.attention-note::before {
  content: "!";
  position: absolute;
  top: 13px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
}

.status-box {
  position: relative;
  padding-left: 48px;
  border-left-color: var(--primary);
}

.status-box::before {
  content: "i";
  position: absolute;
  top: 17px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

/* Tamanho da letra do contrato e dos termos (A− / A+). */
.contract-reader-toolbar {
  align-items: center;
}

.reading-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}

.reading-size {
  display: inline-flex;
  flex: none;
  gap: 6px;
}

.reading-size-button {
  min-width: 44px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.reading-size-button:hover:not(:disabled) {
  border-color: var(--primary);
}

.reading-size-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.contract-page-content {
  font-size: calc(0.98rem * var(--reading-scale, 1));
}

.legal-text {
  font-size: calc(1rem * var(--reading-scale, 1));
}

/* Revisão: versão dos termos discreta no fim. */
.terms-version {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Legenda dos campos obrigatórios. */
.step-header .required-legend {
  margin-top: 8px;
  font-size: 0.88rem;
}

.required-legend span {
  color: var(--gold);
  font-weight: 900;
}

@media (max-width: 640px) {
  .only-desktop {
    display: none;
  }

  .only-mobile {
    display: inline;
  }

  /* Uma coluna só: o espaço reservado para alinhar descrições não é necessário. */
  .field-description.is-empty {
    display: none;
  }

  .upload-card {
    grid-template-rows: auto minmax(150px, 1fr) auto auto;
    min-height: 0;
  }

  .upload-dropzone {
    min-height: 150px;
  }

  .signature-card-strong .primary-button {
    width: 100%;
  }
}
