:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --ink: #172026;
  --muted: #5f6d75;
  --line: #d9e0e4;
  --panel: #ffffff;
  --accent: #11615c;
  --accent-2: #c17d22;
  --danger: #a83232;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.1; }
h2 { font-size: 18px; margin-bottom: 14px; }
.topbar p { color: var(--muted); margin-top: 4px; }

.panel, .stats article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel { padding: 18px; margin-bottom: 16px; }
.login { max-width: 420px; }
.grid { display: grid; gap: 16px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.stats article { padding: 16px; }
.stats strong { display: block; font-size: 26px; }
.stats span { color: var(--muted); font-size: 14px; }

form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 650;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.docform {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}
.wide { grid-column: span 2; }

.list { display: grid; gap: 10px; }
.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.item strong { display: block; }
.item span, .item p { color: var(--muted); font-size: 14px; margin-top: 3px; }

.table { display: grid; gap: 8px; }
.row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  min-width: 0;
}
.row:last-child { border-bottom: 0; }
.row small { color: var(--muted); }
.error { color: var(--danger); min-height: 20px; margin-top: 8px; }
.hidden { display: none !important; }

@media (max-width: 780px) {
  .two, .stats, .docform { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .row { grid-template-columns: 1fr; gap: 4px; }
}
