:root {
  --bg: #f4f6fb; --card: #fff; --ink: #1c2433; --muted: #6b7385;
  --brand: #2b59ff; --brand-d: #1d44d6; --line: #e3e7f0;
  --ok: #1a9d57; --warn: #c4541b; --alert: #c0314a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5; }
.topbar { display: flex; justify-content: space-between; align-items: center;
  background: var(--card); padding: .8rem 1.4rem; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.topbar nav a { margin-left: 1.2rem; text-decoration: none; color: var(--brand); font-size: .92rem; }
.container { max-width: 1050px; margin: 1.6rem auto; padding: 0 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.6rem 1.8rem; box-shadow: 0 1px 3px rgba(20,30,60,.05); }
.card.narrow { max-width: 460px; margin: 3rem auto; }
h1 { margin-top: 0; font-size: 1.5rem; }
h2 { font-size: 1.1rem; margin-top: 1.6rem; }
.hint { color: var(--muted); }
.micro { color: var(--muted); font-size: .82rem; }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 1.1rem 0; padding: 1rem 1.2rem; }
legend { font-weight: 600; padding: 0 .4rem; }
.step { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem;
  background: var(--brand); color: #fff; border-radius: 50%; font-size: .8rem; margin-right: .4rem; }
label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: .3rem; }
input[type=text], input[type=password], select {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 9px;
  font-size: .95rem; margin-top: .25rem; background: #fbfcff; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .9rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .4rem; }
.check, .radio { font-weight: 400; display: flex; align-items: center; gap: .45rem; }
.check input, .radio input { width: auto; margin: 0; }
.btn { display: inline-block; padding: .6rem 1.1rem; border: 1px solid var(--line);
  background: #fff; border-radius: 9px; text-decoration: none; color: var(--ink);
  cursor: pointer; font-size: .92rem; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-d); }
.btn.big { padding: .8rem 1.6rem; font-size: 1rem; margin-top: .6rem; }
.btn.small { padding: .35rem .6rem; font-size: .82rem; }
.alert { background: #fdecef; color: var(--alert); padding: .7rem .9rem; border-radius: 9px;
  border: 1px solid #f5c6d0; }
.progress { background: #e7ebf6; border-radius: 99px; height: 16px; overflow: hidden; margin: 1rem 0; }
.bar { background: var(--brand); height: 100%; width: 0; transition: width .4s ease; }
.results-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f7f9ff; position: sticky; top: 0; }
.tag { background: #eef1fa; padding: .1rem .5rem; border-radius: 99px; font-size: .78rem; }
.tag.warn { background: #fdeede; color: var(--warn); }
.pill { background: #eef1fa; padding: .35rem .8rem; border-radius: 99px; font-size: .85rem; margin-right: .4rem; }
.pill.ok { background: #e3f6ec; color: var(--ok); }
.pill.warn { background: #fdeede; color: var(--warn); }
.stats { margin: 1rem 0; }
.template { background: #f7f9ff; border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem; white-space: pre-wrap; font-size: .85rem; }
.inline { display: flex; gap: .3rem; }
.inline select { width: auto; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem; }
button.btn { font-family: inherit; }
