/* Dashboards & data. A stat tile is label · value · delta · trend.
   Delta colour encodes direction x whether up is good, so a falling backlog reads green. */
.orka-stat { display: flex; flex-direction: column; gap: var(--space-1); }
.orka-stat__label { font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--type-label-tracking); text-transform: uppercase; color: var(--text-tertiary); }
.orka-stat__value { font-size: var(--type-metric-compact-size); font-weight: var(--type-metric-weight); letter-spacing: var(--type-metric-tracking); line-height: 1.1; color: var(--text-primary); }
.orka-stat--display .orka-stat__value { font-size: var(--type-metric-size); }
.orka-stat__delta { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--text-tertiary); }
.orka-stat__delta--good { color: var(--success-text); }
.orka-stat__delta--bad { color: var(--error-text); }
.orka-stat__delta svg { width: var(--icon-xs); height: var(--icon-xs); }
.orka-stat__spark { margin-top: var(--space-2); height: 28px; display: block; width: 100%; }

.orka-metricstrip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.orka-metricstrip__cell { padding: var(--space-3) var(--space-4); box-shadow: inset 1px 0 0 var(--border-subtle); display: flex; flex-direction: column; gap: 2px; }
.orka-metricstrip__cell:first-child { box-shadow: none; }
.orka-metricstrip__label { font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--type-label-tracking); text-transform: uppercase; color: var(--text-tertiary); }
.orka-metricstrip__value { font-size: var(--fs-3xl); font-weight: var(--fw-bold); line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.orka-metricstrip__sub { font-size: var(--fs-2xs); color: var(--text-tertiary); }

/* Analytics rows: label, optional bar, right-aligned figures. */
.orka-arow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; }
.orka-arow--bar { grid-template-columns: minmax(0, 96px) minmax(0, 1fr) auto; }
.orka-arow__label { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.35; }
.orka-arow__track { height: 8px; border-radius: var(--radius-pill); background: var(--chart-track); overflow: hidden; }
.orka-arow__fill { height: 100%; border-radius: var(--radius-pill); background: var(--chart-1); transition: width var(--dur-slow) var(--ease-orka); }
.orka-arow__value { font-size: var(--fs-sm); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--text-primary); }
.orka-arow__metas { display: inline-flex; align-items: center; gap: var(--space-3); }
.orka-arow__meta { font-size: var(--fs-sm); color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.orka-arow__meta--flag { color: var(--error-text); font-weight: var(--fw-semibold); }
.orka-arow__meta--clear { color: var(--text-tertiary); }

/* AI insight — the reserved Indigo -> Teal accent, announced by an explicit kicker. */
.orka-insight__kicker { display: inline-flex; align-items: center; gap: var(--space-1); padding: 3px var(--space-2); border-radius: var(--radius-xs); background: var(--accent-ai-gradient); color: var(--brand-on); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--type-label-tracking); text-transform: uppercase; }
.orka-insight__kicker svg { width: var(--icon-xs); height: var(--icon-xs); }
.orka-insight__body { margin-top: var(--space-2-5); font-size: var(--fs-sm); line-height: 1.6; color: var(--text-primary); }
.orka-insight__actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }

/* Alerts */
.orka-alert { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-2-5) 0; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; box-shadow: inset 0 1px 0 var(--border-subtle); transition: background-color var(--transition-base); }
.orka-alert:first-child { box-shadow: none; }
.orka-alert:hover { background: var(--state-hover); }
.orka-alert__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-xs); background: var(--bg-subtle); color: var(--text-secondary); }
.orka-alert__icon svg { width: var(--icon-sm); height: var(--icon-sm); }
.orka-alert--warning .orka-alert__icon { background: var(--warning-subtle); color: var(--warning-text); }
.orka-alert--error .orka-alert__icon { background: var(--error-subtle); color: var(--error-text); }
.orka-alert__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.orka-alert__title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orka-alert__time { font-size: var(--fs-2xs); color: var(--text-tertiary); }

/* Section heading inside a dashboard card */
.orka-sectionhead { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.orka-sectionhead__title { flex: 1; font-size: var(--fs-lg); font-weight: var(--fw-bold); letter-spacing: -0.008em; color: var(--text-primary); }
.orka-sectionhead__icon { display: flex; color: var(--brand); }
.orka-sectionhead__icon svg { width: var(--icon-lg); height: var(--icon-lg); }

/* Data table */
.orka-table { width: 100%; border-collapse: collapse; font-size: var(--type-td-size); }
.orka-table th { padding: var(--space-2-5) var(--space-4); text-align: left; font-size: var(--type-th-size); font-weight: var(--type-th-weight); letter-spacing: var(--type-th-tracking); text-transform: uppercase; color: var(--text-tertiary); white-space: nowrap; background: var(--bg-surface-sunken); box-shadow: inset 0 -1px 0 var(--border-subtle); }
.orka-table th[aria-sort] { cursor: pointer; color: var(--text-secondary); }
.orka-table td { padding: var(--space-3) var(--space-4); color: var(--text-primary); box-shadow: inset 0 -1px 0 var(--border-subtle); vertical-align: middle; }
.orka-table th.orka-table__num,
.orka-table td.orka-table__num { font-variant-numeric: tabular-nums; text-align: right; }
.orka-table td.orka-table__num .orka-ticker,
.orka-table td.orka-table__num .orka-health,
.orka-table td.orka-table__num .orka-badge { display: inline-flex; justify-content: flex-end; }
.orka-table tbody tr { transition: background-color var(--transition-base); }
.orka-table tbody tr:hover { background: var(--state-hover); }
.orka-table__name { font-weight: var(--fw-semibold); }
.orka-table__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3); font-size: var(--fs-2xs); color: var(--text-tertiary); }
.orka-table__pages { display: inline-flex; gap: var(--space-1); }
