* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #070d1a;
  --bg-2: #0a1327;
  --panel: #101a30;
  --panel-2: #131f3a;
  --line: #1e2d4a;
  --line-soft: #16233c;
  --txt: #e8effa;
  --dim: #8a9cbb;
  --dim-2: #5f718f;
  --accent: #2775ca;
  --accent-2: #4aa8ff;
  --ok: #22c55e;
  --bad: #ef4444;
  --warn: #f59e0b;
  --purple: #a855f7;
  --gold: #d9b36c;
  --radius: 16px;
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .85);
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hidden { display: none !important; }
a { color: inherit; }
input, button, select, textarea { font-family: inherit; }
::selection { background: rgba(74, 168, 255, .3); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1f2f4e; border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: #2b4067; }

/* ==================== 图标 ==================== */
.ic { display: inline-block; width: 16px; height: 16px; background: currentColor; vertical-align: -3px; flex: none;
      -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
      -webkit-mask-position: center; mask-position: center; }
.ic-user  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 3.6-6 8-6s8 2 8 6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 3.6-6 8-6s8 2 8 6'/></svg>"); }
.ic-lock  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><rect x='4' y='10' width='16' height='11' rx='2.5'/><path d='M8 10V7a4 4 0 0 1 8 0v3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><rect x='4' y='10' width='16' height='11' rx='2.5'/><path d='M8 10V7a4 4 0 0 1 8 0v3'/></svg>"); }
.ic-eye   { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z'/><circle cx='12' cy='12' r='3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z'/><circle cx='12' cy='12' r='3'/></svg>"); }
.ic-eye-off { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M3 3l18 18'/><path d='M10.6 6.2A9.7 9.7 0 0 1 12 5c6.4 0 10 7 10 7a17 17 0 0 1-3 3.8M6.2 6.2C3.6 8 2 12 2 12s3.6 7 10 7c1.7 0 3.2-.4 4.5-1.1'/><path d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M3 3l18 18'/><path d='M10.6 6.2A9.7 9.7 0 0 1 12 5c6.4 0 10 7 10 7a17 17 0 0 1-3 3.8M6.2 6.2C3.6 8 2 12 2 12s3.6 7 10 7c1.7 0 3.2-.4 4.5-1.1'/><path d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/></svg>"); }
.ic-arrow { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>"); }
.ic-back  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M19 12H5M11 6l-6 6 6 6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M19 12H5M11 6l-6 6 6 6'/></svg>"); }
.ic-shield-sm { width: 13px; height: 13px; -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><path d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/><path d='M9 12l2 2 4-4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><path d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/><path d='M9 12l2 2 4-4'/></svg>"); }
.ic-shield { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/><path d='M9 12l2 2 4-4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/><path d='M9 12l2 2 4-4'/></svg>"); }
.ic-scan  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2'/><path d='M3 12h18'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2'/><path d='M3 12h18'/></svg>"); }
.ic-sweep { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12a9 9 0 0 1 15.5-6.2L21 8'/><path d='M21 3v5h-5'/><path d='M21 12a9 9 0 0 1-15.5 6.2L3 16'/><path d='M3 21v-5h5'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12a9 9 0 0 1 15.5-6.2L21 8'/><path d='M21 3v5h-5'/><path d='M21 12a9 9 0 0 1-15.5 6.2L3 16'/><path d='M3 21v-5h5'/></svg>"); }
.ic-dash  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><rect x='3' y='3' width='7' height='9' rx='1.6'/><rect x='14' y='3' width='7' height='5' rx='1.6'/><rect x='14' y='12' width='7' height='9' rx='1.6'/><rect x='3' y='16' width='7' height='5' rx='1.6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><rect x='3' y='3' width='7' height='9' rx='1.6'/><rect x='14' y='3' width='7' height='5' rx='1.6'/><rect x='14' y='12' width='7' height='9' rx='1.6'/><rect x='3' y='16' width='7' height='5' rx='1.6'/></svg>"); }
.ic-wallet{ -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><rect x='3' y='6' width='18' height='14' rx='3'/><path d='M3 10h18M16 15h2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><rect x='3' y='6' width='18' height='14' rx='3'/><path d='M3 10h18M16 15h2'/></svg>"); }
.ic-log   { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M12 8v5l3 2'/><circle cx='12' cy='12' r='9'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M12 8v5l3 2'/><circle cx='12' cy='12' r='9'/></svg>"); }
.ic-term  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='16' rx='2.5'/><path d='M7 9l3 3-3 3M13 15h4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='16' rx='2.5'/><path d='M7 9l3 3-3 3M13 15h4'/></svg>"); }
.ic-gear  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><circle cx='12' cy='12' r='3'/><path d='M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-1.8-.3 1.6 1.6 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.6 1.6 0 0 0-1-1.5 1.6 1.6 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0 .3-1.8 1.6 1.6 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.6 1.6 0 0 0 1.5-1 1.6 1.6 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3H9a1.6 1.6 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.6 1.6 0 0 0 1 1.5 1.6 1.6 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8V9a1.6 1.6 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><circle cx='12' cy='12' r='3'/><path d='M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-1.8-.3 1.6 1.6 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.6 1.6 0 0 0-1-1.5 1.6 1.6 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0 .3-1.8 1.6 1.6 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.6 1.6 0 0 0 1.5-1 1.6 1.6 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3H9a1.6 1.6 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.6 1.6 0 0 0 1 1.5 1.6 1.6 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8V9a1.6 1.6 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1z'/></svg>"); }

/* ==================== 登录页 ==================== */
.login-stage {
  position: fixed; inset: 0; overflow: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 20px; gap: 26px;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(39, 117, 202, .22), transparent 62%),
    radial-gradient(900px 600px at 96% 106%, rgba(168, 85, 247, .16), transparent 60%),
    linear-gradient(160deg, #060b16 0%, #070e1e 45%, #050912 100%);
}
/* 光晕 */
.bg-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb-1 { width: 520px; height: 520px; left: -140px; top: -160px; background: rgba(39, 117, 202, .5); animation: float1 18s ease-in-out infinite; }
.orb-2 { width: 440px; height: 440px; right: -120px; top: 32%; background: rgba(168, 85, 247, .34); animation: float2 22s ease-in-out infinite; }
.orb-3 { width: 400px; height: 400px; left: 34%; bottom: -200px; background: rgba(74, 168, 255, .22); animation: float1 26s ease-in-out infinite reverse; }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(48px, 38px) scale(1.1); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-52px, -30px) scale(1.12); } }

/* 网格 */
.bg-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .45;
  background-image:
    linear-gradient(rgba(74, 168, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 168, 255, .055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 45%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 45%, #000 30%, transparent 78%);
}
.bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }

/* 登录主体 */
.login-shell {
  position: relative; z-index: 2;
  width: 100%; max-width: 1020px;
  display: grid; grid-template-columns: 1.05fr .95fr;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(19, 31, 58, .92), rgba(10, 18, 36, .96));
  border: 1px solid rgba(74, 168, 255, .16);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 1px 0 rgba(255, 255, 255, .06) inset;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
/* 顶部流光边 */
.login-shell::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(74, 168, 255, .85), rgba(168, 85, 247, .85), transparent);
  background-size: 200% 100%; animation: sheen 6s linear infinite;
}
@keyframes sheen { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }

/* 左侧品牌 */
.login-hero {
  padding: 44px 40px;
  display: flex; flex-direction: column; gap: 30px;
  border-right: 1px solid rgba(74, 168, 255, .1);
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(39, 117, 202, .18), transparent 70%),
    radial-gradient(400px 260px at 100% 100%, rgba(168, 85, 247, .12), transparent 70%);
}
.hero-badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px; font-size: 12px; letter-spacing: .3px;
  color: #8fd0a8; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .28);
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.hero-brand { display: flex; align-items: center; gap: 16px; }
.hero-logo {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; flex: none;
  background: linear-gradient(150deg, rgba(74, 168, 255, .18), rgba(39, 117, 202, .06));
  border: 1px solid rgba(74, 168, 255, .3);
  box-shadow: 0 10px 30px -10px rgba(39, 117, 202, .8), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.hero-brand h1 {
  font-size: 27px; font-weight: 800; letter-spacing: .4px; line-height: 1.2;
  background: linear-gradient(100deg, #fff 10%, #a9d2ff 60%, #c3a5ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-brand h1 em { font-style: normal; }
.hero-sub { font-size: 11.5px; letter-spacing: 2.2px; color: var(--dim-2); margin-top: 6px; text-transform: uppercase; }
.hero-feats { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.hero-feats li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .022); border: 1px solid rgba(255, 255, 255, .05);
  transition: .25s;
}
.hero-feats li:hover { background: rgba(74, 168, 255, .07); border-color: rgba(74, 168, 255, .25); transform: translateX(3px); }
.hero-feats .feat-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  color: var(--accent-2);
  background: linear-gradient(150deg, rgba(74, 168, 255, .22), rgba(74, 168, 255, .06));
  border: 1px solid rgba(74, 168, 255, .22);
}
.hero-feats .feat-ico .ic { width: 17px; height: 17px; }
.hero-feats b { display: block; font-size: 13.5px; margin-bottom: 3px; letter-spacing: .3px; }
.hero-feats span { font-size: 12px; color: var(--dim); line-height: 1.5; }
.hero-chains { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.hero-chains span {
  font-size: 10.5px; letter-spacing: 1px; color: var(--dim-2); font-weight: 600;
  padding: 5px 11px; border-radius: 7px;
  background: rgba(255, 255, 255, .025); border: 1px solid rgba(255, 255, 255, .06);
}

/* 右侧登录面板 */
.login-panel {
  position: relative; padding: 44px 40px 34px;
  display: flex; flex-direction: column; background: rgba(7, 13, 26, .55);
}
.panel-glow { position: absolute; width: 300px; height: 300px; right: -90px; top: -110px; border-radius: 50%; filter: blur(80px); background: rgba(74, 168, 255, .16); pointer-events: none; }
.step { display: flex; flex-direction: column; gap: 18px; animation: stepIn .32s cubic-bezier(.22, .8, .3, 1); }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.p-head { position: relative; }
.p-head h2 { font-size: 23px; font-weight: 750; letter-spacing: .3px; }
.p-head p { font-size: 12.5px; color: var(--dim); margin-top: 7px; line-height: 1.6; }
.back-btn {
  position: absolute; left: -6px; top: -2px;
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--dim); cursor: pointer;
  display: grid; place-items: center; transition: .2s;
}
.back-btn:hover { color: #fff; border-color: var(--accent-2); background: rgba(74, 168, 255, .12); }
#stepPin .p-head { padding-left: 34px; }

#loginForm { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 12px; font-weight: 600; color: var(--dim); letter-spacing: .4px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .ic { position: absolute; left: 14px; color: var(--dim-2); pointer-events: none; transition: .2s; }
.input-wrap input {
  width: 100%; height: 48px; padding: 0 44px 0 42px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(5, 10, 20, .7); color: var(--txt); font-size: 14px;
  transition: .2s; outline: none;
}
.input-wrap input::placeholder { color: #46577a; }
.input-wrap:focus-within input { border-color: rgba(74, 168, 255, .65); background: rgba(8, 16, 32, .9); box-shadow: 0 0 0 4px rgba(39, 117, 202, .14); }
.input-wrap:focus-within > .ic { color: var(--accent-2); }
.eye {
  position: absolute; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--dim-2); cursor: pointer; display: grid; place-items: center; transition: .2s;
}
.eye:hover { color: var(--txt); background: rgba(255, 255, 255, .05); }

.err { min-height: 16px; font-size: 12.5px; color: #fca5a5; line-height: 1.5; }
.err:empty { min-height: 0; }

.btn-login {
  position: relative; height: 48px; border: 0; border-radius: 12px; cursor: pointer;
  font-size: 14.5px; font-weight: 700; letter-spacing: 1.2px; color: #fff;
  background: linear-gradient(100deg, #2775ca 0%, #3f8ef0 48%, #5aa5ff 100%);
  box-shadow: 0 12px 30px -12px rgba(39, 117, 202, .95), 0 1px 0 rgba(255, 255, 255, .22) inset;
  transition: .22s; overflow: hidden;
}
.btn-login::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .3) 50%, transparent 80%);
  transform: translateX(-120%); transition: transform .65s;
}
.btn-login:hover::after { transform: translateX(120%); }
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 18px 38px -14px rgba(39, 117, 202, 1); }
.btn-login:active { transform: translateY(0) scale(.995); }
.btn-login:disabled { opacity: .75; cursor: not-allowed; transform: none; }
.btn-spin { display: none; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-login.loading .btn-label { opacity: 0; }
.btn-login.loading .btn-spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-foot { margin-top: 2px; }
.secure-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim-2); }
.secure-note .ic { color: #5fbf8a; }

/* 安全码 */
.pin-account { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: rgba(74, 168, 255, .06); border: 1px solid rgba(74, 168, 255, .16); font-size: 12.5px; color: var(--dim); }
.pin-account b { color: var(--txt); }
.pin-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.pin-digit {
  width: 100%; height: 56px; text-align: center; font-size: 22px; font-weight: 700; font-family: var(--mono);
  color: var(--txt); border-radius: 12px; border: 1px solid var(--line);
  background: rgba(5, 10, 20, .7); outline: none; transition: .2s; caret-color: var(--accent-2);
}
.pin-digit:focus { border-color: rgba(74, 168, 255, .7); box-shadow: 0 0 0 4px rgba(39, 117, 202, .15); background: rgba(8, 16, 32, .92); }
.pin-digit.filled { border-color: rgba(74, 168, 255, .45); background: rgba(74, 168, 255, .08); }
.pin-boxes.shake { animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-actions { text-align: center; }
.link-btn { background: none; border: 0; color: var(--accent-2); font-size: 12.5px; cursor: pointer; padding: 4px; opacity: .9; }
.link-btn:hover { opacity: 1; text-decoration: underline; }
.link-btn:disabled { opacity: .45; cursor: not-allowed; text-decoration: none; }
.tip-line { font-size: 11.5px; color: var(--dim-2); text-align: center; min-height: 15px; line-height: 1.5; }

/* TG 联系卡片 */
.tg-contact {
  margin-top: auto; padding-top: 24px;
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.tg-contact .tg-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  color: #fff; background: linear-gradient(140deg, #2aabee, #229ed9);
  box-shadow: 0 8px 22px -8px rgba(42, 171, 238, .9); transition: .25s;
}
.tg-contact:hover .tg-icon { transform: translateY(-2px) rotate(-6deg); box-shadow: 0 14px 28px -8px rgba(42, 171, 238, 1); }
.tg-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tg-text small { font-size: 11px; color: var(--dim-2); }
.tg-text b { font-size: 14px; letter-spacing: .4px; color: #dbe9ff; transition: .2s; }
.tg-contact:hover .tg-text b { color: #7dc0ff; }
.tg-go {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim);
  padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025); transition: .25s; white-space: nowrap;
}
.tg-go .ic { width: 12px; height: 12px; transition: transform .25s; }
.tg-contact:hover .tg-go { color: #fff; border-color: rgba(42, 171, 238, .6); background: rgba(42, 171, 238, .14); }
.tg-contact:hover .tg-go .ic { transform: translateX(3px); }

.login-copy { position: relative; z-index: 2; font-size: 11.5px; color: #3d4c66; letter-spacing: .5px; text-align: center; }

/* ==================== 后台布局 ==================== */
#app { display: flex; min-height: 100vh; }
.side {
  width: 218px; flex: none; background: linear-gradient(180deg, #0c1526, #091120);
  border-right: 1px solid var(--line-soft);
  padding: 22px 14px; display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: .3px; padding: 0 6px; }
.brand small { display: block; font-size: 9.5px; letter-spacing: 1.4px; color: var(--dim-2); font-weight: 500; margin-top: 2px; text-transform: uppercase; }
.brand-accent { color: var(--accent-2); }
.logo-ring {
  width: 30px; height: 30px; border-radius: 10px; flex: none;
  background: linear-gradient(140deg, #4aa8ff, #1a5fb4);
  box-shadow: 0 6px 18px -6px rgba(39, 117, 202, .9);
  position: relative;
}
.logo-ring::after { content: "₮"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; color: #fff; font-weight: 700; }
.side nav { display: flex; flex-direction: column; gap: 3px; }
.side nav button {
  display: flex; align-items: center; gap: 10px;
  text-align: left; padding: 10px 12px; border: 0; background: transparent;
  color: var(--dim); border-radius: 10px; cursor: pointer; font-size: 13.5px; transition: .18s;
}
.side nav button .ic { opacity: .8; }
.side nav button:hover { background: rgba(74, 168, 255, .08); color: var(--txt); }
.side nav button.active {
  background: linear-gradient(100deg, rgba(39, 117, 202, .95), rgba(58, 140, 240, .9));
  color: #fff; box-shadow: 0 8px 20px -10px rgba(39, 117, 202, .95);
}
.side nav button.active .ic { opacity: 1; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-tg {
  display: flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 11.5px; color: #7dc0ff; padding: 8px 10px; border-radius: 9px;
  border: 1px solid rgba(42, 171, 238, .22); background: rgba(42, 171, 238, .07); transition: .2s;
}
.side-tg:hover { background: rgba(42, 171, 238, .16); color: #fff; }
.side-tg-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip {
  font-size: 11px; color: var(--dim); background: #0a1220;
  border: 1px solid var(--line-soft); border-radius: 7px; padding: 5px 9px; margin-bottom: 5px;
}
.main { flex: 1; padding: 26px 30px 50px; max-width: 1500px; min-width: 0; }
.view-head { margin-bottom: 18px; }
h2 { font-size: 20px; margin-bottom: 4px; font-weight: 700; letter-spacing: .3px; }
.sub-line { font-size: 12px; color: var(--dim); }
h3 { font-size: 13.5px; color: var(--txt); margin-bottom: 12px; font-weight: 650; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.card {
  background: linear-gradient(150deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden;
}
.card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: rgba(74, 168, 255, .1); filter: blur(20px); }
.card b { font-size: 27px; display: block; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.card span { color: var(--dim); font-size: 12px; }

/* 面板与表格 */
.panel {
  background: linear-gradient(165deg, rgba(19, 31, 58, .72), rgba(11, 20, 38, .82));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-input {
  height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(5, 10, 20, .6); color: var(--txt); font-size: 13px; width: 220px; outline: none; transition: .2s;
}
.search-input:focus { border-color: rgba(74, 168, 255, .6); box-shadow: 0 0 0 3px rgba(39, 117, 202, .13); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { color: var(--dim); font-weight: 600; font-size: 12px; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(74, 168, 255, .04); }
tbody tr:last-child td { border-bottom: 0; }
.empty { color: var(--dim-2); text-align: center; padding: 30px; }
.ops { display: flex; gap: 6px; }

/* 地址列表：完整地址 + 浏览器链接 */
.addr-table .c-addr { width: 46%; }
.addr-table td.c-addr { white-space: normal; }
.addr-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.addr-link {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: -.15px;
  color: #9fd0ff; text-decoration: none; word-break: break-all; white-space: normal; line-height: 1.45;
  border-bottom: 1px dashed rgba(74, 168, 255, .35); transition: .18s;
}
.addr-link:hover { color: #d6ebff; border-bottom-color: rgba(74, 168, 255, .85); background: rgba(74, 168, 255, .09); }
.ext-badge {
  flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px;
  font-size: 10px; color: #6da9e0; background: rgba(74, 168, 255, .1); border: 1px solid rgba(74, 168, 255, .2); text-decoration: none;
}
.ext-badge:hover { color: #fff; background: rgba(74, 168, 255, .3); }
.copy-btn {
  flex: none; border: 0; background: transparent; color: #4d6183; cursor: pointer;
  padding: 2px; border-radius: 5px; font-size: 11px; line-height: 1;
}
.copy-btn:hover { color: var(--txt); }
.balance { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }
.balance.has { color: #7ee2a8; }
.balance.zero { color: var(--dim-2); }
.chain-cell { font-size: 11px; color: var(--dim); text-transform: lowercase; }

/* 标签 */
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11px; line-height: 1.6; }
.tag.success { background: rgba(34, 197, 94, .14); color: #4ade80; }
.tag.failed { background: rgba(239, 68, 68, .14); color: #f87171; }
.tag.pending { background: rgba(245, 158, 11, .15); color: #fbbf24; }
.tag.key { background: rgba(39, 117, 202, .18); color: #7fb3ff; }
.tag.allowance { background: rgba(168, 85, 247, .16); color: #d0a2ff; }
.muted { color: var(--dim-2); }

/* 按钮 */
button.primary, button.mini, button.ghost {
  border: 0; border-radius: 9px; cursor: pointer; font-size: 13px; transition: .18s;
}
button.primary { background: linear-gradient(100deg, #2775ca, #3f8ef0); color: #fff; padding: 9px 16px; box-shadow: 0 8px 20px -10px rgba(39, 117, 202, .9); }
button.primary:hover { filter: brightness(1.1); }
button.mini { background: #17233c; color: var(--txt); padding: 6px 11px; border: 1px solid var(--line); }
button.mini:hover { background: #1f304f; }
button.mini.warn { background: rgba(245, 158, 11, .16); color: #fbbf24; border-color: rgba(245, 158, 11, .25); }
button.mini.danger { background: rgba(239, 68, 68, .14); color: #f87171; border-color: rgba(239, 68, 68, .22); }
button.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line); padding: 8px 12px; }
button.ghost:hover { color: var(--txt); border-color: #2e4468; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 16px; }
label.row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); }
label.row span { width: 170px; flex-shrink: 0; }
label.row input, label.row select {
  flex: 1; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(5, 10, 20, .65); color: var(--txt); font-size: 13px; outline: none; transition: .2s;
}
label.row input:focus { border-color: rgba(74, 168, 255, .6); box-shadow: 0 0 0 3px rgba(39, 117, 202, .12); }
/* 开关：深色主题下原生的复选框几乎看不见，改用自绘样式 */
label.row input[type="checkbox"] {
  flex: 0; width: 18px; height: 18px; padding: 0; position: relative;
  appearance: none; -webkit-appearance: none;
  border: 1px solid #35527d; border-radius: 5px;
  background: rgba(5, 10, 20, .9); cursor: pointer;
}
label.row input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent-2); }
label.row input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 5px; top: 1px; width: 4px; height: 9px;
  border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg);
}
label.row input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
.hint { font-size: 12.5px; color: var(--dim); line-height: 1.7; margin-bottom: 14px; padding: 10px 14px; border-radius: 10px; background: rgba(74, 168, 255, .05); border: 1px solid rgba(74, 168, 255, .13); }
.hint b { color: #9fd0ff; }
.hint.small { font-size: 11.5px; padding: 7px 12px; margin-bottom: 10px; }
.hint.small:empty { display: none; }
.actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(3, 7, 14, .75); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-card { width: 480px; max-width: 100%; max-height: 92vh; overflow-y: auto; background: linear-gradient(160deg, #14203a, #0d1729); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-lg); }
.modal-card h3 { margin-bottom: 16px; color: var(--txt); font-size: 15px; }
.modal-card label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 12px; }
.modal-card input, .modal-card select, .modal-card textarea {
  width: 100%; margin-top: 6px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(5, 10, 20, .7); color: var(--txt); font-size: 13px; outline: none; font-family: inherit;
}
.modal-card textarea { font-family: var(--mono); font-size: 12px; resize: vertical; }

/* 日志 */
.logbox { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: pre-wrap; max-height: 70vh; overflow: auto; line-height: 1.7; }

/* toast */
#toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-24px);
  padding: 11px 20px; border-radius: 11px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: .28s cubic-bezier(.2, .8, .3, 1); z-index: 99;
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .9); border: 1px solid transparent;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { background: #0f2e1d; color: #bbf7d0; border-color: rgba(34, 197, 94, .3); }
#toast.bad { background: #38141a; color: #fecaca; border-color: rgba(239, 68, 68, .3); }

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; max-width: 460px; }
  .login-hero { display: none; }
  .login-panel { padding: 36px 26px 26px; }
}
@media (max-width: 800px) {
  #app { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; }
  .side nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .side-foot { margin-top: 0; flex-direction: row; align-items: center; }
  .side-foot #chainStatus { display: none; }
  .main { padding: 16px; }
  label.row { flex-direction: column; align-items: stretch; }
  label.row span { width: auto; }
  .search-input { width: 100%; }
  .addr-table .c-addr { width: auto; }
}
@media (max-width: 520px) {
  .login-stage { padding: 16px 12px; }
  .login-shell { border-radius: 20px; }
  .login-panel { padding: 30px 20px 22px; }
  .pin-boxes { gap: 6px; }
  .pin-digit { height: 48px; font-size: 19px; }
  .hero-brand h1 { font-size: 22px; }
}
