/* 课程表页面样式 */

.schedule-editor-table {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.schedule-editor-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 72px repeat(var(--schedule-days), minmax(0, 1fr));
}

.schedule-editor-row--head .schedule-editor-cell {
  font-size: 12px;
  font-weight: 700;
  color: var(--kids-text-secondary);
}

.schedule-editor-cell {
  min-width: 0;
  display: flex;
  align-items: center;
}

.schedule-editor-cell--period,
.schedule-editor-cell--corner {
  justify-content: center;
  text-align: center;
}

.schedule-editor__input {
  min-width: 0;
  padding-inline: 10px;
}

.schedule-sheet {
  border-radius: 28px;
  border: 1px solid rgba(217, 222, 234, 0.92);
  background: #fff;
  padding: 18px;
  box-shadow: var(--kids-shadow-sm);
}

.schedule-sheet--a5 {
  max-width: 148mm;
  margin: 0 auto;
}

.schedule-sheet__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.schedule-sheet__eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kids-text-muted);
  margin-bottom: 8px;
}

.schedule-sheet__title {
  font-family: var(--kids-font-display);
  font-size: 28px;
  line-height: 1.16;
}

.schedule-sheet__subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: var(--kids-text-secondary);
}

.schedule-sheet__meta {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--kids-text-secondary);
}

.schedule-table {
  display: grid;
  gap: 10px;
}

.schedule-table__row {
  display: grid;
  gap: 10px;
  grid-template-columns: 74px repeat(var(--schedule-days), minmax(0, 1fr));
}

.schedule-table__cell {
  min-height: 58px;
  border-radius: 18px;
  background: rgba(248, 250, 255, 0.82);
  border: 1px solid rgba(217, 222, 234, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-size: 13px;
}

.schedule-table__cell--head,
.schedule-table__cell--period,
.schedule-table__cell--corner {
  font-weight: 700;
  color: var(--kids-text-secondary);
  background: rgba(255, 252, 246, 0.96);
}

.schedule-table__empty {
  color: var(--kids-text-muted);
}

.schedule-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 100%;
  border-radius: 14px;
  padding: 6px 10px;
  font-weight: 700;
  line-height: 1.4;
}

.schedule-legend {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-legend .schedule-chip {
  width: auto;
  min-height: 28px;
  font-size: 12px;
}

.schedule-sheet--minimal {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.96));
}

.schedule-sheet--fresh {
  background: linear-gradient(180deg, rgba(238, 248, 244, 0.7), rgba(255, 255, 255, 0.98));
}

.schedule-sheet--storybook {
  background: linear-gradient(180deg, rgba(255, 245, 232, 0.82), rgba(255, 255, 255, 0.98));
}

.palette-1 { background: #fce5da; color: #9e4b28; }
.palette-2 { background: #e1ebff; color: #3256ac; }
.palette-3 { background: #e8f6ef; color: #2c7d58; }
.palette-4 { background: #f6eedf; color: #8f6a22; }
.palette-5 { background: #e7f2fb; color: #29658e; }
.palette-6 { background: #f4e8fb; color: #7a4fa0; }
.palette-7 { background: #fdece8; color: #a25743; }
.palette-8 { background: #f4f0e0; color: #7b6c29; }

@media (max-width: 767px) {
  .schedule-editor-table,
  .schedule-table {
    overflow-x: auto;
  }

  .schedule-editor-row,
  .schedule-table__row {
    min-width: calc(64px + var(--schedule-days) * 100px);
    grid-template-columns: 64px repeat(var(--schedule-days), minmax(100px, 1fr));
  }

  .schedule-sheet__header {
    flex-direction: column;
  }
}

@media print {
  .schedule-sheet {
    box-shadow: none !important;
    border-color: #ccc !important;
  }
}
