/* Shared auth-screen styles (Sign in, Two-factor, Recovery code, …).
   Scoped under .stage; uses the global awbguru theme tokens. Rules only match
   on auth pages that render a .stage container, so this is inert elsewhere. */
.stage { position: relative; min-height: 100vh; display: grid; place-items: center;
    padding: 48px 24px; overflow: hidden; }
.stage::before, .stage::after { content: ""; position: absolute; border-radius: 50%;
    filter: blur(70px); opacity: .5; pointer-events: none; z-index: 0; }
.stage::before { width: 460px; height: 460px; background: var(--glow-b, rgba(63,124,240,.28)); top: -160px; left: -120px; }
.stage::after { width: 420px; height: 420px; background: var(--glow-g, rgba(142,210,78,.34)); bottom: -180px; right: -120px; }

.stage .auth { position: relative; z-index: 1; width: 100%; max-width: 440px; }
.stage .auth-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 22px; }
/* The brand SVGs ship monochrome (black). On auth we tint the MARK with the brand
   gradient via CSS mask and size it up; the wordmark stays black, a touch smaller. */
.stage .brand-mark {
    height: 72px; aspect-ratio: 1229 / 930; margin: 0 auto;
    background: var(--grad, linear-gradient(100deg, #3f7cf0 0%, #8ed24e 100%));
    -webkit-mask: url('/img/brand/awbguru-mark-tight.svg') center / contain no-repeat;
            mask: url('/img/brand/awbguru-mark-tight.svg') center / contain no-repeat; }
.stage .brand-mark img { display: none; }
.stage .brand-name { margin-top: 8px; }
.stage .brand-name img { height: 32px; width: auto; display: block; margin: 0 auto; }
.stage .brand-sub { font-family: var(--sans); font-size: 11.5px; letter-spacing: .01em; color: var(--muted); margin-top: 4px; }

.stage .card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 32px 30px 28px; }
.stage .card-title { font-family: var(--serif); font-size: 28px; font-weight: 500; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
.stage .card-note { color: var(--muted); font-size: 15px; margin-top: 6px; }
.stage .card-note b { color: var(--fg); font-weight: 600; }

/* A restrained inline notice — one direct line, not a stock filled alert box.
   No left accent bar. Reads as part of the form, not a toast dropped on top. */
.stage .banner { display: flex; gap: 9px; align-items: center; margin: 18px 0 2px; padding: 9px 13px;
    background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; }
.stage .banner[hidden] { display: none; }
.stage .banner svg { width: 15px; height: 15px; flex: none; stroke: var(--warn); }
.stage .banner-body { font-size: 15px; color: #6b5410; line-height: 1.45; }
.stage .banner-body b { font-weight: 600; color: #5a4708; }
.stage .banner-body span { display: block; font-size: 14px; color: #7a6224; margin-top: 1px; }
/* success-tone variant ("already a member") */
.stage .banner.good { background: var(--good-bg); border-color: var(--good-line); }
.stage .banner.good svg { stroke: var(--good); }
.stage .banner.good .banner-body { color: #365f13; }
.stage .banner.good .banner-body b { color: #2c4d0f; }

.stage .form { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.stage .field { display: flex; flex-direction: column; gap: 7px; }
.stage .label { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: normal;
    text-transform: none; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; }
.stage .link { font-family: var(--sans); font-size: 15px; letter-spacing: normal; color: var(--c-blue); font-weight: 500; text-transform: none; }
.stage .link:hover { text-decoration: underline; }
.stage .input-wrap { position: relative; }
/* inputs MUST stay >=16px — iOS Safari auto-zooms on focus below that. */
.stage .input { width: 100%; height: 46px; padding: 0 14px; background: var(--surface2); color: var(--fg);
    font-size: 16px; border: 1px solid var(--line); border-radius: 10px; transition: background .15s, box-shadow .15s, border-color .15s; }
.stage .input::placeholder { color: var(--faint); }
.stage .input:hover { border-color: var(--line2); }
.stage .input:focus-visible { outline: none; background: var(--surface); border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(63,124,240,.16); }
.stage .input.code { font-family: var(--mono); font-size: 17px; letter-spacing: .32em; text-align: center; }
.stage .input.has-toggle { padding-right: 58px; }
.stage .toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: none;
    cursor: pointer; font-family: var(--sans); font-size: 12.5px; letter-spacing: normal; text-transform: none; color: var(--muted); padding: 6px 7px; border-radius: 6px; }
.stage .toggle:hover { color: var(--fg); background: var(--surface3); }
.stage .toggle .eye { width: 18px; height: 18px; display: block; }
.stage .fld-err { color: var(--warn); font-size: 12px; }

.stage .remember { display: flex; align-items: center; gap: 9px; margin-top: 2px; cursor: pointer; user-select: none; }
.stage .remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.stage .box { width: 17px; height: 17px; border-radius: 5px; flex: none; background: var(--surface2);
    border: 1px solid var(--line2); display: grid; place-items: center; transition: background .12s, border-color .12s; }
.stage .box svg { width: 11px; height: 11px; stroke: #0e1e07; opacity: 0; transition: opacity .12s; }
.stage .remember input:checked + .box { background: var(--grad); border-color: transparent; }
.stage .remember input:checked + .box svg { opacity: 1; }
.stage .remember-label { font-size: 15px; color: var(--muted); }

.stage .btn { height: 46px; width: 100%; padding: 0 16px; border-radius: 10px; font-family: var(--sans);
    font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; border: none; white-space: nowrap; position: relative; overflow: hidden;
    transition: transform .12s, box-shadow .18s, background .2s, color .2s, border-color .2s; text-decoration: none; }
.stage .btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c-blue); }
/* HYBRID primary — white fill + gradient hairline border + depth at rest,
   soft full-gradient wash @ 40% on hover. Label stays dark at full opacity. */
.stage .btn-primary {
    background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
    border: 1.5px solid transparent; color: #0e1e07;
    box-shadow: var(--depth); font-size: 16px; margin-top: 4px; }
/* Hover fills the padding-box with a soft pastel gradient baked as solid colors
   (NOT an opacity overlay), so the label never sits under a wash — it stays crisp
   #0e1e07 and never dims or shifts, whether or not it's wrapped in a span. Matches
   .awb-btn-primary in the main theme. */
.stage .btn-primary:hover {
    background: linear-gradient(100deg, #b2cbf9 0%, #d2edb8 100%) padding-box, var(--grad) border-box;
    transform: translateY(-1px); box-shadow: 0 10px 24px -8px var(--glow-b), 0 10px 24px -8px var(--glow-g); }
.stage .btn-primary:active { transform: translateY(0); }
.stage .btn-ghost { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line2); font-size: 15px; }
.stage .btn-ghost:hover { background: var(--surface2); }
.stage .btn-ghost svg, .stage .btn-ghost img { width: 18px; height: 18px; flex: none; }

.stage .divider { display: flex; align-items: center; gap: 14px; margin: 24px 0 18px; }
.stage .divider::before, .stage .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stage .divider span { font-family: var(--sans); font-size: 12px; letter-spacing: .01em; text-transform: none; color: var(--muted); }
.stage .sso { display: flex; flex-direction: column; gap: 10px; }

.stage .auth-foot { text-align: center; margin-top: 24px; font-size: 15px; color: var(--muted); }
.stage .auth-foot a { color: var(--c-blue); font-weight: 600; }
.stage .auth-foot a:hover { text-decoration: underline; }
.stage .legal { margin-top: 26px; text-align: center; font-family: var(--sans); font-size: 12px; letter-spacing: .01em;
    text-transform: none; color: var(--faint); display: flex; align-items: center; justify-content: center; gap: 12px; }
.stage .legal a { color: inherit; text-decoration: none; }
.stage .legal a:hover { color: var(--dim); }
.stage .legal .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }

/* Signup wizard progress (SignupStepper.razor — Register, VerifyCode, Onboarding). */
.stage .stepper { display: flex; align-items: center; justify-content: center; margin: 0 0 22px; }
.stage .step { display: flex; align-items: center; gap: 9px; color: var(--faint); }
.stage .step-dot { width: 24px; height: 24px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 500;
    background: var(--surface2); border: 1px solid var(--line2); color: var(--dim); }
.stage .step-dot svg { width: 12px; height: 12px; stroke: #0e1e07; display: block; }
.stage .step-name { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.stage .step.done-step .step-dot { background: var(--good-bg); border-color: var(--good-line); }
.stage .step.done-step .step-name { color: var(--muted); }
/* current step: gradient OUTLINE only (no fill), bold black number */
.stage .step.current .step-dot {
    background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
    border: 2px solid transparent; color: var(--fg); font-weight: 700; }
.stage .step.current .step-name { color: var(--fg); font-weight: 500; }
.stage .step-sep { width: 22px; height: 1px; background: var(--line2); margin: 0 10px; flex: none; }
.stage .mprog { display: none; align-items: center; justify-content: center; gap: 12px; margin: 0 0 20px; }
.stage .mprog-track { width: 96px; height: 5px; border-radius: 999px; background: var(--surface3); overflow: hidden; }
.stage .mprog-fill { height: 100%; background: var(--grad); border-radius: 999px; }
.stage .mprog-label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.stage .mprog-label b { color: var(--fg); font-weight: 600; }
@media (max-width: 640px) { .stage .stepper { display: none; } .stage .mprog { display: flex; } }

/* Invite identity block (Join.razor) — who sent this link, and how big the
   workspace already is. Every line is optional: an inviter who has since left
   the company leaves the block out entirely rather than showing a blank row. */
.stage .invite-meta { margin-top: 20px; padding: 14px 15px; background: var(--surface2);
    border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.stage .invite-row { display: flex; align-items: center; gap: 11px; }
.stage .invite-avatar { width: 36px; height: 36px; border-radius: 10px; flex: none;
    background: var(--grad-soft); border: 1px solid var(--line); display: grid; place-items: center;
    font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--c-blue); }
.stage .invite-lines { min-width: 0; }
.stage .invite-name { font-size: 15px; font-weight: 600; color: var(--fg); }
.stage .invite-sub { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--dim);
    overflow: hidden; text-overflow: ellipsis; }
.stage .invite-divider { height: 1px; background: var(--line); }
.stage .role-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px 4px 9px; border-radius: 999px; background: var(--good-bg); border: 1px solid var(--good-line);
    font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em;
    text-transform: uppercase; color: var(--good); }
.stage .role-chip svg { width: 13px; height: 13px; stroke: var(--good); flex: none; }

@media (max-width: 480px) { .stage { padding: 32px 18px; } .stage .card { padding: 26px 20px 24px; } .stage .card-title { font-size: 24px; } }
