:root {
  --bg: #000000;
  --bg-2: #111318;
  --sidebar: #0e0f13;
  --sidebar-2: #16181e;
  --panel: #16181e;
  --card: #1a1a1a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: #999999;
  --lime: #d4a356;
  --lime-ink: #000000;
  --accent: #d4a356;
  --accent-2: #8b80ff;
  --fresh: #d4a356;
  --stale: #b8883d;
  --off: #ff5d5d;
  --pnl-up: #3dd68c;
  --pnl-down: #ff5d5d;
  --warn: #ff8a3d;
  --mint: rgba(200, 245, 66, 0.12);
  --lilac: rgba(139, 128, 255, 0.16);
  --sky: rgba(110, 168, 255, 0.14);
  --peach: rgba(255, 138, 61, 0.14);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 420px at 88% -12%, rgba(200, 245, 66, 0.08), transparent 52%),
    radial-gradient(720px 380px at 0% 100%, rgba(139, 128, 255, 0.08), transparent 48%),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei UI", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0;
}
a { color: var(--lime); }
button, .btn, input, select, textarea { font: inherit; font-synthesis: none; }

.auth-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px 26px;
}
.auth-card h2 { font-size: 28px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.02em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--lime);
  color: var(--lime-ink); display: grid; place-items: center; font-weight: 600; margin-bottom: 16px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}
.sidebar {
  background: var(--sidebar);
  color: var(--text);
  margin: 12px 0 12px 12px;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
}
.brand-block { display: flex; gap: 12px; align-items: center; padding: 4px 8px 8px; }
.logo {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--lime);
  color: var(--lime-ink);
  display: grid; place-items: center; font-weight: 600; font-size: 12px;
}
.brand { font-weight: 600; letter-spacing: 0.01em; font-size: 15px; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  color: #c5ccd8; text-decoration: none; border-radius: 12px;
  padding: 10px 14px; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.side-nav a.active { background: #fff; color: #111318; }
.side-nav a:hover:not(.active) { background: var(--sidebar-2); }
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: var(--lime); color: var(--lime-ink);
  font-size: 11px; font-weight: 600; display: inline-grid; place-items: center;
}
.side-nav a.active .nav-badge { background: var(--lime-ink); color: #fff; }
.nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.nav-label {
  font-size: 11px; font-weight: 500; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 14px 8px;
}
.nav-sub {
  color: #c5ccd8; text-decoration: none; border-radius: 12px;
  padding: 8px 14px; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.nav-sub.active { background: #fff; color: #111318; }
.nav-sub:hover:not(.active) { background: var(--sidebar-2); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.side-user {
  margin-top: auto; background: var(--sidebar-2); border-radius: 16px; padding: 14px;
  border: 1px solid var(--line);
}
.side-user .who { font-size: 13px; color: #d7dde8; word-break: break-all; }
.side-user button { width: 100%; margin-top: 10px; }
.admin-link {
  display: block; margin: 10px 0 0; color: #c9c3ff; font-size: 13px; font-weight: 500; text-decoration: none;
}

.main { padding: 20px 24px 88px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; font-size: 12px; color: var(--muted); font-weight: 500;
}

.workspace-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.workspace-hero .kicker {
  margin: 0 0 4px; color: var(--muted); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 500;
}
.workspace-hero h1 { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.workspace-hero .kpis { margin: 0; min-width: min(560px, 100%); }
.kpi {
  border-radius: var(--radius); padding: 16px 18px; min-height: 104px;
  background: var(--card); border: 1px solid var(--line); box-shadow: none;
}
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .value {
  font-size: 32px; font-weight: 600; margin-top: 10px; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.kpi .hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.kpi.mint, .kpi.lilac, .kpi.sky, .kpi.peach { background: var(--card); }
.kpi.live .value { color: var(--lime); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mt5-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.hero { background: linear-gradient(180deg, #1b1e27, var(--card)); }
.login { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.equity { font-size: 30px; margin: 8px 0; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.equity small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.muted, .row { color: var(--muted); font-size: 13px; line-height: 1.6; }
.param-account { margin: 6px 0 10px; }
.param-account-actions { display:flex; align-items:center; gap:10px; margin:14px 0 6px; padding:10px 12px; border:1px solid rgba(180,255,40,.35); border-radius:10px; }
.param-account-actions strong { color:#d7ff45; }
.param-readback { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 3px 0 0 24px; padding: 8px 10px; border-left: 2px solid var(--green, #25c77a); background: rgba(37, 199, 122, .07); font-size: 12px; }
.param-readback strong { width: 100%; color: var(--accent); }
.param-readback span { color: var(--text, #eee); }
.param-readback small { width: 100%; color: var(--muted); }
.row.dim { opacity: .85; }
.lamp { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.12); }
.FRESH { background: var(--fresh); box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.16); }
.STALE { background: var(--stale); box-shadow: 0 0 0 3px rgba(232, 184, 74, 0.16); }
.OFFLINE { background: var(--off); box-shadow: 0 0 0 3px rgba(255, 93, 93, 0.16); }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; color: #c5ccd8; font-weight: 500;
}
.pnl.up { color: var(--pnl-up); font-weight: 600; }
.pnl.down { color: var(--pnl-down); font-weight: 600; }
.pnl.flat { color: var(--muted); font-weight: 500; }

.flash-bar {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  background: #101218; color: #eef2ff; border-radius: 16px; padding: 10px 14px; margin-bottom: 14px;
  overflow: hidden; border: 1px solid var(--line);
}
.flash-kicker {
  background: var(--lime); color: var(--lime-ink);
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  border-radius: 999px; padding: 6px 10px;
}
.flash-viewport { overflow: hidden; }
.flash-track { display: flex; gap: 28px; width: max-content; animation: flash-scroll 28s linear infinite; }
.flash-item { white-space: nowrap; font-size: 13px; color: #d7def0; }
.flash-item b { color: var(--lime); margin-right: 8px; font-weight: 600; }
.flash-item em { color: #9aa8bc; font-style: normal; margin-left: 8px; }
@keyframes flash-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.global-risk {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px; margin-bottom: 16px;
}
.global-risk-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.global-risk-head h2 { margin: 0; font-weight: 600; }
.global-risk-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.global-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip-check {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 500;
}
.global-actions, .mt5-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.global-actions button, .mt5-actions button { font-size: 13px; padding: 10px 8px; border-radius: 999px; font-weight: 500; }
.mt5-actions { margin-top: 14px; }
button.all { background: var(--off); color: #fff; }
button.long { background: rgba(61, 214, 140, 0.14); color: var(--pnl-up); }
button.short { background: rgba(255, 138, 61, 0.14); color: var(--warn); }
button.pause { background: var(--lilac); color: #c9c3ff; }
button.resume { background: var(--lime); color: var(--lime-ink); }
button.force { background: transparent; color: var(--warn); border: 1px solid var(--warn); }
button.all:disabled, button.long:disabled, button.short:disabled, button.pause:disabled, button.resume:disabled, button.force:disabled { opacity: .4; cursor: not-allowed; }

.mt5-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px 16px;
  transition: border-color .15s ease, transform .15s ease;
  position: relative;
}
.mt5-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.mt5-card .login { font-size: 26px; letter-spacing: -0.03em; margin-top: 12px; line-height: 1.15; font-weight: 600; }
.mt5-card .equity { font-size: 34px; margin: 4px 0 0; line-height: 1.1; }
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-right: 40px; /* 为删除按钮留出空间 */
}
.card-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #23262e; color: #d7dde8; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; margin-right: 2px;
}
.card-avatar.on { background: var(--lime); color: var(--lime-ink); }
.meta-chip, .warn-chip {
  border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 500;
}
.meta-chip { background: rgba(255,255,255,.06); color: #9aa3b5; border: 1px solid var(--line); }
.warn-chip { background: var(--peach); color: var(--warn); }
.stat-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  margin: 16px 0 12px; padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { display: grid; gap: 2px; min-width: 0; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 500; }
.stat b { font-size: 16px; letter-spacing: -0.02em; font-weight: 600; font-variant-numeric: tabular-nums; }
a.pos-link { text-decoration: none; color: inherit; border-radius: 12px; }
a.pos-link:hover em { text-decoration: underline; }
.stat em { font-style: normal; font-size: 11px; color: var(--lime); font-weight: 600; }
.mini-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.mini-pos {
  background: var(--lilac); color: #c9c3ff; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 500;
}
.server-line { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 12px; }
.back-link { display: inline-block; margin-bottom: 12px; font-weight: 600; text-decoration: none; }
.account-hero { max-width: 560px; }

button, .btn {
  background: #23262e; color: var(--text); border: 0; border-radius: 12px; padding: 10px 14px;
  cursor: pointer; font-size: 14px; font-weight: 500;
}
button.primary, .nav a.active { background: var(--lime); color: var(--lime-ink); }
button.ghost { background: #23262e; color: #fff; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
form { display: grid; gap: 10px; }
input, select, textarea {
  background: #101218; color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(200, 245, 66, 0.55);
}
.banner {
  background: rgba(212, 163, 86, 0.15);
  color: #e4c76a;
  border: 1px solid rgba(212, 163, 86, 0.3);
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.err, .note.err { color: var(--off); min-height: 1.2em; }
.note { min-height: 1.2em; font-size: 13px; white-space: pre-wrap; }
.note.ok {
  color: #e4c76a;
  background: rgba(212, 163, 86, 0.15);
  border: 1px solid rgba(212, 163, 86, 0.3);
  border-radius: 12px;
  padding: 10px 12px;
}
.license-intro { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.license-intro strong, .license-intro span { display: block; }
.license-intro strong { font-size: 16px; margin-bottom: 4px; }
.license-intro span { color: #c9d88d; }
.license-count { white-space: nowrap; color: var(--text) !important; font-size: 12px; }
.license-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 0 14px; }
.license-step { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; background: var(--card); border: 1px solid var(--line); color: var(--muted); padding: 10px 12px; border-radius: 14px; }
.license-step b { grid-row: 1 / span 2; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #292c35; color: var(--text); }
.license-step span { font-size: 13px; color: var(--text); }
.license-step em { font-size: 11px; color: var(--muted); font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.license-step.active { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(200,245,66,.18); }
.license-step.active b, .license-step.done b { background: var(--lime); color: var(--lime-ink); }
.license-workspace { min-height: 360px; }
.license-pane { display: none; }
.license-pane.active { display: block; }
.license-pane-head { margin: 4px 0 14px; }
.license-pane-head h2 { margin-bottom: 4px; }
.license-pane-head .kicker { margin-bottom: 4px; color: var(--lime); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.license-form { max-width: 720px; }
.license-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.license-narrow { max-width: 640px; }
.license-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 14px; align-items: start; }
.license-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.license-list h3, .license-result h3 { margin: 0 0 12px; font-size: 15px; }
.license-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.license-row:last-child { border-bottom: 0; }
.license-row strong, .license-row code, .license-row small { display: block; }
.license-row code { margin-top: 4px; color: var(--lime); font-size: 11px; word-break: break-all; }
.license-row small { margin-top: 6px; color: var(--muted); font-size: 11px; word-break: break-all; }
.license-row > span { color: var(--muted); white-space: nowrap; font-size: 12px; }
.license-result code { display: block; padding: 12px; background: #101218; border: 1px solid var(--line); border-radius: 10px; word-break: break-all; color: var(--lime); font-size: 12px; }
.license-result pre { max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 11px; color: #cbd4e4; }

/* Developer authorization console: one functional category per view. */
.dev-console-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; padding:22px 24px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(135deg,#202a14,#151a12); }
.dev-console-head h2 { margin:3px 0 5px; font-size:24px; }
.dev-console-head p { margin:0; color:var(--muted); }
.dev-console-meta { display:grid; gap:4px; text-align:right; color:var(--lime); white-space:nowrap; }
.dev-console-meta span { color:var(--muted); font-size:12px; }
.dev-console-tabs { display:flex; gap:8px; margin:14px 0 20px; padding:6px; border:1px solid var(--line); border-radius:14px; background:var(--card); overflow:auto; }
.dev-console-tabs button { border:0; background:transparent; color:var(--muted); padding:10px 15px; border-radius:10px; white-space:nowrap; cursor:pointer; }
.dev-console-tabs button.active { color:var(--lime-ink); background:var(--lime); font-weight:700; }
.dev-console-tabs em { font-style:normal; opacity:.75; margin-left:4px; }
.dev-console-panel { min-height:300px; }
.dev-console-panel[style*="display:none"] { display:none !important; }
.dev-panel-title { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin:0 0 16px; }
.dev-panel-title h2 { margin:2px 0 5px; }
.dev-panel-title p { margin:0; }
.dev-app-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:14px; }
.dev-app-card { padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--card); }
.dev-app-card-top,.dev-app-foot,.dev-app-credentials { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.dev-app-card-top > div { display:flex; gap:10px; align-items:center; }
.dev-app-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:var(--lime); color:var(--lime-ink); font-weight:800; }
.dev-app-title { display:grid; gap:3px; } .dev-app-title small,.dev-app-foot { color:var(--muted); font-size:12px; }
.dev-status { color:var(--lime); font-size:12px; }
.dev-app-credentials { margin:18px 0; padding:12px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); align-items:flex-start; }
.dev-app-credentials div { min-width:0; } .dev-app-credentials span,.dev-token span { display:block; color:var(--muted); font-size:11px; margin-bottom:5px; }
.dev-app-credentials code { color:var(--lime); font-size:11px; word-break:break-all; }
.dev-form { max-width:760px; display:grid; gap:14px; }
.dev-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.dev-form label { display:grid; gap:6px; color:var(--muted); font-size:12px; }
.check-row { display:flex !important; align-items:center; gap:8px !important; }
.check-row input { width:auto; }
.dev-attention { max-width:760px; margin-bottom:14px; color:#f3d28a; }
.dev-token { margin-top:14px; padding:14px; border:1px solid var(--line); border-radius:12px; background:#101218; }
.dev-token code { display:block; color:var(--lime); word-break:break-all; font-size:12px; }
.dev-token small { display:block; margin-top:8px; color:var(--muted); }
.dev-grants { max-width:900px; padding:0 18px; }
.dev-grant-row { display:flex; justify-content:space-between; gap:18px; padding:16px 0; border-bottom:1px solid var(--line); }
.dev-grant-row:last-child { border-bottom:0; } .dev-grant-row div { display:grid; gap:5px; } .dev-grant-row span,.dev-grant-row small { color:var(--muted); font-size:12px; }
.dev-doc-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; max-width:900px; }
.dev-doc-grid h3 { margin-top:0; } .dev-doc-grid li { margin:8px 0; color:var(--muted); }
@media (max-width: 700px) { .dev-console-head,.dev-panel-title { flex-direction:column; } .dev-console-meta { text-align:left; } .dev-form-grid,.dev-doc-grid { grid-template-columns:1fr; } .dev-grant-row { flex-direction:column; gap:8px; } }
.integration-guide { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.integration-guide summary { cursor: pointer; color: var(--lime); font-weight: 600; }
.integration-guide p { margin: 10px 0 0; }
h2 { font-size: 18px; margin: 0 0 12px; font-weight: 600; }
.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 14px; }
.user-row {
  display: flex; justify-content: space-between; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.user-row:last-child { border-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
button.danger { background: var(--off); color: #fff; }
button.danger:disabled { opacity: .45; cursor: not-allowed; }
button.tiny { padding: 4px 10px; font-size: 12px; border-radius: 10px; }
table.sheet.positions th { width: auto; }
table.sheet.positions td:last-child { white-space: nowrap; }
.account-detail-link { display: inline-flex; margin-top: 12px; color: var(--lime); font-size: 13px; text-decoration: none; }
.account-detail-link:hover { text-decoration: underline; }
.param-stack { display: grid; gap: 14px; }
.param-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.param-field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.param-field code { font-size: 11px; color: #8a97ab; }
.param-field input[type="checkbox"] { width: 18px; height: 18px; }
.param-field em { font-style: normal; font-size: 10px; color: var(--pnl-up); }
.param-field-restart-only { opacity: .46; }
.bridge-only .param-field-restart-only { display: none; }
.param-field-restart-only em { color: var(--muted); }
.param-field-restart-only input:disabled { cursor: not-allowed; }
.file-btn { display: inline-flex; align-items: center; cursor: pointer; }
table.sheet { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
table.sheet th, table.sheet td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
table.sheet th { color: #c5ccd8; font-weight: 500; width: 22%; }

.kind-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--lilac); color: #c9c3ff; margin-right: 8px; }
.popup-kind { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.popup-kind:last-of-type { border-bottom: 0; }
.popup-kind label { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.popup-kind input[type="number"] { width: 72px; }
.notify-overlay { position: fixed; inset: 0; background: rgba(6, 7, 10, 0.62); display: grid; place-items: center; z-index: 80; padding: 20px; cursor: pointer; }
.notify-modal {
  width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 22px; box-shadow: var(--shadow);
  cursor: default; pointer-events: auto; position: relative; z-index: 81;
}
.notify-kind { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--lime); margin-bottom: 8px; }
.notify-modal p { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.notify-modal button { width: 100%; }

@media (max-width: 1100px) {
  .kpis, .split { grid-template-columns: 1fr 1fr; }
  .global-actions, .mt5-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: static; margin: 10px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .kpis, .split { grid-template-columns: 1fr; }
  .mt5-grid { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  .page-head h1, .workspace-hero h1 { font-size: 24px; }
  .license-steps { grid-template-columns: 1fr 1fr; }
  .license-layout, .license-inline { grid-template-columns: 1fr; }
  .license-intro { align-items: flex-start; flex-direction: column; }
}

/* 视图切换器 */
.view-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.view-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn:hover {
  border-color: var(--accent);
}

.view-btn.active {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
  font-weight: 600;
}

/* 标签筛选行 */
.tag-filters-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.tag-filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-filter-btn:hover {
  border-color: var(--accent);
  background: rgba(212, 163, 86, 0.1);
}

.tag-filter-btn.active {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
  font-weight: 600;
}

.tag-filter-btn.clear {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.tag-filter-btn.clear:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

/* 标签芯片（表格中显示） */
.tag-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(212, 163, 86, 0.15);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  margin-right: 4px;
}

.tags-cell {
  white-space: nowrap;
}

/* 列表视图 */
.account-table-view {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

.account-table-view thead {
  background: rgba(212, 163, 86, 0.1);
  border-bottom: 1px solid var(--line);
}

.account-table-view th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}

.account-table-view td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.account-table-view tbody tr {
  cursor: pointer;
  transition: background 0.2s;
}

.account-table-view tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.account-table-view tbody tr:last-child td {
  border-bottom: none;
}

.account-table-view .account-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  margin-right: 8px;
}

.account-table-view .status-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Card spacing utility */
.card-spacing {
  margin-top: 16px;
}

/* Section title spacing */
.section-title {
  margin-top: 20px;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Workspace header */
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.workspace-header .tag-filters {
  flex: 1;
  margin: 0;
  padding: 0;
  border: none;
}

.workspace-header .view-switcher {
  flex-shrink: 0;
}

.tag-manage-btn {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  font-weight: 500;
}

.tag-manage-btn:hover {
  background: var(--accent);
  color: #000;
}

/* Home actions */
.home-actions {
  margin-bottom: 16px;
  display: flex;
  justify-content: flex-end;
}

.home-actions button {
  font-size: 14px;
}

/* Section head with actions */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 16px;
}

.section-head h2 {
  margin: 0;
}

.section-head button {
  font-size: 13px;
  padding: 6px 16px;
}

/* Delete account button */
/* Delete account button */
.delete-account-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: rgba(255, 93, 93, 0.6);
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  z-index: 10;
}

.delete-account-btn:hover {
  background: rgba(255, 93, 93, 0.15);
  color: #ff5d5d;
  opacity: 1;
  transform: scale(1.1);
}

.delete-account-btn:active {
  transform: scale(0.9);
}

.mt5-card:hover .delete-account-btn {
  opacity: 1;
}

.mt5-card {
  position: relative;
}
