:root {
  --bg: #0b1220;
  --panel: rgba(18, 28, 42, 0.88);
  --line: rgba(148, 173, 204, 0.16);
  --text: #edf3fa;
  --muted: #8fa3bb;
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --danger: #fb7185;
  --warn: #fbbf24;
  --ok: #34d399;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(800px 480px at 92% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #0a101a 100%);
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  opacity: 0.35;
}

.top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px 36px 8px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #042f2e;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(45, 212, 191, 0.25);
}

h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.token-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.token-box label,
.field > span,
h3 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 18px 36px 40px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise 0.45s ease both;
}

.panel.wide { grid-column: 1 / -1; }
.hero-panel { animation-delay: 0.05s; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

h3 {
  margin: 0 0 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field em {
  font-style: normal;
  color: #6b7c90;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}

input[type="text"],
input[type="password"],
.code-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.85);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.actions,
.btn-group,
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.actions { margin-top: 4px; }

button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

button.primary {
  border: none;
  color: #042f2e;
  background: linear-gradient(135deg, var(--accent), #5eead4 45%, var(--accent-2));
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.22);
}

button.ghost {
  background: transparent;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.switch input { accent-color: var(--accent); }

.log, .list {
  background: rgba(8, 14, 24, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  overflow: auto;
  font-size: 13px;
}

.log {
  margin-top: 14px;
  min-height: 96px;
  white-space: pre-wrap;
  font-family: var(--mono);
  color: #c6d6e8;
}

.log.tall {
  margin-top: 14px;
  min-height: 200px;
  max-height: 420px;
}

.list {
  max-height: 260px;
}

.item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(148, 173, 204, 0.1);
}

.item:last-child { border-bottom: 0; }
.item.clickable { cursor: pointer; border-radius: 8px; }
.item.clickable:hover { background: rgba(255, 255, 255, 0.03); }

.muted { color: var(--muted); }

.cards {
  display: grid;
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(8, 14, 24, 0.72);
  animation: rise 0.35s ease both;
}

.card .title {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(251, 191, 36, 0.12);
  color: var(--warn);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.badge.ok {
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.25);
}

.badge.fail {
  background: rgba(251, 113, 133, 0.12);
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.25);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .layout, .split { grid-template-columns: 1fr; }
  .top {
    flex-direction: column;
    align-items: stretch;
    padding: 20px 18px 4px;
  }
  .layout { padding: 14px 18px 28px; }
}
