:root {
  --navy: #1f3a5f; --navy-2: #16293f; --beige: #efe7da; --beige-2: #f7f3ec;
  --fg: #1d2530; --muted: #6b7380; --line: #e2dccf; --panel: #ffffff;
  --ok: #2e7d4f; --warn: #a86a12; --bad: #b3362f;
  --radius: 8px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--beige-2); color: var(--fg); font-size: 15px; line-height: 1.45; }
a { color: var(--navy); }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
main.wrap { padding-block: 24px 48px; display: grid; gap: 16px; }
.top { background: var(--navy); color: #fff; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 12px; }
.brand { color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.brand span { color: var(--beige); font-weight: 400; margin-left: 4px; }
nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
nav a, nav button.link { color: #fff; text-decoration: none; opacity: .9; }
nav a:hover, nav button.link:hover { opacity: 1; text-decoration: underline; }
h1 { font-size: 26px; font-weight: 600; margin: 0; color: var(--navy-2); text-wrap: balance; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 6px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.muted { color: var(--muted); } .small { font-size: 12px; } .pre { white-space: pre-line; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card > .muted:first-of-type { margin-top: 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty-sm { color: var(--muted); margin: 8px 0 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.kpi span { display: block; font-size: 13px; color: var(--muted); }
.kpi b { display: block; font-size: 24px; font-weight: 600; color: var(--navy-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.alloc { display: grid; gap: 10px; margin-top: 12px; }
.alloc-row { display: grid; grid-template-columns: 90px 1fr 52px; gap: 10px; align-items: center; font-size: 14px; }
.alloc-row b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.bar { height: 10px; background: var(--beige); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy); min-width: 2px; }
.table-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 8px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; white-space: nowrap; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--beige); }
.pill.ok { background: #e3f1e8; color: var(--ok); } .pill.warning { background: #f8ecd6; color: var(--warn); } .pill.error { background: #f6e0de; color: var(--bad); }
.flash { padding: 10px 14px; border-radius: var(--radius); background: #e3f1e8; color: var(--ok); }
.flash.warning { background: #f8ecd6; color: var(--warn); } .flash.error { background: #f6e0de; color: var(--bad); }
input, select, button { font: inherit; }
input, select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--fg); min-width: 0; }
button { padding: 8px 16px; border: 0; border-radius: 6px; background: var(--navy); color: #fff; cursor: pointer; }
button.secondary { background: var(--beige); color: var(--navy-2); }
button.link { background: none; padding: 0; color: var(--navy); text-decoration: underline; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
form.inline { display: inline; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.inline { display: inline-flex; }
.grow { flex: 1 1 240px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.login { max-width: 380px; margin: 48px auto; display: grid; gap: 8px; }
.login h1 { font-size: 22px; margin-bottom: 8px; }
.login button { margin-top: 8px; }
.upload { display: grid; gap: 10px; justify-items: start; }
.upload p { margin: 0; }
