/* SPEC: PJ2026-010405 云端控制台. */
/* Implementation reference: draft-2026-07-13-p0-cloud-console. */

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

.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;
}

.status-pill[data-status="dry-run"],
.status-pill[data-status="planned"],
.status-pill[data-status="pending"] {
  border-color: #bae6fd;
  background: #e0f2fe;
  color: #075985;
}

.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 select,
.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;
}

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

.secrets-compact-toolbar,
.secrets-detail-commandbar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.secrets-compact-toolbar > div:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.secrets-compact-toolbar strong {
  color: #0f172a;
  font-size: 15px;
}

.secrets-compact-toolbar small {
  color: #64748b;
  font-size: 12px;
}

.secrets-external-table .data-table {
  min-width: 980px;
}

.secrets-external-table .data-table th,
.secrets-external-table .data-table td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.25;
  vertical-align: middle;
}

.secrets-external-table .data-table th {
  color: #475569;
  font-size: 11px;
  letter-spacing: 0;
}

.secrets-external-table .crud-table small {
  margin-top: 2px;
  max-width: 280px;
  line-height: 1.2;
}

.secrets-name-link {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: #0f766e;
  text-decoration: none;
}

.secrets-name-link:hover strong {
  text-decoration: underline;
}

.secrets-detail-status-panel {
  padding: 12px;
}

.secrets-status-lines {
  display: grid;
  min-height: 78px;
  min-width: 0;
  gap: 8px;
  margin: 0;
}

.secrets-status-lines div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.secrets-status-lines dt,
.secrets-status-lines dd {
  margin: 0;
  min-width: 0;
}

.secrets-status-lines dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.secrets-status-lines dd {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 14px;
  font-weight: 750;
}

.secrets-segmented-tabs {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.secrets-segmented-tabs button {
  min-width: 116px;
  border: 0;
  border-right: 1px solid #cbd5e1;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 9px 14px;
}

.secrets-segmented-tabs button:last-child {
  border-right: 0;
}

.secrets-segmented-tabs button[data-active="true"] {
  background: #0f766e;
  color: white;
}

.secrets-detail-content {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.secrets-detail-section {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
}

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

.secrets-detail-fact-grid div {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 9px;
}

.secrets-detail-fact-grid dt,
.secrets-detail-fact-grid dd {
  min-width: 0;
  margin: 0;
}

.secrets-detail-fact-grid dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.secrets-detail-fact-grid dd {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 12px;
  font-weight: 750;
}

.secrets-ref-table {
  display: grid;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.secrets-ref-table [role="row"] {
  display: grid;
  min-width: 840px;
  grid-template-columns: 140px minmax(220px, 1.4fr) 140px 120px minmax(180px, 1fr);
  border-bottom: 1px solid #e2e8f0;
}

.secrets-ref-table [role="row"]:last-child {
  border-bottom: 0;
}

.secrets-ref-table span {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 8px 9px;
  color: #334155;
  font-size: 12px;
}

.secrets-ref-head span {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.secrets-resource-event-list {
  max-height: none;
}

.secrets-summary-grid,
.secrets-readiness-grid,
.secrets-detail-grid {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.secrets-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.secrets-readiness-grid {
  grid-template-columns: minmax(0, 1fr);
}

.secrets-detail-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
}

.secrets-target-panel,
.secrets-contract-panel,
.secrets-eso-panel,
.secrets-rollout-panel {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
}

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

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

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

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

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

.secrets-subsection {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.secrets-subsection h3 {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.secrets-chip-list {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.secrets-chip {
  display: grid;
  min-width: 0;
  gap: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
}

.secrets-chip strong,
.secrets-chip small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.secrets-chip small {
  color: #64748b;
  font-size: 12px;
}

.secrets-plan-panel {
  border-color: #bae6fd;
  background: #f8fcff;
}

.secrets-plan-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.secrets-plan-steps li {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

.secrets-plan-steps strong {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #0f766e;
  color: white;
  font-size: 11px;
}

.secrets-plan-form {
  gap: 12px;
}

.secrets-plan-fieldset {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  margin: 0;
  padding: 12px;
}

.secrets-plan-fieldset legend {
  padding: 0 4px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.secrets-plan-fieldset input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.secrets-plan-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.secrets-plan-toggle {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-self: end;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
}

.secrets-plan-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.secrets-plan-result {
  display: grid;
  min-width: 0;
  gap: 12px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.secrets-plan-result h3 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
}

.secrets-plan-result-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.secrets-plan-checks {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.secrets-event-list {
  display: grid;
  max-height: 560px;
  min-width: 0;
  gap: 8px;
  margin: 0;
  overflow: auto;
  padding: 0;
  list-style: none;
}

.secrets-event-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.secrets-event-list strong,
.secrets-event-list p,
.secrets-event-list small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.secrets-event-list p {
  margin: 3px 0;
  color: #334155;
  font-size: 13px;
}

.secrets-event-list small {
  color: #64748b;
  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;
  }

  .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,
  .secrets-summary-grid,
  .secrets-readiness-grid,
  .secrets-detail-grid,
  .secrets-plan-fieldset,
  .secrets-plan-result-grid,
  .field-grid,
  .form-grid.two-col,
  .compact-form-grid,
  .secrets-detail-fact-grid,
  .secrets-fact-grid,
  .secrets-plan-steps {
    grid-template-columns: 1fr;
  }

  .secrets-status-lines div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .secrets-segmented-tabs {
    display: flex;
    width: 100%;
  }

  .secrets-segmented-tabs button {
    flex: 1;
    min-width: 0;
  }
}

@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;
  }

  .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;
  }
}
