.scheduling-page { color: #10213d; }
.scheduling-page .page-toolbar { min-height: 40px; margin-bottom: 16px; }
.scheduling-page .page-actions { flex-wrap: wrap; gap: 8px; }
.scheduling-page .btn {
  min-height: 40px;
  height: 40px;
  padding-inline: 16px;
  font-size: 14px;
  border-radius: 6px;
}

.scheduling-page .kpi-grid.five {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.scheduling-page .kpi-card {
  min-width: 0;
  min-height: 116px;
  padding: 18px 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: none;
}
.scheduling-page .kpi-card::after { display: none; }
.scheduling-page .kpi-top { color: #526278; font-size: 14px; line-height: 22px; }
.scheduling-page .kpi-icon { width: 28px; height: 28px; color: #1677ff; background: transparent; border-radius: 0; }
.scheduling-page .kpi-value { gap: 8px; margin-top: 8px; }
.scheduling-page .kpi-value strong {
  color: #1677ff;
  font-family: inherit;
  font-size: 30px;
  font-weight: 650;
  line-height: 40px;
  font-variant-numeric: tabular-nums;
}
.scheduling-page .kpi-value small { color: #526278; font-size: 13px; line-height: 20px; }
.scheduling-page .kpi-foot { margin-top: 4px; color: #7a889c; font-size: 12px; line-height: 18px; }

.scheduling-page .panel {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: none;
}
.scheduling-page .panel-head { min-height: 52px; padding: 0 20px; border-bottom-color: #e2e8f0; }
.scheduling-page .panel-head h3 { color: #10213d; font-size: 16px; line-height: 24px; }
.scheduling-page .panel-head > span { color: #526278; font-size: 12px; line-height: 18px; }
.scheduling-page .panel-body { padding: 20px; }

.scheduling-page .scheduling-calendar { margin-bottom: 16px; }
.scheduling-page .scheduling-calendar .panel-body {
  overflow-x: auto;
  scrollbar-gutter: stable;
}
.scheduling-page .schedule-grid {
  display: grid;
  width: 100%;
  min-width: 1080px;
  grid-template-columns: 156px repeat(7, minmax(132px, 1fr));
  overflow: visible;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.scheduling-page .schedule-cell {
  min-height: 72px;
  padding: 14px 12px;
  color: #34465f;
  font-size: 14px;
  line-height: 22px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
}
.scheduling-page .schedule-cell:nth-child(8n) { border-right: 0; }
.scheduling-page .schedule-cell:nth-last-child(-n + 8) { border-bottom: 0; }
.scheduling-page .schedule-cell.header {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding-block: 10px;
  color: #526278;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  background: #f8fafc;
}
.scheduling-page .schedule-cell b { color: #10213d; font-size: 14px; font-weight: 600; }
.scheduling-page .schedule-cell small { display: inline-block; margin-top: 4px; color: #526278; font-size: 12px; line-height: 18px; }
.scheduling-page .schedule-cell.shift { color: #1456a0; background: #f2f7ff; border-left: 3px solid #1677ff; }
.scheduling-page .schedule-cell.shift.night { color: #5b43a6; background: #f5f3ff; border-left-color: #7557e8; }
.scheduling-page .schedule-cell.shift:hover { background: #eaf3ff; }
.scheduling-page .schedule-cell.shift.night:hover { background: #efebff; }

.scheduling-page .scheduling-constraints {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
}
.scheduling-page .scheduling-constraints .panel-body {
  display: grid;
  min-height: 174px;
  align-items: center;
}
.scheduling-page .scheduling-constraints .stat-list { display: grid; gap: 16px; }
.scheduling-page .scheduling-constraints .stat-row {
  display: grid;
  grid-template-columns: 112px minmax(60px, 1fr) 48px;
  gap: 12px;
  align-items: center;
  color: #526278;
  font-size: 14px;
  line-height: 22px;
}
.scheduling-page .scheduling-constraints .progress { height: 6px; overflow: hidden; background: #e9eef5; border-radius: 4px; }
.scheduling-page .scheduling-constraints .progress span { height: 100%; background: var(--bar-color, #1677ff); border-radius: inherit; }
.scheduling-page .scheduling-constraints .stat-row b { color: #10213d; font-size: 13px; text-align: right; }

@media (max-width: 1439px) {
  .scheduling-page .kpi-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .scheduling-page .scheduling-constraints { grid-template-columns: 1fr; }
  .scheduling-page .scheduling-calendar .panel-body { padding: 16px; }
  .scheduling-page .schedule-grid { min-width: 1080px; }
  .scheduling-page .schedule-cell:nth-child(-n + 8) { position: sticky; top: 0; z-index: 2; }
  .scheduling-page .schedule-cell:nth-child(8n + 1) { position: sticky; left: 0; z-index: 1; background: #fff; }
  .scheduling-page .schedule-cell:first-child { z-index: 3; background: #f8fafc; }
}

@media (max-width: 960px) {
  .scheduling-page .kpi-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .scheduling-page .page-actions,
  .scheduling-page .page-actions .btn { width: 100%; }
  .scheduling-page .kpi-grid.five { grid-template-columns: 1fr; }
  .scheduling-page .scheduling-constraints .stat-row { grid-template-columns: 104px minmax(0, 1fr) 44px; gap: 8px; }
}
