/* Dashboard V2 — scoped under .product-dash.dash-v2 to isolate from Phase 9 / MI geometry */

/* --- Root: fill workspace content box (1022 − 40 pad = ~982). Never inherit max-width:920. --- */
.workspace .product-dash.dash-v2 {
  /* Uses global --dash-* bridge from base.css / dark.css — no local light re-pin */
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 0 0 8px;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  align-content: start;
  color: var(--dash-text);
}

.workspace .product-dash.dash-v2 > * {
  grid-area: auto !important;
}

body[data-shell-view="overview"] #app-screen .workspace {
  padding: 8px 20px 4px;
  box-sizing: border-box;
}

/* Full-bleed header across workspace (20px pad cancelled via negative margin) */
.product-dash.dash-v2 > .page-head {
  grid-area: auto;
  width: auto;
  margin: 0 -20px;
  padding: 8px 20px;
  min-height: 56px;
  height: 56px;
  box-sizing: border-box;
  align-items: center;
  flex-wrap: nowrap;
}
.product-dash.dash-v2 .page-head h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 2px;
  color: var(--dash-text);
}
.product-dash.dash-v2 .page-head p,
.product-dash.dash-v2 .page-head .dash-muted {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--dash-muted);
  line-height: 1.35;
}

/* --- KPI strip: one strong horizontal band, full content width --- */
.dash-v2-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  box-sizing: border-box;
}
.dash-v2-strip.is-manager,
.dash-v2-strip.is-user {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dash-v2-kpi {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  padding: 8px 12px;
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: default;
  box-sizing: border-box;
  width: 100%;
}
button.dash-v2-kpi { cursor: pointer; }
button.dash-v2-kpi:hover { background: var(--dash-hover); }
button.dash-v2-kpi:focus-visible { outline: 2px solid var(--dash-focus); outline-offset: 2px; }
.dash-v2-kpi .dash-summary-icon {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--dash-icon-bg);
  color: var(--dash-icon-fg);
}
.dash-v2-kpi .dash-summary-icon.is-ok { background: var(--dash-ok-soft); color: var(--dash-ok-fg); }
.dash-v2-kpi .dash-summary-icon.is-blue { background: var(--dash-info-soft); color: var(--dash-info-fg); }
.dash-v2-kpi .dash-summary-icon.is-ai { background: var(--dash-ai-soft); color: var(--dash-ai-fg); }
.dash-v2-kpi .dash-summary-icon.is-warn { background: var(--dash-warn-soft); color: var(--dash-warn-fg); }
.dash-v2-kpi strong {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--dash-text);
}
.dash-v2-kpi > span:last-child {
  grid-column: 2;
  color: var(--dash-meta);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-v2-kpi.is-warn { background: var(--dash-kpi-warn-bg); }

/* --- Admin body: 1.2fr / 1fr filling full content width --- */
.dash-v2-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}
.dash-v2-main.is-manager {
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
}
.dash-v2-col,
.dash-v2-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}
.dash-v2-side {
  min-height: 100%;
}

/* Critical: override design-shell `.dash-block { align-self: start }` which content-sized panels */
.workspace .product-dash.dash-v2 .dash-block,
.product-dash.dash-v2 .dash-block {
  align-self: stretch !important;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  box-shadow: none;
  background: var(--dash-card);
  flex: 0 0 auto;
}
.product-dash.dash-v2 .dash-v2-side > .dash-block {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.product-dash.dash-v2 #dash-aiops-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.product-dash.dash-v2 #dash-activity {
  flex: 0 0 auto;
  padding: 10px 12px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-dash.dash-v2 .block-heading {
  min-height: 34px;
  margin-bottom: 4px;
  align-items: center;
}
.product-dash.dash-v2 .block-heading h3 {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3;
  color: var(--dash-text);
}
.product-dash.dash-v2 .text-action {
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  padding: 2px 0;
}

/* Rows */
.dash-v2-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  height: 40px;
  padding: 0 2px;
  border-top: 1px solid var(--dash-row);
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: default;
  box-sizing: border-box;
}
button.dash-v2-row { cursor: pointer; }
button.dash-v2-row:hover,
.dash-v2-issue-row:hover { background: var(--dash-hover); }
button.dash-v2-row:focus-visible { outline: 2px solid var(--dash-focus); outline-offset: -2px; }
.dash-v2-row:first-child { border-top: 0; }
.dash-v2-row .queue-copy { flex: 1; min-width: 0; }
.dash-v2-row .queue-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dash-text);
}
.dash-v2-row .queue-copy small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--dash-meta);
}
.dash-v2-row .dash-chevron { color: var(--dash-chevron); font-size: 16px; flex: 0 0 auto; }
.product-dash.dash-v2 .dash-health-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--dash-avatar-bg);
  color: var(--dash-avatar-fg);
}

.dash-row-rail {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  flex: 0 0 3px;
}
.dash-row-rail.is-conflict,
.dash-state-pill.is-conflict { background: var(--dash-conflict); color: var(--text-inverse); }
.dash-row-rail.is-auth { background: var(--dash-conflict); }
.dash-state-pill.is-auth { background: var(--dash-conflict-soft); color: var(--dash-conflict); }
.dash-row-rail.is-error,
.dash-row-rail.is-reconnect { background: var(--dash-warn-fg); }
.dash-state-pill.is-error,
.dash-state-pill.is-reconnect { background: var(--dash-warn-soft); color: var(--dash-warn-fg); }
.dash-state-pill.is-connecting { background: var(--dash-info-soft); color: var(--dash-info-fg); }
.dash-state-pill.is-connected { background: var(--dash-ok-soft); color: var(--dash-ok-fg); }
.dash-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}
.dash-state-pill.is-in { background: var(--dash-ok-soft); color: var(--dash-ok-fg); }
.dash-state-pill.is-out { background: var(--dash-warn-soft); color: var(--dash-warn-fg); }
.dash-state-pill.is-unknown { background: var(--dash-chip-muted-bg); color: var(--dash-chip-muted-fg); }

.product-dash.dash-v2 .dash-health-foot {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--dash-meta);
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-dash.dash-v2 .dash-positive-empty {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.product-dash.dash-v2 .dash-positive-empty p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--dash-ok);
}
/* Intentional empty composition inside full-height AI column */
.product-dash.dash-v2 .dash-ai-empty-stack {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 140px;
  padding: 28px 4px 36px;
  box-sizing: border-box;
}
.product-dash.dash-v2 .dash-ai-empty-stack .dash-positive-empty {
  min-height: 56px;
  padding: 12px 0;
}
.product-dash.dash-v2 .dash-ai-empty-stack .dash-muted {
  margin: 0;
  max-width: 280px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dash-muted);
}

.dash-sec-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 12px;
  color: var(--dash-meta);
  margin-bottom: 8px;
  min-height: 32px;
  align-items: center;
}
.dash-sec-stats strong {
  color: var(--dash-text);
  font-weight: 700;
  margin-right: 4px;
}
.dash-sec-alert,
.dash-v2-notice {
  margin: 4px 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--dash-warn-soft);
  color: var(--dash-warn-fg);
  min-height: 34px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
.dash-v2-notice { background: var(--dash-neutral-soft); color: var(--dash-neutral-fg); }
.dash-v2-panel-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--dash-conflict-soft);
  color: var(--dash-conflict);
  font-size: 12px;
}

.dash-ai-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
}
.dash-ai-chip.is-ready { background: var(--dash-ai-soft); color: var(--dash-ai-fg); }
.dash-ai-chip.is-partial { background: var(--dash-warn-soft); color: var(--dash-warn-fg); }
.dash-ai-chip.is-config { background: var(--dash-chip-muted-bg); color: var(--dash-chip-muted-fg); }
.dash-ai-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
  flex: 0 0 auto;
}
.dash-ai-totals div {
  padding: 8px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
}
.dash-ai-totals strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--dash-text);
}
.dash-ai-totals span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dash-meta);
}
.dash-ai-accounts-head,
.dash-ai-esc-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--dash-chevron);
  letter-spacing: .04em;
  margin: 10px 0 4px;
}
.dash-ai-account-row {
  min-height: 32px;
  height: 32px;
}
.dash-ai-esc-row {
  min-height: 52px;
  height: auto;
  padding: 6px 0;
}
.dash-ai-config { padding: 8px 0; }
.dash-ai-config .ghost { margin-top: 8px; border-radius: 8px; }

/* Activity: full column width, 52px metrics band */
.product-dash.dash-v2 #dash-activity .block-heading {
  min-height: 28px;
  margin-bottom: 2px;
}
.product-dash.dash-v2 #dash-activity .dash-v2-activity,
.dash-v2-activity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-height: 52px;
  height: 52px;
  width: 100%;
  align-items: center;
}
.dash-v2-activity strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--dash-text);
}
.dash-v2-activity .metric-link,
.dash-v2-activity .metric-static {
  padding: 2px 10px 2px 0;
  min-width: 0;
  gap: 2px;
}
.dash-v2-activity .metric-link span,
.dash-v2-activity .metric-static span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--dash-meta);
}

/* Overview sidebar active row — match Claude density, no restructure */
body[data-shell-view="overview"] .context-nav button {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  border-radius: 10px;
}

/* --- Manager layout (F/G): 1.75fr / 1fr, scoped panels content-sized --- */
.product-dash.dash-v2.is-manager .dash-v2-main,
.product-dash.dash-v2[data-role="manager"] .dash-v2-main {
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  align-items: start;
  min-height: 520px;
}
.product-dash.dash-v2.is-manager .dash-v2-col,
.product-dash.dash-v2[data-role="manager"] .dash-v2-col {
  min-height: 520px;
}
.product-dash.dash-v2.is-manager .dash-v2-side,
.product-dash.dash-v2[data-role="manager"] .dash-v2-side {
  align-self: start;
  min-height: 0;
}
.product-dash.dash-v2.is-manager .dash-v2-side > .dash-block,
.product-dash.dash-v2[data-role="manager"] .dash-v2-side > .dash-block {
  flex: 0 0 auto;
}
.product-dash.dash-v2.is-manager #dash-issues,
.product-dash.dash-v2[data-role="manager"] #dash-issues {
  flex: 1 1 auto;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.product-dash.dash-v2.is-manager #dash-issues-body,
.product-dash.dash-v2[data-role="manager"] #dash-issues-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.product-dash.dash-v2 .dash-mgr-empty-stack {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 36px 8px 48px;
  box-sizing: border-box;
}
.product-dash.dash-v2 .dash-mgr-empty-stack .dash-positive-empty p {
  color: var(--dash-ok);
}
.product-dash.dash-v2.is-manager #dash-scope-accounts .dash-v2-row .queue-copy small,
.product-dash.dash-v2[data-role="manager"] #dash-scope-accounts .dash-v2-row .queue-copy small {
  color: var(--dash-meta);
}
.product-dash.dash-v2.is-manager .dash-issue-actions .text-action,
.product-dash.dash-v2[data-role="manager"] .dash-issue-actions .text-action {
  color: var(--dash-primary);
  padding: 0;
}
.product-dash.dash-v2 .dash-evidence-close:hover {
  background: var(--dash-hover);
  color: var(--dash-text);
}
.product-dash.dash-v2 .dash-evidence-close:focus-visible,
.dash-evidence-close:focus-visible {
  outline: 2px solid var(--dash-focus);
  outline-offset: 2px;
}
.dash-evidence-foot .text-action {
  color: var(--dash-primary);
  font-weight: 600;
}
.dash-evidence-foot .dash-muted {
  color: var(--dash-muted);
}

.dash-v2-issue-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  height: 52px;
  padding: 0 2px;
  border-top: 1px solid var(--dash-row);
  width: 100%;
  box-sizing: border-box;
}
.dash-v2-issue-row:first-child { border-top: 0; }
.dash-issue-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.dash-issue-top,
.dash-issue-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.dash-issue-top { justify-content: space-between; }
.dash-issue-top strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dash-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.dash-issue-side {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  flex: 0 1 auto;
  min-width: 0;
}
.dash-issue-account {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-issue-summary {
  flex: 1;
  min-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
  color: var(--dash-meta);
}
.dash-issue-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.dash-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  flex: 0 0 auto;
}
.dash-chip.is-high { background: var(--dash-ai-fg); color: var(--text-inverse); }
.dash-chip.is-muted { background: var(--dash-chip-muted-bg); color: var(--dash-chip-muted-fg); }
.dash-owner-open { color: var(--dash-warn); font-weight: 600; font-size: 12px; white-space: nowrap; }

.dash-evidence-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--dash-overlay);
  display: flex;
  justify-content: flex-end;
}
.dash-evidence-drawer.hidden { display: none; }
.dash-evidence-panel {
  width: 360px;
  max-width: 100%;
  height: 100%;
  background: var(--dash-card);
  box-shadow: var(--dash-drawer-shadow);
  display: flex;
  flex-direction: column;
  border-radius: 12px 0 0 12px;
  box-sizing: border-box;
}
.dash-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  min-height: 52px;
  border-bottom: 1px solid var(--dash-border);
  box-sizing: border-box;
}
.dash-evidence-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--dash-text);
}
.dash-evidence-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--dash-meta);
  border-radius: 8px;
  width: 32px;
  height: 32px;
}
.dash-evidence-body { flex: 1; overflow: auto; padding: 16px; }
.dash-evidence-name {
  margin: 10px 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dash-text);
}
.dash-evidence-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-evidence-summary {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--dash-meta);
}
.dash-evidence-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  margin: 0 0 16px;
  color: var(--dash-neutral-fg);
}
.dash-evidence-sources { margin-top: 8px; }
.dash-evidence-sources-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--dash-chevron);
  letter-spacing: .04em;
}
.dash-evidence-source-count {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-text);
}
.dash-evidence-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  min-height: 52px;
  border-top: 1px solid var(--dash-border);
  box-sizing: border-box;
}

.product-dash .sk-line.w40 { width: 40%; }

/* Keep desktop Admin geometry; only collapse below design viewport */
@media (max-width: 1100px) {
  .dash-v2-main,
  .dash-v2-main.is-manager { grid-template-columns: 1fr; }
  .dash-v2-strip,
  .dash-v2-strip.is-manager { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* --- Theme-safe overrides vs design-shell legacy hardcodes (Admin/Manager V2 body) --- */
.product-dash.dash-v2 .block-heading h3 { color: var(--dash-text); }
.product-dash.dash-v2 .text-action { color: var(--dash-primary); }
.product-dash.dash-v2 .dash-count-badge { background: var(--dash-ai-soft); color: var(--dash-ai-fg); }
.product-dash.dash-v2 .dash-count-badge.is-danger { background: var(--dash-danger-bg); color: var(--dash-danger); }
.product-dash.dash-v2 .dash-health-bar {
  background: var(--dash-health-track);
}
.product-dash.dash-v2 .dash-health-bar.is-ok { background: var(--dash-health-track); }
.product-dash.dash-v2 .dash-health-bar i { background: var(--dash-health-fill); }
.product-dash.dash-v2 .dash-health-ok {
  background: var(--dash-ok-soft); color: var(--dash-ok);
}
.product-dash.dash-v2 .dash-positive-empty .dash-health-ok,
.product-dash.dash-v2 .dash-health-foot .dash-health-ok {
  background: var(--dash-ok-soft); color: var(--dash-ok);
}
.product-dash.dash-v2 .dash-activity-strip.dash-v2-activity,
.product-dash.dash-v2 .dash-v2-activity {
  background: var(--bg-surface-muted);
  border-color: var(--dash-border);
}
.product-dash.dash-v2 .dash-v2-activity > *,
.product-dash.dash-v2 .dash-v2-activity .metric-link,
.product-dash.dash-v2 .dash-v2-activity .metric-static {
  background: var(--bg-surface-muted);
  border-color: var(--dash-border);
  color: inherit;
}
.product-dash.dash-v2 .dash-v2-activity .metric-link:hover {
  background: var(--dash-hover);
}
.product-dash.dash-v2 .dash-v2-activity .metric-link strong,
.product-dash.dash-v2 .dash-v2-activity .metric-static strong {
  color: var(--dash-text);
}
.product-dash.dash-v2 .dash-v2-activity .metric-link span,
.product-dash.dash-v2 .dash-v2-activity .metric-static span {
  color: var(--dash-meta);
}
.product-dash.dash-v2 .dash-ai-totals div {
  background: var(--bg-surface-muted);
}
.product-dash.dash-v2 .dash-muted { color: var(--dash-muted); }
.product-dash.dash-v2 .dash-work-head {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dash-muted);
}
.product-dash.dash-v2 .dash-work-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}
.product-dash.dash-v2 .dash-work-row,
.product-dash.dash-v2 .dash-work-issue {
  width: 100%;
  text-align: left;
  min-width: 0;
}
.product-dash.dash-v2 .dash-work-row .queue-copy,
.product-dash.dash-v2 .dash-work-issue .queue-copy {
  min-width: 0;
}
.product-dash.dash-v2 .dash-work-issue small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-dash.dash-v2 .dash-work-row.is-empty {
  opacity: .62;
}
.product-dash.dash-v2 .dash-work-issue .dash-chip {
  margin-right: 4px;
}
.product-dash.dash-v2 #dash-aiops,
.product-dash.dash-v2 #dash-issues {
  max-height: calc(100vh - 180px);
  overflow: auto;
}

.dash-v2-notice .text-action { margin-left: 6px; }

/* =====================================================================
   Executive overview (Phase 12B) — Admin company picture / Manager scoped picture.
   Flat cards, existing --dash-* tokens (Light/Dark), single-line rows, no overlap by construction:
   every text line is nowrap + ellipsis, every row has a fixed or content-driven height.
   ===================================================================== */
.product-dash.exec-dash { gap: 8px; }
.exec-dash .dash-v2-strip.exec-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.product-dash.dash-v2.exec-dash > .page-head {
  min-height: 52px;
  height: 52px;
  padding-top: 6px;
  padding-bottom: 6px;
  align-items: center;
  background: var(--ux-surface);
  border-bottom: 1px solid var(--ux-border);
}
.product-dash.dash-v2.exec-dash > .page-head h2 { font-size: 16px; font-weight: 700; line-height: 1.3; margin: 0; color: var(--ux-text); }
.product-dash.dash-v2.exec-dash > .page-head .dash-muted { font-size: 12px; color: var(--ux-muted); margin: 0; }
.exec-dash .exec-card .block-heading { flex-wrap: nowrap; overflow: hidden; }
.exec-dash .exec-card .text-action { padding: 0; white-space: nowrap; }

/* KPI */
.exec-dash .dash-v2-kpi.exec-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  gap: 1px;
  height: 62px;
  min-height: 62px;
  max-height: 62px;
  padding: 6px 12px;
  min-width: 0;
  overflow: hidden;
}
.exec-kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--dash-meta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exec-kpi-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--dash-icon-fg); }
.exec-kpi-dot.is-ok { background: var(--dash-health-fill); }
.exec-kpi-dot.is-warn { background: var(--dash-warn-fg); }
.exec-kpi-dot.is-ai { background: var(--dash-ai-fg); }
.exec-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.exec-kpi-value strong { font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; color: var(--dash-text); }
.exec-kpi-value strong.is-text { font-size: 14px; letter-spacing: -0.01em; }
.exec-kpi-value em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--dash-meta); overflow: hidden; text-overflow: ellipsis; }
.exec-kpi-sub {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  color: var(--dash-meta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* V3.3.2 A1: khối ưu tiên (Việc cần chú ý) toàn chiều ngang ngay dưới KPI; các khối còn lại giữ hai cột ~57/43
   để tên phòng ban và chip không bị cắt. */
.exec-main {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
}
.exec-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.product-dash.dash-v2 .exec-card { padding: 4px 12px 2px; }
/* admin.css gives every .dash-block p/li 9px padding + a divider; the executive cards own their spacing */
.exec-card p, .exec-card li { padding: 0; border: 0; line-height: inherit; }
.product-dash.dash-v2 .exec-card .block-heading { min-height: 26px; margin-bottom: 2px; gap: 8px; }
.exec-source { font-size: 11.5px; color: var(--dash-muted); white-space: nowrap; }
.exec-summary { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--dash-text); }
.exec-summary.is-warn, .exec-summary.is-warn strong { color: var(--dash-warn-fg); }
.exec-summary small { font-weight: 500; color: var(--dash-muted); font-size: 12px; }
.exec-more { margin: 0; padding: 4px 2px; font-size: 12px; color: var(--dash-muted); }
.exec-more-link { display: block; padding: 6px 2px 2px !important; }

/* Zalo operations */
.exec-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--dash-row); margin: 0 0 6px; }
.exec-bar i { display: block; height: 100%; }
.exec-bar i.is-ok { background: var(--dash-health-fill); }
.exec-bar i.is-info { background: var(--dash-info-fg); }
.exec-bar i.is-warn { background: var(--dash-warn-fg); }
.exec-zdept {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 26px;
  min-height: 26px;
  overflow: hidden;
  border-top: 1px solid var(--dash-row);
  font-size: 12.5px;
}
.exec-zdept strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--dash-text); }
.exec-zdept span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dash-meta); }
.exec-zdept.is-warn span { color: var(--dash-warn-fg); font-weight: 600; }
.exec-accs { margin-top: 4px; }
.exec-acc {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 2px;
  overflow: hidden;
  border: 0;
  border-top: 1px solid var(--dash-row);
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
.exec-acc:hover { background: var(--dash-hover); }
.exec-acc:focus-visible { outline: 2px solid var(--dash-focus); outline-offset: -2px; }
.exec-acc-name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--dash-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exec-acc-dept { flex: 0 1 38%; min-width: 0; font-size: 12px; color: var(--dash-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.exec-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--dash-warn-fg); }
.exec-dot.is-connected { background: var(--dash-health-fill); }
.exec-dot.is-connecting { background: var(--dash-info-fg); }
.exec-dot.is-auth, .exec-dot.is-conflict { background: var(--dash-conflict); }

/* Security */
.exec-sec { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 2px 0 6px; font-size: 13px; }
.exec-sec strong { color: var(--dash-text); font-weight: 600; }
.exec-sec p { margin: 0; font-size: 12px; color: var(--dash-meta); }
.exec-sec.is-safe { flex-direction: row; align-items: flex-start; gap: 8px; }
.exec-cta { margin-top: 4px; height: 30px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.exec-sec-rows { display: flex; flex-direction: column; }
.exec-sec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  border-top: 1px solid var(--dash-row);
  font-size: 12.5px;
}
.exec-sec-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dash-text); }
.exec-sec-row span:not(.dash-state-pill) { color: var(--dash-meta); white-space: nowrap; }

/* Staff (manager) */
.exec-staff { display: flex; flex-direction: column; }
.exec-staff-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  border-top: 1px solid var(--dash-row);
  font-size: 12.5px;
}
.exec-staff-row strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--dash-text); }
.exec-staff-row span:not(.dash-chip) { color: var(--dash-meta); white-space: nowrap; }
.exec-staff-row.is-unassigned strong, .exec-staff-row.is-unassigned span { color: var(--dash-warn-fg); }

/* AI summary */
.exec-bullets { margin: 2px 0 2px; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 2px; }
.exec-bullets li { font-size: 12.5px; line-height: 1.35; color: var(--dash-text); }
.exec-bullets li::marker { color: var(--dash-ai-fg); }
.exec-bullets li span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exec-note { margin: 0 0 4px; font-size: 12px; color: var(--dash-muted); }

/* Department health */
.exec-depts { display: flex; flex-direction: column; }
.exec-dept {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  padding: 0 2px;
  border: 0;
  border-top: 1px solid var(--dash-row);
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}
.exec-dept:hover { background: var(--dash-hover); }
.exec-dept:focus-visible { outline: 2px solid var(--dash-focus); outline-offset: -2px; }
.exec-dept-name { flex: 1 1 90px; min-width: 70px; font-size: 13px; font-weight: 600; color: var(--dash-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exec-dept-open { flex: 0 0 auto; font-size: 12.5px; color: var(--dash-meta); white-space: nowrap; }
.exec-chips { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.exec-chips .dash-chip { max-width: 148px; overflow: hidden; text-overflow: ellipsis; }
.exec-drill-chips { justify-content: flex-start; margin: 2px 0 6px; }
.exec-dash .dash-chip { white-space: nowrap; }
.exec-dash .dash-chip.is-high { background: var(--dash-conflict-soft); color: var(--dash-conflict); }
.exec-dash .dash-chip.is-warn { background: var(--dash-warn-soft); color: var(--dash-warn-fg); }
.exec-dash .dash-chip.is-ok { background: var(--dash-ok-soft); color: var(--dash-ok-fg); }

/* Attention list: max 5 rows, fixed height, strictly single-line text => zero overlap */
.exec-issues { display: flex; flex-direction: column; }
.exec-issue {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 2px;
  border: 0;
  border-top: 1px solid var(--dash-row);
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}
.exec-issue:hover { background: var(--dash-hover); }
.exec-issue:has(.dash-chip.is-high) { box-shadow: inset 3px 0 0 var(--ux-danger); padding-left: 12px; }
.exec-issue:focus-visible { outline: 2px solid var(--dash-focus); outline-offset: -2px; }
.exec-issue-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exec-issue-name { display: block; font-size: 13px; line-height: 1.25; font-weight: 600; color: var(--dash-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exec-issue-meta { display: block; font-size: 12px; line-height: 1.25; color: var(--dash-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exec-issue-meta b { font-weight: 600; color: var(--dash-text); opacity: .8; }
.exec-issue-side { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.exec-issue-side time { font-size: 12px; color: var(--dash-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.exec-subhead { margin: 6px 0 2px; font-size: 12px; font-weight: 600; color: var(--dash-meta); }

@media (max-width: 1100px) {
  .exec-main { grid-template-columns: minmax(0, 1fr); }
}
