:root {
  --ink: #1a2332;
  --muted: #5e6a78;
  --line: #e2ddd3;
  --paper: #f3f0e8;
  --card: #fffcf7;
  --green: #1b4d3e;
  --green-soft: #e7f0eb;
  --rust: #8c3d2f;
  --shadow: 0 18px 50px rgba(26, 35, 50, 0.08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px/1.45 "Segoe UI", system-ui, sans-serif;
}
h1, h2, .mark { font-family: Palatino, "Palatino Linotype", Georgia, serif; font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.login {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    linear-gradient(180deg, rgba(27, 77, 62, 0.08), transparent 280px),
    var(--paper);
  overflow: auto;
}
.login-panel {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.login-brand {
  padding: 48px 40px;
  background: var(--green);
  color: #f6f3ec;
}
.login-brand h1 { margin: 8px 0 16px; font-size: 44px; line-height: 1.05; color: white; }
.login-brand p { margin: 0; max-width: 34ch; color: rgba(246, 243, 236, 0.86); }
.eyebrow { margin: 0; letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; color: #c9e2d6; }
.login-card { padding: 40px 36px; }
.login-card h2 { margin: 0 0 8px; font-size: 28px; }
.panel {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.mark { margin: 0; letter-spacing: 0.04em; color: var(--green); }
h1 { margin: 8px 0 0; font-size: 36px; }
.note, .fine, .who { color: var(--muted); }
label { display: block; margin-top: 16px; font-size: 13px; color: var(--muted); }
.show-password { display: flex; align-items: center; gap: 8px; }
.show-password input { width: auto; margin: 0; }
input, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
button[type="submit"], .primary {
  margin-top: 18px;
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
}
.quiet, .navish {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
}
.quiet:hover { border-color: var(--green); color: var(--green); }
.warn { color: var(--rust); }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 28px; margin: 0; }
.who { margin: 2px 0 0; font-size: 13px; }
.stats {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin: 18px 28px 0;
}
.stats article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.stats span { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.stats strong { display: block; margin-top: 4px; font-size: 16px; font-weight: 650; }
.stats article.off { border-color: #e7c7c0; background: #fdf6f4; }
.stats article.off strong { color: var(--rust); }
.shell { display: grid; grid-template-columns: 232px 1fr; gap: 22px; padding: 18px 28px 48px; }
nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 12px;
  align-self: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.nav-label {
  margin: 12px 8px 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-label:first-child { margin-top: 4px; }
nav button {
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
}
nav button.on, nav button:hover { background: var(--green-soft); color: var(--green); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.split .panel h2 { margin-top: 0; }
main { min-width: 0; }
.toolbar, .grid, .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.toolbar label, .grid label { margin-top: 0; flex: 1 1 160px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); background: #f3efe6; position: sticky; top: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:hover { background: #f7faf7; }
tfoot td { font-weight: 650; background: #f3efe6; }
.doc { color: var(--green); background: none; border: 0; padding: 0; text-decoration: underline; }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.sheet { width: min(1100px, calc(100% - 32px)); margin: 0 auto 48px; }
.sheet section { margin-top: 28px; }
.year .top { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
@media (max-width: 980px) {
  .login-panel, .split, .stats { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .nav-label { width: 100%; }
  nav button { white-space: nowrap; }
}
