.shifts-heading { margin: 22px 0 16px; }
.shifts-toolbar, .shifts-actions, .shifts-week, .shifts-editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.shifts-toolbar { margin-top: 16px; gap: 12px; }
.shifts-week {
  flex-wrap: nowrap;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.shifts-week .button { border: 0; border-radius: 0; }
.shifts-week span { padding: 0 12px; font-weight: 650; white-space: nowrap; }
.shifts-actions { margin-left: auto; }
#shifts-workspace button:disabled { opacity: .55; cursor: default; }
.shifts-status {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--amber-bg);
  color: var(--amber);
  font-weight: 700;
  font-size: 12px;
}
.shifts-status.is-published { background: var(--olive-soft); color: var(--olive); }
.shifts-message:empty { display: none; }
.shifts-layout { display: grid; gap: 16px; align-items: start; }
.shifts-layout.with-editor { grid-template-columns: minmax(0,1fr) 290px; }
.shifts-grid {
  min-width: 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.shifts-grid table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; }
.shifts-grid th, .shifts-grid td { padding: 7px; border-bottom: 1px solid var(--line); }
.shifts-grid thead th { background: var(--paper); padding: 12px 7px; white-space: nowrap; }
.shifts-grid tbody tr:last-child > * { border-bottom: 0; }
.shifts-grid tr > :first-child {
  position: sticky;
  left: 0;
  text-align: left;
  min-width: 105px;
  padding-left: 12px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 1;
}
.shifts-grid thead tr > :first-child { background: var(--paper); }
.shifts-grid small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.shifts-total { font-size: 12px; font-weight: 700; text-align: center; min-width: 62px; }
.shifts-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-height: 45px;
  padding: 4px 3px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.shifts-cell strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.shifts-cell.assigned { color: var(--ink); background: var(--olive-soft); }
button.shifts-cell { cursor: pointer; }
button.shifts-cell:hover, .shifts-cell.is-selected { border-color: var(--olive); }
.shifts-cell.is-selected { box-shadow: inset 0 0 0 1px var(--olive); }
.shifts-editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.shifts-editor-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.shifts-editor-heading h2, .shifts-editor-heading p { margin: 0 0 4px; }
.shifts-editor-heading .button { padding: 0; width: 44px; flex-shrink: 0; }
#shift-form { display: grid; gap: 12px; }
#shift-form .field { margin: 0; min-width: 0; }
#shift-form input, #shift-form textarea { width: 100%; min-width: 0; }
.shifts-time-fields { display: grid; gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.shifts-calculation {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--olive-soft);
}
.shifts-calculation output { font-weight: 750; }
.shifts-editor-actions { justify-content: flex-end; }
.shifts-remove { color: var(--danger); justify-self: end; }
.shifts-empty { margin: 0; padding: 20px; }
#shift-editor-message { margin: 0; color: var(--danger); }
#shift-editor-message:empty { display: none; }
@media (max-width: 1000px) {
  .shifts-layout.with-editor { grid-template-columns: minmax(0,1fr); }
  .shifts-editor { width: 100%; max-width: 530px; }
}
@media (max-width: 550px) {
  .shifts-actions { margin-left: 0; }
}
