.schedule-workspace {
  min-width: 0;
}
.schedule-workspace [hidden] { display: none !important; }
.schedule-workspace .schedule-grid-shift { position: relative; }
.schedule-workspace .schedule-shift-options { padding: 0 5px; min-height: 20px; color: var(--muted); font-size: 15px; }
.schedule-inline-editor { min-width: 0; padding: 2px; }
.schedule-cell-form { margin: 0; }
.schedule-cell-hours { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.schedule-cell-hours label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 10px; font-weight: 400; }
.schedule-workspace .schedule-cell-hours input { width: 100%; min-width: 0; height: 30px; padding: 3px; border-radius: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.schedule-cell-hours input::-webkit-calendar-picker-indicator { display: none; }
.schedule-cell-actions { display: flex; align-items: center; gap: 3px; margin-top: 7px; }
.schedule-workspace .schedule-cell-actions button { padding: 3px 6px; min-height: 26px; border-radius: 4px; font-size: 11px; }
.schedule-cell-actions [data-inline-close] { margin-left: auto; }
.schedule-workspace .schedule-cell-discard { min-height: 18px; padding: 2px 0; margin-top: 3px; font-size: 10px; color: var(--muted); }
.schedule-cell-form > small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.schedule-cell-form [data-schedule-message] { font-size: 11px; color: var(--red); margin: 6px 0; line-height: 1.4; }
.schedule-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.schedule-workspace-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.05;
}
.schedule-workspace-head > button {
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 400;
}
.schedule-workspace .schedule-toolbar {
  gap: 12px 20px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--border);
}
.schedule-workspace .schedule-navigation,
.schedule-workspace .schedule-controls {
  gap: 8px;
}
.schedule-workspace .schedule-navigation {
  flex: 1 1 auto;
}
.schedule-workspace .schedule-nav-link {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 400;
}
.schedule-workspace .schedule-period {
  padding-inline: 4px;
  font-size: 13px;
  font-weight: 500;
}
.schedule-workspace .schedule-controls > input {
  width: 175px;
  min-width: 120px;
  height: 33px;
  padding: 7px 9px;
  border-radius: 3px;
  font: inherit;
  font-size: 12px;
}
.schedule-workspace .schedule-controls > button {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 3px;
  font-size: 11px;
}
.schedule-workspace .schedule-history > summary {
  padding: 7px 5px;
}
.schedule-workspace .schedule-history-list {
  z-index: 8;
  border-radius: 3px;
  box-shadow: var(--shadow);
}
.schedule-workspace .schedule-history-list a {
  padding: 11px 13px;
}
.schedule-workspace .schedule-history-list strong {
  font-size: 12px;
  font-weight: 500;
}
.schedule-workspace .schedule-roster {
  gap: 8px 18px;
  margin: 0;
  padding: 13px 0 17px;
}
.schedule-workspace .schedule-roster h2 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.schedule-workspace .schedule-roster-people {
  gap: 6px;
  min-width: 0;
}
.schedule-workspace .schedule-person {
  touch-action: none;
  user-select: none;
  min-height: 31px;
  padding: 6px 10px;
  border-radius: 3px;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
}
.schedule-workspace .schedule-person-dragging { opacity: .65; border-color: var(--employee-color); cursor: grabbing; }
.schedule-workspace .schedule-person[aria-pressed="true"] {
  border-color: var(--employee-color);
  background: color-mix(in srgb, var(--employee-color) 12%, var(--surface));
  color: var(--text);
}
.schedule-workspace .schedule-roster-status {
  font-size: 11px;
}
.schedule-workspace .schedule-panel {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.schedule-workspace .schedule-week + .schedule-week {
  margin-top: 24px;
  border-top: 0;
}
.schedule-workspace .schedule-week-heading {
  gap: 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.schedule-workspace .schedule-week-heading h2 {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0;
}
.schedule-workspace .schedule-week-heading > span {
  margin-right: auto;
  font-size: 11px;
}
.schedule-workspace .schedule-week-heading > button {
  padding: 5px 0 5px 10px;
  font-size: 11px;
  font-weight: 400;
}
.schedule-workspace .schedule-week > .table-wrap {
  max-height: min(480px, 60dvh);
  overflow: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--border);
}
.schedule-workspace .schedule-grid-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.schedule-workspace .schedule-grid-table th,
.schedule-workspace .schedule-grid-table td {
  padding: 10px 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.schedule-workspace .schedule-grid-table tr > :last-child {
  border-right: 0;
}
.schedule-workspace .schedule-grid-table tbody tr:last-child > * {
  border-bottom: 0;
}
.schedule-workspace .schedule-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.schedule-workspace .schedule-grid-table .schedule-employee-heading {
  left: 0;
  z-index: 5;
  width: 130px;
  padding-left: 10px;
  vertical-align: middle;
}
.schedule-workspace .schedule-grid-table .schedule-day > span {
  margin-bottom: 4px;
  padding-right: 12px;
}
.schedule-workspace .schedule-grid-table .schedule-day > time {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}
.schedule-workspace .schedule-grid-table .schedule-day > small {
  margin-left: 4px;
  color: var(--accent-bright);
}
.schedule-workspace .schedule-grid-table .schedule-day > button {
  top: 5px;
  right: 3px;
  min-height: 24px;
  padding: 0 4px;
  font-size: 16px;
  line-height: 24px;
}
.schedule-workspace .schedule-day-captions small {
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
}
.schedule-workspace .schedule-grid-table .schedule-employee {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 13px 10px;
  background: var(--surface);
  box-shadow: 1px 0 var(--border);
  text-transform: none;
  letter-spacing: 0;
}
.schedule-workspace .schedule-employee strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.schedule-workspace .schedule-employee-dot {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
}
.schedule-workspace .schedule-grid-table td {
  position: relative;
  height: 61px;
  padding-bottom: 18px;
}
.schedule-workspace .schedule-grid-table .schedule-has-shift {
  background: color-mix(in srgb, var(--employee-color) 7%, var(--surface));
}
.schedule-workspace .schedule-grid-shift {
  padding: 0 0 0 6px;
  border-left: 2px solid var(--employee-color);
}
.schedule-workspace .schedule-grid-shift + .schedule-grid-shift {
  margin-top: 11px;
}
.schedule-workspace .schedule-grid-shift .schedule-shift-time {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
}
.schedule-workspace button.schedule-shift-time:hover {
  color: var(--accent-bright);
  background: transparent;
}
.schedule-workspace .schedule-shift-range {
  display: block;
  font-variant-numeric: tabular-nums;
}
.schedule-workspace .schedule-shift-time small,
.schedule-workspace .schedule-grid-shift .schedule-time small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
}
.schedule-workspace .schedule-grid-meta {
  gap: 3px 6px;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
}
.schedule-workspace .schedule-grid-shift .schedule-notes {
  display: -webkit-box;
  min-width: 0;
  max-width: none;
  margin: 5px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.schedule-workspace .schedule-grid-shift.schedule-cancelled .schedule-shift-range {
  text-decoration: line-through;
}
.schedule-workspace .schedule-grid-shift .schedule-row-actions {
  margin-top: 5px;
}
.schedule-workspace .schedule-grid-shift .schedule-row-actions button {
  padding: 0;
  font-size: 10px;
}
.schedule-workspace .schedule-off {
  display: inline-block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  opacity: .7;
}
.schedule-workspace .schedule-cell-add {
  right: 4px;
  bottom: 1px;
  min-height: 21px;
  line-height: 21px;
}
.schedule-workspace td:focus-within > .schedule-cell-add {
  opacity: 1;
}
.schedule-workspace .schedule-grid-table .schedule-drop-target {
  background: color-mix(in srgb, var(--accent-bright) 12%, var(--surface));
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
}
.schedule-workspace .schedule-summary {
  margin-top: 12px;
  padding: 10px 0 0;
  border-top: 0;
  font-size: 11px;
}
.schedule-workspace .schedule-pending {
  margin: 0 0 16px;
  padding: 10px 13px;
  border-radius: 3px;
}
.schedule-workspace .schedule-table {
  min-width: 760px;
}
.schedule-workspace .schedule-table th,
.schedule-workspace .schedule-table td {
  padding: 11px 10px;
}
.schedule-workspace .schedule-table .schedule-notes {
  min-width: 120px;
}
.schedule-workspace :is(button, a, summary, input):focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}
#modal[open]:has(.schedule-form) {
  display: flex;
  flex-direction: column;
  width: min(620px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
}
#modal:has(.schedule-form) > .modal-head {
  flex-shrink: 0;
  gap: 16px;
  padding: 16px 22px;
  background: var(--surface);
}
#modal:has(.schedule-form) > .modal-head h2 {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 500;
  line-height: 1.1;
}
#modal:has(.schedule-form) > .modal-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
#modal .schedule-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
}
#modal .schedule-form [hidden] {
  display: none;
}
.schedule-form .schedule-form-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 20px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}
.schedule-form .field {
  min-width: 0;
  gap: 7px;
  margin: 0 0 15px;
}
.schedule-form .schedule-form-body > .field:last-child {
  margin-bottom: 0;
}
.schedule-form .field > label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.schedule-form .field input,
.schedule-form .field textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  box-sizing: border-box;
}
.schedule-form .field textarea {
  min-height: 66px;
  resize: vertical;
}
.schedule-form .field input:focus-visible,
.schedule-form .field textarea:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 1px;
}
.schedule-form .schedule-dates {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 0 16px;
}
.schedule-form .schedule-turn-context { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.schedule-form .schedule-turn-context strong { font-size: 18px; font-weight: 550; }
.schedule-form .schedule-turn-context > span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.schedule-form .schedule-context-fields > summary,
.schedule-form .schedule-turn-details > summary { width: fit-content; color: var(--muted); font-size: 12px; cursor: pointer; padding: 7px 0; }
.schedule-form .schedule-context-fields { margin-bottom: 18px; }
.schedule-form details[open] > summary { margin-bottom: 12px; }
.schedule-form .schedule-times { grid-template-columns: 1fr 1fr; gap: 16px; }
.schedule-form .schedule-times input { min-height: 48px; font-size: 21px; font-variant-numeric: tabular-nums; }
.schedule-form .schedule-turn-details { border-top: 1px solid var(--border); padding-top: 8px; }
.schedule-form .schedule-turn-details .form-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
.schedule-form .schedule-dates input,
.schedule-form input[name="overtime_hours"] {
  font-variant-numeric: tabular-nums;
}
.schedule-form .schedule-duration {
  margin: -3px 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.schedule-form .schedule-duration:empty,
.schedule-form [data-schedule-employee-status]:empty {
  display: none;
}
.schedule-form .schedule-extra-row { display: flex; align-items: center; gap: 20px; }
.schedule-form .schedule-extra-row .field { flex: 0 1 150px; }
.schedule-form .schedule-extra-row .schedule-duration { margin: 10px 0 0; }
.schedule-info-name { margin: 0 0 18px; font-size: 18px; font-weight: 500; }
.schedule-info dl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0; }
.schedule-info dt { color: var(--muted); font-size: 11px; }
.schedule-info dd { margin: 5px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.schedule-info-note { margin-top: 24px; overflow-wrap: anywhere; }
.schedule-info-note h3 { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 400; }
.schedule-info-note p { margin: 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.schedule-form .schedule-employee-results {
  top: 62px;
  z-index: 3;
  max-height: min(220px, 35dvh);
  border-radius: 3px;
  box-shadow: var(--shadow);
}
.schedule-form .schedule-employee-results button {
  min-height: 36px;
  padding: 9px 10px;
  font-size: 12px;
}
.schedule-form .schedule-form-message {
  flex-shrink: 0;
  max-height: 18dvh;
  margin: 0;
  padding: 0 22px 13px;
  overflow-y: auto;
  color: var(--warning);
  font-size: 12px;
  line-height: 1.5;
}
.schedule-form .schedule-form-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.schedule-form .schedule-form-actions button {
  min-height: 37px;
  padding: 8px 11px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
.schedule-form .schedule-form-actions > [data-schedule-discard] {
  padding-inline: 0;
  color: var(--muted);
  font-size: 11px;
}
.schedule-form .schedule-form-actions .schedule-cancel {
  color: var(--red);
}
.schedule-cancel-form .schedule-form-body > p {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
}
@media (max-width: 1050px) {
  .schedule-workspace .schedule-grid-table td { padding-inline: 4px; }
  .schedule-workspace .schedule-shift-range { font-size: 11px; white-space: nowrap; }
  .schedule-workspace .schedule-controls {
    flex: 1 1 100%;
  }
  .schedule-workspace .schedule-controls > input {
    flex: 1;
    max-width: 290px;
    margin-right: auto;
  }
}
@media (max-width: 700px) {
  .schedule-workspace-head {
    margin-bottom: 18px;
  }
  .schedule-workspace .schedule-toolbar {
    padding: 0 0 13px;
  }
  .schedule-workspace .schedule-navigation {
    gap: 6px;
  }
  .schedule-workspace .schedule-period {
    font-size: 11px;
    white-space: normal;
  }
  .schedule-workspace .schedule-week-heading {
    flex-wrap: wrap;
    gap: 5px 12px;
  }
  .schedule-workspace .schedule-week-heading > button {
    margin-left: auto;
  }
  .schedule-workspace .schedule-roster {
    align-items: flex-start;
    padding-block: 12px 16px;
  }
  .schedule-workspace .schedule-roster > div:first-child {
    flex-basis: 100%;
  }
}
@media (max-width: 520px) {
  #modal[open]:has(.schedule-form) {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
  #modal:has(.schedule-form) > .modal-head {
    padding: 14px 16px;
  }
  .schedule-form .schedule-form-body {
    padding: 18px 16px;
  }
  .schedule-form .schedule-dates {
    gap: 0 10px;
  }
  .schedule-form .schedule-form-message {
    padding-inline: 16px;
  }
  .schedule-form .schedule-form-actions {
    padding: 10px 16px 13px;
  }
  .schedule-form .schedule-form-actions > [data-schedule-discard] {
    flex-basis: 100%;
    min-height: 28px;
    padding-block: 3px;
    text-align: left;
  }
}
