:root {
  --ink: #171717;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --paper: #fafafa;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #f1f1f2;
  --line: #e4e4e7;
  --line-2: #ededf0;
  --dark: #111111;
  --primary: #0a72ef;
  --primary-2: #0068d6;
  --ok: #0f8a5f;
  --warn: #b46b00;
  --risk: #d92d20;
  --preview: #de1d8d;
  --ship: #ff5b4f;
  --ring: 0 0 0 1px rgba(0, 0, 0, 0.08);
  --ring-soft: 0 0 0 1px rgba(0, 0, 0, 0.06);
  --card-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 2px rgba(0, 0, 0, 0.04), 0 12px 24px -20px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --sans: "Geist", "Inter Variable", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", "SF Mono", "Cascadia Mono", "Roboto Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.page {
  min-height: 100vh;
}

.appHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(230px, auto) 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 10px clamp(16px, 3vw, 40px);
  background: rgba(250, 250, 250, 0.86);
  color: var(--ink);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
}

.brandLockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandMark {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
  box-shadow: var(--ring), 0 6px 16px -10px rgba(15, 23, 42, 0.45);
}

.brandLockup strong,
.brandLockup span {
  display: block;
}

.brandLockup strong {
  font-size: 14px;
  font-weight: 650;
}

.brandLockup span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.topNav {
  display: flex;
  justify-content: center;
  gap: 2px;
}

.topNav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 520;
  text-decoration: none;
}

.topNav a:hover {
  background: var(--surface-3);
  color: var(--ink);
}

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

.selectLabel {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

select,
input {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  outline-color: var(--primary);
  box-shadow: var(--ring);
}

.statusBadge {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ebf5ff;
  color: var(--primary-2);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}

.workspace {
  width: min(1640px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 2.5vw, 40px);
}

.hidden {
  display: none !important;
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.unlockPanel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px);
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--dark);
  color: #fff;
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.unlockPanel h1 {
  margin-top: 6px;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 620;
}

.unlockPanel p {
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.55;
}

.unlockForm {
  display: flex;
  gap: 10px;
}

.unlockForm input {
  width: 100%;
}

.unlockForm button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--dark);
  padding: 0 16px;
  font-weight: 620;
}

.errorText {
  grid-column: 1 / -1;
  color: #ffd6d6 !important;
}

.sectionKicker {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.opsDeck {
  margin-bottom: 16px;
}

.briefPanel,
.portfolioPanel,
.ordersPanel,
.mapPanel,
.trendPanel,
.sharePanel,
.ledgerPanel {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.commandPanel {
  overflow: hidden;
  padding: 0;
}

.commandLead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line-2);
}

.commandLead h1 {
  margin-top: 8px;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.04;
  font-weight: 620;
}

.briefCopy {
  max-width: 720px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.briefDelta {
  min-width: 180px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 8px 12px;
  box-shadow: var(--ring-soft);
  font-size: 12px;
  font-weight: 620;
  text-align: center;
}

.briefPanel[data-delta="up"] .briefDelta {
  background: #eaf8f2;
  color: var(--ok);
}

.briefPanel[data-delta="down"] .briefDelta {
  background: #fff1f0;
  color: var(--risk);
}

.commandMetrics {
  display: grid;
  grid-template-columns: minmax(300px, 0.74fr) minmax(0, 1.26fr);
  min-height: 230px;
  border-bottom: 1px solid var(--line-2);
}

.briefHero {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 22px 24px;
  border-right: 1px solid var(--line-2);
}

.briefHero > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 560;
}

.briefHero > p:not(.briefCopy) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.briefHero h2 {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.96;
  font-weight: 650;
}

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

.metricCell {
  min-width: 0;
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 230px;
  padding: 18px;
  border-right: 1px solid var(--line-2);
}

.metricCell:last-child {
  border-right: 0;
}

.metricCell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 580;
}

.metricCell strong {
  color: var(--ink);
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1;
  font-weight: 640;
  font-variant-numeric: tabular-nums;
}

.metricCell em {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 560;
  white-space: nowrap;
}

.metricCell[data-delta="up"] em {
  background: #eaf8f2;
  color: var(--ok);
}

.metricCell[data-delta="down"] em {
  background: #fff1f0;
  color: var(--risk);
}

.commandLower {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1.1fr) minmax(320px, 0.82fr);
}

.funnelPanel,
.actionPanel,
.accountPanel {
  min-width: 0;
  padding: 20px 24px 24px;
  border-right: 1px solid var(--line-2);
}

.accountPanel {
  border-right: 0;
}

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

.panelTitle {
  display: grid;
  justify-content: stretch;
  gap: 6px;
}

.panelHeader h2,
.panelTitle h2 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 620;
}

.panelHeader p,
.panelTitle p:not(.sectionKicker),
.sortHint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.funnelStack {
  display: grid;
  gap: 16px;
}

.funnelStage {
  display: grid;
  gap: 8px;
}

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

.stageLabel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
}

.stageLabel strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.stageTrack {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.stageFill {
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
}

.stage-1 {
  background: var(--preview);
}

.stage-2 {
  background: var(--primary);
}

.funnelStage p {
  color: var(--muted);
  font-size: 12px;
}

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

.actionItem {
  min-width: 0;
  display: grid;
  gap: 6px;
  min-height: 118px;
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 13px;
  box-shadow: var(--ring-soft);
}

.actionItem span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.actionItem strong {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 620;
}

.actionItem p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.actionItem.ok {
  background: #f3fbf7;
}

.actionItem.warn {
  background: #fff7ed;
}

.actionItem.risk {
  background: #fff5f5;
}

.accountStatus:empty {
  display: none;
}

.accountHealthSummary {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.accountHealthSummary.ok {
  background: #eaf8f2;
  color: var(--ok);
}

.accountHealthSummary.warn {
  background: #fff7ed;
  color: var(--warn);
}

.accountStatusList {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.accountItem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 11px;
  box-shadow: var(--ring-soft);
}

.accountItem strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 620;
}

.accountItem p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.accountItem > span {
  border-radius: 999px;
  background: #eaf8f2;
  color: var(--ok);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.accountItem.warn > span {
  background: #fff7ed;
  color: var(--warn);
}

.accountItem.risk > span {
  background: #fff1f0;
  color: var(--risk);
}

.portfolioGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr);
  gap: 16px;
  margin-bottom: 16px;
}

.portfolioPanel,
.ordersPanel,
.mapPanel,
.trendPanel,
.sharePanel {
  padding: 20px;
}

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

.shopCard {
  min-width: 0;
  display: grid;
  gap: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  text-align: left;
  box-shadow: var(--ring-soft);
  transition: box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.shopCard:hover,
.shopCard.selected {
  background: #fcfcfd;
  box-shadow: 0 0 0 1px rgba(10, 114, 239, 0.35), 0 8px 18px -16px rgba(10, 114, 239, 0.8);
}

.shopCard:hover {
  transform: translateY(-1px);
}

.shopCard:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.shopHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.shopHead h3 {
  font-size: 14px;
  font-weight: 620;
}

.shopMeta {
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.shopMeta span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  padding: 0 7px;
  font-size: 11px;
  font-weight: 560;
  box-shadow: var(--ring-soft);
}

.shopMeta .shopRefresh {
  background: #ebf5ff;
  color: var(--primary-2);
  font-family: var(--sans);
}

.shopHead > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eaf8f2;
  color: var(--ok);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 620;
}

.shopCard.quiet .shopHead > span {
  background: #fff7ed;
  color: var(--warn);
}

.shopCard.risk .shopHead > span {
  background: #fff1f0;
  color: var(--risk);
}

.shopMoney {
  font-size: 28px;
  line-height: 1;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.shopMetrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shopMetrics span {
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 560;
}

.miniBar {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
}

.miniBar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.miniBar div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.miniBar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
}

.mapCanvas,
.trendCanvas {
  min-height: 318px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #f8f8f9 100%);
  box-shadow: var(--ring-soft);
  overflow: hidden;
}

.ordersPanel {
  margin-bottom: 16px;
}

.orderScope,
.sortHint {
  align-self: end;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 560;
  box-shadow: var(--ring-soft);
}

.orderLayout {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.orderShopTabs {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
}

.orderShopTabs button {
  min-height: 52px;
  display: grid;
  gap: 4px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  box-shadow: var(--ring-soft);
}

.orderShopTabs button strong {
  font-size: 14px;
  font-weight: 620;
}

.orderShopTabs button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.orderShopTabs button.active {
  background: #f5faff;
  box-shadow: 0 0 0 1px rgba(10, 114, 239, 0.42);
}

.orderShopTabs button.live span {
  color: var(--ok);
}

.orderShopTabs button.quiet span {
  color: var(--warn);
}

.orderShopTabs button.risk span {
  color: var(--risk);
}

.orderList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
  gap: 12px;
  min-height: 0;
}

@media (min-width: 1241px) {
  .orderList {
    max-height: 720px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .orderList::-webkit-scrollbar,
  .orderCard::-webkit-scrollbar {
    width: 7px;
  }

  .orderList::-webkit-scrollbar-thumb,
  .orderCard::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.16);
  }
}

.emptyOrders {
  min-height: 220px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  box-shadow: var(--ring-soft);
}

.emptyOrders strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 620;
}

.emptyOrders p {
  max-width: 480px;
  font-size: 13px;
  line-height: 1.5;
}

.orderCard {
  display: grid;
  gap: 11px;
  height: 680px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--ring-soft);
}

.orderCardHead {
  position: sticky;
  top: -12px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: -12px -12px 0;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 12px 9px;
  backdrop-filter: blur(12px);
}

.orderStatus {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  background: #eaf8f2;
  color: var(--ok);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 620;
}

.orderAmount {
  display: grid;
  gap: 3px;
  text-align: right;
}

.orderAmount strong {
  font-size: 21px;
  line-height: 1;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.orderAmount span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.productHero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.productHeroImage {
  width: 100%;
  height: 180px;
  min-height: 180px;
}

.productHeroImage,
.productTileImage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.productHeroImage img,
.productHeroImage .itemImageBlank,
.productTileImage img,
.productTileImage .itemImageBlank {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: var(--surface-2);
  object-fit: cover;
  box-shadow: var(--ring-soft);
}

.productHeroImage.imageFailed::after,
.productTileImage.imageFailed::after {
  content: "无图";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 12px;
  font-weight: 620;
  box-shadow: var(--ring-soft);
}

.itemImageBlank {
  display: block;
}

.productHero > div:last-child {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.productHero h3 {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.22;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.productSpecs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.productSpecs span,
.productTileSpecs span {
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 4px 7px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 560;
  box-shadow: var(--ring-soft);
}

.productGallery {
  display: grid;
  gap: 9px;
}

.productGalleryHead {
  min-height: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.productGalleryHead strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.productTileGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.productTile {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "image body"
    "image footer";
  gap: 7px 10px;
  height: 132px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px;
  box-shadow: var(--ring-soft);
}

.productTileImage {
  grid-area: image;
  width: 112px;
  height: 112px;
  align-self: center;
}

.productTileBody {
  grid-area: body;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: hidden;
}

.productTileBody strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 650;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.productTileSpecs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 54px;
  overflow: hidden;
}

.productTileSpecs:empty {
  display: none;
}

.productTileSpecs span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.productTileFooter {
  grid-area: footer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.productTileFooter strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
}

.orderMetaLine {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.orderMetaLine span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  padding: 0 8px;
}

.orderMetaLine b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.orderMetaLine em {
  color: var(--ink-2);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.buyerStrip,
.orderInfoDisclosure,
.orderCompactFacts,
.orderNotes,
.rawOrder {
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--ring-soft);
}

.buyerStrip {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.buyerStrip > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.buyerStrip > div:first-child span,
.copyLine span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.buyerStrip > div:first-child strong {
  font-size: 14px;
  font-weight: 650;
}

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

.copyLine strong {
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 560;
  word-break: break-word;
}

.copyLine.address strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.copyLine.phone strong {
  font-family: var(--mono);
  font-size: 14px;
}

.copyButton {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary-2);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
  box-shadow: var(--ring-soft);
}

.copyButton:hover,
.copyButton.copied {
  background: #ebf5ff;
}

.orderInfoDisclosure summary,
.orderNotes summary,
.rawOrder summary {
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
  cursor: pointer;
}

.orderCompactFacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border-radius: 0;
  border-top: 1px solid var(--line-2);
  background: var(--line-2);
  box-shadow: none;
}

.orderCompactFacts span {
  min-width: 0;
  display: grid;
  gap: 3px;
  background: var(--surface-2);
  padding: 7px 8px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.35;
}

.orderCompactFacts b,
.orderNotes p span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
}

.orderNotes p {
  margin: 0;
  border-top: 1px solid var(--line-2);
  padding: 10px 12px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.orderNotes p span {
  display: block;
  margin-bottom: 4px;
}

.rawOrder pre {
  max-height: 420px;
  margin: 0;
  overflow: auto;
  border-top: 1px solid var(--line-2);
  padding: 12px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.copyToast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  transform: translateY(12px);
  opacity: 0;
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 620;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.copyToast.show {
  transform: translateY(0);
  opacity: 1;
}

svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mapGrid,
.chartGrid {
  stroke: var(--line-2);
  stroke-width: 1;
}

.mapAxis,
.chartAxis {
  fill: var(--muted);
  font-size: 11px;
  font-family: var(--sans);
}

.mapAxisLine {
  stroke: var(--line);
  stroke-width: 1.2;
}

.mapPoint circle {
  fill: rgba(10, 114, 239, 0.14);
  stroke: var(--primary);
  stroke-width: 2;
}

.mapPoint text {
  fill: var(--ink-2);
  font-size: 12px;
  font-weight: 560;
}

.analysisGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr);
  gap: 16px;
  margin-bottom: 16px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
  padding: 2px;
  box-shadow: var(--ring-soft);
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 560;
}

.segmented button.active {
  background: var(--dark);
  color: #fff;
}

.chartLine {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chartArea {
  fill: rgba(10, 114, 239, 0.1);
}

.chartPoint {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width: 2.5;
}

.shareBars {
  display: grid;
  gap: 12px;
}

.shareRow {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.shareIndex {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 620;
}

.shareMeta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.shareMeta strong {
  font-size: 14px;
  font-weight: 620;
}

.shareMeta span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.shareTrack {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.shareTrack i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
}

.ledgerPanel {
  padding: 0;
  overflow: hidden;
}

.ledgerHeader {
  padding: 20px 20px 0;
}

.tableWrap {
  overflow-x: auto;
}

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

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

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

th button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 11px;
  font-weight: 620;
  text-transform: uppercase;
}

th button.active {
  color: var(--primary-2);
}

th button.active::after {
  content: " " attr(data-dir);
  font-family: var(--mono);
  font-size: 10px;
}

tbody tr:hover {
  background: var(--surface-2);
}

.shopCell {
  display: grid;
  gap: 3px;
}

.shopCell strong {
  font-size: 14px;
  font-weight: 620;
}

.shopCell span {
  color: var(--muted);
  font-size: 12px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1320px) {
  .commandMetrics,
  .commandLower,
  .portfolioGrid,
  .orderLayout,
  .analysisGrid {
    grid-template-columns: 1fr;
  }

  .briefHero,
  .funnelPanel,
  .actionPanel {
    border-right: 0;
    border-bottom: 1px solid var(--line-2);
  }

  .metricRail {
    border-top: 1px solid var(--line-2);
  }

  .shopBoard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orderShopTabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .appHeader {
    position: static;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topNav {
    justify-content: start;
    overflow-x: auto;
  }

  .headerControls {
    align-items: stretch;
  }

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

  .briefDelta {
    width: fit-content;
    min-width: 0;
  }

  .metricRail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metricCell {
    min-height: 132px;
    border-bottom: 1px solid var(--line-2);
  }

  .metricCell:nth-child(2n) {
    border-right: 0;
  }

  .shopBoard,
  .orderShopTabs,
  .actionList {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 12px;
  }

  .headerControls,
  .unlockForm,
  .panelHeader,
  .shareMeta,
  .footer {
    flex-direction: column;
    align-items: stretch;
  }

  .commandLead,
  .briefHero,
  .funnelPanel,
  .actionPanel,
  .accountPanel,
  .portfolioPanel,
  .ordersPanel,
  .mapPanel,
  .trendPanel,
  .sharePanel {
    padding: 14px;
  }

  .briefHero h2 {
    font-size: clamp(42px, 16vw, 64px);
  }

  .segmented {
    width: 100%;
  }

  .mapCanvas,
  .trendCanvas {
    min-height: 260px;
  }

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

  .orderCardHead,
  .orderAmount {
    text-align: left;
  }

  .productHeroImage {
    height: 168px;
    min-height: 168px;
  }

  .productTile {
    grid-template-columns: 100px minmax(0, 1fr);
    height: 122px;
  }

  .productTileImage {
    width: 100px;
    height: 100px;
  }

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

  .ledgerHeader {
    padding: 14px 14px 0;
  }
}
