/* Hero dashboard preview: the current Calls page at the dashboard's real sizes (1280px wide),
   using its theme tokens. app.js scales it down like a screenshot. */
.hd-screen { position: relative; display: grid; grid-template-columns: 228px minmax(0,1fr); width: 100%; height: 800px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--background); color: var(--fg); font-size: 13px; text-align: left; }
.hd-screen .icon { width: 16px; height: 16px; flex-shrink: 0; }
.hd-screen .avatar { width: 28px; height: 28px; font-size: 10px; font-weight: 600; }
.hd-screen small { display: block; color: var(--fg-subtle); font-size: 11px; font-weight: 400; }

.hd-sidebar { display: flex; flex-direction: column; padding: 14px 12px 12px; border-right: 1px solid var(--border); background: var(--surface); }
.hd-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 18px; }
.hd-brand .brand-mark { width: 30px; height: 30px; }
.hd-brand strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.hd-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.hd-nav { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 8px 10px; border-radius: 7px; color: var(--fg-muted); font-size: 12px; font-weight: 500; }
.hd-nav.active { background: var(--accent); color: var(--accent-fg); }
.hd-manage>.icon:last-child { width: 14px; height: 14px; margin-left: auto; transform: rotate(180deg); }
.hd-manage-items { display: flex; flex-direction: column; gap: 1px; margin-left: 17px; padding-left: 8px; border-left: 1px solid var(--border); }
.hd-manage-items .hd-nav { min-height: 32px; padding-block: 6px; font-size: 11.5px; }
.hd-manage-items .icon { width: 15px; height: 15px; }
.hd-account { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }

.hd-main { min-width: 0; }
.hd-topbar { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 28px 0 32px; border-bottom: 1px solid var(--border); }
.hd-topbar>span { display: flex; align-items: center; gap: 10px; color: var(--fg-muted); font-size: 12px; }
.hd-topbar i { color: var(--border-strong); font-style: normal; }
.hd-topbar strong { color: var(--fg); font-weight: 500; }
.hd-topbar>div { display: flex; align-items: center; gap: 16px; color: var(--fg-muted); }
.hd-global-search { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.hd-global-search kbd { margin-left: 6px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); font-family: inherit; font-size: 10px; }
.hd-account-menu { display: flex; align-items: center; gap: 6px; padding-left: 14px; border-left: 1px solid var(--border); }
.hd-account-menu .icon { width: 14px; height: 14px; }

.hd-page { height: 736px; padding: 30px 32px; overflow: hidden; }
.hd-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hd-page-title { display: block; font-size: 26px; font-weight: 650; letter-spacing: -.03em; }
.hd-page-head p { margin-top: 6px; color: var(--fg-muted); font-size: 13px; }
.hd-head-actions { display: flex; gap: 8px; }
.hd-head-actions .hd-select,.hd-select-icon { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); font-size: 12px; }
.hd-primary { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 7px; background: var(--primary); color: var(--primary-fg); font-size: 12px; font-weight: 600; }
.hd-filters { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.hd-filters>span { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--fg); font-size: 12px; white-space: nowrap; }
.hd-search { width: 420px; margin-right: auto; color: var(--fg-subtle) !important; font-size: 13px !important; }
.hd-search>.icon:last-child { margin-left: auto; }
.hd-select { min-width: 132px; justify-content: space-between; }
.hd-select .icon { width: 14px; height: 14px; color: var(--fg-muted); }
.hd-icon-button { width: 36px; justify-content: center; padding: 0 !important; }
.hd-chips { display: flex; gap: 8px; margin-top: 16px; }
.hd-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface); color: var(--fg-muted); font-size: 12px; font-weight: 500; }
.hd-chip b { color: var(--fg-subtle); font-size: 11px; font-weight: 500; }
.hd-chip.active { border-color: var(--fg); background: var(--fg); color: var(--background); }
.hd-chip.active b { color: color-mix(in srgb,var(--background) 70%,transparent); }
.hd-chip .icon { width: 14px; height: 14px; }

.hd-table { margin-top: 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.hd-table table { width: 100%; border-collapse: collapse; }
.hd-table thead { background: var(--surface-2); }
.hd-table th { height: 40px; padding: 0 12px; color: var(--fg-muted); font-size: 11px; font-weight: 500; text-align: left; white-space: nowrap; }
.hd-table th .icon { width: 12px; height: 12px; margin-left: 2px; vertical-align: -2px; }
.hd-table td { height: 66px; padding: 0 12px; border-top: 1px solid var(--border); font-size: 12px; white-space: nowrap; }
.hd-table tr.selected td { background: color-mix(in srgb,var(--primary) 7%,var(--surface)); }
.hd-check { display: block; width: 14px; height: 14px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); }
.hd-contact { display: flex; align-items: center; gap: 10px; }
.hd-contact strong { display: block; font-size: 13px; font-weight: 550; }
.hd-call { display: inline-flex; align-items: flex-start; gap: 8px; }
.hd-call>.icon { width: 15px; height: 15px; margin-top: 1px; color: var(--success); }
.hd-call.missed>.icon { color: var(--danger); }
.hd-call>span { font-size: 12px; }
.hd-call b { font-size: 13px; font-weight: 550; }
.hd-date { display: block; }
.hd-play-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--fg); font-size: 11px; font-weight: 500; white-space: nowrap; }
.hd-play-chip .icon { width: 12px; height: 12px; }
.hd-muted { color: var(--fg-subtle); }
.hd-note { color: var(--fg-muted); }
.hd-label { display: inline-flex; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--fg-muted); font-size: 11px; }

/* The contact panel is a full-height sheet over a dimmed page, as in the app. */
.hd-scrim { position: absolute; inset: 0; background: rgb(24 28 38 / .28); backdrop-filter: blur(2px); }
.hd-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: 480px; overflow: hidden; border-left: 1px solid var(--border); background: var(--surface); box-shadow: 0 16px 45px rgb(var(--shadow-color) / .16); }
.hd-sheet>header { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.hd-sheet>header strong { display: block; font-size: 16px; font-weight: 600; }
.hd-sheet>header>span:last-child { display: flex; gap: 16px; margin-left: auto; color: var(--fg-muted); }
.hd-sheet>section { margin: 0 18px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.hd-section-label { display: block; margin-bottom: 8px; color: var(--fg-muted); font-size: 11px; font-weight: 500; }
.hd-sheet section>p { font-size: 12px; line-height: 1.6; }
.hd-labels { display: flex; align-items: center; gap: 8px; }
.hd-label-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); font-size: 11px; }
.hd-label-chip .icon { width: 11px; height: 11px; color: var(--fg-subtle); }
.hd-add { display: inline-flex; align-items: center; gap: 5px; color: var(--fg-muted); font-size: 11px; }
.hd-add .icon { width: 13px; height: 13px; }
.hd-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.hd-stats b { display: block; margin-top: 4px; font-size: 16px; font-weight: 600; }
.hd-history-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 18px 10px; }
.hd-history-head strong { font-size: 15px; font-weight: 600; }
.hd-outline { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 7px; font-size: 11px; font-weight: 500; }
.hd-outline .icon { width: 14px; height: 14px; }
.hd-day { display: flex; align-items: center; gap: 10px; margin: 0 18px 8px; color: var(--fg-subtle); font-size: 11px; }
.hd-day::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.hd-call-card { margin: 0 18px 12px; padding: 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.hd-call-card-top { display: flex; align-items: center; gap: 10px; }
.hd-call-card-top>.hd-call { margin-right: auto; }
.hd-review { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-muted); font-size: 11px; }
.hd-review i { width: 14px; height: 14px; border: 1.5px solid var(--border-strong); border-radius: 50%; }
.hd-call-meta { margin-top: 8px; color: var(--fg-muted); font-size: 11px; }
.hd-call-note { margin-top: 6px; font-size: 12px; }
.hd-ai { margin-top: 10px; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: var(--accent); }
.hd-ai-head { display: flex; justify-content: space-between; padding: 9px 10px; border-bottom: 1px solid color-mix(in srgb,var(--accent-fg) 15%,transparent); font-size: 11px; }
.hd-ai-head>span { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-muted); }
.hd-ai-head b { color: var(--accent-fg); font-weight: 600; }
.hd-ai-head .icon { width: 13px; height: 13px; color: var(--accent-fg); }
.hd-ai-summary { display: flex; align-items: center; gap: 8px; padding: 10px; font-size: 12px; }
.hd-ai-summary>span { flex: 1; }
.hd-ai-summary .icon { width: 14px; height: 14px; color: var(--accent-fg); }

/* Interactions: rows open the sheet, chips filter, recordings play, reviews toggle. */
.hd-screen button { font: inherit; color: inherit; cursor: pointer; }
.hd-contact { display: flex; align-items: center; gap: 10px; padding: 0; background: none; text-align: left; }
.hd-contact:hover strong { color: var(--primary); }
.hd-table tbody tr:not(.selected):hover td { background: color-mix(in srgb,var(--surface-2) 45%,var(--surface)); }
.hd-chip { cursor: pointer; transition: background .15s,border-color .15s,color .15s; }
.hd-chip:not(.active):hover { border-color: var(--border-strong); color: var(--fg); }
.hd-play-chip { transition: background .15s,border-color .15s,color .15s; }
.hd-play-chip:hover { border-color: var(--fg-muted); }
.hd-play-chip .icon:nth-of-type(2),.hd-play-chip[aria-pressed=true] .icon:first-of-type { display: none; }
.hd-play-chip[aria-pressed=true] .icon:nth-of-type(2) { display: block; }
.hd-play-chip[aria-pressed=true] { position: relative; overflow: hidden; border-color: var(--primary); background: var(--accent); color: var(--accent-fg); }
.hd-play-chip[aria-pressed=true]::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--primary); transform-origin: left; animation: hd-progress 6s linear infinite; }
@keyframes hd-progress { from { transform: scaleX(0); } }
.hd-review { padding: 0; background: none; }
.hd-review[aria-pressed=true] { color: var(--success); }
.hd-review[aria-pressed=true] i { border-color: var(--success); background: radial-gradient(circle,var(--success) 40%,transparent 45%); }
.hd-ai-summary { width: 100%; border: 0; background: none; text-align: left; }
.hd-ai-summary>.icon:last-child { transition: transform .2s; }
.hd-ai-summary[aria-expanded=true]>.icon:last-child { transform: rotate(180deg); }
.hd-transcript { display: none; padding: 0 10px 10px 32px; font-size: 12px; line-height: 1.6; }
.hd-ai-summary[aria-expanded=true]+.hd-transcript { display: grid; gap: 4px; }
.hd-transcript b { font-weight: 600; }
.hd-sheet { overflow-y: auto; scrollbar-width: thin; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.hd-sheet>header { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.hd-sheet>header button { display: grid; place-items: center; padding: 0; background: none; color: var(--fg-muted); }
.hd-scrim { cursor: pointer; transition: opacity .28s; }
.hd-screen:not(.is-sheet-open) .hd-scrim { opacity: 0; pointer-events: none; }
.hd-screen:not(.is-sheet-open) .hd-sheet { transform: translateX(100%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1),visibility 0s .28s; }
.hd-screen :is(button):focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
@media(prefers-reduced-motion:reduce) { .hd-sheet,.hd-scrim { transition: none; } .hd-play-chip[aria-pressed=true]::after { animation: none; } }

/* Sidebar pages, extra page layouts, and the demo notice. */
.hd-sidebar button.hd-nav { width: 100%; border: 0; background: none; text-align: left; }
.hd-sidebar button.hd-nav:not(.active):hover { background: var(--surface-2); color: var(--fg); }
.hd-sidebar button.hd-nav.active { background: var(--accent); color: var(--accent-fg); }
.hd-search-short { width: 300px; }
.hd-select-icon { margin-left: 0; }
.hd-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 22px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.hd-chips+.hd-metrics { margin-top: 16px; }
.hd-metrics>div { padding: 16px 16px 18px; }
.hd-metrics>div+div { border-left: 1px solid var(--border); }
.hd-metrics span { display: flex; align-items: center; justify-content: space-between; color: var(--fg-muted); font-size: 12px; }
.hd-metrics span .icon { width: 15px; height: 15px; color: var(--fg-subtle); }
.hd-metrics strong { display: block; margin-top: 10px; font-size: 28px; font-weight: 650; letter-spacing: -.03em; }
.hd-metrics small { margin-top: 4px; }
.hd-card { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.hd-card>header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); }
.hd-card>header strong { display: block; font-size: 14px; font-weight: 600; }
.hd-card>header small { margin-top: 4px; }
.hd-overview { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 16px; margin-top: 16px; }
.hd-synced { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 11px; }
.hd-synced::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hd-chart { padding: 14px 16px 16px; }
.hd-legend { display: flex; align-items: center; gap: 6px; color: var(--fg-muted); font-size: 11px; }
.hd-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.hd-legend b { margin-left: auto; font-weight: 500; }
.hd-bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 18px; height: 150px; margin: 12px 0 8px; }
.hd-bars>span { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.hd-bars i { width: 64%; max-width: 34px; border-radius: 4px 4px 0 0; background: var(--primary); }
.hd-attention>div { padding: 16px; }
.hd-eyebrow { display: block; color: var(--fg-muted); font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.hd-big { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 30px; font-weight: 650; }
.hd-big .icon { width: 18px; height: 18px; color: var(--warning); }
.hd-attention p { margin: 8px 0 14px; color: var(--fg-muted); font-size: 12px; line-height: 1.6; }
.hd-attention .hd-outline { background: var(--surface); }
.hd-attention .hd-outline .icon { width: 13px; height: 13px; }
.hd-report { margin-top: 16px; }
.hd-report table { width: 100%; border-collapse: collapse; }
.hd-report thead { background: var(--surface-2); }
.hd-report th { height: 40px; padding: 0 14px; color: var(--fg-muted); font-size: 11px; font-weight: 500; text-align: left; }
.hd-report td { height: 60px; padding: 0 14px; border-top: 1px solid var(--border); font-size: 12px; }
.hd-person { gap: 10px; }
.hd-phone { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.hd-phone .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--fg-muted); }
.hd-status { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 12px; }
.hd-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hd-right { text-align: right !important; }
.hd-row-actions { display: inline-flex; align-items: center; gap: 18px; color: var(--fg-muted); font-size: 12px; }
.hd-row-actions>span,.hd-row-actions>button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; }
.hd-row-actions>button:hover { color: var(--primary); }
.hd-row-actions .icon { width: 14px; height: 14px; }
.hd-clip { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.hd-table .hd-label+.hd-label { margin-left: 4px; }
.hd-toast { position: absolute; z-index: 5; top: 80px; left: calc(228px + (100% - 228px) / 2); display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: 0 12px 30px -10px rgb(var(--shadow-color) / .3); font-size: 13px; white-space: nowrap; transform: translateX(-50%); }
.hd-toast[hidden] { display: none; }
.hd-toast.is-shown { animation: hd-toast-in .25s ease-out; }
@keyframes hd-toast-in { from { opacity: 0; transform: translate(-50%,-6px); } }
.hd-toast>.icon { width: 15px; height: 15px; color: var(--primary); }
.hd-toast a { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--primary); color: var(--primary-fg); font-size: 12px; font-weight: 600; }
.hd-toast a .icon { width: 12px; height: 12px; }
.hd-screen [data-hd-page] *,.hd-sidebar,.hd-topbar { cursor: default; }
.hd-screen :is(button,a,.hd-scrim,.hd-nav,.hd-chip,.hd-select,.hd-search,.hd-icon-button,.hd-global-search,.hd-account-menu,.hd-outline,.hd-primary,.hd-row-actions>span,.hd-label-chip,.hd-add,.hd-check,.hd-label,.hd-muted) { cursor: pointer !important; }
.hd-screen :is(button,a) * { cursor: pointer !important; }
@media(prefers-reduced-motion:reduce) { .hd-toast.is-shown { animation: none; } }

.hd-search-short>.icon:last-child { margin-left: 0; }

/* Small controls stay readable outside the scaled dashboard. */
.dashboard-demo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 2px 12px; text-align: left; }
.dashboard-demo-label { display: inline-flex; align-items: center; gap: 7px; color: var(--fg-muted); font-size: 12px; font-weight: 500; }
.dashboard-demo-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.dashboard-fullscreen-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--fg-muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.dashboard-fullscreen-button .icon { width: 14px; height: 14px; }
.dashboard-fullscreen-button:hover { background: var(--surface-2); color: var(--fg); }
.dashboard-fullscreen-button:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.dashboard-dialog { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--background); color: var(--fg); overflow: hidden; }
.dashboard-dialog::backdrop { background: var(--background); }
.dashboard-expanded-layout { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 8px max(8px,env(safe-area-inset-left),env(safe-area-inset-right)); }
.dashboard-expanded-layout .dashboard-demo-toolbar { flex-shrink: 0; padding-bottom: 8px; }
.dashboard-expanded-viewport { flex: 1; min-height: 0; overflow: hidden; }
.dashboard-expanded-viewport .wd-fit { width: 100%; }
.dashboard-expanded-viewport .dashboard-preview { transform: none; box-shadow: none; }
.dashboard-dialog.is-portrait .dashboard-expanded-layout { inset: auto; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(90deg); }

/* Place the demo hint and quiet expand icon at the preview's faded bottom edge. */
.product-stage > .dashboard-demo-toolbar { position: absolute; z-index: 2; inset: auto 2px 22px; padding: 0; }
.product-stage .dashboard-demo-label { font-size: 11px; color: var(--fg-subtle); }
.product-stage .dashboard-demo-label i { width: 5px; height: 5px; }
.product-stage .dashboard-fullscreen-button { width: 36px; height: 36px; min-height: 36px; padding: 9px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-subtle); }
.product-stage .dashboard-fullscreen-button:hover { background: var(--surface-2); color: var(--fg); }
.product-stage .dashboard-fullscreen-button .icon { width: 15px; height: 15px; }
@media (max-width: 600px) { .product-stage > .dashboard-demo-toolbar { bottom: 12px; } }

/* Fullscreen uses the available height; scroll the page beneath its fixed top bar. */
.dashboard-expanded-viewport .hd-screen { grid-template-rows: minmax(0,1fr); }
.dashboard-expanded-viewport .hd-main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dashboard-expanded-viewport .hd-topbar { flex-shrink: 0; }
.dashboard-expanded-viewport .hd-page { flex: 1; min-height: 0; height: auto; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
