/* ============================================================
   登录 / 注册页样式（依赖 common.css 设计令牌）
   ============================================================ */

body.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 52%, #f8fafc 100%);
}

/* ---------- 页面主体 ---------- */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
}

.auth-card {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    width: 100%;
    max-width: 980px;
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: 0 32px 80px -32px rgba(30, 64, 175, 0.28);
}

/* ---------- 左侧品牌区 ---------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 52px 44px 40px;
    color: #fff;
    background:
        radial-gradient(circle at 84% -6%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 46%),
        linear-gradient(160deg, #1e40af 0%, #2563eb 56%, #3b82f6 100%);
}
.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.auth-brand::before {
    width: 240px;
    height: 240px;
    right: -90px;
    top: 96px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 70%);
}
.auth-brand::after {
    width: 150px;
    height: 150px;
    left: -70px;
    bottom: -60px;
    background: rgba(255, 255, 255, 0.08);
}
.auth-brand-badge {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.auth-brand h2 {
    position: relative;
    z-index: 1;
    margin: 22px 0 14px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -0.02em;
}
.auth-brand-desc {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.82);
}
.auth-brand-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding-top: 32px;
}
.auth-brand-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}
.auth-check {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.68rem;
    line-height: 1;
}
.auth-brand-foot {
    position: relative;
    z-index: 1;
    margin-top: 30px;
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.52);
}

/* ---------- 右侧表单区 ---------- */
.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px 40px;
}
.auth-tabs {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border-light);
}
.auth-tab {
    position: relative;
    padding: 0 2px 12px;
    font-size: 1.06rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s;
}
.auth-tab:hover {
    color: var(--color-primary);
}
.auth-tab.on {
    color: var(--color-text);
    font-weight: 600;
}
.auth-tab.on::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-primary);
}
.auth-hint {
    margin-bottom: 22px;
    font-size: 0.83rem;
    color: var(--color-text-muted);
}
.auth-title {
    margin-bottom: 6px;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text);
}
.auth-subtitle {
    margin-bottom: 24px;
    font-size: 0.84rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}
.auth-back {
    display: block;
    margin-top: 18px;
    text-align: center;
    font-size: 0.84rem;
    color: var(--color-text-muted);
}
.auth-back:hover {
    color: var(--color-primary);
}

/* ---------- 表单控件 ---------- */
.auth-field {
    margin-bottom: 16px;
}
.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-light);
}
.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.auth-label-row .auth-label {
    margin-bottom: 0;
}
.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: var(--transition);
}
.auth-input::placeholder {
    color: var(--color-text-placeholder);
}
.auth-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-ring);
}
.auth-sms-row {
    display: flex;
    gap: 10px;
}
.auth-sms-row .auth-input {
    flex: 1;
    min-width: 0;
}
.auth-sms-btn {
    flex: none;
    width: 128px;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-soft);
    color: var(--color-primary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}
.auth-sms-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    background: var(--color-primary-tint);
}
.auth-sms-btn:disabled {
    color: var(--color-text-placeholder);
    border-color: var(--color-border);
    background: var(--color-bg-soft);
    cursor: not-allowed;
}
.auth-submit {
    width: 100%;
    height: 50px;
    margin-top: 6px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    box-shadow: 0 10px 24px -12px rgba(37, 99, 235, 0.55);
    transition: var(--transition);
}
.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -12px rgba(37, 99, 235, 0.6);
}
.auth-submit:active {
    transform: translateY(0);
}
.auth-link {
    font-size: 0.82rem;
    color: var(--color-primary);
}
.auth-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}
.auth-agreement {
    margin-top: 22px;
    font-size: 0.76rem;
    line-height: 1.8;
    text-align: center;
    color: var(--color-text-placeholder);
}
.auth-agreement a {
    color: var(--color-text-muted);
}

/* ---------- 页脚（认证页铺满宽度） ---------- */
body.auth-page .footer {
    width: 100%;
    max-width: none;
    margin-top: 0;
    padding: 28px 24px;
    border-top: 1px solid var(--color-border-light);
    background: rgba(255, 255, 255, 0.72);
}

/* ---------- 滑动验证码弹窗 ---------- */
.captcha-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
}
.captcha-box {
    width: 340px;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.4);
}
.captcha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border-light);
}
.captcha-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}
.captcha-close {
    font-size: 20px;
    line-height: 1;
    color: var(--color-text-placeholder);
    cursor: pointer;
}
.captcha-close:hover {
    color: var(--color-text);
}
.captcha-image-area {
    position: relative;
    padding: 12px;
}
.captcha-bg {
    width: 100%;
    border-radius: 8px;
    display: block;
}
.captcha-piece {
    position: absolute;
    top: 12px;
    left: 12px;
    pointer-events: none;
}
.captcha-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 140px;
    font-size: 0.86rem;
    color: var(--color-text-placeholder);
}
.captcha-slider-area {
    position: relative;
    height: 40px;
    padding: 0 12px 12px;
}
.captcha-slider-track {
    width: 100%;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg-track);
}
.captcha-slider-progress {
    height: 100%;
    border-radius: var(--radius-full);
    background: #dbeafe;
}
.captcha-slider-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 16px;
    cursor: grab;
    user-select: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}
.captcha-tip {
    padding: 0 0 12px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-placeholder);
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .auth-card {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .auth-brand {
        padding: 30px 28px;
    }
    .auth-brand h2 {
        margin: 14px 0 8px;
        font-size: 1.4rem;
    }
    .auth-brand-desc,
    .auth-brand-list,
    .auth-brand-foot {
        display: none;
    }
    .auth-panel {
        padding: 32px 28px 34px;
    }
}
@media (max-width: 560px) {
    .auth-main {
        padding: 28px 16px 36px;
    }
    .auth-brand {
        display: none;
    }
    .auth-card {
        border-radius: var(--radius-lg);
    }
    .auth-panel {
        padding: 28px 22px 30px;
    }
    .auth-submit {
        letter-spacing: 1px;
    }
}
