.schedule-management-panel {
  overflow: hidden;
}

.schedule-management-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #dbe4ef;
  margin: -4px -4px 18px;
  padding: 0 4px;
}

.schedule-management-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #526173;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 46px;
  padding: 8px 16px;
}

.schedule-management-tab:hover,
.schedule-management-tab.is-active {
  background: #eff6ff;
  border-bottom-color: #3182f6;
  color: #1d4ed8;
}

.schedule-management-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.schedule-management-toolbar label {
  color: #526173;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 5px;
}

.schedule-management-toolbar input,
.schedule-management-toolbar select,
.schedule-management-grid select,
.schedule-management-grid input {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-sizing: border-box;
  color: #172033;
  font: inherit;
  min-height: 38px;
  padding: 6px 8px;
}

.schedule-management-grid select,
.schedule-management-grid input {
  font-size: 15px !important;
  line-height: 1.4 !important;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.schedule-management-grid input[type="number"] {
  min-width: 0;
  text-align: center;
}

.schedule-management-grid select:disabled,
.schedule-management-grid input:disabled {
  cursor: wait;
  opacity: .65;
}

.schedule-management-status,
.schedule-management-substatus {
  min-height: 22px;
}

.schedule-history-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.schedule-history-controls button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.schedule-history-status {
  color: #667085;
  font-size: 13px;
  min-height: 22px;
}

.schedule-management-status {
  color: #526173;
  font-size: 14px;
  font-weight: 600;
}

.schedule-management-status.is-error,
.schedule-management-substatus.is-error {
  color: #b42318;
}

.schedule-management-status.is-success,
.schedule-management-substatus.is-success {
  color: #067647;
}

.schedule-grid-scroll {
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  max-width: 100%;
  overflow: auto;
}

.schedule-management-grid {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  min-width: 100%;
  width: 100%;
}

.schedule-month-grid {
  min-width: 2960px;
}

.schedule-leave-ledger-grid {
  min-width: 1480px;
}

.schedule-comp-leave-grid {
  min-width: 1280px;
}

.schedule-grid-caption {
  caption-side: top;
  color: #172033;
  font-size: 16px;
  font-weight: 800;
  padding: 10px 8px;
  text-align: left;
}

.schedule-management-grid th,
.schedule-management-grid td {
  background: #fff;
  border-bottom: 1px solid #cbd5e1;
  border-right: 1px solid #d8e0ea;
  font-size: 15px !important;
  line-height: 1.4 !important;
  min-width: 52px;
  padding: 5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.schedule-management-grid thead th {
  background: #eaf2fb;
  color: #344054;
  font-weight: 800;
  position: sticky;
  z-index: 3;
}

.schedule-management-grid thead tr:first-child th {
  border-top: 2px solid #667085;
  top: 0;
}

.schedule-management-grid thead tr:nth-child(2) th {
  background: #f4f7fb;
  top: 35px;
}

.schedule-management-grid .schedule-days-group {
  background: #dbeafe;
  border-left: 2px solid #667085;
}

.schedule-management-grid .schedule-annual-group {
  background: #fff3bf;
}

.schedule-management-grid .schedule-comp-group {
  background: #eadcf5;
}

.schedule-management-grid .schedule-day-header {
  min-width: 56px;
  padding: 6px 4px;
}

.schedule-day-header span,
.schedule-day-header small {
  display: block;
}

.schedule-day-header small {
  color: #667085;
  font-size: 11px;
  margin-top: 2px;
}

.schedule-month-grid tbody tr[data-employee-id] > td:nth-child(6) {
  border-left: 2px solid #667085;
}

.schedule-month-grid tbody tr[data-employee-id] > td:nth-child(37),
.schedule-month-grid tbody tr[data-employee-id] > td:nth-child(39),
.schedule-month-grid tbody tr[data-employee-id] > td:nth-child(43) {
  border-left: 2px solid #667085;
}

.schedule-month-grid [data-grid-summary^="annual"] {
  background: #fffde7;
}

.schedule-month-grid [data-grid-summary^="comp"] {
  background: #f5effa;
}

.schedule-month-grid [data-grid-summary="annualRemainingTotal"] {
  background: #eef6ee;
  font-weight: 800;
}

.schedule-management-grid .schedule-identity {
  min-width: 72px;
  position: sticky;
  z-index: 4;
}

.schedule-management-grid .schedule-identity--order {
  left: 0;
  min-width: 42px;
  width: 42px;
}

.schedule-management-grid .schedule-identity--group {
  left: 42px;
  min-width: 80px;
  width: 80px;
}

.schedule-management-grid .schedule-identity--name {
  left: 122px;
  min-width: 104px;
  text-align: center;
  width: 104px;
}

.schedule-management-grid .schedule-identity--hire {
  left: 226px;
  min-width: 92px;
  width: 92px;
}

.schedule-management-grid .schedule-identity--position {
  left: 318px;
  min-width: 64px;
  width: 64px;
}

.schedule-management-grid thead .schedule-identity {
  background: #eaf2fb;
  z-index: 6;
}

.schedule-management-grid tbody .schedule-identity {
  background: #fff;
}

.schedule-management-grid tbody tr[data-employee-id]:nth-child(even) > td:not(.schedule-identity) {
  background: #fbfdff;
}

.schedule-management-grid tbody tr[data-employee-id]:nth-child(even) > td.schedule-identity {
  background: #fbfdff;
}

.schedule-month-grid .schedule-cell,
.schedule-month-grid .schedule-name-control {
  -webkit-appearance: none;
  appearance: none;
  background-image: none;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
}

.schedule-month-grid .schedule-cell {
  min-width: 0;
  padding-left: 3px;
  padding-right: 3px;
}

.schedule-month-grid .schedule-name-control {
  font-weight: 800;
  max-width: 100%;
  min-width: 0;
}

.schedule-fixed-group {
  font-weight: 800;
}

.schedule-management-grid .schedule-cell.is-remote {
  animation: schedule-remote-flash 1.2s ease-out;
}

.schedule-month-grid .schedule-cell[data-shift-code="주"],
.schedule-month-grid .schedule-cell[data-shift-code="조"] {
  background: #fff;
}

.schedule-month-grid .schedule-cell[data-shift-code="휴"],
.schedule-month-grid .schedule-cell[data-shift-code="경"] {
  background: #f2dcdb;
}

.schedule-month-grid .schedule-cell[data-shift-code="년"] {
  background: #ffff99;
}

.schedule-month-grid .schedule-cell[data-shift-code="비"] {
  background: #d8e4bc;
}

.schedule-month-grid .schedule-cell[data-shift-code="야"],
.schedule-month-grid .schedule-cell[data-shift-code="후"] {
  background: #b8cce4;
}

.schedule-month-grid .schedule-cell[data-shift-code="대"] {
  background: #ccc0da;
}

.schedule-management-grid .schedule-summary-row th,
.schedule-management-grid .schedule-summary-row td {
  background: #f8fafc;
  border-top: 1px solid #98a2b3;
  font-weight: 800;
}

.schedule-management-grid .schedule-summary-row th {
  text-align: left;
}

.schedule-hours-cell {
  background: #f8fafc !important;
  min-width: 430px !important;
  padding: 8px !important;
  vertical-align: top;
  white-space: normal !important;
}

.schedule-hours-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.schedule-hours-table caption {
  color: #344054;
  font-weight: 800;
  margin-bottom: 6px;
  text-align: left;
}

.schedule-hours-table th,
.schedule-hours-table td {
  background: transparent;
  border: 1px solid #d8e0ea;
  padding: 4px 6px;
  text-align: left;
  white-space: normal;
}

.schedule-hours-table th {
  width: 92px;
}

.schedule-leave-ledger-grid th,
.schedule-leave-ledger-grid td {
  min-width: 70px;
}

.schedule-leave-ledger-grid .schedule-identity--name {
  left: 42px;
  min-width: 100px;
  width: 100px;
}

.schedule-leave-ledger-grid .schedule-identity--position {
  left: 142px;
  min-width: 70px;
  width: 70px;
}

.schedule-leave-ledger-grid .schedule-identity--hire {
  left: 212px;
  min-width: 92px;
  width: 92px;
}

.schedule-leave-ledger-grid .schedule-identity {
  min-width: 64px;
}

.schedule-leave-ledger-grid thead .schedule-identity {
  background: #eaf2fb;
}

.schedule-leave-ledger-grid .schedule-ledger-kind {
  background: #eef2f6;
  min-width: 62px;
}

.schedule-leave-ledger-grid [data-ledger-field="annual_leave_plan"],
.schedule-leave-ledger-grid [data-ledger-field="entitlement_days"] {
  background: #fffde7;
}

.schedule-leave-ledger-grid [data-ledger-actual] {
  background: #f4f6f8;
}

.schedule-leave-ledger-grid [data-ledger-total="remaining"] {
  background: #eef6ee;
}

.schedule-ledger-actual {
  color: #344054;
  font-variant-numeric: tabular-nums;
}

.schedule-ledger-remaining {
  color: #067647;
  font-weight: 800;
}

.schedule-comp-leave-grid .schedule-identity--name {
  left: 42px;
  min-width: 104px;
  width: 104px;
}

.schedule-comp-leave-grid .schedule-identity--position {
  left: 146px;
  min-width: 70px;
  width: 70px;
}

.schedule-comp-leave-grid [data-comp-row="residual"] td {
  background: #eef6ee;
}

.schedule-comp-leave-grid [data-comp-row="earned"] td {
  background: #f5effa;
}

.schedule-comp-leave-grid [data-comp-row="used"] td {
  background: #f4f6f8;
}

.schedule-comp-leave-grid [data-ledger-field="comp_leave_earned"] {
  background: #fff7ff;
}

.schedule-management-empty {
  color: #667085;
  padding: 28px !important;
  text-align: center !important;
}

@keyframes schedule-remote-flash {
  0% { background: #dbeafe; }
  100% { background: inherit; }
}

@media (max-width: 900px) {
  .schedule-management-toolbar > * {
    flex: 1 1 120px;
  }

  .schedule-management-toolbar button {
    flex: 1 1 150px;
    min-height: 46px;
  }

  .schedule-management-grid {
    font-size: 11px;
  }

  .schedule-management-grid th,
  .schedule-management-grid td {
    padding: 4px;
  }

  .schedule-management-grid thead tr:nth-child(2) th {
    top: 33px;
  }

  .schedule-management-grid .schedule-identity--name {
    left: 124px;
    min-width: 108px;
    width: 108px;
  }

  .schedule-management-grid .schedule-identity--group {
    min-width: 82px;
    width: 82px;
  }

  .schedule-management-grid .schedule-identity--hire {
    left: 232px;
    min-width: 92px;
    width: 92px;
  }

  .schedule-management-grid .schedule-identity--position {
    left: 324px;
  }

  .schedule-leave-ledger-grid .schedule-identity--name,
  .schedule-comp-leave-grid .schedule-identity--name {
    left: 42px;
  }

  .schedule-leave-ledger-grid .schedule-identity--position,
  .schedule-comp-leave-grid .schedule-identity--position {
    left: 150px;
  }

  .schedule-leave-ledger-grid .schedule-identity--hire {
    left: 220px;
  }

  .schedule-hours-cell {
    min-width: 360px !important;
  }
}

@media (max-width: 600px) {
  .schedule-month-grid .schedule-identity--hire,
  .schedule-month-grid .schedule-identity--position {
    left: auto;
    position: static;
  }
}
