/* ─────────────────────── FLUCSUS · NOVO FLUXO DE AUTH ───────────────────────
   Tokens extraídos de flucsus-login/*.html (Boas-vindas, Login, Senha, etc).
   Mobile-first, sem phone-frame em produção — visual interno preservado.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --brand-red:      #E11A3D;
  --brand-red-deep: var(--brand-strong);
  --brand-red-hover:var(--brand);
  --ink:            var(--text);
  --ink-soft:       #1F1F23;
  --muted:          #8A8A93;
  --muted-2:        #B9B6BC;
  --label:          #9D99A0;
  --hair:           #ECE7E8;
  --pill-bg:        #FCDCE3;
  --pill-text:      var(--brand-strong);
  --bg-1:           #FBF0F2;
  --bg-2:           #FFFFFF;
  --wave-1:         #FBDDE4;
  --wave-2:         #F7C9D2;
  --wave-3:         #F4BCC8;
  --card-bg:        #FFFFFF;
  --card-border:    #F4ECEE;
  --positive:       #1E8E3E;
  --warning:        #E8A33B;
  --negative:       #D93031;
  --info:           #2B7DE9;

  --r-sm:  10px;
  --r-md:  14px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 22px;
  --r-3xl: 28px;

  --shadow-soft: 0 2px 6px rgba(33, 22, 30, 0.04), 0 12px 28px rgba(33, 22, 30, 0.05);
  --shadow-cta:  0 8px 22px rgba(225, 26, 61, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 100% -10%, var(--brand-soft) 0%, rgba(255,227,233,0) 55%),
    radial-gradient(80% 50% at 0% 0%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FBF1F3 0%, #FCEEF1 60%, #FBE9ED 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Tela travada estilo app: sem pull-to-refresh, sem bounce, sem scroll lateral ── */
html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}
html { touch-action: pan-y; }
body {
  touch-action: manipulation;
  /* PWA standalone: fundo é o gradient pink que se estende edge-to-edge */
  background: #FBE9ED;
}

/* ─────────────────────── App shell ─────────────────────── */
.app {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  /* PWA standalone: ocupa display COMPLETO (statusbar + home indicator).
     O padding interno respeita as safe areas. */
  display: flex;
  flex-direction: column;
  background: #FBE9ED;
  overflow: hidden;
  isolation: isolate;
}

/* Fundo decorativo (curvas + waves) — aparece em telas que precisam */
.bg-deco {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-deco svg.bg-curls {
  position: absolute; top: -20px; right: -40px;
  width: 110%; height: 320px;
  opacity: 1;
}
.bg-deco .bg-waves {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 220px;
}
.bg-deco .bg-waves.short { height: 130px; }
.bg-deco .bg-waves.tall  { height: 300px; }

/* ─────────────────────── Telas (screens) ─────────────────────── */
.screen {
  position: relative;
  z-index: 1;
  display: none;
  flex-direction: column;
  height: 100%;
  /* Safe area top + bottom respeitadas para PWA standalone (statusbar + home indicator) */
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 24px calc(env(safe-area-inset-bottom, 0px) + 20px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.tight { padding-top: 24px; }
.screen.active { display: flex; animation: screen-in .35s cubic-bezier(.2,.7,.2,1); }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────── Topbar (back + stepper) ─────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px;
  position: relative; z-index: 12;
}

/* ─────────────────────── Back button ─────────────────────── */
.back-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: #fff; border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  align-self: flex-start;
  z-index: 10;
  transition: transform .12s ease;
}
.back-btn:hover { background: #FCF6F8; }
.back-btn:active { transform: scale(.95); }

.brand.center { align-items: center; }

.heading-center { text-align: center; margin-top: 20px; }
.heading-center h1 {
  margin: 0; font-size: 22px; line-height: 1.2; font-weight: 600; color: var(--ink);
}
.heading-center p {
  margin: 8px auto 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); max-width: 30ch;
}

.auth-form { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.auth-form .field { margin-bottom: 0; }

.input-icon-wrap {
  position: relative;
  display: block;
}
.input-icon-wrap .lead-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: #B6AFB4;
  pointer-events: none;
  display: flex; align-items: center;
  transition: color .15s ease;
}
.input-icon-wrap:focus-within .lead-icon { color: var(--brand-red); }
.input.has-icon { padding-left: 44px; }

.helper-card {
  margin-top: 8px;
  background: #fff;
  border: 1px dashed #F1C9D2;
  border-radius: 14px;
  padding: 12px 12px;
  display: grid; grid-template-columns: 16px 1fr; gap: 12px; align-items: flex-start;
  color: #7E7A82; font-size: 12px; line-height: 1.45;
}
.helper-card svg { color: var(--brand-red); flex-shrink: 0; }
.helper-card b { color: var(--ink); font-weight: 600; }

.btn-arrow { margin-left: 4px; }

/* ─────────────────────── Brand ─────────────────────── */
.brand {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 12px;
}
.brand.start { align-items: flex-start; }
.brand .logo { width: 168px; height: auto; }
.brand .logo-lg { width: 188px; }
.brand .tagline {
  font-size: 12.5px;
  letter-spacing: 0.32em;
  color: #8A8890;
  font-weight: 500;
  text-transform: uppercase;
}
.brand.start .tagline {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  padding-left: 48px;
}

/* ─────────────────────── Tipografia ─────────────────────── */
.headline {
  font-size: 30px; line-height: 1.1; font-weight: 500;
  letter-spacing: -0.018em; color: var(--ink);
}
.headline .accent { display: block; color: var(--brand-red); font-weight: 600; }
.headline.center { text-align: center; }
.lede {
  margin-top: 16px;
  font-size: 14px; line-height: 1.5;
  color: #8E8A90; font-weight: 400;
}
.section-title {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink); margin: 0;
}
.section-sub {
  font-size: 13px; color: var(--muted); margin-top: 8px;
}

/* ─────────────────────── Botões ─────────────────────── */
.btn {
  appearance: none;
  border: none;
  border-radius: var(--r-lg);
  padding: 0 20px;
  height: 54px;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-block { width: 100%; }
.btn-primary {
  background: var(--brand-red);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover { background: var(--brand-red-hover); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(225, 26, 61, 0.25); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: transparent;
  color: var(--brand-red);
  font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-style: dashed; text-decoration-thickness: 1px;
}
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid #ECE5E7;
  font-weight: 500;
}
.btn-secondary:hover { background: #FCF6F8; }

.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--brand-red); font-weight: 600;
  font-size: 14.5px; font-family: inherit;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-style: dashed; text-decoration-thickness: 1px;
}

/* Loading state */
.btn .btn-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
  display: none;
}
.btn.loading .btn-text { display: none; }
.btn.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────── Inputs / Cards ─────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--r-2xl);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}
.card.compact { padding: 16px 16px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; gap: 12px; }
.field-row.col-2 { grid-template-columns: 1fr 1fr; }
.field-row.col-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 420px) {
  .field-row.col-3 { grid-template-columns: 1fr 1fr; }
}

.label {
  font-size: 12px;
  color: var(--label);
  font-weight: 500;
  letter-spacing: .01em;
}
.input, .select, .textarea {
  width: 100%;
  appearance: none;
  border: 1.4px solid #ECE5E8;
  background: #fff;
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 15px; line-height: 1.2;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(225, 26, 61, 0.08);
}
.input::placeholder { color: #C2BEC4; }
.input[readonly] { background: #FBF8F9; color: var(--muted); }

.select {
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='none' stroke='%238A8A93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/></svg>") no-repeat right 14px center / 12px 8px;
  padding-right: 36px;
}

.input.error, .select.error, .textarea.error {
  border-color: var(--negative);
  box-shadow: 0 0 0 3px rgba(217, 48, 49, 0.10);
}
.error-msg {
  font-size: 12px; color: var(--negative); margin-top: 4px;
}

/* ─────────────────────── Spacer & footer ─────────────────────── */
.spacer { flex: 1; }
.screen-actions { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.screen-actions .row { display: flex; gap: 12px; }
.screen-actions .row .btn { flex: 1; }

/* ─────────────────────── Pills, chips ─────────────────────── */
.pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  background: var(--pill-bg); color: var(--pill-text);
  font-size: 11.5px; font-weight: 500; border-radius: 999px;
}

/* ─────────────────────── Step indicator ─────────────────────── */
.stepper {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 12px;
  justify-content: center;
}
.stepper .step-dot {
  width: 26px; height: 4px; border-radius: 999px;
  background: #EDDDE2;
  transition: background .25s ease, width .25s ease;
}
.stepper .step-dot.done    { background: var(--brand-red); }
.stepper .step-dot.current { background: var(--brand-red); width: 34px; }
.stepper-label {
  font-size: 11.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase;
  text-align: center; margin: 16px 0 4px;
}

/* Eyebrow vermelho dos cadastros */
.eyebrow {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: 8px;
}

/* ─────────────────────── Choice cards (PF/PJ) ─────────────────────── */
.choice-list { display: flex; flex-direction: column; gap: 12px; }
.choice-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 18px;
  padding: 16px;
  display: grid; grid-template-columns: 48px 1fr 22px;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease, background .2s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
  box-shadow: 0 2px 6px rgba(33, 22, 30, 0.03);
}
.choice-card:hover  { border-color: #F1C9D2; }
.choice-card.selected {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(225, 26, 61, 0.08), 0 12px 26px rgba(225, 26, 61, 0.08);
}
.choice-card:active { transform: scale(.99); }
.choice-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: #FBE3E9; color: var(--brand-red);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.choice-card.selected .choice-icon { background: var(--brand-red); color: #fff; }
.choice-title { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.choice-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.choice-radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.6px solid #DCD5D8; background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s ease;
}
.choice-card.selected .choice-radio { border-color: var(--brand-red); }
.choice-card.selected .choice-radio::after {
  content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--brand-red);
}

/* ─────────────────────── Conta salva ─────────────────────── */
.account-card {
  margin-top: 32px;
  background: #fff;
  border-radius: var(--r-xl);
  padding: 16px 20px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--card-border);
  display: grid; grid-template-columns: 64px 1fr 14px;
  align-items: center;
  gap: 16px;
}
.avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--brand-red); color: #fff;
  font-weight: 600; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(225, 26, 61, 0.25);
}
.account-card .ac-top { display: flex; align-items: center; gap: 12px; }
.account-card .ac-name { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.account-card .ac-meta {
  margin-top: 12px;
  display: grid; grid-template-columns: 1fr 1px 1fr;
  align-items: center; column-gap: 12px;
}
.account-card .ac-meta .col .lbl { color: var(--label); font-size: 11.5px; }
.account-card .ac-meta .col .val { color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: 0.4px; }
.account-card .ac-meta .divider { width: 1px; height: 32px; background: var(--hair); }
.account-card .chev { color: var(--brand-red); }

/* ─────────────────────── PIN inputs ─────────────────────── */
.pin-card { margin-top: 24px; }
.lock-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: #FBE3E9; color: var(--brand-red);
  display: flex; align-items: center; justify-content: center;
  margin: 4px auto 16px;
}
.pin-title { text-align: center; font-weight: 700; font-size: 19px; color: var(--ink); }
.pin-sub   { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pin-divider { height: 1px; background: var(--hair); margin: 16px -20px; }
.pins {
  margin-top: 16px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.pin {
  aspect-ratio: 1 / 1.05;
  border-radius: 12px;
  border: 1.4px solid #E9E1E3;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600;
  color: var(--ink);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pin .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.pin.active {
  border: 1.6px solid var(--brand-red);
  box-shadow: 0 0 0 3px rgba(225, 26, 61, 0.06);
}
.pin.active .caret {
  width: 2px; height: 22px; background: var(--brand-red);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.pin.shake { animation: pin-shake .35s linear; border-color: var(--negative); }
@keyframes pin-shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* Hide native input used for pin */
.pin-hidden-input {
  position: absolute; left: -10000px; opacity: 0;
}

/* Numpad — usado em mobile */
.numpad {
  margin-top: auto;
  padding-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.np-key {
  appearance: none; border: none;
  background: #fff;
  border-radius: 14px;
  padding: 16px 0;
  font-size: 22px; font-weight: 500;
  color: var(--ink); font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  -webkit-tap-highlight-color: transparent;
}
.np-key:active { background: #FBE3E9; }
.np-key.action { background: transparent; box-shadow: none; color: var(--brand-red); }

/* ─────────────────────── Status badges ─────────────────────── */
.status-card {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-2xl);
  padding: 24px 24px 24px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.status-icon {
  width: 56px; height: 56px; border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
}
.status-icon.review  { background: #FFF6E0; color: #B5832B; }
.status-icon.success { background: #E5F6EA; color: var(--positive); }
.status-icon.danger  { background: #FBE3E9; color: var(--negative); }

/* ─────────────────────── Upload ─────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-row {
  display: grid; grid-template-columns: 40px 1fr auto;
  align-items: center; gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1.4px dashed #E9E1E3;
  border-radius: 14px;
}
.doc-row.has-file { border-style: solid; border-color: var(--card-border); box-shadow: var(--shadow-soft); }
.doc-row .ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #FBE3E9; color: var(--brand-red);
}
.doc-row .name { font-size: 14px; font-weight: 500; color: var(--ink); }
.doc-row .sub  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.doc-row .btn-small {
  appearance: none; border: none;
  background: var(--brand-red); color: #fff;
  padding: 8px 12px; border-radius: 10px;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.doc-row.has-file .btn-small { background: #fff; color: var(--brand-red); border: 1px solid #FBE3E9; }

/* ─────────────────────── Review summary ─────────────────────── */
.review-group {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  padding: 16px 16px;
  margin-bottom: 12px;
}
.review-group h4 {
  font-size: 12px; color: var(--label);
  letter-spacing: .04em; text-transform: uppercase;
  margin: 0 0 8px; font-weight: 600;
}
.review-row {
  display: grid; grid-template-columns: 130px 1fr;
  padding: 8px 0;
  font-size: 13.5px;
}
.review-row .lbl { color: var(--muted); }
.review-row .val { color: var(--ink); font-weight: 500; word-break: break-word; }

/* ─────────────────────── Splash de boas-vindas ───────────────────────
   Overlay full-screen mostrado após PIN correto. Aparece com fade-in,
   anima logo + ícone de check + barra de progresso, e some quando
   redireciona para a app. */
.splash {
  position: fixed; inset: 0;
  z-index: 9000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
}
.splash.show {
  display: flex;
  pointer-events: auto;
  animation: splash-in .35s ease both;
}
@keyframes splash-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.splash-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 60% at 100% -10%, var(--brand-soft) 0%, rgba(255,227,233,0) 55%),
    radial-gradient(80% 50% at 0% 0%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FBF1F3 0%, #FCEEF1 60%, #FBE9ED 100%);
}

.splash-content {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: calc(env(safe-area-inset-top, 0px) + 32px) 32px calc(env(safe-area-inset-bottom, 0px) + 24px);
}

.splash-logo {
  margin-bottom: 36px;
  animation: splash-logo-in .6s .1s cubic-bezier(.2,.7,.2,1) both;
}
.splash-logo img { width: 188px; height: auto; display: block; }
@keyframes splash-logo-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-check {
  position: relative;
  width: 132px; height: 132px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
}
.splash-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--brand-soft) 0%, #FFD1DC 100%);
  animation: splash-pulse 2.4s ease-in-out infinite;
}
.splash-ring-2 {
  position: absolute; inset: -16px; border-radius: 50%;
  border: 1px dashed #F2B7C4;
  animation: splash-spin 18s linear infinite;
  opacity: 0.7;
}
.splash-circle {
  position: relative; z-index: 2;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 32px rgba(225, 26, 61, 0.35);
  animation: splash-pop .6s .3s cubic-bezier(.2,.9,.3,1.3) both;
}
.splash-circle svg {
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: splash-draw .55s .65s ease-out both;
}
@keyframes splash-pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%      { transform: scale(1.10); opacity: .55; }
}
@keyframes splash-spin { to { transform: rotate(360deg); } }
@keyframes splash-pop {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes splash-draw { to { stroke-dashoffset: 0; } }

.splash-text {
  max-width: 320px;
  animation: splash-text-in .5s .5s cubic-bezier(.2,.7,.2,1) both;
}
.splash-eyebrow {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: 12px;
}
.splash-text h1 {
  margin: 0;
  font-size: 28px; line-height: 1.15;
  font-weight: 600; letter-spacing: -0.018em;
  color: var(--ink);
}
.splash-text h1 .splash-name { color: var(--brand-red); }
.splash-text p {
  margin: 12px auto 0;
  font-size: 14px; color: var(--muted);
  line-height: 1.5;
}
@keyframes splash-text-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-progress {
  margin-top: 32px;
  width: 100%; max-width: 260px;
  height: 4px; border-radius: 999px;
  background: #F4ECEE;
  overflow: hidden;
  position: relative;
}
.splash-bar {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 30%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-red), #FF6680, var(--brand-red));
  animation: splash-progress 1.4s ease-in-out infinite;
}
@keyframes splash-progress {
  0%   { left: -30%; width: 30%; }
  50%  { left: 35%;  width: 45%; }
  100% { left: 100%; width: 30%; }
}

.splash-waves {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 140px; pointer-events: none; z-index: 1;
}
.splash-waves svg { display: block; width: 100%; height: 100%; }

/* ─────────────────────── Toast (padrão unificado com o app) ─────────────────────── */
.toast-host {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: #FFFFFF;
  color: var(--text);
  border: 1px solid #ECE7E8;
  border-left: 4px solid #8A8A93;
  border-radius: 12px;
  padding: 12px 16px;
  width: 360px; max-width: 100%;
  box-shadow: 0 10px 28px rgba(15, 18, 25, 0.12), 0 2px 6px rgba(15, 18, 25, 0.06);
  pointer-events: auto;
  animation: toast-in .28s cubic-bezier(.16,1,.3,1);
}
.toast.shake { animation: toast-shake .35s linear; }
.toast.removing { animation: toast-out .22s ease forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(-12px); } }
@keyframes toast-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.toast-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  color: #8A8A93;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.toast-icon svg { width: 22px; height: 22px; display: block; }
.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-weight: 600; font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}
.toast-msg {
  font-size: 12.5px;
  color: #6B6B73;
  line-height: 1.4;
  margin-top: 2px;
}
.toast-close {
  flex-shrink: 0;
  background: transparent; border: none;
  width: 22px; height: 22px;
  color: #8A8A93;
  cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  transition: background .15s ease, color .15s ease;
}
.toast-close:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.toast-close svg { width: 16px; height: 16px; display: block; }
.toast.success { border-left-color: var(--positive); }
.toast.success .toast-icon { color: var(--positive); }
.toast.error   { border-left-color: var(--negative); }
.toast.error .toast-icon   { color: var(--negative); }
.toast.warning { border-left-color: var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    { border-left-color: var(--info); }
.toast.info .toast-icon    { color: var(--info); }

@media (max-width: 720px) {
  .toast-host { top: calc(env(safe-area-inset-top, 0px) + 12px); left: 12px; right: 12px; }
  .toast { width: 100%; }
}

/* ─────────────────────── Help row (pergunta) ─────────────────────── */
.help-row {
  display: flex; align-items: center; gap: 16px;
  margin-top: 36px;
}
.help-row .q {
  width: 42px; height: 42px; border-radius: 50%;
  background: #FBE0E6; color: var(--brand-red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.help-row a {
  color: var(--brand-red-deep);
  font-size: 15px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-style: dashed; text-decoration-thickness: 1px;
}

/* ─────────────────────── Footer actions (3 cols) ─────────────────────── */
.fa-row {
  display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center; column-gap: 8px;
  padding: 8px 8px 8px;
}
.fa { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 4px; }
.fa-ico { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--brand-red); }
.fa-lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.fa-divider { width: 1px; height: 36px; background: #ECDFE3; }

/* ─────────────────────── Utilidades ─────────────────────── */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-7 { margin-top: 32px; }
.mt-8 { margin-top: 36px; }
.mt-auto { margin-top: auto; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }

/* ════════════════════════════════════════════════════════════════════════════
   TELA "CADASTRO" (multi-etapa)  (.reg-*)
   Replica pixel-a-pixel o protótipo flucsus-login/Cadastro - Etapa 2.html
   ════════════════════════════════════════════════════════════════════════════ */

.reg-screen {
  position: relative;
  padding: 0;
  background: #FCEFF2;
  overflow: hidden;
}
.reg-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.reg-top-tint {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 100% -10%, var(--brand-soft) 0%, rgba(255,227,233,0) 55%),
    radial-gradient(80% 50% at 0% 0%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FCF1F3 0%, #FCEEF1 60%, #FBE9ED 100%);
}
.reg-curls { position: absolute; top: -12px; right: -32px; }

.reg-topbar {
  position: relative; z-index: 12;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 24px 0;
}
.reg-back-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: #fff; border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  font-family: inherit;
  transition: transform .12s ease, background .15s ease;
}
.reg-back-btn:hover  { background: #FCF6F8; }
.reg-back-btn:active { transform: scale(.95); }

.reg-stepper {
  display: flex; align-items: center; gap: 8px;
}
.reg-step-dot {
  width: 26px; height: 4px; border-radius: 999px;
  background: #EDDDE2;
  transition: background .25s ease, opacity .25s ease;
}
.reg-step-dot.done   { background: var(--brand-red); opacity: 0.6; }
.reg-step-dot.active { background: var(--brand-red); }

.reg-content {
  position: relative; z-index: 10;
  height: 100%;
  padding: 16px 24px calc(env(safe-area-inset-bottom, 0px) + 20px);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.reg-brand {
  margin-top: 20px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.reg-logo { width: 128px; height: auto; }
.reg-tagline {
  font-size: 6.5px; letter-spacing: 0.22em;
  color: #8E8B92; font-weight: 500;
  padding-left: 36px;
}

.reg-heading { margin-top: 24px; }
.reg-eyebrow {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand-red);
}
.reg-heading h1 {
  margin: 8px 0 0;
  font-size: 24px; line-height: 1.15;
  letter-spacing: -0.018em; font-weight: 600;
  color: var(--ink);
}
.reg-heading p {
  margin: 8px 0 0;
  font-size: 13.5px; line-height: 1.5;
  color: var(--muted); max-width: 32ch;
}

.reg-form {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  flex: 1; min-height: 0;
  scrollbar-width: none;
  /* Trava o scroll dentro do form para não propagar pra app/body */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.reg-form::-webkit-scrollbar { display: none; }

.reg-field { display: flex; flex-direction: column; gap: 8px; }
.reg-field label {
  font-size: 12px; color: #7E7A82; font-weight: 500; padding-left: 2px;
}
.reg-input-wrap {
  position: relative;
  background: #FFFFFF;
  border: 1.4px solid #E9E1E3;
  border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.reg-input-wrap:focus-within {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(225, 26, 61, 0.08);
}
.reg-input-wrap.has-icon { padding-left: 44px; }
.reg-input-wrap .lead-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: #B6AFB4;
  pointer-events: none;
  display: flex; align-items: center;
}
.reg-input-wrap:focus-within .lead-icon { color: var(--brand-red); }
.reg-input-wrap input,
.reg-input-wrap select {
  width: 100%; border: none; background: transparent;
  height: 48px; padding: 0 16px 0 4px;
  font: inherit; font-size: 15px; color: var(--ink);
  outline: none;
  font-family: inherit;
  text-align: left;
  /* Safari iOS: força input alinhado à esquerda (especialmente type=date) */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-width: 0;
}
.reg-input-wrap.has-icon input,
.reg-input-wrap.has-icon select { padding-left: 0; }
.reg-input-wrap input::placeholder { color: #C2BCC1; }
/* iOS date input: força text-align left e centralizado vertical */
.reg-input-wrap input[type="date"] {
  text-align: left;
  display: flex;
  align-items: center;
  /* Compensa o padding interno do iOS que joga o texto pro topo */
  line-height: 48px;
  padding-top: 0;
  padding-bottom: 0;
}
.reg-input-wrap input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
  height: 48px;
  line-height: 48px;
}
.reg-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  margin-left: auto;
  margin-right: 4px;
  opacity: 0.6;
}
.reg-input-wrap select {
  appearance: none;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='none' stroke='%238A8A93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/></svg>") no-repeat right 14px center / 12px 8px;
  padding-right: 36px;
}
.reg-hint {
  font-size: 11.5px; color: #A39EA4; padding-left: 4px;
}
.reg-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.reg-helper {
  margin-top: 16px;
  background: #FFF;
  border: 1px dashed #F1C9D2;
  border-radius: 14px;
  padding: 12px 12px;
  display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: flex-start;
  color: #7E7A82; font-size: 12px; line-height: 1.45;
}
.reg-helper svg { color: var(--brand-red); flex-shrink: 0; }
.reg-helper b { color: var(--ink); font-weight: 600; }

/* Input file escondido mas DISPONÍVEL para .click() programático (display:none falha no iOS) */
.reg-doc-row input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.reg-doc-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.reg-doc-row {
  display: grid; grid-template-columns: 40px 1fr auto;
  align-items: center; gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1.4px dashed #E9E1E3;
  border-radius: 14px;
}
.reg-doc-row.filled {
  border-style: solid; border-color: #F4ECEE;
  box-shadow: 0 2px 6px rgba(33, 22, 30, 0.04);
}
.reg-doc-ic {
  width: 40px; height: 40px; border-radius: 12px;
  background: #FBE3E9; color: var(--brand-red);
  display: flex; align-items: center; justify-content: center;
}
.reg-doc-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.reg-doc-sub  { font-size: 11.5px; color: #A39EA4; margin-top: 2px; }
.reg-doc-btn {
  appearance: none; border: none;
  background: var(--brand-red); color: #fff;
  padding: 8px 12px; border-radius: 10px;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.reg-doc-row.filled .reg-doc-btn { background: #fff; color: var(--brand-red); border: 1px solid #FBE3E9; }

.reg-review-group {
  background: #fff;
  border: 1px solid #F4ECEE;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.reg-review-group h4 {
  font-size: 11px; color: #A39EA4;
  letter-spacing: .04em; text-transform: uppercase;
  margin: 0 0 8px; font-weight: 600;
}
.reg-review-row {
  display: grid; grid-template-columns: 120px 1fr;
  padding: 4px 0;
  font-size: 13px;
}
.reg-review-row .lbl { color: var(--muted); }
.reg-review-row .val { color: var(--ink); font-weight: 500; word-break: break-word; }

.reg-cta-row {
  position: relative; z-index: 12;
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin-top: 16px;
  padding-top: 8px;
}
.reg-cta {
  height: 52px; border-radius: 14px; border: none;
  background: var(--brand-red);
  color: #fff; font-weight: 500; font-size: 16px;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 26px rgba(225, 26, 61, 0.30);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .18s ease, transform .12s ease;
}
.reg-cta:hover  { background: var(--brand); }
.reg-cta:active { transform: translateY(1px); }
.reg-cta:disabled { opacity: .6; cursor: not-allowed; }
.reg-cta .btn-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .8s linear infinite;
  display: none;
}
.reg-cta.loading .btn-text { display: none; }
.reg-cta.loading .btn-spinner { display: inline-block; }

.reg-waves {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 160px; pointer-events: none; z-index: 5;
}
.reg-waves svg { display: block; width: 100%; height: 100%; }

/* ════════════════════════════════════════════════════════════════════════════
   TELA "CRIAR SENHA"  (.cs-*)
   Replica pixel-a-pixel o protótipo flucsus-login/Cadastro - Criar senha.html
   2 sections de PIN visíveis simultaneamente. Auto-foco entre seções.
   ════════════════════════════════════════════════════════════════════════════ */

:root { --ok: #1F8A5B; }

.cs-screen {
  position: relative;
  padding: 0;
  background: #FCEFF2;
  overflow: hidden;
}
.cs-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cs-top-tint {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 100% -10%, var(--brand-soft) 0%, rgba(255,227,233,0) 55%),
    radial-gradient(80% 50% at 0% 0%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FCF1F3 0%, #FCEEF1 60%, #FBE9ED 100%);
}
.cs-curls { position: absolute; top: -12px; right: -32px; }

.cs-content {
  position: relative; z-index: 10;
  height: 100%;
  padding-top: calc(env(safe-area-inset-top, 0px) + 32px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  padding-left: 24px;
  padding-right: 24px;
  display: flex; flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.cs-content::-webkit-scrollbar { display: none; }

.cs-brand {
  margin-top: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.cs-logo { width: 150px; height: auto; }
.cs-tagline {
  font-size: 8.5px; letter-spacing: 0.22em;
  color: #8E8B92; font-weight: 500;
}

.cs-approved {
  margin: 20px auto 0;
  display: inline-flex; align-items: center; gap: 8px;
  background: #E9F6EF; color: var(--ok);
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  border: 1px solid #CFEADD;
}

.cs-greet { text-align: center; margin-top: 16px; }
.cs-greet h1 {
  margin: 0; font-size: 22px; font-weight: 600;
  letter-spacing: -0.012em; color: var(--ink);
}
.cs-greet h1 .cs-name { color: var(--brand-red); }
.cs-greet p {
  margin: 8px auto 0;
  font-size: 13.5px; color: var(--muted);
  line-height: 1.5; max-width: 32ch;
}
.cs-greet b { color: var(--ink); font-weight: 600; }

.cs-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 20px;
  padding: 20px 20px 20px;
  box-shadow: 0 2px 6px rgba(33, 22, 30, 0.04), 0 14px 30px rgba(33, 22, 30, 0.06);
  border: 1px solid #F4ECEE;
}
.cs-section + .cs-section { margin-top: 20px; }
.cs-section .cs-lbl {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.cs-section .cs-lbl .cs-check {
  font-size: 11.5px; color: var(--ok); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  opacity: 0;
  transition: opacity .2s ease;
}
.cs-section.complete .cs-lbl .cs-check { opacity: 1; }
.cs-section.match    .cs-lbl .cs-check { opacity: 1; }

.cs-pins {
  margin-top: 12px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.cs-pin {
  aspect-ratio: 1 / 1.1;
  border-radius: 12px;
  border: 1.4px solid #E9E1E3;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.cs-pin .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #16161A;
  opacity: 0;
  transition: opacity .15s ease;
}
.cs-pin.filled .dot { opacity: 1; }
.cs-pin.active {
  border: 1.6px solid var(--brand-red);
  box-shadow: 0 0 0 3px rgba(225, 26, 61, 0.08);
}
.cs-pin.active .caret {
  position: absolute;
  width: 2px; height: 18px; background: var(--brand-red);
  animation: cs-blink 1s steps(1) infinite;
}
@keyframes cs-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.cs-rules {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 8px 12px;
}
.cs-rule {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: #9A949B;
}
.cs-rule .b {
  width: 14px; height: 14px; border-radius: 50%;
  background: #F0E8EA; color: #C2BCC1;
  display: inline-flex; align-items: center; justify-content: center;
}
.cs-rule.ok { color: var(--ok); }
.cs-rule.ok .b { background: #DCEEE4; color: var(--ok); }

.cs-spacer { flex: 1; min-height: 8px; }

.cs-cta {
  margin-top: 20px;
  height: 52px; border-radius: 14px; border: none;
  background: var(--brand-red);
  color: #fff; font-weight: 500; font-size: 16px;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 26px rgba(225, 26, 61, 0.30);
  position: relative; z-index: 12;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s ease, opacity .2s ease;
}
.cs-cta:hover { background: var(--brand); }
.cs-cta:disabled {
  background: #E9B5C0; box-shadow: none; cursor: not-allowed; color: #fff;
}
.cs-cta .btn-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .8s linear infinite;
  display: none;
}
.cs-cta.loading .btn-text { display: none; }
.cs-cta.loading .btn-spinner { display: inline-block; }

.cs-waves {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 140px; pointer-events: none; z-index: 5;
}
.cs-waves svg { display: block; width: 100%; height: 100%; }

/* ════════════════════════════════════════════════════════════════════════════
   TELA "EM ANÁLISE"  (.an-*)
   Replica pixel-a-pixel o protótipo flucsus-login/Cadastro - Em analise.html
   Inclui todas as animações: ring pulse, ring dashed spin, circle pop,
   svg draw stroke-dasharray, clock-hand spin, status-bar slide.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --amber: #C77F18;
  --amber-bg: #FCEED5;
  --amber-border: #F4DEAB;
}

.an-screen {
  position: relative;
  padding: 0;
  background: #FCEFF2;
  overflow: hidden;
}
.an-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.an-top-tint {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 100% -10%, var(--brand-soft) 0%, rgba(255,227,233,0) 55%),
    radial-gradient(80% 50% at 0% 0%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FCF1F3 0%, #FCEEF1 60%, #FBE9ED 100%);
}
.an-curls { position: absolute; top: -12px; right: -32px; }

.an-content {
  position: relative; z-index: 10;
  height: 100%;
  padding-top: calc(env(safe-area-inset-top, 0px) + 32px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  padding-left: 24px;
  padding-right: 24px;
  display: flex; flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}
.an-content::-webkit-scrollbar { display: none; }

.an-brand {
  margin-top: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.an-logo { width: 140px; height: auto; }
.an-tagline {
  font-size: 8.5px; letter-spacing: 0.22em;
  color: #8E8B92; font-weight: 500;
}

/* Hero check com animação */
.an-hero {
  margin-top: 28px;
  display: flex; flex-direction: column; align-items: center;
}
.an-check-wrap {
  position: relative;
  width: 112px; height: 112px;
  display: flex; align-items: center; justify-content: center;
}
.an-check-wrap .an-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--brand-soft) 0%, #FFD1DC 100%);
  animation: an-pulse 2.6s ease-in-out infinite;
}
.an-check-wrap .an-ring-2 {
  position: absolute; inset: -12px;
  border-radius: 50%;
  border: 1px dashed #F2B7C4;
  animation: an-spin 22s linear infinite;
  opacity: 0.7;
}
.an-check-wrap .an-circle {
  position: relative;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--brand-red);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(225, 26, 61, 0.32);
  animation: an-pop .6s cubic-bezier(.2,.9,.3,1.3) both;
}
.an-check-wrap .an-circle svg {
  color: #fff;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: an-draw .6s .35s ease-out both;
}
@keyframes an-pulse { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.08); opacity: 0.55; } }
@keyframes an-spin  { to { transform: rotate(360deg); } }
@keyframes an-pop   { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes an-draw  { to { stroke-dashoffset: 0; } }

/* Title */
.an-title { margin-top: 24px; text-align: center; }
.an-title h1 {
  margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.018em;
  line-height: 1.18; color: var(--ink);
}
.an-title h1 .accent { color: var(--brand-red); }
.an-title p {
  margin: 12px auto 0;
  font-size: 14px; line-height: 1.55; color: var(--muted);
  max-width: 32ch;
}
.an-title b { color: var(--ink); font-weight: 600; }

/* Status card */
.an-status-card {
  margin-top: 24px;
  background: #fff;
  border-radius: 20px;
  padding: 16px 16px 16px;
  box-shadow: 0 2px 6px rgba(33, 22, 30, 0.04), 0 14px 30px rgba(33, 22, 30, 0.06);
  border: 1px solid #F4ECEE;
}
.an-status-row {
  display: flex; align-items: center; gap: 12px;
}
.an-status-ic {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber-bg); color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--amber-border);
  position: relative; flex-shrink: 0;
}
.an-status-ic .an-clock-hand {
  transform-origin: 12px 12px;
  animation: an-spin 4s linear infinite;
}
.an-status-text .an-lbl { font-size: 12px; color: var(--muted); }
.an-status-text .an-val { font-size: 15px; font-weight: 600; color: var(--ink); margin-top: 1px; }
.an-status-pill {
  margin-left: auto;
  background: var(--amber-bg); color: var(--amber);
  padding: 4px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--amber-border);
}
.an-status-bar {
  margin-top: 12px;
  position: relative;
  height: 6px; border-radius: 999px; background: #F4ECEE; overflow: hidden;
}
.an-status-bar::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%;
  width: 40%; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--brand-red), transparent);
  animation: an-slide 2.2s ease-in-out infinite;
}
@keyframes an-slide { to { left: 100%; } }
.an-status-foot {
  margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--muted);
}
.an-status-foot b { color: var(--ink); }

/* Steps timeline */
.an-steps {
  margin-top: 16px;
  background: #FFFAF6;
  border: 1px solid #FBE9D2;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.an-stepi {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  font-size: 13px;
}
.an-stepi .an-b {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #F4ECEE; color: #C2BCC1;
}
.an-stepi.done .an-b { background: #E11A3D; color: #fff; }
.an-stepi.cur  .an-b { background: var(--amber); color: #fff; }
.an-stepi .an-t { color: var(--ink); font-weight: 500; }
.an-stepi.muted .an-t { color: #B3AEB4; font-weight: 400; }
.an-stepi .an-meta { font-size: 11.5px; color: var(--muted); }
.an-stepi.cur .an-meta { color: var(--amber); font-weight: 600; }

/* Email row */
.an-email-row {
  margin-top: 16px;
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 12px 12px;
}
.an-email-ic {
  width: 36px; height: 36px; border-radius: 50%;
  background: #FBE3E9; color: var(--brand-red);
  display: flex; align-items: center; justify-content: center;
}
.an-email-body { flex: 1; min-width: 0; }
.an-email-lbl { font-size: 11px; color: var(--muted); }
.an-email-val {
  font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.an-spacer { flex: 1; min-height: 20px; }

.an-cta-row {
  display: flex; flex-direction: column; gap: 12px;
  position: relative; z-index: 12;
  margin-top: 16px;
}
.an-cta {
  height: 52px; border-radius: 14px; border: none;
  background: var(--brand-red);
  color: #fff; font-weight: 500; font-size: 16px;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 26px rgba(225, 26, 61, 0.30);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .18s ease, transform .12s ease;
}
.an-cta:hover  { background: var(--brand); }
.an-cta:active { transform: translateY(1px); }
.an-cta.ghost {
  background: transparent; color: var(--brand-red);
  box-shadow: none; border: 1.4px solid #F1C9D2;
  font-weight: 600;
}
.an-cta.ghost:hover { background: rgba(225,26,61,0.04); }

.an-waves {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 140px; pointer-events: none; z-index: 5;
}
.an-waves svg { display: block; width: 100%; height: 100%; }

/* ════════════════════════════════════════════════════════════════════════════
   TELA "LOGIN — CONTA SALVA"  (.ls-*)
   Replica pixel-a-pixel o protótipo flucsus-login/Login.html
   ════════════════════════════════════════════════════════════════════════════ */

.ls-screen {
  position: relative;
  padding: 0;
  background: #FBF0F2;
  overflow: hidden;
}

.ls-bg {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.ls-top-tint {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 100% -10%, var(--brand-soft) 0%, rgba(255,227,233,0) 55%),
    radial-gradient(80% 50% at 0% 0%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FBF1F3 0%, #FCEEF1 60%, #FBE9ED 100%);
}
/* Curls/splash: agora atravessam a área da statusbar até bem abaixo dela */
.ls-curls  { position: absolute; top: 0; right: -40px; width: calc(100% + 80px); }
.ls-splash { position: absolute; top: 0; right: -52px; }

.ls-content {
  position: relative; z-index: 10;
  height: 100%;
  /* Safe-area-top + padding interior; safe-area-bottom para o home indicator */
  padding-top: calc(env(safe-area-inset-top, 0px) + 40px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  padding-left: 24px;
  padding-right: 24px;
  display: flex; flex-direction: column;
}

.ls-brand {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-top: 132px;
}
.ls-logo { width: 182px; height: auto; }
.ls-tagline {
  font-size: 14.5px; letter-spacing: 0.32em;
  color: #8A8890; font-weight: 500;
}

/* Account card (clicável) */
.ls-card {
  margin-top: 32px;
  background: #fff;
  border-radius: 20px;
  padding: 16px 20px 20px;
  box-shadow: 0 2px 6px rgba(33, 22, 30, 0.04), 0 12px 28px rgba(33, 22, 30, 0.05);
  border: 1px solid #F4ECEE;
  display: grid; grid-template-columns: 64px 1fr 14px;
  align-items: center; column-gap: 16px;
  cursor: pointer;
  font-family: inherit; text-align: left;
  transition: transform .12s ease, box-shadow .2s ease;
  width: 100%;
}
.ls-card:hover  { box-shadow: 0 4px 10px rgba(33, 22, 30, 0.06), 0 16px 32px rgba(33, 22, 30, 0.08); }
.ls-card:active { transform: scale(.99); }

.ls-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--brand-red); color: #fff;
  font-weight: 600; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(225, 26, 61, 0.25);
}
.ls-acct-top { display: flex; align-items: center; gap: 12px; }
.ls-acct-name { font-size: 15.5px; font-weight: 600; color: var(--text); }
.ls-pill {
  background: #FCDCE3; color: var(--brand-strong);
  font-size: 11px; font-weight: 500;
  padding: 4px 12px; border-radius: 999px;
}
.ls-acct-meta {
  margin-top: 12px;
  display: grid; grid-template-columns: 1fr 1px 1fr;
  align-items: center; column-gap: 12px;
}
.ls-acct-col .ls-lbl { color: #9D99A0; font-size: 11.5px; font-weight: 400; margin-bottom: 4px; }
.ls-acct-col .ls-val { color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: 0.4px; }
.ls-divider { width: 1px; height: 32px; background: #ECE7E9; }
.ls-chev { color: var(--brand-red); display: flex; align-items: center; justify-content: flex-end; }

/* CTA "Entrar" */
.ls-cta {
  margin-top: 28px;
  height: 50px; border-radius: 14px; border: none;
  background: var(--brand-red);
  color: #fff; font-weight: 500; font-size: 16px;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 22px rgba(225, 26, 61, 0.28);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ls-cta:hover  { background: var(--brand); }
.ls-cta:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(225, 26, 61, 0.25); }
.ls-cta:disabled { opacity: .6; cursor: not-allowed; }
.ls-cta .btn-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .8s linear infinite;
  display: none;
}
.ls-cta.loading .btn-text { display: none; }
.ls-cta.loading .btn-spinner { display: inline-block; }

.ls-link-row { margin-top: 24px; display: flex; justify-content: center; }
.ls-alt-link {
  color: var(--brand-red); font-size: 14.5px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
  background: none; border: none; cursor: pointer; font-family: inherit;
}

.ls-spacer { flex: 1; }

/* ─── Tela "Trocar conta" (PF / PJ) ─── */
.sw-back { margin-top: 0; }
.sw-brand { margin-top: 28px; }
.sw-heading { margin-top: 28px; }
.sw-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.sw-list .ls-card { margin-top: 0; }
.sw-card.sw-active { border-color: var(--brand-red); box-shadow: 0 2px 6px rgba(225,26,61,.10), 0 12px 28px rgba(225,26,61,.10); }
.sw-add { margin-top: 20px; }

/* Footer actions (3 colunas) — acima das ondas, com folga suficiente para
   nunca ficar atrás das waves coloridas. */
.ls-footer-actions {
  position: relative; z-index: 12;
  display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center; column-gap: 8px;
  padding: 8px 8px 8px;
  margin-bottom: 180px;
}
.ls-fa {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 8px 4px;
  background: transparent; border: none; cursor: pointer; font-family: inherit;
}
.ls-fa-ico { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--brand-red); }
.ls-fa-lbl { font-size: 13.5px; color: #7E7A82; font-weight: 500; }
.ls-fa-divider { width: 1px; height: 38px; background: #ECDFE3; }

/* Bottom waves coloridas */
.ls-waves {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 170px; pointer-events: none; z-index: 5;
}
.ls-waves svg { display: block; width: 100%; height: 100%; }

/* Adaptação para telas pequenas */
@media (max-height: 800px) {
  .ls-brand          { margin-top: 80px; }
  .ls-footer-actions { margin-bottom: 132px; }
}
@media (max-height: 700px) {
  .ls-brand          { margin-top: 40px; }
  .ls-footer-actions { margin-bottom: 100px; }
}
@media (max-height: 600px) {
  .ls-brand          { margin-top: 20px; }
  .ls-footer-actions { margin-bottom: 80px; }
  .ls-content        { padding-top: 40px; }
}

/* ─────────────────────── Responsive container (desktop) ─────────────────────── */
@media (min-width: 720px) {
  html, body { position: static; overflow: auto; }
  body {
    display: flex; align-items: center; justify-content: center;
    padding: 32px;
    height: 100vh; min-height: 100vh;
    background:
      radial-gradient(1200px 800px at 30% 20%, #F4EEF0 0%, #E8E1E4 60%, #DDD6DA 100%);
  }
  .app {
    height: auto;
    min-height: 760px;
    max-height: calc(100vh - 64px);
    border-radius: var(--r-3xl);
    box-shadow: 0 30px 80px rgba(40, 20, 25, 0.22), 0 8px 24px rgba(40, 20, 25, 0.10);
    background: #FCEFF2;
  }
  .screen { height: auto; min-height: 760px; }
}

/* ═══════════════════════ PROVA DE VIDA (LIVENESS) ═══════════════════════ */
.lv-screen { text-align: center; }
.lv-head { margin-top: 8px; }
.lv-logo { height: 30px; width: auto; margin: 0 auto 20px; display: block; }
.lv-title {
  font-size: 22px; font-weight: 700; color: var(--text, #0E0F1A);
  margin: 0 0 8px; letter-spacing: -0.01em;
}
.lv-sub {
  font-size: 14px; line-height: 1.5; color: var(--text-2, #4B5063);
  margin: 0 auto; max-width: 320px;
}
.lv-stage { display: flex; justify-content: center; margin: 28px 0 20px; }
.lv-cam {
  position: relative; width: 260px; height: 260px; border-radius: var(--radius-full, 9999px);
  overflow: hidden; background: #0E0F1A;
  box-shadow: 0 18px 44px rgba(231, 8, 63, 0.14), 0 4px 14px rgba(14, 15, 26, 0.10);
}
.lv-cam video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1); /* espelha só o preview (captura usa o frame cru) */
}
.lv-oval {
  position: absolute; inset: 0; border-radius: var(--radius-full, 9999px);
  border: 3px solid var(--brand, #E7083F); pointer-events: none;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.55);
  animation: lvPulse 1.8s ease-in-out infinite;
}
@keyframes lvPulse {
  0%, 100% { box-shadow: inset 0 0 0 6px rgba(255,255,255,0.55), 0 0 0 0 var(--brand-glow, rgba(231,8,63,0.12)); }
  50%      { box-shadow: inset 0 0 0 6px rgba(255,255,255,0.55), 0 0 0 12px rgba(231,8,63,0); }
}
.lv-count {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 96px; font-weight: 800; color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,0.35);
  pointer-events: none;
}
.lv-count.tick { animation: lvTick 700ms ease-out; }
@keyframes lvTick {
  0%   { opacity: 0; transform: scale(1.5); }
  25%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0.15; transform: scale(0.85); }
}
.lv-instruction {
  min-height: 48px; display: flex; flex-direction: column; gap: 4px;
  align-items: center; justify-content: center;
}
.lv-instruction b { font-size: 17px; font-weight: 700; color: var(--text, #0E0F1A); }
.lv-instruction span { font-size: 13.5px; color: var(--text-3, #7B7F8E); }
.lv-spacer { flex: 1 1 auto; min-height: 16px; }

/* ─────────────────────── Captura de documento (câmera) ─────────────────────── */
.dc-screen { text-align: center; }
.dc-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dc-back {
  width: 38px; height: 38px; border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--border, #E6E7EC); background: var(--surface, #fff);
  color: var(--text, #0E0F1A); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dc-steps { display: flex; gap: 8px; align-items: center; }
.dc-steps i {
  width: 22px; height: 4px; border-radius: 4px; background: var(--border-strong, #D0D5DD); transition: background .2s;
}
.dc-steps i.active { background: var(--brand, #E7083F); }
.dc-steps i.done { background: var(--positive, #047857); }
.dc-brand { margin: 4px 0 12px; }
.dc-logo { height: 26px; width: auto; }
.dc-title { font-size: 21px; font-weight: 700; color: var(--text, #0E0F1A); margin: 0 0 8px; letter-spacing: -0.01em; }
.dc-sub { font-size: 13.5px; line-height: 1.5; color: var(--text-2, #4B5063); margin: 0 auto; max-width: 320px; }

.dc-stage {
  position: relative; width: 100%; max-width: 360px; margin: 20px auto 0;
  border-radius: 20px; overflow: hidden; background: #0E0F1A;
  box-shadow: 0 18px 44px rgba(231, 8, 63, 0.12), 0 4px 14px rgba(14, 15, 26, 0.10);
}
.dc-stage.dc-card   { aspect-ratio: 3 / 4; }
.dc-stage.dc-selfie { aspect-ratio: 3 / 4; }
.dc-stage video, .dc-stage #dc-preview {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0E0F1A;
}
.dc-stage video.mirror { transform: scaleX(-1); } /* espelha só o preview da selfie */
.dc-overlay { position: absolute; inset: 0; pointer-events: none; }
/* Máscara: escurece fora da moldura do documento */
.dc-frame {
  position: absolute; border: 2px solid rgba(255,255,255,0.9); border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgba(14, 15, 26, 0.42);
}
.dc-card   .dc-frame { left: 7%; right: 7%; top: 26%; bottom: 26%; }        /* retângulo tipo cartão */
.dc-selfie .dc-frame { left: 16%; right: 16%; top: 10%; bottom: 24%; border-radius: 44% 44% 42% 42%; } /* guia do rosto */
.dc-corner { position: absolute; width: 18px; height: 18px; border: 3px solid var(--brand, #E7083F); }
.dc-corner.tl { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.dc-corner.tr { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.dc-corner.bl { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.dc-corner.br { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.dc-selfie .dc-corner { display: none; }
.dc-watermark { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; opacity: 0.9; }
.dc-watermark img { height: 18px; width: auto; opacity: 0.85; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4)); }

.dc-hint { font-size: 12.5px; color: var(--text-3, #7B7F8E); margin-top: 12px; min-height: 18px; padding: 0 12px; }
.dc-spacer { flex: 1 1 auto; min-height: 12px; }

.dc-actions-live { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.dc-side {
  width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; color: var(--text-2, #4B5063); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.dc-side-ghost { visibility: hidden; }
.dc-shutter {
  width: 74px; height: 74px; border-radius: var(--radius-full, 9999px);
  border: 4px solid var(--brand, #E7083F); background: var(--surface, #fff);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  box-shadow: 0 8px 24px rgba(231, 8, 63, 0.22);
}
.dc-shutter span { width: 56px; height: 56px; border-radius: var(--radius-full, 9999px); background: var(--brand, #E7083F); transition: transform .12s; }
.dc-shutter:active span { transform: scale(0.88); }
.dc-actions-review { display: flex; flex-direction: column; gap: 12px; }
.dc-screen.dc-nocam .dc-shutter { opacity: 0.4; pointer-events: none; }
