:root {
  color-scheme: light;
  --ink: #142727;
  --muted: #496160;
  --line: #d4e2df;
  --canvas: #f2f6f5;
  --accent: #086149;
  --accent-soft: #dcefe7;
  --white: #ffffff;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 54px);
  background: #132c2b;
  color: white;
  gap: 14px;
}
.brand { color: white; text-decoration: none; font-size: 21px; font-weight: 580; }
.brand strong { color: #a9e3cd; }
#account { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.layout { display: flex; min-height: calc(100vh - 61px); margin: 0 auto; max-width: 1480px; }
nav { width: 206px; flex: 0 0 206px; background: #e8f0ee; padding: 26px 14px; border-right: 1px solid var(--line); }
nav a { display: block; border-radius: 8px; padding: 10px 12px; margin: 3px 0; text-decoration: none; color: var(--ink); }
nav a:hover, nav a[aria-current] { background: var(--accent-soft); color: #064536; }
main { padding: 28px clamp(18px, 4vw, 46px); min-width: 0; flex: 1; }
h1 { font-size: clamp(24px, 3vw, 34px); margin: 0 0 20px; letter-spacing: -.025em; }
h2 { font-size: 19px; margin: 24px 0 12px; }
h3 { margin: 0 0 12px; }
p { line-height: 1.5; }
a { color: var(--accent); }
.panel, .stat, .scroll { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.login { max-width: 400px; margin: 45px auto 12px; padding: 26px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 6px; margin: 0; }
.stat strong { font-size: 27px; font-variant-numeric: tabular-nums; }
.stat span, small { color: var(--muted); }
.controls, .fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.fields > label { flex: 1 1 180px; }
label { display: grid; gap: 5px; margin: 8px 0; font-size: 14px; }
input, select, textarea, button { font: inherit; }
input:not([type=checkbox]), select, textarea {
  padding: 8px 10px;
  border: 1px solid #8eaaa2;
  background: var(--white);
  color: var(--ink);
  border-radius: 6px;
  min-height: 38px;
  width: 100%;
}
textarea { min-height: 86px; resize: vertical; }
button {
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 8px 12px;
  color: white;
  background: var(--accent);
  cursor: pointer;
}
button:hover { filter: brightness(.92); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { color: var(--accent); background: var(--white); }
button + button { margin-left: 8px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #50a88d;
  outline-offset: 3px;
}
.scroll { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eaf3ef; color: #234443; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
pre { background: #f4f8f7; padding: 12px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
#notice { padding: 10px 12px; background: var(--accent-soft); border-radius: 7px; }
#notice.error { color: #851f1f; background: #fae9e7; }
@media (max-width: 720px) {
  .layout { display: block; }
  nav { width: 100%; display: flex; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  nav a { white-space: nowrap; }
  #identity { display: none; }
  main { padding: 18px 12px; }
}
