/* SPEC: PJ2026-01060505 Workbench Performance draft-2026-06-17-p0. */
.platform-shell {
  display: grid;
  height: 100dvh;
  min-height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
  overflow: hidden;
  background: #eef3f8;
}

.platform-shell.is-sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.platform-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid #d8e1eb;
  background: #f8fafc;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 14px;
  scrollbar-width: none;
}

.platform-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.platform-sidebar[data-collapsed="true"] {
  width: auto;
  align-items: center;
  overflow-x: hidden;
  padding-right: 8px;
  padding-left: 8px;
}

.platform-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 44px minmax(0, 1fr);
}

.platform-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #d8e1eb;
  background: rgba(248, 250, 252, 0.92);
  padding: 0 12px;
}

.platform-content {
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px;
}

.platform-content > * {
  min-height: 0;
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-lockup.centered {
  justify-content: center;
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #111827;
  color: #67e8f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 850;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lockup small,
.topbar-status span {
  color: #64748b;
  font-size: 12px;
}

.nav-groups,
.nav-section,
.route-stack,
.workbench-route {
  display: grid;
  gap: 16px;
}

.route-stack {
  align-content: start;
  overflow: visible;
}

.workbench-route {
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.nav-section h2 {
  margin: 0 0 4px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 9px 10px;
  color: #334155;
  text-align: left;
}

.nav-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.nav-item[data-active="true"] .nav-icon {
  background: #bae6fd;
  color: #075985;
}

.platform-sidebar[data-collapsed="true"] .brand-lockup div,
.platform-sidebar[data-collapsed="true"] .nav-section h2,
.platform-sidebar[data-collapsed="true"] .nav-label {
  display: none;
}

.platform-sidebar[data-collapsed="true"] .nav-item {
  justify-content: center;
  padding: 9px;
}

.nav-item[data-active="true"] {
  background: #e0f2fe;
  color: #0c4a6e;
  font-weight: 750;
}

.nav-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #94a3b8;
}

.nav-item[data-active="true"] .nav-dot {
  background: #0891b2;
}

.topbar-status {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
}

.topbar-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.topbar-progress {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.topbar-progress span {
  width: 14px;
  height: 14px;
  border: 2px solid #bae6fd;
  border-top-color: #0e7490;
  border-radius: 999px;
  animation: workbench-spin 0.8s linear infinite;
}

@keyframes workbench-spin {
  to { transform: rotate(360deg); }
}

.auth-main,
.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #eef3f8;
  padding: 20px;
}

.login-card {
  display: grid;
  width: min(420px, 100%);
  gap: 14px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.register-card {
  width: min(520px, 100%);
}

.auth-link {
  color: #0e7490;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.login-card label,
.settings-grid label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

.login-note,
.form-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.form-error {
  color: #b91c1c;
}

.api-error-diagnostic {
  display: inline-grid;
  max-width: min(720px, 100%);
  width: fit-content;
  gap: 8px;
  border-left: 3px solid #b91c1c;
  background: #f8fafc;
  padding: 8px 10px;
  text-align: left;
}

.empty-state .api-error-diagnostic {
  max-width: min(760px, 100%);
  margin: 4px auto 0;
}

.api-error-diagnostic-summary {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.api-error-diagnostic-summary-text {
  display: inline-flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.api-error-diagnostic strong {
  display: block;
  color: #991b1b;
  font-size: 13px;
}

.api-error-diagnostic p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.api-error-diagnostic-toggle {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  background: #fff7ed;
  color: #92400e;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.api-error-diagnostic-toggle[aria-expanded="true"] {
  background: #fffbeb;
  color: #78350f;
}

.api-error-diagnostic-details {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.api-error-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 0;
}

.api-error-diagnostic-grid div {
  min-width: 0;
}

.api-error-diagnostic-grid dt,
.api-error-diagnostic-grid dd {
  min-width: 0;
  margin: 0;
}

.api-error-diagnostic-grid dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.api-error-diagnostic-grid dd {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.45;
}

.api-error-diagnostic-grid code {
  white-space: normal;
}

.workbench-diagnostics-toggle {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #334155;
  padding: 4px 8px;
  font-weight: 800;
}

.workbench-diagnostics-toggle > span:first-child,
.message-detail-button {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0c4a6e;
  font-size: 12px;
  font-weight: 850;
}

.workbench-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workbench-diagnostics-summary {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.workbench-diagnostics-summary div {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}

.workbench-diagnostics-summary dt,
.workbench-diagnostics-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.workbench-diagnostics-summary dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.workbench-diagnostics-summary dd {
  color: #0f172a;
  font-size: 12px;
  font-weight: 750;
}

.probe-card,
.live-build-summary {
  min-width: min(320px, 100%);
  flex: 1 1 320px;
}

.status-chip-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
  color: #334155;
  text-align: left;
}

.status-chip-label,
.status-chip-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip-label {
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.status-chip-meta {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
}

.workbench-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.34);
  padding: 18px;
}

.workbench-dialog {
  display: grid;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  gap: 12px;
  overflow: auto;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  padding: 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
}

.workbench-dialog.wide {
  width: min(920px, 100%);
}

.workbench-dialog header,
.hwpod-event-panel header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-close {
  width: 30px;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.dialog-title-stack {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dialog-title-stack h2,
.dialog-title-stack p {
  margin: 0;
}

.dialog-title-stack p {
  color: #64748b;
  font-size: 13px;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.probe-list,
.live-build-list,
.hwpod-errors ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.probe-row,
.live-build-row,
.hwpod-errors {
  display: grid;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.probe-row-head,
.live-build-row-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.probe-row-label,
.live-build-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.probe-row-meta,
.live-build-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
}

.probe-row p,
.live-build-dialog-summary p,
.live-build-reason {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.workbench-grid {
  display: grid;
  min-height: 0;
  height: 100%;
  grid-template-columns: auto minmax(0, 1fr) minmax(280px, 360px);
  gap: 8px;
}

.workbench-center,
.session-rail,
.hwpod-panel,
.data-panel,
.empty-state,
.metric-card,
.message-card {
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.workbench-center {
  display: grid;
  height: 100%;
  min-height: 0;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.session-rail,
.hwpod-panel {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 0;
  min-width: 0;
  align-content: start;
  gap: 8px;
  padding: 10px;
  overflow: hidden;
}

.session-rail {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.session-rail-header-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.session-detail-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.session-collapse-toggle {
  min-width: 30px;
  padding: 0 8px;
  font-size: 16px;
  line-height: 1;
}

.session-rail.is-collapsed {
  width: 48px !important;
  grid-template-rows: auto;
  justify-items: center;
  padding: 8px;
}

.session-rail.is-collapsed .panel-header.compact {
  width: 100%;
  justify-content: center;
}

.session-rail.is-collapsed .session-rail-header-actions {
  width: 100%;
  justify-content: center;
}

.hwpod-panel {
  align-content: stretch;
  grid-template-rows: auto minmax(220px, 1fr);
  overflow: auto;
  overscroll-behavior: contain;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-header h2 {
  margin: 0;
  font-size: 16px;
}

.session-list {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 6px;
  grid-auto-rows: max-content;
  overflow: auto;
}

.session-list[data-loading="true"] {
  align-content: center;
  justify-items: center;
  overflow: hidden;
}

.session-list-loading {
  min-height: 120px;
}

.conversation-panel {
  display: flex;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
}

.session-tab {
  position: relative;
  display: flex;
  align-self: start;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  width: 100%;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  padding: 7px 9px;
  color: #334155;
  text-align: left;
  overflow: hidden;
}

.session-tab > * {
  position: relative;
  z-index: 1;
}

.session-tab[data-active="true"] {
  border-color: #38bdf8;
  background: #f0f9ff;
}

.session-tab[data-running="true"]::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 3px;
  left: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0), rgba(8, 145, 178, 0.82), rgba(8, 145, 178, 0));
  background-size: 220% 100%;
  opacity: 0.82;
  pointer-events: none;
  animation: session-tab-running 1100ms linear infinite;
}

.session-tab[data-projection-health="degraded"],
.session-tab[data-projection-health="stalled"],
.session-tab[data-projection-health="unavailable"] {
  border-color: #f59e0b;
  background: #fffbeb;
}

@keyframes session-tab-running {
  from { background-position: 220% 0; }
  to { background-position: -220% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .session-tab[data-running="true"]::after {
    animation: none;
  }
}

.session-tab-title {
  min-width: 0;
  flex: 1 1 auto;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-tab-diagnostic {
  flex: 0 0 auto;
  max-width: 88px;
  border-radius: 4px;
  background: #fef3c7;
  padding: 2px 5px;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-tab-time {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.session-list-footer {
  display: grid;
  gap: 6px;
  padding: 2px 0 6px;
}

.session-load-more {
  width: 100%;
  justify-content: center;
}

.session-list-terminal,
.session-list-error {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.session-list-error {
  color: #b91c1c;
}

.muted-box {
  color: #64748b;
  font-size: 12px;
}

.muted-box,
.empty-state {
  padding: 14px;
}

.conversation-panel {
  padding: 8px;
  scroll-behavior: auto;
}

.conversation-panel[data-following="true"],
.trace-timeline[data-following="true"] ol,
.trace-raw-list[data-following="true"] {
  overflow-anchor: none;
}

.conversation-empty-hint {
  align-self: center;
  margin-top: 24px;
  color: #64748b;
  font-size: 13px;
}

.conversation-detail-loading {
  align-self: center;
  margin: auto;
}

.conversation-error-hint {
  color: #b91c1c;
}

.message-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: max-content;
  flex: 0 0 auto;
  flex-direction: column;
  align-self: stretch;
  gap: 5px;
  border-radius: 4px;
  padding: 8px;
  overflow: visible;
}

.message-card[data-role="agent"] {
  align-self: stretch;
  width: 100%;
}

.message-card[data-role="agent"][data-status="pending"],
.message-card[data-role="agent"][data-status="running"] {
  border-color: #7dd3fc;
  background:
    linear-gradient(90deg, transparent, #0891b2, #22c55e, transparent) no-repeat -180px 0 / 180px 2px,
    linear-gradient(180deg, #ffffff 0%, #f8fdff 100%);
  animation: agent-run-scan 1.6s ease-in-out infinite;
}

.message-card[data-role="user"] {
  align-self: flex-end;
  width: max-content;
  min-width: min(120px, 100%);
  max-width: min(720px, 100%);
  margin-left: auto;
  border-color: #bfdbfe;
  background: #eff6ff;
  padding: 8px 10px;
  box-shadow: none;
}

.message-card[data-role="user"] .message-text {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.4;
}

.message-card header,
.trace-timeline header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message-header-main {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.message-header-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-timing-meta {
  display: inline-flex;
  min-width: 64px;
  flex: 0 0 auto;
  align-items: center;
  color: #64748b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.25;
}

.message-duration-meta,
.message-activity-meta {
  white-space: nowrap;
}

.message-activity-meta {
  display: inline-flex;
  min-width: 86px;
  flex: 0 0 auto;
  justify-content: flex-end;
  color: #475569;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.25;
}

.message-header-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.message-detail-button {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: white;
  color: #475569;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.agent-running-indicator {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
}

.agent-running-indicator span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #bae6fd;
  border-top-color: #0891b2;
  animation: workbench-spin 0.8s linear infinite;
}

.message-text,
.message-markdown {
  margin: 0;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.55;
}

.message-loading {
  align-self: flex-start;
  border-radius: 3px;
  padding: 6px 0;
}

.projection-diagnostic {
  align-self: flex-start;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  background: #fffbeb;
  padding: 7px 8px;
  color: #92400e;
}

.message-markdown {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.message-markdown > * {
  margin: 0;
}

.message-markdown ul,
.message-markdown ol {
  display: grid;
  gap: 4px;
  padding-left: 20px;
}

.message-markdown code {
  border-radius: 3px;
  background: rgba(175, 184, 193, 0.2);
  color: #24292f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 85%;
}

.message-markdown pre {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
  color: #24292f;
  padding: 10px;
}

.message-markdown code {
  padding: 2px 4px;
}

.message-markdown pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 100%;
}

.message-markdown table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  border-spacing: 0;
  line-height: 1.45;
}

.message-markdown th,
.message-markdown td {
  border: 1px solid #d0d7de;
  padding: 6px 13px;
  color: #24292f;
  text-align: left;
}

.message-markdown th {
  background: #f6f8fa;
  font-weight: 700;
}

.message-markdown tr {
  background: white;
}

.message-markdown tr:nth-child(2n) {
  background: #f6f8fa;
}

.message-markdown a {
  color: #0e7490;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.trace-timeline {
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #f8fafc;
  padding: 4px;
}

.trace-disclosure {
  display: grid;
  gap: 5px;
}

.trace-disclosure summary::-webkit-details-marker,
.trace-tool-details summary::-webkit-details-marker {
  display: none;
}

.trace-disclosure-summary {
  display: inline-flex;
  width: max-content;
  min-height: 22px;
  align-items: center;
  gap: 5px;
  border: 1px solid #d8e1eb;
  border-radius: 3px;
  background: white;
  color: #475569;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
  padding: 2px 6px;
}

.trace-disclosure-caret {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #0f766e;
  transition: transform 120ms ease;
}

.trace-disclosure[open] > .trace-disclosure-summary .trace-disclosure-caret {
  transform: rotate(90deg);
}

.trace-disclosure-label {
  line-height: 1;
}

.trace-disclosure-body {
  display: grid;
  gap: 5px;
}

.trace-meta-panel {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: white;
  padding: 6px;
}

.trace-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 4px 8px;
  margin: 0;
}

.trace-meta-grid div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.trace-meta-grid dt {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.trace-meta-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.trace-meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.message-trace-debug-panel {
  display: grid;
  gap: 8px;
}

.trace-raw-list {
  display: grid;
  max-height: min(340px, 42vh);
  gap: 4px;
  margin: 0;
  overflow: auto;
  padding: 0;
  scroll-behavior: auto;
  list-style: none;
}

.trace-raw-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  border-top: 1px solid #e2e8f0;
  padding: 5px 0 0;
  color: #475569;
  font-size: 12px;
}

.trace-raw-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.trace-raw-list li span,
.trace-raw-list li small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.trace-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trace-summary-chip {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e1eb;
  border-radius: 3px;
  background: white;
  color: #334155;
  padding: 4px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.trace-summary-chip b {
  color: #64748b;
  font-family: inherit;
  text-transform: uppercase;
}

.trace-id {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-id {
  max-width: 220px;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.trace-warning,
.trace-empty {
  margin: 0;
  border-radius: 3px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.45;
}

.trace-warning {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.trace-empty {
  border: 1px solid #d8e1eb;
  background: white;
  color: #64748b;
}

.trace-timeline[data-projection-health="degraded"] .trace-empty,
.trace-timeline[data-projection-health="stalled"] .trace-empty,
.trace-timeline[data-projection-health="unavailable"] .trace-empty {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.trace-timeline ol {
  display: grid;
  max-height: 320px;
  gap: 4px;
  margin: 0;
  overflow: auto;
  padding: 0;
  scroll-behavior: auto;
  list-style: none;
}

.trace-tool-details {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.trace-tool-details > summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.trace-tool-details > summary::before {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #64748b;
  content: "";
  transition: transform 120ms ease;
}

.trace-tool-details[open] > summary::before {
  transform: rotate(90deg);
}

.trace-tool-details > summary code {
  min-width: 0;
  max-width: 42%;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-tool-command-preview {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #334155;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-timeline li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  border-top: 1px solid #e2e8f0;
  padding: 5px 0 0;
  color: #475569;
  font-size: 12px;
}

.trace-timeline li:first-child {
  border-top: 0;
  padding-top: 0;
}

.trace-timeline li[data-terminal="true"] {
  border-left: 3px solid #22c55e;
  padding-left: 8px;
}

.trace-render-row .trace-row-body {
  width: 100%;
  min-width: 0;
  margin: 0;
  white-space: pre-wrap;
}

.trace-render-row .trace-row-markdown {
  display: grid;
  gap: 6px;
  white-space: normal;
}

.trace-render-row .muted {
  color: #94a3b8;
}

.trace-render-row pre.trace-row-body {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #d8e1eb;
  border-radius: 3px;
  background: white;
  color: #334155;
  padding: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
}

.trace-timeline li span,
.trace-timeline li small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.message-actions a {
  text-decoration: none;
}

.message-action-status {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.code-agent-status-summary {
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #f8fafc;
}

.code-agent-status-summary summary {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.code-agent-status-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid #d8e1eb;
}

.code-agent-error-summary {
  display: grid;
  gap: 4px;
  border-top: 1px solid #d8e1eb;
  background: #fff7ed;
  padding: 9px 10px;
  color: #7c2d12;
}

.code-agent-error-summary strong {
  font-size: 12px;
  font-weight: 800;
}

.code-agent-error-summary p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #7f1d1d;
  font-size: 12px;
  line-height: 1.45;
}

.code-agent-status-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding: 7px 10px;
  font-size: 12px;
}

.code-agent-status-row dt,
.code-agent-status-row dd {
  min-width: 0;
  margin: 0;
}

.code-agent-status-row dt {
  color: #64748b;
  font-weight: 700;
}

.code-agent-status-row dd {
  overflow-wrap: anywhere;
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.trace-timeline code,
.mini-log,
.json-panel,
.help-body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.trace-timeline code {
  min-width: 0;
  overflow-wrap: anywhere;
}

@keyframes agent-run-scan {
  0% { background-position: -180px 0, 0 0; }
  55%, 100% { background-position: calc(100% + 180px) 0, 0 0; }
}

.command-composer {
  display: grid;
  gap: 10px;
  border-top: 1px solid #d8e1eb;
  padding: 12px;
}

.composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.composer-field {
  display: grid;
  min-width: min(260px, 100%);
  gap: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.composer-field select {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  padding: 0 10px;
  color: #0f172a;
}

.command-composer textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.composer-warning {
  margin-right: auto;
  color: #b45309;
  font-size: 13px;
}

.composer-mode {
  margin-right: auto;
  color: #0e7490;
  font-size: 13px;
  font-weight: 700;
}

.composer-mode[data-mode="steer"] {
  color: #7c2d12;
}

.drafts-list {
  display: grid;
  gap: 8px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.drafts-list-head,
.session-rail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drafts-list-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.draft-chip {
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  padding: 6px 8px;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  text-align: left;
}

.session-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.session-detail-grid div {
  min-width: 0;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}

.session-detail-grid dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.session-detail-grid dd {
  margin: 3px 0 0;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.session-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.session-resize-handle {
  position: absolute;
  top: 0;
  right: -7px;
  width: 12px;
  height: 100%;
  cursor: col-resize;
}

.session-resize-handle:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: -2px;
}

.session-rail.is-resizing {
  user-select: none;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.evidence-grid span {
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 7px 8px;
  color: #334155;
  font-size: 11px;
  font-weight: 750;
}

.hwpod-panel-actions {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.hwpod-diagnostics-button {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: white;
  color: #0c4a6e;
  font-size: 13px;
  font-weight: 900;
}

.hwpod-node-status,
.hwpod-event-panel {
  display: grid;
  min-height: 0;
  gap: 10px;
}

.hwpod-node-status {
  overflow: auto;
}

.hwpod-event-panel {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.hwpod-node-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.summary-tile {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
  color: #334155;
  text-align: left;
}

.summary-tile span,
.summary-tile strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-tile span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-tile strong {
  color: #0f172a;
  font-size: 13px;
}

.hwpod-node-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.hwpod-node-meta div {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid #e2e8f0;
  padding: 7px 8px;
  background: #f8fafc;
}

.hwpod-node-meta dt,
.hwpod-node-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.hwpod-node-meta dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.hwpod-node-meta dd {
  color: #0f172a;
  font-size: 12px;
}

.hwpod-errors li {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 12px;
}

.hwpod-errors code {
  color: #991b1b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.hwpod-event-panel header button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #334155;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 750;
}

.hwpod-event-panel header div {
  display: flex;
  gap: 6px;
}

.hwpod-event-scroll {
  min-height: 0;
  overflow: auto;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
}

.hwpod-event-scroll pre,
#hwpod-detail-body {
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.mini-log,
.json-panel,
.help-body {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  padding: 12px;
  white-space: pre-wrap;
}

.empty-state {
  display: grid;
  align-self: start;
  justify-items: start;
  gap: 8px;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 850;
}

.overview-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.metric-card span {
  color: #64748b;
  font-size: 13px;
}

.usage-metrics .metric-card strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1.15;
}

.usage-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.usage-panel {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.admin-crud-panel,
.table-page-layout {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
}

.table-page-layout {
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.table-page-header small,
.panel-header small {
  color: #64748b;
  font-size: 12px;
}

.table-page-actions,
.table-actions-inline,
.table-pagination,
.table-pagination div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.table-pagination {
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
}

.data-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
}

.data-table th[data-align="right"],
.data-table td[data-align="right"] {
  text-align: right;
}

.crud-table td {
  vertical-align: top;
}

.crud-table small,
.provider-admin-page small,
.access-admin-page small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.link-button {
  display: grid;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.link-button[data-selected="true"] strong {
  color: #0f766e;
}

.usage-table th,
.usage-table td {
  white-space: nowrap;
}

.usage-table code {
  color: #0f766e;
  font-size: 12px;
}

.admin-billing-panel {
  overflow-x: auto;
}

.admin-billing-table td {
  vertical-align: top;
}

.admin-billing-table td > strong,
.admin-billing-table td > small {
  display: block;
}

.admin-billing-table td > small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.admin-action-error {
  margin: 0;
}

.inline-form-row,
.inline-edit-row,
.admin-users-filters,
.pagination-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-form-row .input,
.admin-users-filters .input {
  min-width: 180px;
  flex: 1;
}

.secret-once-box,
.detail-subpanel {
  display: grid;
  min-width: 0;
  gap: 10px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.secret-once-box code {
  overflow-wrap: anywhere;
  color: #0f766e;
}

.admin-users-layout,
.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
  gap: 12px;
}

.admin-users-list-panel,
.admin-user-create-panel,
.admin-user-detail-panel,
.admin-users-toolbar {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
}

.form-grid {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

.span-2 {
  grid-column: 1 / -1;
}

.admin-billing-table tr[data-selected="true"] td {
  background: #f0fdfa;
}

.table-action {
  min-width: 64px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  padding: 7px 10px;
}

.table-action:hover:not(:disabled) {
  border-color: #0891b2;
  color: #0c4a6e;
}

.table-action.danger:hover:not(:disabled) {
  border-color: #ef4444;
  color: #991b1b;
}

.table-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.status-pill[data-status="active"] {
  border-color: #99f6e4;
  background: #ccfbf1;
  color: #0f766e;
}

.status-pill[data-status="disabled"] {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.status-pill[data-status="admin"],
.status-pill[data-status="completed"],
.status-pill[data-status="ready"] {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}

.status-pill[data-status="failed"],
.status-pill[data-status="blocked"],
.status-pill[data-status="error"] {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.field-grid div {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.field-grid dt,
.field-grid dd {
  min-width: 0;
  margin: 0;
}

.field-grid dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.field-grid dd {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
}

.form-grid,
.admin-form {
  display: grid;
  gap: 12px;
}

.compact-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label,
.admin-form label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.form-grid select,
.admin-form input,
.admin-form textarea {
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #0f172a;
  font: inherit;
  padding: 9px 10px;
}

.admin-form textarea {
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.form-notice {
  margin: 0;
  color: #0f766e;
  font-size: 12px;
}

.access-user-head,
.tool-toggle-grid,
.tuple-list,
.provider-validation-panel {
  display: grid;
  gap: 10px;
}

.tool-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.tool-toggle-row input {
  width: 18px;
  height: 18px;
}

.tuple-list h3 {
  margin: 0;
  font-size: 14px;
}

.tuple-list ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tuple-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.3fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}

.tuple-list code,
.provider-admin-page code {
  overflow-wrap: anywhere;
  color: #0f766e;
  font-size: 12px;
}

.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: grid;
  gap: 8px;
}

.toast-item {
  max-width: min(380px, calc(100vw - 32px));
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  text-align: left;
}

.system-page .data-table td small,
.provider-admin-page .data-table td small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.system-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.system-summary-grid .metric-card {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.system-summary-grid .metric-card span,
.rum-bar-row span,
.skill-tree-list small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.system-summary-grid .metric-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.15;
}

.system-summary-grid .metric-card small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #64748b;
  font-size: 12px;
}

.system-filter-bar {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(240px, 1fr);
  gap: 10px;
}

.system-filter-bar label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.system-filter-bar select,
.system-filter-bar input {
  min-height: 36px;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  padding: 7px 10px;
}

.system-row-detail {
  display: -webkit-box;
  max-width: 520px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.system-drilldown {
  display: grid;
  gap: 8px;
}

.system-drilldown h3,
.system-drilldown p {
  margin: 0;
}

.system-drilldown h3 {
  font-size: 13px;
}

.system-drilldown ul,
.skill-tree-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.system-drilldown li,
.skill-tree-list li {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}

.rum-chart-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.rum-bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 160px) minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.rum-bar-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.rum-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0e7490;
}

.rum-bar-row strong {
  text-align: right;
}

.performance-window-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.performance-window-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
}

.performance-window-tabs button {
  min-width: 56px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.performance-window-tabs button[data-selected="true"] {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

.performance-window-toolbar > span {
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 650;
}

.performance-health-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.performance-health-card {
  min-height: 112px;
  border-left: 4px solid #64748b;
}

.performance-health-card.is-ok {
  border-left-color: #0f766e;
}

.performance-health-card.is-warn {
  border-left-color: #b45309;
}

.performance-health-card.is-blocked {
  border-left-color: #b91c1c;
}

.performance-contract-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.performance-contract-item {
  display: grid;
  min-width: 0;
  gap: 4px;
  border-left: 3px solid #0e7490;
  background: #f8fafc;
  padding: 10px;
}

.performance-contract-item span,
.performance-contract-item small,
.performance-row-contract {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-contract-item strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-row-contract {
  display: block;
  margin-top: 4px;
}

.performance-freshness-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
}

.performance-freshness-panel div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.performance-freshness-panel strong {
  color: #0f172a;
  font-size: 14px;
}

.performance-freshness-panel span,
.performance-chart-card header span,
.performance-top-row span,
.performance-chart-legend span {
  color: #64748b;
  font-size: 12px;
}

.performance-collection-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.performance-collection-item {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid #dbe3ef;
  border-left: 3px solid #475569;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.performance-collection-item span,
.performance-collection-item small,
.performance-collection-diagnostics small {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-collection-item strong,
.performance-collection-diagnostics strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-collection-diagnostics {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.performance-collection-diagnostics li {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe3ef;
  border-left: 3px solid #64748b;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
}

.performance-collection-diagnostics li.is-ok {
  border-left-color: #0f766e;
}

.performance-collection-diagnostics li.is-warn {
  border-left-color: #b45309;
}

.performance-collection-diagnostics li.is-blocked {
  border-left-color: #b91c1c;
}

.performance-diagnostic-panel {
  padding: 18px;
}

.performance-chart-grid,
.performance-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.performance-chart-card {
  display: grid;
  min-width: 0;
  gap: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.performance-chart-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.performance-chart-card header div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.performance-chart-card header strong {
  color: #0f172a;
  font-size: 14px;
}

.performance-chart-card header em {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
  padding: 5px 8px;
}

.performance-line-chart {
  width: 100%;
  height: 150px;
  overflow: visible;
}

.chart-grid-line {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: #0f766e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: #64748b;
  stroke: #ffffff;
  stroke-width: 2;
}

.chart-point.is-ok,
.performance-bar-row i.is-ok,
.performance-top-row i.is-ok {
  fill: #0f766e;
  background: #0f766e;
}

.chart-point.is-warn,
.performance-bar-row i.is-warn,
.performance-top-row i.is-warn {
  fill: #b45309;
  background: #b45309;
}

.chart-point.is-blocked,
.performance-bar-row i.is-blocked,
.performance-top-row i.is-blocked {
  fill: #b91c1c;
  background: #b91c1c;
}

.performance-chart-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.performance-chart-legend li {
  display: grid;
  min-width: 0;
  gap: 2px;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.performance-chart-legend strong {
  color: #0f172a;
  font-size: 13px;
}

.performance-bar-list,
.performance-top-list {
  display: grid;
  gap: 10px;
}

.performance-bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 128px) minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.performance-bar-row > span {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-bar-row div,
.performance-top-row > div:nth-child(2) {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.performance-bar-row i,
.performance-top-row i {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: inherit;
  background: #64748b;
}

.performance-bar-row strong {
  color: #0f172a;
  font-size: 12px;
  text-align: right;
}

.performance-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(96px, 0.8fr) minmax(70px, auto);
  align-items: center;
  gap: 10px;
}

.performance-top-row > div:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.performance-top-row strong,
.performance-top-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-top-row > div:first-child strong {
  color: #0f172a;
  font-size: 12px;
}

.performance-top-row em {
  color: #0f172a;
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.system-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hwpod-groups-section,
.hwpod-raw-panel {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
}

.hwpod-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.hwpod-node-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.hwpod-node-row strong,
.hwpod-node-row small,
.hwpod-node-row code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hwpod-node-row small,
.hwpod-node-row code {
  grid-column: 1 / -1;
  color: #475569;
}

.hwpod-op-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hwpod-op-list code {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 5px 8px;
  font-size: 12px;
}

.hwpod-blocker {
  color: #7f1d1d;
}

.performance-wide-panel {
  grid-column: 1 / -1;
}

.performance-page .table-page-layout {
  overflow: hidden;
}

.performance-page .data-table-wrap {
  border: 1px solid #d8e1eb;
  border-radius: 8px;
}

.performance-page .data-table {
  width: max-content;
  min-width: 780px;
  border: 0;
}

.performance-page .data-table th,
.performance-page .data-table td {
  white-space: nowrap;
}

.performance-page .performance-dimensions {
  min-width: 220px;
  white-space: normal;
}

.performance-dimensions {
  display: block;
  max-width: 360px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
}

.skills-tree-panel,
.skills-preview-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.skill-tree-list {
  max-height: 420px;
  overflow: auto;
}

.skill-tree-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.skill-tree-list button {
  min-height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.skill-tree-list button:disabled {
  color: #94a3b8;
}

.skill-tree-list span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.skills-preview-panel .mini-log {
  max-height: 460px;
  min-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
}

@media (max-width: 1180px) {
  .platform-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .platform-sidebar {
    padding: 14px 8px;
  }

  .platform-sidebar .brand-lockup div,
  .nav-section h2,
  .nav-label {
    display: none;
  }

  .workbench-grid,
  .overview-grid,
  .settings-grid,
  .usage-panels,
  .admin-users-layout,
  .admin-detail-grid,
  .system-summary-grid,
  .system-split-grid,
  .performance-health-strip,
  .performance-contract-strip,
  .performance-collection-strip,
  .performance-chart-grid,
  .performance-analytics-grid {
    grid-template-columns: 1fr;
  }

  .workbench-route {
    min-height: calc(100dvh - 102px);
    overflow: auto;
  }

  .workbench-grid,
  .session-rail,
  .workbench-center,
  .hwpod-panel {
    min-height: 0;
  }

  .hwpod-event-scroll {
    max-height: 260px;
  }

  .field-grid,
  .form-grid.two-col,
  .compact-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .platform-shell {
    height: 100dvh;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .platform-sidebar {
    display: none;
  }

  .platform-main {
    height: 100dvh;
    min-height: 0;
    grid-template-rows: 44px minmax(0, 1fr);
  }

  .platform-content {
    min-height: 0;
    padding: 12px;
    overflow: hidden;
  }

  .platform-topbar {
    min-width: 0;
    gap: 8px;
    padding: 0 10px;
  }

  .topbar-status {
    gap: 6px;
  }

  .topbar-status strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workbench-route,
  .workbench-grid,
  .workbench-center {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .workbench-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .hwpod-panel {
    display: none;
  }

  .session-rail {
    display: grid;
    width: 100% !important;
    max-height: 184px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    overflow: hidden;
  }

  .session-rail.is-collapsed {
    width: 100% !important;
    max-height: 44px;
    grid-template-rows: auto;
    justify-items: stretch;
  }

  .session-rail .panel-header.compact {
    min-height: 34px;
  }

  .session-rail .panel-header.compact .page-eyebrow,
  .session-rail .session-resize-handle {
    display: none;
  }

  .session-rail.is-collapsed .panel-header.compact {
    justify-content: flex-end;
  }

  .session-rail .session-rail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 12px 10px;
  }

  .session-rail .session-rail-actions .btn {
    min-width: 44px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .session-rail .panel-header.compact h2 {
    font-size: 14px;
  }

  #session-create {
    min-width: 56px;
    min-height: 32px;
  }

  .session-list {
    max-height: 78px;
  }

  .command-composer {
    gap: 8px;
    padding: 10px;
  }

  .composer-toolbar {
    gap: 6px;
  }

  .composer-field {
    min-width: 100%;
  }

  .command-composer textarea {
    min-height: 72px;
  }

  .system-filter-bar,
  .rum-bar-row,
  .performance-freshness-panel,
  .performance-collection-diagnostics li,
  .performance-bar-row,
  .performance-top-row,
  .skill-tree-list li {
    grid-template-columns: 1fr;
  }

  .performance-health-card {
    min-height: 92px;
  }

  .performance-chart-card header,
  .performance-freshness-panel {
    align-items: stretch;
  }

  .performance-chart-card header,
  .performance-freshness-panel,
  .performance-collection-diagnostics li,
  .performance-top-row {
    gap: 8px;
  }

  .performance-chart-legend {
    grid-template-columns: 1fr;
  }

  .performance-line-chart {
    height: 128px;
  }

  .performance-top-row em {
    text-align: left;
  }
}
