:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
  background: #f6f6f2;
  color: #20231f;
}

header,
main {
  max-width: 70rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header a,
.link-button {
  color: inherit;
  text-decoration: none;
}

.brand {
  font-weight: 700;
}

header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

header nav form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.form-card {
  max-width: 28rem;
}

input,
button {
  font: inherit;
}

.error {
  color: #a01919;
}

h1,
h2 {
  line-height: 1.2;
}

a {
  color: #24577a;
}

.button {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border: 1px solid #24577a;
  border-radius: 0.35rem;
  background: #24577a;
  color: #fff;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
}

.button-secondary {
  border-color: #899287;
  background: #fff;
  color: #20231f;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.page-heading h1,
.page-heading p {
  margin-top: 0;
}

.card,
.notice,
.empty-state {
  padding: 1.25rem;
  border: 1px solid #d6d9d1;
  border-radius: 0.5rem;
  background: #fff;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 650;
}

.help {
  color: #596157;
  font-size: 0.92rem;
}

.notice {
  margin: 1.25rem 0;
  border-left: 0.3rem solid #b58b17;
  background: #fffaf0;
}

.notice-error,
.message-error {
  border-color: #a01919;
  background: #fff3f3;
}

.message {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #b9c7b5;
  border-radius: 0.35rem;
  background: #f2f8f0;
}

.message-info {
  border-color: #9bb7ca;
  background: #f0f7fb;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e1e3de;
  text-align: left;
  vertical-align: top;
}

th {
  background: #ecefe9;
  white-space: nowrap;
}

.number {
  text-align: right;
}

.status,
.severity {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #e5e8e1;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
}

.status-validated,
.status-imported,
.status-open,
.status-completed,
.status-sent,
.status-normal {
  background: #dcefd8;
  color: #24551e;
}

.status-received {
  background: #dfe7ef;
  color: #27485f;
}

.status-rejected,
.status-failed,
.status-incomplete_data,
.severity-error,
.severity-blocking {
  background: #f5d8d8;
  color: #7b1717;
}

.severity-warning {
  background: #f6e9bd;
  color: #6a4d00;
}

.status-suppressed {
  background: #f6e9bd;
  color: #6a4d00;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid #d7dbd3;
  border-radius: 0.4rem;
  background: #fff;
  white-space: pre-wrap;
}

.status-high {
  background: #f6e9bd;
  color: #6a4d00;
}

.status-critical {
  background: #f5d8d8;
  color: #7b1717;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.summary-grid div {
  padding: 1rem;
  border: 1px solid #d6d9d1;
  border-radius: 0.5rem;
  background: #fff;
}

.summary-grid dt {
  color: #596157;
  font-size: 0.9rem;
}

.summary-grid dd {
  margin: 0.2rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.summary-grid .summary-text {
  font-size: 1rem;
}

.confirmation-form {
  margin: 1.25rem 0;
}

.settings-group {
  margin: 0 0 1.25rem;
}

.settings-group legend {
  padding: 0 0.4rem;
  font-weight: 700;
}

.settings-group input:not([type="checkbox"]),
.settings-group textarea {
  box-sizing: border-box;
  width: min(100%, 32rem);
  padding: 0.45rem;
}

.checkbox-field label {
  display: inline;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

@media (max-width: 42rem) {
  header,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
