/* Revenue assurance v3: Home. Leakage dashboard: KPIs, Fina board, pre-close, widget grid with drag to reorder, widget library.
   Kit tokens only (no literal colours), 4 px spacing scale, controls 40 or 32 px. */

/* ---------- Header actions: export menu ---------- */
.hm-menu-wrap { position: relative; display: inline-flex; }
.hm-menu { position: absolute; z-index: 60; top: calc(100% + 4px); right: 0; width: 248px; padding: 4px; background: var(--popover); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-filter-popover); }
.hm-menu .rx-pop-item { height: auto; min-height: 40px; padding: 8px 12px; align-items: flex-start; }
.hm-menu .rx-pop-item svg.lucide { margin-top: 2px; }
.hm-menu-label { display: block; font-size: 14px; line-height: 20px; }
.hm-menu-sub { display: block; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }

/* ---------- Status line under the title ---------- */
.hm-status { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-status .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-foreground); opacity: .6; }
.hm-status svg.lucide { width: 14px; height: 14px; color: var(--muted-foreground); }

/* ---------- Section spacing ---------- */
.hm > * + * { margin-top: 24px; }
.hm-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.hm-section-head h2 { font-size: 16px; line-height: 24px; font-weight: 600; }
.hm-section-head .t-meta { margin-left: 4px; }

/* ---------- KPI extras ---------- */
.hm .rx-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hm .rx-kpi-delta { display: inline-flex; align-items: center; gap: 4px; }
.hm .rx-kpi-delta svg.lucide { width: 12px; height: 12px; }

/* ---------- Pre-close (open month) ---------- */
.hm-pre { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 0; border: 1px solid var(--border-brand, var(--border)); border-radius: var(--radius-xl); overflow: hidden; background: var(--background); }
.hm-pre-sum { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--background-brand); border-right: 1px solid var(--border); }
.hm-pre-sum .hm-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--primary); }
.hm-pre-value { font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.4px; color: var(--foreground); }
.hm-pre-list { display: flex; flex-direction: column; }
.hm-pre-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.hm-pre-row:last-child { border-bottom: 0; }
.hm-pre-row .cell-main { font-weight: 500; }
.hm-pre-row .cell-sub { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hm-pre-amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.hm-pre-amt.leak { color: var(--destructive); }
.hm-pre-amt.over { color: var(--warning); }
.hm-pre-cta { margin-top: auto; padding-top: 8px; }
.hm-pre-row { grid-template-columns: minmax(0, 1fr) auto 32px; }

/* ---------- Fina board ---------- */
.hm-board { border-radius: var(--radius-xl); border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); background: var(--background-brand); padding: 20px; }
.hm-board-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.hm-board-head .fina-spark { width: 18px; height: 18px; }
.hm-board-title { font-family: var(--font-serif); font-size: 20px; line-height: 28px; font-weight: 500; }
.hm-insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.hm-insight { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius-lg); background: var(--background); border: 1px solid var(--border); min-width: 0; }
.hm-insight-top { display: flex; align-items: center; gap: 8px; }
.hm-insight-amt { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.2px; font-variant-numeric: tabular-nums; }
.hm-insight-amt.leak { color: var(--destructive); }
.hm-insight-amt.over { color: var(--warning); }
.hm-insight-amt.good { color: var(--success); }
.hm-insight-text { font-family: var(--font-serif); font-size: 15px; line-height: 22px; color: var(--foreground); flex: 1; }
.hm-insight-text b { font-weight: 600; }
.hm-insight-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-insight-foot .grow { min-width: 0; }
.hm-owner { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hm-owner svg.lucide { width: 12px; height: 12px; }

/* ---------- Widgets grid ---------- */
.hm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; grid-auto-flow: row dense; }
.hm-w { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); transition: box-shadow var(--motion-quick), opacity var(--motion-quick), border-color var(--motion-quick); }
.hm-w.wide { grid-column: 1 / -1; }
.hm-w:hover { box-shadow: var(--shadow-sm); }
.hm-w.dragging { opacity: .45; }
.hm-w.drop-before { box-shadow: inset 0 3px 0 var(--primary); border-color: var(--border-brand, var(--primary)); }
.hm-w.drop-after { box-shadow: inset 0 -3px 0 var(--primary); border-color: var(--border-brand, var(--primary)); }
.hm-w-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 0 16px; min-height: 48px; }
.hm-grip { display: inline-grid; place-items: center; width: 20px; height: 32px; margin-left: -8px; color: var(--muted-foreground); cursor: grab; opacity: 0; transition: opacity var(--motion-quick); }
.hm-w:hover .hm-grip, .hm-w:focus-within .hm-grip { opacity: 1; }
.hm-grip svg.lucide { width: 14px; height: 14px; }
.hm-w-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.hm-w-sub { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hm-w-body { flex: 1; padding: 12px 16px 16px; min-width: 0; }
.hm-w-body .rx-table { border-radius: var(--radius-lg); }
.hm-w-body .rx-table .table td { height: 44px; padding: 8px 12px; }
.hm-menu.hm-menu-sm { width: 200px; }

/* ---------- Charts (inline, kit tokens) ---------- */
.hm-hbars { display: flex; flex-direction: column; gap: 4px; }
.hm-hbar { display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr) 72px; gap: 12px; align-items: center; min-height: 32px; padding: 0 8px; margin: 0 -8px; border-radius: var(--radius-md); border: 0; background: transparent; text-align: left; width: calc(100% + 16px); }
button.hm-hbar { cursor: pointer; }
button.hm-hbar:hover { background: var(--accent); }
.hm-hbar-label { min-width: 0; }
.hm-hbar-label .cell-main { display: block; font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-hbar-label .cell-sub { display: block; font-size: 12px; line-height: 16px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-track { height: 8px; border-radius: var(--radius-full); background: var(--muted); overflow: hidden; display: flex; }
.hm-track > i { display: block; height: 100%; background: var(--chart-1); }
.hm-track > i.c2 { background: var(--chart-2); }
.hm-track > i.c3 { background: var(--chart-3); }
.hm-track > i.leak { background: var(--destructive); }
.hm-track > i.over { background: var(--warning); }
.hm-track > i.good { background: var(--success); }
.hm-track > i.brand { background: var(--primary); }
.hm-track > i.soft { background: var(--muted-brand); }
.hm-hbar-val { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }

.hm-stack { display: flex; height: 12px; border-radius: var(--radius-full); overflow: hidden; background: var(--muted); gap: 2px; }
.hm-stack > i { display: block; height: 100%; }
.hm-stack > i.s1 { background: var(--destructive); }
.hm-stack > i.s2 { background: var(--warning); }
.hm-stack > i.s3 { background: var(--success); }
.hm-stack > i.s4 { background: var(--chart-3); }
.hm-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; }
.hm-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hm-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.hm-legend i.s1, .hm-key.s1 { background: var(--destructive); }
.hm-legend i.s2, .hm-key.s2 { background: var(--warning); }
.hm-legend i.s3, .hm-key.s3 { background: var(--success); }
.hm-legend i.s4, .hm-key.s4 { background: var(--chart-3); }
.hm-legend i.found { background: var(--destructive); }
.hm-legend i.proj { background: color-mix(in srgb, var(--destructive) 35%, transparent); border: 1px dashed var(--destructive); }
.hm-legend i.soft { background: var(--muted-brand); }
.hm-legend i.c2 { background: var(--chart-2); }
.hm-legend i.rec { background: var(--success); }

.hm-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.hm-stage { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--radius-lg); background: var(--muted); min-width: 0; }
.hm-stage .t-meta { display: inline-flex; align-items: center; gap: 6px; }
.hm-stage .hm-key { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.hm-stage strong { font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }

.hm-trend svg { display: block; width: 100%; height: auto; overflow: visible; }
.hm-trend .bar-found { fill: var(--destructive); }
.hm-trend .bar-rec { fill: var(--success); }
.hm-trend .bar-proj { fill: color-mix(in srgb, var(--destructive) 35%, transparent); stroke: var(--destructive); stroke-width: 1; stroke-dasharray: 3 2; }
.hm-trend .axis { stroke: var(--border); stroke-width: 1; }
.hm-trend text { fill: var(--muted-foreground); font-size: 11px; font-family: var(--font-sans, inherit); }
.hm-trend text.cur { fill: var(--foreground); font-weight: 600; }
.hm-spark { display: block; width: 96px; height: 28px; }
.hm-spark path { fill: none; stroke: var(--destructive); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.hm-spark circle { fill: var(--destructive); }

/* Close readiness checks */
.hm-checks { display: flex; flex-direction: column; }
.hm-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hm-check:last-child { border-bottom: 0; }
.hm-check svg.lucide { width: 16px; height: 16px; }
.hm-check.pass svg.lucide { color: var(--success); }
.hm-check.open svg.lucide { color: var(--warning); }
.hm-check.pending svg.lucide { color: var(--muted-foreground); }
.hm-check .cell-main { font-size: 13px; line-height: 18px; font-weight: 500; }
.hm-check .cell-sub { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hm-ready { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hm-ready .bar { flex: 1; }

/* Metric pairs (bench and billable) */
.hm-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.hm-metric { padding: 12px; border-radius: var(--radius-lg); background: var(--muted); min-width: 0; }
.hm-metric strong { display: block; font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }

.hm-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 18px; }
.hm-chip { cursor: pointer; transition: background var(--motion-quick); }
.hm-chip:hover { background: var(--accent); }
.hm-dialog-meta { margin-top: 8px; }
.hm-w-head .hm-menu { top: calc(100% + 2px); }

/* ---------- Widget library (side panel) ---------- */
.hm-lib { display: flex; flex-direction: column; gap: 8px; }
.hm-lib-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }
.hm-lib-row.on { border-color: color-mix(in srgb, var(--primary) 30%, transparent); background: var(--background-brand); }
.hm-lib-ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--muted); color: var(--muted-foreground); }
.hm-lib-row.on .hm-lib-ic { background: var(--background); color: var(--primary); }
.hm-lib-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

.hm-empty-grid { border: 1px dashed var(--border); border-radius: var(--radius-xl); }

@media (max-width: 1100px) {
  .hm .rx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-pre { grid-template-columns: minmax(0, 1fr); }
  .hm-pre-sum { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 900px) { .hm-grid { grid-template-columns: minmax(0, 1fr); } }
/* Integration pass: the close moment hero, stale banner, waiting board, readiness spacing (H), visible Accepted (J). */
.hm-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 24px; align-items: center; padding: 24px; border-radius: var(--radius-xl); background: var(--background-brand); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.hm-hero-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hm-hero .hm-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--primary); }
.hm-hero .hm-eyebrow .fina-spark { width: 14px; height: 14px; }
.hm-hero-title { font-family: var(--font-serif); font-size: 26px; line-height: 34px; font-weight: 500; }
.hm-hero-cta { gap: 8px; margin-top: 8px; }
.hm-hero-src { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); min-width: 0; }
.hm-src { display: flex; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--border); }
.hm-src:last-child { border-bottom: 0; }
.hm-src .grow { display: flex; flex-direction: column; min-width: 0; }
.hm-src strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.hm-src-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-md); background: var(--muted); color: var(--muted-foreground); flex: none; }
.hm-src-ic svg.lucide { width: 14px; height: 14px; }
.hm-results-head { margin-bottom: -8px; }
.hm-stale { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-xl); background: var(--background-brand); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); font-size: 14px; line-height: 20px; }
.hm-stale > svg.lucide { width: 16px; height: 16px; color: var(--primary); flex: none; }
.hm-wait { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius-lg); border: 1px dashed var(--border); color: var(--muted-foreground); }
.hm-wait > svg.lucide { width: 16px; height: 16px; flex: none; }
.hm-check .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-track > i.acc { background: var(--chart-3); }
@media (max-width: 1100px) { .hm-hero { grid-template-columns: minmax(0, 1fr); } }
.hm-src-ic img { width: 18px; height: 18px; object-fit: contain; display: block; }

/* QA fixes (V6): Before close as a summary band on top and the gap list full width; each row stacks its lines. */
.hm-pre { grid-template-columns: minmax(0, 1fr); }
.hm-pre-sum { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 24px; padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--border); }
.hm-pre-sum .hm-eyebrow { flex-basis: 100%; }
.hm-pre-sum .hm-pre-value { font-size: 28px; line-height: 36px; }
.hm-pre-sum .hm-pre-cta { margin: 0 0 0 auto; padding: 0; }
.hm-pre-row .cell-main, .hm-pre-row .cell-sub { display: block; }
.hm-pre-row .cell-sub + .cell-sub { margin-top: 2px; }
.hm-pre-reason { font-family: var(--font-serif); font-size: 14px; line-height: 20px; color: var(--foreground); margin-top: 2px; }

/* QA fixes (V5): the drag handle sits in the header gutter, so titles align with the body whether or not it shows;
   the grid packs widgets by height (spans set by home.js), so a short widget never leaves a tall empty card. */
.hm-w { position: relative; }
.hm-w-head { padding-left: 16px; }
.hm-grip { position: absolute; left: 0; top: 16px; width: 16px; height: 24px; margin: 0; }
.hm-grid.packed { grid-auto-rows: 4px; row-gap: 0; align-items: start; }
.hm-grid.packed > .hm-w { margin-bottom: 16px; }
.hm-grid { align-items: start; }
.hm-stages.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Review round (23 Nov): compact Fina board (14 px Inter card text, 12 px padding, 4 per row, 2 lines, top 4 with Show all),
   Before close collapsed to its header row, and projected bars in a visible leakage red with a legend. */
.hm-board { padding: 16px; }
.hm-board-head { margin-bottom: 12px; }
.hm-board-title { font-size: 18px; line-height: 24px; }
.hm-insights { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hm-insight { gap: 6px; padding: 12px; }
.hm-insight-top { gap: 8px; min-width: 0; }
.hm-insight-top .t-meta { min-width: 0; }
.hm-insight-amt { font-size: 18px; line-height: 24px; flex: none; }
.hm-insight-cat { display: block; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted-foreground); }
.hm-insight-text { font-family: var(--font-sans, inherit); font-size: 14px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; flex: none; }
.hm-insight-foot { margin-top: auto; padding-top: 4px; gap: 6px; min-width: 0; }
.hm-insight-foot .btn { max-width: 100%; }
.hm-insight-foot .btn.primary, .hm-insight-foot .btn.outline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-board-more { display: flex; justify-content: center; margin-top: 8px; }
@media (max-width: 1100px) { .hm-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hm-insights { grid-template-columns: minmax(0, 1fr); } }

.hm-pre .hm-pre-sum { flex-wrap: nowrap; gap: 12px; padding: 8px 12px 8px 8px; border-bottom: 0; }
.hm-pre.open .hm-pre-sum { border-bottom: 1px solid var(--border); }
.hm-pre-toggle { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 4px 8px; border: 0; border-radius: var(--radius-md); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.hm-pre-toggle:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.hm-pre-toggle:focus-visible { outline: 2px solid var(--ring, var(--primary)); outline-offset: 1px; }
.hm-pre-chev { width: 16px; height: 16px; flex: none; color: var(--muted-foreground); transition: transform var(--motion-quick); }
.hm-pre.open .hm-pre-chev { transform: rotate(90deg); }
.hm-pre-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-pre-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.hm-pre .hm-pre-sum .hm-pre-value { font-size: 20px; line-height: 28px; }
.hm-pre .hm-pre-sum .hm-eyebrow { flex-basis: auto; }
.hm-pre .hm-pre-sum .hm-pre-cta { margin: 0; padding: 0 12px; flex: none; }

.hm-track > i.proj { background: color-mix(in srgb, var(--destructive) 70%, var(--background)); background-image: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--background) 35%, transparent) 3px 5px); }
.hm-track > i.proj-over { background: color-mix(in srgb, var(--warning) 75%, var(--background)); background-image: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--background) 35%, transparent) 3px 5px); }
.hm-legend i.proj-leak { background: color-mix(in srgb, var(--destructive) 70%, var(--background)); background-image: repeating-linear-gradient(135deg, transparent 0 2px, color-mix(in srgb, var(--background) 35%, transparent) 2px 3px); }
.hm-legend i.proj-over { background: color-mix(in srgb, var(--warning) 75%, var(--background)); background-image: repeating-linear-gradient(135deg, transparent 0 2px, color-mix(in srgb, var(--background) 35%, transparent) 2px 3px); }

/* Round 3: KPI row of five, recovery rollup, period-end hero facts, open-month band, reconciliation pairs, contracts by stage,
   six-status pipeline. Kit tokens only. */
.hm .rx-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hm-rollup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 4px 4px 4px 12px; border-radius: var(--radius-lg); background: var(--muted); }
.hm-rollup-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; }
.hm-rollup-item svg.lucide { width: 14px; height: 14px; color: var(--muted-foreground); }
.hm-rollup-item strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.hm-rollup-sep { width: 14px; height: 14px; color: var(--muted-foreground); }
.hm-hero-title { font-size: 20px; line-height: 28px; }
.hm-hero-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.hm-hero-facts span { display: inline-flex; align-items: center; gap: 4px; }
.hm-hero-facts svg.lucide { width: 14px; height: 14px; }
.hm-src-btn { width: 100%; padding: 4px 0; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.hm-src-btn:last-child { border-bottom: 0; }
.hm-src-btn:hover .cell-main { color: var(--primary); }
.hm-src-btn .cell-main { font-size: 14px; line-height: 20px; font-weight: 500; }
.hm-src-btn .cell-sub { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hm-open { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-radius: var(--radius-xl); background: var(--muted); border: 1px solid var(--border); }
.hm-open-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hm-w-solo { max-width: 720px; }
.hm-pairs, .hm-stagelist { display: flex; flex-direction: column; }
.hm-pair, .hm-stagerow { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 4px 4px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 0; }
.hm-pair:last-child, .hm-stagerow:last-child { border-bottom: 0; }
.hm-pair:hover:not(:disabled), .hm-stagerow:hover { background: var(--accent); }
.hm-pair.off { cursor: default; color: var(--muted-foreground); }
.hm-pair > svg.lucide { width: 16px; height: 16px; flex: none; }
.hm-pair > svg.success { color: var(--success); }
.hm-pair > svg.destructive { color: var(--destructive); }
.hm-pair > svg.info { color: var(--info, var(--primary)); }
.hm-pair > svg.neutral { color: var(--muted-foreground); }
.hm-pair .cell-main, .hm-stagerow .cell-main { font-size: 14px; line-height: 20px; }
.hm-stagerow .grow { display: flex; flex-direction: column; min-width: 0; }
.hm-stagerow .cell-sub { font-size: 12px; line-height: 16px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-stagerow > svg.lucide { width: 16px; height: 16px; flex: none; }
.hm-stages.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
button.hm-stage { border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.hm-stage:hover { background: var(--accent); }
.hm-stack > i.s5, .hm-legend i.s5, .hm-key.s5 { background: var(--chart-2); }
.hm-stack > i.s6, .hm-legend i.s6, .hm-key.s6 { background: var(--primary); }
.hm-readonly { display: flex; align-items: center; gap: 8px; }
.hm-readonly svg.lucide { width: 14px; height: 14px; flex: none; }
@media (max-width: 1100px) { .hm .rx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hm-open { flex-direction: column; align-items: flex-start; } }
@media (max-width: 640px) { .hm .rx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
