/* 量子教学机系统 - 通用样式 */
/* 现代科技风设计系统 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 */
    --color-primary: #0f172a;        /* 深空蓝 - 顶部导航/重要背景 */
    --color-secondary: #1e40af;      /* 科技蓝 - 按钮/重要元素 */
    --color-accent: #06d6a0;         /* 量子青 - 成功状态/高亮元素 */
    --color-bg: #f8fafc;             /* 浅灰白 - 主内容区背景 */
    --color-card: #ffffff;            /* 纯白 - 内容卡片 */
    
    /* 文字色 */
    --text-primary: #1e293b;         /* 深灰 - 主要文字 */
    --text-secondary: #64748b;       /* 中灰 - 次要文字 */
    --text-disabled: #cbd5e1;        /* 浅灰 - 禁用文字 */
    
    /* 功能色 */
    --color-success: #06d6a0;        /* 量子青 - 成功 */
    --color-danger: #dc2626;         /* 危险/错误 */
    --color-warning: #f59e0b;        /* 警告 */
    
    /* 边框色 */
    --border-color: #cbd5e1;         /* 默认边框 */
    --border-light: #e2e8f0;         /* 浅色分割线 */
    
    /* 间距系统（基础单位8px） */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    
    /* 圆角系统 */
    --radius-sm: 4px;                /* 小圆角 - 按钮/输入框 */
    --radius-md: 8px;                /* 标准圆角 - 卡片 */
    --radius-lg: 12px;               /* 大圆角 - 大容器 */
    
    /* 阴影系统 */
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);      /* 轻度阴影 - 卡片悬浮 */
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);         /* 中度阴影 - 弹窗/下拉菜单 */
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);       /* 重度阴影 - 模态框 */
}

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--color-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 14px;
    font-weight: 400;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 字体层级 */
h1, .h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

h2, .h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

h3, .h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.text-sm {
    font-size: 12px;
    font-weight: 400;
}

.text-xs {
    font-size: 10px;
    font-weight: 400;
}

/* ==================== 登录/注册页样式 ==================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--color-primary);
    overflow: hidden;
}

/* 新版登录页面布局 - 左右分栏 */
.login-page {
    height: 100vh;
    display: flex;
    background: #ffffff;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* 左侧面板 */
.login-left-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 60px;
    background: linear-gradient(135deg, #f0f9ff 0%, #f0fdf4 50%, #ffffff 100%);
    position: relative;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
    width: 50%;
}

/* 装饰性圆形背景元素 */
.login-left-panel::before,
.login-left-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.03;
    pointer-events: none;
}

.login-left-panel::before {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: -100px;
    right: -100px;
}

.login-left-panel::after {
    width: 300px;
    height: 300px;
    background: #06d6a0;
    bottom: -50px;
    left: -50px;
}

.welcome-content {
    max-width: 500px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.welcome-title {
    font-size: 36px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* 特性卡片网格 */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

.feature-card {
    background: #ffffff;
    border: 1.5px solid #ffffff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card-1 {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.feature-card-2 {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.feature-card-3 {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.feature-card-4 {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-card-1:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.feature-card-2:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.feature-card-3:hover {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.feature-card-4:hover {
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
}

.feature-icon {
    font-size: 36px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: currentColor;
}

.feature-icon svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
}

.feature-icon-1 {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.feature-icon-2 {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.feature-icon-3 {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.feature-icon-4 {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.feature-text {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
}

/* 底部装饰图标 */
.bottom-decorations {
    display: flex;
    gap: 24px;
    justify-content: center;
    opacity: 0.3;
}

.deco-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.deco-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* 右侧面板 */
.login-right-panel {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
    position: relative;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    min-width: 0;
    width: 50%;
}

.login-form-container {
    width: 100%;
    max-width: 450px;
    min-width: 0;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 0;
    margin: auto 0;
}

#loginForm,
#registerForm {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.system-logo {
    margin-bottom: 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.logo-container {
    width: 110px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transform: translateY(1px);
}

.espin-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.3px;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.login-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.3;
}

.register-link {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

.register-link a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

/* 系统说明信息框 */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 24px;
}

.info-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e40af;
}

.info-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.info-text {
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}

/* 输入框包装器（带图标） */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    color: #64748b;
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.input-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 44px;
    background: var(--color-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    height: 44px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

/* 密码输入框需要额外的右侧padding给眼睛图标和验证图标 */
.input-wrapper.password-input-wrapper input,
.input-wrapper input[type="password"] {
    padding-right: 80px;
}

.password-validator-icon {
    position: absolute;
    right: 50px;
    color: #64748b;
    z-index: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    pointer-events: none !important;
    transition: color 0.3s ease;
    overflow: hidden !important;
    touch-action: none;
    max-width: 24px !important;
    max-height: 24px !important;
    clip-path: inset(0);
}

.password-validator-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 3;
}

/* 密码验证提示悬浮窗 */
.password-form-group {
    position: relative;
}

.password-validator-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    z-index: 1000;
    margin-top: 4px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validator-tooltip-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.validator-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.validator-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.validator-rule .rule-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.validator-rule .rule-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 3;
}

.validator-rule .rule-text {
    color: #64748b;
    transition: color 0.2s ease;
    flex: 1;
}

.password-toggle {
    position: absolute !important;
    right: 14px !important;
    color: #64748b;
    cursor: pointer !important;
    z-index: 999 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    user-select: none;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    transition: color 0.3s ease;
    pointer-events: auto !important;
    touch-action: manipulation;
}

.password-toggle:hover {
    color: #1e293b;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: all 0.3s ease;
}

.password-toggle:hover svg {
    stroke: #1e293b;
}

.forgot-password {
    text-align: right;
    margin-bottom: 24px;
}

.forgot-password a {
    font-size: 14px;
    color: #1e40af;
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* 角色选择样式 */
.role-selection {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.role-option {
    flex: 1;
    cursor: pointer;
}

.role-option input[type="radio"] {
    display: none;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 70px;
}

.role-option input[type="radio"]:checked + .role-card {
    border-color: #1e40af;
    background: rgba(30, 64, 175, 0.05);
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

.role-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.role-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    color: #64748b;
}

.role-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.role-option input[type="radio"]:checked + .role-card .role-icon {
    color: #1e40af;
}

.role-name-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.role-name {
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
}

.role-option input[type="radio"]:checked + .role-card .role-name {
    color: #1e40af;
    font-weight: 600;
}

.role-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: help;
    position: relative;
    transition: color 0.3s ease;
}

.role-tooltip-icon:hover {
    color: #64748b;
}

.role-tooltip-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Tooltip样式 */
.role-tooltip-icon::after {
    content: '临时使用，开发后删除掉';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: #1e293b;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.role-tooltip-icon::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #1e293b;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.role-tooltip-icon:hover::after,
.role-tooltip-icon:hover::before {
    opacity: 1;
}



@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 12px;
    background: #334155;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.btn-login:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-login:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .login-page {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    .login-left-panel {
        height: auto;
        min-height: auto;
        width: 100%;
        padding: 30px 24px;
        overflow-x: hidden;
    }
    
    .login-right-panel {
        height: auto;
        min-height: auto;
        width: 100%;
        padding: 30px 24px;
        overflow-x: hidden;
        align-items: flex-start;
    }
    
    .login-form-container {
        margin: 0;
        max-height: none;
    }
    
    .welcome-title {
        font-size: 32px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .feature-cards {
        margin-bottom: 30px;
        gap: 12px;
    }
    
    .feature-card {
        padding: 16px;
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
    }
    
    .feature-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .info-box {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .info-text {
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .role-selection {
        gap: 8px;
    }
    
    .role-card {
        padding: 10px 6px;
        min-height: 60px;
    }
    
    .role-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .role-name {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .login-left-panel {
        padding: 24px 20px;
        overflow-x: hidden;
    }
    
    .login-right-panel {
        padding: 24px 20px;
        overflow-x: hidden;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .welcome-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .bottom-decorations {
        display: none;
    }
    
    .role-selection {
        flex-direction: column;
        gap: 8px;
    }
    
    .role-card {
        min-height: 50px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 12px;
        gap: 12px;
    }
    
    .role-icon {
        margin-bottom: 0;
    }
    
    .login-form-container {
        max-width: 100%;
    }
    
    .system-logo {
        gap: 12px;
    }
    
    .logo-container {
        width: 100px;
        height: 35px;
    }
    
    .logo-text {
        font-size: 22px;
        line-height: 1;
    }
    
    .login-title {
        font-size: 18px;
    }
    
    .info-box {
        padding: 10px;
        margin-bottom: 16px;
    }
    
    .info-text {
        font-size: 11px;
    }
}

/* 特别小的屏幕 - 保持无横向滚动 */
@media (max-width: 480px) {
    .login-page {
        overflow-x: hidden;
    }
    
    .login-left-panel {
        padding: 20px 16px;
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }
    
    .login-right-panel {
        padding: 20px 16px;
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .welcome-subtitle {
        font-size: 12px;
    }
    
    .feature-card {
        padding: 12px;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
    }
    
    .feature-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .feature-text {
        font-size: 14px;
    }
    
    .system-logo {
        gap: 10px;
    }
    
    .logo-container {
        width: 90px;
        height: 30px;
    }
    
    .logo-text {
        font-size: 20px;
        line-height: 1;
    }
    
    .login-title {
        font-size: 16px;
    }
    
    .input-wrapper input {
        font-size: 14px;
        padding: 10px 14px;
        padding-left: 40px;
        height: 40px;
    }
    
    .input-wrapper.password-input-wrapper input {
        padding-right: 40px;
    }
    
    .input-icon {
        left: 12px;
    }
    
    .input-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .password-toggle {
        right: 12px;
    }
    
    .password-toggle svg {
        width: 16px;
        height: 16px;
    }
    
    .btn-login {
        padding: 10px;
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group select {
        height: 40px;
        font-size: 14px;
    }
}

/* 量子粒子背景动画 */
.quantum-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.quantum-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite;
    box-shadow: 0 0 10px var(--color-accent);
}

.quantum-orbit {
    position: absolute;
    border: 1px solid rgba(6, 214, 160, 0.2);
    border-radius: 50%;
    animation: rotate 30s linear infinite;
}

.orbit-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-duration: 25s;
}

.orbit-2 {
    width: 300px;
    height: 300px;
    top: 60%;
    right: 15%;
    animation-duration: 35s;
    animation-direction: reverse;
}

.orbit-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-duration: 20s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(50px, -50px) scale(1.5);
        opacity: 1;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 登录表单 */
.auth-box {
    position: relative;
    z-index: 10;
    background: var(--color-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-md);
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.logo-section p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
}

/* 通用输入框样式 - 确保所有input、textarea、select都有统一样式 */
/* 注意：.input-wrapper内的输入框有特殊的padding处理，在下方单独定义 */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"],
textarea,
select {
    width: 100%;
    padding: 12px var(--spacing-sm);
    background: var(--color-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    transition: all 0.3s ease;
    height: 44px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    outline: none;
}

textarea {
    height: auto;
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

/* 确保.input-wrapper内的输入框padding正确，不被通用样式覆盖 */
.input-wrapper input[type="text"],
.input-wrapper input[type="number"],
.input-wrapper input[type="email"],
.input-wrapper input[type="password"],
.input-wrapper input[type="search"],
.input-wrapper input[type="tel"],
.input-wrapper input[type="url"],
.input-wrapper input[type="date"],
.input-wrapper input[type="datetime-local"],
.input-wrapper input[type="time"],
.input-wrapper input[type="month"],
.input-wrapper input[type="week"] {
    padding: 12px 16px;
    padding-left: 44px !important;
}

/* 密码输入框需要额外的右侧padding给眼睛图标 */
.input-wrapper.password-input-wrapper input[type="password"],
.input-wrapper input[type="password"] {
    padding-right: 44px !important;
}

/* 输入框焦点状态 */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* 输入框错误状态 */
input[type="text"].error,
input[type="number"].error,
input[type="email"].error,
input[type="password"].error,
input[type="search"].error,
input[type="tel"].error,
input[type="url"].error,
input[type="date"].error,
input[type="datetime-local"].error,
input[type="time"].error,
input[type="month"].error,
input[type="week"].error,
textarea.error,
select.error {
    border-color: var(--color-danger);
    color: var(--color-danger);
}

/* 输入框禁用状态 */
input[type="text"]:disabled,
input[type="number"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="search"]:disabled,
input[type="tel"]:disabled,
input[type="url"]:disabled,
input[type="date"]:disabled,
input[type="datetime-local"]:disabled,
input[type="time"]:disabled,
input[type="month"]:disabled,
input[type="week"]:disabled,
textarea:disabled,
select:disabled {
    background: var(--color-bg);
    color: var(--text-disabled);
    cursor: not-allowed;
}

/* 下拉选择框箭头 */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.form-group select {
    width: 100%;
    padding: 12px var(--spacing-sm);
    background: var(--color-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    height: 44px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

/* form-group中的输入框样式（确保所有输入框都有统一样式） */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="search"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="time"],
.form-group input[type="month"],
.form-group input[type="week"],
.form-group textarea {
    width: 100%;
    padding: 12px var(--spacing-sm);
    background: var(--color-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    transition: all 0.3s ease;
    height: 44px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    outline: none;
}

.form-group textarea {
    height: auto;
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

/* 输入框焦点状态 */
.form-group .input-wrapper input:focus,
.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="search"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="url"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="datetime-local"]:focus,
.form-group input[type="time"]:focus,
.form-group input[type="month"]:focus,
.form-group input[type="week"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group .input-wrapper input.error,
.form-group input[type="text"].error,
.form-group input[type="number"].error,
.form-group input[type="email"].error,
.form-group input[type="password"].error,
.form-group input[type="search"].error,
.form-group input[type="tel"].error,
.form-group input[type="url"].error,
.form-group input[type="date"].error,
.form-group input[type="datetime-local"].error,
.form-group input[type="time"].error,
.form-group input[type="month"].error,
.form-group input[type="week"].error,
.form-group textarea.error,
.form-group select.error {
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.form-group .input-wrapper input:disabled,
.form-group input[type="text"]:disabled,
.form-group input[type="number"]:disabled,
.form-group input[type="email"]:disabled,
.form-group input[type="password"]:disabled,
.form-group input[type="search"]:disabled,
.form-group input[type="tel"]:disabled,
.form-group input[type="url"]:disabled,
.form-group input[type="date"]:disabled,
.form-group input[type="datetime-local"]:disabled,
.form-group input[type="time"]:disabled,
.form-group input[type="month"]:disabled,
.form-group input[type="week"]:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
    background: var(--color-bg);
    color: var(--text-disabled);
    cursor: not-allowed;
}

/* 下拉选择框箭头 */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* 表单验证提示 */
.form-error {
    color: var(--color-danger);
    font-size: 12px;
    font-weight: 400;
    margin-top: var(--spacing-xs);
    display: block;
}

.form-success {
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 400;
    margin-top: var(--spacing-xs);
    display: block;
}

.form-help {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
    margin-top: var(--spacing-xs);
    display: block;
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

/* 主要按钮 */
.btn-primary {
    background: var(--color-secondary);
    color: #ffffff;
}

.btn-primary:hover {
    background: #1e3a8a; /* 亮度提高10% */
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* 次要按钮 */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: var(--border-color);
}

/* 危险按钮 */
.btn-danger {
    background: var(--color-danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: scale(1.02);
}

.btn-danger:active {
    transform: scale(0.98);
}

/* 禁用状态 */
.btn:disabled,
.btn.disabled {
    background: #e2e8f0;
    color: var(--text-disabled);
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover,
.btn.disabled:hover {
    background: #e2e8f0;
    transform: none;
}

/* 全宽按钮 */
.btn-block {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-links a {
    color: var(--color-secondary);
    text-decoration: none;
    margin: 0 var(--spacing-xs);
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* ==================== 主应用布局 ==================== */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--color-bg);
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: var(--color-primary);
    border-right: 1px solid var(--border-light);
    position: fixed;
    height: 100vh;
    overflow-y: hidden;
    overflow-x: hidden;
    z-index: 100;
    transition: width 0.3s ease;
}

/* 隐藏侧边栏滚动条 */
.sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: var(--spacing-md) var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xs);
}

.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xs);
}

.sidebar-header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex: 1;
    min-width: 0;
}

.sidebar.collapsed .sidebar-header-content {
    flex: 0;
    justify-content: center;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00d4aa 0%, #4ecdc4 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    color: #ffffff;
    font-weight: 600;
}

.sidebar.collapsed .sidebar-logo {
    width: 40px;
    height: 40px;
    margin: 0;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-header h2 {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-size: 16px;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar.collapsed .sidebar-toggle {
    margin: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.sidebar-menu {
    padding: 20px 0;
    transition: opacity 0.3s ease;
    overflow-y: hidden;
    overflow-x: hidden;
}

.sidebar-menu::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.sidebar-menu {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar.collapsed .sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    position: relative;
}

.menu-item > a {
    display: flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 400;
    gap: var(--spacing-xs);
    position: relative;
}

.menu-item > a span:first-child {
    flex-shrink: 0;
    font-size: 18px;
    width: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .menu-item > a {
    justify-content: center;
    padding: var(--spacing-xs);
    min-width: 48px;
    width: 48px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    font-size: 0; /* 隐藏所有文本内容 */
    color: transparent; /* 隐藏文本颜色 */
    line-height: 0;
}

/* 确保折叠时只显示图标，隐藏所有文字元素 */
.sidebar.collapsed .menu-item > a > *:not(:first-child) {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    visibility: hidden !important;
}

/* 确保图标显示 */
.sidebar.collapsed .menu-item > a span:first-child {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px !important; /* 恢复图标字体大小 */
    width: auto;
    flex-shrink: 0;
    margin: 0;
    opacity: 1 !important;
    line-height: normal !important;
    color: #ffffff !important; /* 恢复图标颜色 */
    position: relative;
}

/* 折叠状态下的弹出菜单 */
.sidebar.collapsed .menu-item {
    position: relative;
}

.sidebar.collapsed .menu-item .collapsed-menu-popup {
    display: none;
    position: fixed;
    left: 92px;
    background: var(--color-primary);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    min-width: 200px;
    max-width: 250px;
    padding: 8px 0;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-top: 0;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar.collapsed .menu-item:hover .collapsed-menu-popup,
.sidebar.collapsed .menu-item .collapsed-menu-popup:hover {
    display: block;
    pointer-events: auto;
    opacity: 1;
    transform: translateX(0);
}

/* 确保弹出菜单内的所有链接都可以点击 */
.sidebar.collapsed .menu-item .collapsed-menu-popup,
.sidebar.collapsed .menu-item .collapsed-menu-popup * {
    pointer-events: auto;
}

/* 确保悬停时菜单项保持高亮 */
.sidebar.collapsed .menu-item:hover > a {
    background: rgba(30, 64, 175, 0.2);
}

/* 气泡对话框的三角形箭头 - 指向左侧菜单项 */
.sidebar.collapsed .menu-item .collapsed-menu-popup::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 16px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--color-primary);
    filter: drop-shadow(-2px 0 2px rgba(0, 0, 0, 0.2));
}

/* 三角形箭头的边框效果 */
.sidebar.collapsed .menu-item .collapsed-menu-popup::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 17px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 7px solid rgba(255, 255, 255, 0.1);
}

.sidebar.collapsed .menu-item .collapsed-menu-popup .popup-title {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 4px;
    white-space: nowrap;
    cursor: default;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px 12px 0 0;
}

/* 如果一级菜单有链接，标题可以点击 */
.sidebar.collapsed .menu-item .collapsed-menu-popup .popup-title a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.sidebar.collapsed .menu-item .collapsed-menu-popup .popup-title a:hover {
    color: var(--color-accent);
}

.sidebar.collapsed .menu-item .collapsed-menu-popup .popup-submenu {
    padding: 4px 0;
}

.sidebar.collapsed .menu-item .collapsed-menu-popup .popup-submenu-item {
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    border-radius: 0;
    user-select: none;
    -webkit-user-select: none;
}

.sidebar.collapsed .menu-item .collapsed-menu-popup .popup-submenu-item:hover {
    background: linear-gradient(90deg, rgba(30, 64, 175, 0.4) 0%, rgba(30, 64, 175, 0.2) 100%);
    color: #ffffff;
    padding-left: 20px;
}

.sidebar.collapsed .menu-item .collapsed-menu-popup .popup-submenu-item:active {
    background: rgba(30, 64, 175, 0.5);
    transform: scale(0.98);
}

/* 确保链接在点击时不会失去焦点 */
.sidebar.collapsed .menu-item .collapsed-menu-popup .popup-submenu-item:focus {
    outline: 2px solid rgba(6, 214, 160, 0.5);
    outline-offset: -2px;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
    }
}

.menu-item > a:hover {
    background: rgba(30, 64, 175, 0.2);
    color: #ffffff;
}

.menu-item.active > a {
    background: var(--color-secondary);
    color: #ffffff;
}

.menu-item.has-children > a::after {
    content: '▼';
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.menu-item.has-children.open > a::after {
    transform: rotate(180deg);
}

.sidebar.collapsed .menu-item.has-children > a::after {
    display: none !important;
    content: none !important;
}

.submenu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.menu-item.open .submenu {
    display: block;
}

.sidebar.collapsed .submenu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.submenu-item a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-xs) var(--spacing-md);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.submenu-item a:hover {
    background: rgba(30, 64, 175, 0.2);
    color: #ffffff;
    padding-left: calc(var(--spacing-md) + var(--spacing-xs));
}

.submenu-item.active a {
    color: #ffffff;
    background: rgba(30, 64, 175, 0.2);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px; /* 默认展开状态 */
    width: calc(100% - 260px); /* 确保宽度正确计算 */
    max-width: calc(100vw - 260px); /* 确保不超过视口宽度 */
    min-height: 100vh;
    transition: margin-left 0.3s ease, width 0.3s ease;
    box-sizing: border-box;
    overflow-x: hidden; /* 防止横向溢出 */
    overflow-y: visible;
}

/* 当侧边栏折叠时，主内容区域左移并调整宽度 */
.app-container .sidebar.collapsed ~ .main-content,
.main-content.sidebar-collapsed {
    margin-left: 80px !important;
    width: calc(100% - 80px) !important;
    max-width: calc(100vw - 80px) !important;
}

/* 确保当侧边栏展开时，主内容区域恢复 - 使用多种选择器确保覆盖 */
.app-container .sidebar:not(.collapsed) ~ .main-content,
.main-content.sidebar-expanded,
.main-content:not(.sidebar-collapsed):not(.sidebar-expanded) {
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
    max-width: calc(100vw - 260px) !important;
}

/* 确保当侧边栏展开时，主内容区域恢复 - 使用多种选择器确保覆盖 */
.app-container .sidebar:not(.collapsed) ~ .main-content,
.main-content.sidebar-expanded,
.main-content:not(.sidebar-collapsed):not(.sidebar-expanded) {
    margin-left: 260px !important;
}

/* 顶部栏 */
.topbar {
    background: var(--color-card);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.notification-icon:hover {
    color: var(--color-secondary);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
    position: relative;
}

.user-info:hover {
    background: #f1f5f9;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    color: #ffffff;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-info.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.user-dropdown-item:hover {
    background: #f1f5f9;
}

.user-dropdown-item.logout {
    color: var(--color-danger);
    border-top: 1px solid var(--border-light);
}

.user-dropdown-item.logout:hover {
    background: #fee2e2;
    color: var(--color-danger);
}

.user-dropdown-item-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 内容区域 */
.content-area {
    padding: var(--spacing-md);
    background: var(--color-bg);
    width: 100%;
    box-sizing: border-box;
    overflow-x: visible;
}

/* ==================== 数据卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.stat-card {
    background: var(--color-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-card-title {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(6, 214, 160, 0.1);
    color: var(--color-accent);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-card-change {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-accent);
}

/* ==================== 图表容器 ==================== */
.chart-container {
    background: var(--color-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-light);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    min-width: 0; /* 允许flex/grid子元素缩小 */
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-body {
    height: 300px;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* 确保canvas不会溢出 */
.chart-body canvas {
    max-width: 100%;
    height: 100%;
}

/* 数据可视化图表配色方案 */
.chart-color-1 {
    color: #06d6a0; /* 量子青 */
}

.chart-color-2 {
    color: #3b82f6; /* 蓝色 */
}

.chart-color-3 {
    color: #f59e0b; /* 橙色 */
}

.chart-color-4 {
    color: #8b5cf6; /* 紫色 */
}

.chart-color-5 {
    color: #ef4444; /* 红色 */
}

.chart-color-6 {
    color: #10b981; /* 绿色 */
}

/* ==================== 占位页面 ==================== */
.placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: var(--spacing-lg);
}

.placeholder-icon {
    font-size: 120px;
    color: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: var(--spacing-md);
    stroke-width: 1;
}

.placeholder-text {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* ==================== 数据表格 ==================== */
.data-table {
    background: var(--color-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
    box-shadow: var(--shadow-light);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.table-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

table th {
    background: #f1f5f9;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

table tbody tr:nth-child(even) {
    background: var(--color-bg);
}

table tbody tr:nth-child(odd) {
    background: var(--color-card);
}

table td {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
}

table tbody tr:hover {
    background: #f1f5f9;
}

/* ==================== 弹窗/模态框样式 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-container {
    background: var(--color-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    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;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: var(--spacing-md);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-xs);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-light);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== 提示弹窗 ==================== */
.alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* 全屏模式下确保弹窗置顶 */
:fullscreen .alert-modal,
:-webkit-full-screen .alert-modal,
:-moz-full-screen .alert-modal,
:-ms-fullscreen .alert-modal {
    z-index: 2147483647 !important;
    position: fixed !important;
}

.fullscreen-container:fullscreen .alert-modal,
.fullscreen-container:-webkit-full-screen .alert-modal,
.fullscreen-container:-moz-full-screen .alert-modal,
.fullscreen-container:-ms-fullscreen .alert-modal {
    z-index: 2147483647 !important;
    position: fixed !important;
}

/* 全屏容器内的弹窗 */
.fullscreen-container .alert-modal {
    z-index: 2147483647 !important;
    position: fixed !important;
}

.alert-modal.active {
    display: flex;
}

.alert-modal-container {
    background: var(--color-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.alert-modal-icon {
    font-size: 56px;
    text-align: center;
    margin-bottom: var(--spacing-md);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    border-radius: 50%;
    background: rgba(30, 64, 175, 0.1);
}

.alert-modal-icon.info {
    color: var(--color-secondary);
    background: rgba(30, 64, 175, 0.1);
}

.alert-modal-icon.warning {
    color: var(--color-warning);
    background: rgba(245, 158, 11, 0.1);
}

.alert-modal-icon.error {
    color: var(--color-danger);
    background: rgba(220, 38, 38, 0.1);
}

.alert-modal-icon.success {
    color: var(--color-success);
    background: rgba(6, 214, 160, 0.1);
}

.alert-modal-message {
    text-align: center;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    word-wrap: break-word;
    padding: 0 var(--spacing-sm);
}

.alert-modal-footer {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* 确认对话框样式 */
.confirm-modal-container {
    background: var(--color-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.confirm-modal-icon {
    font-size: 56px;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--color-warning);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
}

.confirm-modal-message {
    text-align: center;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    word-wrap: break-word;
    padding: 0 var(--spacing-sm);
}

.confirm-modal-footer {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* ==================== 排行榜 ==================== */
.ranking-list {
    background: var(--color-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-light);
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
    font-size: 14px;
}

.ranking-number.top1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    font-size: 0;
    position: relative;
    overflow: visible;
}

.ranking-number.top1::before {
    content: '🥇';
    font-size: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.ranking-number.top2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
    font-size: 0;
    position: relative;
    overflow: visible;
}

.ranking-number.top2::before {
    content: '🥈';
    font-size: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.ranking-number.top3 {
    background: linear-gradient(135deg, #cd7f32, #e6a85c);
    color: #fff;
    font-size: 0;
    position: relative;
    overflow: visible;
}

.ranking-number.top3::before {
    content: '🥉';
    font-size: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.ranking-number.other {
    background: var(--border-color);
    color: var(--text-secondary);
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.ranking-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.ranking-score {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-secondary);
}

/* ==================== 进度条 ==================== */
.progress-section {
    background: var(--color-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-light);
}

.progress-item {
    margin-bottom: 20px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar-container {
    height: 10px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-accent);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
}

/* ==================== 双列布局 ==================== */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0; /* 防止溢出 */
}

/* 确保grid子元素不会溢出 */
.two-column-grid > * {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1200px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 迷你图表卡片 ==================== */
.mini-chart-card {
    background: var(--color-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.mini-chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mini-chart-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.mini-chart-body {
    height: 150px;
}

/* ==================== 实时数据标签 ==================== */
.live-badge {
    display: inline-block;
    padding: var(--spacing-xs) calc(var(--spacing-xs) * 1.5);
    background: rgba(6, 214, 160, 0.2);
    color: var(--color-accent);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 400;
    margin-left: var(--spacing-xs);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 科技感动效 ==================== */
/* 页面切换淡入淡出 */
.page-transition {
    animation: fadeIn 0.3s ease;
}

/* 量子加载动画 */
.quantum-loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 分割线 */
.divider {
    height: 1px;
    background: var(--border-light);
    border: none;
    margin: var(--spacing-md) 0;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

