* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f4f6fa;
  color: #182539;
  font: 1rem/1.5 system-ui, sans-serif;
}

main {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 3rem);
}

a { color: #075bb5; }
h1 { margin: .65rem 0 1.5rem; line-height: 1.2; }
h2 { margin: 0 0 1rem; }

.toolbar, .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
}

.toolbar { justify-content: space-between; }
.search { flex: 1 1 16rem; max-width: 24rem; }
label { display: grid; gap: .25rem; font-weight: 600; }

input, button {
  min-height: 2.5rem;
  border-radius: .375rem;
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  padding: .4rem .65rem;
  border: 1px solid #8796a9;
  background: white;
  color: inherit;
}

button {
  border: 1px solid transparent;
  background: #075bb5;
  color: white;
  padding: .35rem .7rem;
  cursor: pointer;
}

button:hover { filter: brightness(.9); }
button.secondary { background: #e8f0fa; color: #174779; }
button.delete { background: #fbe8ea; color: #9a2437; }
:focus-visible { outline: 2px solid #075bb5; outline-offset: 2px; }
.status { color: #46566c; margin: 1.25rem 0 .5rem; }

.table-scroll {
  overflow-x: auto;
  border: 1px solid #d4dce8;
  border-radius: .5rem;
  background: white;
}

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .65rem; text-align: left; }
th { background: #e8eef7; }
tbody tr + tr { border-top: 1px solid #e0e6ef; }
.row-actions { white-space: nowrap; }
.row-actions button + button { margin-left: .35rem; }

dialog {
  width: min(36rem, calc(100% - 2rem));
  border: 0;
  border-radius: .65rem;
  padding: 1.25rem;
  color: inherit;
  box-shadow: 0 12px 36px #0004;
}

dialog::backdrop { background: #18253980; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.actions { justify-content: end; margin-top: 1rem; }

@media (max-width: 32rem) {
  .fields { grid-template-columns: 1fr; }
}
