{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sales-dashboard",
  "type": "registry:component",
  "title": "Sales Dashboard",
  "description": "A revenue overview with revenue and order KPIs, a goal progress ring, a revenue versus target combo chart, regional sales, a conversion funnel and a sortable top products table.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "dashboards",
    "dashboard",
    "sales",
    "revenue",
    "funnel",
    "combo chart",
    "table"
  ],
  "docs": "https://hyperblur.dev/effects/sales-dashboard",
  "files": [
    {
      "path": "registry/hyperblur/sales-dashboard.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/sales-dashboard.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type SalesPeriod = \"H1\" | \"H2\" | \"FY\";\n\nexport interface SalesDashboardProps extends React.HTMLAttributes<HTMLDivElement> {\n  accent?: string;\n  brand?: string;\n  user?: string;\n  currency?: string;\n  period?: SalesPeriod;\n  defaultPeriod?: SalesPeriod;\n  onPeriodChange?: (period: SalesPeriod) => void;\n}\n\nconst css = `\n.hb-dsl {\n  --a: #2f7bff;\n  container: hb-dsl / inline-size;\n  box-sizing: border-box;\n  width: 100%;\n  border: 1px solid #262626;\n  border-radius: 16px;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  font-size: 13px;\n  line-height: 1.4;\n  overflow: hidden;\n  position: relative;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-dsl *, .hb-dsl *::before, .hb-dsl *::after { box-sizing: border-box; }\n.hb-dsl button, .hb-dsl input, .hb-dsl select { font: inherit; color: inherit; }\n.hb-dsl button:focus-visible, .hb-dsl input:focus-visible, .hb-dsl select:focus-visible, .hb-dsl [tabindex]:focus-visible {\n  outline: 2px solid var(--a);\n  outline-offset: 2px;\n}\n.hb-dsl-app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 640px; }\n.hb-dsl-side {\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n  min-width: 0;\n  padding: 20px 12px 16px;\n  border-right: 1px solid #1f1f1f;\n  background: #0d0d0d;\n}\n.hb-dsl-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }\n.hb-dsl-mark {\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 24px;\n  height: 24px;\n  border-radius: 7px;\n  background: linear-gradient(135deg, var(--a), color-mix(in srgb, var(--a) 45%, #ffffff));\n  color: #ffffff;\n}\n.hb-dsl-nav { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.hb-dsl-nav-label { padding: 12px 8px 6px; color: #6b6b6b; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }\n.hb-dsl-link {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  width: 100%;\n  height: 34px;\n  padding: 0 8px;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: #a1a1a1;\n  font-size: 13px;\n  text-align: left;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease;\n}\n.hb-dsl-link:hover { background: #161616; color: #ededed; }\n.hb-dsl-link[aria-current=\"page\"] { background: #1b1b1b; color: #ffffff; }\n.hb-dsl-link[aria-current=\"page\"] .hb-dsl-ico { color: var(--a); }\n.hb-dsl-link-n {\n  margin-left: auto;\n  padding: 1px 7px;\n  border-radius: 999px;\n  background: #1f1f1f;\n  color: #a1a1a1;\n  font-size: 11px;\n  font-variant-numeric: tabular-nums;\n}\n.hb-dsl-side-foot { margin-top: auto; }\n.hb-dsl-main { display: flex; flex-direction: column; min-width: 0; }\n.hb-dsl-top { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 24px; border-bottom: 1px solid #1f1f1f; }\n.hb-dsl-crumb { min-width: 0; overflow: hidden; color: #8f8f8f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }\n.hb-dsl-crumb strong { color: #ededed; font-weight: 500; }\n.hb-dsl-search { position: relative; width: 260px; margin-left: auto; color: #6b6b6b; }\n.hb-dsl-search .hb-dsl-ico { position: absolute; top: 50%; left: 10px; width: 15px; height: 15px; transform: translateY(-50%); pointer-events: none; }\n.hb-dsl-search input {\n  width: 100%;\n  height: 34px;\n  padding: 0 40px 0 32px;\n  border: 1px solid #242424;\n  border-radius: 8px;\n  background: #111111;\n  color: #ededed;\n  font-size: 13px;\n  transition: border-color .15s ease, background .15s ease;\n}\n.hb-dsl-search input::placeholder { color: #6b6b6b; }\n.hb-dsl-search input:hover { border-color: #333333; }\n.hb-dsl-search input:focus-visible { border-color: var(--a); outline-offset: 0; }\n.hb-dsl-kbd {\n  position: absolute;\n  top: 50%;\n  right: 8px;\n  padding: 1px 6px;\n  border: 1px solid #2a2a2a;\n  border-radius: 5px;\n  background: #171717;\n  color: #8f8f8f;\n  font-size: 11px;\n  transform: translateY(-50%);\n  pointer-events: none;\n}\n.hb-dsl-iconbtn {\n  position: relative;\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 34px;\n  height: 34px;\n  border: 1px solid #242424;\n  border-radius: 8px;\n  background: #111111;\n  color: #a1a1a1;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease, border-color .15s ease;\n}\n.hb-dsl-iconbtn:hover { border-color: #333333; background: #171717; color: #ededed; }\n.hb-dsl-dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border: 2px solid #111111; border-radius: 50%; background: var(--a); box-sizing: content-box; margin: -2px; }\n.hb-dsl-av {\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 28px;\n  height: 28px;\n  border-radius: 50%;\n  color: #ffffff;\n  font-size: 11px;\n  font-weight: 600;\n  letter-spacing: .01em;\n}\n.hb-dsl-content { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 24px; }\n.hb-dsl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }\n.hb-dsl-title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }\n.hb-dsl-sub { margin: 4px 0 0; color: #8f8f8f; font-size: 13px; }\n.hb-dsl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }\n.hb-dsl-card {\n  min-width: 0;\n  padding: 16px;\n  border: 1px solid #232323;\n  border-radius: 12px;\n  background: #111111;\n  animation: hb-dsl-rise .55s cubic-bezier(.2, .7, .2, 1) both;\n  animation-delay: calc(var(--d, 0) * 60ms);\n}\n.hb-dsl-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }\n.hb-dsl-card-t { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.005em; }\n.hb-dsl-card-s { margin: 2px 0 0; color: #8f8f8f; font-size: 12px; }\n.hb-dsl-seg { display: inline-flex; padding: 2px; border: 1px solid #262626; border-radius: 8px; background: #0d0d0d; }\n.hb-dsl-seg button {\n  height: 26px;\n  padding: 0 10px;\n  border: 0;\n  border-radius: 6px;\n  background: transparent;\n  color: #8f8f8f;\n  font-size: 12px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease;\n}\n.hb-dsl-seg button:hover { color: #ededed; }\n.hb-dsl-seg button[aria-pressed=\"true\"] { background: #232323; color: #ffffff; }\n.hb-dsl-btn {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n  height: 32px;\n  padding: 0 12px;\n  border: 1px solid #2a2a2a;\n  border-radius: 8px;\n  background: #151515;\n  color: #ededed;\n  font-size: 12.5px;\n  font-weight: 500;\n  white-space: nowrap;\n  cursor: pointer;\n  transition: background .15s ease, border-color .15s ease, transform .15s ease;\n}\n.hb-dsl-btn:hover { border-color: #3a3a3a; background: #1c1c1c; }\n.hb-dsl-btn:active { transform: translateY(1px); }\n.hb-dsl-btn[data-p=\"true\"] { border-color: var(--a); background: var(--a); color: #ffffff; }\n.hb-dsl-btn[data-p=\"true\"]:hover { background: color-mix(in srgb, var(--a) 85%, #ffffff); }\n.hb-dsl-btn .hb-dsl-ico { width: 14px; height: 14px; }\n.hb-dsl-ico { display: block; flex: none; width: 16px; height: 16px; }\n.hb-dsl-pill {\n  display: inline-flex;\n  align-items: center;\n  gap: 3px;\n  height: 20px;\n  padding: 0 7px;\n  border-radius: 999px;\n  font-size: 11px;\n  font-weight: 600;\n  font-variant-numeric: tabular-nums;\n  white-space: nowrap;\n}\n.hb-dsl-pill .hb-dsl-ico { width: 11px; height: 11px; stroke-width: 2.4; }\n.hb-dsl-pill[data-t=\"up\"] { background: rgba(74, 222, 128, .12); color: #4ade80; }\n.hb-dsl-pill[data-t=\"down\"] { background: rgba(248, 113, 113, .12); color: #f87171; }\n.hb-dsl-pill[data-t=\"flat\"] { background: #1f1f1f; color: #a1a1a1; }\n.hb-dsl-spark { display: block; width: 100%; height: 36px; color: var(--a); animation: hb-dsl-wipe .9s .15s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-dsl-spark-l { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }\n.hb-dsl-tt {\n  position: absolute;\n  z-index: 3;\n  padding: 7px 10px;\n  border: 1px solid #2c2c2c;\n  border-radius: 8px;\n  background: rgba(22, 22, 22, .96);\n  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .7);\n  color: #ededed;\n  font-size: 12px;\n  line-height: 1.5;\n  white-space: nowrap;\n  pointer-events: none;\n}\n.hb-dsl-tt b { font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-dsl-tt-d { color: #8f8f8f; font-size: 11px; }\n@keyframes hb-dsl-rise { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }\n@keyframes hb-dsl-wipe { from { clip-path: inset(-6px 100% -6px -6px); } to { clip-path: inset(-6px -6px -6px -6px); } }\n@keyframes hb-dsl-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }\n@keyframes hb-dsl-fade { from { opacity: 0; } to { opacity: 1; } }\n@keyframes hb-dsl-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); } 100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } }\n@keyframes hb-dsl-arc { from { stroke-dasharray: 0 100; } }\n@container hb-dsl (max-width: 759px) {\n  .hb-dsl-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }\n  .hb-dsl-side { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid #1f1f1f; overflow-x: auto; }\n  .hb-dsl-brand { padding: 0; }\n  .hb-dsl-brand span:last-child, .hb-dsl-nav-label, .hb-dsl-link-t, .hb-dsl-link-n, .hb-dsl-side-foot, .hb-dsl-kbd { display: none; }\n  .hb-dsl-nav { flex-direction: row; flex: 1; gap: 4px; }\n  .hb-dsl-link { justify-content: center; width: 36px; padding: 0; }\n  .hb-dsl-top { gap: 8px; padding: 0 16px; }\n  .hb-dsl-crumb { display: none; }\n  .hb-dsl-search { flex: 1; width: auto; margin-left: 0; }\n  .hb-dsl-content { gap: 16px; padding: 16px; }\n  .hb-dsl-title { font-size: 19px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-dsl *, .hb-dsl *::before, .hb-dsl *::after { animation: none !important; transition: none !important; }\n}\n.hb-dsl-status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #232323; border-radius: 10px; background: #111111; }\n.hb-dsl-status i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: hb-dsl-pulse 1.8s ease-out infinite; }\n.hb-dsl-status strong { display: block; font-size: 12.5px; font-weight: 500; }\n.hb-dsl-status span { color: #8f8f8f; font-size: 11.5px; }\n.hb-dsl-top3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }\n.hb-dsl-kpi { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; overflow: hidden; }\n.hb-dsl-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #8f8f8f; font-size: 12px; }\n.hb-dsl-kpi-l { display: flex; align-items: center; gap: 8px; }\n.hb-dsl-kpi-i {\n  display: grid;\n  place-items: center;\n  width: 24px;\n  height: 24px;\n  border-radius: 7px;\n  background: color-mix(in srgb, var(--k) 16%, transparent);\n  color: var(--k);\n}\n.hb-dsl-kpi-i .hb-dsl-ico { width: 14px; height: 14px; }\n.hb-dsl-kpi-v { margin: 0; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.1; }\n.hb-dsl-kpi-n { color: #6b6b6b; font-size: 12px; }\n.hb-dsl-kpi .hb-dsl-spark { width: calc(100% + 16px); margin: 4px -8px -8px; color: var(--k); }\n.hb-dsl-ringc { display: flex; align-items: center; gap: 16px; }\n.hb-dsl-ring { position: relative; flex: none; width: 96px; height: 96px; }\n.hb-dsl-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }\n.hb-dsl-ring-t { fill: none; stroke: #1d1d1d; stroke-width: 4; }\n.hb-dsl-ring-p { fill: none; stroke: var(--a); stroke-width: 4; stroke-linecap: round; animation: hb-dsl-arc 1.2s cubic-bezier(.3, .7, .2, 1) both; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--a) 60%, transparent)); }\n.hb-dsl-ring-v { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }\n.hb-dsl-ringc-x { display: flex; flex-direction: column; gap: 6px; min-width: 0; }\n.hb-dsl-ringc-x p { margin: 0; color: #8f8f8f; font-size: 12px; line-height: 1.45; }\n.hb-dsl-ringc-x p b { color: #ededed; font-weight: 500; }\n.hb-dsl-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }\n.hb-dsl-legend-k { display: flex; align-items: center; gap: 14px; color: #8f8f8f; font-size: 12px; }\n.hb-dsl-legend-k span { display: inline-flex; align-items: center; gap: 6px; }\n.hb-dsl-legend-k i { width: 10px; height: 10px; border-radius: 3px; background: var(--a); }\n.hb-dsl-legend-k i[data-line=\"true\"] { height: 0; border-top: 2px dashed #cfcfcf; border-radius: 0; background: transparent; }\n.hb-dsl-combo { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: 250px auto; column-gap: 8px; }\n.hb-dsl-yl { position: relative; }\n.hb-dsl-yl span { position: absolute; right: 0; color: #6b6b6b; font-size: 11px; font-variant-numeric: tabular-nums; transform: translateY(50%); }\n.hb-dsl-plot { position: relative; }\n.hb-dsl-gl { position: absolute; right: 0; left: 0; height: 1px; background: #1b1b1b; }\n.hb-dsl-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }\n.hb-dsl-col {\n  position: relative;\n  display: flex;\n  align-items: flex-end;\n  justify-content: center;\n  padding: 0;\n  border: 0;\n  border-radius: 6px;\n  background: transparent;\n  cursor: pointer;\n  transition: background .15s ease;\n}\n.hb-dsl-col:hover, .hb-dsl-col[data-on=\"true\"] { background: rgba(255, 255, 255, .035); }\n.hb-dsl-bar {\n  width: min(62%, 30px);\n  border-radius: 6px 6px 2px 2px;\n  background: linear-gradient(180deg, var(--a), color-mix(in srgb, var(--a) 50%, #000000));\n  transform-origin: bottom;\n  animation: hb-dsl-grow .8s cubic-bezier(.3, .7, .2, 1) both;\n  animation-delay: calc(var(--i) * 40ms);\n  transition: filter .15s ease;\n}\n.hb-dsl-bar[data-hit=\"false\"] { background: linear-gradient(180deg, color-mix(in srgb, var(--a) 50%, #4a4a4a), color-mix(in srgb, var(--a) 25%, #222222)); }\n.hb-dsl-col:hover .hb-dsl-bar, .hb-dsl-col[data-on=\"true\"] .hb-dsl-bar { filter: brightness(1.2); }\n.hb-dsl-target { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; animation: hb-dsl-wipe 1.1s .3s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-dsl-target path { fill: none; stroke: #e6e6e6; stroke-opacity: .8; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }\n.hb-dsl-xl { grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding-top: 10px; color: #6b6b6b; font-size: 11px; text-align: center; }\n.hb-dsl-reg { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }\n.hb-dsl-reg li { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px; margin: -4px -8px; border-radius: 8px; transition: background .15s ease; }\n.hb-dsl-reg li:hover { background: #151515; }\n.hb-dsl-reg-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; }\n.hb-dsl-reg-n { display: flex; align-items: center; gap: 8px; font-weight: 500; }\n.hb-dsl-reg-n span { color: #6b6b6b; font-size: 12px; font-weight: 400; }\n.hb-dsl-reg-v { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }\n.hb-dsl-reg-m { display: flex; align-items: center; gap: 10px; }\n.hb-dsl-reg-m .hb-dsl-reg-b { flex: 1; }\n.hb-dsl-reg-b { height: 6px; border-radius: 999px; background: #1b1b1b; overflow: hidden; }\n.hb-dsl-reg-b i {\n  display: block;\n  width: var(--w);\n  height: 100%;\n  border-radius: 999px;\n  background: var(--c);\n  transform-origin: left;\n  animation: hb-dsl-bar .9s cubic-bezier(.3, .7, .2, 1) both;\n}\n.hb-dsl-fun { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }\n.hb-dsl-fs { min-width: 0; padding: 0 16px; border-left: 1px solid #1d1d1d; }\n.hb-dsl-fs:first-child { padding-left: 0; border-left: 0; }\n.hb-dsl-fs:last-child { padding-right: 0; }\n.hb-dsl-fs-l { color: #8f8f8f; font-size: 12px; }\n.hb-dsl-fs-v { margin: 4px 0 12px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }\n.hb-dsl-fs-b { height: 28px; border-radius: 6px; background: #161616; overflow: hidden; }\n.hb-dsl-fs-b i {\n  display: block;\n  width: var(--w);\n  height: 100%;\n  border-radius: 6px;\n  background: linear-gradient(90deg, color-mix(in srgb, var(--a) 55%, #000000), var(--a));\n  opacity: var(--o);\n  transform-origin: left;\n  animation: hb-dsl-bar 1s cubic-bezier(.3, .7, .2, 1) both;\n  animation-delay: calc(var(--i) * 90ms);\n}\n.hb-dsl-fs-c { margin-top: 8px; color: #8f8f8f; font-size: 11.5px; }\n.hb-dsl-fs-c b { color: #ededed; font-weight: 500; }\n.hb-dsl-tw { margin: 0 -16px -16px; overflow-x: auto; }\n.hb-dsl-tb { width: 100%; min-width: 560px; border-collapse: collapse; }\n.hb-dsl-tb th {\n  height: 36px;\n  padding: 0 16px;\n  border-bottom: 1px solid #1d1d1d;\n  color: #8f8f8f;\n  font-size: 11.5px;\n  font-weight: 500;\n  letter-spacing: .04em;\n  text-align: left;\n  text-transform: uppercase;\n  white-space: nowrap;\n}\n.hb-dsl-tb th[data-r=\"true\"], .hb-dsl-tb td[data-r=\"true\"] { text-align: right; }\n.hb-dsl-th-b {\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  padding: 0;\n  border: 0;\n  background: none;\n  font: inherit;\n  letter-spacing: inherit;\n  text-transform: inherit;\n  color: inherit;\n  cursor: pointer;\n  transition: color .15s ease;\n}\n.hb-dsl-th-b:hover { color: #ededed; }\n.hb-dsl-th-b .hb-dsl-ico { width: 12px; height: 12px; opacity: 0; }\n.hb-dsl-tb th[aria-sort] .hb-dsl-th-b { color: #ededed; }\n.hb-dsl-tb th[aria-sort] .hb-dsl-ico { opacity: 1; }\n.hb-dsl-tb td { padding: 10px 16px; border-bottom: 1px solid #181818; font-variant-numeric: tabular-nums; vertical-align: middle; }\n.hb-dsl-tb tbody tr:last-child td { border-bottom: 0; }\n.hb-dsl-tb tbody tr:hover td { background: #151515; }\n.hb-dsl-prod { display: flex; align-items: center; gap: 12px; min-width: 0; }\n.hb-dsl-prod-i { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; color: #ffffff; font-size: 11px; font-weight: 600; }\n.hb-dsl-prod strong { display: block; font-weight: 500; white-space: nowrap; }\n.hb-dsl-prod div span { color: #6b6b6b; font-size: 12px; }\n.hb-dsl-tr { width: 110px; }\n.hb-dsl-tr .hb-dsl-spark { height: 28px; color: inherit; }\n@keyframes hb-dsl-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n@container hb-dsl (max-width: 959px) {\n  .hb-dsl-top3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }\n  .hb-dsl-top3 > :last-child { grid-column: 1 / -1; }\n  .hb-dsl-row { grid-template-columns: minmax(0, 1fr); }\n}\n@container hb-dsl (max-width: 539px) {\n  .hb-dsl-top3 { grid-template-columns: minmax(0, 1fr); }\n  .hb-dsl-fun { grid-template-columns: minmax(0, 1fr); gap: 16px; }\n  .hb-dsl-fs { padding: 0; border-left: 0; }\n  .hb-dsl-combo { grid-template-columns: 32px minmax(0, 1fr); }\n  .hb-dsl-kpi-v { font-size: 24px; }\n}\n`;\n\nfunction hash(n: number) {\n  let x = Math.imul(n + 1, 2654435761) >>> 0;\n  x ^= x >>> 15;\n  x = Math.imul(x, 2246822519) >>> 0;\n  x ^= x >>> 13;\n  return (x >>> 0) / 4294967296;\n}\n\ntype Pt = [number, number];\n\nfunction smooth(pts: Pt[]) {\n  let d = `M${pts[0][0].toFixed(1)} ${pts[0][1].toFixed(1)}`;\n  for (let i = 0; i < pts.length - 1; i++) {\n    const p0 = pts[i - 1] ?? pts[i];\n    const p1 = pts[i];\n    const p2 = pts[i + 1];\n    const p3 = pts[i + 2] ?? p2;\n    const c1x = p1[0] + (p2[0] - p0[0]) / 6;\n    const c1y = p1[1] + (p2[1] - p0[1]) / 6;\n    const c2x = p2[0] - (p3[0] - p1[0]) / 6;\n    const c2y = p2[1] - (p3[1] - p1[1]) / 6;\n    d += `C${c1x.toFixed(1)} ${c1y.toFixed(1)} ${c2x.toFixed(1)} ${c2y.toFixed(1)} ${p2[0].toFixed(1)} ${p2[1].toFixed(1)}`;\n  }\n  return d;\n}\n\nfunction project(values: number[], w: number, h: number, padY: number, lo?: number, hi?: number): Pt[] {\n  const min = lo ?? Math.min(...values);\n  const max = hi ?? Math.max(...values);\n  const span = max - min || 1;\n  return values.map((v, i) => [\n    values.length === 1 ? w / 2 : (i / (values.length - 1)) * w,\n    padY + (1 - (v - min) / span) * (h - padY * 2),\n  ]);\n}\n\nfunction tone(name: string) {\n  let h = 0;\n  for (let i = 0; i < name.length; i++) h = (h * 31 + name.charCodeAt(i)) >>> 0;\n  const hue = h % 360;\n  return `linear-gradient(135deg, hsl(${hue} 62% 52%), hsl(${(hue + 48) % 360} 62% 36%))`;\n}\n\nfunction initials(name: string) {\n  return name\n    .split(\" \")\n    .map((w) => w[0])\n    .slice(0, 2)\n    .join(\"\")\n    .toUpperCase();\n}\n\nconst icons: Record<string, string[]> = {\n  grid: [\"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z\"],\n  bars: [\"M18 20V10M12 20V4M6 20v-6\"],\n  users: [\"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2\", \"M9 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z\", \"M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75\"],\n  sliders: [\"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6\"],\n  bell: [\"M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9\", \"M13.7 21a2 2 0 0 1-3.4 0\"],\n  search: [\"M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\", \"M21 21l-4.3-4.3\"],\n  trend: [\"M22 7l-8.5 8.5-5-5L2 17\", \"M16 7h6v6\"],\n  dollar: [\"M12 1v22\", \"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6\"],\n  cart: [\"M6 6h15l-2 9H8z\", \"M6 6L5 3H2\", \"M9 20a1 1 0 1 0 0 .01\", \"M18 20a1 1 0 1 0 0 .01\"],\n  box: [\"M21 8l-9-5-9 5v8l9 5 9-5z\", \"M3 8l9 5 9-5M12 13v9\"],\n  up: [\"M12 19V5M5 12l7-7 7 7\"],\n  down: [\"M12 5v14M19 12l-7 7-7-7\"],\n  chevr: [\"M9 6l6 6-6 6\"],\n  download: [\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", \"M7 10l5 5 5-5M12 15V3\"],\n  plus: [\"M12 5v14M5 12h14\"],\n};\n\nfunction Ico({ n }: { n: string }) {\n  return (\n    <svg className=\"hb-dsl-ico\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      {(icons[n] ?? []).map((d, i) => (\n        <path key={i} d={d} />\n      ))}\n    </svg>\n  );\n}\n\nfunction Spark({ values, id }: { values: number[]; id: string }) {\n  const line = smooth(project(values, 100, 32, 3));\n  return (\n    <svg className=\"hb-dsl-spark\" viewBox=\"0 0 100 32\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n      <defs>\n        <linearGradient id={id} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopColor=\"currentColor\" stopOpacity=\".26\" />\n          <stop offset=\"1\" stopColor=\"currentColor\" stopOpacity=\"0\" />\n        </linearGradient>\n      </defs>\n      <path d={`${line}L100 32L0 32Z`} fill={`url(#${id})`} />\n      <path className=\"hb-dsl-spark-l\" d={line} />\n    </svg>\n  );\n}\n\nfunction Delta({ value, good = true, suffix = \"%\" }: { value: number; good?: boolean; suffix?: string }) {\n  const up = value >= 0;\n  const t = value === 0 ? \"flat\" : up === good ? \"up\" : \"down\";\n  return (\n    <span className=\"hb-dsl-pill\" data-t={t}>\n      <Ico n={up ? \"up\" : \"down\"} />\n      {Math.abs(value).toFixed(1)}\n      {suffix}\n    </span>\n  );\n}\n\ninterface NavItem {\n  id: string;\n  label: string;\n  icon: string;\n  count?: string;\n  section?: string;\n}\nfunction Shell({\n  brand,\n  nav,\n  defaultActive,\n  crumb,\n  placeholder,\n  user,\n  foot,\n  children,\n}: {\n  brand: string;\n  nav: NavItem[];\n  defaultActive: string;\n  crumb: [string, string];\n  placeholder: string;\n  user: string;\n  foot?: React.ReactNode;\n  children: React.ReactNode;\n}) {\n  const [active, setActive] = React.useState(defaultActive);\n  return (\n    <div className=\"hb-dsl-app\">\n      <aside className=\"hb-dsl-side\">\n        <div className=\"hb-dsl-brand\">\n          <span className=\"hb-dsl-mark\" aria-hidden=\"true\">\n            <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n              <path d=\"M4 18L10 6l4 8 2-4 4 8\" />\n            </svg>\n          </span>\n          <span>{brand}</span>\n        </div>\n        <nav aria-label=\"Main\">\n          <ul className=\"hb-dsl-nav\">\n            {nav.map((item) => (\n              <React.Fragment key={item.id}>\n                {item.section ? (\n                  <li className=\"hb-dsl-nav-label\" aria-hidden=\"true\">\n                    {item.section}\n                  </li>\n                ) : null}\n                <li>\n                  <button type=\"button\" className=\"hb-dsl-link\" aria-current={active === item.id ? \"page\" : undefined} aria-label={item.label} onClick={() => setActive(item.id)}>\n                    <Ico n={item.icon} />\n                    <span className=\"hb-dsl-link-t\">{item.label}</span>\n                    {item.count ? <span className=\"hb-dsl-link-n\">{item.count}</span> : null}\n                  </button>\n                </li>\n              </React.Fragment>\n            ))}\n          </ul>\n        </nav>\n        {foot ? <div className=\"hb-dsl-side-foot\">{foot}</div> : null}\n      </aside>\n      <div className=\"hb-dsl-main\">\n        <header className=\"hb-dsl-top\">\n          <div className=\"hb-dsl-crumb\">\n            {crumb[0]} / <strong>{crumb[1]}</strong>\n          </div>\n          <label className=\"hb-dsl-search\">\n            <Ico n=\"search\" />\n            <input type=\"search\" placeholder={placeholder} aria-label={placeholder} />\n            <span className=\"hb-dsl-kbd\">/</span>\n          </label>\n          <button type=\"button\" className=\"hb-dsl-iconbtn\" aria-label=\"Notifications\">\n            <Ico n=\"bell\" />\n            <span className=\"hb-dsl-dot\" />\n          </button>\n          <span className=\"hb-dsl-av\" style={{ background: tone(user), width: 34, height: 34 }} title={user}>\n            {initials(user)}\n          </span>\n        </header>\n        <div className=\"hb-dsl-content\">{children}</div>\n      </div>\n    </div>\n  );\n}\n\nconst PERIODS: SalesPeriod[] = [\"H1\", \"H2\", \"FY\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nconst REVENUE = [212, 238, 261, 254, 289, 322, 310, 348, 371, 392, 428, 471];\nconst TARGET = [240, 260, 280, 295, 310, 330, 345, 360, 380, 400, 420, 440];\nconst AOV = [82, 84, 83, 86, 85, 88, 87, 89, 91, 90, 93, 96];\nconst PREV = REVENUE.map((v, i) => v * (0.76 + hash(i + 70) * 0.1));\nconst RANGE: Record<SalesPeriod, [number, number]> = { H1: [0, 6], H2: [6, 12], FY: [0, 12] };\n\nconst REGIONS = [\n  { name: \"North America\", detail: \"US, Canada\", share: 38.2, delta: 11.4 },\n  { name: \"Europe\", detail: \"EU, UK\", share: 27.6, delta: 7.9 },\n  { name: \"Asia Pacific\", detail: \"JP, AU, SG\", share: 20.8, delta: 16.2 },\n  { name: \"Latin America\", detail: \"BR, MX, CL\", share: 9.4, delta: 4.3 },\n  { name: \"Middle East & Africa\", detail: \"AE, ZA\", share: 4.0, delta: -2.1 },\n];\n\nconst PRODUCTS = [\n  { name: \"Aero Desk Lamp\", cat: \"Lighting\", units: 4820, price: 64, growth: 18.4 },\n  { name: \"Fieldnote Journal\", cat: \"Stationery\", units: 9310, price: 24, growth: 9.2 },\n  { name: \"Halo Wireless Charger\", cat: \"Electronics\", units: 3660, price: 49, growth: -4.1 },\n  { name: \"Ridge Travel Mug\", cat: \"Drinkware\", units: 6140, price: 32, growth: 22.7 },\n  { name: \"Tern Laptop Sleeve\", cat: \"Accessories\", units: 2890, price: 58, growth: 6.5 },\n  { name: \"Drift Desk Mat\", cat: \"Workspace\", units: 3310, price: 39, growth: -1.3 },\n].map((p, i) => ({\n  ...p,\n  trend: Array.from({ length: 8 }, (_, k) => 50 + k * p.growth * 0.5 + hash(i * 11 + k) * 16),\n}));\n\nconst NAV: NavItem[] = [\n  { id: \"overview\", label: \"Overview\", icon: \"grid\", section: \"Sales\" },\n  { id: \"orders\", label: \"Orders\", icon: \"cart\", count: \"128\" },\n  { id: \"products\", label: \"Products\", icon: \"box\" },\n  { id: \"customers\", label: \"Customers\", icon: \"users\" },\n  { id: \"reports\", label: \"Reports\", icon: \"bars\", section: \"Insights\" },\n  { id: \"forecast\", label: \"Forecast\", icon: \"trend\" },\n  { id: \"settings\", label: \"Settings\", icon: \"sliders\", section: \"Workspace\" },\n];\n\ntype SortKey = \"units\" | \"revenue\" | \"growth\";\n\nfunction sum(a: number[]) {\n  return a.reduce((t, v) => t + v, 0);\n}\n\nfunction pct(cur: number, prev: number) {\n  return ((cur - prev) / prev) * 100;\n}\n\nfunction money(k: number, c: string) {\n  return k >= 1000 ? `${c}${(k / 1000).toFixed(2)}M` : `${c}${Math.round(k)}K`;\n}\n\nfunction count(n: number) {\n  return Math.round(n).toLocaleString(\"en-US\");\n}\n\nfunction short(n: number) {\n  return n >= 1000 ? `${(n / 1000).toFixed(n >= 100000 ? 0 : 1)}K` : String(Math.round(n));\n}\n\nexport function SalesDashboard({\n  accent = \"#2f7bff\",\n  brand = \"Ledgerly\",\n  user = \"Priya Nair\",\n  currency = \"$\",\n  period,\n  defaultPeriod = \"FY\",\n  onPeriodChange,\n  className = \"\",\n  style,\n  ...rest\n}: SalesDashboardProps) {\n  const uid = React.useId().replace(/:/g, \"\");\n  const [inner, setInner] = React.useState<SalesPeriod>(defaultPeriod);\n  const [hover, setHover] = React.useState<number | null>(null);\n  const [sort, setSort] = React.useState<{ key: SortKey; dir: 1 | -1 }>({ key: \"revenue\", dir: -1 });\n  const current = period ?? inner;\n  const [from, to] = RANGE[current];\n  const months = MONTHS.slice(from, to);\n  const rev = REVENUE.slice(from, to);\n  const tgt = TARGET.slice(from, to);\n  const ords = rev.map((v, i) => (v * 1000) / AOV[from + i]);\n  const prevOrds = PREV.slice(from, to).map((v, i) => (v * 1000) / (AOV[from + i] - 4));\n  const totalRev = sum(rev);\n  const totalTgt = sum(tgt);\n  const totalOrders = sum(ords);\n  const progress = (totalRev / totalTgt) * 100;\n  const n = rev.length;\n  const top = Math.ceil(Math.max(...rev, ...tgt) / 100) * 100;\n  const ticks = top / 100;\n  const factor = totalRev / sum(REVENUE);\n\n  const pick = (p: SalesPeriod) => {\n    setInner(p);\n    setHover(null);\n    onPeriodChange?.(p);\n  };\n\n  const targetLine = smooth(tgt.map((v, i): Pt => [((i + 0.5) / n) * 100, (1 - v / top) * 100]));\n\n  const orders = Math.round(totalOrders);\n  const stages = [\n    { label: \"Store visits\", value: orders / 0.0499 },\n    { label: \"Product views\", value: orders / 0.0499 / 2.2 },\n    { label: \"Added to cart\", value: orders / 0.66 / 0.59 },\n    { label: \"Checkout started\", value: orders / 0.66 },\n    { label: \"Purchased\", value: orders },\n  ];\n\n  const rows = PRODUCTS.map((p) => ({ ...p, units: p.units * factor, revenue: p.units * factor * p.price }));\n  rows.sort((a, b) => (a[sort.key] - b[sort.key]) * sort.dir);\n\n  const toggleSort = (key: SortKey) => setSort((s) => (s.key === key ? { key, dir: s.dir === 1 ? -1 : 1 } : { key, dir: -1 }));\n  const th = (key: SortKey, label: string) => (\n    <th data-r=\"true\" aria-sort={sort.key === key ? (sort.dir === 1 ? \"ascending\" : \"descending\") : undefined}>\n      <button type=\"button\" className=\"hb-dsl-th-b\" onClick={() => toggleSort(key)}>\n        {label}\n        <Ico n={sort.key === key && sort.dir === 1 ? \"up\" : \"down\"} />\n      </button>\n    </th>\n  );\n\n  const hp = hover === null ? null : ((hover + 0.5) / n) * 100;\n  const vars = { \"--a\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <div className={`hb-dsl ${className}`} style={vars} {...rest}>\n      <style href=\"hb-sales-dashboard\" precedence=\"default\">\n        {css}\n      </style>\n      <Shell\n        brand={brand}\n        nav={NAV}\n        defaultActive=\"overview\"\n        crumb={[\"Sales\", \"Overview\"]}\n        placeholder=\"Search orders, products\"\n        user={user}\n        foot={\n          <div className=\"hb-dsl-status\">\n            <i />\n            <div>\n              <strong>Store is live</strong>\n              <span>Synced 2 min ago</span>\n            </div>\n          </div>\n        }\n      >\n        <div className=\"hb-dsl-head\">\n          <div>\n            <h2 className=\"hb-dsl-title\">Revenue overview</h2>\n            <p className=\"hb-dsl-sub\">Fiscal year 2025 · all channels</p>\n          </div>\n          <div className=\"hb-dsl-tools\">\n            <div className=\"hb-dsl-seg\" role=\"group\" aria-label=\"Period\">\n              {PERIODS.map((p) => (\n                <button key={p} type=\"button\" aria-pressed={current === p} onClick={() => pick(p)}>\n                  {p}\n                </button>\n              ))}\n            </div>\n            <button type=\"button\" className=\"hb-dsl-btn\">\n              <Ico n=\"download\" />\n              Export\n            </button>\n            <button type=\"button\" className=\"hb-dsl-btn\" data-p=\"true\">\n              <Ico n=\"plus\" />\n              New report\n            </button>\n          </div>\n        </div>\n\n        <div className=\"hb-dsl-top3\">\n          <div className=\"hb-dsl-card hb-dsl-kpi\" style={{ \"--k\": \"var(--a)\", \"--d\": 0 } as React.CSSProperties}>\n            <div className=\"hb-dsl-kpi-top\">\n              <span className=\"hb-dsl-kpi-l\">\n                <span className=\"hb-dsl-kpi-i\">\n                  <Ico n=\"dollar\" />\n                </span>\n                Total revenue\n              </span>\n              <Delta value={pct(totalRev, sum(PREV.slice(from, to)))} />\n            </div>\n            <p className=\"hb-dsl-kpi-v\">{money(totalRev, currency)}</p>\n            <Spark key={`r${current}`} values={rev} id={`${uid}r`} />\n          </div>\n          <div className=\"hb-dsl-card hb-dsl-kpi\" style={{ \"--k\": \"#a78bfa\", \"--d\": 1 } as React.CSSProperties}>\n            <div className=\"hb-dsl-kpi-top\">\n              <span className=\"hb-dsl-kpi-l\">\n                <span className=\"hb-dsl-kpi-i\">\n                  <Ico n=\"cart\" />\n                </span>\n                Orders\n              </span>\n              <Delta value={pct(totalOrders, sum(prevOrds))} />\n            </div>\n            <p className=\"hb-dsl-kpi-v\">{count(orders)}</p>\n            <Spark key={`o${current}`} values={ords} id={`${uid}o`} />\n          </div>\n          <div className=\"hb-dsl-card\" style={{ \"--d\": 2 } as React.CSSProperties}>\n            <div className=\"hb-dsl-card-h\" style={{ marginBottom: 12 }}>\n              <h3 className=\"hb-dsl-card-t\">Goal progress</h3>\n              <span className=\"hb-dsl-pill\" data-t={progress >= 100 ? \"up\" : \"flat\"}>\n                {progress >= 100 ? \"Goal reached\" : \"On track\"}\n              </span>\n            </div>\n            <div className=\"hb-dsl-ringc\">\n              <div className=\"hb-dsl-ring\">\n                <svg viewBox=\"0 0 42 42\" role=\"img\" aria-label={`${progress.toFixed(0)} percent of target`}>\n                  <circle className=\"hb-dsl-ring-t\" cx=\"21\" cy=\"21\" r=\"15.9155\" />\n                  <circle\n                    key={current}\n                    className=\"hb-dsl-ring-p\"\n                    cx=\"21\"\n                    cy=\"21\"\n                    r=\"15.9155\"\n                    pathLength={100}\n                    style={{ strokeDasharray: `${Math.min(progress, 100).toFixed(2)} 100` }}\n                  />\n                </svg>\n                <span className=\"hb-dsl-ring-v\">{progress.toFixed(0)}%</span>\n              </div>\n              <div className=\"hb-dsl-ringc-x\">\n                <p>\n                  <b>{money(totalRev, currency)}</b> of {money(totalTgt, currency)} target\n                </p>\n                <p>{progress >= 100 ? `${money(totalRev - totalTgt, currency)} above plan` : `${money(totalTgt - totalRev, currency)} to go`}</p>\n              </div>\n            </div>\n          </div>\n        </div>\n\n        <div className=\"hb-dsl-row\">\n          <div className=\"hb-dsl-card\" style={{ \"--d\": 3 } as React.CSSProperties}>\n            <div className=\"hb-dsl-card-h\">\n              <div>\n                <h3 className=\"hb-dsl-card-t\">Revenue vs target</h3>\n                <p className=\"hb-dsl-card-s\">Monthly, in thousands</p>\n              </div>\n              <div className=\"hb-dsl-legend-k\">\n                <span>\n                  <i />\n                  Revenue\n                </span>\n                <span>\n                  <i data-line=\"true\" />\n                  Target\n                </span>\n              </div>\n            </div>\n            <div className=\"hb-dsl-combo\" style={{ \"--n\": n } as React.CSSProperties}>\n              <div className=\"hb-dsl-yl\" aria-hidden=\"true\">\n                {Array.from({ length: ticks + 1 }, (_, k) => (\n                  <span key={k} style={{ bottom: `${((k / ticks) * 100).toFixed(2)}%` }}>\n                    {k === 0 ? \"0\" : `${currency}${k * 100}K`}\n                  </span>\n                ))}\n              </div>\n              <div className=\"hb-dsl-plot\" onPointerLeave={() => setHover(null)}>\n                {Array.from({ length: ticks + 1 }, (_, k) => (\n                  <div key={k} className=\"hb-dsl-gl\" style={{ bottom: `${((k / ticks) * 100).toFixed(2)}%` }} />\n                ))}\n                <div className=\"hb-dsl-cols\" key={current}>\n                  {rev.map((v, i) => (\n                    <button\n                      key={months[i]}\n                      type=\"button\"\n                      className=\"hb-dsl-col\"\n                      data-on={hover === i}\n                      aria-label={`${months[i]}: revenue ${currency}${v}K, target ${currency}${tgt[i]}K`}\n                      onPointerEnter={() => setHover(i)}\n                      onFocus={() => setHover(i)}\n                      onBlur={() => setHover(null)}\n                    >\n                      <span className=\"hb-dsl-bar\" data-hit={v >= tgt[i]} style={{ height: `${((v / top) * 100).toFixed(2)}%`, \"--i\": i } as React.CSSProperties} />\n                    </button>\n                  ))}\n                </div>\n                <svg className=\"hb-dsl-target\" key={`t${current}`} viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n                  <path d={targetLine} />\n                </svg>\n                {hover !== null && hp !== null ? (\n                  <div className=\"hb-dsl-tt\" style={{ top: 4, left: `${hp.toFixed(2)}%`, transform: hp > 62 ? \"translateX(calc(-100% - 22px))\" : \"translateX(22px)\" }}>\n                    <div className=\"hb-dsl-tt-d\">{months[hover]} 2025</div>\n                    <div>\n                      Revenue <b>{currency}{rev[hover]}K</b>\n                    </div>\n                    <div>\n                      Target <b>{currency}{tgt[hover]}K</b>\n                    </div>\n                    <div>\n                      <Delta value={pct(rev[hover], tgt[hover])} />\n                    </div>\n                  </div>\n                ) : null}\n              </div>\n              <div className=\"hb-dsl-xl\" aria-hidden=\"true\">\n                {months.map((m) => (\n                  <span key={m}>{m}</span>\n                ))}\n              </div>\n            </div>\n          </div>\n\n          <div className=\"hb-dsl-card\" style={{ \"--d\": 4 } as React.CSSProperties}>\n            <div className=\"hb-dsl-card-h\">\n              <div>\n                <h3 className=\"hb-dsl-card-t\">Sales by region</h3>\n                <p className=\"hb-dsl-card-s\">Share of revenue</p>\n              </div>\n            </div>\n            <ul className=\"hb-dsl-reg\">\n              {REGIONS.map((r, i) => (\n                <li key={r.name}>\n                  <div className=\"hb-dsl-reg-r\">\n                    <span className=\"hb-dsl-reg-n\" title={r.detail}>\n                      {r.name}\n                    </span>\n                    <span className=\"hb-dsl-reg-v\">{money((totalRev * r.share) / 100, currency)}</span>\n                  </div>\n                  <div className=\"hb-dsl-reg-m\">\n                    <div className=\"hb-dsl-reg-b\">\n                    <i\n                      key={current}\n                      style={{\n                        \"--w\": `${((r.share / REGIONS[0].share) * 100).toFixed(1)}%`,\n                        \"--c\": `color-mix(in srgb, var(--a) ${100 - i * 16}%, #2a2a2a)`,\n                        animationDelay: `${i * 80}ms`,\n                      } as React.CSSProperties}\n                    />\n                    </div>\n                    <Delta value={r.delta} />\n                  </div>\n                </li>\n              ))}\n            </ul>\n          </div>\n        </div>\n\n        <div className=\"hb-dsl-card\" style={{ \"--d\": 5 } as React.CSSProperties}>\n          <div className=\"hb-dsl-card-h\">\n            <div>\n              <h3 className=\"hb-dsl-card-t\">Conversion funnel</h3>\n              <p className=\"hb-dsl-card-s\">From first visit to paid order</p>\n            </div>\n            <span className=\"hb-dsl-pill\" data-t=\"up\">\n              {((stages[4].value / stages[0].value) * 100).toFixed(2)}% overall\n            </span>\n          </div>\n          <div className=\"hb-dsl-fun\" key={current}>\n            {stages.map((s, i) => (\n              <div className=\"hb-dsl-fs\" key={s.label}>\n                <div className=\"hb-dsl-fs-l\">{s.label}</div>\n                <div className=\"hb-dsl-fs-v\">{short(s.value)}</div>\n                <div className=\"hb-dsl-fs-b\">\n                  <i style={{ \"--w\": `${((s.value / stages[0].value) * 100).toFixed(1)}%`, \"--o\": (1 - i * 0.12).toFixed(2), \"--i\": i } as React.CSSProperties} />\n                </div>\n                <div className=\"hb-dsl-fs-c\">{i === 0 ? \"Entry point\" : <><b>{((s.value / stages[i - 1].value) * 100).toFixed(1)}%</b> of previous</>}</div>\n              </div>\n            ))}\n          </div>\n        </div>\n\n        <div className=\"hb-dsl-card\" style={{ \"--d\": 6 } as React.CSSProperties}>\n          <div className=\"hb-dsl-card-h\">\n            <div>\n              <h3 className=\"hb-dsl-card-t\">Top products</h3>\n              <p className=\"hb-dsl-card-s\">Click a column to sort</p>\n            </div>\n            <button type=\"button\" className=\"hb-dsl-btn\">\n              View catalog\n              <Ico n=\"chevr\" />\n            </button>\n          </div>\n          <div className=\"hb-dsl-tw\">\n            <table className=\"hb-dsl-tb\">\n              <thead>\n                <tr>\n                  <th>Product</th>\n                  {th(\"units\", \"Units\")}\n                  {th(\"revenue\", \"Revenue\")}\n                  {th(\"growth\", \"Growth\")}\n                  <th className=\"hb-dsl-tr\">Trend</th>\n                </tr>\n              </thead>\n              <tbody>\n                {rows.map((p, i) => (\n                  <tr key={p.name}>\n                    <td>\n                      <div className=\"hb-dsl-prod\">\n                        <span className=\"hb-dsl-prod-i\" style={{ background: tone(p.name) }}>\n                          {initials(p.name)}\n                        </span>\n                        <div>\n                          <strong>{p.name}</strong>\n                          <span>{p.cat}</span>\n                        </div>\n                      </div>\n                    </td>\n                    <td data-r=\"true\">{count(p.units)}</td>\n                    <td data-r=\"true\">{money(p.revenue / 1000, currency)}</td>\n                    <td data-r=\"true\">\n                      <Delta value={p.growth} />\n                    </td>\n                    <td className=\"hb-dsl-tr\">\n                      <div style={{ color: p.growth >= 0 ? \"#4ade80\" : \"#f87171\" }}>\n                        <Spark values={p.trend} id={`${uid}p${i}`} />\n                      </div>\n                    </td>\n                  </tr>\n                ))}\n              </tbody>\n            </table>\n          </div>\n        </div>\n      </Shell>\n    </div>\n  );\n}\n"
    }
  ]
}