/* =========================================================
   SOS Buddy · auth.css
   Telas de entrada (Entrar) e de primeiro acesso (onboarding).
   ========================================================= */

.auth { display: flex; flex-wrap: wrap; min-height: calc(100vh - 37px); background: var(--surface); }

.auth-side {
  flex: 1 1 360px; min-width: 0;
  background: var(--navy); color: #FFFFFF;
  padding: 40px; display: flex; flex-direction: column; gap: 40px;
}
.auth-side .brand { display: flex; align-items: center; gap: 10px; color: #FFFFFF; text-decoration: none; }
.auth-side .brand img { width: 38px; height: 38px; }
.auth-side .brand span { font-family: var(--display); font-weight: 900; font-size: 21px; }
.auth-side .quote { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.25; }
.auth-side .lead { color: #C3D1E6; font-size: 16px; max-width: 420px; margin-top: 12px; }
.auth-side .foot { margin-top: auto; font-size: 14px; color: #C3D1E6; line-height: 1.6; }

.auth-main {
  flex: 999 1 520px; min-width: 0;
  padding: 48px 32px; display: flex; justify-content: center; align-items: flex-start;
}
.auth-box { width: 520px; max-width: 100%; display: flex; flex-direction: column; gap: 18px; }
.auth-box h1 { font-size: 32px; font-weight: 900; }
.auth-box .sub { color: var(--muted); font-size: 16px; margin-top: 8px; }
.auth-center { align-items: center; }

/* Etapas do cadastro */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; }
.steps li[aria-current="step"] { background: rgba(255, 255, 255, .08); }
.steps .n {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid #3C5577; color: #9FB2CC; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.steps li[aria-current="step"] .n { background: #FFFFFF; border-color: #FFFFFF; color: var(--navy); }
.steps li.done .n { background: var(--green); border-color: var(--green); color: #0F3D26; }
.steps strong { display: block; font-size: 15px; color: #C3D1E6; }
.steps li[aria-current="step"] strong, .steps li.done strong { color: #FFFFFF; }
.steps small { font-size: 13px; color: #9FB2CC; }

.progress { display: flex; flex-direction: column; gap: 10px; }
.progress span { font-size: 14px; font-weight: 600; color: var(--blue-dark); }
.progress .track { height: 6px; border-radius: 3px; background: var(--line); }
.progress .track i { display: block; height: 100%; border-radius: 3px; background: var(--blue-ink); transition: width .3s ease; }

.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; flex-wrap: wrap; }
.nav-row .right { display: flex; gap: 10px; align-items: center; margin-left: auto; }

.pw-rules { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-rules span { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pw-rules span.ok { background: var(--ok-bg); color: var(--ok-ink); }

.pw-field { display: flex; align-items: center; border: 1.5px solid var(--field); border-radius: var(--r-sm); padding-right: 6px; background: var(--surface); }
.pw-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(52, 120, 246, .2); }
.pw-field .input { border: 0; box-shadow: none !important; }
.pw-field.invalid { border-color: var(--red); }

/* Vincular ursinho */
.pair {
  background: var(--sky); border-radius: 22px; padding: 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 24px;
}
.pair .bubble {
  width: 132px; height: 132px; border-radius: 50%; background: var(--surface);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.pair .bubble img { width: 92px; height: auto; }
.pair .bubble.searching { animation: pulse-blue 2s ease-out infinite; }
@keyframes pulse-blue {
  0% { box-shadow: 0 0 0 0 rgba(52, 120, 246, .45); }
  70% { box-shadow: 0 0 0 22px rgba(52, 120, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 120, 246, 0); }
}
.pair .state { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pair .state strong { font-family: var(--display); font-size: 19px; display: flex; align-items: center; gap: 10px; }
.pair .state p { font-size: 14px; color: var(--text-2); }

details summary { cursor: pointer; font-weight: 600; color: var(--blue-ink); font-size: 14px; }
details[open] summary { margin-bottom: 12px; }

.main-contact { border: 2px solid var(--blue); border-radius: var(--r); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.main-contact .who { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.main-contact small { color: var(--muted); font-size: 13px; }
fieldset { border: 1.5px solid var(--field); border-radius: var(--r); padding: 18px; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
legend { padding: 0 6px; font-weight: 700; font-size: 15px; }
.channels .pref { padding: 10px 0; }

.summary { width: 100%; background: var(--surface-2); border-radius: 20px; padding: 6px 20px; }
.summary .list-item { gap: 14px; }
.summary .ok { width: 28px; height: 28px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-ink); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.summary .lbl { flex: 1 1 auto; font-size: 14px; color: var(--muted); }
.summary .val { font-weight: 700; text-align: right; }

/* Boas-vindas */
.welcome-page {
  min-height: calc(100vh - 37px);
  background: linear-gradient(180deg, var(--surface) 0%, var(--sky) 100%);
  display: flex; flex-direction: column;
}
.welcome-top { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.welcome-top .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.welcome-top .brand img { width: 38px; height: 38px; }
.welcome-top .brand span { font-family: var(--display); font-weight: 900; font-size: 21px; }
.welcome-body { flex: 1 1 auto; width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 32px 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.welcome-art { flex: 1 1 320px; display: flex; justify-content: center; }
.welcome-art .circle { width: 380px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--surface); box-shadow: 0 24px 60px rgba(20, 43, 74, .10); display: flex; align-items: center; justify-content: center; }
.welcome-art img { width: 70%; height: auto; }
.welcome-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.welcome-copy h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 900; line-height: 1.06; }
.welcome-copy .lead { font-size: 18px; color: var(--text-2); }
.welcome-copy ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.welcome-copy li { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; }
.welcome-copy li span { width: 32px; height: 32px; border-radius: 10px; background: var(--surface); color: var(--blue-ink); font-family: var(--display); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.welcome-copy .ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.celebrate { width: 160px; height: 160px; border-radius: 50%; background: var(--sky); display: flex; align-items: center; justify-content: center; animation: pop .5s cubic-bezier(.2, .9, .3, 1.3); }
.celebrate img { width: 110px; height: auto; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

@media (max-width: 900px) {
  .auth-side { padding: 24px; gap: 20px; flex-basis: 100%; }
  .auth-side .steps { flex-direction: row; overflow-x: auto; gap: 4px; }
  .auth-side .steps li { padding: 8px 10px; flex: 0 0 auto; }
  .auth-side .steps small { display: none; }
  .auth-side .foot, .auth-side .hide-sm { display: none; }
  .auth-side .quote { font-size: 22px; }
  .auth-main { padding: 28px 16px 48px; }
  .auth-box h1 { font-size: 26px; }
  .welcome-top, .welcome-body { padding-left: 16px; padding-right: 16px; }
  .welcome-body { gap: 24px; padding-top: 8px; }
  .welcome-art .circle { width: 220px; }
}
