.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 16px;
}

.auth-wrap {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.system-title {
    text-align: center;
    color: #fff;
    font-size: clamp(1.4rem, 4vw, 1.85rem);
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 28px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.auth-card,
.auth-wrap .container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

.auth-card h1,
.auth-wrap .container h1 {
    text-align: center;
    margin: 0 0 22px;
    font-size: 1.35rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 12px;
}

.auth-card h1::after,
.auth-wrap .container h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

.auth-card button[type="submit"],
.auth-wrap button[type="submit"] {
    width: 100%;
    padding: 12px;
    margin-top: 4px;
}

.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-row input {
    width: auto;
}

.auth-wrap .footer,
.auth-body > .footer,
.auth-wrap + .footer,
.auth-card ~ .footer,
.footer {
    margin-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    line-height: 1.7;
    border: none;
    padding: 0;
}

.footer a {
    color: #fff;
    text-decoration: underline;
}

.footer-reference {
    opacity: 0.85;
    max-width: 520px;
    margin: 8px auto;
}

/* 页脚可略宽于登录卡片，避免把卡片一起撑宽 */
.auth-wrap:has(> .footer) {
    max-width: min(640px, 100%);
}

.auth-wrap:has(> .footer) > .auth-card,
.auth-wrap:has(> .footer) > .container {
    max-width: 380px;
}

.auth-body .footer {
    border-top: none;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 28px;
    padding: 0 8px 8px;
    font-size: 0.8rem;
    line-height: 1.65;
}

.auth-body .footer a {
    color: rgba(255, 255, 255, 0.95);
}

.auth-body .footer-reference {
    font-style: italic;
    opacity: 0.9;
}
