.overtime-team-toolbar {
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(240px, 1fr);
  align-items: end;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.06);
}

.overtime-scope-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(31, 42, 38, 0.08);
}

.overtime-scope-switch button {
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.overtime-scope-switch button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(20, 20, 20, 0.1);
}

.overtime-scope-switch button:focus-visible,
.overtime-decision:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.overtime-team-picker {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.overtime-team-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: -4px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.overtime-history-row.has-actions {
  grid-template-columns: minmax(0, 1fr) 72px 104px minmax(188px, auto);
}

.overtime-history-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.overtime-decision {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.overtime-decision-approve {
  border-color: rgba(37, 118, 82, 0.35);
  color: #216b4c;
}

.overtime-decision-reject {
  border-color: rgba(176, 64, 64, 0.35);
  color: #984040;
}

.overtime-decision:disabled {
  cursor: wait;
  opacity: 0.55;
}

.overtime-history-action-complete {
  color: var(--muted);
}

@media (max-width: 900px) {
  .overtime-team-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .overtime-team-status {
    grid-column: auto;
  }

  .overtime-history-row.has-actions {
    grid-template-columns: minmax(0, 1fr) 64px 96px;
  }

  .overtime-history-row.has-actions > .overtime-history-actions,
  .overtime-history-header.has-actions > :last-child {
    grid-column: 1 / -1;
  }

  .overtime-history-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .overtime-scope-switch {
    grid-template-columns: 1fr;
  }

  .overtime-history-row.has-actions {
    grid-template-columns: 1fr;
  }

  .overtime-history-actions {
    flex-wrap: wrap;
  }

  .overtime-decision {
    min-height: 44px;
  }
}
