:root {
  color-scheme: dark;
  --bg: #080b0b;
  --ink: #f2f7f5;
  --muted: #8d9a97;
  --panel: #111716;
  --panel-2: #161e1c;
  --line: #2a3533;
  --teal: #1ab0a5;
  --green: #27c47a;
  --red: #ff5e57;
  --amber: #e4a33f;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(26, 176, 165, 0.09), transparent 34%),
    linear-gradient(315deg, rgba(228, 163, 63, 0.06), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
select,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-height: 110px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1;
}

h2 {
  font-size: 18px;
}

.controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.topbarTools {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.navActions {
  position: relative;
  z-index: 1001;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  pointer-events: auto;
}

.navButton {
  position: relative;
  z-index: 1002;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 22, 0.9);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

.navButton.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.navActions button.navButton {
  width: auto;
  height: 38px;
}

.layoutPreviewPage {
  height: 100svh;
  overflow: hidden;
  background: #060909;
}

.layoutPreviewShell {
  height: 100svh;
  padding: 10px;
}

.goldenPreviewStage {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #090d0c;
}

.goldenPreviewStage:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  background: #060909;
}

.layoutPreviewControls {
  position: absolute;
  z-index: 10;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.layoutPreviewIconButton {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(242, 247, 245, 0.64);
  cursor: pointer;
}

.layoutPreviewIconButton:hover,
.layoutPreviewIconButton[aria-expanded="true"] {
  background: transparent;
  color: var(--teal);
}

.layoutPreviewIconButton:disabled {
  cursor: wait;
  opacity: 0.58;
}

.layoutPreviewIconButton svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layoutRefreshButton.isRefreshing svg {
  animation: layoutRefreshSpin 0.85s linear infinite;
}

@keyframes layoutRefreshSpin {
  to {
    transform: rotate(360deg);
  }
}

.goldenFullscreenButton .minimizeIcon,
.goldenFullscreenButton.isFullscreen .maximizeIcon {
  display: none;
}

.goldenFullscreenButton.isFullscreen .minimizeIcon {
  display: block;
}

.layoutPreviewMenu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 170px;
  overflow: hidden;
  border: 1px solid rgba(242, 247, 245, 0.16);
  border-radius: 7px;
  background: rgba(10, 15, 14, 0.97);
  box-shadow: var(--shadow);
}

.layoutPreviewMenu[hidden] {
  display: none;
}

.layoutPreviewMenu a,
.layoutPreviewMenu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.layoutPreviewMenu a + a,
.layoutPreviewMenu button {
  border-top: 1px solid rgba(242, 247, 245, 0.09);
}

.layoutPreviewMenu a:hover,
.layoutPreviewMenu button:hover {
  background: rgba(26, 176, 165, 0.12);
  color: var(--teal);
}

.layoutPreviewMenu a[aria-current="page"] {
  color: var(--teal);
}

.pageMenuControls {
  position: relative;
  z-index: 1002;
  display: flex;
  justify-content: flex-end;
}

.pageMenuControls .layoutPreviewIconButton {
  width: 42px;
  min-width: 42px;
}

.pageMenuControls .layoutPreviewMenu {
  top: calc(100% + 8px);
}

.goldenPreviewFrame {
  --golden-gap: clamp(8px, 0.8vw, 12px);
  --golden-half-gap: calc(var(--golden-gap) / 2);
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0f0e;
}

.goldenPreviewFrame > div,
.goldenPreviewFrame .goldenZone,
.goldenPreviewFrame .goldenUpper,
.goldenPreviewFrame .goldenDetail,
.goldenPreviewFrame .goldenDetailLower {
  position: absolute;
}

.goldenZone {
  overflow: visible;
  border: 1px solid #34413f;
  border-radius: 6px;
  background: rgba(26, 176, 165, 0.035);
}

.goldenZone > span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(242, 247, 245, 0.2);
  border-radius: 50%;
  background: rgba(8, 11, 11, 0.54);
  color: rgba(242, 247, 245, 0.86);
  font-size: 18px;
  font-weight: 800;
}

.goldenMain {
  inset: 0 0 0 calc(38.2% + var(--golden-half-gap));
  container-type: size;
  background: rgba(26, 176, 165, 0.075);
}

.regionOneWorkspace {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 12px;
  height: 100%;
  padding: 14px;
  overflow: hidden;
}

.regionOneSection {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.regionOneSectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.regionOneSectionHeader h2 {
  margin: 0;
  font-size: 16px;
}

.regionOneSectionHeader p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.regionStrategyGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, 137px);
  align-content: start;
  gap: 8px;
  min-height: 0;
}

.regionStrategyGrid article {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  height: 137px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(242, 247, 245, 0.09);
  border-radius: 8px;
  background: rgba(22, 30, 28, 0.72);
}

.regionStrategyGrid article > div,
.regionRobotGrid article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.regionStrategyGrid strong,
.regionRobotGrid strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.regionStrategyGrid strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.regionStrategyGrid .regionStatus {
  padding: 4px 8px;
  font-size: 12px;
}

.regionStrategyGrid p,
.regionRobotGrid p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.regionStrategyDetails,
.regionRobotDetails {
  display: grid;
  min-width: 0;
  margin: 0;
}

.regionStrategyDetails {
  gap: 8px;
}

.regionStrategyDetails > div,
.regionRobotDetails > div {
  min-width: 0;
}

.regionStrategyDetails dt,
.regionRobotDetails dt {
  flex: 0 0 auto;
  overflow: hidden;
  color: rgba(159, 171, 167, 0.76);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.regionStrategyDetails dd,
.regionRobotDetails dd {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.regionStrategyDetails > div,
.regionRobotDetails > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.regionStatus {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.regionStatus.live {
  background: rgba(39, 196, 122, 0.12);
  color: var(--green);
}

.regionStatus.watch {
  background: rgba(228, 163, 63, 0.13);
  color: var(--amber);
}

.regionStatus.paused {
  background: rgba(255, 94, 87, 0.12);
  color: var(--red);
}

.regionRobotGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 111px;
  align-content: start;
  gap: 8px;
  min-height: 0;
}

.regionRobotGrid article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: start;
  height: 111px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(242, 247, 245, 0.09);
  border-radius: 8px;
  background: rgba(22, 30, 28, 0.72);
}

.regionRobotGrid article > div:first-child {
  min-width: 0;
  margin-right: auto;
}

.regionRobotContent {
  display: grid;
  align-content: center;
  gap: 12px;
}

.regionRobotContent > strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.regionRobotDetails {
  gap: 8px;
}

.regionRobotDetails > div {
  gap: 8px;
}

.regionRobotDetails dd {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.35;
  text-align: right;
  text-overflow: clip;
  white-space: normal;
}

@container (max-width: 620px) {
  .regionOneWorkspace {
    grid-template-rows: auto auto;
    align-content: start;
    gap: 8px;
    padding: 8px;
  }

  .regionOneSection {
    gap: 8px;
  }

  .regionStrategyGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 137px);
    gap: 5px;
  }

  .regionStrategyGrid article {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
  }

  .regionStrategyGrid article > div {
    min-width: 0;
  }

  .regionStrategyDetails dt,
  .regionRobotDetails dt {
    font-size: 13px;
  }

  .regionStrategyDetails dd,
  .regionRobotDetails dd {
    font-size: 13px;
  }

  .regionRobotGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 111px;
    gap: 5px;
  }

  .regionRobotGrid article {
    padding: 14px;
  }

  .regionRobotContent {
    gap: 12px;
  }
}

.goldenLeft {
  inset: 0 61.8% 0 0;
}

.goldenLower {
  inset: calc(38.2% + var(--golden-half-gap)) var(--golden-half-gap) 0 0;
  background: rgba(228, 163, 63, 0.045);
}

.homeAssetsRegion {
  display: grid;
  grid-template-rows: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  container-type: size;
  background: rgba(26, 176, 165, 0.045);
}

.homeAssetBlock {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.homeBitcoinBlock {
  display: grid;
  grid-template-rows: auto 68px minmax(0, 1fr);
  gap: 6px;
}

.homeFutuBlock {
  display: grid;
  grid-template-rows: auto 48px minmax(0, 1fr);
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(242, 247, 245, 0.11);
}

.homeAssetHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.homeAssetHeader > div:first-child {
  min-width: 0;
}

.homeAssetHeader h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(13px, 1.25cqw, 17px);
  line-height: 1.1;
}

.homeAssetHeader p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(9px, 0.82cqw, 11px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homePeriodTabs {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

.homePeriodTabs button {
  width: auto;
  min-width: 0;
  height: 24px;
  padding: 0 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.homePeriodTabs button.active {
  background: rgba(26, 176, 165, 0.18);
  color: #5fd8cf;
}

.homeBitcoinHero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(26, 176, 165, 0.3);
  border-radius: 5px;
  background: rgba(26, 176, 165, 0.07);
}

.homeBitcoinTotal {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 6px 8px;
}

.homeBitcoinTotal > span,
.homeFutuTotal span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.homeBitcoinTotal > strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--teal);
  font-size: clamp(18px, 2.1cqw, 27px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homeBitcoinTotal > div {
  display: flex;
  gap: 8px;
  min-width: 0;
  margin-top: 6px;
}

.homeBitcoinTotal b {
  overflow: hidden;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homeBitcoinChartWrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid rgba(26, 176, 165, 0.18);
  background: rgba(6, 12, 11, 0.22);
}

#homeBtcHistoryChart {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

#homeBtcChartEmpty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.homeAssetTable {
  min-height: 0;
  overflow: hidden;
}

.homeBitcoinTableHead,
.homeBitcoinRow {
  display: grid;
  grid-template-columns: 0.55fr 0.7fr 1.08fr 1.1fr 0.72fr;
  gap: 5px;
  align-items: center;
  min-width: 0;
}

.homeBitcoinTableHead {
  min-height: 20px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.homeBitcoinRows {
  display: grid;
  align-content: start;
  gap: 3px;
  height: calc(100% - 20px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.homeBitcoinRow {
  min-height: 27px;
  padding: 0 6px;
  border: 1px solid rgba(242, 247, 245, 0.1);
  border-radius: 4px;
  background: rgba(242, 247, 245, 0.025);
  font-variant-numeric: tabular-nums;
}

.homeBitcoinRow strong,
.homeBitcoinRow span,
.homeBitcoinRow b {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homeBitcoinRow b {
  font-weight: 800;
}

.homeBitcoinRow .unavailable,
.homeBitcoinTotal .unavailable {
  color: var(--muted);
}

.homeFutuRefresh {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.homeFutuRefresh:hover {
  color: var(--teal);
}

.homeFutuRefresh svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.homeFutuRefresh.isRefreshing svg {
  animation: layoutRefreshSpin 0.85s linear infinite;
}

.homeFutuSummary {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.58fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(26, 176, 165, 0.25);
  border-radius: 5px;
  background: rgba(26, 176, 165, 0.055);
}

.homeFutuTotal {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 5px 7px;
}

.homeFutuTotal strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--teal);
  font-size: clamp(15px, 1.65cqw, 21px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homeFutuMetrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
}

.homeFutuMetrics div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding-left: 7px;
  border-left: 1px solid rgba(242, 247, 245, 0.07);
}

.homeFutuMetrics dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.homeFutuMetrics dd {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homeFutuRows {
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid rgba(242, 247, 245, 0.07);
  scrollbar-width: thin;
}

.homeFutuRow {
  display: grid;
  grid-template-columns: 0.8fr 0.45fr 1.25fr;
  gap: 6px;
  align-items: center;
  min-height: 27px;
  margin-top: 3px;
  padding: 0 6px;
  border: 1px solid rgba(242, 247, 245, 0.1);
  border-radius: 4px;
  background: rgba(242, 247, 245, 0.025);
}

.homeFutuRow strong,
.homeFutuRow span,
.homeFutuRow b {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homeFutuRow b {
  text-align: right;
}

.homeFutuEmpty {
  display: grid;
  height: 100%;
  place-items: center;
  margin-top: 3px;
  border: 1px solid rgba(242, 247, 245, 0.08);
  border-radius: 4px;
  background: rgba(242, 247, 245, 0.018);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.goldenUpper {
  inset: 0 0 61.8%;
}

.goldenUpperMain {
  inset: 0 calc(38.2% + var(--golden-half-gap)) var(--golden-half-gap) 0;
  background: rgba(39, 196, 122, 0.05);
}

.btcKlineRegion {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 11px 10px 8px;
  overflow: hidden;
}

.btcKlineHeader {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.btcKlineTitleLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.btcKlineToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.btcKlineTitleLine h2 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.btcKlineTitleLine h2 small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.btcKlineStatus {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.btcKlineStatus i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.btcKlineStatus[data-state="live"] {
  color: var(--green);
}

.btcKlineStatus[data-state="live"] i {
  background: var(--green);
  box-shadow: 0 0 8px rgba(39, 196, 122, 0.54);
}

.btcKlineStatus[data-state="polling"],
.btcKlineStatus[data-state="loading"] {
  color: var(--amber);
}

.btcKlineStatus[data-state="polling"] i,
.btcKlineStatus[data-state="loading"] i {
  background: var(--amber);
}

.btcKlineStatus[data-state="error"] {
  color: var(--red);
}

.btcKlineStatus[data-state="error"] i {
  background: var(--red);
}

.btcKlineToolbar > strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btcKlinePeriods {
  display: grid;
  flex: 0 0 min(64%, 172px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 2px;
  width: min(64%, 172px);
  padding: 2px;
  border-radius: 5px;
  background: rgba(242, 247, 245, 0.045);
}

.btcKlinePeriods button {
  display: grid;
  place-items: center;
  width: auto;
  min-width: 0;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.btcKlinePeriods button:hover,
.btcKlinePeriods button.active {
  background: rgba(26, 176, 165, 0.16);
  color: var(--teal);
}

.btcKlineChart {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.btcKlineChart[data-error]::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--red);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  content: attr(data-error);
}

.goldenDetail {
  inset: 0 0 0 61.8%;
}

.goldenDetailTop {
  inset: 0 var(--golden-half-gap) calc(38.2% + var(--golden-half-gap)) var(--golden-half-gap);
  background: rgba(26, 176, 165, 0.055);
}

.goldenDetailLower {
  inset: 61.8% 0 0;
}

.goldenDetailSmall {
  inset: var(--golden-half-gap) calc(61.8% + var(--golden-half-gap)) var(--golden-half-gap) var(--golden-half-gap);
  background: rgba(228, 163, 63, 0.055);
}

.goldenDetailSmall.hermesZone {
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 10, 9, 0.04) 30%, rgba(4, 10, 9, 0.94) 100%),
    url("./assets/hermes-avatar.png") center 35% / cover no-repeat;
}

.hermesZoneButton {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  padding: 7px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 3px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.hermesZoneButton:hover {
  border: 0;
  background: rgba(26, 176, 165, 0.08);
}

.hermesZoneIdentity {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.hermesZoneIdentity > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hermesZone .hermesConnectionState {
  gap: 3px;
}

.hermesZone .hermesConnectionState i {
  width: 5px;
  height: 5px;
}

.hermesZone .hermesConnectionState small,
.hermesZoneSummary {
  overflow: hidden;
  color: rgba(242, 247, 245, 0.7);
  font-size: 7px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hermesZoneSummary {
  display: block;
  max-width: 100%;
}

.goldenMicroCombined {
  inset: var(--golden-half-gap) var(--golden-half-gap) var(--golden-half-gap) calc(38.2% + var(--golden-half-gap));
  background: rgba(26, 176, 165, 0.065);
}

.assetAllocationRegion {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 7px;
  overflow: hidden;
}

.assetAllocationHeader {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.assetAllocationHeader h2 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(8px, 0.7vw, 11px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assetAllocationHeader span {
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(6px, 0.48vw, 8px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assetAllocationBody {
  display: grid;
  grid-template-columns: minmax(42px, 0.82fr) minmax(54px, 1.18fr);
  gap: 7px;
  min-width: 0;
  min-height: 0;
  align-items: center;
}

.assetAllocationDonut {
  position: relative;
  width: min(100%, 78px);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(rgba(141, 154, 151, 0.2) 0 100%);
  box-shadow: 0 0 16px rgba(26, 176, 165, 0.12);
}

.assetAllocationDonut::after {
  position: absolute;
  inset: 24%;
  border: 1px solid rgba(242, 247, 245, 0.08);
  border-radius: 50%;
  background: #071310;
  content: "";
}

.assetAllocationCenter {
  position: absolute;
  z-index: 1;
  inset: 25%;
  display: grid;
  min-width: 0;
  place-content: center;
  text-align: center;
}

.assetAllocationCenter strong {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(6px, 0.48vw, 8px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assetAllocationCenter span {
  margin-top: 2px;
  color: var(--muted);
  font-size: clamp(5px, 0.38vw, 7px);
  font-weight: 800;
  line-height: 1;
}

.assetAllocationLegend {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
}

.assetAllocationLegendItem {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.assetAllocationLegendItem i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--allocation-color);
  box-shadow: 0 0 7px color-mix(in srgb, var(--allocation-color) 55%, transparent);
}

.assetAllocationLegendItem span,
.assetAllocationLegendItem b,
.assetAllocationEmpty {
  overflow: hidden;
  font-size: clamp(6px, 0.48vw, 8px);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assetAllocationLegendItem span,
.assetAllocationEmpty {
  color: var(--muted);
}

.assetAllocationLegendItem b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.goldenDetailSmall > span,
.goldenMicroCombined > span {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .layoutPreviewShell {
    padding: 6px;
  }

  .layoutPreviewControls {
    top: 10px;
    right: 10px;
  }
}

.coverPage {
  min-height: 100svh;
  overflow: hidden;
  background: #050807;
}

.coverHero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: 34px clamp(24px, 6vw, 96px) 28px;
  isolation: isolate;
  background-image: url("./assets/bijiasuo-cover.png");
  background-position: center;
  background-size: cover;
}

.coverShade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(2, 6, 5, 0.36);
}

.coverHeader,
.coverFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.coverBrand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.coverBrand:hover,
.coverBrand:focus-visible {
  border: 0;
  background: transparent;
  color: var(--teal);
}

.coverBrandLogo {
  display: block;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  object-fit: cover;
}

.coverAccessState,
.coverFooter {
  color: rgba(242, 247, 245, 0.62);
  font-size: 11px;
  font-weight: 800;
}

.coverAccessState.active {
  color: var(--green);
}

.coverContent {
  align-self: center;
  width: min(640px, 100%);
  padding: 70px 0 40px;
}

.coverEyebrow,
.loginEyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.coverContent h1 {
  max-width: 100%;
  font-size: 92px;
  line-height: 1;
}

.coverTitleGroup {
  width: fit-content;
  max-width: 100%;
}

.coverTagline {
  width: fit-content;
  max-width: 100%;
}

.coverLead {
  margin-top: 20px;
  width: auto;
  color: rgba(242, 247, 245, 0.72);
  font-size: 22px;
  font-weight: 650;
  text-align: left;
  text-align-last: auto;
  white-space: nowrap;
}

.coverLeadEnglish {
  margin-top: 8px;
  width: auto;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  text-align-last: auto;
  white-space: nowrap;
}

.coverFooter {
  justify-content: flex-start;
  letter-spacing: 0;
}

.coverFooterLine {
  width: 72px;
  height: 1px;
  background: rgba(242, 247, 245, 0.32);
}

.loginDialog {
  width: min(460px, calc(100% - 32px));
  margin: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1413;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68);
}

.loginDialog::backdrop {
  background: rgba(2, 5, 4, 0.82);
  backdrop-filter: blur(8px);
}

.dialogCloseButton {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.loginDialog h2 {
  font-size: 28px;
}

.loginIntro {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.coverLoginForm {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.coverLoginForm input {
  height: 48px;
  background: var(--panel-2);
}

.loginMessage {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.loginMessage.error {
  color: var(--red);
}

.loginMessage.success {
  color: var(--green);
}

.loginSubmitButton {
  height: 48px;
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.loginSubmitButton:disabled {
  cursor: wait;
  opacity: 0.6;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
button,
input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

select {
  min-width: 132px;
  padding: 0 34px 0 12px;
}

button {
  padding: 0 15px;
  cursor: pointer;
  font-weight: 800;
}

.compactButton {
  height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

input {
  width: 100%;
  min-width: 92px;
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
}

button:hover,
select:hover,
input:hover,
input:focus {
  border-color: rgba(26, 176, 165, 0.7);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 16px;
}

.metrics article,
.dropLevels,
.walletPanel,
.futuBalancePanel,
.monitorPanel,
.chartPanel,
.sidePanel,
.positionPanel,
.tableSection {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 22, 0.94);
  box-shadow: var(--shadow);
}

.metrics article {
  min-height: 108px;
  padding: 18px;
}

.metrics span {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metrics strong {
  display: block;
  min-width: 0;
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.hermesDutyBar {
  display: flex;
  width: 100%;
  min-height: 64px;
  margin: 0 0 16px;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(26, 176, 165, 0.48);
  background: rgba(20, 35, 32, 0.94);
  text-align: left;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.hermesDutyBar:hover {
  border-color: var(--teal);
  background: rgba(24, 46, 42, 0.96);
}

.hermesDutyIdentity,
.hermesDutySummary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.hermesIdentityText {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.hermesDutyIdentity strong,
.hermesDutySummary strong {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.hermesDutyIdentity small,
.hermesDutySummary span {
  color: var(--muted);
  font-size: 12px;
}

.hermesConnectionState {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.hermesConnectionState i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(39, 196, 122, 0.12);
}

.hermesConnectionState.offline i {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 94, 87, 0.12);
}

.hermesConnectionState.offline small {
  color: var(--red);
}

.hermesDutySummary strong {
  color: var(--teal);
}

.hermesAvatar {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(26, 176, 165, 0.58);
  border-radius: 50%;
  background: #080b0b;
  object-fit: cover;
  object-position: 50% 28%;
}

.hermesDrawerBackdrop {
  position: fixed;
  z-index: 1998;
  inset: 0;
  background: rgba(2, 5, 4, 0.7);
  backdrop-filter: blur(3px);
}

.hermesDrawer {
  position: fixed;
  z-index: 1999;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  width: min(440px, 100%);
  height: 100dvh;
  padding: 16px;
  border-left: 1px solid var(--line);
  background: #0c1110;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.48);
  transform: translateX(102%);
  transition: transform 180ms ease;
}

.hermesDrawer.open {
  transform: translateX(0);
}

.layoutPreviewPage .hermesDrawerBackdrop {
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.layoutPreviewPage .hermesDrawer {
  top: var(--hermes-drawer-top, 10px);
  right: auto;
  left: var(--hermes-drawer-left, 10px);
  width: min(330px, calc(100vw - 20px));
  height: min(430px, calc(100dvh - 20px));
  padding: 12px;
  border: 1px solid rgba(26, 176, 165, 0.46);
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
  transform: translateY(8px) scale(0.98);
  transform-origin: top left;
}

.layoutPreviewPage .hermesDrawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.layoutPreviewPage .hermesSafetyNotice {
  margin: 8px 0;
  padding: 7px 9px;
  font-size: 10px;
}

.layoutPreviewPage .hermesMessage {
  padding: 8px 10px;
}

.layoutPreviewPage .hermesMessage p {
  font-size: 12px;
}

.layoutPreviewPage .hermesQuickPrompts {
  padding: 7px 0;
}

.layoutPreviewPage .hermesQuickPrompts button {
  height: 30px;
  font-size: 10px;
}

.layoutPreviewPage .hermesComposer textarea {
  min-height: 42px;
  font-size: 12px;
}

body.hermesDrawerOpen {
  overflow: hidden;
}

.hermesDrawerHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.hermesCloseButton {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.hermesSafetyNotice {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(26, 176, 165, 0.24);
  border-radius: 6px;
  background: rgba(26, 176, 165, 0.08);
  color: #c7d3d0;
  font-size: 12px;
}

.hermesMessages {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: 2px 2px 14px;
}

.hermesMessage {
  width: fit-content;
  max-width: 88%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}

.hermesMessage.user {
  justify-self: end;
  border-color: rgba(26, 176, 165, 0.5);
  background: rgba(26, 176, 165, 0.16);
}

.hermesMessage.pending {
  color: var(--muted);
}

.hermesMessage.error {
  border-color: rgba(255, 94, 87, 0.42);
  color: #ffaaa6;
}

.hermesMessage span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.hermesMessage p {
  color: inherit;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hermesQuickPrompts {
  display: flex;
  gap: 7px;
  padding: 10px 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.hermesQuickPrompts button {
  width: auto;
  height: 34px;
  flex: 0 0 auto;
  padding: 0 10px;
  background: transparent;
  color: #c7d3d0;
  font-size: 12px;
}

.hermesComposer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.hermesComposer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 130px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.hermesComposer textarea:focus {
  border-color: rgba(26, 176, 165, 0.7);
  outline: 2px solid rgba(26, 176, 165, 0.12);
}

.hermesComposer button {
  width: auto;
  height: auto;
  min-width: 66px;
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.hermesComposer button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

.hidden {
  display: none !important;
}

.walletPanel {
  margin-bottom: 16px;
  padding: 18px;
}

.futuBalancePanel {
  margin-bottom: 16px;
  padding: 18px;
}

#futuBalanceRefresh {
  width: auto;
  min-width: 72px;
  white-space: nowrap;
}

.futuBalanceHero {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(480px, 1.15fr);
  margin-bottom: 12px;
  border: 1px solid rgba(26, 176, 165, 0.38);
  border-radius: 8px;
  background: rgba(26, 176, 165, 0.08);
  overflow: hidden;
}

.futuTotalAsset {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 150px;
  padding: 24px;
}

.futuTotalAsset span,
.futuAssetMetrics span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.futuTotalAsset strong {
  color: var(--teal);
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.futuAssetMetrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid rgba(26, 176, 165, 0.24);
  background: rgba(6, 9, 9, 0.28);
}

.futuAssetMetrics > div {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: 20px;
}

.futuAssetMetrics > div + div {
  border-left: 1px solid rgba(26, 176, 165, 0.18);
}

.futuAssetMetrics strong {
  font-size: clamp(18px, 2vw, 27px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.futuBalanceTable {
  display: grid;
  gap: 10px;
  overflow-x: auto;
}

#futuAccountRows {
  display: grid;
  gap: 10px;
}

.futuBalanceTableHead,
.futuBalanceRow {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) minmax(70px, 0.45fr) repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: center;
  min-width: 920px;
}

.futuBalanceTableHead {
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.futuBalanceRow {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.futuBalanceRow strong,
.futuBalanceRow span {
  min-width: 0;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.futuBalanceEmpty {
  min-height: 80px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.btcTotalHero {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1.18fr);
  align-items: stretch;
  margin-bottom: 12px;
  border: 1px solid rgba(26, 176, 165, 0.38);
  border-radius: 8px;
  background: rgba(26, 176, 165, 0.1);
  overflow: hidden;
}

.btcTotalSummary {
  display: grid;
  align-content: center;
  min-width: 0;
}

.btcTotalBalance {
  display: grid;
  place-items: center;
  min-height: 110px;
  padding: 20px 18px;
  text-align: center;
}

.btcTotalBalance span,
.btcTotalPerformance span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.btcTotalBalance strong {
  color: var(--teal);
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.btcTotalPerformance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(26, 176, 165, 0.25);
  background: rgba(9, 13, 12, 0.64);
}

.btcInlineChart {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 14px 18px 12px;
  background: rgba(6, 9, 9, 0.28);
}

.btcTotalPerformance > div {
  display: grid;
  place-items: center;
  min-height: 74px;
  padding: 14px 18px;
  text-align: center;
}

.btcTotalPerformance > div + div {
  border-left: 1px solid rgba(26, 176, 165, 0.25);
}

.btcTotalPerformance strong {
  font-size: clamp(20px, 2.3vw, 30px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.btcTotalPerformance strong.unavailable {
  color: var(--muted);
  font-size: 16px;
}

.btcChartCanvasWrap {
  position: relative;
  width: 100%;
  height: 260px;
}

#btcBalanceChart {
  display: block;
  width: 100%;
  height: 260px;
  min-height: 0;
}

.btcChartEmpty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.walletTable {
  display: grid;
  gap: 10px;
  overflow-x: auto;
}

#walletRows {
  display: grid;
  gap: 10px;
}

.walletTableHead,
.walletTableRow {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(100px, 0.8fr) minmax(160px, 1.15fr) minmax(160px, 1.15fr) minmax(120px, 0.8fr);
  gap: 12px;
  align-items: center;
  min-width: 780px;
}

.walletTableHead {
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.walletTableRow {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.walletTableRow strong {
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.walletChange,
.walletReturn {
  font-variant-numeric: tabular-nums;
}

.walletChange.unavailable,
.walletReturn.unavailable {
  color: var(--muted);
  font-size: 16px;
}

.periodTabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c1110;
}

.periodTabs button {
  width: auto;
  min-width: 58px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

.periodTabs button.active {
  background: var(--teal);
  color: #fff;
}

.adminShell {
  max-width: 980px;
}

.adminPanel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 22, 0.94);
  box-shadow: var(--shadow);
}

.adminSubPanel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.adminForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.compactAdminForm {
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
}

.adminForm button {
  grid-column: 1 / -1;
  justify-self: start;
}

.compactAdminForm button {
  grid-column: auto;
}

.futuConfigForm {
  grid-template-columns: minmax(220px, 1fr) 180px auto;
  align-items: end;
}

.futuConfigActions {
  display: flex;
  gap: 8px;
}

.futuConfigActions button,
.futuProductForm button {
  grid-column: auto;
  white-space: nowrap;
}

.futuProductForm {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 150px auto;
  align-items: end;
}

.futuProductsList {
  display: grid;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  background: #0c1110;
}

.futuProductRow {
  display: grid;
  grid-template-columns: 34px minmax(120px, 0.8fr) minmax(160px, 1fr) 90px auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 14px 18px;
}

.futuProductRow + .futuProductRow {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.futuProductRow > span:not(.futuMark) {
  color: #d6dcda;
  font-weight: 800;
}

.futuMark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.futuProductType {
  justify-self: start;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
}

.futuProductsEmpty {
  padding: 24px 18px;
  color: var(--muted);
  text-align: center;
}

.okxInlineFields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bitcoinStatsList {
  display: grid;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  background: #0c1110;
  box-shadow: 0 18px 36px rgba(20, 32, 31, 0.16);
}

.topBitcoinStatsList {
  margin-top: 18px;
  margin-bottom: 18px;
}

.bitcoinStatsList .exchangeApiRow + .exchangeApiRow {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.exchangeApiList {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  background: #0c1110;
  box-shadow: 0 18px 36px rgba(20, 32, 31, 0.16);
}

.exchangeApiRow {
  display: grid;
  grid-template-columns: 22px 34px minmax(120px, 1fr) minmax(100px, 0.9fr) auto minmax(120px, 1fr) minmax(120px, auto) auto;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 18px 22px;
  color: #f7fbfa;
}

.bitcoinStatRow {
  grid-template-columns: 22px 34px minmax(110px, 0.85fr) minmax(110px, 0.9fr) minmax(180px, 1.4fr) minmax(110px, auto) auto;
}

.bitcoinStatRow > span:not(.apiCheckBox):not(.okxMark) {
  min-width: 0;
  color: #d6dcda;
  font-size: 17px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.apiCheckBox {
  width: 18px;
  height: 18px;
  border: 2px solid #6d7776;
  border-radius: 4px;
}

.okxMark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.exchangeApiRow strong {
  min-width: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.defaultBadge {
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.apiStatusText {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.apiStatusText strong {
  font: inherit;
}

.apiStatusText small {
  max-width: 240px;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0.82;
  overflow-wrap: anywhere;
  white-space: normal;
}

.apiStatusText span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--muted);
}

.apiStatusText.ok {
  color: var(--green);
}

.apiStatusText.ok span {
  background: var(--green);
}

.apiStatusText.failed {
  color: var(--red);
}

.apiStatusText.failed span {
  background: var(--red);
}

.apiStatusText.pending {
  color: #d6dcda;
}

.apiRetryButton {
  height: 36px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #f7fbfa;
  white-space: nowrap;
}

.apiRetryButton:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

.apiActionGroup {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.dashboardGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  margin-top: 16px;
}

.monitorPanel,
.robotPanel,
.positionPanel {
  padding: 18px;
}

.strategyGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.strategyCard,
.robotItem {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.strategyCard header,
.robotItem header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.strategyCard h3,
.robotItem h3 {
  margin: 0;
  font-size: 16px;
}

.statusPill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #232d2a;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.statusPill.live {
  background: rgba(13, 159, 97, 0.12);
  color: var(--green);
}

.statusPill.watch {
  background: rgba(217, 146, 36, 0.16);
  color: var(--amber);
}

.statusPill.paused {
  background: rgba(217, 79, 69, 0.12);
  color: var(--red);
}

.strategyStats,
.robotStats {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.strategyStats div,
.robotStats div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.strategyStats strong,
.robotStats strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.robotList {
  display: grid;
  gap: 10px;
}

.positionPanel {
  margin-top: 16px;
}

.positionTable {
  min-width: 1080px;
}

.positionTable select {
  min-width: 90px;
}

.positionTable input {
  height: 36px;
}

.positionTable td {
  vertical-align: middle;
}

.emptyState {
  color: var(--muted);
  text-align: left;
}

.dropLevels {
  margin-bottom: 16px;
  padding: 18px;
}

.dropGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.dropCard {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.dropCard span {
  display: block;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.dropCard strong {
  display: block;
  margin: 10px 0 6px;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.dropCard small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 330px;
  gap: 16px;
}

.chartPanel,
.sidePanel,
.tableSection {
  padding: 18px;
}

.panelHeader {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panelHeader p,
#statusText {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.lineKey {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
}

canvas {
  display: block;
  width: 100%;
  height: min(48vh, 520px);
  min-height: 320px;
}

.rankTabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.rankTabs button {
  height: 38px;
  background: #202927;
}

.rankTabs button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

li span {
  color: var(--muted);
  font-size: 13px;
}

.tableSection {
  margin-top: 16px;
}

.tableWrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.deliveryTable {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.deliveryTable th,
.deliveryTable td {
  padding: 12px 10px;
}

.deliveryTable th {
  padding-top: 0;
  padding-bottom: 4px;
  font-size: 13px;
}

.deliveryTable td {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 16px;
  font-weight: 700;
}

.deliveryTable td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}

.deliveryTable td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  background: #202927;
  color: #bec9c6;
  font-size: 13px;
}

td {
  font-variant-numeric: tabular-nums;
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 980px) {
  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .metrics,
  .walletTableHead,
  .walletTableRow,
  .dropGrid,
  .workspace,
  .dashboardGrid,
  .strategyGrid {
    grid-template-columns: 1fr 1fr;
  }

  .chartPanel {
    grid-column: 1 / -1;
  }

  .sidePanel {
    grid-column: 1 / -1;
  }

  .robotPanel {
    grid-column: 1 / -1;
  }

  .walletTableHead,
  .walletTableRow {
    grid-template-columns: minmax(90px, 0.8fr) minmax(90px, 0.8fr) minmax(150px, 1.15fr) minmax(150px, 1.15fr) minmax(110px, 0.8fr);
  }

  .btcTotalHero {
    grid-template-columns: 1fr;
  }

  .futuBalanceHero {
    grid-template-columns: 1fr;
  }

  .futuAssetMetrics {
    border-top: 1px solid rgba(26, 176, 165, 0.24);
    border-left: 0;
  }

  .btcInlineChart {
    border-top: 1px solid rgba(26, 176, 165, 0.25);
  }
}

@media (max-width: 620px) {
  .hermesDutyBar {
    align-items: flex-start;
  }

  .hermesDutySummary > span {
    display: none;
  }

  .hermesDutySummary strong {
    white-space: normal;
  }

  .hermesDrawer {
    padding: 14px;
    border-left: 0;
  }

  .coverHero {
    padding: 22px 20px 20px;
    background-position: 68% center;
  }

  .coverContent {
    align-self: end;
    padding: 90px 0 56px;
  }

  .coverContent h1 {
    font-size: 58px;
  }

  .coverLead {
    font-size: 18px;
  }

  .coverLeadEnglish {
    font-size: 12px;
  }

  .coverFooter {
    justify-content: space-between;
    gap: 10px;
  }

  .coverFooterLine {
    flex: 1;
    width: auto;
  }

  .loginDialog {
    padding: 28px 20px 22px;
  }

  .shell {
    width: min(100% - 20px, 1440px);
    padding-top: 18px;
  }

  .controls,
  .metrics {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .dropGrid {
    grid-template-columns: 1fr;
  }

  .walletTableHead,
  .walletTableRow {
    grid-template-columns: minmax(80px, 0.8fr) minmax(80px, 0.8fr) minmax(140px, 1.15fr) minmax(140px, 1.15fr) minmax(100px, 0.8fr);
    min-width: 680px;
  }

  .periodTabs {
    width: 100%;
    overflow-x: auto;
  }

  .periodTabs button {
    flex: 0 0 auto;
    width: auto;
  }

  .btcChartCanvasWrap,
  #btcBalanceChart {
    height: 220px;
  }

  .futuAssetMetrics {
    grid-template-columns: 1fr;
  }

  .futuAssetMetrics > div + div {
    border-top: 1px solid rgba(26, 176, 165, 0.18);
    border-left: 0;
  }

  .futuTotalAsset {
    min-height: 126px;
    padding: 20px;
  }

  .futuBalanceTableHead,
  .futuBalanceRow {
    min-width: 860px;
  }

  .adminForm {
    grid-template-columns: 1fr;
  }

  .compactAdminForm {
    grid-template-columns: 1fr;
  }

  .futuConfigForm,
  .futuProductForm {
    grid-template-columns: 1fr;
  }

  .futuConfigActions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .futuProductRow {
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    padding: 14px;
  }

  .futuProductRow > span:not(.futuMark),
  .futuProductRow .apiActionGroup {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .okxInlineFields {
    grid-template-columns: 1fr;
  }

  .compactAdminForm button {
    grid-column: 1;
  }

  .exchangeApiRow {
    grid-template-columns: 22px 34px 1fr;
    gap: 12px;
  }

  .exchangeApiRow .defaultBadge,
  .exchangeApiRow #okxApiKeyLabel,
  .bitcoinStatRow > span:not(.apiCheckBox):not(.okxMark),
  .exchangeApiRow .apiStatusText,
  .exchangeApiRow .apiActionGroup {
    grid-column: 3;
    justify-self: start;
  }

  .controls {
    display: grid;
  }

  .topbarTools,
  .navActions {
    width: 100%;
    justify-items: stretch;
    justify-content: stretch;
  }

  .navButton {
    flex: 1 1 140px;
    justify-content: center;
  }

  select,
  button {
    width: 100%;
  }

  .workspace,
  .dashboardGrid,
  .strategyGrid {
    grid-template-columns: 1fr;
  }

  .panelHeader {
    display: grid;
  }
}
