.vsm-proposal-wizard {
  --vsm-navy: #0b3c5d;
  --vsm-teal: #1fa2a6;
  --vsm-bg: #eef3fb;
  --vsm-border: #cad7ea;
  --vsm-danger: #d63638;
  position: relative;
  max-width: 1200px;
  margin: 24px auto;
  background: var(--vsm-bg);
  border: 1px solid var(--vsm-border);
  border-radius: 22px;
  padding: 24px;
  color: var(--vsm-navy);
  box-sizing: border-box;
}

.vsm-proposal-wizard * {
  transition: all 0.25s ease;
}

.vsm-proposal-header {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--vsm-bg);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.vsm-breadcrumb {
  display: none !important;
}

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

.vsm-step-current {
  display: none !important;
}

.vsm-progress {
  display: none !important;
}

.vsm-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1fa2a6 0%, #0b7f84 100%);
  transition: width .2s ease;
}

.vsm-proposal-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  color: var(--vsm-navy);
}

.vsm-status-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #a9c7e2;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
}

.vsm-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.vsm-step {
  border-radius: 999px;
  border: 0;
  background: transparent;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.vsm-step-index {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #a8bdd9;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  background: #dce6f4;
}

.vsm-step-label {
  display: none;
}

.vsm-step.is-active {
  box-shadow: none;
}

.vsm-step.is-active .vsm-step-index {
  background: var(--vsm-teal);
  border-color: var(--vsm-teal);
}

.vsm-step.is-done .vsm-step-index {
  background: var(--vsm-teal);
  border-color: var(--vsm-teal);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.vsm-proposal-wizard.is-busy .vsm-steps {
  pointer-events: none;
}

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

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

.vsm-sidebar {
  display: none;
  min-width: 0;
}

.vsm-proposal-wizard.is-step-finalizacao .vsm-grid {
  grid-template-columns: minmax(0, 1fr);
}

.vsm-proposal-wizard.is-step-finalizacao .vsm-sidebar {
  display: none;
}

.vsm-summary {
  position: sticky;
  top: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  border: 1px solid var(--vsm-border);
  border-left: 4px solid var(--vsm-teal);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(11, 60, 93, 0.1);
}

.vsm-summary-helper h3 {
  margin: 0 0 8px;
}

.vsm-summary-helper p {
  margin: 0;
  color: #5f7da3;
  font-size: 14px;
}

.vsm-summary h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.vsm-summary-main {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 4px;
}

.vsm-summary-main small {
  display: block;
  font-size: 16px;
  color: #6a84a9;
  font-weight: 500;
}

.vsm-summary-subline {
  margin: 0 0 12px;
  color: #5a7699;
  font-size: 14px;
  font-weight: 600;
}

.vsm-summary-rates {
  font-size: 13px;
  color: #5b7396;
  margin-bottom: 10px;
}

.vsm-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.vsm-summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(96, 125, 163, 0.14);
  padding-bottom: 6px;
}

.vsm-summary-list li span {
  color: #607da3;
  font-size: 13px;
}

.vsm-summary-list li strong {
  font-size: 14px;
}

.vsm-summary-list li strong.vsm-product-value {
  color: #b38a2f;
}

.vsm-participants-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(31, 162, 166, 0.35);
  background: rgba(31, 162, 166, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
  color: #0c666a;
}

.vsm-summary-cta {
  margin-top: 10px;
  display: inline-flex;
  font-weight: 700;
  color: #0f7f84;
  text-decoration: underline;
}

.vsm-resume-link {
  margin-top: 12px;
  font-size: 12px;
  color: #607da3;
}

.vsm-resume-link a {
  color: var(--vsm-teal);
}

.vsm-step-panel {
  background: #fff;
  border: 1px solid var(--vsm-border);
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: 0 8px 24px rgba(11, 60, 93, 0.08);
}

.vsm-step-panel h3 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
}

.vsm-structure-pills,
.vsm-binary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.vsm-segmented-row {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.vsm-segmented-label {
  font-size: 14px;
  font-weight: 600;
}

.vsm-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 40px;
  height: 40px;
  min-height: 0 !important;
  border: 1px solid var(--vsm-border);
  border-radius: 10px;
  overflow: hidden;
  width: min(220px, 100%);
  background: #fff;
}

.vsm-form-grid label .vsm-segmented {
  width: 100%;
  max-width: 220px;
  justify-self: start;
}

.vsm-segment-btn {
  height: 40px;
  padding: 0 !important;
  margin: 0 !important;
  border: 0;
  border-right: 1px solid var(--vsm-border);
  background: #fff;
  color: var(--vsm-navy);
  font-weight: 700;
  cursor: pointer;
  line-height: 40px;
  font-size: 14px;
  overflow: hidden;
}

.vsm-segment-btn:last-child {
  border-right: 0;
}

.vsm-segment-btn:focus {
  outline: none;
}

.vsm-segment-btn:hover {
  background: rgba(11, 60, 93, 0.04);
  color: var(--vsm-navy) !important;
}

.vsm-segment-btn:focus-visible {
  outline: 2px solid rgba(31, 162, 166, 0.7);
  outline-offset: -2px;
}

.vsm-segment-btn.is-active {
  background: rgba(31, 162, 166, 0.12);
  color: #0a5558;
  box-shadow: inset 0 0 0 1px rgba(31, 162, 166, 0.5);
}

.vsm-segment-btn.is-active:hover {
  background: rgba(31, 162, 166, 0.18);
}

.vsm-microcopy {
  margin: 0 0 12px;
  color: #5f7da3;
  font-size: 13px;
}

.vsm-pill {
  border-radius: 999px;
  border: 1px solid var(--vsm-border);
  background: #fff;
  color: var(--vsm-navy);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
}

.vsm-pill:hover {
  background: rgba(11,60,93,.05);
  border-color: var(--vsm-navy);
  color: var(--vsm-navy);
}

.vsm-pill:focus,
.vsm-pill:focus-visible {
  outline: none;
}

.vsm-pill.is-active {
  border-color: var(--vsm-teal);
  background: rgba(31, 162, 166, 0.08);
}

.vsm-pill.is-active:hover {
  background: rgba(31,162,166,.14);
  border-color: var(--vsm-teal);
  color: var(--vsm-navy);
}

.vsm-avalista-toggle {
  margin-bottom: 16px;
}

.vsm-data-block {
  border: 1px solid rgba(96, 125, 163, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: #fbfdff;
}

.vsm-data-block h4 {
  margin: 0 0 14px;
  font-size: 18px;
}

.vsm-block-ok {
  margin-left: 8px;
  font-size: 12px;
  color: var(--vsm-teal);
  font-weight: 700;
}

.vsm-file-field small {
  font-size: 12px;
  color: #607da3;
}

.vsm-fill-modes {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 10px 0 16px;
}

.vsm-fill-mode {
  flex: 1 1 0;
  max-width: 340px;
  min-height: 112px;
  border-radius: 14px;
  border: 1px solid #cbd9eb;
  background: #ffffff;
  color: var(--vsm-navy);
  font-weight: 700;
  text-align: left;
  padding: 14px 14px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(11, 60, 93, 0.06);
  overflow: hidden;
}

.vsm-fill-mode strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
  margin-bottom: 8px;
}

.vsm-fill-mode small {
  display: block;
  color: #6584aa;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}

.vsm-fill-mode .vsm-fill-mode-note {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #8d6a15;
}

.vsm-fill-mode:hover {
  border-color: #4aaeb1;
  background: linear-gradient(180deg, #ffffff 0%, #f3fbfb 100%);
  box-shadow: 0 10px 20px rgba(31, 162, 166, 0.16);
  transform: translateY(-1px);
  color: var(--vsm-navy) !important;
}

.vsm-fill-mode.is-active {
  border: 2px solid var(--vsm-teal);
  background: linear-gradient(180deg, #ffffff 0%, #ebf9f9 100%);
  box-shadow: 0 12px 24px rgba(31, 162, 166, 0.22);
}

.vsm-fill-mode.is-active strong {
  color: #0a5558;
}

.vsm-fill-mode.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f4f7fb;
  box-shadow: none;
  transform: none;
}

.vsm-step-panel-method {
  padding-top: 28px;
}

.vsm-method-intro {
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.45;
}

.valore-upload {
  border: 1px dashed #b8c9df;
  border-radius: 12px;
  padding: 12px;
  background: #f9fcff;
}

.valore-upload:hover {
  border-color: var(--vsm-teal);
  background: rgba(31, 162, 166, 0.06);
}

.valore-upload.has-file {
  border-color: var(--vsm-teal);
  background: rgba(31, 162, 166, 0.1);
}

.valore-upload.is-dragover {
  border-color: #0b7f84;
  background: rgba(31, 162, 166, 0.16);
}

.valore-upload.is-uploading {
  border-color: #b38a2f;
  background: rgba(179, 138, 47, 0.08);
}

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

.valore-upload-dropzone {
  width: 100%;
  min-height: 96px;
  border-radius: 12px;
  border: 1px dashed #bdd0e7;
  background: #fff;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 4px;
  cursor: pointer;
  padding: 12px;
  margin-top: 2px;
}

.valore-upload-dropzone:hover {
  border-color: var(--vsm-teal);
  background: #f5fcfc;
}

.valore-upload-dropzone:focus-visible {
  outline: 2px solid rgba(31, 162, 166, 0.75);
  outline-offset: 1px;
}

.valore-upload-icon {
  font-size: 16px;
  color: #0f7f84;
  line-height: 1;
}

.valore-upload-drop-title {
  font-size: 13px;
  font-weight: 700;
  color: #274a72;
}

.valore-upload-drop-sub {
  font-size: 12px;
  color: #6785aa;
}

.valore-upload-name {
  margin-top: 6px;
  font-size: 12px;
  color: #607da3;
}

.valore-upload-hint {
  display: block;
  color: #5f7da3;
  font-size: 12px;
  margin-top: 2px;
}

.valore-upload-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.valore-upload-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #d7e2f1;
  border-radius: 10px;
  background: #fff;
  padding: 6px 8px;
}

.valore-upload-list li.is-empty {
  grid-template-columns: 1fr;
  color: #6f88ab;
}

.valore-upload-list .file-name {
  font-size: 12px;
  color: #294c74;
  word-break: break-all;
}

.valore-upload-list .file-state {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef4fb;
  color: #3c5f87;
  text-transform: uppercase;
}

.valore-upload-list .file-cat {
  font-size: 11px;
  color: #5f7da3;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f3f7fd;
  border: 1px solid #d7e2f1;
}

.valore-upload-list li.is-pending .file-state {
  background: rgba(179, 138, 47, 0.12);
  color: #8d6a15;
}

.valore-upload-list li.is-uploaded .file-state {
  background: rgba(31, 162, 166, 0.12);
  color: #0a6669;
}

.vsm-badge-ocr {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(31, 162, 166, 0.12);
  border: 1px solid rgba(31, 162, 166, 0.35);
  color: #0b3c5d;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  margin-bottom: 12px;
}

.vsm-form-grid {
  display: grid;
  gap: 2px 16px;
}

.vsm-form-grid + .vsm-form-grid,
.vsm-citizenship-nat-grid + .vsm-form-grid {
  margin-top: 2px;
}

/* Grelha plana para cidadania + nacionalidade: 2 colunas, 2 linhas fixas */
.vsm-citizenship-nat-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto 40px;
  gap: 2px 16px;
}

.vsm-citizenship-nat-grid .vsm-field-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--vsm-navy);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.vsm-citizenship-nat-grid select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--vsm-border);
  background: #fff;
  color: var(--vsm-navy);
  font-size: 14px;
  padding: 0 12px;
  width: 100%;
  cursor: pointer;
  appearance: auto;
}

.vsm-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.vsm-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.vsm-form-grid-essential-name {
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

.vsm-form-grid-essential-contact {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.vsm-form-grid label,
.vsm-form-row label {
  display: grid;
  gap: 2px;
  align-content: start;
}

.vsm-missing-list {
  margin: 6px 0 8px;
  padding-left: 18px;
  display: grid;
  gap: 0;
}
.vsm-missing-list li {
  line-height: 1.4;
  font-size: 13px;
}

.vsm-missing-list .vsm-btn-link {
  font-size: 13px;
  line-height: 1.4;
  padding: 0;
}

.vsm-form-grid label > span,
.vsm-form-row label > span {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--vsm-navy);
  letter-spacing: 0.01em;
}

.vsm-form-grid input,
.vsm-form-grid select,
.vsm-form-row input,
.vsm-form-row select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--vsm-border);
  padding: 0 12px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
}

.vsm-form-grid input::placeholder,
.vsm-form-row input::placeholder {
  color: #a0aec0;
  font-size: 14px;
}

.vsm-form-grid input.is-invalid,
.vsm-form-row input.is-invalid,
.vsm-form-grid select.is-invalid,
.vsm-form-row select.is-invalid {
  border-color: var(--vsm-danger);
  box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.22);
}

/* Campo inválido via wrapper label */
label.is-invalid > input,
label.is-invalid > select,
label.is-invalid > textarea {
  border-color: var(--vsm-danger);
  box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.22);
}
label.is-invalid > span:first-child {
  color: var(--vsm-danger);
}
/* Wrapper-level inline error (backend structured errors) */
[data-path].is-invalid { position: relative; }
[data-path].is-invalid input,
[data-path].is-invalid select,
[data-path].is-invalid textarea {
  border-color: var(--vsm-danger);
  box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.22);
}
.vsm-field-error-tip {
  display: block;
  margin-top: 4px;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  animation: vsmFadeIn .2s ease;
}

/* Nota introdutória da secção de consentimentos */
.vsm-consent-note {
  font-size: 13px;
  color: var(--vsm-muted, #6b7f95);
  margin: 0 0 12px;
}
.vsm-consent-note a {
  color: var(--vsm-teal);
  text-decoration: underline;
}

.vsm-form-grid input.is-ocr,
.vsm-form-row input.is-ocr,
.vsm-form-grid select.is-ocr,
.vsm-form-row select.is-ocr {
  background: #f6fbfa;
  border-color: var(--vsm-teal);
}

.vsm-form-grid input.is-locked,
.vsm-form-row input.is-locked,
.vsm-form-grid select.is-locked,
.vsm-form-row select.is-locked {
  box-shadow: 0 0 0 1px rgba(31, 162, 166, 0.18);
}

.vsm-form-grid select.is-locked,
.vsm-form-row select.is-locked {
  opacity: 0.92;
  cursor: not-allowed;
}

.ocr-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.ocr-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  background: #fff8ea;
  border: 1px solid #c9b27c;
  color: #7a5a0e;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  line-height: 1;
}
/* Calculado/inferido: azul */
.ocr-badge.ocr-badge-inferred {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}
.ocr-badge-inferred .ocr-check-gold {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #1e40af;
}
/* CMD/Portal: verde */
.ocr-badge.ocr-badge-cmd {
  background: #d1fae5;
  border-color: #34d399;
  color: #065f46;
}
.ocr-badge-cmd .ocr-check-gold {
  border-color: #34d399;
  background: #d1fae5;
  color: #065f46;
}

.ocr-check-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #c9b27c;
  background: #fff2d5;
  color: #b38a2f;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.ocr-edit {
  border: 0;
  background: transparent;
  color: #0b3c5d;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.vsm-consent-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 10px;
}

.vsm-consent-item {
  margin: 0;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.vsm-consent-item:hover {
  border-color: #8fd6dc;
  box-shadow: 0 8px 20px rgba(11, 60, 93, 0.08);
}

.vsm-consent-item.is-checked {
  border-color: #1aa6ad;
  background: #f3fbfb;
}

.vsm-consent-item.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.vsm-consent-head {
  display: grid;
  grid-template-columns: 20px 34px 1fr;
  align-items: start;
  gap: 12px;
  font-weight: 700;
  color: var(--vsm-navy);
  padding: 14px 16px;
  cursor: pointer;
}

.vsm-consent-head input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #159aa2;
}

.vsm-consent-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eef7fb;
  font-size: 17px;
}

.vsm-consent-copy {
  min-width: 0;
}

.vsm-consent-title {
  font-size: 16px;
  display: inline;
}

.vsm-consent-desc {
  display: block;
  margin: 5px 0 0;
  color: #5f7da3;
  font-size: 13px;
  line-height: 1.4;
}

.vsm-consent-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #315f88;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.vsm-doc-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.vsm-checkbox {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.vsm-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--vsm-teal);
}

.vsm-party-cards,
.vsm-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.vsm-people-wrap {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--vsm-border, rgba(11,60,93,.08));
}

.vsm-people-title {
  font-size: 13px;
  font-weight: 700;
  color: #5a7498;
  margin-bottom: 8px;
}

.vsm-party-cards {
  align-items: center;
}

.vsm-card-btn,
.vsm-subtab {
  border: 1px solid var(--vsm-border);
  background: #fff;
  color: var(--vsm-navy);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
}

.vsm-card-btn:hover,
.vsm-subtab:hover {
  background: rgba(11,60,93,.05);
  color: var(--vsm-navy) !important;
  border-color: var(--vsm-navy);
}

.vsm-card-btn:focus,
.vsm-card-btn:focus-visible,
.vsm-subtab:focus,
.vsm-subtab:focus-visible {
  outline: none;
}

.vsm-card-btn.is-active,
.vsm-subtab.is-active {
  border-color: var(--vsm-teal);
  color: var(--vsm-teal);
}

.vsm-card-btn.is-active:hover,
.vsm-subtab.is-active:hover {
  background: rgba(31,162,166,.08);
  color: var(--vsm-teal);
}

/* ENI badge nos tabs de intervenientes */
.vsm-eni-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: .03em;
}

/* Person type toggle (inline nos tabs) */
.vsm-person-type-toggle .vsm-btn-sm {
  height: 28px;
  min-height: 28px;
}
.vsm-person-type-toggle .vsm-btn-outline {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #64748b;
}
.vsm-person-type-toggle .vsm-btn-outline:hover {
  border-color: #1fa2a6;
  color: #1fa2a6;
}

/* Per-person type row in Estrutura */
.vsm-person-type-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.vsm-person-type-row + .vsm-person-type-row {
  border-top: 1px solid #e2e8f0;
}
.vsm-pill-sm {
  padding: 6px 14px !important;
  font-size: 13px !important;
  min-height: auto !important;
}

.vsm-remove-person {
  border: 1px solid #d6e1ef;
  background: #fff;
  color: #7a92b2;
  border-radius: 10px;
  min-width: 34px;
  height: 34px;
  cursor: pointer;
  overflow: hidden;
}

.vsm-remove-person:hover {
  background: rgba(185,28,28,.06);
  border-color: #d9534f;
  color: #b91c1c;
}

.vsm-remove-person:focus,
.vsm-remove-person:focus-visible {
  outline: none;
}

.vsm-add-person {
  border-style: dashed;
}

.vsm-add-person-menu {
  display: none;
  gap: 8px;
  margin-left: 8px;
  flex-wrap: wrap;
}

.vsm-add-option {
  border: 1px solid #c6d7ec;
  background: #fff;
  color: var(--vsm-navy);
  border-radius: 10px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
  cursor: pointer;
  overflow: hidden;
}

.vsm-add-option:hover {
  background: rgba(11,60,93,.05);
  border-color: var(--vsm-navy);
  color: var(--vsm-navy) !important;
}

.vsm-add-option:focus,
.vsm-add-option:focus-visible {
  outline: none;
}

.vsm-add-option:disabled,
.vsm-add-person:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.vsm-btn {
  border-radius: 8px;
  min-height: 40px;
  height: 40px;
  padding: 0 20px;
  border: 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 14px 28px rgba(12,70,86,.16);
  transition: transform .05s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}

.vsm-btn:active {
  transform: translateY(1px);
}

.vsm-btn:hover {
  box-shadow: 0 16px 30px rgba(12,70,86,.2), inset 0 0 0 999px rgba(0,0,0,.04);
}

.vsm-btn:focus,
.vsm-btn:focus-visible { outline: none; }
.vsm-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(31,162,166,.4), 0 12px 28px rgba(15,23,42,.10);
}

.vsm-btn-primary {
  background: var(--vsm-teal);
  color: #fff;
}

.vsm-btn-primary:hover {
  background: linear-gradient(135deg, #1a9499 0%, #1fa2a6 100%);
  box-shadow: 0 16px 30px rgba(12,70,86,.2), inset 0 0 0 999px rgba(0,0,0,.06);
}

.vsm-btn-secondary {
  background: #fff;
  color: var(--vsm-navy);
  border: 1px solid rgba(11,60,93,.2);
  box-shadow: 0 4px 12px rgba(11,60,93,.08);
}

.vsm-btn-secondary:hover {
  background: rgba(11,60,93,.08);
  border-color: #0b3c5d;
  color: var(--vsm-navy);
  box-shadow: 0 16px 30px rgba(12,70,86,.2), inset 0 0 0 999px rgba(0,0,0,.04);
}

.vsm-btn-outline {
  background: #fff;
  color: var(--vsm-navy);
  border: 1px solid var(--vsm-border);
}

.vsm-btn-outline:hover {
  border-color: var(--vsm-teal);
  background: rgba(31,162,166,.08);
  color: var(--vsm-navy);
}

.vsm-btn-link {
  background: transparent;
  border: 0;
  color: #0f7f84;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding-left: 0;
  padding-right: 0;
  box-shadow: none;
}

.vsm-btn-link:hover {
  color: #0a5558;
  text-decoration: underline;
  background: transparent;
  box-shadow: none;
}

.vsm-btn-link:focus,
.vsm-btn-link:focus-visible {
  outline: none;
  box-shadow: none;
}

.vsm-footer-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  border-top: 1px solid #d7e2f0;
  padding-top: 14px;
}

.vsm-footer-spacer {
  flex: 1;
}

.vsm-step-error,
.vsm-step-warning,
.vsm-global-message {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.vsm-step-warning {
  border: 1px solid #f0c97a;
  background: #fffbf0;
  color: #7a5a0e;
}

.vsm-step-error,
.vsm-global-message.error {
  border: 1px solid #f2a7a9;
  background: #fff4f4;
  color: #9e1f22;
}

.vsm-global-message.success {
  border: 1px solid #8ad2b3;
  background: #ecfbf4;
  color: #166944;
}

.vsm-global-message.info,
.vsm-check {
  border: 1px solid #b8d5ea;
  background: #f4faff;
  color: #356387;
}

/* Mensagem global com ação (ex. link de retoma inválido + botão de WhatsApp) */
.vsm-global-message p {
  margin: 0 0 10px;
}

.vsm-global-message .vsm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.vsm-check {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.vsm-check.ok {
  border-color: #9ed8c2;
  background: #eefbf5;
  color: #145a41;
}

.vsm-alert {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.vsm-alert-info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.vsm-alert-warning {
  border: 1px solid #f0d89d;
  background: #fff9ea;
  color: #7a5a0e;
}

.vsm-alert-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.vsm-alert-text {
  margin: 0;
  font-size: 13px;
}

.vsm-resume-box {
  border: 1px solid #d6e2f1;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.vsm-resume-box p {
  margin: 2px 0;
  font-size: 13px;
  line-height: 1.5;
}

.vsm-review-block h4 {
  margin: 0 0 8px;
  font-size: 20px;
}

.vsm-debug-box {
  border-color: #bfd8f1;
  background: #f7fbff;
}

.vsm-debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.vsm-debug-header p {
  margin: 0;
}

.vsm-debug-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.vsm-debug-entry {
  margin: 0;
  border: 1px solid #d7e6f7;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.vsm-muted {
  color: #6785aa;
  font-size: 13px;
}

.wizard-loader {
  position: absolute;
  inset: 0;
  background: rgba(236, 243, 251, 0.88);
  backdrop-filter: blur(1px);
  border-radius: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  z-index: 30;
}

.wizard-loader.is-visible {
  display: flex;
}

.wizard-loader .spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(11, 60, 93, 0.2);
  border-top-color: var(--vsm-teal);
  animation: vsm-spin .8s linear infinite;
}

.wizard-loader .loader-message {
  margin: 0;
  font-weight: 600;
  color: var(--vsm-navy);
}

@keyframes vsm-spin {
  to {
    transform: rotate(360deg);
  }
}
/* ── OCR Progress Loader ─────────────────────────────────────────── */
.wizard-loader.is-progress {
  background: rgba(11, 60, 93, 0.85);
  backdrop-filter: blur(6px);
}
.vsm-ocr-progress {
  text-align: center;
  max-width: 340px;
  width: 90%;
}
.vsm-ocr-progress-icon {
  font-size: 40px;
  margin-bottom: 8px;
  animation: vsm-pulse 2s ease-in-out infinite;
}
.vsm-ocr-progress-pct {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.vsm-ocr-progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}
.vsm-ocr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--vsm-teal, #1fa2a6), #e8d358);
  border-radius: 99px;
  transition: width 1.2s ease;
}
.vsm-ocr-progress-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  min-height: 20px;
}
@keyframes vsm-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

body.vsm-wizard-lock-scroll {
  overflow: hidden;
}

/* Esconder hero Elementor na página da proposta quando wizard está activo */
body.vsm-wizard-active .elementor-section-wrap > .elementor-section:first-child,
body.vsm-wizard-active .elementor > .elementor-section:first-child,
body.vsm-wizard-active .elementor-element:first-child > .elementor-section {
  display: none !important;
}
/* Reduzir padding do content area quando wizard está activo */
body.vsm-wizard-active .elementor-widget-container > .vsm-proposal-wizard {
  margin-top: 0;
}

/* Upload row: drop zone 2/3 + ficheiros 1/3, mesma altura */
.vsm-docs-upload-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}
.vsm-docs-upload-left {
  flex: 2 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.vsm-docs-upload-right {
  flex: 1 1 0%;
  min-width: 0;
  background: #f8fafc;
  border: 1px dashed var(--vsm-border, #cad7ea);
  border-radius: 12px;
  padding: 14px;
  overflow-y: auto;
}
.vsm-docs-upload-right .vsm-resume-box {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.vsm-docs-upload-right .valore-upload-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.vsm-docs-upload-right .vsm-resume-box p {
  margin: 0 0 6px;
  font-size: 13px;
}
.vsm-docs-upload-right .valore-upload-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid #e8edf3;
  font-size: 12px;
  flex-wrap: wrap;
}
.vsm-docs-upload-right .valore-upload-list li:last-child {
  border-bottom: none;
}
.vsm-docs-upload-right .file-name {
  font-weight: 600;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  margin-bottom: 2px;
}
.vsm-docs-upload-right .file-cat {
  font-size: 10px;
  background: #e0ecf5;
  color: #3a5a7c;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}
.vsm-docs-upload-right .file-state {
  font-size: 10px;
  color: #27ae60;
  font-weight: 600;
  text-transform: uppercase;
}
.vsm-docs-upload-right .is-pending .file-state {
  color: #e67e22;
}
.vsm-docs-upload-right .vsm-btn-link {
  font-size: 11px;
  padding: 0;
  color: #8899aa;
}
.vsm-docs-upload-right .vsm-btn-link:hover {
  color: #d63638;
}
.vsm-docs-empty-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100px;
  color: #8899aa;
}
.vsm-docs-empty-hint .vsm-docs-empty-icon {
  font-size: 28px;
  margin-bottom: 6px;
  opacity: 0.5;
}
.vsm-docs-empty-hint p {
  margin: 2px 0;
  font-size: 13px;
}
/* Botão OCR + consent ocupam linha inteira */
.vsm-doc-actions-full {
  margin-top: 12px;
  margin-bottom: 16px;
}
.vsm-btn-block {
  display: block !important;
  width: auto !important;
  margin: 0 auto !important;
  text-align: center;
  height: 40px !important;
  padding: 0 32px !important;
  font-size: 14px !important;
  line-height: 40px !important;
  box-sizing: border-box !important;
}
/* Botão OCR — dourado, compacto */
.vsm-btn-ocr {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 20px !important;
  font-size: 13px !important;
  font-weight: 600;
  border: 1px solid #d4a843 !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #f6e27a 0%, #d4a843 100%) !important;
  color: #5c3d0e !important;
  box-shadow: 0 2px 8px rgba(180,140,40,.18) !important;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.vsm-btn-ocr:hover {
  background: linear-gradient(135deg, #f0d660 0%, #c49530 100%) !important;
  box-shadow: 0 4px 12px rgba(180,140,40,.25) !important;
}
.vsm-btn-ocr:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Barra de completude global */
.vsm-completeness-bar {
  position: relative;
  min-height: 22px;
  height: auto;
  background: transparent;
  border-radius: 11px;
  margin: -4px 0 8px;
  overflow: visible;
  font-size: 11px;
}
.vsm-completeness-fill {
  display: none;
}
.vsm-completeness-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  color: #8895a7;
  font-weight: 600;
  font-size: 11px;
  padding: 0;
}
.vsm-completeness-done {
  color: #166944;
}
/* Missing fields links — completeness bar */
.vsm-completeness-bar .vsm-missing-list {
  font-size: 11px;
  color: #64748b;
  text-align: right;
  padding: 2px 0 0;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  white-space: normal;
  word-wrap: break-word;
}
.vsm-completeness-bar:hover .vsm-missing-list {
  max-height: 200px;
}
/* Missing fields links — finalização alert */
.vsm-alert .vsm-missing-list {
  max-height: none;
  overflow: visible;
  text-align: left;
  font-size: 13px;
  color: #92400e;
  margin-top: 8px;
}
.vsm-missing-link {
  color: #1fa2a6;
  text-decoration: underline;
  cursor: pointer;
  transition: color .15s;
}
.vsm-missing-link:hover {
  color: #0d5e61;
}
/* Flash highlight for scroll-to-field */
@keyframes vsm-flash {
  0% { box-shadow: 0 0 0 3px rgba(31,162,166,0.5); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.vsm-flash-highlight {
  animation: vsm-flash 1.5s ease-out;
}

/* Bloco de auditoria OCR */
.vsm-audit-block {
  background: #f8fafc;
  border: 1px solid #d5deec;
  border-left: 3px solid #1fa2a6;
  font-size: 13px;
}
.vsm-audit-block p {
  margin: 4px 0;
}

/* Helper dentro dos grupos de portal */
.vsm-portal-helper {
  font-size: 12px;
  color: #8a6d3b;
  background: #fcf8e3;
  border: 1px solid #faebcc;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 0 0 8px;
  line-height: 1.4;
}
/* Caixa de arraste maior */
.vsm-docs-upload-left .valore-upload-zone {
  min-height: 160px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* Responsivo: stack em mobile */
@media (max-width: 680px) {
  .vsm-docs-upload-row {
    flex-direction: column;
  }
  .vsm-docs-upload-left,
  .vsm-docs-upload-right {
    flex: 1 1 100%;
  }
}

.vsm-ocr-map-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}

.vsm-ocr-map-table th,
.vsm-ocr-map-table td {
  border-bottom: 1px solid #e5ecf4;
  text-align: left;
  vertical-align: top;
  padding: 8px 6px;
}

.vsm-ocr-map-table th {
  color: #2d4d73;
  font-weight: 700;
}

@media (max-width: 991px) {
  .vsm-proposal-wizard {
    padding: 16px;
  }

  .vsm-proposal-title {
    font-size: 24px;
  }

  .vsm-steps { gap: 8px; }

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

  .vsm-proposal-wizard.is-step-finalizacao .vsm-grid {
    grid-template-columns: 1fr;
  }

  .vsm-summary {
    position: static;
  }

  .vsm-form-grid.two,
  .vsm-form-grid.three {
    grid-template-columns: 1fr;
  }

  .valore-upload-list li {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }

  .valore-upload-list .file-cat {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .vsm-form-grid-essential-contact {
    grid-template-columns: 1fr;
  }

  .vsm-fill-modes {
    grid-template-columns: 1fr;
  }

  .vsm-fill-mode {
    min-height: 94px;
  }

  .vsm-footer-nav {
    flex-wrap: wrap;
  }

  .vsm-footer-spacer {
    display: none;
  }

  .vsm-footer-nav .vsm-btn {
    flex: 1 1 calc(50% - 8px);
  }

  .vsm-doc-actions {
    flex-direction: column;
  }

  .vsm-ocr-map-table th,
  .vsm-ocr-map-table td {
    font-size: 13px;
    padding: 6px 4px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LÓGICA DO PROTÓTIPO — mantendo cromia teal/navy
   Padrões aplicados: choice-btn, num-btn, step dots com labels, notes
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Step dots: padrão sdot-col + sline do protótipo ───────────────────── */

/* wrapper da linha de steps */
/* Steps: barra segmentada que ocupa 100% da largura */
.vsm-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  background: #e8edf3;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
}
.vsm-steps::-webkit-scrollbar { display: none; }

.vsm-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0%;
  padding: 10px 6px 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background .2s;
}

/* sem linha fina entre steps */
.vsm-step:not(:last-child)::after {
  display: none;
}

/* separador subtil */
.vsm-step + .vsm-step {
  margin-left: 0;
  border-left: 1px solid rgba(202,215,234,.5);
}

/* dot */
.vsm-step-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d5deec;
  border: 2px solid transparent;
  color: #8895a7;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: all .2s;
  flex-shrink: 0;
}

.vsm-step.is-active {
  background: rgba(31,162,166,.06);
}
.vsm-step.is-active .vsm-step-index {
  background: var(--vsm-teal);
  border-color: var(--vsm-teal);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(31,162,166,.2);
}

.vsm-step.is-done {
  background: rgba(31,162,166,.08);
}
.vsm-step.is-done .vsm-step-index {
  background: var(--vsm-teal);
  border-color: var(--vsm-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.vsm-step.is-done.is-warn .vsm-step-index {
  background: #e0860a;
  border-color: #c97700;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

/* label abaixo do dot */
.vsm-step-label {
  display: block;
  font-size: 10px;
  color: #6b7a8d;
  margin-top: 4px;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  font-weight: 600;
}

.vsm-step.is-active .vsm-step-label {
  color: var(--vsm-teal);
  font-weight: 800;
}

.vsm-step.is-done .vsm-step-label {
  color: #0a5558;
}

/* ── Fill-mode cards: padrão choice-btn do protótipo ───────────────────── */
.vsm-fill-mode {
  text-align: center;
  padding: 22px 14px 18px;
  border: 1.5px solid #cbd9eb;
  border-radius: 14px;
  background: #ffffff;
  position: relative;
  box-shadow: 0 4px 12px rgba(11,60,93,.05);
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
  overflow: hidden;
}

/* tick indicator — canto superior direito */
.vsm-fill-mode::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  font-weight: 800;
  color: var(--vsm-teal);
  opacity: 0;
  transition: opacity .2s;
}

.vsm-fill-mode:not(.is-disabled):hover {
  border-color: rgba(31,162,166,.55);
  background: rgba(31,162,166,.03);
  box-shadow: 0 8px 20px rgba(31,162,166,.12);
  transform: translateY(-2px);
  color: var(--vsm-navy) !important;
}

.vsm-fill-mode.is-active {
  border: 2px solid var(--vsm-teal);
  background: rgba(31,162,166,.06);
  box-shadow: 0 0 0 1px rgba(31,162,166,.2), 0 8px 20px rgba(31,162,166,.12);
}

.vsm-fill-mode.is-active::after {
  opacity: 1;
}

.vsm-fill-mode.is-active strong {
  color: #0a5558;
}

.vsm-fill-mode strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 7px;
  color: var(--vsm-navy);
}

.vsm-fill-mode small {
  display: block;
  color: #6584aa;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
}

.vsm-fill-mode[data-mode="portal"] {
  border-color: rgba(31,162,166,.42);
  background: linear-gradient(180deg, rgba(31,162,166,.08), rgba(255,255,255,.98));
}

.vsm-fill-mode[data-mode="portal"] .vsm-fill-mode-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #e5f7f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(31,162,166,.18);
}

.vsm-fill-mode[data-mode="portal"] .vsm-fill-mode-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #0f8f8f;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.vsm-fill-mode[data-mode="portal"] .vsm-fill-mode-note {
  margin-top: 6px;
  color: #9a721b;
  font-weight: 800;
}

.vsm-fill-mode[data-mode="portal"]:not(.is-disabled):hover,
.vsm-fill-mode[data-mode="portal"].is-active {
  border-color: var(--vsm-teal);
  background: linear-gradient(180deg, rgba(31,162,166,.14), rgba(255,255,255,.98));
  box-shadow: 0 0 0 1px rgba(31,162,166,.2), 0 12px 28px rgba(31,162,166,.18);
}

.vsm-fill-mode:hover strong,
.vsm-fill-mode:not(.is-disabled):hover strong {
  color: var(--vsm-navy) !important;
}

.vsm-fill-mode:hover small,
.vsm-fill-mode:not(.is-disabled):hover small {
  color: #6584aa !important;
}

/* ── Pills "Quem faz parte": padrão choice-btn ──────────────────────────── */
.vsm-pill {
  border-radius: 12px;
  border: 1.5px solid var(--vsm-border);
  background: #fff;
  color: var(--vsm-navy);
  padding: 11px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}

.vsm-pill::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 9px;
  font-weight: 800;
  color: var(--vsm-teal);
  opacity: 0;
  transition: opacity .2s;
}

.vsm-pill:hover {
  border-color: rgba(31,162,166,.5);
  background: rgba(31,162,166,.04);
  transform: translateY(-1px);
}

.vsm-pill.is-active {
  border-color: var(--vsm-teal);
  background: rgba(31,162,166,.08);
  box-shadow: 0 0 0 1px rgba(31,162,166,.2);
  color: #0a5558;
}

.vsm-pill.is-active::after {
  opacity: 1;
}

/* ── Notes/alerts: estilo com border-left colorida ─────────────────────── */
.vsm-check,
.vsm-alert {
  border-left-width: 3px;
  border-left-style: solid;
}

.vsm-check {
  border-left-color: #b8d5ea;
}

.vsm-check.ok {
  border-left-color: #27ae60;
}

.vsm-alert-warning {
  border-left-color: #c9a96e;
}

.vsm-step-error,
.vsm-global-message.error {
  border-left: 3px solid var(--vsm-danger);
}
/* Lista de erros de submit (links clicaveis) */
.vsm-submit-error-list { list-style: none; padding: 0; margin: 8px 0 0; }
.vsm-submit-error-item { padding: 3px 0; font-size: 13px; }
.vsm-submit-error-item .vsm-btn-link { color: #9e1f22; text-decoration: underline; font-size: 13px; cursor: pointer; background: none; border: none; padding: 0; text-align: left; }
.vsm-submit-error-item .vsm-btn-link:hover { color: #6b1416; }

.vsm-step-warning {
  border-left: 3px solid #c9a96e;
}

.vsm-global-message.success {
  border-left: 3px solid #27ae60;
}

.vsm-global-message.info {
  border-left: 3px solid #4aaeb1;
}

/* ── Títulos de secção: maior destaque ──────────────────────────────────── */
.vsm-step-panel > h3:first-of-type,
.vsm-step-panel h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--vsm-navy);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--vsm-border);
}

/* ── Data blocks: destaque ligeiro ──────────────────────────────────────── */
.vsm-data-block {
  border-left: 3px solid rgba(31,162,166,.35);
}

/* ── Screen chip / title / desc (protótipo logic screens) ─────────────── */
.vsm-screen-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(31,162,166,.10);
  border: 1px solid rgba(31,162,166,.22);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--vsm-teal);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.vsm-step-panel h3.vsm-screen-title {
  font-size: 23px;
  font-weight: 700;
  color: var(--vsm-navy);
  line-height: 1.25;
  margin: 0 0 4px;
  border-bottom: none;
  padding-bottom: 0;
}

.vsm-screen-desc {
  font-size: 14px;
  color: #6b7f95;
  line-height: 1.6;
  margin: 0 0 18px;
  padding-bottom: 0;
  border-bottom: none;
}

/* ── vsm-fill-mode icon ─────────────────────────────────────────────────── */
.vsm-fill-mode-icon {
  display: block;
  font-size: 26px;
  margin-bottom: 8px;
}

/* ── Stepper: 6 steps — dots ficam mais pequenos em mobile ─────────────── */
@media (max-width: 600px) {
  .vsm-step-label {
    font-size: 8px;
    max-width: 44px;
  }
  .vsm-step-index {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }
  .vsm-step:not(:last-child)::after {
    top: 11px;
    left: calc(50% + 11px);
    width: calc(100% - 22px + 14px);
  }
  .vsm-steps .vsm-step + .vsm-step {
    margin-left: 10px;
  }
}

/* ── Essential name grid: 2 colunas (Nome + Apelido) ───────────────────── */
.vsm-form-grid-essential-name {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

/* ── Simulation summary bar ─────────────────────────────────────────────── */
.vsm-sim-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  background: rgba(31, 162, 166, 0.07);
  border: 1px solid rgba(31, 162, 166, 0.22);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--vsm-navy);
}

.vsm-sim-summary-bar span {
  white-space: nowrap;
}

.vsm-sim-summary-bar strong {
  color: var(--vsm-teal);
  font-weight: 700;
  margin-right: 3px;
}

/* ── Vehicle data block accent ──────────────────────────────────────────── */
.vsm-data-block-vehicle,
.vsm-data-block-vehicle-finance {
  border-left-color: rgba(11, 60, 93, 0.4);
}

/* ── Input / select: teal focus ring ────────────────────────────────────── */
.vsm-form-grid input:focus,
.vsm-form-grid select:focus,
.vsm-form-row input:focus,
.vsm-form-row select:focus {
  outline: none;
  border-color: var(--vsm-teal);
  box-shadow: 0 0 0 3px rgba(31, 162, 166, 0.18);
}

/* ── Stepper header: 7 steps compact ───────────────────────────────────── */
@media (max-width: 700px) {
  .vsm-sim-summary-bar {
    gap: 6px 12px;
    font-size: 12.5px;
  }
  .vsm-form-grid-essential-name {
    grid-template-columns: 1fr;
  }
}

/* ─── Estrutura step sections ──────────────────────────────────────────── */
.vsm-step-panel-estrutura .vsm-fill-modes-compact {
  gap: 12px;
}
.vsm-step-panel-estrutura .vsm-fill-modes-compact .vsm-fill-mode {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 14px 16px;
}
.vsm-estrutura-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--vsm-border, rgba(11,60,93,.12));
}
.vsm-estrutura-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.vsm-estrutura-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--vsm-navy, #0b3c5d);
  opacity: .7;
  margin-bottom: 4px;
}
.vsm-screen-desc-sm {
  font-size: 13px;
  color: var(--vsm-muted, #64748b);
  margin: 0 0 10px;
}
.vsm-consent-person-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--vsm-navy, #0b3c5d);
  margin-bottom: 8px;
}
.vsm-consent-block {
  margin-bottom: 16px;
}
.vsm-consent-block:last-child {
  margin-bottom: 0;
}

.vsm-consents-section {
  background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
}

.vsm-consents-intro {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.vsm-consent-policy {
  flex: 0 0 auto;
  color: #0b7f87;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid #b9dfe5;
  border-radius: 8px;
  padding: 8px 11px;
  background: #fff;
}

.vsm-consent-policy:hover {
  background: #eefafa;
}

/* ─── Mobile / Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Layout */
  .vsm-proposal-wizard {
    padding: 0;
  }
  .vsm-grid {
    flex-direction: column;
  }
  .vsm-sidebar {
    display: none; /* hide sidebar on mobile */
  }
  .vsm-main {
    width: 100%;
    min-width: 0;
    padding: 0 4px;
  }

  /* Header */
  .vsm-header {
    padding: 12px 16px 8px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .vsm-proposal-title {
    font-size: 16px;
  }
  .vsm-step-current {
    font-size: 13px;
  }

  /* Steps breadcrumb */
  .vsm-steps {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding: 0 8px 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .vsm-steps::-webkit-scrollbar { display: none; }
  .vsm-step {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 4px 8px;
    white-space: nowrap;
  }

  /* Progress */
  .vsm-progress {
    margin: 4px 16px;
    height: 3px;
  }

  /* Step panel */
  .vsm-step-panel {
    padding: 16px;
    border-radius: 12px;
  }
  .vsm-screen-title {
    font-size: 20px;
    line-height: 1.3;
  }
  .vsm-screen-desc,
  .vsm-muted {
    font-size: 14px;
  }

  /* Form grids */
  .vsm-form-grid.two,
  .vsm-form-grid-essential-name.two,
  .vsm-form-grid-essential-contact {
    grid-template-columns: 1fr !important;
  }
  .vsm-form-grid {
    grid-template-columns: 1fr;
  }

  /* Fill modes (card tiles) */
  .vsm-fill-modes {
    flex-direction: column;
    gap: 10px;
  }
  .vsm-fill-mode {
    width: 100%;
    min-width: 0;
    text-align: left;
    padding: 14px 16px;
  }
  .vsm-fill-modes-compact {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .vsm-fill-modes-compact .vsm-fill-mode {
    flex: 1 1 calc(50% - 6px);
    min-width: 120px;
  }

  /* Structure pills */
  .vsm-structure-pills {
    flex-wrap: wrap;
    gap: 8px;
  }
  .vsm-pill {
    flex: 1 1 calc(50% - 4px);
    min-width: 100px;
    text-align: center;
  }

  /* People tabs */
  .vsm-people-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }
  .vsm-people-tab {
    flex: 1 1 calc(50% - 3px);
    text-align: center;
    font-size: 13px;
    padding: 8px 10px;
  }

  /* Segmented control */
  .vsm-segmented-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .vsm-segmented {
    width: 100%;
  }
  .vsm-segment-btn {
    flex: 1;
  }

  /* Estrutura sections */
  .vsm-estrutura-section {
    margin-top: 20px;
    padding-top: 16px;
  }

  /* Footer nav */
  .vsm-footer-nav {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .vsm-footer-nav .vsm-btn-link {
    order: 10;
    width: 100%;
    text-align: center;
  }
  .vsm-footer-spacer {
    display: none;
  }
  .vsm-footer-nav .vsm-btn-secondary {
    flex: 1;
  }
  .vsm-footer-nav .vsm-btn-outline {
    flex: 1;
  }
  .vsm-footer-nav .vsm-btn-primary {
    flex: 2;
  }

  /* Summary bar (simulation data) */
  .vsm-sim-summary-bar {
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    font-size: 13px;
  }

  /* IBAN field */
  .vsm-form-grid.two label:has(input[data-path="client.bank.iban"]) {
    grid-column: 1 / -1;
  }

  /* Consent items */
  .vsm-consent-item {
    padding: 10px 0;
  }

  /* Data blocks */
  .vsm-data-block {
    padding: 12px 0;
  }
  .vsm-data-block h4 {
    font-size: 15px;
  }
}

@media (max-width: 400px) {
  .vsm-screen-title {
    font-size: 18px;
  }
  .vsm-fill-modes-compact .vsm-fill-mode {
    flex: 1 1 100%;
  }
  .vsm-pill {
    flex: 1 1 100%;
  }
  .vsm-footer-nav .vsm-btn-outline,
  .vsm-footer-nav .vsm-btn-primary {
    flex: 1 1 100%;
  }
}

/* ─── Contact preference ───────────────────────────────────────────────── */
.vsm-contact-pref { margin-top: 0; display: flex; flex-direction: column; justify-content: center; }
.vsm-pref-channels {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.vsm-pref-channels .vsm-checkbox {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.vsm-pref-channels .vsm-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--vsm-teal, #1fa2a6);
}
.vsm-contact-pref select {
  max-width: 280px;
}
@media (max-width: 768px) {
  .vsm-pref-channels { flex-direction: column; gap: 10px; }
}

/* ─── Phone combo (country code + number) ──────────────────────────────── */
.vsm-phone-field { display: flex; flex-direction: column; }
.vsm-phone-combo {
  display: flex;
  gap: 0;
  height: 40px;
  border: 1px solid var(--vsm-border, rgba(11,60,93,.15));
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}
.vsm-phone-cc {
  flex: 0 0 auto;
  width: 100px;
  height: 100%;
  border: none;
  border-right: 1px solid var(--vsm-border, rgba(11,60,93,.12));
  padding: 0 24px 0 10px;
  font-size: 14px;
  background: #f8fafc;
  color: var(--vsm-navy, #0b3c5d);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%230b3c5d' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 01.708 0L8 10.293l5.646-5.647a.5.5 0 01.708.708l-6 6a.5.5 0 01-.708 0l-6-6a.5.5 0 010-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  box-sizing: border-box;
}
.vsm-phone-cc:focus { outline: none; background: #eef4fb; }
.vsm-phone-number {
  flex: 1;
  height: 100%;
  border: none;
  padding: 0 12px;
  font-size: 14px;
  min-width: 0;
  box-sizing: border-box;
}
.vsm-phone-number:focus { outline: none; }
.vsm-phone-combo:focus-within {
  box-shadow: 0 0 0 3px rgba(31,162,166,.2);
  border-color: var(--vsm-teal, #1fa2a6);
}
/* Override grid input styles inside phone combo */
.vsm-phone-field input,
.vsm-phone-field select { border-radius: 0 !important; border: none !important; height: 100% !important; box-shadow: none !important; }

@media (max-width: 400px) {
  .vsm-phone-cc { width: 85px; font-size: 13px; }
}

/* ─── Dealer grid (nome 60% / telefone 40%) ────────────────────────────── */
.vsm-grid-dealer {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
}
@media (max-width: 768px) {
  .vsm-grid-dealer { grid-template-columns: 1fr; }
}

/* ─── Dealer links ─────────────────────────────────────────────────────── */
.vsm-dealer-links { margin-top: 4px; }
.vsm-dealer-links .vsm-form-grid { margin-bottom: 8px; }
.vsm-btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; border-radius: 12px; }

/* ─── Upload trigger buttons (Anexar/Adicionar) — cor consistente ───── */
.valore-upload-trigger:not(.vsm-btn-ghost) {
  background: var(--vsm-teal, #1fa2a6) !important;
  color: #fff !important;
  border: 0 !important;
}
.valore-upload-trigger:not(.vsm-btn-ghost):hover {
  background: linear-gradient(135deg, #1a9499 0%, #1fa2a6 100%) !important;
}

/* ─── Document Requirements Checklist ──────────────────────────────────── */
.vsm-doc-requirements { margin-top: 20px; }
.vsm-metodo-ocr-block { display: flex; flex-direction: row; gap: 16px; align-items: stretch; width: 100%; margin-top: 16px; }
.vsm-metodo-ocr-block.vsm-metodo-ocr-stacked { flex-direction: column; gap: 20px; }
.vsm-metodo-ocr-left { flex: 1 1 0; min-width: 0; background: #f8fafc; border: 1px solid var(--vsm-border, rgba(11,60,93,.1)); border-radius: 10px; padding: 12px; }
.vsm-metodo-ocr-right { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.vsm-metodo-ocr-right > .valore-upload { flex: 1; width: 100%; box-sizing: border-box; }
/* Stacked layout — dropzone topo, docs baixo */
.vsm-metodo-ocr-dropzone { width: 100%; box-sizing: border-box; }
.vsm-metodo-ocr-dropzone .valore-upload { min-height: 80px; width: 100%; box-sizing: border-box; }
.vsm-metodo-ocr-dropzone .valore-upload-dropzone { min-height: 70px; }
.vsm-metodo-docs-sections { width: 100%; }
.vsm-metodo-docs-sections .vsm-doc-checklist-upload { gap: 6px; }
.vsm-metodo-docs-sections .vsm-doc-upload-item { padding: 8px 12px; }
.vsm-metodo-docs-sections .vsm-doc-upload-desc { display: none; }
.vsm-metodo-docs-sections .vsm-doc-group-header { cursor: pointer; }
.vsm-metodo-docs-sections .vsm-doc-group-header .vsm-doc-upload-desc { display: block; font-size: 11px; }
.vsm-metodo-docs-sections .vsm-doc-group-items { display: none; }
.vsm-metodo-docs-sections .vsm-doc-group-header.is-expanded .vsm-doc-group-items { display: flex !important; }
.vsm-metodo-docs-sections .vsm-doc-group-header.is-expanded + .vsm-doc-group-items { display: flex !important; }
.vsm-metodo-docs-sections .vsm-doc-group-header.is-expanded ~ .vsm-doc-group-items { display: flex !important; }
.vsm-metodo-docs-sections .vsm-doc-group-header.is-expanded { }
.vsm-doc-group-toggle { margin-left: auto; font-size: 11px; color: var(--vsm-teal, #1fa2a6); font-weight: 600; cursor: pointer; white-space: nowrap; }
.vsm-doc-group-count { font-size: 10px; color: #94a3b8; font-weight: 500; }
.vsm-doc-group-header[data-action="toggle-group"] { cursor: pointer; }
.vsm-doc-group-header[data-action="toggle-group"] .vsm-doc-group-icon::after { content: ' ▸'; font-size: 10px; }
.vsm-doc-group-header[data-action="toggle-group"].is-expanded .vsm-doc-group-icon::after { content: ' ▾'; }
.vsm-doc-group-expand-hint { font-size: 11px; color: var(--vsm-teal, #1fa2a6); font-weight: 500; margin-left: auto; white-space: nowrap; opacity: .8; }
.vsm-doc-group-header.is-expanded .vsm-doc-group-expand-hint { display: none; }
.vsm-metodo-ocr-placeholder { font-size: 13px; text-align: center; padding: 16px 0; }
.vsm-doc-checklist { list-style: none; padding: 0; margin: 12px 0 0; }
.vsm-doc-checklist-item { padding: 10px 14px; border: 1px solid var(--vsm-border, rgba(11,60,93,.12)); border-radius: 8px; margin-bottom: 8px; }
.vsm-doc-checklist-head { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.vsm-doc-checklist-desc { font-size: 13px; color: var(--vsm-muted, #64748b); margin-top: 4px; }
.vsm-badge-required { background: #fee2e2; color: #991b1b; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .03em; }
.vsm-badge-optional { background: #f0f9ff; color: #0369a1; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .03em; }

/* Doc upload checklist (manual mode + financiamento summary) */
/* Compact status list — OCR mode indicator (3 cores) */
.vsm-doc-status-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; }
.vsm-doc-status-item { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 6px; font-size: 13px; border: 1px solid transparent; flex-wrap: wrap; }
/* Cinzento — sem documentos */
.vsm-doc-status-item.is-none { background: #f1f5f9; border-color: #e2e8f0; }
/* Amarelo — parcial */
.vsm-doc-status-item.is-partial { background: #fffbeb; border-color: #fcd34d; }
/* Verde — completo */
.vsm-doc-status-item.is-complete { background: #f0fdfb; border-color: rgba(31,162,166,.3); }
.vsm-doc-status-icon { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.vsm-doc-status-item.is-none     .vsm-doc-status-icon { background: #cbd5e1; color: #64748b; }
.vsm-doc-status-item.is-partial  .vsm-doc-status-icon { background: #f59e0b; color: #fff; font-size: 12px; }
.vsm-doc-status-item.is-complete .vsm-doc-status-icon { background: var(--vsm-teal); color: #fff; }
.vsm-doc-status-label { flex: 1; min-width: 0; color: var(--vsm-navy, #0b3c5d); font-weight: 500; }
.vsm-doc-status-item.is-complete .vsm-doc-status-label { color: #0f766e; }
.vsm-doc-status-add { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #94a3b8; background: #fff; color: #64748b; font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: background .12s, color .12s; }
.vsm-doc-status-add:hover { background: var(--vsm-teal); border-color: var(--vsm-teal); color: #fff; }
.vsm-doc-status-hint { width: 100%; font-size: 11px; color: #92400e; padding-left: 25px; line-height: 1.4; }
.vsm-doc-link-block { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-right: 12px; flex-shrink: 0; }
.vsm-doc-link { font-size: 12px; color: var(--vsm-primary, #1fa2a6); text-decoration: none; font-weight: 500; }
.vsm-doc-link:hover { text-decoration: underline; }
.vsm-doc-link-nif { font-size: 11px; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 1px 6px; }

/* Popup guide button (ex: Banco de Portugal) */
.vsm-doc-link-popup-block { flex-direction: column; align-items: flex-end; gap: 6px; }
.vsm-doc-popup-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--vsm-teal, #1fa2a6); color: #fff; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, transform .1s; white-space: nowrap; }
.vsm-doc-popup-btn:hover { background: #178a8e; transform: translateY(-1px); }
.vsm-doc-popup-btn-secondary { background: var(--vsm-navy, #0b3c5d); }
.vsm-doc-popup-btn-secondary:hover { background: #0a3252; }
.vsm-doc-popup-icon { font-size: 11px; opacity: .85; }
.vsm-doc-popup-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vsm-doc-popup-steps { margin: 4px 0 0; padding: 0 0 0 14px; list-style: decimal; font-size: 11px; color: #5f7da3; line-height: 1.7; min-width: 200px; }
.vsm-doc-popup-steps li strong { color: var(--vsm-navy, #0b3c5d); }
.vsm-doc-nif-copy { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; font-weight: 600; color: #334155; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.vsm-doc-nif-copy:hover { background: #e2e8f0; }
.vsm-doc-nif-copy.is-copied { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.vsm-doc-nif-copy-icon { font-size: 12px; }
/* Group header row (ex: Documentos da Seg. Social — mesmo estilo do BdP mas sem Anexar) */
.vsm-doc-upload-item.vsm-doc-group-header { background: #f0f9ff; border-color: #bae6fd; margin-top: 10px; }
.vsm-doc-group-icon { color: var(--vsm-teal, #1fa2a6) !important; font-size: 14px !important; }
.vsm-badge-group { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .04em; background: #e0f2fe; color: #0369a1; text-transform: uppercase; }
.vsm-doc-group-header .vsm-doc-link-popup-block { align-items: center; flex-direction: row; }
/* Sub-docs nested inside group-action card */
.vsm-doc-group-items { margin-top: 10px; border-top: 1px solid #bae6fd; padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.vsm-doc-group-subitem { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 4px 6px; border-radius: 5px; background: rgba(255,255,255,.55); }
.vsm-doc-group-subitem.is-done { background: #f0fdfb; }
.vsm-doc-group-subitem-icon { font-size: 11px; color: #94a3b8; flex-shrink: 0; width: 14px; text-align: center; }
.vsm-doc-group-subitem.is-done .vsm-doc-group-subitem-icon { color: var(--vsm-teal, #1fa2a6); font-weight: 700; }
.vsm-doc-group-subitem-label { flex: 1; color: var(--vsm-navy, #0b3c5d); }
.vsm-doc-group-subitem .vsm-btn-ghost { background: transparent; border: 1px solid #bae6fd; color: #0369a1; padding: 2px 8px; font-size: 10px; border-radius: 4px; }
.vsm-doc-group-subitem .vsm-btn-ghost:hover { background: #e0f2fe; }
.vsm-doc-group-subitem-files { margin: 0 0 4px 22px; padding: 0; list-style: none; font-size: 11px; }
/* Flash highlight quando popup fecha — indica onde anexar */
@keyframes vsm-flash-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(31,162,166,.0); } 50% { box-shadow: 0 0 0 6px rgba(31,162,166,.35); } }
.vsm-flash-highlight { animation: vsm-flash-pulse .8s ease 3; border-color: var(--vsm-teal, #1fa2a6) !important; }
.vsm-doc-status-item.is-none .vsm-doc-status-hint { color: #64748b; }
.vsm-doc-status-item.is-complete .vsm-doc-status-hint { color: #0f766e; }

/* Zona de carregamento em lote (step Finalização) */
.vsm-doc-bulk-zone { background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.vsm-doc-bulk-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.vsm-doc-bulk-icon { font-size: 22px; line-height: 1; margin-top: 1px; }
.vsm-doc-bulk-text { display: flex; flex-direction: column; gap: 2px; }
.vsm-doc-bulk-text strong { font-size: 13px; font-weight: 700; color: var(--vsm-navy, #0b3c5d); }
.vsm-doc-bulk-text span { font-size: 11px; color: #64748b; }
.vsm-doc-bulk-list { margin-top: 10px; }
.vsm-doc-bulk-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.vsm-doc-bulk-ocr-hint { font-size: 11px; color: #64748b; font-style: italic; }

/* Doc upload checklist (financiamento summary) */
/* Abas por titular */
.vsm-holder-tabs { margin-top: 10px; }
.vsm-holder-tab-nav { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; background: #f1f5f9; border-radius: 10px; padding: 4px; }
.vsm-holder-tab-btn { background: transparent; border: none; padding: 8px 20px; font-size: 13px; font-weight: 600; color: #64748b; cursor: pointer; border-radius: 8px; transition: all .15s ease; }
.vsm-holder-tab-btn:hover { color: var(--vsm-navy, #0b3c5d); background: rgba(255,255,255,.6); }
.vsm-holder-tab-btn.is-active { color: #fff; background: var(--vsm-teal, #1fa2a6); box-shadow: 0 1px 3px rgba(31,162,166,.3); }
.vsm-holder-tab-role { font-size: 10px; background: rgba(255,255,255,.3); color: inherit; border-radius: 3px; padding: 1px 5px; margin-left: 4px; font-weight: 400; }
.vsm-holder-tab-panel { display: none; }
.vsm-holder-tab-panel.is-active { display: block; }

.vsm-doc-checklist-upload { margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.vsm-doc-checklist-upload.is-compact .vsm-doc-upload-item { padding: 4px 10px; }
.vsm-doc-upload-item { border: 1px solid var(--vsm-border, rgba(11,60,93,.12)); border-radius: 7px; padding: 7px 12px; background: #fff; transition: border-color .15s; }
.vsm-doc-upload-item.is-done { border-color: var(--vsm-teal); background: #f0fdfb; }
.vsm-doc-upload-item.is-missing { border-color: #fca5a5; background: #fff5f5; }
.vsm-doc-upload-item.is-optional { border-color: var(--vsm-border, rgba(11,60,93,.12)); }
.vsm-doc-upload-head { display: flex; align-items: center; gap: 8px; }
.vsm-doc-upload-icon { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: #e2e8f0; color: #64748b; }
.vsm-doc-upload-item.is-done .vsm-doc-upload-icon { background: var(--vsm-teal); color: #fff; }
.vsm-doc-upload-item.is-missing .vsm-doc-upload-icon { background: #ef4444; color: #fff; }
.vsm-doc-upload-meta { flex: 1; min-width: 0; }
.vsm-doc-upload-label { font-size: 13px; font-weight: 600; color: var(--vsm-navy, #0b3c5d); }
.vsm-doc-upload-desc { font-size: 11px; color: var(--vsm-muted, #64748b); margin-top: 1px; }
.vsm-doc-upload-item .vsm-btn-sm { flex-shrink: 0; padding: 4px 10px; font-size: 11px; height: auto; white-space: nowrap; }
.vsm-doc-upload-item .valore-upload-list { margin: 6px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--vsm-border, rgba(11,60,93,.08)); padding-top: 6px; }
.vsm-doc-upload-item .valore-upload-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 2px 0; }
.vsm-doc-upload-item .valore-upload-list .file-name { flex: 1; color: var(--vsm-navy, #0b3c5d); }
.vsm-doc-upload-item .valore-upload-list .file-state { font-size: 10px; color: var(--vsm-teal); font-weight: 700; }
.vsm-docs-summary-section { margin-bottom: 20px; }

/* ── Doc Verification Score Panel ─────────────────────────────────────────── */
.vsm-doc-verification-score {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
}
.vsm-doc-verification-score--medium {
  border-color: #fde68a;
  background: #fffbeb;
}
.vsm-doc-verification-score--high {
  border-color: #fca5a5;
  background: #fef2f2;
}
.vsm-dvs-emoji { font-size: 20px; flex-shrink: 0; line-height: 1.3; }
.vsm-dvs-body { display: flex; flex-direction: column; gap: 2px; }
.vsm-dvs-body strong { font-size: 13px; color: var(--vsm-navy, #0b3c5d); }
.vsm-dvs-label { font-size: 12px; color: #64748b; }
.vsm-dvs-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.vsm-dvs-flag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(11,60,93,.08);
  color: var(--vsm-navy, #0b3c5d);
  font-weight: 500;
}
.vsm-doc-verification-score--medium .vsm-dvs-flag { background: rgba(245,158,11,.12); color: #92400e; }
.vsm-doc-verification-score--high .vsm-dvs-flag { background: rgba(239,68,68,.1); color: #991b1b; }

/* ─── Badges de fonte (CMD/OCR/SIM) ─── */
.vsm-source-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.vsm-source-cmd  { background: #d1fae5; color: #065f46; }
.vsm-source-ocr  { background: linear-gradient(135deg, #f5e6b8 0%, #d4a843 100%); color: #5c3d0e; }
.vsm-source-ocr-inferred { background: #dbeafe; color: #1e40af; }
.vsm-source-sim  { background: #f3f4f6; color: #4b5563; }

/* ─── Badges na autenticação ─── */
.vsm-fill-mode-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}
.vsm-badge-recommended { background: #d1fae5; color: #065f46; }
.vsm-badge-soon { background: #fef3c7; color: #92400e; }

/* ─── Autenticação CMD info ─── */
.vsm-auth-cmd-info {
  margin-top: 16px;
  padding: 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}
.vsm-consent-prereq { margin-top: 12px; }
.vsm-btn-cmd {
  margin-top: 12px;
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
}
.vsm-btn-cmd[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ─── Revisão — secções colapsáveis ─── */
.vsm-review-section {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.vsm-review-section.is-complete { border-color: #a7f3d0; }
.vsm-review-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  background: #f8fafc;
  user-select: none;
  transition: background .15s;
}
.vsm-review-section-header:hover { background: #f1f5f9; }
.vsm-review-section.is-complete .vsm-review-section-header { background: #f0fdf4; }
.vsm-review-section-icon { font-size: 18px; flex-shrink: 0; }
.vsm-review-section-label { font-weight: 600; font-size: 14px; color: #1e293b; flex: 1; }
.vsm-review-section-progress {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  padding: 2px 8px;
  background: #e2e8f0;
  border-radius: 10px;
}
.vsm-review-section.is-complete .vsm-review-section-progress {
  background: #d1fae5;
  color: #065f46;
}
.vsm-review-section-chevron {
  font-size: 14px;
  color: #94a3b8;
  width: 20px;
  text-align: center;
}
.vsm-review-section-body {
  padding: 16px 18px;
  border-top: 1px solid #e2e8f0;
}
.vsm-review-section.is-complete .vsm-review-section-body {
  border-top-color: #a7f3d0;
}

/* ─── Revisão — campo locked (read-only com badge) ─── */
.vsm-review-field.is-locked {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vsm-review-field.is-locked span:first-child {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.vsm-review-value {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  color: #1e293b;
}
.vsm-review-value span { flex: 1; }
.vsm-btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  opacity: 0.5;
  transition: opacity .15s;
}
.vsm-btn-icon:hover { opacity: 1; }

/* ─── Doc notes ─── */
.vsm-doc-notes { margin-bottom: 16px; }

/* ─── OCR consent prompt ─── */
.vsm-ocr-consent-prompt {
  margin-top: 16px;
  padding: 16px;
  background: #f0f7ff;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
}

/* Handover site → WhatsApp: botão no rodapé do wizard ("prefiro tratar por WhatsApp") */
.vsm-btn.vsm-btn-wa {
  color: #128C4B;
  background: #fff;
  border: 1.5px solid #25D366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vsm-btn.vsm-btn-wa:hover {
  background: #25D366;
  color: #fff;
}
.vsm-btn.vsm-btn-wa.is-loading { opacity: .7; pointer-events: none; }

/* ─── UX refresh global do wizard (26/08/2026) ─────────────────────────── */
.vsm-step-panel {
  border-radius: 16px;
  border-color: #d6e3f1;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,252,255,.98) 100%);
  box-shadow: 0 14px 34px rgba(11, 60, 93, 0.10);
}

.vsm-data-block,
.vsm-estrutura-section {
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  background: #fff;
  padding: 18px 20px;
  box-shadow: 0 8px 22px rgba(11, 60, 93, 0.055);
}

.vsm-estrutura-section {
  margin-top: 16px;
}

.vsm-estrutura-section:first-of-type {
  padding-top: 18px;
  border-top: 1px solid #dbe7f4;
}

.vsm-data-block h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf3fa;
}

.vsm-estrutura-label {
  opacity: 1;
  color: #315f88;
  letter-spacing: .03em;
  margin-bottom: 10px;
}

.vsm-form-grid label > span,
.vsm-form-row label > span {
  color: #0b3c5d;
  font-size: 13px;
}

.vsm-form-grid input,
.vsm-form-grid select,
.vsm-form-row input,
.vsm-form-row select {
  height: 46px;
  border-color: #cbdced;
  border-radius: 8px;
  background: #fbfdff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.vsm-form-grid input:hover,
.vsm-form-grid select:hover,
.vsm-form-row input:hover,
.vsm-form-row select:hover {
  border-color: #9fc2df;
  background: #fff;
}

.vsm-form-grid input:focus,
.vsm-form-grid select:focus,
.vsm-form-row input:focus,
.vsm-form-row select:focus {
  border-color: #1fa2a6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 162, 166, .16);
}

.vsm-footer-nav {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 22px -32px -28px;
  padding: 14px 32px;
  border-top: 1px solid #dbe7f4;
  background: rgba(248, 252, 255, .94);
  backdrop-filter: blur(10px);
  box-shadow: 0 -10px 28px rgba(11, 60, 93, 0.08);
}

.vsm-footer-nav .vsm-btn {
  min-height: 46px;
  border-radius: 8px;
}

.vsm-btn.vsm-btn-wa {
  min-width: 220px;
}

.vsm-step-panel-revisao > .vsm-step-panel-estrutura,
.vsm-estrutura-inline {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 22px 0 18px;
}

.vsm-estrutura-inline {
  display: grid;
  gap: 14px;
}

.vsm-estrutura-inline .vsm-estrutura-section {
  margin: 0;
  padding: 16px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  border-color: #d7e7f4;
}

.vsm-estrutura-inline .vsm-estrutura-section:first-of-type {
  padding-top: 16px;
}

.vsm-estrutura-inline .vsm-structure-pills {
  margin-bottom: 0;
}

.vsm-estrutura-inline .vsm-form-grid {
  margin-bottom: 0;
}

.vsm-pill {
  position: relative;
  min-height: 50px;
  border-radius: 10px;
  padding: 10px 18px;
  text-align: left;
}

.vsm-pill-main {
  display: block;
  font-size: 15px;
  line-height: 1.1;
}

.vsm-pill-sub {
  display: block;
  margin-top: 4px;
  color: #607da3;
  font-size: 12px;
  font-weight: 600;
}

.vsm-pill.is-active .vsm-pill-sub {
  color: #236f74;
}

.vsm-pill.is-disabled,
.vsm-pill:disabled {
  opacity: .52;
  cursor: not-allowed;
  background: #f7fafc;
  color: #607080;
  border-color: #d8e3ee;
  box-shadow: none;
}

.vsm-pill.is-disabled::after,
.vsm-pill:disabled::after {
  display: none;
}

.vsm-step-panel-revisao .vsm-screen-desc .vsm-source-badge {
  vertical-align: 1px;
}

.vsm-step-panel-revisao .vsm-people-wrap {
  margin-top: 20px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid #d7e7f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.vsm-step-panel-revisao .vsm-people-title {
  margin-bottom: 12px;
  color: #0b3c5d;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.vsm-step-panel-revisao .vsm-party-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.vsm-person-nav-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 6px 16px rgba(11, 60, 93, 0.055);
}

.vsm-person-nav-index {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #edf6fb;
  color: #315f88;
  font-size: 14px;
  font-weight: 900;
}

.vsm-person-nav-copy {
  min-width: 0;
}

.vsm-person-nav-copy strong,
.vsm-person-nav-copy small {
  display: block;
}

.vsm-person-nav-copy strong {
  color: #0b3c5d;
  font-size: 15px;
  line-height: 1.2;
}

.vsm-person-nav-copy small {
  margin-top: 3px;
  color: #607da3;
  font-size: 12px;
  font-weight: 700;
}

.vsm-person-nav-card.is-active {
  border-color: #1fa2a6;
  background: #eefafa;
  box-shadow: 0 0 0 1px rgba(31, 162, 166, .22), 0 10px 22px rgba(31, 162, 166, .14);
}

.vsm-person-nav-card.is-active .vsm-person-nav-index {
  background: #1fa2a6;
  color: #fff;
}

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

.vsm-person-type-row {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border: 1px solid #e1edf7;
  border-radius: 10px;
  background: #fbfdff;
}

.vsm-person-type-label {
  color: #0b3c5d;
  font-size: 13px;
  font-weight: 800;
}

.vsm-person-type-row .vsm-structure-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vsm-person-type-row .vsm-pill-sm {
  min-height: 40px;
  padding: 9px 12px;
  text-align: center;
}

.vsm-financing-section {
  background: linear-gradient(180deg, #f2fafb 0%, #ffffff 100%) !important;
  border-color: #bfe6ea !important;
}

.vsm-financing-section .vsm-estrutura-label {
  color: #0a6970;
}

.vsm-financing-section .vsm-form-grid {
  align-items: end;
}

@media (max-width: 768px) {
  .vsm-data-block,
  .vsm-estrutura-section {
    padding: 14px;
  }

  .vsm-footer-nav {
    position: static;
    margin: 18px -18px -18px;
    padding: 14px 18px;
  }

  .vsm-btn.vsm-btn-wa {
    min-width: 0;
  }

  .vsm-consents-intro {
    display: grid;
  }

  .vsm-consent-policy {
    width: fit-content;
  }

  .vsm-person-type-grid {
    grid-template-columns: 1fr;
  }

  .vsm-step-panel-revisao .vsm-party-cards {
    grid-template-columns: 1fr;
  }
}

/* Recolha automática (hAPI) — cartão no topo do passo dos documentos, antes do OCR */
.vsm-hapi-card {
  margin: 0 0 20px;
  padding: 16px 18px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}
.vsm-hapi-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.vsm-hapi-icon { font-size: 22px; line-height: 1.2; }
.vsm-hapi-title { display: block; margin-bottom: 4px; }
.vsm-hapi-desc { margin: 0; font-size: 14px; line-height: 1.5; }
.vsm-hapi-card .vsm-hapi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  text-decoration: none;
}
/* Deal ainda por criar (saveDraft em fundo): nunca oferece o link com o id do
   Lead (ver hapi_recolha_contra_lead_id). Mesmo texto, sem acção enquanto pende. */
.vsm-hapi-card .vsm-hapi-btn.is-disabled {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}
.vsm-hapi-note,
.vsm-hapi-alt { margin: 8px 0 0; font-size: 13px; }
.vsm-hapi-alt { margin-top: 4px; }

/* ===== Triagem Habitação / Transferência (F3 — docs/spec-triagem-habitacao.md) ===== */
.vpw-triagem-habitacao { max-width: 640px; }
.vpw-triagem-habitacao .vsm-triagem-panel { padding: 24px; }
.vsm-triagem-objective-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 4px;
}
@media (max-width: 560px) { .vsm-triagem-objective-grid { grid-template-columns: 1fr; } }
.vsm-triagem-objective-grid .vsm-card-btn { text-align: left; padding: 14px; }
.vsm-triagem-pick-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.vsm-triagem-label-standalone {
  font-weight: 600;
  color: var(--vsm-navy, #0b3c5d);
  margin: 12px 0 4px;
}
/* Frase de ajuda por baixo do nome curto do campo (igual ao formulário do WhatsApp) */
.vsm-triagem-ajuda {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #5b6b7a;
  margin: 2px 0 6px;
}
/* Duas frases de ajuda lado a lado com comprimentos diferentes: as caixas de escrever ficam à mesma altura */
.vpw-triagem-habitacao .vsm-form-grid label:has(> .vsm-triagem-ajuda) {
  grid-template-rows: auto 1fr auto;
  align-self: stretch;
}
.vsm-triagem-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.vsm-triagem-error {
  color: var(--vsm-danger, #d63638);
  font-size: 13px;
  margin: 8px 0 0;
}
.vsm-triagem-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0;
}
.vsm-triagem-consent input { margin-top: 3px; }
.vsm-triagem-fineprint {
  font-size: 16px;
  color: #64748b;
  margin-top: 14px;
  line-height: 1.5;
}
.vsm-triagem-result .vsm-triagem-semaforo {
  display: inline-block;
  color: #fff;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: .02em;
}
.vsm-triagem-doclist { margin: 6px 0 14px; padding-left: 20px; }
.vsm-triagem-doclist li { margin-bottom: 4px; }
/* 1.0.146: o cartão de cidadão no resultado da triagem (campos de ficheiro e a confirmação) */
.vsm-triagem-cartao { margin-top: 16px; }
.vsm-triagem-cartao input[type="file"] { width: 100%; max-width: 100%; font-size: 14px; }
.vsm-triagem-cartao-recebido { font-weight: 600; color: var(--vsm-navy, #0b3c5d); margin-top: 16px; }
.vsm-triagem-savings-note {
  background: rgba(31,162,166,.08);
  border: 1px solid var(--vsm-border, #cad7ea);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.55;
}

/* ─── 1.0.104 (P8 da auditoria da recolha de 18/10/2026): ecrã final com o passo seguinte ─── */
.vsm-fim-a-abrir { opacity: 0; min-height: 240px; }
.vsm-step-panel.vsm-fim { overflow-wrap: anywhere; }
.vsm-fim-falta { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: #3f5563; }
.vsm-fim-lista { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0 0 16px; }
.vsm-fim-pessoa { border: 1px solid #d6e3f1; border-radius: 12px; padding: 12px 14px; background: #fff; }
.vsm-step-panel .vsm-fim-pessoa h4 { margin: 0 0 6px; padding: 0; border: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--vsm-navy); }
.vsm-fim-pessoa ul { margin: 0; padding: 0 0 0 18px; list-style: disc; }
.vsm-fim-pessoa li { margin: 3px 0; font-size: 15px; line-height: 1.45; color: var(--vsm-navy); }
.vsm-proposal-wizard a.vsm-fim-botao,
.vsm-proposal-wizard a.vsm-fim-botao:visited {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 10px 20px;
  border-radius: 8px; background: var(--vsm-teal); color: #fff; font-size: 15px; font-weight: 700; line-height: 1.3;
  text-align: center; text-decoration: none; box-sizing: border-box; box-shadow: 0 14px 28px rgba(12, 70, 86, .16);
}
.vsm-proposal-wizard a.vsm-fim-botao:hover { background: #1a9499; color: #fff; text-decoration: none; }
.vsm-proposal-wizard a.vsm-fim-botao:focus-visible,
.vsm-proposal-wizard a.vsm-fim-botao-sec:focus-visible { outline: 3px solid var(--vsm-navy); outline-offset: 2px; }
.vsm-fim-aviso { margin: 12px 0 0; padding: 9px 12px; border: 1px dashed #9fd8d6; border-radius: 10px; background: #eefaf9; font-size: 14px; line-height: 1.45; color: #285b63; }
.vsm-fim-duas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 16px 0 0; }
.vsm-fim-cartao { border: 1px solid #d6e3f1; border-radius: 12px; padding: 14px; background: #fff; }
.vsm-fim-cartao p { margin: 0; font-size: 14px; line-height: 1.5; color: #3f5563; }
.vsm-fim-cartao b,
.vsm-fim-recolha b { display: block; margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--vsm-navy); }
.vsm-fim-qr { display: flex; align-items: center; gap: 14px; }
.vsm-fim-qr-img { flex: none; width: 156px; height: 156px; line-height: 0; }
.vsm-fim-qr-img svg { display: block; width: 100%; height: 100%; }
.vsm-fim-recolha { border: 1px solid #9fd8d6; border-radius: 12px; padding: 14px; background: #eefaf9; }
.vsm-fim-recolha p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: #3f5563; }
.vsm-proposal-wizard a.vsm-fim-botao-sec,
.vsm-proposal-wizard a.vsm-fim-botao-sec:visited {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 8px 18px;
  border: 1px solid var(--vsm-teal); border-radius: 8px; background: #fff; color: #0f7f84; font-size: 15px; font-weight: 700;
  line-height: 1.3; text-align: center; text-decoration: none; box-sizing: border-box;
}
.vsm-proposal-wizard a.vsm-fim-botao-sec:hover { background: #f4fbfb; color: #0f7f84; text-decoration: none; }
.vsm-fim-rodape { margin: 16px 0 0; font-size: 14px; line-height: 1.55; color: #6b7f95; }
@media (min-width: 720px) {
  .vsm-fim-lista { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .vsm-fim-duas { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .vsm-proposal-wizard a.vsm-fim-botao-sec { display: inline-flex; width: auto; }
}

/* ── 1.0.116 (19/10/2026): passo «Documentos» com a lista da página «Os meus documentos» (assets/css/meus-docs.css) ── */
.vsm-docs-lista .vsm-docs-aparelho { font-size: 14px; color: #3f5563; background: #f4f6f8; border: 1px solid #dfe5ec; border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; }
.vsm-docs-lista .vsm-md { margin: 0 0 8px; }
.vsm-docs-lista .vsm-md .md-p h2 { font-size: 17px; }
.vsm-docs-lista .vsm-docs-leitura { min-height: 1.4em; font-size: 14px; margin: 0 0 10px; }
.vsm-docs-lista .vsm-docs-varios { border: 1px dashed #c9d2dd; border-radius: 12px; padding: 10px 14px; margin: 6px 0 12px; background: #fff; }
.vsm-docs-lista .vsm-docs-varios > summary { cursor: pointer; font-size: 15px; font-weight: 600; color: #0B2C3D; }
.vsm-docs-lista .vsm-docs-varios[open] > summary { margin-bottom: 10px; }
.vsm-docs-lista .vsm-docs-depois { font-size: 14px; margin: 4px 0 0; text-align: left; }
/* O campo de ficheiros antigo dentro da caixa: sem a moldura própria (era «inline» e a borda riscava o texto) e sem o
   título e a dica, que repetiam o resumo da caixa. */
.vsm-docs-lista .vsm-docs-varios .vsm-file-field { display: block; border: 0; padding: 0; background: none; }
.vsm-docs-lista .vsm-docs-varios .vsm-file-field > span:first-child,
.vsm-docs-lista .vsm-docs-varios .valore-upload-hint,
.vsm-docs-lista .vsm-docs-varios .valore-upload-name:empty { display: none; }

/* ── 1.0.117 (19/10/2026): autorização já provada no Lead (simulador, WhatsApp): sem caixa, com visto e «Já autorizado» ── */
.vsm-proposal-wizard .vsm-consent-item.is-provado .vsm-consent-visto { display: inline-flex; align-items: center; justify-content: center; width: 22px; font-size: 18px; font-weight: 700; color: #0f6b4f; }
.vsm-proposal-wizard .vsm-consent-item.is-provado .vsm-consent-tag-ok { background: #e3f3ec; color: #0f6b4f; border-color: #c4e3d4; }

/* ── 1.0.118 (19/10/2026): bloco «Documentos» no passo «Enviar» (uma linha por pessoa e as secções das outras pessoas) ── */
.vsm-proposal-wizard .vsm-docs-envio { margin: 18px 0 8px; padding: 14px 16px; border: 1px solid #dfe5ec; border-radius: 12px; background: #fff; }
.vsm-proposal-wizard .vsm-docs-envio h4 { margin: 0 0 8px; }
.vsm-proposal-wizard .vsm-docs-envio .vsm-docs-resumo { margin: 0 0 12px; }
.vsm-proposal-wizard .vsm-docs-envio .vsm-docs-resumo li { align-items: center; gap: 8px; text-align: left; hyphens: manual; }
.vsm-proposal-wizard .vsm-docs-envio .vsm-docs-resumo .vsm-docs-conta { white-space: nowrap; }
.vsm-proposal-wizard .vsm-docs-envio .vsm-docs-resumo .vsm-btn-link { margin-left: 6px; }
.vsm-proposal-wizard .vsm-docs-envio .vsm-md .md-p h2 { font-size: 16px; }
.vsm-proposal-wizard .vsm-docs-envio .vsm-docs-depois { margin: 8px 0 0; text-align: left; }

/* ── 1.0.119 (19/10/2026, João: «um cadeado a dizer ligação segura», «para dar mais confiança»): o ecrã de espera ── */
/* O cartão pode ser muito alto (a lista dos documentos): o cadeado fica perto do topo, à vista, e não a meio. */
.wizard-loader:not(.is-progress) { justify-content: flex-start; padding-top: 140px; }
.wizard-loader .spinner.vsm-seguro { width: 56px; height: 56px; border: 0; border-radius: 50%; background: #e3f3ec; display: flex; align-items: center; justify-content: center; animation: vsm-seguro-pulsa 1.6s ease-in-out infinite; }
.wizard-loader .spinner.vsm-seguro svg { width: 28px; height: 28px; }
.wizard-loader .loader-seguro { margin: 0; font-weight: 700; font-size: 15px; color: #0f6b4f; text-align: center; }
@keyframes vsm-seguro-pulsa { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(15, 107, 79, 0.25); } 50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(15, 107, 79, 0); } }
@media (prefers-reduced-motion: reduce) { .wizard-loader .spinner.vsm-seguro { animation: none; } }

/* ── 1.0.121 (20/10/2026, João: «acho que visualmente ainda não está bem»): bloco «Pessoas no pedido» no passo «Dados» ── */
.vsm-proposal-wizard .vsm-pessoas-escolhas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin: 4px 0 10px; }
.vsm-proposal-wizard .vsm-pessoas-escolha { display: flex; align-items: center; gap: 10px; }
.vsm-proposal-wizard .vsm-pessoas-escolha-t { font-size: 14px; font-weight: 600; color: #3f5563; }
.vsm-proposal-wizard .vsm-pessoas-escolha .vsm-structure-pills { margin: 0; }
.vsm-proposal-wizard .vsm-pessoas-escolha .vsm-pill-sm { min-width: 48px; justify-content: center; }
.vsm-proposal-wizard .vsm-pessoas-cartoes { display: grid; grid-template-columns: repeat(var(--pessoas, 3), minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
/* 1.0.122 (João: «devem caber os 4 numa linha»): no computador, todas as pessoas numa linha; mais estreito, duas; no
   telemóvel, uma. */
@media (max-width: 900px) { .vsm-proposal-wizard .vsm-pessoas-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .vsm-proposal-wizard .vsm-pessoas-cartoes { grid-template-columns: minmax(0, 1fr); } }
.vsm-proposal-wizard .vsm-pessoa-cartao { border: 1px solid #dfe5ec; border-radius: 12px; padding: 12px 14px; background: #fff; }
.vsm-proposal-wizard .vsm-pessoa-cartao.is-avalista { background: #fafbfc; }
.vsm-proposal-wizard .vsm-pessoa-papel { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #1a8a8e; }
.vsm-proposal-wizard .vsm-pessoa-nome { font-size: 16px; font-weight: 700; color: #0B2C3D; margin: 2px 0 10px; text-align: left; }
.vsm-proposal-wizard .vsm-pessoa-nome.is-vazio { font-weight: 500; color: #8a99a8; }
.vsm-proposal-wizard .vsm-pessoa-cartao .vsm-structure-pills { margin: 0; }
.vsm-proposal-wizard .vsm-pessoa-cartao.is-activa { border-color: #1fa2a6; box-shadow: 0 0 0 2px rgba(31, 162, 166, 0.18); }
.vsm-proposal-wizard .vsm-pessoa-preencher { display: inline-block; margin-top: 10px; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 600; color: #0B3C5D; text-decoration: underline; cursor: pointer; }
.vsm-proposal-wizard .vsm-pessoa-preencher.is-activa { color: #1a8a8e; text-decoration: none; cursor: default; }
.vsm-proposal-wizard .vsm-pessoa-a-preencher { margin: 18px 0 10px; padding: 10px 14px; border-radius: 10px; background: #eef6f6; color: #0B2C3D; font-size: 15px; text-align: left; }
/* No telemóvel, as escolhas e o tipo de cada pessoa ficam em linha (a regra geral põe cada botão a meia largura e, em
   caixas estreitas, um por linha). */
.vsm-proposal-wizard .vsm-pessoas .vsm-structure-pills { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.vsm-proposal-wizard .vsm-pessoas .vsm-pill { flex: 0 0 auto; min-width: 56px; width: auto; }
@media (max-width: 640px) {
  .vsm-proposal-wizard .vsm-pessoas-escolhas { gap: 10px; }
  .vsm-proposal-wizard .vsm-pessoas-escolha { width: 100%; flex-direction: column; align-items: flex-start; gap: 6px; }
}
/* 1.0.122: o cartão de outra pessoa escolhe-a (cursor e realce ao passar); os botões do tipo cabem lado a lado. */
.vsm-proposal-wizard .vsm-pessoa-cartao.is-escolhivel { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.vsm-proposal-wizard .vsm-pessoa-cartao.is-escolhivel:hover { border-color: #9fd3d4; box-shadow: 0 2px 8px rgba(11, 60, 93, 0.08); }
.vsm-proposal-wizard .vsm-pessoa-cartao .vsm-pill-sm { padding: 6px 12px; min-width: 0; }
/* 1.0.123: no «Enviar», um resumo por pessoa (papel, nome e «Corrigir»), com as cores dos cartões do «Dados». */
.vsm-proposal-wizard .vsm-resumo-pessoa { padding: 10px 0; border-bottom: 1px solid rgba(96, 125, 163, 0.14); }
.vsm-proposal-wizard .vsm-resumo-pessoa:last-child { border-bottom: 0; padding-bottom: 2px; }
.vsm-proposal-wizard .vsm-resumo-pessoa-topo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; }
.vsm-proposal-wizard .vsm-resumo-papel { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #1a8a8e; }
.vsm-proposal-wizard .vsm-resumo-nome { font-size: 15px; color: #0B2C3D; }
.vsm-proposal-wizard .vsm-resumo-pessoa-topo .vsm-resumo-corrigir { margin-left: auto; font-size: 13px; }
.vsm-proposal-wizard .vsm-resumo-campos { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 13px; line-height: 1.6; color: #0B2C3D; }
.vsm-proposal-wizard .vsm-resumo-campo > span { color: #607da3; }
/* 1.0.124: pessoas pedidas depois da submissão: sem a barra dos passos (o ecrã é só o dessas pessoas). */
.vsm-proposal-wizard.vsm-modo-pedidas .vsm-steps, .vsm-proposal-wizard.vsm-modo-pedidas .vsm-progress { display: none; }
/* 1.0.124: acrescentar e retirar pessoas no ecrã das pessoas pedidas. */
.vsm-proposal-wizard .vsm-pessoas-acrescentar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.vsm-proposal-wizard .vsm-pessoa-cartao .vsm-pessoa-retirar { display: inline-block; margin-top: 8px; font-size: 12px; color: #9e1f22; }
.vsm-proposal-wizard .vsm-pessoas-nenhuma { margin: 10px 0 0; text-align: left; }

/* ── Espaço do passo 1 antes de o JS montar (1.0.141, 01/11/2026) ───────────────────────────────────────────────
   PageSpeed móvel da /proposta-de-credito/: CLS 0,909. O PHP serve a barra dos passos e o conteúdo do passo vazios
   (`.vsm-steps` e `[data-bind="step-content"]`) e o JS enche-os; até lá o formulário tinha 217 px no telemóvel e o
   rodapé da página estava à vista, a 542 px, e descia para 1748 px quando o passo 1 aparecia. Reserva-se a altura do
   passo 1 SÓ enquanto estão vazios (`:empty`): depois de montar, a altura é a do conteúdo, como sempre, e o
   formulário não muda. Medido a 01/11/2026 na página real (passo 1, «Começar», pessoal e automóvel iguais), de
   320 a 1920 px: cada valor é a altura na largura MAIOR da faixa, isto é, a menor da faixa, para nunca sobrar
   espaço em branco; o que faltar cresce abaixo da dobra. Se o passo 1 mudar de altura, medir de novo
   (getBoundingClientRect da `.vsm-main` e da `.vsm-steps` no passo 1, por largura). */
.vsm-proposal-wizard .vsm-steps:empty { box-sizing: border-box; min-height: 69px; }
.vsm-proposal-wizard .vsm-main[data-bind="step-content"]:empty { box-sizing: border-box; min-height: 598px; }
@media (max-width: 768px) {
  .vsm-proposal-wizard .vsm-steps:empty { min-height: 67px; }
  .vsm-proposal-wizard .vsm-main[data-bind="step-content"]:empty { min-height: 681px; }
}
@media (max-width: 600px) {
  .vsm-proposal-wizard .vsm-steps:empty { min-height: 58px; }
  .vsm-proposal-wizard .vsm-main[data-bind="step-content"]:empty { min-height: 813px; }
}
@media (max-width: 430px) {
  .vsm-proposal-wizard .vsm-main[data-bind="step-content"]:empty { min-height: 1155px; }
}
@media (max-width: 390px) {
  .vsm-proposal-wizard .vsm-main[data-bind="step-content"]:empty { min-height: 1362px; }
}
@media (max-width: 360px) {
  .vsm-proposal-wizard .vsm-main[data-bind="step-content"]:empty { min-height: 1481px; }
}
