:root {
  --bg: #f1f1f1;
  --card: #ffffff;
  --text: #303030;
  --muted: #616161;
  --line: #e3e3e3;
  --brand: #1a1a1a;
  --accent: #0b6e4f;
  --accent-soft: #e3f4ec;
  --warn: #8a6116;
  --warn-soft: #fff4d6;
  --bad: #8e1f0b;
  --bad-soft: #fee9e8;
  --info-soft: #eaf4ff;
  --radius: 12px;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
.page { max-width: 980px; margin: 0 auto; padding: 16px 16px 40px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 15px; margin: 18px 0 8px; }
.card > h2:first-child, form.card > h2:first-child { margin-top: 0; }
p { margin: 6px 0; }
a { color: #005bd3; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sub { color: var(--muted); margin: 2px 0 0; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brand { display: flex; gap: 12px; align-items: center; }
.mark { width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 12px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04); padding: 16px; margin-bottom: 14px; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; gap: 8px; }
.end { justify-content: flex-end; }
.gap { gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.btn { font: inherit; border-radius: 8px; padding: 7px 14px; border: 1px solid #c9c9c9; background: #fff; cursor: pointer; color: var(--text); font-weight: 550; }
.btn:hover { background: #f7f7f7; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: #333; }
.btn.plain { border-color: transparent; background: transparent; color: #005bd3; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }

label { display: block; margin: 10px 0; font-weight: 550; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
input[type="text"], input[type="password"], input[type="number"], input[type="search"], select {
  font: inherit; display: block; width: 100%; margin-top: 4px; padding: 7px 10px; border: 1px solid #c9c9c9; border-radius: 8px; background: #fff; font-weight: 400;
}
.row select, .row input[type="search"] { width: auto; margin-top: 0; }
.suffix { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.suffix input { margin-top: 0; max-width: 120px; }
.example { background: var(--info-soft); border-radius: 8px; padding: 8px 10px; }

.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: #e8e8e8; color: var(--text); white-space: nowrap; }
.badge.good { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: #00527c; }

.banner { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.good { background: var(--accent-soft); color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 0 0 1px rgba(0,0,0,.05); }
.stat b { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 13px; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.steps > li:first-child { border-top: 0; }
.dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c9c9c9; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.done .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps h3 { margin: 2px 0 4px; font-size: 14px; }
.steps .actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.steps form label { margin: 6px 0; }
.error { color: var(--bad); }

.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; }
.brands label { margin: 4px 0; font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.brands small { color: var(--muted); display: block; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; border-top: 0; }
td img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: #fafafa; border: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.pager { margin-top: 10px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

dialog { border: 0; border-radius: var(--radius); padding: 18px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog h2 { margin-top: 0; }

@media (max-width: 560px) {
  .top { flex-direction: column; align-items: flex-start; }
  .row.between { align-items: stretch; }
}
