:root {
  --side: #1b1814;
  --side-2: #2a241e;
  --ink: #1b1814;
  --muted: #6b645a;
  --paper: #f3eee6;
  --card: #fffdf8;
  --line: #e2d8c8;
  --rust: #9c4221;
  --rust-ink: #f7f1e8;
  --ok: #2f4a32;
  --err: #8b2e18;
  --side-w: 240px;
}

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

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: "Figtree", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.rivet {
  width: 0.85rem;
  height: 0.85rem;
  flex: none;
  border: 1.5px solid #c45c32;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--side);
  background: #f0eadf;
}

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
}

.side {
  display: flex;
  flex-direction: column;
  background: var(--side);
  color: #f0eadf;
  padding: 1.1rem 0 1rem;
}

.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0 1.1rem 1.1rem;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.brand small {
  color: #b2a898;
}

.group {
  margin: 0.4rem 1.1rem 0.35rem;
  color: #8a8073;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side nav {
  display: flex;
  flex-direction: column;
  padding: 0 0.55rem;
}

.side nav a {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: #d8cfc2;
}

.side nav a:hover,
.side nav a.on {
  background: var(--side-2);
  color: #fff;
}

.side nav a.on {
  box-shadow: inset 3px 0 0 #c45c32;
}

.side-foot {
  margin-top: auto;
  padding: 1rem 1.1rem 0;
  border-top: 1px solid #3a342c;
}

.who {
  display: block;
  margin-bottom: 0.55rem;
  color: #b2a898;
  font-size: 0.8rem;
  word-break: break-all;
}

.side-foot button,
.ghost,
.grid-form button,
.login-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.8rem;
  border: 0;
  background: var(--rust);
  color: var(--rust-ink);
  font-weight: 600;
  cursor: pointer;
}

.side-foot button {
  width: 100%;
  background: transparent;
  color: #d8cfc2;
  border: 1px solid #3a342c;
}

.main {
  min-width: 0;
}

.bar {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.2rem 1.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.bar h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.bar p {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.burger {
  display: none;
  cursor: pointer;
  font-weight: 600;
}

.content {
  padding: 1.2rem 1.5rem 2.5rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.stats article {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.95rem 1rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.8rem;
}

.stats strong {
  display: block;
  margin-top: 0.2rem;
  font-family: "Fraunces", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem 1.2rem;
  margin-bottom: 1rem;
}

.card h2 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem 0.9rem;
  align-items: end;
}

.grid-form button {
  justify-self: start;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 2.1rem;
  font-size: 0.8rem;
}

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

.flash {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  font-weight: 600;
}

.flash p {
  margin: 0 0 0.55rem;
}

.flash-link {
  display: block;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 400;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.flash.ok {
  background: #e7f0e4;
  color: var(--ok);
}

.flash.err {
  background: #f6e4dc;
  color: var(--err);
}

.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: var(--side);
}

.login-card {
  width: min(22rem, 100%);
  background: var(--card);
  padding: 1.4rem 1.3rem 1.3rem;
  border: 1px solid var(--line);
}

.login-head {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.login-head h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  font-weight: 500;
}

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

.login-card label {
  margin-bottom: 0.7rem;
}

.login-card button {
  width: 100%;
  margin-top: 0.3rem;
}

.login-body .rivet {
  box-shadow: inset 0 0 0 3px var(--card);
  background: var(--ink);
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--side-w), 86vw);
    z-index: 5;
    transform: translateX(-105%);
    transition: transform 0.18s ease;
  }

  #navon:checked ~ .shell .side {
    transform: none;
  }

  .burger {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .bar,
  .content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
