/* 复盘啦登录与注册页共享视觉层。业务逻辑保留在各自模板中。 */

body.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    padding: 36px 20px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--ui-canvas);
    color: var(--ui-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-page .auth-wrapper {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 0;
}

.auth-page--register .auth-wrapper {
    max-width: 456px;
}

.auth-page .auth-brand {
    margin-bottom: 20px;
    text-align: center;
}

.auth-page .auth-brand .brand-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    border: 1px solid var(--ui-border);
    border-radius: 11px;
    box-shadow: var(--ui-shadow-sm);
}

.auth-page .auth-brand .brand-icon img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.auth-page .auth-brand h1 {
    margin: 0;
    color: var(--ui-text-strong);
    font-size: 22px;
    font-weight: 750;
    line-height: 30px;
    letter-spacing: -0.4px;
}

.auth-page .auth-card {
    padding: 28px;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-card);
}

.auth-page .auth-card-header {
    margin-bottom: 24px;
}

.auth-page .auth-card h2 {
    margin: 0;
    color: var(--ui-text-strong);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    text-align: left;
    letter-spacing: -0.25px;
}

.auth-page .auth-card-subtitle {
    margin: 5px 0 0;
    color: var(--ui-text-muted);
    font-size: 13px;
    line-height: 20px;
}

.auth-page .form-group {
    margin-bottom: 16px;
}

.auth-page .form-group label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--ui-text-strong);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

.auth-page .field-meta,
.auth-page .form-group label .optional {
    margin: 0;
    color: var(--ui-text-faint);
    font-size: 11px;
    font-weight: 450;
}

.auth-page .form-guidance {
    margin: -8px 0 16px;
    color: var(--ui-text-muted);
    font-size: 12px;
    line-height: 18px;
}

.auth-page .form-control {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--ui-border-strong);
    border-radius: 8px;
    background: var(--ui-input);
    color: var(--ui-text);
    font-size: 14px;
    line-height: 1;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.auth-page .form-control:hover {
    border-color: color-mix(in srgb, var(--ui-border-strong) 62%, var(--ui-accent));
}

.auth-page .form-control:focus {
    outline: none;
    border-color: var(--ui-accent);
    box-shadow: 0 0 0 3px var(--ui-focus);
}

.auth-page .form-control::placeholder {
    color: var(--ui-text-faint);
}

.auth-page .form-control.error {
    border-color: var(--ui-up);
}

.auth-page .form-control.success {
    border-color: var(--ui-down);
}

.auth-page .form-control:-webkit-autofill {
    -webkit-text-fill-color: var(--ui-text);
    box-shadow: 0 0 0 1000px var(--ui-input) inset;
}

.auth-page .password-container {
    position: relative;
}

.auth-page .password-container .form-control {
    padding-right: 60px;
}

.auth-page .toggle-password {
    position: absolute;
    top: 50%;
    right: 6px;
    min-width: 46px;
    height: 32px;
    padding: 0 8px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ui-text-muted);
    font-size: 12px;
    font-weight: 550;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.auth-page .toggle-password:hover {
    color: var(--ui-text-strong);
    background: var(--ui-surface-muted);
}

.auth-page .toggle-password:focus-visible {
    outline: 3px solid var(--ui-focus);
    outline-offset: 1px;
}

.auth-page .field-error,
.auth-page .field-success,
.auth-page .password-strength {
    margin-top: 5px;
    font-size: 12px;
    line-height: 17px;
}

.auth-page .field-error,
.auth-page .strength-weak {
    color: var(--ui-up);
}

.auth-page .field-success,
.auth-page .strength-strong {
    color: var(--ui-down);
}

.auth-page .strength-medium {
    color: var(--ui-warning);
}

.auth-page .form-options {
    margin: 2px 0 22px;
    color: var(--ui-text-muted);
}

.auth-page .remember-me {
    gap: 7px;
    color: var(--ui-text-muted);
}

.auth-page .remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ui-accent);
}

.auth-page .remember-hint {
    color: var(--ui-text-faint);
    font-size: 11px;
}

.auth-page .forgot-password,
.auth-page .register-link a,
.auth-page .login-link a {
    color: var(--ui-accent-strong);
    font-weight: 600;
    text-decoration: none;
}

.auth-page .forgot-password:hover,
.auth-page .register-link a:hover,
.auth-page .login-link a:hover {
    color: var(--ui-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-page .forgot-password:focus-visible,
.auth-page .register-link a:focus-visible,
.auth-page .login-link a:focus-visible {
    outline: 3px solid var(--ui-focus);
    outline-offset: 3px;
    border-radius: 3px;
}

.auth-page .btn-login,
.auth-page .btn-register,
.auth-page .btn-guest {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transform: none;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.auth-page .btn-login,
.auth-page .btn-register {
    border: 1px solid var(--ui-accent);
    background: var(--ui-accent);
    color: var(--ui-on-accent);
    box-shadow: var(--ui-shadow-sm);
}

.auth-page .btn-login:hover,
.auth-page .btn-register:hover {
    border-color: var(--ui-accent-strong);
    background: var(--ui-accent-strong);
    transform: none;
    box-shadow: var(--ui-shadow-sm);
}

.auth-page .btn-guest {
    border: 1px solid var(--ui-border-strong);
    background: var(--ui-surface);
    color: var(--ui-text-strong);
}

.auth-page .btn-guest:hover {
    border-color: color-mix(in srgb, var(--ui-border-strong) 54%, var(--ui-accent));
    background: var(--ui-surface-muted);
}

.auth-page .btn-login:focus-visible,
.auth-page .btn-register:focus-visible,
.auth-page .btn-guest:focus-visible {
    outline: 3px solid var(--ui-focus);
    outline-offset: 2px;
}

.auth-page .btn-login:disabled,
.auth-page .btn-register:disabled,
.auth-page .btn-guest:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-page .btn-login-content,
.auth-page .btn-register-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-page .guest-divider {
    margin: 18px 0 14px;
    color: var(--ui-text-faint);
}

.auth-page .guest-divider::before,
.auth-page .guest-divider::after {
    background: var(--ui-border);
}

.auth-page .loading-spinner {
    width: 17px;
    height: 17px;
    border-color: color-mix(in srgb, var(--ui-on-accent) 35%, transparent);
    border-top-color: var(--ui-on-accent);
}

.auth-page .alert {
    margin-bottom: 18px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
}

.auth-page .alert-error {
    border: 1px solid color-mix(in srgb, var(--ui-up) 40%, var(--ui-border));
    background: var(--ui-up-soft);
    color: var(--ui-up);
}

.auth-page .alert-success {
    border: 1px solid color-mix(in srgb, var(--ui-down) 40%, var(--ui-border));
    background: var(--ui-down-soft);
    color: var(--ui-down);
}

.auth-page .auth-footer {
    margin-top: 18px;
    text-align: center;
}

.auth-page .register-link,
.auth-page .login-link {
    color: var(--ui-text-muted);
    font-size: 13px;
    line-height: 20px;
}

.auth-page .auth-contact {
    margin-top: 10px;
    color: var(--ui-text-faint);
    font-size: 11px;
    line-height: 18px;
}

@media (max-width: 480px) {
    body.auth-page {
        align-items: flex-start;
        padding: 28px 14px;
    }

    .auth-page .auth-card {
        padding: 24px 20px;
    }

    .auth-page .auth-brand {
        margin-bottom: 16px;
    }

    .auth-page .form-options {
        align-items: flex-start;
        gap: 12px;
    }

    .auth-page .remember-hint {
        display: none;
    }
}

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