
/* ============================================================
   Developer Dashboard (internal diagnostics)
   ============================================================ */

.developer-dashboard {
  max-width: 1100px;
}

.devdash__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.devdash__title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.devdash__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange-700);
  background: var(--orange-50);
  border: 1px solid var(--orange-200);
}

.devdash__header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.devdash__section {
  margin-bottom: 1.5rem;
}

.devdash__section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--gray-900);
}

.devdash__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.devdash__card {
  min-height: 100%;
}

.devdash__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.devdash__status-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: currentColor;
}

.devdash__status--healthy { color: var(--green-700); }
.devdash__status--warning { color: var(--orange-700); }
.devdash__status--critical { color: var(--red-700); }
.devdash__status--unknown { color: var(--gray-600); }

.devdash__card-metric {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0.25rem 0;
}

.devdash__card-copy,
.devdash__card-time,
.devdash__panel-note,
.devdash__panel-meta {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin: 0.25rem 0 0;
}

.devdash__panel {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

.devdash__panel-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.devdash__split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.devdash__metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.devdash__metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.625rem;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.devdash__metric span,
.devdash__metric-label {
  font-size: 0.75rem;
  color: var(--gray-600);
}

.devdash__metric strong,
.devdash__metric-value {
  font-size: 1rem;
  color: var(--gray-900);
  font-weight: 600;
}

.devdash__pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.devdash__pipeline-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.8125rem;
}

.devdash__pipeline-step:last-child {
  border-bottom: none;
}

.devdash__pipeline-step--completed { color: var(--green-700); }
.devdash__pipeline-step--running { color: var(--blue-700); font-weight: 600; }
.devdash__pipeline-step--failed { color: var(--red-700); font-weight: 600; }
.devdash__pipeline-step--pending,
.devdash__pipeline-step--waiting { color: var(--gray-500); }
.devdash__pipeline-step--skipped { color: var(--gray-400); opacity: 0.75; }

.devdash__gen-run-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
}

.devdash__gen-run-stats div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.devdash__gen-run-stats dt {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

.devdash__gen-run-stats dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-900);
}

.devdash__gen-run-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.devdash__gen-run-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  color: var(--gray-700);
}

.devdash__gen-run-list--skipped,
.devdash__gen-run-self-review {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.devdash__gen-run-stats--compact {
  margin-bottom: 0;
}

.devdash__pipeline-icon {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: currentColor;
}

.devdash__events {
  list-style: none;
  margin: 0;
  padding: 0;
}

.devdash__event {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--gray-50);
}

.devdash__event--failed {
  border-color: var(--red-200);
  background: var(--red-50);
}

.devdash__event-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-600);
}

.devdash__event-message {
  margin: 0.35rem 0;
  font-size: 0.875rem;
  color: var(--gray-900);
}

.devdash__event-meta {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin: 0;
}

.devdash__event-details {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.devdash__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.devdash__action-result {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.devdash__action-result--error {
  color: var(--red-700);
}

.devdash__alert {
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.devdash__alert--critical {
  background: var(--red-50);
  border: 1px solid var(--red-200);
}

.devdash__alert--warning {
  background: var(--orange-50);
  border: 1px solid var(--orange-200);
}

.devdash__alert-title {
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.devdash__alert-message {
  margin: 0;
  font-size: 0.875rem;
}

.devdash__dl {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.devdash__dl dt {
  color: var(--gray-600);
  margin: 0;
  font-size: 0.8125rem;
}

.devdash__dl dd {
  margin: 0 0 0.5rem;
  color: var(--gray-900);
  word-break: break-word;
  font-size: 0.8125rem;
}

.devdash__dl div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.devdash__dl div dt,
.devdash__dl div dd {
  margin: 0;
}

.devdash__integrations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.devdash__integration {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  font-size: 0.8125rem;
}

.devdash__integration--unknown span {
  color: var(--gray-500);
}

.devdash__gate {
  max-width: 28rem;
  display: grid;
  gap: 0.75rem;
}

.devdash__label {
  font-size: 0.875rem;
  font-weight: 600;
}

.devdash__input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font: inherit;
}

.devdash__input:focus {
  outline: 2px solid var(--blue-500);
  outline-offset: 1px;
}

.devdash__loading,
.devdash__empty {
  padding: 1rem;
  color: var(--gray-600);
}

.devdash__badge--bypass {
  color: var(--orange-800);
  background: var(--orange-100);
  border-color: var(--orange-300);
}

.devdash__badge--bypass-sub {
  font-size: 0.625rem;
}

.devdash__alert--bypass {
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .devdash__cards,
  .devdash__split,
  .devdash__metrics-grid,
  .devdash__integrations {
    grid-template-columns: 1fr;
  }

  .devdash__dl div {
    grid-template-columns: 1fr;
  }

  .devdash__actions .btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .devdash__status-dot {
    animation: none;
  }
}

/* v2 operations dashboard */
.devdash--v2 .devdash__section-block {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.devdash__section-summary {
  cursor: pointer;
  padding: 0.875rem 1rem;
  list-style: none;
}

.devdash__section-summary::-webkit-details-marker {
  display: none;
}

.devdash__section-summary .devdash__section-title {
  margin: 0;
  display: inline;
}

.devdash__section-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--gray-100);
}

.devdash__badge--v2 {
  color: var(--blue-700);
  background: var(--blue-50);
  border-color: var(--blue-200);
}

.devdash__cards--summary {
  margin-bottom: 1rem;
}

.devdash__table-wrap {
  overflow-x: auto;
}

.devdash__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.devdash__table th,
.devdash__table td {
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid var(--gray-100);
  text-align: left;
  white-space: nowrap;
}

.devdash__table th {
  font-weight: 700;
  color: var(--gray-700);
  background: var(--gray-50);
  cursor: pointer;
}

.devdash__row--failed td {
  background: var(--red-50);
}

.devdash__row--slow td {
  background: var(--orange-50);
}

.devdash__pipeline--viz .devdash__pipeline-arrow {
  display: block;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.875rem;
  line-height: 1;
  margin: 0.15rem 0;
}

.devdash__pipeline-viz {
  margin-bottom: 1rem;
}

.devdash__prompt-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.devdash__prompt-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
}

.devdash__code {
  font-size: 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 16rem;
}

.devdash__code--sm {
  max-height: 8rem;
}

.devdash__chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 5rem;
  margin-top: 1rem;
  padding: 0.5rem 0;
}

.devdash__chart-bar {
  flex: 1;
  min-width: 1.5rem;
  background: var(--blue-400);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.devdash__chart-bar span {
  font-size: 0.625rem;
  color: var(--gray-600);
  transform: rotate(-45deg);
  margin-bottom: -1.25rem;
}

.devdash__env-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.devdash__env-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.35rem 0;
}

.devdash__env--ok .devdash__env-icon {
  color: var(--green-700);
}

.devdash__env--missing .devdash__env-icon {
  color: var(--gray-400);
}

.devdash__test-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.devdash__log-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.devdash__log-filter.is-active {
  background: var(--blue-50);
  border-color: var(--blue-300);
}

.devdash__log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 20rem;
  overflow-y: auto;
}

.devdash__log {
  display: grid;
  grid-template-columns: 9rem 5rem 1fr;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.75rem;
}

.devdash__log--error .devdash__log-level {
  color: var(--red-700);
}

.devdash__log--warning .devdash__log-level {
  color: var(--orange-700);
}

.devdash__log--success .devdash__log-level {
  color: var(--green-700);
}

.devdash__poll-meta {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 1rem;
  text-align: center;
}

.devdash__pipeline-step--slowest {
  outline: 2px solid var(--orange-400);
  border-radius: var(--radius-sm);
}

.devdash__env--invalid .devdash__env-icon {
  color: var(--orange-700);
}

.devdash__env-status {
  margin-left: auto;
  font-size: 0.75rem;
  text-transform: capitalize;
  color: var(--gray-600);
}

.devdash__search {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.devdash__input--search {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
}

.devdash__session-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.8125rem;
}

.devdash__prompt-last {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

@media (max-width: 900px) {
  .devdash__env-list,
  .devdash__log {
    grid-template-columns: 1fr;
  }

  .devdash__feed-summary {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ops console v3 */
.devdash--ops .devdash__status--healthy { color: var(--green-700); }
.devdash--ops .devdash__status--warning { color: var(--orange-700); }
.devdash--ops .devdash__status--critical { color: var(--red-700); }
.devdash--ops .devdash__status--waiting { color: var(--gray-500); }
.devdash--ops .devdash__status--unknown { color: var(--gray-600); }

.devdash__card--healthy { border-left: 3px solid var(--green-500); }
.devdash__card--warning { border-left: 3px solid var(--orange-500); }
.devdash__card--critical { border-left: 3px solid var(--red-500); }
.devdash__card--waiting { border-left: 3px solid var(--gray-400); }

.devdash__card-explanation,
.devdash__card-checked {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin: 0.25rem 0 0;
}

.devdash__metric--pulse {
  transition: color 0.3s ease;
}

.devdash__error-rate-panel {
  display: flex;
  gap: 2rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.devdash__empty--waiting {
  color: var(--gray-500);
  font-style: italic;
}

.devdash__alert--info {
  background: var(--blue-50, #eff6ff);
  border: 1px solid var(--blue-200, #bfdbfe);
}

.devdash__graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.devdash__range-btn.is-active {
  background: var(--gray-200);
  font-weight: 600;
}

.devdash__chart--series {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 88px;
  padding: 0.5rem 0;
}

.devdash__chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.devdash__chart-bar--live {
  width: 100%;
  max-width: 2rem;
  background: linear-gradient(180deg, var(--blue-400, #60a5fa), var(--blue-600, #2563eb));
  border-radius: 3px 3px 0 0;
  transition: height 0.35s ease;
}

.devdash__chart-stack {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  max-width: 2rem;
}

.devdash__chart-seg--success {
  background: var(--green-500);
  border-radius: 0;
}

.devdash__chart-seg--failed {
  background: var(--red-500);
  border-radius: 3px 3px 0 0;
}

.devdash__chart-label {
  font-size: 0.625rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.devdash__cost-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: var(--gray-50);
}

.devdash__feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.devdash__feed-row {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
}

.devdash__feed-summary {
  display: grid;
  grid-template-columns: 9rem 1fr 5rem 5rem 4rem 4rem 5rem;
  gap: 0.5rem;
  align-items: center;
  cursor: pointer;
  font-size: 0.8125rem;
  list-style: none;
}

.devdash__feed-detail {
  padding: 0.75rem 0 0.25rem;
  font-size: 0.8125rem;
}

.devdash__feed-row--failed {
  border-color: var(--red-200);
  background: var(--red-50, #fef2f2);
}

.devdash__error-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.devdash__error-summary {
  display: grid;
  grid-template-columns: 9rem 1fr 5rem 8rem 3rem;
  gap: 0.5rem;
  font-size: 0.8125rem;
  cursor: pointer;
}

.devdash__error-detail {
  padding: 0.5rem 0;
  font-size: 0.8125rem;
}

.devdash__error-message {
  margin: 0.5rem 0;
  word-break: break-word;
}

.devdash__pipeline-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.devdash__pipeline-sub,
.devdash__pipeline-fail {
  font-size: 0.75rem;
  color: var(--gray-600);
}

.devdash__pipeline-fail {
  color: var(--red-700);
}

.devdash__split--queue {
  margin-top: 1rem;
}

.devdash__table--compact {
  font-size: 0.8125rem;
}

.devdash__prompt-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.devdash__dl--inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  font-size: 0.8125rem;
}

.devdash__metrics-grid--inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.75rem;
}

/* UX polish — spacing, typography, hierarchy */
.devdash--polished {
  --devdash-space-xs: 0.375rem;
  --devdash-space-sm: 0.625rem;
  --devdash-space-md: 1rem;
  --devdash-space-lg: 1.5rem;
  --devdash-space-xl: 2rem;
  --devdash-radius: var(--radius-lg, 0.75rem);
}

.devdash--polished .devdash__header {
  margin-bottom: var(--devdash-space-lg);
  padding-bottom: var(--devdash-space-md);
  border-bottom: 1px solid var(--gray-200);
}

.devdash__page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--gray-900);
}

.devdash__page-subtitle {
  font-size: 0.9375rem;
  color: var(--gray-600);
  margin: var(--devdash-space-xs) 0 0;
  max-width: 42rem;
  line-height: 1.5;
}

.devdash--polished .devdash__section-block {
  margin-bottom: var(--devdash-space-md);
}

.devdash--polished .devdash__section-title {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.devdash__card-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0 0 var(--devdash-space-sm);
}

.devdash--polished .devdash__cards--summary {
  gap: var(--devdash-space-md);
  margin-bottom: var(--devdash-space-lg);
}

.devdash--polished .devdash__card {
  min-height: 9.5rem;
  display: flex;
  flex-direction: column;
}

.devdash--polished .devdash__card .metric-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}

.devdash--polished .devdash__status {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 var(--devdash-space-sm);
  line-height: 1.2;
}

.devdash__status-text {
  line-height: 1.2;
}

.devdash__status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.devdash__status-dot--healthy { background: var(--green-500); }
.devdash__status-dot--warning { background: var(--orange-500); }
.devdash__status-dot--critical { background: var(--red-500); }
.devdash__status-dot--waiting { background: var(--gray-400); }
.devdash__status-dot--unavailable { background: var(--gray-500); }

.devdash__card--unavailable { border-left: 3px solid var(--gray-500); }

.devdash--polished .devdash__card-metric {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: auto;
}

.devdash--polished .devdash__metric {
  min-height: 4.25rem;
  justify-content: space-between;
}

.devdash--polished .devdash__metric-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.devdash--polished .devdash__metric-value {
  font-size: 1.0625rem;
  font-weight: 650;
  color: var(--gray-900);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.devdash__metric-group {
  margin-bottom: var(--devdash-space-lg);
}

.devdash__metric-group:last-child {
  margin-bottom: 0;
}

.devdash__metric-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0 0 var(--devdash-space-sm);
}

.devdash__placeholder {
  padding: var(--devdash-space-lg);
  text-align: center;
  border: 1px dashed var(--gray-300);
  border-radius: var(--devdash-radius);
  background: var(--gray-50);
}

.devdash__placeholder-title {
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--gray-800);
  margin: 0 0 var(--devdash-space-xs);
}

.devdash__placeholder-message {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.5;
  max-width: 28rem;
  margin-inline: auto;
}

.devdash__last-error {
  margin-bottom: var(--devdash-space-md);
  padding: var(--devdash-space-md);
  border-radius: var(--devdash-radius);
  background: var(--orange-50, #fff7ed);
  border: 1px solid var(--orange-200, #fed7aa);
}

.devdash__last-error-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--orange-800, #9a3412);
  margin: 0 0 var(--devdash-space-xs);
}

.devdash__last-error-message {
  font-size: 0.875rem;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.45;
}

.devdash__last-error-time {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin: var(--devdash-space-xs) 0 0;
}

.devdash__badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.devdash__badge-pill--success {
  color: var(--green-800);
  background: var(--green-100, #dcfce7);
}

.devdash__badge-pill--failed {
  color: var(--red-800);
  background: var(--red-100, #fee2e2);
}

.devdash__badge-pill--slow,
.devdash__badge-pill--retry {
  color: var(--orange-800);
  background: var(--orange-100, #ffedd5);
}

.devdash--polished .devdash__feed-row {
  padding: 0.5rem 0.75rem;
  min-height: 2.75rem;
}

.devdash--polished .devdash__feed-summary {
  min-height: 2.25rem;
  padding: 0.15rem 0;
  gap: 0.75rem;
}

.devdash--polished .devdash__feed-row--failed {
  background: rgba(254, 242, 242, 0.65);
}

.devdash__error-rate-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--devdash-space-md);
  padding: var(--devdash-space-md) var(--devdash-space-lg);
  margin-bottom: var(--devdash-space-lg);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--devdash-radius);
}

.devdash__error-rate-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.devdash__error-rate-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.devdash__error-rate-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
}

.devdash--polished .devdash__section-summary {
  padding: var(--devdash-space-md) var(--devdash-space-lg);
}

.devdash--polished .devdash__section-summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--gray-400);
  transition: transform 0.15s ease;
}

.devdash--polished .devdash__section-block[open] > .devdash__section-summary::before {
  transform: rotate(90deg);
}

.devdash--polished .devdash__section-body {
  padding: var(--devdash-space-md) var(--devdash-space-lg) var(--devdash-space-lg);
}

.devdash--polished .devdash__table-wrap {
  margin-top: var(--devdash-space-sm);
  -webkit-overflow-scrolling: touch;
}

.devdash--polished .devdash__table th,
.devdash--polished .devdash__table td {
  padding: 0.625rem 0.75rem;
}

@media (max-width: 900px) {
  .devdash--polished .devdash__cards--summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .devdash--polished .devdash__metrics-grid,
  .devdash--polished .devdash__prompt-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .devdash__error-rate-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .devdash--polished .devdash__cards--summary,
  .devdash--polished .devdash__metrics-grid,
  .devdash--polished .devdash__prompt-metrics,
  .devdash--polished .devdash__dl--inline {
    grid-template-columns: 1fr;
  }

  .devdash__page-title {
    font-size: 1.25rem;
  }

  .devdash--polished .devdash__feed-summary {
    grid-template-columns: 1fr 1fr;
    row-gap: 0.35rem;
  }

  .devdash--polished .devdash__feed-status {
    grid-column: 1 / -1;
  }

  .devdash__error-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .devdash__metric--pulse,
  .devdash__chart-bar--live,
  .devdash--polished .devdash__section-summary::before {
    transition: none;
  }
}

/* Information density — compact empty sections */
.devdash--dense .devdash__section-block--empty:not([open]) {
  margin-bottom: var(--devdash-space-sm);
}

.devdash--dense .devdash__section-block--empty[open] > .devdash__section-body {
  padding-top: var(--devdash-space-sm);
  padding-bottom: var(--devdash-space-md);
}

.devdash__empty-compact {
  margin: 0;
  padding: 0.25rem 0;
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.devdash__section-hint {
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--gray-500);
}

.devdash--dense .devdash__section-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.devdash__glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--devdash-space-md);
  margin-bottom: var(--devdash-space-lg);
  padding: var(--devdash-space-md) var(--devdash-space-lg);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.devdash__glance-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.devdash__glance-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.devdash__glance-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.devdash--dense .devdash__section-block--empty .devdash__section-body {
  min-height: 0;
}

.devdash--dense .devdash__placeholder {
  min-height: 0;
  padding: var(--devdash-space-sm) 0;
}

@media (max-width: 900px) {
  .devdash__glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .devdash__glance {
    grid-template-columns: 1fr 1fr;
  }
}

/* Split architecture — Live Dashboard + Advanced Tools */
.devdash--split .devdash__header {
  align-items: flex-start;
}

.devdash__header-main {
  flex: 1;
  min-width: 12rem;
}

.devdash__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: flex-end;
  align-items: center;
  max-width: 36rem;
}

.devdash__toolbar-divider {
  width: 1px;
  height: 1.25rem;
  background: var(--gray-200);
  margin: 0 0.125rem;
}

.devdash--split .devdash__header .devdash__action-result {
  margin: var(--devdash-space-xs) 0 0;
  font-size: 0.8125rem;
  min-height: 1.25rem;
}

.devdash__zone {
  margin-bottom: var(--devdash-space-xl);
}

.devdash__zone-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0 0 var(--devdash-space-md);
}

.devdash__zone-desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin: calc(-1 * var(--devdash-space-sm)) 0 var(--devdash-space-md);
  line-height: 1.45;
}

.devdash__zone--live {
  padding-bottom: var(--devdash-space-lg);
  border-bottom: 1px solid var(--gray-200);
}

.devdash__cards--live {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.devdash__live-panel {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
  margin-bottom: var(--devdash-space-md);
}

.devdash__live-panel-title {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0;
  padding: var(--devdash-space-md) var(--devdash-space-lg);
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-900);
}

.devdash__live-panel-body {
  padding: var(--devdash-space-md) var(--devdash-space-lg) var(--devdash-space-lg);
}

.devdash__advanced-list .devdash__section-block--advanced {
  margin-bottom: var(--devdash-space-sm);
}

.devdash__advanced-list .devdash__section-block--advanced:not([open]) .devdash__section-body {
  display: none;
}

@media (max-width: 1100px) {
  .devdash__cards--live {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .devdash__cards--live {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .devdash__toolbar {
    max-width: none;
    justify-content: flex-start;
  }
}

/* Operations dashboard — status bar + activity timeline */
.devdash__status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  padding: 0.625rem 1rem;
  margin-bottom: var(--devdash-space-lg);
  background: var(--gray-900);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
}

.devdash__status-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}

.devdash__status-bar .devdash__status-value {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.devdash__status-bar .devdash__status-value--warn {
  color: var(--orange-300);
}

.devdash__status-bar .devdash__status-value--ok {
  color: var(--green-300);
}

.devdash__status-bar .devdash__status-dot {
  box-shadow: none;
}

.devdash__timeline-panel {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
  margin-bottom: var(--devdash-space-md);
}

.devdash__timeline-panel .devdash__live-panel-title {
  border-bottom: 1px solid var(--gray-100);
}

.devdash__timeline {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  max-height: 280px;
  overflow-y: auto;
}

.devdash__timeline-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--gray-50);
}

.devdash__timeline-row:last-child {
  border-bottom: none;
}

.devdash__timeline-time {
  font-variant-numeric: tabular-nums;
  color: var(--gray-500);
  font-weight: 600;
}

.devdash__timeline-msg {
  color: var(--gray-800);
  line-height: 1.4;
}

.devdash__timeline-row--error .devdash__timeline-msg {
  color: var(--red-700);
}

.devdash__timeline-row--pipeline .devdash__timeline-msg {
  color: var(--blue-700);
}

.devdash__error-status {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
}

.devdash__error-status--active {
  background: var(--red-100);
  color: var(--red-700);
}

.devdash__error-status--resolved {
  background: var(--gray-100);
  color: var(--gray-600);
}

.devdash__pipeline-viz--live {
  border: 1px solid var(--blue-200);
  box-shadow: 0 0 0 1px var(--blue-50);
}

.devdash__live-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-700);
  background: var(--blue-50);
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  margin-left: 0.375rem;
  vertical-align: middle;
}

.devdash__pipeline-step--running .devdash__pipeline-icon {
  animation: devdash-pulse 1.2s ease-in-out infinite;
}

@keyframes devdash-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.15); }
}

@media (max-width: 768px) {
  .devdash__status-bar {
    gap: 0.5rem 0.75rem;
  }

  .devdash__timeline-row {
    grid-template-columns: 3rem 1fr;
  }

  .devdash__timeline-link {
    grid-column: 2;
    justify-self: start;
  }
}
