:root {
  --ink: #18212b;
  --muted: #5f6c79;
  --line: #e1e6eb;
  --bg: #f4f6f8;
  --card: #fff;
  --brand: #1d3c5a;
  --accent: #e8a33d;
  --ok: #1f7a4d;
  --okbg: #e7f5ee;
  --warn: #8a5a00;
  --warnbg: #fff4dc;
  --bad: #b3261e;
  --badbg: #fdecea;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.top { background: var(--brand); color: #fff; }
.top-inner { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.logo-mark { color: var(--accent); }
.logo-sub { font-weight: 400; opacity: .7; }
.who { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.who a, .who button { color: #fff; background: none; border: none; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
.help { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.inline-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 14px; }
.inline-check input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.suffix { display: flex; align-items: center; gap: 6px; }
.suffix span { color: var(--muted); font-size: 13px; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--brand); color: #fff; text-decoration: none; }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #f0c9c5; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--accent); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--okbg); color: var(--ok); }
.pill.warn { background: var(--warnbg); color: var(--warn); }
.pill.bad { background: var(--badbg); color: var(--bad); }
.pill.gray { background: var(--bg); color: var(--muted); }

.notice { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.notice.warn { background: var(--warnbg); color: var(--warn); border: 1px solid #f1dca6; }
.notice.ok { background: var(--okbg); color: var(--ok); border: 1px solid #bfe3cf; }
.notice.bad { background: var(--badbg); color: var(--bad); border: 1px solid #f0c9c5; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--bg); border-radius: 10px; padding: 14px; }
.stat b { display: block; font-size: 24px; color: var(--brand); }
.stat span { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: none; }
.dot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.dot.ok { background: var(--okbg); color: var(--ok); }
.dot.todo { background: var(--warnbg); color: var(--warn); }

.product { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.product-top { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.product-top label, .product label { margin-top: 0; }
.product-row2 { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-top: 10px; }
.product-tools { display: flex; gap: 6px; }
@media (max-width: 760px) { .product-top, .product-row2 { grid-template-columns: 1fr; } }

.preview { background: var(--bg); border-radius: 10px; padding: 16px; }
.preview table td, .preview table th { background: transparent; }
pre.code { background: #0f1720; color: #e6edf3; padding: 14px; border-radius: 8px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }

.login { max-width: 400px; margin: 60px auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 10; }
.toast.bad { background: var(--bad); }
