:root {
  --ink: #242f42;
  --navy: #182335;
  --gold: #b6995f;
  --line: #dde2e8;
  --muted: #576578;
  --paper: #f4f6f8;
  --white: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    16px / 1.55 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a {
  color: #254d79;
  text-underline-offset: 3px;
}
header {
  background: var(--navy);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 5%;
  gap: 24px;
}
header a {
  color: white;
  text-decoration: none;
}
header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
header form {
  margin: 0;
}
header button {
  padding: 7px 15px;
  background: transparent;
  border: 1px solid #8391a3;
}
.brand {
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.brand span {
  display: block;
  font: 10px system-ui;
  letter-spacing: 0.4em;
  color: #d8c397;
  margin-top: 3px;
}
.shell {
  max-width: 1500px;
  margin: auto;
  min-height: 75vh;
}
.with-sidebar {
  display: grid;
  grid-template-columns: 220px 1fr;
}
aside {
  background: white;
  padding: 32px 22px;
  border-right: 1px solid var(--line);
}
aside nav {
  display: grid;
  gap: 5px;
}
aside nav a {
  padding: 10px 12px;
  text-decoration: none;
  border-radius: 5px;
}
aside nav a[aria-current] {
  background: #efe9dd;
  font-weight: 650;
}
.identity {
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}
main {
  padding: 36px 5%;
  min-width: 0;
}
.page-title {
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #76623e;
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 600;
  margin: 0;
}
h2 {
  font-size: 19px;
  line-height: 1.3;
  margin: 0 0 20px;
}
h3 {
  font-size: 16px;
}
p {
  margin: 0 0 16px;
}
.muted,
.help {
  color: var(--muted);
  font-size: 14px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: 0 3px 10px #18233505;
}
.auth {
  max-width: 490px;
  margin: 25px auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.grid .card {
  margin-bottom: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.metric {
  padding: 20px;
  background: white;
  border-top: 3px solid var(--gold);
  border-radius: 5px;
}
.metric strong {
  display: block;
  font-size: 32px;
}
.metric span {
  font-size: 14px;
  color: var(--muted);
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #b8c2cf;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  margin-top: 6px;
}
textarea {
  min-height: 95px;
  resize: vertical;
}
input[type="checkbox"] {
  width: auto;
  display: inline-block;
  margin-right: 8px;
}
button,
.button {
  display: inline-block;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: white;
  padding: 10px 18px;
  border-radius: 5px;
  font: 600 14px system-ui;
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.button:hover {
  background: #30425d;
}
.secondary {
  background: white;
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid #b6995f;
  outline-offset: 3px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  background: #f5f7f9;
}
td,
th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td form {
  display: inline-block;
  margin: 0 5px 6px 0;
}
td button {
  font-size: 12px;
  padding: 6px 10px;
}
td a {
  overflow-wrap: anywhere;
}
.badge {
  font-size: 11px;
  font-weight: 650;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  background: #edf1f6;
  white-space: nowrap;
}
.notice {
  background: #eaf2ed;
  border-left: 4px solid #3f7453;
  padding: 16px 18px;
  margin-bottom: 22px;
  border-radius: 4px;
}
.error {
  background: #fff0ef;
  border-left: 4px solid #ac423c;
  padding: 18px;
  margin: 16px 0;
}
.empty {
  padding: 25px 0;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.pagination {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}
code {
  font:
    13px ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  background: #edf1f6;
  padding: 3px 5px;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  color: #254d79;
  font-weight: 600;
}
.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.filters label {
  margin: 0;
  flex: 1;
  min-width: 130px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 20px;
  top: 15px;
  background: white;
  padding: 10px;
  z-index: 10;
}
footer {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 24px 5%;
  text-align: center;
}
.secret {
  font:
    16px ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  background: #f4f6f8;
  padding: 16px;
}
.qrcode {
  margin: 20px 0;
  text-align: center;
}
.qrcode img {
  display: block;
  width: min(256px, 100%);
  height: auto;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.qrcode figcaption {
  color: var(--muted);
  font-size: 14px;
}
.report-frame {
  display: block;
  width: 100%;
  height: 75vh;
  border: 1px solid var(--line);
  background: white;
}
.report-title {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.report-title h2 {
  margin: 0;
}
@media (max-width: 850px) {
  .with-sidebar {
    display: block;
  }
  aside {
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
  }
  aside .identity,
  aside > .eyebrow {
    display: none;
  }
  aside nav a {
    padding: 7px 10px;
    font-size: 13px;
  }
  header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  header nav {
    gap: 15px;
    font-size: 14px;
  }
  main {
    padding: 25px 4%;
  }
  .card {
    padding: 20px;
  }
  .report-title {
    display: block;
  }
  .report-title .actions {
    margin-top: 10px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition: background-color 0.15s ease;
  }
}
@media print {
  header,
  aside,
  footer,
  .actions,
  button {
    display: none;
  }
  .with-sidebar {
    display: block;
  }
  main {
    padding: 0;
  }
  .card {
    box-shadow: none;
    break-inside: avoid;
  }
}
