:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #172033;
  background: #f5f7fb;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: .4rem;
  padding: .55rem .85rem;
  color: white;
  background: #2457c5;
  cursor: pointer;
}
button:hover { background: #173f99; }
button:disabled { cursor: not-allowed; opacity: .55; }
button.secondary { color: #24304a; background: #e8ecf5; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem max(1.25rem, calc((100vw - 80rem) / 2));
  background: white;
  border-bottom: 1px solid #dfe4ee;
}
.page-header h1 { margin: 0; font-size: 1.7rem; }
.eyebrow { margin: 0; color: #596780; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
main { max-width: 80rem; margin: 1.5rem auto; padding: 0 1.25rem; }
.tabs { display: flex; gap: .35rem; border-bottom: 1px solid #dfe4ee; margin-bottom: 1rem; }
.tab { color: #33415e; background: transparent; border-radius: .4rem .4rem 0 0; }
.tab:hover, .tab.active { color: #17439d; background: #e9efff; }
.toolbar, .inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
label { display: grid; gap: .25rem; font-size: .85rem; font-weight: 600; }
input, select, textarea {
  min-width: 9rem;
  padding: .5rem;
  border: 1px solid #b9c3d4;
  border-radius: .35rem;
  background: white;
  color: #172033;
}
input[type="checkbox"] { min-width: auto; }
input[type="search"] { min-width: 14rem; }
.checkbox-label { display: flex; align-items: center; gap: .4rem; padding: .55rem 0; }
.checkbox-label input { min-width: auto; }
h2 { margin: 1.5rem 0 .5rem; font-size: 1.15rem; }
h3 { margin: 1rem 0 .25rem; font-size: 1rem; }
.detail-hint { margin: 0 0 .75rem; color: #596780; font-size: .85rem; }
.dialog-heading + p { color: #44516a; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid #dfe4ee; border-radius: .5rem; margin-bottom: 1.25rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .65rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid #edf0f5; }
th { color: #44516a; background: #f8f9fc; font-size: .8rem; }
tbody tr:last-child td { border-bottom: 0; }
td button { padding: .35rem .6rem; font-size: .85rem; }
.message { min-height: 1.5rem; margin: 0 0 .4rem; color: #33415e; }
.rights-summary { margin: 0 0 .75rem; color: #44516a; font-size: .9rem; }
.login-view { max-width: 48rem; margin: 3rem auto; padding: 1.5rem; background: white; border: 1px solid #dfe4ee; border-radius: .5rem; }
.login-view h2 { margin-top: 0; }
.login-view .inline-form { align-items: end; }
.message.error { color: #a32121; }
.message.success { color: #16703b; }
.empty { color: #68758b; text-align: center; }
dialog { width: min(42rem, calc(100vw - 2rem)); max-height: 90vh; border: 0; border-radius: .6rem; padding: 1.25rem; box-shadow: 0 1rem 4rem #17203340; }
dialog::backdrop { background: #10203d80; }
.dialog-heading, .form-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dialog-heading h2 { margin: 0 0 1rem; }
.dialog-heading button { padding: .2rem .55rem; background: #e8ecf5; color: #24304a; font-size: 1.25rem; }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; max-height: 65vh; overflow-y: auto; padding: .25rem; }
.form-fields label { align-content: start; }
.form-fields .wide { grid-column: 1 / -1; }
.form-fields textarea { min-height: 6rem; resize: vertical; font-family: ui-monospace, monospace; }
.form-actions { justify-content: end; margin-top: 1rem; }
footer { max-width: 80rem; margin: 2rem auto; padding: 0 1.25rem; color: #68758b; font-size: .85rem; }
@media (max-width: 640px) {
  .page-header { padding: 1rem; }
  main { padding: 0 .75rem; }
  .form-fields { grid-template-columns: 1fr; }
  .form-fields .wide { grid-column: auto; }
}
