:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5b6475;
  --line: #d8dee8;
  --surface: #ffffff;
  --background: #f4f6f9;
  --accent: #235789;
  --accent-soft: #e7f0fa;
  --ok: #176b3a;
  --warning: #8a5a00;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, sans-serif; }
a { color: var(--accent); }
header { background: var(--ink); color: #fff; padding: .8rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
header a { color: #fff; text-decoration: none; }
nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
main { max-width: 1300px; margin: 1.5rem auto; padding: 0 1rem; }
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; padding: 1rem; margin-bottom: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.metric { font-size: 2rem; font-weight: 700; }
.muted { color: var(--muted); }
.button, button { border: 0; border-radius: .35rem; background: var(--accent); color: #fff; cursor: pointer; padding: .55rem .85rem; text-decoration: none; display: inline-block; }
.button.secondary { background: #607086; }
input, select { border: 1px solid #aeb8c7; border-radius: .3rem; padding: .5rem; background: #fff; max-width: 100%; }
label { display: block; font-weight: 600; margin-bottom: .25rem; }
.field { margin-bottom: .8rem; }
.errorlist { color: #a12626; padding-left: 1rem; }
.messages { padding: 0; list-style: none; }
.messages li { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: .7rem; margin-bottom: .5rem; }
.messages .error { background: #fceaea; border-color: #a12626; }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: .6rem; border-bottom: 1px solid var(--line); }
th { background: #eef2f7; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.amount { text-align: right; white-space: nowrap; }
.state-suggested { color: var(--warning); }
.state-validated, .state-modified { color: var(--ok); }
.confidence { white-space: nowrap; }
.compact-label { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-form { display: inline; }
.pagination { display: flex; gap: .75rem; margin-top: 1rem; }
details summary { cursor: pointer; }
footer { max-width: 1300px; margin: 2rem auto; padding: 0 1rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { header { align-items: flex-start; flex-direction: column; } th, td { padding: .45rem; } }

