/* 管理后台样式 */

/* 全局变量 - 浅色模式 */
:root {
    --admin-sidebar-width: 260px;
    --admin-header-height: 70px;
    --admin-primary: #2d5a27;
    --admin-primary-light: #4a7c59;
    --admin-secondary: #8b4513;
    --admin-accent: #d4af37;
    --admin-bg: #f8f9fa;
    --admin-surface: #ffffff;
    --admin-border: #e9ecef;
    --admin-text: #2c3e50;
    --admin-text-light: #7f8c8d;
    --admin-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --admin-shadow-lg: 0 8px 24px rgba(0,0,0,0.15);

    /* 背景色变量 - 浅色模式 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f1f1;
    --bg-surface: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.8);
    --bg-overlay-light: rgba(0, 0, 0, 0.5);
    --bg-modal: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: rgba(45, 90, 39, 0.05);
    --bg-active: rgba(45, 90, 39, 0.1);
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #ffffff;
    
    /* 状态背景色 */
    --bg-success: #d4edda;
    --bg-error: #f8d7da;
    --bg-warning: #fff3cd;
    --bg-info: #d1ecf1;
    --bg-success-light: rgba(39, 174, 96, 0.1);
    --bg-error-light: rgba(231, 76, 60, 0.1);
    --bg-warning-light: rgba(243, 156, 18, 0.1);
    --bg-info-light: rgba(52, 152, 219, 0.1);

    /* 间距变量 */
    --admin-spacing-xs: 0.25rem;
    --admin-spacing-sm: 0.5rem;
    --admin-spacing-md: 1rem;
    --admin-spacing-lg: 1.5rem;
    --admin-spacing-xl: 2rem;

    /* 状态颜色 */
    --success: #27ae60;
    --error: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --danger: #e74c3c;
}

/* 黑暗模式变量 */
[data-theme="dark"] {
    --admin-primary: #4a7c59;
    --admin-primary-light: #6b9b7a;
    --admin-secondary: #a0522d;
    --admin-accent: #ffd700;
    --admin-bg: #1a1a1a;
    --admin-surface: #2d2d2d;
    --admin-border: #404040;
    --admin-text: #e8e8e8;
    --admin-text-light: #b0b0b0;
    --admin-shadow: 0 2px 4px rgba(0,0,0,0.3);
    --admin-shadow-lg: 0 8px 24px rgba(0,0,0,0.4);

    /* 背景色变量 - 暗色模式 */
    --bg-primary: #2d2d2d;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #404040;
    --bg-surface: #2d2d2d;
    --bg-overlay: rgba(0, 0, 0, 0.9);
    --bg-overlay-light: rgba(0, 0, 0, 0.7);
    --bg-modal: #2d2d2d;
    --bg-card: #2d2d2d;
    --bg-hover: rgba(74, 124, 89, 0.1);
    --bg-active: rgba(74, 124, 89, 0.2);
    --bg-gradient-start: #2d2d2d;
    --bg-gradient-end: rgba(45, 45, 45, 0.9);
    
    /* 状态背景色 - 暗色模式 */
    --bg-success: rgba(46, 204, 113, 0.2);
    --bg-error: rgba(231, 76, 60, 0.2);
    --bg-warning: rgba(243, 156, 18, 0.2);
    --bg-info: rgba(52, 152, 219, 0.2);
    --bg-success-light: rgba(46, 204, 113, 0.1);
    --bg-error-light: rgba(231, 76, 60, 0.1);
    --bg-warning-light: rgba(243, 156, 18, 0.1);
    --bg-info-light: rgba(52, 152, 219, 0.1);

    /* 状态颜色 - 黑暗模式调整 */
    --success: #2ecc71;
    --error: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --danger: #e74c3c;
}

/* 管理后台布局 */
.admin-body {
    margin: 0;
    padding: 0;
    background: var(--admin-bg);
    font-family: 'Noto Sans SC', sans-serif;
    display: flex;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 主题切换过渡动画 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 侧边栏 */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--admin-surface);
    border-right: 1px solid var(--admin-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 5;
    box-shadow: var(--admin-shadow);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header .logo i {
    font-size: 1.5rem;
    color: var(--admin-primary);
}

.sidebar-header .logo h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--admin-text);
}

/* 侧边栏导航 */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--admin-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--admin-primary);
}

.nav-link.active {
    background: var(--admin-primary);
    color: white;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--admin-border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--admin-bg);
    border-radius: 8px;
}

.user-info i {
    font-size: 1.5rem;
    color: var(--admin-primary);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: none;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--error);
    color: white;
    border-color: #e74c3c;
}

/* 主内容区域 */
.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航栏 */
.admin-header {
    height: var(--admin-header-height);
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--admin-shadow);
    position: sticky;
    top: 0;
    z-index: 6;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--admin-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
}

.sidebar-toggle:hover {
    background: var(--admin-bg);
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--admin-text);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.theme-toggle {
    position: relative;
    overflow: hidden;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.theme-toggle:hover::before {
    width: 100%;
    height: 100%;
}

.theme-toggle i {
    transition: all 0.3s ease;
    color: var(--admin-text);
}

.theme-toggle:hover {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: white;
}

.theme-toggle:hover i {
    color: white;
}

[data-theme="dark"] .theme-toggle i {
    transform: rotate(180deg);
}

/* 黑暗模式特殊样式 */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body {
    background: var(--admin-bg);
    color: var(--admin-text);
}

[data-theme="dark"] .admin-sidebar {
    background: var(--admin-surface);
    border-right-color: var(--admin-border);
}

[data-theme="dark"] .admin-header {
    background: var(--admin-surface);
    border-bottom-color: var(--admin-border);
}

[data-theme="dark"] .nav-link {
    color: var(--admin-text);
}

[data-theme="dark"] .nav-link:hover {
    background: rgba(74, 124, 89, 0.15);
    color: var(--admin-primary-light);
}

[data-theme="dark"] .nav-link.active {
    background: var(--admin-primary);
    color: white;
}

/* 仪表板组件暗色模式样式 */
[data-theme="dark"] .stat-card {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

[data-theme="dark"] .stat-card:hover {
    background: rgba(45, 45, 45, 0.9);
    border-color: var(--admin-primary);
    box-shadow: var(--admin-shadow-lg);
}

[data-theme="dark"] .stat-content h3 {
    color: var(--admin-text);
}

[data-theme="dark"] .stat-content p {
    color: var(--admin-text-light);
}

[data-theme="dark"] .stat-change {
    color: var(--admin-text-light);
}

[data-theme="dark"] .stat-change.positive {
    color: var(--success);
}

[data-theme="dark"] .stat-change.negative {
    color: var(--error);
}

/* 快速操作卡片暗色模式样式 */
[data-theme="dark"] .action-card {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

[data-theme="dark"] .action-card:hover {
    background: rgba(45, 45, 45, 0.9);
    border-color: var(--admin-primary);
    box-shadow: var(--admin-shadow-lg);
}

[data-theme="dark"] .action-card h3 {
    color: var(--admin-text);
}

[data-theme="dark"] .action-card p {
    color: var(--admin-text-light);
}

[data-theme="dark"] .action-card i {
    color: var(--admin-primary-light);
}

[data-theme="dark"] .action-card:hover i {
    color: var(--admin-accent);
}

/* 快速操作卡片光效在暗色模式下的调整 */
[data-theme="dark"] .action-card::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* 仪表板卡片暗色模式样式 */
[data-theme="dark"] .dashboard-card {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

[data-theme="dark"] .card-header h3 {
    color: var(--admin-text);
}

[data-theme="dark"] .card-content {
    color: var(--admin-text);
}

[data-theme="dark"] .view-all {
    color: var(--admin-primary-light);
}

[data-theme="dark"] .view-all:hover {
    color: var(--admin-accent);
}

/* 数据表格暗色模式样式 */
[data-theme="dark"] .data-table {
    background: var(--admin-surface);
    color: var(--admin-text);
}

[data-theme="dark"] .data-table th {
    background: rgba(45, 45, 45, 0.8);
    color: var(--admin-text);
    border-bottom-color: var(--admin-border);
}

[data-theme="dark"] .data-table td {
    border-bottom-color: var(--admin-border);
    color: var(--admin-text);
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: rgba(74, 124, 89, 0.1);
}

[data-theme="dark"] .loading-row,
[data-theme="dark"] .no-data {
    color: var(--admin-text-light);
}

[data-theme="dark"] .status-badge {
    color: white;
}

[data-theme="dark"] .table-container {
    background: var(--admin-surface);
}

/* 图表区域暗色模式样式 */
[data-theme="dark"] .charts-section {
    color: var(--admin-text);
}

[data-theme="dark"] .chart-card {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

[data-theme="dark"] .chart-card .card-header h3 {
    color: var(--admin-text);
}

[data-theme="dark"] .chart-controls select {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] .chart-controls select:focus {
    border-color: var(--admin-primary);
    outline: none;
}

[data-theme="dark"] .chart-container {
    background: var(--admin-surface);
}

/* Chart.js 画布在暗色模式下的样式调整 */
[data-theme="dark"] .chart-container canvas {
    background: var(--admin-surface) !important;
}

/* 模态框暗色模式样式 */
[data-theme="dark"] .modal-overlay {
    background: var(--bg-overlay);
}

[data-theme="dark"] .modal-content {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--admin-border);
}

[data-theme="dark"] .modal-header h3 {
    color: var(--admin-text);
}

[data-theme="dark"] .modal-close {
    background: transparent;
    color: var(--admin-text-light);
    border: none;
}

[data-theme="dark"] .modal-close:hover {
    color: var(--admin-text);
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-body {
    color: var(--admin-text);
}

/* 报表选择网格暗色模式样式 */
[data-theme="dark"] .reports-grid .report-option {
    background: rgba(45, 45, 45, 0.8);
    border-color: var(--admin-border);
}

[data-theme="dark"] .reports-grid .report-option:hover {
    background: var(--admin-surface);
    border-color: var(--admin-primary);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.2);
}

[data-theme="dark"] .report-option h4 {
    color: var(--admin-text);
}

[data-theme="dark"] .report-option p {
    color: var(--admin-text-light);
}

[data-theme="dark"] .report-option i {
    color: var(--admin-primary-light);
}

/* 按钮暗色模式样式 */
[data-theme="dark"] .btn-sm {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

[data-theme="dark"] .btn-sm:hover {
    background: var(--admin-primary-light);
    border-color: var(--admin-primary-light);
}

[data-theme="dark"] .btn-primary {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--admin-primary-light);
    border-color: var(--admin-primary-light);
}

/* 分页组件暗色模式样式 */
[data-theme="dark"] .pagination-btn {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

[data-theme="dark"] .pagination-btn:disabled {
    background: rgba(45, 45, 45, 0.5);
    color: var(--admin-text-light);
    border-color: var(--admin-border);
}

/* 快速操作标题暗色模式样式 */
[data-theme="dark"] .quick-actions h2 {
    color: var(--admin-text);
}

/* 链接暗色模式样式 */
[data-theme="dark"] a {
    color: var(--admin-primary-light);
}

[data-theme="dark"] a:hover {
    color: var(--admin-accent);
}

/* 表单元素暗色模式样式 */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.2);
    outline: none;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--admin-text-light);
}

[data-theme="dark"] label {
    color: var(--admin-text);
}

/* 表单组暗色模式样式 */
[data-theme="dark"] .form-group {
    color: var(--admin-text);
}

[data-theme="dark"] .form-row {
    color: var(--admin-text);
}

/* 筛选器和搜索框暗色模式样式 */
[data-theme="dark"] .filters-container {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

[data-theme="dark"] .search-box input {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] .search-box input:focus {
    border-color: var(--admin-primary);
}

[data-theme="dark"] .filters-grid select {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] .filters-actions .btn-secondary {
    background: rgba(45, 45, 45, 0.8);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] .filters-actions .btn-secondary:hover {
    background: var(--admin-surface);
    border-color: var(--admin-primary);
}

/* 用户和订单页面特定组件暗色模式样式 */
[data-theme="dark"] .users-table-container,
[data-theme="dark"] .orders-table-container {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

[data-theme="dark"] .user-info,
[data-theme="dark"] .order-info,
[data-theme="dark"] .customer-info {
    color: var(--admin-text);
}

[data-theme="dark"] .user-avatar {
    background: var(--admin-primary);
}

[data-theme="dark"] .order-number {
    color: var(--admin-primary-light);
}

[data-theme="dark"] .order-date,
[data-theme="dark"] .customer-contact {
    color: var(--admin-text-light);
}

[data-theme="dark"] .amount-total {
    color: var(--admin-text);
}

[data-theme="dark"] .amount-discount {
    color: var(--admin-text-light);
}

[data-theme="dark"] .order-item {
    background: rgba(45, 45, 45, 0.5);
    border-color: var(--admin-border);
}

/* 设置页面组件暗色模式样式 */
[data-theme="dark"] .settings-page {
    color: var(--admin-text);
}

[data-theme="dark"] .bank-info-card {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

[data-theme="dark"] .settings-grid-modern .form-group {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

[data-theme="dark"] .settings-footer {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

/* 按钮变体暗色模式样式 */
[data-theme="dark"] .btn-password {
    background: var(--warning);
    color: white;
}

[data-theme="dark"] .btn-password:hover {
    background: #e67e22;
}

[data-theme="dark"] .btn-toggle {
    background: #9b59b6;
    color: white;
}

[data-theme="dark"] .btn-toggle:hover {
    background: #8e44ad;
}

[data-theme="dark"] .btn-outline {
    background: transparent;
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--admin-surface);
    border-color: var(--admin-primary);
    color: var(--admin-primary-light);
}

/* 页面头部和内容区域暗色模式样式 */
[data-theme="dark"] .page-header {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

[data-theme="dark"] .page-header h2 {
    color: var(--admin-text);
}

[data-theme="dark"] .page-header p {
    color: var(--admin-text-light);
}

[data-theme="dark"] .header-left h2,
[data-theme="dark"] .header-left p {
    color: var(--admin-text);
}

[data-theme="dark"] .header-actions {
    color: var(--admin-text);
}

[data-theme="dark"] .content-header {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

/* 标签页和选项卡暗色模式样式 */
[data-theme="dark"] .tab-button {
    background: rgba(45, 45, 45, 0.5);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] .tab-button.active {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

[data-theme="dark"] .tab-button:hover {
    background: var(--admin-surface);
    color: var(--admin-primary-light);
}

[data-theme="dark"] .tab-content {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

/* 状态徽章暗色模式样式 */
[data-theme="dark"] .status-badge.pending {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    border-color: #f39c12;
}

[data-theme="dark"] .status-badge.confirmed {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border-color: #3498db;
}

[data-theme="dark"] .status-badge.shipped {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border-color: #9b59b6;
}

[data-theme="dark"] .status-badge.delivered {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border-color: #2ecc71;
}

[data-theme="dark"] .status-badge.cancelled {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border-color: #e74c3c;
}

/* 加载和空状态暗色模式样式 */
[data-theme="dark"] .loading-spinner {
    border-color: var(--admin-border);
    border-top-color: var(--admin-primary);
}

[data-theme="dark"] .empty-state {
    color: var(--admin-text-light);
}

[data-theme="dark"] .empty-state i {
    color: var(--admin-text-light);
}

/* 面包屑导航暗色模式样式 */
[data-theme="dark"] .breadcrumb {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

[data-theme="dark"] .breadcrumb a {
    color: var(--admin-primary-light);
}

[data-theme="dark"] .breadcrumb a:hover {
    color: var(--admin-accent);
}

[data-theme="dark"] .breadcrumb li:not(:last-child)::after {
    color: var(--admin-text-light);
}

/* 用户下拉菜单暗色模式样式 */
[data-theme="dark"] .user-dropdown {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-lg);
}

[data-theme="dark"] .user-dropdown a {
    color: var(--admin-text);
}

[data-theme="dark"] .user-dropdown a:hover {
    background: rgba(74, 124, 89, 0.1);
    color: var(--admin-primary-light);
}

[data-theme="dark"] .user-dropdown hr {
    border-color: var(--admin-border);
}

/* 通知和提示框暗色模式样式 */
[data-theme="dark"] .notification {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

[data-theme="dark"] .notification.success {
    background: rgba(46, 204, 113, 0.1);
    border-color: #2ecc71;
    color: #2ecc71;
}

[data-theme="dark"] .notification.error {
    background: var(--bg-error-light);
    border-color: #e74c3c;
    color: #e74c3c;
}

[data-theme="dark"] .notification.warning {
    background: var(--bg-warning-light);
    border-color: #f39c12;
    color: #f39c12;
}

[data-theme="dark"] .notification.info {
    background: var(--bg-info-light);
    border-color: #3498db;
    color: #3498db;
}

/* 工具提示暗色模式样式 */
[data-theme="dark"] .tooltip {
    background: rgba(45, 45, 45, 0.95);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

/* 下拉选择框暗色模式样式 */
[data-theme="dark"] .dropdown-menu {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-lg);
}

[data-theme="dark"] .dropdown-item {
    color: var(--admin-text);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(74, 124, 89, 0.1);
    color: var(--admin-primary-light);
}

/* 复选框和单选框暗色模式样式 */
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] {
    accent-color: var(--admin-primary);
}

/* 滚动条暗色模式样式 */
[data-theme="dark"] ::-webkit-scrollbar {
    background: var(--admin-bg);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--admin-border);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--admin-primary);
}

/* 修复硬编码白色背景的组件 */
[data-theme="dark"] .modern-table-wrapper,
[data-theme="dark"] .products-table,
[data-theme="dark"] .product-card,
[data-theme="dark"] .product-list-card {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .products-table th {
    background: rgba(45, 45, 45, 0.8) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .products-table td {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
    border-bottom-color: var(--admin-border) !important;
}

[data-theme="dark"] .products-table tbody tr:hover {
    background: rgba(74, 124, 89, 0.1) !important;
}

/* 修复表格视图中的现代表格 */
[data-theme="dark"] .table-view .modern-table {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
}

[data-theme="dark"] .table-view .modern-table th {
    background: var(--admin-primary) !important;
    color: white !important;
}

[data-theme="dark"] .table-view .modern-table td {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
    border-bottom-color: var(--admin-border) !important;
}

/* 修复产品卡片和网格视图 */
[data-theme="dark"] .products-grid .product-card {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .product-card:hover {
    background: rgba(45, 45, 45, 0.9) !important;
    border-color: var(--admin-primary) !important;
}

/* 修复设置页面的卡片 */
[data-theme="dark"] .setting-card {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
}

[data-theme="dark"] .setting-card:hover {
    background: rgba(45, 45, 45, 0.9) !important;
    border-color: var(--admin-primary) !important;
}

/* 修复表单卡片 */
[data-theme="dark"] .form-card {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .card-header {
    background: var(--admin-surface) !important;
    border-bottom-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 修复工具栏和面板 */
[data-theme="dark"] .workspace-toolbar,
[data-theme="dark"] .filter-panel,
[data-theme="dark"] .list-toolbar {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 强制覆盖所有可能的白色背景元素 */
[data-theme="dark"] .content-card,
[data-theme="dark"] .data-card,
[data-theme="dark"] .info-card,
[data-theme="dark"] .stats-card,
[data-theme="dark"] .summary-card {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 修复所有表格相关元素 */
[data-theme="dark"] table,
[data-theme="dark"] .table,
[data-theme="dark"] .table-container,
[data-theme="dark"] .table-wrapper {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] table th,
[data-theme="dark"] .table th,
[data-theme="dark"] thead th {
    background: rgba(45, 45, 45, 0.8) !important;
    color: var(--admin-text) !important;
    border-color: var(--admin-border) !important;
}

[data-theme="dark"] table td,
[data-theme="dark"] .table td,
[data-theme="dark"] tbody td {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
    border-color: var(--admin-border) !important;
}

[data-theme="dark"] table tr:hover,
[data-theme="dark"] .table tr:hover,
[data-theme="dark"] tbody tr:hover {
    background: rgba(74, 124, 89, 0.1) !important;
}

/* 修复所有可能的容器元素 */
[data-theme="dark"] .container,
[data-theme="dark"] .main-container,
[data-theme="dark"] .content-container,
[data-theme="dark"] .page-container {
    background: var(--admin-bg) !important;
    color: var(--admin-text) !important;
}

/* 修复所有面板和区域 */
[data-theme="dark"] .panel,
[data-theme="dark"] .section,
[data-theme="dark"] .area,
[data-theme="dark"] .region {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 修复所有可能的白色背景类 */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .background-white,
[data-theme="dark"] .white-bg {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

/* 修复文本颜色 */
[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-black {
    color: var(--admin-text) !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
    color: var(--admin-text-light) !important;
}

/* 修复边框颜色 */
[data-theme="dark"] .border,
[data-theme="dark"] .border-light,
[data-theme="dark"] .border-gray {
    border-color: var(--admin-border) !important;
}

/* 最终强制覆盖 - 确保没有遗漏的白色背景 */
[data-theme="dark"] div[style*="background: white"],
[data-theme="dark"] div[style*="background-color: white"],
[data-theme="dark"] div[style*="background: #fff"],
[data-theme="dark"] div[style*="background-color: #fff"],
[data-theme="dark"] div[style*="background: #ffffff"],
[data-theme="dark"] div[style*="background-color: #ffffff"] {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

/* 修复可能的内联样式 */
[data-theme="dark"] *[style*="color: black"],
[data-theme="dark"] *[style*="color: #000"],
[data-theme="dark"] *[style*="color: #000000"] {
    color: var(--admin-text) !important;
}

/* 修复所有可能的列表和项目 */
[data-theme="dark"] .list-group,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .list-item,
[data-theme="dark"] .item {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .list-group-item:hover,
[data-theme="dark"] .list-item:hover,
[data-theme="dark"] .item:hover {
    background: rgba(74, 124, 89, 0.1) !important;
}

/* 修复所有可能的网格和布局 */
[data-theme="dark"] .grid,
[data-theme="dark"] .grid-item,
[data-theme="dark"] .flex-item,
[data-theme="dark"] .layout-item {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

/* 修复所有可能的输入组件 */
[data-theme="dark"] .input-group,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-input {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 修复所有可能的标签和徽章 */
[data-theme="dark"] .label,
[data-theme="dark"] .tag,
[data-theme="dark"] .badge {
    background: rgba(45, 45, 45, 0.8) !important;
    color: var(--admin-text) !important;
    border-color: var(--admin-border) !important;
}

/* 通用强制覆盖 - 最后的保险 */
[data-theme="dark"] * {
    scrollbar-color: var(--admin-border) var(--admin-bg);
}

/* 确保所有子元素继承正确的颜色 */
[data-theme="dark"] .admin-content *,
[data-theme="dark"] .dashboard *,
[data-theme="dark"] .users-page *,
[data-theme="dark"] .orders-page *,
[data-theme="dark"] .products-page *,
[data-theme="dark"] .settings-page * {
    border-color: var(--admin-border);
}

[data-theme="dark"] .admin-content h1,
[data-theme="dark"] .admin-content h2,
[data-theme="dark"] .admin-content h3,
[data-theme="dark"] .admin-content h4,
[data-theme="dark"] .admin-content h5,
[data-theme="dark"] .admin-content h6 {
    color: var(--admin-text) !important;
}

[data-theme="dark"] .admin-content p,
[data-theme="dark"] .admin-content span,
[data-theme="dark"] .admin-content div {
    color: var(--admin-text);
}

/* 修复模态框侧边栏组合组件 */
[data-theme="dark"] .modal-sidebar-combo {
    background: rgba(0, 0, 0, 0.8) !important;
}

[data-theme="dark"] .modal-sidebar-combo-content {
    background: var(--admin-bg) !important;
}

[data-theme="dark"] .modal-sidebar-combo-modal {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .modal-sidebar-combo-sidebar {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .modal-sidebar-combo-header {
    background: var(--admin-surface) !important;
    border-bottom-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .modal-sidebar-combo-body {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .modal-sidebar-combo-footer {
    background: var(--admin-surface) !important;
    border-top-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 修复浮动侧边栏组件 */
[data-theme="dark"] .floating-sidebar {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .floating-sidebar-header {
    background: var(--admin-surface) !important;
    border-bottom-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .floating-sidebar-content {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .floating-sidebar-footer {
    background: var(--admin-surface) !important;
    border-top-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 修复导航相关组件 */
[data-theme="dark"] .nav-item {
    color: var(--admin-text) !important;
}

[data-theme="dark"] .nav-item.active .nav-link {
    background: var(--admin-primary) !important;
    color: white !important;
}

[data-theme="dark"] .nav-item.active .nav-link::before {
    background: var(--admin-accent) !important;
}

/* 修复自定义复选框组件 */
[data-theme="dark"] .custom-checkbox {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
}

[data-theme="dark"] .custom-checkbox:checked {
    background: var(--admin-primary) !important;
    border-color: var(--admin-primary) !important;
}

/* 修复提示组件 */
[data-theme="dark"] .tips-widget {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 性能优化：合并相似的选择器 */
[data-theme="dark"] .export-preview-container,
[data-theme="dark"] .import-preview-container,
[data-theme="dark"] .template-selector,
[data-theme="dark"] .export-settings-container,
[data-theme="dark"] .filter-container,
[data-theme="dark"] .search-container {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

/* 优化表格相关样式 */
[data-theme="dark"] .preview-table,
[data-theme="dark"] .data-preview-table,
[data-theme="dark"] .export-table {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .preview-table th,
[data-theme="dark"] .data-preview-table th,
[data-theme="dark"] .export-table th {
    background: rgba(45, 45, 45, 0.8) !important;
    color: var(--admin-text) !important;
    border-color: var(--admin-border) !important;
}

[data-theme="dark"] .preview-table td,
[data-theme="dark"] .data-preview-table td,
[data-theme="dark"] .export-table td {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
    border-color: var(--admin-border) !important;
}

/* 优化按钮组样式 */
[data-theme="dark"] .btn-group .btn,
[data-theme="dark"] .button-group .btn,
[data-theme="dark"] .action-buttons .btn {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

[data-theme="dark"] .btn-group .btn:hover,
[data-theme="dark"] .button-group .btn:hover,
[data-theme="dark"] .action-buttons .btn:hover {
    background: var(--admin-primary) !important;
    color: white !important;
}

/* 最终兜底规则 - 确保所有遗漏的元素 */
[data-theme="dark"] *[class*="white"],
[data-theme="dark"] *[class*="light"],
[data-theme="dark"] *[style*="background: white"],
[data-theme="dark"] *[style*="background-color: white"],
[data-theme="dark"] *[style*="background: #fff"],
[data-theme="dark"] *[style*="background-color: #fff"] {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

/* 确保所有文本元素在暗色模式下可见 */
[data-theme="dark"] *[style*="color: black"],
[data-theme="dark"] *[style*="color: #000"],
[data-theme="dark"] *[style*="color: #000000"] {
    color: var(--admin-text) !important;
}

/* ========================================
   暗色模式样式优化完成标记
   ========================================

   本文件包含了完整的 admin 后台暗色模式样式覆盖：

   1. 核心组件：仪表板、统计卡片、快速操作卡片
   2. 数据展示：表格、列表、状态徽章
   3. 交互元素：按钮、表单、模态框
   4. 布局组件：侧边栏、导航、面包屑
   5. 特殊组件：图表、分页、通知
   6. 强制覆盖：硬编码样式、内联样式

   性能优化：
   - 合并了相似的选择器
   - 使用 CSS 变量提高一致性
   - 减少了重复的样式声明
   - 添加了兜底规则确保完整覆盖

   ======================================== */

/* 最终性能优化：减少重绘和回流 */
[data-theme="dark"] * {
    /* 优化渲染性能 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 确保过渡动画在暗色模式下正常工作 */
[data-theme="dark"] *,
[data-theme="dark"] *::before,
[data-theme="dark"] *::after {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* 最高优先级强制覆盖 - 解决样式冲突 */
html[data-theme="dark"] .modal-sidebar-combo .modal-sidebar-combo-modal,
html[data-theme="dark"] .modal-sidebar-combo .modal-sidebar-combo-sidebar,
html[data-theme="dark"] .import-excel-modal .modal-sidebar-combo-modal,
html[data-theme="dark"] .import-excel-modal .modal-sidebar-combo-sidebar,
html[data-theme="dark"] .export-preview-modal .modal-sidebar-combo-modal,
html[data-theme="dark"] .export-preview-modal .modal-sidebar-combo-sidebar {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .modal-sidebar-combo .modal-sidebar-combo-modal-header,
html[data-theme="dark"] .modal-sidebar-combo .modal-sidebar-combo-sidebar-header,
html[data-theme="dark"] .import-excel-modal .modal-sidebar-combo-modal-header,
html[data-theme="dark"] .import-excel-modal .modal-sidebar-combo-sidebar-header,
html[data-theme="dark"] .export-preview-modal .modal-sidebar-combo-modal-header,
html[data-theme="dark"] .export-preview-modal .modal-sidebar-combo-sidebar-header {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-bottom-color: var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .modal-sidebar-combo .modal-sidebar-combo-modal-body,
html[data-theme="dark"] .modal-sidebar-combo .modal-sidebar-combo-sidebar-body,
html[data-theme="dark"] .import-excel-modal .modal-sidebar-combo-modal-body,
html[data-theme="dark"] .import-excel-modal .modal-sidebar-combo-sidebar-body,
html[data-theme="dark"] .export-preview-modal .modal-sidebar-combo-modal-body,
html[data-theme="dark"] .export-preview-modal .modal-sidebar-combo-sidebar-body {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 强制覆盖所有可能的白色背景 */
html[data-theme="dark"] .modal-sidebar-combo *[style*="background: white"],
html[data-theme="dark"] .modal-sidebar-combo *[style*="background-color: white"],
html[data-theme="dark"] .modal-sidebar-combo *[style*="background: #fff"],
html[data-theme="dark"] .modal-sidebar-combo *[style*="background-color: #fff"],
html[data-theme="dark"] .import-excel-modal *[style*="background: white"],
html[data-theme="dark"] .import-excel-modal *[style*="background-color: white"],
html[data-theme="dark"] .export-preview-modal *[style*="background: white"],
html[data-theme="dark"] .export-preview-modal *[style*="background-color: white"] {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 强制覆盖所有可能的黑色文字 */
html[data-theme="dark"] .modal-sidebar-combo *[style*="color: black"],
html[data-theme="dark"] .modal-sidebar-combo *[style*="color: #000"],
html[data-theme="dark"] .import-excel-modal *[style*="color: black"],
html[data-theme="dark"] .export-preview-modal *[style*="color: black"] {
    color: var(--admin-text, #e8e8e8) !important;
}

/* 强制覆盖具体的导入/导出组件 */
html[data-theme="dark"] .modal-sidebar-combo .upload-zone,
html[data-theme="dark"] .import-excel-modal .upload-zone,
html[data-theme="dark"] .modal-sidebar-combo .upload-area,
html[data-theme="dark"] .import-excel-modal .upload-area {
    background: rgba(45, 45, 45, 0.5) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .modal-sidebar-combo .export-preview-header,
html[data-theme="dark"] .export-preview-modal .export-preview-header,
html[data-theme="dark"] .modal-sidebar-combo .export-preview-content,
html[data-theme="dark"] .export-preview-modal .export-preview-content {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .modal-sidebar-combo .dropdown-header,
html[data-theme="dark"] .export-preview-modal .dropdown-header,
html[data-theme="dark"] .modal-sidebar-combo .field-selection-grid,
html[data-theme="dark"] .export-preview-modal .field-selection-grid,
html[data-theme="dark"] .modal-sidebar-combo .field-actions,
html[data-theme="dark"] .export-preview-modal .field-actions {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .modal-sidebar-combo .import-sidebar-content,
html[data-theme="dark"] .import-excel-modal .import-sidebar-content,
html[data-theme="dark"] .modal-sidebar-combo .import-content-area,
html[data-theme="dark"] .import-excel-modal .import-content-area {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 强制覆盖所有表格和列表 */
html[data-theme="dark"] .modal-sidebar-combo table,
html[data-theme="dark"] .modal-sidebar-combo .table,
html[data-theme="dark"] .import-excel-modal table,
html[data-theme="dark"] .export-preview-modal table,
html[data-theme="dark"] .modal-sidebar-combo .preview-table,
html[data-theme="dark"] .import-excel-modal .preview-table,
html[data-theme="dark"] .export-preview-modal .preview-table {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .modal-sidebar-combo table th,
html[data-theme="dark"] .modal-sidebar-combo .table th,
html[data-theme="dark"] .import-excel-modal table th,
html[data-theme="dark"] .export-preview-modal table th,
html[data-theme="dark"] .modal-sidebar-combo .preview-table th,
html[data-theme="dark"] .import-excel-modal .preview-table th,
html[data-theme="dark"] .export-preview-modal .preview-table th {
    background: rgba(45, 45, 45, 0.8) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .modal-sidebar-combo table td,
html[data-theme="dark"] .modal-sidebar-combo .table td,
html[data-theme="dark"] .import-excel-modal table td,
html[data-theme="dark"] .export-preview-modal table td,
html[data-theme="dark"] .modal-sidebar-combo .preview-table td,
html[data-theme="dark"] .import-excel-modal .preview-table td,
html[data-theme="dark"] .export-preview-modal .preview-table td {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 强制覆盖所有输入框和按钮 */
html[data-theme="dark"] .modal-sidebar-combo input,
html[data-theme="dark"] .modal-sidebar-combo select,
html[data-theme="dark"] .modal-sidebar-combo textarea,
html[data-theme="dark"] .import-excel-modal input,
html[data-theme="dark"] .import-excel-modal select,
html[data-theme="dark"] .import-excel-modal textarea,
html[data-theme="dark"] .export-preview-modal input,
html[data-theme="dark"] .export-preview-modal select,
html[data-theme="dark"] .export-preview-modal textarea {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 终极强制覆盖 - 使用最高特异性 */
html[data-theme="dark"] body .modal-sidebar-combo,
html[data-theme="dark"] body .import-excel-modal,
html[data-theme="dark"] body .export-preview-modal {
    --neu-surface: var(--admin-surface, #2d2d2d) !important;
    --neu-bg: var(--admin-bg, #1a1a1a) !important;
    --neu-text: var(--admin-text, #e8e8e8) !important;
}





/* 覆盖JavaScript动态设置的样式 */
html[data-theme="dark"] .modal-sidebar-combo[style],
html[data-theme="dark"] .import-excel-modal[style],
html[data-theme="dark"] .export-preview-modal[style] {
    background: rgba(0, 0, 0, 0.8) !important;
}

html[data-theme="dark"] .modal-sidebar-combo *[style],
html[data-theme="dark"] .import-excel-modal *[style],
html[data-theme="dark"] .export-preview-modal *[style] {
    background-color: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}



/* 确保遮罩层正确显示 */
html[data-theme="dark"] .modal-sidebar-combo-backdrop,
html[data-theme="dark"] .modal-sidebar-combo {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* 修复导入模态框中遗漏的组件暗色模式适配 */
html[data-theme="dark"] .mapping-container {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .current-step-guide {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .guide-item {
    background: rgba(45, 45, 45, 0.8) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .guide-item.active {
    background: var(--admin-primary, #4a7c59) !important;
    color: white !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

html[data-theme="dark"] .stats-section {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .worksheets-section {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .progress-section {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .import-settings-section {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .setting-item {
    background: rgba(45, 45, 45, 0.8) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .import-settings-section .setting-item {
    background: rgba(45, 45, 45, 0.8) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复导出Excel模态框中间白色区域 */
html[data-theme="dark"] .export-preview-modal .modal-sidebar-combo-modal-body,
html[data-theme="dark"] .export-preview-modal .export-preview-content,
html[data-theme="dark"] .export-preview-modal .export-summary-cards,
html[data-theme="dark"] .export-preview-modal .export-category-cards,
html[data-theme="dark"] .export-preview-modal .export-data-preview {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复统计卡片区域 */
html[data-theme="dark"] .export-preview-modal .summary-card,
html[data-theme="dark"] .export-preview-modal .category-card {
    background: rgba(45, 45, 45, 0.8) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    position: relative !important;
}

html[data-theme="dark"] .export-preview-modal .summary-card.selected,
html[data-theme="dark"] .export-preview-modal .category-card.selected {
    background: var(--admin-primary, #4a7c59) !important;
    color: white !important;
    border-color: var(--admin-primary, #4a7c59) !important;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.3), 0 4px 12px rgba(74, 124, 89, 0.2) !important;
    transform: scale(1.02) !important;
}

html[data-theme="dark"] .export-preview-modal .summary-card.selected::after,
html[data-theme="dark"] .export-preview-modal .category-card.selected::after {
    content: "✓" !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: white !important;
    color: var(--admin-primary, #4a7c59) !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* 优化导出选项的可见性 */
html[data-theme="dark"] .export-preview-modal .export-options-grid {
    background: var(--admin-surface, #2d2d2d) !important;
}

html[data-theme="dark"] .export-preview-modal .export-option-card {
    background: rgba(60, 60, 60, 0.8) !important;
    border: 2px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

html[data-theme="dark"] .export-preview-modal .export-option-card:hover {
    background: rgba(74, 124, 89, 0.2) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3) !important;
}

html[data-theme="dark"] .export-preview-modal .export-option-card.selected {
    background: var(--admin-primary, #4a7c59) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.4), 0 4px 12px rgba(74, 124, 89, 0.3) !important;
    color: white !important;
    transform: scale(1.02) !important;
}

html[data-theme="dark"] .export-preview-modal .export-option-card.selected::before {
    content: "✓" !important;
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    background: white !important;
    color: var(--admin-primary, #4a7c59) !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* 修复字段选择区域 */
html[data-theme="dark"] .export-preview-modal .field-selector-container {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .export-preview-modal .field-selector-item {
    background: rgba(60, 60, 60, 0.8) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .export-preview-modal .field-selector-item.selected {
    background: var(--admin-primary, #4a7c59) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
    color: white !important;
    box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.3) !important;
}

html[data-theme="dark"] .export-preview-modal .field-selector-item input[type="checkbox"] {
    accent-color: var(--admin-primary, #4a7c59) !important;
    transform: scale(1.2) !important;
}

html[data-theme="dark"] .export-preview-modal .field-selector-item input[type="checkbox"]:checked {
    background: var(--admin-primary, #4a7c59) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

/* 修复导出预览表格区域 */
html[data-theme="dark"] .export-preview-modal .preview-table-container,
html[data-theme="dark"] .export-preview-modal .data-preview-container {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table-wrapper {
    background: var(--admin-surface, #2d2d2d) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table thead {
    background: rgba(45, 45, 45, 0.9) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table thead th {
    background: rgba(60, 60, 60, 0.9) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table tbody {
    background: var(--admin-surface, #2d2d2d) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table tbody tr {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table tbody tr:nth-child(even) {
    background: rgba(45, 45, 45, 0.5) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table tbody tr:hover {
    background: rgba(74, 124, 89, 0.1) !important;
}

html[data-theme="dark"] .export-preview-modal .preview-table tbody td {
    background: transparent !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 修复所有可能的白色容器 */
html[data-theme="dark"] .export-preview-modal .container,
html[data-theme="dark"] .export-preview-modal .content-wrapper,
html[data-theme="dark"] .export-preview-modal .main-content,
html[data-theme="dark"] .export-preview-modal .preview-section,
html[data-theme="dark"] .export-preview-modal .export-section {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复进度条和状态指示器 */
html[data-theme="dark"] .export-preview-modal .progress-bar {
    background: rgba(45, 45, 45, 0.8) !important;
    border: 1px solid var(--admin-border, #404040) !important;
}

html[data-theme="dark"] .export-preview-modal .progress-bar-fill {
    background: var(--admin-primary, #4a7c59) !important;
}

html[data-theme="dark"] .export-preview-modal .status-indicator {
    background: rgba(45, 45, 45, 0.8) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border: 1px solid var(--admin-border, #404040) !important;
}

/* 修复底部操作按钮区域 */
html[data-theme="dark"] .export-preview-modal .modal-footer,
html[data-theme="dark"] .export-preview-modal .export-actions {
    background: var(--admin-surface, #2d2d2d) !important;
    border-top: 1px solid var(--admin-border, #404040) !important;
}

/* 修复具体的样式冲突问题 */
/* 1. 强制覆盖 preview-stats 的亮色模式样式 */
html[data-theme="dark"] .export-preview-modal .preview-stats,
html[data-theme="dark"] .modal-sidebar-combo .preview-stats,
html[data-theme="dark"] body .preview-stats {
    background: linear-gradient(135deg, var(--admin-surface, #2d2d2d) 0%, rgba(45, 45, 45, 0.9) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* 2. 强制覆盖 category-tabs-nav 的硬编码背景 */
html[data-theme="dark"] .export-preview-modal .category-tabs-nav,
html[data-theme="dark"] .modal-sidebar-combo .category-tabs-nav,
html[data-theme="dark"] body .category-tabs-nav {
    background: linear-gradient(135deg, var(--admin-surface, #2d2d2d) 0%, rgba(45, 45, 45, 0.9) 100%) !important;
    border-bottom-color: var(--admin-primary, #4a7c59) !important;
}

/* 3. 修复统计数字和标签的颜色冲突 */
html[data-theme="dark"] .export-preview-modal .stat-number,
html[data-theme="dark"] .modal-sidebar-combo .stat-number,
html[data-theme="dark"] body .stat-number {
    color: #ffffff !important;
    text-shadow: none !important;
}

html[data-theme="dark"] .export-preview-modal .stat-label,
html[data-theme="dark"] .modal-sidebar-combo .stat-label,
html[data-theme="dark"] body .stat-label {
    color: #e2e8f0 !important;
    text-shadow: none !important;
}



/* 5. 修复分类标签容器 */
html[data-theme="dark"] .export-preview-modal .category-tabs-container,
html[data-theme="dark"] .modal-sidebar-combo .category-tabs-container,
html[data-theme="dark"] body .category-tabs-container {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
}

[data-theme="dark"] .sidebar-header .logo h2 {
    color: var(--admin-text);
}

[data-theme="dark"] .sidebar-header .logo i {
    color: var(--admin-primary);
}

[data-theme="dark"] .user-info {
    background: var(--admin-bg);
    color: var(--admin-text);
}

[data-theme="dark"] .user-info i {
    color: var(--admin-primary);
}

[data-theme="dark"] .logout-btn {
    color: var(--admin-text);
    border-color: var(--admin-border);
    background: transparent;
}

[data-theme="dark"] .logout-btn:hover {
    background: var(--error);
    color: white;
    border-color: #e74c3c;
}

[data-theme="dark"] .data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .modal-overlay {
    background: var(--bg-overlay);
}

[data-theme="dark"] .notification-content {
    background: var(--admin-surface);
    color: var(--admin-text);
}

[data-theme="dark"] .loading-content {
    background: var(--admin-surface);
    color: var(--admin-text);
}

[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(107, 155, 122, 0.2);
}

[data-theme="dark"] .btn-primary {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--admin-primary-light);
    border-color: var(--admin-primary-light);
}

[data-theme="dark"] .status-badge {
    border-color: transparent;
}

[data-theme="dark"] .bank-info-card {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

[data-theme="dark"] .bank-info-card:hover {
    box-shadow: 0 8px 24px rgba(107, 155, 122, 0.2);
}

[data-theme="dark"] .bank-input {
    background: var(--admin-bg);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

[data-theme="dark"] .bank-input:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(107, 155, 122, 0.2);
}

/* 滚动条黑暗模式 */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--admin-surface);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--admin-border);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--admin-text-light);
}

/* 选择文本黑暗模式 */
[data-theme="dark"] ::selection {
    background: rgba(107, 155, 122, 0.3);
    color: var(--admin-text);
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    color: var(--admin-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--admin-bg);
    color: var(--admin-text);
}

/* 用户菜单 */
.user-menu {
    position: relative;
}

.user-avatar {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--admin-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.user-avatar:hover {
    background: var(--admin-bg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    box-shadow: var(--admin-shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 8;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--admin-text);
    text-decoration: none;
    transition: background 0.2s ease;
}

.user-dropdown a:hover {
    background: var(--admin-bg);
}

.user-dropdown hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--admin-border);
}

/* 面包屑导航 */
.breadcrumb {
    padding: 1rem 2rem;
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border);
}

.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    color: var(--admin-text-light);
    margin-left: 0.5rem;
}

.breadcrumb a {
    color: var(--admin-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 主内容 */
.admin-content {
    flex: 1;
    padding: 2rem;
}

/* 仪表板样式 */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--admin-surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--admin-shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.users {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stat-icon.products {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.stat-icon.orders {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.stat-icon.revenue {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.stat-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-text);
}

.stat-content p {
    margin: 0 0 0.5rem 0;
    color: var(--admin-text-light);
    font-size: 0.9rem;
}

.stat-change {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.stat-change.positive {
    background: var(--bg-success-light);
    color: #27ae60;
}

.stat-change.negative {
    background: var(--bg-error-light);
    color: #e74c3c;
}

/* 快速操作 */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h2 {
    margin: 0 0 1rem 0;
    color: var(--admin-text);
    font-size: 1.25rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.action-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--admin-text);
    transition: all 0.2s ease;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--admin-shadow-lg);
    border-color: var(--admin-primary);
}

.action-card i {
    font-size: 2rem;
    color: var(--admin-primary);
    margin-bottom: 1rem;
}

.action-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.action-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--admin-text-light);
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-card:hover::before {
    left: 100%;
}

.action-card:active {
    transform: scale(0.95);
}

.action-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--admin-primary);
    transition: all 0.3s ease;
}

.action-card:hover i {
    transform: scale(1.1);
    color: var(--admin-primary-light);
}

.action-card h3 {
    margin: 0.5rem 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
}

/* 报表模态框样式 */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.report-option {
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.report-option:hover {
    background: var(--admin-surface);
    border-color: var(--admin-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.15);
}

.report-option i {
    font-size: 2rem;
    color: var(--admin-primary);
}

.report-option h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
}

.report-option p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--admin-text-light);
    line-height: 1.3;
}

/* 仪表板网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 仪表板卡片 */
.dashboard-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
}

.card-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--admin-text);
}

.view-all {
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.view-all:hover {
    text-decoration: underline;
}

.card-content {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

/* 数据表格 */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
}

.data-table th {
    font-weight: 600;
    color: var(--admin-text);
    background: var(--admin-bg);
}

.data-table td {
    color: var(--admin-text);
}

.data-table a {
    color: var(--admin-primary);
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

.loading-row,
.no-data {
    text-align: center;
    color: var(--admin-text-light);
    font-style: italic;
}

/* 状态徽章 */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.draft {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
}

.status-badge.pending {
    background: var(--bg-warning-light);
    color: #f39c12;
}

.status-badge.confirmed {
    background: var(--bg-info-light);
    color: #3498db;
}

.status-badge.shipped {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.status-badge.delivered {
    background: var(--bg-success-light);
    color: #27ae60;
}

.status-badge.cancelled {
    background: var(--bg-error-light);
    color: #e74c3c;
}

/* 图表区域 */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.chart-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
}

.chart-controls {
    display: flex;
    gap: 1rem;
}

.chart-controls select {
    padding: 0.5rem;
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    background: var(--admin-surface);
    color: var(--admin-text);
}

.chart-container {
    height: 300px;
    position: relative;
}

/* 按钮样式 */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--admin-primary-light);
}

.text-danger {
    color: #e74c3c;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 1000; /* {{ AURA: Fix - 提高z-index确保侧边栏在最上层 }} */
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        background: var(--admin-surface);
        box-shadow: none;
    }

    .admin-sidebar.show {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3); /* {{ AURA: Fix - 增强阴影效果 }} */
    }

    /* {{ AURA: Add - 侧边栏遮罩层 }} */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

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

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        display: block;
        background: var(--admin-primary);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        position: relative;
        z-index: 1001; /* {{ AURA: Fix - 确保切换按钮在侧边栏之上 }} */
    }

    .admin-header {
        padding: 1rem;
        margin-left: 0;
    }

    .admin-header h1 {
        font-size: 1.5rem;
        margin-left: 0;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .header-actions .btn-icon {
        padding: 0.5rem;
        font-size: 0.9rem;
        min-width: 36px;
        height: 36px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .action-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .admin-content {
        padding: 1rem;
        margin-top: 0;
    }

    .content-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* 表格优化 */
    .modern-table {
        font-size: 0.85rem;
    }

    .modern-table th,
    .modern-table td {
        padding: 0.75rem 0.5rem;
    }

    .modern-table th {
        font-size: 0.8rem;
    }

    /* 隐藏不重要的列 */
    .modern-table .hide-mobile {
        display: none;
    }

    /* 操作列优化 */
    .actions-cell {
        padding: 0.75rem 0.25rem;
        min-width: 80px;
    }

    .actions-cell .btn {
        padding: 0.4rem;
        font-size: 0.8rem;
        min-width: 32px;
        height: 32px;
    }

    /* 表单优化 */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 1rem; /* 防止iOS缩放 */
        border-radius: 8px;
    }

    /* 模态框优化 */
    .modal-overlay {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
    }

    .modal-content.large {
        max-height: 90vh;
        position: fixed;
        top: 2rem;
        bottom: 2rem;
        border-radius: 16px;
    }

    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid var(--admin-border);
        position: sticky;
        top: 0;
        background: var(--admin-surface);
        z-index: 10;
        border-radius: 16px 16px 0 0;
    }

    .modal-body {
        padding: 1rem;
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        padding: 1rem;
        border-top: 1px solid var(--admin-border);
        position: sticky;
        bottom: 0;
        background: var(--admin-surface);
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
        justify-content: center;
        padding: 0.875rem;
        font-size: 1rem;
    }

    .modal-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 11;
        background: var(--admin-bg);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .admin-sidebar {
        width: 100%;
    }

    .sidebar-toggle {
        padding: 0.6rem;
        font-size: 1rem;
    }

    .admin-header {
        padding: 0.75rem;
    }

    .admin-header h1 {
        font-size: 1.25rem;
        margin-left: 0;
    }

    .header-actions .btn-icon {
        padding: 0.4rem;
        font-size: 0.8rem;
        min-width: 32px;
        height: 32px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .admin-content {
        padding: 0.75rem;
    }

    .content-header {
        padding: 0.75rem;
    }

    .stats-grid {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .modern-table {
        font-size: 0.8rem;
    }

    .modern-table th,
    .modern-table td {
        padding: 0.5rem 0.25rem;
    }

    .actions-cell {
        padding: 0.5rem 0.125rem;
        min-width: 60px;
    }

    /* {{ AURA: Add - 通用后台页面小屏适配 }} */
    .page-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        text-align: center;
    }

    .header-left,
    .header-right {
        width: 100%;
        justify-content: center;
    }

    .header-right {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-right .btn-primary,
    .header-right .btn-secondary {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    /* 筛选器小屏适配 */
    .filters-container {
        padding: 1rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filters-actions {
        justify-content: center;
        margin-top: 1rem;
    }

    /* 表格小屏适配 */
    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
        min-width: 80px;
    }

    .data-table .actions-cell {
        min-width: 60px;
    }

    /* 用户信息小屏适配 */
    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .contact-info {
        align-items: center;
    }

    /* 设置页面小屏适配 */
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .setting-item {
        margin-bottom: 1rem;
    }

    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-suffix {
        align-self: flex-start;
        margin-left: 0;
    }

    .actions-cell .btn {
        padding: 0.3rem;
        font-size: 0.75rem;
        min-width: 28px;
        height: 28px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem;
    }

    .modal-overlay {
        padding: 0.25rem;
    }

    .modal-content {
        margin: 0;
        border-radius: 12px 12px 0 0;
        max-height: 98vh;
    }

    .modal-content.large {
        top: 1rem;
        bottom: 1rem;
        border-radius: 12px;
    }

    .modal-header {
        padding: 0.75rem;
        border-radius: 12px 12px 0 0;
    }

    .modal-body {
        padding: 0.75rem;
    }

    .modal-footer {
        padding: 0.75rem;
        gap: 0.375rem;
    }

    .modal-footer .btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    /* {{ AURA: Add - 增强模态框小屏适配 }} */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        margin: 0;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .modal-overlay.show .modal-content {
        transform: translateY(0);
    }

    .modal-header {
        padding: 1rem 1.5rem;
        border-radius: 16px 16px 0 0;
        position: relative;
    }

    .modal-header::before {
        content: '';
        position: absolute;
        top: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--admin-border);
        border-radius: 2px;
    }

    .modal-body {
        padding: 1rem 1.5rem;
        max-height: calc(95vh - 140px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem;
        font-size: 1rem;
    }

    /* 大型模态框特殊处理 */
    .modal-content.large {
        max-height: 98vh;
    }

    .modal-content.large .modal-body {
        max-height: calc(98vh - 140px);
    }
}

@media (max-width: 480px) {
    .action-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        padding: 0 1rem;
    }

    .breadcrumb {
        padding: 1rem;
    }
}

/* 分页组件 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

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

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

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

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--admin-text-light);
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 2rem;
}

.modal-content {
    background: var(--admin-surface);
    border-radius: 12px;
    box-shadow: var(--admin-shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--admin-text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--admin-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* SKU输入容器样式 */
.sku-input-container {
    display: flex;
    align-items: center;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--admin-bg);
    transition: all 0.2s ease;
}

.sku-input-container:focus-within {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.sku-prefix-display {
    background: var(--admin-primary);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border-right: 1px solid var(--admin-border);
    min-width: 70px;
    text-align: center;
    user-select: none;
    white-space: nowrap;
}

.sku-input-container input[type="text"] {
    flex: 1;
    border: none;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: transparent;
    outline: none;
    color: var(--admin-text);
}

.sku-input-container input[type="text"]:focus {
    background: transparent;
}

.sku-input-container input[type="text"]::placeholder {
    color: var(--admin-text-light);
    font-family: inherit;
}

.sku-generate-btn {
    background: var(--admin-primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
}

.sku-generate-btn:hover {
    background: var(--admin-primary-light);
    transform: scale(1.05);
}

.sku-generate-btn:active {
    transform: scale(0.95);
}

.sku-generate-btn i {
    font-size: 0.9rem;
}

.form-help {
    font-size: 0.85rem;
    color: var(--admin-text-light);
    margin-top: 0.25rem;
    display: block;
}

.form-help span {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--admin-primary);
}

/* 产品表单样式 */
.product-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-form .form-row {
    display: flex;
    gap: 1rem;
}

.product-form .form-row .form-group {
    flex: 1;
}

/* 按钮样式增强 */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--admin-primary-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--admin-surface);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

.btn-secondary:hover {
    background: var(--admin-bg);
    border-color: var(--admin-primary);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-content {
    background: var(--admin-surface);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--admin-shadow-lg);
}

/* 通知样式增强 */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 4000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.notification-content {
    background: var(--admin-surface);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--admin-shadow-lg);
    border-left: 4px solid var(--info);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification.success .notification-content {
    border-left-color: var(--success);
}

.notification.error .notification-content {
    border-left-color: var(--error);
}

.notification.warning .notification-content {
    border-left-color: var(--warning);
}

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

/* 页面头部样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--admin-border);
}

.header-left h2 {
    margin: 0 0 0.5rem 0;
    color: var(--admin-text);
    font-size: 1.75rem;
    font-weight: 600;
}

.header-left p {
    margin: 0;
    color: var(--admin-text-light);
    font-size: 1rem;
}

.header-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* 筛选区域样式 */
.filters-section {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--admin-shadow);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--admin-text);
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: var(--admin-surface);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.filters-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 表格容器样式 */
.products-table-container,
.orders-table-container,
.users-table-container {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--admin-shadow);
}

/* 数据表格增强样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-weight: 600;
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--admin-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text);
    vertical-align: middle;
}

.data-table tr:hover {
    background: rgba(45, 90, 39, 0.05);
}

.data-table a {
    color: var(--admin-primary);
    text-decoration: none;
    font-weight: 500;
}

.data-table a:hover {
    text-decoration: underline;
}

/* 无数据和加载状态 */
.loading-row,
.no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--admin-text-light);
    font-style: italic;
    background: var(--admin-bg);
}

.loading-row i,
.no-data i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--admin-border);
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.5rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    min-width: 32px;
    height: 32px;
}

.btn-edit {
    background: var(--info);
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-delete {
    background: var(--error);
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.btn-password {
    background: var(--warning);
    color: white;
}

.btn-password:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-toggle {
    background: #9b59b6;
    color: white;
}

.btn-toggle:hover {
    background: #8e44ad;
    transform: translateY(-1px);
}

/* 状态徽章增强 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.draft {
    background: rgba(149, 165, 166, 0.15);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.status-badge.pending {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-badge.confirmed {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.status-badge.shipped {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.status-badge.delivered {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.cancelled {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-badge.unpaid {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-badge.paid {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.partial {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-badge.refunded {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

/* 产品信息样式 */
.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--admin-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-text-light);
    border: 1px solid var(--admin-border);
}

.product-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    color: var(--admin-text);
    font-weight: 600;
}

.product-details p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--admin-text-light);
}

/* 价格信息样式 */
.price-info {
    text-align: right;
}

.price-main {
    font-weight: 600;
    color: var(--admin-text);
    font-size: 1.1rem;
}

.price-secondary {
    font-size: 0.8rem;
    color: var(--admin-text-light);
    margin-top: 0.25rem;
}

/* 库存信息样式 */
.stock-info {
    text-align: center;
}

.stock-number {
    font-weight: 600;
    font-size: 1.1rem;
}

.stock-normal {
    color: var(--admin-text);
}

.stock-low {
    color: #e74c3c;
}

.stock-warning {
    font-size: 0.8rem;
    color: #f39c12;
    margin-top: 0.25rem;
}

/* 订单信息样式 */
.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-number {
    font-weight: 600;
    color: var(--admin-primary);
    font-size: 0.95rem;
}

.order-date {
    font-size: 0.8rem;
    color: var(--admin-text-light);
}

/* 客户信息样式 */
.customer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.customer-name {
    font-weight: 500;
    color: var(--admin-text);
}

.customer-contact {
    font-size: 0.8rem;
    color: var(--admin-text-light);
}

/* 金额信息样式 */
.amount-info {
    text-align: right;
}

.amount-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--admin-text);
}

.amount-discount {
    font-size: 0.8rem;
    color: var(--admin-text-light);
    margin-top: 0.25rem;
}

/* 状态组样式 */
.status-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--admin-text);
    font-weight: 600;
}

.user-details p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--admin-text-light);
}

/* 联系信息样式 */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-item {
    font-size: 0.9rem;
    color: var(--admin-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    width: 16px;
    color: var(--admin-text-light);
    text-align: center;
}

/* 角色徽章样式 */
.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-admin {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.role-user {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* 表单网格样式 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* 表单组内联样式 */
.form-group-inline {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* 复选框标签样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--admin-text);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--admin-primary);
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--admin-border);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 表单帮助文本 */
.form-help {
    font-size: 0.8rem;
    color: var(--admin-text-light);
    margin-top: 0.25rem;
    display: block;
}

/* 文本颜色工具类 */
.text-muted {
    color: var(--admin-text-light);
}

.text-danger {
    color: #e74c3c;
    font-weight: 600;
}

.text-success {
    color: #27ae60;
    font-weight: 600;
}

.text-warning {
    color: #f39c12;
    font-weight: 600;
}

.text-info {
    color: #3498db;
    font-weight: 600;
}

/* 分类网格样式 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--admin-shadow);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--admin-shadow-lg);
    border-color: var(--admin-primary);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.category-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--admin-text);
    font-size: 1.25rem;
    font-weight: 600;
}

.category-info p {
    margin: 0;
    color: var(--admin-text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.category-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--admin-text-light);
}

.category-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-stats i {
    color: var(--admin-primary);
}

.category-actions {
    display: flex;
    gap: 0.5rem;
}

.sort-order-badge {
    background: var(--admin-bg);
    color: var(--admin-text);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--admin-border);
}

.loading-card {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
}

.loading-content {
    text-align: center;
    color: var(--admin-text-light);
}

.loading-content i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--admin-primary);
}

.no-data-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    color: var(--admin-text-light);
    box-shadow: var(--admin-shadow);
}

.no-data-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--admin-border);
}

.no-data-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--admin-text);
}

.no-data-card p {
    margin: 0;
}

/* 设置页面样式 */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface);
    border-radius: 12px 12px 0 0;
    padding: 0.5rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    color: var(--admin-text-light);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-button:hover {
    color: var(--admin-text);
    background: var(--admin-bg);
}

.tab-button.active {
    color: var(--admin-primary);
    background: var(--bg-hover);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.settings-section {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--admin-shadow);
}

.settings-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--admin-text);
    font-size: 1.25rem;
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item.full-width {
    grid-column: 1 / -1;
}

.setting-item label {
    font-weight: 500;
    color: var(--admin-text);
}

.setting-item input,
.setting-item select {
    padding: 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.setting-item input:focus,
.setting-item select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-suffix {
    padding: 0.75rem;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    color: var(--admin-text-light);
    font-weight: 500;
}

.setting-help {
    font-size: 0.8rem;
    color: var(--admin-text-light);
}

/* 系统信息网格 */
.system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.info-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--admin-shadow);
}

.info-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.info-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--admin-text);
    font-weight: 600;
}

.info-content p {
    margin: 0;
    font-size: 0.9rem;
}

.status-text.success {
    color: #27ae60;
    font-weight: 500;
}

.status-text.warning {
    color: #f39c12;
    font-weight: 500;
}

.status-text.error {
    color: #e74c3c;
    font-weight: 500;
}

/* 版本信息表格 */
.version-info {
    background: var(--admin-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--admin-border);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

.info-table td:first-child {
    font-weight: 500;
    color: var(--admin-text);
    width: 30%;
}

.info-table td:last-child {
    color: var(--admin-text-light);
}

.info-table tr:last-child td {
    border-bottom: none;
}

/* 系统操作按钮 */
.system-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.settings-footer {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    box-shadow: var(--admin-shadow);
}

/* 个人资料页面样式 */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.profile-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    height: fit-content;
    box-shadow: var(--admin-shadow);
}

.profile-avatar-section {
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: white;
    font-size: 3rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.3);
}

.avatar-actions {
    margin-top: 1rem;
}

.profile-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--admin-text);
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-info p {
    margin: 0 0 1.5rem 0;
    color: var(--admin-text-light);
    font-size: 1rem;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--admin-bg);
    border-radius: 8px;
    border: 1px solid var(--admin-border);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--admin-text-light);
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    color: var(--admin-text);
}

.profile-form-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--admin-shadow);
}

.profile-form-card h3 {
    margin: 0 0 1.5rem 0;
    color: var(--admin-text);
    font-size: 1.25rem;
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--admin-bg);
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    transition: all 0.2s ease;
}

.setting-item:hover {
    border-color: var(--admin-primary);
    box-shadow: 0 2px 8px rgba(45, 90, 39, 0.1);
}

.setting-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--admin-text);
    font-weight: 600;
}

.setting-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--admin-text-light);
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--admin-primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 订单管理专用样式 */
.order-items-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--admin-border);
}

.order-items-section h4 {
    margin: 0 0 1rem 0;
    color: var(--admin-text);
    font-weight: 600;
}

.order-item {
    background: var(--admin-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--admin-border);
    transition: all 0.2s ease;
}

.order-item:hover {
    border-color: var(--admin-primary);
    box-shadow: 0 2px 8px rgba(45, 90, 39, 0.1);
}

.order-item-grid {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.order-detail-section {
    margin-bottom: 2rem;
}

.order-detail-section h4 {
    margin: 0 0 1rem 0;
    color: var(--admin-text);
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--admin-text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--admin-text);
    font-weight: 500;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
}

.order-items-table th,
.order-items-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
}

.order-items-table th {
    background: var(--admin-bg);
    font-weight: 600;
    color: var(--admin-text);
}

.order-items-table tr:last-child td {
    border-bottom: none;
}

/* 模态框增强样式 */
.modal-content.large {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large .modal-body {
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

/* 动画增强 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

.category-card,
.info-card,
.profile-card,
.profile-form-card,
.settings-section {
    animation: fadeIn 0.5s ease-out;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* 悬停效果增强 */
.btn-sm:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link:hover {
    transform: translateX(4px);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 响应式增强 */
@media (max-width: 1024px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .system-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-header {
        flex-direction: column;
        gap: 1rem;
    }

    .category-status {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .category-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .category-actions {
        width: 100%;
        justify-content: center;
    }

    .order-item-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .setting-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .settings-tabs {
        flex-direction: column;
        padding: 0;
        border-radius: 12px;
    }

    .tab-button {
        justify-content: center;
        border-radius: 8px;
        margin: 0.25rem;
    }

    .system-actions {
        flex-direction: column;
    }

    .settings-footer {
        flex-direction: column;
    }
}

/* 工具类 */
.d-flex {
    display: flex;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* 边框工具类 */
.border {
    border: 1px solid var(--admin-border);
}

.border-top {
    border-top: 1px solid var(--admin-border);
}

.border-bottom {
    border-bottom: 1px solid var(--admin-border);
}

.border-left {
    border-left: 1px solid var(--admin-border);
}

.border-right {
    border-right: 1px solid var(--admin-border);
}

.border-radius {
    border-radius: 8px;
}

.border-radius-lg {
    border-radius: 12px;
}

/* 阴影工具类 */
.shadow {
    box-shadow: var(--admin-shadow);
}

.shadow-lg {
    box-shadow: var(--admin-shadow-lg);
}

.shadow-none {
    box-shadow: none;
}

/* 背景工具类 */
.bg-primary {
    background-color: var(--admin-primary);
    color: white;
}

.bg-secondary {
    background-color: var(--admin-secondary);
    color: white;
}

.bg-success {
    background-color: var(--success);
    color: white;
}

.bg-danger {
    background-color: var(--error);
    color: white;
}

.bg-warning {
    background-color: var(--warning);
    color: white;
}

.bg-info {
    background-color: var(--info);
    color: white;
}

.bg-light {
    background-color: var(--admin-bg);
}

.bg-white {
    background-color: var(--admin-surface);
}

/* 字体大小工具类 */
.fs-xs { font-size: 0.75rem; }
.fs-sm { font-size: 0.875rem; }
.fs-base { font-size: 1rem; }
.fs-lg { font-size: 1.125rem; }
.fs-xl { font-size: 1.25rem; }
.fs-2xl { font-size: 1.5rem; }
.fs-3xl { font-size: 1.875rem; }

/* 字体粗细工具类 */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

/* 宽度工具类 */
.w-25 { width: 25%; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }
.w-auto { width: auto; }

/* 高度工具类 */
.h-25 { height: 25%; }
.h-50 { height: 50%; }
.h-75 { height: 75%; }
.h-100 { height: 100%; }
.h-auto { height: auto; }

/* 溢出工具类 */
.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.overflow-scroll {
    overflow: scroll;
}

/* 位置工具类 */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.position-fixed {
    position: fixed;
}

.position-sticky {
    position: sticky;
}

/* 光标工具类 */
.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* 用户选择工具类 */
.user-select-none {
    user-select: none;
}

/* 过渡效果工具类 */
.transition {
    transition: all 0.2s ease;
}

.transition-fast {
    transition: all 0.1s ease;
}

.transition-slow {
    transition: all 0.3s ease;
}

/* 透明度工具类 */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* 变换工具类 */
.transform {
    transform: translateZ(0);
}

.scale-95 {
    transform: scale(0.95);
}

.scale-100 {
    transform: scale(1);
}

.scale-105 {
    transform: scale(1.05);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--admin-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--admin-border);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--admin-text-light);
}

/* 选择文本样式 */
::selection {
    background: var(--bg-active);
    color: var(--admin-text);
}

/* 焦点样式 */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .admin-sidebar,
    .admin-header,
    .filters-section,
    .pagination-container,
    .action-buttons {
        display: none !important;
    }

    .admin-main {
        margin-left: 0 !important;
    }

    .admin-content {
        padding: 0 !important;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* 主页面设置专用样式 */
.settings-section .section-header {
    margin-bottom: var(--admin-spacing-lg);
    padding-bottom: var(--admin-spacing-md);
    border-bottom: 2px solid var(--admin-primary);
}

.settings-section .section-header h2 {
    color: var(--admin-primary);
    margin-bottom: var(--admin-spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.settings-section .section-header p {
    color: var(--admin-text-light);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--admin-spacing-lg);
}

.setting-item input.changed {
    border-color: var(--warning);
    background: var(--bg-warning-light);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.setting-item input.error {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.setting-item input.focused {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

/* 预览容器样式 */
.preview-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 90vh;
    background: var(--admin-surface);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--admin-border);
}

.preview-header {
    padding: var(--admin-spacing-lg);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--admin-background);
    border-radius: var(--admin-radius-lg) var(--admin-radius-lg) 0 0;
}

.preview-header h3 {
    margin: 0;
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--admin-text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--admin-radius-sm);
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: var(--admin-danger);
    color: white;
}

.preview-frame {
    flex: 1;
    border: none;
    border-radius: 0 0 var(--admin-radius-lg) var(--admin-radius-lg);
}

/* 加载状态样式 */
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* 必填字段标记 */
.setting-item label::after {
    content: '';
}

.setting-item[data-required="true"] label::after {
    content: ' *';
    color: var(--admin-danger);
    font-weight: bold;
}

/* 设置项状态指示 */
.setting-item {
    position: relative;
}

.setting-item.has-changes::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--warning);
    border-radius: 2px;
}

.setting-item.has-error::before {
    background: var(--danger);
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--admin-text);
    color: var(--admin-surface);
    text-align: center;
    border-radius: var(--admin-radius-sm);
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.setting-item small {
    color: var(--admin-text-light);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.25rem;
}

/* 主页面设置增强样式 */
.setting-item input.form-control {
    background: var(--admin-surface);
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: var(--admin-text);
}

.setting-item input.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
    background: var(--admin-surface);
}

.setting-item input.form-control:hover {
    border-color: var(--admin-primary-light);
}

/* 设置区域增强 */
.settings-section {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.settings-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.settings-section .section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--admin-primary);
    position: relative;
}

.settings-section .section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--admin-accent);
    border-radius: 1px;
}

.settings-section .section-header h2 {
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.settings-section .section-header h2 i {
    color: var(--admin-accent);
    font-size: 1.2rem;
}

.settings-section .section-header p {
    color: var(--admin-text-light);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 设置项增强 */
.setting-item {
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.setting-item:hover {
    border-color: var(--admin-primary-light);
    box-shadow: 0 2px 8px rgba(45, 90, 39, 0.1);
}

.setting-item label {
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.95rem;
}

.setting-item small {
    color: var(--admin-text-light);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    display: block;
    font-style: italic;
}

/* 按钮样式增强 */
.header-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions .btn-primary {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-light));
    color: white;
}

.header-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--admin-primary-light), var(--admin-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.3);
}

.header-actions .btn-secondary {
    background: var(--admin-surface);
    color: var(--admin-text);
    border: 2px solid var(--admin-border);
}

.header-actions .btn-secondary:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
    transform: translateY(-2px);
}

.header-actions .btn-info {
    background: linear-gradient(135deg, var(--info), #5dade2);
    color: white;
}

.header-actions .btn-info:hover {
    background: linear-gradient(135deg, #5dade2, var(--info));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay-light);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--admin-surface);
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--admin-text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 主页面设置响应式 */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .settings-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .settings-section .section-header h2 {
        font-size: 1.2rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .modal-header {
        padding: 1rem;
        border-radius: 16px 16px 0 0;
    }

    .modal-body {
        padding: 1rem;
        max-height: calc(95vh - 140px);
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem;
    }

    /* 模态框内表单优化 */
    .modal .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal .form-group {
        margin-bottom: 1rem;
    }

    .modal .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        font-weight: 500;
    }

    .modal .form-group input,
    .modal .form-group select,
    .modal .form-group textarea {
        padding: 0.875rem;
        font-size: 1rem; /* 防止iOS缩放 */
        border-radius: 8px;
        border: 1px solid var(--admin-border);
        width: 100%;
        box-sizing: border-box;
    }

    .modal .form-group textarea {
        min-height: 100px;
        resize: vertical;
    }

    /* 切换开关在模态框中的优化 */
    .modal .toggle-switch {
        transform: scale(1.1);
        margin: 0.5rem 0;
    }

    /* 状态选择器优化 */
    .modal .status-options {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .modal .status-option {
        flex: 1;
        min-width: 120px;
        padding: 0.75rem;
        text-align: center;
        border-radius: 8px;
        font-size: 0.9rem;
    }
}

/* 预览样式增强 */
.preview-container {
    font-family: 'Noto Sans SC', sans-serif;
    max-height: 70vh;
    overflow-y: auto;
    padding: 1rem;
}

.preview-container h3 {
    margin: 0 0 1.5rem 0;
    color: var(--admin-primary);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--admin-primary);
    padding-bottom: 0.5rem;
}

.preview-container h3 small {
    font-size: 0.8rem;
    color: var(--admin-text-light);
    font-weight: 400;
    margin-left: auto;
    background: var(--admin-accent);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-style: italic;
}

.preview-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.preview-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.preview-section h4 {
    margin: 0 0 1rem 0;
    color: var(--admin-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-section h4 i {
    color: var(--admin-accent);
}

.preview-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-light));
    color: white;
    border-radius: 8px;
}

.preview-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.preview-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.preview-form {
    max-width: 100%;
    background: var(--admin-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
}

.preview-form h3 {
    margin: 0 0 1.5rem 0;
    color: var(--admin-text);
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--admin-primary);
    position: relative;
}

.preview-form h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--admin-accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--admin-text);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--admin-surface);
    color: var(--admin-text);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.product-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}

.button-group button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.button-group .btn-add {
    background: linear-gradient(135deg, var(--admin-secondary), #a0522d);
    color: white;
}

.button-group .btn-preview {
    background: linear-gradient(135deg, var(--info), #5dade2);
    color: white;
}

.button-group .btn-generate {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-light));
    color: white;
}

/* 模态框动画 */
.modal.modal-show {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

@media (max-width: 768px) {
    .product-section {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button {
        justify-content: center;
    }

    .preview-header h1 {
        font-size: 1.5rem;
    }

    .preview-header p {
        font-size: 1rem;
    }

    .preview-container {
        padding: 0.5rem;
    }

    .preview-section {
        padding: 1rem;
    }

    .preview-form {
        padding: 1rem;
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-content span {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--admin-text) !important;
}

.notification-message {
    color: var(--admin-text) !important;
    font-weight: 500;
}

/* 通知类型样式 */
.notification-success {
    background: var(--bg-success);
    border: 1px solid #c3e6cb;
    color: #155724 !important;
}

.notification-success .notification-message {
    color: #155724 !important;
}

.notification-success i {
    color: #28a745;
}

.notification-error {
    background: var(--bg-error);
    border: 1px solid #f5c6cb;
    color: #721c24 !important;
}

.notification-error .notification-message {
    color: #721c24 !important;
}

.notification-error i {
    color: #dc3545;
}

.notification-info {
    background: var(--bg-info);
    border: 1px solid #bee5eb;
    color: #0c5460 !important;
}

.notification-info .notification-message {
    color: #0c5460 !important;
}

.notification-info i {
    color: #17a2b8;
}

.notification-warning {
    background: var(--bg-warning);
    border: 1px solid #ffeaa7;
    color: #856404 !important;
}

.notification-warning .notification-message {
    color: #856404 !important;
}

/* Ensure all notification text is visible */
.notification .notification-content,
.notification .notification-content *,
.notification .notification-message,
.notification span {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force text color inheritance for notifications */
.notification.success,
.notification.success * {
    color: #155724 !important;
}

.notification.error,
.notification.error * {
    color: #721c24 !important;
}

.notification.warning,
.notification.warning * {
    color: #856404 !important;
}

.notification.info,
.notification.info * {
    color: #0c5460 !important;
}

.notification-warning i {
    color: #ffc107;
}

/* 导出预览样式 */
.export-preview-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.5rem;
}

.export-preview-header {
    margin-bottom: 1.5rem;
}

.preview-stats {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.preview-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--admin-primary), #6366f1, var(--admin-primary));
}

.stat-item {
    text-align: center;
    position: relative;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(248, 250, 252, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b !important;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #64748b !important;
    margin-top: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.export-preview-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-table-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: white;
    /* 确保横向滚动 */
    white-space: nowrap;
}

.preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--admin-text-light);
    gap: 1rem;
}

.preview-loading i {
    font-size: 2rem;
    color: var(--admin-primary);
}

.preview-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: auto;
}

.preview-table th {
    background: var(--admin-surface);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: var(--admin-text);
    border-bottom: 2px solid var(--admin-border);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
    min-width: 120px;
}

.preview-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text);
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
    vertical-align: middle;
}

.preview-table tr:hover {
    background: var(--admin-surface);
}

/* 预览表格状态徽章 */
.preview-table .status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.preview-table .status-active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.preview-table .status-inactive {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.preview-table .status-featured {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.preview-table .status-normal {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* 导出选项帮助文本 */
.option-help {
    display: block;
    color: var(--admin-text-light);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    margin-left: 1.5rem;
}

/* 文件格式图示样式 */
.format-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.format-card {
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.format-card:hover {
    border-color: var(--admin-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.15);
}

.format-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.format-card input[type="radio"]:checked + .format-content {
    color: var(--admin-primary);
}

.format-card input[type="radio"]:checked + .format-content .format-icon {
    background: var(--admin-primary);
    color: white;
}

.format-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.format-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.excel-icon {
    background: rgba(33, 150, 83, 0.1);
    color: #217346;
}

.csv-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.format-info {
    display: flex;
    flex-direction: column;
}

.format-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
}

.format-ext {
    font-size: 0.75rem;
    color: var(--admin-text-light);
    margin-top: 0.25rem;
}

/* 导出选项图标网格布局 */
.options-icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.option-icon-card {
    background: white;
    border: 2px solid var(--admin-border);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    user-select: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.option-icon-card:hover {
    border-color: var(--admin-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.15);
}

.option-icon-card.active {
    background: linear-gradient(135deg, var(--admin-primary), #4a7c59);
    border-color: var(--admin-primary);
    color: white;
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.25);
}

.option-icon-card.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(45, 90, 39, 0.3);
}

.option-icon-card.special-option {
    grid-column: 2 / 3;
    grid-row: 2;
}

.option-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--admin-primary);
    transition: all 0.3s ease;
}

.option-icon-card.active .option-icon-wrapper {
    color: white;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.option-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-primary);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.option-card.active .option-icon {
    color: white;
}

.option-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text);
    transition: color 0.3s ease;
}

.option-card.active .option-text {
    color: white;
}

.option-card .option-help {
    display: block;
    color: var(--admin-text-light);
    font-size: 0.8rem;
    margin-top: 0.75rem;
    margin-left: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.option-icon-card .option-help {
    display: block;
    color: var(--admin-text-light);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.option-icon-card.active .option-help {
    color: rgba(255, 255, 255, 0.8);
}

/* 文件名设置样式 */
.filename-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--admin-border);
}

.filename-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--admin-text);
}

.filename-header i {
    color: var(--admin-primary);
}

.filename-input-wrapper {
    position: relative;
}

.filename-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

.filename-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.filename-help {
    display: block;
    color: var(--admin-text-light);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    line-height: 1.3;
}

/* 自定义悬浮提示框 */
.custom-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    max-width: 200px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    transition: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 25px rgba(45, 90, 39, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.custom-tooltip.tooltip-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.custom-tooltip.tooltip-right {
    transform: scale(0.8) translateX(-10px);
}

.custom-tooltip.tooltip-right.tooltip-visible {
    transform: scale(1) translateX(0);
}

.custom-tooltip.tooltip-left {
    transform: scale(0.8) translateX(10px);
}

.custom-tooltip.tooltip-left.tooltip-visible {
    transform: scale(1) translateX(0);
}

.custom-tooltip.tooltip-bottom {
    transform: scale(0.8) translateY(-10px);
}

.custom-tooltip.tooltip-bottom.tooltip-visible {
    transform: scale(1) translateY(0);
}

/* 提示框箭头 */
.custom-tooltip::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #2d5a27;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    z-index: -1;
}

/* 默认箭头位置（上方） */
.custom-tooltip::after {
    top: -4px;
    left: 50%;
    margin-left: -4px;
    border-top: none;
    border-left: none;
}

/* 下方箭头 */
.custom-tooltip.tooltip-bottom::after {
    top: auto;
    bottom: -4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-right: none;
    transform: rotate(225deg);
}

/* 右侧箭头 */
.custom-tooltip.tooltip-right::after {
    top: 50%;
    left: -4px;
    margin-top: -4px;
    margin-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-bottom: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(135deg);
}

/* 左侧箭头 */
.custom-tooltip.tooltip-left::after {
    top: 50%;
    left: auto;
    right: -4px;
    margin-top: -4px;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    transform: rotate(315deg);
}

.format-group,
.filename-group {
    margin-bottom: 1.5rem;
}

.format-group h5,
.filename-group h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-group h5::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--admin-primary);
    border-radius: 2px;
}

.filename-group h5::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--admin-primary);
    border-radius: 2px;
}

/* 导出字段优化布局 */
.fields-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

.fields-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
}

.field-actions {
    display: flex;
    gap: 0.5rem;
}

.field-action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--admin-border);
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--admin-text);
    font-size: 0.875rem;
}

.field-action-btn:hover {
    border-color: var(--admin-primary);
    background: var(--admin-primary);
    color: white;
    transform: translateY(-1px);
}

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

.field-selection-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

/* 隐藏滚动条但保持滚动功能 */
.field-selection-container::-webkit-scrollbar {
    width: 6px;
}

.field-selection-container::-webkit-scrollbar-track {
    background: transparent;
}

.field-selection-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.field-selection-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Firefox 滚动条样式 */
.field-selection-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

/* 预览表格容器隐藏滚动条 */
.preview-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.preview-table-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.preview-table-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.preview-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.preview-table-container::-webkit-scrollbar-corner {
    background: var(--bg-tertiary);
}

/* 侧边栏滚动条优化 */
.export-sidebar::-webkit-scrollbar {
    width: 6px;
}

.export-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.export-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.export-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: var(--bg-success);
    color: #155724;
}

.status-inactive {
    background: var(--bg-error);
    color: #721c24;
}

.export-preview-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}

.export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 导出设置侧边栏样式 */
.export-settings-container {
    height: 100%;
    overflow-y: auto;
}

.export-settings-container h4 {
    margin: 0 0 1rem 0;
    color: var(--admin-text);
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--admin-primary);
}

.export-filters-section,
.export-options-section,
.export-format-section,
.export-filename-section {
    margin-bottom: 2rem;
}

.filter-summary {
    background: var(--admin-surface);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

.filter-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-item label {
    font-weight: 600;
    color: var(--admin-text);
    font-size: 0.875rem;
}

.filter-item span {
    color: var(--admin-text-light);
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.export-option {
    margin-bottom: 1rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--admin-text);
    gap: 0.75rem;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    display: none;
}

.checkmark,
.radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--admin-border);
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
}

.radio-mark {
    border-radius: 50%;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark,
.radio-label input[type="radio"]:checked + .radio-mark {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.radio-label input[type="radio"]:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filename-input input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--admin-text);
    background: white;
}

.filename-input input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(var(--admin-primary-rgb), 0.1);
}

.filename-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--admin-text-light);
}

/* 导出进度样式 */
.export-sidebar-header {
    padding: 1rem 1.5rem;
}

.export-progress {
    background: var(--admin-surface);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--admin-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--admin-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--admin-text);
    font-weight: 500;
}

/* 亮色模式下的统计样式强化 */
[data-theme="light"] .stat-number,
:root .stat-number {
    color: #1e293b !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .stat-label,
:root .stat-label {
    color: #64748b !important;
}

[data-theme="light"] .preview-stats,
:root .preview-stats {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
}

/* 深色模式下的统计样式优化 */
[data-theme="dark"] .preview-stats {
    background: linear-gradient(135deg, var(--admin-surface) 0%, rgba(45, 45, 45, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .stat-number {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .stat-label {
    color: #e2e8f0 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .preview-stats {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .export-actions {
        flex-direction: column;
    }

    .export-actions .btn {
        width: 100%;
    }
}

/* 预览更新通知动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* 预览更新通知样式 */
.preview-update-notification {
    animation: slideInRight 0.3s ease;
}

.preview-update-notification i {
    margin-right: 6px;
}

/* 加载状态增强 */
.export-preview-container {
    position: relative;
}

#previewLoading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6c757d;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    margin: 1rem 0;
}

#previewLoading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #007bff;
}

#previewLoading span {
    font-size: 1rem;
    font-weight: 500;
}

#previewLoading button {
    margin-top: 1rem;
    transition: all 0.2s ease;
}

#previewLoading button:hover {
    background: var(--bg-secondary);
    border-color: #007bff;
    color: #007bff;
}

/* 字段选择样式 */
.export-fields-section {
    margin-bottom: 2rem;
}

.export-fields-section h4 {
    margin-bottom: 1rem;
    color: #495057;
    font-weight: 600;
}

.field-selection-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.field-selection-header .btn {
    font-size: 0.875rem;
    padding: 6px 12px;
}

.field-selection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    background: white;
    border-radius: 6px;
    padding: 0;
}

.field-selection-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.field-selection-item:hover {
    border-color: var(--admin-primary);
    background: rgba(45, 90, 39, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.field-selection-item .checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    margin: 0;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
}

.field-selection-item input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.field-selection-item input[type="checkbox"]:disabled {
    opacity: 0.6;
}

.field-selection-item .checkbox-label:has(input:disabled) {
    color: #6c757d;
    font-weight: 600;
}

/* 暗色主题适配 - field-selection-item */
[data-theme="dark"] .field-selection-item {
    background: rgba(45, 45, 45, 0.8) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .field-selection-item:hover {
    background: rgba(74, 124, 89, 0.1) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .field-selection-item .checkbox-label {
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .field-selection-item .checkbox-label:has(input:disabled) {
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .field-selection-item input[type="checkbox"] {
    accent-color: var(--admin-primary, #4a7c59) !important;
}

[data-theme="dark"] .field-selection-item input[type="checkbox"]:checked {
    background: var(--admin-primary, #4a7c59) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .field-selection-grid {
        grid-template-columns: 1fr;
        max-height: 200px;
    }

    .field-selection-header {
        justify-content: center;
    }

    .field-selection-header .btn {
        flex: 1;
        min-width: 80px;
    }
}

/* QR设置样式 */
.qr-settings-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--admin-surface);
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow);
}

.qr-settings-group h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--admin-text);
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--admin-primary);
}

.qr-settings-group h4 i {
    color: var(--admin-primary);
    font-size: 1.2rem;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-unit .form-control {
    flex: 1;
}

.input-with-unit .unit {
    color: var(--admin-text-light);
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 30px;
}

.qr-preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.qr-preview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-preview-canvas {
    width: 250px;
    height: 250px;
    border: 2px dashed var(--admin-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-bg);
    transition: all 0.3s ease;
}

.qr-preview-canvas:hover {
    border-color: var(--admin-primary);
    background: rgba(45, 90, 39, 0.05);
}

.qr-preview-placeholder {
    text-align: center;
    color: var(--admin-text-light);
}

.qr-preview-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.qr-preview-placeholder p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.qr-preview-info {
    padding: 1.5rem;
    background: var(--bg-info-light);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.qr-preview-info h5 {
    margin-bottom: 1rem;
    color: var(--admin-text);
    font-size: 1rem;
    font-weight: 600;
}

.qr-preview-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qr-preview-info li {
    padding: 0.5rem 0;
    color: var(--admin-text-light);
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
}

.qr-preview-info li::before {
    content: '•';
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* QR预览成功状态 */
.qr-preview-canvas.has-qr {
    border-color: #27ae60;
    background: var(--bg-success-light);
}

.qr-preview-canvas.has-qr img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* QR设置响应式 */
@media (max-width: 768px) {
    .qr-preview-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .qr-preview-canvas {
        width: 200px;
        height: 200px;
    }

    .qr-settings-group {
        padding: 1rem;
    }
}

/* 管理后台页脚样式 */
.admin-footer {
    margin-top: auto;
    padding: 1rem 2rem;
    border-top: 1px solid var(--admin-border);
    background: var(--admin-surface);
}

.admin-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.admin-footer-content p {
    margin: 0;
    color: var(--admin-text-secondary);
    font-size: 0.875rem;
}

.admin-footer .icp-info a {
    color: var(--admin-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
}

.admin-footer .icp-info a:hover {
    color: var(--admin-primary);
    background: rgba(var(--admin-primary-rgb, 59, 130, 246), 0.1);
    border-color: var(--admin-primary);
    transform: translateY(-1px);
}

.admin-footer .icp-info a i {
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .admin-footer {
        padding: 1rem;
    }

    .admin-footer-content p {
        font-size: 0.8rem;
    }
}

/* ==================== 导入Excel模态框暗色模式字体优化 ==================== */

/* 修复导入Excel模态框中的文件上传区域字体 */
[data-theme="dark"] .import-excel-modal .file-upload-area,
[data-theme="dark"] .modal-sidebar-combo .file-upload-area {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复上传区域内的所有文字元素 */
[data-theme="dark"] .import-excel-modal .upload-zone,
[data-theme="dark"] .import-excel-modal .file-upload-area,
[data-theme="dark"] .modal-sidebar-combo .upload-zone,
[data-theme="dark"] .modal-sidebar-combo .file-upload-area {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 强制覆盖上传区域内的所有子元素文字颜色 */
[data-theme="dark"] .import-excel-modal .upload-zone *,
[data-theme="dark"] .import-excel-modal .file-upload-area *,
[data-theme="dark"] .modal-sidebar-combo .upload-zone *,
[data-theme="dark"] .modal-sidebar-combo .file-upload-area *,
[data-theme="dark"] .import-excel-modal .upload-content *,
[data-theme="dark"] .modal-sidebar-combo .upload-content * {
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复上传区域的标题和描述文字 */
[data-theme="dark"] .import-excel-modal .upload-text h3,
[data-theme="dark"] .import-excel-modal .upload-text h4,
[data-theme="dark"] .import-excel-modal .upload-text p,
[data-theme="dark"] .import-excel-modal .upload-content h3,
[data-theme="dark"] .import-excel-modal .upload-content h4,
[data-theme="dark"] .import-excel-modal .upload-content p,
[data-theme="dark"] .modal-sidebar-combo .upload-text h3,
[data-theme="dark"] .modal-sidebar-combo .upload-text h4,
[data-theme="dark"] .modal-sidebar-combo .upload-text p,
[data-theme="dark"] .modal-sidebar-combo .upload-content h3,
[data-theme="dark"] .modal-sidebar-combo .upload-content h4,
[data-theme="dark"] .modal-sidebar-combo .upload-content p {
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复上传提示和小字 */
[data-theme="dark"] .import-excel-modal .upload-hint,
[data-theme="dark"] .import-excel-modal .upload-hint small,
[data-theme="dark"] .import-excel-modal .text-muted,
[data-theme="dark"] .import-excel-modal small,
[data-theme="dark"] .modal-sidebar-combo .upload-hint,
[data-theme="dark"] .modal-sidebar-combo .upload-hint small,
[data-theme="dark"] .modal-sidebar-combo .text-muted,
[data-theme="dark"] .modal-sidebar-combo small {
    color: var(--admin-text-light, #b0b0b0) !important;
}

/* 修复上传区域的图标颜色 */
[data-theme="dark"] .import-excel-modal .upload-icon,
[data-theme="dark"] .import-excel-modal .upload-icon-wrapper,
[data-theme="dark"] .modal-sidebar-combo .upload-icon,
[data-theme="dark"] .modal-sidebar-combo .upload-icon-wrapper {
    color: var(--admin-primary, #4a7c59) !important;
}

/* 修复步骤内容区域 */
[data-theme="dark"] .import-excel-modal .step-content,
[data-theme="dark"] .modal-sidebar-combo .step-content {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复步骤1的上传区域 */
[data-theme="dark"] .import-excel-modal .step-1 .upload-zone,
[data-theme="dark"] .modal-sidebar-combo .step-1 .upload-zone {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 强制覆盖任何可能的内联样式和动态样式 */
[data-theme="dark"] .import-excel-modal *[style*="color: black"],
[data-theme="dark"] .import-excel-modal *[style*="color: #000"],
[data-theme="dark"] .import-excel-modal *[style*="color: #333"],
[data-theme="dark"] .import-excel-modal *[style*="color: #666"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: black"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: #000"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: #333"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: #666"] {
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复导入模态框中的按钮文字 */
[data-theme="dark"] .import-excel-modal .btn,
[data-theme="dark"] .import-excel-modal button,
[data-theme="dark"] .modal-sidebar-combo .btn,
[data-theme="dark"] .modal-sidebar-combo button {
    color: white !important;
}

/* 修复导入模态框中的次要按钮 */
[data-theme="dark"] .import-excel-modal .btn-secondary,
[data-theme="dark"] .modal-sidebar-combo .btn-secondary {
    background: rgba(45, 45, 45, 0.8) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 修复导入模态框中的链接文字 */
[data-theme="dark"] .import-excel-modal a,
[data-theme="dark"] .modal-sidebar-combo a {
    color: var(--admin-primary, #4a7c59) !important;
}

/* 修复导入模态框中的标签文字 */
[data-theme="dark"] .import-excel-modal label,
[data-theme="dark"] .modal-sidebar-combo label {
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复导入模态框中的占位符文字 */
[data-theme="dark"] .import-excel-modal input::placeholder,
[data-theme="dark"] .import-excel-modal textarea::placeholder,
[data-theme="dark"] .modal-sidebar-combo input::placeholder,
[data-theme="dark"] .modal-sidebar-combo textarea::placeholder {
    color: var(--admin-text-light, #b0b0b0) !important;
}

/* 最高优先级覆盖 - 确保所有文字都是浅色 */
html[data-theme="dark"] .import-excel-modal,
html[data-theme="dark"] .import-excel-modal *:not(.btn):not(button):not(.fa):not(.fas):not(.far):not(.fab),
html[data-theme="dark"] .modal-sidebar-combo.import-excel-modal,
html[data-theme="dark"] .modal-sidebar-combo.import-excel-modal *:not(.btn):not(button):not(.fa):not(.fas):not(.far):not(.fab) {
    color: var(--admin-text, #e8e8e8) !important;
}

/* ==================== 导入Excel模态框上传区域优化 ==================== */

/* 优化后的单层上传区域样式 */
.step-1 .upload-zone {
    max-width: 500px;
    margin: 2rem auto;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-secondary) 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.step-1 .upload-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(16, 185, 129, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-1 .upload-zone:hover::before,
.step-1 .upload-zone.drag-over::before {
    opacity: 1;
}

.step-1 .upload-zone:hover,
.step-1 .upload-zone.drag-over {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* 暗色模式下的上传区域优化 */
[data-theme="dark"] .step-1 .upload-zone {
    border-color: var(--admin-border, #404040);
    background: var(--admin-surface, #2d2d2d);
    color: var(--admin-text, #e8e8e8);
}

[data-theme="dark"] .step-1 .upload-zone:hover,
[data-theme="dark"] .step-1 .upload-zone.drag-over {
    border-color: var(--admin-primary, #4a7c59);
    background: rgba(74, 124, 89, 0.2);
}

/* 粘贴功能相关样式 */
.step-1 .upload-zone:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.step-1 .upload-zone:focus::after {
    content: '可以使用 Ctrl+V 粘贴文件';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
}

/* 暗色模式下的焦点样式 */
[data-theme="dark"] .step-1 .upload-zone:focus {
    border-color: var(--admin-primary, #4a7c59);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.2);
}

[data-theme="dark"] .step-1 .upload-zone:focus::after {
    background: rgba(74, 124, 89, 0.9);
}

/* ==================== 导出Excel预览模态框暗色模式适配 ==================== */

/* 修复分类标签内容区域 */
[data-theme="dark"] .export-preview-modal .category-tabs-content,
[data-theme="dark"] .modal-sidebar-combo .category-tabs-content {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复分类表格包装器 */
[data-theme="dark"] .export-preview-modal .category-table-wrapper,
[data-theme="dark"] .modal-sidebar-combo .category-table-wrapper {
    background: var(--admin-surface, #2d2d2d) !important;
    border: 1px solid var(--admin-border, #404040) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* 修复表格滚动包装器 */
[data-theme="dark"] .export-preview-modal .table-scroll-wrapper,
[data-theme="dark"] .modal-sidebar-combo .table-scroll-wrapper {
    background: var(--admin-surface, #2d2d2d) !important;
    scrollbar-color: var(--admin-border, #404040) var(--admin-surface, #2d2d2d) !important;
}

/* 修复表格滚动包装器的滚动条 */
[data-theme="dark"] .export-preview-modal .table-scroll-wrapper::-webkit-scrollbar-track,
[data-theme="dark"] .modal-sidebar-combo .table-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--admin-surface, #2d2d2d) !important;
}

[data-theme="dark"] .export-preview-modal .table-scroll-wrapper::-webkit-scrollbar-thumb,
[data-theme="dark"] .modal-sidebar-combo .table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .export-preview-modal .table-scroll-wrapper::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .modal-sidebar-combo .table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--admin-text-light, #b0b0b0) !important;
}

/* 修复分类表格 */
[data-theme="dark"] .export-preview-modal .category-table,
[data-theme="dark"] .modal-sidebar-combo .category-table {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复分类表格的表头和单元格 */
[data-theme="dark"] .export-preview-modal .category-table th,
[data-theme="dark"] .export-preview-modal .category-table td,
[data-theme="dark"] .modal-sidebar-combo .category-table th,
[data-theme="dark"] .modal-sidebar-combo .category-table td {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-bottom-color: var(--admin-border, #404040) !important;
}

/* 修复分类标签面板 */
[data-theme="dark"] .export-preview-modal .category-tab-pane,
[data-theme="dark"] .modal-sidebar-combo .category-tab-pane {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复预览表格容器的滚动条 */
[data-theme="dark"] .export-preview-modal .preview-table-container,
[data-theme="dark"] .modal-sidebar-combo .preview-table-container {
    background: var(--admin-surface, #2d2d2d) !important;
    scrollbar-width: thin !important;
    scrollbar-color: var(--admin-border, #404040) var(--admin-surface, #2d2d2d) !important;
}

[data-theme="dark"] .export-preview-modal .preview-table-container::-webkit-scrollbar,
[data-theme="dark"] .modal-sidebar-combo .preview-table-container::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

[data-theme="dark"] .export-preview-modal .preview-table-container::-webkit-scrollbar-track,
[data-theme="dark"] .modal-sidebar-combo .preview-table-container::-webkit-scrollbar-track {
    background: var(--admin-surface, #2d2d2d) !important;
    border-radius: 4px !important;
}

[data-theme="dark"] .export-preview-modal .preview-table-container::-webkit-scrollbar-thumb,
[data-theme="dark"] .modal-sidebar-combo .preview-table-container::-webkit-scrollbar-thumb {
    background: var(--admin-border, #404040) !important;
    border-radius: 4px !important;
    transition: background 0.2s ease !important;
}

[data-theme="dark"] .export-preview-modal .preview-table-container::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .modal-sidebar-combo .preview-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .export-preview-modal .preview-table-container::-webkit-scrollbar-corner,
[data-theme="dark"] .modal-sidebar-combo .preview-table-container::-webkit-scrollbar-corner {
    background: var(--admin-surface, #2d2d2d) !important;
}

/* 修复预览加载组件 */
[data-theme="dark"] .export-preview-modal .preview-loading,
[data-theme="dark"] .modal-sidebar-combo .preview-loading {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .export-preview-modal .preview-loading i,
[data-theme="dark"] .modal-sidebar-combo .preview-loading i {
    color: var(--admin-primary, #4a7c59) !important;
}

/* ==================== 其他组件暗色主题适配 ==================== */

/* 修复简约预览头部 */
[data-theme="dark"] .preview-header-simple {
    background: linear-gradient(135deg, var(--admin-surface, #2d2d2d) 0%, rgba(45, 45, 45, 0.8) 100%) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .preview-title {
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .preview-title i {
    color: var(--admin-primary, #4a7c59) !important;
}

/* 修复状态徽章 */
[data-theme="dark"] .stat-badge {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .stat-badge-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
}

[data-theme="dark"] .stat-badge-warning .stat-number {
    color: #fbbf24 !important;
}

[data-theme="dark"] .stat-badge-warning .stat-text {
    color: #f59e0b !important;
}

[data-theme="dark"] .stat-number {
    color: var(--admin-primary, #4a7c59) !important;
}

[data-theme="dark"] .stat-text {
    color: var(--admin-text-light, #b0b0b0) !important;
}

/* 修复工作表预览区域 */
[data-theme="dark"] .worksheets-preview-section {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .worksheets-preview-section h4 {
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复工作表预览项目 */
[data-theme="dark"] .worksheet-preview-item {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .worksheet-preview-name {
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .worksheet-preview-count {
    color: var(--admin-text-light, #b0b0b0) !important;
}

/* 修复重复信息组件 */
[data-theme="dark"] .duplicate-info {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .duplicate-info h5,
[data-theme="dark"] .duplicate-info h6 {
    color: #fbbf24 !important;
}

[data-theme="dark"] .duplicate-info p,
[data-theme="dark"] .duplicate-info small {
    color: #f59e0b !important;
}

/* 修复进度条组件 */
[data-theme="dark"] .worksheet-stat-progress .progress-bar {
    background: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .worksheet-stat-progress .progress-fill {
    background: linear-gradient(90deg, var(--admin-primary, #4a7c59), #6b9b7a) !important;
}

[data-theme="dark"] .worksheet-stat-progress .progress-text {
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .worksheet-preview-progress .progress-bar {
    background: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .worksheet-preview-progress .progress-fill {
    background: linear-gradient(90deg, var(--admin-primary, #4a7c59), #6b9b7a) !important;
}

/* 修复工作表错误信息 */
[data-theme="dark"] .worksheet-errors {
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .worksheet-errors small {
    color: var(--admin-text-light, #b0b0b0) !important;
}

/* 修复硬编码的颜色样式 */
[data-theme="dark"] .progress-section h4,
[data-theme="dark"] .stats-section h4 {
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .progress-section h4 i,
[data-theme="dark"] .stats-section h4 i {
    color: var(--admin-primary, #4a7c59) !important;
}

/* 修复预览统计简单样式 */
[data-theme="dark"] .preview-stats-simple {
    background: var(--admin-surface, #2d2d2d) !important;
}

/* 修复所有可能的硬编码白色背景 */
[data-theme="dark"] .import-excel-modal *[style*="background: white"],
[data-theme="dark"] .import-excel-modal *[style*="background-color: white"],
[data-theme="dark"] .import-excel-modal *[style*="background: #fff"],
[data-theme="dark"] .import-excel-modal *[style*="background-color: #fff"],
[data-theme="dark"] .modal-sidebar-combo *[style*="background: white"],
[data-theme="dark"] .modal-sidebar-combo *[style*="background-color: white"],
[data-theme="dark"] .modal-sidebar-combo *[style*="background: #fff"],
[data-theme="dark"] .modal-sidebar-combo *[style*="background-color: #fff"] {
    background: var(--admin-surface, #2d2d2d) !important;
}

/* 修复所有可能的硬编码黑色文字 */
[data-theme="dark"] .import-excel-modal *[style*="color: black"],
[data-theme="dark"] .import-excel-modal *[style*="color: #000"],
[data-theme="dark"] .import-excel-modal *[style*="color: #333"],
[data-theme="dark"] .import-excel-modal *[style*="color: #374151"],
[data-theme="dark"] .import-excel-modal *[style*="color: #1e293b"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: black"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: #000"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: #333"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: #374151"],
[data-theme="dark"] .modal-sidebar-combo *[style*="color: #1e293b"] {
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复所有可能的硬编码灰色边框 */
[data-theme="dark"] .import-excel-modal *[style*="border-color: #e2e8f0"],
[data-theme="dark"] .import-excel-modal *[style*="border-color: #e5e7eb"],
[data-theme="dark"] .import-excel-modal *[style*="border-color: #d1d5db"],
[data-theme="dark"] .modal-sidebar-combo *[style*="border-color: #e2e8f0"],
[data-theme="dark"] .modal-sidebar-combo *[style*="border-color: #e5e7eb"],
[data-theme="dark"] .modal-sidebar-combo *[style*="border-color: #d1d5db"] {
    border-color: var(--admin-border, #404040) !important;
}

/* 修复表格相关的硬编码样式 */
[data-theme="dark"] .import-excel-modal table,
[data-theme="dark"] .import-excel-modal .table,
[data-theme="dark"] .modal-sidebar-combo table,
[data-theme="dark"] .modal-sidebar-combo .table {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .import-excel-modal table th,
[data-theme="dark"] .import-excel-modal table td,
[data-theme="dark"] .import-excel-modal .table th,
[data-theme="dark"] .import-excel-modal .table td,
[data-theme="dark"] .modal-sidebar-combo table th,
[data-theme="dark"] .modal-sidebar-combo table td,
[data-theme="dark"] .modal-sidebar-combo .table th,
[data-theme="dark"] .modal-sidebar-combo .table td {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 修复卡片组件 */
[data-theme="dark"] .import-excel-modal .card,
[data-theme="dark"] .import-excel-modal .card-body,
[data-theme="dark"] .import-excel-modal .card-header,
[data-theme="dark"] .modal-sidebar-combo .card,
[data-theme="dark"] .modal-sidebar-combo .card-body,
[data-theme="dark"] .modal-sidebar-combo .card-header {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 修复列表组件 */
[data-theme="dark"] .import-excel-modal .list-group,
[data-theme="dark"] .import-excel-modal .list-group-item,
[data-theme="dark"] .modal-sidebar-combo .list-group,
[data-theme="dark"] .modal-sidebar-combo .list-group-item {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 修复警告和信息框 */
[data-theme="dark"] .import-excel-modal .alert,
[data-theme="dark"] .modal-sidebar-combo .alert {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .import-excel-modal .alert-warning,
[data-theme="dark"] .modal-sidebar-combo .alert-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border-color: #f59e0b !important;
}

[data-theme="dark"] .import-excel-modal .alert-info,
[data-theme="dark"] .modal-sidebar-combo .alert-info {
    background: rgba(74, 124, 89, 0.2) !important;
    color: var(--admin-primary, #4a7c59) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

/* 修复徽章组件 */
[data-theme="dark"] .import-excel-modal .badge,
[data-theme="dark"] .modal-sidebar-combo .badge {
    background: var(--admin-primary, #4a7c59) !important;
    color: white !important;
}

[data-theme="dark"] .import-excel-modal .badge-secondary,
[data-theme="dark"] .modal-sidebar-combo .badge-secondary {
    background: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复输入框和表单元素 */
[data-theme="dark"] .import-excel-modal input,
[data-theme="dark"] .import-excel-modal select,
[data-theme="dark"] .import-excel-modal textarea,
[data-theme="dark"] .modal-sidebar-combo input,
[data-theme="dark"] .modal-sidebar-combo select,
[data-theme="dark"] .modal-sidebar-combo textarea {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .import-excel-modal input:focus,
[data-theme="dark"] .import-excel-modal select:focus,
[data-theme="dark"] .import-excel-modal textarea:focus,
[data-theme="dark"] .modal-sidebar-combo input:focus,
[data-theme="dark"] .modal-sidebar-combo select:focus,
[data-theme="dark"] .modal-sidebar-combo textarea:focus {
    border-color: var(--admin-primary, #4a7c59) !important;
    box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.2) !important;
}

/* 修复分隔线 */
[data-theme="dark"] .import-excel-modal hr,
[data-theme="dark"] .modal-sidebar-combo hr {
    border-color: var(--admin-border, #404040) !important;
}

/* 修复代码块和预格式化文本 */
[data-theme="dark"] .import-excel-modal code,
[data-theme="dark"] .import-excel-modal pre,
[data-theme="dark"] .modal-sidebar-combo code,
[data-theme="dark"] .modal-sidebar-combo pre {
    background: rgba(0, 0, 0, 0.3) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 修复工具提示 */
[data-theme="dark"] .import-excel-modal .tooltip,
[data-theme="dark"] .modal-sidebar-combo .tooltip {
    background: rgba(0, 0, 0, 0.9) !important;
    color: white !important;
}

/* 修复下拉菜单 */
[data-theme="dark"] .import-excel-modal .dropdown-menu,
[data-theme="dark"] .modal-sidebar-combo .dropdown-menu {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .import-excel-modal .dropdown-item,
[data-theme="dark"] .modal-sidebar-combo .dropdown-item {
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .import-excel-modal .dropdown-item:hover,
[data-theme="dark"] .modal-sidebar-combo .dropdown-item:hover {
    background: rgba(74, 124, 89, 0.2) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 最终兜底规则 - 确保所有元素都适配暗色主题 */
[data-theme="dark"] .import-excel-modal,
[data-theme="dark"] .import-excel-modal *,
[data-theme="dark"] .modal-sidebar-combo.import-excel-modal,
[data-theme="dark"] .modal-sidebar-combo.import-excel-modal * {
    /* 强制覆盖任何可能遗漏的样式 */
    scrollbar-color: var(--admin-border, #404040) var(--admin-surface, #2d2d2d) !important;
}



/* 确保主要容器有正确的背景 */
[data-theme="dark"] .import-excel-modal .modal-content,
[data-theme="dark"] .import-excel-modal .modal-body,
[data-theme="dark"] .modal-sidebar-combo .modal-content,
[data-theme="dark"] .modal-sidebar-combo .modal-body {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* ==================== 工作表标签和其他组件暗色主题适配 ==================== */

/* 修复工作表标签激活状态 */
[data-theme="dark"] .worksheet-tab.active {
    background: var(--admin-primary, #4a7c59) !important;
    color: white !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

/* 修复工作表标签悬停状态 */
[data-theme="dark"] .worksheet-tab:hover {
    background: rgba(74, 124, 89, 0.2) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

/* 修复工作表标签默认状态 */
[data-theme="dark"] .worksheet-tab {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 修复利润率显示 */
[data-theme="dark"] .profit-margin-display {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .profit-margin-display .profit-value {
    color: var(--admin-primary, #4a7c59) !important;
}

[data-theme="dark"] .profit-margin-display .profit-label {
    color: var(--admin-text-light, #b0b0b0) !important;
}

/* 修复状态控制组件 */
[data-theme="dark"] .status-control {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .status-control select,
[data-theme="dark"] .status-control input {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

/* 修复切换标签激活状态 */
[data-theme="dark"] .toggle-label-active {
    background: var(--admin-primary, #4a7c59) !important;
    color: white !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

[data-theme="dark"] .toggle-label {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .toggle-label:hover {
    background: rgba(74, 124, 89, 0.2) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复无图片占位符 */
[data-theme="dark"] .modal-sidebar-combo .no-images-placeholder,
[data-theme="dark"] .images-container .no-images-placeholder {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text-light, #b0b0b0) !important;
    border: 2px dashed var(--admin-border, #404040) !important;
}

[data-theme="dark"] .no-images-placeholder i {
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .no-images-placeholder p,
[data-theme="dark"] .no-images-placeholder span {
    color: var(--admin-text-light, #b0b0b0) !important;
}

/* 修复图片容器相关组件 */
[data-theme="dark"] .images-container {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .image-item {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .image-item:hover {
    background: rgba(74, 124, 89, 0.2) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

/* 修复切换开关组件 */
[data-theme="dark"] .toggle-switch {
    background: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .toggle-switch.active {
    background: var(--admin-primary, #4a7c59) !important;
}

/* 修复单选框项组件暗色模式 */
[data-theme="dark"] .radio-item {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .radio-item:hover {
    border-color: var(--admin-primary, #4a7c59) !important;
    background: rgba(74, 124, 89, 0.1) !important;
}

[data-theme="dark"] .radio-item:has(input[type="radio"]:checked) {
    border-color: var(--admin-primary, #4a7c59) !important;
    background: rgba(74, 124, 89, 0.15) !important;
}

[data-theme="dark"] .radio-item .radio-title {
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .radio-item .radio-desc {
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .radio-item input[type="radio"]:checked + label .radio-title {
    color: var(--admin-primary, #4a7c59) !important;
}

/* 修复工作表项组件暗色模式 */
[data-theme="dark"] .worksheet-item {
    background: var(--admin-surface, #2d2d2d) !important;
    border-color: var(--admin-border, #404040) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .worksheet-name {
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .worksheet-rows {
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .toggle-switch-handle {
    background: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* 修复标签页组件 */
[data-theme="dark"] .nav-tabs {
    border-bottom-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .nav-tabs .nav-link {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .nav-tabs .nav-link:hover {
    background: rgba(74, 124, 89, 0.2) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    background: var(--admin-primary, #4a7c59) !important;
    color: white !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

/* 修复面包屑导航 */
[data-theme="dark"] .breadcrumb {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}

[data-theme="dark"] .breadcrumb-item a {
    color: var(--admin-primary, #4a7c59) !important;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--admin-text-light, #b0b0b0) !important;
}

/* 修复分页组件 */
[data-theme="dark"] .pagination .page-link {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .pagination .page-link:hover {
    background: rgba(74, 124, 89, 0.2) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background: var(--admin-primary, #4a7c59) !important;
    color: white !important;
    border-color: var(--admin-primary, #4a7c59) !important;
}

/* 修复搜索框和过滤器 */
[data-theme="dark"] .search-box,
[data-theme="dark"] .filter-box {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .search-box:focus,
[data-theme="dark"] .filter-box:focus {
    border-color: var(--admin-primary, #4a7c59) !important;
    box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.2) !important;
}

/* 修复加载状态和占位符 */
[data-theme="dark"] .loading-placeholder,
[data-theme="dark"] .skeleton-loader {
    background: linear-gradient(90deg, rgba(45, 45, 45, 0.8) 25%, rgba(74, 124, 89, 0.2) 50%, rgba(45, 45, 45, 0.8) 75%) !important;
}

[data-theme="dark"] .loading-spinner {
    border-color: rgba(74, 124, 89, 0.2) !important;
    border-top-color: var(--admin-primary, #4a7c59) !important;
}

/* 修复模态框相关的所有可能遗漏的元素 */
[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.7) !important;
}

[data-theme="dark"] .modal-header {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
    border-bottom-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .modal-footer {
    background: var(--admin-surface, #2d2d2d) !important;
    border-top-color: var(--admin-border, #404040) !important;
}

[data-theme="dark"] .modal-title {
    color: var(--admin-text, #e8e8e8) !important;
}

/* 修复所有可能的文本颜色类 */
[data-theme="dark"] .text-muted {
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .text-primary {
    color: var(--admin-primary, #4a7c59) !important;
}

[data-theme="dark"] .text-secondary {
    color: var(--admin-text-light, #b0b0b0) !important;
}

[data-theme="dark"] .text-success {
    color: #10b981 !important;
}

[data-theme="dark"] .text-warning {
    color: #f59e0b !important;
}

[data-theme="dark"] .text-danger {
    color: #ef4444 !important;
}

[data-theme="dark"] .text-info {
    color: var(--admin-primary, #4a7c59) !important;
}

/* 修复背景颜色类 */
[data-theme="dark"] .bg-light {
    background: var(--admin-surface, #2d2d2d) !important;
}

[data-theme="dark"] .bg-white {
    background: var(--admin-surface, #2d2d2d) !important;
}

[data-theme="dark"] .bg-secondary {
    background: rgba(45, 45, 45, 0.8) !important;
}



/* 确保主要容器和内容区域有正确的背景色 */
[data-theme="dark"] .import-excel-modal .step-content,
[data-theme="dark"] .import-excel-modal .modal-sidebar,
[data-theme="dark"] .import-excel-modal .sidebar-content,
[data-theme="dark"] .modal-sidebar-combo .step-content,
[data-theme="dark"] .modal-sidebar-combo .modal-sidebar,
[data-theme="dark"] .modal-sidebar-combo .sidebar-content {
    background: var(--admin-surface, #2d2d2d) !important;
    color: var(--admin-text, #e8e8e8) !important;
}
