/* 后台管理主样式文件 */

:root {
    /* 颜色变量 */
    --primary-color: #4361ee;
    --primary-light: #eef2ff;
    --primary-dark: #3730a3;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    
    /* 中性色 */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* 间距 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* 字体 */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-700);
    background-color: var(--gray-50);
}

/* 布局容器 */
.admin-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* 侧边栏宽度变量（桌面端统一使用此值） */
:root {
    --sidebar-width: 180px;
    --sidebar-gap: 0px; /* 移除了额外间距 */
}

/* 侧边栏样式 - 桌面端fixed定位 */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 5; /* 降低z-index确保不遮挡内容区 */
    transition: transform var(--transition-normal), width var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sidebarLogoArea {
    display: flex;
    align-items: center;
    gap: 8px;
}

#sidebarLogo {
    height: 40px;
    max-width: 140px;
    object-fit: contain;
}

#sidebarLogoPlaceholder {
    display: flex;
    align-items: center;
    gap: 8px;
}

#sidebarLogoPlaceholder i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

#sidebarTitle {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.sidebar-header h1 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.sidebar-header h1 i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xs);
    transition: all var(--transition-fast);
    font-weight: 500;
    position: relative;
}

.nav-item i {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.nav-item.active i {
    color: var(--primary-color);
}

/* 主内容区 - 使用CSS变量确保与sidebar宽度一致，并保持间距 */
.main-content {
    margin-left: var(--sidebar-width); /* 移除了额外间距，直接使用sidebar宽度 */
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10; /* 确保内容区在侧边栏上层 */
    transition: margin-left var(--transition-normal), width var(--transition-normal);
}

/* 页面内容区域 - 确保不被侧边栏遮挡 */
.main-content .page,
.main-content .page.active {
    padding-left: 20px;
    padding-right: 20px;
}

/* 顶部导航 */
.top-header {
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    min-width: 0;
    flex-shrink: 1;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    /* 移动端适配增强 */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 100;
    position: relative;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-menu-toggle.visible,
.mobile-menu-toggle.active,
.sidebar:not(.hide) + .main-content .mobile-menu-toggle {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.mobile-menu-toggle:active {
    background: var(--gray-200);
    transform: scale(0.95);
}

/* 移动端悬浮菜单按钮 (FAB) */
.fab-menu-btn {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(67, 97, 238, 0.4);
    cursor: pointer;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    /* 确保按钮可点击 */
    pointer-events: auto;
    touch-action: manipulation;
}

.fab-menu-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.5);
}

.fab-menu-btn:active {
    transform: scale(0.95);
}

.fab-menu-btn.active {
    background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%);
    transform: rotate(90deg);
}

/* 移动端侧栏遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 39;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-left: auto;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.username {
    font-weight: 500;
    color: var(--gray-700);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.logout-btn i {
    font-size: 1rem;
}

/* 内容包装器 */
.content-wrapper {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

/* 页面样式 */
.page {
    display: none;
    animation: fadeIn 300ms ease;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: nowrap;
}

.page-header-actions .search-box {
    max-width: 260px;
}

.page-header-actions .form-select {
    min-width: 120px;
}

.page-header-buttons {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.page-header .subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

/* 模态框样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.modal-overlay.show {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 101;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.modal.show {
    display: block;
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: var(--spacing-lg);
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

/* ============================================
 * 分页组件样式
 * ============================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
}

/* 分页信息 */
.pagination-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* 每页条数选择器 */
.page-size-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--gray-700);
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.page-size-select:hover {
    border-color: var(--primary-color);
}

.page-size-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* 分页控制按钮组 */
.pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* 分页按钮通用样式 */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-btn.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 分页省略号 */
.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--gray-400);
    user-select: none;
}

/* 分页页码容器 */
.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 分页导航容器 */
.pagination-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 分页当前页码 */
.pagination-current {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* 跳转到指定页 */
.pagination-jump {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-left: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.jump-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.jump-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

.jump-btn {
    height: 32px;
    padding: 0 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.jump-btn:hover {
    background: var(--primary-dark);
}

/* Toast通知 */
.toast {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-md) var(--spacing-lg);
    z-index: 102;
    animation: slideIn 300ms ease;
    min-width: 300px;
    border-left: 4px solid var(--success-color);
}

.toast.show {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式调整 - 移动端切换为fixed抽屉模式 */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        z-index: 40;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: var(--spacing-md);
    }
    
    .page-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .page-header h2 {
        font-size: 1.25rem;
    }
    
    .modal {
        width: calc(100% - 32px);
        margin: 0 16px;
    }
}

@media (max-width: 640px) {
    .top-header {
        padding: 0 var(--spacing-md);
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-end;
        gap: var(--spacing-xs);
    }
    
    .username {
        font-size: 0.75rem;
    }
    
    .logout-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.75rem;
    }
    
    .toast {
        bottom: 20px;
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}
/* 陌生人标识样式 */
.stranger-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 10px;
    background-color: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    cursor: help;
    vertical-align: middle;
}

.stranger-badge:hover {
    background-color: var(--warning-color);
    color: white;
}

.stranger-badge.clickable {
    cursor: pointer;
}

.stranger-badge.clickable:hover {
    transform: scale(1.05);
}

/* 消息详情中的发送人样式 */
.detail-item .detail-value {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* ========== Toast消息提示（2026-04-04补充）========== */

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.68,-0.55,0.265,1.55);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast i {
    font-size: 1.2rem;
    line-height: 1;
}

.toast span {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ============================================
 * 标签页样式
 * ============================================ */
.tabs-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
}
.tab-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.tab-btn:hover {
    background: #e2e8f0;
    color: #334155;
}
.tab-btn.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* ============================================
 * 批量操作区域样式
 * ============================================ */
.batch-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #ffc107;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.batch-actions .batch-info {
    font-size: 0.9rem;
    color: #856404;
    margin-right: auto;
}

.batch-actions .batch-info strong {
    color: #d32f2f;
    font-size: 1.1rem;
}

.pagination-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.pagination-info strong {
    color: var(--gray-800);
}

.msgtype-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--info-color);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 6px;
}

/* ============================================
 * 筛选栏美化 (2026-04-04)
 * ============================================ */

.filter-bar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    box-shadow: var(--shadow-sm), inset 0 1px 2px rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

/* 装饰性左侧条纹 */
.filter-bar::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--success-color) 100%);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

/* 筛选控件组 */
.filter-bar .form-select,
.filter-bar .form-input.date-input {
    background: white;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 9px 13px;
    font-size: 0.85rem;
    color: var(--gray-700);
    transition: all 0.25s ease;
    height: 38px;
    line-height: 1.4;
}

.filter-bar .search-box input {
    background: white;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 9px 13px 9px 36px;
    font-size: 0.85rem;
    color: var(--gray-700);
    transition: all 0.25s ease;
    height: 38px;
    line-height: 1.4;
}

.filter-bar .form-select:focus,
.filter-bar .date-input:focus,
.filter-bar .search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.08), 0 1px 3px rgba(0,0,0,0.05);
    background: white;
}

/* 下拉选择框箭头美化 */
.filter-bar .form-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 32px !important;
    cursor: pointer;
    min-width: 130px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6l1.5-1.5L8 8l3.5-3.5L13 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

/* 搜索框 */
.filter-bar .search-box {
    flex: 1;
    min-width: 200px;
    max-width: 340px;
    margin-left: auto;
    position: relative;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.filter-bar .search-box input {
    flex: 1;
    border-radius: var(--radius-md) !important;
    min-width: 120px;
    padding-left: 36px !important;
}

.filter-bar .search-box::before {
    content: '\EA58';
    font-family: 'RemixIcon', sans-serif;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
}

/* 搜索框按钮 - 统一圆角风格 */
.filter-bar .search-box .btn {
    border-radius: var(--radius-md) !important;
    margin-left: 0;
    height: 38px;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.filter-bar .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 1px 4px rgba(67,97,238,0.25);
}

.filter-bar .btn-primary i { font-size: 15px; }

.filter-bar .btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
    box-shadow: 0 1px 4px rgba(16,185,129,0.25);
}

.filter-bar .btn-success:hover { background: #059669; border-color: #059669; }

.filter-bar .btn-outline {
    background: white;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-600);
    height: 38px;
}

.filter-bar .btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }
    border-bottom-left-radius: 0;
    margin-left: 0;
    height: 38px;
    padding: 0 14px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.filter-bar .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 1px 4px rgba(67,97,238,0.25);
}

.filter-bar .btn-primary i {
    font-size: 15px;
}

.filter-bar .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(67,97,238,0.35);
}

.filter-bar .btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
    box-shadow: 0 1px 4px rgba(16,185,129,0.25);
    border-radius: var(--radius-md) !important;
}

.filter-bar .btn-primary {
    border-radius: var(--radius-md) !important;
}

.filter-bar .btn-success:hover {
    background: #059669;
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(5,150,105,0.35);
}

.filter-bar .btn-outline {
    background: white;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-600);
    font-size: 0.85rem;
    height: 38px;
    line-height: 1;
}

.filter-bar .btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-800);
}

/* 操作按钮样式 - 2026-04-04补充 */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--radius-md) !important;
    border: 1.5px solid var(--gray-300) !important;
    background: white !important;
    color: var(--gray-500) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover { transform: translateY(-2px); box-shadow: 0 3px 10px rgba(0,0,0,0.12); }

.action-btn-view:hover { border-color: #3b82f6 !important; color: #2563eb !important; background: #eff6ff !important; }
.action-btn-process:hover, .action-btn-process { color: #059669 !important; }
.action-btn-process:hover { background: #d1fae5 !important; border-color: #059669 !important; }
.action-btn-cancel:hover, .action-btn-cancel { color: #dc2626 !important; }
.action-btn-cancel:hover { background: #fee2e2 !important; border-color: #dc2626 !important; }

.action-btn-detail:hover, .action-btn-detail { color: #7c3aed !important; }
.action-btn-detail:hover { background: #ede9fe !important; border-color: #7c3aed !important; }

.filter-bar .btn:active {
    transform: scale(0.98);
}

/* 日期输入框 */
.filter-bar .form-input.date-input {
    min-width: 145px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 1h7a3.5 3.5 0 0 1 0 7H4.5A3.5 3.5 0 0 1 1 4.5v7A3.5 3.5 0 0 1 4.5 15h7a3.5 3.5 0 0 1 0-7zM3 4.5A1.5 1.5 0 0 1 4.5 3h7a1.5 1.5 0 0 1 0 3h-7A1.5 1.5 0 0 1 3 4.5zm2-.5h6v2H5V4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 34px !important;
}

/* 响应式适配 */
@media (max-width: 900px) {
    .filter-bar {
        padding: 14px 16px;
        gap: 8px 12px;
    }
    
    .filter-bar .search-box {
        min-width: 180px;
        max-width: none;
        width: 100%;
        order: 99;
        margin-top: 8px;
        margin-left: 0;
    }
    
    .filter-bar .form-select,
    .filter-bar .date-input {
        min-width: 110px;
        flex: 1 1 calc(33% - 8px);
    }
}

/* ===== 群组搜索下拉选择框 ===== */
.group-select-wrapper { position: relative; }
.group-select-wrapper .form-input:focus + .group-select-dropdown,
.group-select-dropdown.show { display: block !important; }
.group-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    max-height: 220px;
    overflow-y: auto;
}
.group-select-list { list-style: none; margin: 0; padding: 4px 0; }
.group-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.15s ease;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.group-item:hover {
    background: #EEF2FF;
    color: #4F46E5;
}
.group-item.active {
    background: #4F46E5;
    color: #fff;
}
.group-item .group-icon { opacity: 0.6; flex-shrink: 0; }
.group-item .group-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-item .group-id { font-size: 11px; color: inherit; opacity: 0.6; flex-shrink: 0; }
.group-search-no-result {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}
