/* ====== AUTH PAGE LAYOUT ======
   Shared shell for Login / ForgotPassword / ResetPassword / VerifyEmail /
   VerifyPhone / TwoFactor. Each page just sets its own page-wrapper class
   (e.g. .login-page) and adds its own page-specific bits. Hero gradient,
   logo header, content padding, and input field shapes all live here. */
.login-page,
.forgot-page,
.reset-page,
.verify-page,
.tfa-page,
.blocked-page,
.complete-page {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: var(--bg-page);
    /* Whole page scrolls (hero + content together) — the hero holds no critical
       info, so it scrolls away on short/zoomed viewports. Page-root height is
       overridden to 100dvh/--app-zoom in utilities.css so it fits the zoomed
       viewport instead of overflowing the body and clipping the bottom. */
    overflow-y: auto;
}

.hero {
    background: linear-gradient(
        145deg,
        var(--header-grad-start) 0%,
        var(--header-grad-mid) 60%,
        var(--header-grad-end) 100%
    );
    padding: max(40px, var(--safe-area-top-fixed) + 12px) 24px 36px;
    position: relative;
    /* The page is one scroll container (hero + content together), so the hero must
       keep its natural height — without this the flex column shrinks it to fit the
       viewport, and the overflow:hidden below then clips the logo/close button off
       the top. Let the page scroll instead of squashing the header. */
    flex-shrink: 0;
    /* Clip the decorative circles to the hero — ::after sits at bottom:-20px and
       would otherwise spill into the body below the header. */
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.logo-badge {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.hero h1 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    /* Blazor enhanced nav auto-focuses h1 for screen readers; suppress the
       default focus ring so it doesn't show as a stray outline on page load. */
    outline: none;
    border: none;
}

.hero p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Content container — vertical stack of form/sections below the hero. */
.login-page > .content,
.forgot-page > .content,
.reset-page > .content,
.verify-page > .content,
.tfa-page > .content,
.blocked-page > .content,
.complete-page > .content {
    flex: 1;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Cap + centre on wide screens so the form lines up with the rest of the app
       frame and never slides under the wide-screen gutter frost. width:100% so the
       flex item stretches to the cap; margin auto centres it. No-op below 880. */
    width: 100%;
    max-width: var(--frame-content);
    margin-left: auto;
    margin-right: auto;
}

/* Wide-screen: keep the hero gradient full-bleed (like the header bar) but cap its
   content to the frame's chrome width so the logo/subtitle line up with the form
   and the app, instead of running edge-to-edge under the gutter frost. */
.hero > .logo-container,
.hero > h1,
.hero > p {
    max-width: var(--frame-chrome);
    margin-left: auto;
    margin-right: auto;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeUp 0.3s ease;
}

/* The consent sentence that stands directly above a submit button (register tab,
   Lengkapi akun). Consent is implied by pressing the button below it, so it is read
   BEFORE the press: keep it above the button, never below. Same type as .footer p. */
.consent-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.consent-note a {
    color: var(--blue-primary);
    font-weight: 600;
}

/* The one cue for every link in the sign-in pages' text: the consent sentence, the line under a
   form (.footer: Lupa kata sandi, Verifikasi, Atur ulang, Lengkapi akun) and Login's switch
   between the two forms. Underlined on press, keyboard focus and guarded hover
   (interaction-states 4.11). Six pages each carried a copy of the footer half until 2026-11-18;
   a page keeps only what its own link differs in (a 14px size). base.css gives every link its
   blue, its weight and no underline at rest. */
.consent-note a:active,
.consent-note a:focus-visible,
.footer a:active,
.footer a:focus-visible,
.auth-switch a:active,
.auth-switch a:focus-visible {
    outline: none;
    text-decoration: underline;
}

@media (hover: hover) {
    .consent-note a:hover,
    .footer a:hover,
    .auth-switch a:hover {
        text-decoration: underline;
    }
}

/* The quiet way back to sign in under a page's own content: Two-Factor's and Akun Diblokir's.
   Grey at rest, blue on press, keyboard focus and guarded hover. Each page carried a copy until
   2026-11-19. */
.tfa-back a,
.blocked-back a {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.tfa-back a:focus-visible,
.tfa-back a:active,
.blocked-back a:focus-visible,
.blocked-back a:active {
    outline: none;
    color: var(--blue-primary);
}

@media (hover: hover) {
    .tfa-back a:hover,
    .blocked-back a:hover {
        color: var(--blue-primary);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* The sign-in fields are the shared .text-field (fields.css); .input-wrapper holds what only
   they have. */
.input-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* The dial-code prefix (CountryCodePicker) sits flush against the field's left edge, its
   divider running the field's full height. */
.input-wrapper > .country-code-wrap {
    align-self: stretch;
    display: flex;
    margin-left: -14px;
}

/* The referral code field on Daftar and Lengkapi Akun: codes are uppercase. */
.input-wrapper .referral-code-input {
    text-transform: uppercase;
}

/* The referral fields uppercase what the user types (codes are uppercase); the
   placeholder is a sentence and must not shout along with it. */
.input-wrapper input::placeholder {
    text-transform: none;
}
