:root {
  --bg: #f5f7fb; --panel: #ffffff; --ink: #0f172a; --muted: #5b6477; --line: #e3e8f0;
  --brand: #e8542f; --brand-ink: #ffffff; --brand-soft: #fdeee9; --nav: #101827;
  --ok: #16a34a; --ok-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fdf3e2; --bad: #dc2626; --bad-soft: #fdecec;
  --radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.05), 0 6px 24px rgba(15,23,42,.06);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1020; --panel: #121a2e; --ink: #e7ecf5; --muted: #9aa6bd; --line: #24304a; --brand-soft: #3a1d15;
    --ok-soft: #10301c; --warn-soft: #33260e; --bad-soft: #3a1414; --nav: #070b16; --shadow: none; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-size: 15px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; }

.topbar { background: var(--nav); color: #fff; }
.topbar .in { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #fff; letter-spacing: .2px; }
.logo img { width: 30px; height: 30px; }
.topbar nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.topbar nav a { color: #cbd5e1; font-size: 14px; }
.topbar nav a.active, .topbar nav a:hover { color: #fff; text-decoration: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 26px 0 10px; }
.hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 14px; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 0 0 22px; }
.mock { background: var(--nav); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); color: #e2e8f0; }
.mock .bar { display: flex; gap: 6px; margin-bottom: 14px; } .mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: #334155; display: block; }
.mock .id { font-size: 30px; font-weight: 700; letter-spacing: 2px; color: #fff; }
.mock .lbl { font-size: 12px; text-transform: uppercase; color: #94a3b8; letter-spacing: 1px; }
.mock .row { display: flex; gap: 10px; margin-top: 16px; }
.mock .field { flex: 1; background: #1e293b; border-radius: 8px; padding: 10px 12px; color: #94a3b8; }
.mock .go { background: var(--brand); color: #fff; border-radius: 8px; padding: 10px 16px; font-weight: 600; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card h2, .card h3 { margin: 0 0 10px; }
.card h2 { font-size: 19px; } .card h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stat .v { font-size: 30px; font-weight: 700; } .stat .k { color: var(--muted); font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 9px 16px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 13px 22px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); border-color: var(--brand); }
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 5px; color: var(--muted); }
.form-row { margin-bottom: 14px; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline > input, .inline > select { width: auto; flex: 1; min-width: 160px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--brand-soft); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--ink); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; margin-right: 6px; }
.dot.on { background: var(--ok); }

.alert { padding: 11px 14px; border-radius: 9px; margin: 0 0 14px; font-size: 14px; }
.alert.err { background: var(--bad-soft); color: var(--bad); } .alert.ok { background: var(--ok-soft); color: var(--ok); }
.hidden { display: none !important; }
.key { font-family: Consolas, monospace; font-size: 15px; letter-spacing: .5px; }
.dl { display: flex; flex-direction: column; gap: 10px; }
.dl .hash { font-size: 11px; word-break: break-all; color: var(--muted); }
.feature { display: flex; gap: 12px; }
.feature .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--panel); color: var(--ink); width: min(560px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(2,6,23,.55); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0; }
.login { max-width: 380px; margin: 70px auto; }

@media (max-width: 900px) {
  .hero, .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .topbar .in { flex-wrap: wrap; gap: 10px; }
  .topbar nav { margin-left: 0; }
}
