/* ─── Dashboard metric views ─────────────────────────────────────────────── */

.dv2-metric-hero,
.dv2-progress-stack,
.dv2-health-ring,
.dv2-split-bar,
.dv2-stat-tiles,
.dv2-countdown,
.dv2-fraction,
.dv2-bar-list,
.dv2-coverage-block,
.dv2-performance-headline {
  width: 100%;
}

/* Hero */
.dv2-metric-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  position: relative;
  min-height: 0;
  flex: 1;
}

.dv2-metric-hero__accent {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 48px;
  border-radius: 999px;
  opacity: 0.85;
}

.dv2-metric-hero__value {
  font: 800 clamp(2rem, 10cqw, 3.25rem) / 1 'Inter', sans-serif;
  letter-spacing: -0.04em;
}

.dv2-metric-hero__label {
  font: 500 12px/1.35 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
  text-align: center;
  max-width: 16ch;
}

.dv2-metric-hero__sublabel {
  font: 500 10px/1.3 'Inter', sans-serif;
  color: var(--dv2-po-text-label);
  text-align: center;
}

/* Progress row */
.dv2-progress-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dv2-progress-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.dv2-progress-row__label {
  font: 600 11px/1.3 'Inter', sans-serif;
  color: var(--dv2-po-text-body);
  flex: 1;
  min-width: 0;
}

.dv2-progress-row__value {
  font: 700 11px 'Inter', sans-serif;
  flex-shrink: 0;
}

.dv2-progress-row__track {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dv2-po-text-label) 22%, transparent);
  overflow: hidden;
}

.dv2-progress-row__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.dv2-progress-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 2px;
}

/* Single overall health ring + legend (Compliance Health) */
.dv2-health-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.dv2-health-ring__gauge {
  position: relative;
  flex-shrink: 0;
  width: 112px;
  height: 112px;
}

.dv2-health-ring__arc {
  transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.25s ease;
}

.dv2-health-ring__centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  gap: 2px;
}

.dv2-health-ring__pct {
  font: 800 1.65rem/1 'Inter', sans-serif;
  letter-spacing: -0.04em;
  color: var(--dv2-po-text);
}

.dv2-health-ring__pct span {
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 1px;
  opacity: 0.7;
  color: inherit;
}

.dv2-health-ring__centre-label {
  font: 600 9px/1.2 'Inter', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dv2-po-text-label);
  max-width: 11ch;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dv2-health-ring__explain-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  margin: 0;
  cursor: pointer;
  font: 600 9px/1.2 'Inter', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dv2-po-text-label);
  border-radius: 4px;
}

.dv2-health-ring__explain-btn:hover,
.dv2-health-ring__explain-btn:focus-visible {
  color: var(--dv2-po-text);
  background: color-mix(in srgb, var(--dv2-po-text-label) 12%, transparent);
  outline: none;
}

.dv2-health-explainer {
  width: 260px;
  padding: 12px 14px;
}

.dv2-health-explainer__lead {
  font: 500 12px/1.4 'Inter', sans-serif;
  color: var(--dv2-po-text-muted, var(--muted-foreground));
  margin: 0 0 8px;
}

.dv2-health-explainer__parts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dv2-health-explainer__parts li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 500 12px/1.3 'Inter', sans-serif;
  color: var(--dv2-po-text, var(--foreground));
}

.dv2-health-explainer__eq {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--dv2-po-border, var(--border));
  font: 700 12px/1.35 'Inter', sans-serif;
  color: var(--dv2-po-text, var(--foreground));
}

.dv2-health-ring__legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.dv2-health-ring__legend-row {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  font: inherit;
  background: color-mix(in srgb, var(--dv2-po-chrome, var(--card)) 42%, transparent);
  border: 1px solid color-mix(in srgb, var(--dv2-po-border, var(--border)) 70%, transparent);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  gap: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dv2-health-ring__legend-row:hover,
.dv2-health-ring__legend-row:focus-visible,
.dv2-health-ring__legend-row.is-active {
  background: color-mix(in srgb, var(--dv2-health-accent, var(--primary)) 14%, transparent);
  border-color: color-mix(in srgb, var(--dv2-health-accent, var(--primary)) 45%, transparent);
  outline: none;
}

.dv2-health-ring__legend-row .dv2-progress-row__head {
  align-items: center;
}

.dv2-health-ring__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dv2-health-accent, var(--primary));
  flex-shrink: 0;
}

.dv2-card--programme .dv2-card-body .dv2-health-ring__pct,
.dv2-card--programme .dv2-card-body .dv2-health-ring__pct span,
.dv2-card--programme .dv2-card-body .dv2-health-ring__legend-row .dv2-progress-row__value {
  color: inherit;
}

@container (min-width: 280px) {
  .dv2-health-ring {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .dv2-health-ring__legend {
    flex: 1;
  }
}

.dv2-concentric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-height: 0;
  width: 100%;
}

.dv2-concentric__chart {
  width: min(100%, 168px);
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
}

.dv2-health-trio {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 6px;
  height: 100%;
  width: 100%;
}

.dv2-health-trio__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  text-align: center;
}

.dv2-health-trio__gauge {
  position: relative;
  width: 72px;
  height: 72px;
}

.dv2-health-trio__pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 0.95rem/1 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

.dv2-health-trio__pct span {
  font-size: 0.55rem;
  font-weight: 700;
  margin-left: 1px;
}

.dv2-health-trio__item .dv2-progress-row__label {
  font: 600 10px/1.25 'Inter', sans-serif;
  text-align: center;
  white-space: normal;
}

.dv2-health-headline {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 100%;
  width: 100%;
}

.dv2-health-headline__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dv2-health-headline__pct {
  font: 800 2.35rem/1 'Inter', sans-serif;
  letter-spacing: -0.04em;
}

.dv2-health-headline__pct span {
  font-size: 1rem;
  font-weight: 700;
  margin-left: 1px;
  opacity: 0.7;
}

.dv2-health-tiles .dv2-stat-tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dv2-health-tiles .dv2-stat-tile {
  padding: 8px 6px;
}

.dv2-health-tiles .dv2-stat-tile__value {
  font-size: 1.25rem;
}

.dv2-card--programme .dv2-card-body .dv2-health-trio__pct,
.dv2-card--programme .dv2-card-body .dv2-health-headline__pct,
.dv2-card--programme .dv2-card-body .dv2-health-headline__pct span,
.dv2-card--programme .dv2-card-body .dv2-health-explainer__eq {
  color: inherit;
}

/* Split bar */
.dv2-split-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dv2-split-bar__track {
  display: flex;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--dv2-po-text-label) 18%, transparent);
}

.dv2-split-bar__seg {
  height: 100%;
  transition: width 0.6s ease;
}

.dv2-split-bar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
}

.dv2-split-bar__legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 500 10px 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
}

.dv2-split-bar__dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

.dv2-split-bar__legend-label {
  color: var(--dv2-po-text-muted);
}

/* Stat tiles */
.dv2-stat-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dv2-stat-tile {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid;
  background: rgba(253, 247, 239, 0.35);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  text-align: center;
}

.dv2-stat-tile__value {
  font: 800 1.75rem/1 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

.dv2-stat-tile__label {
  font: 600 10px 'Inter', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dv2-po-text-label);
  margin-top: 4px;
}

.dv2-stat-tile__hint {
  font: 500 10px 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
  margin-top: 2px;
}

/* Countdown */
.dv2-countdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 4px;
}

.dv2-countdown__top {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.dv2-countdown__value {
  font: 800 2.75rem/1 'Inter', sans-serif;
  letter-spacing: -0.04em;
}

.dv2-countdown__unit {
  font: 600 13px 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
}

.dv2-countdown__track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dv2-po-text-label) 20%, transparent);
  overflow: visible;
}

.dv2-countdown__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
}

.dv2-countdown__marker {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dv2-po-chrome);
  border: 2px solid;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(42, 32, 24, 0.15);
}

.dv2-countdown__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font: 500 10px 'Inter', sans-serif;
  color: var(--dv2-po-text-label);
}

.dv2-countdown__target {
  color: var(--dv2-po-text-muted);
  text-align: center;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fraction */
.dv2-fraction {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 2px;
}

.dv2-fraction__nums {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.dv2-fraction__main {
  font: 800 2.75rem/1 'Inter', sans-serif;
  letter-spacing: -0.04em;
}

.dv2-fraction__of {
  font: 600 14px 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
}

/* Bar list */
.dv2-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0;
}

.dv2-bar-list__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.dv2-bar-list__label {
  font: 600 11px 'Inter', sans-serif;
  color: var(--dv2-po-text-body);
}

.dv2-bar-list__value {
  font: 700 11px 'Inter', sans-serif;
}

.dv2-bar-list__track {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dv2-po-text-label) 20%, transparent);
  overflow: hidden;
}

.dv2-bar-list__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* Coverage */
.dv2-coverage-block {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(240, 228, 212, 0.65);
  background: rgba(253, 247, 239, 0.35);
}

.dv2-coverage-block__title {
  font: 600 10px 'Inter', sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dv2-po-text-label);
  margin-bottom: 6px;
}

.dv2-coverage-block__total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.dv2-coverage-block__total-num {
  font: 800 1.5rem/1 'Inter', sans-serif;
  color: var(--dv2-po-text);
}

.dv2-coverage-block__total-label {
  font: 500 11px 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
}

/* Performance headline */
.dv2-performance-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dv2-performance-headline__pct {
  font: 800 2.5rem/1 'Inter', sans-serif;
  letter-spacing: -0.04em;
}

.dv2-performance-headline__pct span {
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.75;
}

.dv2-performance-headline__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font: 700 10px 'Inter', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Assurance layout */
.dv2-assurance-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 12px;
  height: 100%;
  justify-content: center;
}

.dv2-assurance-layout__headline {
  text-align: center;
}

.dv2-assurance-layout__headline-pct {
  font: 800 2.25rem/1 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

.dv2-assurance-layout__headline-label {
  font: 500 11px 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
  margin-top: 2px;
}

/* Detail list rows — shared by corrective actions + task lists */
.dv2-detail-list-item {
  list-style: none;
  border-left: 3px solid var(--dv2-detail-accent, #f6961d);
  border-radius: 0 10px 10px 0;
  background: color-mix(in oklch, rgba(255, 253, 250, 0.72) 94%, var(--dv2-detail-accent) 6%);
  border-top: 1px solid rgba(240, 228, 212, 0.65);
  border-right: 1px solid rgba(240, 228, 212, 0.65);
  border-bottom: 1px solid rgba(240, 228, 212, 0.65);
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dv2-detail-list-item:hover {
  background: color-mix(in oklch, rgba(255, 250, 242, 0.85) 88%, var(--dv2-detail-accent) 12%);
  border-top-color: rgba(251, 217, 172, 0.75);
  border-right-color: rgba(251, 217, 172, 0.75);
  border-bottom-color: rgba(251, 217, 172, 0.75);
}

.dv2-detail-list-item__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dv2-detail-list-item__title {
  font: 600 12px/1.35 'Inter', sans-serif;
  color: var(--dv2-po-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.dv2-detail-list-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  font: 500 11px/1.4 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
}

.dv2-detail-list-item__meta-right {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Task status widget rows */
.dv2-task-status-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.dv2-task-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(240, 228, 212, 0.72);
  background: rgba(255, 253, 250, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dv2-task-status-row__bar {
  width: 3px;
  height: 34px;
  border-radius: 2px;
  flex-shrink: 0;
}

.dv2-task-status-row__body {
  flex: 1;
  min-width: 0;
}

.dv2-task-status-row__label {
  font: 600 12px/1.3 'Inter', sans-serif;
  color: var(--dv2-po-text);
  display: block;
}

.dv2-task-status-row__desc {
  font: 500 10px/1.35 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
  display: block;
  margin-top: 1px;
}

.dv2-task-status-row__stats {
  text-align: right;
  flex-shrink: 0;
}

.dv2-task-status-row__pct {
  font: 700 14px/1.2 'Inter', sans-serif;
  display: block;
}

.dv2-task-status-row__count {
  font: 500 10px/1.3 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
  display: block;
  margin-top: 1px;
}

.dv2-task-status-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font: 500 10px 'Inter', sans-serif;
  color: var(--dv2-po-text-label);
  margin-top: 6px;
}

/* Task status v2 — split widgets */
.dv2-task-status-v2__hero {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dv2-task-status-v2__total {
  font: 800 2.25rem/1 'Inter', sans-serif;
  letter-spacing: -0.04em;
  color: var(--dv2-po-text);
}

.dv2-task-status-v2__total-label {
  font: 600 12px/1.3 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
}

.dv2-task-status-v2__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dv2-task-status-v2__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid;
}

.dv2-task-status-v2__tile-count {
  font: 800 1.35rem/1 'Inter', sans-serif;
}

.dv2-task-status-v2__tile-label {
  font: 600 10px/1.25 'Inter', sans-serif;
  color: var(--dv2-po-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dv2-task-status-v2__tile-pct {
  font: 700 11px 'Inter', sans-serif;
  color: var(--dv2-po-text-muted);
}

.dv2-task-status-v2__tile-hint {
  font: 500 9px/1.2 'Inter', sans-serif;
  color: var(--dv2-po-text-label);
}
