/* ==========================================================================
   CyFun Tool - Dashboard Module Styles
   ========================================================================== */

/* --- Dashboard Layout --- */
.dash {
  max-width: 1200px;
}

.dash__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

/* --- Compliance Status Banner --- */
.dash-status {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  border: 1px solid;
}

.dash-status--pass {
  background: var(--color-success-bg);
  border-color: rgba(51, 153, 17, 0.2);
}

.dash-status--fail {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
}

.dash-status--partial {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
}

.dash-status__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.dash-status__text {
  flex: 1;
}

.dash-status__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  margin-bottom: 2px;
}

.dash-status__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.dash-status__score {
  text-align: center;
  flex-shrink: 0;
}

.dash-status__score-value {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
}

.dash-status__score-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* --- KPI Cards Row --- */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.dash-kpi {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  text-align: center;
}

.dash-kpi__value {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-dark);
}

.dash-kpi__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* --- Maturity Thermometer --- */
.dash-thermometer { width: 100%; padding: var(--space-md) 0; }
.dash-thermometer svg { width: 100%; height: 80px; }

/* --- Two Column Layout (Chart + Table) --- */
.dash-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

/* Children of a columns grid don't need their own bottom margin */
.dash-columns > * {
  margin-bottom: 0;
}

.dash-column-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.dash-panel {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dash-panel__header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}

.dash-panel__body {
  padding: var(--space-lg);
}

/* --- Radar Chart --- */
.dash-radar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.dash-radar canvas {
  max-width: 100%;
  max-height: 320px;
}

/* --- Category Table --- */
.dash-cat-table {
  font-size: var(--text-xs);
  width: 100%;
}

.dash-cat-table th {
  text-align: left;
  padding: var(--space-xs) var(--space-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.dash-cat-table td {
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}

.dash-cat-table tr:last-child td {
  border-bottom: none;
}

.dash-cat-table__bar {
  width: 60px;
  display: inline-block;
}

.dash-cat-table__score {
  font-weight: var(--weight-bold);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.dash-cat-table__score--pass { color: var(--color-success); }
.dash-cat-table__score--fail { color: var(--color-danger); }
.dash-cat-table__score--warn { color: var(--color-warning); }

/* --- Maturity Heatmap --- */
.dash-heatmap-wrap {
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-heatmap {
  font-size: var(--text-xs);
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}

.dash-heatmap th {
  text-align: left;
  padding: var(--space-xs) var(--space-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.dash-heatmap td {
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}

.dash-heatmap tr:last-child td {
  border-bottom: none;
}

.dash-heatmap__label {
  white-space: nowrap;
}

.dash-heatmap__cell {
  width: 48px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

/* D3 Heatmap */
.dash-heatmap-svg {
  display: block;
}

.heatmap-label:hover text {
  fill: #339911 !important;
}

.dash-heatmap-tooltip {
  display: none;
  position: absolute;
  z-index: var(--z-toast);
  background: #333;
  color: #fff;
  font-size: 12px;
  font-family: Mulish, sans-serif;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 6px;
  pointer-events: none;
  max-width: 280px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* --- Key Measures Section --- */
.dash-km {
  margin-bottom: var(--space-xl);
}

.dash-km__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-sm);
}

.dash-km__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  border: 1px solid var(--color-border-light);
}

.dash-km__item--pass {
  background: var(--color-success-bg);
}

.dash-km__item--fail {
  background: var(--color-danger-bg);
}

.dash-km__id {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  min-width: 80px;
}

.dash-km__text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-km__score {
  font-weight: var(--weight-bold);
  font-family: var(--font-mono);
  min-width: 36px;
  text-align: right;
}

/* --- Gap Analysis --- */
.dash-gap {
  margin-bottom: var(--space-xl);
}

.dash-gap__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.dash-gap__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dash-gap__item:hover {
  background: var(--color-bg-alt);
}

.dash-gap__rank {
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  min-width: 20px;
}

.dash-gap__id {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  min-width: 80px;
}

.dash-gap__text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-gap__current {
  font-family: var(--font-mono);
  color: var(--color-danger);
  font-weight: var(--weight-bold);
}

.dash-gap__target {
  font-family: var(--font-mono);
  color: var(--color-success);
  font-weight: var(--weight-bold);
}

.dash-gap__impact {
  font-size: var(--text-xs);
  color: var(--color-warning);
  font-weight: var(--weight-semibold);
}

/* --- Trend Chart --- */
.dash-trend-wrap {
  margin-bottom: var(--space-xl);
}

.dash-trend {
  min-height: 250px;
}

.dash-trend canvas {
  max-width: 100%;
  max-height: 280px;
}

/* --- Level Comparison --- */
.dash-level-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.dash-level-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  position: relative;
}

.dash-level-card--current {
  border-color: var(--color-primary);
  border-width: 2px;
}

.dash-level-card__badge {
  margin-bottom: var(--space-sm);
}

.dash-level-card__score {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-xs);
}

.dash-level-card__target {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.dash-level-card__label {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: var(--weight-bold);
}

/* --- Progress Comparison (Snapshot delta) --- */
.dash-progress {
  margin-bottom: var(--space-xl);
}

.dash-progress__summary {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: var(--text-md);
}

.dash-progress__label {
  font-weight: var(--weight-semibold);
}

.dash-progress__delta {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
}

.dash-progress__delta--positive {
  color: var(--color-success);
}

.dash-progress__delta--negative {
  color: var(--color-danger);
}

.dash-progress__counts {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
}

.dash-progress__count {
  font-weight: var(--weight-semibold);
}

.dash-progress__count--improved {
  color: var(--color-success);
}

.dash-progress__count--worsened {
  color: var(--color-danger);
}

.dash-progress__count--unchanged {
  color: var(--color-text-muted);
}

.dash-progress__table {
  width: 100%;
  font-size: var(--text-sm);
  border-collapse: collapse;
}

.dash-progress__table th {
  text-align: left;
  padding: var(--space-xs) var(--space-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: var(--text-xs);
  border-bottom: 1px solid var(--color-border);
}

.dash-progress__table td {
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--color-border-light);
}

.dash-progress__table tr:last-child td {
  border-bottom: none;
}

.dash-progress__cell-num {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  text-align: right;
}

/* --- Profile Snapshots Table --- */
.profile-snapshots__table {
  width: 100%;
  font-size: var(--text-sm);
  border-collapse: collapse;
}

.profile-snapshots__table th {
  text-align: left;
  padding: var(--space-xs) var(--space-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: var(--text-xs);
  border-bottom: 1px solid var(--color-border);
}

.profile-snapshots__table td {
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}

.profile-snapshots__table tr:last-child td {
  border-bottom: none;
}

/* --- KM Donut inline with header --- */
.dash-panel__header--km {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.dash-panel__header--km canvas {
  flex-shrink: 0;
}

/* --- Distribution Histogram --- */
.dash-distribution-wrap {
  margin-bottom: var(--space-xl);
}

.dash-distribution {
  min-height: 200px;
  max-height: 250px;
}

.dash-distribution canvas {
  max-width: 100%;
  max-height: 240px;
}

/* --- Risk Matrix (V7) --- */
.dash-risk-matrix-wrap {
  margin-bottom: var(--space-xl);
}

.dash-risk-matrix {
  border-collapse: collapse;
}

.dash-risk-matrix th {
  font-size: var(--text-xs);
  padding: 4px 8px;
  color: var(--color-text-muted);
}

.dash-risk-matrix td {
  width: 48px;
  height: 36px;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}

/* --- Function Cards (D1) --- */
.dash-func-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.dash-func-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

.dash-func-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.dash-func-card__icon {
  color: var(--color-primary);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.dash-func-card__title {
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-func-card__score {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-sm);
}

.dash-func-card__score--pass {
  color: var(--color-success);
}

.dash-func-card__score--fail {
  color: var(--color-danger);
}

.dash-func-card__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-sm);
}

.dash-func-card__bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.dash-func-card__bar-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  min-width: 40px;
  text-align: right;
}

.dash-func-card__bar-track {
  flex: 1;
  height: 8px;
  background: var(--color-bg-alt);
  border-radius: 4px;
  overflow: hidden;
}

.dash-func-card__bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.dash-func-card__bar-value {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  color: var(--color-text-secondary);
  min-width: 24px;
  text-align: right;
}

.dash-func-card__footer {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: right;
}

/* --- Executive Summary (D2) --- */
.dash-exec-summary {
  margin-bottom: var(--space-xl);
}

.dash-exec-summary__text {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
}

.dash-exec-summary__list {
  margin: 0;
  padding: 0 0 0 var(--space-lg);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text);
}

.dash-exec-summary__list li {
  margin-bottom: var(--space-xs);
}

.dash-low-data-warning {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
  color: var(--color-warning);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-lg);
}

/* --- Sector Benchmark Comparison --- */
.dash-benchmark {
  margin-bottom: var(--space-xl);
}

.dash-benchmark__panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dash-benchmark__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.dash-benchmark__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.dash-benchmark__sector-tag {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-bg-alt, #f5f5f5);
  padding: 2px var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.dash-benchmark__body {
  padding: var(--space-lg);
}

/* Scores grid */
.dash-benchmark__scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (max-width: 1024px) {
  .dash-columns { grid-template-columns: 1fr; }
  .dash-level-compare { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .dash-benchmark__scores { grid-template-columns: 1fr; }
  .dash-level-compare { grid-template-columns: 1fr; }
}

.dash-benchmark__score-block {}

.dash-benchmark__score-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.dash-benchmark__score-value {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.dash-benchmark__score-number {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: 1;
}

.dash-benchmark__score-number--user  { color: #339911; }
.dash-benchmark__score-number--sector { color: var(--color-text-secondary); }

.dash-benchmark__score-max {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Progress bar */
.dash-benchmark__bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.dash-benchmark__bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.dash-benchmark__bar-fill--user   { background: #339911; }
.dash-benchmark__bar-fill--sector { background: var(--color-text-muted); }

/* Delta badge */
.dash-benchmark__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 2px var(--space-sm);
  border-radius: var(--radius-sm);
  margin-top: var(--space-sm);
}

.dash-benchmark__delta--above { background: var(--color-success-bg); color: #266b0d; }
.dash-benchmark__delta--below { background: var(--color-danger-bg);  color: var(--color-danger); }
.dash-benchmark__delta--at    { background: var(--color-bg-alt, #f5f5f5); color: var(--color-text-muted); }

/* Confidence row */
.dash-benchmark__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--color-border);
  margin-bottom: var(--space-md);
}

.dash-benchmark__conf-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.dash-benchmark__conf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 2px 8px;
  border-radius: 99px;
}

.dash-benchmark__conf-badge--high   { background: #d4edda; color: #155724; }
.dash-benchmark__conf-badge--medium { background: #fff3cd; color: #856404; }
.dash-benchmark__conf-badge--low    { background: #f5f5f5; color: #555; }
.dash-benchmark__conf-badge--proxy  { background: #fff3cd; color: #856404; }
.dash-benchmark__conf-badge--none   { background: #f5f5f5; color: #888; }

.dash-benchmark__conf-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-benchmark__conf-badge--high   .dash-benchmark__conf-dot { background: #28a745; }
.dash-benchmark__conf-badge--medium .dash-benchmark__conf-dot { background: #ffc107; }
.dash-benchmark__conf-badge--low    .dash-benchmark__conf-dot { background: #aaa; }
.dash-benchmark__conf-badge--proxy  .dash-benchmark__conf-dot { background: #ffc107; }
.dash-benchmark__conf-badge--none   .dash-benchmark__conf-dot { background: #ccc; }

/* Caveat / disclaimer box */
.dash-benchmark__caveat {
  background: #f8f9fa;
  border-left: 3px solid var(--color-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.dash-benchmark__caveat--warning {
  border-left-color: #ffc107;
  background: #fffdf0;
}

.dash-benchmark__caveat--risk-zone {
  border-left-color: var(--color-danger);
  background: var(--color-danger-bg);
  color: var(--color-danger);
  font-weight: var(--weight-medium);
}

/* Empty / no-data state inside panel */
.dash-benchmark__empty {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  color: var(--color-text-muted);
}

.dash-benchmark__empty-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  opacity: 0.4;
}

.dash-benchmark__empty-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.dash-benchmark__empty-desc {
  font-size: var(--text-xs);
  margin-bottom: var(--space-md);
}

.dash-benchmark__conf-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  font-size: 9px;
  font-weight: var(--weight-bold);
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  margin-left: 2px;
}

.dash-benchmark__vintage {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Doc vs Impl chart */
.dash-doc-impl { min-height: 180px; }
.dash-doc-impl canvas { max-width: 100%; }

/* Waterfall chart */
.dash-waterfall { min-height: 180px; }
.dash-waterfall canvas { max-width: 100%; }

/* Colored KPI cards */
.dash-kpi--pass { background: var(--color-success-bg, #f0fdf4); border-color: rgba(51,153,17,0.3); }
.dash-kpi--warn { background: #fffbeb; border-color: rgba(245,158,11,0.3); }
.dash-kpi--fail { background: var(--color-danger-bg, #fff5f5); border-color: rgba(192,57,43,0.3); }
.dash-kpi--pass .dash-kpi__value { color: #339911; }
.dash-kpi--warn .dash-kpi__value { color: #d97706; }
.dash-kpi--fail .dash-kpi__value { color: #c0392b; }

/* Progress ribbon */
.dash-progress-ribbon {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.dash-progress-ribbon__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  font-weight: 600;
}
.dash-progress-ribbon__track {
  flex: 1;
  height: 8px;
  background: var(--color-bg-alt, #e5e7eb);
  border-radius: 4px;
  overflow: hidden;
}
.dash-progress-ribbon__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.dash-progress-ribbon__badge {
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-mono);
  min-width: 38px;
  text-align: right;
}

/* Gap analysis visual bar */
.dash-gap__bar {
  display: inline-block;
  width: 120px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  position: relative;
  vertical-align: middle;
}
.dash-gap__bar-fill {
  height: 100%;
  border-radius: 3px;
  position: absolute;
  top: 0;
  left: 0;
}
.dash-gap__bar-target {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  background: #333;
  border-radius: 1px;
}

/* Score arc gauge in function cards */
.dash-func-card__gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-xs);
}
.dash-func-card__gauge svg { display: block; }
.dash-func-card__gauge-value {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin-top: -6px;
}
