/* Sign in / sign up: brand panel on the left, form on the right. Tokens from lisa.css. */

body.auth { min-height: 100vh; background: var(--surface); }
.auth-shell { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; min-height: 100vh; }

/* ── brand panel ── */
.brand { position: relative; display: flex; flex-direction: column; padding: 36px 48px; background: var(--night); color: #a6b2cc; overflow: hidden; isolation: isolate; }
.brand::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px circle at 85% 10%, rgba(30,87,200,.55), transparent 60%), radial-gradient(500px circle at 0% 100%, rgba(34,180,238,.25), transparent 60%); }
.brand::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.brand-top { display: flex; align-items: center; justify-content: space-between; }
.brand-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: #a6b2cc; transition: color .2s; }
.brand-back:hover { color: #fff; }
.brand-back svg { width: 16px; height: 16px; }
.brand-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
.brand-orb { position: relative; width: 210px; height: 210px; margin: 0 0 8px -20px; }
.brand-orb canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.brand h1 { color: #fff; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; max-width: 460px; }
.brand h1 .serif { background: linear-gradient(110deg, #8fb3ff, #5ee1ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-lead { margin-top: 16px; max-width: 430px; font-size: 16px; line-height: 1.65; }
.brand-qa { position: relative; margin-top: 30px; max-width: 430px; min-height: 150px; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.brand-qa .q { align-self: flex-end; padding: 8px 13px; border-radius: 16px 16px 5px 16px; background: var(--grad); color: #fff; font-weight: 500; }
.brand-qa .a { align-self: flex-start; padding: 10px 13px; border-radius: 16px 16px 16px 5px; background: rgba(255,255,255,.95); color: #26324a; line-height: 1.5; }
.brand-qa .a b { color: #0a1326; }
.brand-qa > * { animation: qa-in .6s var(--ease) both; }
.brand-qa > .a { animation-delay: .5s; }
.brand-qa.out > * { opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .35s; animation: none; }
@keyframes qa-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.brand-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; }
.brand-points li { display: flex; gap: 10px; align-items: center; }
.brand-points svg { width: 18px; height: 18px; color: #5ee1ff; flex: none; }
.brand-foot { font-size: 12.5px; color: #6f7b96; }

/* ── form panel ── */
.panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 24px; background: linear-gradient(180deg, var(--bg-soft), var(--bg) 50%); }
.card { width: 100%; max-width: 440px; }
.card.wide { max-width: 520px; }
.m-brand { display: none; margin-bottom: 28px; }
.card h2 { font-size: 34px; letter-spacing: -.035em; }
.card .sub { margin-top: 8px; color: var(--ink-soft); font-size: 15.5px; }
.card form { margin-top: 30px; display: grid; gap: 18px; }

.field { display: grid; gap: 8px; align-content: start; }
.field > label, .field .label-row { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a, .label-row button { border: 0; background: none; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--blue); }
.label-row a:hover, .label-row button:hover { text-decoration: underline; text-underline-offset: 3px; }
.input { position: relative; display: flex; align-items: center; }
.input > svg.lead-ico { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--ink-mute); pointer-events: none; transition: color .2s; }
.input input { width: 100%; height: 52px; padding: 0 16px 0 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 15.5px; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .25s, background .2s; }
.input input::placeholder { color: var(--ink-mute); }
.input input:hover { border-color: var(--line-strong); }
.input input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,87,200,.12); }
.input:focus-within > svg.lead-ico { color: var(--blue); }
.input input[readonly] { background: var(--bg-soft); color: var(--ink-soft); }
.input.plain input { padding-left: 16px; }
.input .eye { position: absolute; right: 8px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--ink-mute); }
.input .eye:hover { color: var(--ink); background: var(--bg-soft); }
.input .eye svg { width: 18px; height: 18px; }
.input.has-eye input { padding-right: 52px; }
.input .inline-btn { position: absolute; right: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--blue-50); color: var(--blue); font-weight: 650; font-size: 13.5px; transition: background .2s, color .2s; }
.input .inline-btn:hover:not(:disabled) { background: var(--blue); color: #fff; }
.input .inline-btn:disabled { opacity: .6; cursor: not-allowed; }
.input.has-btn input { padding-right: 132px; }

.submit { width: 100%; height: 54px; margin-top: 6px; border: 0; border-radius: 14px; font-size: 16px; }
.submit .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spinr .7s linear infinite; }
.submit.loading .spin { display: inline-block; }
.submit.loading svg.arrow { display: none; }
@keyframes spinr { to { transform: rotate(360deg); } }
.switch { margin-top: 26px; text-align: center; font-size: 15px; color: var(--ink-soft); }
.switch a { color: var(--blue); font-weight: 650; }
.switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fineprint { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--ink-mute); }

.alert { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; animation: qa-in .4s var(--ease); }
.alert::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: currentColor; }
.alert.err { background: var(--tint-rose); border: 1px solid var(--tint-rose-line); color: var(--err-text); }
.alert.ok { background: var(--tint-mint); border: 1px solid var(--tint-mint-line); color: var(--ok-text); }
.card > .alert { margin-top: 22px; }

/* sign-up specifics */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.verify-box { display: grid; gap: 14px; padding: 18px; border-radius: 18px; background: var(--bg-soft); border: 1px solid var(--line-2); }
.verify-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.verify-head p { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.verify-head small { display: block; font-weight: 400; color: var(--ink-mute); font-size: 12.5px; }
.vtabs { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.vtabs button { position: relative; z-index: 1; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font-size: 13px; font-weight: 600; color: var(--ink-soft); transition: color .25s; }
.vtabs button[aria-selected="true"] { color: #fff; }
.vtabs .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 999px; background: var(--blue); transition: transform .45s var(--ease), width .45s var(--ease); }
.vgroup { display: none; gap: 10px; }
.vgroup.active { display: grid; animation: qa-in .4s var(--ease); }
.vgroup.field-disabled { opacity: .45; pointer-events: none; }
.otp-verify-section { display: none; gap: 8px; }
.otp-verify-section.show { display: grid; animation: qa-in .4s var(--ease); }
.otp-input input { letter-spacing: .5em; font-weight: 700; font-size: 18px; padding-left: 18px !important; font-variant-numeric: tabular-nums; }
.otp-timer { font-size: 12.5px; color: var(--ink-mute); }
.verified-badge { display: none; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--tint-mint); border: 1px solid var(--tint-mint-line); color: var(--ok-text); font-size: 14px; font-weight: 600; }
.verified-badge.show { display: flex; animation: qa-in .4s var(--ease); }
.verified-badge svg { width: 18px; height: 18px; }
.strength { display: flex; gap: 4px; margin-top: 2px; }
.strength i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.strength[data-level="1"] i:nth-child(1) { background: var(--rose); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--amber); }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--mint); }
.strength-label { font-size: 12px; color: var(--ink-mute); min-height: 16px; }
.unlock-hint { font-size: 12.5px; color: var(--ink-mute); text-align: center; margin-top: -6px; }

/* forgot-password modal */
.modal-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(6,12,29,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card { position: relative; width: 100%; max-width: 420px; padding: 30px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.97); transition: transform .45s var(--ease); }
.modal-overlay.open .modal-card { transform: none; }
.modal-card h2 { font-size: 24px; }
.modal-card .sub { margin-top: 6px; color: var(--ink-soft); font-size: 14.5px; }
.modal-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg-soft); color: var(--ink-soft); }
.modal-close:hover { color: var(--ink); }
.modal-close svg { width: 16px; height: 16px; }
.modal-step { display: none; margin-top: 20px; gap: 16px; }
.modal-step.active { display: grid; animation: qa-in .4s var(--ease); }
.modal-card .alert { margin-top: 16px; }
.fp-dots { display: flex; gap: 6px; margin-top: 18px; }
.fp-dots i { width: 24px; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s, width .4s var(--ease); }
.fp-dots i.on { width: 36px; background: var(--grad); }

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand { display: none; }
  .m-brand { display: inline-flex; }
  .panel { justify-content: flex-start; padding-top: 40px; }
}
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } .card h2 { font-size: 29px; } }
.panel { position: relative; }
.auth-theme { position: absolute; top: 20px; right: 20px; }
:root[data-theme="dark"] .brand { background: #040915; }
:root[data-theme="dark"] .brand-qa .a { background: rgba(255,255,255,.92); }
