﻿/* ========================================
   军监系统 - 现代化 UI 样式
   ======================================== */

/* 全局变量 */
:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --primary-active: #096dd9;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #ff4d4f;
    --info-color: #1890ff;
    
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-tertiary: #8c8c8c;
    --text-disabled: #bfbfbf;
    
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fafafa;
    
    --border-color: #e8e8e8;
    --border-light: #f0f0f0;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    --shadow-md: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    --header-height: 56px;
    --chat-panel-width: 380px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 消息时间分隔线 */
.message-time-divider {
    text-align: center;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* 撤回的消息 */
.message.revoked .message-bubble,
.revoked-bubble {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: italic;
}

.revoked-text {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* 引用回复 */
.reply-quote {
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 12px;
}

.reply-sender {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.reply-content {
    color: rgba(255, 255, 255, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 回复预览 */
.reply-preview {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    align-items: center;
    justify-content: space-between;
}

.reply-preview-content {
    flex: 1;
    overflow: hidden;
}

.reply-preview-sender {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    display: block;
}

.reply-preview-content .reply-preview-content {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reply-preview-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
}

.reply-preview-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* 右键菜单 */
.context-menu {
    position: fixed;
    background: #2c3e2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px 0;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
}

.context-menu-item {
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-item.danger {
    color: #ff6b6b;
}

.context-menu-item.danger:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* 表情面板 */
.emoji-panel {
    position: fixed;
    background: #2c3e2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    width: 320px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: none;
}

.emoji-item {
    display: inline-block;
    font-size: 24px;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 文件消息样式 */
.file-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.file-message i {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-top: 2px;
}

/* 消息状态 */
.message-status {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    margin-left: 4px;
}

/* 打字提示 */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* 未读消息红点 */
.unread-badge {
    background: #ff4d4f;
    color: white;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-weight: 500;
}

/* 聊天列表项优化 */
.chat-item {
    position: relative;
}

.chat-item .unread-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
}

/* 搜索高亮 */
.search-highlight {
    background: rgba(255, 215, 0, 0.4);
    color: inherit;
    padding: 1px 2px;
    border-radius: 2px;
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 16px;
}

.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.skeleton-content {
    flex: 1;
}

.skeleton-line {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

.skeleton-line.long {
    width: 100%;
}

/* 会话列表骨架 */
.skeleton-chat-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
}

.skeleton-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-chat-content {
    flex: 1;
    min-width: 0;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5715;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   登录页面 - 居中布局 + 军绿色背景
   ======================================== */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #4a5d3a; /* 军绿色背景 */
}

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

.login-card {
    width: 420px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 48px 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.star-icon {
    font-size: 96px;
    color: #d32f2f; /* 红色五角星 */
    line-height: 1;
    font-weight: bold;
    text-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 18px;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 52px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    background: white;
    border-color: #4a5d3a;
    box-shadow: 0 0 0 3px rgba(74, 93, 58, 0.1);
}

.btn-login {
    width: 100%;
    height: 48px;
    background: #4a5d3a;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-login:hover {
    background: #3d4d2f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 93, 58, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.login-footer p {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 响应式 */
@media (max-width: 480px) {
    .login-card {
        width: 90%;
        max-width: 360px;
        padding: 36px 28px;
    }
    
    .star-icon {
        font-size: 48px;
    }
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-tertiary);
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-form label i {
    font-size: 16px;
    color: var(--text-tertiary);
}

.login-form input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.btn-login {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.login-footer p {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ========================================
   主应用布局
   ======================================== */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航 */
.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.menu-toggle i {
    font-size: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.brand i {
    font-size: 24px;
}

.brand-star {
    color: #d32f2f !important;
    -webkit-text-fill-color: #d32f2f !important;
    background: none !important;
}

.header-center {
    flex: 1;
    max-width: 480px;
    margin: 0 40px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    height: 36px;
    padding: 0 16px 0 40px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 18px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
    transition: var(--transition);
}

.header-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.header-btn i {
    font-size: 20px;
}

.header-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--error-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-tertiary);
    border-radius: 24px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--border-light);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.2;
}

.dropdown-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.dropdown-btn i {
    font-size: 16px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 1001;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.dropdown-item.danger:hover {
    background: #fff1f0;
    color: var(--error-color);
}

.dropdown-item i {
    font-size: 16px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 6px 0;
}

/* ========================================
   主体布局
   ======================================== */
.main-layout {
    display: flex !important;
    flex-direction: row !important;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    width: 100%;
}

/* 侧边栏 - 固定不可移动 */
.sidebar {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    background: #ffffff !important;
    border-right: 2px solid #e8e8e8 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    height: calc(100vh - 56px) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-group {
    margin-bottom: 8px;
}

.nav-title {
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar.collapsed .nav-title {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(24, 144, 255, 0.1) 0%, transparent 100%);
    color: var(--primary-color);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--primary-color);
    border-radius: 0 3px 3px 0;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

/* 内容区 */
.content-area {
    flex: 1 !important;
    margin-left: 0 !important;
    padding: 24px;
    min-width: 0;
}


.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-title p {
    font-size: 14px;
    color: var(--text-tertiary);
}

.page-actions {
    display: flex;
    gap: 12px;
}

.page-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   卡片样式
   ======================================== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-action {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.card-action:hover {
    color: var(--primary-hover);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    color: #1890ff;
}

.stat-icon.green {
    background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
    color: #52c41a;
}

.stat-icon.orange {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
    color: #fa8c16;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #f9f0ff 0%, #efdbff 100%);
    color: #722ed1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 8px;
}

.stat-trend.up {
    color: var(--success-color);
}

.stat-trend.down {
    color: var(--error-color);
}

/* ========================================
   表格样式
   ======================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-tertiary);
}

th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--bg-tertiary);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #73d13d;
    border-color: #73d13d;
    color: white;
}

.btn-danger {
    background: var(--error-color);
    border-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #ff7875;
    border-color: #ff7875;
    color: white;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
}

/* ========================================
   表单样式
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ========================================
   标签样式
   ======================================== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
}

.tag-blue {
    background: #e6f7ff;
    color: #1890ff;
}

.tag-green {
    background: #f6ffed;
    color: #52c41a;
}

.tag-orange {
    background: #fff7e6;
    color: #fa8c16;
}

.tag-red {
    background: #fff1f0;
    color: #ff4d4f;
}

.tag-purple {
    background: #f9f0ff;
    color: #722ed1;
}

.tag-gray {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

/* ========================================
   模态框样式
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 20px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

/* ========================================
   军监通讯面板
   ======================================== */
.chat-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: var(--chat-panel-width);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 999;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-light);
    height: 56px;
}

.chat-tabs {
    display: flex;
    gap: 4px;
}

.chat-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.chat-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.chat-tab.active {
    background: var(--primary-color);
    color: white;
}

.chat-tab i {
    font-size: 16px;
}

.chat-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 20px;
    transition: var(--transition);
}

.chat-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chat-panel-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 聊天列表 */
.chat-list-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.chat-search {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.chat-search {
    position: relative;
}

.chat-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 16px;
}

.chat-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 18px;
    font-size: 14px;
    transition: var(--transition);
}

.chat-search input:focus {
    outline: none;
    background: white;
    border-color: var(--primary-color);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.chat-item:hover {
    background: var(--bg-tertiary);
}

.chat-item.active {
    background: #e6f7ff;
}

.chat-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 500;
    flex-shrink: 0;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.chat-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-time {
    font-size: 12px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.chat-item-message {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-chat-btn {
    margin: 16px;
    padding: 12px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.new-chat-btn:hover {
    background: var(--primary-hover);
}

/* 聊天窗口 */
.chat-window {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.chat-window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.back-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--bg-tertiary);
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.chat-user-detail {
    display: flex;
    flex-direction: column;
}

.chat-user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.chat-user-status {
    font-size: 12px;
    color: var(--success-color);
}

.chat-actions {
    display: flex;
    gap: 4px;
}

.action-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.message.sent .message-avatar {
    background: var(--primary-color);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message.sent .message-content {
    align-items: flex-end;
}

.message-sender {
    font-size: 12px;
    color: var(--text-tertiary);
}

.message-bubble {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: 16px 16px 16px 4px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-word;
}

.message.sent .message-bubble {
    background: var(--primary-color);
    color: white;
    border-radius: 16px 16px 4px 16px;
}

/* @提及高亮 */
.mention {
    color: #4dabf7;
    font-weight: 500;
    cursor: pointer;
}

.mention:hover {
    text-decoration: underline;
}

.message.sent .mention {
    color: #a5d8ff;
}

/* 被@的消息 */
.message.mentioned .message-bubble {
    border-left: 3px solid #ffd43b;
}

.message-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

.chat-input-area {
    border-top: 1px solid var(--border-light);
    padding: 12px 16px;
}

.chat-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.tool-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: var(--transition);
}

.tool-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 18px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: var(--transition);
    color: #333 !important;
}

.chat-input:focus {
    outline: none;
    background: white;
    border-color: var(--primary-color);
    color: #333 !important;
}

.send-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.send-btn i {
    font-size: 18px;
}

/* 联系人列表 */
.contacts-container {
    width: 100%;
    overflow-y: auto;
}

.contact-group {
    padding: 8px 16px;
}

.contact-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--bg-tertiary);
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-dept {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ========================================
   视频通话
   ======================================== */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    color: white;
}

.video-call-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.video-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.video-user-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-user-name {
    font-size: 18px;
    font-weight: 500;
}

.video-call-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.video-timer {
    font-size: 24px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

.video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.video-main {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.video-pip {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 180px;
    aspect-ratio: 16/9;
    background: #333;
    border-radius: var(--radius-md);
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.video-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px;
}

.video-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.video-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.video-btn.hangup {
    background: var(--error-color);
}

.video-btn.hangup:hover {
    background: #ff7875;
}

.video-btn.muted {
    background: var(--error-color);
}

/* ========================================
   工具栏
   ======================================== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
}

/* ========================================
   通知提示
   ======================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    min-width: 280px;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info {
    border-left: 4px solid var(--info-color);
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--error-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--info-color);
}

.toast-content {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
}

/* ========================================
   空状态
   ======================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    color: var(--text-disabled);
}

.empty-icon i {
    font-size: 80px;
}

.empty-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-description {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

/* ========================================
   加载状态
   ======================================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .header-center {
        display: none;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: none;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 0;
    }
    
    .chat-panel {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
    }
}

/* ========================================
   滚动条样式
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========================================
   工具类
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ========================================
   军监通讯页面（微信风格）
   ======================================== */
.chat-page {
    position: fixed;
    top: var(--header-height);
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    display: flex;
    background: #4a5d3a;
    z-index: 100;
}

.sidebar-collapsed .chat-page {
    left: var(--sidebar-collapsed-width);
}

.chat-page-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.chat-page-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.chat-page-header .chat-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.chat-page-header .chat-user-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.chat-page-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
}

.chat-page-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.chat-page-tab:hover {
    color: var(--primary-color);
}

.chat-page-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.chat-page-search {
    padding: 12px;
    position: relative;
}

.chat-page-search i {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 16px;
}

.chat-page-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 18px;
    font-size: 14px;
    color: var(--text-primary);
}

.chat-page-search input:focus {
    outline: none;
    background: var(--bg-primary);
}

.chat-page-list {
    flex: 1;
    overflow-y: auto;
}

/* 会话列表滚动条样式 */
.chat-page-list::-webkit-scrollbar {
    width: 8px;
}

.chat-page-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.chat-page-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chat-page-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.chat-page-list .chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}

.chat-page-list .chat-item:hover {
    background: var(--bg-tertiary);
}

.chat-page-list .chat-item.active {
    background: var(--bg-primary);
}

.chat-page-list .chat-item .chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.chat-page-list .chat-item .chat-info {
    flex: 1;
    min-width: 0;
}

.chat-page-list .chat-item .chat-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-page-list .chat-item .chat-preview {
    font-size: 12px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-page-list .chat-item .chat-time {
    font-size: 11px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.new-chat-btn {
    margin: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.new-chat-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 聊天主区域 */
.chat-page-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #4a5d3a;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    overflow: hidden;
}

.chat-page-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}

.chat-page-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
    color: rgba(255, 255, 255, 0.6);
}

.chat-page-empty p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.chat-page-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #4a5d3a;
    overflow: hidden;
    min-height: 0;
    height: 100%;
    max-height: 100%;
}

.chat-page-window .chat-window-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-page-window .chat-window-header .chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-page-window .chat-window-header .chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.chat-page-window .chat-window-header .chat-user-detail {
    display: flex;
    flex-direction: column;
}

.chat-page-window .chat-window-header .chat-user-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.chat-page-window .chat-window-header .chat-user-status {
    font-size: 12px;
    color: var(--success-color);
}

.chat-page-window .chat-window-header .chat-actions {
    display: flex;
    gap: 8px;
}

.chat-page-window .chat-window-header .action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.chat-page-window .chat-window-header .action-btn:hover {
    background: var(--primary-color);
    color: white;
}

.chat-page-window .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #4a5d3a;
    min-height: 0;
    height: 0;
}

/* 自定义滚动条样式 */
.chat-page-window .chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-page-window .chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.chat-page-window .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.chat-page-window .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.chat-page-window .chat-input-area {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #3d4d2f;
    flex-shrink: 0;
    padding: 8px 0;
}

.chat-page-window .chat-toolbar {
    display: flex;
    gap: 8px;
    padding: 6px 16px;
    margin-bottom: 0;
}

.chat-page-window .chat-toolbar .tool-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.chat-page-window .chat-toolbar .tool-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.chat-page-window .chat-input-wrapper {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
}

.chat-page-window .chat-input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    resize: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.chat-page-window .chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-page-window .chat-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.chat-page-window .send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1677ff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.chat-page-window .send-btn:hover {
    transform: scale(1.05);
}

/* 导航徽章 */
.nav-badge {
    margin-left: auto;
    background: var(--error-color);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.nav-chat {
    position: relative;
}

/* 新建聊天标签页 */
.new-chat-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.new-chat-tab {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.new-chat-tab:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.new-chat-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 群聊表单 */
.group-form {
    padding: 8px 0;
}

.group-form .form-group {
    margin-bottom: 16px;
}

.group-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.group-name-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.group-name-input:focus {
    outline: none;
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.group-member-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

.group-member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}

.group-member-item:last-child {
    border-bottom: none;
}

.group-member-item:hover {
    background: var(--bg-secondary);
}

.group-member-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.group-member-item .contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

.group-member-item .contact-info {
    flex: 1;
}

.group-member-item .contact-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.group-member-item .contact-dept {
    font-size: 12px;
    color: var(--text-tertiary);
}

.btn-create-group {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-create-group:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ========== 新功能样式 ========== */

/* 消息编辑标记 */
.edited-tag {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-left: 4px;
    font-style: italic;
}

/* 置顶消息 */
.message.pinned {
    position: relative;
    border-left: 3px solid #faad14;
    padding-left: 12px;
}

.pinned-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #faad14;
    font-size: 14px;
}

.pinned-messages-container {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    max-height: 200px;
    overflow-y: auto;
}

.pinned-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff7e6;
    font-size: 13px;
    color: #d48806;
}

.pinned-list {
    padding: 8px 12px;
}

.pinned-item {
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.pinned-item:hover {
    background: var(--bg-tertiary);
}

.pinned-item:last-child {
    margin-bottom: 0;
}

.pinned-sender {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.pinned-content {
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 语音消息 */
.voice-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    cursor: pointer;
    min-width: 100px;
}

.voice-message i {
    font-size: 18px;
}

.voice-duration {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 录音界面 */
.recording-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.recording-overlay.show {
    display: flex;
}

.recording-panel {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: #ff4d4f;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.recording-time {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.recording-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* 收藏列表 */
.favorites-modal {
    max-width: 600px;
}

.favorite-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.favorite-item:hover {
    background: var(--bg-tertiary);
}

.favorite-content {
    flex: 1;
}

.favorite-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 12px;
}

.favorite-sender {
    color: var(--text-secondary);
    font-weight: 500;
}

.favorite-time {
    color: var(--text-tertiary);
}

.favorite-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.favorite-note {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: italic;
}

/* 转发对话框 */
.forward-modal {
    max-width: 500px;
}

.conversation-list {
    max-height: 400px;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.conversation-item:hover {
    background: var(--bg-tertiary);
}

.conv-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.conv-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
}

.conv-info {
    flex: 1;
}

.conv-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.conv-last-msg {
    font-size: 12px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 文件预览 */
.media-modal {
    max-width: 800px;
    max-height: 90vh;
}

.media-modal video,
.media-modal audio {
    width: 100%;
    max-height: 70vh;
}

.media-modal img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

/* 右键菜单增强 */
.context-menu-item i {
    font-size: 16px;
}

/* 消息高亮动画 */
.message.highlight {
    animation: highlight-flash 2s;
}

@keyframes highlight-flash {
    0%, 100% {
        background: transparent;
    }
    50% {
        background: rgba(255, 215, 0, 0.2);
    }
}

/* ==================== 工作台样式 ==================== */

/* 欢迎卡片 */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-text h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.welcome-text p {
    margin: 4px 0;
    opacity: 0.9;
}

.welcome-text .text-muted {
    opacity: 0.7;
    font-size: 14px;
}

.welcome-stats {
    display: flex;
    gap: 32px;
}

.welcome-stat-item {
    text-align: center;
}

.welcome-stat-item .stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-stat-item .stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 16px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: var(--bg-secondary, #f5f5f5);
    border-color: var(--primary-color, #4a5d3a);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 24px;
    color: var(--primary-color, #4a5d3a);
}

.quick-action-btn span {
    font-size: 13px;
    color: var(--text-primary, #333);
}

/* 最近列表 */
.recent-list {
    padding: 0 16px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item-content {
    flex: 1;
}

.recent-item-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.recent-item-meta {
    font-size: 12px;
    color: var(--text-secondary, #888);
}

.empty-state-mini {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary, #888);
    font-size: 14px;
}

/* 状态标签 */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved, .status-completed, .status-active {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* 卡片标题更多链接 */
.card-more {
    font-size: 14px;
    color: var(--primary-color, #4a5d3a);
    text-decoration: none;
}

.card-more:hover {
    text-decoration: underline;
}

/* 仪表盘网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* 统计卡片图标颜色 */
.stat-icon.blue { background: #e3f2fd; color: #1976d2; }
.stat-icon.green { background: #e8f5e9; color: #388e3c; }
.stat-icon.orange { background: #fff3e0; color: #f57c00; }
.stat-icon.red { background: #ffebee; color: #d32f2f; }
.stat-icon.purple { background: #f3e5f5; color: #7b1fa2; }
.stat-icon.cyan { background: #e0f7fa; color: #0097a7; }
.stat-icon.pink { background: #fce4ec; color: #c2185b; }
.stat-icon.indigo { background: #e8eaf6; color: #303f9f; }


/* ==================== 权限管理样式 ==================== */
.permission-page {
    padding: 20px;
}

.permission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.permission-header h2 {
    margin: 0;
    font-size: 22px;
}

.permission-actions {
    display: flex;
    gap: 12px;
}

.permission-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #1565c0;
    font-size: 14px;
}

.permission-dept {
    margin-bottom: 24px;
}

.dept-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color, #4a5d3a);
}

.permission-table-wrapper {
    overflow-x: auto;
}

.permission-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.permission-table th,
.permission-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.permission-table th {
    background: var(--primary-color, #4a5d3a);
    color: white;
    font-size: 13px;
}

.permission-table th i {
    font-size: 18px;
}

.permission-table td:first-child,
.permission-table td:nth-child(2) {
    text-align: left;
}

.perm-admin-row {
    background: #fff9c4;
}

.admin-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #ff9800;
    color: white;
    border-radius: 4px;
    font-size: 11px;
}

.permission-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permission-table input.changed {
    outline: 2px solid #2196f3;
    outline-offset: 2px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover {
    background: #1976d2;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #388e3c;
}


/* 人事管理优化版样式 */
.hr-page-v2 { padding: 20px; }
.hr-header-v2 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.hr-header-v2 h2 { margin: 0; font-size: 22px; color: #333; display: flex; align-items: center; gap: 10px; }
.hr-header-v2 h2 i { color: #4a7c59; font-size: 26px; }
.hr-actions { display: flex; gap: 10px; }
.hr-actions .btn { padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.btn-primary { background: #4a7c59; color: white; }
.btn-primary:hover { background: #3d6649; }
.btn-success { background: #28a745; color: white; }
.btn-success:hover { background: #218838; }

/* 统计卡片 */
.hr-stats { display: flex; gap: 16px; margin-bottom: 20px; }
.stat-card { flex: 1; background: white; border-radius: 10px; padding: 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.stat-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: white; }
.bg-blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.bg-green { background: linear-gradient(135deg, #11998e, #38ef7d); }
.bg-orange { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-num { font-size: 24px; font-weight: 600; color: #333; }
.stat-label { font-size: 13px; color: #888; }

/* 操作提示 */
.hr-tip-v2 { background: linear-gradient(135deg, #e8f5e9, #f1f8e9); border: 1px solid #a5d6a7; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.hr-tip-v2 i { color: #4caf50; font-size: 20px; }
.hr-tip-v2 span { flex: 1; color: #2e7d32; font-size: 14px; }
.hr-quick-actions { display: flex; gap: 8px; }
.btn-sm { padding: 6px 12px; border: 1px solid #4caf50; background: white; color: #4caf50; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-sm:hover { background: #4caf50; color: white; }

/* 部门分组 */
.hr-dept-v2 { margin-bottom: 24px; }
.dept-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #4a7c59; }
.dept-name { font-size: 16px; font-weight: 600; color: #4a7c59; }
.dept-count { font-size: 12px; color: #888; background: #f0f0f0; padding: 2px 8px; border-radius: 10px; }

/* 表格 */
.hr-table-wrapper-v2 { background: white; border-radius: 10px; overflow-x: auto; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.hr-table-v2 { width: 100%; border-collapse: collapse; font-size: 13px; }
.hr-table-v2 thead { background: linear-gradient(135deg, #4a7c59, #5a8c69); }
.hr-table-v2 th { padding: 12px 8px; text-align: center; color: white; font-weight: 500; white-space: nowrap; }
.hr-table-v2 th.col-name { text-align: left; padding-left: 16px; min-width: 140px; }
.hr-table-v2 th.col-pos { min-width: 80px; }
.hr-table-v2 th.col-phone { min-width: 110px; }
.hr-table-v2 th.col-perm { min-width: 36px; width: 36px; font-size: 12px; }
.hr-table-v2 th.col-action { min-width: 70px; }
.hr-table-v2 td { padding: 10px 8px; text-align: center; border-bottom: 1px solid #f0f0f0; }
.hr-table-v2 td.col-name { text-align: left; padding-left: 16px; }
.hr-table-v2 tbody tr:hover { background: #f8f9fa; }
.hr-table-v2 tbody tr.admin-row { background: #fff8e1; }
.hr-table-v2 tbody tr.admin-row:hover { background: #fff3cd; }
.hr-table-v2 tbody tr.changed { background: #e3f2fd !important; }

/* 用户单元格 */
.user-cell { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #667eea, #764ba2); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; }
.user-name { font-weight: 500; color: #333; }
.admin-tag { font-size: 10px; background: #ff9800; color: white; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }

/* 权限复选框 */
.perm-check { display: block; cursor: pointer; }
.perm-check input { display: none; }
.check-mark { display: block; width: 20px; height: 20px; border: 2px solid #ddd; border-radius: 4px; margin: 0 auto; transition: all 0.2s; }
.perm-check input:checked + .check-mark { background: #4a7c59; border-color: #4a7c59; }
.perm-check input:checked + .check-mark::after { content: '✓'; color: white; font-size: 14px; display: flex; align-items: center; justify-content: center; height: 100%; }

/* 操作按钮 */
.btn-icon { width: 28px; height: 28px; border: none; background: #f0f0f0; border-radius: 4px; cursor: pointer; color: #666; margin: 0 2px; }
.btn-icon:hover { background: #e0e0e0; color: #333; }
.btn-icon.danger:hover { background: #ffebee; color: #f44336; }

/* 模态框 */
.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: 9999; }
.modal-content { background: white; border-radius: 12px; width: 500px; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,0.2); position: relative; }
.modal-content.modal-large { width: 900px; max-width: 95vw; }
.modal-content .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #eee; flex-shrink: 0; }
.modal-content .modal-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.modal-content .modal-close { width: 32px; height: 32px; background: transparent; border: none; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; font-size: 24px; transition: all 0.2s; position: relative; z-index: 10; }
.modal-content .modal-close:hover { background: #f0f0f0; color: #333; }
.modal-content .modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-content .modal-footer { padding: 16px 24px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.modal-box { background: white; border-radius: 12px; width: 400px; max-height: 80vh; overflow-y: auto; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-head button { background: none; border: none; font-size: 24px; cursor: pointer; color: #999; }
.modal-body { padding: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.form-row input, .form-row select { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.form-row input:focus, .form-row select:focus { outline: none; border-color: #4a7c59; }
.modal-foot { padding: 16px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }
.btn-cancel { padding: 8px 16px; border: 1px solid #ddd; background: white; border-radius: 6px; cursor: pointer; }
.btn-ok { padding: 8px 16px; border: none; background: #4a7c59; color: white; border-radius: 6px; cursor: pointer; }
.btn-ok:hover { background: #3d6649; }

/* ========================================
   工作台图表样式
   ======================================== */

/* 页面标题区域 */
.dash-page-header {
    margin-bottom: 24px;
}

.dash-page-title {
    font-size: 24px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 8px 0;
}

.dash-page-subtitle {
    font-size: 14px;
    color: #8c8c8c;
    margin: 0;
}

/* 统计卡片网格 */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dash-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dash-stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dash-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.dash-stat-label {
    font-size: 14px;
    color: #8c8c8c;
}

.dash-stat-value {
    font-size: 32px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 8px;
}

.dash-stat-unit {
    font-size: 16px;
    color: #8c8c8c;
    margin-left: 4px;
}

.dash-stat-trend {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dash-stat-trend.up {
    color: #52c41a;
}

.dash-stat-trend.down {
    color: #ff4d4f;
}

/* 图表网格 */
.dash-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dash-chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dash-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dash-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin: 0;
}

.dash-chart-subtitle {
    font-size: 13px;
    color: #8c8c8c;
    margin: 4px 0 0 0;
}

/* 图表容器 - 关键：必须有明确高度 */
.dash-chart-body {
    position: relative;
    height: 280px;
    width: 100%;
}

.dash-chart-body canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 底部网格 */
.dash-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 待办事项 */
.dash-todo-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dash-todo-badge {
    background: #ff4d4f;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.dash-todo-list {
    margin-top: 16px;
}

.dash-todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dash-todo-item:last-child {
    border-bottom: none;
}

.dash-todo-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-todo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dash-todo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-todo-text {
    font-size: 14px;
    color: #262626;
}

.dash-todo-time {
    font-size: 12px;
    color: #8c8c8c;
}

.dash-todo-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .dash-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-stats-grid,
    .dash-charts-grid {
        grid-template-columns: 1fr;
    }
}









/* 右键菜单强制显示 */
#chatItemContextMenu {
    display: block !important;
}
