/* 班级工具原生页：与 tool-ddclass-shell 配色一致 */
.dd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--s-2);
}
.dd-toolbar label {
  font-size: 14px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dd-select,
.dd-input {
  font: inherit;
  padding: 8px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.95);
  min-width: 140px;
}
.dd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--r-md);
  cursor: pointer;
  border: none;
  transition: transform var(--dur-fast) var(--ease-product), box-shadow var(--dur-fast) var(--ease-product);
}
.dd-btn-primary {
  color: #fff;
  font-weight: 700;
  background: #22c55e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 14px rgba(22, 101, 52, 0.26);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.dd-btn-primary:hover {
  transform: translateY(-1px);
  filter: none;
  background: #15803d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 20px rgba(22, 101, 52, 0.32);
}
.dd-btn-ghost {
  color: #166534;
  font-weight: 650;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid rgba(22, 101, 52, 0.28);
  box-shadow: 0 2px 10px rgba(22, 101, 52, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.dd-btn-ghost:hover {
  transform: translateY(-1px);
  filter: none;
  background: rgba(220, 252, 231, 0.95);
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 6px 16px rgba(22, 101, 52, 0.12), inset 0 1px 0 #fff;
}
.dd-btn-danger {
  color: #fff;
  background: #dc2626;
}
.dd-btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}
.dd-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-lg);
  padding: var(--s-2);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-1);
}
.dd-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--gray-900);
}
.dd-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-2);
}
.dd-mt {
  margin-top: var(--s-2);
}
.dd-chart {
  height: 320px;
  width: 100%;
}
.dd-table-wrap {
  overflow-x: auto;
}
.dd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dd-table th,
.dd-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.dd-table th {
  font-weight: 600;
  color: var(--gray-700);
  background: rgba(240, 253, 244, 0.6);
}
.dd-table tr:hover td {
  background: rgba(134, 239, 172, 0.12);
}
.dd-muted {
  color: var(--text-tertiary);
  font-size: 13px;
}
.dd-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--s-2);
  flex-wrap: wrap;
}
.dd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.dd-modal {
  background: #fff;
  border-radius: var(--r-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: var(--s-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.dd-modal h4 {
  margin: 0 0 16px;
  font-size: 18px;
}
.dd-form-row {
  margin-bottom: 14px;
}
.dd-form-row label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.dd-form-row input,
.dd-form-row select {
  width: 100%;
  box-sizing: border-box;
}
.dd-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* 成绩分档颜色 */
.dd-score-cell {
  display: inline-block;
  min-width: 2.5em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.dd-score-ex {
  color: #047857;
  background: rgba(16, 185, 129, 0.2);
}
.dd-score-good {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.18);
}
.dd-score-pass {
  color: #b45309;
  background: rgba(245, 158, 11, 0.2);
}
.dd-score-fail {
  color: #b91c1c;
  background: rgba(248, 113, 113, 0.25);
}

/* 成绩统计条 */
.dd-score-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: var(--s-2);
}
.dd-stat-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  border: 1px solid var(--border-hairline);
  text-align: center;
}
.dd-stat-card .dd-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.dd-stat-card .dd-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-700);
}
.dd-stat-note {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* 班级名称三段式选择 */
.dd-modal-class {
  max-width: 720px;
}
.dd-class-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.55;
}
.dd-class-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .dd-class-picker-grid {
    grid-template-columns: 1fr;
  }
}
.dd-class-pick-cell {
  margin-bottom: 0;
}
.dd-class-select-full {
  width: 100%;
  min-width: 0;
}
.dd-class-custom {
  margin-top: 8px;
}
.dd-class-name-preview {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-700);
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ----- 个人成绩分析 ----- */
.dd-section-divider {
  border: none;
  border-top: 1px solid var(--border-hairline);
  margin: var(--s-3) 0;
}
.dd-grid4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-2);
}
.dd-stat-value-sm {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dd-personal-subject-trend {
  margin-bottom: var(--s-2);
}
.dd-personal-subject-trend:last-child {
  margin-bottom: 0;
}
.dd-personal-subject-trend h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 600;
}
.dd-personal-subject-trend .dd-chart {
  height: 180px;
}
