/* Central de Acesso Loop — implementacao fiel ao modelo de UX (exemplo-ux: Web/Mobile 1–4).
   Valores (cores, tipografia, raios, espacamentos) copiados dos artboards. Fontes servidas localmente. */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/manrope-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/manrope-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/manrope-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/manrope-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/manrope-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/sora-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/sora-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --primary: #481775;
  --secondary: #6F35A5;
  --accent: #FFBE00;
  --ink: #1E0B33;
  --muted: #5A5560;
  --icon: #6B6570;
  --lavender: #E8D9F3;
  --lavender-soft: #F3ECF9;
  --sand: #F5F3F0;
  --line-web: #D9D3DE;
  --line-mobile: #E2DDE6;
  --unmet: #B8B0BF;
  --danger: #B42318;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-head: 'Sora', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--ink); font-family: var(--font-body); }
a { color: var(--secondary); }
a:hover { color: var(--primary); }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important;
}

/* ---------- Estrutura (Web: aside + main) ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-wrap: wrap; background: var(--sand); color: var(--ink); }

.side {
  flex: 1 1 420px; background: var(--primary); color: #FFFFFF; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px; position: relative; overflow: hidden;
}
.side__ring { position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px; border-radius: 50%; border: 2px solid var(--accent); opacity: .55; }
.side__disc { position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; background: var(--secondary); opacity: .6; }
.side__logo { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 10px; background: #FFFFFF; align-self: flex-start; position: relative; }
.side__logo img { height: 26px; width: auto; display: block; }
.side__body { display: flex; flex-direction: column; gap: 40px; position: relative; max-width: 420px; }
.side__intro { display: flex; flex-direction: column; gap: 16px; }
.side__title { font-family: var(--font-head); font-size: 40px; line-height: 1.15; font-weight: 700; text-wrap: balance; }
.side__text { font-size: 17px; line-height: 1.6; color: var(--lavender); }
.side__footer { font-size: 13px; color: var(--lavender); position: relative; }

.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.steps__item { display: flex; align-items: center; gap: 14px; }
.steps__dot {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none;
  border: 1.5px solid rgba(255, 255, 255, .5); color: var(--lavender); font-weight: 600; font-size: 14px;
}
.steps__check { display: none; }
.steps__label { font-size: 16px; color: var(--lavender); }
.steps__item.is-current .steps__dot { background: #FFFFFF; border-color: #FFFFFF; color: var(--primary); font-weight: 700; }
.steps__item.is-current .steps__label { font-weight: 700; color: #FFFFFF; }
.steps__item.is-done .steps__dot { background: var(--accent); border-color: var(--accent); color: var(--primary); }
.steps__item.is-done .steps__num { display: none; }
.steps__item.is-done .steps__check { display: block; }

.main { flex: 999 1 560px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
.panel { width: 100%; max-width: 420px; }

.view { display: flex; flex-direction: column; gap: 32px; }
.view[data-view="password"] { gap: 28px; }
.view--center { align-items: center; text-align: center; gap: 28px; }

.head { display: flex; flex-direction: column; gap: 16px; }
.head--center { gap: 12px; }
.tile { width: 56px; height: 56px; border-radius: 16px; background: var(--lavender); color: var(--primary); display: flex; align-items: center; justify-content: center; }
h1 { font-family: var(--font-head); font-size: 32px; line-height: 1.2; font-weight: 700; outline: none; }
.lead { font-size: 16px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.lead strong { color: var(--ink); }

.backlink {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  align-self: flex-start; min-height: 44px; color: var(--secondary); background: none; border: 0; padding: 0; cursor: pointer;
}
.backlink:hover { color: var(--primary); }

.form { display: flex; flex-direction: column; gap: 24px; margin: 0; }
#password-form { gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
label, legend { font-size: 14px; font-weight: 600; color: var(--ink); }

.control {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; background: #FFFFFF;
  border: 1.5px solid var(--line-web); border-radius: 12px; color: var(--icon);
}
.control--pwd { gap: 8px; padding: 0 4px 0 16px; }
.control input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.control input::placeholder { color: #8E8794; }
.control:focus-within { border: 2px solid var(--primary); box-shadow: 0 0 0 4px var(--lavender); }
.control.is-invalid { border-color: var(--danger); }
.eye { width: 44px; height: 44px; border: 0; background: transparent; color: var(--icon); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; flex: none; }
.eye:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.eye[aria-pressed="true"] { color: var(--primary); }

.btn {
  display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 12px; background: var(--primary);
  color: #FFFFFF; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; width: 100%;
}
.btn:hover { color: #FFFFFF; background: #3B1261; }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn--gap { margin-top: 4px; }

.note { font-size: 14px; line-height: 1.6; color: var(--muted); }
.note a, .linkbtn { font-weight: 600; }
.linkbtn { font: inherit; font-size: 14px; font-weight: 600; color: var(--secondary); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; min-height: 24px; }
.linkbtn:hover { color: var(--primary); }
.linkbtn.center { align-self: center; min-height: 44px; text-decoration: none; }

.error { font-size: 14px; color: var(--danger); font-weight: 600; }
.hint { font-size: 13px; line-height: 1.5; color: var(--muted); }
.live:empty { display: none; }
.live { font-size: 14px; color: var(--danger); font-weight: 600; margin-bottom: -12px; }

/* Codigo */
.otp-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.otp-group legend { padding: 0; margin-bottom: 10px; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.otp input {
  height: 60px; min-width: 0; width: 100%; text-align: center; font-family: var(--font-head); font-size: 24px; font-weight: 600;
  color: var(--ink); background: #FFFFFF; border: 1.5px solid var(--line-web); border-radius: 12px; outline: none; padding: 0;
}
.otp input:focus { border: 2px solid var(--primary); box-shadow: 0 0 0 4px var(--lavender); }
.otp.is-invalid input { border-color: var(--danger); }
.meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
.meta strong, .resend strong { color: var(--ink); }
.resend { font-size: 14px; color: var(--muted); }

/* Forca e requisitos */
.strength { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.strength__bars { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.strength__bars span { height: 6px; border-radius: 3px; background: #E2DDE6; }
.strength__bars span.on { background: var(--secondary); }
.strength__label { font-size: 13px; font-weight: 700; color: var(--primary); }

.reqs { margin: 0; padding: 16px; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; background: #FFFFFF; border-radius: 12px; font-size: 14px; }
.reqs li { display: flex; align-items: center; gap: 8px; color: var(--icon); }
.reqs__dot { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--unmet); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.reqs__dot svg { display: none; }
.reqs li.met { color: var(--ink); font-weight: 600; }
.reqs li.met .reqs__dot { background: var(--primary); border-color: var(--primary); }
.reqs li.met .reqs__dot svg { display: block; }

/* Sucesso */
.center-stack { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.badge { width: 112px; height: 112px; border-radius: 50%; background: var(--lavender); display: flex; align-items: center; justify-content: center; position: relative; }
.badge__ring { position: absolute; inset: -12px; border-radius: 50%; border: 2px dashed var(--accent); }
.badge__core { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.success-bg { display: none; }
.actions { display: flex; flex-direction: column; gap: 32px; }
.actions--stretch { align-self: stretch; gap: 28px; }
.spacer { display: none; }

/* Elementos so mobile/desktop */
.topbar, .progress, .only-mobile { display: none; }

/* ---------- Mobile (artboards 390x844) ---------- */
@media (max-width: 767px) {
  body, .shell { background: #FFFFFF; }
  .side, .only-desktop, .backlink { display: none !important; }
  .only-mobile { display: initial; }
  p.only-mobile, button.only-mobile { display: block; }
  .main { padding: 0; align-items: stretch; }
  .panel {
    max-width: none; min-height: 100vh; min-height: 100dvh; padding: 60px 24px 36px;
    padding-bottom: max(36px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 28px;
    position: relative; overflow: hidden;
  }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .topbar__back { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-mobile); color: var(--ink); background: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
  .topbar__back:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .topbar__step { font-size: 13px; font-weight: 600; color: var(--muted); }
  .progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .progress span { height: 4px; border-radius: 2px; background: var(--lavender); }
  .progress span.on { background: var(--primary); }
  .shell[data-step="success"] .topbar, .shell[data-step="success"] .progress, .shell[data-step="message"] .progress { display: none; }

  .view { flex: 1; gap: 28px; }
  .view[data-view="password"] { gap: 24px; }
  .head { gap: 14px; }
  .view[data-view="password"] .head { gap: 10px; }
  .tile { width: 52px; height: 52px; }
  .tile svg { width: 24px; height: 24px; }
  h1 { font-size: 26px; line-height: 1.25; }
  .lead { font-size: 15px; }
  .form { flex: 1; }
  #password-form { gap: 16px; }
  .spacer { display: block; flex: 1; }
  .control { height: 54px; border-radius: 14px; background: var(--sand); border-color: var(--line-mobile); }
  .control:focus-within { background: #FFFFFF; }
  .btn { height: 54px; border-radius: 14px; flex: none; }
  .actions { gap: 16px; }
  .btn--gap { margin-top: 0; }
  .actions .note { text-align: center; }
  .otp-group { gap: 14px; }
  .otp-group legend { margin-bottom: 8px; }
  .otp { gap: 8px; }
  .otp input { height: 58px; font-size: 22px; background: var(--sand); border-color: var(--line-mobile); }
  .otp input:focus { background: #FFFFFF; }
  .reqs { padding: 14px; gap: 10px; background: var(--sand); border-radius: 14px; font-size: 13px; }
  .reqs__dot { width: 18px; height: 18px; }
  .reqs__dot svg { width: 11px; height: 11px; }

  .view--center { justify-content: space-between; gap: 24px; text-align: center; }
  .view--center .center-stack { flex: 1; justify-content: center; position: relative; }
  .view--center .head { max-width: 300px; }
  .view--center h1 { font-size: 28px; }
  .success-bg { display: block; position: absolute; left: 50%; top: 150px; width: 520px; height: 520px; margin-left: -260px; border-radius: 50%; background: var(--lavender-soft); }
  .badge { width: 120px; height: 120px; }
  .badge__core { width: 76px; height: 76px; }
  .badge__core svg { width: 38px; height: 38px; }
  .actions--stretch { gap: 12px; position: relative; }
  .shell[data-step="success"] .panel { gap: 24px; }
  .live { margin-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
