.auth-page {
    background:
        radial-gradient(circle at 12% 15%, rgb(79 70 229 / 12%), transparent 34rem),
        radial-gradient(circle at 88% 82%, rgb(37 99 235 / 10%), transparent 32rem),
        var(--wv-background);
    color: var(--wv-ink);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.auth-page::before {
    background-image: linear-gradient(rgb(148 163 184 / 8%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(148 163 184 / 8%) 1px, transparent 1px);
    background-size: 32px 32px;
    content: '';
    inset: 0;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
    pointer-events: none;
    position: fixed;
}

.auth-layout {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 32px 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgb(255 255 255 / 96%);
    border: 1px solid var(--wv-border);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgb(15 23 42 / 12%);
    max-width: 440px;
    padding: 32px;
    width: 100%;
}

.auth-brand {
    align-items: center;
    color: var(--wv-ink);
    display: flex;
    font-size: 0.94rem;
    font-weight: 700;
    gap: 10px;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

.auth-brand-mark {
    align-items: center;
    background: linear-gradient(145deg, var(--wv-primary), var(--wv-secondary));
    border-radius: 10px;
    box-shadow: 0 8px 18px rgb(79 70 229 / 22%);
    color: #fff;
    display: inline-flex;
    font-size: 1rem;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.auth-heading {
    margin-bottom: 24px;
}

.auth-eyebrow {
    color: var(--wv-primary-strong);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.auth-heading h1 {
    color: var(--wv-ink);
    font-size: clamp(1.65rem, 5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.2;
    margin: 0 0 10px;
}

.auth-heading p {
    color: var(--wv-muted);
    font-size: 0.94rem;
    line-height: 1.6;
    margin: 0;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-field {
    min-width: 0;
}

.auth-field .form-label {
    color: var(--wv-ink);
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 7px;
}

.auth-field .form-control,
.auth-field .form-select {
    background-color: var(--wv-surface);
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: var(--wv-ink);
    font-size: 1rem;
    min-height: 48px;
    padding: 11px 14px;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.auth-field .form-control:focus,
.auth-field .form-select:focus {
    border-color: var(--wv-focus);
    box-shadow: 0 0 0 3px rgb(79 70 229 / 16%);
    outline: 0;
}

.auth-field .form-text,
.auth-field-feedback {
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.5;
    margin-top: 7px;
}

.auth-field-feedback.is-invalid {
    color: var(--wv-danger);
    font-weight: 600;
}

.auth-field-feedback.is-valid {
    color: var(--wv-success);
    font-weight: 600;
}

.auth-password-group .form-control {
    border-radius: 10px 0 0 10px;
}

.auth-password-toggle {
    align-items: center;
    background: var(--wv-surface-soft);
    border: 1px solid #cbd5e1;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    color: #475569;
    display: inline-flex;
    justify-content: center;
    min-height: 48px;
    min-width: 48px;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: var(--wv-primary-soft);
    color: var(--wv-primary-strong);
}

.auth-primary-action,
.auth-secondary-action {
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    min-height: 48px;
    padding: 11px 18px;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
    width: 100%;
}

.auth-primary-action {
    background: linear-gradient(135deg, var(--wv-primary), var(--wv-secondary));
    border: 1px solid var(--wv-primary);
    box-shadow: 0 8px 18px rgb(79 70 229 / 18%);
    color: #fff;
}

.auth-primary-action:hover,
.auth-primary-action:focus-visible {
    background: linear-gradient(135deg, var(--wv-primary-strong), #1d4ed8);
    color: #fff;
}

.auth-primary-action:focus-visible,
.auth-secondary-action:focus-visible,
.auth-password-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgb(79 70 229 / 22%);
    outline: 2px solid transparent;
}

.auth-primary-action:disabled {
    box-shadow: none;
    cursor: wait;
    opacity: 0.65;
}

.auth-secondary-action {
    background: transparent;
    border: 1px solid transparent;
    color: #475569;
}

.auth-secondary-action:hover,
.auth-secondary-action:focus-visible {
    background: var(--wv-surface-soft);
    border-color: var(--wv-border);
    color: var(--wv-ink);
}

.auth-alert {
    align-items: flex-start;
    border-radius: 10px;
    display: flex;
    font-size: 0.82rem;
    gap: 9px;
    line-height: 1.5;
    margin-bottom: 18px;
    padding: 11px 13px;
}

.auth-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-confirmed {
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    color: #065f46;
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 14px;
}

.auth-confirmed-icon {
    align-items: center;
    background: var(--wv-success);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.auth-confirmed div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.auth-confirmed strong {
    font-size: 0.82rem;
}

.auth-confirmed span:not(.auth-confirmed-icon) {
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-progress {
    align-items: flex-start;
    display: flex;
    margin: 0 0 24px;
}

.auth-progress-item {
    align-items: center;
    color: #64748b;
    display: grid;
    flex: 0 0 auto;
    gap: 6px;
    justify-items: center;
}

.auth-progress-item > span {
    align-items: center;
    background: var(--wv-surface-soft);
    border: 1px solid var(--wv-border);
    border-radius: 50%;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.auth-progress-item small {
    font-size: 0.66rem;
    font-weight: 600;
}

.auth-progress-item.is-complete > span {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: var(--wv-success);
}

.auth-progress-item.is-active {
    color: var(--wv-primary-strong);
}

.auth-progress-item.is-active > span {
    background: var(--wv-primary);
    border-color: var(--wv-primary);
    color: #fff;
}

.auth-progress-line {
    background: linear-gradient(90deg, #a7f3d0, #c7d2fe);
    height: 2px;
    margin: 15px 10px 0;
    min-width: 36px;
    width: 100%;
}

.auth-info-note {
    align-items: flex-start;
    background: var(--wv-primary-soft);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    color: #3730a3;
    display: flex;
    font-size: 0.8rem;
    gap: 10px;
    line-height: 1.55;
    margin-bottom: 20px;
    padding: 12px 14px;
}

.auth-info-note i {
    font-size: 1rem;
    margin-top: 1px;
}

.auth-info-note p {
    margin: 0;
}

.auth-footer {
    align-items: flex-start;
    border-top: 1px solid var(--wv-border);
    color: #64748b;
    display: flex;
    font-size: 0.68rem;
    gap: 7px;
    line-height: 1.5;
    margin-top: 26px;
    padding-top: 18px;
}

.invalid-feedback {
    font-size: 0.76rem;
}

@media (max-width: 575.98px) {
    .auth-layout {
        align-items: flex-start;
        padding: 16px 12px;
    }

    .auth-card {
        border-radius: 16px;
        padding: 24px 20px;
    }

    .auth-brand {
        margin-bottom: 22px;
    }
}

@media (max-height: 680px) and (orientation: landscape) {
    .auth-layout {
        align-items: flex-start;
        padding-block: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
