* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.font_size_40 {
    font-size: 2.5rem;
    color: #434343;
    font-weight: bold;
}

.login_bg {
    width: 100%;
    height: 57.5rem;
    background: url(/static/img/login/login_bg.png) no-repeat;
    background-size: 100% 100%;
    position: relative;
    padding: 15px;
    box-sizing: border-box;
}

.login_box {
    width: 31.25rem;
    height: auto;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0px 4px 10px 0px rgba(159, 167, 182, 0.3);
    border-radius: 1.25rem;
    position: absolute;
    right: 18.75rem;
    top: 7.19rem;
    padding: 2.5rem;
}

.login_title {
    font-weight: 500;
    font-size: 1.75rem;
    color: #16181A;
    text-align: left;
    margin-bottom: 1.5rem;
}

.form_item {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: #fff;
    color: #333;
}

.form-control:focus {
    outline: none;
    border-color: #0080FF;
    box-shadow: 0 0 0 2px rgba(0, 128, 255, 0.1);
}

/* 修复select下拉选项样式 */
.form-control option {
    background-color: #fff !important;
    color: #333 !important;
    padding: 8px 10px;
}

/* 强制覆盖浏览器默认样式 */
select.form-control {
    background-color: #fff !important;
    color: gray !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 修复下拉列表打开时的样式 */
select.form-control:focus {
    background-color: #fff !important;
    color: gray !important;
}

/* 针对不同浏览器的特殊处理 */
@-moz-document url-prefix() {
    select.form-control option {
        background-color: #fff !important;
        color: gray !important;
    }
}

/* Chrome/Safari特殊处理 */
select.form-control::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

textarea.form-control {
    height: 100px;
    resize: vertical;
}

/* 桌面端表单验证样式 - 只在用户交互后显示错误状态 */
.form-control:not(:placeholder-shown):invalid {
    border-color: #f56c6c;
}

.form-control:not(:placeholder-shown):invalid:focus {
    border-color: #f56c6c;
    box-shadow: 0 0 0 2px rgba(245, 108, 108, 0.1);
}

/* 桌面端自定义错误提示样式 */
.form-control + .error-tip {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    display: none;
    color: #f56c6c;
    font-size: 12px;
    text-align: left;
    line-height: 1.4;
    z-index: 10;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 只在有错误时显示错误提示 */
.form-control.error + .error-tip {
    display: block;
}

/* 为form-group添加相对定位 */
.form-group {
    position: relative;
}

/* 特殊处理input-group内的错误提示 */
.input-group + .error-tip {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    display: none;
    color: #f56c6c;
    font-size: 12px;
    text-align: left;
    line-height: 1.4;
    z-index: 10;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.input-group.error + .error-tip {
    display: block;
}

/* 为input-group的父元素添加相对定位 */
.input-group-wrapper {
    position: relative;
}

/* 桌面端input-group错误状态 */
.input-group.error .form-control {
    border-color: #f56c6c;
}

.input-group.error .form-control:focus {
    border-color: #f56c6c;
    box-shadow: 0 0 0 2px rgba(245, 108, 108, 0.1);
}

.input-group.error .input-group-prepend {
    border-color: #f56c6c;
    background-color: #fef0f0;
    color: #f56c6c;
}

/* 桌面端成功状态样式 - 只对特定字段使用:valid */
.form-control:not(textarea):valid {
    border-color: #67c23a;
}

.form-control:not(textarea):valid:focus {
    border-color: #67c23a;
    box-shadow: 0 0 0 2px rgba(103, 194, 58, 0.1);
}

/* textarea使用自定义valid类而不是:valid伪类 */
textarea.form-control {
    border-color: #dcdfe6;
}

textarea.form-control:focus {
    border-color: #0080FF;
    box-shadow: 0 0 0 2px rgba(0, 128, 255, 0.1);
}

/* 禁用textarea的浏览器默认验证样式 */
textarea.form-control:valid {
    border-color: #dcdfe6 !important;
    box-shadow: none !important;
}

textarea.form-control:valid:focus {
    border-color: #0080FF !important;
    box-shadow: 0 0 0 2px rgba(0, 128, 255, 0.1) !important;
}

textarea.form-control.valid {
    border-color: #67c23a;
}

textarea.form-control.valid:focus {
    border-color: #67c23a;
    box-shadow: 0 0 0 2px rgba(103, 194, 58, 0.1);
}

/* Select下拉框验证样式 */
select.form-control:valid {
    border-color: #67c23a;
}

select.form-control:invalid {
    border-color: #dcdfe6;
}

select.form-control:required:invalid {
    color: #999;
}

.input-group {
    display: flex;
}

.input-group-prepend {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background-color: #f5f7fa;
    border: 1px solid #dcdfe6;
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: #909399;
    font-weight: 500;
}

.input-group .form-control {
    border-radius: 0 4px 4px 0;
}

.captcha-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-group .form-control {
    flex: 1;
}

.captcha-img {
    height: 44px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    width: 130px;
}

.sms-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sms-btn {
    padding: 0 14px;
    height: 44px;
    background: #FFFFFF;
    color: #0080FF;
    border: 1px solid #0080FF;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.sms-btn:hover {
    background: #0080FF;
    color: #FFFFFF;
}

.sms-btn:disabled {
    background: #f5f7fa;
    color: #c0c4cc;
    border-color: #e4e7ed;
    cursor: not-allowed;
}
@media (max-width: 768px) {
    .login_bg {
        width: 100%;
        height: 41.5rem;
        background: url(/static/img/login/login_bg.png) no-repeat;
        background-size: cover;
        background-position: center;
        position: static;
        padding: 15px;
        box-sizing: border-box;
    }

    .login_box {
        width: calc(100% - 30px);
        height: auto;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0px 4px 10px 0px rgba(159, 167, 182, 0.3);
        border-radius: 20px;
        position: static;
        padding: 25px 20px;
        margin: 30px 15px;
        box-sizing: border-box;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .login_title {
        font-weight: 500;
        font-size: 1.2rem;
        color: #333333;
        text-align: center;
        margin-bottom: 1.3rem;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-control {
        width: 100%;
        height: 2.5rem;
        border: 1px solid #dcdfe6;
        border-radius: 8px;
        font-size: 0.9rem;
        background-color: #fff;
        color: #333;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .form-control:focus {
        outline: none;
        border-color: #0080FF;
        box-shadow: 0 0 0 2px rgba(0, 128, 255, 0.1);
    }

    textarea.form-control {
        height: 5rem;
        resize: vertical;
        font-size: 1rem;
        line-height: 1.5;
    }

    .input-group {
        display: flex;
        align-items: stretch;
    }

    .input-group-prepend {
        display: flex;
        align-items: center;
        padding: 0 15px;
        background-color: #f5f7fa;
        border: 1px solid #dcdfe6;
        border-right: none;
        border-radius: 8px 0 0 8px;
        color: #909399;
        font-weight: 500;
        font-size: 16px;
    }

    .input-group .form-control {
        border-radius: 0 8px 8px 0;
        height: 2.5rem;
    }

    .captcha-group {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .captcha-group .form-control {
        flex: 1;
    }

    .captcha-img {
        height: 2.5rem;
        border: 1px solid #dcdfe6;
        border-radius: 8px;
        cursor: pointer;
        background-color: #f5f7fa;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: #666;
        width: 131px;
        flex-shrink: 0;
        user-select: none;
    }
    .captcha-img img {
        border-radius: 8px;
    }

    .sms-group {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .sms-btn {
        padding: 0 16px;
        height:2.5rem;
        background: #FFFFFF;
        color: #0080FF;
        border: 1px solid #0080FF;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 120px;
    }

    .sms-btn:hover {
        background: #0080FF;
        color: #FFFFFF;
    }

    .sms-btn:disabled {
        background: #f5f7fa;
        color: #c0c4cc;
        border-color: #e4e7ed;
        cursor: not-allowed;
    }

    /* 提交按钮样式 */
    .login_btn1 {
        width: 100%;
        height: 2.7rem;
        background: #0080FF;
        color: #FBFCFD;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s;
        margin-top: 10px;
    }

    .login_btn1:hover {
        background: #0066CC;
    }

    .login_btn1:active {
        transform: translateY(1px);
    }

    /* 错误消息移动端样式 */
    .error-message {
        color: #f56c6c;
        font-size: 14px;
        margin-bottom: 15px;
        text-align: center;
        display: none;
        padding: 8px;
        background: #fef0f0;
        border-radius: 4px;
        border: 1px solid #fde2e2;
    }

    /* Select下拉框移动端优化 */
    select.form-control {
        background-color: #fff !important;
        color: #333 !important;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 20px;
        padding-right: 45px;
    }

    /* 选项组样式优化 */
    select.form-control optgroup {
        font-weight: 600;
        color: #333;
        background-color: #f9f9f9;
        padding: 5px 0;
    }

    select.form-control option {
        font-weight: 400;
        color: #333;
        background-color: #fff;
        padding: 10px 15px;
    }

    /* 移动端输入框聚焦优化 */
    .form-control:focus,
    textarea.form-control:focus,
    select.form-control:focus {
        outline: none;
        border-color: #0080FF;
        box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1);
        -webkit-appearance: none;
    }

    /* 移动端表单验证样式 - 只在用户交互后显示错误状态 */
    .form-control.error {
        border-color: #f56c6c;
    }

    .form-control.error:focus {
        border-color: #f56c6c;
        box-shadow: 0 0 0 3px rgba(245, 108, 108, 0.1);
    }

    /* 自定义错误提示样式 */
    .form-control + .error-tip {
        position: absolute;
        left: 0;
        top: 100%;
        margin-top: 4px;
        display: none;
        color: #f56c6c;
        font-size: 12px;
        text-align: left;
        line-height: 1.4;
        z-index: 10;
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.95);
        padding: 2px 6px;
        border-radius: 4px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        max-width: 100%;
        word-wrap: break-word;
        white-space: normal;
    }

    /* 只在有错误时显示错误提示 */
    .form-control.error + .error-tip {
        display: block;
    }

    /* 移动端input-group错误状态 */
    .input-group.error .form-control {
        border-color: #f56c6c;
    }

    .input-group.error .form-control:focus {
        border-color: #f56c6c;
        box-shadow: 0 0 0 3px rgba(245, 108, 108, 0.1);
    }

    .input-group.error .input-group-prepend {
        border-color: #f56c6c;
        background-color: #fef0f0;
        color: #f56c6c;
    }

    /* 移动端添加成功状态样式 - textarea除外 */
    .form-control:not(textarea):valid {
        border-color: #67c23a;
    }

    .form-control:not(textarea):valid:focus {
        border-color: #67c23a;
        box-shadow: 0 0 0 3px rgba(103, 194, 58, 0.1);
    }

    /* 移动端textarea使用自定义valid类 */
    textarea.form-control {
        border-color: #dcdfe6;
    }

    textarea.form-control:focus {
        border-color: #0080FF;
        box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1);
    }

    /* 禁用移动端textarea的浏览器默认验证样式 */
    textarea.form-control:valid {
        border-color: #dcdfe6 !important;
        box-shadow: none !important;
    }

    textarea.form-control:valid:focus {
        border-color: #0080FF !important;
        box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1) !important;
    }

    textarea.form-control.valid {
        border-color: #67c23a;
    }

    textarea.form-control.valid:focus {
        border-color: #67c23a;
        box-shadow: 0 0 0 3px rgba(103, 194, 58, 0.1);
    }

    /* 移动端触摸优化 */
    .form-control,
    .sms-btn,
    .captcha-img,
    .login_btn1 {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* 移动端表单组间距优化 */
    .form_item {
        margin-bottom: 0.1rem;
    }

    .form_item:last-child {
        margin-bottom: 0;
    }

    /* 移动端标签和输入框对齐优化 */
    .form-label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #333;
        font-size: 14px;
    }

    /* 移动端隐藏桌面端header（如果需要） */
    .header {
        display: none;
        justify-content: space-between;
    }

    /* 移动端页面整体布局优化 */
    .main {
        width: 100%;
        overflow-x: hidden;
    }

    /* 移动端验证码图片点击提示优化 */
    .captcha-img:active {
        background-color: #e6e8eb;
        transform: scale(0.98);
    }

    /* 移动端按钮禁用状态优化 */
    .login_btn1:disabled {
        background: #f5f7fa;
        color: #c0c4cc;
        cursor: not-allowed;
        transform: none;
    }

    /* 移动端表单容器内边距优化 */
    .login-form {
        max-width: 100%;
        margin: 0;
    }
}