:root {
  --ink: #1c1915;
  --muted: #5e584f;
  --line: #e4dccf;
  --paper: #f6f1e8;
  --card: #fffdf8;
  --top: #1c2430;
  --ok: #1f6b45;
  --bad: #8d2b2b;
  --warn: #8a5a12;
  --btn: #1f3d34;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Liberation Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}
a { color: #1a4f86; }
.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: var(--top);
  color: #f4efe6;
  padding: 0.75rem 1.25rem;
  flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; }
.brand a { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: 0.01em; font-size: 1.15rem; }
.brand span { font-size: 0.75rem; opacity: 0.75; }
.nav { display: flex; gap: 0.85rem; align-items: center; flex-wrap: wrap; }
.nav a, .nav button {
  color: #f4efe6;
  background: none;
  border: 0;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.nav a:hover, .nav button:hover { text-decoration: underline; }
.band {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.25rem;
  flex-wrap: wrap;
}
.band .eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.band strong { display: block; font-size: 1.35rem; line-height: 1.2; }
.band .meta { display: block; font-size: 0.92rem; margin-top: 0.15rem; }
.band.missing { background: #8d2b2b; color: white; }
.band form { min-width: 0; max-width: 100%; }
.band select { font: inherit; padding: 0.35rem 0.5rem; border-radius: 6px; border: 0; width: min(22rem, 100%); max-width: 100%; }
main { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }
.title { font-size: 1.35rem; margin: 0.2rem 0 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
}
.form label, .field { display: flex; flex-direction: column; gap: 0.25rem; margin: 0.55rem 0; font-size: 0.92rem; }
input, select, textarea {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid #cfc4b2;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
textarea { width: 100%; }
.btn {
  display: inline-block;
  background: var(--btn);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid #cfc4b2; }
.row3, .split { display: grid; gap: 0.8rem; }
.row3 { grid-template-columns: repeat(3, 1fr); }
.split { grid-template-columns: 1.3fr 0.9fr; align-items: start; }
.check { flex-direction: row; align-items: center; gap: 0.5rem; }
.muted, small { color: var(--muted); }
.flash { padding: 0.6rem 0.8rem; border-radius: 8px; margin-bottom: 0.6rem; }
.flash.ok { background: #e5f4ec; color: var(--ok); }
.flash.err { background: #f8e6e6; color: var(--bad); }
.list { width: 100%; border-collapse: collapse; background: var(--card); }
.list th, .list td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); }
.tag { font-size: 0.75rem; border-radius: 999px; padding: 0.1rem 0.45rem; background: #e7efe9; color: var(--ok); }
.tag.draft { background: #f3ead4; color: var(--warn); }
.empty { background: var(--card); border: 1px dashed #cfc4b2; border-radius: 12px; padding: 1.2rem; }
.co { display: flex; gap: 0.8rem; align-items: center; }
.co i { width: 14px; height: 42px; border-radius: 4px; display: block; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; align-items: center; }
.toolbar form { margin: 0; }
.tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.tabs a { text-decoration: none; background: white; border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.6rem; color: var(--ink); font-size: 0.85rem; }
.tabs a.on { background: var(--top); color: white; border-color: var(--top); }
.sheet { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem; }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { border-bottom: 1px solid #eee4d6; padding: 0.28rem 0.35rem; vertical-align: top; font-size: 0.92rem; }
.grid th.num, .grid td.num { text-align: right; width: 9.5rem; }
.grid .code { width: 5.5rem; font-weight: 700; white-space: nowrap; }
.kwota { width: 8.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.field .ro { background: #faf7f2; border-radius: 8px; padding: 0.4rem 0.5rem; }
.paper { background: white; border: 1px solid var(--line); padding: 1.2rem 1.3rem 1.6rem; border-radius: 2px; box-shadow: 0 10px 30px rgba(40, 30, 10, 0.05); }
.paper-h h2 { margin: 0.2rem 0; }
.kicker { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; margin: 0; color: var(--muted); }
.paper-f, .note { font-size: 0.85rem; color: var(--muted); }
.note, .oknote, .issues { margin: 0.6rem 0; }
.oknote { color: var(--ok); }
.issues .bad { color: var(--bad); margin: 0.2rem 0; }
.issues .warn { color: var(--warn); margin: 0.2rem 0; }
.prose { max-width: 46rem; line-height: 1.5; }
.site { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 2rem 1rem 2.5rem; }
.login { max-width: 28rem; margin: 1rem auto; }
.actions { display: flex; gap: 0.5rem; margin-top: 0.8rem; flex-wrap: wrap; }
.req { list-style: none; padding: 0; }
@media (max-width: 800px) {
  .row3, .split { grid-template-columns: 1fr; }
  .band { flex-direction: column; align-items: stretch; }
  .band strong { font-size: 1.05rem; }
  .band form, .band select { width: 100%; max-width: 100%; }
  .list { display: table; width: 100%; table-layout: fixed; }
  .list th, .list td { overflow-wrap: anywhere; }
  .grid { display: block; overflow-x: auto; max-width: 100%; }
  body { overflow-x: hidden; }
}
