/* =======================
    全局基础设置
======================= */
:root {
    --primary-color: #148be4; /* 主色 */
    --active-color: #1e9fff; /* 激活色 */
    --text-light: #fff; /* 浅色文字 */
    --border-color: #dae1e6; /* 边框颜色 */
    --placeholder-color: #a6aebf; /* 占位符颜色 */
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-size: 12px;
}

body {
    background: url('/static/images/bg_new.jpg') 0 0 / cover no-repeat;
}

/* =======================
   占位符与自动填充样式统一
   ======================= */
/* 输入框占位符统一样式 */
::placeholder {
    color: var(--placeholder-color);
    opacity: 1;
}

/* 自动填充背景色覆盖 */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--text-light) inset;
}

/* =======================
   布局容器
   ======================= */
.main-body {
    top: 50%;
    left: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

/* =======================
   登录组件整体
   ======================= */
.main-body {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-main {
    width: 428px;
    position: relative;
}

/* =======================
   登录头部
   ======================= */
.login-top {
    height: 117px;
    background: var(--primary-color);
    border-radius: 12px 12px 0 0;
    font: 400 30px/117px SourceHanSansCN-Regular, serif;
    color: var(--text-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 头部装饰元素 */
.login-top .bg1,
.login-top .bg2 {
    background: var(--text-light);
    opacity: 0.1;
    position: absolute;
}

.bg1 {
    width: 74px;
    height: 74px;
    border-radius: 0 74px 0 0;
    left: 0;
    top: 43px;
}

.bg2 {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    right: -16px;
    top: -16px;
}

/* 登录主体区域 */
.login-bottom {
    width: 428px;
    background: var(--text-light);
    border-radius: 0 0 12px 12px;
    padding-bottom: 53px;
}

/* ========================
    表单元素布局
========================= */
.center {
    width: 288px;
    margin: 0 auto;
    padding: 40px 0 15px;
}

/* 表单项通用样式 */
.item {
    width: 100%;
    height: 35px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 35px;
    position: relative;
}

/* 输入框基础样式 */
.item input {
    width: calc(100% - 40px); /* 留出图标空间 */
    height: 22px;
    border: 0;
    outline: 0;
    font-size: 16px;
    padding-left: 40px; /* 图标占位 */
}

/* 解决密码输入框，输入时显示小眼睛 */
input[type="password"]::-ms-reveal {
    display: none;
}

/* 输入框聚焦效果 */
.item input:focus {
    border-bottom-color: var(--active-color);
    transition: border-color 0.3s ease;
}

/* 图标定位 */
.icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 33px;
    height: 22px;
}

/* 根据 icon-login.png 的雪碧图坐标进行精简: */
.icon-1 {
    background: url(/static/images/icon-login.png) no-repeat 1px 0;
}

.icon-2 {
    background: url(/static/images/icon-login.png) no-repeat -54px 0;
}

.icon-3 {
    background: url(/static/images/icon-login.png) no-repeat -106px 0;
}

.icon-4 {
    background: url(/static/images/icon-login.png) no-repeat 0 -43px;
    position: absolute;
    right: -10px;
    cursor: pointer;
    left: auto;
}

.icon-5 {
    background: url(/static/images/icon-login.png) no-repeat -55px -43px;
    position: absolute;
    right: -10px;
    cursor: pointer;
    left: auto;
}

.icon-6 {
    background: url(/static/images/icon-login.png) no-repeat 0 -93px;
    position: absolute;
    right: -10px;
    margin-top: 8px;
    cursor: pointer;
}


.login-main .login-bottom .center .item .validateImg {
    position: absolute;
    right: 1px;
    cursor: pointer;
    height: 36px;
    border: 1px solid #e6e6e6;
}

/* =======================
   功能性提示 + 链接
   ======================= */
.login-main .login-bottom .tip {
    clear: both;
    height: 16px;
    line-height: 16px;
    width: 288px;
    margin: 0 auto;
    position: relative;
}

.login-main .login-bottom .tip .forget-password {
    color: #1391ff;
    text-decoration: none;
    position: absolute;
    right: 0;
    top: 0;
}

.login-main .login-bottom .tip .forget-password:hover {
    background-color: rgba(30, 159, 255, 0.1);
}

/* =======================
   提交按钮
   ======================= */
.login-main .login-bottom .login-btn {
    width: 288px;
    height: 40px;
    background-color: #1E9FFF;
    border-radius: 16px;
    margin: 24px auto 0;
    text-align: center;
    line-height: 40px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

/* ========================
功能区域
========================= */
/* 验证码区域 */
#validatePanel {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 25px;
}

.validateImg {
    height: 36px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    cursor: pointer;
}

/* 忘记密码链接 */
.forget-password {
    color: var(--active-color);
    text-decoration: none;
    float: right;
    transition: background 0.3s;
}

.forget-password:hover {
    background: rgba(30, 159, 255, 0.1);
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    height: 40px;
    background: var(--active-color);
    border-radius: 4px;
    margin: 24px 0 0;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.login-btn:hover {
    background: #1a8fe6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 159, 255, 0.3);
}

/* ========================
    响应式适配
========================= */
@media (max-width: 428px) {
    .login-main,
    .login-bottom {
        width: 90% !important;
    }

    .login-top {
        width: 100% !important;
    }

    #validatePanel {
        flex-direction: column;
    }

    .validateImg {
        width: 100%;
        height: 44px !important;
    }
}
