:root {
  --bg: #070b14;
  --panel: #0e1524;
  --panel-2: #131c2f;
  --line: #1f2a40;
  --text: #e8ecf3;
  --muted: #8a96ab;
  --red: #e3242b;
  --red-2: #ff3b3b;
  --green: #2ecc71;
  --amber: #f5b041;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -200px, #12203d 0%, var(--bg) 60%) fixed;
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: #ff6b6b; text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
pre {
  background: #050810;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.45;
}
:not(pre) > code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; }

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
}
header.top .brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
header.top .brand:hover { text-decoration: none; }
header.top .brand img { height: 46px; width: auto; display: block; }
header.top .brand span { font-size: 15px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; letter-spacing: .04em; }
header.top nav { display: flex; gap: 18px; align-items: center; }
header.top nav a { color: var(--muted); }
header.top nav a.active, header.top nav a:hover { color: var(--text); text-decoration: none; }

main { max-width: 1080px; margin: 0 auto; padding: 8px 20px 60px; }

footer.bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.card {
  background: linear-gradient(180deg, var(--panel) 0%, #0b1220 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h2 { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.card + .card, .grid + .card, .card + .grid { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 18px; }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.stat .sub { color: var(--muted); font-size: 13px; }

.hero { text-align: center; padding: 40px 0 26px; }
.hero h1 { font-size: 34px; margin: 0 0 10px; letter-spacing: -.01em; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 16px; }
.hero .accent { color: var(--red-2); }

.signin { max-width: 440px; margin: 10px auto 0; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input, select {
  width: 100%;
  background: #070c17;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 15px;
}
input:focus, select:focus { outline: none; border-color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--red-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.btn.secondary:hover { background: #1a2540; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }

.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }

.amounts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.amounts button {
  flex: 1;
  min-width: 70px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.amounts button.selected { border-color: var(--red); background: #2a1016; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
td { padding: 9px 6px; border-bottom: 1px solid #141d30; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.notice { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.notice.ok { background: #0f2a1c; border: 1px solid #1d5c3a; color: #b6f0cd; }
.notice.warn { background: #2e2410; border: 1px solid #6b5418; color: #f8dc9b; }
.notice.err { background: #2e1013; border: 1px solid #6b1d24; color: #ffc2c5; }
.hidden { display: none !important; }

.newkey { background: #070c17; border: 1px dashed var(--red); border-radius: 8px; padding: 14px; margin-top: 14px; }
.newkey code { display: block; word-break: break-all; font-size: 14px; margin: 8px 0; background: none; padding: 0; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin-top: 6px; }
.bars div { flex: 1; background: linear-gradient(180deg, var(--red-2), #7d1418); border-radius: 3px 3px 0 0; min-height: 2px; }

.toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--text); font-size: 15px; }
.toggle input { width: auto; }

.doc h1 { font-size: 30px; margin: 30px 0 6px; }
.doc h2 { font-size: 21px; margin: 36px 0 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 16px; margin: 24px 0 8px; }
.doc p, .doc li { color: #cdd5e2; }
.doc table { margin: 10px 0 16px; }

@media (max-width: 640px) {
  header.top .brand span { display: none; }
  .hero h1 { font-size: 26px; }
}
