/* 益海嘉里门禁数据统计系统 - 查看端样式 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #0f1923;
  color: #e0e6ed;
  line-height: 1.6;
  min-height: 100vh;
}

/* 头部 */
.header {
  background: linear-gradient(135deg, #1a2a3a 0%, #0d1b2a 100%);
  padding: 16px 32px;
  border-bottom: 1px solid #1e3a5f;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo { font-size: 32px; }

.header h1 { font-size: 18px; font-weight: 600; color: #4fc3f7; }

.subtitle { font-size: 12px; color: #78909c; }

.header-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-link {
  color: #78909c;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-link:hover { color: #4fc3f7; background: #1e3a5f40; }

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #152232;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: #4fc3f7;
}

.stat-card .label {
  font-size: 12px;
  color: #78909c;
  margin-top: 4px;
}

.stat-card.green .value { color: #66bb6a; }
.stat-card.orange .value { color: #ffa726; }
.stat-card.red .value { color: #ef5350; }

/* 图表 */
.chart-section {
  background: #152232;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.chart-section h3 {
  font-size: 15px;
  color: #b0bec5;
  margin-bottom: 16px;
}

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

/* 日期选择器 */
.date-selector {
  background: #152232;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.date-selector h3 {
  font-size: 15px;
  color: #b0bec5;
  margin-bottom: 16px;
}

.date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.date-btn {
  padding: 8px 16px;
  background: #0f1923;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  color: #b0bec5;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.date-btn:hover {
  background: #1e3a5f;
  color: #4fc3f7;
  border-color: #4fc3f7;
}

.date-btn.active {
  background: #1565c0;
  color: #fff;
  border-color: #1565c0;
}

/* 报告区域 */
.report-section {
  background: #152232;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e3a5f;
}

.report-header h2 {
  font-size: 16px;
  color: #4fc3f7;
}

.report-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 14px;
  background: #1e3a5f;
  border: 1px solid #2a4a6f;
  border-radius: 6px;
  color: #b0bec5;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm:hover {
  background: #2a4a6f;
  color: #4fc3f7;
}

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: #1a2a3a;
  padding: 10px 12px;
  text-align: left;
  color: #78909c;
  font-weight: 500;
  border-bottom: 1px solid #1e3a5f;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #1e3a5f20;
}

.data-table tr:hover td { background: #1a2a3a40; }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #546e7a;
}

.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 14px; }

/* 加载状态 */
.loading {
  text-align: center;
  padding: 20px;
  color: #78909c;
}

/* 底部 */
.footer {
  text-align: center;
  padding: 24px;
  color: #546e7a;
  font-size: 12px;
  border-top: 1px solid #1e3a5f;
  margin-top: 32px;
}

/* 响应式 */
@media (max-width: 768px) {
  .header { flex-direction: column; gap: 12px; padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 16px; }
  .report-header { flex-direction: column; gap: 12px; }
}

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

.fade-in { animation: fadeIn 0.3s ease; }
