/* =============================================================================
 * Via Hive Command Center V2 - Operations dashboard (D-434, Founder verdict 2026-10-07)
 * -----------------------------------------------------------------------------
 * Hierarchy for an operator: 1 Action required, 2 Marketplace now, 3 Money, 4 Trust & safety, 5 People, 6 Growth.
 * Scope: ONLY the Command Center dashboard template (modules/dashboard/views/dashboard.html, vh2d-* classes). It sets no
 * rule on any shared class (.vh2-kpi, .vh2-stat, .vh2-btn, tables, shell), so it cannot move another page.
 * Tokens only (generated --vh2-* roles; light and dark come from the roles). Selectors carry the .v2-app prefix so they
 * out-rank the shell's `.v2-app a { color: inherit }` / `.v2-app p { margin: 0 }` resets without !important.
 * Type: page title 26 > section heading 18 > card title 13 / row name 14; big numbers 30 (hero 40), tabular figures;
 * body 14, secondary text 13, smallest 12; secondary text uses text-secondary (never tertiary/disabled).
 * Nothing here clips content: no overflow:hidden, no fixed card heights (cards grow with their text).
 * ========================================================================== */

.v2-app .vh2d {
  display: flex; flex-direction: column; gap: var(--vh2-s8);
  max-width: 1520px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; /* INTEGRATION: same 20px inset as every legacy .page, so headings do not jump sideways between Dashboard and the other pages */
  font-size: 14px; line-height: 1.45; color: var(--vh2-text-primary);
}

/* ------------------------------------------------------------------ page header */
.v2-app .vh2d__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--vh2-s4); flex-wrap: wrap; }
.v2-app .vh2d__title { font-size: 28px; line-height: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--vh2-text-primary); }
.v2-app .vh2d__asof { margin-top: var(--vh2-s1); font-size: 14px; color: var(--vh2-text-secondary); }
.v2-app .vh2d__asof time { font-weight: 600; color: var(--vh2-text-primary); font-variant-numeric: tabular-nums; }
.v2-app .vh2d-btn {
  min-height: var(--vh2-control-h); padding: 0 var(--vh2-s4); border-radius: var(--vh2-r-pill);
  border: 1px solid var(--vh2-action-secondary-border); background: var(--vh2-action-secondary-bg);
  color: var(--vh2-action-secondary-fg); font-size: 14px; font-weight: 600; box-shadow: var(--vh2-shadow-xs);
}
.v2-app .vh2d-btn:hover { background: var(--vh2-bg-sunken); }

/* ------------------------------------------------------------------ sections */
.v2-app .vh2d-section { display: flex; flex-direction: column; gap: var(--vh2-s3); min-width: 0; }
.v2-app .vh2d-section__head { display: flex; align-items: center; gap: var(--vh2-s3); flex-wrap: wrap; }
.v2-app .vh2d-section__icon {
  width: 32px; height: 32px; padding: 7px; border-radius: var(--vh2-r-sm);
  background: var(--vh2-neutral-bg); color: var(--vh2-text-secondary);
}
.v2-app .vh2d-section--action .vh2d-section__icon { background: var(--vh2-brand-soft); color: var(--vh2-brand-text); }
.v2-app .vh2d-section__text { flex: 1 1 280px; min-width: 0; }
.v2-app .vh2d-section__title { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--vh2-text-primary); }
.v2-app .vh2d-section__desc { font-size: 14px; color: var(--vh2-text-secondary); max-width: 78ch; }
.v2-app .vh2d-link { font-size: 14px; font-weight: 600; color: var(--vh2-text-link); white-space: nowrap; }
.v2-app .vh2d-link:hover { text-decoration: underline; }

.v2-app .vh2d-pill {
  display: inline-flex; align-items: center; padding: var(--vh2-s1) var(--vh2-s3); border-radius: var(--vh2-r-pill);
  font-size: 12px; font-weight: 700; line-height: 16px; white-space: nowrap;
  background: var(--vh2-neutral-bg); color: var(--vh2-neutral-fg); border: 1px solid var(--vh2-neutral-border);
}
.v2-app .vh2d-pill--ok { background: var(--vh2-success-bg); color: var(--vh2-success-fg); border-color: var(--vh2-success-border); }
.v2-app .vh2d-pill--warn { background: var(--vh2-callout-bg); color: var(--vh2-warning-fg); border-color: var(--vh2-warning-border); }
.v2-app .vh2d-pill--danger { background: var(--vh2-danger-bg); color: var(--vh2-danger-fg); border-color: var(--vh2-danger-border); }

/* ------------------------------------------------------------------ action queues */
.v2-app .vh2d-queues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--vh2-s4); align-items: start; }
.v2-app .vh2d-panel { background: var(--vh2-surface); border: 1px solid var(--vh2-border-default); border-radius: var(--vh2-r-lg); box-shadow: var(--vh2-shadow-xs); min-width: 0; }
.v2-app .vh2d-panel__title { padding: var(--vh2-s3) var(--vh2-s4); font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--vh2-text-secondary); border-bottom: 1px solid var(--vh2-border-subtle); }

.v2-app .vh2d-queue__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: var(--vh2-s4);
  min-height: 64px; padding: var(--vh2-s3) var(--vh2-s4); border-top: 1px solid var(--vh2-border-subtle);
}
.v2-app .vh2d-queue__row:first-child { border-top: 0; }
.v2-app .vh2d-queue__row--critical { box-shadow: inset 4px 0 0 var(--vh2-danger-fg); }
.v2-app .vh2d-queue__row--warn { box-shadow: inset 4px 0 0 var(--vh2-warning-fg); }
.v2-app .vh2d-queue__row--info { box-shadow: inset 4px 0 0 var(--vh2-info-fg); }
.v2-app .vh2d-queue__main { min-width: 0; }
.v2-app .vh2d-queue__name { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--vh2-text-primary); }
.v2-app .vh2d-queue__why { margin-top: 2px; font-size: 14px; line-height: 18px; color: var(--vh2-text-secondary); }
.v2-app .vh2d-queue__figure { display: flex; flex-direction: column; align-items: flex-end; min-width: 72px; text-align: right; }
.v2-app .vh2d-queue__count { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--vh2-text-secondary); }
.v2-app .vh2d-queue__row--critical .vh2d-queue__count { color: var(--vh2-danger-fg); }
.v2-app .vh2d-queue__row--warn .vh2d-queue__count { color: var(--vh2-warning-fg); }
.v2-app .vh2d-queue__row--info .vh2d-queue__count { color: var(--vh2-info-fg); }
.v2-app .vh2d-queue__cap { font-size: 12px; line-height: 16px; color: var(--vh2-text-secondary); }
.v2-app .vh2d-queue__clear { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--vh2-text-secondary); }   /* brand polish: green is reserved for completed/delivered/paid */
.v2-app .vh2d-queue__go {
  display: inline-flex; align-items: center; justify-content: center; min-width: 72px; min-height: 32px; padding: 0 var(--vh2-s3);
  border-radius: var(--vh2-r-pill); border: 1px solid var(--vh2-border-strong); background: var(--vh2-surface);
  font-size: 14px; font-weight: 600; color: var(--vh2-text-primary); box-shadow: var(--vh2-shadow-xs);
}
.v2-app .vh2d-queue__go:hover { background: var(--vh2-bg-subtle); }
/* brand polish: urgent money rows = the ONE primary button (brand gradient, inset highlight, tight shadow) */
.v2-app .vh2d-queue__go--primary {
  background-color: var(--vh2-action-primary-bg); background-image: var(--vh2-gradient-cta); background-size: var(--vh2-cta-size); background-position: var(--vh2-cta-pos);
  border-color: transparent; color: var(--vh2-action-primary-fg); box-shadow: var(--vh2-primary-inset), var(--vh2-shadow-pill); text-shadow: var(--vh2-primary-text-shadow);
}
.v2-app .vh2d-queue__go--primary:hover { background-image: var(--vh2-gradient-brand); background-position: 0 0; box-shadow: var(--vh2-primary-inset), var(--vh2-shadow-pill-hover); }
/* work that needs review but does not put money at risk: the white secondary button (brand polish: no blue), so orange stays for the urgent money rows */
.v2-app .vh2d-queue__go--accent { background: var(--vh2-surface); border-color: var(--vh2-border-strong); color: var(--vh2-text-primary); }
.v2-app .vh2d-queue__go--accent:hover { background: var(--vh2-bg-subtle); }
.v2-app .vh2d-queue__row--loading, .v2-app .vh2d-queue__row--unknown { grid-template-columns: minmax(0, 1fr) auto; }

.v2-app .vh2d-error { margin: var(--vh2-s3); padding: var(--vh2-s4); border-radius: var(--vh2-r-md); background: var(--vh2-danger-bg); border: 1px solid var(--vh2-danger-border); display: flex; flex-direction: column; align-items: flex-start; gap: var(--vh2-s2); }
.v2-app .vh2d-error__title { font-size: 14px; font-weight: 700; color: var(--vh2-danger-fg); }
.v2-app .vh2d-error__body { font-size: 14px; color: var(--vh2-text-primary); }
.v2-app .vh2d-allclear { padding: var(--vh2-s3) var(--vh2-s4); border-radius: var(--vh2-r-md); background: var(--vh2-success-bg); border: 1px solid var(--vh2-success-border); font-size: 14px; font-weight: 600; color: var(--vh2-success-fg); }

/* ------------------------------------------------------------------ loading skeletons */
.v2-app .vh2d-skeleton-group { display: grid; gap: var(--vh2-s3); padding: var(--vh2-s4); }
.v2-app .vh2d-skeleton { min-height: 44px; border-radius: var(--vh2-r-sm); background: linear-gradient(90deg, var(--vh2-bg-sunken) 25%, var(--vh2-neutral-bg) 50%, var(--vh2-bg-sunken) 75%); background-size: 200% 100%; animation: vh2d-shimmer 1.4s linear infinite; }
.v2-app .vh2d-skeleton--line { min-height: 16px; margin-top: var(--vh2-s2); }
@keyframes vh2d-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .v2-app .vh2d-skeleton { animation: none; } }

/* ------------------------------------------------------------------ metric cards */
.v2-app .vh2d-grid { display: grid; gap: var(--vh2-s3); }
.v2-app .vh2d-grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.v2-app .vh2d-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.v2-app .vh2d-grid--money { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
.v2-app .vh2d-grid--secondary { margin-top: 0; }

.v2-app .vh2d-stat {
  position: relative; display: flex; flex-direction: column; gap: var(--vh2-s1); min-width: 0;
  padding: var(--vh2-s4) var(--vh2-s5); background: var(--vh2-surface);
  border: 1px solid var(--vh2-border-default); border-radius: var(--vh2-r-lg); box-shadow: var(--vh2-shadow-xs);
}
.v2-app .vh2d-stat::after { content: "\2192"; position: absolute; top: var(--vh2-s3); right: var(--vh2-s4); font-size: 14px; color: var(--vh2-text-secondary); }
.v2-app .vh2d-stat:hover { border-color: var(--vh2-border-strong); box-shadow: var(--vh2-shadow-sm); }
.v2-app .vh2d-stat:hover::after { color: var(--vh2-brand-text); }
.v2-app .vh2d-stat__label { padding-right: var(--vh2-s6); font-size: 14px; line-height: 18px; font-weight: 600; color: var(--vh2-text-secondary); }
.v2-app .vh2d-stat__value { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; color: var(--vh2-text-primary); overflow-wrap: anywhere; }
.v2-app .vh2d-stat__meta { font-size: 12px; line-height: 16px; color: var(--vh2-text-secondary); }
.v2-app .vh2d-stat__meta strong { font-weight: 700; color: var(--vh2-text-primary); font-variant-numeric: tabular-nums; }
.v2-app .vh2d-stat--compact { padding: var(--vh2-s3) var(--vh2-s4); }
.v2-app .vh2d-stat--compact .vh2d-stat__value { font-size: 22px; line-height: 30px; }
.v2-app .vh2d-stat--link .vh2d-stat__label { font-size: 14px; color: var(--vh2-text-primary); }

/* the single hero: settled client payments (brand orange, white label >= 4.5:1 across the whole gradient) */
.v2-app .vh2d-hero {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: var(--vh2-s1); min-width: 0;
  padding: var(--vh2-s5) var(--vh2-s6); border-radius: var(--vh2-r-lg);
  background: var(--vh2-gradient-cta);
  color: var(--vh2-action-primary-fg); box-shadow: var(--vh2-shadow-md);
}
.v2-app .vh2d-hero:hover { box-shadow: var(--vh2-shadow-lg); }
.v2-app .vh2d-hero__label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--vh2-action-primary-fg); }
.v2-app .vh2d-hero__value { font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--vh2-action-primary-fg); overflow-wrap: anywhere; }
.v2-app .vh2d-hero__meta { font-size: 14px; line-height: 18px; color: var(--vh2-action-primary-fg); }

/* ------------------------------------------------------------------ trust / people row lists */
.v2-app .vh2d-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--vh2-s6); align-items: start; }
.v2-app .vh2d-rows { background: var(--vh2-surface); border: 1px solid var(--vh2-border-default); border-radius: var(--vh2-r-lg); box-shadow: var(--vh2-shadow-xs); }
.v2-app .vh2d-rows > li { border-top: 1px solid var(--vh2-border-subtle); }
.v2-app .vh2d-rows > li:first-child { border-top: 0; }
.v2-app .vh2d-row { display: flex; align-items: center; justify-content: space-between; gap: var(--vh2-s4); min-height: 60px; padding: var(--vh2-s3) var(--vh2-s4); border-radius: var(--vh2-r-lg); }
.v2-app .vh2d-row:hover { background: var(--vh2-bg-subtle); }
.v2-app .vh2d-row__main { display: flex; flex-direction: column; min-width: 0; }
.v2-app .vh2d-row__name { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--vh2-text-primary); }
.v2-app .vh2d-row__meta { font-size: 14px; line-height: 18px; color: var(--vh2-text-secondary); }
.v2-app .vh2d-row__meta strong { font-weight: 700; color: var(--vh2-text-primary); font-variant-numeric: tabular-nums; }
.v2-app .vh2d-row__value { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--vh2-text-primary); }
.v2-app .vh2d-row__go { font-size: 14px; font-weight: 600; color: var(--vh2-text-link); white-space: nowrap; }

/* ------------------------------------------------------------------ keyboard focus (also guaranteed by the shell rule) */
.v2-app .vh2d a:focus-visible, .v2-app .vh2d button:focus-visible { outline: 2px solid var(--vh2-focus-ring); outline-offset: 2px; }

/* ------------------------------------------------------------------ narrower widths */
@media (max-width: 1100px) {
  .v2-app .vh2d-queues, .v2-app .vh2d-duo { grid-template-columns: minmax(0, 1fr); }
  .v2-app .vh2d-grid--money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-app .vh2d-grid--money > .vh2d-hero { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .v2-app .vh2d-grid--money { grid-template-columns: minmax(0, 1fr); }
  .v2-app .vh2d-queue__row { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--vh2-s2); }
  .v2-app .vh2d-queue__go { grid-column: 1 / -1; }
  .v2-app .vh2d__title { font-size: 22px; line-height: 28px; }
}
