/* Clubbix — telas de entrada (cliente, empresa, administrador).
   Visual aprovado nos protótipos; tokens em tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body.auth { margin: 0; background: var(--surface-base); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
button, input { font-family: inherit; }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }

.shell { min-height: 100vh; min-height: 100dvh; display: flex; }

/* ── lado esquerdo (só desktop) ─────────────────────────────────────────── */
.hero {
  display: none; flex: 1; position: relative; overflow: hidden; padding: 48px;
  flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(520px 420px at 20% 90%, rgba(180,58,198,.32), transparent 70%),
    radial-gradient(420px 360px at 85% 5%, rgba(245,132,31,.20), transparent 70%),
    linear-gradient(160deg, #3a1259 0%, #250a3c 60%, #1c0730 100%);
}
.auth--admin .hero { background: #120820; }
@media (min-width: 900px) { .hero { display: flex; } }
.hero__mark { position: absolute; right: -120px; top: -30px; width: 380px; height: 380px; opacity: .16; pointer-events: none; }
.auth--admin .hero__mark { opacity: .08; }
.brand { display: flex; align-items: center; gap: 12px; font: 800 24px var(--font-display); position: relative; }
.brand img { display: block; width: 40px; height: 40px; }
.hero__body { position: relative; }
.hero__tag { font: 600 12px var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.hero__h { font: 800 44px/1.08 var(--font-display); letter-spacing: -.02em; max-width: 360px; margin: 0; }
.grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── lado do formulário ─────────────────────────────────────────────────── */
.panel { flex: 1; display: flex; flex-direction: column; overflow: auto; padding: 32px 24px; }
@media (min-width: 900px) { .panel { padding: 48px; } }
.panel__in { width: 100%; max-width: 380px; margin: auto; display: flex; flex-direction: column; gap: 20px; animation: cbx-rise .4s var(--ease); }
.brand--m { display: flex; align-items: center; gap: 10px; font: 800 22px var(--font-display); }
.brand--m img { display: block; width: 36px; height: 36px; }
@media (min-width: 900px) { .brand--m { display: none; } }

.prog { display: flex; gap: 6px; align-items: center; }
.prog i { height: 3px; width: 28px; border-radius: 2px; background: rgba(243,233,245,.14); }
.prog i.on { background: var(--gold); }
.prog span { font-size: 12px; color: var(--text-3); margin-left: 6px; }

.eyebrow { font: 600 12px var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.title { font: 800 32px/1.12 var(--font-display); letter-spacing: -.015em; margin: 10px 0 0; }
.title:focus, .title:focus-visible { outline: none; } /* recebe foco só para leitores de tela anunciarem o passo */
.lead { color: var(--text-2); line-height: 1.6; margin: 12px 0 0; font-size: 15px; }
.lead:empty { display: none; }

.vis { display: flex; }
.vis img { display: block; width: 104px; height: 104px; margin: -6px 0 -6px -6px; }

form { display: flex; flex-direction: column; gap: 20px; margin: 0; }

/* ── campos ─────────────────────────────────────────────────────────────── */
.fld { position: relative; display: block; height: 60px; border-radius: 14px; background: var(--surface-raised); border: 1px solid var(--line); cursor: text; transition: border-color .15s, box-shadow .15s; }
.fld:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(251,177,60,.18); }
.fld .ic { position: absolute; left: 16px; top: 20px; color: var(--text-2); }
.fld__l { position: absolute; left: 48px; top: 10px; font-size: 12px; color: var(--text-2); pointer-events: none; }
.fld:focus-within .ic, .fld:focus-within .fld__l { color: var(--gold); }
.fld input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 26px 56px 0 48px; background: none; border: 0; outline: 0; color: var(--text); font-size: 16px; border-radius: 14px; }
.fld input::placeholder { color: var(--text-3); }
.fld input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 60px var(--surface-raised) inset; caret-color: var(--text); }
.fld--err { border-color: var(--danger-line); }
.fld--err .ic, .fld--err .fld__l { color: var(--danger); }
.fld__eye { position: absolute; right: 4px; top: 8px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--gold); cursor: pointer; border-radius: 12px; }
.fld__err { font-size: 12px; margin: 8px 4px 0; color: var(--danger); }
.fld__err:empty { display: none; }

/* ── código de 6 dígitos ────────────────────────────────────────────────── */
.otp { position: relative; }
.otp__row { display: flex; gap: 8px; }
.otp__b { flex: 1; min-width: 0; height: 60px; border-radius: 14px; background: var(--surface-raised); display: flex; align-items: center; justify-content: center; font: 600 24px var(--font-display); border: 1px solid var(--line); }
.otp__b.cur { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(251,177,60,.18); }
.otp--err .otp__b { border-color: var(--danger-line); }
.otp__in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; cursor: text; }
.cd { font-size: 14px; margin-top: 12px; color: var(--text-2); min-height: 1.2em; }

/* ── senha: medidor e requisitos ────────────────────────────────────────── */
.pw { display: flex; flex-direction: column; gap: 12px; }
.meter { display: flex; gap: 6px; }
.meter i { flex: 1; height: 3px; border-radius: 2px; background: rgba(243,233,245,.12); }
.reqs { display: flex; flex-direction: column; gap: 10px; }
.req { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text-3); }
.req b { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(243,233,245,.2); flex: none; }
.req b .ic { width: 10px; height: 10px; stroke-width: 3; color: #fbb13c; display: none; }
.req.ok { color: var(--text); }
.req.ok b { border-color: #fbb13c; }
.req.ok b .ic { display: block; }

/* ── avisos ─────────────────────────────────────────────────────────────── */
.banner { padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5; display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); background: var(--surface-raised); color: var(--text); overflow-wrap: anywhere; }
.banner .ic { margin-top: 1px; }
.banner--err { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.banner--ok { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }

.card { padding: 16px 18px; border-radius: 14px; background: var(--surface-raised); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── botões ─────────────────────────────────────────────────────────────── */
.btn { width: 100%; height: 56px; border-radius: 999px; border: 0; color: #fff; font: 600 14.4px var(--font-display); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--brand-grad); box-shadow: var(--glow-orange); text-decoration: none; transition: filter .15s, opacity .15s; }
.btn:hover:not([disabled]) { filter: brightness(1.06); }
.btn[disabled] { background: #2a1843; box-shadow: none; opacity: .7; cursor: not-allowed; }
.btn--light { background: #f3e9f5; color: #160a28; box-shadow: none; }
.btn--light[disabled] { background: #2a1843; color: #fff; }
.btn--ghost { background: none; border: 1.5px solid var(--orange); color: var(--gold); box-shadow: none; }
.btn--line { width: auto; height: 44px; padding: 0 18px; background: none; border: 1px solid var(--line-strong); color: var(--text); box-shadow: none; font-size: 13px; }
.btn--line .ic { width: 16px; height: 16px; }
.link { height: 48px; border: 0; background: none; color: var(--text-2); font: 500 14px var(--font-body); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.link:hover:not([disabled]) { color: var(--text); }
.link[disabled] { opacity: .45; cursor: default; }
.link .ic { width: 16px; height: 16px; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.choice { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.foot { margin-top: 16px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.foot a { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: cbx-spin .7s linear infinite; }
.btn--light .spin { border-color: rgba(22,10,40,.25); border-top-color: #160a28; }

/* ── selo de ícone e QR ─────────────────────────────────────────────────── */
/* O PNG do autenticador nasce com células de 16px (912px na URI típica,
   quiet zone de 4 módulos inclusa). O quadro vai até 336px com 8px de
   moldura: a imagem fica em 320px no desktop e, no celular, na largura da
   coluna (240px numa tela de 320px). */
.qr { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 16px 7px; border-radius: 20px; background: var(--surface-raised); border: 1px solid var(--line); }
.qr__img { width: 100%; max-width: 336px; margin: 0 auto; box-sizing: border-box; border-radius: 12px; background: #f3e9f5; padding: 8px; outline: 1px solid var(--line-strong); }
.qr__img img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.qr__t { font-size: 13px; color: var(--text-2); line-height: 1.6; min-width: 0; }
.qr__s { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--text); margin-top: 6px; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes div { height: 40px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font: 13px ui-monospace, Menlo, Consolas, monospace; color: var(--text-2); user-select: all; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
noscript p { padding: 24px; text-align: center; }
