:root {
  --bg: #f5f6f8; --panel: #fff; --text: #1d232b; --muted: #66707c; --line: #dfe3e8; --accent: #1f4e78; --accent-2: #2f6aa0;
  --red: #b42318; --red-bg: #fdecea; --amber: #a15c00; --amber-bg: #fff4e0; --green: #1a7f37; --green-bg: #e9f6ec; --grey-bg: #eef0f3;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent-2); }
header.top { display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 52px; background: var(--accent); color: #fff; }
header.top .brand { color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
header.top nav a { color: #dbe7f3; text-decoration: none; padding: 6px 12px; border-radius: 6px; }
header.top nav a.on, header.top nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
main { max-width: 1400px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 20px; margin: 4px 0 16px; }
h2 { font-size: 16px; margin: 24px 0 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 4px 14px 4px 0; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=month], select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #c8ced6; border-radius: 6px; font: inherit; background: #fff; }
textarea { min-height: 64px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.btn { display: inline-block; padding: 8px 16px; border: 0; border-radius: 6px; background: var(--accent-2); color: #fff; font: inherit;
  font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent); }
.btn.sec { background: #e7ecf2; color: var(--text); }
.btn.danger { background: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.msg.err { background: var(--red-bg); color: var(--red); }
.msg.ok { background: var(--green-bg); color: var(--green); }
.msg.warn { background: var(--amber-bg); color: var(--amber); }
table { border-collapse: collapse; width: 100%; background: var(--panel); }
th, td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
th { background: #f0f3f6; font-weight: 600; position: sticky; top: 0; z-index: 1; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f7fafc; }
.tablewrap { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.card .n { font-size: 24px; font-weight: 700; }
.card.red .n { color: var(--red); } .card.amber .n { color: var(--amber); } .card.green .n { color: var(--green); }
.card.on { outline: 2px solid var(--accent-2); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.b-missing { background: var(--red-bg); color: var(--red); } .b-check { background: var(--amber-bg); color: var(--amber); }
.b-found { background: var(--green-bg); color: var(--green); } .b-other { background: var(--grey-bg); color: var(--muted); }
.bar { height: 10px; background: var(--grey-bg); border-radius: 6px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent-2); transition: width .4s; }
.stages { list-style: none; padding: 0; margin: 12px 0; }
.stages li { padding: 3px 0; color: var(--muted); }
.stages li.done { color: var(--green); } .stages li.now { color: var(--text); font-weight: 600; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar input[type=text] { max-width: 320px; }
.small { font-size: 12.5px; color: var(--muted); }
pre.text { white-space: pre-wrap; background: #fbfbfc; border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 420px; overflow: auto; font-size: 12.5px; }
.side { position: fixed; right: 0; top: 52px; bottom: 0; width: min(560px, 100%); background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -6px 0 18px rgba(0,0,0,.08); padding: 16px; overflow: auto; display: none; z-index: 5; }
.side.open { display: block; }
.side .close { float: right; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 10px; margin: 8px 0 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.ok { color: var(--green); } .bad { color: var(--red); }
@media (max-width: 700px) { header.top { gap: 10px; height: auto; flex-wrap: wrap; padding: 8px 16px; } .kv { grid-template-columns: 1fr; } }
header.top .who { margin-left: auto; color: #dbe7f3; font-size: 13px; white-space: nowrap; }
header.top .who a { color: #fff; }
a.card { display: block; color: inherit; text-decoration: none; }
table.preview td.pick, table.preview th.pick { background: #fff4c2; }
table.preview tr.head td { font-weight: 600; background: #f0f3f6; }
table.preview .role { color: var(--accent-2); font-weight: 600; }
