/* ========== 注册页整体改造 - Flat Tech 扁平科技风 ========== */

/* 覆盖 global.css 的 min-width:1200px 限制 */
body { min-width: 100% !important; }

/* 页面容器 — 全宽浅灰背景，与白色头部自然过渡 */
.web_login_reg {
    margin: 0 !important;
    padding: 48px 16px !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 30%, #F3F4F6 100%) !important;
    min-height: calc(100vh - 140px);
    width: 100% !important;
    border: none !important;
}

/* 覆盖 global.css 的 web_backgroud_white */
.web_login_reg.web_backgroud_white {
    background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 30%, #F3F4F6 100%) !important;
}

/* 覆盖 global.css 的 web_line 边框 */
.web_login_reg.web_line {
    border: none !important;
}

/* 覆盖 global.css 的 web_width 限制宽度 — 让背景全宽 */
.web_login_reg.web_width {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: none !important;
}

/* 覆盖 global.css 的 web_center 居中限制 */
.web_login_reg.web_center {
    margin: 0 !important;
}

/* 标题 */
.web_login_reg h1 {
    font-weight: 700;
    font-size: 24px;
    text-align: center;
    color: #111827 !important;
    margin-bottom: 8px !important;
}

/* 分割线 */
.web_login_reg .line {
    width: 48px;
    height: 3px;
    background: #2563EB;
    border: none !important;
    margin: 0 auto 28px !important;
    border-radius: 2px;
    opacity: 1 !important;
}

/* 错误消息 */
.alert_msg {
    max-width: 480px;
    margin: 0 auto 16px !important;
    padding: 10px 16px !important;
    border-radius: 6px !important;
    background: #FEE2E2 !important;
    border: 1px solid #FCA5A5 !important;
    color: #991B1B !important;
    font-size: 13px;
}

/* ========== 卡片容器 — 纯白实色 ========== */
.reg-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 32px;
    max-width: 480px;
    margin: 0 auto;
}

/* ========== 字段分组 ========== */
.reg-section {
    margin-bottom: 28px;
}

.reg-section:last-of-type {
    margin-bottom: 24px;
}

.reg-section-title {
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    letter-spacing: 0.5px;
}

/* ========== 表单字段 ========== */
.reg-field {
    margin-bottom: 18px;
    list-style: none;
    display: block;
}

.reg-field:last-child {
    margin-bottom: 0;
}

/* 标签 — 在输入框上方 */
.reg-label {
    display: block;
    float: none !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--text, #111827);
    margin-bottom: 6px;
    line-height: 1.5;
    width: auto !important;
    text-align: left !important;
    padding: 0 !important;
    height: auto !important;
}

.req {
    color: var(--danger, #EF4444);
    margin-left: 2px;
}

/* 输入框 — 全宽自适应 */
.input-ok {
    float: none !important;
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    height: 42px;
    border: 1.5px solid var(--border, #E5E7EB);
    border-radius: 6px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text, #111827);
    transition: var(--transition, all 0.2s ease);
    background: var(--card, #FFFFFF);
    margin: 0 !important;
}

.input-ok:hover {
    border-color: var(--primary-light, #DBEAFE);
}

.input-ok:focus {
    outline: none;
    border-color: var(--primary, #2563EB);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-error {
    float: none !important;
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    height: 42px;
    border: 1.5px solid var(--danger, #EF4444) !important;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text, #111827);
    margin: 0 !important;
}

.input-alert {
    float: none !important;
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    height: 42px;
    border: 1.5px solid var(--warning, #F59E0B) !important;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text, #111827);
    margin: 0 !important;
}

/* ========== 输入框+按钮/图片 横排容器 ========== */
.field-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.field-row .input-ok {
    flex: 1;
    min-width: 0;
}

/* 图形验证码图片 */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.captcha-box img {
    height: 42px;
    width: auto;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border, #E5E7EB);
}

.captcha-box a {
    font-size: 13px;
    color: var(--primary, #2563EB);
    text-decoration: none;
    white-space: nowrap;
}

.captcha-box a:hover {
    text-decoration: underline;
}

/* 短信验证码按钮 */
.send-button {
    flex-shrink: 0;
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 6px;
    background: var(--primary, #2563EB);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
    white-space: nowrap;
}

.send-button:hover {
    background: var(--primary-dark, #1E40AF);
}

.send-button:disabled,
.send-button-gray {
    flex-shrink: 0;
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 6px;
    background: var(--text-secondary, #6B7280);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    cursor: not-allowed;
    white-space: nowrap;
}

/* ========== 提示文字 ========== */
.remark {
    float: none !important;
    display: block;
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
    margin-top: 6px;
    margin-left: 0 !important;
    margin-bottom: 0;
    line-height: 1.5 !important;
    height: auto !important;
}

.remark i,
.remark .error-i,
.remark .ok-i {
    display: none !important;
}

/* 倒计时提示 */
.countdown-tip {
    font-size: 12px;
    color: var(--accent, #F97316);
    font-weight: 500;
    margin-top: 6px;
}

/* ========== 提交区域 ========== */
.reg-submit {
    text-align: center;
    padding-left: 0 !important;
    margin-bottom: 0;
}

.reg-agree {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary, #6B7280);
}

.reg-agree a {
    color: var(--primary, #2563EB);
    text-decoration: none;
}

.reg-agree a:hover {
    text-decoration: underline;
}

/* 注册按钮 — 橙色 CTA */
.reg-btn {
    display: block;
    width: 100%;
    height: 46px;
    line-height: 46px;
    color: #FFF;
    text-align: center;
    background: var(--accent, #F97316);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
    margin: 0;
    padding: 0;
}

.reg-btn:hover {
    background: var(--accent-hover, #EA580C);
}

/* 登录链接 */
.reg-login-link {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 13px;
    color: #6B7280;
}

.reg-login-link a {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
}

.reg-login-link a:hover {
    text-decoration: underline;
}

/* 协议链接 — 在渐变背景上需要深色 */
.reg-agree a {
    color: #2563EB;
    text-decoration: none;
}

.reg-agree a:hover {
    text-decoration: underline;
}

/* ========== 覆盖旧 login_reg.css 的 float 布局 ========== */
.web_login_reg .reg {
    margin-left: 0 !important;
    margin-top: 0 !important;
}

.web_login_reg .reg ul,
.web_login_reg .reg ul li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.web_login_reg .reg ul li {
    display: block;
    height: auto !important;
    line-height: normal !important;
    margin-bottom: 18px;
}

.web_login_reg .reg span {
    float: none !important;
    height: auto !important;
    line-height: normal !important;
    display: block;
}

.web_login_reg .reg .alert {
    display: none !important;
}

.web_login_reg .reg .title {
    display: none !important;
}

.web_login_reg .reg .code {
    margin-left: 0 !important;
    float: none !important;
}

.web_login_reg .reg .send {
    margin-left: 0 !important;
    width: auto !important;
    float: none !important;
    display: none !important;
}

.web_login_reg .reg .submit {
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    text-align: center;
}

.web_login_reg .reg .submit p {
    margin-bottom: 10px;
}

/* ========== 响应式 — 平板 ========== */
@media (max-width: 768px) {
    .web_login_reg {
        padding: 24px 12px !important;
    }

    .web_login_reg h1 {
        font-size: 20px;
    }

    .reg-card {
        padding: 24px 20px;
        border-radius: 10px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    }

    .reg-section {
        margin-bottom: 24px;
    }
}

/* ========== 响应式 — 手机 ========== */
@media (max-width: 480px) {
    .web_login_reg {
        padding: 12px 4px !important;
    }

    .web_login_reg h1 {
        font-size: 18px;
        margin-bottom: 6px !important;
    }

    .web_login_reg .line {
        width: 36px;
        margin-bottom: 20px !important;
    }

    .reg-card {
        padding: 20px 16px;
        border-radius: 8px;
        box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    }

    .reg-section {
        margin-bottom: 20px;
    }

    .reg-section-title {
        font-size: 12px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }

    .reg-label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .input-ok,
    .input-error,
    .input-alert {
        height: 40px;
        font-size: 16px;
        padding: 0 12px;
    }

    .field-row {
        gap: 8px;
    }

    .send-button,
    .send-button:disabled,
    .send-button-gray {
        height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

    .captcha-box img {
        height: 40px;
    }

    .captcha-box a {
        display: none;
    }

    .reg-btn {
        height: 44px;
        line-height: 44px;
        font-size: 15px;
    }

    .remark {
        font-size: 11px;
    }
}

/* ========== 桌面端微调 ========== */
@media (min-width: 769px) {
    .reg-card {
        padding: 36px;
    }
}

/* ========================================== */
/* ========== 登录页样式覆盖 ================ */
/* ========================================== */

/* 隐藏旧版 banner 图（不响应式，去掉） */
.web_login_reg .login_banner {
    display: none !important;
}

/* 覆盖旧 login_reg.css 的 .login float 布局 */
.web_login_reg .login {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
}

/* 覆盖旧 .login h3 样式 */
.web_login_reg .login h3 {
    display: none !important;
}

/* 覆盖旧 .login input 图标背景和固定宽度 */
.web_login_reg .login input,
.web_login_reg .login .username input,
.web_login_reg .login .password input,
.web_login_reg .login .code input {
    background: var(--card, #FFFFFF) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    width: 100% !important;
    height: 42px !important;
    line-height: normal !important;
    margin: 0 !important;
    border: 1.5px solid var(--border, #E5E7EB) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    color: var(--text, #111827) !important;
    box-sizing: border-box !important;
    float: none !important;
    display: block !important;
}

.web_login_reg .login input:hover,
.web_login_reg .login .username input:hover,
.web_login_reg .login .password input:hover,
.web_login_reg .login .code input:hover {
    border-color: var(--primary-light, #DBEAFE) !important;
}

.web_login_reg .login input:focus,
.web_login_reg .login .username input:focus,
.web_login_reg .login .password input:focus,
.web_login_reg .login .code input:focus {
    outline: none !important;
    border-color: var(--primary, #2563EB) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

/* 覆盖旧 .username margin */
.web_login_reg .login .username {
    margin-top: 0 !important;
}

/* 覆盖旧 .code float 布局 */
.web_login_reg .login .code {
    float: none !important;
    margin: 0 !important;
    display: block !important;
}

.web_login_reg .login .code span,
.web_login_reg .login .code .hf05,
.web_login_reg .login .code .hf07 {
    float: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    height: auto !important;
    line-height: normal !important;
    flex-shrink: 0 !important;
}

.web_login_reg .login .code img {
    float: none !important;
    margin: 0 !important;
    height: 42px !important;
    width: auto !important;
    border-radius: 6px !important;
    border: 1px solid var(--border, #E5E7EB) !important;
    cursor: pointer !important;
}

.web_login_reg .login .code a {
    float: none !important;
    margin: 0 !important;
    font-size: 13px !important;
    color: var(--primary, #2563EB) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

/* 覆盖旧 .login_btn 橙色按钮 */
.web_login_reg .login .login_btn {
    display: none !important;
}

/* 覆盖旧 .info float 布局 */
.web_login_reg .login .info {
    float: none !important;
    margin: 0 !important;
    text-align: center !important;
    color: var(--text-secondary, #6B7280) !important;
    font-size: 13px !important;
}

.web_login_reg .login .info span {
    float: none !important;
    margin: 0 !important;
}

.web_login_reg .login .info a,
.web_login_reg .login .info a:hover {
    color: var(--primary, #2563EB) !important;
    text-decoration: none !important;
}

.web_login_reg .login .info a:hover {
    text-decoration: underline !important;
}

/* 登录卡片 — 与注册卡片一致 */
.login-card {
    max-width: 420px !important;
}

/* 登录页响应式 */
@media (max-width: 768px) {
    .login-card {
        padding: 24px 20px !important;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 20px 16px !important;
    }

    .web_login_reg .login input,
    .web_login_reg .login .username input,
    .web_login_reg .login .password input,
    .web_login_reg .login .code input {
        font-size: 16px !important;
        height: 40px !important;
    }

    .web_login_reg .login .code img {
        height: 40px !important;
    }

    .web_login_reg .login .code a {
        display: none !important;
    }
}
