.schedule-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: calc(100vh - 200px);
}

.filters-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.filter-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
  flex: 1;
}

.filter-field label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.filter-field select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #212529;
  cursor: pointer;
  transition: border-color 0.15s;
}

.filter-field select:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.filter-field select:disabled {
  background: #f8f9fa;
  color: #868e96;
  cursor: not-allowed;
}

.schedule-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.schedule-card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.schedule-card:last-child {
  margin-bottom: 0;
}

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f3f5;
}

.schedule-title {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

.schedule-date-range {
  font-size: 13px;
  color: #868e96;
}

.holiday-section {
  margin-bottom: 16px;
}

.holiday-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
}

.holiday-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.holiday-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.holiday-chip.academic {
  background: #dbeafe;
  color: #1e40af;
}

.holiday-chip.organization {
  background: #ede9fe;
  color: #6d28d9;
}

.holiday-chip.group {
  background: #ccfbf1;
  color: #0f766e;
}


.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #868e96;
  font-size: 15px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-indicator {
  text-align: center;
  padding: 40px;
  color: #868e96;
}

.no-holidays {
  color: #adb5bd;
  font-size: 13px;
  font-style: italic;
}

/* Searchable Select */
.searchable-select {
  position: relative;
}

.searchable-select .searchable-input {
  width: 100%;
  padding: 8px 32px 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #212529;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.searchable-select .searchable-input:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.searchable-select.disabled .searchable-input {
  background: #f8f9fa;
  color: #868e96;
  cursor: not-allowed;
}

.searchable-select.selected .searchable-input {
  background: #f0f7ff;
  border-color: #4a90d9;
  font-weight: 500;
}

.searchable-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  color: #868e96;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.searchable-clear:hover {
  color: #495057;
}

.searchable-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ced4da;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.searchable-dropdown[hidden] {
  display: none;
}

.searchable-item {
  padding: 8px 12px;
  font-size: 13px;
  color: #212529;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f1f3f5;
}

.searchable-item:last-child {
  border-bottom: none;
}

.searchable-item:hover,
.searchable-item.highlighted {
  background: #e8f0fe;
}

.searchable-item .item-sub {
  font-size: 11px;
  color: #868e96;
  margin-top: 2px;
}

.searchable-item mark {
  background: #fff3cd;
  color: inherit;
  padding: 0;
  border-radius: 2px;
}

.searchable-no-results {
  padding: 12px;
  text-align: center;
  color: #868e96;
  font-size: 13px;
}

.searchable-count {
  padding: 6px 12px;
  font-size: 11px;
  color: #868e96;
  background: #f8f9fa;
  border-bottom: 1px solid #f1f3f5;
}

/* Calendar Panel */
.calendar-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.cal-nav-btn:hover {
  background: #f8f9fa;
  border-color: #4a90d9;
}

.cal-nav-title {
  font-size: 15px;
  font-weight: 600;
  color: #212529;
  min-width: 100px;
  text-align: center;
}

.cal-nav-today {
  padding: 4px 12px;
  border: 1px solid #4a90d9;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #4a90d9;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-left: 4px;
}

.cal-nav-today:hover {
  background: #4a90d9;
  color: #fff;
}

.cal-nav-refresh {
  width: 32px;
  height: 32px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
  color: #495057;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.15s, transform 0.2s;
}

.cal-nav-refresh:hover {
  background: #f8f9fa;
  border-color: #4a90d9;
}

.cal-nav-refresh:active {
  transform: rotate(180deg);
}

/* Schedule Table */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}

.schedule-table thead th {
  background: #f8f9fa;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.schedule-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f3f5;
  color: #212529;
  vertical-align: middle;
}

.schedule-table tbody tr:hover {
  background: #f8f9fa;
}

.schedule-table .date-cell {
  white-space: nowrap;
  font-weight: 500;
  min-width: 100px;
}

/* Weekend row */
.schedule-table .row-weekend {
  background: #fff5f5;
}

.schedule-table .row-weekend td {
  color: #dc3545;
}

.schedule-table .row-weekend:hover {
  background: #fee;
}

/* Holiday row */
.schedule-table .row-holiday {
  background: #fff5f5;
}

.schedule-table .row-holiday td {
  color: #dc3545;
}

.schedule-table .row-holiday:hover {
  background: #fee;
}

/* Today row */
.schedule-table .row-today {
  background: #e8f0fe;
}

.schedule-table .row-today:hover {
  background: #d4e4fc;
}

.today-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  background: #4a90d9;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}

/* Holiday name */
.holiday-name {
  font-weight: 600;
  color: #dc3545;
}

/* No class */
.no-class {
  text-align: center;
  color: #dc3545;
  font-style: italic;
  font-size: 12px;
}

/* Day order badge */
.day-order {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: #e9ecef;
  color: #495057;
}

/* CSM cell */
.csm-cell {
  font-weight: 500;
}

.csm-cell .csm-order {
  font-size: 11px;
  color: #868e96;
  margin-left: 4px;
}

.calendar-empty {
  text-align: center;
  padding: 40px 20px;
  color: #868e96;
  font-size: 14px;
}

/* CSM 셀 */
.csm-cell {
  font-weight: 500;
}

.csm-cell .csm-order {
  font-size: 11px;
  color: #868e96;
  margin-left: 4px;
}

/* CSM 제목 행 */
.csm-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* CSM 진도 정보 행 */
.csm-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 11px;
}

/* CSM 진도 정보 항목 */
.csm-info-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 12px;
}

.csm-info-item:last-child {
  margin-right: 0;
}

/* CSM 라벨 */
.csm-label {
  font-size: 10px;
  color: #868e96;
  font-weight: 500;
}

/* CSM 값 */
.csm-value {
  font-size: 11px;
  color: #495057;
  font-weight: 600;
}

/* 상태 배지 */
.pace-status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.pace-status.scheduled {
  background: #e2e3e5;
  color: #383d41;
}

.pace-status.not-completed {
  background: #f8d7da;
  color: #721c24;
}

.pace-status.partial {
  background: #fff3cd;
  color: #856404;
}

.pace-status.completed {
  background: #d4edda;
  color: #155724;
}

/* 미니 프로그레스 바 (인라인용) */
.progress-bar-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.progress-bar-track-mini {
  width: 50px;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill-mini {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-bar-fill-mini.low { background: #dc3545; }
.progress-bar-fill-mini.medium { background: #ffc107; }
.progress-bar-fill-mini.high { background: #28a745; }

.progress-bar-text {
  font-size: 10px;
  color: #495057;
  font-weight: 600;
  min-width: 28px;
}

/* ── Tab Bar ── */
.tab-bar {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: #f8f9fa;
  font-size: 14px;
  font-weight: 600;
  color: #868e96;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.tab-btn.active {
  background: #fff;
  color: #4a90d9;
  border-bottom-color: #4a90d9;
}

.tab-content[hidden] {
  display: none;
}

/* ── Student Records Panel ── */
.student-records-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.panel-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: #868e96;
  margin-left: 8px;
}

/* Summary Bar */
.summary-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.summary-chip .summary-count {
  font-size: 16px;
  font-weight: 700;
}

.summary-chip.critical { background: #FED7D7; color: #C53030; }
.summary-chip.warning { background: #FEEBC8; color: #C05621; }
.summary-chip.observation { background: #FEFCBF; color: #975A16; }
.summary-chip.insufficient { background: #EDF2F7; color: #4A5568; }
.summary-chip.normal { background: #C6F6D5; color: #276749; }

/* Status Filter */
.status-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid #ced4da;
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-btn:hover {
  background: #f8f9fa;
  border-color: #4a90d9;
}

.filter-btn.active {
  background: #4a90d9;
  border-color: #4a90d9;
  color: #fff;
}

/* Student Table */
.student-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.student-table thead th {
  background: #f8f9fa;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}

.student-table thead th:hover {
  background: #e9ecef;
}

.student-table thead th .sort-icon {
  margin-left: 4px;
  font-size: 10px;
  color: #adb5bd;
}

.student-table thead th.sort-active .sort-icon {
  color: #4a90d9;
}

.student-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f3f5;
  color: #212529;
  vertical-align: middle;
}

.student-table tbody tr:hover {
  background: #f8f9fa;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.critical { background: #FED7D7; color: #C53030; }
.status-badge.warning { background: #FEEBC8; color: #C05621; }
.status-badge.observation { background: #FEFCBF; color: #975A16; }
.status-badge.insufficient { background: #EDF2F7; color: #4A5568; }
.status-badge.normal { background: #C6F6D5; color: #276749; }

/* Rate Cell */
.rate-main {
  font-size: 14px;
  font-weight: 600;
}

.rate-sub {
  font-size: 11px;
  color: #868e96;
  margin-top: 1px;
}

.rate-main.low { color: #E53E3E; }
.rate-main.medium { color: #ED8936; }
.rate-main.high { color: #48BB78; }
.rate-main.na { color: #A0AEC0; }

@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
  }

  .filter-field {
    min-width: 100%;
  }

  .schedule-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .csm-info-item {
    margin-right: 8px;
  }

  .progress-bar-track-mini {
    width: 40px;
  }

  .csm-label,
  .csm-value,
  .progress-bar-text {
    font-size: 9px;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .summary-bar {
    gap: 6px;
  }

  .summary-chip {
    padding: 4px 10px;
    font-size: 11px;
  }

  .summary-chip .summary-count {
    font-size: 14px;
  }

  .student-table {
    font-size: 12px;
  }

  .student-table thead th,
  .student-table tbody td {
    padding: 8px 8px;
  }
}
