{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dashboard-support",
  "type": "registry:component",
  "title": "Customer Support Dashboard",
  "description": "A help desk overview with segmented KPI meters, ticket volume by hour against last week and a forecast, an SLA gauge with a target marker, a queue with priority pills, assignees and SLA countdowns, a CSAT trend and a live activity feed.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "dashboards",
    "dashboard",
    "support",
    "tickets",
    "sla",
    "gauge",
    "queue"
  ],
  "docs": "https://hyperblur.dev/effects/dashboard-support",
  "files": [
    {
      "path": "registry/hyperblur/dashboard-support.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/dashboard-support.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type SupportView = \"all\" | \"mine\" | \"urgent\" | \"unassigned\";\nexport type SupportPriority = \"Urgent\" | \"High\" | \"Normal\" | \"Low\";\n\nexport interface SupportTicket {\n  id: string;\n  subject: string;\n  customer: string;\n  priority: SupportPriority;\n  assignees: string[];\n  waiting: string;\n  channel: \"email\" | \"chat\" | \"phone\";\n  slaMinutes: number;\n}\n\nexport interface DashboardSupportProps extends React.HTMLAttributes<HTMLDivElement> {\n  accent?: string;\n  brand?: string;\n  user?: string;\n  tickets?: SupportTicket[];\n  view?: SupportView;\n  defaultView?: SupportView;\n  onViewChange?: (view: SupportView) => void;\n  onTicketOpen?: (ticket: SupportTicket) => void;\n}\n\nconst css = `\n.hb-yd3 {\n  --a: #8b7cff;\n  container: hb-yd3 / inline-size;\n  box-sizing: border-box;\n  width: 100%;\n  border: 1px solid #1f2024;\n  border-radius: 16px;\n  background: #0b0b0d;\n  color: #ebebef;\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-yd3 *, .hb-yd3 *::before, .hb-yd3 *::after { box-sizing: border-box; }\n.hb-yd3 button, .hb-yd3 input { font: inherit; color: inherit; }\n.hb-yd3 button:focus-visible, .hb-yd3 input:focus-visible, .hb-yd3 [tabindex]:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }\n.hb-yd3-app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 700px; }\n.hb-yd3-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 10px; border-right: 1px solid #1c1d21; background: #0e0e11; }\n.hb-yd3-brand { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 8px; margin-bottom: 6px; font-size: 14px; font-weight: 600; }\n.hb-yd3-mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--a) 40%, #ffffff), var(--a) 60%); color: #ffffff; box-shadow: 0 0 16px -2px var(--a); }\n.hb-yd3-new { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; margin: 0 4px 10px; border: 1px solid color-mix(in srgb, var(--a) 45%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--a) 14%, transparent); color: #ffffff; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .15s ease; }\n.hb-yd3-new:hover { background: color-mix(in srgb, var(--a) 24%, transparent); }\n.hb-yd3-grp { padding: 10px 10px 4px; color: #66676e; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }\n.hb-yd3-views { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; list-style: none; }\n.hb-yd3-vl { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #a0a1a8; font-size: 13px; text-align: left; cursor: pointer; transition: background .15s ease, color .15s ease; }\n.hb-yd3-vl:hover { background: #16171b; color: #ebebef; }\n.hb-yd3-vl[aria-current=\"true\"] { background: #1a1b20; color: #ffffff; }\n.hb-yd3-vl[aria-current=\"true\"] .hb-yd3-ico { color: var(--a); }\n.hb-yd3-vl em { margin-left: auto; color: #66676e; font-size: 11.5px; font-style: normal; font-variant-numeric: tabular-nums; }\n.hb-yd3-vl em[data-hot=\"true\"] { padding: 0 6px; border-radius: 999px; background: rgba(251, 113, 133, .16); color: #fb7185; font-weight: 600; }\n.hb-yd3-vl i { width: 8px; height: 8px; margin: 0 4px; border-radius: 3px; }\n.hb-yd3-me { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 10px; border: 1px solid #1f2025; border-radius: 12px; background: #121216; }\n.hb-yd3-me-t { min-width: 0; flex: 1; }\n.hb-yd3-me-t b { display: block; overflow: hidden; font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yd3-me-t span { color: #7a7b83; font-size: 11.5px; }\n.hb-yd3-sw { position: relative; flex: none; width: 34px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: #2a2b31; cursor: pointer; transition: background .2s ease; }\n.hb-yd3-sw::after { content: \"\"; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .2s cubic-bezier(.3, .7, .2, 1); }\n.hb-yd3-sw[aria-checked=\"true\"] { background: #34d399; }\n.hb-yd3-sw[aria-checked=\"true\"]::after { transform: translateX(14px); }\n.hb-yd3-av { position: relative; display: grid; place-items: center; flex: none; border-radius: 50%; color: #ffffff; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }\n.hb-yd3-av[data-on=\"true\"]::after { content: \"\"; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border: 2px solid #0e0e11; border-radius: 50%; background: #34d399; }\n.hb-yd3-av[data-on=\"false\"]::after { content: \"\"; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border: 2px solid #0e0e11; border-radius: 50%; background: #66676e; }\n.hb-yd3-main { display: flex; flex-direction: column; min-width: 0; }\n.hb-yd3-top { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 22px; border-bottom: 1px solid #1c1d21; }\n.hb-yd3-top h2 { margin: 0; overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yd3-live { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(52, 211, 153, .1); color: #34d399; font-size: 11.5px; font-weight: 600; }\n.hb-yd3-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: hb-yd3-ping 1.6s ease-out infinite; }\n.hb-yd3-search { position: relative; width: 250px; margin-left: auto; color: #66676e; }\n.hb-yd3-search svg { position: absolute; top: 50%; left: 10px; width: 15px; height: 15px; transform: translateY(-50%); pointer-events: none; }\n.hb-yd3-search input { width: 100%; height: 34px; padding: 0 12px 0 32px; border: 1px solid #23242a; border-radius: 9px; background: #121216; font-size: 13px; }\n.hb-yd3-search input::placeholder { color: #66676e; }\n.hb-yd3-search input:focus-visible { border-color: var(--a); outline-offset: 0; }\n.hb-yd3-ibtn { position: relative; display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1px solid #23242a; border-radius: 9px; background: #121216; color: #a0a1a8; cursor: pointer; }\n.hb-yd3-ibtn:hover { color: #ffffff; border-color: #33343b; }\n.hb-yd3-ico { display: block; flex: none; width: 16px; height: 16px; }\n.hb-yd3-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px 22px 22px; }\n.hb-yd3-card { min-width: 0; padding: 16px; border: 1px solid #1f2025; border-radius: 14px; background: #111114; animation: hb-yd3-rise .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 65ms); }\n.hb-yd3-ch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }\n.hb-yd3-ct { margin: 0; font-size: 13px; font-weight: 600; }\n.hb-yd3-cs { margin: 2px 0 0; color: #7a7b83; font-size: 12px; }\n.hb-yd3-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }\n.hb-yd3-kpi { display: flex; flex-direction: column; gap: 10px; }\n.hb-yd3-kpi-h { display: flex; align-items: center; justify-content: space-between; color: #8a8b93; font-size: 12px; }\n.hb-yd3-kpi-v { display: flex; align-items: baseline; gap: 8px; }\n.hb-yd3-kpi-v b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }\n.hb-yd3-kpi-v span { font-size: 12px; font-weight: 600; }\n.hb-yd3-up { color: #34d399; }\n.hb-yd3-dn { color: #fb7185; }\n.hb-yd3-meter { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; height: 14px; }\n.hb-yd3-meter i { border-radius: 2px; background: #222329; animation: hb-yd3-fade .4s both; }\n.hb-yd3-meter i[data-on=\"true\"] { background: var(--k); }\n.hb-yd3-meter i[data-mark=\"true\"] { box-shadow: 0 0 0 1px #ffffff inset; }\n.hb-yd3-kpi-f { color: #66676e; font-size: 11.5px; }\n.hb-yd3-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; }\n.hb-yd3-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }\n.hb-yd3-leg { display: flex; flex-wrap: wrap; gap: 12px; color: #8a8b93; font-size: 12px; }\n.hb-yd3-leg span { display: inline-flex; align-items: center; gap: 6px; }\n.hb-yd3-leg i { width: 10px; height: 10px; border-radius: 3px; background: var(--a); }\n.hb-yd3-leg i[data-k=\"fc\"] { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--a) 55%, transparent) 0 2px, transparent 2px 4px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--a) 45%, transparent) inset; }\n.hb-yd3-leg i[data-k=\"lw\"] { height: 2px; background: #c7c8cf; }\n.hb-yd3-hours { position: relative; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); grid-template-rows: 100%; align-items: end; gap: 4px; height: 190px; padding-top: 8px; border-bottom: 1px solid #26272d; background-image: linear-gradient(#1a1b1f 1px, transparent 1px); background-size: 100% 25%; }\n.hb-yd3-hb { position: relative; height: 100%; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; }\n.hb-yd3-hb span { position: absolute; right: 0; bottom: 0; left: 0; height: var(--h); border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--a), color-mix(in srgb, var(--a) 55%, #0b0b0d)); transform-origin: bottom; animation: hb-yd3-grow .7s cubic-bezier(.3, .7, .2, 1) both; transition: filter .15s ease; }\n.hb-yd3-hb[data-fc=\"true\"] span { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--a) 40%, transparent) 0 2px, transparent 2px 5px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--a) 35%, transparent) inset; }\n.hb-yd3-hb[data-now=\"true\"] span { box-shadow: 0 0 18px -2px var(--a); }\n.hb-yd3-hb em { font-style: normal; position: absolute; right: -1px; left: -1px; bottom: var(--l); height: 2px; border-radius: 2px; background: #c7c8cf; opacity: .75; }\n.hb-yd3-hb:hover span, .hb-yd3-hb:focus-visible span { filter: brightness(1.3); }\n.hb-yd3-hx { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; padding-top: 7px; color: #66676e; font-size: 10.5px; text-align: center; }\n.hb-yd3-hx span:nth-child(3n + 2), .hb-yd3-hx span:nth-child(3n) { visibility: hidden; }\n.hb-yd3-tt { position: absolute; z-index: 3; padding: 8px 10px; border: 1px solid #2c2d34; border-radius: 9px; background: rgba(20, 20, 24, .96); box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .8); font-size: 12px; line-height: 1.5; white-space: nowrap; pointer-events: none; }\n.hb-yd3-tt-d { color: #8a8b93; font-size: 11px; }\n.hb-yd3-tt b { font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-yd3-gauge { position: relative; max-width: 260px; margin: 0 auto; }\n.hb-yd3-gauge svg { display: block; width: 100%; height: auto; overflow: visible; }\n.hb-yd3-g-t { fill: none; stroke: #1e1f24; stroke-width: 12; stroke-linecap: round; }\n.hb-yd3-g-v { fill: none; stroke-width: 12; stroke-linecap: round; animation: hb-yd3-dash 1.2s .2s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-yd3-g-tk { stroke: #2c2d33; stroke-width: 1.5; }\n.hb-yd3-g-tg { stroke: #ffffff; stroke-width: 2; }\n.hb-yd3-needle { transform-origin: 100px 100px; animation: hb-yd3-needle 1.3s .2s cubic-bezier(.3, 1.4, .4, 1) both; }\n.hb-yd3-gc { position: absolute; right: 0; bottom: 0; left: 0; text-align: center; }\n.hb-yd3-gc b { display: block; font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }\n.hb-yd3-gc span { color: #7a7b83; font-size: 12px; }\n.hb-yd3-gs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }\n.hb-yd3-gs div { padding: 9px 10px; border: 1px solid #1f2025; border-radius: 10px; background: #0d0d10; }\n.hb-yd3-gs span { display: flex; align-items: center; gap: 6px; color: #7a7b83; font-size: 11.5px; }\n.hb-yd3-gs span i { width: 6px; height: 6px; border-radius: 50%; }\n.hb-yd3-gs b { display: block; margin-top: 2px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-yd3-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #1f2025; border-radius: 9px; background: #0d0d10; }\n.hb-yd3-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #8a8b93; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .15s ease, color .15s ease; }\n.hb-yd3-tabs button:hover { color: #ffffff; }\n.hb-yd3-tabs button[aria-pressed=\"true\"] { background: #222329; color: #ffffff; }\n.hb-yd3-tabs em { color: #66676e; font-size: 11px; font-style: normal; font-variant-numeric: tabular-nums; }\n.hb-yd3-q { display: flex; flex-direction: column; margin: 0 -8px; padding: 0; list-style: none; }\n.hb-yd3-qr {\n  display: grid;\n  grid-template-columns: 62px minmax(0, 1fr) 78px 64px 92px;\n  align-items: center;\n  gap: 12px;\n  width: 100%;\n  padding: 10px 8px;\n  border: 0;\n  border-top: 1px solid #1a1b1f;\n  border-radius: 9px;\n  background: transparent;\n  text-align: left;\n  cursor: pointer;\n  animation: hb-yd3-rise .4s cubic-bezier(.2, .7, .2, 1) both;\n  transition: background .15s ease;\n}\n.hb-yd3-q li:first-child .hb-yd3-qr { border-top-color: transparent; }\n.hb-yd3-qr:hover, .hb-yd3-qr:focus-visible { background: #17181c; }\n.hb-yd3-qid { color: #66676e; font-size: 12px; font-variant-numeric: tabular-nums; }\n.hb-yd3-qid svg { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; }\n.hb-yd3-qs { min-width: 0; }\n.hb-yd3-qs b { display: block; overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yd3-qs span { display: block; overflow: hidden; color: #7a7b83; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yd3-pri { display: inline-flex; align-items: center; gap: 5px; justify-self: start; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }\n.hb-yd3-pri i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }\n.hb-yd3-pri[data-p=\"Urgent\"] { background: rgba(251, 113, 133, .14); color: #fb7185; }\n.hb-yd3-pri[data-p=\"High\"] { background: rgba(251, 191, 36, .13); color: #fbbf24; }\n.hb-yd3-pri[data-p=\"Normal\"] { background: rgba(127, 179, 255, .12); color: #7fb3ff; }\n.hb-yd3-pri[data-p=\"Low\"] { background: #1e1f24; color: #a0a1a8; }\n.hb-yd3-stack { display: flex; }\n.hb-yd3-stack .hb-yd3-av { box-shadow: 0 0 0 2px #111114; }\n.hb-yd3-stack .hb-yd3-av + .hb-yd3-av { margin-left: -7px; }\n.hb-yd3-none { display: grid; place-items: center; width: 24px; height: 24px; border: 1px dashed #3a3b42; border-radius: 50%; color: #66676e; }\n.hb-yd3-none svg { width: 12px; height: 12px; }\n.hb-yd3-sla { justify-self: end; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }\n.hb-yd3-sla span { display: block; color: #66676e; font-size: 11px; font-weight: 400; }\n.hb-yd3-sla[data-s=\"ok\"] { color: #a0a1a8; }\n.hb-yd3-sla[data-s=\"risk\"] { color: #fbbf24; }\n.hb-yd3-sla[data-s=\"late\"] { color: #fb7185; }\n.hb-yd3-empty { padding: 28px 0; color: #7a7b83; text-align: center; }\n.hb-yd3-csat { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }\n.hb-yd3-csat b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }\n.hb-yd3-csat span { font-size: 12px; font-weight: 600; }\n.hb-yd3-cplot { position: relative; height: 92px; cursor: crosshair; touch-action: pan-y; }\n.hb-yd3-cplot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: hb-yd3-wipe 1s .3s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-yd3-cl { fill: none; stroke: #34d399; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }\n.hb-yd3-ctg { stroke: #2c2d33; stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }\n.hb-yd3-cdot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 2px solid #34d399; border-radius: 50%; background: #111114; pointer-events: none; }\n.hb-yd3-dist { display: flex; height: 6px; margin-top: 12px; border-radius: 999px; overflow: hidden; gap: 2px; }\n.hb-yd3-dist i { height: 100%; transform-origin: left; animation: hb-yd3-bar .9s .4s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-yd3-distl { display: flex; justify-content: space-between; margin-top: 6px; color: #7a7b83; font-size: 11px; }\n.hb-yd3-online { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #8a8b93; font-size: 12px; }\n.hb-yd3-feed { position: relative; display: flex; flex-direction: column; gap: 2px; height: 214px; margin: 0; padding: 0; list-style: none; overflow: hidden; }\n.hb-yd3-feed::after { content: \"\"; position: absolute; right: 0; bottom: 0; left: 0; height: 36px; background: linear-gradient(transparent, #111114); pointer-events: none; }\n.hb-yd3-feed li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px; }\n.hb-yd3-feed li[data-new=\"true\"] { animation: hb-yd3-slide .5s cubic-bezier(.2, .7, .2, 1) both; }\n.hb-yd3-feed p { margin: 0; overflow: hidden; color: #a0a1a8; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yd3-feed p b { color: #ebebef; font-weight: 500; }\n.hb-yd3-feed p strong { color: var(--a); font-weight: 600; }\n.hb-yd3-feed time { color: #66676e; font-size: 11px; font-variant-numeric: tabular-nums; }\n.hb-yd3-eye { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1a1b20; color: #8a8b93; }\n.hb-yd3-eye svg { width: 13px; height: 13px; }\n@keyframes hb-yd3-rise { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }\n@keyframes hb-yd3-slide { from { opacity: 0; transform: translate3d(0, -14px, 0); max-height: 0; } to { opacity: 1; transform: none; max-height: 40px; } }\n@keyframes hb-yd3-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }\n@keyframes hb-yd3-fade { from { opacity: 0; } to { opacity: 1; } }\n@keyframes hb-yd3-wipe { from { clip-path: inset(-8px 100% -8px -8px); } to { clip-path: inset(-8px -8px -8px -8px); } }\n@keyframes hb-yd3-dash { from { stroke-dasharray: 0 100; } }\n@keyframes hb-yd3-needle { from { transform: rotate(-90deg); } }\n@keyframes hb-yd3-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n@keyframes hb-yd3-ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 100% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } }\n@container hb-yd3 (max-width: 1019px) {\n  .hb-yd3-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n  .hb-yd3-row { grid-template-columns: minmax(0, 1fr); }\n}\n@container hb-yd3 (max-width: 759px) {\n  .hb-yd3-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }\n  .hb-yd3-side { flex-direction: row; align-items: center; gap: 4px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid #1c1d21; overflow-x: auto; }\n  .hb-yd3-brand { margin: 0; padding: 0 6px 0 0; }\n  .hb-yd3-brand span:last-child, .hb-yd3-new, .hb-yd3-grp, .hb-yd3-me, .hb-yd3-teams, .hb-yd3-vl em, .hb-yd3-vl-t { display: none; }\n  .hb-yd3-views { flex-direction: row; gap: 4px; }\n  .hb-yd3-vl { justify-content: center; width: 34px; padding: 0; }\n  .hb-yd3-top { padding: 0 16px; }\n  .hb-yd3-search { display: none; }\n  .hb-yd3-top .hb-yd3-ibtn { margin-left: auto; }\n  .hb-yd3-content { padding: 16px; }\n  .hb-yd3-qr { grid-template-columns: minmax(0, 1fr) auto auto; }\n  .hb-yd3-qid, .hb-yd3-stack, .hb-yd3-qr .hb-yd3-none { display: none; }\n}\n@container hb-yd3 (max-width: 459px) {\n  .hb-yd3-kpis { grid-template-columns: minmax(0, 1fr); }\n  .hb-yd3-qr { grid-template-columns: minmax(0, 1fr) auto; }\n  .hb-yd3-qr .hb-yd3-pri { display: none; }\n  .hb-yd3-live { display: none; }\n  .hb-yd3-hours { gap: 2px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yd3 *, .hb-yd3 *::before, .hb-yd3 *::after { animation: none !important; transition: none !important; }\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\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} 60% 55%), hsl(${(hue + 40) % 360} 58% 38%))`;\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\ntype Pt = [number, number];\n\nfunction smooth(pts: Pt[]) {\n  let d = `M${pts[0][0].toFixed(2)} ${pts[0][1].toFixed(2)}`;\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    d += `C${(p1[0] + (p2[0] - p0[0]) / 6).toFixed(2)} ${(p1[1] + (p2[1] - p0[1]) / 6).toFixed(2)} ${(p2[0] - (p3[0] - p1[0]) / 6).toFixed(2)} ${(p2[1] - (p3[1] - p1[1]) / 6).toFixed(2)} ${p2[0].toFixed(2)} ${p2[1].toFixed(2)}`;\n  }\n  return d;\n}\n\nconst icons: Record<string, string[]> = {\n  inbox: [\"M22 12h-6l-2 3h-4l-2-3H2\", \"M5.5 5h13L22 12v7H2v-7z\"],\n  user: [\"M20 21a8 8 0 0 0-16 0\", \"M12 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10z\"],\n  flame: [\"M12 22c4 0 7-3 7-7 0-4-3-6-4-10-2 2-3 4-3 6-1-1-2-2-2-4-3 2-5 5-5 8 0 4 3 7 7 7z\"],\n  clock: [\"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z\", \"M12 7v5l3 2\"],\n  check: [\"M20 6L9 17l-5-5\"],\n  plus: [\"M12 5v14\", \"M5 12h14\"],\n  search: [\"M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\", \"M21 21l-4.3-4.3\"],\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  mail: [\"M3 5h18v14H3z\", \"M3 6l9 7 9-7\"],\n  chat: [\"M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z\"],\n  phone: [\"M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z\"],\n  eye: [\"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z\", \"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z\"],\n  reply: [\"M9 17l-5-5 5-5\", \"M4 12h11a5 5 0 0 1 5 5v2\"],\n  dash: [\"M5 12h14\"],\n};\n\nfunction Ico({ n, className = \"hb-yd3-ico\" }: { n: string; className?: string }) {\n  return (\n    <svg className={className} 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\nconst DEFAULT_TICKETS: SupportTicket[] = [\n  { id: \"4821\", subject: \"Payment failed after updating card\", customer: \"Coastline Coffee\", priority: \"Urgent\", assignees: [\"Ines Duarte\"], waiting: \"12m\", channel: \"email\", slaMinutes: 8 },\n  { id: \"4819\", subject: \"SSO login loops back to the sign-in page\", customer: \"Halvorsen Group\", priority: \"Urgent\", assignees: [], waiting: \"26m\", channel: \"chat\", slaMinutes: -4 },\n  { id: \"4816\", subject: \"CSV export is missing custom columns\", customer: \"Brightwave Studio\", priority: \"High\", assignees: [\"Lucía Fernández\"], waiting: \"41m\", channel: \"email\", slaMinutes: 19 },\n  { id: \"4812\", subject: \"Invoice needs our VAT number\", customer: \"Pemberton Legal\", priority: \"Normal\", assignees: [\"Ravi Menon\"], waiting: \"1h 05m\", channel: \"email\", slaMinutes: 115 },\n  { id: \"4809\", subject: \"Webhook retries are not firing\", customer: \"Lumen Labs\", priority: \"High\", assignees: [], waiting: \"1h 22m\", channel: \"chat\", slaMinutes: 23 },\n  { id: \"4803\", subject: \"How do I add a teammate to my plan?\", customer: \"Juniper Florals\", priority: \"Low\", assignees: [\"Lucía Fernández\"], waiting: \"2h 10m\", channel: \"chat\", slaMinutes: 350 },\n  { id: \"4798\", subject: \"Android app crashes when opening reports\", customer: \"Northpeak Outfitters\", priority: \"High\", assignees: [\"Ines Duarte\", \"Ravi Menon\"], waiting: \"3h 02m\", channel: \"phone\", slaMinutes: 58 },\n  { id: \"4790\", subject: \"Refund for a duplicate charge\", customer: \"Studio Kiln\", priority: \"Normal\", assignees: [\"Lucía Fernández\"], waiting: \"4h 15m\", channel: \"email\", slaMinutes: 165 },\n];\n\nconst AGENTS = [\"Ines Duarte\", \"Ravi Menon\", \"Theo Laurent\", \"Amina Yusuf\", \"Jun Park\", \"Clara Moss\"];\n\nconst ACTIVITY: { who: string; verb: string; ticket: string }[] = [\n  { who: \"Ines Duarte\", verb: \"is replying to\", ticket: \"#4821\" },\n  { who: \"Ravi Menon\", verb: \"opened\", ticket: \"#4809\" },\n  { who: \"Coastline Coffee\", verb: \"replied on\", ticket: \"#4821\" },\n  { who: \"Theo Laurent\", verb: \"is viewing\", ticket: \"#4819\" },\n  { who: \"Amina Yusuf\", verb: \"solved\", ticket: \"#4787\" },\n  { who: \"Jun Park\", verb: \"added a note to\", ticket: \"#4798\" },\n  { who: \"Lumen Labs\", verb: \"attached a log to\", ticket: \"#4809\" },\n  { who: \"Clara Moss\", verb: \"is viewing\", ticket: \"#4816\" },\n  { who: \"Ravi Menon\", verb: \"escalated\", ticket: \"#4798\" },\n  { who: \"Theo Laurent\", verb: \"took\", ticket: \"#4819\" },\n  { who: \"Amina Yusuf\", verb: \"is replying to\", ticket: \"#4812\" },\n  { who: \"Ines Duarte\", verb: \"merged\", ticket: \"#4805 into #4821\" },\n];\nconst AGO = [\"now\", \"14s\", \"38s\", \"1m\", \"2m\", \"3m\", \"4m\"];\n\nconst NOW_HOUR = 14;\nconst HOURS = Array.from({ length: 24 }, (_, h) => {\n  const curve = 3 + 40 * Math.exp(-((h - 10.5) ** 2) / 9) + 30 * Math.exp(-((h - 15) ** 2) / 7) + (h > 18 ? 6 : 0);\n  const today = Math.round(curve * (0.9 + hash(h + 3) * 0.25));\n  const last = Math.round(curve * (0.85 + hash(h + 70) * 0.22));\n  return { today: h === NOW_HOUR ? Math.round(today * 0.62) : today, last, forecast: h > NOW_HOUR };\n});\nconst CSAT = [92.1, 93.4, 92.8, 94.0, 93.1, 91.7, 92.9, 94.6, 95.2, 93.8, 94.1, 95.0, 93.6, 94.2];\nconst CSAT_DAYS = [\"Oct 22\", \"Oct 23\", \"Oct 24\", \"Oct 25\", \"Oct 26\", \"Oct 27\", \"Oct 28\", \"Oct 29\", \"Oct 30\", \"Oct 31\", \"Nov 1\", \"Nov 2\", \"Nov 3\", \"Nov 4\"];\n\nconst VIEWS: { id: SupportView; label: string }[] = [\n  { id: \"all\", label: \"All open\" },\n  { id: \"mine\", label: \"Mine\" },\n  { id: \"urgent\", label: \"Urgent\" },\n  { id: \"unassigned\", label: \"Unassigned\" },\n];\n\nfunction slaState(m: number) {\n  if (m < 0) return { s: \"late\", text: `Breached ${Math.abs(m)}m` };\n  if (m <= 30) return { s: \"risk\", text: `Due in ${m}m` };\n  return { s: \"ok\", text: m >= 60 ? `Due in ${Math.floor(m / 60)}h ${String(m % 60).padStart(2, \"0\")}m` : `Due in ${m}m` };\n}\n\nfunction hourLabel(h: number) {\n  return `${String(h).padStart(2, \"0\")}:00`;\n}\n\nexport function DashboardSupport({\n  accent = \"#8b7cff\",\n  brand = \"Helpdeck\",\n  user = \"Lucía Fernández\",\n  tickets = DEFAULT_TICKETS,\n  view,\n  defaultView = \"all\",\n  onViewChange,\n  onTicketOpen,\n  className = \"\",\n  style,\n  ...rest\n}: DashboardSupportProps) {\n  const uid = React.useId().replace(/:/g, \"\");\n  const [innerView, setInnerView] = React.useState<SupportView>(defaultView);\n  const [online, setOnline] = React.useState(true);\n  const [hour, setHour] = React.useState<number | null>(null);\n  const [day, setDay] = React.useState<number | null>(null);\n  const [tick, setTick] = React.useState(0);\n  const v = view ?? innerView;\n\n  React.useEffect(() => {\n    const id = window.setInterval(() => setTick((t) => t + 1), 2800);\n    return () => window.clearInterval(id);\n  }, []);\n\n  const pickView = (next: SupportView) => {\n    setInnerView(next);\n    onViewChange?.(next);\n  };\n\n  const filter = (id: SupportView) =>\n    tickets.filter((t) =>\n      id === \"mine\" ? t.assignees.includes(user) : id === \"urgent\" ? t.priority === \"Urgent\" : id === \"unassigned\" ? t.assignees.length === 0 : true,\n    );\n  const list = filter(v);\n\n  const maxH = Math.max(...HOURS.map((h) => Math.max(h.today, h.last)));\n  const top = Math.ceil(maxH / 10) * 10;\n  const todayTotal = HOURS.filter((h) => !h.forecast).reduce((s, h) => s + h.today, 0);\n  const fcTotal = HOURS.filter((h) => h.forecast).reduce((s, h) => s + h.today, 0);\n\n  const sla = 92.6;\n  const target = 95;\n  const ang = (p: number) => Math.PI * (1 - p / 100);\n  const gx = (p: number, r: number) => 100 + Math.cos(ang(p)) * r;\n  const gy = (p: number, r: number) => 100 - Math.sin(ang(p)) * r;\n\n  const lo = 90;\n  const hi = 96;\n  const cpts: Pt[] = CSAT.map((c, i) => [(i / (CSAT.length - 1)) * 100, 6 + (1 - (c - lo) / (hi - lo)) * 88]);\n  const cline = smooth(cpts);\n  const cdelta = CSAT[CSAT.length - 1] - CSAT[CSAT.length - 8];\n\n  const feed = Array.from({ length: 6 }, (_, k) => ACTIVITY[(((tick - k) % ACTIVITY.length) + ACTIVITY.length) % ACTIVITY.length]);\n\n  const kpis = [\n    { label: \"Open tickets\", value: \"142\", delta: \"-8%\", good: true, fill: 14, mark: 18, color: \"var(--a)\", foot: \"18 over capacity threshold\" },\n    { label: \"First response\", value: \"14m\", delta: \"-3m\", good: true, fill: 19, mark: 16, color: \"#34d399\", foot: \"Median, target under 20m\" },\n    { label: \"Time to resolve\", value: \"3h 12m\", delta: \"+11m\", good: false, fill: 15, mark: 14, color: \"#fbbf24\", foot: \"Median, target under 3h\" },\n    { label: \"Solved today\", value: \"61\", delta: \"+12\", good: true, fill: 17, mark: 20, color: \"#7fb3ff\", foot: \"Goal 72 by end of shift\" },\n  ];\n\n  const qKey = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n    if (e.key !== \"ArrowDown\" && e.key !== \"ArrowUp\") return;\n    e.preventDefault();\n    const li = e.currentTarget.parentElement;\n    const next = (e.key === \"ArrowDown\" ? li?.nextElementSibling : li?.previousElementSibling)?.querySelector(\"button\");\n    next?.focus();\n  };\n\n  const hourKey = (e: React.KeyboardEvent<HTMLButtonElement>, h: number) => {\n    const n = e.key === \"ArrowRight\" ? Math.min(23, h + 1) : e.key === \"ArrowLeft\" ? Math.max(0, h - 1) : null;\n    if (n === null) return;\n    e.preventDefault();\n    (e.currentTarget.parentElement?.children[n] as HTMLElement | undefined)?.focus();\n  };\n\n  const csatMove = (e: React.PointerEvent<HTMLDivElement>) => {\n    const b = e.currentTarget.getBoundingClientRect();\n    setDay(Math.max(0, Math.min(CSAT.length - 1, Math.round(((e.clientX - b.left) / b.width) * (CSAT.length - 1)))));\n  };\n  const csatKey = (e: React.KeyboardEvent<HTMLDivElement>) => {\n    if (e.key === \"ArrowRight\") setDay((d) => Math.min(CSAT.length - 1, (d ?? -1) + 1));\n    else if (e.key === \"ArrowLeft\") setDay((d) => Math.max(0, (d ?? CSAT.length) - 1));\n    else if (e.key === \"Escape\") setDay(null);\n    else return;\n    e.preventDefault();\n  };\n\n  const vars = { \"--a\": accent, ...style } as React.CSSProperties;\n  const hh = hour === null ? null : HOURS[hour];\n\n  return (\n    <div className={`hb-yd3 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-dashboard-support\" precedence=\"default\">\n        {css}\n      </style>\n      <div className=\"hb-yd3-app\">\n        <aside className=\"hb-yd3-side\">\n          <div className=\"hb-yd3-brand\">\n            <span className=\"hb-yd3-mark\" aria-hidden=\"true\">\n              <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                <path d=\"M4 14v-2a8 8 0 0 1 16 0v2\" />\n                <path d=\"M4 14h3v5H4zM17 14h3v5h-3z\" />\n              </svg>\n            </span>\n            <span>{brand}</span>\n          </div>\n          <button type=\"button\" className=\"hb-yd3-new\">\n            <Ico n=\"plus\" />\n            New ticket\n          </button>\n          <div className=\"hb-yd3-grp\" aria-hidden=\"true\">\n            Views\n          </div>\n          <nav aria-label=\"Ticket views\">\n            <ul className=\"hb-yd3-views\">\n              {[\n                { id: \"all\" as SupportView, label: \"All open\", icon: \"inbox\", n: tickets.length },\n                { id: \"mine\" as SupportView, label: \"My tickets\", icon: \"user\", n: filter(\"mine\").length },\n                { id: \"urgent\" as SupportView, label: \"Urgent\", icon: \"flame\", n: filter(\"urgent\").length, hot: true },\n                { id: \"unassigned\" as SupportView, label: \"Unassigned\", icon: \"clock\", n: filter(\"unassigned\").length },\n              ].map((item) => (\n                <li key={item.id}>\n                  <button type=\"button\" className=\"hb-yd3-vl\" aria-label={item.label} aria-current={v === item.id ? \"true\" : undefined} onClick={() => pickView(item.id)}>\n                    <Ico n={item.icon} />\n                    <span className=\"hb-yd3-vl-t\">{item.label}</span>\n                    <em data-hot={item.hot && item.n > 0}>{item.n}</em>\n                  </button>\n                </li>\n              ))}\n              <li>\n                <button type=\"button\" className=\"hb-yd3-vl\" aria-label=\"Solved today\">\n                  <Ico n=\"check\" />\n                  <span className=\"hb-yd3-vl-t\">Solved today</span>\n                  <em>61</em>\n                </button>\n              </li>\n            </ul>\n          </nav>\n          <div className=\"hb-yd3-grp\" aria-hidden=\"true\">\n            Teams\n          </div>\n          <ul className=\"hb-yd3-views hb-yd3-teams\">\n            {[\n              { name: \"Billing\", c: \"#fb7185\", n: 38 },\n              { name: \"Technical\", c: \"#7fb3ff\", n: 64 },\n              { name: \"Onboarding\", c: \"#34d399\", n: 27 },\n              { name: \"Enterprise\", c: \"#fbbf24\", n: 13 },\n            ].map((g) => (\n              <li key={g.name}>\n                <button type=\"button\" className=\"hb-yd3-vl\">\n                  <i style={{ background: g.c }} />\n                  <span className=\"hb-yd3-vl-t\">{g.name}</span>\n                  <em>{g.n}</em>\n                </button>\n              </li>\n            ))}\n          </ul>\n          <div className=\"hb-yd3-me\">\n            <span className=\"hb-yd3-av\" data-on={online} style={{ width: 30, height: 30, background: tone(user) }}>\n              {initials(user)}\n            </span>\n            <div className=\"hb-yd3-me-t\">\n              <b>{user}</b>\n              <span>{online ? \"Online, taking chats\" : \"Away\"}</span>\n            </div>\n            <button type=\"button\" role=\"switch\" className=\"hb-yd3-sw\" aria-checked={online} aria-label=\"Available for new chats\" onClick={() => setOnline((o) => !o)} />\n          </div>\n        </aside>\n\n        <div className=\"hb-yd3-main\">\n          <header className=\"hb-yd3-top\">\n            <h2>Support overview</h2>\n            <span className=\"hb-yd3-live\">\n              <i />\n              Live\n            </span>\n            <label className=\"hb-yd3-search\">\n              <Ico n=\"search\" />\n              <input type=\"search\" placeholder=\"Search tickets, customers\" aria-label=\"Search tickets\" />\n            </label>\n            <button type=\"button\" className=\"hb-yd3-ibtn\" aria-label=\"Notifications\">\n              <Ico n=\"bell\" />\n            </button>\n          </header>\n\n          <div className=\"hb-yd3-content\">\n            <div className=\"hb-yd3-kpis\">\n              {kpis.map((k, i) => (\n                <div className=\"hb-yd3-card hb-yd3-kpi\" key={k.label} style={{ \"--d\": i, \"--k\": k.color } as React.CSSProperties}>\n                  <div className=\"hb-yd3-kpi-h\">\n                    <span>{k.label}</span>\n                  </div>\n                  <div className=\"hb-yd3-kpi-v\">\n                    <b>{k.value}</b>\n                    <span className={k.good ? \"hb-yd3-up\" : \"hb-yd3-dn\"}>{k.delta}</span>\n                  </div>\n                  <div className=\"hb-yd3-meter\" aria-hidden=\"true\">\n                    {Array.from({ length: 24 }, (_, s) => (\n                      <i key={s} data-on={s < k.fill} data-mark={s === k.mark} style={{ animationDelay: `${300 + s * 18}ms` }} />\n                    ))}\n                  </div>\n                  <span className=\"hb-yd3-kpi-f\">{k.foot}</span>\n                </div>\n              ))}\n            </div>\n\n            <div className=\"hb-yd3-row\">\n              <section className=\"hb-yd3-card\" style={{ \"--d\": 4 } as React.CSSProperties} aria-label=\"Ticket volume by hour\">\n                <div className=\"hb-yd3-ch\">\n                  <div>\n                    <h3 className=\"hb-yd3-ct\">Ticket volume by hour</h3>\n                    <p className=\"hb-yd3-cs\">\n                      {todayTotal} new so far today, {fcTotal} forecast by midnight\n                    </p>\n                  </div>\n                  <div className=\"hb-yd3-leg\">\n                    <span>\n                      <i />\n                      Today\n                    </span>\n                    <span>\n                      <i data-k=\"fc\" />\n                      Forecast\n                    </span>\n                    <span>\n                      <i data-k=\"lw\" />\n                      Last Wednesday\n                    </span>\n                  </div>\n                </div>\n                <div className=\"hb-yd3-hours\" onPointerLeave={() => setHour(null)}>\n                  {HOURS.map((h, i) => (\n                    <button\n                      key={i}\n                      type=\"button\"\n                      className=\"hb-yd3-hb\"\n                      data-fc={h.forecast}\n                      data-now={i === NOW_HOUR}\n                      aria-label={`${hourLabel(i)}, ${h.today} tickets${h.forecast ? \" forecast\" : \"\"}, last week ${h.last}`}\n                      onPointerEnter={() => setHour(i)}\n                      onFocus={() => setHour(i)}\n                      onBlur={() => setHour(null)}\n                      onKeyDown={(e) => hourKey(e, i)}\n                    >\n                      <span style={{ \"--h\": `${((h.today / top) * 100).toFixed(1)}%`, animationDelay: `${i * 25}ms` } as React.CSSProperties} />\n                      <em style={{ \"--l\": `${((h.last / top) * 100).toFixed(1)}%` } as React.CSSProperties} />\n                    </button>\n                  ))}\n                  {hh && hour !== null ? (\n                    <div\n                      className=\"hb-yd3-tt\"\n                      style={{\n                        left: `${(((hour + 0.5) / 24) * 100).toFixed(2)}%`,\n                        bottom: `calc(${((Math.max(hh.today, hh.last) / top) * 100).toFixed(1)}% + 12px)`,\n                        transform: hour > 18 ? \"translateX(-100%)\" : hour < 4 ? \"none\" : \"translateX(-50%)\",\n                      }}\n                    >\n                      <div className=\"hb-yd3-tt-d\">\n                        {hourLabel(hour)} to {hourLabel((hour + 1) % 24)}\n                        {hour === NOW_HOUR ? \", in progress\" : \"\"}\n                      </div>\n                      <div>\n                        {hh.forecast ? \"Forecast\" : \"Today\"} <b>{hh.today}</b>\n                      </div>\n                      <div>\n                        Last week <b>{hh.last}</b>\n                      </div>\n                    </div>\n                  ) : null}\n                </div>\n                <div className=\"hb-yd3-hx\" aria-hidden=\"true\">\n                  {HOURS.map((_, i) => (\n                    <span key={i}>{String(i).padStart(2, \"0\")}</span>\n                  ))}\n                </div>\n              </section>\n\n              <section className=\"hb-yd3-card\" style={{ \"--d\": 5 } as React.CSSProperties} aria-label=\"SLA compliance\">\n                <div className=\"hb-yd3-ch\">\n                  <div>\n                    <h3 className=\"hb-yd3-ct\">SLA compliance</h3>\n                    <p className=\"hb-yd3-cs\">Tickets answered within policy, 7 days</p>\n                  </div>\n                </div>\n                <div className=\"hb-yd3-gauge\">\n                  <svg viewBox=\"0 0 200 108\" role=\"img\" aria-label={`${sla} percent within SLA, target ${target} percent`}>\n                    <defs>\n                      <linearGradient id={`${uid}g`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n                        <stop offset=\"0\" stopColor=\"#fb7185\" />\n                        <stop offset=\".55\" stopColor=\"#fbbf24\" />\n                        <stop offset=\"1\" stopColor=\"#34d399\" />\n                      </linearGradient>\n                    </defs>\n                    {Array.from({ length: 21 }, (_, k) => (\n                      <line key={k} className=\"hb-yd3-g-tk\" x1={gx(k * 5, 66).toFixed(2)} y1={gy(k * 5, 66).toFixed(2)} x2={gx(k * 5, 72).toFixed(2)} y2={gy(k * 5, 72).toFixed(2)} />\n                    ))}\n                    <path className=\"hb-yd3-g-t\" d=\"M14 100A86 86 0 0 1 186 100\" pathLength={100} />\n                    <path className=\"hb-yd3-g-v\" d=\"M14 100A86 86 0 0 1 186 100\" pathLength={100} stroke={`url(#${uid}g)`} strokeDasharray={`${sla} 100`} />\n                    <line className=\"hb-yd3-g-tg\" x1={gx(target, 78).toFixed(2)} y1={gy(target, 78).toFixed(2)} x2={gx(target, 96).toFixed(2)} y2={gy(target, 96).toFixed(2)} />\n                    <g className=\"hb-yd3-needle\" style={{ transform: `rotate(${((sla / 100) * 180 - 90).toFixed(2)}deg)` }}>\n                      <path d=\"M97 100L100 40L103 100Z\" fill=\"#ebebef\" />\n                      <circle cx=\"100\" cy=\"100\" r=\"6\" fill=\"#ebebef\" />\n                      <circle cx=\"100\" cy=\"100\" r=\"2.5\" fill=\"#111114\" />\n                    </g>\n                  </svg>\n                </div>\n                <div className=\"hb-yd3-gc\" style={{ position: \"static\", marginTop: 6 }}>\n                  <b>{sla.toFixed(1)}%</b>\n                  <span>Target {target}% · {(target - sla).toFixed(1)} pts to go</span>\n                </div>\n                <div className=\"hb-yd3-gs\">\n                  <div>\n                    <span>\n                      <i style={{ background: \"#34d399\" }} />\n                      Met\n                    </span>\n                    <b>1,184</b>\n                  </div>\n                  <div>\n                    <span>\n                      <i style={{ background: \"#fbbf24\" }} />\n                      At risk\n                    </span>\n                    <b>7</b>\n                  </div>\n                  <div>\n                    <span>\n                      <i style={{ background: \"#fb7185\" }} />\n                      Breached\n                    </span>\n                    <b>11</b>\n                  </div>\n                </div>\n              </section>\n            </div>\n\n            <div className=\"hb-yd3-row\">\n              <section className=\"hb-yd3-card\" style={{ \"--d\": 6 } as React.CSSProperties} aria-label=\"Queue\">\n                <div className=\"hb-yd3-ch\">\n                  <div>\n                    <h3 className=\"hb-yd3-ct\">Queue</h3>\n                    <p className=\"hb-yd3-cs\">Oldest first, sorted by SLA</p>\n                  </div>\n                  <div className=\"hb-yd3-tabs\" role=\"group\" aria-label=\"Queue filter\">\n                    {VIEWS.map((x) => (\n                      <button key={x.id} type=\"button\" aria-pressed={v === x.id} onClick={() => pickView(x.id)}>\n                        {x.label}\n                        <em>{filter(x.id).length}</em>\n                      </button>\n                    ))}\n                  </div>\n                </div>\n                {list.length ? (\n                  <ul className=\"hb-yd3-q\" key={v}>\n                    {[...list]\n                      .sort((a, b) => a.slaMinutes - b.slaMinutes)\n                      .map((t, i) => {\n                        const s = slaState(t.slaMinutes);\n                        return (\n                          <li key={t.id}>\n                            <button type=\"button\" className=\"hb-yd3-qr\" style={{ animationDelay: `${i * 45}ms` }} onClick={() => onTicketOpen?.(t)} onKeyDown={qKey}>\n                              <span className=\"hb-yd3-qid\">\n                                <Ico n={t.channel === \"email\" ? \"mail\" : t.channel === \"chat\" ? \"chat\" : \"phone\"} className=\"\" />\n                                {t.id}\n                              </span>\n                              <span className=\"hb-yd3-qs\">\n                                <b>{t.subject}</b>\n                                <span>\n                                  {t.customer} · waiting {t.waiting}\n                                </span>\n                              </span>\n                              <span className=\"hb-yd3-pri\" data-p={t.priority}>\n                                <i />\n                                {t.priority}\n                              </span>\n                              {t.assignees.length ? (\n                                <span className=\"hb-yd3-stack\" title={t.assignees.join(\", \")}>\n                                  {t.assignees.map((a) => (\n                                    <span key={a} className=\"hb-yd3-av\" style={{ width: 24, height: 24, fontSize: 9.5, background: tone(a) }}>\n                                      {initials(a)}\n                                    </span>\n                                  ))}\n                                </span>\n                              ) : (\n                                <span className=\"hb-yd3-none\" title=\"Unassigned\">\n                                  <Ico n=\"dash\" className=\"\" />\n                                </span>\n                              )}\n                              <span className=\"hb-yd3-sla\" data-s={s.s}>\n                                {s.text}\n                                <span>{t.channel}</span>\n                              </span>\n                            </button>\n                          </li>\n                        );\n                      })}\n                  </ul>\n                ) : (\n                  <p className=\"hb-yd3-empty\">Nothing in this view. Nice work.</p>\n                )}\n              </section>\n\n              <div className=\"hb-yd3-col\">\n                <section className=\"hb-yd3-card\" style={{ \"--d\": 7 } as React.CSSProperties} aria-label=\"Customer satisfaction\">\n                  <div className=\"hb-yd3-ch\" style={{ marginBottom: 6 }}>\n                    <div>\n                      <h3 className=\"hb-yd3-ct\">CSAT, 14 days</h3>\n                      <p className=\"hb-yd3-cs\">{day === null ? \"1,206 ratings\" : CSAT_DAYS[day]}</p>\n                    </div>\n                  </div>\n                  <div className=\"hb-yd3-csat\">\n                    <b>{(day === null ? CSAT[CSAT.length - 1] : CSAT[day]).toFixed(1)}%</b>\n                    {day === null ? <span className={cdelta >= 0 ? \"hb-yd3-up\" : \"hb-yd3-dn\"}>{cdelta >= 0 ? \"+\" : \"\"}{cdelta.toFixed(1)} pts vs last week</span> : null}\n                  </div>\n                  <div\n                    className=\"hb-yd3-cplot\"\n                    role=\"img\"\n                    tabIndex={0}\n                    aria-label=\"Daily customer satisfaction. Use arrow keys to inspect days.\"\n                    onPointerMove={csatMove}\n                    onPointerLeave={() => setDay(null)}\n                    onKeyDown={csatKey}\n                    onBlur={() => setDay(null)}\n                  >\n                    <svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n                      <defs>\n                        <linearGradient id={`${uid}c`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                          <stop offset=\"0\" stopColor=\"#34d399\" stopOpacity=\".24\" />\n                          <stop offset=\"1\" stopColor=\"#34d399\" stopOpacity=\"0\" />\n                        </linearGradient>\n                      </defs>\n                      <line className=\"hb-yd3-ctg\" x1=\"0\" x2=\"100\" y1={(6 + (1 - (95 - lo) / (hi - lo)) * 88).toFixed(2)} y2={(6 + (1 - (95 - lo) / (hi - lo)) * 88).toFixed(2)} />\n                      <path d={`${cline}L100 100L0 100Z`} fill={`url(#${uid}c)`} />\n                      <path className=\"hb-yd3-cl\" d={cline} />\n                    </svg>\n                    {day !== null ? <span className=\"hb-yd3-cdot\" style={{ left: `${cpts[day][0].toFixed(2)}%`, top: `${cpts[day][1].toFixed(2)}%` }} /> : null}\n                  </div>\n                  <div className=\"hb-yd3-dist\" aria-hidden=\"true\">\n                    <i style={{ width: \"86%\", background: \"#34d399\" }} />\n                    <i style={{ width: \"9%\", background: \"#fbbf24\", animationDelay: \".5s\" }} />\n                    <i style={{ width: \"5%\", background: \"#fb7185\", animationDelay: \".6s\" }} />\n                  </div>\n                  <div className=\"hb-yd3-distl\">\n                    <span>Great 86%</span>\n                    <span>Okay 9%</span>\n                    <span>Bad 5%</span>\n                  </div>\n                </section>\n\n                <section className=\"hb-yd3-card\" style={{ \"--d\": 8 } as React.CSSProperties} aria-label=\"Now viewing\">\n                  <div className=\"hb-yd3-ch\" style={{ marginBottom: 10 }}>\n                    <div>\n                      <h3 className=\"hb-yd3-ct\">Now viewing</h3>\n                      <p className=\"hb-yd3-cs\">Live agent and customer activity</p>\n                    </div>\n                  </div>\n                  <div className=\"hb-yd3-online\">\n                    <span className=\"hb-yd3-stack\">\n                      {AGENTS.map((a, i) => (\n                        <span key={a} className=\"hb-yd3-av\" data-on={i < 5} style={{ width: 24, height: 24, fontSize: 9.5, background: tone(a) }} title={a}>\n                          {initials(a)}\n                        </span>\n                      ))}\n                    </span>\n                    5 of 6 agents online\n                  </div>\n                  <ul className=\"hb-yd3-feed\" aria-live=\"off\">\n                    {feed.map((f, k) => (\n                      <li key={tick - k} data-new={k === 0 && tick > 0}>\n                        {AGENTS.includes(f.who) ? (\n                          <span className=\"hb-yd3-av\" style={{ width: 26, height: 26, fontSize: 9.5, background: tone(f.who) }}>\n                            {initials(f.who)}\n                          </span>\n                        ) : (\n                          <span className=\"hb-yd3-eye\">\n                            <Ico n=\"reply\" className=\"\" />\n                          </span>\n                        )}\n                        <p>\n                          <b>{f.who}</b> {f.verb} <strong>{f.ticket}</strong>\n                        </p>\n                        <time>{AGO[k]}</time>\n                      </li>\n                    ))}\n                  </ul>\n                </section>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}