:root {
  color-scheme: light;
  --ink: #18222f;
  --muted: #637083;
  --line: #d9dee7;
  --panel: #ffffff;
  --page: #f5f7fb;
  --accent: #0d766e;
  --accent-dark: #0a5c56;
  --danger: #a33b3b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
}

.brand {
  font-weight: 750;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.shell {
  margin: 0 auto;
  max-width: 1080px;
  padding: 36px 24px;
}

.page-head {
  align-items: flex-end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}

h1 {
  font-size: 30px;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0 0 8px;
}

p {
  color: var(--muted);
  margin: 0;
}

.panel,
table,
.public-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel,
.public-form {
  padding: 24px;
}

table {
  border-collapse: collapse;
  overflow: hidden;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

td span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 2px;
}

tr:last-child td {
  border-bottom: 0;
}

.actions {
  text-align: right;
  white-space: nowrap;
}

.button,
button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  text-decoration: none;
}

.button.primary,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button.primary:hover,
button.primary:hover {
  background: var(--accent-dark);
}

.button.small {
  font-size: 13px;
  min-height: 34px;
  padding: 0 10px;
}

form {
  display: grid;
  gap: 16px;
}

label,
fieldset {
  border: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

label,
legend {
  color: var(--ink);
  font-weight: 700;
}

.label-text {
  align-items: baseline;
  display: inline-flex;
  gap: 4px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

b {
  color: var(--danger);
}

.hint {
  font-size: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.danger {
  margin-top: 16px;
}

.danger button {
  border-color: #e0b9b9;
  color: var(--danger);
}

.login {
  margin: 8vh auto 0;
  max-width: 420px;
}

.public-form {
  margin: 4vh auto 0;
  max-width: 680px;
}

.public-form h1 {
  font-size: 28px;
}

.public-form > p {
  margin-bottom: 22px;
}

.thanks-button {
  margin-top: 20px;
}

.choice {
  align-items: center;
  display: flex;
  font-weight: 500;
  gap: 10px;
}

.choice input {
  min-height: auto;
  width: auto;
}

.company-field {
  left: -10000px;
  position: absolute;
}

.notice {
  border-radius: 7px;
  margin: 14px 0;
  padding: 12px;
}

.notice.error {
  background: #fff2f2;
  border: 1px solid #e0b9b9;
  color: var(--danger);
}

dl {
  display: grid;
  gap: 10px 18px;
  grid-template-columns: 180px 1fr;
  margin: 0 0 22px;
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
}

.empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .topbar,
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 10px;
    padding: 16px;
  }

  .shell {
    padding: 24px 16px;
  }

  th:nth-child(2),
  td:nth-child(2) {
    display: none;
  }

  .actions {
    white-space: normal;
  }

  dl {
    grid-template-columns: 1fr;
  }
}
