.shift-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 12px 0;
  flex-wrap: wrap;
  gap: 12px;

  &-text {
    h1 {
      margin: 0;
      font-size: 22px;
      font-weight: 700;
      color: #111827;

      em {
        font-style: italic;
        color: var(--action-primary-default, #834dd0);
        font-weight: 600;
      }
    }

    p {
      margin: 2px 0 0;
      font-size: 13px;
      color: #6b7280;
    }
  }
}

.btn-confirm-shift {
  background: #15803d;
  border: 1px solid #15803d;
  color: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  height: fit-content;

  &:hover {
    background: #166534;
  }
}

.roster-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 12px 0 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.info-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.no-roster-msg {
  margin-top: 24px;
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  background: #fff;
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
}

.shift-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
  margin-top: 16px;
}

.shift-main {
  min-width: 0;
}

.workstation-card {
  background: #fff;
  border: 1px solid #edeef2;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 14px;

  &.unstaffed {
    border-color: #fecaca;
  }
}

.workstation-card-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;

  .ws-code {
    font-size: 13px;
    font-weight: 700;
    color: var(--action-primary-default, #834dd0);
  }

  .ws-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
  }
}

.staffing-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;

  &:not(:last-child) {
    border-bottom: 1px solid #f1f2f5;
  }

  &.absent-row {
    background: #fef2f2;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 4px 0;
  }
}

.op-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

.op-role {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.op-absent-reason {
  font-size: 13px;
  color: #b91c1c;
  text-decoration: line-through;
  flex: 1;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
}

.badge-present {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.badge-absent {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.badge-replaced {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.badge-covered {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.badge-unstaffed {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  margin-left: auto;
}

.btn-mark-absent,
.btn-assign-replacement {
  background: #fff;
  border: 1px solid #f59e0b;
  color: #b45309;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;

  &:hover {
    background: #fffbeb;
  }
}

.btn-mark-present {
  color: var(--action-primary-default, #834dd0);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;

  &:hover {
    text-decoration: underline;
  }
}

.empty-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.btn-assign-link {
  color: var(--action-primary-default, #834dd0);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;

  &:hover {
    text-decoration: underline;
  }
}

.shift-sidebar {
  position: sticky;
  top: 12px;
}

.summary-card {
  background: #fff;
  border: 1px solid #edeef2;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);

  h3 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
  }
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
  padding: 6px 0;

  strong {
    color: #0f172a;
    font-size: 14px;
  }

  .text-present {
    color: #047857;
  }

  .text-absent {
    color: #b91c1c;
  }

  .text-replaced {
    color: #b45309;
  }
}

.coverage-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f2f5;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;

  strong {
    font-size: 15px;
    color: #0f172a;
  }
}

.coverage-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #f1f2f5;
  overflow: hidden;
}

.coverage-bar-fill {
  height: 100%;
  background: #f97316;
  border-radius: 999px;
}

.unstaffed-warning {
  margin-top: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}

.replace-modal-backdrop,
.assign-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.replace-modal,
.assign-modal {
  background: #fff;
  border-radius: 10px;
  width: min(480px, 92vw);
  padding: 20px 24px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.replace-modal-header,
.assign-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;

  h2 {
    font-size: 18px;
    margin: 0;
  }

  .replace-modal-close,
  .assign-modal-close {
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #6b7280;

    &:hover {
      color: #111827;
    }
  }
}

.replace-modal-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.replace-modal-body,
.assign-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.replace-modal-footer,
.assign-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;

  button {
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 14px;
    cursor: pointer;
  }

  .btn-cancel {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
  }

  .btn-confirm {
    background: var(--button-primary-bg-default);
    border: 1px solid var(--button-primary-bg-default);
    color: var(--button-primary-text-default);
  }
}
