.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(430px, 100%);
    padding: 38px;
    border: 1px solid #e3edf9;
    border-radius: 30px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    animation: rise .4s ease both;
}

.auth-logo {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    border-radius: 24px;
}

.auth-card h1 {
    margin: 0 0 9px;
    font-size: 30px;
    letter-spacing: -.8px;
    text-align: center;
}

.auth-card p {
    margin: 0 0 30px;
    color: var(--muted);
    text-align: center;
}

.auth-form input {
    width: 100%;
    height: 50px;
    margin-bottom: 14px;
    padding: 0 16px;
    border: 1px solid #dfe9f6;
    border-radius: 16px;
    background: #fff;
    outline: none;
}

.auth-form input:focus {
    border-color: #9dc5ff;
    box-shadow: 0 0 0 4px rgba(49, 108, 255, .08);
}

.auth-form button {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 14px 34px rgba(49, 108, 255, .24);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
}

.auth-links a {
    font-size: 14px;
}

.toast {
    position: fixed;
    top: 28px;
    left: 50%;
    padding: 10px 16px;
    border-radius: 999px;
    color: #fff;
    background: #172033;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
    transform: translateX(-50%);
}

/* Auth responsive */
@media (max-width: 560px) {
    .auth-page {
        align-items: stretch;
        padding: 18px;
    }

    .auth-card {
        width: 100%;
        margin: auto 0;
        padding: 30px 22px;
        border-radius: 26px;
    }

    .auth-logo {
        width: 54px;
        height: 54px;
        border-radius: 20px;
    }

    .auth-card h1 {
        font-size: 26px;
    }

    .auth-card p {
        margin-bottom: 24px;
        font-size: 14px;
        line-height: 1.7;
    }

    .auth-links {
        gap: 12px;
        flex-wrap: wrap;
    }
}

@media (min-width: 561px) and (max-width: 900px) {
    .auth-card {
        width: min(460px, 100%);
    }
}

.auth-logo-img {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 20px 48px rgba(49, 108, 255, .2);
    border: 1px solid rgba(255, 255, 255, .82);
}

/* 登录/注册页强制居中 */
.auth-page {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    box-sizing: border-box;
}

.auth-card {
    margin: 0 auto !important;
    text-align: center !important;
}

.auth-card .auth-logo,
.auth-card .auth-logo-img,
.auth-logo-img {
    display: block !important;
    margin: 0 auto 18px !important;
}

.auth-form {
    margin-left: auto !important;
    margin-right: auto !important;
}

.auth-links {
    justify-content: center !important;
    text-align: center !important;
}

/* 登录/注册表单精修，避免文字挤在一起 */
.auth-card {
    box-sizing: border-box;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.auth-form .layui-form-item,
.auth-form input {
    margin: 0 !important;
}

.auth-form input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 17px;
    font-size: 15px;
    line-height: 52px;
    letter-spacing: .02em;
}

.auth-form button {
    display: block;
    width: 100%;
    height: 52px;
    margin-top: 2px;
    font-size: 16px;
    line-height: 52px;
    letter-spacing: .08em;
    cursor: pointer;
}

.auth-form button:disabled {
    opacity: .72;
    cursor: not-allowed;
}

.auth-links {
    gap: 14px;
    align-items: center;
    justify-content: center !important;
    line-height: 1.5;
}

.auth-links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 4px;
    white-space: nowrap;
}

.toast {
    z-index: 999;
    max-width: calc(100vw - 36px);
    text-align: center;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .auth-card {
        padding: 28px 20px !important;
    }

    .auth-form {
        gap: 12px;
    }

    .auth-form input,
    .auth-form button {
        height: 48px;
        line-height: 48px;
        font-size: 14px;
    }

    .auth-links {
        flex-direction: column;
        gap: 6px;
    }
}
