:root {
  --bg: #0e1117;
  --panel: #161b24;
  --panel-2: #1d2430;
  --line: #2a3444;
  --fg: #e6edf6;
  --muted: #8b9aae;
  --accent: #4f8cff;
  --accent-2: #7aa2ff;
  --ok: #34d399;
  --err: #f87171;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2534 0%, var(--bg) 60%);
  color: var(--fg);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 720px; margin: 0 auto; padding: 48px 20px 80px; }
.wrap.wide { max-width: 900px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: .3px; margin-bottom: 28px;
}
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}

h1 { font-size: 30px; line-height: 1.3; margin: 0 0 10px; letter-spacing: -.4px; }
h2 { font-size: 18px; margin: 0 0 14px; }
p.lead { color: var(--muted); margin: 0 0 28px; font-size: 15.5px; }

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

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }

input[type=text], input[type=password] {
  width: 100%; padding: 11px 13px; border-radius: 9px;
  border: 1px solid var(--line); background: #0f141c; color: var(--fg);
  font-size: 15px; outline: none; transition: border-color .15s;
}
input:focus { border-color: var(--accent); }

button {
  font: inherit; cursor: pointer; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--fg); padding: 10px 16px;
  transition: background .15s, border-color .15s, opacity .15s;
}
button:hover { background: #243044; }
button:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent), #3b74e0);
  border-color: #3b74e0; color: #fff; font-weight: 600; width: 100%;
  padding: 12px 16px; margin-top: 22px;
}
.btn-primary:hover { background: linear-gradient(180deg, var(--accent-2), #4f8cff); }

.btn-ghost { background: transparent; }
.btn-danger { color: var(--err); border-color: #4a2a30; }
.btn-danger:hover { background: #2a1a1f; }

.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

.captcha-box {
  margin-top: 12px; display: flex; gap: 12px; align-items: center;
}
.captcha-box .img {
  border-radius: 9px; overflow: hidden; border: 1px solid var(--line);
  height: 56px; width: 160px; display: flex; align-items: center; justify-content: center;
  background: #f4f6fb; cursor: pointer;
}
.captcha-box .img svg { width: 160px; height: 56px; display: block; }
.captcha-box small { color: var(--muted); }

.tabs { display: flex; gap: 6px; margin-bottom: 18px; background: #12171f;
         padding: 5px; border-radius: 11px; border: 1px solid var(--line); }
.tabs button { flex: 1; background: transparent; border: none; padding: 9px; color: var(--muted); }
.tabs button.active { background: var(--panel-2); color: var(--fg); font-weight: 600; }

.msg { margin-top: 16px; padding: 11px 13px; border-radius: 9px; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: #2a1a1f; border: 1px solid #4a2a30; color: #ffb4b4; }
.msg.ok  { background: #16281f; border: 1px solid #23503a; color: #9ae6bd; }

.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #0f141c; border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 6px; font-size: 13px;
}

.token-row {
  display: flex; gap: 12px; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.token-row:last-child { border-bottom: none; }
.token-row .name { font-weight: 600; }
.token-row .meta { color: var(--muted); font-size: 12.5px; }

.new-token {
  margin-top: 14px; padding: 14px; border-radius: 10px;
  background: #14251c; border: 1px solid #23503a;
}
.new-token .val {
  display: block; margin-top: 8px; padding: 10px; background: #0b1210;
  border: 1px dashed #2f6b4c; border-radius: 8px; word-break: break-all;
  font-family: ui-monospace, Menlo, monospace; color: #9ae6bd;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat { background: var(--panel-2); border-radius: 10px; padding: 13px; }
.stat .k { color: var(--muted); font-size: 12.5px; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 4px; }

.nav { display: flex; gap: 18px; margin-bottom: 30px; font-size: 14px; color: var(--muted); }
.nav a { color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--fg); text-decoration: none; }

footer { color: #55637a; font-size: 12.5px; margin-top: 40px; text-align: center; }

@media (max-width: 520px) {
  .wrap { padding: 32px 16px 60px; }
  h1 { font-size: 24px; }
}
