:root {
  color-scheme: dark;
  --background: #211f1e;
  --panel: #33312f;
  --field: #272522;
  --text: #f3eadd;
  --muted: #cfc2b4;
  --accent: #d9b484;
  --line: #675b4e;
  font: 1rem/1.5 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--background); }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .65rem max(1rem, calc((100vw - 68rem) / 2));
  border-bottom: 1px solid var(--line); background: #2a2725;
}
.brand { display: flex; align-items: center; gap: .85rem; font-weight: 650; }
.brand img { border-radius: 50%; }
main { width: min(calc(100% - 2rem), 68rem); margin: 2rem auto 4rem; }
h1, h2 { margin: 0; font: 400 clamp(1.9rem, 5vw, 2.6rem)/1.12 Georgia, serif; }
h2 { font-size: clamp(1.25rem, 4vw, 1.65rem); }
p { margin: .6rem 0; color: var(--muted); }
.login, .records, .summary div { background: var(--panel); border: 1px solid var(--line); border-radius: .7rem; }
.login { max-width: 28rem; margin: clamp(2rem, 9vw, 6rem) auto; padding: clamp(1.25rem, 5vw, 2rem); border-top: 3px solid var(--accent); }
.login .primary { width: 100%; margin-top: 1rem; }
button, input, select { font: inherit; }
button { min-height: 2.7rem; border: 1px solid var(--line); border-radius: .4rem; padding: .48rem .88rem; font-weight: 650; cursor: pointer; }
.primary { background: var(--accent); border-color: var(--accent); color: #261e18; }
.secondary { color: var(--text); background: var(--field); }
button:disabled { opacity: .65; cursor: default; }
button:not(:disabled):hover { border-color: var(--accent); filter: brightness(1.12); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dashboard-heading, .toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.summary { margin: 1.1rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.summary div { padding: .9rem 1rem; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: .2rem 0 0; font-size: 1.5rem; font-weight: 700; }
.records { padding: clamp(.8rem, 4vw, 1.35rem); }
.filters { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1rem 0 .6rem; }
.filters label { display: grid; gap: .25rem; color: var(--muted); font-size: .9rem; }
.filters label:first-child { flex: 1 1 13rem; }
input, select { min-height: 2.65rem; border: 1px solid var(--line); border-radius: .36rem; padding: .5rem .65rem; background: var(--field); color: var(--text); }
.status { min-height: 1.4em; font-size: .9rem; }
.table-wrap { overflow: auto; }
table { min-width: 33rem; width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .84rem; }
td { font-size: .94rem; }
