/* ============================================================
   Auth pages (login / register / verify / 2FA / reset)
   Split layout: dark brand panel + themed form panel.
   Uses the site's light/dark tokens from app.css.
   ============================================================ */
.auth-body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(340px, 46%) 1fr; }

/* ---- brand panel ---- */
.auth-hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, #2a1408 0%, #0b0f1a 55%, #070a12 100%); color: #fff; display: flex; }
.auth-hero-glow { position: absolute; inset: auto -20% -25% auto; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 90, 0, .55), rgba(255, 90, 0, 0) 65%); filter: blur(10px); pointer-events: none; }
.auth-hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; top: 12%; border: 2px solid rgba(255, 120, 40, .35); border-radius: 50%; pointer-events: none; }
.auth-hero-inner { position: relative; z-index: 1; padding: 40px 44px; display: flex; flex-direction: column; gap: 28px; width: 100%; max-width: 560px; margin: 0 auto; justify-content: center; }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.auth-brand strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.auth-brand small { display: block; font-size: 12.5px; opacity: .8; }
.auth-brand-mark { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ff8a3d, #ff4d00); box-shadow: 0 8px 24px rgba(255, 90, 0, .4); }
.auth-brand-mark .i3d { width: 28px; height: 28px; }
.auth-hero-copy h2 { margin: 6px 0 12px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.auth-hero-copy h2 em { font-style: normal; color: #ff7a1a; }
.auth-hero-copy p { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .78); max-width: 440px; }
.auth-eyebrow { display: inline-block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: #ff8a3d; border: 1px solid rgba(255, 138, 61, .6); border-radius: 999px; padding: 6px 14px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 14px; align-items: center; }
.auth-points li > span { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); display: inline-flex; align-items: center; justify-content: center; }
.auth-points .i3d { width: 28px; height: 28px; }
.auth-points strong { display: block; font-size: 15px; }
.auth-points small { display: block; font-size: 13px; color: rgba(255, 255, 255, .7); }
.auth-secure-pill { align-self: flex-start; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #ff8a3d; border: 1px solid rgba(255, 138, 61, .55); border-radius: 999px; padding: 9px 22px; }

/* ---- form panel ---- */
.auth-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 24px 40px; background: var(--bg); min-width: 0; }
.auth-topbar { position: absolute; top: 18px; left: 24px; right: 24px; display: flex; justify-content: space-between; align-items: center; }
.auth-brand-mobile { display: none; color: var(--text); }
.auth-brand-mobile .auth-brand-mark { width: 38px; height: 38px; border-radius: 12px; }
.auth-brand-mobile strong { font-size: 18px; }
.auth-topbar .theme-toggle { margin-left: auto; }
.auth-card { width: 100%; max-width: 480px; margin-top: 36px; }
.is-register .auth-card { max-width: 560px; }
.auth-card h1 { margin: 0 0 6px; font-size: clamp(28px, 4vw, 36px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { margin: 0 0 22px; color: var(--text-secondary); font-size: 15.5px; line-height: 1.5; }
.auth-form label.auth-label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; color: var(--text); }
.auth-form .auth-label small { font-weight: 500; color: var(--text-muted); }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-field { position: relative; }
.auth-field > .auth-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-muted); pointer-events: none; display: inline-flex; }
.auth-field > .auth-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-field input, .auth-field select { width: 100%; margin: 0; height: 50px; padding: 0 14px 0 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 15px; font-family: inherit; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
.auth-field input::placeholder { color: var(--text-muted); }
.auth-field input:focus, .auth-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.auth-field.has-eye input { padding-right: 48px; }
.auth-field.is-ok input { border-color: var(--success); }
.auth-field.is-bad input { border-color: var(--danger); }
.auth-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: var(--text-muted); border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.auth-eye:hover { color: var(--text); background: var(--surface-soft); }
.auth-eye svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-eye .eye-off { display: none; }
.auth-eye[aria-pressed="true"] .eye-on { display: none; }
.auth-eye[aria-pressed="true"] .eye-off { display: inline; }
.auth-hint { min-height: 18px; margin: 6px 2px 0; font-size: 12.5px; color: var(--text-muted); }
.auth-hint.ok { color: var(--success); }
.auth-hint.bad { color: var(--danger); }
.auth-strength { height: 4px; border-radius: 4px; background: var(--border); margin: 8px 2px 0; overflow: hidden; }
.auth-strength > i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }

/* role cards */
.auth-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-role { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; min-width: 0; }
.auth-role input { position: absolute; opacity: 0; pointer-events: none; }
.auth-role .auth-role-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-soft); display: inline-flex; align-items: center; justify-content: center; }
.auth-role .auth-role-ico .i3d { width: 28px; height: 28px; }
.auth-role strong { display: block; font-size: 15px; }
.auth-role small { display: block; font-weight: 400; font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; }
.auth-role::after { content: ""; position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); }
.auth-role:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.auth-role:has(input:checked)::after { background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; border-color: var(--primary); }
.auth-role:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-role.is-closed { opacity: .5; cursor: not-allowed; }

/* phone */
.auth-phone { display: grid; grid-template-columns: 134px 1fr; gap: 8px; }
.auth-phone .auth-field select { padding-left: 12px; }
.auth-phone .auth-field.num input { padding-left: 14px; }

.auth-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-secondary); margin: 18px 0 4px; cursor: pointer; }
.auth-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 18px; accent-color: var(--primary); }
.auth-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; }
.auth-between .auth-check { margin: 0; }
.auth-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-submit { width: 100%; height: 52px; margin-top: 18px; border: 0; border-radius: 12px; cursor: pointer; font-size: 16px; font-weight: 700; font-family: inherit; color: #fff; background: linear-gradient(135deg, #ff8a3d, #ff5a00); box-shadow: 0 10px 24px rgba(255, 90, 0, .28); display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .1s, box-shadow .15s, filter .15s; }
.auth-submit:hover { filter: brightness(1.05); box-shadow: 0 12px 28px rgba(255, 90, 0, .36); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit[disabled] { opacity: .65; cursor: progress; }
.auth-foot { display: flex; align-items: center; gap: 14px; margin-top: 22px; color: var(--text-secondary); font-size: 14.5px; justify-content: center; text-align: center; flex-wrap: wrap; }
.auth-foot::before, .auth-foot::after { content: ""; height: 1px; background: var(--border); flex: 1 1 24px; min-width: 20px; }
.auth-foot span { white-space: normal; }
.auth-code-input { text-align: center; font-size: 26px !important; letter-spacing: 8px; font-weight: 700; padding-left: 14px !important; }
.auth-note { font-size: 13.5px; color: var(--text-secondary); margin: 14px 0 0; line-height: 1.5; }
.auth-inline-form { display: inline; }
.auth-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); font-weight: 600; cursor: pointer; }
.auth-linkbtn[disabled] { color: var(--text-muted); cursor: not-allowed; }

/* ---- tablet / phone ---- */
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-brand-mobile { display: inline-flex; }
  .auth-panel { justify-content: flex-start; padding: 20px 18px 32px; background: radial-gradient(90% 40% at 100% 0%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 70%), var(--bg); }
  .auth-topbar { position: static; width: 100%; max-width: 560px; margin-bottom: 6px; }
  .auth-card { margin-top: 12px; }
}
@media (max-width: 520px) {
  .auth-row, .auth-roles { grid-template-columns: 1fr; }
  .auth-phone { grid-template-columns: 128px 1fr; }
  .auth-card h1 { font-size: 28px; }
  .auth-field input, .auth-field select { height: 48px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
}
@media (max-width: 360px) { .auth-phone { grid-template-columns: 1fr; } }
.auth-role strong { font-weight: 700; }
.auth-phone select { text-overflow: clip; }
@media (min-width: 961px) and (max-height: 760px) { .auth-hero-inner { gap: 18px; padding-top: 24px; padding-bottom: 24px; } .auth-points { gap: 8px; } }

/* Bot trap field: invisible to people, still present in the form. */
.hp-field { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px; height: 1px; overflow: hidden; }
