/* ============================================================
   雲途创作套件 - 视觉语言（与雲途API一致：金/青/紫渐变 + 星空 + 毛玻璃）
   ============================================================ */

:root {
  --bg-0: #050818;
  --bg-1: #0a1130;
  --bg-2: #131b40;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #e6ebff;
  --text-dim: #9aa3c7;
  --text-mute: #6b7396;
  --gold: #e7b95c;
  --gold-2: #f5d488;
  --gold-3: #ffd98a;
  --cyan: #5ce6db;
  --purple: #7c6cff;
  --green: #5cd9a1;
  --red: #ff7a8a;
  --shadow-1: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 18px 60px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --radius-lg: 22px;
  --grad-primary: linear-gradient(135deg, #f5d488 0%, #e7b95c 35%, #5ce6db 100%);
  --grad-soft: linear-gradient(135deg, rgba(245, 212, 136, 0.18), rgba(92, 230, 219, 0.18) 60%, rgba(124, 108, 255, 0.18));
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(ellipse at top, var(--bg-2) 0%, var(--bg-1) 35%, var(--bg-0) 100%);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body > #app {
  flex: 1 0 auto;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--gold); }
button { font-family: inherit; }

/* ============================================================
   动态背景层：粒子网络 + 流光 + 网格 + 浮动光斑 + 光束
   （由 /js/bg.js 注入 #bgCanvas 及 .bg-mesh/.bg-grid/.bg-orb/.bg-rays）
   ============================================================ */
#bgCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0.85;
}
.bg-mesh, .bg-grid, .bg-orb {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.bg-mesh {
  background:
    radial-gradient(900px 600px at 10% 5%, rgba(79, 140, 255, 0.28), transparent 60%),
    radial-gradient(800px 500px at 95% 10%, rgba(124, 108, 255, 0.26), transparent 60%),
    radial-gradient(900px 600px at 50% 100%, rgba(92, 230, 219, 0.18), transparent 65%),
    radial-gradient(700px 500px at 80% 70%, rgba(231, 185, 92, 0.10), transparent 65%);
  animation: meshDrift 22s ease-in-out infinite alternate;
  filter: blur(2px);
}
@keyframes meshDrift {
  0%   { background-position: 0% 0%, 100% 0%, 50% 100%, 80% 70%; transform: scale(1); }
  50%  { background-position: 30% 20%, 70% 30%, 50% 80%, 60% 60%; transform: scale(1.05); }
  100% { background-position: 50% 0%, 50% 40%, 50% 60%, 40% 50%; transform: scale(1); }
}
.bg-grid {
  background-image:
    linear-gradient(rgba(120, 150, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 220, 0.05) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  animation: gridFloat 30s linear infinite;
}
@keyframes gridFloat {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 64px 64px, 64px 64px; }
}
.bg-orb {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-orb .o {
  position: absolute; border-radius: 50%; filter: blur(80px);
  opacity: 0.45; will-change: transform;
}
.bg-orb .o1 { width: 520px; height: 520px; left: -160px; top: -120px; background: radial-gradient(circle, #4f8cff, transparent 70%); animation: orbA 18s ease-in-out infinite; }
.bg-orb .o2 { width: 480px; height: 480px; right: -140px; top: 10%;  background: radial-gradient(circle, #7c6cff, transparent 70%); animation: orbB 24s ease-in-out infinite; }
.bg-orb .o3 { width: 600px; height: 600px; left: 30%; bottom: -240px; background: radial-gradient(circle, #5ce6db, transparent 70%); animation: orbC 28s ease-in-out infinite; }
.bg-orb .o4 { width: 380px; height: 380px; right: 20%; bottom: 5%;  background: radial-gradient(circle, #e7b95c, transparent 70%); animation: orbD 32s ease-in-out infinite; opacity: 0.3; }
.bg-orb .o5 { width: 360px; height: 360px; left: 55%; top: 35%; background: radial-gradient(circle, #b870ff, transparent 70%); animation: orbE 26s ease-in-out infinite; opacity: 0.25; }
@keyframes orbA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(120px, 80px) scale(1.15); } }
@keyframes orbB { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-140px, 100px) scale(1.1); } }
@keyframes orbC { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-160px, -120px) scale(1.2); } }
@keyframes orbD { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(80px, -100px) scale(1.1); } }
@keyframes orbE { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-100px, 60px) scale(1.15); } }

/* 顶部光束 */
.bg-rays {
  position: fixed; left: 50%; top: -10%; transform: translateX(-50%);
  width: 1200px; height: 600px; pointer-events: none; z-index: 0;
  background: conic-gradient(from 0deg at 50% 0%,
    transparent 0deg, rgba(124, 108, 255, 0.06) 25deg,
    transparent 50deg, rgba(92, 230, 219, 0.05) 80deg,
    transparent 110deg, rgba(231, 185, 92, 0.04) 150deg,
    transparent 180deg, rgba(79, 140, 255, 0.06) 210deg,
    transparent 240deg, rgba(184, 112, 255, 0.05) 280deg,
    transparent 320deg);
  filter: blur(40px); opacity: 0.6; animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

/* 让内容盖在背景之上 */
.topbar, .footbar, main, #app, .toast-host { position: relative; z-index: 1; }

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  background: linear-gradient(180deg, rgba(10, 17, 48, 0.72), rgba(10, 17, 48, 0.32));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand-small { display: flex; align-items: center; gap: 12px; }
.brand-small img { width: 38px; height: 38px; border-radius: 10px; }
.brand-small b { display: block; font-size: 16px; letter-spacing: 0.5px; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-small span { display: block; font-size: 10px; color: var(--text-mute); letter-spacing: 2px; font-family: var(--mono); }

.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-2); }
.user-chip b { display: block; font-size: 13px; }
.user-chip span { display: block; font-size: 10px; color: var(--text-mute); }
.token-kind-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 184, 108, 0.18), rgba(108, 200, 255, 0.18));
  border: 1px solid rgba(255, 184, 108, 0.35);
  color: var(--gold-3);
  letter-spacing: 0.3px;
  cursor: help;
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #0a0f20;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.avatar.xl { width: 64px; height: 64px; font-size: 24px; }

.balance-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(231, 185, 92, 0.12), rgba(92, 230, 219, 0.08));
  border: 1px solid rgba(231, 185, 92, 0.32);
  border-radius: 999px;
  font-size: 13px;
}
.balance-ico { font-size: 14px; }
.balance-chip b { font-size: 15px; font-weight: 700; color: var(--gold-3); font-variant-numeric: tabular-nums; }
.balance-lbl { color: var(--text-dim); font-size: 11px; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.28); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.gold {
  background: var(--grad-primary);
  color: #0a0f20;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(231, 185, 92, 0.32);
}
.btn.gold:hover { box-shadow: 0 6px 24px rgba(231, 185, 92, 0.45); transform: translateY(-1px); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.link {
  background: none; border: none; color: var(--cyan); padding: 4px 0; font-size: 12px;
}
.btn.link:hover { color: var(--gold); background: none; }

/* ============================================================
   登录弹窗（令牌输入）
   ============================================================ */
.token-screen {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 20px;
}
.token-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 38px 36px 30px;
  background: linear-gradient(180deg, rgba(20, 26, 64, 0.85), rgba(10, 17, 48, 0.88));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.token-card::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(231, 185, 92, 0.6), rgba(92, 230, 219, 0.3) 40%, rgba(124, 108, 255, 0.5) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.7; animation: borderGlow 6s linear infinite;
}
@keyframes borderGlow { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

.brand-big { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-big img { width: 52px; height: 52px; border-radius: 14px; }
.brand-big h1 { margin: 0; font-size: 22px; letter-spacing: 1px; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-big .sub { font-size: 10px; color: var(--text-mute); letter-spacing: 2px; font-family: var(--mono); }

.token-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.token-card .lead { color: var(--text-dim); font-size: 13px; margin: 0 0 22px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; letter-spacing: 0.5px; }
.input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--mono);
  color: var(--text);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  outline: none;
  transition: all 0.18s;
}
.input::placeholder { color: var(--text-mute); }
.input:focus { border-color: var(--gold); background: rgba(0, 0, 0, 0.48); box-shadow: 0 0 0 3px rgba(231, 185, 92, 0.12); }
.input.token-input { letter-spacing: 0.5px; }

.token-hint {
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(92, 230, 219, 0.06);
  border: 1px solid rgba(92, 230, 219, 0.18);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}
.token-hint b { color: var(--cyan); }
.token-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 122, 138, 0.08);
  border: 1px solid rgba(255, 122, 138, 0.32);
  border-radius: 8px;
  font-size: 12px;
  color: var(--red);
  display: none;
}
.token-error.show { display: block; }
.token-actions { margin-top: 18px; }
.token-meta { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-mute); }
.token-meta a { color: var(--cyan); }

/* ============================================================
   平台选择页
   ============================================================ */
.platform-screen {
  position: relative; z-index: 1;
  padding: 48px 28px 60px;
  max-width: 1280px; margin: 0 auto;
}
.platform-hero { text-align: center; margin-bottom: 42px; }
.platform-hero h1 {
  margin: 0 0 10px;
  font-size: 32px; font-weight: 800; letter-spacing: 1px;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.platform-hero p { margin: 0; color: var(--text-dim); font-size: 14px; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .platform-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .platform-grid { grid-template-columns: 1fr; } }

.platform-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px 24px;
  background: linear-gradient(180deg, rgba(20, 26, 64, 0.55), rgba(10, 17, 48, 0.72));
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-height: 280px;
}
.platform-card::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-soft);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.platform-card:hover {
  transform: translateY(-6px);
  border-color: rgba(231, 185, 92, 0.5);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(231, 185, 92, 0.3);
}
.platform-card:hover::before { opacity: 1; }
.platform-card[data-color="cyan"]:hover { border-color: rgba(92, 230, 219, 0.5); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(92, 230, 219, 0.3); }
.platform-card[data-color="purple"]:hover { border-color: rgba(124, 108, 255, 0.5); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 108, 255, 0.3); }

.platform-card .pc-ico {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 32px;
  background: var(--grad-primary);
  color: #0a0f20;
  margin-bottom: 18px;
  flex-shrink: 0;
  animation: iconFloat 3.6s ease-in-out infinite;
  box-shadow: 0 8px 24px -6px rgba(231, 185, 92, 0.4);
}
/* 旋转光环 */
.platform-card .pc-ico::before {
  content: ""; position: absolute; inset: -7px; border-radius: 20px;
  background: conic-gradient(from 0deg, var(--gold), var(--cyan), var(--purple), var(--gold));
  z-index: -1; opacity: 0.55; animation: iconSpin 6s linear infinite;
  filter: blur(4px);
}
.platform-card[data-color="cyan"] .pc-ico { background: linear-gradient(135deg, #5ce6db, #7c6cff); }
.platform-card[data-color="purple"] .pc-ico { background: linear-gradient(135deg, #7c6cff, #f5d488); }
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}
@keyframes iconSpin { to { transform: rotate(360deg); } }
.platform-card .pc-tag {
  position: absolute; top: 20px; right: 20px;
  font-size: 10px; padding: 3px 8px;
  background: rgba(231, 185, 92, 0.15);
  border: 1px solid rgba(231, 185, 92, 0.4);
  color: var(--gold-3);
  border-radius: 999px;
  letter-spacing: 0.5px;
  font-family: var(--mono);
}
.platform-card h3 { position: relative; margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.platform-card p { position: relative; margin: 0 0 16px; color: var(--text-dim); font-size: 13px; line-height: 1.6; flex: 1; }
.platform-card .pc-feats { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.platform-card .pc-feat {
  font-size: 11px; padding: 3px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: var(--text-dim);
}
.platform-card .pc-go {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--gold-3);
}
.platform-card:hover .pc-go { color: var(--cyan); }
.platform-card .pc-go::after { content: "→"; transition: transform 0.18s; }
.platform-card:hover .pc-go::after { transform: translateX(4px); }

/* ============================================================
   占位平台页
   ============================================================ */
.placeholder-screen {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto;
  padding: 36px 28px 60px;
}
.placeholder-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 22px;
  transition: all 0.18s;
}
.placeholder-back:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.placeholder-hero {
  text-align: center;
  padding: 50px 24px;
  background: linear-gradient(180deg, rgba(20, 26, 64, 0.55), rgba(10, 17, 48, 0.72));
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}
.placeholder-hero .ph-ico {
  width: 88px; height: 88px;
  border-radius: 22px;
  display: grid; place-items: center;
  font-size: 44px;
  background: var(--grad-primary);
  color: #0a0f20;
  margin: 0 auto 18px;
  position: relative;
  animation: iconFloat 4s ease-in-out infinite, iconPulse 3s ease-in-out infinite;
}
.placeholder-hero .ph-ico::before {
  content: ""; position: absolute; inset: -9px; border-radius: 28px;
  background: conic-gradient(from 0deg, var(--gold), var(--cyan), var(--purple), var(--gold));
  z-index: -1; opacity: 0.55; animation: iconSpin 7s linear infinite;
  filter: blur(5px);
}
@keyframes iconPulse {
  0%, 100% { box-shadow: 0 10px 30px -8px rgba(231, 185, 92, 0.45); }
  50% { box-shadow: 0 14px 44px -6px rgba(92, 230, 219, 0.6); }
}
.placeholder-hero h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; }
.placeholder-hero .sub { color: var(--text-dim); font-size: 14px; margin: 0 0 18px; }
.placeholder-hero .tag {
  display: inline-block; padding: 4px 12px;
  background: rgba(231, 185, 92, 0.15);
  border: 1px solid rgba(231, 185, 92, 0.4);
  color: var(--gold-3);
  font-size: 12px;
  border-radius: 999px;
  font-family: var(--mono);
  letter-spacing: 1px;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
@media (max-width: 760px) { .placeholder-grid { grid-template-columns: 1fr; } }
.placeholder-card {
  padding: 20px;
  background: linear-gradient(180deg, rgba(20, 26, 64, 0.4), rgba(10, 17, 48, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.placeholder-card .pc-num {
  font-size: 28px; font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 4px;
  font-family: var(--mono);
}
.placeholder-card .pc-lbl { color: var(--text-dim); font-size: 12px; }

.timeline {
  background: rgba(20, 26, 64, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
}
.timeline h3 { margin: 0 0 16px; font-size: 16px; font-weight: 700; }
.timeline-list { display: flex; flex-direction: column; gap: 12px; }
.timeline-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border-left: 3px solid var(--border-2);
}
.timeline-item.done { border-left-color: var(--green); }
.timeline-item.current { border-left-color: var(--gold); background: rgba(231, 185, 92, 0.05); }
.timeline-item .ti-dot {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-mute);
  margin-top: 2px;
}
.timeline-item.done .ti-dot { background: var(--green); color: #0a0f20; }
.timeline-item.current .ti-dot { background: var(--gold); color: #0a0f20; }
.timeline-item .ti-body { flex: 1; }
.timeline-item .ti-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.timeline-item .ti-desc { font-size: 12px; color: var(--text-dim); }
.timeline-item .ti-date { font-size: 11px; color: var(--text-mute); font-family: var(--mono); margin-left: 8px; }

/* ============================================================
   Toast
   ============================================================ */
.toast-host {
  position: fixed; right: 20px; top: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  background: linear-gradient(180deg, rgba(20, 26, 64, 0.92), rgba(10, 17, 48, 0.92));
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(10px);
  animation: toastIn 0.25s ease-out;
  max-width: 360px;
}
.toast.success { border-color: rgba(92, 217, 161, 0.5); color: var(--green); }
.toast.error { border-color: rgba(255, 122, 138, 0.5); color: var(--red); }
.toast.info { border-color: rgba(92, 230, 219, 0.5); color: var(--cyan); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   底部
   ============================================================ */
.footbar {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  margin-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}
.footbar .muted { color: var(--text-mute); }

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar-right { gap: 8px; }
  .balance-lbl { display: none; }
  .user-chip span { display: none; }
  .platform-screen { padding: 28px 16px; }
  .placeholder-screen { padding: 24px 16px; }
  .platform-hero h1 { font-size: 24px; }
}

/* utility */
.muted { color: var(--text-mute); }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }

/* ============================================================
   雲途工作流编辑器（Coze/Dify 风格）
   ============================================================ */
.wf-editor {
  --wf-bg: #0a0e1f;
  --wf-panel: rgba(20, 26, 56, 0.7);
  --wf-border: rgba(255, 255, 255, 0.08);
  --wf-border-h: rgba(255, 255, 255, 0.16);
  --wf-text: #e6ebff;
  --wf-dim: #9aa3c7;
  --wf-mute: #6b7396;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at top, #131b40 0%, #0a1130 35%, #050818 100%);
  color: var(--wf-text);
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  z-index: 10;
  overflow: hidden;
}

/* ----- 顶栏 ----- */
.wf-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(10, 14, 31, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--wf-border);
  flex: 0 0 auto;
  height: 52px;
}
.wf-title { display: flex; align-items: center; gap: 10px; }
.wf-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  cursor: pointer; color: var(--wf-dim);
  transition: all .15s;
}
.wf-back:hover { background: rgba(255, 213, 107, 0.18); color: var(--gold-3); }
.wf-title b { font-size: 15px; font-weight: 600; }
.wf-tag {
  display: inline-block; padding: 2px 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  font-size: 10px; color: var(--wf-dim);
  font-family: var(--mono);
  letter-spacing: 0.5px;
}
.wf-tag.tag-cyan { background: rgba(92, 230, 219, 0.18); color: var(--cyan); }
.wf-tag.tag-gold { background: rgba(255, 213, 107, 0.18); color: var(--gold-3); }
.wf-tag.tag-success { background: rgba(92, 217, 161, 0.18); color: var(--green); }
.wf-tag.tag-error { background: rgba(255, 122, 138, 0.18); color: var(--red); }
.wf-actions { display: flex; gap: 8px; align-items: center; }
.wf-actions .btn { padding: 6px 12px; font-size: 12px; }

/* ----- 主区 ----- */
.wf-main {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 200px 1fr 320px;
  min-height: 0;
}

/* ----- 调色板 ----- */
.wf-palette {
  background: rgba(10, 14, 31, 0.6);
  border-right: 1px solid var(--wf-border);
  padding: 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.palette-title {
  font-size: 11px; color: var(--wf-mute);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 0 6px 8px;
}
.palette-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--wf-border);
  border-left: 3px solid var(--c);
  border-radius: 8px;
  cursor: grab;
  transition: all .15s;
  user-select: none;
}
.palette-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--c);
  transform: translateX(2px);
}
.palette-item:active { cursor: grabbing; }
.pi-ico { font-size: 18px; line-height: 1; flex: 0 0 20px; }
.pi-name { font-size: 12px; font-weight: 600; }
.pi-desc { font-size: 10px; color: var(--wf-mute); margin-top: 2px; line-height: 1.3; }
.palette-hint {
  margin-top: auto;
  padding: 8px;
  font-size: 10px;
  color: var(--wf-mute);
  text-align: center;
  line-height: 1.5;
  border-top: 1px dashed var(--wf-border);
  padding-top: 10px;
}

/* ----- 画布 ----- */
.wf-canvas {
  position: relative;
  overflow: hidden;
  background: var(--wf-bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(124, 108, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(92, 230, 219, 0.04) 0%, transparent 40%);
  cursor: default;
}
.wf-grid-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.wf-canvas-content {
  position: absolute; inset: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.wf-connections {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.wf-connections .wf-conn, .wf-connections .wf-conn-temp {
  pointer-events: stroke;
  fill: none;
  stroke: rgba(92, 230, 219, 0.55);
  stroke-width: 2;
  transition: stroke .15s;
  cursor: pointer;
}
.wf-connections .wf-conn:hover { stroke: var(--red); stroke-width: 3; }
.wf-connections .wf-conn-temp { stroke: var(--gold-3); stroke-dasharray: 4 4; }
.wf-nodes {
  position: absolute; inset: 0;
  pointer-events: none;
}
.wf-canvas-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 1;
}
/* 对齐辅助线：拖动节点时实时显示（水平 / 垂直），位于 nodes 之上 */
.wf-align-guide {
  position: absolute;
  pointer-events: none;
  z-index: 9;
  background: transparent;
}
.wf-align-h {
  left: 0;
  right: 0;
  height: 0;
  border-top: 1.5px dashed #ff5b8a;
  box-shadow: 0 0 6px rgba(255, 91, 138, 0.55);
}
.wf-align-v {
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1.5px dashed #5ce6db;
  box-shadow: 0 0 6px rgba(92, 230, 219, 0.55);
}
.wf-hint-card {
  text-align: center;
  color: var(--wf-dim);
  max-width: 480px;
  padding: 30px;
  background: rgba(10, 14, 31, 0.5);
  backdrop-filter: blur(8px);
  border: 1px dashed var(--wf-border);
  border-radius: 16px;
}
.wf-hint-ico { font-size: 48px; margin-bottom: 12px; }
.wf-hint-card h2 { color: var(--wf-text); font-size: 20px; margin: 0 0 12px; }
.wf-hint-card p { margin: 6px 0; font-size: 13px; line-height: 1.6; }

/* ----- 节点 ----- */
.wf-node {
  position: absolute;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(28, 36, 70, 0.95), rgba(18, 24, 50, 0.95));
  border: 1px solid var(--wf-border);
  border-radius: 10px;
  min-width: 200px;
  max-width: 240px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  user-select: none;
  cursor: default;
  transition: box-shadow .15s, border-color .15s, transform .1s;
}
.wf-node:hover { border-color: var(--wf-border-h); }
.wf-node.selected {
  border-color: var(--c, var(--gold-3));
  box-shadow: 0 0 0 2px var(--c, var(--gold-3)), 0 6px 20px rgba(0, 0, 0, 0.5);
}
.wf-node.status-running { border-color: var(--gold-3); box-shadow: 0 0 0 2px var(--gold-3), 0 6px 20px rgba(255, 213, 107, 0.2); }
.wf-node.status-success { border-color: var(--green); }
.wf-node.status-error { border-color: var(--red); }
.wf-node-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(90deg, var(--c, #5ce6db) 0%, transparent 80%);
  background-color: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--wf-border);
  border-radius: 10px 10px 0 0;
  cursor: move;
}
.wf-node-ico { font-size: 16px; flex: 0 0 18px; }
.wf-node-title {
  font-size: 12px; font-weight: 600; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wf-node-status {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wf-mute);
  flex: 0 0 8px;
}
.wf-node-status[data-status="running"] { background: var(--gold-3); animation: pulse 1.2s ease-in-out infinite; }
.wf-node-status[data-status="success"] { background: var(--green); }
.wf-node-status[data-status="error"] { background: var(--red); }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--gold-3); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}
.wf-node-body { padding: 8px 12px; font-size: 11px; }
.nf-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.nf-lbl { color: var(--wf-mute); flex: 0 0 50px; }
.nf-val {
  flex: 1; color: var(--wf-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--mono); font-size: 10px;
}
.nf-val.is-filled { color: #c9f7ff; }
.nf-val.is-empty { color: var(--wf-mute); font-style: italic; }
.nf-edit-hint { display:block; padding-top:4px; border-top: 1px dashed rgba(255,255,255,0.07); }
.prop-kv { display:flex; align-items:center; gap:8px; padding:4px 0; font-size:12px; }
.prop-kv-k { flex: 0 0 80px; color: var(--wf-mute); }
.prop-kv-v { flex:1; word-break:break-all; font-family:var(--mono); font-size:11px; }
.prop-kv-v.is-filled { color: #c9f7ff; }
.prop-kv-v.is-empty { color: var(--wf-mute); font-style: italic; }
.nf-out {
  margin-top: 6px; padding: 6px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  font-size: 10px; line-height: 1.4;
  color: var(--wf-dim);
  max-height: 60px; overflow: hidden;
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--mono);
}
.nf-img { width: 100%; border-radius: 6px; margin-top: 6px; }
.nf-video { width: 100%; border-radius: 6px; margin-top: 6px; max-height: 120px; }

.wf-node-port {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--c, #5ce6db);
  border: 2px solid var(--wf-bg);
  border-radius: 50%;
  cursor: crosshair;
  transition: transform .15s, box-shadow .15s;
  z-index: 2;
}
.wf-node-port:hover { transform: scale(1.4); box-shadow: 0 0 12px var(--c, #5ce6db); }
.wf-node-port-out {
  right: -7px; top: 50%;
  transform: translateY(-50%);
  cursor: crosshair;
}
.wf-node-port-out:hover { transform: translateY(-50%) scale(1.4); }
.wf-node-port-in {
  left: -7px; top: 50%;
  transform: translateY(-50%);
  cursor: cell;
  opacity: 0.7;
}
.wf-node-port-in:hover { opacity: 1; transform: translateY(-50%) scale(1.4); }
/* 拖线时吸附高亮 */
.wf-node.wf-conn-target { box-shadow: 0 0 0 2px var(--c, #5ce6db), 0 0 24px var(--c, #5ce6db); }
.wf-node.wf-conn-target .wf-node-port-in { opacity: 1; transform: translateY(-50%) scale(1.6); box-shadow: 0 0 16px var(--c, #5ce6db); }

/* ----- 右侧栏 ----- */
.wf-sidebar {
  background: rgba(10, 14, 31, 0.6);
  border-left: 1px solid var(--wf-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wf-sidebar-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}
/* 账户额度条（运行 AI 节点即从此账户扣费） */
.wf-billing-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--wf-border);
  background: rgba(255, 213, 107, 0.06);
  font-size: 13px;
}
.wf-billing-bar .bb-label { color: var(--wf-dim); white-space: nowrap; }
.wf-billing-bar .bb-balance {
  margin-left: auto;
  font-weight: 700;
  color: var(--gold-3);
  font-variant-numeric: tabular-nums;
}
.wf-billing-bar .bb-refresh {
  background: transparent;
  border: 1px solid var(--wf-border);
  border-radius: 6px;
  color: var(--wf-dim);
  cursor: pointer;
  width: 24px; height: 24px;
  line-height: 1;
  transition: color .15s, border-color .15s;
}
.wf-billing-bar .bb-refresh:hover { color: var(--gold-3); border-color: var(--gold-3); }
.wf-sidebar-empty {
  text-align: center;
  color: var(--wf-dim);
  padding: 80px 0;
  font-size: 13px;
  line-height: 2;
}
.empty-ico { font-size: 40px; margin-bottom: 14px; opacity: 0.5; }

.prop-card { display: flex; flex-direction: column; gap: 14px; }
.prop-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(90deg, var(--c) 0%, transparent 100%);
  background-color: rgba(255,255,255,0.04);
  border-left: 3px solid var(--c);
  border-radius: 8px;
}
.prop-head span:first-child { font-size: 20px; }
.prop-head b { flex: 1; font-size: 14px; }
.prop-type {
  font-size: 10px; padding: 2px 6px;
  background: rgba(255,255,255,0.08); border-radius: 4px;
  color: var(--wf-mute); font-family: var(--mono);
}
.prop-body { display: flex; flex-direction: column; gap: 10px; }
.prop-section {
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--wf-border);
  border-radius: 8px;
}
.prop-section-title {
  font-size: 10px; color: var(--wf-mute);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 6px;
}
.prop-status { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.dot-idle { background: var(--wf-mute); }
.dot-running { background: var(--gold-3); animation: pulse 1.2s ease-in-out infinite; }
.dot-success { background: var(--green); }
.dot-error { background: var(--red); }
.prop-error { color: var(--red); font-size: 11px; margin-top: 6px; line-height: 1.4; }
.prop-out {
  margin: 0; padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--wf-dim);
  white-space: pre-wrap; word-break: break-word;
  max-height: 200px; overflow: auto;
}
.prop-actions { display: flex; gap: 8px; }
.prop-actions .btn { flex: 1; }
.btn.danger { color: var(--red); border-color: rgba(255, 122, 138, 0.3); }
.btn.danger:hover { background: rgba(255, 122, 138, 0.15); }

/* ----- 模板库面板 ----- */
.tpl-panel h3 { margin: 0 0 4px; font-size: 14px; }
.tpl-list { display: flex; flex-direction: column; gap: 8px; }
.tpl-card {
  display: flex; gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--wf-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
}
.tpl-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--cyan);
  transform: translateY(-1px);
}
.tpl-card.is-user {
  background: rgba(255,200,80,0.05);
  border-color: rgba(255,200,80,0.25);
}
.tpl-card.is-user:hover {
  border-color: rgba(255,200,80,0.6);
}
.tpl-user-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 9px;
  background: rgba(255,200,80,0.2);
  color: #ffc850;
  border-radius: 3px;
  font-weight: 700;
  vertical-align: middle;
}
.tpl-del {
  margin-left: auto;
  padding: 1px 5px;
  cursor: pointer;
  border-radius: 3px;
  transition: background .15s;
}
.tpl-del:hover { background: rgba(255,90,90,0.25); }
.tpl-name { display: flex; align-items: center; }
.tpl-ico {
  font-size: 28px; line-height: 1; flex: 0 0 36px;
  display: flex; align-items: center; justify-content: center;
}
.tpl-body { flex: 1; min-width: 0; }
.tpl-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.tpl-desc { font-size: 11px; color: var(--wf-dim); line-height: 1.5; margin-bottom: 4px; }
.tpl-meta { display: flex; gap: 8px; font-size: 10px; color: var(--wf-mute); align-items: center; }
.tpl-cat {
  padding: 1px 6px;
  background: rgba(92, 230, 219, 0.15);
  color: var(--cyan);
  border-radius: 3px;
}

/* ----- 状态栏 ----- */
.wf-statusbar {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 18px;
  background: rgba(10, 14, 31, 0.85);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--wf-border);
  font-size: 11px; color: var(--wf-dim);
  flex: 0 0 auto;
  height: 30px;
}
.sb-status { display: flex; align-items: center; gap: 6px; }
.sb-sep { color: var(--wf-mute); }
.sb-right { margin-left: auto; }
.sb-token {
  padding: 2px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
}

/* ----- 运行进度浮层 ----- */
.wf-run-overlay {
  position: absolute;
  top: 60px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(10, 14, 31, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gold-3);
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 24px rgba(255, 213, 107, 0.15);
  min-width: 460px;
}
.wf-run-bar { display: flex; align-items: center; gap: 14px; }
.wf-run-info { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.wf-run-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--gold-3);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.wf-run-progress { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.wf-run-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-3), var(--cyan));
  width: 0%;
  transition: width .3s ease;
}
.wf-run-pct { font-size: 12px; color: var(--gold-3); font-family: var(--mono); min-width: 40px; text-align: right; }

/* ----- 输入参数弹窗 ----- */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5, 8, 24, 0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: linear-gradient(180deg, rgba(28, 36, 70, 0.98), rgba(18, 24, 50, 0.98));
  border: 1px solid var(--wf-border-h);
  border-radius: 14px;
  min-width: 480px; max-width: 720px; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 24px var(--c, var(--cyan));
  overflow: hidden;
}
.modal-head { padding: 18px 22px 6px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body {
  padding: 14px 22px;
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-foot {
  padding: 12px 22px;
  border-top: 1px solid var(--wf-border);
  display: flex; justify-content: flex-end; gap: 8px;
  background: rgba(0,0,0,0.15);
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--wf-dim); }
.input {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--wf-text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.input:focus { border-color: var(--cyan); background: rgba(0,0,0,0.4); }
textarea.input { resize: vertical; min-height: 60px; font-family: var(--mono); font-size: 12px; }
.wf-input-modal .field textarea { min-height: 80px; }

/* 按钮（精简） */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  color: var(--wf-text);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.btn:hover { background: rgba(255,255,255,0.08); border-color: var(--wf-border-h); }
.btn.gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-color: var(--gold);
  color: #2a1a00;
  font-weight: 600;
}
.btn.gold:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 213, 107, 0.3); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ============================================================
   v2.2 账号中心页
   ============================================================ */
.accounts-screen {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.accounts-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.accounts-header h2 { margin: 4px 0 8px; font-size: 22px; }
.accounts-header .muted { color: #9aa3c7; }
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.acc-card {
  background: rgba(20, 22, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 4px solid var(--c, #4FC3F7);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.acc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.acc-card-connected {
  background: rgba(79, 195, 247, 0.05);
  box-shadow: 0 0 0 1px rgba(79, 195, 247, 0.2) inset;
}
.acc-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.acc-ico { font-size: 24px; }
.acc-name { flex: 1; font-weight: 600; }
.acc-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
}
.acc-badge.green { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.acc-badge.gray  { background: rgba(154, 163, 199, 0.15); color: #9aa3c7; }
.acc-card-body {
  font-size: 12px;
  color: #c5c9e0;
  line-height: 1.6;
}
.acc-card-body .muted { color: #9aa3c7; }
.acc-meta code {
  font-size: 11px;
  padding: 1px 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  color: #FFB36B;
  word-break: break-all;
}
.acc-card-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

/* 账号中心弹窗 */
.acc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.acc-modal-card {
  background: #1a1d2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.acc-modal-card h3 { margin: 0 0 8px; }
.acc-modal-card .field { margin-bottom: 10px; }

/* ============================================================
   切换用户弹窗（sw-modal）
   ============================================================ */
.sw-modal { width: 520px; max-width: 92vw; max-height: 80vh; overflow-y: auto; }
.sw-hint {
  font-size: 13px; color: var(--text-mute); margin-bottom: 14px;
  padding: 10px 12px; background: rgba(124, 108, 255, 0.08);
  border: 1px solid rgba(124, 108, 255, 0.15); border-radius: 8px;
}
.sw-list { display: flex; flex-direction: column; gap: 6px; }
.sw-section-title {
  font-size: 12px; font-weight: 600; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 16px 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.sw-acct {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 10px;
  cursor: default; transition: all 0.2s;
}
.sw-acct:hover { border-color: var(--border-2); background: #181d38; }
.sw-acct.sw-current {
  border-color: var(--gold); background: rgba(231, 185, 92, 0.06);
  box-shadow: 0 0 0 1px rgba(231, 185, 92, 0.15), inset 0 0 20px rgba(231, 185, 92, 0.03);
}
.sw-avatar {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-size: 18px; font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: #0a0f20; flex-shrink: 0;
}
.sw-current .sw-avatar { background: linear-gradient(135deg, var(--gold), #f5d488); }
.sw-info { flex: 1; min-width: 0; }
.sw-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-meta { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.sw-current-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  background: var(--gold); color: #0a0f20; padding: 1px 8px; border-radius: 4px;
  margin-left: 6px; vertical-align: middle;
}
.sw-go {
  background: linear-gradient(135deg, var(--purple), var(--cyan)); color: #0a0f20;
  border: none; padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.sw-go:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124, 108, 255, 0.35); }
.sw-del {
  background: none; border: none; color: var(--text-mute); cursor: pointer;
  font-size: 16px; padding: 4px 6px; border-radius: 4px; transition: all 0.15s; line-height: 1;
}
.sw-del:hover { color: var(--red); background: rgba(255, 122, 138, 0.1); }
.sw-empty {
  text-align: center; color: var(--text-mute); font-size: 13px;
  padding: 20px 0; border: 1px dashed var(--border); border-radius: 8px;
}

/* 添加新账户 */
.sw-add-section { margin-top: 18px; }
.sw-add-form { display: flex; gap: 8px; }
.sw-add-form .input { flex: 1; }
.sw-add-err { color: var(--red); font-size: 12px; margin-top: 6px; min-height: 18px; }
