/* ============================================
   BuildAdmin Style Login Page — 左右结构
   ============================================ */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #333;
    min-height: 100vh;
    overflow: hidden;
    background: #f0f2f5;
}

a {
    color: #3F6AD8;
    text-decoration: none;
}

/* ========== 语言切换 ========== */
.switch-language {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}
.switch-language a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.switch-language a:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
}

/* ========== 主容器 — 左右分栏 ========== */
.login-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    min-height: 600px;
}

/* ========== 左侧品牌区 ========== */
.login-brand {
    flex: 0 0 42%;
    background: linear-gradient(135deg, #667eea 0%, #3F6AD8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-brand canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.login-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 40px;
}

.login-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    font-size: 38px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.login-brand-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.login-brand-subtitle {
    font-size: 14px;
    font-weight: 300;
    opacity: 0.85;
    line-height: 1.8;
}

.login-brand-divider {
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    margin: 24px auto;
    border-radius: 2px;
}

.login-brand-copyright {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    z-index: 1;
}

/* ========== 右侧表单区 ========== */
.login-form-panel {
    flex: 0 0 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    position: relative;
    overflow: hidden;
}

/* 右侧背景装饰 — 彩色渐变光斑 */
.login-form-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.login-form-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(63, 106, 216, 0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* 右侧额外装饰圆 */
.login-bg-dot {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.06;
}
.login-bg-dot.dot-1 {
    width: 180px;
    height: 180px;
    background: #6366f1;
    top: 20%;
    right: -40px;
}
.login-bg-dot.dot-2 {
    width: 120px;
    height: 120px;
    background: #3F6AD8;
    bottom: 25%;
    left: 10%;
}
.login-bg-dot.dot-3 {
    width: 60px;
    height: 60px;
    background: #a78bfa;
    top: 55%;
    right: 15%;
}

.login-form-container {
    width: 420px;
    max-width: 90%;
}

.login-form-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-form-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 8px;
}

.login-form-header p {
    font-size: 14px;
    color: #909399;
}

.login-form-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 40px 36px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* ========== 表单输入 ========== */
#login-form {
    margin: 0;
}

#login-form .form-group {
    margin-bottom: 24px;
    position: relative;
}

#login-form .input-group {
    width: 100%;
    display: block;
}

#login-form .input-group .tip_label {
    display: block;
    font-size: 14px;
    color: #606266;
    margin-bottom: 8px;
    font-weight: 500;
}

#login-form .input-group .tip_label i {
    margin-right: 6px;
    color: #909399;
    font-size: 14px;
}

#login-form .form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    line-height: 48px;
    color: #303133;
    background: #f5f7fa;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.3s;
}

#login-form .form-control:focus {
    border-color: #3F6AD8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(63, 106, 216, 0.1) !important;
}

#login-form .form-control::placeholder {
    color: #c0c4cc;
}

/* ========== 密码显隐 ========== */
.password-wrapper {
    position: relative;
}
.password-toggle {
    position: absolute;    
    right: 0px;
    top: 22px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #909399;
    font-size: 17px;
    z-index: 10;
    line-height: 1;
    padding: 6px;
    transition: color 0.3s;
    background: none;
    border: none;
}
.password-toggle:hover {
    color: #3F6AD8;
}

/* ========== 验证码 ========== */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.captcha-row .form-control {
    flex: 1;
}
.captcha-img {
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e4e7ed;
    flex-shrink: 0;
}

/* ========== 保持登录 ========== */
.keep-login-row {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: #606266;
}
.keep-login-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #3F6AD8;
}
.keep-login-row label {
    cursor: pointer;
    font-weight: normal;
    margin: 0;
    color: #606266;
}

/* ========== 登录按钮 ========== */
#login-form .btn-login {
    display: block;
    width: 100%;
    height: 48px;
    line-height: 48px;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #3F6AD8;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.3s;
    outline: none !important;
}
#login-form .btn-login:hover {
    background: #3460c7;
    box-shadow: 0 8px 24px rgba(63, 106, 216, 0.35);
    color: #fff;
    transform: translateY(-1px);
}
#login-form .btn-login:active {
    background: #2a52b3;
    box-shadow: 0 4px 12px rgba(63, 106, 216, 0.3);
    transform: translateY(0);
}
#login-form .btn-login i {
    margin-right: 6px;
    font-size: 15px;
}

/* ========== 错误提示 ========== */
#errtips {
    background: #fef0f0;
    border: 1px solid #fde2e2;
    color: #f56c6c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}
#errtips:not(.hide) {
    display: block;
}

/* ========== 加载状态 ========== */
#login-form .btn-login.loading {
    opacity: 0.75;
    cursor: not-allowed;
}

/* ========== Footer Copyright ========== */
.login-form-footer {
    text-align: center;
    margin-top: 24px;
    color: #c0c4cc;
    font-size: 12px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .login-brand {
        display: none;
    }
    .login-form-panel {
        flex: 1;
        background: linear-gradient(135deg, #667eea 0%, #3F6AD8 100%);
        padding: 20px;
    }
    .login-form-card {
        padding: 30px 24px;
        border-radius: 10px;
    }
    .login-form-header h2 {
        font-size: 22px;
    }
    .switch-language a {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }
}

@media (max-height: 700px) {
    .login-form-header {
        margin-bottom: 20px;
    }
    #login-form .form-group {
        margin-bottom: 16px;
    }
    .login-form-card {
        padding: 28px 30px;
    }
}
