/* Dashboard 大屏样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f8fafb 0%, #eef2f5 100%);
  min-height: 100vh;
  color: #333;
  padding: 12px;
  overflow: hidden;
}

.main-container {
  height: calc(100vh - 24px);
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 顶部筛选区域 */
.header-bar {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title::before {
  content: "";
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, #4ecdc4, #44bd9e);
  border-radius: 2px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.fullscreen-btn {
  background: transparent;
  border: 1px solid #e0e0e0;
  color: #7f8c8d;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fullscreen-btn:hover {
  border-color: #4ecdc4;
  color: #4ecdc4;
  background: rgba(78, 205, 196, 0.1);
}

.fullscreen-btn svg {
  width: 16px;
  height: 16px;
}

.filter-label {
  color: #7f8c8d;
  font-size: 14px;
}

.filter-sep {
  color: #4ecdc4;
  font-weight: 600;
}

.fresh-input {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  color: #495057;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.fresh-input:focus {
  border-color: #4ecdc4;
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
}

.fresh-btn {
  background: linear-gradient(135deg, #4ecdc4 0%, #44bd9e 100%);
  border: none;
  color: white;
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

/* 第一行区域 */
.summary-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.section-header .bar {
  width: 4px;
  height: 24px;
  background: linear-gradient(to bottom, #4ecdc4, #44bd9e);
  margin-right: 12px;
  border-radius: 2px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.summary-content {
  display: flex;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.kpi-sidebar {
  width: 300px;
  flex-shrink: 0;
  overflow-y: auto;
  padding-right: 10px;
}

.kpi-item {
  background: linear-gradient(135deg, #f8fffe 0%, #f0faf8 100%);
  border: 1px solid #e8f5f3;
  border-left: 3px solid #4ecdc4;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.kpi-item:hover {
  background: #e8f8f5;
  border-color: #4ecdc4;
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.15);
}

.kpi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.data-label {
  color: #7f8c8d;
  font-size: 14px;
}

.data-value {
  font-size: 24px;
  font-weight: 600;
  color: #4ecdc4;
}

.progress-bar {
  height: 4px;
  background: #e8f5f3;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #4ecdc4, #44bd9e);
}

.chart-area {
  flex: 1;
  min-height: 0;
}

#monthlyChart,
#agentChart {
  width: 100%;
  height: 100%;
}

/* 第二行三列 */
.bottom-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.bottom-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}

.card-title {
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e8f5f3;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.card-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.card-content.custom-scrollbar {
  overflow-y: auto;
  overflow-x: hidden;
}

/* 坐席列表 */
.agent-item {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.agent-item:hover {
  background: #f0faf8;
  border-color: #4ecdc4;
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.15);
}

.agent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 120px;
}

.agent-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4ecdc4, #44bd9e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.agent-name {
  color: #2c3e50;
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-status {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 80px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-online {
  background: #4ecdc4;
}

.status-idle {
  background: #5dade2;
}

.status-rest {
  background: #f7dc6f;
}

.status-text {
  color: #95a5a6;
  font-size: 13px;
}

.agent-time {
  color: #4ecdc4;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 13px;
  font-weight: 500;
  width: 70px;
  text-align: right;
}

/* 自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #4ecdc4;
  border-radius: 2px;
}

/* 全屏样式 */
body.fullscreen {
  padding: 0;
}

body.fullscreen .main-container {
  max-width: none;
  height: 100vh;
  padding: 12px;
}

/* Flatpickr 清新风格 */
.flatpickr-calendar {
  background: #fff !important;
  border: 1px solid #e9ecef !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
}

.flatpickr-current-month {
  color: #2c3e50 !important;
  font-weight: 600 !important;
}

.flatpickr-weekday {
  color: #7f8c8d !important;
  font-weight: 600 !important;
}

.flatpickr-day {
  color: #2c3e50 !important;
  border-radius: 8px !important;
}

.flatpickr-day:hover {
  background: #e8f8f5 !important;
  border-color: #4ecdc4 !important;
}

.flatpickr-day.today {
  border-color: #4ecdc4 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #4ecdc4 !important;
  border-color: #4ecdc4 !important;
  color: white !important;
}

.flatpickr-day.inRange {
  background: rgba(78, 205, 196, 0.2) !important;
  border-color: rgba(78, 205, 196, 0.3) !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  fill: #4ecdc4 !important;
}
