/* 报表图表样式 */
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card.highlight {
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  color: white;
}

.stat-card.highlight .stat-content h3,
.stat-card.highlight .stat-content p {
  color: white;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.stat-card:nth-child(1) .stat-icon { background: linear-gradient(135deg, #fa709a, #fee140); }
.stat-card:nth-child(2) .stat-icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card:nth-child(3) .stat-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.stat-card:nth-child(4) .stat-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.stat-card:nth-child(5) .stat-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card:nth-child(6) .stat-icon { background: linear-gradient(135deg, #a8edea, #fed6e3); }
.stat-card:nth-child(7) .stat-icon { background: linear-gradient(135deg, #07c160, #10b981); }
.stat-card:nth-child(8) .stat-icon { background: linear-gradient(135deg, #1677ff, #4096ff); }

.stat-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.stat-content p {
  font-size: 12px;
  color: #7f8c8d;
}

/* 报表标签页 */
.report-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

.report-tab {
  padding: 10px 20px;
  border: none;
  background: #f5f6fa;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
}

.report-tab:hover {
  background: #e9ecef;
}

.report-tab.active {
  background: var(--primary-color);
  color: white;
}

.report-content {
  display: none;
}

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

/* 报表表格 */
.report-table-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  overflow-x: auto;
}

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

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.data-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
  font-size: 13px;
  white-space: nowrap;
}

.data-table td {
  font-size: 13px;
  color: #555;
}

.data-table tbody tr:hover {
  background: #f8f9fa;
}

.data-table tfoot .summary-row {
  background: linear-gradient(135deg, #fff5f0, #fff);
  font-weight: 600;
}

.data-table tfoot td {
  border-top: 2px solid var(--primary-color);
  border-bottom: none;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.pagination-btns {
  display: flex;
  gap: 5px;
}

.page-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all 0.2s;
}

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

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

.page-info {
  font-size: 13px;
  color: #999;
}

/* 按钮样式 */
.btn-secondary {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #28a745;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #218838;
}

.btn-danger {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #dc3545;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #c82333;
}

/* 模态遮罩层 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 清空报表模态框 */
.clear-report-modal {
  max-width: 480px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* 清空报表模态框 */
.clear-report-modal {
  max-width: 480px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
}

.clear-report-modal .modal-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.clear-report-modal .modal-header.danger {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: white;
}

.clear-report-modal .modal-header i {
  font-size: 24px;
}

.clear-report-modal .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.clear-report-modal .modal-body {
  padding: 24px;
}

.clear-report-modal .warning-box {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #fff5f5;
  border: 1px solid #ffcccc;
  border-radius: 12px;
  margin-bottom: 20px;
}

.clear-report-modal .warning-box > i {
  color: #ff4757;
  font-size: 32px;
  flex-shrink: 0;
}

.clear-report-modal .warning-content {
  flex: 1;
}

.clear-report-modal .warning-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px 0;
}

.clear-report-modal .warning-date {
  font-size: 13px;
  color: #666;
  margin: 0;
}

.clear-report-modal .warning-date strong {
  color: #ff4757;
}

.clear-report-modal .delete-items {
  margin-bottom: 16px;
}

.clear-report-modal .delete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 8px;
}

.clear-report-modal .delete-item i {
  color: #ff6b35;
  font-size: 16px;
}

.clear-report-modal .delete-item span {
  font-size: 14px;
  color: #333;
}

.clear-report-modal .warning-text {
  font-size: 13px;
  color: #ff4757;
  margin: 0;
  padding: 12px;
  background: #fff5f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clear-report-modal .modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #eee;
}

.clear-report-modal .btn-cancel {
  padding: 10px 20px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.clear-report-modal .btn-cancel:hover {
  background: #f5f5f5;
}

.clear-report-modal .btn-confirm-danger {
  padding: 10px 20px;
  border: none;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.clear-report-modal .btn-confirm-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.clear-report-modal .btn-confirm-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.report-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.chart-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chart-container h3 {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* 热销商品条形图 */
.chart-bar-item {
  margin-bottom: 15px;
}

.chart-bar-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.chart-bar-label .rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ecf0f1;
  color: #7f8c8d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.chart-bar-label .rank.top {
  background: linear-gradient(135deg, #f39c12, #e74c3c);
  color: white;
}

.chart-bar-label .name {
  flex: 1;
  font-size: 14px;
  color: #2c3e50;
}

.chart-bar-label .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
}

.chart-bar-bg {
  height: 8px;
  background: #ecf0f1;
  border-radius: 4px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #e55a2b);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.chart-bar-info {
  display: flex;
  gap: 15px;
  margin-top: 5px;
  font-size: 12px;
  color: #95a5a6;
}

/* 时段销售柱状图 */
.hourly-chart-wrapper {
  display: flex;
  gap: 15px;
}

.hourly-y-axis {
  width: 70px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
  border-right: 2px solid #ddd;
}

.y-axis-title {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
  padding-right: 10px;
  margin-bottom: 10px;
}

.y-axis-label {
  font-size: 11px;
  color: #7f8c8d;
  text-align: right;
  padding-right: 10px;
}

.hourly-chart-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hourly-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 280px;
  padding: 20px 5px;
  overflow-x: auto;
  border-bottom: 2px solid #ddd;
}

.hourly-bar {
  flex: 1;
  min-width: 20px;
  max-width: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.hourly-bar:hover {
  transform: scale(1.1);
  z-index: 10;
}

.hourly-amount {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
  text-align: center;
  white-space: nowrap;
}

.hourly-bar-container {
  width: 100%;
  height: 180px;
  background: linear-gradient(to top, #fafafa, #fff);
  border-radius: 3px 3px 0 0;
  display: flex;
  align-items: flex-end;
  position: relative;
  border: 1px solid #f0f0f0;
}

.hourly-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary-color), #e55a2b);
  border-radius: 3px 3px 0 0;
  transition: height 0.5s ease;
  position: relative;
}

.hourly-time {
  font-size: 10px;
  color: #2c3e50;
  font-weight: 500;
  margin-top: 8px;
  text-align: center;
}

.hourly-x-axis-label {
  font-size: 11px;
  color: #7f8c8d;
  text-align: center;
  margin-top: 8px;
}

.hourly-order-stats {
  width: 130px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 11px;
  max-height: 320px;
  overflow-y: auto;
}

.order-stats-title {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-color);
}

.order-stats-summary {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-color);
  padding: 6px 0;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 6px;
}

.order-stat-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #e8e8e8;
}

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

.stat-time {
  color: #7f8c8d;
}

.stat-orders {
  color: #2c3e50;
  font-weight: 600;
}

.stat-percent {
  color: var(--primary-color);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #95a5a6;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
}