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

.page-command-bar {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--console-space-3) var(--console-space-4);
  align-items: end;
  padding: var(--console-space-2) 0 var(--console-space-4);
}

.page-command-bar[data-sticky="true"] {
  position: sticky;
  top: 0;
  z-index: 12;
  border-bottom: 1px solid var(--console-border);
  background: color-mix(in srgb, var(--console-canvas) 92%, transparent);
  backdrop-filter: blur(10px);
}

.page-command-copy,
.page-command-title,
.page-command-description {
  min-width: 0;
  margin: 0;
}

.page-command-copy {
  display: grid;
  gap: var(--console-space-1);
}

.page-command-eyebrow {
  color: var(--console-cyan-700);
  font-family: var(--console-font-mono);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-command-title {
  color: var(--console-graphite-950);
  font-size: 26px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.1;
}

.page-command-description {
  max-width: 78ch;
  color: var(--console-graphite-600);
  font-size: 13px;
  line-height: 1.5;
}

.page-command-actions,
.page-command-filters {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--console-space-2);
}

.page-command-actions {
  justify-content: flex-end;
}

.page-command-filters {
  grid-column: 1 / -1;
}

.console-status-strip {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 1px;
  overflow-x: auto;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-sm);
  background: var(--console-border);
  scrollbar-width: thin;
}

.console-status-item {
  display: grid;
  min-width: 138px;
  flex: 1 1 170px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px var(--console-space-2);
  align-items: center;
  background: var(--console-surface-raised);
  padding: 8px 10px;
}

.console-status-item::before {
  width: 6px;
  height: 6px;
  grid-row: 1 / span 2;
  border-radius: 50%;
  background: var(--console-graphite-300);
  content: "";
}

.console-status-item[data-tone="ok"]::before {
  background: var(--console-green-700);
}
.console-status-item[data-tone="warn"]::before {
  background: var(--console-amber-500);
}
.console-status-item[data-tone="error"]::before {
  background: var(--console-red-700);
}
.console-status-item[data-tone="info"]::before {
  background: var(--console-cyan-600);
}

.console-status-item dt,
.console-status-item dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-status-item dt {
  color: var(--console-graphite-600);
  font-family: var(--console-font-mono);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

.console-status-item dd {
  color: var(--console-graphite-900);
  font-size: 12px;
  font-weight: 700;
}

.console-section-frame {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-md);
  background: var(--console-surface-raised);
  box-shadow: var(--console-shadow-sm);
}

.console-section-frame[data-tone="inset"] {
  background: var(--console-surface-muted);
  box-shadow: none;
}

.console-section-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--console-space-3);
  border-bottom: 1px solid var(--console-border);
  padding: 11px 13px;
}

.console-section-heading {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.console-section-heading h2,
.console-section-heading p {
  min-width: 0;
  margin: 0;
}

.console-section-heading h2 {
  color: var(--console-graphite-950);
  font-size: 14px;
  font-weight: 760;
}

.console-section-heading p {
  color: var(--console-graphite-600);
  font-size: 12px;
  line-height: 1.45;
}

.console-section-body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: var(--console-space-3);
  overscroll-behavior: contain;
}

.bounded-workspace {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-md);
  background: var(--console-surface-raised);
}

.bounded-workspace[data-inspector-open="true"] {
  grid-template-columns: minmax(0, 1fr) minmax(
      280px,
      var(--console-inspector-width, 36%)
    );
}

.bounded-workspace-main,
.bounded-workspace-inspector {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.bounded-workspace-inspector {
  border-left: 1px solid var(--console-border);
  background: var(--console-surface-muted);
}

.resource-collection {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--console-space-3);
}

.resource-collection-toolbar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--console-space-2);
}

.resource-collection-count {
  color: var(--console-graphite-600);
  font-family: var(--console-font-mono);
  font-size: 11px;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  border: 1px solid var(--console-border-strong);
  border-radius: var(--console-radius-sm);
  background: var(--console-border);
  overflow: hidden;
}

.segmented-control button {
  min-height: 30px;
  border: 0;
  background: var(--console-surface-raised);
  padding: 0 10px;
  color: var(--console-graphite-600);
  font-size: 11px;
  font-weight: 720;
}

.segmented-control button[aria-pressed="true"] {
  background: var(--console-graphite-900);
  color: #fff;
}

.resource-collection-items {
  display: grid;
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: var(--console-space-3);
  overflow: auto;
  overscroll-behavior: contain;
}

.resource-collection-items[data-view="cards"] {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}

.resource-collection-items[data-view="list"] {
  grid-template-columns: minmax(0, 1fr);
}

.resource-collection-items[data-density="compact"] {
  gap: var(--console-space-2);
}

.resource-collection-item {
  min-width: 0;
  min-height: 0;
}

.resource-collection-item > .entity-card {
  width: 100%;
  height: 100%;
}

.entity-card {
  position: relative;
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-sm);
  background: var(--console-surface-raised);
  padding: 13px;
  color: var(--console-graphite-900);
  box-shadow: var(--console-shadow-sm);
}

.entity-card[data-interactive="true"] {
  cursor: pointer;
  transition:
    border-color var(--console-duration-fast) ease,
    box-shadow var(--console-duration-fast) ease,
    transform var(--console-duration-fast) ease;
}

.entity-card[data-interactive="true"]:hover {
  border-color: var(--console-cyan-600);
  box-shadow: 0 8px 24px rgb(11 17 19 / 10%);
  transform: translateY(-1px);
}

.entity-card[data-selected="true"] {
  border-color: var(--console-cyan-600);
  box-shadow:
    inset 3px 0 0 var(--console-cyan-500),
    var(--console-shadow-sm);
}

.entity-card[data-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.entity-card-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--console-space-2);
}

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

.entity-card-title-stack strong,
.entity-card-title-stack small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card-title-stack strong {
  font-size: 14px;
}
.entity-card-title-stack small {
  color: var(--console-graphite-600);
  font-size: 11px;
}

.entity-card-body {
  min-width: 0;
  color: var(--console-graphite-700);
  font-size: 12px;
  line-height: 1.5;
}

.entity-card-footer {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--console-space-2);
  border-top: 1px solid var(--console-graphite-100);
  padding-top: 9px;
}

.console-data-grid-wrap {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-sm);
  background: var(--console-surface-raised);
  overscroll-behavior: contain;
}

.console-data-grid {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
}

.console-data-grid th,
.console-data-grid td {
  min-width: 0;
  border-bottom: 1px solid var(--console-graphite-100);
  padding: 10px 12px;
  color: var(--console-graphite-800);
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.console-data-grid[data-density="compact"] th,
.console-data-grid[data-density="compact"] td {
  padding-block: 7px;
}

.console-data-grid th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--console-surface-muted);
  color: var(--console-graphite-600);
  font-family: var(--console-font-mono);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.console-data-grid tbody tr[data-interactive="true"] {
  cursor: pointer;
}
.console-data-grid tbody tr[data-selected="true"] td {
  background: var(--console-cyan-100);
}
.console-data-grid tbody tr:hover td {
  background: color-mix(in srgb, var(--console-cyan-100) 45%, white);
}
.console-data-grid tbody tr:last-child td {
  border-bottom: 0;
}

.console-virtual-list {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.console-virtual-list-spacer {
  position: relative;
  width: 100%;
}
.console-virtual-list-window {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
}

.console-async-boundary {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.console-async-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--console-cyan-200);
  border-radius: var(--console-radius-xs);
  background: var(--console-cyan-100);
  padding: 4px 7px;
  color: var(--console-cyan-700);
  font-size: 11px;
  font-weight: 700;
}

.console-async-indicator[data-state="partial"] {
  border-color: #edc87f;
  background: var(--console-amber-100);
  color: var(--console-amber-700);
}

.console-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgb(11 17 19 / 48%);
  padding: var(--console-space-4);
  backdrop-filter: blur(2px);
}

.console-overlay-surface {
  display: grid;
  width: min(680px, 100%);
  max-height: min(820px, calc(100dvh - 32px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--console-border-strong);
  border-radius: var(--console-radius-md);
  background: var(--console-surface-raised);
  box-shadow: var(--console-shadow-md);
}

.console-overlay-surface[data-wide="true"] {
  width: min(960px, 100%);
}

.console-overlay-surface[data-fullscreen="true"] {
  width: 100vw;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
}
.console-overlay-backdrop[data-fullscreen="true"] {
  padding: 0;
}

.console-overlay-header,
.console-overlay-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--console-space-3);
  padding: 13px 15px;
}

.console-overlay-header {
  border-bottom: 1px solid var(--console-border);
}
.console-overlay-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--console-border);
}

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

.console-overlay-title-stack h2,
.console-overlay-title-stack p {
  min-width: 0;
  margin: 0;
}

.console-overlay-title-stack h2 {
  color: var(--console-graphite-950);
  font-size: 16px;
}
.console-overlay-surface.tasktree-detail-dialog .console-overlay-title-stack { overflow: hidden; }
.console-overlay-surface.tasktree-detail-dialog .console-overlay-title-stack h2 { overflow: hidden; font-size: 20px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.console-overlay-title-stack p {
  color: var(--console-graphite-600);
  font-size: 12px;
  line-height: 1.45;
}

.console-overlay-body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 15px;
  overscroll-behavior: contain;
}

.console-overlay-close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-sm);
  background: var(--console-surface-muted);
  color: var(--console-graphite-700);
  font-size: 18px;
  line-height: 1;
}

.console-drawer-backdrop {
  place-items: stretch end;
  padding: 0;
}
.console-drawer {
  width: min(440px, calc(100vw - 24px));
  max-height: 100dvh;
  height: 100dvh;
  border-block: 0;
  border-right: 0;
  border-radius: 0;
}

.console-drawer[data-placement="left"] {
  justify-self: start;
  border-right: 1px solid var(--console-border-strong);
  border-left: 0;
}

.console-popover-anchor {
  position: relative;
  display: inline-flex;
}
.console-popover {
  position: fixed;
  z-index: 120;
  width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100dvh - 24px));
  overflow: auto;
  border: 1px solid var(--console-border-strong);
  border-radius: var(--console-radius-sm);
  background: var(--console-surface-raised);
  padding: var(--console-space-3);
  box-shadow: var(--console-shadow-md);
}

.content-viewer {
  display: grid;
  min-width: 0;
  min-height: 220px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-sm);
  background: var(--console-surface-raised);
}

.content-viewer-toolbar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--console-space-2);
  border-bottom: 1px solid var(--console-border);
  background: var(--console-surface-muted);
  padding: 7px 9px;
}

.content-viewer--overlay {
  height: 100%;
  border: 0;
}

.content-viewer-toolbar strong {
  margin-right: auto;
  color: var(--console-graphite-700);
  font-family: var(--console-font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.content-viewer-search {
  width: min(220px, 44vw);
  min-height: 30px;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-xs);
  background: #fff;
  padding: 4px 8px;
  color: var(--console-graphite-900);
  font-size: 12px;
}

.content-viewer-body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #f7f8f5;
  overscroll-behavior: contain;
}

.content-viewer-pre {
  min-width: max-content;
  margin: 0;
  padding: 13px;
  color: #243238;
  font-family: var(--console-font-mono);
  font-size: 12px;
  line-height: 1.6;
  tab-size: 2;
}

.content-viewer-pre[data-wrap="true"] {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.content-viewer-line {
  display: block;
  min-height: 1.6em;
}
.content-viewer-line[data-match="true"] {
  background: var(--console-amber-100);
}
.content-viewer-line-number {
  display: inline-block;
  width: 4ch;
  margin-right: 12px;
  color: var(--console-graphite-500);
  text-align: right;
  user-select: none;
}

.content-viewer-markdown {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
  color: var(--console-graphite-900);
  font-size: 13px;
  line-height: 1.65;
}

.content-viewer-markdown > :first-child { margin-top: 0; }
.content-viewer-markdown > :last-child { margin-bottom: 0; }
.content-viewer-markdown h1,
.content-viewer-markdown h2,
.content-viewer-markdown h3,
.content-viewer-markdown h4 {
  margin: 1.35em 0 0.55em;
  color: var(--console-graphite-950);
  font-weight: 760;
  line-height: 1.3;
}
.content-viewer-markdown h1 { padding-bottom: 0.35em; border-bottom: 1px solid var(--console-border); font-size: 22px; }
.content-viewer-markdown h2 { padding-bottom: 0.3em; border-bottom: 1px solid var(--console-border); font-size: 18px; }
.content-viewer-markdown h3 { font-size: 15px; }
.content-viewer-markdown h4 { font-size: 13px; }
.content-viewer-markdown p { margin: 0.7em 0; }
.content-viewer-markdown ul,
.content-viewer-markdown ol { display: grid; gap: 0.35em; margin: 0.7em 0; padding-left: 1.6em; }
.content-viewer-markdown blockquote { margin: 0.8em 0; padding: 0.2em 0 0.2em 1em; border-left: 3px solid var(--console-cyan-600); color: var(--console-graphite-700); }
.content-viewer-markdown a { color: var(--console-cyan-700); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.content-viewer-markdown hr { margin: 1.2em 0; border: 0; border-top: 1px solid var(--console-border); }
.content-viewer-markdown img { max-width: 100%; height: auto; }

.content-viewer-markdown pre,
.content-viewer-markdown code {
  font-family: var(--console-font-mono);
}

.content-viewer-markdown :not(pre) > code { border-radius: 3px; background: #e9eeeb; padding: 0.12em 0.35em; color: var(--console-graphite-950); font-size: 0.9em; }

.content-viewer-markdown pre {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius-sm);
  background: #eef1ed;
  padding: 12px;
}

.content-viewer-markdown table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
}
.content-viewer-markdown th,
.content-viewer-markdown td {
  border: 1px solid var(--console-border);
  padding: 6px 9px;
  text-align: left;
}

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--console-focus);
  outline-offset: 2px;
}

body.console-scroll-locked {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.platform-shell {
  display: grid;
  width: 100%;
  height: 100dvh;
  min-width: 0;
  min-height: 100vh;
  grid-template-columns: var(--console-sidebar-width) minmax(0, 1fr);
  overflow: hidden;
  background: var(--console-canvas);
  color: var(--console-graphite-900);
  font-family: var(--console-font-sans);
}

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

.platform-sidebar {
  position: relative;
  display: flex;
  width: auto;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: var(--console-space-5);
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid #344247;
  background:
    linear-gradient(180deg, rgb(0 161 168 / 10%), transparent 180px),
    var(--console-graphite-950);
  padding: 16px 12px;
  color: #e9efed;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.platform-sidebar[data-collapsed="true"] {
  align-items: stretch;
  padding-inline: 8px;
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 2px 4px 11px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--console-cyan-500);
  border-radius: var(--console-radius-sm);
  background: var(--console-graphite-1000);
  color: #baf2ef;
  font-family: var(--console-font-mono);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 3px rgb(0 161 168 / 8%);
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

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

.brand-copy strong {
  color: #fff;
  font-size: 14px;
  letter-spacing: 0;
}
.brand-copy small {
  color: #91a09f;
  font-family: var(--console-font-mono);
  font-size: 10px;
}

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

.platform-sidebar[data-collapsed="true"] .brand-lockup,
.platform-sidebar[data-collapsed="true"] .nav-item {
  justify-content: center;
}

.nav-groups {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 17px;
}

.nav-section {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.nav-section h2 {
  margin: 0 0 4px;
  padding: 0 8px;
  color: #778886;
  font-family: var(--console-font-mono);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--console-radius-sm);
  background: transparent;
  padding: 6px 8px;
  color: #b9c5c3;
  font-size: 12px;
  text-align: left;
}

.nav-item:hover {
  border-color: rgb(255 255 255 / 8%);
  background: rgb(255 255 255 / 5%);
  color: #fff;
}

.nav-item[data-active="true"] {
  border-color: rgb(0 161 168 / 52%);
  background: linear-gradient(90deg, rgb(0 161 168 / 23%), rgb(0 161 168 / 5%));
  color: #eafffd;
  box-shadow: inset 2px 0 0 var(--console-cyan-500);
}

.nav-icon {
  display: inline-grid;
  width: 24px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #46575b;
  border-radius: var(--console-radius-xs);
  background: rgb(0 0 0 / 15%);
  color: #8ed5d4;
  font-family: var(--console-font-mono);
  font-size: 9px;
  font-weight: 760;
}

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

.platform-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: var(--console-topbar-height) minmax(0, 1fr);
  overflow: hidden;
}

.platform-topbar {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--console-border);
  background:
    linear-gradient(90deg, transparent 0 70%, rgb(0 161 168 / 6%)),
    color-mix(in srgb, var(--console-surface) 94%, transparent);
  padding: 0 12px;
  backdrop-filter: blur(10px);
}

.platform-content {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  overscroll-behavior: contain;
}

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

.topbar-status {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  color: var(--console-graphite-600);
  font-family: var(--console-font-mono);
  font-size: 10px;
}

.topbar-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--console-green-700);
  box-shadow: 0 0 0 3px var(--console-green-100);
  content: "";
}

.topbar-status strong {
  min-width: 0;
  overflow: hidden;
  color: var(--console-graphite-900);
  font-family: var(--console-font-sans);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.btn,
.icon-button,
.table-action {
  border-radius: var(--console-radius-sm);
  font-family: var(--console-font-sans);
  transition:
    background-color var(--console-duration-fast) ease,
    border-color var(--console-duration-fast) ease,
    color var(--console-duration-fast) ease;
}

.btn-primary {
  border-color: var(--console-cyan-700);
  background: var(--console-cyan-700);
  color: #fff;
}

.btn-primary:hover {
  background: #005d63;
}
.btn-secondary,
.icon-button,
.table-action {
  border-color: var(--console-border-strong);
  background: var(--console-surface-raised);
  color: var(--console-graphite-700);
}
.btn-secondary:hover,
.icon-button:hover,
.table-action:hover {
  border-color: var(--console-cyan-600);
  background: var(--console-cyan-100);
  color: var(--console-cyan-700);
}

.input,
input,
select,
textarea {
  border-color: var(--console-border);
  border-radius: var(--console-radius-sm);
  font-family: var(--console-font-sans);
}

.page-header {
  display: grid;
  gap: 5px;
  padding: 4px 0 16px;
}

.page-header h1 {
  color: var(--console-graphite-950);
  font-size: 26px;
  letter-spacing: 0;
}
.page-eyebrow {
  color: var(--console-cyan-700);
  font-family: var(--console-font-mono);
  letter-spacing: 0;
}
.page-description {
  color: var(--console-graphite-600);
}

.status-badge {
  border-radius: var(--console-radius-xs);
  font-family: var(--console-font-mono);
  letter-spacing: 0;
}

.operations-workspace {
  position: relative;
  display: grid;
  grid-template-columns: var(--operations-index-width) minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--console-graphite-200);
  background: white;
}

.operations-workspace[data-inspector-open="true"] {
  grid-template-columns: var(--operations-index-width) minmax(0, 1fr) var(
      --operations-inspector-width
    );
}

.operations-index,
.operations-main,
.operations-inspector {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.operations-index {
  border-right: 1px solid var(--console-graphite-200);
  background: var(--console-graphite-50);
}
.operations-inspector {
  border-left: 1px solid var(--console-graphite-200);
  background: white;
}
.operations-main {
  padding: var(--console-space-4);
}

.entity-index {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.entity-index-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: var(--console-space-2);
  padding: var(--console-space-3);
  border-bottom: 1px solid var(--console-graphite-200);
  background: color-mix(in srgb, var(--console-graphite-50) 94%, transparent);
}
.entity-index-list {
  display: grid;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.entity-index-list > li {
  min-width: 0;
}
.entity-index-row {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--console-graphite-200);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.entity-index-row:hover {
  background: white;
}
.entity-index-row[data-selected="true"] {
  background: var(--console-cyan-100);
  box-shadow: inset 3px 0 var(--console-cyan-700);
}
.entity-index-row:focus-visible {
  outline: 2px solid var(--console-cyan-700);
  outline-offset: -2px;
}
.entity-index-footer {
  margin-top: auto;
  padding: var(--console-space-3);
  border-top: 1px solid var(--console-graphite-200);
}

.fact-path {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: var(--console-graphite-200);
}
.fact-path li {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  background: white;
}
.fact-path li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -5px;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--console-graphite-300);
  border-right: 1px solid var(--console-graphite-300);
  background: white;
  transform: rotate(45deg);
}
.fact-path-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--console-graphite-300);
  border-radius: 50%;
  font: 600 11px/1 var(--console-font-mono);
}
.fact-path small,
.fact-path strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fact-path small {
  color: var(--console-graphite-600);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.fact-path strong {
  margin-top: 2px;
  font-size: 12px;
}
.fact-path li[data-tone="ok"] .fact-path-index {
  color: var(--console-green-700);
  border-color: var(--console-green-700);
}
.fact-path li[data-tone="warn"] .fact-path-index {
  color: var(--console-amber-700);
  border-color: var(--console-amber-500);
}
.fact-path li[data-tone="error"] .fact-path-index {
  color: var(--console-red-700);
  border-color: var(--console-red-700);
}

.operations-inspector-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.operations-inspector-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--console-graphite-200);
  background: white;
}
.operations-inspector-header h2,
.operations-inspector-header p {
  margin: 0;
}
.operations-inspector-header h2 {
  font-size: 15px;
}
.operations-inspector-header p {
  margin-top: 3px;
  color: var(--console-graphite-600);
  font-size: 11px;
}
.operations-inspector-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--console-graphite-200);
  overflow-x: auto;
}
.operations-inspector-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 7px 9px;
  background: transparent;
  color: var(--console-graphite-600);
  cursor: pointer;
  white-space: nowrap;
}
.operations-inspector-tabs button[aria-selected="true"] {
  border-color: var(--console-cyan-700);
  color: var(--console-graphite-950);
}
.operations-inspector-body {
  display: grid;
  align-content: start;
  gap: var(--console-space-4);
  padding: 14px;
}
.operations-inspector-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 14px;
  border-top: 1px solid var(--console-graphite-200);
  background: white;
}

.audit-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.audit-timeline li {
  position: relative;
  padding: 0 0 16px 22px;
  border-left: 1px solid var(--console-graphite-300);
}
.audit-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--console-cyan-700);
  box-shadow: 0 0 0 1px var(--console-cyan-700);
}
.view-mode-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--console-graphite-300);
  border-radius: 6px;
  background: var(--console-graphite-50);
}
.view-mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  padding: 0 9px;
  background: transparent;
  color: var(--console-graphite-600);
  cursor: pointer;
}
.view-mode-switch button[aria-pressed="true"] {
  background: var(--console-graphite-950);
  color: white;
}
.view-mode-switch button:focus-visible {
  outline: 2px solid var(--console-cyan-700);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1100px) {
  .operations-workspace,
  .operations-workspace[data-inspector-open="true"] {
    grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
  }
  .operations-inspector {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 10;
    width: min(430px, 76vw);
    box-shadow: -12px 0 28px rgb(15 23 42 / 0.18);
  }
}

@media (max-width: 640px) {
  .operations-workspace,
  .operations-workspace[data-inspector-open="true"] {
    display: block;
    overflow: auto;
  }
  .operations-index,
  .operations-main {
    min-height: 45vh;
    overflow: visible;
  }
  .operations-inspector {
    position: fixed;
    inset: 56px 0 0;
    width: auto;
  }
  .fact-path {
    grid-template-columns: 1fr;
  }
  .fact-path li::after {
    display: none;
  }
}

.auth-main,
.login-shell {
  background:
    linear-gradient(135deg, rgb(0 161 168 / 12%), transparent 45%),
    repeating-linear-gradient(
      90deg,
      transparent 0 39px,
      rgb(24 34 38 / 4%) 40px
    ),
    var(--console-canvas);
}

.login-card {
  border-color: var(--console-border-strong);
  border-radius: var(--console-radius-md);
  background: var(--console-surface);
  box-shadow: var(--console-shadow-md);
}

@media (max-width: 720px) {
  .page-command-bar {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .page-command-actions {
    justify-content: flex-start;
  }
  .bounded-workspace[data-inspector-open="true"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(160px, 40%);
  }
  .bounded-workspace-inspector {
    border-top: 1px solid var(--console-border);
    border-left: 0;
  }
  .resource-collection-items[data-view="cards"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .console-overlay-backdrop {
    padding: var(--console-space-2);
  }
  .console-overlay-surface {
    max-height: calc(100dvh - 16px);
  }
  .content-viewer-toolbar {
    align-items: stretch;
  }
  .content-viewer-search {
    width: 100%;
  }
  .platform-shell,
  .platform-shell.is-sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }
  .platform-sidebar {
    display: none;
  }
  .platform-main {
    height: 100dvh;
    grid-template-rows: var(--console-topbar-height) minmax(0, 1fr);
  }
  .platform-content {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px;
  }
  .desktop-sidebar-toggle {
    display: none;
  }
  .mobile-sidebar-toggle {
    display: inline-flex;
  }
  .console-drawer .brand-lockup {
    border-color: var(--console-border);
  }
  .console-drawer .brand-copy strong {
    color: var(--console-graphite-950);
  }
  .console-drawer .brand-copy small {
    color: var(--console-graphite-600);
  }
  .console-drawer .nav-section h2 {
    color: var(--console-graphite-500);
  }
  .console-drawer .nav-item {
    color: var(--console-graphite-700);
  }
  .console-drawer .nav-item:hover {
    border-color: var(--console-border);
    background: var(--console-surface-muted);
    color: var(--console-graphite-950);
  }
  .console-drawer .nav-item[data-active="true"] {
    border-color: var(--console-cyan-200);
    background: var(--console-cyan-100);
    color: var(--console-cyan-700);
  }
  .console-drawer .nav-icon {
    border-color: var(--console-border);
    background: var(--console-surface-muted);
    color: var(--console-cyan-700);
  }
}

@media (prefers-reduced-motion: reduce) {
  .entity-card[data-interactive="true"] {
    transition: none;
  }
  .entity-card[data-interactive="true"]:hover {
    transform: none;
  }
}
