/* 苹果安全库存管理系统 - 销售监控页面样式 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
    overflow-x: hidden;
}

/* 加载动画 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.apple-logo {
    font-size: 48px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.loading-text {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 500;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 主应用容器 */
.app-container {
    min-height: 100vh;
    background: #f5f5f7;
}

/* 顶部导航栏 */
.top-navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-button, .dashboard-button, .refresh-button, .export-button, .filter-toggle-button {
    background: none;
    border: none;
    color: #007aff;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-button:hover, .dashboard-button:hover, .refresh-button:hover, .export-button:hover, .filter-toggle-button:hover {
    background: rgba(0, 122, 255, 0.1);
    transform: translateY(-1px);
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
}

/* 筛选区域 */
.filter-section {
    background: white;
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.applied-filters h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-button {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-button:hover {
    background: #e9ecef;
    border-color: #007aff;
    color: #007aff;
    transform: translateY(-1px);
}

.filter-button.active {
    background: #007aff;
    border-color: #007aff;
    color: white;
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.filter-button.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

.clear-all-filters {
    background: #dc3545;
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.clear-all-filters:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background: #007aff;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-tag .remove-tag {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s ease;
}

.filter-tag .remove-tag:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 主要内容区域 */
.main-content {
    padding: 0 24px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 汇总统计区域 */
.summary-section {
    margin-bottom: 24px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.summary-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

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

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.summary-content {
    flex: 1;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.2;
}

.summary-label {
    font-size: 14px;
    color: #6e6e73;
    font-weight: 500;
    margin-top: 4px;
}

/* 数据可视化区域 */
.visualization-section {
    margin-bottom: 24px;
}

.chart-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-row:last-child {
    margin-bottom: 0;
}

.chart-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 24px;
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.chart-container.full-width {
    flex: 1;
    height: 350px;
    max-height: 350px;
}

.chart-container.full-width .chart-content {
    height: 280px;
}

.chart-container.full-width canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-action {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.chart-action:hover {
    background: #e9ecef;
    color: #007aff;
    transform: translateY(-1px);
}

.chart-content {
    position: relative;
}

/* 表格区域 */
.table-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 24px;
}

.table-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.record-count {
    font-size: 14px;
    color: #6e6e73;
    font-weight: 500;
}

.table-actions {
    display: flex;
    gap: 12px;
}

.export-summary-button, .export-detail-button {
    background: #007aff;
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.export-summary-button:hover, .export-detail-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.export-detail-button {
    background: #28a745;
}

.export-detail-button:hover {
    background: #1e7e34;
}

.table-container {
    padding: 0 24px 24px;
    overflow-x: auto;
    min-width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f8f9fa;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.data-table th:hover {
    background: #e9ecef;
    color: #007aff;
}

.data-table th.sortable {
    position: relative;
}

.data-table th.sortable::after {
    content: '\f0dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    transition: all 0.2s ease;
}

.data-table th.sort-asc::after {
    content: '\f0de';
    opacity: 1;
    color: #007aff;
}

.data-table th.sort-desc::after {
    content: '\f0dd';
    opacity: 1;
    color: #007aff;
}

/* 列宽调整功能样式 */
.data-table th {
    position: relative;
    user-select: none;
}

.resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86868b;
    font-size: 12px;
    transition: background-color 0.1s ease; /* 减少过渡时间 */
    z-index: 20;
    user-select: none;
}

.resize-handle:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

.resize-handle:active {
    background: rgba(0, 122, 255, 0.2);
    color: #007aff;
}

/* 调整时的全局样式 */
body.resizing {
    cursor: col-resize !important;
    user-select: none;
}

/* 拖拽时的表格优化 - 减少延迟 */
.data-table.resizing {
    pointer-events: none;
}

.data-table.resizing th,
.data-table.resizing td {
    pointer-events: none;
}

/* 确保拖拽手柄在拖拽时仍然可交互 */
.data-table.resizing .resize-handle {
    pointer-events: auto;
}

/* 确保表格列宽可以调整 - 优化性能 */
.data-table {
    table-layout: fixed;
    min-width: 100%;
    width: 100%;
    will-change: auto;
}

/* 优化表格性能 - 减少重排 */
.data-table th,
.data-table td {
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: none; /* 移除过渡动画，减少延迟 */
}

/* 拖拽时的性能优化 */
.data-table.resizing th,
.data-table.resizing td {
    transition: none;
    transform: translateZ(0); /* 启用硬件加速 */
}

/* 设置默认列宽 */
.data-table th:nth-child(1) { min-width: 120px; width: 150px; } /* 代理商 */
.data-table th:nth-child(2) { min-width: 100px; width: 120px; } /* MPN */
.data-table th:nth-child(3) { min-width: 100px; width: 120px; } /* 总销量 */
.data-table th:nth-child(4) { min-width: 100px; width: 120px; } /* 均销量 */
.data-table th:nth-child(5) { min-width: 100px; width: 120px; } /* 最高销量 */
.data-table th:nth-child(6) { min-width: 80px; width: 100px; }  /* 销售天数 */

/* 操作列固定宽度 */
.data-table th:last-child { width: 120px; min-width: 120px; }

.data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #1d1d1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(0, 122, 255, 0.05);
}

.action-button {
    background: #007aff;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.action-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.detail-row {
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.detail-row.show {
    background: rgba(0, 122, 255, 0.02);
}

.detail-container {
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 16px;
    min-width: 900px;
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

.detail-container h4 {
    margin-bottom: 16px;
    color: #1d1d1f;
    font-size: 16px;
    font-weight: 600;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-table th {
    background: #007aff;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #0056b3;
}

.detail-table td {
    padding: 12px;
    font-size: 13px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    color: #1d1d1f;
}

.detail-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.detail-table tbody tr:hover {
    background: rgba(0, 122, 255, 0.05);
}

.detail-table-wrapper {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 8px;
    min-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* 确保详细表格列宽固定 */
.detail-table {
    table-layout: fixed;
}

.detail-table th:nth-child(1) { width: 25%; }
.detail-table th:nth-child(2) { width: 20%; }
.detail-table th:nth-child(3) { width: 15%; }
.detail-table th:nth-child(4) { width: 15%; }
.detail-table th:nth-child(5) { width: 25%; }

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.pagination-button {
    background: white;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-button:hover:not(:disabled) {
    background: #f8f9fa;
    color: #007aff;
    border-color: #007aff;
    transform: translateY(-1px);
}

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

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-number {
    background: white;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    background: #f8f9fa;
    color: #007aff;
    border-color: #007aff;
}

.page-number.active {
    background: #007aff;
    border-color: #007aff;
    color: white;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

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

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
}

.modal-close {
    background: none;
    border: none;
    color: #6e6e73;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-button {
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-button.primary {
    background: #007aff;
    color: white;
}

.modal-button.primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.modal-button.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.modal-button.secondary:hover {
    background: #e9ecef;
    color: #1d1d1f;
}

/* 详细信息样式 */
.detail-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

.detail-value {
    font-weight: 500;
    color: #1d1d1f;
}

.detail-table-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* 表单样式 */
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 添加代理商弹窗中的按钮样式 */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #007aff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #1d1d1f;
}

/* 模态框底部样式 */
.modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* 导出选项样式 */
.export-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.export-option {
    padding: 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.export-option:hover {
    background: #f8f9fa;
    border-color: #007aff;
}

.export-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
}

.export-option input[type="radio"] {
    margin: 0;
}

.radio-label {
    font-size: 16px;
    color: #1d1d1f;
}

.option-description {
    margin-top: 8px;
    margin-left: 24px;
    font-size: 13px;
    color: #6e6e73;
}

/* 筛选模态框特殊样式 */
.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-container input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.filter-controls-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: flex-start;
}

.filter-control-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-control-btn:hover {
    background: #e9ecef;
    color: #007aff;
    border-color: #007aff;
    transform: translateY(-1px);
}

.filter-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(0, 122, 255, 0.05);
    border-color: #007aff;
}

.filter-option input[type="checkbox"] {
    margin: 0;
}

.filter-option label {
    font-size: 14px;
    color: #1d1d1f;
    cursor: pointer;
    font-weight: 500;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 已添加标识样式 */
.added-badge {
    background: #34c759;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 禁用状态的筛选选项 */
.filter-option.disabled {
    opacity: 0.6;
    background: #f8f9fa;
    cursor: not-allowed;
}

.filter-option.disabled:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.filter-option.disabled label {
    cursor: not-allowed;
    color: #6e6e73;
}

.filter-option.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.filter-search {
    margin-bottom: 16px;
}

.filter-search input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-search input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 范围筛选样式 */
.range-filter {
    margin-bottom: 16px;
}

.range-filter label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.range-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.range-input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.range-separator {
    color: #6e6e73;
    font-weight: 500;
}

/* 时间范围选择器 */
.time-range-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.time-range-option {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-range-option:hover {
    background: #f8f9fa;
    color: #007aff;
    border-color: #007aff;
}

.time-range-option.active {
    background: #007aff;
    color: white;
    border-color: #007aff;
}

/* 提示信息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

.toast.info {
    background: #17a2b8;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-row {
        flex-direction: column;
    }
    
    /* 在小屏幕上禁用列宽调整 */
    .resize-handle {
        display: none;
    }
    
    .data-table th.resizable {
        cursor: default;
    }
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .top-navbar {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-left, .nav-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-left {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .back-button, .dashboard-button {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .main-content {
        padding: 0 16px 16px;
    }
    
    .filter-section {
        margin: 16px;
        padding: 16px;
    }
    
    .table-container {
        padding: 0 16px 16px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .filter-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 16px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-card, .chart-container, .table-section {
    animation: fadeInUp 0.6s ease forwards;
}

.summary-card:nth-child(2) { animation-delay: 0.1s; }
.summary-card:nth-child(3) { animation-delay: 0.2s; }
.summary-card:nth-child(4) { animation-delay: 0.3s; }

/* 图表特殊样式 */
#chinaMapChart {
    min-height: 300px;
}

/* 筛选标签动画 */
.filter-tag {
    animation: slideIn 0.3s ease;
}

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

/* 表格行展开动画 */
.detail-row {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.detail-row.show {
    max-height: 800px;
    overflow: visible;
}

/* 确保详细行内容不被截断 */
.detail-row.show td {
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
}

/* 加载状态 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 地图相关样式 */
.map-stats {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.map-stats .stat-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #dee2e6;
}

.map-stats .stat-item:last-child {
    border-bottom: none;
}

.map-stats .stat-label {
    font-weight: 500;
    color: #495057;
}

.map-stats .stat-value {
    font-weight: bold;
    color: #007AFF;
}

.chart-controls .chart-action {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #007AFF;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-controls .chart-action:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.chart-controls .chart-action:active {
    transform: translateY(0);
}

.field-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
}

.field-selector label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.field-select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.field-select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.25);
}

#chinaMapChart {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* TOP数量切换按钮样式 */
.top-count-selector {
    display: flex;
    gap: 4px;
    margin-left: 15px;
}

.top-count-btn {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    background: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 50px;
}

.top-count-btn:hover {
    border-color: #007AFF;
    color: #007AFF;
    background: rgba(0, 122, 255, 0.05);
}

.top-count-btn.active {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
    box-shadow: 0 2px 4px rgba(0, 122, 255, 0.3);
}

.top-count-btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.top-count-btn:not(:first-child):not(:last-child) {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.top-count-btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 调整TOP省份图表高度 */
#topProvincesChart {
    max-height: 500px !important;
    height: 400px !important;
}

/* 专门调整TOP省份图表容器的高度 */
.chart-container:has(#topProvincesChart) {
    min-height: 500px;
}

.chart-container:has(#topProvincesChart) .chart-content {
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 优化TOP省份图表的显示效果 */
#topProvincesChart {
    max-height: 500px !important;
    height: 400px !important;
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chart-controls {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .field-selector {
        margin-right: 0;
        justify-content: space-between;
    }
    
    .chart-controls .chart-action {
        justify-content: center;
    }
    
    #chinaMapChart {
        height: 300px !important;
    }
}
