* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 50%, #0d2137 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    overflow: hidden;
}

/* 背景图与装饰光晕 */
.login-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
    background-image: url('../images/login-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.login-bg::before {
    content: '';
    position: absolute;
    width: 620px; height: 620px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    top: -220px; right: -160px;
}
.login-bg::after {
    content: '';
    position: absolute;
    width: 440px; height: 440px;
    border-radius: 50%;
    background: rgba(64, 169, 255, .10);
    bottom: -140px; left: -120px;
}

.login-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

/* PC 视口：登录框居右（移动端保持居中，响应式不变） */
@media (min-width: 768px) {
    .login-wrap {
        justify-content: flex-end;
        padding-right: clamp(48px, 10vw, 160px);
    }
}

/* 登录卡片 */
.login-box {
    position: relative;
    z-index: 2;
    width: 400px;
    max-width: 92vw;
    background: rgba(255, 255, 255, .98);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
    padding: 44px 38px 34px;
    animation: fadeInUp .5s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 头部 */
.login-header { text-align: center; margin-bottom: 32px; }
.login-header .login-logo {
    width: auto;
    max-width: 200px;
    max-height: 64px;
    margin-bottom: 16px;
}
.login-header h2 {
    font-size: 21px;
    color: #1a3a5c;
    font-weight: 700;
    letter-spacing: 1px;
}
.login-header p {
    font-size: 12px;
    color: #a8b3c0;
    margin-top: 6px;
    letter-spacing: .5px;
}

/* 表单项 */
.login-form .layui-form-item {
    margin-bottom: 22px;
    position: relative;
}
.login-form .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: #bbb;
    font-size: 18px;
    pointer-events: none;
}
.login-form .layui-input {
    height: 46px;
    line-height: 46px;
    border-radius: 8px;
    padding-left: 42px;
    font-size: 14px;
    border: 1px solid #e4e8ee;
    background: #f7f9fc;
    transition: all .25s;
}
.login-form .layui-input:focus,
.login-form .layui-input:hover {
    border-color: #1890ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, .12);
}

/* 图形验证码行 */
.verify-row .layui-input { padding-right: 130px; }
.verify-row .verify-img {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 112px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    object-fit: cover;
    border: 1px solid #e4e8ee;
}

/* 短信验证码行 */
.code-row .layui-input { padding-right: 128px; }
.code-row .code-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    height: 38px;
    line-height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 6px;
}

/* 登录按钮 */
.login-btn {
    display: block;
    width: 100%;
    height: 46px;
    line-height: 46px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 4px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1890ff, #096dd9);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all .3s;
}
.login-btn:hover {
    background: linear-gradient(135deg, #40a9ff, #1890ff);
    box-shadow: 0 6px 18px rgba(24, 144, 255, .4);
    color: #fff;
}

/* 登录方式切换 */
.login-mode {
    text-align: center;
    margin-top: 6px;
}
.login-mode a {
    font-size: 13px;
    color: #1890ff;
    transition: color .2s;
}
.login-mode a:hover { color: #096dd9; }
.login-mode a .layui-icon { font-size: 14px; vertical-align: middle; }

/* 提示文字 */
.login-tip {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: #bbb;
    min-height: 16px;
}

@media (max-width: 480px) {
    .login-box { padding: 34px 22px 28px; }
}
