/* ============ 教务数据看板 v2 样式 ============ */

.dashboard-academic-page {
  padding: 16px;
  min-height: calc(100vh - 120px);
  background: #f5f6fa;
  font-family: var(--font-family, "PingFang SC", "Microsoft YaHei", sans-serif);
}

/* --- 控制栏 --- */
.da-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fff;
  border-radius: var(--radius-md, 10px);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
  flex-wrap: wrap;
}

.da-controls-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.da-controls-group > label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  white-space: nowrap;
}

.da-select,
.da-input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  background: #fff;
  outline: none;
}

.da-select:focus,
.da-input:focus {
  border-color: var(--primary, #F18D24);
}

.da-controls-spacer { flex: 1; }

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

/* --- KPI 卡片行 --- */
.da-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.da-kpi-card {
  background: #fff;
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--transition-fast, .15s), box-shadow var(--transition-fast, .15s);
}

.da-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
}

.da-kpi-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light, #fce6c8);
  border-radius: var(--radius-sm, 6px);
  flex-shrink: 0;
}

.da-kpi-content { flex: 1; min-width: 0; }

.da-kpi-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.da-kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

.da-kpi-trend {
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

.da-kpi-trend.up   { color: #4CAF50; }
.da-kpi-trend.down { color: #F44336; }

/* --- 图表行 --- */
.da-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.da-chart-card {
  background: #fff;
  border-radius: var(--radius-md, 10px);
  padding: 18px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}

.da-chart-card h3 {
  font-size: 15px;
  margin: 0 0 14px;
  color: #444;
  font-weight: 600;
}

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

.da-chart-container canvas {
  max-height: 250px;
}

/* --- 表格容器 --- */
.da-table-container {
  max-height: 250px;
  overflow-y: auto;
}

.da-table-container .data-table {
  width: 100%;
  font-size: 12px;
}

.da-table-container .data-table th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
}

/* --- 教师效能表格卡片 --- */
.da-table-card {
  background: #fff;
  border-radius: var(--radius-md, 10px);
  padding: 18px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}

.da-table-card h3 {
  font-size: 15px;
  margin: 0 0 14px;
  color: #444;
  font-weight: 600;
}

.da-table-card .data-table {
  width: 100%;
  font-size: 13px;
}

/* --- 流失预警行颜色 --- */
.da-churn-critical { background: #fff5f5; }
.da-churn-warning  { background: #fff8e1; }
.da-churn-info     { background: #fafafa; }

/* --- 数据表格通用样式 --- */
.data-table {
  border-collapse: collapse;
  width: 100%;
}

.data-table th {
  background: #fafbfc;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  border-bottom: 2px solid #e0e0e0;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

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

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

/* --- 响应式 --- */
@media (max-width: 1400px) {
  .da-kpi-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .da-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .da-charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .da-kpi-row { grid-template-columns: 1fr; }
}
