/* ==========================================================================
   北斗云 Beidou Cloud · Design System v1.0
   星空深蓝 / 极光青 / 星金 — 用户中心 & 购物车共用基座
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bd-font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bd-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --bd-brand: #3ed0f5;
  --bd-brand-2: #2bb8e6;
  --bd-brand-3: #7c5cff;
  --bd-brand-soft: rgba(62, 208, 245, .14);
  --bd-gold: #ffb020;
  --bd-gold-soft: rgba(255, 176, 32, .14);

  --bd-ok: #2ed47a;
  --bd-warn: #ffb020;
  --bd-err: #ff5c7a;
  --bd-info: #4c9aff;

  --bd-r-lg: 18px;
  --bd-r-md: 12px;
  --bd-r-sm: 8px;
  --bd-r-pill: 999px;

  --bd-side-w: 252px;
  --bd-top-h: 64px;
  --bd-ease: cubic-bezier(.4, 0, .2, 1);
  --bd-1: 120ms;
  --bd-2: 220ms;
  --bd-3: 320ms;
}

/* Dark (default) — 星夜 */
html[data-bd-theme="dark"],
:root {
  --bd-bg: #070f22;
  --bd-bg-2: #0a142c;
  --bd-surface: rgba(19, 32, 62, .72);
  --bd-surface-2: rgba(26, 42, 78, .6);
  --bd-surface-solid: #132040;
  --bd-line: rgba(120, 155, 215, .16);
  --bd-line-2: rgba(120, 155, 215, .3);
  --bd-text: #e8eefc;
  --bd-text-2: #a8b8d8;
  --bd-text-3: #6f80a4;
  --bd-shadow: 0 18px 40px -18px rgba(0, 0, 0, .75);
  --bd-shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .85);
  --bd-glow: 0 0 0 1px rgba(62, 208, 245, .22), 0 12px 34px -14px rgba(62, 208, 245, .45);
  --bd-grid-line: rgba(120, 155, 215, .055);
  --bd-scrim: rgba(3, 7, 18, .72);
}

/* Light — 晨空 */
html[data-bd-theme="light"] {
  --bd-bg: #f3f6fc;
  --bd-bg-2: #e9eef9;
  --bd-surface: rgba(255, 255, 255, .92);
  --bd-surface-2: #f5f8ff;
  --bd-surface-solid: #fff;
  --bd-line: rgba(20, 45, 95, .11);
  --bd-line-2: rgba(20, 45, 95, .2);
  --bd-text: #0d1a33;
  --bd-text-2: #47597a;
  --bd-text-3: #7f8fab;
  --bd-shadow: 0 16px 34px -20px rgba(15, 35, 75, .28);
  --bd-shadow-lg: 0 28px 60px -26px rgba(15, 35, 75, .32);
  --bd-glow: 0 0 0 1px rgba(43, 184, 230, .28), 0 12px 28px -14px rgba(43, 184, 230, .4);
  --bd-grid-line: rgba(20, 45, 95, .05);
  --bd-scrim: rgba(15, 25, 45, .42);
  --bd-brand: #12a5cc;
  --bd-brand-2: #0d8bb0;
  --bd-brand-soft: rgba(18, 165, 204, .1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--bd-font);
  font-size: 14px;
  line-height: 1.62;
  color: var(--bd-text);
  background: var(--bd-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 88% -8%, var(--bd-brand-soft), transparent 62%),
    radial-gradient(900px 520px at 4% 8%, rgba(124, 92, 255, .13), transparent 60%),
    linear-gradient(var(--bd-grid-line) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, var(--bd-grid-line) 1px, transparent 1px) 0 0 / 44px 100%,
    var(--bd-bg);
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; line-height: 1.3; letter-spacing: -.01em; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
h4 { font-size: 15px; } h5 { font-size: 14px; }
p { margin: 0 0 12px; }
a { color: inherit; text-decoration: none; transition: color var(--bd-1) var(--bd-ease); }
a:hover { color: var(--bd-brand); }
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
code, pre, .bd-code { font-family: var(--bd-mono); }
hr { border: 0; border-top: 1px solid var(--bd-line); margin: 20px 0; }
[hidden] { display: none !important; }
::selection { background: var(--bd-brand); color: #041018; }
:focus-visible { outline: 2px solid var(--bd-brand); outline-offset: 2px; border-radius: 4px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 999; padding: 10px 16px;
  background: var(--bd-brand); color: #041018; border-radius: var(--bd-r-sm);
  font-weight: 600; transform: translateY(-160%);
}
.skip-link:focus { transform: none; color: #041018; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--bd-line-2) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--bd-line-2); border-radius: 9px; }
*::-webkit-scrollbar-thumb:hover { background: var(--bd-text-3); }

/* ---------- 3. Utilities ---------- */
.bd-row { display: flex; align-items: center; gap: 10px; }
.bd-row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bd-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bd-col { display: flex; flex-direction: column; }
.bd-grow { flex: 1 1 auto; min-width: 0; }
.bd-center { display: flex; align-items: center; justify-content: center; }
.bd-right { margin-left: auto; }
.bd-stack > * + * { margin-top: 12px; }
.bd-gap-s { gap: 6px; } .bd-gap-l { gap: 18px; }
.bd-hide { display: none !important; }
.bd-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-wrap-any { overflow-wrap: anywhere; }
.bd-mw-0 { min-width: 0; }
.bd-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bd-mono { font-family: var(--bd-mono); font-size: .94em; letter-spacing: -.02em; }
.bd-num { font-variant-numeric: tabular-nums; }
.bd-muted { color: var(--bd-text-2); }
.bd-dim { color: var(--bd-text-3); }
.bd-strong { font-weight: 650; color: var(--bd-text); }
.bd-xs { font-size: 12px; } .bd-sm { font-size: 13px; } .bd-lg { font-size: 16px; }
.bd-time { color: var(--bd-text-2); font-variant-numeric: tabular-nums; }
.bd-money { color: var(--bd-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-t-2xl { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.bd-brand-text { color: var(--bd-brand); }
.bd-gold-text { color: var(--bd-gold); }
.bd-ok-text { color: var(--bd-ok); } .bd-err-text { color: var(--bd-err); }
.bd-warn-text { color: var(--bd-warn); } .bd-info-text { color: var(--bd-info); }
.bd-ta-c { text-align: center; } .bd-ta-r { text-align: right; }
.bd-mt-0 { margin-top: 0 !important; } .bd-mb-0 { margin-bottom: 0 !important; }
.bd-mt-s { margin-top: 8px; } .bd-mt-m { margin-top: 14px; } .bd-mt-l { margin-top: 22px; }
.bd-mb-s { margin-bottom: 8px; } .bd-mb-m { margin-bottom: 14px; } .bd-mb-l { margin-bottom: 22px; }
.bd-pt-s { padding-top: 8px; } .bd-pb-s { padding-bottom: 8px; }
.bd-divider { height: 1px; background: var(--bd-line); margin: 16px 0; }
.bd-avatar-ring { box-shadow: 0 0 0 2px var(--bd-surface-solid), 0 0 0 3px var(--bd-brand-soft); }

/* Icon */
.bd-ico { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.7; }
.bd-ico-sm { width: 15px; height: 15px; }
.bd-ico-lg { width: 22px; height: 22px; }
.bd-ico-xl { width: 30px; height: 30px; }
.bd-ico-spin { animation: bd-spin 1s linear infinite; }
@keyframes bd-spin { to { transform: rotate(360deg); } }

/* ---------- 4. App shell ---------- */
.bd-app { min-height: 100vh; display: flex; flex-direction: column; }
.bd-shell { display: flex; align-items: flex-start; min-height: 100vh; }
.bd-main { flex: 1 1 auto; min-width: 0; padding-top: var(--bd-top-h); }
.bd-container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 22px clamp(14px, 3vw, 34px) 60px; }
.bd-narrow { max-width: 940px; }
.bd-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.bd-page-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.bd-page-sub { color: var(--bd-text-2); font-size: 13px; margin-top: 4px; }
.bd-crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--bd-text-3); margin-bottom: 8px; flex-wrap: wrap; }
.bd-crumb a:hover { color: var(--bd-brand); }
.bd-crumb-sep { opacity: .55; }

/* Topbar */
.bd-topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--bd-top-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 clamp(14px, 2.4vw, 26px);
  background: color-mix(in srgb, var(--bd-bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--bd-line);
}
.bd-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.bd-brand img, .bd-brand svg { width: 34px; height: 34px; border-radius: 10px; }
.bd-brand-sub { font-size: 11px; font-weight: 500; color: var(--bd-text-3); letter-spacing: .12em; text-transform: uppercase; }
.bd-topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bd-icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: var(--bd-text-2); background: transparent; border: 1px solid transparent;
  transition: all var(--bd-1) var(--bd-ease);
}
.bd-icon-btn:hover { color: var(--bd-brand); background: var(--bd-brand-soft); border-color: var(--bd-line); }
.bd-dot-badge {
  position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--bd-err); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; line-height: 1; border: 2px solid var(--bd-bg);
}
.bd-menu-btn { display: none; }

/* User chip + dropdown */
.bd-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 11px 5px 5px;
  border: 1px solid var(--bd-line); border-radius: var(--bd-r-pill); background: var(--bd-surface-2);
  transition: all var(--bd-1) var(--bd-ease); max-width: 220px;
}
.bd-chip:hover { border-color: var(--bd-brand); background: var(--bd-brand-soft); }
.bd-chip-name { font-size: 13px; font-weight: 600; }
.bd-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--bd-brand-3), var(--bd-brand)); color: #fff;
  font-size: 12px; font-weight: 700; text-transform: uppercase; overflow: hidden;
}
.bd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bd-avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.bd-avatar-lg { width: 52px; height: 52px; font-size: 19px; }
.bd-avatar-xl { width: 74px; height: 74px; font-size: 26px; }
.bd-drop { position: relative; }
.bd-drop-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 226px; z-index: 70;
  background: var(--bd-surface-solid); border: 1px solid var(--bd-line-2); border-radius: var(--bd-r-md);
  box-shadow: var(--bd-shadow-lg); padding: 6px; opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(.98); transition: all var(--bd-2) var(--bd-ease);
}
.bd-drop.is-open .bd-drop-menu { opacity: 1; visibility: visible; transform: none; }
.bd-drop-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--bd-line); margin-bottom: 6px; }
.bd-drop-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--bd-r-sm);
  font-size: 13.5px; color: var(--bd-text-2); transition: all var(--bd-1) var(--bd-ease);
}
.bd-drop-item:hover { background: var(--bd-brand-soft); color: var(--bd-brand); }
.bd-drop-item.is-danger { color: var(--bd-err); }
.bd-drop-item.is-danger:hover { background: rgba(255, 92, 122, .12); color: var(--bd-err); }

/* Sidebar */
.bd-side {
  position: fixed; z-index: 65; top: var(--bd-top-h); bottom: 0; left: 0; width: var(--bd-side-w);
  display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--bd-bg-2) 82%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--bd-line); overflow: hidden;
}
.bd-side-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 28px; }
.bd-side-foot { padding: 14px; border-top: 1px solid var(--bd-line); font-size: 12px; color: var(--bd-text-3); }
.bd-side-wallet {
  padding: 13px; margin: 0;
  background: linear-gradient(135deg, rgba(62, 208, 245, .14), rgba(124, 92, 255, .12));
  border-color: rgba(62, 208, 245, .28);
}
.bd-nav-group { margin-bottom: 4px; }
.bd-nav-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bd-text-3); padding: 16px 12px 7px;
}
.bd-nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9.5px 12px; margin: 2px 0;
  border-radius: 11px; color: var(--bd-text-2); font-size: 13.5px; font-weight: 500;
  position: relative; transition: all var(--bd-1) var(--bd-ease);
}
.bd-nav-link:hover { color: var(--bd-text); background: var(--bd-surface-2); }
.bd-nav-link.is-active { color: var(--bd-brand); background: var(--bd-brand-soft); font-weight: 650; }
.bd-nav-link.is-active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--bd-brand);
  box-shadow: 0 0 12px var(--bd-brand);
}
.bd-nav-link .bd-ico { opacity: .9; }
.bd-nav-count {
  margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 9px;
  background: var(--bd-err); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.bd-nav-count.is-soft { background: var(--bd-brand-soft); color: var(--bd-brand); }
.bd-nav-sub { overflow: hidden; max-height: 0; transition: max-height var(--bd-3) var(--bd-ease); }
.bd-nav-group.is-open > .bd-nav-sub { max-height: 640px; }
.bd-nav-sub .bd-nav-link { padding-left: 41px; font-size: 13px; }
.bd-nav-caret { margin-left: auto; transition: transform var(--bd-2) var(--bd-ease); }
.bd-nav-group.is-open > .bd-nav-toggle .bd-nav-caret { transform: rotate(180deg); }
.bd-scrim {
  position: fixed; inset: 0; z-index: 64; background: var(--bd-scrim);
  opacity: 0; visibility: hidden; transition: all var(--bd-2) var(--bd-ease);
  backdrop-filter: blur(2px);
}
body.is-nav-open .bd-scrim { opacity: 1; visibility: visible; }

/* Bottom tabbar (mobile) */
.bd-tabbar {
  display: none; position: fixed; z-index: 62; inset: auto 0 0 0;
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bd-bg-2) 92%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--bd-line);
}
.bd-tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.bd-tabbar-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px;
  border-radius: 11px; font-size: 10.5px; color: var(--bd-text-3); position: relative;
}
.bd-tabbar-item.is-active { color: var(--bd-brand); background: var(--bd-brand-soft); }
.bd-tabbar-item .bd-ico { width: 20px; height: 20px; }

/* ---------- 5. Card / panel ---------- */
.bd-card {
  position: relative; background: var(--bd-surface); border: 1px solid var(--bd-line);
  border-radius: var(--bd-r-lg); box-shadow: var(--bd-shadow); backdrop-filter: blur(10px);
  margin-bottom: 18px; overflow: hidden;
}
.bd-card-flat { background: transparent; box-shadow: none; }
.bd-card-glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(62, 208, 245, .1), transparent 42%);
}
.bd-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--bd-line);
}
.bd-card-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 650; }
.bd-card-title .bd-ico { color: var(--bd-brand); }
.bd-card-desc { font-size: 12.5px; color: var(--bd-text-3); font-weight: 400; margin-top: 2px; }
.bd-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bd-card-body { padding: 20px; }
.bd-card-body.is-tight { padding: 14px 20px; }
.bd-card-body.is-flush { padding: 0; }
.bd-card-foot { padding: 14px 20px; border-top: 1px solid var(--bd-line); background: var(--bd-surface-2); }
.bd-card-hover { transition: transform var(--bd-2) var(--bd-ease), border-color var(--bd-2) var(--bd-ease), box-shadow var(--bd-2) var(--bd-ease); }
.bd-card-hover:hover { transform: translateY(-3px); border-color: var(--bd-line-2); box-shadow: var(--bd-shadow-lg); }
.bd-card.is-collapsible .bd-card-body { display: none; }
.bd-card.is-collapsible.is-open .bd-card-body { display: block; }

/* Grid */
.bd-grid { display: grid; gap: 18px; }
.bd-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bd-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bd-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bd-grid-auto { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.bd-grid-side { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
.bd-span-2 { grid-column: span 2; }

/* Stat */
.bd-stat {
  position: relative; padding: 18px 20px; border-radius: var(--bd-r-lg); overflow: hidden;
  background: var(--bd-surface); border: 1px solid var(--bd-line); box-shadow: var(--bd-shadow);
}
.bd-stat::before {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 130px; height: 130px;
  transform: translate(34%, -58%); border-radius: 50%; filter: blur(6px); opacity: .5;
  background: radial-gradient(circle, var(--bd-brand-soft), transparent 68%);
}
.bd-stat-label { font-size: 12.5px; color: var(--bd-text-3); display: flex; align-items: center; gap: 7px; }
.bd-stat-value { font-size: 27px; font-weight: 700; letter-spacing: -.025em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.bd-stat-value small { font-size: 14px; font-weight: 500; color: var(--bd-text-3); margin-left: 3px; }
.bd-stat-foot { margin-top: 8px; font-size: 12px; color: var(--bd-text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bd-stat-icon {
  position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; background: var(--bd-brand-soft); color: var(--bd-brand);
}
.bd-stat.is-gold::before { background: radial-gradient(circle, var(--bd-gold-soft), transparent 68%); }
.bd-stat.is-gold .bd-stat-icon { background: var(--bd-gold-soft); color: var(--bd-gold); }
.bd-stat.is-violet .bd-stat-icon { background: rgba(124, 92, 255, .16); color: var(--bd-brand-3); }
.bd-stat.is-link { cursor: pointer; transition: all var(--bd-2) var(--bd-ease); }
.bd-stat.is-link:hover { transform: translateY(-3px); border-color: var(--bd-brand); box-shadow: var(--bd-glow); }
.is-up { color: var(--bd-ok); } .is-down { color: var(--bd-err); }

/* ---------- 6. Buttons ---------- */
.bd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px; border-radius: 11px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
  background: var(--bd-surface-2); color: var(--bd-text); transition: all var(--bd-1) var(--bd-ease);
  -webkit-user-select: none; user-select: none; position: relative;
}
.bd-btn:hover { border-color: var(--bd-line-2); background: var(--bd-surface); color: var(--bd-text); }
.bd-btn:active { transform: translateY(1px); }
.bd-btn[disabled], .bd-btn.is-disabled { opacity: .5; pointer-events: none; }
.bd-btn-primary {
  background: linear-gradient(135deg, var(--bd-brand), var(--bd-brand-2)); color: #04121c;
  box-shadow: 0 8px 22px -10px rgba(62, 208, 245, .7);
}
.bd-btn-primary:hover { background: linear-gradient(135deg, #58daff, var(--bd-brand)); color: #04121c; box-shadow: 0 12px 28px -10px rgba(62, 208, 245, .8); }
.bd-btn-gold { background: linear-gradient(135deg, var(--bd-gold), #ff9500); color: #2b1800; }
.bd-btn-gold:hover { color: #2b1800; filter: brightness(1.06); }
.bd-btn-ghost { background: transparent; border-color: var(--bd-line-2); color: var(--bd-text-2); }
.bd-btn-ghost:hover { color: var(--bd-brand); border-color: var(--bd-brand); background: var(--bd-brand-soft); }
.bd-btn-soft { background: var(--bd-brand-soft); color: var(--bd-brand); border-color: transparent; }
.bd-btn-soft:hover { background: var(--bd-brand); color: #04121c; }
.bd-btn-danger { background: rgba(255, 92, 122, .14); color: var(--bd-err); border-color: transparent; }
.bd-btn-danger:hover { background: var(--bd-err); color: #fff; }
.bd-btn-success { background: rgba(46, 212, 122, .14); color: var(--bd-ok); }
.bd-btn-success:hover { background: var(--bd-ok); color: #04180c; }
.bd-btn-link { background: none; border: 0; color: var(--bd-brand); padding: 0; font-weight: 600; }
.bd-btn-link:hover { background: none; text-decoration: underline; color: var(--bd-brand); }
.bd-btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; gap: 5px; }
.bd-btn-sm .bd-ico { width: 15px; height: 15px; }
.bd-btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 13px; }
.bd-btn-block { width: 100%; }
.bd-btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.bd-btn-icon.bd-btn-sm { width: 30px; height: 30px; }
.bd-btn.is-loading { color: transparent !important; pointer-events: none; }
.bd-btn.is-loading::after {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: bd-spin .62s linear infinite;
}
.bd-btn-primary.is-loading::after, .bd-btn-danger.is-loading::after { border-color: rgba(4, 18, 28, .3); border-top-color: #04121c; }
.bd-btn-group { display: inline-flex; border: 1px solid var(--bd-line); border-radius: 11px; overflow: hidden; }
.bd-btn-group .bd-btn { border: 0; border-radius: 0; background: transparent; }
.bd-btn-group .bd-btn + .bd-btn { border-left: 1px solid var(--bd-line); }
.bd-btn-group .bd-btn.is-active { background: var(--bd-brand-soft); color: var(--bd-brand); }

/* ---------- 7. Forms ---------- */
.bd-form { display: grid; gap: 16px; }
.bd-form-row { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bd-form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bd-field { display: grid; gap: 7px; min-width: 0; }
.bd-field > span:first-child, .bd-label {
  font-size: 12.5px; font-weight: 600; color: var(--bd-text-2); display: flex; align-items: center; gap: 6px;
}
.bd-label-req::after { content: "*"; color: var(--bd-err); font-weight: 700; }
.bd-input, .bd-select, .bd-textarea {
  width: 100%; padding: 10px 13px; border-radius: 11px; font-size: 13.5px;
  background: var(--bd-surface-2); border: 1px solid var(--bd-line); color: var(--bd-text);
  transition: border-color var(--bd-1) var(--bd-ease), box-shadow var(--bd-1) var(--bd-ease), background var(--bd-1);
  appearance: none; -webkit-appearance: none;
}
.bd-input::placeholder, .bd-textarea::placeholder { color: var(--bd-text-3); }
.bd-input:hover, .bd-select:hover, .bd-textarea:hover { border-color: var(--bd-line-2); }
.bd-input:focus, .bd-select:focus, .bd-textarea:focus {
  outline: none; border-color: var(--bd-brand); background: var(--bd-surface-solid);
  box-shadow: 0 0 0 3px var(--bd-brand-soft);
}
.bd-textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.bd-select {
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f80a4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 17px;
}
.bd-select option { background: var(--bd-surface-solid); color: var(--bd-text); }
.bd-input-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 9px; }
.bd-input-lg { padding: 13px 16px; font-size: 15px; border-radius: 13px; }
.bd-input[readonly] { color: var(--bd-text-2); background: var(--bd-surface-2); border-style: dashed; }
.bd-input:disabled, .bd-select:disabled, .bd-textarea:disabled { opacity: .55; cursor: not-allowed; }
.bd-input-mono { font-family: var(--bd-mono); font-size: 12.5px; letter-spacing: -.02em; }
.bd-hint { font-size: 12px; color: var(--bd-text-3); }
.bd-error { font-size: 12px; color: var(--bd-err); display: flex; align-items: center; gap: 5px; }
.bd-input.is-invalid, .bd-select.is-invalid, .bd-textarea.is-invalid { border-color: var(--bd-err); box-shadow: 0 0 0 3px rgba(255, 92, 122, .13); }
.bd-input-wrap { position: relative; display: flex; align-items: center; }
.bd-input-wrap .bd-input { padding-left: 40px; }
.bd-input-wrap > .bd-ico { position: absolute; left: 13px; color: var(--bd-text-3); pointer-events: none; }
.bd-input-affix { position: absolute; right: 8px; display: flex; gap: 2px; }
.bd-input-group { display: flex; align-items: stretch; gap: 8px; }
.bd-input-group .bd-input { flex: 1 1 auto; min-width: 0; }
.bd-input-tag {
  display: flex; align-items: stretch;
  border: 1px solid var(--bd-line); border-radius: 11px; overflow: hidden; background: var(--bd-surface-2);
}
.bd-input-tag > span,
.bd-input-tag > select:first-child {
  flex: 0 0 auto; padding: 0 12px; font-size: 13px; color: var(--bd-text-2);
  background: var(--bd-surface); border-right: 1px solid var(--bd-line);
  display: grid; place-items: center;
}
.bd-input-tag > select { border: 0; background: transparent; border-radius: 0; height: 100%; min-height: 40px; max-width: 148px; }
.bd-input-tag > button:last-child {
  flex: 0 0 auto; border-radius: 0; border: 0; border-left: 1px solid var(--bd-line);
  background: var(--bd-surface); align-self: stretch; min-height: 40px; padding: 0 10px;
}
.bd-input-tag > button:last-child:hover { background: var(--bd-brand-soft); }
.bd-input-tag .bd-input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; border-radius: 0; }
.bd-input-tag:focus-within { border-color: var(--bd-brand); box-shadow: 0 0 0 3px var(--bd-brand-soft); }

.bd-check, .bd-radio { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13.5px; }
.bd-check input, .bd-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.bd-check > .bd-box, .bd-radio > .bd-box {
  width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; border-radius: 5px;
  border: 1.6px solid var(--bd-line-2); background: var(--bd-surface-2);
  display: grid; place-items: center; transition: all var(--bd-1) var(--bd-ease);
}
.bd-radio > .bd-box { border-radius: 50%; }
.bd-check > .bd-box::after {
  content: ""; width: 10px; height: 5px; border: 2px solid #04121c; border-top: 0; border-right: 0;
  transform: rotate(-45deg) scale(0); transition: transform var(--bd-1) var(--bd-ease); margin-top: -2px;
}
.bd-radio > .bd-box::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #04121c;
  transform: scale(0); transition: transform var(--bd-1) var(--bd-ease);
}
.bd-check input:checked + .bd-box, .bd-radio input:checked + .bd-box { background: var(--bd-brand); border-color: var(--bd-brand); }
.bd-check input:checked + .bd-box::after { transform: rotate(-45deg) scale(1); }
.bd-radio input:checked + .bd-box::after { transform: scale(1); }
.bd-check input:focus-visible + .bd-box { box-shadow: 0 0 0 3px var(--bd-brand-soft); }
.bd-check.is-disabled, .bd-radio.is-disabled { opacity: .5; pointer-events: none; }

.bd-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.bd-switch input { position: absolute; opacity: 0; }
.bd-switch > .bd-track {
  width: 42px; height: 24px; border-radius: 999px; background: var(--bd-surface);
  border: 1px solid var(--bd-line-2); position: relative; transition: all var(--bd-2) var(--bd-ease); flex: 0 0 auto;
}
.bd-switch > .bd-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bd-text-2); transition: all var(--bd-2) var(--bd-ease);
}
.bd-switch input:checked + .bd-track { background: var(--bd-brand); border-color: var(--bd-brand); }
.bd-switch input:checked + .bd-track::after { transform: translateX(18px); background: #04121c; }

.bd-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bd-surface-2); border: 1px solid var(--bd-line); border-radius: 12px; flex-wrap: wrap; }
.bd-seg-item { padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--bd-text-2); transition: all var(--bd-1) var(--bd-ease); white-space: nowrap; }
.bd-seg-item:hover { color: var(--bd-text); }
.bd-seg-item.is-active { background: var(--bd-surface-solid); color: var(--bd-brand); box-shadow: var(--bd-shadow); }

.bd-upload {
  display: grid; place-items: center; gap: 8px; padding: 26px 18px; text-align: center;
  border: 1.6px dashed var(--bd-line-2); border-radius: var(--bd-r-md); background: var(--bd-surface-2);
  color: var(--bd-text-2); font-size: 13px; cursor: pointer; transition: all var(--bd-2) var(--bd-ease);
}
.bd-upload:hover { border-color: var(--bd-brand); background: var(--bd-brand-soft); color: var(--bd-brand); }
.bd-upload.is-over { border-color: var(--bd-brand); box-shadow: var(--bd-glow); }
.bd-upload input[type=file] { display: none; }

/* ---------- 8. Table ---------- */
.bd-table-wrap { width: 100%; overflow-x: auto; }
.bd-table { width: 100%; font-size: 13.5px; min-width: 640px; }
.bd-table th, .bd-table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--bd-line); }
.bd-table thead th {
  position: sticky; top: 0; z-index: 2; white-space: nowrap; font-size: 11.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--bd-text-3);
  background: var(--bd-surface-2); border-bottom: 1px solid var(--bd-line-2);
}
.bd-table tbody tr { transition: background var(--bd-1) var(--bd-ease); }
.bd-table tbody tr:hover { background: var(--bd-brand-soft); }
.bd-table tbody tr:last-child td { border-bottom: 0; }
.bd-table td.bd-nowrap, .bd-table th.bd-nowrap { white-space: nowrap; }
.bd-table .bd-cell-main { font-weight: 600; color: var(--bd-text); }
.bd-table .bd-cell-sub { font-size: 12px; color: var(--bd-text-3); margin-top: 2px; }
.bd-table-compact th, .bd-table-compact td { padding: 9px 12px; }
.bd-table-fixed { min-width: 0; }
.bd-th-check { width: 42px; }
.bd-th-actions { width: 1%; white-space: nowrap; text-align: right; }
.bd-td-actions { text-align: right; white-space: nowrap; }
.bd-td-actions .bd-btn + .bd-btn, .bd-td-actions a + a { margin-left: 4px; }
.bd-sort { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: inherit; }
.bd-sort:hover { color: var(--bd-brand); }
.bd-sort.is-active { color: var(--bd-brand); }
.bd-row-check { display: grid; place-items: center; }
.bd-table tbody.is-busy { opacity: .5; pointer-events: none; }
.bd-bulkbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 18px;
  background: var(--bd-brand-soft); border: 1px solid var(--bd-brand); border-radius: var(--bd-r-md);
  margin-bottom: 12px; font-size: 13px;
}
.bd-bulkbar[hidden] { display: none; }

/* ---------- 9. Pills / badges ---------- */
.bd-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6;
  background: var(--bd-surface-2); color: var(--bd-text-2); border: 1px solid var(--bd-line);
}
.bd-pill-ok { background: rgba(46, 212, 122, .13); color: var(--bd-ok); border-color: rgba(46, 212, 122, .3); }
.bd-pill-warn { background: var(--bd-gold-soft); color: var(--bd-warn); border-color: rgba(255, 176, 32, .32); }
.bd-pill-err { background: rgba(255, 92, 122, .13); color: var(--bd-err); border-color: rgba(255, 92, 122, .3); }
.bd-pill-info { background: rgba(76, 154, 255, .13); color: var(--bd-info); border-color: rgba(76, 154, 255, .3); }
.bd-pill-brand { background: var(--bd-brand-soft); color: var(--bd-brand); border-color: rgba(62, 208, 245, .32); }
.bd-pill-gold { background: var(--bd-gold-soft); color: var(--bd-warn); border-color: rgba(255, 176, 32, .32); }
.bd-pill-mute { color: var(--bd-text-3); }
.bd-pill-lg { padding: 5px 13px; font-size: 12.5px; }
.bd-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.bd-dot-live { box-shadow: 0 0 0 0 currentColor; animation: bd-pulse 2.1s infinite; }
@keyframes bd-pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.bd-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--bd-surface-2); color: var(--bd-text-3); border: 1px solid var(--bd-line); }
.bd-badge-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bd-err); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }

/* ---------- 10. Empty / skeleton / spinner ---------- */
.bd-empty { display: grid; place-items: center; gap: 10px; padding: 52px 24px; text-align: center; color: var(--bd-text-3); }
.bd-empty .bd-ico { width: 40px; height: 40px; opacity: .45; color: var(--bd-brand); }
.bd-empty svg { width: 96px; height: 96px; opacity: .5; }
.bd-empty p { margin: 0; font-size: 13.5px; max-width: 380px; }
.bd-empty-title { font-size: 15px; font-weight: 650; color: var(--bd-text-2); }
.bd-skeleton { border-radius: var(--bd-r-sm); background: linear-gradient(90deg, var(--bd-surface-2) 25%, var(--bd-line) 37%, var(--bd-surface-2) 63%); background-size: 400% 100%; animation: bd-shimmer 1.4s ease infinite; }
@keyframes bd-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.bd-skeleton-line { height: 12px; margin-bottom: 10px; }
.bd-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--bd-line-2); border-top-color: var(--bd-brand); animation: bd-spin .7s linear infinite; display: inline-block; }
.bd-loading-mask { position: absolute; inset: 0; display: grid; place-items: center; gap: 10px; background: color-mix(in srgb, var(--bd-bg) 55%, transparent); backdrop-filter: blur(3px); z-index: 5; border-radius: inherit; }
.bd-loading-mask[hidden] { display: none; }

/* ---------- 11. Toast / alert ---------- */
.bd-toasts { position: fixed; z-index: 900; top: 18px; right: 18px; display: grid; gap: 10px; width: min(360px, calc(100vw - 28px)); }
.bd-toast {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px;
  background: var(--bd-surface-solid); border: 1px solid var(--bd-line-2); border-left-width: 3px;
  border-radius: var(--bd-r-md); box-shadow: var(--bd-shadow-lg); font-size: 13.5px;
  animation: bd-toast-in var(--bd-3) var(--bd-ease);
}
.bd-toast.is-out { animation: bd-toast-out var(--bd-2) var(--bd-ease) forwards; }
.bd-toast .bd-ico { margin-top: 1px; }
.bd-toast-ok { border-left-color: var(--bd-ok); } .bd-toast-ok .bd-ico { color: var(--bd-ok); }
.bd-toast-err { border-left-color: var(--bd-err); } .bd-toast-err .bd-ico { color: var(--bd-err); }
.bd-toast-warn { border-left-color: var(--bd-warn); } .bd-toast-warn .bd-ico { color: var(--bd-warn); }
.bd-toast-info { border-left-color: var(--bd-info); } .bd-toast-info .bd-ico { color: var(--bd-info); }
@keyframes bd-toast-in { from { opacity: 0; transform: translateX(28px) scale(.96); } }
@keyframes bd-toast-out { to { opacity: 0; transform: translateX(28px) scale(.96); } }
.bd-alert {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--bd-r-md); font-size: 13.5px;
  border: 1px solid var(--bd-line); background: var(--bd-surface-2); margin-bottom: 16px;
}
.bd-alert .bd-ico { flex: 0 0 auto; margin-top: 2px; }
.bd-alert-info { background: rgba(76, 154, 255, .1); border-color: rgba(76, 154, 255, .28); }
.bd-alert-info .bd-ico { color: var(--bd-info); }
.bd-alert-warn { background: var(--bd-gold-soft); border-color: rgba(255, 176, 32, .3); }
.bd-alert-warn .bd-ico { color: var(--bd-warn); }
.bd-alert-err { background: rgba(255, 92, 122, .1); border-color: rgba(255, 92, 122, .3); }
.bd-alert-err .bd-ico { color: var(--bd-err); }
.bd-alert-ok { background: rgba(46, 212, 122, .1); border-color: rgba(46, 212, 122, .3); }
.bd-alert-ok .bd-ico { color: var(--bd-ok); }
.bd-alert-body { min-width: 0; }
.bd-alert-x {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  color: var(--bd-text-3); background: transparent; border: 0; transition: all var(--bd-1) var(--bd-ease);
}
.bd-alert-x:hover { color: var(--bd-text); background: var(--bd-surface-solid); }
.bd-alert-title { font-weight: 650; margin-bottom: 3px; }

/* ---------- 12. Modal / drawer / tooltip ---------- */
.bd-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; visibility: hidden; }
.bd-modal.is-open { visibility: visible; }
.bd-modal-mask { position: absolute; inset: 0; background: var(--bd-scrim); backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--bd-2) var(--bd-ease); }
.bd-modal.is-open .bd-modal-mask { opacity: 1; }
.bd-modal-panel {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--bd-surface-solid); border: 1px solid var(--bd-line-2); border-radius: var(--bd-r-lg);
  box-shadow: var(--bd-shadow-lg); transform: translateY(14px) scale(.97); opacity: 0;
  transition: all var(--bd-3) var(--bd-ease);
}
.bd-modal.is-open .bd-modal-panel { transform: none; opacity: 1; }
.bd-modal-sm .bd-modal-panel { width: min(420px, 100%); }
.bd-modal-lg .bd-modal-panel { width: min(820px, 100%); }
.bd-modal-xl .bd-modal-panel { width: min(1080px, 100%); }
.bd-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--bd-line); }
.bd-modal-title { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.bd-modal-body { padding: 22px; overflow-y: auto; }
.bd-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--bd-line); background: var(--bd-surface-2); flex-wrap: wrap; }
body.is-modal-open { overflow: hidden; }

.bd-drawer {
  position: fixed; z-index: 210; top: 0; bottom: 0; left: 0; width: min(320px, 86vw);
  background: var(--bd-surface-solid); border-right: 1px solid var(--bd-line-2);
  transform: translateX(-102%); transition: transform var(--bd-3) var(--bd-ease);
  display: flex; flex-direction: column; box-shadow: var(--bd-shadow-lg);
}
.bd-drawer.is-open { transform: none; }
.bd-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--bd-line); }
.bd-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 12px; }

.bd-tip { position: relative; }
.bd-tip::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  padding: 6px 10px; border-radius: 8px; background: var(--bd-surface-solid); color: var(--bd-text);
  border: 1px solid var(--bd-line-2); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: all var(--bd-2) var(--bd-ease); z-index: 30; box-shadow: var(--bd-shadow);
}
.bd-tip:hover::after { opacity: 1; transform: translateX(-50%); }

/* ---------- 13. Tabs / accordion / steps ---------- */
.bd-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--bd-line); overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.bd-tabs::-webkit-scrollbar { display: none; }
.bd-tab {
  position: relative; padding: 11px 16px; font-size: 13.5px; font-weight: 600; color: var(--bd-text-3);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; transition: color var(--bd-1);
}
.bd-tab:hover { color: var(--bd-text); }
.bd-tab.is-active { color: var(--bd-brand); }
.bd-tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--bd-brand); box-shadow: 0 0 10px var(--bd-brand); }
.bd-tab-count { font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--bd-surface-2); color: var(--bd-text-3); }
.bd-tab.is-active .bd-tab-count { background: var(--bd-brand-soft); color: var(--bd-brand); }
.bd-tab-panel[hidden] { display: none; }
.bd-tabs-pill { border: 0; gap: 6px; }
.bd-tabs-pill .bd-tab { border-radius: 10px; padding: 8px 14px; background: var(--bd-surface-2); border: 1px solid var(--bd-line); }
.bd-tabs-pill .bd-tab::after { display: none; }
.bd-tabs-pill .bd-tab.is-active { background: var(--bd-brand-soft); border-color: var(--bd-brand); }

.bd-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 24px; overflow-x: auto; padding-bottom: 4px; }
.bd-step { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--bd-text-3); white-space: nowrap; }
.bd-step-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--bd-surface-2); border: 1px solid var(--bd-line-2); color: var(--bd-text-3); }
.bd-step.is-active { color: var(--bd-text); font-weight: 600; }
.bd-step.is-active .bd-step-num { background: var(--bd-brand); border-color: var(--bd-brand); color: #04121c; box-shadow: 0 0 0 4px var(--bd-brand-soft); }
.bd-step.is-done { color: var(--bd-ok); }
.bd-step.is-done .bd-step-num { background: rgba(46, 212, 122, .15); border-color: var(--bd-ok); color: var(--bd-ok); }
.bd-step-line { width: 34px; height: 1px; background: var(--bd-line-2); flex: 0 0 auto; }

.bd-acc { border: 1px solid var(--bd-line); border-radius: var(--bd-r-md); overflow: hidden; background: var(--bd-surface); }
.bd-acc-item + .bd-acc-item { border-top: 1px solid var(--bd-line); }
.bd-acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; width: 100%; text-align: left; font-weight: 600; font-size: 14px; }
.bd-acc-head:hover { background: var(--bd-surface-2); }
.bd-acc-head .bd-ico { color: var(--bd-text-3); transition: transform var(--bd-2); }
.bd-acc-item.is-open .bd-acc-head .bd-ico { transform: rotate(180deg); color: var(--bd-brand); }
.bd-acc-body { display: none; padding: 0 18px 18px; font-size: 13.5px; color: var(--bd-text-2); }
.bd-acc-item.is-open .bd-acc-body { display: block; }

/* ---------- 14. Desc list / timeline / kv ---------- */
.bd-desc { display: grid; gap: 0; }
.bd-desc-cols { display: grid; gap: 0 24px; }
.bd-desc-item { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--bd-line); align-items: baseline; }
.bd-desc-item:last-child { border-bottom: 0; }
.bd-desc-label { font-size: 12.5px; color: var(--bd-text-3); }
.bd-desc-value { font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.bd-desc-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.bd-desc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
.bd-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--bd-line); font-size: 13px; }
.bd-kv:last-child { border-bottom: 0; }
.bd-kv > span:first-child { color: var(--bd-text-3); }

.bd-timeline { position: relative; padding-left: 22px; }
.bd-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--bd-line-2); }
.bd-timeline-item { position: relative; padding-bottom: 18px; }
.bd-timeline-item:last-child { padding-bottom: 0; }
.bd-timeline-item::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bd-surface-solid); border: 2px solid var(--bd-line-2);
}
.bd-timeline-item.is-active::before { border-color: var(--bd-brand); box-shadow: 0 0 0 4px var(--bd-brand-soft); }
.bd-timeline-item.is-ok::before { border-color: var(--bd-ok); }
.bd-timeline-time { font-size: 11.5px; color: var(--bd-text-3); }

.bd-progress { height: 7px; border-radius: 999px; background: var(--bd-surface-2); overflow: hidden; border: 1px solid var(--bd-line); }
.bd-progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--bd-brand-2), var(--bd-brand)); transition: width var(--bd-3) var(--bd-ease); }
.bd-progress.is-warn .bd-progress-bar { background: linear-gradient(90deg, #ff9500, var(--bd-gold)); }
.bd-progress.is-err .bd-progress-bar { background: linear-gradient(90deg, #e63b5c, var(--bd-err)); }

.bd-meter { display: grid; gap: 6px; }
.bd-meter-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--bd-text-3); }

/* ---------- 15. Pager ---------- */
.bd-pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--bd-line); background: var(--bd-surface-2); }
.bd-pageinfo { font-size: 12.5px; color: var(--bd-text-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* $Pages 由后端渲染，标记形式未知（扁平 a / ul>li>a 都可能），故做成两种都兼容 */
.bd-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.bd-pages ul, .bd-pages ol { display: contents; list-style: none; margin: 0; padding: 0; }
.bd-pages li { display: contents; list-style: none; }
.bd-pages a, .bd-pages span, .bd-pages li > * {
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: 9px; display: inline-grid; place-items: center;
  font-size: 13px; font-weight: 600; color: var(--bd-text-2); border: 1px solid transparent;
}
.bd-pages a:hover { background: var(--bd-surface-solid); border-color: var(--bd-line-2); color: var(--bd-brand); }
.bd-pages .is-active, .bd-pages .active, .bd-pages .current,
.bd-pages li.active > *, .bd-pages .page-item.active > * {
  background: var(--bd-brand); color: #04121c !important; border-color: var(--bd-brand);
}
.bd-pages .is-disabled, .bd-pages .disabled, .bd-pages .page-not-link,
.bd-pages li.disabled > *, .bd-pages .page-item.disabled > * {
  opacity: .4; pointer-events: none;
}
.bd-pages .page-ellipsis, .bd-pages .ellipsis { color: var(--bd-text-3); }

/* ---------- 16. Content / markdown ---------- */
.bd-content { font-size: 14.5px; line-height: 1.78; color: var(--bd-text-2); overflow-wrap: anywhere; }
.bd-content > :first-child { margin-top: 0; }
.bd-content h1, .bd-content h2, .bd-content h3, .bd-content h4 { color: var(--bd-text); margin: 26px 0 12px; }
.bd-content h2 { padding-bottom: 8px; border-bottom: 1px solid var(--bd-line); font-size: 19px; }
.bd-content h3 { font-size: 16.5px; }
.bd-content p { margin: 0 0 14px; }
.bd-content ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.bd-content ol { list-style: decimal; padding-left: 22px; margin-bottom: 14px; }
.bd-content li { margin-bottom: 6px; }
.bd-content a { color: var(--bd-brand); font-weight: 500; }
.bd-content a:hover { text-decoration: underline; }
.bd-content img { border-radius: var(--bd-r-md); margin: 14px 0; border: 1px solid var(--bd-line); }
.bd-content code { background: var(--bd-surface-2); border: 1px solid var(--bd-line); padding: 1px 6px; border-radius: 6px; font-size: .89em; color: var(--bd-gold); }
.bd-content pre { background: var(--bd-bg-2); border: 1px solid var(--bd-line); border-radius: var(--bd-r-md); padding: 16px; overflow-x: auto; margin: 0 0 16px; }
.bd-content pre code { background: none; border: 0; padding: 0; color: var(--bd-text); }
.bd-content blockquote { margin: 0 0 16px; padding: 12px 18px; border-left: 3px solid var(--bd-brand); background: var(--bd-brand-soft); border-radius: 0 var(--bd-r-sm) var(--bd-r-sm) 0; color: var(--bd-text-2); }
.bd-content table { min-width: 0; margin-bottom: 16px; display: block; overflow-x: auto; }
.bd-content th, .bd-content td { border: 1px solid var(--bd-line); padding: 9px 13px; }
.bd-content hr { margin: 24px 0; }
.bd-code { display: block; padding: 13px 15px; border-radius: var(--bd-r-md); background: var(--bd-bg-2); border: 1px solid var(--bd-line); font-size: 12.5px; overflow-x: auto; white-space: pre; color: var(--bd-text-2); }

/* ---------- 17. Misc blocks ---------- */
.bd-product-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.bd-product-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(140deg, var(--bd-brand-soft), rgba(124, 92, 255, .14)); color: var(--bd-brand); border: 1px solid var(--bd-line); }
.bd-product-icon img, .bd-product-icon svg { width: 26px; height: 26px; }
.bd-price { font-size: 25px; font-weight: 700; letter-spacing: -.03em; color: var(--bd-text); font-variant-numeric: tabular-nums; }
.bd-price small { font-size: 12.5px; font-weight: 500; color: var(--bd-text-3); margin-left: 3px; }
.bd-price-old { font-size: 13px; color: var(--bd-text-3); text-decoration: line-through; }
.bd-feature { display: flex; gap: 10px; font-size: 13px; color: var(--bd-text-2); }
.bd-feature .bd-ico { color: var(--bd-ok); flex: 0 0 auto; margin-top: 3px; }
.bd-tile {
  display: flex; align-items: center; gap: 13px; padding: 15px 17px; border-radius: var(--bd-r-md);
  border: 1px solid var(--bd-line); background: var(--bd-surface); transition: all var(--bd-2) var(--bd-ease);
}
.bd-tile:hover { border-color: var(--bd-brand); background: var(--bd-brand-soft); transform: translateY(-2px); }
.bd-tile-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--bd-surface-2); color: var(--bd-brand); flex: 0 0 auto; border: 1px solid var(--bd-line); }
.bd-copy-line { display: flex; align-items: center; gap: 8px; font-family: var(--bd-mono); font-size: 12.5px; }
.bd-copy-line span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bd-os-icon { width: 22px; height: 22px; object-fit: contain; display: inline-block; vertical-align: -4px; }
.bd-pay-opt {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px; border-radius: var(--bd-r-md);
  border: 1.6px solid var(--bd-line); background: var(--bd-surface-2); cursor: pointer; transition: all var(--bd-1) var(--bd-ease);
}
.bd-pay-opt:hover { border-color: var(--bd-line-2); }
.bd-pay-opt.is-active { border-color: var(--bd-brand); background: var(--bd-brand-soft); box-shadow: 0 0 0 3px var(--bd-brand-soft); }
.bd-pay-opt input { position: absolute; opacity: 0; }
.bd-pay-opt img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.bd-cycle-opt { text-align: center; padding: 14px 10px; border-radius: var(--bd-r-md); border: 1.6px solid var(--bd-line); background: var(--bd-surface-2); cursor: pointer; transition: all var(--bd-1) var(--bd-ease); position: relative; }
.bd-cycle-opt:hover { border-color: var(--bd-line-2); transform: translateY(-2px); }
.bd-cycle-opt.is-active { border-color: var(--bd-brand); background: var(--bd-brand-soft); }
.bd-cycle-name { font-size: 13px; font-weight: 600; }
.bd-cycle-price { font-size: 18px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.bd-cycle-save { position: absolute; top: -8px; right: 8px; padding: 1px 7px; border-radius: 999px; background: var(--bd-gold); color: #2b1800; font-size: 10.5px; font-weight: 700; }
.bd-stripe { background: repeating-linear-gradient(45deg, var(--bd-surface-2), var(--bd-surface-2) 10px, var(--bd-surface) 10px, var(--bd-surface) 20px); }
.bd-iframe { width: 100%; min-height: 460px; border: 1px solid var(--bd-line); border-radius: var(--bd-r-md); background: var(--bd-surface-solid); }
.bd-chart-box { width: 100%; height: 260px; }

/* Footer */
.bd-footer { padding: 22px clamp(14px, 3vw, 34px); border-top: 1px solid var(--bd-line); color: var(--bd-text-3); font-size: 12.5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: color-mix(in srgb, var(--bd-bg-2) 60%, transparent); }
.bd-footer a { color: var(--bd-text-3); }
.bd-footer a:hover { color: var(--bd-brand); }

/* ---------- 18. Auth pages ---------- */
.bd-standalone { min-height: 100vh; display: flex; flex-direction: column; }
.bd-auth-head + .bd-standalone { min-height: calc(100vh - 54px); }
.bd-standalone > .bd-auth { flex: 1 1 auto; min-height: 0; }
.bd-auth-foot { padding: 16px clamp(14px, 3vw, 34px); border-top: 1px solid var(--bd-line); background: color-mix(in srgb, var(--bd-bg-2) 60%, transparent); }
.bd-auth-foot a { color: var(--bd-text-3); }
.bd-auth-foot a:hover { color: var(--bd-brand); }
.bd-auth-head { padding: 12px clamp(14px, 3vw, 34px) 0; font-size: 12.5px; color: var(--bd-text-3); }
.bd-auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.bd-auth-visual {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 4vw, 54px);
  background: linear-gradient(155deg, #071429, #0d2350 55%, #14245c);
  color: #e8eefc;
}
.bd-auth-visual::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 340px at 78% 12%, rgba(62, 208, 245, .3), transparent 62%),
    radial-gradient(520px 300px at 12% 88%, rgba(124, 92, 255, .28), transparent 60%);
}
.bd-auth-visual::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(1.6px 1.6px at 22% 32%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 68% 18%, #9fe9ff, transparent),
    radial-gradient(1.8px 1.8px at 84% 62%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 42% 74%, #ffd37a, transparent),
    radial-gradient(1.4px 1.4px at 12% 58%, #fff, transparent),
    radial-gradient(1px 1px at 56% 44%, #c8f5ff, transparent);
}
.bd-auth-visual > * { position: relative; z-index: 1; }
.bd-auth-slogan { font-size: clamp(24px, 3.1vw, 38px); font-weight: 700; line-height: 1.28; letter-spacing: -.02em; }
.bd-auth-points { display: grid; gap: 11px; margin-top: 22px; }
.bd-auth-point { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: rgba(232, 238, 252, .82); }
.bd-auth-point .bd-ico { color: var(--bd-brand); }
.bd-auth-form { display: grid; place-items: center; padding: clamp(22px, 4vw, 44px); background: var(--bd-bg); }
.bd-auth-box { width: min(430px, 100%); }
.bd-auth-tabs { display: flex; gap: 6px; padding: 5px; background: var(--bd-surface-2); border: 1px solid var(--bd-line); border-radius: 13px; margin-bottom: 22px; }
.bd-auth-tabs .bd-tab { flex: 1 1 0; justify-content: center; padding: 9px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--bd-text-3); border: 0; background: transparent; }
.bd-auth-tabs .bd-tab::after { display: none; }
.bd-auth-tabs .bd-tab.is-active { background: var(--bd-surface-solid); color: var(--bd-brand); box-shadow: var(--bd-shadow); }
.bd-phone-switch { opacity: .55; color: var(--bd-brand); transition: opacity var(--bd-1) var(--bd-ease); }
.bd-phone-switch.is-active { opacity: 1; font-weight: 650; }
.bd-auth-title { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.bd-auth-sub { font-size: 13.5px; color: var(--bd-text-3); margin: 6px 0 24px; }
.bd-oauth { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.bd-oauth-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--bd-line); background: var(--bd-surface-2); transition: all var(--bd-1) var(--bd-ease); }
.bd-oauth-btn:hover { border-color: var(--bd-brand); background: var(--bd-brand-soft); transform: translateY(-2px); }
.bd-oauth-btn img { width: 22px; height: 22px; object-fit: contain; }
.bd-sep { display: flex; align-items: center; gap: 12px; color: var(--bd-text-3); font-size: 12px; margin: 20px 0; }
.bd-sep::before, .bd-sep::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--bd-line); }
.bd-code-btn { white-space: nowrap; min-width: 108px; }

/* ---------- 19. Print ---------- */
@media print {
  body::before, .bd-side, .bd-topbar, .bd-footer, .bd-tabbar, .bd-toasts, .bd-pager, .bd-no-print { display: none !important; }
  .bd-main { padding-top: 0 !important; }
  .bd-card { box-shadow: none !important; border: 1px solid #d5dae6 !important; break-inside: avoid; }
  .bd-container { max-width: none !important; padding: 0 !important; }
  :root, html[data-bd-theme="dark"], html[data-bd-theme="light"] { --bd-bg: #fff; --bd-surface: #fff; --bd-surface-2: #f7f8fb; --bd-text: #10182b; --bd-text-2: #3a465c; --bd-text-3: #6d7a91; --bd-line: #dfe3ec; --bd-line-2: #c9d0de; }
}

/* ---------- 20. Responsive ---------- */
@media (max-width: 1279px) {
  :root { --bd-side-w: 224px; }
  .bd-grid-side { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 1199px) {
  .bd-side { transform: translateX(-102%); transition: transform var(--bd-3) var(--bd-ease); width: 272px; box-shadow: var(--bd-shadow-lg); }
  body.is-nav-open .bd-side { transform: none; }
  .bd-menu-btn { display: grid; }
  .bd-grid-side { grid-template-columns: minmax(0, 1fr); }
  .bd-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-auth { grid-template-columns: 1fr; }
  .bd-auth-visual { display: none; }
}
@media (max-width: 900px) {
  .bd-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-desc-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  :root { --bd-top-h: 58px; }
  body { font-size: 13.5px; }
  .bd-container { padding: 16px 14px 96px; }
  .bd-main { padding-bottom: env(safe-area-inset-bottom); }
  .bd-grid, .bd-grid-2, .bd-grid-3, .bd-grid-4, .bd-grid-auto, .bd-form-row, .bd-form-row-3,
  .bd-desc-cols-2, .bd-desc-cols-3 { grid-template-columns: minmax(0, 1fr); }
  .bd-span-2 { grid-column: span 1; }
  .bd-tabbar { display: block; }
  .bd-page-title { font-size: 19px; }
  .bd-stat-value { font-size: 23px; }
  .bd-card-head, .bd-card-body, .bd-card-foot { padding-left: 16px; padding-right: 16px; }
  .bd-desc-item { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 9px 0; }
  .bd-toasts { top: auto; bottom: calc(74px + env(safe-area-inset-bottom)); right: 10px; left: 10px; width: auto; }
  .bd-modal { padding: 12px; align-items: flex-end; }
  .bd-modal-panel { max-height: 86vh; width: 100%; border-radius: var(--bd-r-lg) var(--bd-r-lg) 0 0; }
  .bd-table { font-size: 13px; }
  .bd-table th, .bd-table td { padding: 10px 12px; }
  .bd-hide-sm { display: none !important; }
  .bd-auth-form { padding: 20px 16px 40px; }
  .bd-footer { justify-content: center; text-align: center; }
}
@media (min-width: 768px) { .bd-only-sm { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
