:root {
  --bg: #07111f;
  --bg-soft: #0c1b30;
  --card: rgba(12, 27, 48, 0.75);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #eef4ff;
  --muted: #9eb1d0;
  --primary: #51a2ff;
  --primary-2: #8a5cff;
  --success: #2dd4bf;
  --warning: #f59e0b;
  --danger: #fb7185;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(81,162,255,0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(138,92,255,0.18), transparent 30%),
    linear-gradient(180deg, #050b14 0%, #07111f 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.page-shell {
  width: min(1640px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 42px;
  position: relative;
}

.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.18;
  z-index: 0;
}
.ambient--1 { background: #2888ff; top: -100px; left: -80px; }
.ambient--2 { background: #8a5cff; right: -120px; bottom: 10%; }

.hero, .main-grid { position: relative; z-index: 2; }
.hero {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  width: fit-content;
  box-shadow: var(--shadow);
}
.brand-pill__logo, .preloader__logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  padding: 8px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--muted);
}
.hero h1 { margin: 4px 0 0; font-size: clamp(28px, 4vw, 44px); }
.hero__text {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.section-title {
  margin: 6px 0 0;
  font-size: 20px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.glass-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: visible;
}

.form-card { padding: 24px; position: relative; z-index: 20; overflow: visible; }
.side-card { padding: 24px; height: fit-content; position: sticky; top: 20px; z-index: 2; }
label, .field, .select-wrap { position: relative; overflow: visible; }
.progress-wrap {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.progress-wrap h2, .side-card h3 { margin: 6px 0 0; }
.progress-meta {
  display: grid;
  gap: 4px;
  text-align: right;
}
.progress-meta strong { font-size: 20px; }
.progress-meta span { color: var(--muted); }
.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-bottom: 20px;
}
.progress-bar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.step { display: none; animation: rise .35s ease; }
.step.active { display: block; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


.section-lead, .section-sublead {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 860px;
  font-size: 14px;
}

label span {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
label span .help-tip { flex: 0 0 auto; }
label span:first-child { min-height: 20px; }

.help-tip {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(129, 166, 255, 0.45);
  background: rgba(95, 132, 255, 0.12);
  color: #bfd0ff;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: help;
  position: relative;
  isolation: isolate;
  z-index: 60;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.help-tip:hover,
.help-tip:focus-visible {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(129, 166, 255, 0.8);
  background: rgba(95, 132, 255, 0.2);
}
.help-tip i { font-size: 11px; }
.help-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translate(-50%, 8px);
  width: min(320px, 72vw);
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(7, 16, 34, 0.98);
  color: #eef4ff;
  border: 1px solid rgba(120, 144, 255, 0.28);
  box-shadow: 0 18px 44px rgba(0,0,0,0.34);
  line-height: 1.55;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 9999;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.help-tip::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(7, 16, 34, 0.98);
  border-right: 1px solid rgba(120, 144, 255, 0.28);
  border-bottom: 1px solid rgba(120, 144, 255, 0.28);
  opacity: 0;
  visibility: hidden;
  z-index: 9999;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.help-tip:hover::after,
.help-tip:hover::before,
.help-tip:focus-visible::after,
.help-tip:focus-visible::before {
  opacity: 1;
  visibility: visible;
}
.help-tip:hover::after,
.help-tip:focus-visible::after {
  transform: translate(-50%, 0);
}
.help-tip:hover::before,
.help-tip:focus-visible::before {
  transform: translateX(-50%) rotate(45deg);
}
@media (max-width: 768px) {
  .help-tip::after {
    left: auto;
    right: 0;
    transform: translate(0, 8px);
    width: min(280px, 72vw);
  }
  .help-tip::before {
    left: auto;
    right: 8px;
    transform: rotate(45deg);
  }
  .help-tip:hover::after,
  .help-tip:focus-visible::after {
    transform: translate(0, 0);
  }
  .help-tip:hover::before,
  .help-tip:focus-visible::before {
    transform: rotate(45deg);
  }
}

.summary-box h4 {
  margin: 0;
  font-size: 18px;
}
.summary-box > p {
  margin: 8px 0 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 16px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 10px;
}
label span {
  font-weight: 600;
  font-size: 14px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 18px;
  padding: 15px 16px;
  outline: none;
  transition: .2s ease;
  font: inherit;
}
input::placeholder, textarea::placeholder { color: #7f94b8; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(81,162,255,0.7);
  box-shadow: 0 0 0 4px rgba(81,162,255,0.16);
}
textarea { resize: vertical; }

.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "\f107";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #d7e5ff;
  pointer-events: none;
  opacity: 0.9;
}
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 46px;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    rgba(255,255,255,0.04);
}
select option,
select optgroup {
  background-color: #0c1b30;
  color: #eef4ff;
}

.legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.profile-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.profile-pill {
  border-radius: 22px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.profile-pill.active {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
}
.profile-pill__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 18px;
  border: 1px solid rgba(255,255,255,0.08);
}
.profile-pill strong { display: block; margin-bottom: 8px; }
.profile-pill p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.profile-pill--safe .profile-pill__icon { background: linear-gradient(135deg, rgba(45,212,191,0.26), rgba(59,130,246,0.20)); }
.profile-pill--balanced .profile-pill__icon { background: linear-gradient(135deg, rgba(245,158,11,0.22), rgba(81,162,255,0.18)); }
.profile-pill--aggressive .profile-pill__icon { background: linear-gradient(135deg, rgba(251,113,133,0.22), rgba(138,92,255,0.22)); }
.profile-pill--safe.active { border-color: rgba(45,212,191,0.45); }
.profile-pill--balanced.active { border-color: rgba(245,158,11,0.45); }
.profile-pill--aggressive.active { border-color: rgba(251,113,133,0.45); }

.recommendation-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.recommend-card,
.calc-card,
.summary-grid div,
.feature-item,
.success-step-item,
.notice-box,
.summary-box,
.final-stage {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.recommend-card {
  padding: 16px;
  border-radius: 20px;
  display: grid;
  gap: 10px;
}
.recommend-card span,
.calc-card span,
.summary-grid span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .01em;
}
.recommend-card strong,
.calc-card strong {
  font-size: 24px;
}
.recommend-card small {
  color: #bfd0ee;
  opacity: 0.82;
  line-height: 1.5;
}
.recommend-card.highlight,
.calc-card.highlight {
  background: linear-gradient(135deg, rgba(81,162,255,0.18), rgba(138,92,255,0.18));
}
.recommend-card--profile {
  background: linear-gradient(135deg, rgba(45,212,191,0.10), rgba(81,162,255,0.14));
}

.calculator-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.calc-card {
  padding: 16px;
  border-radius: 20px;
  display: grid;
  gap: 10px;
}
.notice-box, .summary-box, .final-stage {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  color: var(--muted);
  line-height: 1.6;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.summary-grid div {
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 92px;
  justify-content: center;
}
.summary-grid strong { font-size: 18px; display: block; line-height: 1.35; word-break: break-word; }

.final-stage {
  text-align: center;
}
.final-stage__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(45,212,191,0.24), rgba(81,162,255,0.22));
  font-size: 30px;
  color: #fff;
}
.final-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  text-align: left;
}
.final-list li {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 18px;
  padding: 14px 20px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--ghost { background: rgba(255,255,255,0.08); }
.btn--soft { background: rgba(255,255,255,0.06); }
.btn--primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.btn--success { background: linear-gradient(135deg, #11b3a2, #3b82f6); }

.feature-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.feature-item {
  padding: 16px;
  border-radius: 20px;
}
.feature-item strong { display: block; margin-bottom: 8px; }
.feature-item p { margin: 0; color: var(--muted); line-height: 1.6; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  align-content: center;
  gap: 22px;
  background:
    radial-gradient(circle at center, rgba(81,162,255,0.12), transparent 18%),
    rgba(5, 11, 20, 0.94);
  backdrop-filter: blur(14px);
  text-align: center;
}
.preloader.active { display: grid; }
.preloader__core {
  position: relative;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
}
.preloader__ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
}
.preloader__ring--one {
  border-top-color: rgba(81,162,255,0.85);
  border-right-color: rgba(138,92,255,0.55);
  animation: spin 1.6s linear infinite;
}
.preloader__ring--two {
  inset: 16px;
  border-left-color: rgba(45,212,191,0.8);
  border-bottom-color: rgba(81,162,255,0.4);
  animation: spinReverse 1.2s linear infinite;
}
.preloader__logoWrap {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 16px 44px rgba(0,0,0,0.26);
}
.preloader__logo {
  width: 58px;
  height: 58px;
}
.preloader__copy strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}
.preloader__copy p {
  margin: 0;
  color: var(--muted);
}
.preloader__dots {
  display: inline-flex;
  gap: 8px;
  margin-top: 14px;
}
.preloader__dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  animation: dots 1s infinite ease-in-out;
}
.preloader__dots span:nth-child(2) { animation-delay: .15s; }
.preloader__dots span:nth-child(3) { animation-delay: .3s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes dots {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
}
.modal__content {
  position: relative;
  z-index: 2;
  width: min(560px, calc(100% - 24px));
  padding: 26px;
  text-align: center;
}
.success-modal-card {
  overflow: hidden;
  background:
    radial-gradient(circle at top center, rgba(81,162,255,0.20), transparent 35%),
    radial-gradient(circle at bottom right, rgba(138,92,255,0.18), transparent 40%),
    rgba(12, 27, 48, 0.92);
}
.success-badge {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
}
.success-badge__ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(135deg, rgba(81,162,255,0.16), rgba(138,92,255,0.18));
  box-shadow: 0 0 0 10px rgba(255,255,255,0.02);
}
.success-badge__core {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 28px;
  box-shadow: 0 16px 40px rgba(81,162,255,0.28);
}
.success-modal__eyebrow { display: inline-block; margin-bottom: 10px; }
.success-modal__lead {
  max-width: 460px;
  margin: 0 auto 20px;
  color: var(--text);
  opacity: .92;
}
.success-steps {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  text-align: left;
}
.success-step-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
}
.success-step-item__icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(81,162,255,0.18), rgba(138,92,255,0.18));
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 18px;
}
.success-modal__actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

@media (max-width: 1120px) {
  .main-grid,
  .calculator-panel,
  .recommendation-band,
  .profile-legend { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .page-shell { width: min(100% - 20px, 1380px); }
  .form-card, .side-card { padding: 18px; }
  .brand-pill { width: 100%; border-radius: 26px; }
  .form-grid.two, .form-grid.three, .summary-grid { grid-template-columns: 1fr; }
  .form-actions, .legend-header { flex-direction: column; }
  .btn { width: 100%; }
  .profile-pill { grid-template-columns: 1fr; }
  .progress-wrap { align-items: start; flex-direction: column; }
  .progress-meta { text-align: left; }
}

input[readonly]{
  background: rgba(255,255,255,0.03);
  color: #d9e8ff;
  border-style: dashed;
}
.summary-grid div span{
  display:block;
  margin-bottom: 4px;
}
.summary-grid strong{
  margin-top: 2px;
}


.market-lock-card {
  margin-top: 18px;
  min-height: 124px;
  border-radius: 22px;
  padding: 20px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  background: linear-gradient(135deg, rgba(81,162,255,0.12), rgba(138,92,255,0.10));
  border: 1px solid rgba(129, 166, 255, 0.18);
}
.market-lock-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, rgba(81,162,255,0.24), rgba(138,92,255,0.24));
}
.market-lock-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}
.market-lock-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.form-grid.three > label {
  align-content: start;
}
.form-grid.three input,
.form-grid.three .select-wrap,
.form-grid.three select {
  min-height: 56px;
}
.summary-grid div {
  gap: 10px;
}
.summary-grid div strong {
  margin-top: 0;
}
@media (max-width: 760px) {
  .market-lock-card {
    grid-template-columns: 1fr;
  }
}


.field-helper{
  display:block;
  margin-top:8px;
  margin-bottom:2px;
  color:#9fb4d9;
  font-size:12px;
  line-height:1.45;
}
.field-helper strong{
  color:#ffffff;
  font-weight:700;
}

.field-helper{
  display:block;
  margin-top:8px;
  color:#9fb4d9;
  font-size:12px;
  line-height:1.45;
}
.field-helper strong{color:#fff;}
@media (max-width: 1280px){
  .main-grid{grid-template-columns:1fr;}
  .side-card{position:relative;top:0;}
}



/* V2.6 refinements */
.form-shell,
.main-grid,
.content-grid,
.form-grid {
  max-width: 1680px;
}
.form-grid-3,
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.field > span,
.label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.field .help,
.field .tooltip-trigger {
  flex: 0 0 auto;
}
input[data-locked="true"],
textarea[data-locked="true"] {
  opacity: 0.96;
  cursor: not-allowed;
}
input[readonly] {
  background: linear-gradient(180deg, rgba(33,48,76,.95), rgba(25,37,61,.95));
}
.sending-overlay,
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,8,18,.72);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sending-card,
.success-card {
  width: min(540px, 100%);
  border-radius: 28px;
  padding: 34px 28px;
  background: linear-gradient(180deg, rgba(9,20,40,.98), rgba(7,17,33,.98));
  border: 1px solid rgba(105,140,255,.28);
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
  text-align: center;
}
.sending-logo-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
}
.sending-spinner {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 3px solid rgba(120,120,255,.18);
  border-top-color: #7f67ff;
  border-right-color: #56a3ff;
  animation: spin360 1s linear infinite;
}
.sending-logo,
.success-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(86,163,255,.22), rgba(127,103,255,.28));
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  border: 1px solid rgba(115,141,255,.35);
  box-shadow: 0 16px 44px rgba(67, 106, 255, .18);
}
.success-icon i { font-size: 34px; }
.sending-card h3,
.success-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
}
.sending-card p,
.success-card p {
  margin: 0;
  color: #aab8d6;
  font-size: 16px;
  line-height: 1.7;
}
body.modal-open { overflow: hidden; }
@keyframes spin360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
[hidden] { display: none !important; }

.error-card {
  border-color: rgba(255,167,74,.32);
}
.error-icon {
  background: linear-gradient(135deg, rgba(255,157,66,.22), rgba(255,97,97,.22));
  border-color: rgba(255,170,93,.38);
}

.error-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,8,18,.72);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.error-card {
  width: min(520px, 100%);
  border-radius: 28px;
  padding: 34px 28px;
  background: linear-gradient(180deg, rgba(21,15,22,.98), rgba(15,10,17,.98));
  border: 1px solid rgba(255,138,138,.26);
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
  text-align: center;
}
.error-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255,150,90,.20), rgba(255,78,120,.22));
  color: #fff;
  font-size: 32px;
  border: 1px solid rgba(255,138,138,.30);
  box-shadow: 0 16px 44px rgba(255, 91, 91, .14);
}
.error-card h3 { margin: 0 0 10px; font-size: 28px; line-height: 1.15; }
.error-card p { margin: 0; color: #d8c7ce; font-size: 16px; line-height: 1.7; }


/* V3.1 navigation alignment + safety */
.step-actions,
.form-actions,
.navigation-actions,
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.step-actions .btn-primary,
.form-actions .btn-primary,
.navigation-actions .btn-primary,
.step-nav .btn-primary {
  margin-left: auto;
}
.step-actions .btn-secondary,
.form-actions .btn-secondary,
.navigation-actions .btn-secondary,
.step-nav .btn-secondary {
  margin-right: auto;
}
.step[hidden],
.form-step[hidden],
[data-step][hidden] {
  display: none !important;
}


/* V3.2 step visibility + actions alignment */
.form-actions {
  justify-content: flex-end;
  align-items: center;
}
.form-actions #prevBtn {
  margin-right: auto;
}
.form-actions.only-next {
  justify-content: flex-end;
}
.form-actions.only-next #prevBtn {
  display: none !important;
}
.form-actions.is-final #submitBtn:not([hidden]) {
  margin-left: auto;
}


/* V3.3 hard fix for step rendering */
.step,
.form-step,
[data-step] {
  display: none;
}
.step.active,
.form-step.active,
[data-step].active,
.step:not([hidden]),
.form-step:not([hidden]),
[data-step]:not([hidden]) {
  display: block !important;
}
.form-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 16px !important;
}
#prevBtn {
  margin-right: auto !important;
}
#nextBtn,
#submitBtn {
  margin-left: auto !important;
}
#prevBtn[hidden] + #nextBtn,
#prevBtn[hidden] + #nextBtn + #submitBtn[hidden] {
  margin-left: auto !important;
}


/* V3.4 isolate only the active step */
#clientForm > .step,
#clientForm > .form-step,
#clientForm > section[data-step] {
  display: none;
}
#clientForm > .step.active,
#clientForm > .form-step.active,
#clientForm > section[data-step].active {
  display: block !important;
}


/* V3.5 direct section visibility enforcement */
form#clientForm > section[data-step][hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
form#clientForm > section[data-step].active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
}


.confirm-card {
  max-width: 620px;
}
.confirm-points {
  display: grid;
  gap: 12px;
  margin: 20px 0 24px;
  text-align: left;
}
.confirm-points div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(120,140,200,.16);
  background: rgba(20,30,50,.42);
}
.confirm-points i {
  color: #79c3ff;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .confirm-actions {
    flex-direction: column-reverse;
  }
  .confirm-actions .btn {
    width: 100%;
  }
}


/* V4 clean step engine */
.multi-form > section.step {
  display: none !important;
}
.multi-form > section.step.active {
  display: block !important;
}
.multi-form > section.step[hidden] {
  display: none !important;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
}
.form-actions #prevBtn {
  margin-right: auto;
}
.form-actions.only-next #prevBtn {
  display: none !important;
}
.form-actions.is-final #submitBtn:not([hidden]) {
  margin-left: auto;
}


.term-card {
  margin-top: 26px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(123, 138, 255, 0.22);
  background: linear-gradient(180deg, rgba(17, 29, 52, 0.82), rgba(11, 21, 39, 0.88));
}
.term-card__header {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.term-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(87, 162, 255, 0.2), rgba(126, 104, 255, 0.22));
  border: 1px solid rgba(126, 104, 255, 0.25);
  color: #fff;
  font-size: 24px;
}
.term-card__header p,
.term-card__body p {
  color: #aebbd7;
}
.term-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(120,140,200,0.12);
}
.term-meta span {
  color: #d7e4ff;
  font-size: 14px;
}
.term-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 10px;
  cursor: pointer;
}
.term-consent input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
}
.term-consent span {
  color: #f3f7ff;
  line-height: 1.6;
}

#autentiqueSignBtn{display:inline-flex;margin:18px auto 12px;}
.success-card .btn + .btn{margin-left:10px;}

.waiting-card{max-width:680px}
.waiting-points{display:grid;gap:12px;margin:20px 0 24px;text-align:left}
.waiting-points div{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:16px;border:1px solid rgba(120,140,200,.16);background:rgba(20,30,50,.42)}
.waiting-points i{color:#79c3ff}
.signed-ok{color:#7dffb3;font-weight:600}
