:root {
    --brand: #1677ff;
    --brand-dark: #0958d9;
    --brand-light: #e8f3ff;
    --text: #1a1a1a;
    --text-2: #666;
    --text-3: #999;
    --border: #dcdcdc;
    --danger: #f53f3f;
}



* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}



.container-wrap { width: 100%; max-width: 460px; }
.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(22, 119, 255, 0.08);
    border: 1px solid var(--brand-light);
    padding: 28px 20px;
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 { font-size: 26px; color: var(--text); margin-bottom: 8px; letter-spacing: 1px; }
.auth-header p { font-size: 14px; color: var(--text-3); }
.form-item { margin-bottom: 18px; }
.form-item > label { display: block; font-size: 14px; color: #333; margin-bottom: 6px; font-weight: 500; }
.required { color: var(--danger); }


.input-wrap { position: relative; }
.input-wrap input {
    width: 100%; height: 46px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 16px; color: var(--text); background: #fff;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.input-wrap input::placeholder { color: #b8b8b8; }
.input-wrap input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12); }
.input-wrap input.is-error { border-color: var(--danger); }
.input-wrap input.is-error:focus { box-shadow: 0 0 0 3px rgba(245, 63, 63, 0.12); }



/* 密码显示/隐藏切换 */
.pwd-wrap input { padding-right: 52px; }
.pwd-toggle {
    position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border: none; background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; color: #9aa0a6; transition: color 0.2s;
}
.pwd-toggle:hover { color: var(--brand); }
.pwd-toggle svg { width: 20px; height: 20px; }


/* 验证码 */
.captcha-row { display: flex; gap: 10px; }
.captcha-row .input-wrap { flex: 1; min-width: 0; }
.captcha-box {
    flex: 0 0 122px; height: 46px; background: var(--brand-light);
    border: 1px solid #d6e8ff; border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 2px;
    user-select: none; transition: border-color 0.25s, box-shadow 0.25s;
}
.captcha-box:hover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12); }
.captcha-box span { font-size: 19px; font-weight: 700; font-style: italic; letter-spacing: 2px; display: inline-block; }

.tip-text { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.field-error { display: none; font-size: 12px; color: var(--danger); margin-top: 4px; }
.field-error.show { display: block; }



/* 记住我 与 忘记密码 */
.row-flex {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 18px; 
    min-height: 44px;
}
.remember { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    cursor: pointer; 
    user-select: none; 
    min-height: 44px; 
}
.remember input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.remember .check-box {
    flex: 0 0 18px; width: 18px; height: 18px;
    border: 1.5px solid var(--border); border-radius: 4px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}
input:checked + .check-box { background: var(--brand); border-color: var(--brand); }
input:focus-visible + .check-box { box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.2); }
.remember .check-box svg { display: none; width: 11px; height: 11px; }
input:checked + .check-box svg { display: block; }
.remember-text { font-size: 14px; color: var(--text-2); }
.forget-link a { font-size: 14px; color: var(--brand); text-decoration: none; }
.forget-link a:hover { text-decoration: underline; }




/* 注册协议勾选 */
.form-item .agree-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    margin-top: 0;
    cursor: pointer;
    user-select: none;
    font-weight: normal;
}
.form-item .agree-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.form-item .agree-check {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}
.form-item input:checked + .agree-check {
    background: var(--brand);
    border-color: var(--brand);
}
.form-item input:focus-visible + .agree-check {
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.2);
}
.form-item .agree-check svg {
    display: none;
    width: 12px;
    height: 12px;
}
.form-item input:checked + .agree-check svg {
    display: block;
}
.form-item .agree-text {
    font-size: 13px;
    color: var(--text-2);
    line-height: 20px; /* 和复选框高度严格一致，确保垂直居中 */
}
.form-item .agree-text a {
    color: var(--brand);
    text-decoration: none;
}
.form-item .agree-text a:hover {
    text-decoration: underline;
}
.agree-error {
    display: none;
    font-size: 12px;
    color: var(--danger);
    margin: -8px 0 14px 28px;
}
.agree-error.show {
    display: block;
}



.submit-btn {
    width: 100%; height: 48px; border: none; border-radius: 8px;
    background: var(--brand); color: #fff; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: background 0.3s;
}
.submit-btn:hover { background: var(--brand-dark); }
.auth-footer { margin-top: 22px; text-align: center; font-size: 14px; color: var(--text-2); }
.auth-footer a { color: var(--brand); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }




/* 轻提示 */
.toast {
    position: fixed; left: 50%; bottom: 40px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(26, 26, 26, 0.92); color: #fff; font-size: 14px;
    padding: 10px 20px; border-radius: 8px; opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.3s; z-index: 999; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: rgba(245, 63, 63, 0.95); }

@media (min-width: 768px) {
    .auth-card { padding: 40px 36px; }
    .auth-header h1 { font-size: 28px; }
    .auth-header p { font-size: 15px; }
}




