:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --border: #e2e5ea;
    --text: #1d2430;
    --muted: #6b7686;
    --accent: #1f6feb;
    --accent-dark: #1857bd;
    --ok: #17794c;
    --ok-bg: #e6f4ec;
    --warn: #8a5a00;
    --warn-bg: #fdf3e1;
    --err: #b3261e;
    --err-bg: #fdecea;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: var(--accent); }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.brand span { color: var(--muted); font-weight: 400; margin-left: 6px; }

.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.store-name { color: var(--muted); }
.link-muted { color: var(--muted); text-decoration: none; }
.link-muted:hover { color: var(--text); }

.mainnav {
    display: flex;
    gap: 4px;
    padding: 0 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.mainnav a {
    padding: 12px 14px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.mainnav a.active, .mainnav a:hover { color: var(--text); border-bottom-color: var(--accent); }

.wrap { max-width: 960px; margin: 0 auto; padding: 24px 20px 60px; }

h1 { font-size: 22px; margin: 0 0 20px; }
h2 { font-size: 17px; margin: 28px 0 12px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
}

.card h2:first-child { margin-top: 0; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field .help { color: var(--muted); font-size: 12px; margin-top: 5px; }

input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
    background: #fff;
}

input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31,111,235,.25); border-color: var(--accent); }

.btn {
    display: inline-block;
    padding: 9px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { background: var(--accent-dark); }
.btn-secondary { background: #eef1f5; color: var(--text); }
.btn-secondary:hover { background: #e2e6ec; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

.alert { padding: 11px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-warning { background: var(--warn-bg); color: var(--warn); }
.alert-error { background: var(--err-bg); color: var(--err); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table-scroll { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-muted { background: #eef1f5; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
    position: relative;
    padding: 14px 0 14px 42px;
    border-bottom: 1px solid var(--border);
    counter-increment: step;
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 14px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #eef1f5;
    color: var(--muted);
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.steps li.done::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.steps li .step-title { font-weight: 600; }
.steps li .step-desc { color: var(--muted); font-size: 13px; margin-top: 3px; }

code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
}
pre {
    background: #1d2430;
    color: #e8eaed;
    padding: 14px;
    border-radius: 6px;
    overflow-x: auto;
}

.checklist { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.checklist label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.checklist input { margin-top: 3px; }

.pagefoot {
    display: flex; gap: 14px; justify-content: center;
    padding: 20px; color: var(--muted); font-size: 13px;
}

.auth-wrap { max-width: 380px; margin: 60px auto; }
.muted { color: var(--muted); }
.right { text-align: right; }
