/* ========== 作业管理（对齐原平台 homeworkManagement） ========== */
.hm-page {
  min-height: calc(100vh - 56px);
  padding: 12px 16px 20px;
  background: linear-gradient(180deg, #f8f6ff 0%, #f3f7ff 40%, #f5f7fa 100%);
  box-sizing: border-box;
}

.hm-overview {
  margin-bottom: 12px;
}

.hm-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hm-title-wrap {
  flex-shrink: 0;
}

.hm-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1d2129;
}

.hm-title-underline {
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, #f2796b, #e63323);
}

.hm-global-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hm-select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  font-size: 13px;
  color: #4e5969;
  appearance: none;
  cursor: pointer;
}

.hm-select-sm {
  max-width: 180px;
}

.hm-date-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #c9cdd4;
  font-size: 13px;
  cursor: pointer;
}

.hm-date-arrow {
  color: #86909c;
}

.hm-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #86909c;
  cursor: pointer;
}

.hm-cards {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) minmax(220px, 1fr) minmax(240px, 1.2fr);
  gap: 12px;
}

.hm-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e6eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 16px;
  min-height: 140px;
}

.hm-card-publish {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #f5f0ff 0%, #eef2ff 50%, #fef3f2 100%);
  border-color: #fde8e6;
}

.hm-publish-illus {
  width: 80px;
  height: 80px;
}

.hm-publish-illus svg {
  width: 100%;
  height: 100%;
}

.hm-btn {
  height: 36px;
  padding: 0 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.hm-btn-publish {
  background: #e63323;
  color: #fff;
  box-shadow: 0 4px 12px rgba(230,51,35, 0.35);
}

.hm-btn-publish:hover {
  background: #c0271b;
}

.hm-card-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #1d2129;
}

.hm-task-stats {
  display: flex;
  gap: 12px;
}

.hm-task-stat {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #f7f8fa;
  font-size: 13px;
  color: #4e5969;
}

.hm-task-stat strong {
  font-size: 22px;
  font-weight: 700;
  color: #1d2129;
  margin-right: 2px;
}

.hm-task-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hm-task-icon-blue {
  background: #fde8e6;
  color: #c0271b;
}

.hm-task-icon-green {
  background: #fef3f2;
  color: #e63323;
}

.hm-compare-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-bottom: 1px solid #f2f3f5;
}

.hm-compare-tab {
  padding: 6px 14px 10px;
  border: none;
  background: none;
  color: #86909c;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}

.hm-compare-tab.active {
  color: #e63323;
  font-weight: 600;
}

.hm-compare-tab.active::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background: #e63323;
  border-radius: 2px 2px 0 0;
}

.hm-compare-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.hm-compare-name {
  width: 56px;
  flex-shrink: 0;
  color: #4e5969;
}

.hm-compare-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #f2f3f5;
  overflow: hidden;
}

.hm-compare-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #e63323, #f2796b);
}

.hm-compare-value {
  width: 40px;
  text-align: right;
  font-weight: 600;
  color: #1d2129;
}

.hm-list-panel {
  position: relative;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e6eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 0 16px 16px;
}

.hm-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 0;
  border-bottom: 1px solid #f2f3f5;
}

.hm-list-tabs {
  display: flex;
  gap: 24px;
}

.hm-list-tab {
  padding: 12px 0;
  border: none;
  background: none;
  color: #4e5969;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
}

.hm-list-tab.active {
  color: #e63323;
  font-weight: 600;
}

.hm-list-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #e63323;
}

.hm-analysis-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #fff;
  color: #4e5969;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hm-analysis-btn:hover {
  border-color: #f5c6c0;
  color: #e63323;
}

.hm-filters {
  padding: 14px 0;
  border-bottom: 1px solid #f2f3f5;
}

.hm-filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hm-filters-row:last-child {
  margin-bottom: 0;
}

.hm-search-wrap {
  position: relative;
  min-width: 200px;
}

.hm-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #86909c;
  pointer-events: none;
}

.hm-search {
  width: 100%;
  height: 32px;
  padding: 0 12px 0 32px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  font-size: 13px;
}

.hm-filters-time {
  align-items: center;
}

.hm-filter-label {
  font-size: 13px;
  color: #4e5969;
  margin-right: 4px;
}

.hm-time-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.hm-pill {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #4e5969;
  font-size: 13px;
  cursor: pointer;
}

.hm-pill.active {
  border-color: #e63323;
  background: #fef3f2;
  color: #e63323;
}

.hm-reset-btn {
  margin-left: auto;
  height: 28px;
  padding: 0 12px;
  border: none;
  background: none;
  color: #86909c;
  font-size: 13px;
  cursor: pointer;
}

.hm-reset-btn:hover {
  color: #e63323;
}

.hm-table-wrap {
  overflow-x: auto;
}

.hm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hm-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 500;
  color: #86909c;
  background: #fafafa;
  border-bottom: 1px solid #f2f3f5;
  white-space: nowrap;
}

.hm-table td {
  padding: 14px 10px;
  border-bottom: 1px solid #f2f3f5;
  color: #1d2129;
  vertical-align: middle;
}

.hm-table tbody tr:hover {
  background: #fafafa;
}

.hm-task-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.hm-task-book {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fde8e6, #f5c6c0);
  color: #c0271b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hm-task-book-purple {
  background: linear-gradient(135deg, #fef3f2, #fde8e6);
  color: #e63323;
}

.hm-task-name {
  font-weight: 600;
  line-height: 1.4;
  color: #1d2129;
}

.hm-task-meta {
  margin-top: 2px;
  font-size: 12px;
  color: #86909c;
  line-height: 1.4;
}

.hm-class-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  background: #f2f3f5;
  color: #4e5969;
  font-size: 12px;
}

.hm-status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  background: #f2f3f5;
  color: #86909c;
  font-size: 12px;
}

.hm-submit-progress {
  min-width: 120px;
}

.hm-submit-track {
  height: 8px;
  border-radius: 4px;
  background: #f2f3f5;
  overflow: hidden;
}

.hm-submit-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #e63323, #f2796b);
}

.hm-submit-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 12px;
  color: #86909c;
}

.hm-th-sort {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 2px;
  color: #c9cdd4;
}

.hm-subject-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 4px;
  background: #fde8e6;
  color: #c0271b;
  font-size: 12px;
}

.hm-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hm-action-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #86909c;
  cursor: pointer;
}

.hm-action-btn:hover {
  background: #f2f3f5;
  color: #e63323;
}

.hm-action-btn.danger:hover {
  color: #f53f3f;
}

.hm-action-btn-bordered {
  border: 1px solid #e5e6eb;
  background: #fff;
}

.hm-action-btn-danger-bg {
  background: #fff1f0;
  color: #f53f3f;
}

.hm-action-btn-danger-bg:hover {
  background: #ffece8;
  color: #f53f3f;
}

.hm-row-actions-text {
  gap: 12px;
}

.hm-text-action {
  border: none;
  background: none;
  padding: 0;
  font-size: 13px;
  color: #4e5969;
  cursor: pointer;
}

.hm-text-action:hover {
  color: #e63323;
}

.hm-text-action-primary {
  color: #e63323;
}

.hm-text-action-danger {
  color: #f53f3f;
}

.hm-text-action-danger:hover {
  color: #cb2634;
}

.hm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  flex-wrap: wrap;
}

.hm-pagination-total {
  font-size: 13px;
  color: #86909c;
}

.hm-pagination-controls {
  display: flex;
  gap: 4px;
}

.hm-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #4e5969;
  font-size: 13px;
  cursor: pointer;
}

.hm-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hm-page-btn-active {
  border-color: #e63323;
  background: #e63323;
  color: #fff;
}

.hm-page-size {
  width: auto;
}

.hm-empty-row td {
  text-align: center;
  padding: 40px;
  color: #86909c;
}

@media (max-width: 1100px) {
  .hm-cards {
    grid-template-columns: 1fr;
  }
}
