/* ============================================================
   midas — cadastro + aquisição
   Layout espelha a tela de login (split dark/mint).
   AJUSTE DE BRAND: CTA em Verde Profundo (#4A7C59).
   Lilás apenas como acento — nunca domina (brand guide p.7/9).
   ============================================================ */

:root {
  --green-soft: #A8D5BA;
  --green-deep: #4A7C59;
  --green-darker: #3B6648;
  --green-ink: #1E3D2A;
  --lilac: #CDB4DB;
  --lilac-soft: #EDE4F7;
  --lilac-deep: #6B5FA6;
  --ink: #1A2420;
  --ink-soft: #5B6760;
  --ink-mute: #8A958E;

  /* right side (mint) */
  --mint: #EAF1EA;
  --mint-2: #E3EDE4;
  --paper: #FFFFFF;
  --line: #DCE5DC;
  --line-soft: #E6EDE6;

  /* lavender inputs (accent tint, from login) */
  --field-bg: #EFEDFB;
  --field-bd: #E0DBF3;
  --field-bd-focus: var(--green-deep);

  --label: #8A8F98;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --f-display: "Sora", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;

  --sh-sm: 0 2px 8px rgba(31,42,36,.05);
  --sh-md: 0 14px 36px -14px rgba(31,42,36,.16);
  --sh-lg: 0 30px 70px -28px rgba(31,42,36,.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--mint);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }
svg { display: block; }
input, select { font: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
}

/* ============================================================
   LEFT — dark, leaves + sparkles
   ============================================================ */
.auth-left {
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  isolation: isolate;
}
.bg-grad {
  position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(120% 80% at 18% 8%, #234436 0%, transparent 55%),
    radial-gradient(120% 90% at 90% 100%, #34215a 0%, transparent 60%),
    linear-gradient(152deg, #1c3a2c 0%, #26304a 46%, #2c2150 100%);
}
.auth-left::after { /* subtle dotted texture */
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: .35;
  mask-image: radial-gradient(120% 100% at 60% 40%, #000 40%, transparent 85%);
}

/* leaves */
.leaf { position: absolute; z-index: -1; will-change: transform; }
.leaf-tl { top: -60px; left: -50px; width: 230px; transform: rotate(18deg); }
.leaf-tr { top: 6%; right: -70px; width: 200px; transform: rotate(-32deg); opacity: .8; }
.leaf-bl { bottom: -40px; left: -30px; width: 240px; transform: rotate(-8deg); opacity: .9; }
.leaf-br { bottom: 8%; right: -50px; width: 210px; transform: rotate(24deg); }

/* sparkles */
.sparkles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sparkles .dot {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #fff; opacity: .5;
}
.sparkles .dot.d1 { top: 12%; left: 30%; } .sparkles .dot.d2 { top: 20%; left: 62%; opacity:.35; }
.sparkles .dot.d3 { top: 34%; left: 18%; } .sparkles .dot.d4 { top: 44%; left: 75%; opacity:.4; }
.sparkles .dot.d5 { top: 56%; left: 40%; opacity:.3; } .sparkles .dot.d6 { top: 66%; left: 22%; }
.sparkles .dot.d7 { top: 72%; left: 66%; opacity:.45; } .sparkles .dot.d8 { top: 84%; left: 48%; opacity:.3; }
.sparkles .dot.d9 { top: 28%; left: 88%; opacity:.4; }
.sparkles .cross {
  position: absolute; color: var(--green-soft);
  font-family: var(--f-body); font-weight: 300; font-size: 16px;
  opacity: .5; line-height: 1;
}
.sparkles .cross.c1 { top: 16%; left: 48%; } .sparkles .cross.c2 { top: 38%; left: 70%; }
.sparkles .cross.c3 { top: 60%; left: 12%; } .sparkles .cross.c4 { top: 78%; left: 58%; }
.sparkles .cross.c5 { top: 50%; left: 52%; font-size: 12px; opacity:.4; }
.sparkles .cross.c6 { top: 24%; left: 8%; font-size: 13px; }
.big-spk { position: absolute; will-change: transform; }
.big-spk.bs-1 { top: 30%; right: 16%; width: 26px; animation: floatSpk 9s ease-in-out infinite; }
.big-spk.bs-2 { bottom: 18%; left: 34%; width: 20px; animation: floatSpk 11s ease-in-out infinite -3s; }
@keyframes floatSpk { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(12deg); } }

/* left content */
.left-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  padding: clamp(32px, 4vw, 56px);
  width: 100%;
}
.auth-brand {
  display: inline-flex; align-items: center;
}
.auth-logo {
  height: 38px;
  width: auto;
  display: block;
}
.left-body { margin-top: auto; padding-top: 48px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(168,213,186,.3);
  font-size: 13px; color: var(--green-soft); font-weight: 500;
}
.left-body h1 {
  margin-top: 22px;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(34px, 3.6vw, 50px); line-height: 1.04;
  letter-spacing: -.025em; color: #fff;
}
.left-body h1 .accent { color: var(--green-soft); }
.left-body > p {
  margin-top: 16px; max-width: 380px;
  font-size: 15.5px; line-height: 1.55; color: rgba(255,255,255,.62);
}

/* order summary (live) */
.summary {
  margin-top: 30px; max-width: 400px;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.summary-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.5); font-weight: 600; margin-bottom: 14px;
}
.summary-plan { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sp-name { font-family: var(--f-display); font-size: 18px; font-weight: 600; color: #fff; }
.sp-cycle { font-size: 12.5px; color: rgba(255,255,255,.55); margin-top: 2px; }
.sp-price { font-family: var(--f-display); font-size: 22px; font-weight: 600; color: var(--green-soft); white-space: nowrap; }
.sp-price span { font-family: var(--f-body); font-size: 13px; font-weight: 400; color: rgba(255,255,255,.5); }
.summary-line { height: 1px; background: rgba(255,255,255,.10); margin: 16px 0; }
.summary-rows { display: flex; flex-direction: column; gap: 8px; }
.summary-rows li { display: flex; justify-content: space-between; font-size: 13.5px; color: rgba(255,255,255,.72); }
.summary-rows .free { color: var(--green-soft); }
.summary-total { display: flex; justify-content: space-between; align-items: center; }
.st-label { font-family: var(--f-display); font-size: 15px; font-weight: 600; color: #fff; }
.st-sub { font-size: 11.5px; color: rgba(255,255,255,.5); margin-top: 2px; }
.st-value { font-family: var(--f-display); font-size: 26px; font-weight: 600; color: #fff; }

.trust {
  margin-top: 20px; display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 12px; color: rgba(255,255,255,.55);
}
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { opacity: .8; }

.left-foot {
  margin-top: 40px; display: flex; gap: 8px;
  font-size: 12px; color: rgba(255,255,255,.4);
}
.left-foot .sep { opacity: .5; }

/* ============================================================
   RIGHT — form
   ============================================================ */
.auth-right {
  background: var(--mint);
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(32px, 4vw, 64px) clamp(20px, 4vw, 64px);
  overflow-y: auto;
  max-height: 100vh;
}
.form-wrap { width: 100%; max-width: 440px; position: relative; margin: auto; }

/* progress */
.progress {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 34px;
}
.pstep {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-mute);
  transition: color .2s;
}
.pstep .pnum {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-display); font-size: 12px; font-weight: 600;
  background: var(--mint-2); color: var(--ink-mute);
  border: 1.5px solid var(--line-soft);
  transition: background .2s, color .2s, border-color .2s;
}
.pstep.active { color: var(--green-ink); }
.pstep.active .pnum { background: var(--green-deep); color: #fff; border-color: var(--green-deep); }
.pstep.done .pnum { background: var(--green-soft); color: var(--green-ink); border-color: var(--green-soft); }
.pstep.disabled { opacity: .4; }
.pline { flex: 1; height: 1.5px; background: var(--line); border-radius: 1px; }

/* steps */
.auth-form { display: block; }
.step { display: none; }
.step.active {
  display: flex; flex-direction: column; gap: 18px;
  animation: stepRise .4s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes stepRise { from { transform: translateY(8px); } to { transform: none; } }

.step-head { margin-bottom: 4px; }
.step-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.step-head h2 {
  font-family: var(--f-display); font-size: 27px; font-weight: 600;
  letter-spacing: -.02em; color: var(--green-ink);
}
.step-head .sub { margin-top: 7px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }
.step-head .sub b { color: var(--green-deep); font-weight: 600; }

.step-actions { display: flex; gap: 12px; margin-top: 8px; }
.step-actions .btn-primary { flex: 1; }
.alt-line { text-align: center; font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.alt-line a { color: var(--green-deep); font-weight: 600; }
.alt-line a:hover { text-decoration: underline; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 22px; border-radius: 13px;
  background: transparent; color: var(--ink-soft);
  border: 1.5px solid var(--line);
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  transition: border-color .18s, color .18s, background .18s;
}
.btn-ghost:hover { border-color: var(--green-soft); color: var(--green-deep); background: #fff; }

/* sections */
.form-section { display: flex; flex-direction: column; gap: 14px; }
.section-label {
  font-family: var(--f-display); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--green-deep);
  display: flex; align-items: center; gap: 8px;
}
.section-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
.field-uf { min-width: 0; }
.field > label {
  font-size: 11px; font-weight: 600; letter-spacing: .07em;
  color: var(--label); text-transform: uppercase;
}
.input {
  position: relative; display: flex; align-items: center;
  background: var(--field-bg);
  border: 1.5px solid var(--field-bd);
  border-radius: 12px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input:focus-within {
  border-color: var(--field-bd-focus);
  box-shadow: 0 0 0 4px rgba(74,124,89,.12);
  background: #fff;
}
.i-prefix { margin-left: 14px; color: var(--ink-mute); flex-shrink: 0; }
.input input, .input select {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: none;
  padding: 13px 14px; font-size: 15px; color: var(--ink);
}
.input input::placeholder { color: #A9B0Ac; }
.input select { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer; color: var(--ink); }
.input select:invalid { color: #A9B0Ac; }
.i-suffix { position: absolute; right: 12px; color: var(--ink-mute); pointer-events: none; }
.eye { padding: 0 14px; color: var(--ink-mute); display: grid; place-items: center; height: 100%; }
.eye:hover { color: var(--green-deep); }
.eye.on { color: var(--green-deep); }

/* password strength */
.strength { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.strength .bar { display: flex; gap: 4px; flex-shrink: 0; }
.strength .bar i {
  width: 26px; height: 4px; border-radius: 2px; background: var(--line);
  transition: background .25s;
}
.strength.s1 .bar i:nth-child(-n+1) { background: #E0A04A; }
.strength.s2 .bar i:nth-child(-n+2) { background: #E0A04A; }
.strength.s3 .bar i:nth-child(-n+3) { background: var(--green-soft); }
.strength.s4 .bar i { background: var(--green-deep); }
.strength-label { font-size: 11.5px; color: var(--ink-mute); }

/* ============================================================
   PLANS
   ============================================================ */
.cycle-toggle {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--mint-2); border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.cycle-toggle button {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px;
  transition: background .18s, color .18s;
}
.cycle-toggle button.active { background: #fff; color: var(--green-deep); box-shadow: var(--sh-sm); }
.cycle-toggle .save {
  font-size: 10.5px; font-weight: 600; color: var(--lilac-deep);
  background: var(--lilac-soft); padding: 1px 6px; border-radius: 999px;
}

.plans { display: flex; flex-direction: column; gap: 10px; }
.plan {
  position: relative; display: grid;
  grid-template-columns: 22px 1fr auto; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-md);
  background: var(--paper); border: 1.5px solid var(--line-soft);
  cursor: pointer; transition: border-color .18s, box-shadow .18s, background .18s;
}
.plan-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.plan:hover { border-color: var(--green-soft); }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan .radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line); position: relative; transition: border-color .18s;
}
.plan-name { font-family: var(--f-display); font-size: 15.5px; font-weight: 600; color: var(--green-ink); display: flex; align-items: center; gap: 8px; }
.plan-desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.plan-price { text-align: right; font-family: var(--f-display); font-weight: 600; font-size: 17px; color: var(--green-ink); white-space: nowrap; }
.plan-price span { display: block; font-family: var(--f-body); font-size: 11px; font-weight: 400; color: var(--ink-mute); margin-top: 1px; }
.plan-price .annual-eq { color: var(--green-deep); }
.plan.selected {
  border-color: var(--green-deep);
  background: linear-gradient(180deg, #fff, #F1F7F2);
  box-shadow: 0 0 0 4px rgba(74,124,89,.10);
}
.plan.selected .radio { border-color: var(--green-deep); }
.plan.selected .radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--green-deep);
}
.plan-badge {
  font-size: 10px; font-weight: 600; text-transform: lowercase; letter-spacing: .02em;
  color: var(--lilac-deep); background: var(--lilac-soft);
  padding: 2px 8px; border-radius: 999px;
}

/* ============================================================
   PAYMENT
   ============================================================ */
#paymentSection {
  overflow: hidden;
  transition: max-height .4s ease, opacity .3s, margin .3s;
}
#paymentSection.hidden {
  max-height: 0 !important; opacity: 0; margin: 0; gap: 0; pointer-events: none;
}
.pay-card {
  background: var(--paper); border: 1.5px solid var(--line-soft);
  border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.pay-card .field > label { color: var(--label); }
.card-field .input { position: relative; }
.card-brand {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 4px; pointer-events: none;
}
.card-brand svg { width: 30px; height: 20px; border-radius: 3px; opacity: .35; transition: opacity .18s; }
.card-brand svg.on { opacity: 1; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stripe-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-soft); padding: 2px;
}
.stripe-note b { color: var(--lilac-deep); font-weight: 600; }
.stripe-note svg { color: var(--green-deep); }

/* ============================================================
   CHECK + BUTTONS
   ============================================================ */
.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--ink-soft); cursor: pointer; line-height: 1.45;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 19px; height: 19px; border-radius: 6px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--field-bd); background: var(--field-bg); position: relative;
  transition: background .18s, border-color .18s;
}
.check input:checked + .box { background: var(--green-deep); border-color: var(--green-deep); }
.check input:checked + .box::after {
  content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 10px;
  border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg);
}
.check .ctxt a { color: var(--green-deep); font-weight: 500; }
.check .ctxt a:hover { text-decoration: underline; }

.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 22px; border-radius: 13px;
  background: var(--green-deep); color: #fff;
  font-family: var(--f-display); font-weight: 600; font-size: 15.5px;
  box-shadow: 0 10px 24px -10px rgba(74,124,89,.6), inset 0 1px 0 rgba(255,255,255,.16);
  transition: background .2s, transform .15s, box-shadow .2s;
  overflow: hidden;
}
.btn-primary:hover { background: var(--green-darker); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary.loading { color: transparent; pointer-events: none; }
.btn-primary .spinner {
  position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite; opacity: 0;
}
.btn-primary.loading .spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--ink-mute); font-size: 12.5px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.social { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.soc {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px; border-radius: 12px; background: var(--paper);
  border: 1.5px solid var(--line-soft); font-size: 14px; font-weight: 500; color: var(--ink);
  transition: border-color .18s, background .18s;
}
.soc:hover { border-color: var(--green-soft); background: #fff; }

.login-link { text-align: center; font-size: 14px; color: var(--ink-soft); }
.login-link a { color: var(--green-deep); font-weight: 600; }
.login-link a:hover { text-decoration: underline; }

/* ============================================================
   SUCCESS
   ============================================================ */
.success {
  position: absolute; inset: -4px; z-index: 10;
  background: var(--mint); border-radius: var(--r-xl);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px; gap: 14px;
  animation: fadeIn .4s ease;
}
.success[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.success-ic {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green-deep); color: #fff;
  display: grid; place-items: center; margin-bottom: 6px;
  animation: pop .5s cubic-bezier(.2,1.3,.4,1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success h3 { font-family: var(--f-display); font-size: 24px; font-weight: 600; color: var(--green-ink); }
.success p { font-size: 14.5px; color: var(--ink-soft); max-width: 320px; }
.success .dots { display: inline-flex; gap: 5px; margin-top: 8px; }
.success .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--green-soft); animation: blink 1.2s ease-in-out infinite; }
.success .dots i:nth-child(2) { animation-delay: .2s; }
.success .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .auth { grid-template-columns: 1fr; }
  .auth-left { min-height: auto; }
  .auth-left .summary, .auth-left .trust { display: none; }
  .left-body { padding-top: 28px; }
  .left-body > p { display: none; }
  .left-body h1 { font-size: 30px; }
  .auth-right { max-height: none; }
  .left-content { padding: 32px; }
  .left-foot { margin-top: 28px; }
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr 90px; }
  .pay-row { grid-template-columns: 1fr 1fr; }
  .social { grid-template-columns: 1fr; }
  .plan { grid-template-columns: 20px 1fr; }
  .plan-price { grid-column: 2; text-align: left; margin-top: 4px; }
}
