/**
 * @fileoverview 登录页面样式表 - 电力能源主题
 * @description 源一售电业务管理系统登录页面 - 电力行业专业风格
 * @author 爬爬虾
 * @date 2026-04-22
 * @version 2.0
 */

/* ==================== 基础重置 & 变量定义 ==================== */

/**
 * CSS变量定义 - 电力能源主题配色
 * 深蓝夜空底色 + 电能蓝光 accent + 能源金点缀
 */
:root {
    /* 主色调 - 电能蓝系列 */
    --primary-color: #0072ff;
    --primary-dark: #0051b3;
    --primary-light: #00c6ff;
    --primary-gradient: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
    --primary-glow: rgba(0, 198, 255, 0.3);
    
    /* 能源主题色 */
    --energy-gold: #f0a500;
    --energy-gold-light: #ffc107;
    --energy-green: #00d084;
    
    /* 辅助色 */
    --success-color: #00d084;
    --warning-color: #f0a500;
    --error-color: #ff4757;
    --info-color: #00c6ff;
    
    /* 中性色 */
    --text-primary: #1a2332;
    --text-secondary: #5a6a7f;
    --text-placeholder: #9aa5b5;
    --border-color: #d0d8e8;
    --bg-gray: #f0f4f8;
    --bg-white: #ffffff;
    
    /* 深色主题（品牌区） */
    --dark-bg: #0a1628;
    --dark-bg-light: #111d32;
    --dark-text: #e8edf5;
    --dark-text-muted: #8a9bb8;
    
    /* 阴影 - 带蓝色光晕 */
    --shadow-sm: 0 1px 3px rgba(0, 114, 255, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 114, 255, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 114, 255, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 114, 255, 0.18);
    --shadow-glow: 0 0 20px rgba(0, 198, 255, 0.25);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* 过渡动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/**
 * 全局重置
 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/**
 * 页面基础样式
 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--dark-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/**
 * 隐藏元素工具类
 */
.hidden {
    display: none !important;
}

/* ==================== 登录容器布局 ==================== */

/**
 * 登录页面主容器
 * 采用左右分栏布局：左侧品牌展示，右侧登录表单
 */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==================== 左侧品牌区域 - 电力主题 ==================== */

/**
 * 品牌展示区域
 * 深色电力主题背景，带动态光效
 */
.login-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--dark-bg);
    overflow: hidden;
}

/**
 * 电力网格背景装饰
 * 模拟电路板/电网的细线纹理
 */
.login-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 198, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 198, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.6;
}

/**
 * 品牌背景装饰 - 能量光环
 */
.brand-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(0, 198, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 114, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(0, 198, 255, 0.08) 0%, transparent 40%);
    animation: energyPulse 6s ease-in-out infinite;
}

/**
 * 能量脉冲动画
 */
@keyframes energyPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/**
 * 浮动粒子效果容器
 */
.brand-bg::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    top: 20%;
    right: 15%;
    background: radial-gradient(circle, rgba(0, 198, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatParticle 8s ease-in-out infinite;
}

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    33% { transform: translate(-30px, -20px) scale(1.1); opacity: 0.8; }
    66% { transform: translate(20px, 10px) scale(0.9); opacity: 0.6; }
}

/**
 * 品牌内容区域
 */
.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--dark-text);
    padding: var(--space-2xl);
}

/**
 * 品牌主标题
 */
.brand-title {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 6px;
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, #ffffff 0%, #00c6ff 50%, #0072ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/**
 * 品牌副标题
 */
.brand-subtitle {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 10px;
    color: var(--dark-text-muted);
    margin-top: var(--space-md);
}

/**
 * 品牌分隔线 - 电能光效
 */
.brand-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--primary-color), var(--primary-light), transparent);
    margin: var(--space-lg) auto;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 198, 255, 0.5);
}

/**
 * 品牌描述文字
 */
.brand-desc {
    font-size: 15px;
    color: var(--dark-text-muted);
    letter-spacing: 3px;
    margin-top: var(--space-md);
}

/**
 * 电力图标装饰
 */
.brand-content::before {
    content: '⚡';
    display: block;
    font-size: 48px;
    margin-bottom: var(--space-lg);
    opacity: 0.8;
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ==================== 右侧登录表单区域 ==================== */

/**
 * 登录表单区域
 * 浅色背景，与左侧深色形成对比
 */
.login-form-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    background: linear-gradient(180deg, var(--bg-gray) 0%, var(--bg-white) 100%);
    position: relative;
}

/**
 * 右侧区域顶部光效装饰
 */
.login-form-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--primary-light), var(--primary-color), transparent);
    opacity: 0.6;
}

/**
 * 登录卡片盒子
 * 白色卡片，带电能蓝光阴影
 */
.login-box {
    width: 100%;
    max-width: 440px;
    padding: var(--space-2xl);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 114, 255, 0.08);
}

/**
 * 登录标题
 */
.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    text-align: center;
    letter-spacing: 2px;
}

/**
 * 登录副标题
 */
.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    text-align: center;
}

/* ==================== 登录类型切换标签 ==================== */

/**
 * 登录类型标签容器
 */
.login-type-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    background: var(--bg-gray);
    padding: 5px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/**
 * 标签按钮基础样式
 */
.tab-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

/**
 * 标签按钮悬停效果
 */
.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(0, 114, 255, 0.06);
}

/**
 * 标签按钮激活状态
 */
.tab-btn.active {
    background: var(--bg-white);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    border: 1px solid rgba(0, 114, 255, 0.15);
}

/* ==================== 表单元素 ==================== */

/**
 * 表单容器
 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/**
 * 表单组
 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/**
 * 表单标签
 */
.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

/**
 * 输入框容器
 */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/**
 * 输入框图标
 */
.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    opacity: 0.5;
    z-index: 1;
}

/**
 * 表单输入框
 */
.form-input {
    width: 100%;
    padding: 13px 13px 13px 42px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: all var(--transition-fast);
}

/**
 * 输入框占位符样式
 */
.form-input::placeholder {
    color: var(--text-placeholder);
}

/**
 * 输入框聚焦状态 - 电能蓝光
 */
.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/**
 * 输入框错误状态
 */
.form-input.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

/**
 * 密码可见性切换按钮
 */
.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.toggle-password:hover {
    opacity: 0.9;
}

/**
 * 错误提示信息
 */
.error-msg {
    font-size: 12px;
    color: var(--error-color);
    min-height: 16px;
}

/* ==================== 密码强度指示器 ==================== */

.password-strength {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.strength-text {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 60px;
}

/* 密码强度等级颜色 - 电力主题 */
.strength-fill.weak { width: 25%; background: var(--error-color); }
.strength-fill.fair { width: 50%; background: var(--warning-color); }
.strength-fill.good { width: 75%; background: var(--info-color); }
.strength-fill.strong { width: 100%; background: var(--success-color); }

/* ==================== 表单选项 ==================== */

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-xs);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.remember-me input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.remember-me input:checked + .checkmark {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

.remember-me input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.remember-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==================== 登录按钮 - 电能主题 ==================== */

/**
 * 登录按钮
 * 电能蓝渐变 + 光晕效果
 */
.login-btn {
    width: 100%;
    padding: 14px;
    margin-top: var(--space-sm);
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    letter-spacing: 2px;
}

/**
 * 按钮光晕效果
 */
.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: inline-block;
}

/* ==================== 忘记账号链接 ==================== */

.forgot-account {
    text-align: center;
    margin-top: var(--space-md);
}

.forgot-account-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.forgot-account-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ==================== 版权信息 ==================== */

.copyright {
    margin-top: var(--space-xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.8;
}

.icp-info {
    margin-top: var(--space-xs);
    font-size: 12px;
}

.icp-info a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.icp-info a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ==================== 弹窗样式 ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(0, 114, 255, 0.1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-gray);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

/* ==================== 提示消息（Toast） ==================== */

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: toastSlideIn 0.3s ease;
    border: 1px solid rgba(0, 114, 255, 0.1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ==================== 响应式适配 ==================== */

@media (max-width: 1024px) {
    .login-brand {
        display: none;
    }
    
    .login-form-area {
        padding: var(--space-lg);
        background: var(--bg-white);
    }
    
    .login-box {
        padding: var(--space-xl);
        box-shadow: var(--shadow-md);
    }
}

@media (max-width: 480px) {
    .login-form-area {
        padding: var(--space-md);
    }
    
    .login-box {
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .brand-title {
        font-size: 36px;
    }
    
    .tab-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .login-type-tabs {
        gap: 2px;
    }
}
