:root {
  --shadow: 0 0 5px 0 rgba(0 0 30 / 0.5);
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  font-family: system-ui;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  box-sizing: border-box;
  font-size: 14px;
}

.top-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;

  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.top-bar h1 {
  padding: 0;
  margin: 0;
  font-size: 1.25rem;
}

nav {
  display: flex;
  gap: 0.5rem;
}

.row {
  padding: 8px;
  position: relative;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

fieldset {
  padding: 0;
  margin: 0;
  border: none;
  display: flex;
  flex-flow: column nowrap;
  gap: 16px;
}

fieldset p {
  padding: 0;
  margin: 0;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
  font-family: inherit;
  display: block;
  width: 100%;
  padding: 8px;
  font-size: 16px;
}

.form-actions {
  margin-top: 1rem;
}

button,
input[type="submit"] {
  padding: 8px;
  margin: 0;
  line-height: 1;
}

button {
  appearance: none;
  border: none;
  background-color: transparent;
  font-family: inherit;
  padding: 0;
  cursor: pointer;

  @media screen and (-ms-high-contrast: active) {
    border: 2px solid currentcolor;
  }
}

button,
.button {
  background: #44f;
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: inherit;
  line-height: 1.3;
}

.searchbox {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.searchbox .searching {
  order: 1;
}

#filterform {
  display: flex;
  gap: 0.5rem;
}

#filterform p {
  padding: 0;
  margin: 0;
}

#filterform table {
  display: none; /* Should be removed in towel, really. */
}

.searchbox + .pagination {
  display: none;
}

.table {
  width: 100%;
  overflow-x: scroll;
}

.table tr > :nth-child(1) {
  position: sticky;
  left: 0;
}

.stats tr:nth-child(even) > :nth-child(1) {
  background: #fff;
}
.stats tr:nth-child(odd) > :nth-child(1) {
  background: #e8e8ea;
}

.table td,
.table th {
  vertical-align: top;
  text-align: left;
  padding: 4px;
}

.table tr:nth-child(odd) {
  background: #e8e8ea;
}

.table td a {
  text-decoration: none;
}

.entries td:nth-child(3n),
.stats tr > *:nth-child(n + 2) {
  text-align: right;
}

.pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
}

.pagination a {
  display: inline-block;
  padding: 8px;
}

a {
  color: #44f;
}
