.shift-editor h3 {
  margin: 0 0 12px;
  font-size: 14px;
}
.shift-schedule {
  padding: 14px;
  border: 1px solid #ccd7d8;
  border-radius: 8px;
  background: #f4f8f8;
}
.shift-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.shift-pair input,
.shift-pair select {
  max-width: 100%;
}
.shift-second-control {
  min-height: 40px;
  margin: 12px 0;
}
.shift-dates {
  padding-top: 15px;
}
.shift-range {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.shift-small-button {
  min-height: 42px;
  padding: 5px 9px;
  border: 1px solid #a7b7ba;
  border-radius: 5px;
  background: #fff;
  color: #234447;
  font-size: 12px;
  font-weight: 700;
}
.shift-small-button:hover {
  border-color: #527578;
  background: #e8f2f1;
}
.shift-cycle {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.shift-chip {
  min-width: 32px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-align: center;
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.shift-chip-work {
  color: #194648;
  background: #dcefee;
}
.shift-chip-day {
  color: #654907;
  background: #fcf0d2;
}
.shift-chip-night {
  color: #403369;
  background: #eae7f8;
}
.shift-chip-on-duty {
  color: #743a23;
  background: #f6e5dc;
}
.shift-chip-off {
  color: #4a5559;
  border-color: #cbd6d7;
  background: #fff;
}
.shift-nearby {
  display: grid;
  gap: 2px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
  color: #324e50;
  font-size: 12px;
  line-height: 1.45;
}
.shift-cycle:empty,
.shift-nearby:empty {
  display: none;
}
.shift-nearby li {
  padding: 4px 7px;
  border-inline-start: 3px solid transparent;
  border-radius: 4px;
}
.shift-nearby time {
  display: inline-block;
  min-width: 5.75rem;
  font-variant-numeric: tabular-nums;
}
.shift-nearby .shift-anchor {
  border-inline-start-color: #3a7375;
  background: #dfefee;
  font-weight: 750;
}
.shift-cycle-editor {
  margin-top: 11px;
}
.shift-cycle-days {
  display: grid;
  gap: 8px;
  max-height: 14rem;
  overflow: auto;
  margin: 0 -5px 10px;
  padding: 8px;
}
.shift-cycle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 42px);
  align-items: end;
  gap: 5px;
}
.shift-cycle-row label {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #324e50;
  font-size: 12px;
  font-weight: 650;
}
.shift-cycle-row select,
.shift-cycle-row button {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #a7b7ba;
  border-radius: 6px;
  background: #fff;
  color: #234447;
}
.shift-cycle-row select {
  width: 100%;
  padding: 3px 5px;
}
.shift-cycle-row button {
  font-size: 17px;
  font-weight: 750;
}
.shift-cycle-row button:not(:disabled):hover {
  border-color: #527578;
  background: #e8f2f1;
}
.shift-cycle-row button[data-action="remove-day"] {
  color: #8a4231;
}
.shift-cycle-row button:disabled {
  opacity: .5;
  cursor: default;
}
.shift-options > summary {
  margin: 0 0 8px;
  padding-block: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.shift-preview-options select {
  min-height: 42px;
  max-width: 100%;
  padding-inline: 6px;
}
.cp-preview-head .shift-sample {
  display: inline-block;
  margin: 0 0 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #e7f0f0;
  color: #315054;
  font-size: 11px;
  font-weight: 750;
}
.shift-stage .cp-sheet {
  margin-block: 0;
}
.shift-stage .cp-sheet:empty {
  min-height: 10rem;
}
#bothOff {
  color: #2e5356;
  font-weight: 700;
}
@media (max-width: 390px) {
  .shift-schedule {
    padding: 12px;
  }
  .shift-pair {
    gap: 8px;
  }
  .shift-preview-options {
    padding-inline: 12px;
  }
}

@media (max-width: 365px) {
  .shift-cycle-row label {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}
