/* Login · Cadastro · Recuperar senha — visual do componente "sign-in" (21st.dev), recriado
   sem Tailwind/TypeScript no padrão do Horos (2026-10-06, pedido do usuário): formulário à
   esquerda, foto à direita, campos arredondados "de vidro", entrada animada.
   Cor de destaque = azul do Horos (no original, roxo). Tema = o do sistema / preferência do app. */

:root {
  --accent: #1F93FF;
  --accent-hover: #1677d6;
  --font: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 16px;
}
[data-theme="light"], :root:not([data-theme]) {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #0f1115;
  --fg-2: #3a3f47;
  --muted: #6b717c;
  --line: #e3e6ea;
  --glass: rgba(15,17,21,0.035);
  --glass-focus: rgba(31,147,255,0.07);
  --btn: #0f1115; --btn-fg: #ffffff; --btn-hover: #2a2e35;
  --secondary: #f3f4f6;
  --card-glass: rgba(255,255,255,0.72);
  --toast-bg: #15171b;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121316;
  --fg: #eceef1;
  --fg-2: #c7cbd2;
  --muted: #9097a3;
  --line: #2b2f36;
  --glass: rgba(255,255,255,0.045);
  --glass-focus: rgba(31,147,255,0.12);
  --btn: #f1f2f4; --btn-fg: #121316; --btn-hover: #dfe2e6;
  --secondary: #1d2025;
  --card-glass: rgba(24,26,30,0.62);
  --toast-bg: #24272d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }

/* ── Página: formulário | foto ── */
.split { display: flex; min-height: 100dvh; width: 100%; }
.panel-right {                     /* coluna do formulário (nome antigo mantido: os scripts não dependem dele) */
  flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 28px 32px;
}
.as-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
  color: var(--fg); text-decoration: none; align-self: flex-start; }
.as-brand img { width: 28px; height: 28px; }

.screen { display: none; }
.screen.active { display: flex; flex: 1; align-items: center; justify-content: center; }
.form-wrap { width: 100%; max-width: 440px; padding: 32px 0; margin: auto; }
.form-wrap > * + * { margin-top: 0; }

/* ── Texto ── */
.form-title { font-size: 46px; line-height: 1.08; font-weight: 600; letter-spacing: -0.035em; margin-bottom: 14px; }
.form-title .light { font-weight: 300; }
.form-subtitle { font-size: 16px; color: var(--muted); line-height: 1.55; margin-bottom: 30px; }

/* ── Campos de vidro ── */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.field input, .field select {
  width: 100%; height: 54px; padding: 0 16px; font: inherit; font-size: 15px; color: var(--fg);
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); outline: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--muted); opacity: .75; }
.field input:focus, .field select:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: var(--glass-focus); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--fg); -webkit-box-shadow: 0 0 0 1000px var(--bg) inset; caret-color: var(--fg); transition: background-color 9999s; border-radius: var(--radius); }
.field-row { display: flex; align-items: center; justify-content: space-between; }
.field-2col { display: flex; gap: 12px; }
.field-2col .field { flex: 1; min-width: 0; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 50px; }
.eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer;
  color: var(--muted); display: flex; transition: color .15s; }
.eye-btn:hover { color: var(--fg); }

/* Manter conectado · Esqueci a senha */
.as-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; font-size: 14px; }
.as-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--fg-2); user-select: none; }
.as-check input { appearance: none; -webkit-appearance: none; width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--line);
  background: var(--glass); cursor: pointer; display: grid; place-content: center; transition: background .15s, border-color .15s; }
.as-check input::after { content: ''; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s var(--ease); }
.as-check input:checked { background: var(--accent); border-color: var(--accent); }
.as-check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }

/* ── Botões e links ── */
.link { color: var(--accent); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.btn { width: 100%; height: 54px; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff;
  font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; transition: background .15s, transform .1s; margin-top: 4px; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.99); }
.btn:disabled { cursor: default; }
.or-divider { position: relative; display: flex; align-items: center; justify-content: center; margin: 26px 0; }
.or-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.or-divider span { position: relative; background: var(--bg); padding: 0 14px; font-size: 13.5px; color: var(--muted); }
.btn-google { width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--fg);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: background .15s; }
.btn-google:hover { background: var(--secondary); }
.btn-google:disabled { opacity: .6; cursor: default; }
.footer-link { text-align: center; font-size: 14.5px; color: var(--muted); margin-top: 26px; }
.footer-link .link { font-weight: 500; }
.as-legal { text-align: center; font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.6; }
.as-legal a { color: var(--muted); text-decoration: underline; }
.back-link { margin-bottom: 26px; }
.back-link .link { color: var(--muted); font-size: 14.5px; }
.back-link .link:hover { color: var(--fg); text-decoration: none; }

/* ── Força da senha ── */
.pass-strength { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.strength-bar { display: flex; gap: 4px; }
.strength-bar span { flex: 1; height: 3px; border-radius: 99px; background: var(--line); transition: background .2s; }
.strength-bar span.on-1 { background: #ef4444; }
.strength-bar span.on-2 { background: #f97316; }
.strength-bar span.on-3 { background: #eab308; }
.strength-bar span.on-4 { background: #22c55e; }
.pass-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.pass-rule { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); transition: color .15s; }
.pass-rule:last-child { grid-column: 1 / -1; }
.pass-rule .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); flex-shrink: 0; transition: background .15s; }
.pass-rule.met { color: #16a34a; }
.pass-rule.met .dot { background: #16a34a; }
[data-theme="dark"] .pass-rule.met { color: #4ade80; }
[data-theme="dark"] .pass-rule.met .dot { background: #4ade80; }

/* ── Erro no campo ── */
.field.error input, .field.error select { border-color: #ef4444 !important; background: rgba(239,68,68,.06); }
.field.error > label { color: #ef4444; }
.field-err { font-size: 12.5px; color: #ef4444; }

/* ── Código de confirmação ── */
.otp-group { display: flex; gap: 10px; justify-content: center; margin: 18px 0 28px; }
.otp-input { width: 54px; height: 64px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass);
  font: inherit; font-size: 26px; font-weight: 600; text-align: center; color: var(--fg); outline: none; transition: border-color .15s, background .15s; }
.otp-input:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: var(--glass-focus); }
.confirm-hint { font-size: 14.5px; color: var(--muted); text-align: center; margin-bottom: 4px; }
.confirm-email-lbl { font-size: 15.5px; font-weight: 600; text-align: center; margin-bottom: 6px; }
.resend-row { text-align: center; font-size: 14px; color: var(--muted); margin-top: 20px; }
#screen-confirm .form-wrap { text-align: center; }
#screen-confirm .back-link { text-align: left; }

/* ── Arte da marca: nebulosa azul (2026-10-13, imagem enviada pelo usuário; antes o sistema solar de 2026-10-06) ──
   assets/auth-hero-nebula4.webp (225 KB) com JPG de reserva; vertical 1629×2172 (3:4, 1,5× para telas de alta densidade), igual ao formato do bloco.
   Fundo da cor do espaço da imagem: se a proporção da janela cortar, as bordas continuam iguais. */
.as-hero { flex: 1; position: relative; padding: 16px; min-width: 0; }
.as-hero-img { position: absolute; inset: 16px; border-radius: 28px; overflow: hidden;
  background-color: #111934;
  background-image: url('assets/auth-hero-nebula4.jpg');
  background-image: image-set(url('assets/auth-hero-nebula4.webp') type('image/webp'), url('assets/auth-hero-nebula4.jpg') type('image/jpeg'));
  background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; }

/* Texto sobre a arte (2026-10-06, a partir da imagem "Login Horos: Uma Nova Fase" do usuário):
   frase embaixo à direita, branca, com degradê escuro embaixo para a leitura. Sem marca/estrela (pedido do usuário). */
.as-hero-img::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.55) 100%); }
.as-hero-copy { position: absolute; z-index: 1; right: clamp(28px, 5%, 64px); left: 24px; bottom: clamp(28px, 4.5%, 52px);
  text-align: right; color: #f4f1ea; }
.as-hero-kicker { font-size: 12px; font-weight: 500; letter-spacing: .28em; color: rgba(244,241,234,.78); margin: 0 0 12px; }
.as-hero-title { font-size: clamp(20px, 1.75vw, 26px); font-weight: 300; line-height: 1.32; letter-spacing: -.005em; margin: 0;
  text-shadow: 0 1px 12px rgba(0,0,0,.6); }

/* ── Entrada animada (fadeSlideIn / slideRightIn do original) ── */
.anim { opacity: 0; filter: blur(4px); transform: translateY(14px); animation: fadeSlideIn .7s var(--ease) forwards; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .4s; }
.d5 { animation-delay: .5s; } .d6 { animation-delay: .6s; } .d7 { animation-delay: .7s; } .d8 { animation-delay: .8s; } .d9 { animation-delay: .9s; }
.as-hero-img { opacity: 0; filter: blur(4px); transform: translateX(30px); animation: slideRightIn .9s var(--ease) .3s forwards; }
@keyframes fadeSlideIn { to { opacity: 1; filter: blur(0); transform: translateY(0); } }
@keyframes slideRightIn { to { opacity: 1; filter: blur(0); transform: translateX(0); } }
/* Troca de tela (cadastro → código) refaz a entrada */
.screen.active .anim { animation-name: fadeSlideIn; }
@media (prefers-reduced-motion: reduce) {
  .anim, .as-hero-img { animation: none !important; opacity: 1; filter: none; transform: none; }
}

/* ── Aviso ── */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(12px); z-index: 50;
  background: var(--toast-bg); color: #fff; font-size: 13.5px; font-weight: 500; padding: 12px 20px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Celular / tela estreita: só o formulário ── */
@media (max-width: 900px) {
  .as-hero { display: none; }
  .panel-right { padding: 20px 16px; }
  .form-title { font-size: 36px; }
  .field input, .otp-input { font-size: 16px; }
  .otp-input { width: 46px; height: 56px; }
  .pass-rules { grid-template-columns: 1fr; }
}
