/* admin.css */
:root {
  color-scheme: light;
  --page-bg: #edf0f6;
  --surface: rgba(248, 250, 255, 0.78);
  --surface-soft: rgba(255, 255, 255, 0.62);
  --surface-strong: #ffffff;
  --line: rgba(126, 139, 168, 0.22);
  --line-strong: rgba(135, 156, 217, 0.48);
  --text: #303743;
  --muted: #8790a3;
  --accent: #7d95cf;
  --accent-strong: #a897f1;
  --danger: #d94b5c;
  --success: #3b9f78;
  --shadow: 18px 24px 56px rgba(142, 153, 181, 0.2), -18px -18px 42px rgba(255, 255, 255, 0.86);
  --radius: 8px;
  --sidebar-panel: rgba(247, 249, 255, 0.68);
  --sidebar-panel-strong: rgba(255, 255, 255, 0.86);
  --sidebar-glow: rgba(133, 154, 214, 0.18);
}

/* Runtime monitor dark surface. The rest of the Admin shell keeps its global
   light theme; only the dense monitoring canvas follows this preference. */
.runtime-monitor-screen-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.runtime-monitor-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(126, 139, 168, 0.28);
  border-radius: 6px;
  color: #53617a;
  background: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.runtime-monitor-theme-toggle:hover,
.runtime-monitor-theme-toggle:focus-visible {
  border-color: rgba(91, 127, 198, 0.54);
  color: #315f9e;
  background: rgba(232, 239, 255, 0.92);
  outline: none;
}

.runtime-monitor-theme-toggle[aria-pressed="true"] {
  border-color: rgba(71, 85, 105, 0.42);
  color: #fef08a;
  background: #18263d;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.runtime-monitor-theme-toggle[aria-pressed="true"]:hover,
.runtime-monitor-theme-toggle[aria-pressed="true"]:focus-visible {
  border-color: rgba(245, 158, 11, 0.7);
  color: #fef9c3;
  background: #273a5b;
}

.runtime-monitor-command-center.is-dark {
  --runtime-screen-bg: #0b1220;
  --runtime-screen-surface: #111c2f;
  --runtime-screen-line: rgba(148, 163, 184, 0.24);
  --runtime-screen-text: #e5edf8;
  --runtime-screen-muted: #91a4bd;
  --runtime-screen-healthy: #34d399;
  --runtime-screen-warning: #fbbf24;
  --runtime-screen-critical: #fb7185;
  --runtime-screen-info: #60a5fa;
  color: var(--runtime-screen-text);
  border-color: rgba(148, 163, 184, 0.24);
  background-color: #0b1220;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.36);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-head > div > span,
.runtime-monitor-command-center.is-dark .runtime-monitor-flow-interval > span,
.runtime-monitor-command-center.is-dark .runtime-monitor-flow-filters > span {
  color: #9db0c8;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-toolbar {
  border-color: var(--runtime-screen-line);
  background: rgba(17, 28, 47, 0.92);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-filter {
  border-color: rgba(148, 163, 184, 0.26);
  color: var(--runtime-screen-muted);
  background: rgba(30, 41, 59, 0.84);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-filter:hover,
.runtime-monitor-command-center.is-dark .runtime-monitor-flow-filter.is-active {
  border-color: rgba(96, 165, 250, 0.62);
  color: #bfdbfe;
  background: rgba(30, 64, 101, 0.86);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-timeline-track,
.runtime-monitor-command-center.is-dark .runtime-monitor-flow-timeline-skeleton {
  border-color: rgba(148, 163, 184, 0.28);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-timeline-track::before {
  background: repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.2) 0 1px, transparent 1px 14.285%);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-timeline-point b {
  color: #9db0c8;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-canvas {
  border-color: rgba(148, 163, 184, 0.24);
  background:
    radial-gradient(circle at 50% 38%, rgba(59, 130, 246, 0.14), transparent 44%),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.1) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.1) 0 1px, transparent 1px 34px),
    #0f1a2b;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-tool,
.runtime-monitor-command-center.is-dark .runtime-monitor-flow-search {
  border-color: rgba(148, 163, 184, 0.28);
  color: #c5d2e5;
  background: rgba(17, 28, 47, 0.94);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-tool:hover,
.runtime-monitor-command-center.is-dark .runtime-monitor-flow-tool:focus-visible {
  border-color: rgba(96, 165, 250, 0.64);
  color: #dbeafe;
  background: rgba(30, 64, 101, 0.96);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-search > span,
.runtime-monitor-command-center.is-dark .runtime-monitor-flow-search input::placeholder {
  color: #8fa3bd;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node {
  border-color: rgba(148, 163, 184, 0.28);
  background: #152238;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.3);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-enterprise-node {
  --runtime-node-accent: #2dd4bf;
  --runtime-node-surface: #102b31;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-workbench-node {
  --runtime-node-accent: #60a5fa;
  --runtime-node-surface: #12233d;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-agent-node {
  --runtime-node-accent: #34d399;
  --runtime-node-surface: #102d29;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-gateway-node {
  --runtime-node-accent: #fbbf24;
  --runtime-node-surface: #302512;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-project-node {
  --runtime-node-accent: var(--runtime-project-accent, #93c5fd);
  --runtime-node-surface: #1d203b;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-container-node {
  --runtime-node-accent: #22d3ee;
  --runtime-node-surface: #102b36;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-enterprise-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-workbench-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-agent-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-gateway-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-project-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-topology-node.runtime-monitor-container-node {
  background: var(--runtime-node-surface);
  border-top-color: var(--runtime-node-accent);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node > header > .runtime-monitor-hierarchy-fact-code {
  border-color: var(--runtime-node-accent);
  color: var(--runtime-node-accent);
  background: rgba(255, 255, 255, 0.08);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-flow-node {
  color: var(--runtime-screen-text);
  background: #203454 !important;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-topology-connectors .runtime-monitor-topology-edge {
  stroke: rgba(148, 163, 184, 0.58);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-resource-chart {
  border-color: rgba(148, 163, 184, 0.22);
  background: #101b2d;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-resource-chart > div:first-child span {
  color: #9db0c8;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-resource-chart > div:first-child strong {
  color: #e5edf8;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-resource-chart > small,
.runtime-monitor-command-center.is-dark .runtime-monitor-sparkline > span {
  color: #8fa3bd;
}

.runtime-monitor-command-center.is-dark [data-runtime-resource="cpu"] .runtime-monitor-sparkline path {
  stroke: #fb7185;
}

.runtime-monitor-command-center.is-dark [data-runtime-resource="memory"] .runtime-monitor-sparkline path {
  stroke: #c4b5fd;
}

.runtime-monitor-command-center.is-dark [data-runtime-resource="network"] .runtime-monitor-sparkline path {
  stroke: #38bdf8;
}

.runtime-monitor-command-center.is-dark [data-runtime-resource="disk"] .runtime-monitor-sparkline path,
.runtime-monitor-command-center.is-dark [data-runtime-resource="io"] .runtime-monitor-sparkline path {
  stroke: #fbbf24;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-theme-toggle {
  border-color: rgba(148, 163, 184, 0.32);
  color: #fde68a;
  background: rgba(30, 41, 59, 0.94);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-theme-toggle:hover,
.runtime-monitor-command-center.is-dark .runtime-monitor-theme-toggle:focus-visible {
  border-color: rgba(251, 191, 36, 0.7);
  color: #fef3c7;
  background: rgba(91, 64, 17, 0.94);
}

@media (max-width: 720px) {
  .runtime-monitor-screen-head-actions {
    width: 100%;
  }

  .runtime-monitor-screen-head-actions .runtime-monitor-live-state {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 139, 168, 0.42) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(126, 139, 168, 0.42);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(94, 111, 151, 0.62);
}

*,
*::before,
*::after {
  min-width: 0;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
}

body {
  min-height: 100vh;
  max-width: 100vw;
  font-family: "Arial Narrow", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(222, 24, 44, 0.16) 0, transparent 220px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #0b0b0b 0%, var(--page-bg) 100%);
  background-size: auto, 84px 84px, auto;
  overflow: hidden;
}

p,
span,
strong,
small,
label,
div,
td,
th,
a,
button,
pre,
code {
  overflow-wrap: anywhere;
}

button,
input,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.admin-shell {
  height: 100vh;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(480px, 100%);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 12, 13, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-brand h1,
.sidebar-brand h2,
.admin-topbar h1,
.panel-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
}

.login-brand p,
.sidebar-brand p,
.admin-topbar p,
.action-hint,
.login-tip,
.message-line,
.topbar-status,
.summary-item-label,
.summary-item-value {
  margin: 0;
}

.login-badge,
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
}

.login-badge img,
.sidebar-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-badge.is-enterprise-logo {
  overflow: hidden;
  padding: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.sidebar-badge.is-enterprise-logo img {
  object-fit: cover;
}

.sidebar-enterprise-logo-frame,
.sidebar-enterprise-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sidebar-enterprise-logo-frame {
  overflow: hidden;
}

.sidebar-enterprise-logo-placeholder {
  color: #fff;
  font-size: 20px;
  font-weight: 760;
  background: linear-gradient(135deg, #1d4ed8, #059669);
}

.code-brand-orb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0 !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 66% 32%, rgba(244, 223, 255, 0.84) 0 15%, transparent 38%),
    radial-gradient(circle at 38% 68%, rgba(174, 211, 255, 0.9) 0 24%, transparent 45%),
    linear-gradient(145deg, #ffffff, #dde6f7) !important;
  box-shadow:
    inset 6px 8px 16px rgba(255, 255, 255, 0.82),
    inset -6px -8px 18px rgba(142, 153, 181, 0.16),
    0 9px 20px rgba(143, 162, 204, 0.18) !important;
}

.code-brand-orb-surface {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.code-brand-orb-surface::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 22%;
  height: 21%;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(145, 177, 226, 0.54), rgba(255, 255, 255, 0.16));
  transform: rotate(-10deg);
}

.code-brand-orb-glow {
  position: absolute;
  width: 42%;
  height: 42%;
  border-radius: 50%;
  opacity: 0.72;
  filter: blur(2px);
  mix-blend-mode: screen;
  transition: left 4.8s ease-in-out, top 4.8s ease-in-out, transform 4.8s ease-in-out;
  transform: translate3d(-50%, -50%, 0);
}

.code-brand-orb-glow.is-blue {
  left: var(--brand-glow-a-x, 34%);
  top: var(--brand-glow-a-y, 64%);
  background: radial-gradient(circle, rgba(171, 211, 255, 0.92) 0 20%, rgba(171, 211, 255, 0.34) 48%, transparent 72%);
  transform: translate3d(-50%, -50%, 0) translate3d(var(--brand-glow-a-dx, 0), var(--brand-glow-a-dy, 0), 0);
}

.code-brand-orb-glow.is-violet {
  left: var(--brand-glow-b-x, 66%);
  top: var(--brand-glow-b-y, 32%);
  background: radial-gradient(circle, rgba(236, 214, 255, 0.92) 0 18%, rgba(236, 214, 255, 0.36) 48%, transparent 72%);
  transform: translate3d(-50%, -50%, 0) translate3d(var(--brand-glow-b-dx, 0), var(--brand-glow-b-dy, 0), 0);
}

.code-brand-orb-glow.is-mint {
  left: var(--brand-glow-c-x, 52%);
  top: var(--brand-glow-c-y, 52%);
  background: radial-gradient(circle, rgba(176, 245, 224, 0.82) 0 18%, rgba(176, 245, 224, 0.3) 48%, transparent 74%);
  transform: translate3d(-50%, -50%, 0) translate3d(var(--brand-glow-c-dx, 0), var(--brand-glow-c-dy, 0), 0);
}

@media (prefers-reduced-motion: reduce) {
  .code-brand-orb-glow {
    transition: none;
  }
}

.login-brand {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.login-form,
.login-oauth,
.stack-form,
.action-stack {
  display: grid;
  gap: 14px;
}

.login-oauth {
  margin-bottom: 14px;
}

.login-verification {
  display: grid;
  gap: 8px;
}

.login-verify-btn {
  width: 100%;
}

.modal-card > .stack-form {
  padding: 24px;
  overflow: auto;
}

.field {
  display: grid;
  gap: 8px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 160px);
  gap: 14px;
  align-items: start;
}

.field span {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  outline: none;
}

.field select option,
.field select optgroup,
select option,
select optgroup {
  color: #111111;
  background: #ffffff;
}

.field input:focus,
.field select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(222, 24, 44, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.suggest-shell {
  position: relative;
}

.suggest-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  background: rgba(11, 11, 12, 0.98);
  box-shadow: var(--shadow);
}

.suggest-item {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.suggest-item:last-child {
  border-bottom: 0;
}

.suggest-item:hover {
  background: rgba(222, 24, 44, 0.12);
}

.segmented-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
}

.segmented-btn {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.segmented-btn + .segmented-btn {
  margin-left: -1px;
}

.segmented-btn:first-child {
  border-radius: 8px 0 0 8px;
}

.segmented-btn:last-child {
  border-radius: 0 8px 8px 0;
}

.segmented-btn.is-active {
  position: relative;
  z-index: 1;
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(143, 12, 24, 0.85) 0%, rgba(222, 24, 44, 0.85) 55%, rgba(255, 48, 72, 0.85) 100%);
}

.storage-type-segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.storage-type-segmented .segmented-btn {
  min-width: 0;
  padding: 0 10px;
}

.code-editor {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(9, 9, 10, 0.96);
  overflow: hidden;
}

.code-editor-highlight,
.code-editor-input {
  margin: 0;
  width: 100%;
  min-height: 220px;
  padding: 16px;
  font: 13px/1.6 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

.code-editor-input {
  position: relative;
  z-index: 1;
  border: 0;
  resize: vertical;
  overflow: auto;
  background: transparent;
  color: transparent;
  caret-color: #ffffff;
}

.code-editor-highlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  color: #d7dde7;
  overflow: hidden;
  background: rgba(11, 11, 12, 0.96);
}

.plain-editor {
  width: 100%;
  min-height: 520px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  resize: vertical;
  background: var(--code-input-bg, #ffffff);
  color: var(--code-text, #152033);
  outline: none;
  font: 13px/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

.plain-editor:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(222, 24, 44, 0.14);
}

.plain-editor::selection {
  background: rgba(222, 24, 44, 0.2);
}

.rules-page-toolbar {
  min-height: 54px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.rules-page-toolbar .page-toolbar-copy h2 {
  font-size: 20px;
}

.rules-admin-grid {
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: stretch;
  height: calc(100vh - 168px);
  min-height: 0;
  overflow: hidden;
}

.rules-side-column {
  grid-column: span 8;
  display: grid;
  gap: 18px;
  min-width: 0;
  min-height: 0;
}

.rules-editor-card {
  grid-column: span 16;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.rules-editor-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 249, 255, 0.72);
}

.rules-editor-tab-group {
  display: flex;
  align-items: center;
  min-width: 0;
}

.rules-editor-actions {
  flex: 0 1 300px;
  width: min(300px, 42vw);
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0;
}

.rules-search-control {
  display: flex;
  align-items: stretch;
  min-width: 0;
  flex: 1 1 220px;
}

.rules-search-control input {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(126, 139, 168, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.rules-search-input-group input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.rules-search-refresh-btn {
  width: 34px;
  min-width: 34px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(126, 139, 168, 0.24);
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.rules-search-input-group:focus-within input,
.rules-search-control input:focus {
  border-color: rgba(77, 105, 177, 0.55);
}

.rules-search-input-group:focus-within .rules-search-refresh-btn {
  border-color: rgba(77, 105, 177, 0.55);
}

.rules-search-control input:focus {
  box-shadow: 0 0 0 3px rgba(77, 105, 177, 0.12);
}

.rules-editor-tab {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.rules-editor-tab:hover {
  color: var(--text);
}

.rules-editor-tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--text);
  background: rgba(125, 149, 207, 0.08);
}

.rules-preview-pane,
.rules-source-pane {
  min-height: 0;
}

.rules-editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.rules-editor-body.is-tracing {
  grid-template-columns: minmax(0, 1fr) 200px;
}

.rules-editor-main-pane {
  display: grid;
  min-width: 0;
  min-height: 0;
}

.rules-preview-pane {
  padding: 22px 24px 34px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 13px;
  line-height: 1.62;
}

.rules-preview-pane.is-diff {
  padding: 0;
  background: rgba(248, 250, 255, 0.84);
}

.rules-diff-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 255, 0.96);
  color: var(--muted);
  font-size: 12px;
}

.rules-diff-head strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.rules-summary-head,
.rules-side-summary-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 255, 0.96);
}

.rules-side-summary {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100%;
  background: rgba(248, 250, 255, 0.72);
}

.rules-side-summary-head {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
}

.rules-side-summary-back {
  grid-row: span 2;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
}

.rules-summary-path {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.rules-summary-path span::after {
  content: "/";
  margin-left: 8px;
  color: rgba(126, 139, 168, 0.8);
}

.rules-summary-path strong {
  color: var(--text);
  font-weight: 800;
}

.rules-summary-meta {
  color: var(--muted);
  font-size: 12px;
}

.rules-ai-summary {
  padding: 22px 24px 34px;
}

.rules-side-summary-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.rules-side-summary-body .rules-ai-summary-state {
  max-width: none;
}

.rules-side-summary-body .rules-ai-summary-body h2 {
  font-size: 16px;
}

.rules-side-summary-body .rules-ai-summary-body h3,
.rules-side-summary-body .rules-ai-summary-body h4,
.rules-side-summary-body .rules-ai-summary-body h5 {
  font-size: 14px;
}

.rules-side-summary-body .rules-ai-summary-body p,
.rules-side-summary-body .rules-ai-summary-body li {
  font-size: 13px;
  line-height: 1.58;
}

.rules-side-summary-body .rules-ai-summary-body ul,
.rules-side-summary-body .rules-ai-summary-body ol {
  padding-left: 20px;
}

.rules-side-summary-body .rules-diff {
  font-size: 11px;
}

.rules-side-summary-body .rules-diff-row {
  grid-template-columns: 22px 34px minmax(0, 1fr);
}

.rules-summary-inner-tabs {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  border: 1px solid rgba(126, 139, 168, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.8);
}

.rules-summary-inner-tab {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid rgba(126, 139, 168, 0.18);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.rules-summary-inner-tab:last-child {
  border-right: 0;
}

.rules-summary-inner-tab.is-active {
  background: rgba(125, 149, 207, 0.12);
  color: var(--text);
}

.rules-project-suggestions {
  display: grid;
  gap: 10px;
}

.rules-suggestions-state,
.rules-suggestions-empty,
.rules-suggestions-note {
  color: var(--muted);
  font-size: 12px;
}

.rules-suggestions-state.is-error {
  color: #b42318;
}

.rules-suggestions-list {
  display: grid;
  gap: 8px;
}

.rules-suggestion-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(126, 139, 168, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.rules-suggestion-item input {
  margin-top: 3px;
}

.rules-suggestion-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
}

.rules-suggestion-copy span {
  color: var(--muted);
}

.rules-suggestion-copy code {
  display: block;
  padding: 6px;
  border-radius: 4px;
  background: rgba(246, 249, 255, 0.9);
  color: #243553;
  white-space: pre-wrap;
}

.rules-suggestions-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.rules-ai-summary-body {
  max-width: 920px;
}

.rules-ai-summary-state {
  display: grid;
  gap: 10px;
  max-width: 760px;
  padding: 18px;
  border: 1px solid rgba(126, 139, 168, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.rules-ai-summary-state.is-warning {
  color: #8a4d0f;
  background: rgba(255, 248, 226, 0.88);
}

.rules-diff-fallback {
  margin-top: 16px;
  border: 1px solid rgba(126, 139, 168, 0.14);
}

.rules-diff {
  display: grid;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.48;
}

.rules-diff-row {
  display: grid;
  grid-template-columns: 28px 44px minmax(0, 1fr);
  min-height: 24px;
  border-bottom: 1px solid rgba(126, 139, 168, 0.08);
}

.rules-diff-mark,
.rules-diff-line {
  padding: 3px 8px;
  color: var(--muted);
  user-select: none;
}

.rules-diff-row code {
  display: block;
  padding: 3px 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background: transparent;
  color: var(--text);
}

.rules-diff-row.is-add {
  background: rgba(59, 159, 120, 0.08);
}

.rules-diff-row.is-add .rules-diff-mark {
  color: #0f684c;
}

.rules-diff-row.is-remove {
  background: rgba(217, 75, 92, 0.08);
}

.rules-diff-row.is-remove .rules-diff-mark {
  color: #a83e51;
}

.rules-preview-pane h2,
.rules-preview-pane h3,
.rules-preview-pane h4,
.rules-preview-pane h5 {
  margin: 16px 0 8px;
  color: var(--text);
  line-height: 1.35;
}

.rules-preview-pane h2 {
  font-size: 18px;
}

.rules-preview-pane h3 {
  font-size: 16px;
}

.rules-preview-pane h4,
.rules-preview-pane h5 {
  font-size: 14px;
}

.rules-preview-pane h2:first-child,
.rules-preview-pane h3:first-child,
.rules-preview-pane h4:first-child,
.rules-preview-pane h5:first-child,
.rules-preview-pane p:first-child,
.rules-preview-pane ul:first-child,
.rules-preview-pane ol:first-child,
.rules-preview-pane pre:first-child {
  margin-top: 0;
}

.rules-preview-pane p,
.rules-preview-pane ul,
.rules-preview-pane ol,
.rules-preview-pane pre {
  margin: 0 0 12px;
}

.rules-preview-pane ul,
.rules-preview-pane ol {
  padding-left: 22px;
}

.rules-preview-pane li {
  margin: 4px 0;
}

.rules-preview-pane code {
  padding: 2px 5px;
  background: rgba(125, 149, 207, 0.12);
  color: #243553;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.rules-preview-pane pre {
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(126, 139, 168, 0.18);
  background: rgba(246, 249, 255, 0.82);
}

.rules-preview-pane pre code {
  padding: 0;
  background: transparent;
}

.rules-search-hit {
  padding: 1px 2px;
  border-radius: 4px;
  background: #ffe58a;
  color: #2f2a12;
}

.rules-source-pane {
  display: grid;
  margin: 0;
}

.rules-plain-editor {
  min-height: 0;
  height: 100%;
  resize: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.rules-codex-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(246, 249, 255, 0.88);
}

.rules-codex-input {
  min-height: 44px;
  max-height: 112px;
  resize: vertical;
}

.rules-codex-form .primary {
  min-height: 36px;
  white-space: nowrap;
}

.rules-codex-trace-pane {
  min-width: 200px;
  width: 200px;
  min-height: 0;
  overflow: auto;
  padding: 8px 6px;
  border-left: 1px solid var(--line);
  background: rgba(248, 250, 255, 0.92);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.rules-codex-trace-line {
  padding: 5px 0;
  border-bottom: 1px solid rgba(126, 139, 168, 0.12);
  overflow-wrap: anywhere;
}

.rules-codex-trace-line.is-error {
  color: #b3263a;
}

.rules-codex-trace-line.is-success {
  color: #0f684c;
}

.rules-enterprise-card .table-shell {
  max-height: none;
  height: 100%;
  overflow: auto;
  border: 0;
  background: transparent;
}

.rules-enterprise-accordion {
  display: grid;
  gap: 0;
  border: 1px solid rgba(126, 139, 168, 0.2);
  background: rgba(255, 255, 255, 0.58);
}

.rules-enterprise-panel {
  border: 0;
  border-bottom: 1px solid rgba(126, 139, 168, 0.16);
  background: transparent;
  box-shadow: none;
  transition: background 0.16s ease;
}

.rules-enterprise-panel:last-child {
  border-bottom: 0;
}

.rules-enterprise-panel.is-open {
  background: rgba(239, 246, 255, 0.74);
  box-shadow: inset 3px 0 0 rgba(125, 149, 207, 0.78);
}

.rules-enterprise-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  border-radius: 0;
  box-shadow: none;
  user-select: none;
}

.rules-enterprise-option:focus-visible {
  outline: 2px solid rgba(125, 149, 207, 0.42);
  outline-offset: -2px;
  box-shadow: none;
}

.rules-enterprise-panel:not(.is-open) .rules-enterprise-option:hover {
  background: rgba(125, 149, 207, 0.06);
}

.rules-enterprise-option:hover strong {
  color: var(--accent);
}

.rules-enterprise-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rules-enterprise-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 42px;
  color: var(--muted);
  font-size: 12px;
}

.rules-enterprise-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-accent-bg, rgba(222, 24, 44, 0.1));
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  object-fit: cover;
}

.rules-enterprise-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rules-enterprise-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.rules-enterprise-copy span {
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-enterprise-project-panel {
  border-top: 1px solid rgba(125, 149, 207, 0.2);
  background: rgba(246, 249, 255, 0.52);
}

.rules-project-inline-shell {
  padding: 10px 14px 14px;
  overflow-x: auto;
}

.rules-project-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(126, 139, 168, 0.14);
}

.rules-project-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(126, 139, 168, 0.12);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.rules-project-item:last-child {
  border-bottom: 0;
}

.rules-project-item:hover,
.rules-project-item.is-selected {
  background: rgba(239, 246, 255, 0.88);
}

.rules-project-item:focus-visible {
  outline: 2px solid rgba(125, 149, 207, 0.42);
  outline-offset: -2px;
}

.rules-project-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rules-project-name strong,
.rules-project-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-project-name strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.rules-project-name span {
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
}

.rules-project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.rules-project-item.is-empty {
  color: var(--muted);
}

.rules-project-skeleton-item .admin-skeleton-line {
  height: 10px;
}

.code-editor-input::selection {
  background: rgba(222, 24, 44, 0.28);
}

.code-editor-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.code-editor-input::-webkit-scrollbar,
.code-editor-highlight::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.code-editor-input::-webkit-scrollbar-thumb,
.code-editor-highlight::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
}

.code-token-key {
  color: #7dd3fc;
}

.code-token-string {
  color: #86efac;
}

.code-token-number {
  color: #fbbf24;
}

.code-token-boolean {
  color: #f472b6;
}

.code-token-comment {
  color: #94a3b8;
}

.code-token-punct {
  color: #e2e8f0;
}

button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 120ms ease, opacity 120ms ease, border-color 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

button.is-pending {
  opacity: 0.78;
  cursor: progress;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(222, 24, 44, 0.18);
}

.primary,
.danger {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px rgba(222, 24, 44, 0.18);
}

.primary {
  background: linear-gradient(135deg, #8f0c18 0%, var(--accent) 50%, var(--accent-strong) 100%);
}

.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.danger {
  background: linear-gradient(135deg, #76111b 0%, #b71428 48%, #ff4d5f 100%);
}

.small {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 0;
  font-size: 13px;
}

.message-line {
  min-height: 20px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.message-line.is-error {
  color: var(--danger);
}

.message-line.is-success {
  color: var(--success);
}

.modal-message {
  margin-top: 0;
}

.login-tip {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 77, 95, 0.14);
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.field-hint {
  min-height: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.field-hint.is-error {
  color: var(--danger);
}

.field-hint.is-success {
  color: var(--success);
}

.field-hint.is-info {
  color: var(--muted);
}

.admin-toast-region {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}

.admin-current-version-badge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  max-width: min(220px, calc(100vw - 28px));
  color: #9aa4b5;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  user-select: none;
}

.admin-toast {
  pointer-events: auto;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: rgba(16, 24, 40, 0.96);
  color: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  line-height: 1.45;
  font-size: 13px;
  cursor: pointer;
  animation: admin-toast-in 160ms ease-out;
}

.admin-toast.is-success {
  border-color: rgba(75, 211, 154, 0.45);
}

.admin-toast.is-info {
  border-color: rgba(99, 179, 237, 0.45);
}

.admin-toast.is-warning {
  border-color: rgba(245, 158, 11, 0.55);
}

.admin-toast.is-error {
  border-color: rgba(255, 77, 95, 0.68);
}

.admin-toast.is-leaving {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-static-update-notice {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(21, 28, 43, 0.28);
  backdrop-filter: blur(5px);
}

.admin-static-update-card {
  width: min(460px, calc(100vw - 40px));
  border: 1px solid rgba(224, 231, 245, 0.94);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 72px rgba(30, 42, 68, 0.26), 0 8px 24px rgba(30, 42, 68, 0.14);
}

.admin-static-update-card .modal-head {
  padding: 22px 24px 18px;
  align-items: center;
}

.admin-static-update-card .modal-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-static-update-version {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.admin-static-update-close.modal-close-icon-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-color: rgba(126, 139, 168, 0.24);
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  font-size: 20px;
  box-shadow: none;
}

.admin-static-update-close.modal-close-icon-btn:hover {
  border-color: rgba(126, 139, 168, 0.38);
  background: rgba(241, 245, 249, 0.92);
  color: var(--text);
}

.admin-static-update-body p,
.admin-static-update-list {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-static-update-body {
  padding: 18px 24px 10px;
}

.admin-static-update-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.admin-static-update-list li {
  padding-left: 2px;
}

.admin-static-update-card .modal-actions {
  padding: 12px 18px 18px 24px;
  justify-content: flex-end;
}

.admin-static-update-notice button {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 6px;
}

@keyframes admin-toast-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.admin-app {
  height: 100vh;
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  max-width: 100vw;
  overflow: hidden;
}

.admin-content-shell {
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.admin-global-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

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

.admin-global-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sidebar-brand h2 {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
}

.admin-dev-badge {
  position: absolute;
  left: calc(100% + 6px);
  top: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ffcf33;
  color: #1c1a12;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(120, 89, 0, 0.16);
}

.admin-global-copy strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.admin-global-copy span {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.admin-global-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.admin-global-account {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-global-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.enterprise-extension-download-link.is-pending {
  cursor: progress;
  opacity: 0.78;
  pointer-events: none;
}

.enterprise-extension-download-link.is-pending::before {
  width: 13px;
  height: 13px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: admin-enterprise-extension-download-spin 700ms linear infinite;
}

@keyframes admin-enterprise-extension-download-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .enterprise-extension-download-link.is-pending::before {
    animation-duration: 1400ms;
  }
}

.admin-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  flex: 0 0 auto;
}

.admin-icon-action svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.data-table-primary-link {
  justify-content: flex-start;
  color: var(--text);
  font-weight: 700;
}

.data-table-primary-link:hover {
  color: var(--accent-strong);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px 20px;
  background:
    radial-gradient(circle at top left, rgba(222, 24, 44, 0.18) 0, transparent 170px),
    linear-gradient(180deg, rgba(9, 9, 10, 0.985), rgba(20, 10, 12, 0.98));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.sidebar-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 36px rgba(0, 0, 0, 0.26);
}

.sidebar-brand > div:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.sidebar-brand h2 {
  font-size: 22px;
  line-height: 1.05;
}

.sidebar-brand p {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.menu-nav {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  padding: 4px 12px 4px 0;
  scrollbar-gutter: stable;
}

.menu-nav::before {
  display: none;
}

.menu-group {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.menu-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  box-shadow: none;
  text-align: left;
}

.menu-group-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.menu-group-label {
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.4;
}

.menu-group-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 140ms ease;
}

.menu-group-toggle[aria-expanded="false"] .menu-group-chevron {
  transform: rotate(-90deg);
}

.menu-group-items {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 3px 0 2px 14px;
}

.menu-group-items[hidden] {
  display: none;
}

.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 54px;
  padding: 0 16px 0 36px;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  transition:
    transform 140ms ease,
    color 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.menu-item::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-50%);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.03);
}

.menu-item::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.menu-item:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.menu-item:hover::before,
.menu-item:focus-visible::before {
  background: rgba(255, 255, 255, 0.9);
}

.menu-item.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(222, 24, 44, 0.22), rgba(222, 24, 44, 0.08) 62%, rgba(255, 255, 255, 0.05) 100%);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 34px var(--sidebar-glow);
}

.menu-item.is-active::before {
  width: 10px;
  height: 10px;
  background: #fff;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.05);
}

.menu-item.is-active::after {
  background: linear-gradient(180deg, #ff8b97 0, var(--accent) 100%);
  box-shadow: 0 0 18px rgba(255, 48, 72, 0.35);
}

.sidebar-logout {
  width: 100%;
  min-height: 48px;
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar-badge {
  min-width: 56px;
  width: 56px;
  height: 56px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(17, 17, 18, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 32px rgba(0, 0, 0, 0.3);
}

.sidebar-badge img {
  object-fit: contain;
}

.admin-main {
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  padding: 24px 24px 24px;
  display: grid;
  gap: 26px;
  justify-items: stretch;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.content-view {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
}

.content-grid {
  display: grid;
  gap: 18px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
}

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

.page-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(12, 12, 13, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.page-toolbar-copy {
  display: grid;
  gap: 8px;
}

.admin-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-breadcrumb a,
.admin-breadcrumb span {
  color: inherit;
  text-decoration: none;
}

.admin-breadcrumb a:hover {
  color: var(--text);
}

.page-toolbar-copy h2,
.modal-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.enterprise-detail-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.enterprise-detail-title-icon {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.enterprise-edit-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  flex: 0 0 auto;
}

.enterprise-edit-trigger svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.enterprise-icon-cell {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.enterprise-icon-thumb,
.enterprise-icon-preview {
  display: block;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.enterprise-icon-preview {
  width: 64px;
  height: 64px;
}

.enterprise-icon-placeholder {
  color: var(--muted);
  font-size: 13px;
}

.admin-enterprise-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  vertical-align: middle;
}

.admin-enterprise-name-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 22px;
}

.admin-enterprise-name-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.enterprise-icon-editor {
  display: grid;
  gap: 10px;
}

.enterprise-icon-preview-shell {
  display: flex;
  align-items: center;
  min-height: 64px;
}

.enterprise-icon-upload-zone {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.enterprise-icon-upload-zone:hover,
.enterprise-icon-upload-zone:focus-visible,
.enterprise-icon-upload-zone.is-drag-over {
  border-color: var(--accent, #de182c);
  background: rgba(222, 24, 44, 0.06);
  box-shadow: 0 0 0 3px rgba(222, 24, 44, 0.12);
  outline: none;
}

.enterprise-icon-upload-copy {
  display: grid;
  gap: 6px;
}

.enterprise-icon-upload-copy strong {
  font-size: 14px;
  line-height: 1.5;
}

.enterprise-icon-upload-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.enterprise-domain-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.enterprise-domain-text {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-https-action {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.enterprise-https-action.is-installed {
  border-color: rgba(59, 159, 120, 0.42);
  color: var(--success);
}

.enterprise-certificate-modal-card {
  width: min(560px, calc(100vw - 48px));
}

.certificate-domain-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.certificate-domain-row span {
  color: var(--muted);
  font-size: 13px;
}

.certificate-domain-row strong {
  font-size: 14px;
}

.enterprise-certificate-upload-zone {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 132px;
}

.enterprise-certificate-upload-zone > input[type="file"] {
  display: none !important;
}

.enterprise-certificate-upload-zone > .hint {
  grid-column: 1 / -1;
  min-width: 0;
}

.page-toolbar-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.page-toolbar-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  background: rgba(222, 24, 44, 0.16);
  border: 1px solid rgba(222, 24, 44, 0.45);
  color: #ffd9de;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-toolbar-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.page-toolbar-search-group {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.page-toolbar-button-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.enterprise-extension-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  align-self: flex-end;
}

.enterprise-extension-meta-global {
  position: static;
  flex: 0 0 auto;
  align-self: center;
  flex-wrap: nowrap;
  padding: 0;
  border: 0;
  background: transparent;
}

.enterprise-extension-info {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 0;
}

.enterprise-extension-version {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.enterprise-extension-workbench {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  max-width: min(360px, 52vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-search {
  min-width: 260px;
  display: grid;
  gap: 6px;
}

.toolbar-search span {
  color: var(--muted);
  font-size: 12px;
}

.toolbar-filter-group {
  min-width: min(420px, 100%);
  display: grid;
  gap: 6px;
}

.toolbar-filter-group > span {
  color: var(--muted);
  font-size: 12px;
}

.toolbar-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.toolbar-filter-button {
  min-height: 34px;
  max-width: 180px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-filter-button:hover,
.toolbar-filter-button:focus-visible,
.toolbar-filter-button.is-active {
  border-color: var(--line-strong);
  background: rgba(222, 24, 44, 0.14);
  color: var(--text);
}

.toolbar-search input,
.toolbar-search select {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

.toolbar-search input:focus,
.toolbar-search select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(222, 24, 44, 0.14);
}

.token-list-toolbar {
  align-items: flex-end;
}

.token-list-toolbar .page-toolbar-actions {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.token-list-toolbar .page-toolbar-search-group {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.token-list-toolbar .toolbar-search {
  flex: 0 0 min(320px, 28vw);
}

.token-list-toolbar .toolbar-filter-group {
  flex: 1 1 auto;
  min-width: 220px;
}

.token-list-toolbar .toolbar-filter-buttons {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.token-list-toolbar .toolbar-filter-button {
  flex: 0 0 auto;
}

.token-list-toolbar .page-toolbar-button-group {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.checkbox-field {
  gap: 10px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.permission-editor-grid {
  margin-top: 16px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.checkbox-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.admin-user-modal-card {
  width: min(880px, calc(100vw - 40px));
}

.admin-permission-modal-card {
  width: min(980px, calc(100vw - 40px));
}

.admin-permission-modal-body {
  display: grid;
  gap: 18px;
  min-height: 0;
  padding: 20px 24px 0;
  overflow: auto;
}

.admin-permission-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 0;
  padding: 0 0 12px;
  background: var(--card-bg);
}

.admin-permission-panel {
  display: grid;
  gap: 16px;
  min-height: 260px;
  align-content: start;
}

.admin-permission-panel .permission-editor-grid,
.admin-permission-panel .permission-detail-list {
  margin-top: 0;
}

.admin-permission-modal-actions {
  padding: 16px 24px 24px;
}

.admin-enterprise-grid {
  max-height: 240px;
  overflow: auto;
}

.empty-state.compact {
  min-height: auto;
  padding: 10px 0;
  font-size: 13px;
}

.two-columns {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.system-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
}

.admin-system-tabs {
  margin-bottom: 16px;
}

.system-tab-panel.hidden {
  display: none;
}

.system-tab-panel {
  min-width: 0;
  width: 100%;
  justify-self: stretch;
}

.system-model-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: start;
}

.overview-content-view {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  min-height: 0;
  width: 100%;
  justify-self: stretch;
}

.overview-content-view > .page-toolbar {
  grid-row: 1;
}

.overview-content-view > .admin-insight-strip {
  grid-row: 2;
}

.overview-content-view > #overviewActionHint {
  grid-row: 3;
}

.overview-content-view > .overview-grid {
  grid-row: 4;
}

.overview-content-view > .global-message {
  grid-row: 5;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  min-height: 0;
  width: 100%;
  overflow: visible;
  padding-bottom: 4px;
}

.overview-column {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

.panel-card.overview-card {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  min-height: 230px;
  padding: 16px;
}

.overview-card-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.overview-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(180px, 0.92fr);
  align-items: start;
  gap: 14px;
  min-height: 0;
}

.overview-trend-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}

.overview-trend-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.overview-chart {
  display: grid;
  gap: 6px;
  min-height: 0;
  color: var(--accent);
}

.overview-chart svg {
  width: 100%;
  height: 146px;
  overflow: visible;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(248, 250, 252, 0.12));
}

.overview-chart-stage {
  position: relative;
  width: 100%;
  height: 146px;
  min-width: 0;
  overflow: visible;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(248, 250, 252, 0.12));
}

.overview-chart-stage > svg {
  position: absolute;
  inset: 0;
  height: 100%;
  background: transparent;
}

.overview-chart-grid-line {
  stroke: rgba(108, 119, 138, 0.24);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.overview-chart-axis-label {
  fill: rgba(92, 102, 122, 0.76);
  font-size: 10px;
  font-weight: 700;
}

.overview-chart-x-label {
  fill: rgba(92, 102, 122, 0.66);
}

.overview-chart-axis-layer,
.overview-chart-tooltip-layer {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.overview-chart-tooltip-layer {
  z-index: 3;
}

.overview-chart-axis-layer {
  z-index: 2;
}

.overview-chart-axis-layer .overview-chart-axis-label {
  position: absolute;
  color: rgba(92, 102, 122, 0.72);
  fill: currentColor;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.overview-chart-axis-layer .overview-chart-y-label {
  transform: translate(-100%, -50%);
  text-align: right;
}

.overview-chart-axis-layer .overview-chart-x-label {
  color: rgba(92, 102, 122, 0.66);
  transform: translate(-50%, -50%);
}

.overview-chart-axis-layer .overview-chart-x-label.is-start {
  transform: translate(0, -50%);
}

.overview-chart-axis-layer .overview-chart-x-label.is-end {
  transform: translate(-100%, -50%);
}

.overview-chart-area {
  color: var(--accent);
}

.overview-chart-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
  filter: drop-shadow(0 3px 6px rgba(92, 111, 160, 0.16));
}

.overview-chart-series-line {
  transition: opacity 120ms ease, stroke-width 120ms ease;
}

.overview-chart-series-line:hover {
  opacity: 1;
  stroke-width: 3.2;
}

.overview-chart-marker-line {
  stroke: rgba(108, 119, 138, 0.34);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.overview-chart-points circle {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 2;
}

.overview-chart-points circle.is-zero {
  fill: currentColor;
  stroke: #fff;
  stroke-width: 1.6;
  opacity: 0.46;
}

.overview-chart-highlight {
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 2.6;
  filter: drop-shadow(0 2px 4px rgba(222, 24, 44, 0.22));
}

.overview-chart-tooltip-layer {
  pointer-events: all;
}

.overview-chart-html-tip-target {
  position: absolute;
  top: 0;
  bottom: 0;
  cursor: crosshair;
  overflow: visible;
  pointer-events: auto;
}

.overview-chart-hover-line-html {
  position: absolute;
  top: var(--overview-guide-top);
  left: var(--overview-guide-left);
  width: 0;
  height: var(--overview-guide-height);
  border-left: 1px dashed rgba(108, 119, 138, 0.48);
  opacity: 0;
  transform: translateX(-0.5px);
  transition: opacity 120ms ease;
}

.overview-chart-tooltip-card {
  position: absolute;
  top: var(--overview-tooltip-top);
  left: var(--overview-tooltip-left);
  display: grid;
  gap: 6px;
  width: var(--overview-tooltip-width);
  padding: 10px 12px;
  border: 1px solid rgba(126, 139, 168, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);
  color: #111827;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 120ms ease;
}

.overview-chart-html-tip-target.is-left-edge .overview-chart-tooltip-card {
  transform: translateX(0);
}

.overview-chart-html-tip-target.is-right-edge .overview-chart-tooltip-card {
  transform: translateX(-100%);
}

.overview-chart-tooltip-card .overview-chart-tooltip-title {
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.overview-chart-tooltip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.overview-chart-tooltip-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: rgba(92, 102, 122, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-chart-tooltip-row i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--overview-series-color);
}

.overview-chart-tooltip-row strong {
  color: var(--overview-series-color);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.overview-chart-html-tip-target:hover .overview-chart-hover-line-html,
.overview-chart-html-tip-target:hover .overview-chart-tooltip-card {
  opacity: 1;
}

.overview-chart-hit-zone {
  fill: transparent;
  cursor: crosshair;
}

.overview-chart-hover-line,
.overview-chart-hover-point,
.overview-chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.overview-chart-hover-line {
  stroke: rgba(108, 119, 138, 0.48);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.overview-chart-hover-point {
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 2.4;
  filter: drop-shadow(0 2px 4px rgba(222, 24, 44, 0.24));
}

.overview-chart-tooltip rect {
  fill: #ffffff;
  stroke: rgba(126, 139, 168, 0.28);
  stroke-width: 1;
  filter: drop-shadow(0 10px 22px rgba(15, 23, 42, 0.2));
}

.overview-chart-tooltip text {
  letter-spacing: 0;
}

.overview-chart-tooltip-title {
  fill: #111827;
  font-size: 12px;
  font-weight: 800;
}

.overview-chart-tooltip-label {
  fill: rgba(92, 102, 122, 0.78);
  font-size: 11px;
  font-weight: 700;
}

.overview-chart-tooltip-value {
  fill: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.overview-chart-tip-target:hover .overview-chart-hover-line,
.overview-chart-tip-target:hover .overview-chart-hover-point,
.overview-chart-tip-target:hover .overview-chart-tooltip {
  opacity: 1;
}

.overview-chart-summary,
.overview-chart-empty {
  color: var(--muted);
  font-size: 12px;
}

.overview-chart-empty {
  display: grid;
  place-items: center;
  min-height: 146px;
  background:
    repeating-linear-gradient(0deg, rgba(108, 119, 138, 0.16) 0 1px, transparent 1px 34px),
    rgba(255, 255, 255, 0.28);
}

.overview-range-control {
  min-width: 150px;
}

.overview-range-menu {
  position: relative;
  overflow: visible;
}

.overview-range-menu .toolbar-select-dropdown {
  left: 0;
  right: auto;
  width: 100%;
  min-width: 150px;
}

.runtime-monitor-range-control {
  min-width: 150px;
}

.runtime-monitor-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
}

.runtime-monitor-summary-item {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 16px 18px;
}

.runtime-monitor-summary-item > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.runtime-monitor-summary-item .summary-item-value {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.05;
}

.runtime-monitor-summary-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.runtime-monitor-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(360px, 5fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  height: 600px;
  margin-bottom: 18px;
}

.runtime-monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
  width: 100%;
}

.runtime-monitor-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  width: 100%;
}

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

.runtime-monitor-chart {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.runtime-monitor-chart-plot {
  position: relative;
  min-height: 260px;
  overflow: visible;
}

.runtime-monitor-chart svg {
  width: 100%;
  height: 260px;
  display: block;
  pointer-events: none;
  overflow: visible;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(248, 250, 252, 0.12));
}

#gatewayHealthTable {
  border: 0;
  background: transparent;
}

#gatewayHealthTable .runtime-monitor-chart svg {
  background: transparent;
}

.runtime-monitor-chart-grid-line {
  stroke: rgba(108, 119, 138, 0.24);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.runtime-monitor-chart-axis-label {
  fill: rgba(92, 102, 122, 0.76);
  font-size: 10px;
  font-weight: 700;
}

.runtime-monitor-chart-x-label {
  fill: rgba(92, 102, 122, 0.66);
}

.runtime-monitor-chart-area {
  fill: rgba(222, 24, 44, 0.12);
}

.runtime-monitor-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.runtime-monitor-chart-line.is-requests {
  stroke: var(--accent);
  stroke-width: 3;
  filter: drop-shadow(0 3px 6px rgba(222, 24, 44, 0.14));
}

.runtime-monitor-chart-line.is-errors {
  stroke: rgba(71, 85, 105, 0.82);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.runtime-monitor-chart-points circle {
  fill: #fff;
  stroke: var(--accent);
  stroke-width: 2;
}

.runtime-monitor-chart-hit-zone {
  fill: transparent;
  cursor: crosshair;
}

.runtime-monitor-chart-hover-line,
.runtime-monitor-chart-hover-point,
.runtime-monitor-chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.runtime-monitor-chart-hover-line {
  stroke: rgba(108, 119, 138, 0.48);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.runtime-monitor-chart-hover-point {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 2.4;
}

.runtime-monitor-chart-tooltip rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(126, 139, 168, 0.24);
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.18));
}

.runtime-monitor-chart-tooltip text {
  letter-spacing: 0;
}

.runtime-monitor-chart-tooltip-title {
  fill: #111827;
  font-size: 12px;
  font-weight: 800;
}

.runtime-monitor-chart-tooltip-label {
  fill: rgba(92, 102, 122, 0.78);
  font-size: 11px;
  font-weight: 700;
}

.runtime-monitor-chart-tooltip-value {
  fill: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.runtime-monitor-chart-tooltip-value.is-secondary {
  fill: #475569;
}

.runtime-monitor-chart-tip-target:hover .runtime-monitor-chart-hover-line,
.runtime-monitor-chart-tip-target:hover .runtime-monitor-chart-hover-point,
.runtime-monitor-chart-tip-target:hover .runtime-monitor-chart-tooltip {
  opacity: 1;
}

.runtime-monitor-chart-axis-labels {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  z-index: 2;
  height: 16px;
  pointer-events: none;
}

.runtime-monitor-chart-axis-labels span {
  position: absolute;
  top: 0;
  color: rgba(92, 102, 122, 0.66);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.runtime-monitor-chart-axis-labels span.is-start {
  transform: none;
}

.runtime-monitor-chart-axis-labels span.is-end {
  transform: translateX(-100%);
}

.runtime-monitor-chart-html-target {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 28px;
  cursor: crosshair;
  transform: translateX(-50%);
}

.runtime-monitor-chart-html-target::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 54px;
  left: 50%;
  width: 0;
  border-left: 1px dashed rgba(108, 119, 138, 0.48);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 120ms ease;
}

.runtime-monitor-chart-html-tooltip {
  position: absolute;
  top: var(--tip-top);
  left: 50%;
  z-index: 5;
  width: 190px;
  padding: 10px 12px;
  border: 1px solid rgba(126, 139, 168, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.runtime-monitor-chart-html-target.is-left-edge .runtime-monitor-chart-html-tooltip {
  left: 0;
  transform: translateY(-4px);
}

.runtime-monitor-chart-html-target.is-right-edge .runtime-monitor-chart-html-tooltip {
  right: 0;
  left: auto;
  transform: translateY(-4px);
}

.runtime-monitor-chart-tooltip-head {
  margin-bottom: 8px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.runtime-monitor-chart-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  color: rgba(92, 102, 122, 0.78);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.runtime-monitor-chart-tooltip-row strong {
  min-width: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.runtime-monitor-chart-tooltip-row strong.is-secondary {
  color: #475569;
}

.runtime-monitor-chart-tooltip-row strong.is-token {
  color: #2563eb;
}

.runtime-monitor-chart-html-target:hover::before,
.runtime-monitor-chart-html-target:hover .runtime-monitor-chart-html-tooltip {
  opacity: 1;
}

.runtime-monitor-chart-html-target:hover .runtime-monitor-chart-html-tooltip {
  transform: translate(-50%, 0);
}

.runtime-monitor-chart-html-target.is-left-edge:hover .runtime-monitor-chart-html-tooltip,
.runtime-monitor-chart-html-target.is-right-edge:hover .runtime-monitor-chart-html-tooltip {
  transform: translateY(0);
}

.runtime-monitor-chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-shell {
  --radius: 8px;
  --radius-sm: 4px;
}

.admin-shell button,
.admin-shell input,
.admin-shell select,
.admin-shell textarea,
.admin-shell .page-toolbar,
.admin-shell .panel-card,
.admin-shell .table-shell,
.admin-shell .summary-item,
.admin-shell .admin-insight-item,
.admin-shell .admin-audit-note,
.admin-shell .empty-state,
.admin-shell .checkbox-grid,
.admin-shell .toolbar-filter-button,
.admin-shell .token-provider-marker,
.admin-shell .plain-editor,
.admin-shell .code-editor,
.admin-shell .admin-code-block,
.admin-shell .enterprise-icon-upload-zone,
.admin-shell .certificate-domain-row {
  border-radius: var(--radius);
}

.modal-card,
.token-modal-card,
.gitlab-modal-card,
.workbench-origin-modal-card,
.enterprise-certificate-modal-card,
.admin-user-modal-card,
.admin-permission-modal-card {
  border-radius: var(--radius);
}

.admin-shell .segmented-btn {
  border-radius: 0;
}

.admin-shell .segmented-btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.admin-shell .segmented-btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.admin-shell .chip,
.admin-shell .token-provider-marker-count,
.admin-shell .runtime-monitor-chart-legend i,
.admin-shell .overview-top-bar,
.admin-shell .overview-top-bar i,
.admin-shell .workbench-update-channel-switch,
.admin-shell .workbench-update-channel-thumb {
  border-radius: 999px;
}

.admin-shell .sidebar-badge,
.admin-shell .login-badge,
.admin-shell .rules-enterprise-avatar,
.admin-shell .workbench-user-avatar {
  border-radius: 50%;
}

.admin-insight-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  align-items: stretch;
}

.admin-insight-item {
  height: 116px;
  min-height: 116px;
  max-height: 116px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(142, 153, 181, 0.12);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: space-between;
  gap: 8px;
  overflow: hidden;
}

.admin-insight-item.is-success {
  border-color: rgba(59, 159, 120, 0.32);
  background: rgba(237, 252, 246, 0.86);
}

.admin-insight-item.is-warning {
  border-color: rgba(217, 151, 42, 0.34);
  background: rgba(255, 248, 232, 0.88);
}

.admin-insight-item.is-danger {
  border-color: rgba(217, 75, 92, 0.38);
  background: rgba(255, 239, 241, 0.9);
}

.admin-insight-item.is-disabled {
  background: rgba(239, 242, 247, 0.86);
}

.admin-insight-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-insight-value {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  align-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-insight-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chip.danger {
  color: #fff;
  border-color: rgba(217, 75, 92, 0.44);
  background: var(--danger);
}

.admin-audit-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-audit-note strong {
  color: var(--text);
}

@media (max-width: 1100px) {
  .admin-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .admin-insight-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-card-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Current topology: each project and its Docker containers share one row. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: grid !important;
    gap: 24px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: block !important;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-projects {
    display: grid !important;
    grid-template-columns: 120px max-content !important;
    gap: 12px;
    align-items: start;
    min-height: var(--runtime-topology-port-y);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: none !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    display: flex !important;
    flex-flow: row nowrap;
    align-items: start;
    gap: 20px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    position: relative;
    display: grid !important;
    grid-template-columns: var(--runtime-topology-node-width) max-content !important;
    grid-template-rows: auto;
    align-items: start;
    gap: var(--runtime-topology-link-gap);
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after {
    content: "";
    position: absolute;
    top: var(--runtime-topology-port-y);
    right: calc(-1 * var(--runtime-topology-link-gap));
    display: block;
    width: var(--runtime-topology-link-gap);
    height: 1px;
    background: rgba(72, 105, 167, 0.66);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    position: relative;
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-flow: row nowrap;
    align-items: start;
    gap: 14px;
    width: max-content;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::before {
    content: "";
    position: absolute;
    top: var(--runtime-topology-port-y);
    right: 0;
    left: 0;
    z-index: 0;
    display: block;
    height: 1px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node {
    position: relative;
    z-index: 1;
    flex: 0 0 var(--runtime-topology-node-width);
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: none !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: grid !important;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::before {
    display: none !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    min-width: 0;
  }
}

/* Batch 80: give enterprise certificate and filing controls a compact status rail. */
#enterpriseList .enterprise-domain-cell {
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
  align-items: center;
}

#enterpriseList .enterprise-domain-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  color: #34415d;
  font-weight: 750;
}

#enterpriseList .enterprise-domain-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-content: center;
  justify-items: stretch;
  width: 104px;
  padding-left: 10px;
  border-left: 1px solid rgba(126, 139, 168, 0.16);
}

#enterpriseList .enterprise-https-action,
#enterpriseList .enterprise-filing-action {
  box-sizing: border-box;
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  min-height: 30px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 11px;
  line-height: 1;
}

#enterpriseList .enterprise-https-action.is-installed,
#enterpriseList .enterprise-filing-action.is-configured {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(59, 159, 120, 0.12);
}

.enterprise-certificate-modal-card {
  width: min(640px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  border: 1px solid rgba(139, 159, 207, 0.34);
  border-radius: 12px;
  background: var(--surface-strong);
  box-shadow: 0 24px 70px rgba(76, 93, 133, 0.24), var(--shadow-soft);
}

.enterprise-certificate-modal-card > .modal-head {
  padding: 20px 24px 16px;
  background: rgba(248, 250, 255, 0.96);
  border-bottom: 1px solid rgba(126, 139, 168, 0.16);
}

.enterprise-certificate-modal-card > .modal-head h2 {
  color: #303743;
  font-size: 20px;
  line-height: 1.3;
}

.enterprise-certificate-modal-card > .stack-form {
  box-sizing: border-box;
  gap: 16px;
  padding: 20px 24px 24px;
  background: var(--surface-strong);
}

.enterprise-certificate-modal-card .certificate-domain-row {
  min-height: 44px;
  padding: 10px 14px;
  border-color: rgba(126, 139, 168, 0.2);
  border-radius: 8px;
  background: var(--field-bg);
}

.enterprise-certificate-modal-card .certificate-domain-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.enterprise-certificate-modal-card .enterprise-certificate-upload-zone {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  gap: 12px 16px;
  padding: 16px;
  border-color: rgba(126, 149, 207, 0.42);
  border-radius: 10px;
  background: rgba(247, 249, 255, 0.8);
}

.enterprise-certificate-modal-card .enterprise-certificate-upload-zone:hover,
.enterprise-certificate-modal-card .enterprise-certificate-upload-zone:focus-visible,
.enterprise-certificate-modal-card .enterprise-certificate-upload-zone.is-drag-over {
  border-color: rgba(111, 143, 220, 0.72);
  background: rgba(239, 244, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.12);
}

.enterprise-certificate-modal-card .enterprise-icon-upload-copy {
  min-width: 0;
  gap: 4px;
}

.enterprise-certificate-modal-card .enterprise-icon-upload-copy strong {
  color: #303743;
  font-size: 13px;
  line-height: 1.45;
}

.enterprise-certificate-modal-card .enterprise-icon-upload-copy p {
  color: #7a879d;
  font-size: 12px;
  line-height: 1.5;
}

.enterprise-certificate-modal-card #chooseEnterpriseCertificateBtn {
  min-width: 116px;
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 750;
}

.enterprise-certificate-modal-card .enterprise-certificate-upload-zone > .hint {
  padding-top: 2px;
  color: #7a879d;
  font-size: 12px;
}

.enterprise-certificate-modal-card .enterprise-filing-panel {
  gap: 12px;
  padding: 18px;
  border-color: rgba(126, 139, 168, 0.2);
  border-radius: 10px;
  background: rgba(246, 249, 255, 0.78);
}

.enterprise-certificate-modal-card .enterprise-filing-head {
  gap: 5px;
  padding-bottom: 2px;
}

.enterprise-certificate-modal-card .enterprise-filing-head h3 {
  color: #303743;
  font-size: 16px;
  font-weight: 850;
}

.enterprise-certificate-modal-card .enterprise-filing-head p {
  max-width: 52ch;
  color: #7a879d;
  font-size: 12px;
  line-height: 1.55;
}

.enterprise-certificate-modal-card .enterprise-filing-panel .field {
  gap: 6px;
}

.enterprise-certificate-modal-card .enterprise-filing-panel .field span {
  color: #7a879d;
  font-size: 12px;
  font-weight: 700;
}

.enterprise-certificate-modal-card .enterprise-filing-panel .field input {
  min-height: 40px;
  padding-right: 12px;
  padding-left: 12px;
  font-size: 12px;
}

.enterprise-certificate-modal-card .enterprise-filing-actions {
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(126, 139, 168, 0.16);
}

.enterprise-certificate-modal-card .enterprise-filing-actions .hint {
  color: #7a879d;
  font-size: 12px;
  font-weight: 700;
}

.enterprise-certificate-modal-card #saveEnterpriseFilingBtn {
  min-width: 104px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 750;
}

.enterprise-certificate-modal-card > .stack-form > .modal-actions {
  margin-top: 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(126, 139, 168, 0.2);
  background: var(--surface-strong);
}

.enterprise-certificate-modal-card > .stack-form > .modal-actions button {
  min-width: 104px;
  min-height: 38px;
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 720px) {
  #enterpriseList .enterprise-domain-cell {
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 8px;
  }

  #enterpriseList .enterprise-domain-actions {
    width: 100px;
    padding-left: 8px;
  }

  #enterpriseList .enterprise-https-action,
  #enterpriseList .enterprise-filing-action {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .enterprise-certificate-modal-card {
    width: min(640px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .enterprise-certificate-modal-card > .modal-head {
    padding: 16px 18px 14px;
  }

  .enterprise-certificate-modal-card > .stack-form {
    gap: 14px;
    padding: 16px 18px 18px;
  }

  .enterprise-certificate-modal-card .enterprise-certificate-upload-zone {
    grid-template-columns: minmax(0, 1fr);
  }

  .enterprise-certificate-modal-card #chooseEnterpriseCertificateBtn,
  .enterprise-certificate-modal-card #saveEnterpriseFilingBtn {
    width: 100%;
  }

  .enterprise-certificate-modal-card .enterprise-filing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .enterprise-certificate-modal-card > .stack-form > .modal-actions {
    flex-wrap: wrap;
  }

  .enterprise-certificate-modal-card > .stack-form > .modal-actions button {
    flex: 1 1 120px;
  }
}

/* Total overview: pair the line chart with a descending horizontal ranking. */
.overview-content-view .overview-card .overview-card-body {
  grid-template-columns: minmax(0, 6fr) minmax(180px, 4fr) !important;
  grid-template-rows: minmax(244px, auto) !important;
  gap: 20px !important;
  align-items: stretch !important;
}

.overview-content-view .overview-card .overview-trend-pane {
  min-width: 0 !important;
  min-height: 244px !important;
}

.overview-content-view .overview-card .overview-top-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  align-self: stretch !important;
  gap: 0 !important;
  min-width: 0 !important;
  min-height: 244px !important;
  max-height: 246px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 0 4px 0 16px !important;
  border-top: 0 !important;
  border-left: 1px solid rgba(126, 139, 168, 0.18) !important;
}

.overview-content-view .overview-card .overview-top-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto 8px !important;
  gap: 5px 10px !important;
  width: 100% !important;
  min-height: 52px !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid rgba(126, 139, 168, 0.14) !important;
  border-radius: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
}

.overview-content-view .overview-card .overview-top-item:last-child {
  border-bottom: 0;
}

.overview-content-view .overview-card .overview-top-item::before {
  display: none !important;
}

.overview-content-view .overview-card .overview-top-copy {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-width: 0 !important;
  padding: 0 !important;
}

.overview-content-view .overview-card .overview-top-copy strong {
  max-width: none !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

.overview-content-view .overview-card .overview-top-value {
  flex: 0 0 auto !important;
  font-size: 11px !important;
}

.overview-content-view .overview-card .overview-top-bar {
  display: block !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  height: 8px !important;
  overflow: hidden !important;
  border-radius: 4px !important;
  background: rgba(126, 139, 168, 0.14) !important;
}

.overview-content-view .overview-card .overview-top-bar i {
  display: block !important;
  height: 100% !important;
  min-width: 0 !important;
  border-radius: inherit !important;
  background: var(--overview-series-color, var(--accent)) !important;
}

.overview-content-view .overview-card.is-loading .overview-card-body,
.overview-content-view .overview-card.is-error .overview-card-body {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 1100px) {
  .overview-content-view .overview-card .overview-card-body {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(244px, auto) auto !important;
  }

  .overview-content-view .overview-card .overview-top-list {
    min-height: 0 !important;
    max-height: none !important;
    padding: 8px 0 0 4px !important;
    border-top: 1px solid rgba(126, 139, 168, 0.14) !important;
    border-left: 0 !important;
  }
}

/* Keep dark type surfaces and accents above the legacy topology rules. */
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-enterprise-node {
  --runtime-node-accent: #2dd4bf;
  --runtime-node-surface: #193b43;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-workbench-node {
  --runtime-node-accent: #60a5fa;
  --runtime-node-surface: #1c3a61;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-agent-node {
  --runtime-node-accent: #34d399;
  --runtime-node-surface: #174b3d;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-gateway-node {
  --runtime-node-accent: #fbbf24;
  --runtime-node-surface: #4a3718;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-project-node {
  --runtime-node-accent: var(--runtime-project-accent, #93c5fd);
  --runtime-node-surface: #302e5e;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-container-node {
  --runtime-node-accent: #22d3ee;
  --runtime-node-surface: #17485a;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-enterprise-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-workbench-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-agent-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-gateway-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-project-node,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-container-node {
  background: var(--runtime-node-surface);
  border-top-color: var(--runtime-node-accent);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-enterprise-node > header > .runtime-monitor-hierarchy-fact-code,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-workbench-node > header > .runtime-monitor-hierarchy-fact-code,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-agent-node > header > .runtime-monitor-hierarchy-fact-code,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-gateway-node > header > .runtime-monitor-hierarchy-fact-code,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-project-node > header > .runtime-monitor-hierarchy-fact-code,
.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-container-node > header > .runtime-monitor-hierarchy-fact-code {
  border-color: var(--runtime-node-accent);
  color: var(--runtime-node-accent);
  background: rgba(255, 255, 255, 0.08);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node {
  border-color: rgba(191, 219, 254, 0.34);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.runtime-monitor-command-center.is-dark .runtime-monitor-component-map.is-topology .runtime-monitor-resource-chart {
  border-color: rgba(191, 219, 254, 0.22);
  background: #1b2d44;
}

/* Highest-specificity topology contract: horizontal project blocks, with each
   project's containers kept in a row beneath that project's node. */
/* All topology relationships are rendered by one measured SVG layer. Keep
   nodes above the strokes and disable the legacy pseudo-element connectors. */
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology > .runtime-monitor-topology-connectors {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
  pointer-events: none !important;
}

#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology > .runtime-monitor-topology-connectors .runtime-monitor-topology-edge {
  fill: none;
  stroke: rgba(72, 105, 167, 0.66);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology > .runtime-monitor-topology-connectors .runtime-monitor-topology-edge.is-project-container {
  stroke: rgba(8, 145, 178, 0.72);
}

#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-topology-node,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-flow-node {
  position: relative;
  z-index: 1;
}

#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-flow-root-node::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-flow-root-node::after,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-enterprise-branches::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-enterprise-graph::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-enterprise-node::after,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-workbench-branches::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-workbench-graph::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-topology-node::after,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-workbench-descendants::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-workbench-resource-row::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-project-branches::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-project-graph::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-project-graph::after,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-project-node::after,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-container-branches::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-container-branches::after,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-container-node::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-container-node::after,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-flow-support-nodes::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node::before,
#runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node::after {
  display: none !important;
}

@media (min-width: 721px) {
  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-projects {
    display: grid !important;
    grid-template-columns: 120px max-content !important;
    gap: 12px;
    align-items: start;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    display: block !important;
    width: max-content;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-branches > .runtime-monitor-project-pairs {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: start;
    gap: 24px;
    width: max-content;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: block !important;
    flex: 0 0 auto;
    width: max-content;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph {
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width)) !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px;
    row-gap: 12px;
    width: max-content;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 100% !important;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-project-node::after {
    display: none !important;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    position: relative;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: start;
    gap: 14px;
    width: max-content;
    min-width: 0;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches::before {
    content: "";
    position: absolute;
    top: -12px;
    right: 0;
    left: 0;
    z-index: 0;
    display: block;
    height: 1px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches::after {
    content: "";
    position: absolute;
    top: -12px;
    left: calc(var(--runtime-topology-node-width) / 2);
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node {
    position: relative;
    z-index: 1;
    flex: 0 0 var(--runtime-topology-node-width);
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-branches > .runtime-monitor-project-pairs {
    display: grid !important;
    gap: 14px;
    width: 100%;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair,
  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph {
    display: grid !important;
    width: 100%;
    min-width: 0;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 12px;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch;
    width: 100%;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
  }

  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches::before,
  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches::after,
  #runtimeMonitorComponentMap.runtime-monitor-component-map.is-topology .runtime-monitor-project-pair > .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node::before {
    display: none !important;
  }
}
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-projects {
    display: grid !important;
    grid-template-columns: 120px max-content !important;
    gap: 12px;
    align-items: start;
    min-height: var(--runtime-topology-port-y);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    display: block !important;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: flex !important;
    flex-flow: row nowrap;
    align-items: start;
    gap: 24px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: block !important;
    flex: 0 0 auto;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width)) !important;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 12px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    justify-self: center;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    position: relative;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-flow: row nowrap;
    align-items: start;
    gap: 14px;
    width: max-content;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::before {
    content: "";
    position: absolute;
    top: -12px;
    right: 0;
    left: 0;
    z-index: 0;
    display: block;
    height: 1px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::after {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node {
    position: relative;
    z-index: 1;
    flex: 0 0 var(--runtime-topology-node-width);
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: grid !important;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node::before {
    display: none !important;
  }
}

.runtime-monitor-entity-resource > header > .runtime-monitor-entity-resource-header-side {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 0;
}

/* Keep project-side runtime metrics visible even on the narrowest desktop
   topology cards. The identity column may truncate, but the three values stay
   in a fixed, high-contrast strip on the right. */
.runtime-monitor-topology-node.runtime-monitor-project-node > header.has-header-aside {
  grid-template-columns: 28px minmax(32px, 1fr) max-content;
  gap: 6px;
  align-items: start;
}

.runtime-monitor-topology-node.runtime-monitor-project-node > header.has-header-aside > .runtime-monitor-entity-resource-header-side {
  width: 138px;
  padding-left: 7px;
  border-left: 1px solid rgba(100, 116, 139, 0.28);
}

.runtime-monitor-entity-resource-title-line {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.runtime-monitor-entity-resource-title-line > strong,
.runtime-monitor-entity-resource-title-line > a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-entity-resource-title-line > strong {
  flex: 1 1 auto;
}

.runtime-monitor-entity-resource-title-status {
  flex: 0 0 auto;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.runtime-monitor-project-usage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.runtime-monitor-project-usage > span {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 33px;
  padding: 4px 3px;
  border: 1px solid rgba(100, 116, 139, 0.26);
  border-radius: 4px;
  background: rgba(248, 250, 252, 0.8);
  gap: 2px;
  text-align: right;
}

.runtime-monitor-project-usage b,
.runtime-monitor-project-usage small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-project-usage b {
  color: var(--runtime-node-accent, var(--runtime-screen-text));
  font-size: 12px;
  font-weight: 900;
}

.runtime-monitor-project-usage small {
  color: var(--runtime-screen-muted);
  font-size: 9px;
  font-weight: 800;
}

.runtime-monitor-command-center.is-dark .runtime-monitor-project-usage > span {
  border-color: rgba(148, 163, 184, 0.42);
  background: #273d60;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 720px) {
  .runtime-monitor-entity-resource > header > .runtime-monitor-entity-resource-header-side {
    grid-column: 2;
    justify-items: start;
    width: 100%;
  }

  .runtime-monitor-entity-resource > header > .runtime-monitor-entity-resource-header-side > em {
    grid-column: auto;
    justify-self: start;
  }

  .runtime-monitor-project-usage {
    width: 100%;
  }

  .runtime-monitor-project-usage > span {
    text-align: left;
  }
}

/* Keep the summary area visually distinct from the dark topology canvas. */
.runtime-monitor-command-center.is-dark #runtimeMonitorSummary > .runtime-monitor-summary-cards {
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #14253d;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.24);
}

.runtime-monitor-command-center.is-dark #runtimeMonitorSummary > .runtime-monitor-summary-cards > .runtime-monitor-summary-item {
  border-color: rgba(148, 163, 184, 0.3);
  background: #203653;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Overview date filter aligns with the contract date control. */
.overview-content-view > .page-toolbar > .page-toolbar-actions {
  flex-wrap: nowrap;
  gap: 12px;
}

.overview-content-view > .page-toolbar {
  border: 0;
}

.overview-date-toolbar {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 322px;
  margin-left: auto;
}

.overview-date-toolbar .contract-date-range {
  flex: 0 0 270px;
  width: 270px;
  min-width: 270px;
  max-width: 270px;
}

.overview-date-toolbar > #resetOverviewDateBtn {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
}

@media (max-width: 980px) {
  .overview-content-view > .page-toolbar > .page-toolbar-actions {
    flex-wrap: wrap;
  }

  .overview-date-toolbar {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .overview-date-toolbar .contract-date-range {
    flex: 1 1 min(320px, 100%);
    width: min(320px, 100%);
    min-width: 0;
    max-width: 100%;
  }
}

/* Render project resources as ordered blocks: one project row followed by its
   own container row, then the next project block. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: grid;
    gap: 24px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: grid;
    gap: 12px;
    width: max-content;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: grid;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }
}


/* admin-02.css */
.runtime-monitor-chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.runtime-monitor-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.runtime-monitor-chart-legend i {
  width: 16px;
  height: 3px;
  display: inline-block;
  background: var(--accent);
}

.runtime-monitor-chart-legend i.is-errors {
  background: #475569;
}

.runtime-monitor-table th,
.runtime-monitor-table td {
  white-space: normal;
}

.overview-top-list {
  display: grid;
  align-content: start;
  align-self: start;
  min-height: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.overview-top-item {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid rgba(126, 139, 168, 0.14);
  background: transparent;
  color: var(--text);
  text-align: left;
  box-shadow: none;
  cursor: default;
  outline: 0;
}

.overview-top-item:last-child {
  border-bottom: 0;
}

.overview-top-item::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  background: var(--overview-series-color, transparent);
}

.overview-top-item:hover,
.overview-top-item:focus-visible,
.overview-top-item.is-selected {
  background: rgba(239, 246, 255, 0.72);
}

.overview-top-item:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(222, 24, 44, 0.32);
}

.overview-top-item.is-selected::before {
  background: var(--accent);
}

.overview-top-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.overview-top-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-top-marker {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--overview-series-color, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--overview-series-color, var(--accent)) 16%, transparent);
}

.overview-top-value {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.overview-top-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  background: rgba(126, 139, 168, 0.16);
}

.overview-top-bar i {
  display: block;
  height: 100%;
  background: var(--overview-series-color, var(--accent));
}

.panel-card {
  padding: 22px;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(14, 14, 16, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.list-page-card {
  min-height: 420px;
}

.detail-shell {
  display: grid;
  gap: 18px;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
}

.detail-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.detail-tab {
  min-height: 40px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.detail-tab.is-active {
  color: #fff;
  background: rgba(222, 24, 44, 0.16);
  border-color: var(--line-strong);
}

.detail-panel {
  display: block;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.table-shell {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.list-table-shell {
  min-height: 420px;
}

.detail-panel .panel-card > .table-shell {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
}

#enterpriseStorageResourceList {
  width: calc(100% + 44px);
  max-width: none;
}

.storage-type-link {
  display: inline-grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 158px;
}

.storage-type-link strong,
.storage-page-title span:last-child,
.storage-resource-title strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.storage-type-link small,
.storage-resource-title > div > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.storage-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.storage-type-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.storage-page-title,
.storage-resource-title {
  display: inline-grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.storage-resource-title {
  display: grid;
  margin-bottom: 16px;
}

.storage-page-title .storage-type-icon,
.storage-resource-title .storage-type-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.storage-page-title .storage-type-icon svg,
.storage-resource-title .storage-type-icon svg {
  width: 29px;
  height: 29px;
}

.storage-detail-table-shell {
  width: calc(100% + 44px);
  max-width: none;
  margin: 0 -22px -22px;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
}

.storage-table-counts {
  display: grid;
  gap: 12px;
  width: 100%;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.storage-table-counts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.storage-table-counts-head strong {
  color: var(--text);
  font-size: 14px;
}

.storage-table-counts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.storage-table-count-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.storage-table-count-item span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.storage-table-count-item strong {
  color: #ffd9de;
  font-size: 16px;
  line-height: 1;
}

.enterprise-workbench-skeleton-shell {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.enterprise-workbench-skeleton-row {
  display: grid;
  grid-template-columns: 1.8fr repeat(4, 1fr) 0.7fr 0.9fr;
  gap: 12px;
}

.enterprise-workbench-skeleton-block {
  display: block;
  min-height: 44px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.13) 50%, rgba(255, 255, 255, 0.06) 100%);
  background-size: 200% 100%;
  animation: enterprise-skeleton-shimmer 1.4s ease-in-out infinite;
}

.enterprise-workbench-skeleton-block.is-wide {
  min-height: 52px;
}

.enterprise-workbench-skeleton-block.is-narrow {
  min-height: 36px;
}

@keyframes enterprise-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

#enterpriseGitlabResourceList {
  margin-top: 16px;
}

#enterpriseWorkbenchList .enterprise-workbenches-context {
  margin-bottom: 8px;
}

#enterpriseWorkbenchList .data-table th,
#enterpriseWorkbenchList .data-table td {
  padding: 12px 14px;
}

#enterpriseWorkbenchList .workbench-project-subtable-shell {
  padding: 10px 12px 12px;
}

.data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-table th {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
}

.data-table tbody tr:hover {
  background: rgba(222, 24, 44, 0.06);
}

.data-table tbody tr.is-disabled-token {
  background: rgba(126, 139, 168, 0.08);
  color: #8a93a6;
}

.data-table tbody tr.is-disabled-token:hover {
  background: rgba(126, 139, 168, 0.12);
}

.data-table tbody tr.is-disabled-token td,
.data-table tbody tr.is-disabled-token .muted,
.data-table tbody tr.is-disabled-token .token-relation-secondary,
.data-table tbody tr.is-disabled-token code,
.data-table tbody tr.is-disabled-token a {
  color: #8a93a6;
}

.data-table tbody tr.is-disabled-token .token-usage-hourly-chart,
.data-table tbody tr.is-disabled-token .token-today-usage {
  opacity: 0.58;
}

.data-table tbody tr.is-disabled-token .chip,
.data-table tbody tr.is-disabled-token .table-actions {
  opacity: 0.82;
}

.data-table tbody tr.is-disabled-token .token-status-cell,
.data-table tbody tr.is-disabled-token .status-segmented-control {
  color: var(--text);
  opacity: 1;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.token-actions-cell {
  width: 188px;
  min-width: 188px;
}

.token-actions-cell .table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  grid-auto-rows: 32px;
  align-items: stretch;
  justify-content: stretch;
  gap: 8px;
  max-height: 72px;
  overflow: hidden;
}

.token-actions-cell .table-actions button {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding-inline: 8px;
  white-space: nowrap;
}

.token-relation-stack {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-width: 220px;
}

.token-relation-primary {
  font-weight: 700;
}

.token-relation-secondary {
  max-width: 300px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.token-config-status-cell {
  min-width: 96px;
  white-space: nowrap;
}

.token-config-status-cell .chip {
  white-space: nowrap;
}

.token-today-usage-cell {
  min-width: 160px;
}

.token-today-usage {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.token-today-usage strong,
.token-today-usage .muted {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.token-last-used-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.token-last-used-cell > span {
  color: var(--text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.token-last-used-time.is-stale {
  color: rgba(138, 147, 166, 0.54);
}

.token-session-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: 12px;
  line-height: 1.35;
}

.token-session-status span,
.token-session-status small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-session-status small {
  max-width: 96px;
  color: var(--text-muted);
}

.token-session-status.is-success {
  color: #0f684c;
  background: var(--soft-success-bg);
  border-color: rgba(59, 159, 120, 0.28);
}

.token-session-status.is-error {
  color: #a83e51;
  background: var(--soft-danger-bg);
  border-color: rgba(217, 75, 92, 0.24);
}

.token-session-status.is-warning,
.token-session-status.is-running {
  color: #8a5800;
  background: var(--soft-warning-bg);
  border-color: rgba(245, 158, 11, 0.28);
}

.enterprise-token-usage-cell {
  min-width: 150px;
}

.enterprise-token-usage {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.enterprise-token-usage strong,
.enterprise-token-usage .muted {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.enterprise-token-usage-empty {
  color: var(--muted);
}

.workbench-status-stack {
  display: grid;
  gap: 7px;
  justify-items: start;
}

.workbench-agent-status {
  font-size: 12px;
  color: var(--muted);
}

.workbench-status-version-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
}

.workbench-status-version-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-agent-status.is-online {
  color: var(--success);
}

.workbench-agent-status.is-warning {
  color: #d28b24;
}

.workbench-agent-status.is-offline {
  color: #ffb3bc;
}

.workbench-status-evidence {
  max-width: 220px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.workbench-enterprise-line {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-table-group-row td,
.workbench-enterprise-group-row td {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.admin-table-group-head,
.workbench-enterprise-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-table-group-head::before,
.workbench-enterprise-group-head::before {
  content: "";
  width: 10px;
  height: 18px;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.28);
  flex: 0 0 auto;
}

.admin-table-group-head strong,
.workbench-enterprise-group-head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.admin-table-group-row.is-nested td {
  padding-left: 34px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-table-group-head.is-nested {
  color: var(--muted);
  font-size: 12px;
}

.admin-table-group-head.is-nested::before {
  width: 8px;
  height: 14px;
  background: var(--accent-strong);
}

.data-table tbody tr.is-nested-child-row > td:first-child {
  padding-left: 34px;
}

.data-table tbody tr.workbench-group-child-row > td:not(:first-child) {
  padding-left: 24px;
}

.workbench-online-cell {
  width: 110px;
  min-width: 110px;
}

.workbench-online-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--text);
  cursor: help;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.workbench-online-count::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16), 0 0 9px rgba(34, 197, 94, 0.72);
}

.workbench-online-empty {
  color: var(--muted);
}

.project-authorized-users {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.project-authorized-users-cell {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
}

.workbench-project-created-at-cell {
  width: 152px;
  min-width: 152px;
  white-space: nowrap;
}

.workbench-project-actions-cell {
  width: 88px;
  min-width: 88px;
  text-align: right;
}

.workbench-project-actions {
  display: flex;
  justify-content: flex-end;
}

.project-authorized-user {
  display: inline-grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  box-sizing: border-box;
  max-width: 82px;
  height: 24px;
  min-width: 0;
  min-height: 24px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.project-authorized-user-avatar {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(77, 105, 177, 0.12);
  color: #4d69b1;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.project-authorized-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-authorized-user-more {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-authorized-user-empty {
  color: var(--muted);
  font-size: 12px;
}

.project-authorized-user-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin-left: auto;
  border: 1px solid rgba(57, 103, 214, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary);
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.project-authorized-user-add svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.project-authorized-user-checklist {
  display: grid;
  gap: 2px;
  box-sizing: border-box;
  min-height: 44px;
  max-height: 320px;
  overflow: auto;
  padding: 0;
}

.project-authorized-user-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-authorized-user-field-head input {
  width: min(220px, 62%);
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.project-authorized-user-field-head input:focus {
  border-color: rgba(57, 103, 214, 0.45);
  box-shadow: 0 0 0 3px rgba(57, 103, 214, 0.10);
}

.project-authorized-user-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  box-sizing: border-box;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
}

.project-authorized-user-option.is-filter-hidden {
  display: none;
}

.project-authorized-user-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--primary);
}

.project-authorized-user-option-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-authorized-user-option-name,
.project-authorized-user-option-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-authorized-user-field .project-authorized-user-option-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.project-authorized-user-field .project-authorized-user-option-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.project-authorized-user-add:hover {
  background: rgba(57, 103, 214, 0.08);
}

.workbench-actions-cell .table-actions {
  padding-left: 8px;
}

.workbench-resource-cell {
  width: 260px;
}

.workbench-resource-stack {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 280px;
}

.workbench-resource-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workbench-resource-meta {
  display: inline-grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
}

.workbench-resource-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.workbench-resource-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.workbench-resource-total {
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workbench-resource-row .workbench-usage {
  width: 100%;
  min-width: 0;
}

.workbench-sparkline {
  display: grid;
  gap: 8px;
  min-width: 120px;
}

.workbench-token-usage-cell {
  min-width: 160px;
}

.workbench-sparkline-chart {
  width: 100%;
  height: 44px;
  padding: 6px 0 0;
  background: transparent;
}

.workbench-sparkbar-bars {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
}

.workbench-sparkbar {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.workbench-sparkbar-fill {
  width: 56%;
  min-height: 8px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 160, 171, 0.86), rgba(222, 24, 44, 0.96));
  box-shadow: none;
}

.workbench-sparkbar.is-current .workbench-sparkbar-fill {
  background: linear-gradient(180deg, rgba(255, 214, 102, 0.92), rgba(255, 159, 28, 0.98));
}

.workbench-sparkline-text {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.workbench-sparkline-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}

.workbench-project-subtable-row > td {
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.02);
}

.workbench-project-subtable-shell {
  padding: 14px 16px 18px;
  overflow-x: auto;
}

.workbench-project-subtable {
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.enterprise-workbenches-context {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
  min-height: 28px;
}

.enterprise-workbenches-context-name .admin-enterprise-name-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.project-domain-link {
  overflow-wrap: anywhere;
}

.project-id-stack {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.project-id-main {
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.project-id-detail-link {
  color: var(--text);
  text-decoration: none;
}

.project-id-detail-link:hover,
.project-id-detail-link:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.project-session-roles {
  min-width: 220px;
  max-width: 360px;
  white-space: nowrap;
  line-height: 1.45;
}

.project-session-title-cell {
  display: grid;
  min-width: 280px;
  max-width: 360px;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.project-session-title-cell > strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-session-cell-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.project-session-role-list {
  display: grid;
  gap: 4px;
}

.project-session-role-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 22px;
}

.project-session-role-metrics {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.project-session-role-status {
  font-size: 11px;
}

.project-session-time {
  display: grid;
  gap: 4px;
  min-width: 150px;
  white-space: nowrap;
}

.project-session-start-time {
  color: var(--text);
}

.project-session-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.project-session-active-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: 999px;
  color: #15803d;
  background: rgba(220, 252, 231, 0.9);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.project-session-usage {
  display: grid;
  gap: 3px;
  min-width: 210px;
  white-space: nowrap;
}

.project-session-usage > span {
  line-height: 1.35;
}

.project-session-billed-token,
.project-session-cache-rate {
  color: var(--muted);
  font-size: 12px;
}

.project-session-command-usage {
  display: grid;
  gap: 3px;
  min-width: 170px;
  white-space: nowrap;
}

.project-session-command-cell {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.project-session-command-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.project-session-command-detail-btn:hover,
.project-session-command-detail-btn:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
}

.project-session-command-detail-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.project-session-command-resources {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.project-session-resource {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.project-session-resource svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.project-session-resource-separator {
  color: var(--line-strong, var(--line));
}

.project-session-command-io {
  color: var(--muted);
  font-size: 12px;
}

.project-session-rounds {
  white-space: nowrap;
}

.project-session-rounds-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.project-session-rounds-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.project-session-rounds-view-btn:hover,
.project-session-rounds-view-btn:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
}

.project-session-table > tbody > .project-session-row > td {
  border-bottom: 0;
  background: rgba(244, 247, 255, 0.7);
}

.project-session-table > tbody > .project-session-requirement-row > td {
  padding: 0 14px 18px;
  background: rgba(244, 247, 255, 0.7);
  border-bottom: 1px solid var(--line);
}

.project-session-requirement-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-session-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(247, 249, 255, 0.72);
}

.project-session-filter-field {
  display: grid;
  min-width: 150px;
  gap: 5px;
}

.project-session-filter-field:first-child {
  min-width: min(360px, 100%);
  flex: 1 1 260px;
}

.project-session-filter-field span {
  color: var(--muted);
  font-size: 12px;
}

.project-session-filter-field input,
.project-session-filter-field select {
  box-sizing: border-box;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.project-session-page-size-field {
  min-width: 92px;
}

.project-session-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid rgba(210, 218, 236, 0.78);
  background: rgba(247, 249, 255, 0.58);
  color: var(--muted);
  font-size: 12px;
}

.project-session-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-session-page-btn {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
}

.project-session-page-btn svg,
.project-session-input-view-btn svg,
.project-session-rounds-view-btn svg,
.project-session-round-input-view-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.project-session-requirement-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 12px;
}

.project-session-requirement-title span {
  color: var(--muted);
}

.project-session-requirement-table-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.project-session-requirement-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
  border-collapse: collapse;
}

.project-session-requirement-table th,
.project-session-requirement-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(210, 218, 236, 0.72);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.45;
}

.project-session-requirement-table th {
  color: var(--muted);
  background: rgba(237, 242, 252, 0.9);
  font-weight: 700;
}

.project-session-requirement-table th:nth-child(1) { width: 24%; }
.project-session-requirement-table th:nth-child(2) { width: 11%; }
.project-session-requirement-table th:nth-child(3) { width: 9%; }
.project-session-requirement-table th:nth-child(4) { width: 6%; }
.project-session-requirement-table th:nth-child(5) { width: 8%; }
.project-session-requirement-table th:nth-child(6) { width: 17%; }
.project-session-requirement-table th:nth-child(7) { width: 12%; }
.project-session-requirement-table th:nth-child(8) { width: 13%; }

.project-session-requirement-table .project-session-round-summary > td {
  border-top: 2px solid rgba(117, 139, 190, 0.42);
  background: rgba(232, 240, 255, 0.86);
}

.project-session-requirement-table .project-session-round-summary .project-session-requirement-role {
  color: var(--primary, #2563eb);
  font-weight: 800;
}

.project-session-requirement-table .project-session-round-summary .muted-text {
  color: var(--muted);
  font-weight: 500;
}

.project-session-requirement-table .project-session-role-detail > td {
  background: rgba(255, 255, 255, 0.56);
}

.project-session-requirement-table .project-session-requirement-item.is-round-start:not(:first-child) > td {
  border-top: 2px solid rgba(190, 201, 224, 0.78);
}

.project-session-requirement-table tbody tr:last-child td {
  border-bottom: 0;
}

.project-session-requirement-copy,
.project-session-requirement-role,
.project-session-requirement-token {
  white-space: normal;
  overflow-wrap: anywhere;
}

.project-session-role-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--role-color, var(--text));
}

.project-session-role-swatch {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--role-color, var(--muted));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--role-color, var(--muted)) 16%, transparent);
}

.project-session-round-role-breakdown {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.project-session-round-role-time {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  overflow-wrap: anywhere;
}

.project-session-requirement-time {
  white-space: nowrap;
}

.project-session-requirement-content {
  min-width: 0;
  margin-top: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.project-session-round-input {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 8px;
}

.project-session-requirement-content.is-round-input-preview {
  display: -webkit-box;
  flex: 1 1 auto;
  max-height: calc(1.45em * 2);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-session-round-input-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.project-session-round-input-view-btn:hover,
.project-session-round-input-view-btn:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
}

.project-session-requirement-input {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.project-session-requirement-content.is-modal-preview {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.project-session-requirement-content.is-truncated {
  display: -webkit-box;
  max-height: calc(1.45em * 5);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.project-session-input-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.project-session-input-view-btn:hover,
.project-session-input-view-btn:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
}

.project-session-input-modal-card {
  width: min(860px, calc(100vw - 48px));
}

.modal-card.project-session-rounds-modal-card {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(90vh, 920px);
}

.project-session-round-modal-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-session-input-modal-body {
  max-height: min(70vh, 720px);
  overflow: auto;
  padding: 18px 22px 22px;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  font-size: 13px;
}

.project-session-rounds-modal-body {
  max-height: min(78vh, 820px);
  overflow: auto;
  padding: 18px 22px 22px;
}

.modal-card.project-session-round-input-modal-card {
  width: min(900px, calc(100vw - 48px));
}

.project-session-round-input-modal-body {
  max-height: min(70vh, 720px);
  overflow: auto;
  padding: 18px 22px 22px;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  font-size: 13px;
}

.modal-card.project-session-command-modal-card {
  width: min(1420px, calc(100vw - 32px));
  max-height: min(90vh, 940px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.project-session-command-modal-heading {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.project-session-command-modal-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.project-session-command-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 22px;
}

.project-session-command-modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: rgba(247, 249, 255, 0.94);
}

.project-session-command-detail-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.project-session-command-detail-summary strong {
  color: var(--text);
  font-size: 14px;
}

.project-session-command-table-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.project-session-command-table {
  width: 100%;
  min-width: 1240px;
  table-layout: fixed;
  border-collapse: collapse;
}

.project-session-command-table th,
.project-session-command-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(210, 218, 236, 0.72);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.45;
}

.project-session-command-table th {
  color: var(--muted);
  background: rgba(237, 242, 252, 0.9);
  font-weight: 700;
}

.project-session-command-table th:nth-child(1) { width: 25%; }
.project-session-command-table th:nth-child(2) { width: 8%; }
.project-session-command-table th:nth-child(3) { width: 7%; }
.project-session-command-table th:nth-child(4) { width: 16%; }
.project-session-command-table th:nth-child(5) { width: 8%; }
.project-session-command-table th:nth-child(6) { width: 18%; }
.project-session-command-table th:nth-child(7) { width: 18%; }

.project-session-command-table tbody tr:last-child td {
  border-bottom: 0;
}

.project-session-command-text code {
  display: block;
  padding: 0;
  color: var(--text);
  background: transparent;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.project-session-command-context,
.project-session-command-time-detail,
.project-session-command-resource-detail {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.project-session-command-context {
  margin-top: 5px;
}

.project-session-command-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(247, 249, 255, 0.8);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.project-session-command-status.is-success {
  color: #0f684c;
  border-color: rgba(59, 159, 120, 0.28);
  background: var(--soft-success-bg);
}

.project-session-command-status.is-failed {
  color: #a83e51;
  border-color: rgba(217, 75, 92, 0.28);
  background: var(--soft-danger-bg);
}

.project-session-command-status.is-running {
  color: #8a5800;
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--soft-warning-bg);
}

.project-session-command-output-cell {
  min-width: 0;
}

.project-session-command-output {
  max-height: 150px;
  margin: 0;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid rgba(126, 139, 168, 0.18);
  background: rgba(246, 249, 255, 0.82);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.project-session-command-loading,
.project-session-command-error {
  min-height: 120px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.project-session-command-error p {
  margin: 0;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.project-id-domain {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.workbench-project-skeleton-table tbody td {
  height: 48px;
}

.workbench-project-skeleton-table .admin-skeleton-line {
  height: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.permission-detail-list {
  margin-top: 16px;
  min-height: 112px;
}

.permission-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.permission-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.permission-pill.active {
  border-color: rgba(222, 24, 44, 0.4);
  background: rgba(222, 24, 44, 0.14);
  color: #ffd9de;
}

.chip.active {
  color: #ffffff;
  background: rgba(75, 211, 154, 0.12);
  border-color: rgba(75, 211, 154, 0.3);
}

.chip.disabled {
  color: #ffd1d6;
  background: rgba(255, 77, 95, 0.12);
  border-color: rgba(255, 77, 95, 0.28);
}

.chip.warning {
  color: #ffd98a;
  background: rgba(255, 177, 66, 0.12);
  border-color: rgba(255, 177, 66, 0.3);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.summary-section {
  display: grid;
  gap: 12px;
}

.summary-section + .summary-section {
  margin-top: 18px;
}

.summary-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.workbench-overview-sections {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.workbench-overview-sections .summary-section {
  min-width: 0;
}

.workbench-overview-sections .summary-section + .summary-section {
  margin-top: 0;
}

.workbench-overview-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.workbench-overview-field {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.workbench-overview-field.is-wide {
  grid-column: 1 / -1;
}

.workbench-overview-sections .summary-item-value {
  min-width: 0;
  margin-top: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.workbench-detail-toolbar {
  display: none;
}

.workbench-detail-toolbar .page-toolbar-actions {
  width: auto;
}

.workbench-detail-navigation {
  align-items: center;
}

.workbench-detail-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workbench-detail-tabs-back {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
}

.workbench-detail-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.workbench-detail-status-card {
  height: 104px;
  min-height: 104px;
  max-height: 104px;
}

.workbench-detail-status-card .admin-insight-value {
  font-size: 22px;
}

.workbench-detail-status-card .admin-insight-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.workbench-resource-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 26px rgba(142, 153, 181, 0.1);
}

.workbench-resource-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.workbench-resource-card-head span {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.workbench-resource-card-head small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-overview-metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.enterprise-overview-basic-grid {
  margin-top: 14px;
}

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

.enterprise-overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
  gap: 10px;
  margin-bottom: 14px;
}

.enterprise-overview-toolbar .contract-date-range {
  flex: 0 0 270px;
  width: 270px;
  min-width: 270px;
  max-width: 270px;
}

.enterprise-overview-toolbar > #resetEnterpriseOverviewDateBtn {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
}

.enterprise-overview-toolbar .contract-date-range input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  width: auto;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.enterprise-recent-usage-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.enterprise-recent-usage-card .token-usage-bar-bars {
  height: 180px;
}

.enterprise-recent-usage-body {
  min-width: 0;
}

.enterprise-overview-usage-card {
  min-height: 334px;
}

.enterprise-usage-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.enterprise-usage-chart-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.enterprise-usage-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.enterprise-usage-chart-head h3 {
  margin: 0;
  font-size: 15px;
}

.enterprise-usage-chart-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.enterprise-usage-line-chart {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.enterprise-usage-line-chart svg {
  width: 100%;
  height: 220px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.025);
}

.enterprise-usage-line-night {
  fill: rgba(0, 0, 0, 0.22);
}

.enterprise-usage-line-grid {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.enterprise-usage-line-path {
  fill: none;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.enterprise-usage-line-path.total,
.enterprise-usage-line-legend-item.total span {
  stroke: #ff6b76;
  background: #ff6b76;
}

.enterprise-usage-line-path.project-1,
.enterprise-usage-line-legend-item.project-1 span { stroke: #ff6b76; background: #ff6b76; }
.enterprise-usage-line-path.project-2,
.enterprise-usage-line-legend-item.project-2 span { stroke: #6bd6ff; background: #6bd6ff; }
.enterprise-usage-line-path.project-3,
.enterprise-usage-line-legend-item.project-3 span { stroke: #ffd166; background: #ffd166; }
.enterprise-usage-line-path.project-4,
.enterprise-usage-line-legend-item.project-4 span { stroke: #8ee28e; background: #8ee28e; }
.enterprise-usage-line-path.project-5,
.enterprise-usage-line-legend-item.project-5 span { stroke: #c99cff; background: #c99cff; }
.enterprise-usage-line-path.project-6,
.enterprise-usage-line-legend-item.project-6 span { stroke: #ff9f6b; background: #ff9f6b; }
.enterprise-usage-line-path.project-7,
.enterprise-usage-line-legend-item.project-7 span { stroke: #9be7d8; background: #9be7d8; }
.enterprise-usage-line-path.project-8,
.enterprise-usage-line-legend-item.project-8 span { stroke: #f78acb; background: #f78acb; }

.enterprise-usage-line-axis,
.enterprise-usage-line-summary,
.enterprise-usage-line-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.enterprise-usage-line-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.enterprise-usage-line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.enterprise-usage-line-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.enterprise-usage-line-legend-item span {
  width: 10px;
  height: 2px;
}

.enterprise-usage-line-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
}

.plugin-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.03);
}

.summary-item-accent {
  background: rgba(222, 24, 44, 0.08);
  border-color: rgba(255, 77, 95, 0.24);
}

.plugin-detail-card {
  position: relative;
  min-height: 120px;
  padding: 16px 56px 16px 16px;
}

@media (max-width: 1180px) {
  .enterprise-usage-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .permission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .workbench-overview-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .workbench-overview-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

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

.enterprise-workbench-lifecycle-actions {
  width: 100%;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.enterprise-workbench-lifecycle-actions .small {
  min-height: 30px;
  padding: 0 9px;
  white-space: nowrap;
}

.enterprise-workbench-lifecycle-btn.is-blocked {
  opacity: 0.58;
}

.workbench-disabled-chip {
  width: fit-content;
}

.enterprise-workbench-lifecycle-modal-card {
  width: min(520px, calc(100vw - 32px));
}

.enterprise-workbench-lifecycle-form {
  gap: 12px;
}

.workbench-lifecycle-description,
.workbench-lifecycle-service-note {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.workbench-lifecycle-service-note {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(111, 143, 220, 0.08);
  color: var(--muted);
}

.workbench-lifecycle-blockers {
  padding: 12px 14px;
  border: 1px solid rgba(194, 57, 78, 0.28);
  border-radius: 6px;
  background: rgba(194, 57, 78, 0.06);
  color: var(--danger);
}

.workbench-lifecycle-blocker-title {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
}

.workbench-lifecycle-blockers ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .enterprise-workbench-lifecycle-actions {
    min-width: 0;
  }
}

.summary-item-label {
  color: var(--muted);
  font-size: 13px;
}

.summary-item-value {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
  word-break: break-word;
}

.admin-skeleton {
  display: grid;
  gap: 12px;
  width: 100%;
}

.admin-skeleton-table,
.admin-skeleton-list {
  min-width: 0;
}

.admin-skeleton-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-skeleton-row,
.admin-skeleton-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.admin-skeleton-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
  padding: 14px;
}

.admin-skeleton-card {
  display: grid;
  gap: 12px;
  min-height: 96px;
  padding: 16px;
}

.admin-skeleton-line {
  display: block;
  width: 72%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.16), rgba(148, 163, 184, 0.34), rgba(148, 163, 184, 0.16));
  background-size: 220% 100%;
  animation: admin-skeleton-shimmer 1.25s ease-in-out infinite;
}

.admin-skeleton-line.is-wide {
  width: 96%;
}

.admin-skeleton-line.is-short {
  width: 42%;
}

@keyframes admin-skeleton-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.summary-item-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.workbench-usage {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.workbench-gateway-stack {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.workbench-gateway-link-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.workbench-gateway-link-row .data-table-primary-link {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.workbench-gateway-origin {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.workbench-gateway-origin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 6px;
  flex-wrap: wrap;
}

.workbench-gateway-origin-row .workbench-gateway-origin {
  flex: 1 1 180px;
  min-width: 0;
}

.workbench-gateway-channel-row {
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

.workbench-gateway-token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.workbench-gateway-token-row > span {
  white-space: nowrap;
}

.workbench-gateway-token-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.workbench-gateway-token-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  min-width: 0;
}

.workbench-gateway-token-list code {
  display: block;
  max-width: 100%;
  color: var(--text);
  font-size: 11px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.workbench-gateway-token-list small {
  color: var(--muted);
  font-size: 11px;
}

.workbench-gateway-token-item .workbench-token-model-count {
  min-width: 64px;
  height: 24px;
  min-height: 24px;
  padding: 0 6px;
}

.workbench-origin-select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  line-height: 1;
}

.workbench-origin-select-btn:hover,
.workbench-origin-select-btn:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

.workbench-origin-select-btn svg {
  width: 14px;
  height: 14px;
}

.workbench-origin-locked-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(22, 163, 74, 0.32);
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
}

.workbench-update-channel-control {
  display: inline-flex;
  align-items: center;
  width: 116px;
  min-width: 116px;
}

.workbench-update-channel-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 116px;
  min-width: 116px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(126, 139, 168, 0.28);
  border-radius: 8px;
  background: rgba(247, 249, 255, 0.9);
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.workbench-update-channel-switch.is-readonly {
  cursor: default;
}

.workbench-update-channel-switch:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.workbench-update-channel-switch.is-pending {
  cursor: wait;
  opacity: 0.72;
}

.workbench-update-channel-switch.is-cos {
  border-color: rgba(93, 114, 170, 0.36);
  background: rgba(229, 237, 255, 0.86);
}

.workbench-update-channel-switch.is-agent {
  border-color: rgba(59, 159, 120, 0.36);
  background: rgba(226, 246, 238, 0.86);
}

.workbench-update-channel-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 54px;
  height: 24px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  transition: transform 0.18s ease;
}

.workbench-update-channel-switch.is-agent .workbench-update-channel-thumb {
  transform: translateX(56px);
}

.workbench-update-channel-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: rgba(93, 102, 124, 0.78);
  pointer-events: none;
}

.workbench-update-channel-switch.is-cos .workbench-update-channel-label.is-cos {
  color: #405b9c;
}

.workbench-update-channel-switch.is-agent .workbench-update-channel-label.is-agent {
  color: #0f684c;
}

.workbench-gateway-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.workbench-primary-star {
  flex: 0 0 auto;
  color: #f59e0b;
  font-size: 14px;
  line-height: 1;
}

.workbench-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.workbench-token-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(222, 24, 44, 0.24);
  background: rgba(222, 24, 44, 0.08);
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
}

.workbench-token-pill.is-disabled {
  border-color: rgba(126, 139, 168, 0.28);
  background: rgba(126, 139, 168, 0.1);
  color: var(--muted);
}

.workbench-token-pill code {
  max-width: 220px;
  overflow: hidden;
  color: inherit;
  font-family: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-token-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.workbench-usage-bar {
  position: relative;
  width: 100%;
  height: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.workbench-usage-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: linear-gradient(90deg, #23836c 0%, #4bd39a 100%);
  border-radius: inherit;
}

.workbench-usage-text {
  min-width: 0;
  color: #2f64d6;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-usage-percent {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.46);
  white-space: nowrap;
}

.workbench-usage:not(.is-warn):not(.is-danger) .workbench-usage-fill {
  background: linear-gradient(90deg, #23836c 0%, #4bd39a 100%);
}

.workbench-usage.is-warn .workbench-usage-fill {
  background: linear-gradient(90deg, #a36b00 0%, #ffd166 100%);
}

.workbench-usage.is-danger .workbench-usage-fill {
  background: linear-gradient(90deg, #8f0c18 0%, #de182c 62%, #ff5a67 100%);
}

.workbench-runtime-version {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.workbench-runtime-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 1 auto;
  max-width: 100%;
  min-height: 22px;
  min-width: 0;
}

.workbench-runtime-line.is-docker {
  flex: 1 0 100%;
}

.workbench-runtime-line.has-upgrade {
  gap: 6px;
}

.workbench-runtime-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: #2563eb;
}

.workbench-runtime-label svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.workbench-runtime-label.is-docker,
.workbench-runtime-label.is-compose {
  color: #1d63ed;
}

.workbench-runtime-label.is-git {
  color: #f05033;
}

.workbench-runtime-label.is-codex {
  color: #111827;
}

.workbench-runtime-label.is-playwright {
  color: #2f855a;
}

.workbench-runtime-label.is-browsers {
  color: #0f766e;
}

.workbench-runtime-current {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 86px;
  color: #334155;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-runtime-line.is-docker .workbench-runtime-current {
  flex: 1 1 auto;
  max-width: none;
}

.workbench-runtime-upgrade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 3px;
  width: auto;
  min-width: 40px;
  height: 22px;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.95);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  white-space: nowrap;
  align-self: center;
}

.workbench-runtime-upgrade-btn svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.workbench-runtime-upgrade-btn::after {
  content: "升级";
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.admin-shell .workbench-runtime-upgrade-btn {
  border-radius: 999px;
}

.workbench-version-upgrade-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.workbench-version-upgrade-btn:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.52;
}

.workbench-runtime-upgrade-btn.is-upgrading {
  min-width: 58px;
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(219, 234, 254, 0.98);
  color: #1d4ed8;
  opacity: 1;
}

.workbench-runtime-upgrade-btn.is-upgrading svg {
  display: none;
}

.workbench-runtime-upgrade-btn.is-upgrading::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: workbench-runtime-spin 0.8s linear infinite;
}

.workbench-runtime-upgrade-btn.is-upgrading::after {
  content: "升级中";
}

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

.workbench-runtime-upgrade-btn:hover,
.workbench-runtime-upgrade-btn:focus-visible,
.workbench-runtime-upgrade-btn:active {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(219, 234, 254, 0.98);
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
  transform: none;
}

.workbench-version-upgrade-btn:hover,
.workbench-version-upgrade-btn:focus-visible,
.workbench-version-upgrade-btn:active {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.project-runtime-framework {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-runtime-icons {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
}

.project-runtime-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.project-runtime-icon-generic {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid #9aa8bd;
  border-radius: 3px;
  color: #526176;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.project-runtime-framework-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workbench-usage-empty {
  color: var(--muted);
  font-size: 12px;
}

.summary-item-value .workbench-usage,
.workbench-overview-field .workbench-usage {
  width: min(100%, 320px);
  min-width: 0;
}

.token-usage-hourly-cell {
  min-width: 0;
}

.token-usage-hourly-chart {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: min(100%, 220px);
}

.token-usage-hourly-bars {
  display: grid;
  grid-template-columns: repeat(24, 4px);
  align-items: end;
  justify-content: start;
  gap: 1px;
  height: 38px;
  padding: 0;
}

.token-usage-hourly-bar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-height: 0;
}

.token-usage-hourly-bar-fill {
  display: block;
  width: 100%;
  min-height: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.token-usage-hourly-bar.has-value .token-usage-hourly-bar-fill {
  background: linear-gradient(180deg, #ff7b86 0%, #de182c 62%, #8f0c18 100%);
}

.token-usage-hourly-axis,
.token-usage-hourly-summary,
.token-usage-hourly-empty {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.token-usage-hourly-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.token-usage-hourly-axis span {
  min-width: max-content;
  white-space: nowrap;
}

.token-usage-hourly-summary {
  white-space: normal;
}

.token-usage-hourly-empty {
  min-width: 0;
  max-width: 100%;
}

#tokenInsightStrip .token-hourly-insight {
  position: relative;
  isolation: isolate;
}

#tokenInsightStrip .token-hourly-insight > .admin-insight-label,
#tokenInsightStrip .token-hourly-insight > .admin-insight-value,
#tokenInsightStrip .token-hourly-insight > .admin-insight-meta {
  position: relative;
  z-index: 1;
}

.token-insight-hourly-background {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(24, minmax(2px, 1fr));
  align-items: end;
  gap: 2px;
  width: min(48%, 164px);
  height: 54px;
  pointer-events: none;
}

.token-insight-hourly-bar {
  display: block;
  border-radius: 2px 2px 0 0;
}

.token-insight-hourly-bar.has-value {
  background: rgba(73, 103, 205, 0.18);
}

.modal-card.plugin-prepare-modal-card {
  width: min(1960px, calc(100vw - 48px));
}

.icon-plain {
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.plugin-detail-copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
}

.plugin-detail-copy-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.token-plain-result {
  padding: 14px 16px;
  border-radius: 0;
  background: rgba(222, 24, 44, 0.08);
  border: 1px solid rgba(222, 24, 44, 0.18);
  color: var(--text);
  line-height: 1.6;
}

.global-message {
  display: none;
}

.empty-state {
  padding: 22px 16px;
  border: 1px dashed var(--line);
  border-radius: 0;
  color: var(--muted);
  text-align: center;
}

.gitlab-resource-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.gitlab-resource-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gitlab-resource-head h3,
.gitlab-resource-panel-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.gitlab-resource-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.gitlab-user-resource-notice {
  padding: 9px 10px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.gitlab-resource-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.gitlab-resource-panel-title {
  font-size: 15px;
}

.gitlab-resource-chip-list,
.gitlab-resource-project-list {
  display: grid;
  gap: 10px;
}

.gitlab-resource-chip,
.gitlab-resource-project {
  display: block;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.gitlab-resource-chip {
  padding: 10px 12px;
}

.gitlab-resource-project {
  padding: 12px 14px;
}

.gitlab-resource-chip:hover,
.gitlab-resource-project:hover {
  border-color: var(--line-strong);
  background: rgba(222, 24, 44, 0.08);
}

.gitlab-resource-project strong,
.gitlab-resource-project span {
  display: block;
}

.gitlab-resource-project strong {
  font-size: 13px;
}

.gitlab-resource-project span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.gitlab-resource-group-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.gitlab-resource-group-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gitlab-resource-group-row td {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.gitlab-resource-group-row.is-pending-delete td,
.gitlab-resource-project-row.is-pending-delete td {
  background: var(--pending-delete-row-bg);
  color: var(--pending-delete-text);
}

.gitlab-resource-project-row td:first-child {
  padding-left: 32px;
}

.gitlab-resource-project-row td:first-child .gitlab-resource-project-link {
  margin-right: 10px;
}

.gitlab-resource-project-row td:not(:first-child) {
  padding-left: 24px;
}

.gitlab-resource-inline-placeholder {
  color: #8d98ad;
  font-size: 12px;
  font-weight: 650;
}

.gitlab-resource-action-cell {
  width: 96px;
  text-align: right;
  white-space: nowrap;
}

.gitlab-resource-delete-btn {
  vertical-align: middle;
}

.gitlab-resource-delete-btn.is-pending {
  position: relative;
  padding-left: 30px;
  opacity: 0.88;
  cursor: wait;
  box-shadow: 0 0 0 1px rgba(255, 122, 134, 0.18), 0 0 18px rgba(222, 24, 44, 0.16);
  animation: gitlab-delete-pulse 1.1s ease-in-out infinite;
}

.gitlab-resource-delete-btn.is-pending::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 18px;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 3px 50%, #fff 0 1.5px, transparent 1.9px),
    radial-gradient(circle at 9px 50%, #fff 0 1.5px, transparent 1.9px),
    radial-gradient(circle at 15px 50%, #fff 0 1.5px, transparent 1.9px);
  animation: gitlab-delete-pulse 1.1s ease-in-out infinite;
}

.gitlab-binding-resource-row > td {
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.02);
}

.gitlab-binding-resource-shell {
  padding: 14px 16px 18px;
}

.gitlab-resource-group-link {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.gitlab-resource-group-row.is-pending-delete .gitlab-resource-group-link,
.gitlab-resource-group-row.is-pending-delete .gitlab-resource-group-link.is-static,
.gitlab-resource-project-row.is-pending-delete .gitlab-resource-project-link {
  color: var(--pending-delete-link);
}

.gitlab-resource-group-link.is-static {
  cursor: default;
}

.gitlab-resource-group-link:hover {
  color: var(--brand);
}

.gitlab-resource-group-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(222, 24, 44, 0.24);
  background: rgba(222, 24, 44, 0.12);
  color: #ffd7dc;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.gitlab-resource-delete-scheduled-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(255, 184, 77, 0.28);
  background: rgba(255, 184, 77, 0.12);
  color: #ffe3a3;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.gitlab-resource-table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.gitlab-resource-project-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.gitlab-resource-project-link.is-static {
  cursor: default;
}

.gitlab-user-table.data-table {
  table-layout: fixed;
}

.gitlab-user-table.data-table th,
.gitlab-user-table.data-table td {
  padding: 10px 12px;
  overflow-wrap: normal;
  word-break: normal;
}

.gitlab-user-table th:nth-child(1),
.gitlab-user-table td:nth-child(1) {
  width: 168px;
}

.gitlab-user-table th:nth-child(2),
.gitlab-user-table td:nth-child(2) {
  width: 132px;
}

.gitlab-user-table th:nth-child(3),
.gitlab-user-table td:nth-child(3) {
  width: 86px;
}

.gitlab-user-table th:nth-child(4),
.gitlab-user-table td:nth-child(4) {
  width: 138px;
}

.gitlab-user-actions-cell {
  width: 218px;
}

.gitlab-user-actions-cell .table-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.gitlab-user-actions-cell .table-actions button {
  white-space: nowrap;
  padding-inline: 10px;
}

.gitlab-user-name-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.gitlab-user-email,
.gitlab-user-last-login.is-empty,
.gitlab-user-project-empty {
  color: var(--muted);
}

.gitlab-user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.gitlab-user-project-cell {
  min-width: 0;
  max-width: none;
}

.gitlab-user-project-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  max-height: 56px;
  overflow: hidden;
}

.gitlab-user-project-list.is-expanded {
  max-height: none;
}

.gitlab-user-project-chip,
.gitlab-user-project-more {
  display: inline-flex;
  align-items: center;
  max-width: 170px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(222, 24, 44, 0.22);
  background: rgba(222, 24, 44, 0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.gitlab-user-project-chip {
  overflow: hidden;
  text-overflow: ellipsis;
}

.gitlab-user-project-more {
  border-color: rgba(126, 139, 168, 0.28);
  background: rgba(126, 139, 168, 0.12);
  color: var(--muted);
  cursor: pointer;
}

.gitlab-user-project-chip:hover,
.gitlab-user-project-more:hover {
  border-color: var(--line-strong);
  color: var(--brand);
}

.gitlab-resource-group-row.is-pending-delete .gitlab-resource-group-count-badge {
  border-color: var(--pending-delete-badge-border);
  background: var(--pending-delete-badge-bg);
  color: var(--pending-delete-badge-text);
}

.gitlab-resource-group-row.is-pending-delete .gitlab-resource-delete-scheduled-badge,
.gitlab-resource-project-row.is-pending-delete .gitlab-resource-delete-scheduled-badge {
  border-color: var(--pending-delete-badge-border);
  background: var(--pending-delete-badge-bg);
  color: var(--pending-delete-badge-text);
}

.gitlab-resource-group-row.is-pending-delete .chip.disabled,
.gitlab-resource-project-row.is-pending-delete .chip.disabled {
  opacity: 0.78;
}

.gitlab-resource-project-link:hover {
  color: var(--brand);
}

.gitlab-resource-project-link.is-static:hover {
  color: var(--text);
}

@keyframes gitlab-delete-pulse {
  0%,
  100% {
    transform: translateY(0);
    filter: saturate(1);
  }
  50% {
    transform: translateY(-1px);
    filter: saturate(1.15);
  }
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 6, 0.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(520px, 100%);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(12, 12, 13, 0.94);
  box-shadow: var(--shadow);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.token-modal-card {
  width: min(980px, calc(100vw - 48px));
}

.token-sync-secret-card {
  width: min(1240px, calc(100vw - 48px));
}

.token-sync-secret-card .stack-form {
  gap: 16px;
}

.token-sync-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.token-sync-top-field {
  display: grid;
  gap: 4px;
}

.token-sync-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.token-sync-field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.token-sync-field-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.token-sync-field-row button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.token-sync-docs {
  display: grid;
  gap: 14px;
}

.token-sync-doc {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.token-sync-doc-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
}

.token-sync-doc-head strong {
  font-size: 14px;
}

.token-sync-doc-body {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.token-sync-doc-body pre {
  max-width: 100%;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
}

.token-sync-logs {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.token-sync-logs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.token-sync-logs-head strong {
  font-size: 14px;
}

.token-sync-logs-list {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 560px;
  overflow: auto;
}

.token-sync-log-item {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  font-size: 12px;
}

.token-sync-log-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  cursor: pointer;
}

.token-sync-log-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  cursor: pointer;
}

.token-sync-log-status {
  display: inline-flex;
  align-items: center;
  min-width: 34px;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
}

.token-sync-log-status.ok {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.token-sync-log-status.fail {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.token-sync-log-detail {
  display: none;
  gap: 8px;
}

.token-sync-log-item.is-expanded .token-sync-log-detail {
  display: grid;
}

.token-sync-log-detail-block {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.token-sync-log-detail-block pre {
  max-width: 100%;
  margin: 0;
  padding: 8px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.token-sync-logs-error {
  display: grid;
  gap: 8px;
  justify-items: start;
}

@media (max-width: 1100px) {
  .token-sync-top,
  .token-sync-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

.token-provider-marker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token-provider-marker {
  min-height: 32px;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.token-provider-marker:hover,
.token-provider-marker:focus-visible {
  border-color: var(--line-strong);
  background: rgba(222, 24, 44, 0.12);
}

.gitlab-modal-card {
  width: min(1120px, calc(100vw - 48px));
}

.workbench-origin-modal-card {
  width: min(640px, calc(100vw - 40px));
}

.workbench-runtime-upgrade-modal-card {
  width: min(760px, calc(100vw - 40px));
}

.workbench-runtime-upgrade-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  max-height: min(68vh, 680px);
  padding: 20px 24px 0;
  overflow: auto;
}

.workbench-runtime-upgrade-body .bootstrap-status-list {
  display: grid;
  gap: 10px;
  padding: 2px 0 6px;
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 76px;
  align-items: start;
  gap: 12px;
  min-height: 0;
  padding: 13px 14px;
  border: 1px solid rgba(126, 139, 168, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 8px 22px rgba(142, 153, 181, 0.1);
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step.is-running {
  border-color: rgba(178, 122, 17, 0.28);
  background: rgba(255, 249, 232, 0.84);
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step.is-completed {
  border-color: rgba(59, 159, 120, 0.24);
  background: rgba(239, 252, 247, 0.82);
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step.is-failed {
  border-color: rgba(217, 75, 92, 0.24);
  background: rgba(255, 241, 243, 0.84);
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(126, 139, 168, 0.34);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step.is-running .cos-runtime-publish-step-index {
  border-color: #b27a11;
  color: #8a5a00;
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step.is-completed .cos-runtime-publish-step-index {
  border-color: var(--success);
  color: var(--success);
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step.is-failed .cos-runtime-publish-step-index {
  border-color: var(--danger);
  color: var(--danger);
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step-copy strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step-copy p,
.workbench-runtime-upgrade-body .cos-runtime-publish-step-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step-copy p.is-error {
  color: var(--danger);
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.workbench-runtime-upgrade-body .cos-runtime-publish-step .chip {
  justify-self: end;
  width: 66px;
  min-width: 66px;
  min-height: 28px;
  margin-top: 0;
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
}

.workbench-runtime-upgrade-status-card {
  display: grid;
  gap: 7px;
}

.workbench-runtime-upgrade-status-card .bootstrap-status-head {
  margin-bottom: 2px;
}

.workbench-runtime-upgrade-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.workbench-runtime-upgrade-resource-panel {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid rgba(126, 139, 168, 0.18);
  border-radius: 8px;
  background: rgba(248, 250, 255, 0.74);
}

.workbench-runtime-upgrade-resource-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.workbench-runtime-upgrade-resource-title strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.workbench-runtime-upgrade-resource-title span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.workbench-runtime-upgrade-resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workbench-runtime-upgrade-resource-meter {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.workbench-runtime-upgrade-resource-head {
  display: grid;
  grid-template-columns: 16px auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.workbench-runtime-upgrade-resource-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.workbench-runtime-upgrade-resource-head em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-runtime-upgrade-resource-meter.is-empty .workbench-usage {
  opacity: 0.62;
}

.workbench-runtime-upgrade-steps {
  display: grid;
  gap: 6px;
  max-height: 300px;
  margin-top: 8px;
  padding: 8px;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  background: #f8fafc;
}

.workbench-runtime-upgrade-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 7px;
  background: #fff;
}

.workbench-runtime-upgrade-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.88);
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.workbench-runtime-upgrade-step-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workbench-runtime-upgrade-step-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.workbench-runtime-upgrade-step-copy span,
.workbench-runtime-upgrade-step em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.workbench-runtime-upgrade-step em {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.workbench-runtime-upgrade-step.is-running .workbench-runtime-upgrade-step-index {
  background: rgba(254, 243, 199, 0.92);
  color: #a16207;
}

.workbench-runtime-upgrade-step.is-completed .workbench-runtime-upgrade-step-index {
  background: rgba(220, 252, 231, 0.92);
  color: #15803d;
}

.workbench-runtime-upgrade-step.is-failed .workbench-runtime-upgrade-step-index {
  background: rgba(255, 228, 230, 0.92);
  color: #be123c;
}

@media (max-width: 560px) {
  .workbench-runtime-upgrade-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbench-runtime-upgrade-resource-head {
    grid-template-columns: 16px auto;
  }

  .workbench-runtime-upgrade-resource-head em {
    grid-column: 1 / -1;
    text-align: left;
  }

  .workbench-runtime-upgrade-body .cos-runtime-publish-step {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .workbench-runtime-upgrade-body .cos-runtime-publish-step .chip {
    grid-column: 2;
    justify-self: start;
  }

  .workbench-runtime-upgrade-step {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .workbench-runtime-upgrade-step em {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .workbench-runtime-upgrade-resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.workbench-origin-modal-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 20px 24px 0;
  overflow: auto;
}

.workbench-origin-option-list {
  display: grid;
  gap: 10px;
}

.workbench-origin-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.workbench-origin-option:hover,
.workbench-origin-option:focus-within,
.workbench-origin-option.is-selected {
  border-color: var(--line-strong);
  background: rgba(222, 24, 44, 0.08);
}

.workbench-origin-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.workbench-origin-option-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workbench-origin-option-value {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.workbench-origin-option-meta {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.token-usage-modal-layout {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 20px;
  padding: 24px;
  overflow: auto;
}

.token-usage-modal-summary,
.token-usage-modal-tables {
  grid-column: 1 / -1;
}

.token-usage-modal-tables {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 20px;
}

.token-usage-modal-summary .summary-grid {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 16px;
}

.token-usage-modal-summary .summary-item {
  grid-column: span 8;
}

.token-usage-modal-summary .summary-item-value {
  font-size: 16px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.token-usage-panel {
  min-width: 0;
}

.token-usage-panel-full {
  grid-column: 1 / -1;
}

.token-usage-bar-chart {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.token-usage-bar-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  height: 220px;
  padding: 12px 8px 0;
  position: relative;
}

.token-usage-bar-bands {
  position: absolute;
  inset: 12px 8px 0;
  display: grid;
  gap: 0;
  pointer-events: none;
}

.token-usage-bar-band.is-banded {
  background: rgba(255, 255, 255, 0.01);
}

.token-usage-bar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-height: 0;
  padding: 0 1px;
  z-index: 1;
}

.token-usage-bar[data-tooltip],
.token-usage-hourly-bar[data-tooltip] {
  cursor: help;
}

.token-usage-bar-fill {
  display: block;
  width: 100%;
  min-height: 4px;
  background: rgba(255, 255, 255, 0.18);
}

.token-usage-bar.has-value .token-usage-bar-fill {
  background: linear-gradient(180deg, #ff7b86 0%, #de182c 62%, #8f0c18 100%);
}

.token-usage-bar-axis,
.token-usage-bar-summary,
.token-usage-bar-empty {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.token-usage-bar-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  overflow: visible;
}

.token-usage-bar-axis span {
  min-width: max-content;
  white-space: nowrap;
}

.token-usage-tooltip {
  position: fixed;
  z-index: 1200;
  max-width: min(320px, 80vw);
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(8, 8, 9, 0.96);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  box-shadow: var(--shadow);
  white-space: normal;
  overflow-wrap: anywhere;
}

.token-usage-bar-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
}

.gitlab-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px;
  overflow: hidden;
}

.gitlab-modal-form,
.gitlab-modal-result {
  min-width: 0;
}

.gitlab-modal-result {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.bootstrap-command-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.bootstrap-copy-btn {
  width: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
}

.admin-code-block {
  margin: 0;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #1f2328;
  font: 12px/1.6 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.bootstrap-overview-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.bootstrap-status-list {
  display: grid;
  gap: 12px;
}

.bootstrap-status-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.bootstrap-status-item-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.bootstrap-status-item-button.is-active {
  border-color: rgba(222, 24, 44, 0.5);
  background: rgba(222, 24, 44, 0.12);
}

.bootstrap-status-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.bootstrap-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bootstrap-status-head strong {
  font-size: 14px;
}

.bootstrap-steps-shell {
  min-height: 220px;
}

.bootstrap-step-detail {
  min-height: 140px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.bootstrap-step-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bootstrap-step-detail p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.reset-password-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reset-password-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.reset-password-secret-box {
  padding: 14px 16px;
  border: 1px solid rgba(75, 211, 154, 0.28);
  background: rgba(75, 211, 154, 0.08);
  color: #d9fff0;
  font-family: "Courier New", monospace;
  font-size: 16px;
  line-height: 1.6;
  word-break: break-all;
}

.gitlab-modal-result-head {
  display: grid;
  gap: 8px;
}

.gitlab-modal-result-head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.gitlab-modal-result-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding: 24px 24px 18px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(12, 12, 13, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-close-icon-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close-icon-btn:hover {
  border-color: var(--line-strong);
  background: rgba(222, 24, 44, 0.08);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  position: sticky;
  bottom: 0;
  padding: 12px 0 0;
  background: none;
  z-index: 2;
}

.step-flow {
  display: grid;
  gap: 10px;
}

.step-flow-list {
  display: grid;
  gap: 10px;
}

.step-item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.step-item-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  gap: 8px;
  flex-wrap: wrap;
}

.step-item-timer {
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.88;
  color: var(--muted);
}

.step-item-status.is-pending {
  border-color: var(--line);
  color: var(--muted);
}

.step-item-status.is-running {
  border-color: rgba(255, 195, 89, 0.42);
  color: #ffd892;
  background: rgba(255, 195, 89, 0.08);
}

.step-item-status.is-success {
  border-color: rgba(75, 211, 154, 0.35);
  color: #9ef0ca;
  background: rgba(75, 211, 154, 0.08);
}

.step-item-status.is-failed {
  border-color: rgba(255, 77, 95, 0.36);
  color: #ffb1ba;
  background: rgba(255, 77, 95, 0.08);
}

.step-item-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.step-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.step-item-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}

.step-item-meta {
  display: flex;
  justify-content: flex-end;
  min-height: 16px;
}


/* admin-03.css */
@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .admin-shell,
  .admin-app {
    height: auto;
  }

  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-global-header {
    position: static;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: none;
  }

  .admin-global-brand {
    flex: 1 1 auto;
  }

  .admin-global-actions {
    flex: 0 1 auto;
  }

  .admin-global-account {
    max-width: min(340px, 44vw);
  }

  .admin-sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto auto auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
  }

  .admin-content-shell,
  .admin-main {
    height: auto;
    overflow: visible;
  }

  .menu-nav {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: hidden;
    padding-bottom: 4px;
    max-width: 100%;
  }

  .menu-nav::before {
    grid-column: 1 / -1;
  }

  .menu-item:hover {
    transform: none;
  }

  .menu-item {
    min-width: 0;
    padding-right: 12px;
    padding-left: 30px;
  }

  .two-columns,
  .system-grid,
  .overview-grid,
  .enterprise-overview-usage-grid,
  .runtime-monitor-summary,
  .runtime-monitor-grid,
  .rules-admin-grid {
    grid-template-columns: 1fr;
  }

  .overview-column {
    gap: 12px;
  }

  .overview-card-body {
    grid-template-columns: 1fr;
  }

  .rules-side-column,
  .rules-editor-card {
    grid-column: 1 / -1;
  }

  .page-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-toolbar-actions {
    align-items: stretch;
  }

  .enterprise-overview-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .enterprise-overview-toolbar .contract-date-range {
    flex: 1 1 min(320px, 100%);
    min-width: 0;
    width: min(320px, 100%);
    max-width: 100%;
  }

  .enterprise-overview-toolbar > #resetEnterpriseOverviewDateBtn {
    flex: 0 0 42px;
  }

  .page-toolbar-search-group,
  .page-toolbar-button-group {
    width: 100%;
  }

  .enterprise-extension-meta {
    align-self: flex-end;
    max-width: 100%;
  }

  .enterprise-extension-info {
    justify-items: start;
  }

  .enterprise-extension-workbench {
    max-width: 100%;
  }

  .toolbar-search {
    min-width: 0;
  }

  .token-list-toolbar .page-toolbar-actions,
  .token-list-toolbar .page-toolbar-search-group,
  .token-list-toolbar .page-toolbar-button-group {
    flex-wrap: wrap;
  }

  .token-list-toolbar .toolbar-search,
  .token-list-toolbar .toolbar-filter-group {
    flex: 1 1 100%;
  }

  .gitlab-modal-card {
    width: min(1120px, 100%);
  }

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

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

  .gitlab-resource-grid {
    grid-template-columns: 1fr;
  }

  .token-actions-cell {
    width: auto;
    min-width: 0;
  }

  .token-actions-cell .table-actions {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    max-height: none;
  }

  .token-actions-cell .table-actions button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

/* Project language detection and selective metadata replacement. */
.workbench-project-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-language-modal-card {
  width: min(760px, calc(100vw - 32px));
}

body:has(#enterpriseProjectLanguageModal:not(.hidden)) .admin-toast-region {
  display: none;
}

.project-language-result {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.project-language-head,
.project-language-row {
  display: grid;
  grid-template-columns: 120px minmax(120px, 1fr) minmax(140px, 1fr) minmax(160px, 1.1fr);
  align-items: center;
  column-gap: 14px;
}

.project-language-head {
  min-height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(87, 118, 190, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-language-row {
  padding: 16px;
}

.project-language-row + .project-language-row {
  border-top: 1px solid var(--border);
}

.project-language-apply {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.project-language-apply input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.project-language-value,
.project-language-select-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-language-value > span,
.project-language-select-field > span {
  display: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.project-language-value strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-language-value strong.is-detected {
  color: var(--success);
}

.project-language-value strong.is-unknown {
  color: var(--muted);
}

.project-language-select-field select {
  width: 100%;
  min-width: 0;
}

.project-language-evidence {
  grid-column: 2 / -1;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .project-language-head {
    display: none;
  }

  .project-language-row {
    grid-template-columns: 1fr 1fr;
    row-gap: 14px;
  }

  .project-language-apply,
  .project-language-select-field,
  .project-language-evidence {
    grid-column: 1 / -1;
  }

  .project-language-value > span,
  .project-language-select-field > span {
    display: block;
  }
}

/* Environment events are scan-first operational records, so keep one event per table row. */
.workbench-environment-log-modal-card .gitlab-modal-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.workbench-environment-log-modal-card .gitlab-modal-form {
  display: flex;
  justify-content: flex-end;
}

.workbench-environment-log-modal-card .gitlab-modal-form .modal-actions {
  padding: 0;
}

.workbench-environment-log-modal-card .gitlab-modal-result {
  padding: 0;
  border: 0;
  background: transparent;
}

.workbench-environment-log-table-shell {
  max-height: min(48vh, 520px);
}

.workbench-environment-log-table {
  min-width: 1040px;
}

.workbench-environment-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.workbench-environment-log-table th,
.workbench-environment-log-table td {
  padding: 11px 12px;
  vertical-align: top;
  line-height: 1.5;
}

.workbench-environment-log-time {
  width: 150px;
}

.workbench-environment-log-phase {
  width: 118px;
}

.workbench-environment-log-mode {
  width: 150px;
}

.workbench-environment-log-target {
  width: 150px;
}

.workbench-environment-log-runtime {
  width: 230px;
}

.workbench-environment-log-detail-column {
  width: auto;
}

.workbench-environment-log-detail {
  display: grid;
  gap: 5px;
  max-height: 120px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.workbench-environment-log-table .chip {
  white-space: nowrap;
}

.workbench-environment-log-detail .is-error {
  color: var(--danger);
}

@media (max-width: 640px) {
  .login-card,
  .admin-main,
  .admin-sidebar {
    padding: 18px;
  }

  .admin-topbar,
  .panel-card {
    padding: 18px;
  }

  .detail-panel .panel-card > .table-shell {
    width: 100%;
    margin: 0;
  }

  #enterpriseStorageResourceList {
    width: calc(100% + 36px);
  }

  .storage-detail-table-shell {
    width: calc(100% + 36px);
    margin: 0 -18px -18px;
  }

  .storage-table-counts {
    margin-bottom: 16px;
    padding: 12px;
  }

  .storage-table-counts-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .storage-type-link {
    grid-template-columns: 32px minmax(0, 1fr);
    min-width: 132px;
  }

  .storage-type-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .step-item {
    grid-template-columns: 1fr;
  }

  .sidebar-brand {
    padding: 14px 12px;
  }

  .sidebar-brand h2 {
    font-size: 20px;
  }

  .menu-nav {
    grid-auto-columns: minmax(136px, 1fr);
  }

  .menu-item {
    min-height: 50px;
    padding-left: 34px;
  }
}

/* Admin light neumorphic theme aligned with the public download page. */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --brand: #7d95cf;
  --page-bg: #edf0f6;
  --surface: rgba(248, 250, 255, 0.78);
  --surface-soft: rgba(255, 255, 255, 0.62);
  --surface-strong: #ffffff;
  --line: rgba(126, 139, 168, 0.22);
  --line-strong: rgba(135, 156, 217, 0.48);
  --text: #303743;
  --muted: #8790a3;
  --accent: #7d95cf;
  --accent-strong: #a897f1;
  --danger: #d94b5c;
  --success: #3b9f78;
  --shadow: 18px 24px 56px rgba(142, 153, 181, 0.2), -18px -18px 42px rgba(255, 255, 255, 0.86);
  --shadow-soft: 5px 7px 14px rgba(142, 153, 181, 0.12), -5px -5px 12px rgba(255, 255, 255, 0.72);
  --shadow-inset: inset 8px 8px 18px rgba(142, 153, 181, 0.13), inset -8px -8px 18px rgba(255, 255, 255, 0.86);
  --button-glow: inset 0 0 0 1px rgba(255, 255, 255, 0.84), 0 0 0 1px rgba(133, 154, 214, 0.14), 0 0 7px rgba(133, 154, 214, 0.14);
  --button-glow-strong: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(133, 154, 214, 0.2), 0 0 10px rgba(133, 154, 214, 0.18);
  --radius: 8px;
  --page-grid-line: rgba(255, 255, 255, 0.34);
  --page-glow: rgba(219, 231, 255, 0.72);
  --page-glow-alt: rgba(239, 224, 255, 0.58);
  --page-bg-top: #f8f9fd;
  --header-bg: rgba(238, 241, 248, 0.78);
  --sidebar-bg: linear-gradient(145deg, rgba(248, 250, 255, 0.9), rgba(231, 235, 245, 0.72));
  --sidebar-border: rgba(255, 255, 255, 0.74);
  --sidebar-panel: rgba(247, 249, 255, 0.68);
  --sidebar-panel-strong: rgba(255, 255, 255, 0.86);
  --sidebar-inset: rgba(255, 255, 255, 0.72);
  --sidebar-glow: rgba(133, 154, 214, 0.18);
  --card-bg: rgba(247, 249, 255, 0.78);
  --card-elevated: rgba(255, 255, 255, 0.52);
  --field-bg: rgba(247, 249, 255, 0.72);
  --field-focus-bg: rgba(255, 255, 255, 0.9);
  --menu-label: #98a1b3;
  --menu-text: #6d778c;
  --menu-hover-bg: rgba(255, 255, 255, 0.76);
  --menu-hover-text: #303743;
  --menu-marker: rgba(126, 149, 207, 0.28);
  --menu-marker-glow: rgba(126, 149, 207, 0.08);
  --menu-active-bg: linear-gradient(135deg, #dce8ff 0%, #eef1ff 54%, #efe5ff 100%);
  --menu-active-text: #5d72aa;
  --soft-accent-bg: rgba(218, 230, 255, 0.62);
  --soft-accent-strong: rgba(133, 154, 214, 0.28);
  --soft-success-bg: rgba(59, 159, 120, 0.1);
  --soft-danger-bg: rgba(217, 75, 92, 0.1);
  --soft-warning-bg: rgba(245, 158, 11, 0.12);
  --pending-delete-row-bg: rgba(142, 153, 181, 0.08);
  --pending-delete-text: rgba(48, 55, 67, 0.58);
  --pending-delete-link: rgba(48, 55, 67, 0.66);
  --pending-delete-badge-bg: rgba(142, 153, 181, 0.1);
  --pending-delete-badge-border: rgba(126, 139, 168, 0.2);
  --pending-delete-badge-text: rgba(48, 55, 67, 0.64);
  --table-head-bg: rgba(248, 250, 255, 0.74);
  --table-row-hover: rgba(218, 230, 255, 0.38);
  --table-sub-bg: rgba(255, 255, 255, 0.42);
  --code-bg: rgba(248, 250, 255, 0.82);
  --code-input-bg: rgba(255, 255, 255, 0.74);
  --code-highlight-bg: rgba(248, 250, 255, 0.82);
  --code-text: #303743;
  --overlay: rgba(236, 241, 246, 0.72);
  --tooltip-bg: rgba(255, 255, 255, 0.96);
  --modal-fade: linear-gradient(180deg, rgba(248, 250, 255, 0) 0%, rgba(248, 250, 255, 0.98) 18%);
}

body {
  background-color: var(--page-bg);
  background:
    radial-gradient(circle at 22% 18%, var(--page-glow) 0, transparent 30%),
    radial-gradient(circle at 74% 24%, var(--page-glow-alt) 0, transparent 28%),
    linear-gradient(145deg, var(--page-bg-top) 0%, var(--page-bg) 58%, #e6eaf3 100%);
  background-size: auto;
}

.login-card,
.page-toolbar,
.panel-card,
.summary-item,
.table-shell,
.gitlab-resource-card,
.gitlab-resource-panel,
.gitlab-resource-chip,
.gitlab-resource-project,
.gitlab-resource-table-shell,
.gitlab-modal-result,
.step-item,
.checkbox-grid,
.enterprise-extension-meta,
.modal-card,
.admin-global-header,
.suggest-list,
.code-editor,
.bootstrap-overview-card,
.bootstrap-status-item,
.bootstrap-step-detail,
.gitlab-binding-resource-shell,
.workbench-project-subtable-shell {
  background: transparent;
  border-radius: var(--radius);
  box-shadow: none;
}

.list-table-shell {
  background: var(--card-bg);
}

#enterpriseList.list-table-shell,
#workbenchList.list-table-shell {
  scrollbar-gutter: auto;
}

.login-card,
.page-toolbar,
.panel-card,
.modal-card,
.admin-global-header,
.admin-sidebar {
  backdrop-filter: blur(16px);
}

button,
.small,
.field input,
.field select,
.toolbar-search input,
.toolbar-search select,
.toolbar-filter-button,
.segmented-btn,
.permission-pill,
.icon-plain,
.modal-close-icon-btn,
.detail-tab,
.chip,
.page-toolbar-kicker,
.gitlab-resource-group-count-badge,
.gitlab-resource-delete-scheduled-badge {
  border-radius: 999px;
}

.field input,
.field select,
.toolbar-search input,
.toolbar-search select,
.toolbar-filter-button,
.segmented-btn,
.permission-pill,
.icon-plain,
.modal-close-icon-btn,
.detail-tab,
.secondary,
.bootstrap-status-item-button {
  background: var(--field-bg);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: var(--button-glow);
}

.field input:focus,
.field select:focus,
.toolbar-search input:focus,
.toolbar-search select:focus,
.plain-editor:focus,
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  background: var(--field-focus-bg);
  border-color: var(--line-strong);
  box-shadow: var(--button-glow-strong);
}

.primary,
.danger {
  color: #5d72aa;
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: var(--button-glow-strong);
}

.primary {
  background: linear-gradient(135deg, #dce8ff 0%, #eef1ff 52%, #efe5ff 100%);
}

.danger {
  color: #a83e51;
  background: linear-gradient(135deg, #ffe2e7 0%, #fff2f4 55%, #f1e8ff 100%);
}

button:hover,
.secondary:hover,
.detail-tab:hover,
.modal-close-icon-btn:hover,
.icon-plain:hover {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--button-glow-strong);
}

.login-brand h1,
.sidebar-brand h2,
.admin-topbar h1,
.panel-head h2,
.page-toolbar-copy h2,
.modal-head h2,
.gitlab-resource-head h3,
.gitlab-resource-panel-title,
.gitlab-modal-result-head h3 {
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
  color: var(--text);
}

.admin-global-header {
  background: var(--header-bg);
  border-bottom-color: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
}

.admin-sidebar {
  background:
    radial-gradient(circle at 24% 12%, rgba(219, 231, 255, 0.78) 0, transparent 34%),
    var(--sidebar-bg);
  border-right-color: var(--sidebar-border);
  box-shadow: inset -1px 0 0 var(--sidebar-inset), var(--shadow-soft);
}

.sidebar-brand,
.sidebar-badge,
.login-badge,
.brand-badge {
  border-color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--sidebar-panel-strong), var(--sidebar-panel));
  box-shadow: var(--shadow-soft);
}

.menu-group-toggle {
  color: var(--menu-text);
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(247, 249, 255, 0.7);
}

.menu-group-toggle:hover {
  color: var(--menu-hover-text);
  border-color: rgba(255, 255, 255, 0.86);
  background: var(--menu-hover-bg);
}

.menu-group.is-active > .menu-group-toggle {
  color: #5d72aa;
  border-color: rgba(133, 154, 214, 0.24);
  background: var(--soft-accent-bg);
}

.menu-group-items .menu-item {
  min-height: 40px;
  padding-left: 32px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.menu-group-items .menu-item:hover {
  transform: none;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
}

.menu-group-items .menu-item.is-active {
  border-color: transparent;
  background: var(--menu-active-bg);
}

.menu-item {
  min-height: 50px;
  padding-left: 38px;
  border-radius: 8px;
  background: rgba(247, 249, 255, 0.44);
  color: var(--menu-text);
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.menu-item::before {
  border-radius: 50%;
  background: var(--menu-marker);
  box-shadow: 0 0 0 6px var(--menu-marker-glow);
}

.menu-item:hover {
  color: var(--menu-hover-text);
  border-color: rgba(255, 255, 255, 0.82);
  background: var(--menu-hover-bg);
  box-shadow: var(--shadow-soft);
}

.menu-item.is-active {
  color: var(--menu-active-text);
  background: var(--menu-active-bg);
  border-color: var(--line-strong);
  box-shadow: var(--button-glow-strong);
}

.menu-item.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(126, 149, 207, 0.12);
}

.menu-item.is-active::after {
  background: linear-gradient(180deg, #a9bdf0 0, var(--accent) 100%);
  box-shadow: 0 0 12px rgba(126, 149, 207, 0.22);
}

.sidebar-logout {
  color: var(--menu-hover-text);
  background: var(--field-bg);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: var(--button-glow);
}

.page-toolbar {
  border-radius: 8px;
}

.page-toolbar-kicker,
.gitlab-resource-group-count-badge {
  background: var(--soft-accent-bg);
  border-color: var(--soft-accent-strong);
  color: #5d72aa;
}

.field select option,
.field select optgroup,
select option,
select optgroup {
  color: #303743;
  background: #ffffff;
}

.suggest-item {
  color: var(--text);
  border-bottom-color: var(--line);
}

.suggest-item:hover,
.gitlab-resource-chip:hover,
.gitlab-resource-project:hover,
.modal-close-icon-btn:hover {
  background: var(--soft-accent-bg);
}

.code-editor,
.plain-editor,
.admin-code-block {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.76);
  background: var(--code-bg);
  color: var(--code-text);
  box-shadow: var(--shadow-inset);
}

.code-editor-input {
  background: var(--code-input-bg);
  color: var(--code-text);
  caret-color: var(--accent);
}

.code-editor-highlight {
  color: var(--code-text);
  background: var(--code-highlight-bg);
}

.code-editor-input::placeholder {
  color: #a1aabc;
}

.code-editor-input::-webkit-scrollbar-thumb,
.code-editor-highlight::-webkit-scrollbar-thumb {
  background: rgba(126, 139, 168, 0.24);
}

.code-token-key { color: #4f6fb3; }
.code-token-string { color: #3b9f78; }
.code-token-number { color: #9a6b16; }
.code-token-boolean { color: #8b5bbd; }
.code-token-comment { color: #94a0b4; }
.code-token-punct { color: #566174; }

.admin-toast {
  border-color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(247, 249, 255, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
}

.enterprise-detail-title-icon,
.enterprise-icon-thumb,
.enterprise-icon-preview,
.enterprise-icon-upload-zone,
.checkbox-grid,
.summary-item,
.data-table th,
.gitlab-modal-result,
.gitlab-resource-panel,
.gitlab-resource-chip,
.gitlab-resource-project,
.gitlab-resource-group-row td,
.workbench-project-subtable-row > td,
.gitlab-binding-resource-row > td,
.token-usage-bar-band.is-banded,
.bootstrap-overview-card,
.bootstrap-status-item,
.bootstrap-step-detail,
.token-plain-result,
.gitlab-resource-card {
  background: var(--card-elevated);
  border-color: rgba(255, 255, 255, 0.72);
}

.table-shell,
.gitlab-resource-table-shell {
  overflow: auto;
  max-width: 100%;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior-x: contain;
}

.table-shell::-webkit-scrollbar,
.gitlab-resource-table-shell::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-shell::-webkit-scrollbar-track,
.gitlab-resource-table-shell::-webkit-scrollbar-track {
  background: transparent;
}

.table-shell::-webkit-scrollbar-thumb,
.gitlab-resource-table-shell::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(126, 139, 168, 0.36);
  background-clip: content-box;
}

.table-shell::-webkit-scrollbar-corner,
.gitlab-resource-table-shell::-webkit-scrollbar-corner {
  background: transparent;
}

.token-list-table-shell {
  max-height: calc(100vh - 250px);
  min-height: 220px;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}

.data-table th,
.data-table td {
  border-bottom-color: rgba(126, 139, 168, 0.16);
}

.data-table th {
  color: var(--muted);
  background: var(--table-head-bg);
}

.token-list-table-shell .data-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.18);
}

.data-table tbody tr:hover {
  background: var(--table-row-hover);
}

.workbench-project-subtable {
  border-color: var(--line);
}

.detail-tab.is-active,
.permission-pill.active,
.bootstrap-status-item-button.is-active {
  color: #5d72aa;
  background: var(--soft-accent-bg);
  border-color: var(--line-strong);
  box-shadow: var(--button-glow);
}

.chip.active {
  color: #0f684c;
  background: var(--soft-success-bg);
  border-color: rgba(59, 159, 120, 0.28);
}

.chip.disabled {
  color: #a83e51;
  background: var(--soft-danger-bg);
  border-color: rgba(217, 75, 92, 0.24);
}

.chip.warning,
.gitlab-resource-delete-scheduled-badge,
.step-item-status.is-running {
  color: #8a5800;
  background: var(--soft-warning-bg);
  border-color: rgba(245, 158, 11, 0.28);
}

.summary-item {
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.workbench-usage-bar,
.workbench-sparkline-chart {
  border-radius: 999px;
  border-color: rgba(126, 139, 168, 0.14);
}

.workbench-usage-fill,
.token-usage-hourly-bar.has-value .token-usage-hourly-bar-fill,
.token-usage-bar.has-value .token-usage-bar-fill,
.workbench-sparkbar-fill {
  border-radius: 999px;
  background: linear-gradient(180deg, #a9bdf0 0%, var(--accent) 70%, #6c86c5 100%);
}

.token-usage-hourly-bar-fill,
.token-usage-bar-fill {
  border-radius: 999px;
  background: rgba(126, 139, 168, 0.18);
}

.empty-state {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.modal-layer {
  background: var(--overlay);
  backdrop-filter: blur(12px);
}

.modal-layer:not(.hidden) {
  background: rgba(21, 28, 43, 0.18);
  backdrop-filter: blur(4px);
}

.modal-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(28, 38, 58, 0.28), 0 8px 24px rgba(28, 38, 58, 0.16);
}

.modal-head {
  background: rgba(247, 249, 255, 0.94);
  border-bottom-color: var(--line);
}

.modal-actions {
  background: none;
}

.token-usage-tooltip {
  border-color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--tooltip-bg);
  box-shadow: var(--shadow-soft);
}

.reset-password-secret-box,
.step-item-status.is-success {
  border-color: rgba(59, 159, 120, 0.28);
  background: var(--soft-success-bg);
  color: #0f684c;
}

.step-item-status.is-failed {
  border-color: rgba(217, 75, 92, 0.28);
  color: #a83e51;
  background: var(--soft-danger-bg);
}

.gitlab-resource-delete-btn.is-pending {
  box-shadow: var(--button-glow-strong);
}

.gitlab-resource-delete-btn.is-pending::before {
  background:
    radial-gradient(circle at 3px 50%, var(--accent) 0 1.5px, transparent 1.9px),
    radial-gradient(circle at 9px 50%, var(--accent) 0 1.5px, transparent 1.9px),
    radial-gradient(circle at 15px 50%, var(--accent) 0 1.5px, transparent 1.9px);
}

.gitlab-resource-group-link:hover,
.gitlab-resource-project-link:hover,
.data-table-primary-link:hover {
  color: var(--accent);
}

.login-theme-actions,
.admin-theme-toggle {
  display: none !important;
}

@media (max-width: 640px) {
  .login-card,
  .admin-main,
  .admin-sidebar {
    padding: 18px;
  }
}

.rules-page-toolbar {
  min-height: 54px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
}

.rules-content-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.admin-main:has(.rules-content-view) {
  overflow: hidden;
}

.rules-content-view .global-message {
  min-height: 0;
}

.rules-admin-grid {
  height: auto;
  min-height: 0;
}

.rules-page-toolbar .page-toolbar-copy {
  gap: 0;
}

.rules-page-toolbar .page-toolbar-copy h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 20px;
  line-height: 1.35;
}

.rules-file-title-item {
  display: inline-flex;
  align-items: center;
  max-width: min(360px, 100%);
  min-height: 28px;
  padding: 3px 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}

.rules-file-title-item:hover,
.rules-file-title-item:focus-visible {
  background: rgba(239, 246, 255, 0.9);
}

.rules-file-title-item.is-active {
  border-color: var(--line-strong);
  background: rgba(126, 149, 207, 0.18);
  color: var(--accent);
}

.rules-file-title-item.is-aggregate {
  border-color: rgba(78, 112, 190, 0.32);
  background: rgba(239, 246, 255, 0.86);
  font-family: inherit;
  font-weight: 900;
}

.rules-editor-card {
  padding: 0;
  border-radius: 8px;
  grid-template-rows: auto minmax(0, 1fr);
}

.rules-enterprise-card {
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.rules-editor-tab {
  border-radius: 0;
  box-shadow: none;
}

.rules-plain-editor,
.rules-plain-editor:focus {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.storage-type-segmented {
  overflow: hidden;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.storage-type-segmented .segmented-btn,
.storage-type-segmented .segmented-btn:first-child,
.storage-type-segmented .segmented-btn:last-child {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.storage-type-segmented .segmented-btn + .segmented-btn {
  margin-left: 0;
  border-left: 1px solid var(--line);
}

.storage-type-segmented .segmented-btn.is-active {
  border-left-color: transparent;
  background: linear-gradient(135deg, rgba(143, 12, 24, 0.92) 0%, rgba(222, 24, 44, 0.92) 55%, rgba(255, 48, 72, 0.9) 100%);
}

.storage-type-segmented .segmented-btn.is-active + .segmented-btn {
  border-left-color: transparent;
}

.admin-shell {
  --radius: 8px;
  --radius-sm: 4px;
}

.admin-shell button,
.admin-shell input,
.admin-shell select,
.admin-shell textarea,
.admin-shell .page-toolbar,
.admin-shell .panel-card,
.admin-shell .table-shell,
.admin-shell .summary-item,
.admin-shell .admin-insight-item,
.admin-shell .admin-audit-note,
.admin-shell .empty-state,
.admin-shell .checkbox-grid,
.admin-shell .toolbar-filter-button,
.admin-shell .token-provider-marker,
.admin-shell .plain-editor,
.admin-shell .code-editor,
.admin-shell .admin-code-block,
.admin-shell .enterprise-icon-upload-zone,
.admin-shell .certificate-domain-row,
.admin-shell .modal-card {
  border-radius: var(--radius);
}

.admin-shell .segmented-btn,
.admin-shell .storage-type-segmented .segmented-btn,
.admin-shell .rules-editor-tab,
.admin-shell .rules-plain-editor,
.admin-shell .rules-plain-editor:focus {
  border-radius: 0;
}

.admin-shell .segmented-btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.admin-shell .segmented-btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.admin-shell .chip,
.admin-shell .token-provider-marker-count,
.admin-shell .runtime-monitor-chart-legend i,
.admin-shell .overview-top-bar,
.admin-shell .overview-top-bar i,
.admin-shell .workbench-update-channel-switch,
.admin-shell .workbench-update-channel-thumb {
  border-radius: 999px;
}

.admin-shell .sidebar-badge,
.admin-shell .login-badge,
.admin-shell .rules-enterprise-avatar,
.admin-shell .workbench-user-avatar {
  border-radius: 50%;
}

.admin-insight-strip > .admin-skeleton-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: 1 / -1;
  height: 116px;
  min-height: 116px;
  max-height: 116px;
}

.admin-insight-strip > .admin-skeleton-summary .admin-skeleton-card {
  height: 116px;
  min-height: 116px;
  max-height: 116px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.admin-skeleton-table {
  display: grid;
  min-height: 260px;
  align-content: start;
}

.admin-skeleton-table .admin-skeleton-row {
  min-height: 42px;
}

.admin-skeleton-line {
  min-width: 64px;
}

.overview-content-view .admin-audit-note.hidden {
  display: none !important;
}

.overview-content-view #overviewActionHint {
  margin-top: -6px;
}

.admin-shell .page-toolbar-actions,
.admin-shell .page-toolbar-search-group,
.admin-shell .page-toolbar-button-group {
  align-items: center;
}

.admin-shell .page-toolbar .toolbar-search {
  display: inline-flex;
  align-items: center;
}

.admin-shell .page-toolbar .toolbar-search input,
.admin-shell .page-toolbar .toolbar-search select {
  width: 100%;
  min-height: 42px;
}

.admin-shell .page-toolbar .admin-icon-action {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  line-height: 1;
}

@media (max-width: 1100px) {
  .admin-insight-strip > .admin-skeleton-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-insight-strip > .admin-skeleton-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

.runtime-monitor-view .runtime-monitor-insight-skeleton {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  grid-column: 1 / -1;
  height: auto;
  min-height: 0;
  max-height: none;
}

.runtime-monitor-view .runtime-monitor-insight-skeleton-card {
  height: 116px;
  min-height: 116px;
  max-height: 116px;
  align-content: space-between;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.runtime-monitor-view .runtime-monitor-skeleton-value {
  width: 34%;
  height: 22px;
}

.runtime-monitor-view .runtime-monitor-alert-skeleton {
  display: grid;
  grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 18px;
  width: 100%;
}

.runtime-monitor-view .runtime-monitor-alert-skeleton-title {
  width: 72px;
}

.runtime-monitor-summary-skeleton {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 58px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.52);
}

.runtime-monitor-summary-skeleton .admin-skeleton-line {
  margin: 0;
}

.runtime-monitor-summary-skeleton-label {
  width: 42%;
}

.runtime-monitor-summary-skeleton-value {
  width: 56%;
  height: 18px;
}

.runtime-monitor-summary-skeleton-meta {
  width: 34%;
  height: 10px;
}

.runtime-monitor-chart-skeleton {
  display: grid;
  gap: 14px;
  padding: 18px;
  min-height: 313px;
  width: 100%;
  background: rgba(255, 255, 255, 0.28);
}

.runtime-monitor-chart-skeleton-plot {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, rgba(126, 139, 168, 0.18) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(248, 250, 252, 0.12));
}

.runtime-monitor-chart-skeleton-curve {
  position: absolute;
  left: 8%;
  right: 7%;
  height: 42%;
  border-bottom: 2px solid rgba(126, 154, 215, 0.56);
  border-radius: 0 0 var(--radius) var(--radius);
  transform: skewX(-18deg);
}

.runtime-monitor-chart-skeleton-curve.is-primary {
  bottom: 24%;
  background: linear-gradient(180deg, transparent, rgba(217, 75, 92, 0.12));
}

.runtime-monitor-chart-skeleton-curve.is-secondary {
  bottom: 38%;
  border-bottom-style: dashed;
  border-bottom-color: rgba(91, 105, 132, 0.5);
}

.runtime-monitor-chart-skeleton-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.runtime-monitor-chart-skeleton-footer .admin-skeleton-line {
  max-width: 150px;
}

.runtime-monitor-table-skeleton {
  display: grid;
  gap: 10px;
  min-height: 313px;
  padding: 18px;
  align-content: start;
  width: 100%;
}

.runtime-monitor-table-skeleton-row {
  display: grid;
  grid-template-columns: repeat(var(--runtime-skeleton-columns, 6), minmax(54px, 1fr));
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
}

.runtime-monitor-table-skeleton-row:first-child {
  background: rgba(255, 255, 255, 0.44);
}

@media (max-width: 1100px) {
  .runtime-monitor-view .runtime-monitor-insight-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .runtime-monitor-view .runtime-monitor-insight-skeleton {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-view .runtime-monitor-alert-skeleton {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-table-skeleton {
    min-height: 284px;
  }

  .runtime-monitor-table-skeleton-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-table-skeleton-row .admin-skeleton-line:nth-child(n+3) {
    display: none;
  }
}

/* Admin UI alignment pass. */
.sidebar-brand h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: min(100%, 168px);
  white-space: nowrap;
  overflow: visible;
}

.admin-dev-badge {
  position: static;
  left: auto;
  top: auto;
  flex: 0 0 auto;
  min-width: 32px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  line-height: 18px;
}

.page-toolbar {
  align-items: center;
  min-height: 68px;
}

.page-toolbar-copy {
  display: none;
}

.page-toolbar-copy > h2,
.page-toolbar-copy .admin-breadcrumb,
.enterprise-detail-title-row > h2,
.enterprise-detail-title-icon {
  display: none;
}

.page-toolbar:has(.enterprise-detail-title-row) .page-toolbar-copy {
  display: block;
}

.page-toolbar:has(.admin-breadcrumb),
.page-toolbar:has(.enterprise-detail-title-row),
.page-toolbar:has(#storageResourceDetailTitle) {
  display: none;
}

.page-toolbar-actions {
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.page-toolbar-search-group {
  flex: 1 1 auto;
  justify-content: flex-start;
  align-items: center;
}

.page-toolbar-button-group,
.page-toolbar > .page-toolbar-actions > button,
.page-toolbar > .page-toolbar-actions > a {
  margin-left: auto;
}

.toolbar-search,
.overview-range-control,
.runtime-monitor-range-control,
.token-list-toolbar .toolbar-search {
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
}

.toolbar-search input,
.toolbar-search select,
.rules-search-control input {
  width: 100%;
  min-height: 42px;
}

.token-list-toolbar .page-toolbar-actions,
.token-list-toolbar .page-toolbar-search-group {
  flex-wrap: nowrap;
}

.token-list-toolbar .toolbar-filter-group {
  flex: 1 1 auto;
  min-width: 240px;
}

.data-table th:last-child,
.data-table td:last-child,
.token-actions-cell,
.workbench-actions-cell,
.gitlab-resource-action-cell,
.workbench-project-actions-cell {
  text-align: left;
}

.table-actions,
.token-actions-cell .table-actions,
.workbench-actions-cell .table-actions,
.gitlab-resource-action-cell .table-actions,
.workbench-project-actions {
  justify-content: flex-start;
  justify-items: start;
}

.admin-insight-item,
.admin-insight-item.is-success,
.admin-insight-item.is-warning,
.admin-insight-item.is-danger,
.admin-insight-item.is-disabled,
.summary-item,
.summary-item-accent {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(247, 249, 255, 0.78);
}

.admin-insight-item::before,
.summary-item::before {
  display: none;
}

.overview-card-body {
  grid-template-columns: minmax(0, 1.24fr) minmax(220px, 0.76fr);
  align-items: stretch;
}

.panel-card.overview-card {
  min-height: 310px;
}

.overview-trend-pane {
  min-height: 234px;
}

.overview-chart {
  gap: 8px;
}

.overview-chart svg {
  height: 210px;
}

.overview-chart-empty {
  min-height: 210px;
}

.overview-top-item.is-selected,
.rules-project-item.is-selected,
.workbench-origin-option.is-selected,
.bootstrap-status-item-button.is-active,
.detail-tab.is-active,
.rules-editor-tab.is-active,
.rules-summary-inner-tab.is-active,
.toolbar-filter-button.is-active,
.permission-pill.active,
.segmented-btn.is-active {
  color: #4f659f;
  border-color: rgba(126, 149, 207, 0.54);
  background: linear-gradient(135deg, rgba(220, 232, 255, 0.92), rgba(245, 241, 255, 0.78));
  box-shadow: inset 3px 0 0 var(--accent), var(--button-glow-strong);
}

.overview-top-item.is-selected::before {
  background: transparent;
}

.checkbox-line input[type="checkbox"],
.rules-suggestion-item input[type="checkbox"],
.rules-project-suggestion-item input[type="checkbox"],
.permission-editor-grid input[type="checkbox"],
.checkbox-grid input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

@media (max-width: 980px) {
  .page-toolbar-actions,
  .token-list-toolbar .page-toolbar-actions,
  .token-list-toolbar .page-toolbar-search-group {
    flex-wrap: wrap;
  }

  .toolbar-search,
  .overview-range-control,
  .runtime-monitor-range-control,
  .token-list-toolbar .toolbar-search {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .page-toolbar-button-group {
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* Final terminal overrides. Keep this block last. */
.overview-card-body {
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.55fr);
}

.overview-trend-pane,
.overview-top-list,
.overview-top-item,
.overview-top-copy,
.overview-top-copy strong {
  min-width: 0;
}

.overview-top-copy strong {
  overflow-wrap: anywhere;
}

.checkbox-line input[type="checkbox"],
.rules-suggestion-item input[type="checkbox"],
.rules-project-suggestion-item input[type="checkbox"],
.permission-editor-grid input[type="checkbox"],
.checkbox-grid input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-content: center;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  border: 1px solid rgba(164, 176, 204, 0.82);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 2px rgba(111, 129, 168, 0.12);
}

.checkbox-line input[type="checkbox"]::after,
.rules-suggestion-item input[type="checkbox"]::after,
.rules-project-suggestion-item input[type="checkbox"]::after,
.permission-editor-grid input[type="checkbox"]::after,
.checkbox-grid input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: transparent;
  transform: scale(0);
  transition: transform 120ms ease, background 120ms ease;
}

.checkbox-line input[type="checkbox"]:checked,
.rules-suggestion-item input[type="checkbox"]:checked,
.rules-project-suggestion-item input[type="checkbox"]:checked,
.permission-editor-grid input[type="checkbox"]:checked,
.checkbox-grid input[type="checkbox"]:checked {
  border-color: rgba(111, 143, 220, 0.95);
  background: rgba(233, 239, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.16);
}

.checkbox-line input[type="checkbox"]:checked::after,
.rules-suggestion-item input[type="checkbox"]:checked::after,
.rules-project-suggestion-item input[type="checkbox"]:checked::after,
.permission-editor-grid input[type="checkbox"]:checked::after,
.checkbox-grid input[type="checkbox"]:checked::after {
  background: #6f8fdc;
  transform: scale(1);
}

@media (max-width: 1100px) {
  .overview-card-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Terminal order fixes: keep overview charts wide and checkbox states custom. */
.overview-card-body {
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.55fr);
}

.overview-top-list {
  min-width: 0;
}

.overview-top-item {
  min-width: 0;
}

.overview-top-copy {
  min-width: 0;
}

.overview-top-copy strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.checkbox-line input[type="checkbox"],
.rules-suggestion-item input[type="checkbox"],
.rules-project-suggestion-item input[type="checkbox"],
.permission-editor-grid input[type="checkbox"],
.checkbox-grid input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-content: center;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  border: 1px solid rgba(164, 176, 204, 0.82);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 2px rgba(111, 129, 168, 0.12);
}

.checkbox-line input[type="checkbox"]::after,
.rules-suggestion-item input[type="checkbox"]::after,
.rules-project-suggestion-item input[type="checkbox"]::after,
.permission-editor-grid input[type="checkbox"]::after,
.checkbox-grid input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: transparent;
  transform: scale(0);
  transition: transform 120ms ease, background 120ms ease;
}

.checkbox-line input[type="checkbox"]:checked,
.rules-suggestion-item input[type="checkbox"]:checked,
.rules-project-suggestion-item input[type="checkbox"]:checked,
.permission-editor-grid input[type="checkbox"]:checked,
.checkbox-grid input[type="checkbox"]:checked {
  border-color: rgba(111, 143, 220, 0.95);
  background: rgba(233, 239, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.16);
}

.checkbox-line input[type="checkbox"]:checked::after,
.rules-suggestion-item input[type="checkbox"]:checked::after,
.rules-project-suggestion-item input[type="checkbox"]:checked::after,
.permission-editor-grid input[type="checkbox"]:checked::after,
.checkbox-grid input[type="checkbox"]:checked::after {
  background: #6f8fdc;
  transform: scale(1);
}

@media (max-width: 1100px) {
  .overview-card-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Final review refinements. */
.overview-card-body {
  grid-template-columns: minmax(0, 1.34fr) minmax(200px, 0.66fr);
}

.overview-top-list {
  min-width: 0;
}

.data-table th:last-child {
  width: 220px;
  min-width: 220px;
}

.checkbox-line input[type="checkbox"],
.rules-suggestion-item input[type="checkbox"],
.rules-project-suggestion-item input[type="checkbox"],
.permission-editor-grid input[type="checkbox"],
.checkbox-grid input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-content: center;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  border: 1px solid rgba(164, 176, 204, 0.82);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 2px rgba(111, 129, 168, 0.12);
}

.checkbox-line input[type="checkbox"]::after,
.rules-suggestion-item input[type="checkbox"]::after,
.rules-project-suggestion-item input[type="checkbox"]::after,
.permission-editor-grid input[type="checkbox"]::after,
.checkbox-grid input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: transparent;
  transform: scale(0);
  transition: transform 120ms ease, background 120ms ease;
}

.checkbox-line input[type="checkbox"]:checked,
.rules-suggestion-item input[type="checkbox"]:checked,
.rules-project-suggestion-item input[type="checkbox"]:checked,
.permission-editor-grid input[type="checkbox"]:checked,
.checkbox-grid input[type="checkbox"]:checked {
  border-color: rgba(111, 143, 220, 0.95);
  background: rgba(233, 239, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.16);
}

.checkbox-line input[type="checkbox"]:checked::after,
.rules-suggestion-item input[type="checkbox"]:checked::after,
.rules-project-suggestion-item input[type="checkbox"]:checked::after,
.permission-editor-grid input[type="checkbox"]:checked::after,
.checkbox-grid input[type="checkbox"]:checked::after {
  background: #6f8fdc;
  transform: scale(1);
}

.page-toolbar:has(.admin-breadcrumb),
.page-toolbar:has(.enterprise-detail-title-row),
.page-toolbar:has(#storageResourceDetailTitle) {
  display: flex;
}

.rules-page-toolbar {
  display: none;
}

.menu-item.is-active {
  color: #4f659f;
  border-color: rgba(126, 149, 207, 0.54);
  background: linear-gradient(135deg, rgba(220, 232, 255, 0.94), rgba(245, 241, 255, 0.82));
  box-shadow: inset 4px 0 0 var(--accent), var(--button-glow-strong);
}

.menu-item.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(126, 149, 207, 0.14);
}

.menu-item.is-active::after {
  display: none;
}

/* Admin UI consistency pass for July 9 review. */
.sidebar-brand {
  grid-template-columns: auto minmax(0, 1fr);
}

.sidebar-brand > div:last-child {
  min-width: 0;
  overflow: visible;
}

.sidebar-brand h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
  line-height: 1;
}

.admin-dev-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 36px;
  height: 20px;
  padding: 0 8px;
  line-height: 20px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  letter-spacing: 0;
}

.page-toolbar {
  min-height: 68px;
  align-items: center;
}

.page-toolbar-copy {
  display: none;
}

.page-toolbar-copy > h2,
.page-toolbar-copy .admin-breadcrumb,
.enterprise-detail-title-row > h2,
.enterprise-detail-title-icon,
.rules-page-toolbar {
  display: none;
}

.page-toolbar:has(.admin-breadcrumb),
.page-toolbar:has(.enterprise-detail-title-row),
.page-toolbar:has(#storageResourceDetailTitle) {
  display: flex;
}

.page-toolbar:has(.enterprise-detail-title-row) .page-toolbar-copy {
  display: block;
}

.page-toolbar-actions {
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
}

.page-toolbar-search-group {
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
}

.page-toolbar-button-group,
.page-toolbar > .page-toolbar-actions > button,
.page-toolbar > .page-toolbar-actions > a {
  margin-left: auto;
}

.page-toolbar-button-group {
  justify-content: flex-end;
}

.toolbar-search,
.overview-range-control,
.runtime-monitor-range-control,
.token-list-toolbar .toolbar-search,
.rules-search-control {
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
}

.toolbar-search input,
.toolbar-search select,
.rules-search-control input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
}

.token-list-toolbar .page-toolbar-actions,
.token-list-toolbar .page-toolbar-search-group {
  flex-wrap: nowrap;
}

.token-list-toolbar .toolbar-filter-group {
  flex: 1 1 auto;
  min-width: 240px;
}

.admin-insight-item,
.admin-insight-item.is-success,
.admin-insight-item.is-warning,
.admin-insight-item.is-danger,
.admin-insight-item.is-disabled,
.summary-item,
.summary-item-accent {
  border-color: rgba(210, 218, 236, 0.78);
  background: rgba(247, 249, 255, 0.86);
  box-shadow: 0 10px 26px rgba(142, 153, 181, 0.12);
}

.admin-insight-item::before,
.summary-item::before {
  display: none;
}

.overview-grid {
  align-items: stretch;
  gap: 16px;
}

.overview-column {
  align-content: stretch;
  gap: 16px;
}

.panel-card.overview-card {
  min-height: 334px;
  height: 100%;
  align-content: stretch;
}

.overview-card-body {
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.88fr);
  align-items: stretch;
  height: 100%;
  gap: 16px;
}

.overview-trend-pane {
  min-height: 258px;
}

.overview-chart {
  gap: 8px;
}

.overview-chart svg {
  height: 234px;
}

.overview-chart-empty {
  min-height: 234px;
}

.data-table th:last-child,
.data-table td:last-child {
  text-align: left;
}

.data-table td:last-child:has(.table-actions),
.token-actions-cell,
.workbench-actions-cell,
.gitlab-resource-action-cell,
.workbench-project-actions-cell {
  width: 220px;
  min-width: 220px;
  text-align: left;
}

.data-table td:last-child:has(.table-actions) {
  padding-left: 16px;
}

.table-actions,
.token-actions-cell .table-actions,
.workbench-actions-cell .table-actions,
.gitlab-resource-action-cell .table-actions,
.workbench-project-actions {
  width: 100%;
  justify-content: flex-start;
  justify-items: start;
  justify-self: start;
}

.token-actions-cell .table-actions {
  grid-template-columns: repeat(2, minmax(78px, max-content));
}

.overview-top-item.is-selected,
.rules-project-item.is-selected,
.workbench-origin-option.is-selected,
.bootstrap-status-item-button.is-active,
.detail-tab.is-active,
.rules-editor-tab.is-active,
.rules-summary-inner-tab.is-active,
.toolbar-filter-button.is-active,
.permission-pill.active,
.segmented-btn.is-active,
.menu-item.is-active {
  color: #4f659f;
  border-color: rgba(126, 149, 207, 0.56);
  background: linear-gradient(135deg, rgba(222, 233, 255, 0.95), rgba(246, 242, 255, 0.84));
  box-shadow: inset 3px 0 0 var(--accent), 0 12px 28px rgba(126, 149, 207, 0.18);
}

.menu-item.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(126, 149, 207, 0.14);
}

.menu-item.is-active::after,
.overview-top-item.is-selected::before {
  display: none;
}

.checkbox-line input[type="checkbox"],
.rules-suggestion-item input[type="checkbox"],
.rules-project-suggestion-item input[type="checkbox"],
.permission-editor-grid input[type="checkbox"],
.checkbox-grid input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6f8fdc;
}

@media (max-width: 1100px) {
  .overview-card-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel-card.overview-card {
    min-height: 0;
  }
}

@media (max-width: 980px) {
  .page-toolbar-actions,
  .token-list-toolbar .page-toolbar-actions,
  .token-list-toolbar .page-toolbar-search-group {
    flex-wrap: wrap;
  }

  .toolbar-search,
  .overview-range-control,
  .runtime-monitor-range-control,
  .token-list-toolbar .toolbar-search,
  .rules-search-control {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .page-toolbar-button-group {
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* Absolute final overrides. Keep this block at EOF. */
.overview-card-body {
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.55fr);
}

.overview-trend-pane,
.overview-top-list,
.overview-top-item,
.overview-top-copy,
.overview-top-copy strong {
  min-width: 0;
}

.overview-top-copy strong {
  overflow-wrap: anywhere;
}

.checkbox-line input[type="checkbox"],
.rules-suggestion-item input[type="checkbox"],
.rules-project-suggestion-item input[type="checkbox"],
.permission-editor-grid input[type="checkbox"],
.checkbox-grid input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-content: center;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  border: 1px solid rgba(164, 176, 204, 0.82);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 2px rgba(111, 129, 168, 0.12);
}

.checkbox-line input[type="checkbox"]::after,
.rules-suggestion-item input[type="checkbox"]::after,
.rules-project-suggestion-item input[type="checkbox"]::after,
.permission-editor-grid input[type="checkbox"]::after,
.checkbox-grid input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: transparent;
  transform: scale(0);
  transition: transform 120ms ease, background 120ms ease;
}

.checkbox-line input[type="checkbox"]:checked,
.rules-suggestion-item input[type="checkbox"]:checked,
.rules-project-suggestion-item input[type="checkbox"]:checked,
.permission-editor-grid input[type="checkbox"]:checked,
.checkbox-grid input[type="checkbox"]:checked {
  border-color: rgba(111, 143, 220, 0.95);
  background: rgba(233, 239, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.16);
}

.checkbox-line input[type="checkbox"]:checked::after,
.rules-suggestion-item input[type="checkbox"]:checked::after,
.rules-project-suggestion-item input[type="checkbox"]:checked::after,
.permission-editor-grid input[type="checkbox"]:checked::after,
.checkbox-grid input[type="checkbox"]:checked::after {
  background: #6f8fdc;
  transform: scale(1);
}

@media (max-width: 1100px) {
  .overview-card-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Overview usage summary cards. */
.overview-content-view > .admin-insight-strip {
  grid-template-columns: minmax(190px, 1.05fr) repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.overview-content-view .admin-insight-item {
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  padding: 14px 16px;
  grid-template-rows: auto minmax(0, auto) auto;
  align-content: space-between;
  overflow: visible;
}

.overview-content-view .admin-insight-label {
  font-size: 12px;
  font-weight: 800;
}

.overview-content-view .admin-insight-value {
  align-self: center;
  font-size: 24px;
  line-height: 1.12;
}

.overview-content-view .admin-insight-meta {
  color: #7d8aa5;
  font-size: 12px;
  line-height: 1.35;
  display: block;
  white-space: nowrap;
  overflow: visible;
}

.overview-content-view .admin-insight-meta-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1320px) {
  .overview-content-view > .admin-insight-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .overview-content-view > .admin-insight-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Overview insight full-text tooltip. */
.overview-content-view .admin-insight-meta {
  position: relative;
  outline: none;
  cursor: help;
  z-index: 2;
}

.overview-content-view .admin-insight-meta::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: max-content;
  max-width: min(420px, 72vw);
  padding: 8px 10px;
  border: 1px solid rgba(180, 191, 218, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #2f3748;
  box-shadow: 0 14px 32px rgba(91, 103, 132, 0.18);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.overview-content-view .admin-insight-meta:hover::after,
.overview-content-view .admin-insight-meta:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.overview-content-view .admin-insight-meta::after {
  display: none;
}

/* Enterprise detail usage charts mirror overview chart sizing and selection. */
.enterprise-overview-usage-grid {
  gap: 16px;
}

.enterprise-overview-usage-card {
  min-height: 334px;
  height: 100%;
  align-content: stretch;
}

.enterprise-overview-usage-card .overview-card-body {
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.55fr);
  align-items: stretch;
  height: 100%;
  gap: 16px;
}

.enterprise-overview-usage-card .overview-trend-pane {
  min-height: 258px;
}

.enterprise-overview-usage-card .overview-chart svg {
  height: 234px;
}

.enterprise-overview-usage-card .overview-chart-empty {
  min-height: 234px;
}

.enterprise-overview-usage-card .overview-chart-tooltip-card {
  width: min(var(--overview-tooltip-width), calc(100vw - 32px));
}

.enterprise-overview-usage-card.is-loading .overview-card-body,
.enterprise-overview-usage-card.is-error .overview-card-body {
  display: block;
}

.enterprise-overview-card-skeleton .overview-chart-skeleton {
  min-height: 246px;
}

.enterprise-overview-usage-card.is-error .empty-state {
  min-height: 246px;
  display: grid;
  place-items: center;
}

.enterprise-overview-top-item {
  cursor: pointer;
}

@media (max-width: 1100px) {
  .enterprise-overview-usage-card {
    min-height: 0;
  }

  .enterprise-overview-usage-card .overview-card-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keep only GitLab resource names on one line. */
.gitlab-resource-group-link,
.gitlab-resource-project-link {
  display: inline-block;
  min-width: 0;
  max-width: min(360px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: middle;
}

.gitlab-resource-group-head {
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
}

.gitlab-resource-group-title-wrap {
  display: inline-grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: min(100%, 360px);
  max-width: min(100%, 360px);
  min-width: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.gitlab-resource-group-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.gitlab-resource-group-title-wrap .gitlab-resource-group-link {
  width: 100%;
  max-width: 100%;
}

.gitlab-resource-group-title-wrap .gitlab-resource-group-count-badge {
  min-width: 54px;
  max-width: none;
  justify-self: start;
  white-space: nowrap;
}

.gitlab-resource-project-row td:first-child {
  white-space: nowrap;
}

/* July 9 review batch: account menu, enterprise/detail/token refinements. */
.sidebar-logout {
  display: none;
}

.admin-sidebar {
  grid-template-rows: auto 1fr;
}

.admin-user-menu,
.admin-user-menu-inline {
  position: relative;
  flex: 0 0 auto;
}

.admin-user-menu-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  max-width: 220px;
  line-height: 1;
}

.admin-user-menu-button::before {
  content: "用户名称：";
  color: var(--muted);
  font-weight: 700;
  line-height: 1;
}

.admin-user-menu-button::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
}

.admin-user-menu.is-open .admin-user-menu-button::after,
.admin-user-menu-inline.is-open .admin-user-menu-button::after {
  transform: translateY(-35%) rotate(225deg);
}

.admin-global-actions .admin-user-menu-button {
  height: 32px;
  min-height: 32px;
  padding: 0 26px 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  line-height: 1;
}

.admin-global-actions .admin-user-menu-button::before {
  margin-right: 4px;
}

.admin-global-actions .admin-user-menu-button::after {
  right: 8px;
  width: 6px;
  height: 6px;
}

.admin-global-actions .admin-user-menu-button:hover,
.admin-global-actions .admin-user-menu-button:focus-visible {
  background: rgba(125, 149, 207, 0.1);
  outline: none;
}

.admin-user-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  min-width: 190px;
  padding: 10px;
  border: 1px solid rgba(180, 191, 218, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(91, 103, 132, 0.2);
  display: none;
  gap: 10px;
}

.admin-user-menu.is-open .admin-user-menu-popover,
.admin-user-menu-inline.is-open .admin-user-menu-popover {
  display: grid;
}

.admin-user-menu-role {
  padding: 6px 8px;
  color: #47526a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-user-logout {
  width: 100%;
  justify-content: center;
}

.admin-modal-duplicate-close {
  display: none !important;
}

.admin-insight-value,
.summary-item-value,
.enterprise-token-usage strong,
.token-today-usage strong {
  color: #2f64d6;
}

.admin-insight-item.is-success,
.admin-insight-item.is-warning,
.admin-insight-item.is-danger,
.admin-insight-item.is-disabled {
  border-color: rgba(210, 218, 236, 0.78);
  background: rgba(247, 249, 255, 0.88);
}

.enterprise-info-link,
.enterprise-info-link .admin-enterprise-name-text {
  color: #2f64d6;
  font-weight: 900;
}

.enterprise-info-link:hover {
  color: #244fb0;
}

.enterprise-info-name .admin-enterprise-name-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 8px;
}

.enterprise-info-name .admin-enterprise-name-text {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-icon-inline-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.enterprise-icon-inline-preview .enterprise-icon-preview {
  width: 56px;
  height: 56px;
  border: 0;
}

.enterprise-icon-upload-zone {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.enterprise-icon-upload-copy p.is-error {
  color: var(--danger);
}

.enterprise-domain-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.enterprise-domain-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1f2937;
  font-weight: 800;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.enterprise-https-action {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  color: #576176;
  border-color: rgba(180, 191, 218, 0.74);
  background: rgba(247, 249, 255, 0.9);
}

.enterprise-https-action.is-installed {
  color: #14784f;
  border-color: rgba(44, 151, 105, 0.42);
  background: rgba(232, 249, 241, 0.95);
}

.status-segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(44px, 1fr));
  min-width: 104px;
  padding: 3px;
  border: 1px solid rgba(184, 197, 222, 0.78);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(248, 250, 255, 0.94);
  vertical-align: middle;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.status-segment {
  min-width: 0;
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: calc(var(--radius) - 3px) !important;
  background: transparent;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
}

.status-segment + .status-segment {
  border-left: 0;
}

.status-segment.is-active-state.is-selected {
  color: #14784f;
  background: rgba(224, 248, 239, 0.96);
  box-shadow: inset 0 0 0 1px rgba(44, 151, 105, 0.28);
}

.status-segment.is-disabled-state.is-selected {
  color: #a23a48;
  background: rgba(255, 235, 238, 0.96);
  box-shadow: inset 0 0 0 1px rgba(217, 75, 92, 0.26);
}

.status-segment:disabled {
  opacity: 1;
  cursor: default;
}

.status-segment.is-pending {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent !important;
  font-size: 0;
}

.status-segment.is-pending::after {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(87, 97, 118, 0.28);
  border-top-color: #576176;
  border-radius: 50%;
  content: "";
  animation: admin-status-segment-spin 700ms linear infinite;
}

@keyframes admin-status-segment-spin {
  to {
    transform: rotate(360deg);
  }
}

.toolbar-select {
  display: inline-grid;
  grid-template-columns: auto minmax(120px, 180px);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.token-provider-filter-menu {
  position: relative;
  overflow: visible;
  grid-template-columns: minmax(150px, 190px);
}

.toolbar-select select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0 34px 0 12px;
}

.toolbar-select-button {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 32px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text);
  box-shadow: var(--button-glow);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-select-button:hover {
  background: var(--field-bg);
  border-color: rgba(255, 255, 255, 0.78);
}

.toolbar-select-button::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0.72;
}

.toolbar-select-button[aria-expanded="true"]::after {
  transform: translateY(-35%) rotate(225deg);
}

.toolbar-select-button[aria-expanded="true"] {
  background: var(--field-focus-bg);
  border-color: var(--line-strong);
  box-shadow: var(--button-glow-strong);
}

.toolbar-select-button.is-selected-value,
.toolbar-select-button[data-selected-value] {
  background: var(--field-focus-bg);
  border-color: var(--line-strong);
  box-shadow: var(--button-glow-strong);
}

.toolbar-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 260;
  display: grid;
  gap: 4px;
  width: 180px;
  max-height: min(260px, 50vh);
  padding: 6px;
  overflow: auto;
  border: 1px solid rgba(180, 191, 218, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(91, 103, 132, 0.2);
}

.toolbar-select-option {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  justify-content: flex-start;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.toolbar-select-option:hover,
.toolbar-select-option:focus-visible,
.toolbar-select-option.is-selected {
  background: rgba(218, 230, 255, 0.72);
  color: #2f64d6;
  box-shadow: none;
}

.page-toolbar,
.detail-tabs {
  position: relative;
  z-index: 70;
}

.admin-global-header {
  z-index: 90;
}

.token-provider-filter-control {
  flex: 0 0 auto;
}

.token-provider-filter-control .toolbar-select-button {
  min-width: 168px;
}

.token-list-toolbar .toolbar-filter-group {
  min-width: 0;
}

.token-actions-cell,
.data-table td.token-actions-cell {
  width: 220px;
  min-width: 220px;
}

.token-actions-cell .table-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  max-height: none;
  overflow: visible;
}

.token-actions-cell .table-actions button {
  width: auto;
  min-width: 54px;
  height: 30px;
  padding-inline: 7px;
  font-size: 12px;
  justify-content: center;
  text-align: center;
}

.token-list-table-shell .data-table th,
.token-list-table-shell .data-table td {
  padding-left: 10px;
  padding-right: 10px;
}

#tokenList .data-table tbody tr.is-nested-child-row > td:first-child {
  padding-left: 10px;
}

.page-toolbar:has(.enterprise-detail-title-row) {
  position: sticky;
  top: 0;
  z-index: 48;
  margin-bottom: 0;
}

.page-toolbar:has(.enterprise-detail-title-row) .page-toolbar-copy {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.page-toolbar:has(.enterprise-detail-title-row) .admin-breadcrumb {
  display: flex;
}

.page-toolbar:has(.enterprise-detail-title-row) .page-toolbar-actions {
  width: auto;
  flex: 0 0 auto;
  margin-left: auto;
}

.enterprise-detail-title-row > h2,
.enterprise-detail-title-icon:not(.hidden) {
  display: inline-flex;
}

.enterprise-detail-title-icon:not(.hidden) {
  display: block;
}

.enterprise-detail-title-row h2 {
  max-width: min(520px, 52vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
  font-size: 20px;
  font-weight: 900;
}

.detail-shell {
  gap: 0;
}

.detail-tabs {
  position: sticky;
  top: 86px;
  z-index: 45;
  display: flex;
  margin-bottom: 18px;
  padding: 12px 0 12px 4px;
  background: var(--bg, #f6f7fb);
  border-bottom: 1px solid rgba(210, 218, 236, 0.72);
}

.detail-panel {
  padding-left: 0;
}

.enterprise-gitlab-panel-card > .panel-head h2 {
  display: none;
}

.enterprise-gitlab-panel-card > .panel-head {
  justify-content: flex-end;
}

.enterprise-gitlab-panel-card > .panel-head .table-actions {
  width: auto;
  justify-content: flex-end;
}

.detail-panel > .panel-card > .panel-head h2 {
  flex: 0 0 auto;
  white-space: nowrap;
  overflow-wrap: normal;
}

.enterprise-detail-panel-actions {
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.detail-panel > .panel-card > .panel-head .enterprise-detail-panel-actions {
  flex: 1 1 auto;
  width: auto;
  justify-content: flex-end;
  justify-items: end;
  justify-self: stretch;
}

.enterprise-detail-panel-actions .admin-icon-action {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
}

.admin-system-tabs {
  margin-bottom: 12px;
}

.system-grid {
  margin-top: 0;
}

.rules-page-toolbar {
  margin-bottom: 12px;
}

.rules-editor-actions,
.rules-search-control {
  align-items: center;
}

.rules-editor-tabs {
  min-height: 58px;
  padding-top: 6px;
  padding-bottom: 6px;
  box-sizing: border-box;
}

.rules-search-control input {
  height: 42px;
}

.rules-search-refresh-btn {
  height: 42px;
  min-height: 42px;
}

.gitlab-user-name-cell {
  align-items: flex-start;
  text-align: left;
}

.gitlab-user-name-cell .admin-global-link,
.gitlab-user-name-cell > span:first-child {
  font-weight: 900;
}

.gitlab-user-email {
  color: var(--muted);
  font-size: 12px;
}

.enterprise-overview-usage-card .overview-card-body {
  grid-template-columns: minmax(0, 1.34fr) minmax(190px, 0.66fr);
}

.enterprise-overview-usage-card .overview-chart svg {
  height: 246px;
}

.enterprise-overview-usage-card .overview-chart-empty {
  min-height: 246px;
}

.enterprise-overview-usage-card .overview-trend-pane {
  min-height: 270px;
}

.enterprise-overview-usage-card .overview-chart-axis-label {
  font-size: 10px;
  fill: #7d8aa5;
}

@media (max-width: 1100px) {
  .detail-tabs {
    top: 72px;
  }

  .workbench-detail-status-grid,
  .workbench-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-icon-upload-zone {
    grid-template-columns: minmax(0, 1fr);
  }

  .token-list-toolbar .page-toolbar-actions,
  .token-list-toolbar .page-toolbar-search-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .workbench-detail-status-grid,
  .workbench-resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .workbench-overview-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

.admin-user-form {
  gap: 18px;
}

.admin-user-form > .field > span {
  color: #66728a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-role-field {
  gap: 8px;
}

.admin-role-toggle {
  min-height: 44px;
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(203, 214, 235, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #34425a;
  box-shadow: 0 1px 2px rgba(52, 64, 94, 0.06);
}

.admin-role-toggle:hover {
  border-color: rgba(126, 149, 207, 0.74);
  background: rgba(248, 251, 255, 0.96);
}

.admin-permission-field {
  gap: 8px;
}

.admin-permission-grid.checkbox-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(216, 224, 240, 0.92);
  border-radius: 10px;
  background: rgba(248, 250, 253, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.admin-permission-option.checkbox-line {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(218, 226, 241, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #28364f;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(57, 72, 105, 0.05);
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.admin-permission-option.checkbox-line:hover {
  border-color: rgba(135, 158, 213, 0.76);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(71, 90, 130, 0.08);
  transform: translateY(-1px);
}

.admin-permission-option.checkbox-line:has(input:checked) {
  border-color: rgba(104, 135, 211, 0.82);
  background: linear-gradient(180deg, rgba(246, 249, 255, 0.98), rgba(238, 244, 255, 0.92));
  box-shadow: 0 0 0 1px rgba(104, 135, 211, 0.12), 0 8px 22px rgba(94, 121, 189, 0.12);
}

.admin-permission-option.checkbox-line:has(input:checked)::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #6f8fdc;
}

.admin-permission-option.checkbox-line:has(input:focus-visible),
.admin-role-toggle:has(input:focus-visible) {
  outline: 3px solid rgba(111, 143, 220, 0.18);
  outline-offset: 2px;
}

.admin-permission-option.checkbox-line:has(input:disabled) {
  cursor: default;
  transform: none;
  opacity: 0.68;
}

.admin-permission-option.checkbox-line:has(input:disabled):hover {
  border-color: rgba(218, 226, 241, 0.88);
  box-shadow: 0 1px 2px rgba(57, 72, 105, 0.05);
}

.admin-permission-option-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-permission-option-copy strong {
  min-width: 0;
  color: #28364f;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-permission-option-copy small {
  min-width: 0;
  color: #7a879d;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.admin-permission-option input[type="checkbox"],
.admin-role-toggle input[type="checkbox"] {
  border-color: rgba(139, 159, 207, 0.72);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(76, 93, 133, 0.08);
}

.admin-permission-option input[type="checkbox"]:checked,
.admin-role-toggle input[type="checkbox"]:checked {
  border-color: #6f8fdc;
  background: #6f8fdc;
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.14);
}

.admin-permission-option input[type="checkbox"]::after,
.admin-role-toggle input[type="checkbox"]::after {
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  border-radius: 0;
  background: transparent;
  transform: rotate(45deg) scale(0);
}

.admin-permission-option input[type="checkbox"]:checked::after,
.admin-role-toggle input[type="checkbox"]:checked::after {
  background: transparent;
  transform: rotate(45deg) scale(1);
}

@media (max-width: 760px) {
  .admin-permission-grid.checkbox-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-role-toggle {
    width: 100%;
  }
}

.modal-card .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.modal-card .field select,
.modal-card .field textarea,
.modal-card .suggest-input,
.modal-card .plain-editor,
.modal-card .code-editor,
.modal-card .enterprise-icon-upload-zone,
.modal-card .certificate-upload-zone {
  border-radius: 8px;
}

.modal-card button,
.modal-card .primary,
.modal-card .secondary,
.modal-card .danger {
  border-radius: 12px;
}

.modal-card .small {
  border-radius: 10px;
}

.modal-card .modal-close-icon-btn,
.modal-card .icon-plain {
  border-radius: 999px;
}

.modal-card .modal-actions {
  padding-right: 18px;
  padding-bottom: 18px;
}

.rules-search-control {
  gap: 8px;
}

.rules-editor-tab-group {
  gap: 8px;
}

.admin-shell .rules-editor-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text);
  box-shadow: var(--button-glow);
}

.admin-shell .rules-editor-tab:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--button-glow-strong);
}

.admin-shell .rules-editor-tab.is-active {
  color: #4f659f;
  border-color: rgba(126, 149, 207, 0.56);
  background: linear-gradient(135deg, rgba(222, 233, 255, 0.95), rgba(246, 242, 255, 0.84));
  box-shadow: inset 3px 0 0 var(--accent), 0 12px 28px rgba(126, 149, 207, 0.18);
}

.rules-search-input-group input {
  border-radius: var(--radius);
}

.rules-search-refresh-btn {
  border-left: 1px solid rgba(126, 139, 168, 0.24);
  border-radius: var(--radius);
}

.rules-codex-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  outline: none;
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  box-shadow: var(--button-glow);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.rules-codex-input:focus {
  border-color: var(--line-strong);
  background: var(--field-focus-bg);
  box-shadow: var(--button-glow-strong);
}

.admin-user-modal-card .modal-actions,
.admin-permission-modal-card .admin-permission-modal-actions,
.admin-static-update-card .modal-actions {
  padding-right: 18px;
  padding-bottom: 18px;
}

.admin-permission-grid.checkbox-grid {
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
}

.admin-permission-option.checkbox-line {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 6px;
}

.admin-role-toggle {
  border-radius: 6px;
}

/* Admin detail and modal polish for enterprise management review. */
.admin-main:has(.enterprise-detail-title-row) {
  height: 100%;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.content-view:has(.enterprise-detail-title-row) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.content-view:has(.enterprise-detail-title-row) > .page-toolbar {
  position: relative;
  top: auto;
  z-index: 60;
  margin-bottom: 0;
  border-bottom: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  background: rgba(248, 250, 255, 0.96);
}

.content-view:has(.enterprise-detail-title-row) > .detail-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.content-view:has(.enterprise-detail-title-row) > .detail-shell > .detail-tabs {
  position: relative;
  top: auto;
  z-index: 59;
  margin: 0;
  padding: 12px 0 12px 4px;
  background: rgba(246, 248, 252, 0.98);
  border-bottom: 1px solid rgba(210, 218, 236, 0.82);
  box-shadow: 0 12px 22px rgba(143, 154, 181, 0.12);
}

.content-view:has(.enterprise-detail-title-row) > .detail-shell > .detail-panel {
  min-height: 0;
  padding: 18px 0 24px;
  overflow: auto;
  overscroll-behavior: contain;
}

.content-view:has(.enterprise-detail-title-row) > .detail-shell > .detail-panel.hidden {
  display: none !important;
}

.admin-permission-modal-card {
  max-height: calc(100vh - 56px);
}

.admin-permission-modal-body {
  padding: 30px 24px 6px;
}

.admin-permission-tabs {
  position: static;
  top: auto;
  z-index: auto;
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.admin-permission-tabs .detail-tab,
.admin-permission-modal-actions button,
.permission-pill {
  border-radius: 12px;
}

.admin-permission-modal-card .admin-permission-modal-actions {
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 22px;
  border-top: 1px solid rgba(210, 218, 236, 0.72);
}

.modal-head {
  z-index: 30;
}

.modal-card > .stack-form,
.modal-card .gitlab-modal-layout {
  padding-top: 32px;
}

.modal-card > .stack-form > .field:first-child,
.modal-card .gitlab-modal-form > .field:first-child {
  margin-top: 4px;
}

.modal-card .field:has(select) {
  position: relative;
  z-index: 3;
}

.modal-card .field:has(select:focus) {
  z-index: 12;
}

.modal-card .field select {
  min-height: 42px;
  line-height: 1.35;
}

.gitlab-user-identity-head,
.gitlab-user-identity-cell {
  min-width: 220px;
  text-align: left;
}

.gitlab-user-identity-head {
  vertical-align: middle;
}

.gitlab-user-identity-head span,
.gitlab-user-identity-head small {
  display: block;
  line-height: 1.35;
}

.gitlab-user-identity-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.gitlab-user-name-cell {
  width: 100%;
  justify-items: start;
  align-items: start;
  text-align: left;
}

.gitlab-user-name-cell .admin-global-link,
.gitlab-user-name-cell > span:first-child {
  display: inline-block;
  max-width: 100%;
  font-weight: 900;
  text-align: left;
}

.gitlab-user-email {
  max-width: 100%;
  text-align: left;
}

@media (max-width: 760px) {
  .content-view:has(.enterprise-detail-title-row) > .detail-shell {
    padding-left: 0;
  }

  .content-view:has(.enterprise-detail-title-row) > .detail-shell > .detail-tabs {
    padding-left: 0;
  }

  .modal-card > .stack-form,
  .modal-card .gitlab-modal-layout {
    padding-top: 28px;
  }
}

/* Admin follow-up polish for workbench, token and system pages. */
.workbench-bootstrap-modal-card {
  width: min(1120px, calc(100vw - 36px));
}

.workbench-bootstrap-modal-card .gitlab-modal-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  align-items: stretch;
}

.workbench-bootstrap-modal-card .gitlab-modal-form,
.workbench-bootstrap-modal-card .gitlab-modal-result {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}

.workbench-bootstrap-modal-card .gitlab-modal-result {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
}

.workbench-bootstrap-modal-card .bootstrap-command-head {
  justify-content: flex-end;
}

.workbench-bootstrap-modal-card .page-toolbar-button-group {
  gap: 8px;
  justify-content: flex-end;
}

.workbench-bootstrap-modal-card .bootstrap-tool-btn,
.workbench-bootstrap-modal-card .bootstrap-copy-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

.workbench-bootstrap-modal-card .admin-code-block {
  min-height: 74px;
}

.workbench-bootstrap-modal-card .bootstrap-overview-card,
.workbench-bootstrap-modal-card .gitlab-modal-result {
  height: 100%;
}

.workbench-bootstrap-modal-card .modal-actions {
  align-self: end;
  margin-top: 0;
}

.content-view:has(.token-list-toolbar) {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.admin-main:has(.token-list-toolbar) {
  height: 100%;
  overflow: hidden;
}

.content-view:has(.token-list-toolbar) > .token-list-toolbar,
.content-view:has(.token-list-toolbar) > .admin-insight-strip {
  flex: 0 0 auto;
}

.content-view:has(.token-list-toolbar) > .token-list-table-shell {
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.content-view:has(.token-list-toolbar) > .token-plain-result,
.content-view:has(.token-list-toolbar) > .global-message {
  min-height: 0;
}

.admin-main:has(.admin-system-tabs) {
  height: 100%;
  overflow: auto;
}

.content-view:has(.admin-system-tabs) {
  display: grid;
  grid-template-rows: auto auto minmax(0, auto) auto;
  align-content: start;
  min-height: 0;
  padding-top: 0;
}

.content-view:has(.admin-system-tabs) > .admin-system-tabs {
  position: relative;
  top: auto;
  z-index: 2;
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.content-view:has(.admin-system-tabs) > .admin-insight-strip {
  margin-top: 0;
}

.content-view:has(.admin-system-tabs) .system-grid,
.content-view:has(.admin-system-tabs) .system-model-grid {
  margin-top: 0;
}

@media (max-width: 760px) {
  .workbench-bootstrap-modal-card .gitlab-modal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-view:has(.token-list-toolbar) {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  }
}

/* Global checkbox round control pass. */
.checkbox-line input[type="checkbox"],
.rules-suggestion-item input[type="checkbox"],
.rules-project-suggestion-item input[type="checkbox"],
.permission-editor-grid input[type="checkbox"],
.checkbox-grid input[type="checkbox"],
.modal-layer input[type="checkbox"],
.admin-shell input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-content: center;
  flex: 0 0 16px;
  width: 16px !important;
  height: 16px !important;
  inline-size: 16px;
  block-size: 16px;
  max-width: 16px;
  max-height: 16px;
  min-inline-size: 16px;
  min-block-size: 16px;
  min-width: 16px !important;
  min-height: 16px !important;
  margin: 0;
  padding: 0 !important;
  border: 1.5px solid rgba(139, 159, 207, 0.74);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 1px 1px rgba(76, 93, 133, 0.08);
  vertical-align: middle;
}

.checkbox-line input[type="checkbox"]::after,
.rules-suggestion-item input[type="checkbox"]::after,
.rules-project-suggestion-item input[type="checkbox"]::after,
.permission-editor-grid input[type="checkbox"]::after,
.checkbox-grid input[type="checkbox"]::after,
.modal-layer input[type="checkbox"]::after,
.admin-shell input[type="checkbox"]::after {
  content: "";
  width: 4px;
  height: 7px;
  border: solid #ffffff;
  border-width: 0 1.8px 1.8px 0;
  border-radius: 0;
  background: transparent;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 120ms ease;
}

.checkbox-line input[type="checkbox"]:checked,
.rules-suggestion-item input[type="checkbox"]:checked,
.rules-project-suggestion-item input[type="checkbox"]:checked,
.permission-editor-grid input[type="checkbox"]:checked,
.checkbox-grid input[type="checkbox"]:checked,
.modal-layer input[type="checkbox"]:checked,
.admin-shell input[type="checkbox"]:checked {
  border-color: #6f8fdc;
  background: #6f8fdc;
  box-shadow: 0 0 0 2px rgba(111, 143, 220, 0.14);
}

.checkbox-line input[type="checkbox"]:checked::after,
.rules-suggestion-item input[type="checkbox"]:checked::after,
.rules-project-suggestion-item input[type="checkbox"]:checked::after,
.permission-editor-grid input[type="checkbox"]:checked::after,
.checkbox-grid input[type="checkbox"]:checked::after,
.modal-layer input[type="checkbox"]:checked::after,
.admin-shell input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-line input[type="checkbox"]:focus-visible,
.rules-suggestion-item input[type="checkbox"]:focus-visible,
.rules-project-suggestion-item input[type="checkbox"]:focus-visible,
.permission-editor-grid input[type="checkbox"]:focus-visible,
.checkbox-grid input[type="checkbox"]:focus-visible,
.modal-layer input[type="checkbox"]:focus-visible,
.admin-shell input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(111, 143, 220, 0.22);
  outline-offset: 2px;
}

.checkbox-line,
.admin-shell .checkbox-line {
  display: inline-grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
}

.admin-role-toggle,
.system-dev-toggle,
.admin-shell .admin-role-toggle,
.admin-shell .system-dev-toggle {
  width: fit-content;
  max-width: 100%;
}

.admin-permission-option.checkbox-line,
.admin-shell .admin-permission-option.checkbox-line {
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  min-height: 50px;
  padding: 10px 14px;
}

.admin-permission-option.checkbox-line:has(input:checked)::before,
.admin-shell .admin-permission-option.checkbox-line:has(input:checked)::before {
  display: none;
}

.admin-permission-option-copy,
.admin-shell .admin-permission-option-copy {
  align-self: center;
}

.permission-editor-grid .checkbox-line,
.admin-enterprise-grid .checkbox-line,
.admin-shell .permission-editor-grid .checkbox-line,
.admin-shell .admin-enterprise-grid .checkbox-line {
  min-height: 32px;
}

/* Enterprise detail workbench link modal dropdown pass. */
.enterprise-workbench-modal-card {
  overflow: visible;
}

.enterprise-workbench-modal-card > .enterprise-workbench-form {
  min-height: 264px;
  overflow: visible;
}

.enterprise-workbench-modal-card .enterprise-workbench-select-field {
  position: relative;
  z-index: 4;
}

.enterprise-workbench-modal-card #enterpriseWorkbenchSelect {
  position: relative;
  z-index: 4;
}

.enterprise-workbench-modal-card .modal-actions {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

@media (max-height: 520px) {
  .enterprise-workbench-modal-card > .enterprise-workbench-form {
    min-height: 220px;
  }
}

/* Global custom select pass. */
.admin-select-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.toolbar-search .admin-select-control,
.toolbar-select .admin-select-control,
.field .admin-select-control {
  width: 100%;
}

.admin-select-native {
  position: absolute !important;
  inset: 0;
  z-index: -1;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  opacity: 0;
  pointer-events: none;
}

.field select,
.toolbar-search select,
.admin-shell select {
  background: var(--field-bg);
  border-color: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  box-shadow: var(--button-glow);
}

.field select:focus,
.toolbar-search select:focus,
.admin-shell select:focus {
  background: var(--field-focus-bg);
  border-color: var(--line-strong);
  box-shadow: var(--button-glow-strong);
}

button.admin-select-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 42px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--text);
  box-shadow: var(--button-glow);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.admin-select-button:hover {
  background: var(--field-bg);
  border-color: rgba(255, 255, 255, 0.78);
}

.toolbar-search button.admin-select-button,
.toolbar-select button.admin-select-button {
  min-height: 42px;
  font-size: 13px;
  font-weight: 400;
}

button.admin-select-button::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(50% 72%, 16% 34%, 84% 34%);
  opacity: 0.72;
  transform: translateY(-50%);
  transition: transform 120ms ease, opacity 120ms ease;
}

button.admin-select-button[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: var(--field-focus-bg);
  box-shadow: var(--button-glow-strong);
}

button.admin-select-button[aria-expanded="true"]::after {
  opacity: 0.9;
  transform: translateY(-50%) rotate(180deg);
}

button.admin-select-button:focus-visible {
  outline: 2px solid rgba(111, 143, 220, 0.24);
  outline-offset: 2px;
}

.admin-select-control.is-disabled button.admin-select-button,
button.admin-select-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.field.has-error button.admin-select-button {
  border-color: #d94b5c;
  box-shadow: 0 0 0 3px rgba(217, 75, 92, 0.14);
}

.admin-select-menu {
  position: fixed;
  z-index: 10060;
  display: grid;
  gap: 4px;
  min-width: 180px;
  max-height: min(280px, 52vh);
  padding: 6px;
  overflow: auto;
  border: 1px solid rgba(180, 191, 218, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(58, 70, 103, 0.22), 0 4px 14px rgba(58, 70, 103, 0.14);
}

.admin-select-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
  text-align: left;
}

.admin-select-option::before {
  content: "";
  width: 5px;
  height: 9px;
  justify-self: center;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(45deg);
}

.admin-select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-select-option:hover,
.admin-select-option:focus-visible,
.admin-select-option.is-selected {
  background: rgba(218, 230, 255, 0.76);
  color: #2f64d6;
  box-shadow: none;
}

.admin-select-option.is-selected::before {
  border-color: currentColor;
}

.admin-select-option:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.admin-select-group-label,
.admin-select-empty {
  min-height: 28px;
  padding: 7px 10px 3px;
  color: #7b879d;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}

/* Enterprise detail tabs gap fix. */
.content-view:has(.enterprise-detail-title-row) > .detail-shell > .detail-tabs {
  padding-top: 0;
  padding-bottom: 10px;
  box-shadow: none;
}

/* Batch 32-36 admin layout refinements. */
.admin-shell .page-toolbar .admin-icon-action {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
}

.admin-icon-action.is-pending svg {
  animation: admin-icon-spin 780ms linear infinite;
  transform-origin: center;
}

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

.admin-main:has(#workbenchList) {
  height: 100%;
  overflow: hidden;
}

.content-view:has(#workbenchList) {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.content-view:has(#workbenchList) > .page-toolbar,
.content-view:has(#workbenchList) > .admin-insight-strip {
  min-height: 0;
}

.content-view:has(#workbenchList) > #workbenchList {
  min-height: 0;
  max-height: none;
  overflow: auto;
}

#workbenchList .data-table th {
  position: sticky;
  top: 0;
  z-index: 16;
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.18);
}

.token-usage-modal-summary .summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 6px;
}

.token-usage-modal-summary .summary-item-label {
  min-width: 0;
}

.token-usage-modal-summary .summary-item-value {
  grid-column: 2;
  justify-self: end;
  margin-top: 0;
  text-align: right;
}

.token-usage-modal-summary .token-session-status,
.token-usage-modal-summary .summary-item > .muted {
  justify-self: end;
  text-align: right;
}

.token-usage-bar-axis {
  display: grid;
  align-items: center;
  justify-content: stretch;
  gap: 0;
}

.token-usage-bar-axis span {
  min-width: 0;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-usage-tooltip {
  white-space: pre-line;
}

.content-view:has(.admin-system-tabs) .system-grid,
.content-view:has(.admin-system-tabs) .system-model-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.system-side-column {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.system-summary-card {
  min-width: 0;
}

.system-summary-card #systemSummary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .content-view:has(.admin-system-tabs) .system-grid,
  .content-view:has(.admin-system-tabs) .system-model-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-summary-card #systemSummary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Enterprise detail tabs live inside the header card. */
.content-view:has(.enterprise-detail-title-row) > .page-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  padding-bottom: 14px;
  overflow: hidden;
}

.content-view:has(.enterprise-detail-title-row) > .page-toolbar > .page-toolbar-copy {
  grid-column: 1;
  min-width: 0;
}

.content-view:has(.enterprise-detail-title-row) > .page-toolbar > .page-toolbar-actions {
  grid-column: 2;
  min-width: 0;
}

.content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row > .detail-tabs {
  grid-column: 1 / -1;
  position: relative;
  top: auto;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row > .enterprise-overview-toolbar {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: 0;
}

.content-view:has(.enterprise-detail-title-row) > .detail-shell {
  grid-template-rows: minmax(0, 1fr);
  padding-left: 0;
}

@media (max-width: 760px) {
  .content-view:has(.enterprise-detail-title-row) > .page-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-view:has(.enterprise-detail-title-row) > .page-toolbar > .page-toolbar-actions,
  .content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row {
    grid-column: 1;
  }

  .content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row > .detail-tabs,
  .content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row > .enterprise-overview-toolbar {
    flex: 1 1 100%;
  }

  .content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row > .enterprise-overview-toolbar {
    width: 100%;
  }
}

/* System page aligns lower cards to the 4-column insight grid. */
.content-view:has(.admin-system-tabs) .system-grid,
.content-view:has(.admin-system-tabs) .system-model-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.system-side-column,
.content-view:has(.admin-system-tabs) .system-model-grid > .panel-card:first-child {
  grid-column: span 1;
}

.system-summary-card,
.content-view:has(.admin-system-tabs) .system-model-grid > .panel-card:last-child {
  grid-column: span 3;
}

.system-summary-card #systemSummary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .content-view:has(.admin-system-tabs) .system-grid,
  .content-view:has(.admin-system-tabs) .system-model-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-side-column,
  .system-summary-card,
  .content-view:has(.admin-system-tabs) .system-model-grid > .panel-card:first-child,
  .content-view:has(.admin-system-tabs) .system-model-grid > .panel-card:last-child {
    grid-column: auto;
  }
}

/* Batch 37: tighten GitLab user table, token overview cards, and system 1:3 grid. */
.gitlab-user-table.data-table {
  width: 100%;
  table-layout: fixed;
}

.gitlab-user-table.data-table th,
.gitlab-user-table.data-table td {
  padding: 8px 10px;
}

.gitlab-user-table th:nth-child(1),
.gitlab-user-table td:nth-child(1),
.gitlab-user-table th:nth-child(2),
.gitlab-user-table td:nth-child(2),
.gitlab-user-table th:nth-child(3),
.gitlab-user-table td:nth-child(3),
.gitlab-user-table th:nth-child(4),
.gitlab-user-table td:nth-child(4),
.gitlab-user-actions-cell {
  width: auto;
}

.gitlab-user-col-identity {
  width: 152px;
}

.gitlab-user-col-name {
  width: 116px;
}

.gitlab-user-col-status {
  width: 84px;
}

.gitlab-user-col-login {
  width: 128px;
}

.gitlab-user-col-projects {
  width: auto;
}

.gitlab-user-col-actions {
  width: 220px;
}

.gitlab-user-project-cell {
  min-width: 0;
}

.gitlab-user-actions-cell .table-actions {
  justify-content: flex-start;
}

.token-usage-modal-summary .summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.token-usage-modal-summary .summary-item {
  grid-column: auto;
  min-height: 64px;
}

.token-usage-tooltip {
  display: grid;
  gap: 2px;
  min-width: 132px;
  max-width: min(240px, calc(100vw - 24px));
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(113, 145, 223, 0.24);
  border-left: 4px solid #7191df;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #26364f;
  box-shadow: 0 16px 36px rgba(34, 46, 86, 0.18);
  white-space: normal;
  overflow-wrap: anywhere;
}

.token-usage-tooltip strong {
  color: #26364f;
  font-size: 13px;
  line-height: 1.35;
}

.token-usage-tooltip span {
  display: block;
  color: #596985;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}

.content-view:has(.admin-system-tabs) .system-grid,
.content-view:has(.admin-system-tabs) .system-model-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.content-view:has(.admin-system-tabs) .system-grid > .system-side-column,
.content-view:has(.admin-system-tabs) .system-model-grid > .panel-card:first-child {
  grid-column: 1 / span 1;
  min-width: 0;
}

.content-view:has(.admin-system-tabs) .system-grid > .system-summary-card,
.content-view:has(.admin-system-tabs) .system-model-grid > .panel-card:last-child {
  grid-column: 2 / span 3;
  min-width: 0;
}

.content-view:has(.admin-system-tabs) .system-side-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.content-view:has(.admin-system-tabs) .system-side-column > .panel-card {
  width: 100%;
  min-width: 0;
}

.content-view:has(.admin-system-tabs) .system-summary-card #systemSummary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .content-view:has(.admin-system-tabs) .system-grid,
  .content-view:has(.admin-system-tabs) .system-model-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-view:has(.admin-system-tabs) .system-grid > .system-side-column,
  .content-view:has(.admin-system-tabs) .system-grid > .system-summary-card,
  .content-view:has(.admin-system-tabs) .system-model-grid > .panel-card:first-child,
  .content-view:has(.admin-system-tabs) .system-model-grid > .panel-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .token-usage-modal-summary .summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Batch 38: make storage type tabs blue and keep latest session summary on one line. */
.storage-type-segmented .segmented-btn.is-active {
  color: #ffffff;
  border-left-color: transparent;
  background: linear-gradient(135deg, #4f7bd9 0%, #6f96e8 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 10px 24px rgba(79, 123, 217, 0.18);
}

.storage-type-segmented .segmented-btn.is-active + .segmented-btn {
  border-left-color: transparent;
}

.storage-type-segmented .segmented-btn:not(.is-active) {
  color: #34415d;
}

.token-usage-modal-summary .summary-item:has(.token-session-status) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.token-usage-modal-summary .summary-item:has(.token-session-status) .summary-item-label {
  grid-column: 1;
  white-space: nowrap;
}

.token-usage-modal-summary .summary-item:has(.token-session-status) .token-session-status {
  grid-column: 2;
  justify-self: start;
  white-space: nowrap;
}

.token-usage-modal-summary .summary-item:has(.token-session-status) .summary-item-value {
  grid-column: 3;
  white-space: nowrap;
}

/* Batch 39: balance GitLab user table column spacing across the full width. */
.gitlab-user-col-identity {
  width: 16%;
}

.gitlab-user-col-name {
  width: 15%;
}

.gitlab-user-col-status {
  width: 11%;
}

.gitlab-user-col-login {
  width: 15%;
}

.gitlab-user-col-projects {
  width: 24%;
}

.gitlab-user-col-actions {
  width: 19%;
}

/* Batch 40: show repository counts and give GitLab resource names more room. */
.gitlab-resource-table {
  table-layout: fixed;
  min-width: 1280px;
}

.gitlab-resource-col-name {
  width: 300px;
}

.gitlab-resource-col-namespace {
  width: 220px;
}

.gitlab-resource-col-visibility {
  width: 120px;
}

.gitlab-resource-col-language {
  width: 180px;
}

.gitlab-resource-col-size {
  width: 130px;
}

.gitlab-resource-col-activity {
  width: 170px;
}

.gitlab-resource-col-actions {
  width: 160px;
}

.gitlab-resource-table .gitlab-resource-group-title-wrap {
  width: 100%;
  max-width: 100%;
}

.gitlab-resource-table .gitlab-resource-group-link,
.gitlab-resource-table .gitlab-resource-project-link {
  max-width: 100%;
}

.gitlab-resource-table .gitlab-resource-group-count-badge {
  min-width: 64px;
}

/* Batch 46: overview usage charts show every ranked series as color-coded legend rows. */
.overview-top-item {
  cursor: default;
}

.overview-top-item::before {
  background: var(--overview-series-color, transparent);
}

.overview-top-copy {
  align-items: center;
}

.overview-top-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-top-marker {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--overview-series-color, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--overview-series-color, var(--accent)) 16%, transparent);
}

.overview-top-value {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.overview-top-bar i {
  background: var(--overview-series-color, var(--accent));
}

/* Batch 47: move overview chart legends below the chart so the plot keeps full width. */
.overview-content-view .overview-card .overview-card-body {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.overview-content-view .overview-card .overview-trend-pane {
  min-width: 0;
}

.overview-content-view .overview-card .overview-chart svg {
  height: 220px;
}

.overview-content-view .overview-card .overview-top-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: stretch;
  gap: 8px 12px;
  padding: 8px 0 0 4px;
  border-top: 1px solid rgba(126, 139, 168, 0.14);
}

.overview-content-view .overview-card .overview-top-item {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 3px 6px 3px 3px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: opacity 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.overview-content-view .overview-card .overview-top-item::before,
.overview-content-view .overview-card .overview-top-bar {
  display: none;
}

.overview-content-view .overview-card .overview-top-item:hover {
  background: rgba(239, 246, 255, 0.72);
}

.overview-content-view .overview-card .overview-top-item:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.18);
}

.overview-content-view .overview-card .overview-top-item.is-hidden {
  opacity: 0.42;
}

.overview-content-view .overview-card .overview-top-item.is-hidden .overview-top-copy strong {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.overview-content-view .overview-card .overview-top-item.is-hidden .overview-top-marker {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--overview-series-color, var(--accent));
}

.overview-content-view .overview-card .overview-top-copy {
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.overview-content-view .overview-card .overview-top-copy strong {
  max-width: 180px;
  font-size: 12px;
  font-weight: 800;
}

.overview-content-view .overview-card .overview-top-value {
  font-size: 11px;
  font-weight: 800;
}

.overview-content-view .overview-card .overview-top-marker {
  width: 9px;
  height: 9px;
}

/* Batch 49: keep overview loading cards as plain neutral skeletons. */
.overview-content-view .overview-card.is-loading {
  overflow: hidden;
}

.overview-content-view .overview-card.is-loading .overview-card-head h2 {
  min-width: 0;
  width: 100%;
}

.overview-title-skeleton {
  width: 58px;
  height: 24px;
  border-radius: 8px;
}

.overview-content-view .overview-card.is-loading .overview-card-body {
  display: block;
}

.overview-card-skeleton {
  display: grid;
  gap: 10px;
  width: 100%;
}

.overview-chart-skeleton {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.08), rgba(148, 163, 184, 0.18), rgba(148, 163, 184, 0.08)),
    rgba(241, 245, 249, 0.62);
  background-size: 220% 100%, 100% 100%;
  animation: admin-skeleton-shimmer 1.25s ease-in-out infinite;
}

.overview-chart-skeleton-grid {
  position: absolute;
  inset: 24px 18px 26px 48px;
  background:
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.2) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(90deg, transparent 0 112px, rgba(148, 163, 184, 0.1) 112px 113px, transparent 113px 224px);
}

.overview-chart-skeleton-curve {
  position: absolute;
  left: 48px;
  right: 18px;
  height: 12px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.72);
}

.overview-chart-skeleton-curve.is-primary {
  top: 82px;
}

.overview-chart-skeleton-curve.is-secondary {
  top: 126px;
  width: 64%;
  background: rgba(203, 213, 225, 0.58);
}

.overview-total-skeleton {
  width: 96px;
  height: 12px;
}

.overview-legend-skeleton {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 0 0 4px;
  border-top: 1px solid rgba(126, 139, 168, 0.14);
}

.overview-legend-skeleton .admin-skeleton-line {
  width: 120px;
  height: 18px;
  border-radius: 999px;
}

.overview-legend-skeleton .admin-skeleton-line.is-short {
  width: 72px;
}

/* Batch 50: keep overview usage cards height-stable across empty and hidden states. */
.overview-content-view .panel-card.overview-card {
  min-height: 334px;
  align-content: start;
}

.overview-content-view .overview-card .overview-card-body {
  grid-template-rows: minmax(244px, auto) minmax(50px, auto);
}

.overview-content-view .overview-card .overview-chart {
  grid-template-rows: 220px 16px;
  min-height: 244px;
}

.overview-content-view .overview-card .overview-chart-stage {
  height: 220px;
  min-height: 220px;
}

.overview-content-view .overview-card .overview-chart svg,
.overview-content-view .overview-card .overview-chart-empty {
  height: 220px;
  min-height: 220px;
}

.overview-content-view .overview-card .overview-chart-summary {
  min-height: 16px;
}

.overview-content-view .overview-card .overview-top-list {
  min-height: 50px;
  align-content: flex-start;
}

.overview-content-view .overview-card .overview-top-list > .empty-state.compact {
  display: flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.overview-content-view .overview-card.is-loading .overview-card-body {
  grid-template-rows: minmax(244px, auto) minmax(50px, auto);
}

/* Batch 51: give overview page breathing room above the fixed version label. */
.overview-content-view {
  padding-bottom: 56px;
}

.overview-content-view > .overview-grid {
  padding-bottom: 24px;
}

/* Batch 57: prevent permission-restricted users from seeing the fallback full menu before session hydration. */
html:not(.admin-menu-cache-ready):not(.admin-menu-session-ready) .menu-nav:not([data-menu-ready="true"]) {
  visibility: hidden;
  pointer-events: none;
}

/* Batch 56: make enterprise detail usage charts use overview-style bottom legends. */
.enterprise-overview-usage-card {
  min-height: 394px;
}

.enterprise-overview-usage-card .overview-card-body {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(244px, auto) minmax(50px, auto);
  align-items: stretch;
  gap: 10px;
  height: auto;
}

.enterprise-overview-usage-card .overview-trend-pane {
  min-width: 0;
  min-height: 0;
}

.enterprise-overview-usage-card .overview-chart {
  grid-template-rows: 220px 16px;
  min-height: 244px;
}

.enterprise-overview-usage-card .overview-chart svg,
.enterprise-overview-usage-card .overview-chart-empty {
  height: 220px;
  min-height: 220px;
}

.enterprise-overview-usage-card .overview-chart-summary {
  min-height: 16px;
}

.enterprise-overview-usage-card .overview-chart-stage,
.enterprise-overview-usage-card .overview-chart-empty {
  height: 220px;
  min-height: 220px;
}

.enterprise-overview-usage-card .overview-chart-stage > svg {
  height: 100%;
  min-height: 0;
}

.enterprise-overview-usage-card .overview-top-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  align-self: stretch;
  gap: 8px 12px;
  min-height: 50px;
  padding: 8px 0 0 4px;
  border-top: 1px solid rgba(126, 139, 168, 0.14);
}

.enterprise-overview-usage-card .overview-top-item {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 3px 6px 3px 3px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: opacity 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.enterprise-overview-usage-card .overview-top-item::before,
.enterprise-overview-usage-card .overview-top-bar {
  display: none;
}

.enterprise-overview-usage-card .overview-top-item:hover {
  background: rgba(239, 246, 255, 0.72);
}

.enterprise-overview-usage-card .overview-top-item:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.18);
}

.enterprise-overview-usage-card .overview-top-item.is-hidden {
  opacity: 0.42;
}

.enterprise-overview-usage-card .overview-top-item.is-hidden .overview-top-copy strong {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.enterprise-overview-usage-card .overview-top-item.is-hidden .overview-top-marker {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--overview-series-color, var(--accent));
}

.enterprise-overview-usage-card .overview-top-copy {
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.enterprise-overview-usage-card .overview-top-copy strong {
  max-width: 180px;
  font-size: 12px;
  font-weight: 800;
}

.enterprise-overview-usage-card .overview-top-value {
  font-size: 11px;
  font-weight: 800;
}

.enterprise-overview-usage-card .overview-top-marker {
  width: 9px;
  height: 9px;
}

.enterprise-overview-usage-card .overview-top-list > .empty-state.compact {
  display: flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

/* Enterprise overview: keep the trend readable while turning the ranked data
   into a compact horizontal bar chart beside it. */
.enterprise-overview-usage-card .overview-card-body {
  grid-template-columns: minmax(0, 6fr) minmax(180px, 4fr);
  grid-template-rows: minmax(244px, auto);
  gap: 20px;
  align-items: stretch;
}

.enterprise-overview-usage-card .overview-trend-pane {
  min-width: 0;
  min-height: 244px;
}

.enterprise-overview-usage-card .overview-top-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-self: stretch;
  gap: 0;
  min-width: 0;
  min-height: 244px;
  max-height: 246px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 4px 0 16px;
  border-top: 0;
  border-left: 1px solid rgba(126, 139, 168, 0.18);
}

.enterprise-overview-usage-card .overview-top-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 8px;
  gap: 5px 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(126, 139, 168, 0.14);
  border-radius: 0;
  background: transparent;
}

.enterprise-overview-usage-card .overview-top-item:last-child {
  border-bottom: 0;
}

.enterprise-overview-usage-card .overview-top-item::before {
  display: none;
}

.enterprise-overview-usage-card .overview-top-copy {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 0;
}

.enterprise-overview-usage-card .overview-top-copy strong {
  max-width: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.enterprise-overview-usage-card .overview-top-value {
  flex: 0 0 auto;
  font-size: 11px;
}

.enterprise-overview-usage-card .overview-top-bar {
  display: block !important;
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(126, 139, 168, 0.14);
}

.enterprise-overview-usage-card .overview-top-bar i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--overview-series-color, var(--accent));
}

@media (max-width: 1100px) {
  .enterprise-overview-usage-card .overview-card-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(244px, auto) auto;
  }

  .enterprise-overview-usage-card .overview-top-list {
    min-height: 0;
    max-height: none;
    padding: 8px 0 0 4px;
    border-top: 1px solid rgba(126, 139, 168, 0.14);
    border-left: 0;
  }
}

/* Permissions filters use the same unframed list toolbar alignment. */
.content-view:has(#adminFilterInput) > .page-toolbar {
  padding-left: 0;
  padding-right: 0;
}

/* Batch 53: keep the workbench table readable on narrow screens with horizontal scroll. */
.content-view:has(#workbenchList) > #workbenchList {
  overflow-x: auto;
  overflow-y: auto;
}

#workbenchList .data-table {
  width: max(100%, 1480px);
  min-width: 1480px;
}

#workbenchList .data-table th,
#workbenchList .data-table td {
  overflow-wrap: normal;
  word-break: keep-all;
}

#workbenchList .data-table th {
  white-space: nowrap;
}

#workbenchList .data-table th:nth-child(1),
#workbenchList .data-table td:nth-child(1) {
  width: 250px;
}

#workbenchList .data-table th:nth-child(2),
#workbenchList .data-table td:nth-child(2) {
  width: 150px;
}

#workbenchList .data-table th:nth-child(3),
#workbenchList .data-table td:nth-child(3) {
  width: 250px;
}

#workbenchList .data-table th:nth-child(4),
#workbenchList .data-table td:nth-child(4) {
  width: 170px;
}

#workbenchList .data-table th:nth-child(5),
#workbenchList .data-table td:nth-child(5),
#workbenchList .data-table th:nth-child(6),
#workbenchList .data-table td:nth-child(6) {
  width: 180px;
}

#workbenchList .data-table th:nth-child(7),
#workbenchList .data-table td:nth-child(7) {
  width: 200px;
}

#workbenchList .data-table th:nth-child(8),
#workbenchList .data-table td:nth-child(8) {
  width: 140px;
}

#workbenchList .workbench-gateway-stack,
#workbenchList .workbench-status-stack,
#workbenchList .workbench-runtime-version,
#workbenchList .workbench-sparkline,
#workbenchList .table-actions {
  min-width: 0;
}

#workbenchList .workbench-gateway-link-row,
#workbenchList .workbench-gateway-channel-row,
#workbenchList .workbench-status-evidence,
#workbenchList .workbench-sparkline-text,
#workbenchList .workbench-runtime-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workbenchList .workbench-status-evidence {
  max-width: 190px;
}

#workbenchList .workbench-actions-cell .table-actions {
  flex-wrap: nowrap;
}

/* Hide enterprise detail breadcrumbs; the title row already has back navigation. */
.content-view:has(.enterprise-detail-title-row) .admin-breadcrumb,
.page-toolbar:has(.enterprise-detail-title-row) .admin-breadcrumb,
#enterpriseDetailBreadcrumb {
  display: none !important;
}

.admin-enterprise-scope .enterprise-detail-back-link {
  display: none !important;
}

/* Runtime monitor enterprise-filtered operations view. */
.runtime-monitor-enterprise-control,
.runtime-monitor-dimension-control,
.runtime-monitor-range-control {
  min-width: 156px;
}

.runtime-monitor-view .page-toolbar-actions {
  gap: 8px;
}

.runtime-monitor-view .runtime-monitor-enterprise-control,
.runtime-monitor-view .runtime-monitor-dimension-control,
.runtime-monitor-view .runtime-monitor-range-control {
  flex: 0 1 146px;
  width: 146px;
  min-width: 128px;
  max-width: 146px;
}

.runtime-monitor-enterprise-control.is-disabled {
  opacity: 0.58;
}

.runtime-monitor-alert-queue {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(217, 151, 42, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 250, 239, 0.82);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(174, 122, 36, 0.07);
  overflow: hidden;
}

.runtime-monitor-status-grid > .runtime-monitor-panel {
  height: 100%;
  min-height: 0;
}

.runtime-monitor-alert-panel {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
}

.runtime-monitor-alert-panel .panel-head {
  justify-content: flex-start;
  gap: 10px;
}

.runtime-monitor-alert-total-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.runtime-monitor-alert-panel .runtime-monitor-alert-queue {
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.runtime-monitor-alert-overview {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 2px;
}

.runtime-monitor-alert-overview article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px;
  min-width: 132px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.runtime-monitor-alert-overview article.is-attention {
  background: rgba(255, 248, 249, 0.82);
  box-shadow: inset 0 0 0 1px rgba(217, 75, 92, 0.22);
}

.runtime-monitor-alert-overview span,
.runtime-monitor-alert-overview small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.runtime-monitor-alert-overview strong {
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-alert-empty {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: 180px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.runtime-monitor-alert-empty strong {
  color: var(--text);
  font-size: 15px;
}

.runtime-monitor-alert-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 12px;
  color: var(--muted);
}

.runtime-monitor-alert-head strong {
  color: var(--text);
  font-size: 13px;
}

.runtime-monitor-alert-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 2px 6px 2px 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.runtime-monitor-alert-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, auto);
  gap: 16px;
  align-items: center;
  min-height: 82px;
  padding: 12px 12px 12px 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left: 4px solid #d9972a;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.runtime-monitor-status-grid .runtime-monitor-alert-item {
  grid-template-columns: minmax(0, 1fr) minmax(96px, auto);
  gap: 16px;
  align-items: center;
  min-height: 82px;
}

.runtime-monitor-alert-item.is-danger {
  border-color: rgba(217, 75, 92, 0.22);
  border-left-color: #d94b5c;
  background: rgba(255, 248, 249, 0.78);
}

.runtime-monitor-alert-item.is-warning {
  border-left-color: #d9972a;
}

.runtime-monitor-alert-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.runtime-monitor-alert-title-row,
.runtime-monitor-alert-main strong,
.runtime-monitor-alert-main span,
.runtime-monitor-alert-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.runtime-monitor-alert-title-row {
  gap: 8px;
}

.runtime-monitor-alert-main strong {
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.runtime-monitor-alert-merged {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(154, 91, 0, 0.1);
  color: rgba(154, 91, 0, 0.78);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.runtime-monitor-alert-main span,
.runtime-monitor-alert-main small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.runtime-monitor-alert-target {
  color: #64748b;
  font-weight: 800;
}

.runtime-monitor-alert-detail {
  color: rgba(71, 85, 105, 0.88);
}

.runtime-monitor-alert-meta {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 96px;
}

.runtime-monitor-alert-count {
  min-width: 0;
  text-align: right;
}

.runtime-monitor-status-grid .runtime-monitor-alert-count {
  min-width: 0;
  text-align: right;
}

.runtime-monitor-alert-count span {
  display: block;
  margin-bottom: 3px;
  color: rgba(154, 91, 0, 0.64);
  font-size: 11px;
  font-weight: 700;
}

.runtime-monitor-alert-count strong {
  display: block;
  color: #9a5b00;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.runtime-monitor-status-grid .runtime-monitor-alert-count span {
  display: block;
  margin: 0 0 2px;
}

.runtime-monitor-alert-actions,
.runtime-monitor-table-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
}

.runtime-monitor-status-grid .runtime-monitor-alert-actions {
  justify-content: flex-end;
}

.runtime-monitor-alert-actions .small {
  min-height: 24px;
  padding: 0 10px;
  border-color: rgba(37, 99, 235, 0.26);
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.1);
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  white-space: nowrap;
}

.runtime-monitor-alert-actions .small:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(219, 234, 254, 0.98);
  color: #1e40af;
}

.runtime-monitor-table-actions .small {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.runtime-monitor-state-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.runtime-monitor-chart-line.is-tokens {
  stroke: #0f766e;
  stroke-width: 2.4;
  stroke-dasharray: 8 4;
}

.runtime-monitor-chart-tooltip-value.is-token {
  fill: #0f766e;
}

.runtime-monitor-chart-legend i.is-tokens {
  background: #0f766e;
}

.runtime-monitor-metric-list,
.runtime-monitor-anomaly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.runtime-monitor-metric-list article,
.runtime-monitor-anomaly-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.runtime-monitor-metric-list article span,
.runtime-monitor-anomaly-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.runtime-monitor-metric-list article strong,
.runtime-monitor-anomaly-item strong {
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-metric-list article small,
.runtime-monitor-anomaly-item small {
  color: var(--muted);
  font-size: 12px;
}

.runtime-monitor-metric-list article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: baseline;
  gap: 8px 10px;
  min-height: 60px;
  padding: 8px 12px;
}

.runtime-monitor-metric-list article span {
  grid-column: 1;
  grid-row: 1;
}

.runtime-monitor-metric-list article strong {
  grid-column: 1 / -1;
  grid-row: 2;
}

.runtime-monitor-metric-list article small {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  color: rgba(100, 116, 139, 0.86);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-anomaly-item.is-danger {
  border-color: rgba(217, 75, 92, 0.3);
  background: rgba(255, 239, 241, 0.78);
}

.runtime-monitor-anomaly-item.is-warning {
  border-color: rgba(217, 151, 42, 0.28);
  background: rgba(255, 248, 232, 0.78);
}

.runtime-monitor-anomaly-item.is-success {
  border-color: rgba(59, 159, 120, 0.24);
  background: rgba(237, 252, 246, 0.72);
}

.runtime-monitor-usage-table {
  width: max(100%, 1220px);
}

.runtime-monitor-usage-log-shell {
  overflow: hidden;
}

.runtime-monitor-usage-table-scroll {
  max-width: 100%;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.runtime-monitor-usage-table-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.runtime-monitor-usage-table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.runtime-monitor-usage-table-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(126, 139, 168, 0.36);
  background-clip: content-box;
}

.runtime-monitor-usage-table-scroll::-webkit-scrollbar-corner {
  background: transparent;
}

.runtime-monitor-usage-table th,
.runtime-monitor-usage-table td {
  vertical-align: middle;
}

.runtime-monitor-usage-table th:nth-child(1),
.runtime-monitor-usage-table td:nth-child(1) {
  width: 138px;
  white-space: nowrap;
}

.runtime-monitor-usage-table th:nth-child(6),
.runtime-monitor-usage-table td:nth-child(6) {
  width: 118px;
  white-space: nowrap;
}

.runtime-monitor-usage-table th:nth-child(7),
.runtime-monitor-usage-table td:nth-child(7) {
  min-width: 190px;
}

.runtime-monitor-usage-table th:nth-child(9),
.runtime-monitor-usage-table td:nth-child(9) {
  width: 170px;
}

.runtime-monitor-usage-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid rgba(210, 218, 236, 0.78);
  background: rgba(247, 249, 255, 0.58);
  color: rgba(100, 116, 139, 0.92);
  font-size: 12px;
}

.runtime-monitor-usage-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.runtime-monitor-usage-page-btn {
  min-width: 32px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 26px;
  white-space: nowrap;
}

.runtime-monitor-usage-page-btn.is-active {
  color: #4f659f;
  border-color: rgba(126, 149, 207, 0.54);
  background: linear-gradient(135deg, rgba(220, 232, 255, 0.94), rgba(245, 241, 255, 0.82));
  box-shadow: var(--button-glow-strong);
}

.runtime-monitor-usage-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  color: rgba(100, 116, 139, 0.76);
  font-style: normal;
}

.runtime-monitor-detail-modal-card {
  width: min(780px, calc(100vw - 48px));
}

.runtime-monitor-detail-modal-card.has-merged-notices {
  width: min(1120px, calc(100vw - 48px));
}

.runtime-monitor-detail-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  max-height: min(68vh, 680px);
  padding: 20px 24px 24px;
  overflow: auto;
}

.runtime-monitor-detail-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.runtime-monitor-detail-modal-card.has-merged-notices .runtime-monitor-detail-main {
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, 0.95fr);
  align-items: stretch;
  max-height: calc(min(68vh, 680px) - 84px);
}

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

.runtime-monitor-detail-row {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.runtime-monitor-detail-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.runtime-monitor-detail-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.runtime-monitor-merged-notices {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.runtime-monitor-merged-notices-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.runtime-monitor-merged-notices-head span {
  font-weight: 800;
}

.runtime-monitor-merged-notices-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.runtime-monitor-merged-notices-list {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.runtime-monitor-merged-notice {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.runtime-monitor-merged-notice > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.runtime-monitor-merged-notice > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.runtime-monitor-merged-notice-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.runtime-monitor-merged-notice strong,
.runtime-monitor-merged-notice small,
.runtime-monitor-merged-notice time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-merged-notice strong {
  color: var(--text);
  font-size: 13px;
}

.runtime-monitor-merged-notice-title small {
  flex: 0 1 auto;
  color: var(--muted);
  font-weight: 700;
}

.runtime-monitor-merged-notice-title .runtime-monitor-merged-notice-actor {
  font-weight: 600;
}

.runtime-monitor-merged-notice-title time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.runtime-monitor-merged-notice small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.runtime-monitor-merged-notice b {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.runtime-monitor-detail-enterprise-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(125, 149, 207, 0.28);
  border-radius: 8px;
  background: rgba(125, 149, 207, 0.08);
  color: var(--text);
  text-decoration: none;
}

.runtime-monitor-detail-enterprise-link:hover {
  border-color: rgba(125, 149, 207, 0.5);
  background: rgba(125, 149, 207, 0.12);
}

.runtime-monitor-detail-enterprise-link span,
.runtime-monitor-detail-enterprise-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.runtime-monitor-detail-enterprise-link strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Batch 60: enterprise detail GitLab user controls and workbench list grouping. */
#enterpriseWorkbenchList.table-shell {
  --enterprise-workbench-table-head-height: 44px;
  --enterprise-workbench-main-row-height: 132px;
}

#enterpriseGitlabBindingList.table-shell {
  --enterprise-gitlab-binding-table-head-height: 54px;
  --enterprise-gitlab-binding-main-row-height: 72px;
}

#enterpriseWorkbenchList .enterprise-workbench-table,
#enterpriseWorkbenchList .workbench-project-subtable {
  background: #f9fbff;
}

.gitlab-user-status-control {
  min-width: 96px;
  grid-template-columns: repeat(2, minmax(40px, 1fr));
}

.admin-shell .gitlab-user-system-status,
.admin-shell .chip.disabled.gitlab-user-system-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 96px;
  min-height: 36px;
  padding: 0 12px;
  color: #5f6f8d;
  border-color: rgba(184, 197, 222, 0.74);
  border-radius: var(--radius);
  background: rgba(246, 249, 255, 0.96);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

/* Batch 76: keep enterprise list domain and certificate status readable. */
#enterpriseList .data-table {
  min-width: 1180px;
  table-layout: fixed;
}

#enterpriseList .data-table th:nth-child(1),
#enterpriseList .data-table td:nth-child(1) {
  width: 220px;
}

#enterpriseList .data-table th:nth-child(2),
#enterpriseList .data-table td:nth-child(2) {
  width: 150px;
}

#enterpriseList .data-table th:nth-child(3),
#enterpriseList .data-table td:nth-child(3) {
  width: 270px;
}

#enterpriseList .data-table th:nth-child(4),
#enterpriseList .data-table td:nth-child(4) {
  width: 110px;
}

#enterpriseList .data-table th:nth-child(5),
#enterpriseList .data-table td:nth-child(5) {
  width: 150px;
}

#enterpriseList .data-table th:nth-child(6),
#enterpriseList .data-table td:nth-child(6) {
  width: 150px;
}

#enterpriseList .enterprise-domain-cell {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

#enterpriseList .enterprise-domain-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

#enterpriseList .enterprise-domain-text {
  min-width: 0;
  max-width: 100%;
}

#enterpriseList .enterprise-https-action {
  justify-self: end;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

#enterpriseList .enterprise-filing-action {
  justify-self: end;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

#enterpriseList .enterprise-filing-action.is-configured {
  color: #14784f;
  border-color: rgba(44, 151, 105, 0.42);
  background: rgba(232, 249, 241, 0.95);
}

.enterprise-filing-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(246, 249, 255, 0.64);
}

.enterprise-filing-head {
  display: grid;
  gap: 4px;
}

.enterprise-filing-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.enterprise-filing-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.enterprise-filing-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.enterprise-filing-actions .hint {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.enterprise-filing-actions .hint.is-error {
  color: var(--danger);
}

@media (max-width: 720px) {
  #enterpriseList .enterprise-domain-cell {
    grid-template-columns: minmax(100px, 1fr) auto;
    gap: 6px;
  }

  #enterpriseList .enterprise-domain-actions {
    gap: 4px;
  }

  #enterpriseList .enterprise-https-action,
  #enterpriseList .enterprise-filing-action {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    padding-right: 5px;
    padding-left: 5px;
  }

  .enterprise-certificate-modal-card {
    width: min(560px, calc(100vw - 24px));
  }

  .enterprise-filing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .enterprise-filing-actions button {
    width: 100%;
  }
}

.gitlab-user-col-status {
  width: 112px;
}

.gitlab-user-project-quick-add .field {
  gap: 8px;
}

.gitlab-user-project-multi-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  padding: 8px;
  overflow: auto;
  border: 1px solid rgba(126, 139, 168, 0.18);
  border-radius: 8px;
  background: rgba(246, 249, 255, 0.72);
}

.gitlab-user-project-option-group {
  display: grid;
  gap: 4px;
}

.gitlab-user-project-option-group + .gitlab-user-project-option-group {
  padding-top: 8px;
  border-top: 1px solid rgba(126, 139, 168, 0.12);
}

.gitlab-user-project-option-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px;
  color: #34415d;
  font-size: 12px;
  font-weight: 800;
}

.gitlab-user-project-option-group-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.gitlab-user-project-option {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.56);
}

.gitlab-user-project-option:hover,
.gitlab-user-project-option:has(input:checked) {
  border-color: rgba(57, 103, 214, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

@media (max-width: 1320px) {
  .runtime-monitor-status-grid {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .runtime-monitor-status-grid > .runtime-monitor-panel {
    height: auto;
  }

  .runtime-monitor-alert-panel .runtime-monitor-alert-queue {
    height: 420px;
  }
}

@media (max-width: 1100px) {
  .runtime-monitor-detail-modal-card.has-merged-notices .runtime-monitor-detail-main {
    grid-template-columns: minmax(0, 1fr);
    max-height: none;
  }

  .runtime-monitor-merged-notices-list {
    max-height: 260px;
  }

  .runtime-monitor-alert-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-alert-meta {
    justify-items: start;
  }

  .runtime-monitor-alert-count {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .runtime-monitor-view .runtime-monitor-enterprise-control,
  .runtime-monitor-view .runtime-monitor-dimension-control,
  .runtime-monitor-view .runtime-monitor-range-control {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .runtime-monitor-metric-list,
  .runtime-monitor-anomaly-grid,
  .runtime-monitor-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Batch 58: permissions, enterprise certificates, filters, and system layout. */
.admin-permission-panel .permission-detail-list.hidden {
  display: none;
}

.enterprise-https-action {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}

.enterprise-filing-action {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}

#enterpriseList .enterprise-https-action.is-expiring,
#enterpriseList .enterprise-https-action.is-expiring:hover,
#enterpriseList .enterprise-https-action.is-expiring:focus-visible {
  color: #5c3b00;
  border-color: #d99a00;
  background: #ffe08a;
  box-shadow: 0 4px 12px rgba(217, 154, 0, 0.22);
}

#enterpriseList .enterprise-https-action.is-expired,
#enterpriseList .enterprise-https-action.is-expired:hover,
#enterpriseList .enterprise-https-action.is-expired:focus-visible {
  color: #ffffff;
  border-color: #b42318;
  background: #d92d20;
  box-shadow: 0 4px 12px rgba(180, 35, 24, 0.24);
}

@media (max-width: 720px) {
  #enterpriseList .enterprise-https-action,
  #enterpriseList .enterprise-filing-action {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    padding-right: 5px;
    padding-left: 5px;
  }
}

.workbench-filter-group {
  flex: 1 1 auto;
  min-width: min(560px, 100%);
}

.workbench-enterprise-filter-control {
  min-width: 220px;
}

.workbench-gateway-filter-control {
  min-width: 280px;
}

.token-list-toolbar .page-toolbar-search-group {
  overflow: visible;
}

.token-enterprise-filter-control {
  flex: 0 0 min(220px, 20vw);
  min-width: 190px;
}

.token-provider-filter-control {
  flex: 0 0 min(190px, 18vw);
  min-width: 170px;
}

.token-provider-filter-menu {
  grid-template-columns: minmax(0, 1fr);
}

.token-list-toolbar .toolbar-select-button {
  min-height: 42px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
}

.content-view:has(.admin-system-tabs) .system-side-column {
  grid-template-rows: repeat(3, minmax(190px, 1fr));
  align-self: stretch;
}

.content-view:has(.admin-system-tabs) .system-side-column > .panel-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 190px;
}

.content-view:has(.admin-system-tabs) .system-side-column > .panel-card > .stack-form,
.content-view:has(.admin-system-tabs) .system-side-column > .panel-card > .action-stack {
  align-content: start;
}

.content-view:has(.admin-system-tabs) .system-summary-card #systemSummary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-view:has(.admin-system-tabs) .system-summary-card #systemSummary .summary-item {
  min-height: 78px;
}

@media (max-width: 1480px) {
  .content-view:has(.admin-system-tabs) .system-summary-card #systemSummary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .workbench-filter-group,
  .token-list-toolbar .page-toolbar-search-group {
    flex-wrap: wrap;
  }

  .content-view:has(.admin-system-tabs) .system-side-column {
    grid-template-rows: none;
  }

  .content-view:has(.admin-system-tabs) .system-summary-card #systemSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .content-view:has(.admin-system-tabs) .system-summary-card #systemSummary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Batch 59: align token filters and runtime monitor cards. */
.token-list-toolbar .toolbar-search,
.token-enterprise-filter-control,
.token-provider-filter-control {
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
}

.token-provider-filter-control .toolbar-select-button {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  justify-content: space-between;
}

.runtime-monitor-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.runtime-monitor-table-actions {
  justify-content: flex-start;
}

.runtime-monitor-usage-table th:nth-child(9),
.runtime-monitor-usage-table td:nth-child(9) {
  width: 120px;
  min-width: 120px;
  text-align: left;
}

@media (max-width: 1320px) {
  .runtime-monitor-status-grid {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .runtime-monitor-status-grid > .runtime-monitor-panel {
    height: auto;
  }

  .runtime-monitor-alert-panel .runtime-monitor-alert-queue {
    height: 420px;
  }
}

@media (max-width: 980px) {
  .token-list-toolbar .toolbar-search,
  .token-enterprise-filter-control,
  .token-provider-filter-control {
    flex: 1 1 280px;
  }
}

@media (max-width: 640px) {
  .token-list-toolbar .toolbar-search,
  .token-enterprise-filter-control,
  .token-provider-filter-control {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* Batch 60: compact system side operation cards. */
.content-view:has(.admin-system-tabs) .system-side-column {
  grid-template-rows: none;
  align-self: start;
  gap: 10px;
}

.content-view:has(.admin-system-tabs) .system-side-column > .panel-card {
  display: grid;
  grid-template-rows: auto auto;
  min-height: 0;
  padding: 16px 18px;
}

.content-view:has(.admin-system-tabs) .system-side-column > .panel-card > .panel-head {
  margin-bottom: 10px;
}

.content-view:has(.admin-system-tabs) .system-side-column > .panel-card > .panel-head h2 {
  font-size: 19px;
  line-height: 1.25;
}

.content-view:has(.admin-system-tabs) .system-side-column > .panel-card > .stack-form,
.content-view:has(.admin-system-tabs) .system-side-column > .panel-card > .action-stack {
  gap: 10px;
  align-content: start;
}

.content-view:has(.admin-system-tabs) .system-side-column .field {
  gap: 6px;
}

.content-view:has(.admin-system-tabs) .system-side-column .field span {
  font-size: 12px;
}

.content-view:has(.admin-system-tabs) .system-side-column .field input,
.content-view:has(.admin-system-tabs) .system-side-column button {
  min-height: 38px;
  font-size: 13px;
}

.content-view:has(.admin-system-tabs) .system-side-column .field input {
  padding: 0 12px;
  border-radius: 8px;
}

.content-view:has(.admin-system-tabs) .system-side-column button {
  padding: 0 14px;
}

.content-view:has(.admin-system-tabs) .system-side-column .form-hint {
  margin: 2px 0 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.content-view:has(.admin-system-tabs) .system-dev-toggle {
  min-height: 20px;
  column-gap: 10px;
}

/* Batch 61: keep workbench actions visible on narrow screens. */
.content-view:has(#workbenchList) > .admin-insight-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-view:has(#workbenchList) > .admin-insight-strip > .admin-insight-item {
  width: auto;
  min-width: 0;
}

#workbenchInsightStrip .workbench-cos-version-value {
  display: grid;
  align-self: center;
  gap: 5px;
  overflow: visible;
  color: var(--accent);
  font-size: 18px;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

#workbenchInsightStrip .workbench-cos-version-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#workbenchInsightStrip .workbench-cos-version-role,
#workbenchInsightStrip .workbench-cos-version-separator {
  white-space: nowrap;
}

#workbenchInsightStrip .workbench-cos-version-role {
  color: var(--accent);
  font-weight: 850;
}

#workbenchInsightStrip .workbench-cos-version-channel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workbenchInsightStrip .workbench-cos-version-channel.is-cos {
  color: #4f5f7c;
}

#workbenchInsightStrip .workbench-cos-version-separator {
  color: var(--muted);
  font-weight: 760;
}

#workbenchInsightStrip .workbench-cos-publish-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(61, 103, 211, 0.28);
  background: rgba(235, 242, 255, 0.9);
  color: var(--accent);
}

#workbenchList .data-table {
  width: max(100%, 1360px);
  min-width: 1360px;
  table-layout: fixed;
}

#workbenchList .data-table th:nth-child(1),
#workbenchList .data-table td:nth-child(1) {
  width: 220px;
}

#workbenchList .data-table th:nth-child(2),
#workbenchList .data-table td:nth-child(2) {
  width: 116px;
}

#workbenchList .data-table th:nth-child(3),
#workbenchList .data-table td:nth-child(3) {
  width: 220px;
}

#workbenchList .data-table th:nth-child(4),
#workbenchList .data-table td:nth-child(4) {
  width: 154px;
}

#workbenchList .data-table th:nth-child(5),
#workbenchList .data-table td:nth-child(5),
#workbenchList .data-table th:nth-child(6),
#workbenchList .data-table td:nth-child(6) {
  width: 168px;
}

#workbenchList .data-table th:nth-child(7),
#workbenchList .data-table td:nth-child(7) {
  width: 188px;
}

#workbenchList .data-table th:nth-child(8),
#workbenchList .data-table td:nth-child(8) {
  position: sticky;
  right: 0;
  z-index: 4;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  background: rgba(247, 250, 255, 0.96);
  box-shadow: -10px 0 18px rgba(95, 108, 140, 0.1);
}

#workbenchList .data-table th:nth-child(8) {
  z-index: 7;
  background: rgba(244, 248, 255, 0.98);
}

#workbenchList .data-table tbody tr:hover > td:nth-child(8) {
  background: rgba(241, 246, 255, 0.98);
}

#workbenchList .workbench-actions-cell {
  padding-right: 10px;
  padding-left: 10px;
}

#workbenchList .workbench-actions-cell .table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(44px, 1fr));
  gap: 8px;
  width: 100%;
}

#workbenchList .workbench-actions-cell .table-actions button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  white-space: nowrap;
}

/* Batch 72: place enterprise runtime upgrades in the sticky group header. */
#workbenchList {
  --workbench-table-head-height: 42px;
}

#workbenchList .admin-table-group-row {
  position: sticky;
  top: var(--workbench-table-head-height);
  z-index: 12;
}

#workbenchList .admin-table-group-row > td {
  position: sticky;
  top: var(--workbench-table-head-height);
  z-index: 12;
  background: rgba(248, 251, 255, 0.98);
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.14);
}

#workbenchList .workbench-group-title-cell {
  padding-left: 16px;
}

#workbenchList .workbench-group-upgrade-cell {
  padding-right: 8px;
  padding-left: 8px;
  text-align: center;
  white-space: nowrap;
}

#workbenchList .workbench-group-action-cell {
  min-width: 118px;
}

#workbenchList .workbench-group-upgrade-btn {
  width: min(82px, 100%);
  min-width: 64px;
  min-height: 30px;
  padding: 0 12px;
  border-color: rgba(126, 139, 168, 0.18);
  background: rgba(242, 245, 250, 0.82);
  color: rgba(126, 139, 168, 0.72);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

#workbenchList .workbench-group-upgrade-btn.is-ready {
  border-color: rgba(61, 103, 211, 0.42);
  background: #3d67d3;
  color: #fff;
  box-shadow: 0 6px 14px rgba(61, 103, 211, 0.18);
}

#workbenchList .workbench-group-upgrade-btn.is-ready:hover:not(:disabled) {
  border-color: rgba(61, 103, 211, 0.42);
  background: #315cc8;
}

#workbenchList .workbench-group-upgrade-btn.is-upgrading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-color: rgba(37, 99, 235, 0.26);
  background: rgba(239, 246, 255, 0.96);
  color: #2563eb;
  box-shadow: none;
}

#workbenchList .workbench-group-upgrade-btn.is-upgrading::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: workbench-runtime-spin 0.8s linear infinite;
}

#workbenchList .workbench-group-upgrade-btn.is-disabled,
#workbenchList .workbench-group-upgrade-btn:disabled {
  border-color: rgba(126, 139, 168, 0.18);
  background: rgba(242, 245, 250, 0.82);
  color: rgba(126, 139, 168, 0.62);
  box-shadow: none;
}

#workbenchList .data-table.has-sticky-actions thead th:last-child {
  z-index: 18;
}

@media (max-width: 1380px) {
  .content-view:has(#workbenchList) > .admin-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .content-view:has(#workbenchList) > .admin-insight-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Batch 73: enterprise workbench upgrade workspace. */
.enterprise-runtime-upgrade-modal-card {
  width: min(1480px, calc(100vw - 40px));
  height: min(900px, calc(100vh - 40px));
}

.enterprise-runtime-upgrade-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 0;
  padding: 18px 22px 0;
  overflow: hidden;
}

.enterprise-runtime-upgrade-components {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: start;
  gap: 12px;
}

.enterprise-runtime-component-btn {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px 18px;
  border: 1px solid rgba(126, 139, 168, 0.24);
  border-radius: 7px;
  background: #fff;
  color: #475569;
  text-align: left;
}

.enterprise-runtime-component-btn strong {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.enterprise-runtime-component-btn small {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-runtime-component-btn.is-selected[data-enterprise-upgrade-component="agent"] {
  border-color: rgba(37, 99, 235, 0.62);
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 4px 0 0 #2563eb;
}

.enterprise-runtime-component-btn.is-selected[data-enterprise-upgrade-component="gateway"] {
  border-color: rgba(5, 150, 105, 0.58);
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 4px 0 0 #059669;
}

.enterprise-runtime-component-btn.is-selected[data-enterprise-upgrade-component="docker"] {
  border-color: rgba(37, 99, 235, 0.58);
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 4px 0 0 #2563eb;
}

.enterprise-runtime-component-btn.is-selected[data-enterprise-upgrade-component="git"] {
  border-color: rgba(234, 88, 12, 0.58);
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 4px 0 0 #ea580c;
}

.enterprise-runtime-component-btn.is-selected[data-enterprise-upgrade-component="codex"] {
  border-color: rgba(71, 85, 105, 0.58);
  background: #f8fafc;
  color: #334155;
  box-shadow: inset 4px 0 0 #475569;
}

.enterprise-runtime-component-btn.is-selected[data-enterprise-upgrade-component="playwright"] {
  border-color: rgba(5, 150, 105, 0.58);
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 4px 0 0 #059669;
}

.enterprise-runtime-upgrade-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(390px, 1.1fr) minmax(360px, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(126, 139, 168, 0.2);
  border-radius: 7px;
  background: #fff;
}

.enterprise-runtime-upgrade-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.enterprise-runtime-upgrade-pane + .enterprise-runtime-upgrade-pane {
  border-left: 1px solid rgba(126, 139, 168, 0.2);
}

.enterprise-runtime-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 48px;
  min-height: 48px;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(126, 139, 168, 0.16);
  background: #f8fafc;
}

.enterprise-runtime-pane-head h3 {
  margin: 0;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.enterprise-runtime-pane-head span {
  color: #64748b;
  font-size: 12px;
}

.enterprise-runtime-pane-head button {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-runtime-pane-head button.is-filtered {
  border-color: rgba(37, 99, 235, 0.42);
  color: #1d4ed8;
}

.enterprise-runtime-machine-list,
.enterprise-runtime-step-list,
.enterprise-runtime-log-list {
  min-height: 0;
  overflow: auto;
}

.enterprise-runtime-machine-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
}

.enterprise-runtime-machine {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 174px;
  padding: 11px 12px;
  border: 1px solid rgba(126, 139, 168, 0.2);
  border-radius: 7px;
  background: #fff;
  color: #172033;
  text-align: left;
}

.enterprise-runtime-machine:hover,
.enterprise-runtime-machine:has(.enterprise-runtime-machine-identity:focus-visible) {
  border-color: rgba(37, 99, 235, 0.42);
}

.enterprise-runtime-machine.is-selected {
  border-color: #2563eb;
  box-shadow: inset 3px 0 0 #2563eb;
}

.enterprise-runtime-machine-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.enterprise-runtime-machine-identity {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.enterprise-runtime-machine-identity:hover,
.enterprise-runtime-machine-identity:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.enterprise-runtime-machine-identity strong {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-runtime-machine-identity span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.enterprise-runtime-machine-identity span.is-mismatch {
  color: #b45309;
}

.enterprise-runtime-machine-upgrade-btn {
  min-width: 48px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(37, 99, 235, 0.34);
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.enterprise-runtime-machine-upgrade-btn:hover:not(:disabled) {
  border-color: #2563eb;
  background: #dbeafe;
}

.enterprise-runtime-machine-upgrade-btn:disabled {
  border-color: rgba(148, 163, 184, 0.28);
  background: #f1f5f9;
  color: #94a3b8;
}

.enterprise-runtime-machine-metric {
  display: grid;
  grid-template-columns: 36px minmax(54px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.enterprise-runtime-machine-metric > span,
.enterprise-runtime-machine-metric > em {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-runtime-machine-metric > em {
  text-align: right;
}

.enterprise-runtime-machine-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e2e8f0;
}

.enterprise-runtime-machine-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.enterprise-runtime-machine-metric.is-warn .enterprise-runtime-machine-meter i {
  background: #d97706;
}

.enterprise-runtime-machine-metric.is-danger .enterprise-runtime-machine-meter i {
  background: #dc2626;
}

.enterprise-runtime-step-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

.enterprise-runtime-overall-step {
  border: 1px solid rgba(126, 139, 168, 0.18);
  border-radius: 7px;
  background: #fff;
}

.enterprise-runtime-overall-step.is-running {
  border-color: rgba(217, 119, 6, 0.36);
}

.enterprise-runtime-overall-step.is-failed {
  border-color: rgba(220, 38, 38, 0.34);
}

.enterprise-runtime-step {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 11px;
}

.enterprise-runtime-step-marker {
  width: 9px;
  height: 9px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
}

.enterprise-runtime-overall-step.is-running > .enterprise-runtime-step .enterprise-runtime-step-marker {
  border-color: #d97706;
  background: #fef3c7;
  animation: workbench-runtime-spin 0.9s linear infinite;
}

.enterprise-runtime-overall-step.is-completed > .enterprise-runtime-step .enterprise-runtime-step-marker {
  border-color: #059669;
  background: #10b981;
}

.enterprise-runtime-overall-step.is-failed > .enterprise-runtime-step .enterprise-runtime-step-marker {
  border-color: #dc2626;
  background: #ef4444;
}

.enterprise-runtime-step-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

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

.enterprise-runtime-step-copy strong {
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

.enterprise-runtime-step-copy small,
.enterprise-runtime-step em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

.enterprise-runtime-step em {
  text-align: right;
  white-space: nowrap;
}

.enterprise-runtime-step-machine-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 11px 10px 32px;
}

.enterprise-runtime-step-machine-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.2;
}

.enterprise-runtime-step-machine-marker strong {
  font-weight: 750;
}

.enterprise-runtime-step-machine-marker em {
  color: #64748b;
  font-style: normal;
}

.enterprise-runtime-step-machine-marker.is-running {
  border-color: rgba(217, 119, 6, 0.34);
  background: #fffbeb;
  color: #92400e;
}

.enterprise-runtime-step-machine-marker.is-completed {
  border-color: rgba(5, 150, 105, 0.28);
  background: #ecfdf5;
  color: #047857;
}

.enterprise-runtime-step-machine-marker.is-failed {
  border-color: rgba(220, 38, 38, 0.3);
  background: #fef2f2;
  color: #b91c1c;
}

.enterprise-runtime-log-list {
  overflow-x: hidden;
  padding: 10px 12px 16px;
  background: #111827;
  color: #d1d5db;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.enterprise-runtime-log-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(112px, auto);
  gap: 5px 8px;
  width: 100%;
  min-width: 0;
}

.enterprise-runtime-log-line {
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 11px;
  line-height: 1.45;
}

.enterprise-runtime-log-line time,
.enterprise-runtime-log-line span {
  color: #94a3b8;
}

.enterprise-runtime-log-line time {
  grid-column: 1 / 3;
  grid-row: 1;
  min-width: 0;
  white-space: nowrap;
}

.enterprise-runtime-log-line strong {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  color: #67e8f9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-runtime-log-line .enterprise-runtime-log-component,
.enterprise-runtime-log-line .enterprise-runtime-log-step {
  min-width: 0;
  overflow: hidden;
  color: #cbd5e1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-runtime-log-line .enterprise-runtime-log-component {
  grid-column: 2;
  grid-row: 2;
}

.enterprise-runtime-log-line .enterprise-runtime-log-step {
  grid-column: 3;
  grid-row: 2;
  color: #f8fafc;
}

.enterprise-runtime-log-status {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.enterprise-runtime-log-line p {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 2px 0 0;
  padding: 6px 8px;
  border-left: 2px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.72);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.enterprise-runtime-log-line p::before {
  content: "详情";
  margin-right: 8px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.enterprise-runtime-log-line.is-error p {
  border-left-color: #ef4444;
  background: rgba(127, 29, 29, 0.2);
  color: #fca5a5;
}

.enterprise-runtime-empty,
.enterprise-runtime-log-empty {
  padding: 24px 14px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.enterprise-runtime-log-empty {
  color: #94a3b8;
}

@media (max-width: 1180px) {
  .enterprise-runtime-upgrade-workspace {
    grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
    overflow: auto;
  }

  .enterprise-runtime-log-pane {
    grid-column: 1 / -1;
    min-height: 300px;
    border-top: 1px solid rgba(126, 139, 168, 0.2);
    border-left: 0 !important;
  }
}

@media (max-width: 760px) {
  .enterprise-runtime-log-line {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
  }

  .enterprise-runtime-log-line time {
    grid-column: 1;
  }

  .enterprise-runtime-log-status {
    grid-column: 2;
  }

  .enterprise-runtime-log-line strong {
    grid-column: 1;
  }

  .enterprise-runtime-log-line .enterprise-runtime-log-component {
    grid-column: 2;
  }

  .enterprise-runtime-log-line .enterprise-runtime-log-step {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .enterprise-runtime-log-line p {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .enterprise-runtime-upgrade-modal-card {
    width: calc(100vw - 32px);
    height: calc(100vh - 16px);
  }

  .enterprise-runtime-upgrade-body {
    padding: 14px 12px 0;
    overflow: auto;
  }

  .enterprise-runtime-upgrade-components,
  .enterprise-runtime-upgrade-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .enterprise-runtime-upgrade-workspace {
    overflow: visible;
  }

  .enterprise-runtime-upgrade-pane {
    min-height: 360px;
  }

  .enterprise-runtime-upgrade-pane + .enterprise-runtime-upgrade-pane {
    border-top: 1px solid rgba(126, 139, 168, 0.2);
    border-left: 0;
  }

  .enterprise-runtime-log-pane {
    grid-column: auto;
  }

}

/* Contract management */
.contract-content-view {
  min-width: 0;
}

.contract-list-toolbar {
  margin-bottom: 16px;
  container-type: inline-size;
}

.contract-list-toolbar .page-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.contract-list-toolbar .page-toolbar-button-group {
  justify-self: end;
}

.contract-filter-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  width: auto;
  max-width: none;
}

.contract-filter-group .toolbar-search {
  flex: 0 1 270px;
  width: 270px;
  min-width: 240px;
  max-width: 270px;
  height: 42px;
}

.contract-filter-group input,
.contract-filter-group select,
.contract-filter-group button.admin-select-button,
.contract-filter-group .contract-date-range-separator {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

.contract-filter-group input,
.contract-filter-group select,
.contract-filter-group button.admin-select-button,
.contract-filter-group .admin-select-control {
  height: 42px;
  min-height: 42px;
}

.contract-filter-group input::placeholder,
.contract-date-range .contract-date-placeholder {
  color: #566277;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  opacity: 1;
}

.contract-date-range {
  display: flex;
  grid-column: span 1;
  align-items: center;
  gap: 4px;
  height: 42px;
  min-width: 0;
  width: auto;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--field-bg);
  box-shadow: var(--button-glow);
}

.contract-date-field {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  min-width: 0;
  height: 40px;
  cursor: pointer;
}

.contract-date-range .contract-date-placeholder {
  position: absolute;
  z-index: 1;
  left: 6px;
  max-width: calc(100% - 26px);
  overflow: hidden;
  color: #566277;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-date-field:not(.is-empty) .contract-date-placeholder {
  display: none;
}

.contract-date-range:focus-within {
  border-color: #4269be;
  background: var(--field-focus-bg);
  box-shadow: 0 0 0 3px rgba(66, 105, 190, 0.16);
}

.admin-shell .page-toolbar .contract-date-range input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  width: auto;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  accent-color: #4269be;
}

.contract-date-field.is-empty input::-webkit-datetime-edit {
  opacity: 0;
}

.contract-date-range input:focus {
  border: 0;
  box-shadow: none;
}

.contract-date-range-separator {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  user-select: none;
}

.contract-filter-group .contract-date-range {
  grid-column: auto;
}

.contract-filter-group .toolbar-search:not(.contract-date-range) input:focus,
.contract-filter-group .toolbar-search:not(.contract-date-range) select:focus,
.contract-filter-group .admin-select-control.is-open button.admin-select-button,
.contract-filter-group button.admin-select-button[aria-expanded="true"],
.contract-filter-group button.admin-select-button:focus,
.contract-filter-group button.admin-select-button:focus-visible {
  border-color: #4269be;
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 105, 190, 0.16);
}

.contract-filter-group .admin-select-control:has(select option[value=""]:checked) button.admin-select-button {
  color: var(--muted);
}

.admin-insight-strip.contract-insight-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.contract-insight-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  height: 104px;
  padding: 16px 20px 14px;
  overflow: hidden;
  border: 1px solid #dce3ef;
  border-radius: 8px;
  background: #f9fbfe;
}

.contract-insight-item > span,
.contract-insight-item > small {
  color: #647086;
}

.contract-insight-item > span {
  font-size: 13px;
}

.contract-insight-item > strong {
  align-self: center;
  color: #3f6fd9;
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
}

.contract-insight-item > small {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-insight-item.is-return > strong {
  color: #c99132;
}

.contract-insight-item.is-review > strong {
  color: #cb5d67;
}

.contract-insight-item.is-invoice > strong {
  color: #3d9b86;
}

.contract-list-shell {
  min-height: 320px;
  overflow-x: auto;
  scrollbar-gutter: auto;
  border: 1px solid #dce3ef;
  border-radius: 8px;
  background: #f9fbfe;
}

.contract-table {
  width: max(100%, 1615px);
  min-width: 1615px;
  table-layout: fixed;
  background: transparent;
}

.contract-table th,
.contract-table td {
  height: 62px;
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
  border-bottom-color: #e1e6ef;
}

.contract-table th {
  height: 44px;
  color: #657086;
  background: #f5f8fc;
  font-size: 12px;
  font-weight: 500;
}

.contract-table tbody tr:hover > td {
  background: #f5f8fc;
}

.contract-table th:nth-child(1),
.contract-table td:nth-child(1) {
  width: 165px;
}

.contract-table th:nth-child(2),
.contract-table td:nth-child(2) {
  width: 250px;
}

.contract-table th:nth-child(3),
.contract-table td:nth-child(3) {
  width: 200px;
}

.contract-table th:nth-child(4),
.contract-table td:nth-child(4) {
  width: 220px;
}

.contract-table th:nth-child(5),
.contract-table td:nth-child(5),
.contract-table th:nth-child(6),
.contract-table td:nth-child(6) {
  width: 105px;
}

.contract-table th:nth-child(7),
.contract-table td:nth-child(7) {
  width: 95px;
}

.contract-table th:nth-child(8),
.contract-table td:nth-child(8),
.contract-table th:nth-child(9),
.contract-table td:nth-child(9) {
  width: 90px;
}

.contract-table th:nth-child(10),
.contract-table td:nth-child(10) {
  width: 150px;
}

.data-table.contract-table.has-sticky-actions th:last-child,
.data-table.contract-table.has-sticky-actions td:last-child {
  width: 144px;
  min-width: 144px;
  max-width: 144px;
  text-align: center;
  background: #f9fbfe;
  box-shadow: none;
}

.data-table.contract-table.has-sticky-actions td:last-child {
  padding-right: 12px;
  padding-left: 12px;
}

.data-table.contract-table.has-sticky-actions td:last-child .table-actions {
  flex-wrap: nowrap;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  gap: 6px;
}

.data-table.contract-table.has-sticky-actions td:last-child .table-actions button {
  flex: 0 0 54px;
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  justify-content: center;
}

.data-table.contract-table.has-sticky-actions [data-contract-edit] {
  border-color: #4269be;
  background: #4269be;
  color: #fff;
  box-shadow: none;
}

.data-table.contract-table.has-sticky-actions [data-contract-edit]:hover,
.data-table.contract-table.has-sticky-actions [data-contract-edit]:focus-visible {
  border-color: #3459aa;
  background: #3459aa;
}

.data-table.contract-table.has-sticky-actions th:last-child {
  background: #f5f8fc;
}

.data-table.contract-table.has-sticky-actions tbody tr:hover > td:last-child {
  background: #f5f8fc;
}

.contract-number-cell {
  color: #344056;
  font-weight: 500;
  white-space: nowrap;
}

.contract-enterprise-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  text-align: left;
}

.contract-enterprise-logo {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid #e0e6ef;
  border-radius: 6px;
  object-fit: cover;
}

.contract-enterprise-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.contract-enterprise-cell strong {
  max-width: 100%;
  overflow: hidden;
  color: #344056;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-enterprise-contract-name,
.contract-enterprise-contact {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #7a8598;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-enterprise-contract-name {
  color: #5f6e84;
  overflow: visible;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.contract-party-b-cell {
  display: inline-block;
  max-width: 100%;
  color: #344056;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contract-signing-period {
  color: #566277;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.contract-amount-cell {
  color: #344056;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.contract-node-text {
  color: #566277;
  font-size: 13px;
  line-height: 1.45;
}

.contract-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #647086;
  background: #f0f3f8;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.contract-status-chip.is-success {
  color: #31836f;
  background: #e5f5ef;
}

.contract-status-chip.is-warning {
  color: #ac7827;
  background: #fff3dc;
}

.contract-status-chip.is-danger {
  color: #a84f59;
  background: #fbeaec;
}

.contract-status-chip.is-neutral {
  color: #697489;
  background: #f0f3f8;
}

.contract-modal-card {
  display: flex;
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100svh - 48px);
  overflow: hidden;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: #f9fbfe;
  box-shadow: none;
}

.contract-detail-modal-card {
  width: min(840px, calc(100vw - 32px));
}

.contract-modal-card > .modal-head,
.contract-modal-card > .modal-actions {
  position: sticky;
  z-index: 4;
  flex: 0 0 auto;
}

.contract-modal-card > .modal-head {
  top: 0;
  padding: 24px 32px 18px;
  background: #f9fbfe;
  border-bottom: 1px solid #dfe5ee;
}

.contract-detail-modal-card > .modal-head {
  padding-bottom: 12px;
  border-bottom: 0;
}

.contract-modal-card > .modal-actions {
  bottom: 0;
  gap: 10px;
  padding: 16px 32px 20px;
  background: #f9fbfe;
  border-top: 1px solid #dfe5ee;
}

.contract-modal-card button,
.contract-modal-card .primary,
.contract-modal-card .secondary,
.contract-modal-card .danger,
.contract-modal-card .small {
  border-radius: 8px;
}

.contract-modal-card > .stack-form,
.contract-detail-body {
  min-height: 0;
  overflow: auto;
}

.contract-modal-card > .contract-form {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.contract-form-body {
  min-height: 0;
  padding: 24px 32px 18px;
  overflow: auto;
  overscroll-behavior: contain;
}

.contract-form > .modal-actions {
  z-index: 5;
  flex: 0 0 auto;
  gap: 10px;
  margin: 0;
  padding: 16px 32px 20px;
  border-top: 1px solid #dfe5ee;
  background: #f9fbfe;
}

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

.contract-form-section {
  padding: 4px 0 18px;
}

.contract-form-section + .contract-form-section {
  padding-top: 6px;
}

.contract-info-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.contract-info-section-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: #d6dce6;
}

.contract-info-section-head h3 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.contract-info-divider {
  width: 100%;
  height: 1px;
  margin-bottom: 14px;
  background: #d6dce6;
}

.contract-form-span-all {
  grid-column: 1 / -1;
}

.contract-party-preview {
  margin-top: 12px;
}

.contract-party-preview-placeholder {
  margin: 10px 0 0;
  padding: 14px 16px;
  border: 1px dashed #d6deea;
  border-radius: 8px;
  color: #7a8598;
  background: #f5f8fc;
  font-size: 13px;
}

.contract-party-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.contract-party-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  padding: 4px 0 0;
  border-top: 1px solid #e1e6ef;
  border-bottom: 1px solid #e1e6ef;
}

.contract-party-info-grid.contract-party-preview-grid > div {
  padding-block: 11px;
  border-bottom: 1px solid #e7ebf2;
}

.contract-party-info-grid.contract-party-preview-grid > div:nth-child(even) {
  padding-left: 20px;
  border-left: 1px solid #e7ebf2;
}

.contract-party-info-grid.contract-party-preview-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.contract-party-info-grid > div {
  min-width: 0;
  padding: 8px 16px 8px 0;
}

.contract-party-info-grid > .is-wide {
  grid-column: span 2;
}

.contract-party-info-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.contract-party-info-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contract-period-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.contract-period-editor > .field {
  min-width: 0;
}

.contract-period-arrow {
  align-self: start;
  margin-top: 42px;
  color: #8793a7;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.contract-period-end output {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #f2f5fa;
  color: #344056;
  font-variant-numeric: tabular-nums;
}

.contract-period-end small {
  color: #7b879b;
  font-size: 12px;
}

.contract-amount-field {
  width: min(100%, 340px);
  margin-top: 16px;
}

.contract-amount-field input {
  font-variant-numeric: tabular-nums;
}

.contract-fixed-terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.contract-fixed-terms span,
.contract-fixed-terms strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contract-fixed-terms > span {
  padding: 2px 16px;
}

.contract-fixed-terms > span:first-child {
  padding-left: 0;
}

.contract-fixed-terms > span + span {
  border-left: 1px solid #dfe5ee;
}

.contract-fixed-terms .contract-term-total strong {
  color: #4269be;
}

.contract-process-note {
  padding: 14px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.contract-process-note strong {
  color: var(--ink);
}

.contract-process-note p,
.contract-upload-requirement {
  margin: 5px 0 0;
  line-height: 1.65;
}

.contract-fixed-terms strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
}

.contract-detail-body {
  padding: 0 32px 24px;
}

.contract-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--line);
}

.contract-detail-summary > div {
  min-width: 0;
  padding: 8px 16px 8px 0;
}

.contract-detail-summary dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.contract-detail-summary dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.contract-detail-summary .contract-detail-amount {
  color: #1b2434;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.contract-info-section {
  padding: 14px 0;
}

.contract-detail-body .contract-info-section + .contract-info-section {
  border-top: 0;
}

.contract-detail-body .contract-info-section-head {
  margin-bottom: 2px;
}

.contract-detail-body .contract-info-section-head::after {
  display: none;
}

.contract-info-section .contract-info-divider {
  margin-bottom: 4px;
}

.contract-info-section .contract-detail-summary {
  padding: 4px 0 0;
  border-bottom: 0;
}

.contract-info-section .contract-party-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
}

.contract-info-section .contract-party-detail-grid > div {
  padding: 8px 0 10px;
}

.contract-action-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.contract-action-section:last-child {
  border-bottom: 0;
}

.contract-action-head,
.contract-action-row,
.contract-upload-row,
.contract-action-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contract-action-head {
  margin-bottom: 14px;
}

.contract-action-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.contract-action-caption {
  margin: 5px 0 0;
  color: #748095;
  font-size: 12px;
  line-height: 1.5;
}

.contract-action-head > span {
  color: var(--muted);
  font-size: 12px;
}

.contract-action-row {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.contract-file-section .contract-action-head {
  align-items: flex-start;
  margin-bottom: 10px;
}

.contract-file-list {
  border-block: 1px solid #dfe5ee;
}

.contract-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 12px 0;
}

.contract-file-row + .contract-file-row {
  border-top: 1px solid #e7ebf2;
}

.contract-file-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.contract-file-copy strong {
  color: #354157;
  font-size: 13px;
  font-weight: 600;
}

.contract-file-copy small {
  color: #7a8598;
  font-size: 12px;
  line-height: 1.5;
}

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

.contract-file-actions > a,
.contract-file-actions > button {
  min-width: 64px;
}

.contract-file-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-height: 34px;
  padding-inline: 12px;
  text-decoration: none !important;
  white-space: nowrap;
}

.contract-invoice-download {
  width: auto;
  min-width: 88px;
}

.contract-file-state {
  color: #728096;
  font-size: 12px;
  white-space: nowrap;
}

.contract-file-state.is-ready {
  color: #347b69;
}

.contract-file-state.is-pending {
  color: #8a6218;
}

.contract-file-state.is-rejected {
  color: #a2535d;
}

.contract-upload-row {
  align-items: flex-end;
}

.contract-upload-requirement {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.contract-file-field {
  flex: 1 1 auto;
  min-width: 0;
}

.contract-return-section .contract-action-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.contract-return-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid #ead6a8;
  border-radius: 999px;
  color: #8a6218;
  background: #fff8e9;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.contract-return-status.is-ready {
  border-color: #b9ddd2;
  color: #347b69;
  background: #edf8f4;
}

.contract-return-panel {
  padding: 16px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #f4f7fb;
}

.contract-final-upload-panel {
  background: #f6f8fc;
}

.contract-invoice-record-grid {
  margin-bottom: 14px;
}

.contract-payment-proof-field {
  margin: 16px 0 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f1;
}

.contract-payment-proof-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.contract-payment-proof-head > div {
  display: grid;
  gap: 4px;
}

.contract-payment-proof-head strong {
  color: #354157;
  font-size: 13px;
  font-weight: 650;
}

.contract-payment-proof-head small,
.contract-payment-proof-note {
  color: #7b879b;
  font-size: 12px;
}

.contract-payment-proof-note {
  margin: 8px 0 0;
  line-height: 1.55;
}

.field-required {
  color: #a2535d;
  font-size: 12px;
  white-space: nowrap;
}

.contract-upload-type-proof {
  color: #386a9f;
  background: #eaf2fb;
  font-size: 10px;
}

.contract-payment-proof-review-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #f7f9fc;
}

.contract-payment-proof-review-file > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.contract-payment-proof-review-file strong,
.contract-payment-proof-review-file small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-payment-proof-review-file strong {
  color: #354157;
  font-size: 13px;
  font-weight: 600;
}

.contract-payment-proof-review-file small {
  color: #7b879b;
  font-size: 12px;
}

.contract-payment-proof-review-section .contract-review-note {
  margin: 12px 0 0;
}

.contract-payment-proof-review-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.contract-invoice-tax-note {
  grid-column: 1 / -1;
  margin: -2px 0 2px;
  padding: 10px 12px;
  border-left: 3px solid #7b9bda;
  color: #66748a;
  background: #f4f7fc;
  font-size: 12px;
  line-height: 1.65;
}

.contract-invoice-auto-note {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid #dce4ef;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 12px;
}

.contract-invoice-auto-note span {
  color: #7a8598;
}

.contract-invoice-auto-note strong {
  min-width: 0;
  color: #354157;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.contract-invoice-upload-panel {
  background: #f6f8fc;
}

.contract-upload-picker {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px dashed #aebed3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.contract-upload-picker:hover,
.contract-upload-picker:focus-within {
  border-color: #7192d8;
  background: #fbfdff;
  box-shadow: 0 0 0 3px rgba(66, 105, 190, 0.1);
}

.contract-upload-picker.is-selected {
  border-style: solid;
  border-color: #79ad9f;
  background: #f7fcfa;
}

.contract-upload-picker.is-invalid {
  border-style: solid;
  border-color: #d88a93;
  background: #fffafb;
}

.contract-upload-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  color: #b53d4a;
  background: #fdebed;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
}

.contract-upload-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.contract-upload-copy strong,
.contract-upload-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-upload-copy strong {
  color: #29354a;
  font-size: 13px;
  font-weight: 650;
}

.contract-upload-copy small {
  color: #7b879b;
  font-size: 12px;
}

.contract-upload-browse {
  color: #365fae;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.contract-upload-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.contract-return-panel > .field-error {
  display: block;
  margin-top: 8px;
}

.contract-return-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.contract-return-actions > span {
  color: #758196;
  font-size: 12px;
}

.contract-return-actions > button {
  min-width: 128px;
}

.contract-return-actions > .primary {
  border-color: #4269be;
  background: #4269be;
  color: #fff;
  box-shadow: 0 8px 18px rgba(66, 105, 190, 0.2);
}

.contract-return-actions > .primary:hover:not(:disabled),
.contract-return-actions > .primary:focus-visible:not(:disabled) {
  border-color: #3459aa;
  background: #3459aa;
}

.contract-return-actions > .primary:disabled {
  border-color: #dce4ef;
  background: #e9eef6;
  color: #9aa6b8;
  box-shadow: none;
  opacity: 1;
}

.contract-review-note {
  margin-top: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--warning);
}

.contract-review-note strong {
  color: var(--ink);
  font-size: 13px;
}

.contract-review-note p {
  margin: 5px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.contract-title-confirm {
  margin: 14px 0;
}

.contract-grid-wide {
  grid-column: 1 / -1;
}

.contract-invoice-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  border-bottom: 0;
}

.contract-detail-error {
  padding: 48px 12px;
  color: var(--danger);
  text-align: center;
}

.contract-review-summary {
  margin: 24px 0 28px;
  border-block: 1px solid #dce3ee;
}

.contract-review-summary-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(120px, auto);
  gap: 24px;
  margin: 0;
  padding: 17px 0;
}

.contract-review-summary-main > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.contract-review-summary-main dt {
  color: #8792a5;
  font-size: 11px;
}

.contract-review-summary-main dd {
  min-width: 0;
  margin: 0;
  color: #29354a;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
}

.contract-review-summary-main .is-amount {
  text-align: right;
}

.contract-review-summary-main .is-amount dd {
  color: #1b2434;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.contract-review-files {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 11px 0;
  border-top: 1px solid #e7ebf2;
  color: #6a7588;
  font-size: 12px;
}

.contract-review-files > strong {
  color: #4b576b;
  font-size: 12px;
  font-weight: 600;
}

.contract-review-file-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.contract-review-file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 34px;
  text-decoration: none !important;
  white-space: nowrap;
}

.contract-review-file-missing {
  padding: 6px 0;
  color: #a2535d;
}

.contract-review-section {
  padding: 0 0 24px;
}

.contract-review-section + .contract-review-section {
  padding-top: 2px;
}

.contract-review-section h3 {
  margin: 0 0 14px;
  color: #445066;
  font-size: 14px;
  font-weight: 500;
}

.contract-review-checks,
.contract-review-decisions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contract-review-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  color: #687387;
  background: #f5f7fa;
  font-size: 13px;
}

.contract-review-check.is-passed {
  border-color: #b9ded3;
  color: #347b69;
  background: #e7f6f1;
}

.contract-review-check.is-failed {
  border-color: #ead1d5;
  color: #a2535d;
  background: #fbf0f2;
}

.contract-review-check-mark {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: currentColor;
}

.contract-review-note-field textarea {
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  background: #f9fbfe;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}

.contract-review-note-field textarea:focus {
  border-color: #6f8fdb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(95, 128, 216, 0.12);
}

.contract-review-note-editor {
  margin-top: -4px;
}

.contract-review-decision {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #f9fbfe;
  cursor: pointer;
}

.contract-review-decision:has(input:checked) {
  border-color: #5f80d8;
  background: #f1f5ff;
}

.contract-review-decision input {
  margin-top: 3px;
}

.contract-review-decision > span {
  display: grid;
  gap: 4px;
}

.contract-review-decision strong {
  color: #354157;
  font-size: 13px;
  font-weight: 500;
}

.contract-review-decision small {
  color: #748095;
  font-size: 12px;
  line-height: 1.45;
}

.contract-review-section > .field-error {
  display: block;
  margin-top: 10px;
}

.field-hint.is-warning {
  color: #9a6700;
}

@media (max-width: 1500px) {
  .contract-list-toolbar .page-toolbar-actions {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
  }

  .contract-list-toolbar .page-toolbar-button-group {
    justify-self: end;
  }
}

@container (max-width: 1180px) {
  .contract-list-toolbar .page-toolbar-actions {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
  }

  .contract-list-toolbar .page-toolbar-button-group {
    justify-self: end;
  }

  .contract-filter-group,
  .contract-filter-group.is-enterprise-scope {
    flex-wrap: wrap;
  }

  .contract-filter-group .toolbar-search {
    flex: 1 1 calc(50% - 4px);
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 1180px) {
  .contract-filter-group,
  .contract-filter-group.is-enterprise-scope {
    flex-wrap: wrap;
  }

  .contract-filter-group .toolbar-search {
    flex: 1 1 calc(50% - 4px);
    width: auto;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .contract-list-toolbar .page-toolbar-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .contract-list-toolbar .page-toolbar-button-group {
    justify-self: end;
  }

  .admin-insight-strip.contract-insight-strip {
    gap: 12px;
  }

  .contract-form-grid,
  .contract-period-editor,
  .contract-detail-summary,
  .contract-party-info-grid,
  .contract-invoice-summary,
  .contract-fixed-terms {
    grid-template-columns: 1fr;
  }

  .contract-invoice-auto-note {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .contract-filter-group,
  .contract-filter-group.is-enterprise-scope {
    flex-direction: column;
    align-items: stretch;
  }

  .contract-filter-group .toolbar-search {
    flex-basis: 42px;
    width: 100%;
    min-width: 0;
  }

  .contract-period-editor {
    gap: 10px;
  }

  .contract-period-arrow {
    display: none;
  }

  .contract-fixed-terms > span {
    padding: 10px 0;
  }

  .contract-fixed-terms > span + span {
    border-top: 1px solid #e5eaf1;
    border-left: 0;
  }

  .contract-party-info-grid > .is-wide,
  .contract-form-span-all {
    grid-column: 1;
  }

  .contract-info-section .contract-party-detail-grid {
    grid-template-columns: 1fr;
  }

  .contract-party-info-grid.contract-party-preview-grid > div,
  .contract-party-info-grid.contract-party-preview-grid > div:nth-child(even),
  .contract-party-info-grid.contract-party-preview-grid > div:nth-last-child(2) {
    padding-inline: 0;
    border-bottom: 1px solid #e7ebf2;
    border-left: 0;
  }

  .contract-party-info-grid.contract-party-preview-grid > div:last-child {
    border-bottom: 0;
  }

  .contract-modal-card,
  .contract-detail-modal-card {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
  }

  .contract-detail-body {
    padding-inline: 16px;
  }

  .contract-form-body {
    padding: 20px;
  }

  .contract-modal-card > .modal-head {
    padding-inline: 20px;
  }

  .contract-modal-card > .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    padding: 14px 20px 18px;
  }

  .contract-form > .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    padding: 14px 20px 18px;
  }

  .contract-modal-card > .modal-actions > button,
  .contract-form > .modal-actions > button {
    width: 100%;
  }

  .contract-upload-row,
  .contract-action-inline {
    align-items: stretch;
    flex-direction: column;
  }

  .contract-upload-picker {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .contract-upload-type {
    width: 40px;
    height: 40px;
  }

  .contract-upload-browse {
    grid-column: 2;
    justify-self: start;
  }

  .contract-return-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .contract-return-actions > button {
    width: 100%;
  }

  .contract-upload-row > button,
  .contract-action-inline > button {
    width: 100%;
  }

  .contract-file-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .contract-file-actions {
    justify-content: space-between;
  }

  .contract-review-summary-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .contract-review-summary-main .is-amount {
    text-align: left;
  }

  .contract-review-files {
    align-items: stretch;
    flex-direction: column;
  }

  .contract-review-file-actions {
    justify-content: stretch;
  }

  .contract-review-file-action {
    min-width: 0;
    flex: 1 1 0;
  }

  .contract-payment-proof-review-file {
    align-items: stretch;
    flex-direction: column;
  }

  .contract-payment-proof-review-file .contract-review-file-action {
    width: 100%;
  }

  .contract-review-checks,
  .contract-review-decisions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .admin-insight-strip.contract-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contract-insight-item {
    height: 104px;
    padding-inline: 14px;
  }

  .data-table.contract-table.has-sticky-actions th:last-child,
  .data-table.contract-table.has-sticky-actions td:last-child {
    position: static;
    box-shadow: none;
  }
}

/* Batch 62: prevent workbench update-channel versions from overlapping. */
#workbenchList .workbench-gateway-channel-row {
  align-items: flex-start;
  margin-top: 6px;
  overflow: visible;
  white-space: normal;
}

#workbenchList .workbench-update-channel-control,
#workbenchList .workbench-update-channel-switch {
  width: 136px;
  min-width: 136px;
  max-width: 136px;
}

#workbenchList .workbench-update-channel-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 34px;
  min-height: 34px;
  border-radius: 9px;
}

#workbenchList .workbench-update-channel-thumb {
  top: 3px;
  width: 64px;
  height: 26px;
  border-radius: 7px;
}

#workbenchList .workbench-update-channel-switch.is-agent .workbench-update-channel-thumb {
  transform: translateX(66px);
}

#workbenchList .workbench-update-channel-label {
  min-width: 0;
  padding: 0 4px;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  line-height: 1;
}

#workbenchList .workbench-update-channel-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workbenchList .workbench-update-channel-version {
  display: block;
  max-width: 72px;
  overflow: hidden;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Batch 63: remove empty workbench section backplates. */
.content-view:has(#workbenchList) > .page-toolbar {
  min-height: 0;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.content-view:has(#workbenchList) > .admin-insight-strip {
  margin-bottom: 12px;
}

.content-view:has(#workbenchList) > .admin-insight-strip > .admin-insight-item {
  box-shadow: none;
}

.workbench-channel-version-insight {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
}

.workbench-channel-version-list {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 3px;
}

.workbench-channel-version-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1.6fr) minmax(0, 0.8fr);
  gap: 7px;
  align-items: center;
}

.workbench-channel-version-row + .workbench-channel-version-row {
  padding-top: 3px;
  border-top: 1px solid rgba(210, 218, 236, 0.72);
}

.workbench-channel-version-name,
.workbench-channel-version-cell {
  min-width: 0;
  display: grid;
  align-content: center;
}

.workbench-channel-version-name {
  gap: 4px;
  color: var(--text);
}

.workbench-channel-version-name > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-channel-version-cell {
  gap: 3px;
}

.workbench-channel-version-name small,
.workbench-channel-version-cell span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.1;
}

.workbench-channel-version-name small {
  font-variant-numeric: tabular-nums;
}

.workbench-channel-version-cell strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Batch 64: shared full-text tooltip for truncated admin text. */
.admin-overflow-tooltip {
  position: fixed;
  z-index: 11000;
  max-width: min(420px, calc(100vw - 24px));
  padding: 8px 11px;
  border: 1px solid rgba(176, 188, 216, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #223047;
  box-shadow: 0 16px 38px rgba(58, 70, 103, 0.18), 0 3px 10px rgba(58, 70, 103, 0.12);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  pointer-events: none;
  white-space: normal;
}

/* Batch 66: keep Token toolbar refresh action separated from filters. */
.token-list-toolbar .page-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.token-list-toolbar .page-toolbar-search-group {
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.token-list-toolbar .toolbar-search,
.token-list-toolbar .token-enterprise-filter-control,
.token-list-toolbar .token-provider-filter-control {
  flex: 0 1 270px;
  width: 270px;
  min-width: 240px;
  max-width: 270px;
}

.token-list-toolbar .toolbar-search input,
.token-list-toolbar button.admin-select-button,
.token-list-toolbar .toolbar-select-button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

.token-list-toolbar .page-toolbar-button-group {
  margin-left: 0;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.token-list-toolbar #refreshTokenBtn.admin-icon-action {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-color: rgba(125, 149, 207, 0.34);
  background: rgba(255, 255, 255, 0.86);
  color: #4f6fb8;
  box-shadow: 0 6px 16px rgba(93, 114, 170, 0.12);
}

.token-list-toolbar #refreshTokenBtn.admin-icon-action:hover,
.token-list-toolbar #refreshTokenBtn.admin-icon-action:focus-visible {
  border-color: rgba(79, 111, 184, 0.42);
  background: rgba(255, 255, 255, 0.96);
  color: #2f64d6;
}

.token-list-toolbar #refreshTokenBtn.admin-icon-action svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 1180px) {
  .token-list-toolbar .page-toolbar-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .token-list-toolbar .page-toolbar-search-group {
    flex-wrap: wrap;
  }

  .token-list-toolbar .page-toolbar-button-group {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .token-list-toolbar .toolbar-search,
  .token-list-toolbar .token-enterprise-filter-control,
  .token-list-toolbar .token-provider-filter-control {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* Batch 67: fixed operation columns and cleaner enterprise detail tables. */
.data-table.has-sticky-actions {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.62);
}

.data-table.has-sticky-actions th,
.data-table.has-sticky-actions td {
  padding: 11px 14px;
  background-clip: padding-box;
}

.data-table.has-sticky-actions th:last-child,
.data-table.has-sticky-actions td:last-child {
  position: sticky;
  right: 0;
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
  text-align: left;
  background: rgba(249, 251, 255, 0.98);
  box-shadow: -12px 0 20px rgba(84, 99, 136, 0.1);
}

.data-table.has-sticky-actions th:last-child {
  z-index: 8;
  background: rgba(244, 248, 255, 0.98);
}

.data-table.has-sticky-actions td:last-child {
  z-index: 5;
}

.data-table.has-sticky-actions tbody tr:hover > td:last-child {
  background: rgba(242, 247, 255, 0.98);
}

.data-table.has-sticky-actions td:last-child:has(.table-actions) {
  padding-left: 12px;
  padding-right: 12px;
}

.data-table.has-sticky-actions td:last-child .table-actions,
.data-table.has-sticky-actions .table-actions {
  justify-content: flex-start;
  gap: 6px;
}

.data-table.has-sticky-actions td:last-child .table-actions {
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
}

.data-table.has-sticky-actions td:last-child .table-actions button,
.data-table.has-sticky-actions .gitlab-resource-delete-btn,
.data-table.has-sticky-actions .workbench-project-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.enterprise-gitlab-binding-table {
  min-width: 1160px;
  table-layout: fixed;
}

.enterprise-gitlab-binding-table th,
.enterprise-gitlab-binding-table td {
  height: 54px;
  padding: 9px 12px;
  vertical-align: middle;
}

.enterprise-gitlab-binding-table th:nth-child(1),
.enterprise-gitlab-binding-table td:nth-child(1) {
  width: 88px;
}

.enterprise-gitlab-binding-table th:nth-child(2),
.enterprise-gitlab-binding-table td:nth-child(2) {
  width: 172px;
}

.enterprise-gitlab-binding-table th:nth-child(3),
.enterprise-gitlab-binding-table td:nth-child(3) {
  width: 150px;
}

.enterprise-gitlab-binding-table th:nth-child(4),
.enterprise-gitlab-binding-table td:nth-child(4) {
  width: 86px;
}

.enterprise-gitlab-binding-table th:nth-child(5),
.enterprise-gitlab-binding-table td:nth-child(5) {
  width: 136px;
}

.enterprise-gitlab-binding-table th:nth-child(6),
.enterprise-gitlab-binding-table td:nth-child(6) {
  width: 154px;
}

.enterprise-gitlab-binding-table th:nth-child(7),
.enterprise-gitlab-binding-table td:nth-child(7) {
  width: 110px;
}

.enterprise-gitlab-binding-table th:nth-child(8),
.enterprise-gitlab-binding-table td:nth-child(8) {
  width: 122px;
}

.enterprise-gitlab-binding-table.has-sticky-actions th:last-child,
.enterprise-gitlab-binding-table.has-sticky-actions td:last-child {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.enterprise-gitlab-binding-table td:nth-child(3) .secondary.small {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}

.enterprise-gitlab-binding-table .gitlab-binding-status-stack {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.enterprise-gitlab-binding-table .gitlab-binding-status-stack .chip {
  min-height: 20px;
  max-width: 132px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.gitlab-binding-resource-row > td {
  position: static !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  box-shadow: none !important;
}

.gitlab-user-table {
  min-width: 1040px;
  table-layout: fixed;
}

.gitlab-user-table.data-table th,
.gitlab-user-table.data-table td {
  height: 52px;
  padding: 8px 10px;
  vertical-align: middle;
}

.gitlab-user-col-identity {
  width: 18%;
}

.gitlab-user-col-name {
  width: 13%;
}

.gitlab-user-col-status {
  width: 112px;
}

.gitlab-user-col-login {
  width: 132px;
}

.gitlab-user-col-type {
  width: 92px;
}

.gitlab-user-col-projects {
  width: auto;
}

.gitlab-user-col-actions {
  width: 182px;
}

.control-plane-push-view {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto;
  gap: 14px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.control-plane-push-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px 10px 16px;
  border-bottom: 1px solid rgba(126, 139, 168, 0.16);
  background: rgba(248, 251, 255, 0.88);
}

.control-plane-push-list-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.control-plane-push-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.control-plane-push-create-btn {
  flex: 0 0 auto !important;
  width: auto;
  min-width: 96px;
  padding: 0 12px;
  font-size: 12px;
  box-shadow: none;
}

.admin-icon-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.admin-icon-text-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

.admin-icon-text-button-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.control-plane-push-list-head .control-plane-push-create-btn {
  min-height: 32px;
  height: 32px;
}

.control-plane-push-modal-card {
  width: min(520px, calc(100vw - 32px));
}

.control-plane-push-modal-card .stack-form {
  gap: 12px;
}

.control-plane-push-modal-card .field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.control-plane-push-modal-card .field input[readonly] {
  background: rgba(239, 243, 251, 0.82);
  color: #63708a;
  cursor: not-allowed;
}

.control-plane-push-modal-card .admin-icon-text-button {
  flex: 0 0 auto;
  min-width: 112px;
  height: 38px;
}

.control-plane-target-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.control-plane-target-picker > button {
  min-width: 94px;
  height: 44px;
  white-space: nowrap;
}

.control-plane-target-check-row {
  min-height: 20px;
  padding-top: 2px;
}

.control-plane-target-check-message {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.control-plane-target-check-message.is-running {
  color: #245fc0;
}

.control-plane-target-check-message.is-success {
  color: #267d50;
}

.control-plane-target-check-message.is-error {
  color: #a83e51;
}

@media (max-width: 560px) {
  .control-plane-target-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .control-plane-target-picker > button {
    width: 100%;
  }
}

.control-plane-push-status-body {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.control-plane-push-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 112px;
  border-color: rgba(139, 159, 207, 0.2);
  background: rgba(255, 255, 255, 0.58);
}

.control-plane-push-empty strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.control-plane-push-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.control-plane-push-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.control-plane-push-meta > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(126, 139, 168, 0.16);
  border-radius: var(--radius);
  background: rgba(248, 250, 255, 0.58);
}

.control-plane-push-meta dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.control-plane-push-meta dd {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.control-plane-step-list {
  display: grid;
  gap: 8px;
}

.control-plane-step {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(126, 139, 168, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.control-plane-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(126, 139, 168, 0.36);
}

.control-plane-step.is-running .control-plane-step-dot {
  background: #2f6fdd;
  box-shadow: 0 0 0 4px rgba(47, 111, 221, 0.12);
}

.control-plane-step.is-completed .control-plane-step-dot {
  background: var(--success);
}

.control-plane-step.is-failed .control-plane-step-dot {
  background: var(--danger);
}

.control-plane-step-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.control-plane-step-copy strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.control-plane-step-copy span,
.control-plane-step-state small,
.control-plane-table-secondary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.control-plane-step-state {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.control-plane-push-history {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  margin-top: 0;
  background: rgba(248, 251, 255, 0.82);
}

.control-plane-push-table-scroll {
  min-height: 0;
  overflow: auto;
}

.control-plane-push-table {
  min-width: 1580px;
  table-layout: fixed;
}

.control-plane-push-table th:nth-child(1) { width: 120px; }
.control-plane-push-table th:nth-child(2) { width: 250px; }
.control-plane-push-table th:nth-child(3) { width: 80px; }
.control-plane-push-table th:nth-child(4) { width: 135px; }
.control-plane-push-table th:nth-child(5) { width: 150px; }
.control-plane-push-table th:nth-child(6) { width: 135px; }
.control-plane-push-table th:nth-child(7) { width: 145px; }
.control-plane-push-table th:nth-child(8) { width: 150px; }
.control-plane-push-table th:nth-child(9) { width: 155px; }
.control-plane-push-table th:nth-child(10) { width: 145px; }

.control-plane-push-table thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: rgba(244, 248, 255, 0.98);
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.16);
}

.control-plane-status-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
  position: relative;
}

.release-status-boards {
  display: grid;
  min-width: 0;
  border: 1px solid rgba(126, 139, 168, 0.16);
  border-radius: 6px;
  background: rgba(250, 252, 255, 0.72);
  overflow: hidden;
}

.release-status-board {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  border-bottom: 1px solid rgba(126, 139, 168, 0.13);
}

.release-status-board:last-of-type {
  border-bottom: 0;
}

.release-status-board-label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.release-status-destinations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  border-left: 1px solid rgba(126, 139, 168, 0.13);
}

.release-destination {
  position: relative;
  display: grid;
  grid-template-columns: minmax(42px, auto) minmax(0, 1fr);
  align-content: center;
  gap: 2px 7px;
  min-width: 0;
  padding: 7px 8px 7px 17px;
  border-right: 1px solid rgba(126, 139, 168, 0.13);
}

.release-destination:last-child {
  border-right: 0;
}

.release-destination::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(126, 139, 168, 0.42);
}

.release-destination > span,
.release-destination > strong,
.release-destination > small {
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}

.release-destination > span {
  color: var(--muted);
}

.release-destination > strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.release-destination > small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 500;
}

.release-destination.is-completed::before { background: #39a96b; }
.release-destination.is-completed > strong { color: #267d50; }
.release-destination.is-running::before { background: #2f6fdd; }
.release-destination.is-running > strong { color: #245fc0; }
.release-destination.is-failed::before { background: #d94b5c; }
.release-destination.is-failed > strong { color: #a83e51; }
.release-destination.is-muted > strong { color: var(--muted); }

.release-status-error {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid rgba(217, 75, 92, 0.16);
  background: var(--soft-danger-bg);
  color: #a83e51;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.release-channel-row.is-admin > td {
  border-top: 2px solid rgba(126, 139, 168, 0.18);
}

.release-channel-row.is-cos > td {
  background: rgba(248, 251, 255, 0.54);
}

.release-channel-row.is-admin > .release-channel-target-cell,
.release-channel-row.is-cos > .release-channel-target-cell {
  background: rgba(248, 251, 255, 0.99);
}

.release-start-time-cell,
.release-record-progress-cell {
  vertical-align: middle;
}

.release-record-progress-cell .release-record-progress {
  margin-top: 0;
}

.release-channel-label {
  color: var(--text);
  font-size: 12px;
}

.control-plane-push-table th:nth-child(3),
.release-channel-target-cell {
  position: sticky;
  left: 0;
  z-index: 6;
  background: rgba(248, 251, 255, 0.98);
  box-shadow: 1px 0 0 rgba(126, 139, 168, 0.14);
}

.control-plane-push-table th:nth-child(3) {
  z-index: 8;
  background: rgba(244, 248, 255, 0.99);
}

.release-target-version {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.release-target-version strong,
.release-target-version span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-target-version strong {
  color: var(--text);
  font-size: 12px;
}

.release-target-version span {
  color: var(--muted);
  font-size: 11px;
}

.release-record-progress {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  margin-top: 3px;
  padding: 7px 8px 7px 17px;
  border: 1px solid rgba(126, 139, 168, 0.15);
  border-radius: 6px;
  background: rgba(250, 252, 255, 0.82);
}

.release-record-progress::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(126, 139, 168, 0.42);
}

.release-record-progress strong,
.release-record-progress span {
  white-space: normal;
  overflow-wrap: anywhere;
}

.release-record-progress strong {
  font-size: 11px;
  line-height: 1.35;
}

.release-record-progress.is-running::before { background: #2f6fdd; }
.release-record-progress.is-running strong { color: #245fc0; }
.release-record-progress.is-completed::before { background: #39a96b; }
.release-record-progress.is-completed strong { color: #267d50; }
.release-record-progress.is-failed::before { background: #d94b5c; }
.release-record-progress.is-failed strong { color: #a83e51; }

.release-summary-failure-trigger {
  width: fit-content;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #a83e51;
  font: inherit;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.release-summary-failure-trigger {
  font-size: 13px;
}

.release-summary-failure-trigger:hover {
  color: var(--danger);
}

.release-record-progress.is-clickable {
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.release-record-progress.is-clickable strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.release-record-progress.is-clickable:hover {
  border-color: rgba(217, 75, 92, 0.28);
  background: rgba(217, 75, 92, 0.07);
}

.release-component-cell {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-left: 10px;
}

.release-component-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(126, 139, 168, 0.42);
}

.release-component-cell strong,
.release-component-cell span,
.release-component-cell small {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-component-cell strong { color: var(--text); }
.release-component-cell span,
.release-component-cell small { color: var(--muted); }
.release-component-cell .release-component-progress {
  font-variant-numeric: tabular-nums;
}
.release-component-cell.is-running .release-component-progress {
  color: #245fc0;
}
.release-component-cell.is-completed::before { background: #39a96b; }
.release-component-cell.is-completed strong { color: #267d50; }
.release-component-cell.is-running::before { background: #2f6fdd; }
.release-component-cell.is-running strong { color: #245fc0; }
.release-component-cell.is-failed::before { background: #d94b5c; }
.release-component-cell.is-failed strong { color: #a83e51; }
.release-component-cell.is-muted strong { color: var(--muted); }

.release-component-cell.is-clickable {
  width: 100%;
  margin: 0;
  padding: 0 0 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.release-component-cell.is-clickable strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.release-component-cell.is-clickable:hover {
  background: rgba(47, 111, 221, 0.07);
}

.release-component-cell.is-clickable:focus-visible,
.release-record-progress.is-clickable:focus-visible,
.release-summary-failure-trigger:focus-visible,
.release-summary-error:focus-visible {
  outline: 2px solid rgba(217, 75, 92, 0.34);
  outline-offset: 2px;
}

.control-plane-failure-modal-card {
  width: min(880px, calc(100vw - 32px));
  max-width: 880px;
  max-height: min(860px, calc(100vh - 32px));
}

.control-plane-failure-detail-body {
  min-height: 0;
  overflow: auto;
  padding: 20px 22px 24px;
}

.control-plane-failure-message {
  padding: 11px 13px;
  border-left: 3px solid var(--danger);
  background: rgba(203, 61, 61, 0.07);
  color: #a83e51;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.control-plane-failure-message.is-success {
  border-left-color: #39a96b;
  background: rgba(57, 169, 107, 0.08);
  color: #267d50;
}

.control-plane-failure-raw {
  max-height: 180px;
  margin: 10px 0 0;
  overflow: auto;
  padding: 11px 13px;
  border: 1px solid rgba(217, 75, 92, 0.16);
  border-radius: 6px;
  background: #fffafb;
  color: #713846;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.control-plane-failure-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.control-plane-failure-meta > div {
  min-width: 0;
  padding: 12px 14px 13px 0;
}

.control-plane-failure-meta dt {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.control-plane-failure-meta dd {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.control-plane-failure-section {
  margin-top: 20px;
}

.control-plane-failure-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.control-plane-failure-section > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.control-plane-failure-steps-scroll {
  margin-top: 10px;
  overflow-x: auto;
}

.control-plane-failure-steps-table {
  width: 100%;
  min-width: 700px;
  table-layout: fixed;
}

.control-plane-failure-steps-table th:nth-child(1) { width: 265px; }
.control-plane-failure-steps-table th:nth-child(2) { width: 78px; }
.control-plane-failure-steps-table th:nth-child(3) { width: 78px; }
.control-plane-failure-steps-table th:nth-child(4) { width: 135px; }
.control-plane-failure-steps-table th:nth-child(5) { width: 145px; }

.control-plane-failure-steps-table td {
  vertical-align: top;
  font-size: 12px;
}

.control-plane-failure-steps-table td strong,
.control-plane-failure-steps-table td span {
  display: block;
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.control-plane-failure-steps-table td span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.control-plane-failure-steps-table tr.is-failed td {
  background: rgba(203, 61, 61, 0.07);
  color: #a83e51;
}

.control-plane-failure-steps-table tr.is-substep td:first-child {
  padding-left: 28px;
}

.control-plane-failure-steps-table tr.is-substep td:first-child strong::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 1px;
  margin: 0 7px 3px 0;
  background: rgba(126, 139, 168, 0.46);
}

.control-plane-step-timeline {
  min-width: 150px;
  padding: 4px 0;
}

.control-plane-step-timeline-track {
  position: relative;
  height: 10px;
  overflow: hidden;
}

.control-plane-step-timeline-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  min-width: 3px;
  border-radius: 0;
  background: #3da66d;
}

.control-plane-step-timeline-bar.is-running {
  background: #3579c6;
}

.control-plane-step-timeline-bar.is-failed {
  background: #c94b59;
}

.control-plane-step-timeline-bar.is-pending,
.control-plane-step-timeline-bar.is-muted {
  background: #9aa4b6;
}

.control-plane-stage-pipeline {
  display: flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.control-plane-stage-pipeline::-webkit-scrollbar {
  display: none;
}

.control-plane-stage-node-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  min-width: 22px;
}

.control-plane-stage-node-wrap:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  z-index: 0;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: rgba(126, 139, 168, 0.24);
  transform: translateY(-50%);
}

.control-plane-stage-node-wrap.is-completed:not(:first-child)::before,
.control-plane-stage-node-wrap.is-running:not(:first-child)::before {
  background: rgba(57, 169, 107, 0.36);
}

.control-plane-stage-node {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
}

.control-plane-stage-node-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(126, 139, 168, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: #7a8498;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.control-plane-stage-node.is-completed .control-plane-stage-node-dot {
  border-color: rgba(57, 169, 107, 0.26);
  background: #39a96b;
  color: #ffffff;
}

.control-plane-stage-node.is-running .control-plane-stage-node-dot {
  border-color: rgba(47, 111, 221, 0.28);
  background: #2f6fdd;
  color: #ffffff;
}

.control-plane-stage-node.is-failed .control-plane-stage-node-dot {
  border-color: rgba(217, 75, 92, 0.28);
  background: #d94b5c;
  color: #ffffff;
}

.control-plane-stage-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 35;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 64px));
  max-height: min(420px, 62vh);
  padding: 12px;
  border: 1px solid rgba(126, 139, 168, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(46, 59, 92, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  visibility: hidden;
}

.control-plane-stage-floating-popover {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 32px));
  padding: 12px;
  border: 1px solid rgba(126, 139, 168, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(46, 59, 92, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  visibility: hidden;
}

.control-plane-stage-floating-popover.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.control-plane-stage-popover::before {
  content: "";
  position: absolute;
  right: 28px;
  top: -6px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(126, 139, 168, 0.18);
  border-left: 1px solid rgba(126, 139, 168, 0.18);
  background: rgba(255, 255, 255, 0.98);
  transform: rotate(45deg);
}

.control-plane-stage-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(126, 139, 168, 0.14);
}

.control-plane-stage-popover-title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.control-plane-stage-popover-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-plane-stage-popover-title small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.control-plane-stage-popover-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.control-plane-stage-popover-list {
  display: grid;
  gap: 7px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.control-plane-stage-popover-row {
  display: grid;
  grid-template-columns: 22px 12px minmax(0, 1fr) minmax(72px, auto);
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.control-plane-stage-popover-index,
.control-plane-stage-popover-state {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.control-plane-stage-popover-dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(126, 139, 168, 0.32);
}

.control-plane-stage-popover-row.is-completed .control-plane-stage-popover-dot {
  background: #39a96b;
}

.control-plane-stage-popover-row.is-running .control-plane-stage-popover-dot {
  background: #2f6fdd;
  box-shadow: 0 0 0 4px rgba(47, 111, 221, 0.12);
}

.control-plane-stage-popover-row.is-failed .control-plane-stage-popover-dot {
  background: #d94b5c;
}

.control-plane-stage-popover-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.control-plane-stage-popover-main strong,
.control-plane-stage-popover-state strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.control-plane-stage-popover-main small,
.control-plane-stage-popover-state small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.control-plane-stage-popover-body,
.control-plane-stage-popover-meta {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.control-plane-stage-popover-meta {
  color: var(--muted);
  font-size: 11px;
}

.control-plane-stage-popover-state {
  display: grid;
  justify-items: end;
  text-align: right;
}

.control-plane-stage-popover-error {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--soft-danger-bg);
  color: #a83e51;
  font-size: 12px;
  line-height: 1.45;
}

.control-plane-table-primary,
.control-plane-table-secondary {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-plane-push-error {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid rgba(217, 75, 92, 0.2);
  border-radius: var(--radius);
  color: #a83e51;
  background: var(--soft-danger-bg);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .control-plane-push-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .control-plane-push-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-plane-push-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Batch 77: Token list keeps its frozen header separated from grouped rows. */
#tokenList.token-list-table-shell {
  overflow: auto;
}

#tokenList .data-table {
  width: 100%;
  min-width: 1260px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  isolation: isolate;
}

#tokenList .data-table.has-sticky-actions {
  min-width: 1450px;
}

#tokenList .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 16;
  height: 46px;
  min-height: 46px;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  color: #66728a;
  line-height: 46px;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  background: #f4f8ff;
  box-shadow:
    0 1px 0 rgba(126, 139, 168, 0.2),
    0 8px 14px rgba(236, 241, 252, 0.86);
}

#tokenList .data-table.has-sticky-actions thead th:last-child {
  z-index: 20;
}

#tokenList .data-table th:nth-child(1),
#tokenList .data-table td:nth-child(1) {
  width: 210px;
}

#tokenList .data-table th:nth-child(2),
#tokenList .data-table td:nth-child(2) {
  width: 170px;
}

#tokenList .data-table th:nth-child(3),
#tokenList .data-table td:nth-child(3) {
  width: 118px;
}

#tokenList .data-table th:nth-child(4),
#tokenList .data-table td:nth-child(4) {
  width: 190px;
}

#tokenList .data-table th:nth-child(5),
#tokenList .data-table td:nth-child(5) {
  width: 250px;
}

#tokenList .data-table th:nth-child(6),
#tokenList .data-table td:nth-child(6) {
  width: 168px;
}

#tokenList .data-table th:nth-child(7),
#tokenList .data-table td:nth-child(7) {
  width: 114px;
}

#tokenList .data-table.has-sticky-actions th:nth-child(8),
#tokenList .data-table.has-sticky-actions td:nth-child(8) {
  width: 220px;
}

#tokenList .admin-table-group-row td {
  position: relative;
  z-index: 1;
  background: #fbfdff;
}

#tokenList .admin-table-group-row.is-nested td {
  background: #f7faff;
}

/* Batch 69: compact equal-width enterprise detail tabs. */
.content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row > .detail-tabs {
  align-items: center;
}

.content-view:has(.enterprise-detail-title-row) > .page-toolbar > .enterprise-detail-tabs-row > .detail-tabs .detail-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 96px;
  width: 96px;
  min-width: 96px;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.gitlab-user-table.has-sticky-actions th:last-child,
.gitlab-user-table.has-sticky-actions td:last-child,
.gitlab-user-actions-cell {
  width: 182px;
  min-width: 182px;
  max-width: 182px;
}

.gitlab-user-name-cell {
  gap: 3px;
}

.gitlab-user-name-cell strong,
.gitlab-user-table td:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gitlab-user-email,
.gitlab-user-last-login,
.gitlab-user-project-empty {
  font-size: 12px;
  line-height: 1.35;
}

.gitlab-user-project-cell {
  min-width: 0;
}

.gitlab-user-project-cell .chip {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.gitlab-user-actions-cell .table-actions {
  flex-wrap: nowrap;
  gap: 5px;
  width: 100%;
  align-items: center;
  height: 100%;
}

.gitlab-user-actions-cell .table-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-height: 32px;
  padding: 0 9px;
  line-height: 1;
  white-space: nowrap;
}

.gitlab-resource-table.has-sticky-actions th:last-child,
.gitlab-resource-table.has-sticky-actions td:last-child,
.gitlab-resource-action-cell {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.enterprise-workbench-table.has-sticky-actions th:last-child,
.enterprise-workbench-table.has-sticky-actions td:last-child,
.workbench-project-subtable.has-sticky-actions th:last-child,
.workbench-project-subtable.has-sticky-actions td:last-child,
.enterprise-storage-resource-table.has-sticky-actions th:last-child,
.enterprise-storage-resource-table.has-sticky-actions td:last-child,
.enterprise-related-token-table.has-sticky-actions th:last-child,
.enterprise-related-token-table.has-sticky-actions td:last-child {
  width: 148px;
  min-width: 148px;
  max-width: 148px;
}

.token-list-table-shell .data-table.has-sticky-actions th:last-child,
.token-list-table-shell .data-table.has-sticky-actions td:last-child,
.token-actions-cell,
.data-table td.token-actions-cell {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.runtime-monitor-usage-table.has-sticky-actions th:last-child,
.runtime-monitor-usage-table.has-sticky-actions td:last-child {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

#enterpriseWorkbenchList.table-shell,
#enterpriseGitlabBindingList.table-shell,
#enterpriseUserList.table-shell,
#enterpriseRelatedTokenList.table-shell,
#enterpriseStorageResourceList.table-shell {
  overflow: auto;
}

#enterpriseGitlabBindingList.table-shell,
#enterpriseUserList.table-shell {
  border-color: rgba(126, 139, 168, 0.16);
  background: rgba(248, 250, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#enterpriseUserList .gitlab-resource-card {
  padding: 14px 16px 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Batch 68: enterprise detail tables scroll inside the list with frozen headers. */
.content-view:has(.enterprise-detail-title-row) .data-table.has-sticky-actions th:last-child,
.content-view:has(.enterprise-detail-title-row) .data-table.has-sticky-actions td:last-child {
  box-shadow: none;
  border-left: 1px solid rgba(126, 139, 168, 0.14);
}

#enterpriseWorkbenchesPanel,
#enterpriseGitlabPanel,
#enterpriseUsersPanel,
#enterpriseStoragePanel,
#enterpriseTokensPanel {
  overflow: hidden;
}

#enterpriseWorkbenchesPanel > .panel-card,
#enterpriseGitlabPanel > .panel-card,
#enterpriseUsersPanel > .panel-card,
#enterpriseStoragePanel > .panel-card,
#enterpriseTokensPanel > .panel-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

#enterpriseWorkbenchList.table-shell,
#enterpriseGitlabBindingList.table-shell,
#enterpriseUserList.table-shell,
#enterpriseStorageResourceList.table-shell,
#enterpriseRelatedTokenList.table-shell {
  min-height: 0;
  max-height: none;
  overflow: auto;
}

#enterpriseWorkbenchesPanel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

#enterpriseWorkbenchesPanel > #enterpriseWorkbenchList {
  min-height: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}

#enterpriseGitlabPanel,
#enterpriseUsersPanel,
#enterpriseStoragePanel,
#enterpriseTokensPanel {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

#enterpriseGitlabPanel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

#enterpriseUsersPanel,
#enterpriseStoragePanel,
#enterpriseTokensPanel {
  grid-template-rows: auto minmax(0, 1fr);
}

#enterpriseGitlabPanel > #enterpriseGitlabBindingList,
#enterpriseUsersPanel > #enterpriseUserList,
#enterpriseStoragePanel > #enterpriseStorageResourceList,
#enterpriseTokensPanel > #enterpriseRelatedTokenList {
  min-height: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

#enterpriseGitlabPanel > #enterpriseGitlabBindingList {
  grid-row: 2;
}

#enterpriseGitlabPanel > #enterpriseGitlabResourceList {
  grid-row: 3;
  min-height: 0;
  overflow: auto;
}

#enterpriseWorkbenchList .enterprise-workbench-table > thead th,
#enterpriseUserList .data-table thead th,
#enterpriseStorageResourceList .data-table thead th,
#enterpriseRelatedTokenList .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 9;
  background: #f4f8ff;
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.16);
}

#enterpriseGitlabBindingList .enterprise-gitlab-binding-table > thead th {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #f4f8ff;
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.16);
}

#enterpriseWorkbenchList .data-table.has-sticky-actions thead th:last-child,
#enterpriseGitlabBindingList .data-table.has-sticky-actions thead th:last-child,
#enterpriseUserList .data-table.has-sticky-actions thead th:last-child,
#enterpriseStorageResourceList .data-table.has-sticky-actions thead th:last-child,
#enterpriseRelatedTokenList .data-table.has-sticky-actions thead th:last-child {
  z-index: 12;
}

#enterpriseGitlabBindingList .enterprise-gitlab-binding-table.has-sticky-actions > thead th:last-child {
  z-index: 34;
  background: #f4f8ff;
}

#enterpriseWorkbenchList .enterprise-workbench-table > tbody > .workbench-main-row > td {
  position: sticky;
  top: var(--enterprise-workbench-table-head-height);
  z-index: 18;
  background: #f9fbff;
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.16);
}

#enterpriseWorkbenchList .enterprise-workbench-table > tbody > .workbench-main-row > td:last-child {
  z-index: 23;
  background: #f9fbff;
}

#enterpriseWorkbenchList .enterprise-workbench-table > tbody > .workbench-main-row:hover > td {
  background: #f3f7ff;
}

#enterpriseGitlabBindingList .enterprise-gitlab-binding-table > tbody > .gitlab-binding-main-row > td {
  position: sticky;
  top: var(--enterprise-gitlab-binding-table-head-height);
  z-index: 26;
  background: #f9fbff;
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.16);
}

#enterpriseGitlabBindingList .enterprise-gitlab-binding-table > tbody > .gitlab-binding-main-row > td:last-child {
  z-index: 32;
  background: #f9fbff;
}

#enterpriseGitlabBindingList .enterprise-gitlab-binding-table > tbody > .gitlab-binding-main-row:hover > td {
  background: #f3f7ff;
}

#enterpriseGitlabBindingList .gitlab-resource-table-shell {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#enterpriseGitlabBindingList .gitlab-resource-table thead th {
  position: sticky;
  top: calc(var(--enterprise-gitlab-binding-table-head-height) + var(--enterprise-gitlab-binding-main-row-height));
  z-index: 18;
  background: #f4f8ff;
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.16);
}

#enterpriseGitlabBindingList .gitlab-resource-table.has-sticky-actions thead th:last-child {
  z-index: 24;
  background: #f4f8ff;
}

#enterpriseWorkbenchList .workbench-project-subtable-row > td {
  background: #f9fbff;
}

#enterpriseWorkbenchList .workbench-project-subtable-shell {
  overflow: visible;
}

#enterpriseWorkbenchList .workbench-project-subtable thead th {
  position: sticky;
  top: calc(var(--enterprise-workbench-table-head-height) + var(--enterprise-workbench-main-row-height));
  z-index: 14;
  background: #f4f8ff;
  box-shadow: 0 1px 0 rgba(126, 139, 168, 0.16);
}

#enterpriseWorkbenchList .workbench-project-subtable.has-sticky-actions thead th:last-child {
  z-index: 20;
  background: #f4f8ff;
}

#enterpriseWorkbenchList .workbench-project-subtable td,
#enterpriseWorkbenchList .workbench-project-subtable.has-sticky-actions td:last-child {
  background: #fbfdff;
}

#enterpriseGitlabBindingList .gitlab-binding-resource-row > td {
  border-left: 0;
}

.gitlab-user-col-identity {
  width: 19%;
}

.gitlab-user-col-name {
  width: 13%;
}

.gitlab-user-col-projects {
  width: auto;
}

.gitlab-user-col-login {
  width: 132px;
}

.gitlab-user-col-status {
  width: 112px;
}

.gitlab-user-col-actions {
  width: 182px;
}

/* Keep enterprise workbench actions inside the sticky column and allow long rows to wrap. */
#enterpriseWorkbenchList .enterprise-workbench-table.has-sticky-actions > thead > tr > th:last-child,
#enterpriseWorkbenchList .enterprise-workbench-table.has-sticky-actions > tbody > .workbench-main-row > td:last-child {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
}

#enterpriseWorkbenchList .enterprise-workbench-table > tbody > .workbench-main-row > td:last-child {
  padding-left: 14px;
  padding-right: 14px;
}

#enterpriseWorkbenchList .enterprise-workbench-table > tbody > .workbench-main-row > td:last-child .workbench-project-actions {
  width: 100%;
  max-width: 100%;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  row-gap: 6px;
  gap: 8px;
}

#enterpriseWorkbenchList .enterprise-workbench-table > tbody > .workbench-main-row > td:last-child .workbench-project-actions > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

#enterpriseWorkbenchList .workbench-project-subtable.has-sticky-actions th:last-child,
#enterpriseWorkbenchList .workbench-project-subtable.has-sticky-actions td:last-child {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
}

#enterpriseWorkbenchList .workbench-project-subtable .workbench-project-actions {
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 6px;
}

/* Two-step Admin and Runtime release workspace. */
.control-plane-push-view {
  display: grid;
  grid-template-rows: auto minmax(260px, auto) auto auto;
  align-content: start;
  gap: 14px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding-bottom: 18px;
}

.release-step-band {
  border: 1px solid rgba(126, 139, 168, 0.18);
  border-radius: 8px;
  background: rgba(250, 252, 255, 0.9);
  box-shadow: 0 1px 2px rgba(55, 68, 101, 0.04);
}

.release-step-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(126, 139, 168, 0.14);
}

.release-step-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.release-step-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.release-step-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #e8f0ff;
  color: #245fc0;
  font-size: 14px;
  font-weight: 800;
}

.release-step-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.release-step-actions > button {
  min-width: 112px;
  white-space: nowrap;
}

.release-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 0;
  padding: 0 16px;
  overflow-x: auto;
}

.release-summary-item {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 70px;
  padding: 12px 14px;
  border-right: 1px solid rgba(126, 139, 168, 0.14);
}

.release-summary-item:last-of-type {
  border-right: 0;
}

.release-summary-item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.release-summary-item strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.release-version-item {
  min-width: 0;
  min-height: 78px;
  background: rgba(232, 240, 255, 0.32);
}

.release-version-item strong {
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.release-version-item small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.release-version-item.is-unavailable {
  background: rgba(126, 139, 168, 0.08);
}

.release-version-item.is-unavailable strong {
  color: var(--muted);
}

.release-summary-item.is-current-stage {
  min-width: 0;
}

.release-summary-item.is-current-stage strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.release-summary-error {
  width: auto;
  grid-column: 1 / -1;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 0;
  border-left: 3px solid var(--danger);
  border-radius: 0;
  background: rgba(203, 61, 61, 0.07);
  color: var(--danger);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  cursor: default;
}

.release-summary-error[data-control-plane-failure-batch] {
  cursor: pointer;
}

@media (max-width: 640px) {
  .control-plane-failure-detail-body {
    padding: 16px 16px 20px;
  }

  .control-plane-failure-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

.runtime-release-table-shell {
  width: 100%;
  overflow-x: auto;
}

.runtime-release-table {
  min-width: 820px;
  table-layout: fixed;
}

.runtime-release-table th:nth-child(1) { width: 100px; }
.runtime-release-table th:nth-child(2),
.runtime-release-table th:nth-child(3) { width: 190px; }
.runtime-release-table th:nth-child(4) { width: auto; }
.runtime-release-table th:nth-child(5) { width: 190px; }

.runtime-release-table td:last-child button {
  width: 164px;
  min-width: 164px;
  white-space: nowrap;
}

.runtime-publish-status {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.runtime-publish-status strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.runtime-publish-status span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.runtime-publish-status.is-running strong { color: #245fc0; }
.runtime-publish-status.is-completed strong { color: var(--success); }
.runtime-publish-status.is-failed strong,
.runtime-publish-status .is-error { color: var(--danger); }

.runtime-release-notice {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid rgba(126, 139, 168, 0.14);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.runtime-publish-modal-card {
  width: min(520px, calc(100vw - 32px));
}

.runtime-publish-confirm-body {
  display: grid;
  gap: 14px;
}

.runtime-publish-confirm-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .release-step-head {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .release-step-actions,
  .release-step-head > .admin-icon-action {
    grid-column: 2;
    justify-self: start;
  }

  .release-summary-grid {
    grid-template-columns: repeat(3, minmax(138px, 1fr));
  }
}

@media (max-width: 560px) {
  .release-step-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .release-step-actions > button {
    flex: 1 1 150px;
  }

  .release-summary-grid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }
}

/* Runtime publish confirmation is a compact review surface, not a dashboard. */
.runtime-publish-modal-card {
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
}

.runtime-publish-modal-card .modal-head {
  min-height: 64px;
  padding: 14px 18px;
}

.runtime-publish-modal-card .modal-head h2 {
  font-size: 18px;
  line-height: 1.3;
}

.runtime-publish-modal-card .runtime-publish-confirm-body {
  gap: 12px;
  padding: 18px;
}

#runtimePublishConfirmSummary.summary-grid,
#runtimePublishConfirmSummary > .summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(126, 139, 168, 0.2);
  border-radius: 6px;
  background: rgba(250, 252, 255, 0.72);
}

#runtimePublishConfirmSummary .summary-item {
  min-width: 0;
  min-height: 70px;
  padding: 13px 15px;
  border: 0;
  border-right: 1px solid rgba(126, 139, 168, 0.16);
  border-bottom: 1px solid rgba(126, 139, 168, 0.16);
  border-radius: 0;
  background: transparent;
}

#runtimePublishConfirmSummary .summary-item:nth-child(2n) {
  border-right: 0;
}

#runtimePublishConfirmSummary .summary-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

#runtimePublishConfirmSummary .summary-item-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

#runtimePublishConfirmSummary .summary-item-value {
  margin-top: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: 0;
}

#runtimePublishConfirmSummary .summary-item:last-child .summary-item-value {
  color: #245fc0;
}

.runtime-publish-confirm-body > p {
  position: relative;
  padding: 10px 12px 10px 32px;
  border: 1px solid rgba(47, 111, 221, 0.14);
  border-radius: 6px;
  background: rgba(47, 111, 221, 0.055);
  color: #52617a;
}

.runtime-publish-confirm-body > p::before {
  content: "i";
  position: absolute;
  top: 11px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(47, 111, 221, 0.45);
  border-radius: 50%;
  color: #245fc0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.runtime-publish-modal-card .modal-actions {
  gap: 8px;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(126, 139, 168, 0.14);
  background: rgba(248, 250, 255, 0.72);
}

.runtime-publish-modal-card .modal-actions button {
  min-width: 96px;
  min-height: 36px;
  border-radius: 6px;
}

@media (max-width: 560px) {
  #runtimePublishConfirmSummary.summary-grid,
  #runtimePublishConfirmSummary > .summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #runtimePublishConfirmSummary .summary-item,
  #runtimePublishConfirmSummary .summary-item:nth-child(2n),
  #runtimePublishConfirmSummary .summary-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(126, 139, 168, 0.16);
  }

  #runtimePublishConfirmSummary .summary-item:last-child {
    border-bottom: 0;
  }
}

#runtimePublishConfirmSummary.summary-grid {
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#runtimePublishConfirmSummary > .summary-grid {
  width: 100%;
}

/* Keep workbench detail navigation fixed while only the active panel scrolls. */
@media (min-width: 981px) {
  .admin-main:has(.workbench-detail-toolbar) {
    height: 100%;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
  }

  .content-view:has(.workbench-detail-toolbar) {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .content-view:has(.workbench-detail-toolbar) > .detail-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    overflow: hidden;
  }

  .content-view:has(.workbench-detail-toolbar) > .detail-shell > .detail-tabs {
    position: relative;
    top: auto;
    z-index: 2;
    margin: 0;
    padding: 6px 0 6px 4px;
    background: var(--bg, #f6f7fb);
    border-bottom: 1px solid rgba(210, 218, 236, 0.72);
  }

  .content-view:has(.workbench-detail-toolbar) > .detail-shell > .detail-panel {
    min-height: 0;
    padding: 18px 0 24px;
    overflow: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 980px) {
  .admin-app:has(.workbench-detail-toolbar) {
    overflow: visible;
  }

  .content-view:has(.workbench-detail-toolbar) > .detail-shell > .detail-tabs {
    top: 0;
    z-index: 2;
    background: rgba(246, 248, 252, 0.98);
  }
}

/* Plugin model configuration stays independent from the AIHub configuration tools. */
#systemModelPanel .system-model-grid > .plugin-model-config-card {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
}

#systemModelPanel .system-model-grid > .panel-card:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

#systemModelPanel .system-model-grid > .panel-card:nth-child(3) {
  grid-column: 2 / -1;
  grid-row: 2;
}

.plugin-model-config-card .panel-head {
  align-items: center;
}

.plugin-model-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.plugin-model-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.plugin-model-add-btn > span[aria-hidden="true"] {
  font-size: 18px;
  line-height: 1;
}

.plugin-model-config-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 14px 18px;
  align-items: end;
}

.plugin-model-options-field {
  grid-row: 1 / span 2;
}

.plugin-model-table-shell {
  max-height: 308px;
  overflow: auto;
}

.plugin-model-table {
  table-layout: fixed;
}

.plugin-model-table th,
.plugin-model-table td {
  padding: 8px 10px;
}

#systemModelPanel .plugin-model-table th.plugin-model-action-column,
#systemModelPanel .plugin-model-table td.plugin-model-action-cell {
  width: 58px;
  min-width: 58px;
  text-align: center;
}

.plugin-model-id-input {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.plugin-model-delete-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 6px;
  color: var(--danger);
  font-size: 20px;
  line-height: 1;
}

.plugin-default-model-field,
.plugin-model-config-actions {
  grid-column: 2;
}

.plugin-model-config-actions {
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 980px) {
  #systemModelPanel .system-model-grid > .plugin-model-config-card,
  #systemModelPanel .system-model-grid > .panel-card:nth-child(2),
  #systemModelPanel .system-model-grid > .panel-card:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .plugin-model-config-card .panel-head,
  .plugin-model-head-actions {
    align-items: flex-start;
  }

  .plugin-model-config-card .panel-head {
    flex-wrap: wrap;
  }

  .plugin-model-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .plugin-model-config-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .plugin-model-options-field,
  .plugin-default-model-field,
  .plugin-model-config-actions {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Data-backed action modals open immediately, then own their loading and error state. */
.modal-layer.is-data-pending .modal-card > :not(.modal-head):not(.admin-modal-data-state) {
  display: none !important;
}

.admin-modal-data-state {
  display: grid;
  align-content: center;
  min-height: 220px;
  padding: 24px;
}

.admin-modal-data-skeleton {
  display: grid;
  gap: 14px;
}

.admin-modal-data-skeleton .admin-skeleton-line {
  display: block;
  width: 100%;
  height: 42px;
}

.admin-modal-data-skeleton .admin-skeleton-line.is-short {
  width: 62%;
}

.admin-modal-data-error {
  display: grid;
  justify-items: start;
  gap: 10px;
  max-width: 520px;
  color: var(--text);
}

.admin-modal-data-error > span {
  color: var(--muted);
  line-height: 1.55;
}

.workbench-token-cell-stack {
  display: grid;
  gap: 8px;
  min-width: 160px;
}

.workbench-token-model-count {
  min-width: 72px;
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
  white-space: nowrap;
}

.workbench-token-model-count.is-error {
  color: var(--danger);
}

.workbench-token-model-count.is-loading {
  color: var(--muted);
}

.workbench-token-models-modal-card {
  width: min(960px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
}

.workbench-token-models-modal-card .modal-head-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.workbench-token-models-body {
  display: grid;
  gap: 14px;
  min-height: 280px;
  padding: 18px 22px;
  overflow: auto;
}

.workbench-token-models-modal-card .modal-actions {
  flex: 0 0 auto;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  background: var(--card-bg);
}

.admin-inline-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-inline-metrics > span {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.admin-inline-metrics strong {
  font-size: 18px;
  line-height: 1.2;
}

.admin-inline-metrics small {
  color: var(--muted);
}

.workbench-token-model-list {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 6px;
  min-height: 160px;
}

.workbench-token-model-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 14px;
  height: auto;
  min-height: 58px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.workbench-token-model-item.is-editable {
  grid-template-columns: 34px minmax(220px, 1fr) minmax(160px, 0.72fr) 36px 46px;
}

.workbench-token-model-item.is-readonly {
  grid-template-columns: minmax(0, 1fr) auto;
}

.workbench-token-model-item.is-unavailable {
  opacity: 0.64;
}

.workbench-model-default-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  justify-self: center;
  color: var(--muted);
}

.workbench-model-default-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.workbench-model-default-button.is-selected {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card-bg));
}

.workbench-model-default-button.is-selected svg {
  fill: currentColor;
}

.workbench-token-model-columns {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) minmax(160px, 0.72fr) 36px 46px;
  align-items: center;
  gap: 14px;
  padding: 0 12px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.workbench-token-model-columns > span:nth-last-child(-n + 2) {
  text-align: center;
}

.admin-table-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.workbench-model-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.workbench-model-count-provider {
  display: inline-grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.workbench-model-count-provider-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

.workbench-model-count-provider-fallback {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

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

.workbench-token-model-drag-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-drag-sort-handle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}

.admin-drag-sort-handle:hover,
.admin-drag-sort-handle:focus-visible {
  background: var(--soft);
  color: var(--text);
}

.admin-drag-sort-handle:active {
  cursor: grabbing;
}

.admin-drag-sort-handle:disabled {
  opacity: 0.28;
  cursor: default;
}

.admin-drag-sort-handle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.is-drag-placeholder {
  outline: 1px dashed var(--accent);
  outline-offset: -1px;
  background: color-mix(in srgb, var(--accent) 7%, var(--card-bg)) !important;
}

.is-drag-placeholder > * {
  visibility: hidden !important;
}

.admin-drag-sort-preview {
  position: fixed !important;
  z-index: 10020;
  margin: 0 !important;
  pointer-events: none !important;
  opacity: 0.94;
  border: 1px solid var(--accent) !important;
  border-radius: 6px;
  background: var(--card-bg) !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
}

.admin-drag-sort-indicator {
  position: fixed;
  z-index: 10030;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent);
  pointer-events: none;
}

body.admin-drag-sorting {
  cursor: grabbing !important;
  user-select: none !important;
}

.is-drag-saving .admin-drag-sort-handle {
  pointer-events: none;
  opacity: 0.45;
}

.workbench-token-model-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workbench-token-model-identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.workbench-token-model-provider-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workbench-token-model-provider-logo img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.workbench-token-model-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.workbench-token-model-provider-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.workbench-token-model-default {
  flex: 0 0 auto;
}

.workbench-token-model-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-token-model-description {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.workbench-token-model-token-cell {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.workbench-token-model-token-cell > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-token-model-token-empty {
  color: var(--muted);
}

.workbench-token-model-switch {
  position: relative;
  width: 44px;
  min-width: 44px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--soft);
}

.workbench-token-model-switch > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  transition: transform 140ms ease;
}

.workbench-token-model-switch.is-enabled {
  border-color: var(--success);
  background: var(--success);
}

.workbench-token-model-switch.is-enabled > span {
  transform: translateX(20px);
}

.workbench-token-model-switch.is-pending {
  opacity: 1;
  cursor: progress;
}

.workbench-token-model-switch.is-pending > span {
  opacity: 0;
}

.workbench-token-model-switch.is-pending::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -7px 0 0 -7px;
  border: 2px solid rgba(31, 63, 131, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: admin-icon-spin 780ms linear infinite;
}

.workbench-token-model-switch.is-enabled.is-pending::after {
  border-color: rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
}

@media (max-width: 760px) {
  .workbench-token-models-modal-card {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
  }

  .workbench-token-models-body {
    min-height: 240px;
    padding: 14px;
  }

  .workbench-token-model-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding-inline: 6px;
  }

  .workbench-token-model-item.is-editable {
    grid-template-columns: 32px minmax(0, 1fr) 34px 46px;
    align-items: start;
    column-gap: 8px;
    row-gap: 8px;
  }

  .workbench-token-model-columns {
    display: none;
  }

  .workbench-token-model-item.is-editable .workbench-token-model-drag-cell {
    grid-column: 1;
    grid-row: 1;
  }

  .workbench-token-model-item.is-editable .workbench-token-model-identity {
    grid-column: 2;
    grid-row: 1;
  }

  .workbench-token-model-item.is-editable .workbench-token-model-token-cell {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .workbench-token-model-item.is-editable .workbench-model-default-button {
    grid-column: 3;
    grid-row: 1;
  }

  .workbench-token-model-item.is-editable .workbench-token-model-switch {
    grid-column: 4;
    grid-row: 1;
    margin-top: 5px;
  }

}

/* Shared Admin form controls use the runtime monitor visual baseline. */
.admin-shell .field input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"])),
.admin-shell .field select,
.admin-shell .toolbar-search input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"])),
.admin-shell .toolbar-search select,
.admin-shell button.admin-select-button,
.admin-shell .toolbar-select-button {
  box-sizing: border-box;
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--text);
  box-shadow: var(--button-glow);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  outline: none;
}

.admin-shell button.admin-select-button {
  padding-right: 42px;
}

.admin-shell .toolbar-select-button {
  padding-right: 32px;
}

.admin-shell .field textarea {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--text);
  box-shadow: var(--button-glow);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder,
.admin-shell .toolbar-search input::placeholder,
.admin-shell .toolbar-search .contract-date-placeholder {
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 1;
}

.admin-shell .field input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"])):focus,
.admin-shell .field select:focus,
.admin-shell .field textarea:focus,
.admin-shell .toolbar-search input:focus,
.admin-shell .toolbar-search select:focus,
.admin-shell button.admin-select-button:focus,
.admin-shell button.admin-select-button[aria-expanded="true"],
.admin-shell .toolbar-select-button:focus,
.admin-shell .toolbar-select-button[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: var(--field-focus-bg);
  box-shadow: var(--button-glow-strong);
  outline: none;
}

.admin-shell .contract-date-range input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Dynamic toolbar filters share the contract select surface and floating menu. */
.admin-shell button.toolbar-select-button.admin-select-button {
  padding-right: 42px;
}

.admin-shell button.toolbar-select-button.admin-select-button::after {
  right: 15px;
  width: 12px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(50% 72%, 16% 34%, 84% 34%);
  opacity: 0.72;
  transform: translateY(-50%);
}

.admin-shell button.toolbar-select-button.admin-select-button[aria-expanded="true"]::after {
  opacity: 0.9;
  transform: translateY(-50%) rotate(180deg);
}

.admin-shell .toolbar-select-dropdown.admin-select-menu {
  position: fixed;
  right: auto;
  top: auto;
  z-index: 10060;
  width: auto;
  min-width: 180px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(58, 70, 103, 0.22), 0 4px 14px rgba(58, 70, 103, 0.14);
}

/* Empty list filters use muted text; a real selection returns to the body color. */
.admin-shell .toolbar-search > select:has(option[value=""]:checked),
.admin-shell .toolbar-select > select:has(option[value=""]:checked),
.admin-shell .toolbar-search .admin-select-control:has(select option[value=""]:checked) > .admin-select-button,
.admin-shell .toolbar-select .admin-select-control:has(select option[value=""]:checked) > .admin-select-button,
.admin-shell .toolbar-search > .admin-select-button:not([data-selected-value]),
.admin-shell .toolbar-select > .admin-select-button:not([data-selected-value]) {
  color: var(--muted);
}

/* List filters sit directly on the page surface instead of inside a card backplate. */
.content-view > .page-toolbar:has(.page-toolbar-actions):has(.toolbar-search) {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

/* Runtime operations screen. */
.runtime-monitor-view {
  --runtime-screen-bg: rgba(248, 250, 255, 0.7);
  --runtime-screen-surface: rgba(255, 255, 255, 0.76);
  --runtime-screen-line: rgba(126, 139, 168, 0.22);
  --runtime-screen-text: #303743;
  --runtime-screen-muted: #7f899d;
  --runtime-screen-healthy: #3b9f78;
  --runtime-screen-warning: #d79a21;
  --runtime-screen-critical: #d94b5c;
  --runtime-screen-info: #5b7fc6;
}

.runtime-monitor-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.runtime-monitor-screen-title {
  display: grid;
  gap: 3px;
}

.runtime-monitor-screen-title > span,
.runtime-monitor-component-head > div > span {
  color: #63708a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.runtime-monitor-screen-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

.runtime-monitor-live-state {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 176px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.64);
}

.runtime-monitor-live-state > i,
.runtime-monitor-component-status > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.runtime-monitor-live-state > div {
  display: grid;
  gap: 2px;
}

.runtime-monitor-live-state strong,
.runtime-monitor-live-state small {
  display: block;
  line-height: 1.2;
}

.runtime-monitor-live-state strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.runtime-monitor-live-state small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.runtime-monitor-live-state.is-healthy > i {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(59, 159, 120, 0.12);
  animation: runtime-monitor-live-pulse 1.8s ease-out infinite;
}

.runtime-monitor-live-state.is-warning > i,
.runtime-monitor-live-state.is-connecting > i {
  background: #d79a21;
  box-shadow: 0 0 0 4px rgba(215, 154, 33, 0.12);
}

.runtime-monitor-live-state.is-critical > i {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(217, 75, 92, 0.12);
}

@keyframes runtime-monitor-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 159, 120, 0.3); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(59, 159, 120, 0); }
}

.runtime-monitor-toolbar {
  margin-bottom: 14px;
}

.runtime-monitor-toolbar-copy {
  flex: 0 0 auto;
}

.runtime-monitor-toolbar-copy > span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.runtime-monitor-command-center {
  position: relative;
  width: 100%;
  margin-bottom: 18px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--runtime-screen-line);
  border-radius: 8px;
  background-color: var(--runtime-screen-bg);
  background-image:
    linear-gradient(rgba(126, 139, 168, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 139, 168, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow: 12px 16px 34px rgba(142, 153, 181, 0.16), -10px -10px 28px rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
}

.runtime-monitor-command-center .runtime-monitor-summary {
  margin-bottom: 14px;
}

.runtime-monitor-command-center .runtime-monitor-summary-item {
  min-height: 88px;
  border: 1px solid var(--runtime-screen-line);
  border-top: 3px solid #91a0b7;
  border-radius: 6px;
  background: var(--runtime-screen-surface);
  box-shadow: 0 8px 20px rgba(142, 153, 181, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.runtime-monitor-command-center .runtime-monitor-summary-item.is-success {
  border-top-color: var(--runtime-screen-healthy);
}

.runtime-monitor-command-center .runtime-monitor-summary-item.is-warning {
  border-top-color: var(--runtime-screen-warning);
}

.runtime-monitor-command-center .runtime-monitor-summary-item.is-info {
  border-top-color: var(--runtime-screen-info);
}

.runtime-monitor-command-center .runtime-monitor-summary-item > span,
.runtime-monitor-command-center .runtime-monitor-summary-item small {
  color: var(--runtime-screen-muted);
}

.runtime-monitor-command-center .runtime-monitor-summary-item .summary-item-value {
  color: var(--runtime-screen-text);
}

.runtime-monitor-component-shell {
  padding-top: 14px;
  border-top: 1px solid var(--runtime-screen-line);
}

.runtime-monitor-component-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.runtime-monitor-component-head > div {
  display: grid;
  gap: 4px;
}

.runtime-monitor-component-head > div > span {
  color: #77839a;
}

.runtime-monitor-component-head h3 {
  margin: 0;
  color: var(--runtime-screen-text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.runtime-monitor-component-head p {
  margin: 0;
  color: var(--runtime-screen-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
}

.runtime-monitor-component-head p.is-healthy {
  color: #2f8567;
}

.runtime-monitor-component-head p.is-warning {
  color: #9a6810;
}

.runtime-monitor-component-map {
  display: grid;
  gap: 10px;
}

.runtime-monitor-component-lane {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  min-height: 112px;
}

.runtime-monitor-lane-label {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  color: var(--runtime-screen-muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.runtime-monitor-lane-label > i {
  width: 26px;
  height: 1px;
  background: rgba(108, 119, 138, 0.42);
}

.runtime-monitor-component-nodes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.runtime-monitor-component-node {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 5px;
  min-height: 112px;
  padding: 12px 14px;
  overflow: visible;
  border: 1px solid var(--runtime-screen-line);
  border-left: 3px solid #91a0b7;
  border-radius: 6px;
  background: var(--runtime-screen-surface);
  box-shadow: 0 8px 20px rgba(142, 153, 181, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.runtime-monitor-component-node:not(:last-child)::after {
  content: ">";
  position: absolute;
  top: 50%;
  right: -19px;
  z-index: 2;
  width: 15px;
  color: #8790a3;
  font-size: 15px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  transform: translateY(-50%);
}

.runtime-monitor-component-node.is-healthy {
  border-left-color: var(--runtime-screen-healthy);
}

.runtime-monitor-component-node.is-warning {
  border-left-color: var(--runtime-screen-warning);
}

.runtime-monitor-component-node.is-critical {
  border-left-color: var(--runtime-screen-critical);
}

.runtime-monitor-component-node.is-idle {
  border-left-color: var(--runtime-screen-info);
}

.runtime-monitor-component-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.runtime-monitor-component-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(59, 102, 180, 0.3);
  border-radius: 4px;
  color: #315f9e;
  font-size: 9px;
  font-weight: 900;
  line-height: 18px;
}

[data-runtime-component="admin"] .runtime-monitor-component-code {
  border-color: rgba(190, 18, 60, 0.28);
  color: #a3133b;
}

[data-runtime-component="agent"] .runtime-monitor-component-code {
  border-color: rgba(4, 120, 87, 0.28);
  color: #047857;
}

[data-runtime-component="workbench"] .runtime-monitor-component-code {
  border-color: rgba(15, 118, 110, 0.28);
  color: #0f766e;
}

[data-runtime-component="plugin"] .runtime-monitor-component-code {
  border-color: rgba(161, 98, 7, 0.28);
  color: #946006;
}

[data-runtime-component="codex"] .runtime-monitor-component-code {
  border-color: rgba(190, 24, 93, 0.28);
  color: #ad1c56;
}

.runtime-monitor-component-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--runtime-screen-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.runtime-monitor-component-node.is-healthy .runtime-monitor-component-status > i {
  background: var(--runtime-screen-healthy);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.runtime-monitor-component-node.is-warning .runtime-monitor-component-status > i {
  background: var(--runtime-screen-warning);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.runtime-monitor-component-node.is-critical .runtime-monitor-component-status > i {
  background: var(--runtime-screen-critical);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.1);
}

.runtime-monitor-component-node.is-idle .runtime-monitor-component-status > i {
  background: var(--runtime-screen-info);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.runtime-monitor-component-node > strong,
.runtime-monitor-component-value,
.runtime-monitor-component-node > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-component-node > strong {
  color: var(--runtime-screen-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.runtime-monitor-component-value {
  color: #4c5668;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.runtime-monitor-component-node > small {
  color: var(--runtime-screen-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.runtime-monitor-component-skeleton-node .admin-skeleton-line,
.runtime-monitor-component-skeleton-lane .runtime-monitor-lane-label .admin-skeleton-line {
  background: rgba(126, 139, 168, 0.16);
}

.runtime-monitor-component-skeleton-node::after {
  opacity: 0.34;
}

.runtime-monitor-hierarchy-shell {
  margin-bottom: 18px;
  border-top: 3px solid var(--runtime-screen-info);
  border-bottom: 1px solid var(--runtime-screen-line);
  background: rgba(255, 255, 255, 0.58);
}

.runtime-monitor-hierarchy-head,
.runtime-monitor-hierarchy-admin,
.runtime-monitor-hierarchy-enterprise-head,
.runtime-monitor-hierarchy-workbench {
  display: flex;
  align-items: center;
  min-width: 0;
}

.runtime-monitor-hierarchy-head {
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--runtime-screen-line);
}

.runtime-monitor-hierarchy-head > div {
  display: grid;
  gap: 4px;
}

.runtime-monitor-hierarchy-head span {
  color: #63708a;
  font-size: 10px;
  font-weight: 900;
}

.runtime-monitor-hierarchy-head h3,
.runtime-monitor-hierarchy-head p {
  margin: 0;
}

.runtime-monitor-hierarchy-head h3 {
  color: var(--runtime-screen-text);
  font-size: 16px;
  font-weight: 900;
}

.runtime-monitor-hierarchy-head p {
  color: var(--runtime-screen-muted);
  font-size: 12px;
  font-weight: 800;
}

.runtime-monitor-hierarchy {
  display: grid;
}

.runtime-monitor-hierarchy-admin {
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--runtime-screen-line);
  background: rgba(91, 127, 198, 0.07);
}

.runtime-monitor-hierarchy-admin > div,
.runtime-monitor-hierarchy-enterprise-head > div,
.runtime-monitor-hierarchy-workbench-name > div,
.runtime-monitor-hierarchy-fact > div {
  min-width: 0;
}

.runtime-monitor-hierarchy-admin strong,
.runtime-monitor-hierarchy-admin small,
.runtime-monitor-hierarchy-enterprise-head strong,
.runtime-monitor-hierarchy-enterprise-head small,
.runtime-monitor-hierarchy-workbench-name a,
.runtime-monitor-hierarchy-workbench-name small,
.runtime-monitor-hierarchy-fact strong,
.runtime-monitor-hierarchy-fact small,
.runtime-monitor-hierarchy-fact em {
  display: block;
}

.runtime-monitor-hierarchy-admin strong,
.runtime-monitor-hierarchy-enterprise-head strong,
.runtime-monitor-hierarchy-enterprise-head a,
.runtime-monitor-hierarchy-workbench-name a {
  color: var(--runtime-screen-text);
  font-weight: 900;
  text-decoration: none;
}

.runtime-monitor-hierarchy-admin small,
.runtime-monitor-hierarchy-enterprise-head small,
.runtime-monitor-hierarchy-workbench-name small,
.runtime-monitor-hierarchy-fact small,
.runtime-monitor-hierarchy-fact em {
  overflow: hidden;
  color: var(--runtime-screen-muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-hierarchy-admin > em,
.runtime-monitor-hierarchy-enterprise-head > em {
  margin-left: auto;
  color: #52627d;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.runtime-monitor-hierarchy-code,
.runtime-monitor-hierarchy-fact-code {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 22px;
  border: 1px solid rgba(91, 127, 198, 0.28);
  border-radius: 4px;
  color: #315f9e;
  font-size: 9px;
  font-weight: 900;
}

.runtime-monitor-hierarchy-code {
  width: 34px;
}

.runtime-monitor-hierarchy-enterprises {
  display: grid;
  gap: 12px;
  padding: 12px 16px 16px;
}

.runtime-monitor-hierarchy-enterprise {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--runtime-screen-line);
  border-left: 3px solid var(--runtime-screen-info);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 6px 16px rgba(142, 153, 181, 0.08);
}

.runtime-monitor-hierarchy-enterprise.is-unassigned {
  border-left-color: var(--runtime-screen-warning);
}

.runtime-monitor-hierarchy-enterprise-head {
  gap: 12px;
  padding: 11px 14px 11px 18px;
  border-bottom: 1px solid var(--runtime-screen-line);
  background: rgba(248, 250, 255, 0.72);
}

.runtime-monitor-hierarchy-enterprise-head::before {
  content: "LANE";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 18px;
  margin: 0 2px 0 0;
  border: 1px solid rgba(91, 127, 198, 0.26);
  border-radius: 3px;
  color: #657189;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.runtime-monitor-hierarchy-enterprise.is-unassigned .runtime-monitor-hierarchy-code {
  border-color: rgba(215, 154, 33, 0.32);
  color: #9a6810;
}

.runtime-monitor-hierarchy-workbenches {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px 34px;
}

.runtime-monitor-hierarchy-workbenches::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 20px;
  left: 17px;
  width: 1px;
  background: rgba(91, 127, 198, 0.26);
}

.runtime-monitor-hierarchy-workbench {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(420px, 1.2fr);
  gap: 18px;
  padding: 11px 12px;
  border: 1px solid rgba(126, 139, 168, 0.22);
  border-radius: 5px;
  background: var(--runtime-screen-surface);
  box-shadow: 0 4px 12px rgba(142, 153, 181, 0.08);
}

.runtime-monitor-hierarchy-workbench::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -19px;
  width: 19px;
  height: 1px;
  background: rgba(91, 127, 198, 0.26);
}

.runtime-monitor-hierarchy-workbench-name {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.runtime-monitor-hierarchy-workbench-name a:hover,
.runtime-monitor-hierarchy-enterprise-head a:hover {
  color: var(--primary);
}

.runtime-monitor-hierarchy-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.runtime-monitor-hierarchy-fact {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(126, 139, 168, 0.2);
  border-radius: 5px;
  background: rgba(248, 250, 255, 0.68);
}

.runtime-monitor-hierarchy-fact-code {
  width: 32px;
  border-color: rgba(126, 139, 168, 0.26);
  color: #657189;
}

.runtime-monitor-hierarchy-fact strong {
  overflow: hidden;
  color: var(--runtime-screen-text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-hierarchy-fact strong > i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.runtime-monitor-hierarchy-fact.is-healthy strong > i {
  background: var(--runtime-screen-healthy);
}

.runtime-monitor-hierarchy-fact.is-warning strong > i {
  background: var(--runtime-screen-warning);
}

.runtime-monitor-hierarchy-fact.is-critical strong > i {
  background: var(--runtime-screen-critical);
}

.runtime-monitor-hierarchy-empty {
  padding: 12px 12px;
  border: 1px dashed rgba(126, 139, 168, 0.32);
  border-radius: 5px;
  color: var(--runtime-screen-muted);
  font-size: 11px;
  font-weight: 700;
}

.runtime-monitor-hierarchy-skeleton {
  display: grid;
  gap: 14px;
  padding: 18px 16px;
}

.runtime-monitor-status-grid .runtime-monitor-panel {
  border-radius: 8px;
}

@media (min-width: 1600px) {
  .runtime-monitor-component-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .runtime-monitor-component-lane {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .runtime-monitor-lane-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 18px;
    text-align: left;
  }
}

@media (max-width: 1100px) {
  .runtime-monitor-command-center .runtime-monitor-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .runtime-monitor-component-lane {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-lane-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 20px;
    text-align: left;
  }

  .runtime-monitor-hierarchy-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .runtime-monitor-screen-head,
  .runtime-monitor-component-head {
    align-items: flex-start;
  }

  .runtime-monitor-screen-head {
    flex-direction: column;
  }

  .runtime-monitor-live-state {
    width: 100%;
  }

  .runtime-monitor-toolbar-copy {
    width: 100%;
  }

  .runtime-monitor-toolbar-copy > span {
    min-height: 24px;
  }

  .runtime-monitor-command-center {
    padding: 12px;
  }

  .runtime-monitor-command-center .runtime-monitor-summary,
  .runtime-monitor-component-nodes {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-component-head {
    flex-direction: column;
  }

  .runtime-monitor-component-head p {
    text-align: left;
  }

  .runtime-monitor-component-node:not(:last-child)::after {
    content: "v";
    top: auto;
    right: 50%;
    bottom: -21px;
    transform: translateX(50%);
  }

  .runtime-monitor-component-node > strong,
  .runtime-monitor-component-value,
  .runtime-monitor-component-node > small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .runtime-monitor-hierarchy-head,
  .runtime-monitor-hierarchy-enterprise-head {
    align-items: flex-start;
  }

  .runtime-monitor-hierarchy-head {
    flex-direction: column;
  }

  .runtime-monitor-hierarchy-admin {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }

  .runtime-monitor-hierarchy-admin > em {
    grid-column: 2;
    margin-left: 0;
  }

  .runtime-monitor-hierarchy-admin strong {
    white-space: nowrap;
  }

  .runtime-monitor-hierarchy-enterprise-head {
    flex-wrap: wrap;
    padding-left: 12px;
  }

  .runtime-monitor-hierarchy-enterprise-head::before {
    display: inline-flex;
  }

  .runtime-monitor-hierarchy-enterprise-head > em {
    flex-basis: 100%;
    margin-left: 46px;
    white-space: normal;
  }

  .runtime-monitor-hierarchy-workbench {
    padding-left: 10px;
  }

  .runtime-monitor-hierarchy-enterprises {
    padding: 10px 8px 12px;
  }

  .runtime-monitor-hierarchy-workbenches {
    padding-left: 26px;
  }

  .runtime-monitor-hierarchy-workbenches::before {
    left: 12px;
  }

  .runtime-monitor-hierarchy-workbench::before {
    left: -15px;
    width: 15px;
  }

  .runtime-monitor-hierarchy-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-hierarchy-workbench-name small,
  .runtime-monitor-hierarchy-fact strong,
  .runtime-monitor-hierarchy-fact small,
  .runtime-monitor-hierarchy-fact em {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .runtime-monitor-live-state.is-healthy > i {
    animation: none;
  }
}

/* Reference-style observation canvas: time marks, connected blocks and a floating status rail. */
.runtime-monitor-command-center {
  padding-bottom: 210px;
}

.runtime-monitor-component-shell {
  position: relative;
}

.runtime-monitor-flow-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 2px;
  padding: 10px 12px;
  border: 1px solid var(--runtime-screen-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.runtime-monitor-flow-interval,
.runtime-monitor-flow-filters {
  display: flex;
  align-items: center;
  min-width: 0;
}

.runtime-monitor-flow-interval {
  gap: 9px;
}

.runtime-monitor-flow-interval > span,
.runtime-monitor-flow-filters > span {
  color: #76829a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
}

.runtime-monitor-flow-interval strong {
  color: var(--runtime-screen-text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.runtime-monitor-flow-interval small {
  overflow: hidden;
  color: var(--runtime-screen-muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-flow-filters {
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.runtime-monitor-flow-filters > span {
  margin-right: 2px;
}

.runtime-monitor-flow-filter {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(126, 139, 168, 0.24);
  border-radius: 4px;
  color: var(--runtime-screen-muted);
  background: rgba(248, 250, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.runtime-monitor-flow-filter:hover,
.runtime-monitor-flow-filter.is-active {
  border-color: rgba(91, 127, 198, 0.42);
  color: #315f9e;
  background: rgba(224, 234, 255, 0.72);
}

.runtime-monitor-flow-timeline {
  padding: 18px 14px 8px;
}

.runtime-monitor-flow-timeline-track {
  position: relative;
  height: 38px;
  border-top: 1px solid rgba(126, 139, 168, 0.28);
}

.runtime-monitor-flow-timeline-track::before {
  content: "";
  position: absolute;
  inset: 7px 0 auto;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(126, 139, 168, 0.24) 0 1px, transparent 1px 14.285%);
}

.runtime-monitor-flow-timeline-progress {
  position: absolute;
  top: -2px;
  left: 0;
  height: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--runtime-screen-info);
  box-shadow: 0 0 9px rgba(91, 127, 198, 0.34);
}

.runtime-monitor-flow-timeline-point {
  position: absolute;
  top: 3px;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 48px;
  transform: translateX(-50%);
}

.runtime-monitor-flow-timeline-progress + .runtime-monitor-flow-timeline-point {
  justify-items: start;
  transform: none;
}

.runtime-monitor-flow-timeline-point:last-child {
  justify-items: end;
  transform: translateX(-100%);
}

.runtime-monitor-flow-timeline-point > i {
  width: 7px;
  height: 7px;
  border: 2px solid var(--runtime-screen-bg);
  border-radius: 50%;
  background: #a2acbd;
  box-shadow: 0 0 0 1px rgba(126, 139, 168, 0.24);
}

.runtime-monitor-flow-timeline-point b {
  color: #7d879b;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.runtime-monitor-flow-timeline-point.is-healthy > i {
  background: var(--runtime-screen-healthy);
}

.runtime-monitor-flow-timeline-point.is-warning > i {
  background: var(--runtime-screen-warning);
}

.runtime-monitor-flow-timeline-point.is-idle > i {
  background: #a2acbd;
}

.runtime-monitor-flow-timeline-skeleton {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  height: 38px;
  padding-top: 6px;
  border-top: 1px solid rgba(126, 139, 168, 0.22);
}

.runtime-monitor-flow-timeline-skeleton span {
  display: block;
  height: 8px;
  margin-top: 4px;
  border-radius: 3px;
  background: rgba(126, 139, 168, 0.16);
}

.runtime-monitor-flow-network {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 18px;
  padding: 14px 4px 28px;
}

.runtime-monitor-flow-node {
  position: relative;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 136px;
  padding: 12px 12px 11px;
  overflow: visible;
  border: 1px solid var(--runtime-screen-line);
  border-left: 3px solid #91a0b7;
  border-radius: 6px;
  background: var(--runtime-screen-surface);
  box-shadow: 0 8px 18px rgba(142, 153, 181, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.runtime-monitor-flow-network > .runtime-monitor-flow-node:not(:nth-child(6))::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -19px;
  width: 18px;
  height: 1px;
  background: rgba(91, 127, 198, 0.42);
}

.runtime-monitor-flow-network > .runtime-monitor-flow-node:not(:nth-child(6))::before {
  content: ">";
  position: absolute;
  top: calc(50% - 8px);
  right: -24px;
  z-index: 2;
  color: #7182a4;
  font-size: 13px;
  font-weight: 900;
}

.runtime-monitor-flow-node.is-healthy {
  border-left-color: var(--runtime-screen-healthy);
}

.runtime-monitor-flow-node.is-warning {
  border-left-color: var(--runtime-screen-warning);
}

.runtime-monitor-flow-node.is-critical {
  border-left-color: var(--runtime-screen-critical);
}

.runtime-monitor-flow-node.is-idle {
  border-left-color: var(--runtime-screen-info);
}

.runtime-monitor-flow-node.is-dimmed {
  opacity: 0.28;
  transform: scale(0.985);
}

.runtime-monitor-flow-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.runtime-monitor-flow-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(59, 102, 180, 0.3);
  border-radius: 4px;
  color: #315f9e;
  font-size: 9px;
  font-weight: 900;
}

.runtime-monitor-flow-node[data-runtime-flow-node="admin"] .runtime-monitor-flow-code {
  border-color: rgba(190, 18, 60, 0.28);
  color: #a3133b;
}

.runtime-monitor-flow-node[data-runtime-flow-node="agent"] .runtime-monitor-flow-code {
  border-color: rgba(4, 120, 87, 0.28);
  color: #047857;
}

.runtime-monitor-flow-node[data-runtime-flow-node="workbench"] .runtime-monitor-flow-code {
  border-color: rgba(15, 118, 110, 0.28);
  color: #0f766e;
}

.runtime-monitor-flow-node[data-runtime-flow-node="plugin"] .runtime-monitor-flow-code {
  border-color: rgba(161, 98, 7, 0.28);
  color: #946006;
}

.runtime-monitor-flow-node[data-runtime-flow-node="codex"] .runtime-monitor-flow-code {
  border-color: rgba(190, 24, 93, 0.28);
  color: #ad1c56;
}

.runtime-monitor-flow-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--runtime-screen-muted);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-flow-status > i {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.runtime-monitor-flow-node.is-healthy .runtime-monitor-flow-status > i {
  background: var(--runtime-screen-healthy);
}

.runtime-monitor-flow-node.is-warning .runtime-monitor-flow-status > i {
  background: var(--runtime-screen-warning);
}

.runtime-monitor-flow-node.is-critical .runtime-monitor-flow-status > i {
  background: var(--runtime-screen-critical);
}

.runtime-monitor-flow-node > strong,
.runtime-monitor-flow-value,
.runtime-monitor-flow-node > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-flow-node > strong {
  color: var(--runtime-screen-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.runtime-monitor-flow-value {
  color: #4c5668;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.runtime-monitor-flow-node > small {
  color: var(--runtime-screen-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.runtime-monitor-flow-items {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.runtime-monitor-flow-items > span {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding-top: 5px;
  border-top: 1px solid rgba(126, 139, 168, 0.14);
}

.runtime-monitor-flow-items > span > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--runtime-screen-info);
}

.runtime-monitor-flow-items b,
.runtime-monitor-flow-items em {
  overflow: hidden;
  color: var(--runtime-screen-muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-flow-items b {
  color: #53617a;
  font-weight: 900;
}

.runtime-monitor-component-map > .runtime-monitor-flow-node {
  width: min(300px, 44%);
  min-height: 112px;
  margin: 0 auto;
}

.runtime-monitor-component-map > .runtime-monitor-flow-node::before {
  content: "";
  position: absolute;
  top: -28px;
  left: 50%;
  width: 1px;
  height: 28px;
  background: rgba(91, 127, 198, 0.38);
}

.runtime-monitor-command-center > .runtime-monitor-summary {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 4;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(126, 139, 168, 0.22);
  border-radius: 8px;
  background: rgba(248, 250, 255, 0.84);
  box-shadow: 0 12px 24px rgba(142, 153, 181, 0.16), 0 2px 8px rgba(255, 255, 255, 0.74) inset;
  backdrop-filter: blur(14px);
}

.runtime-monitor-command-center > .runtime-monitor-summary .runtime-monitor-summary-item {
  min-height: 70px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
}

.runtime-monitor-command-center > .runtime-monitor-summary .runtime-monitor-summary-item .summary-item-value {
  font-size: 18px;
}

.runtime-monitor-flow-network-skeleton .runtime-monitor-flow-node,
.runtime-monitor-flow-node-skeleton {
  min-height: 136px;
}

.runtime-monitor-flow-network-skeleton .admin-skeleton-line,
.runtime-monitor-flow-node-skeleton .admin-skeleton-line {
  background: rgba(126, 139, 168, 0.16);
}

@media (max-width: 1200px) {
  .runtime-monitor-flow-network {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .runtime-monitor-flow-network > .runtime-monitor-flow-node:nth-child(3n)::after,
  .runtime-monitor-flow-network > .runtime-monitor-flow-node:nth-child(3n)::before {
    display: none;
  }

  .runtime-monitor-flow-network > .runtime-monitor-flow-node:nth-child(-n+3)::before {
    display: block;
    top: auto;
    right: auto;
    bottom: -28px;
    left: 50%;
    width: 1px;
    height: 28px;
    color: transparent;
    background: rgba(91, 127, 198, 0.28);
  }
}

@media (max-width: 720px) {
  .runtime-monitor-command-center {
    padding: 12px;
  }

  .runtime-monitor-flow-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .runtime-monitor-flow-filters {
    justify-content: flex-start;
  }

  .runtime-monitor-flow-timeline {
    padding-right: 4px;
    padding-left: 4px;
    overflow: hidden;
  }

  .runtime-monitor-flow-timeline-point b {
    font-size: 8px;
  }

  .runtime-monitor-flow-network {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 12px 4px 28px;
  }

  .runtime-monitor-flow-network > .runtime-monitor-flow-node:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -26px;
    left: 50%;
    width: 1px;
    height: 26px;
    background: rgba(91, 127, 198, 0.32);
  }

  .runtime-monitor-flow-network > .runtime-monitor-flow-node:not(:last-child)::before {
    top: auto;
    right: auto;
    bottom: -31px;
    left: calc(50% - 4px);
    color: #7182a4;
    font-size: 12px;
    transform: rotate(90deg);
  }

  .runtime-monitor-component-map > .runtime-monitor-flow-node {
    width: 100%;
    margin-top: 0;
  }

  .runtime-monitor-component-map > .runtime-monitor-flow-node::before {
    top: -28px;
    height: 28px;
  }

  .runtime-monitor-command-center > .runtime-monitor-summary {
    position: static;
    margin-top: 14px;
    padding: 8px;
  }

  .runtime-monitor-command-center > .runtime-monitor-summary .runtime-monitor-summary-item {
    min-height: 74px;
  }
}

/* Topology canvas details matching the reference network surface. */
.runtime-monitor-flow-workspace {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.runtime-monitor-flow-side-tools {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 6px;
}

.runtime-monitor-flow-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(126, 139, 168, 0.2);
  border-radius: 6px;
  color: #53617a;
  background: rgba(255, 255, 255, 0.7);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.runtime-monitor-flow-tool:hover,
.runtime-monitor-flow-tool:focus-visible {
  border-color: rgba(91, 127, 198, 0.46);
  color: #315f9e;
  background: rgba(232, 239, 255, 0.9);
  outline: none;
}

.runtime-monitor-flow-canvas {
  position: relative;
  min-width: 0;
  min-height: 356px;
  overflow: hidden;
  cursor: grab;
  border: 1px solid rgba(126, 139, 168, 0.12);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 38%, rgba(218, 228, 251, 0.26), transparent 44%),
    repeating-linear-gradient(0deg, rgba(108, 119, 138, 0.08) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(108, 119, 138, 0.08) 0 1px, transparent 1px 34px),
    rgba(248, 250, 255, 0.3);
}

.runtime-monitor-flow-canvas.is-panning {
  cursor: grabbing;
  user-select: none;
}

.runtime-monitor-flow-mini-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 7px;
}

.runtime-monitor-flow-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 136px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(126, 139, 168, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 6px 16px rgba(142, 153, 181, 0.08);
}

.runtime-monitor-flow-search > span {
  color: #7c879c;
  font-size: 18px;
  line-height: 1;
}

.runtime-monitor-flow-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--runtime-screen-text);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.runtime-monitor-flow-search input::placeholder {
  color: #8b95a8;
}

.runtime-monitor-flow-canvas .runtime-monitor-component-map {
  min-height: 356px;
  padding: 54px 16px 14px;
}

.runtime-monitor-flow-network {
  position: relative;
  z-index: 1;
  min-height: 272px;
  transform: scale(var(--runtime-flow-zoom, 1));
  transform-origin: center top;
  transition: transform 180ms ease;
}

.runtime-monitor-flow-connectors {
  position: absolute;
  inset: 12px 0 auto;
  z-index: 0;
  width: 100%;
  height: 260px;
  overflow: visible;
  pointer-events: none;
}

.runtime-monitor-flow-connectors path {
  fill: none;
  stroke: rgba(91, 127, 198, 0.54);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.runtime-monitor-flow-connectors path.is-branch {
  stroke: rgba(126, 139, 168, 0.48);
  stroke-dasharray: 3 3;
}

.runtime-monitor-flow-connectors path.is-primary {
  stroke: rgba(91, 127, 198, 0.68);
  stroke-width: 2;
}

.runtime-monitor-flow-connectors path.is-plugin {
  stroke: rgba(215, 154, 33, 0.5);
  stroke-dasharray: 4 3;
}

.runtime-monitor-flow-connectors circle.is-port {
  fill: #8aa1d1;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 2;
}

.runtime-monitor-flow-connectors text {
  fill: #8a95a9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.runtime-monitor-flow-network > .runtime-monitor-flow-node,
.runtime-monitor-component-map > .runtime-monitor-flow-node {
  z-index: 2;
}

.runtime-monitor-flow-network > .runtime-monitor-flow-node::before,
.runtime-monitor-flow-network > .runtime-monitor-flow-node::after {
  display: none;
}

.runtime-monitor-flow-node {
  min-height: 148px;
  padding: 12px 12px 10px;
  border-radius: 9px;
  background: rgba(246, 249, 255, 0.78);
  box-shadow: 0 12px 22px rgba(142, 153, 181, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.runtime-monitor-flow-node::after {
  content: "";
  position: absolute;
  top: 14px;
  right: -1px;
  width: 5px;
  height: 5px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: #8aa1d1;
  transform: translateX(50%);
}

.runtime-monitor-flow-code {
  gap: 5px;
  min-width: 42px;
  height: 22px;
  padding: 0 6px 0 4px;
  border-radius: 5px;
  background: rgba(234, 240, 255, 0.84);
}

.runtime-monitor-flow-code > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 2px;
  border-radius: 4px;
  color: #fff;
  background: #3268db;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.runtime-monitor-flow-code:not(.is-parent) > i {
  background: rgba(91, 127, 198, 0.68);
}

.runtime-monitor-flow-node > strong {
  font-size: 14px;
}

.runtime-monitor-flow-value {
  font-size: 13px;
}

.runtime-monitor-flow-items {
  gap: 4px;
  margin-top: 2px;
  padding-top: 2px;
}

.runtime-monitor-flow-items > span {
  grid-template-columns: 17px minmax(0, 1fr) auto 12px;
  gap: 5px;
  min-height: 27px;
  padding: 5px 6px;
  border: 1px solid rgba(126, 139, 168, 0.11);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(142, 153, 181, 0.08);
}

.runtime-monitor-flow-items > span > i.runtime-monitor-flow-item-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  color: #fff;
  background: #3268db;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.runtime-monitor-flow-items b,
.runtime-monitor-flow-items em,
.runtime-monitor-flow-items small {
  font-size: 9px;
}

.runtime-monitor-flow-items b {
  color: #3e4d66;
}

.runtime-monitor-flow-resources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.runtime-monitor-flow-resources > span {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(126, 139, 168, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.76);
}

.runtime-monitor-flow-resources small,
.runtime-monitor-flow-resources b,
.runtime-monitor-flow-resources em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-flow-resources small {
  color: #7d879b;
  font-size: 9px;
  font-weight: 800;
}

.runtime-monitor-flow-resources b {
  color: #3e4d66;
  font-size: 13px;
  font-weight: 900;
}

.runtime-monitor-flow-resources em {
  color: #8a95a9;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.runtime-monitor-flow-items small {
  color: #7d879b;
  font-weight: 900;
}

.runtime-monitor-component-map > .runtime-monitor-flow-node {
  position: relative;
  width: min(300px, 42%);
  min-height: 116px;
  margin: -14px auto 8px;
}

.runtime-monitor-component-map > .runtime-monitor-flow-node::before {
  content: "";
  position: absolute;
  top: -36px;
  left: 50%;
  width: 1px;
  height: 36px;
  background: rgba(91, 127, 198, 0.36);
}

.runtime-monitor-command-center > .runtime-monitor-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: auto;
  min-width: 0;
  padding: 10px;
  box-sizing: border-box;
}

.runtime-monitor-summary-cards,
.runtime-monitor-flow-footer-panels {
  display: grid;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.runtime-monitor-summary-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.runtime-monitor-flow-footer-panels {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 10px;
}

.runtime-monitor-flow-footer-chart,
.runtime-monitor-flow-footer-services {
  min-width: 0;
  min-height: 86px;
  padding: 9px 11px;
  border: 1px solid rgba(126, 139, 168, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.runtime-monitor-flow-footer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.runtime-monitor-flow-footer-title strong {
  color: #4e5e78;
  font-size: 11px;
  font-weight: 900;
}

.runtime-monitor-flow-footer-title span {
  color: #8a95a9;
  font-size: 9px;
  font-weight: 700;
}

.runtime-monitor-flow-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 38px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(126, 139, 168, 0.16);
}

.runtime-monitor-flow-bars > span {
  flex: 1 1 0;
  min-width: 5px;
  max-width: 22px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #7595dc, #b8c8ec);
}

.runtime-monitor-flow-footer-empty {
  color: #8a95a9;
  font-size: 9px;
  font-style: normal;
}

.runtime-monitor-flow-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  color: #8a95a9;
  font-size: 8px;
  font-weight: 700;
}

.runtime-monitor-flow-service-list {
  display: grid;
  gap: 5px;
}

.runtime-monitor-flow-service-list > div {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.runtime-monitor-flow-service-list i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #98a3b5;
}

.runtime-monitor-flow-service-list i.is-healthy {
  background: var(--runtime-screen-healthy);
}

.runtime-monitor-flow-service-list b,
.runtime-monitor-flow-service-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-flow-service-list b {
  color: #4d5d76;
  font-size: 9px;
  font-weight: 900;
}

.runtime-monitor-flow-service-list span {
  color: #8a95a9;
  font-size: 9px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .runtime-monitor-flow-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-flow-side-tools {
    display: flex;
    flex-direction: row;
    padding-top: 0;
  }

  .runtime-monitor-flow-canvas,
  .runtime-monitor-flow-canvas .runtime-monitor-component-map {
    min-height: 0;
  }

  .runtime-monitor-flow-mini-tools {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    justify-content: flex-end;
    padding: 10px 10px 0;
  }

  .runtime-monitor-flow-canvas .runtime-monitor-component-map {
    padding: 14px 8px 8px;
  }

  .runtime-monitor-flow-network {
    min-height: 0;
    transform: none;
  }

  .runtime-monitor-flow-connectors {
    display: none;
  }

  .runtime-monitor-flow-node {
    min-height: 132px;
  }

  .runtime-monitor-component-map > .runtime-monitor-flow-node {
    width: 100%;
    margin: 0;
  }

  .runtime-monitor-component-map > .runtime-monitor-flow-node::before {
    top: -26px;
    height: 26px;
  }

  .runtime-monitor-summary-cards,
  .runtime-monitor-flow-footer-panels {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Desktop topology positions mirror a free-flow network instead of a dashboard row. */
@media (min-width: 721px) {
  .runtime-monitor-flow-canvas {
    min-height: 500px;
  }

  .runtime-monitor-flow-canvas .runtime-monitor-component-map {
    min-height: 500px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: rgba(126, 139, 168, 0.38) transparent;
    scrollbar-width: thin;
  }

  .runtime-monitor-flow-network {
    display: block;
    width: 200%;
    min-width: 200%;
    min-height: 430px;
    padding: 0;
  }

  .runtime-monitor-flow-network > .runtime-monitor-flow-node {
    position: absolute;
    top: var(--runtime-flow-top);
    left: var(--runtime-flow-left);
    width: var(--runtime-flow-width);
    min-height: 150px;
    transform: none;
  }

  .runtime-monitor-flow-network > .runtime-monitor-flow-node.is-dimmed {
    transform: scale(0.985);
  }

  .runtime-monitor-flow-connectors {
    inset: 0;
    height: 390px;
  }

  .runtime-monitor-flow-network > [data-runtime-flow-node="plugin"] {
    min-height: 112px;
  }

  .runtime-monitor-flow-network > [data-runtime-flow-node="admin"] {
    min-height: 228px;
  }

  .runtime-monitor-flow-network > [data-runtime-flow-node="enterprise"],
  .runtime-monitor-flow-network > [data-runtime-flow-node="workbench"] {
    min-height: 198px;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-flow-network {
    display: grid;
    min-height: 0;
    padding: 0;
    transform: none;
  }

  .runtime-monitor-flow-network > .runtime-monitor-flow-node {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    min-height: 132px;
  }

  .runtime-monitor-flow-network > [data-runtime-flow-node="plugin"] {
    min-height: 112px;
  }

  .runtime-monitor-flow-network > [data-runtime-flow-node="admin"] {
    min-height: 216px;
  }
}

/* Keep compact node identity badges intact inside the admin shell's narrower canvas. */
.runtime-monitor-flow-node-head {
  gap: 6px;
}

.runtime-monitor-flow-code {
  flex: 0 0 auto;
  white-space: nowrap;
}

.runtime-monitor-flow-status {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}

/* Keep project overview labels and values on separate rows. */
.project-detail-summary-panel .summary-item {
  display: grid;
  align-content: start;
  gap: 8px;
}

.project-detail-summary-panel .summary-item-label,
.project-detail-summary-panel .summary-item-value {
  display: block;
}

.project-detail-summary-panel .summary-item-value {
  margin-top: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Keep the project identity visible while its long session table scrolls. */
.project-detail-page .content-view:has(.enterprise-detail-title-row) > .project-detail-toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  margin-bottom: 18px;
  background: var(--header-bg);
}

.project-detail-page .content-view:has(.enterprise-detail-title-row) > .detail-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.project-detail-page .content-view:has(.enterprise-detail-title-row) > .detail-shell > .project-detail-summary-panel {
  overflow: visible;
  overscroll-behavior: auto;
}

.project-detail-page .content-view:has(.enterprise-detail-title-row) > .detail-shell > .project-detail-sessions-panel {
  min-height: 0;
  overflow: auto;
}

.project-detail-page .project-detail-toolbar .page-toolbar-copy,
.project-detail-page .project-detail-toolbar .enterprise-detail-title-row > h2 {
  display: block;
}

.project-detail-page .project-detail-toolbar .enterprise-detail-title-row {
  display: flex;
  min-width: 0;
}

.project-detail-page .project-detail-toolbar .enterprise-detail-title-row > h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Runtime resource blocks and rolling WebSocket sparklines. */
.runtime-monitor-hierarchy-shell {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--runtime-screen-line);
  border-top: 3px solid #0f766e;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(76, 86, 104, 0.08);
}

.runtime-monitor-hierarchy-head {
  background: rgba(240, 253, 250, 0.72);
}

.runtime-monitor-hierarchy-enterprises {
  gap: 18px;
  padding: 14px;
}

.runtime-monitor-hierarchy-enterprise,
.runtime-monitor-unassigned-workbenches {
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.25);
  border-left: 3px solid #0f766e;
  border-radius: 6px;
  background: #fff;
}

.runtime-monitor-unassigned-workbenches {
  border-left-color: #d97706;
}

.runtime-monitor-hierarchy-enterprise-head,
.runtime-monitor-unassigned-workbenches > header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.2);
  background: #f8fafc;
}

.runtime-monitor-hierarchy-enterprise-head::before {
  display: none;
}

.runtime-monitor-unassigned-workbenches > header > div,
.runtime-monitor-projects > header > div,
.runtime-monitor-project-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.runtime-monitor-unassigned-workbenches > header span,
.runtime-monitor-projects > header span,
.runtime-monitor-project-head span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 4px;
  color: #475569;
  font-size: 9px;
  font-weight: 900;
}

.runtime-monitor-unassigned-workbenches > header strong,
.runtime-monitor-projects > header strong,
.runtime-monitor-project-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--runtime-screen-text);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-unassigned-workbenches > header em,
.runtime-monitor-projects > header em,
.runtime-monitor-project-head > em {
  margin-left: auto;
  color: var(--runtime-screen-muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.runtime-monitor-enterprise-overview {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.18);
  background: rgba(240, 253, 250, 0.3);
}

.runtime-monitor-hierarchy-workbenches {
  gap: 14px;
  padding: 14px;
}

.runtime-monitor-hierarchy-workbenches::before,
.runtime-monitor-hierarchy-workbench::before {
  display: none;
}

.runtime-monitor-hierarchy-workbench {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

.runtime-monitor-hierarchy-workbench-name {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.18);
  background: rgba(239, 246, 255, 0.58);
}

.runtime-monitor-workbench-sequence {
  display: grid;
}

.runtime-monitor-entity-resource {
  display: grid;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.18);
  background: #fff;
}

.runtime-monitor-entity-resource > header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.runtime-monitor-entity-resource > header > div {
  min-width: 0;
}

.runtime-monitor-entity-resource > header strong,
.runtime-monitor-entity-resource > header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-entity-resource > header strong {
  color: var(--runtime-screen-text);
  font-size: 12px;
  font-weight: 900;
}

.runtime-monitor-entity-resource > header small {
  margin-top: 3px;
  color: var(--runtime-screen-muted);
  font-size: 10px;
  font-weight: 700;
}

.runtime-monitor-entity-resource > header em {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.runtime-monitor-entity-resource > header em > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.runtime-monitor-entity-resource.is-healthy > header em > i {
  background: #059669;
}

.runtime-monitor-entity-resource.is-warning > header em > i {
  background: #d97706;
}

.runtime-monitor-entity-resource.is-critical > header em > i {
  background: #dc2626;
}

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

.runtime-monitor-resource-chart {
  display: grid;
  grid-template-rows: auto 46px auto;
  gap: 7px;
  min-width: 0;
  min-height: 112px;
  padding: 9px 10px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 5px;
  background: #f8fafc;
}

.runtime-monitor-resource-chart > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.runtime-monitor-resource-chart > div:first-child span,
.runtime-monitor-resource-chart > div:first-child strong,
.runtime-monitor-resource-chart > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-resource-chart > div:first-child span {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

.runtime-monitor-resource-chart > div:first-child strong {
  color: #172033;
  font-size: 12px;
  font-weight: 900;
}

.runtime-monitor-resource-chart > small {
  color: #8490a3;
  font-size: 9px;
  font-weight: 700;
}

.runtime-monitor-sparkline {
  position: relative;
  width: 100%;
  height: 46px;
  min-width: 0;
  overflow: hidden;
}

.runtime-monitor-sparkline svg {
  display: block;
  width: 100%;
  height: 46px;
}

.runtime-monitor-sparkline path {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

[data-runtime-resource="cpu"] .runtime-monitor-sparkline path {
  stroke: #dc2626;
}

[data-runtime-resource="memory"] .runtime-monitor-sparkline path {
  stroke: #7c3aed;
}

[data-runtime-resource="network"] .runtime-monitor-sparkline path {
  stroke: #0284c7;
}

[data-runtime-resource="disk"] .runtime-monitor-sparkline path,
[data-runtime-resource="io"] .runtime-monitor-sparkline path {
  stroke: #d97706;
}

.runtime-monitor-sparkline > span {
  position: absolute;
  right: 0;
  bottom: 0;
  color: #94a3b8;
  font-size: 8px;
  font-weight: 800;
}

.runtime-monitor-sparkline.is-empty {
  border-bottom: 1px dashed rgba(148, 163, 184, 0.5);
}

.runtime-monitor-projects {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
}

.runtime-monitor-projects > header,
.runtime-monitor-project-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.runtime-monitor-project-list,
.runtime-monitor-container-list {
  display: grid;
  gap: 10px;
}

.runtime-monitor-project-block {
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 5px;
  background: #fff;
}

.runtime-monitor-project-head {
  padding: 11px 13px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.18);
}

.runtime-monitor-project-head small {
  overflow: hidden;
  color: var(--runtime-screen-muted);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-container-list {
  padding: 0 12px 12px;
}

.runtime-monitor-container-list .runtime-monitor-entity-resource {
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 5px;
  background: rgba(248, 250, 252, 0.72);
}

.runtime-monitor-command-center {
  margin-top: 18px;
  border-top-color: #64748b;
}

.runtime-monitor-summary-item .runtime-monitor-sparkline {
  height: 34px;
}

.runtime-monitor-summary-item .runtime-monitor-sparkline svg {
  height: 34px;
}

.runtime-monitor-flow-node > .runtime-monitor-sparkline {
  height: 28px;
}

.runtime-monitor-flow-node > .runtime-monitor-sparkline svg {
  height: 28px;
}

.runtime-monitor-flow-resources .runtime-monitor-sparkline {
  height: 24px;
}

.runtime-monitor-flow-resources .runtime-monitor-sparkline svg {
  height: 24px;
}

@media (max-width: 1100px) {
  .runtime-monitor-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .runtime-monitor-hierarchy-enterprises,
  .runtime-monitor-hierarchy-workbenches,
  .runtime-monitor-enterprise-overview,
  .runtime-monitor-projects {
    padding-right: 8px;
    padding-left: 8px;
  }

  .runtime-monitor-resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-entity-resource > header {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .runtime-monitor-entity-resource > header em {
    grid-column: 2;
    white-space: normal;
  }

  .runtime-monitor-hierarchy-enterprise-head,
  .runtime-monitor-unassigned-workbenches > header,
  .runtime-monitor-project-head {
    flex-wrap: wrap;
  }

  .runtime-monitor-hierarchy-enterprise-head > em,
  .runtime-monitor-unassigned-workbenches > header > em,
  .runtime-monitor-project-head > em {
    flex-basis: 100%;
    margin-left: 46px;
  }
}

/* Keep one visible surface per content group. Layout and interaction wrappers
   stay in the DOM, while the table, item, editor, upload, or resource leaf
   remains the only bordered block. */
.table-shell:has(> .empty-state),
.table-shell:has(> .admin-skeleton),
.control-plane-push-history:has(.control-plane-push-table-scroll > .empty-state),
.control-plane-push-history:has(.control-plane-push-table-scroll > .admin-skeleton),
.checkbox-grid:has(> .empty-state) {
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.detail-panel > .panel-head h2 {
  flex: 0 0 auto;
  overflow-wrap: normal;
  white-space: nowrap;
}

.detail-panel > .panel-head .enterprise-detail-panel-actions {
  flex: 1 1 auto;
  width: auto;
  justify-content: flex-end;
  justify-items: end;
  justify-self: stretch;
}

#enterpriseGitlabPanel > .panel-head {
  justify-content: flex-end;
}

#enterpriseGitlabPanel > .panel-head h2 {
  display: none;
}

#enterpriseGitlabPanel > .panel-head .table-actions {
  width: auto;
  justify-content: flex-end;
}

#enterpriseStorageResourceList,
.storage-detail-table-shell {
  width: 100%;
  max-width: 100%;
  margin-right: 0;
  margin-left: 0;
}

.storage-table-counts:has(.storage-table-count-grid) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.bootstrap-overview-card:has(.summary-item),
.workbench-bootstrap-modal-card .gitlab-modal-result,
.workbench-runtime-upgrade-status-card:has(.workbench-runtime-upgrade-steps),
.workbench-runtime-upgrade-steps,
.token-sync-doc,
.token-sync-logs,
.contract-return-panel,
.release-step-band {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bootstrap-overview-card:has(.summary-item),
.workbench-bootstrap-modal-card .gitlab-modal-result,
.workbench-runtime-upgrade-status-card:has(.workbench-runtime-upgrade-steps),
.token-sync-doc,
.token-sync-logs,
.contract-return-panel {
  padding: 0;
}

.workbench-runtime-upgrade-steps {
  padding-right: 0;
  padding-left: 0;
}

.enterprise-runtime-upgrade-workspace {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.enterprise-runtime-machine-list {
  background: transparent;
}

.system-summary-card,
.system-model-list-section,
.rules-editor-card,
.rules-enterprise-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.content-view:has(.admin-system-tabs) .system-model-grid > .system-model-list-section {
  grid-column: span 3;
  min-width: 0;
}

.runtime-monitor-hierarchy-shell,
.runtime-monitor-hierarchy-enterprise,
.runtime-monitor-unassigned-workbenches,
.runtime-monitor-hierarchy-workbench,
.runtime-monitor-project-block,
.runtime-monitor-command-center,
.runtime-monitor-command-center > .runtime-monitor-summary {
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
  backdrop-filter: none;
}

.runtime-monitor-projects {
  background: transparent;
}

.runtime-monitor-command-center,
.runtime-monitor-command-center > .runtime-monitor-summary {
  padding: 0;
}

@media (max-width: 980px) {
  .content-view:has(.admin-system-tabs) .system-model-grid > .system-model-list-section {
    grid-column: auto;
  }
}

.project-detail-sessions-panel > .table-shell {
  overflow-x: auto;
}

.project-session-table {
  min-width: 1325px;
  table-layout: fixed;
}

.project-session-table > thead > tr > th,
.project-session-table > tbody > .project-session-row > td {
  box-sizing: border-box;
}

.project-session-table > thead > tr > th:nth-child(1),
.project-session-table > tbody > .project-session-row > td:nth-child(1) {
  width: 300px;
}

.project-session-table > thead > tr > th:nth-child(2),
.project-session-table > tbody > .project-session-row > td:nth-child(2) {
  width: 165px;
}

.project-session-table > thead > tr > th:nth-child(3),
.project-session-table > tbody > .project-session-row > td:nth-child(3) {
  width: 125px;
}

.project-session-table > thead > tr > th:nth-child(4),
.project-session-table > tbody > .project-session-row > td:nth-child(4) {
  width: 220px;
}

.project-session-table > thead > tr > th:nth-child(5),
.project-session-table > tbody > .project-session-row > td:nth-child(5) {
  width: 185px;
}

.project-session-table > thead > tr > th:nth-child(6),
.project-session-table > tbody > .project-session-row > td:nth-child(6) {
  width: 225px;
}

.project-session-table > thead > tr > th:nth-child(7),
.project-session-table > tbody > .project-session-row > td:nth-child(7) {
  width: 125px;
}

.runtime-monitor-command-center > .runtime-monitor-summary {
  position: static;
  margin-top: 12px;
}

/* Expand infrastructure directly inside the topology canvas. */
.runtime-monitor-flow-canvas:has(.runtime-monitor-component-map.is-expanded) {
  min-height: 0;
  overflow: auto;
}

.runtime-monitor-flow-canvas .runtime-monitor-component-map.is-expanded {
  min-height: 0;
  padding: 54px 16px 16px;
  overflow: visible;
}

.runtime-monitor-component-map.is-expanded .runtime-monitor-flow-network.is-expanded {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  min-height: 0;
  gap: 20px;
  padding: 0;
  transform: none;
}

.runtime-monitor-flow-root-node,
.runtime-monitor-flow-support-nodes,
.runtime-monitor-flow-expanded-hierarchy {
  min-width: 0;
  zoom: var(--runtime-flow-zoom, 1);
}

.runtime-monitor-flow-root-node {
  position: relative;
  width: 100%;
  padding-bottom: 20px;
}

.runtime-monitor-flow-root-node::after,
.runtime-monitor-flow-expanded-hierarchy::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  height: 20px;
  background: rgba(91, 127, 198, 0.5);
}

.runtime-monitor-flow-root-node > .runtime-monitor-flow-node,
.runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  min-height: 0;
}

.runtime-monitor-flow-root-node .runtime-monitor-flow-resources {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.runtime-monitor-flow-expanded-hierarchy {
  position: relative;
  padding: 20px 0 24px;
  border-top: 1px solid rgba(91, 127, 198, 0.28);
}

.runtime-monitor-flow-expanded-hierarchy::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #5b7fc6;
  transform: translate(-50%, -50%);
}

.runtime-monitor-flow-expanded-hierarchy > .runtime-monitor-hierarchy-enterprises {
  gap: 20px;
  padding: 0;
}

.runtime-monitor-flow-expanded-hierarchy .runtime-monitor-hierarchy-enterprise,
.runtime-monitor-flow-expanded-hierarchy .runtime-monitor-unassigned-workbenches {
  border-left: 2px solid #0f766e;
  background: rgba(255, 255, 255, 0.56);
}

.runtime-monitor-flow-expanded-hierarchy .runtime-monitor-unassigned-workbenches {
  border-left-color: #d97706;
}

.runtime-monitor-flow-expanded-hierarchy .runtime-monitor-hierarchy-workbench {
  margin-left: 18px;
  border-left: 2px solid rgba(59, 130, 246, 0.56);
  background: rgba(255, 255, 255, 0.5);
}

.runtime-monitor-flow-expanded-hierarchy .runtime-monitor-project-block {
  border-left: 2px solid rgba(100, 116, 139, 0.36);
}

.runtime-monitor-flow-support-nodes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(91, 127, 198, 0.28);
}

.runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node::after,
.runtime-monitor-flow-root-node > .runtime-monitor-flow-node::after {
  display: none;
}

.runtime-monitor-flow-network.is-expanded .runtime-monitor-flow-connectors {
  display: none;
}

@media (max-width: 1100px) {
  .runtime-monitor-flow-root-node .runtime-monitor-flow-resources {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .runtime-monitor-flow-canvas .runtime-monitor-component-map.is-expanded {
    padding: 14px 8px 8px;
  }

  .runtime-monitor-flow-root-node,
  .runtime-monitor-flow-support-nodes,
  .runtime-monitor-flow-expanded-hierarchy {
    zoom: 1;
  }

  .runtime-monitor-flow-root-node .runtime-monitor-flow-resources,
  .runtime-monitor-flow-support-nodes {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-monitor-flow-expanded-hierarchy .runtime-monitor-hierarchy-workbench {
    margin-left: 8px;
  }
}

/* Independent runtime topology nodes. Structural wrappers stay transparent;
   connector strokes carry enterprise and runtime relationships. */
.runtime-monitor-flow-canvas:has(.runtime-monitor-component-map.is-topology) {
  min-height: 0;
  overflow: auto;
}

.runtime-monitor-flow-canvas .runtime-monitor-component-map.is-topology {
  min-height: 0;
  padding: 54px 18px 22px;
  overflow: visible;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology {
  --runtime-topology-node-width: 280px;
  --runtime-topology-link-gap: 56px;
  --runtime-topology-half-link-gap: 28px;
  --runtime-topology-port-y: 32px;
  display: grid;
  grid-template-columns: var(--runtime-topology-node-width) max-content;
  grid-template-rows: auto auto;
  align-items: start;
  width: max-content;
  min-width: max-content;
  min-height: 0;
  gap: 0 var(--runtime-topology-link-gap);
  padding: 0;
  transform: none;
  zoom: var(--runtime-flow-zoom, 1);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node,
.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes,
.runtime-monitor-component-map.is-topology .runtime-monitor-topology-hierarchy,
.runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-branches,
.runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-graph,
.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-branches,
.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph,
.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk,
.runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
.runtime-monitor-component-map.is-topology .runtime-monitor-project-graph,
.runtime-monitor-component-map.is-topology .runtime-monitor-container-branches,
.runtime-monitor-component-map.is-topology .runtime-monitor-unassigned-graph {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  zoom: 1;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  width: var(--runtime-topology-node-width);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node::after {
  content: "";
  position: absolute;
  top: var(--runtime-topology-port-y);
  right: calc(-1 * var(--runtime-topology-link-gap));
  bottom: auto;
  left: auto;
  width: var(--runtime-topology-link-gap);
  height: 1px;
  background: rgba(72, 105, 167, 0.66);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 50%;
  height: 52px;
  border-right: 1px solid rgba(72, 105, 167, 0.5);
  border-bottom: 1px solid rgba(72, 105, 167, 0.5);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node > .runtime-monitor-flow-node,
.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node {
  position: relative;
  top: auto;
  left: auto;
  width: var(--runtime-topology-node-width);
  min-height: 0;
  border-radius: 6px;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node > .runtime-monitor-flow-node::after,
.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node::after {
  display: none;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node .runtime-monitor-flow-resources {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-hierarchy {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: max-content;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-branches,
.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-branches,
.runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
.runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
  position: relative;
  display: grid;
  align-content: start;
  gap: 28px;
  width: max-content;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-branches::before,
.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-branches::before,
.runtime-monitor-component-map.is-topology .runtime-monitor-project-branches::before,
.runtime-monitor-component-map.is-topology .runtime-monitor-container-branches::before {
  content: "";
  position: absolute;
  top: var(--runtime-topology-port-y);
  bottom: var(--runtime-topology-port-y);
  left: calc(-1 * var(--runtime-topology-half-link-gap));
  width: 1px;
  background: rgba(72, 105, 167, 0.5);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-graph,
.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph,
.runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
  position: relative;
  display: grid;
  grid-template-columns: var(--runtime-topology-node-width) max-content;
  align-items: start;
  gap: var(--runtime-topology-link-gap);
  width: max-content;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph {
  grid-template-columns: max-content max-content;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-graph::before,
.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph::before,
.runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::before,
.runtime-monitor-component-map.is-topology .runtime-monitor-container-node::before,
.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node::before {
  content: "";
  position: absolute;
  top: var(--runtime-topology-port-y);
  left: calc(-1 * var(--runtime-topology-half-link-gap));
  display: block;
  width: var(--runtime-topology-half-link-gap);
  height: 1px;
  background: rgba(72, 105, 167, 0.58);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk {
  display: grid;
  grid-template-columns: repeat(3, var(--runtime-topology-node-width));
  align-items: start;
  gap: var(--runtime-topology-link-gap);
  width: max-content;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node {
  position: relative;
  box-sizing: border-box;
  width: var(--runtime-topology-node-width);
  min-width: var(--runtime-topology-node-width);
  overflow: visible;
  border: 1px solid rgba(100, 116, 139, 0.25);
  border-left: 3px solid #8b9bb4;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(72, 88, 118, 0.1);
  transition: opacity 160ms ease, transform 160ms ease;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.is-healthy {
  border-left-color: var(--runtime-screen-healthy);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.is-warning {
  border-left-color: var(--runtime-screen-warning);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.is-critical {
  border-left-color: var(--runtime-screen-critical);
}

/* Runtime topology type colors make the ownership chain scannable at a glance;
   the left edge remains reserved for health tone while the top edge and surface
   identify the node kind. */
.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-enterprise-node {
  --runtime-node-accent: #0f766e;
  --runtime-node-surface: rgba(240, 253, 250, 0.96);
  border-top-color: var(--runtime-node-accent);
  background: var(--runtime-node-surface);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-workbench-node {
  --runtime-node-accent: #2563eb;
  --runtime-node-surface: rgba(239, 246, 255, 0.96);
  border-top-color: var(--runtime-node-accent);
  background: var(--runtime-node-surface);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-agent-node {
  --runtime-node-accent: #059669;
  --runtime-node-surface: rgba(236, 253, 245, 0.96);
  border-top-color: var(--runtime-node-accent);
  background: var(--runtime-node-surface);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-gateway-node {
  --runtime-node-accent: #d97706;
  --runtime-node-surface: rgba(255, 251, 235, 0.96);
  border-top-color: var(--runtime-node-accent);
  background: var(--runtime-node-surface);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-project-node {
  --runtime-node-accent: var(--runtime-project-accent, #4f46e5);
  --runtime-node-surface: rgba(238, 242, 255, 0.96);
  border-top-color: var(--runtime-node-accent);
  background: var(--runtime-node-surface);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-container-node {
  --runtime-node-accent: #0891b2;
  --runtime-node-surface: rgba(236, 254, 255, 0.96);
  border-top-color: var(--runtime-node-accent);
  background: var(--runtime-node-surface);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-enterprise-node > header > .runtime-monitor-hierarchy-fact-code {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(204, 251, 241, 0.72);
  color: #0f766e;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-workbench-node > header > .runtime-monitor-hierarchy-fact-code {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(219, 234, 254, 0.78);
  color: #1d4ed8;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-agent-node > header > .runtime-monitor-hierarchy-fact-code {
  border-color: rgba(5, 150, 105, 0.3);
  background: rgba(209, 250, 229, 0.78);
  color: #047857;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-gateway-node > header > .runtime-monitor-hierarchy-fact-code {
  border-color: rgba(217, 119, 6, 0.3);
  background: rgba(254, 243, 199, 0.78);
  color: #b45309;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-project-node > header > .runtime-monitor-hierarchy-fact-code {
  border-color: var(--runtime-project-accent, rgba(79, 70, 229, 0.3));
  background: rgba(224, 231, 255, 0.82);
  color: var(--runtime-project-accent, #4338ca);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.runtime-monitor-container-node > header > .runtime-monitor-hierarchy-fact-code {
  border-color: rgba(8, 145, 178, 0.3);
  background: rgba(207, 250, 254, 0.82);
  color: #0e7490;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-node[data-runtime-flow-node="admin"] {
  --runtime-node-accent: #be123c;
  --runtime-node-surface: rgba(255, 241, 242, 0.96);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-node[data-runtime-flow-node="codex"] {
  --runtime-node-accent: #7c3aed;
  --runtime-node-surface: rgba(245, 243, 255, 0.96);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-node[data-runtime-flow-node="plugin"] {
  --runtime-node-accent: #c2410c;
  --runtime-node-surface: rgba(255, 247, 237, 0.96);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node > .runtime-monitor-flow-node[data-runtime-flow-node="admin"],
.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node[data-runtime-flow-node="codex"],
.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node[data-runtime-flow-node="plugin"] {
  border-top: 3px solid var(--runtime-node-accent);
  background: var(--runtime-node-surface);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node > .runtime-monitor-flow-node[data-runtime-flow-node="admin"] {
  --runtime-node-accent: #be123c;
  --runtime-node-surface: rgba(255, 241, 242, 0.96);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node[data-runtime-flow-node="codex"] {
  --runtime-node-accent: #7c3aed;
  --runtime-node-surface: rgba(245, 243, 255, 0.96);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node[data-runtime-flow-node="plugin"] {
  --runtime-node-accent: #c2410c;
  --runtime-node-surface: rgba(255, 247, 237, 0.96);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-node[data-runtime-flow-node="admin"] .runtime-monitor-flow-code {
  border-color: rgba(190, 18, 60, 0.3);
  background: rgba(254, 205, 211, 0.76);
  color: #be123c;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-node[data-runtime-flow-node="codex"] .runtime-monitor-flow-code {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(221, 214, 254, 0.78);
  color: #6d28d9;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-node[data-runtime-flow-node="plugin"] .runtime-monitor-flow-code {
  border-color: rgba(194, 65, 12, 0.3);
  background: rgba(254, 215, 170, 0.78);
  color: #c2410c;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node.is-dimmed {
  opacity: 0.25;
  transform: scale(0.985);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node > header a,
.runtime-monitor-component-map.is-topology .runtime-monitor-topology-node > header strong {
  display: block;
  overflow: hidden;
  color: var(--runtime-node-accent, var(--runtime-screen-text));
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-node > strong {
  color: var(--runtime-node-accent, var(--runtime-screen-text));
}

.runtime-monitor-component-map.is-topology .runtime-monitor-resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-resource-chart {
  grid-template-rows: auto 34px auto;
  min-height: 84px;
  padding: 7px 5px 5px;
  border: 0;
  border-top: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 0;
  background: transparent;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-resource-chart .runtime-monitor-sparkline,
.runtime-monitor-component-map.is-topology .runtime-monitor-resource-chart .runtime-monitor-sparkline svg {
  height: 34px;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-node::after,
.runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-topology-node:not(:last-child)::after,
.runtime-monitor-component-map.is-topology .runtime-monitor-gateway-node::after,
.runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after {
  content: "";
  position: absolute;
  top: var(--runtime-topology-port-y);
  right: calc(-1 * var(--runtime-topology-link-gap));
  display: block;
  width: var(--runtime-topology-link-gap);
  height: 1px;
  background: rgba(72, 105, 167, 0.66);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  display: grid;
  gap: 24px;
  width: var(--runtime-topology-node-width);
  margin-top: 52px;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes::before {
  content: "";
  position: absolute;
  top: var(--runtime-topology-port-y);
  bottom: var(--runtime-topology-port-y);
  left: 0;
  width: 1px;
  background: rgba(72, 105, 167, 0.5);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node {
  margin-left: var(--runtime-topology-half-link-gap);
}

.runtime-monitor-component-map.is-topology .runtime-monitor-topology-empty,
.runtime-monitor-component-map.is-topology .runtime-monitor-hierarchy-empty {
  width: var(--runtime-topology-node-width);
  padding: 14px;
  border: 1px dashed rgba(100, 116, 139, 0.3);
  border-radius: 6px;
  color: var(--runtime-screen-muted);
  background: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 800;
}

.runtime-monitor-component-map.is-topology .runtime-monitor-unassigned-graph {
  position: relative;
  width: max-content;
}

@media (max-width: 720px) {
  .runtime-monitor-flow-canvas .runtime-monitor-component-map.is-topology {
    padding: 14px 8px 8px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology,
  .runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-graph,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk,
  .runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-hierarchy,
  .runtime-monitor-component-map.is-topology .runtime-monitor-unassigned-graph {
    grid-template-columns: minmax(0, 1fr);
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    min-width: 0;
    gap: 20px;
    zoom: 1;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology {
    --runtime-topology-node-width: 100%;
    display: grid;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes,
  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node > .runtime-monitor-flow-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node {
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes {
    grid-column: 1;
    grid-row: auto;
    margin: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node {
    margin-left: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-branches::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-branches::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-graph::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-node::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node::before {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-root-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-topology-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes > .runtime-monitor-flow-node::after {
    content: "";
    position: absolute;
    top: auto;
    right: auto;
    bottom: -21px;
    left: 50%;
    display: block;
    width: 1px;
    height: 20px;
    background: rgba(72, 105, 167, 0.58);
    transform: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-support-nodes {
    gap: 20px;
  }
}

.runtime-monitor-topology-columns {
  display: none;
}

/* Desktop topology uses one stable column for every component kind. Horizontal
   movement expresses ownership; repeated siblings only extend vertically. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology {
    --runtime-topology-node-width: 240px;
    --runtime-topology-link-gap: 32px;
    --runtime-topology-half-link-gap: 16px;
    position: relative;
    min-width: calc(var(--runtime-topology-node-width) * 7 + var(--runtime-topology-link-gap) * 6);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns {
    position: absolute;
    top: -36px;
    left: 0;
    display: grid;
    grid-template-columns: repeat(7, var(--runtime-topology-node-width));
    gap: var(--runtime-topology-link-gap);
    width: max-content;
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > span {
    display: flex;
    align-items: center;
    min-height: 24px;
    border-bottom: 2px solid rgba(100, 116, 139, 0.24);
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > span::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 7px;
    border-radius: 50%;
    background: #8b9bb4;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > [data-runtime-topology-column="admin"]::before {
    background: #be123c;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > [data-runtime-topology-column="enterprise"]::before {
    background: #0f766e;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > [data-runtime-topology-column="workbench"]::before {
    background: #2563eb;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > [data-runtime-topology-column="agent"]::before {
    background: #059669;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > [data-runtime-topology-column="gateway"]::before {
    background: #d97706;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > [data-runtime-topology-column="project"]::before {
    background: #4f46e5;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns > [data-runtime-topology-column="container"]::before {
    background: #0891b2;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-enterprise-graph {
    grid-template-columns: var(--runtime-topology-node-width) max-content;
    gap: var(--runtime-topology-link-gap);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    grid-template-columns: max-content;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-branches {
    gap: 28px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph {
    grid-template-columns: max-content max-content;
    gap: var(--runtime-topology-link-gap);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk {
    grid-template-columns: repeat(3, var(--runtime-topology-node-width));
    grid-template-rows: auto;
    gap: var(--runtime-topology-link-gap);
    min-height: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-workbench-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-agent-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-gateway-node {
    grid-row: 1;
    top: 0;
    left: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-workbench-node {
    grid-column: 1;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-agent-node {
    grid-column: 2;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-gateway-node {
    grid-column: 3;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    gap: 20px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    grid-template-columns: var(--runtime-topology-node-width) max-content;
    gap: var(--runtime-topology-link-gap);
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-node {
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
    margin: 0;
  }

.runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    gap: 14px;
  }
}

/* Projects and containers belong below each workbench. Each resource kind gets
   its own horizontal row so the workbench remains the visual parent. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-flow-network.is-topology {
    min-width: calc(var(--runtime-topology-node-width) * 5 + var(--runtime-topology-link-gap) * 4);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-topology-columns {
    grid-template-columns: repeat(5, var(--runtime-topology-node-width));
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph {
    display: grid;
    grid-template-columns: max-content;
    gap: 18px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk {
    grid-template-columns: repeat(3, var(--runtime-topology-node-width));
    grid-template-rows: auto;
    gap: var(--runtime-topology-link-gap);
    min-height: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-workbench-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-agent-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-gateway-node {
    grid-row: 1;
    top: 0;
    left: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-workbench-node {
    grid-column: 1;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-agent-node {
    grid-column: 2;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-gateway-node {
    grid-column: 3;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-trunk > .runtime-monitor-gateway-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-node::before {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-descendants {
    position: relative;
    display: grid;
    gap: 12px;
    width: max-content;
    min-width: calc(132px + var(--runtime-topology-node-width) * 3 + var(--runtime-topology-link-gap) * 2);
    padding-top: 18px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-descendants::before {
    content: "";
    position: absolute;
    top: -18px;
    bottom: 0;
    left: calc(var(--runtime-topology-node-width) / 2);
    width: 1px;
    background: rgba(72, 105, 167, 0.58);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row {
    position: relative;
    display: grid;
    grid-template-columns: 120px max-content;
    gap: 12px;
    align-items: start;
    min-height: var(--runtime-topology-port-y);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row::before {
    content: "";
    position: absolute;
    top: var(--runtime-topology-port-y);
    left: calc(var(--runtime-topology-node-width) / 2);
    width: 12px;
    height: 1px;
    background: rgba(72, 105, 167, 0.58);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-row-label {
    position: relative;
    z-index: 1;
    padding-top: 8px;
    color: var(--runtime-screen-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--runtime-topology-node-width);
    grid-template-rows: auto;
    gap: 14px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    position: relative;
    display: block;
    width: var(--runtime-topology-node-width);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after {
    content: "";
    position: absolute;
    top: 100%;
    right: auto;
    bottom: auto;
    left: 50%;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    position: relative;
    display: grid;
    grid-template-columns: var(--runtime-topology-node-width);
    grid-auto-rows: max-content;
    gap: 14px;
    align-content: start;
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before {
    content: "";
    position: absolute;
    top: -12px;
    bottom: 0;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-topology-empty {
    position: relative;
    z-index: 1;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches::before {
    display: none;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-descendants {
    display: grid;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-descendants::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row::before {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-row-label {
    padding-top: 10px;
    font-size: 10px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    gap: 14px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }
}

/* Keep each project's containers in one aligned column group. The project
   track spans the same number of container tracks, so the center branch and
   each container's vertical stub stay tied to the owning project. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: flex;
    flex-flow: row nowrap;
    align-items: start;
    gap: 14px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width));
    gap: 0 14px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after {
    top: 100%;
    left: 50%;
    width: 1px;
    height: 12px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width));
    grid-auto-flow: column;
    grid-auto-rows: max-content;
    gap: 14px;
    align-content: start;
    position: relative;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before {
    top: -12px;
    bottom: auto;
    left: 50%;
    width: 1px;
    height: 12px;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::after {
    content: "";
    position: absolute;
    top: -12px;
    left: calc(var(--runtime-topology-node-width) / 2);
    z-index: 0;
    display: block;
    width: calc(100% - var(--runtime-topology-node-width));
    height: 1px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node::before {
    content: "";
    position: absolute;
    top: -12px;
    right: auto;
    bottom: auto;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: auto;
    gap: 14px;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1;
    justify-self: stretch;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-rows: max-content;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node::before {
    display: none;
  }
}

/* Final topology override: each project is followed by its own container row. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: grid;
    gap: 24px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: grid;
    gap: 12px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row {
    position: relative;
    display: grid;
    grid-template-columns: 120px max-content;
    gap: 12px;
    align-items: start;
    min-height: var(--runtime-topology-port-y);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: grid;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: flex;
    flex-flow: row nowrap;
    align-items: start;
    gap: 14px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width));
    column-gap: 14px;
    row-gap: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width));
    grid-auto-flow: column;
    grid-auto-rows: max-content;
    gap: 14px;
    align-content: start;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::after {
    content: "";
    position: absolute;
    top: -12px;
    left: calc(var(--runtime-topology-node-width) / 2);
    z-index: 0;
    display: block;
    width: calc(100% - var(--runtime-topology-node-width));
    height: 1px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node {
    position: relative;
    z-index: 1;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: grid;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: grid;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    gap: 14px;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1;
    justify-self: stretch;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-rows: max-content;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node::before {
    display: none;
  }
}

/* Keep each project beside its containers so the ownership line starts at the
   project node and fans across the directly adjacent container nodes. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    display: flex;
    flex-flow: row nowrap;
    align-items: start;
    gap: 20px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    position: relative;
    display: grid;
    grid-template-columns: var(--runtime-topology-node-width) max-content;
    grid-template-rows: auto;
    align-items: start;
    gap: var(--runtime-topology-link-gap);
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1;
    grid-row: 1;
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after {
    content: "";
    position: absolute;
    top: var(--runtime-topology-port-y);
    right: calc(-1 * var(--runtime-topology-link-gap));
    display: block;
    width: var(--runtime-topology-link-gap);
    height: 1px;
    background: rgba(72, 105, 167, 0.66);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-flow: row nowrap;
    align-items: start;
    gap: 14px;
    width: max-content;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::before {
    content: "";
    position: absolute;
    top: var(--runtime-topology-port-y);
    right: 0;
    left: 0;
    z-index: 0;
    display: block;
    height: 1px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node {
    position: relative;
    z-index: 1;
    flex: 0 0 var(--runtime-topology-node-width);
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node::before {
    display: none;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node::before {
    display: none;
  }
}

/* Keep project runtime identity and its live container sample as two scannable lines. */
.project-runtime-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-runtime-container-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.project-runtime-container-name {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-runtime-container-metrics {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 7px;
  min-width: 0;
}

.project-runtime-container-metric {
  white-space: nowrap;
}

.project-runtime-container-row.is-unavailable {
  color: var(--muted);
}

.project-runtime-container-row.is-unavailable .project-runtime-container-name {
  color: var(--muted);
}

/* Final project/container topology: each workbench keeps separate resource
   rows, while matching project and container groups share the same columns. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-graph {
    display: grid;
    grid-template-columns: max-content;
    gap: 18px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row {
    position: relative;
    display: grid;
    grid-template-columns: 120px max-content;
    gap: 12px;
    align-items: start;
    min-height: var(--runtime-topology-port-y);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: grid;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: flex;
    flex-flow: row nowrap;
    align-items: start;
    gap: 14px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width));
    column-gap: 14px;
    row-gap: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after {
    content: "";
    position: absolute;
    top: 100%;
    right: auto;
    bottom: auto;
    left: 50%;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after {
    display: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width));
    grid-auto-flow: column;
    grid-auto-rows: max-content;
    gap: 14px;
    align-content: start;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before {
    content: "";
    position: absolute;
    top: -12px;
    right: auto;
    bottom: auto;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::after {
    content: "";
    position: absolute;
    top: -12px;
    left: calc(var(--runtime-topology-node-width) / 2);
    z-index: 0;
    display: block;
    width: calc(100% - var(--runtime-topology-node-width));
    height: 1px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node {
    position: relative;
    z-index: 1;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node::before {
    content: "";
    position: absolute;
    top: -12px;
    right: auto;
    bottom: auto;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: grid;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    gap: 14px;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1;
    justify-self: stretch;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-rows: max-content;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node::before {
    display: none;
  }
}

/* Batch 80 final cascade: enterprise certificate and filing controls. */
#enterpriseList .enterprise-domain-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
  align-items: center;
}

#enterpriseList .enterprise-domain-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  color: #34415d;
  font-weight: 750;
}

#enterpriseList .enterprise-domain-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-content: center;
  justify-items: stretch;
  width: 104px;
  min-width: 104px;
  padding-left: 10px;
  border-left: 1px solid rgba(126, 139, 168, 0.16);
}

#enterpriseList .enterprise-https-action,
#enterpriseList .enterprise-filing-action {
  box-sizing: border-box;
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  min-height: 30px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 11px;
  line-height: 1;
}

#enterpriseList .enterprise-https-action.is-installed,
#enterpriseList .enterprise-filing-action.is-configured {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(59, 159, 120, 0.12);
}

.enterprise-certificate-modal-card {
  width: min(640px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  border: 1px solid rgba(139, 159, 207, 0.34);
  border-radius: 12px;
  background: var(--surface-strong);
  box-shadow: 0 24px 70px rgba(76, 93, 133, 0.24), var(--shadow-soft);
}

.enterprise-certificate-modal-card > .modal-head {
  padding: 20px 24px 16px;
  background: rgba(248, 250, 255, 0.96);
  border-bottom: 1px solid rgba(126, 139, 168, 0.16);
}

.enterprise-certificate-modal-card > .modal-head h2 {
  color: #303743;
  font-size: 20px;
  line-height: 1.3;
}

.enterprise-certificate-modal-card > .stack-form {
  box-sizing: border-box;
  gap: 16px;
  padding: 20px 24px 24px;
  background: var(--surface-strong);
}

.enterprise-certificate-modal-card .certificate-domain-row {
  min-height: 44px;
  padding: 10px 14px;
  border-color: rgba(126, 139, 168, 0.2);
  border-radius: 8px;
  background: var(--field-bg);
}

.enterprise-certificate-modal-card .certificate-domain-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.enterprise-certificate-modal-card .enterprise-certificate-upload-zone {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  gap: 12px 16px;
  padding: 16px;
  border-color: rgba(126, 149, 207, 0.42);
  border-radius: 10px;
  background: rgba(247, 249, 255, 0.8);
}

.enterprise-certificate-modal-card .enterprise-certificate-upload-zone:hover,
.enterprise-certificate-modal-card .enterprise-certificate-upload-zone:focus-visible,
.enterprise-certificate-modal-card .enterprise-certificate-upload-zone.is-drag-over {
  border-color: rgba(111, 143, 220, 0.72);
  background: rgba(239, 244, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(111, 143, 220, 0.12);
}

.enterprise-certificate-modal-card .enterprise-icon-upload-copy {
  min-width: 0;
  gap: 4px;
}

.enterprise-certificate-modal-card .enterprise-icon-upload-copy strong {
  color: #303743;
  font-size: 13px;
  line-height: 1.45;
}

.enterprise-certificate-modal-card .enterprise-icon-upload-copy p {
  color: #7a879d;
  font-size: 12px;
  line-height: 1.5;
}

.enterprise-certificate-modal-card #chooseEnterpriseCertificateBtn {
  min-width: 116px;
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 750;
}

.enterprise-certificate-modal-card .enterprise-certificate-upload-zone > .hint {
  padding-top: 2px;
  color: #7a879d;
  font-size: 12px;
}

.enterprise-certificate-modal-card .enterprise-filing-panel {
  gap: 12px;
  padding: 18px;
  border-color: rgba(126, 139, 168, 0.2);
  border-radius: 10px;
  background: rgba(246, 249, 255, 0.78);
}

.enterprise-certificate-modal-card .enterprise-filing-head {
  gap: 5px;
  padding-bottom: 2px;
}

.enterprise-certificate-modal-card .enterprise-filing-head h3 {
  color: #303743;
  font-size: 16px;
  font-weight: 850;
}

.enterprise-certificate-modal-card .enterprise-filing-head p {
  max-width: 52ch;
  color: #7a879d;
  font-size: 12px;
  line-height: 1.55;
}

.enterprise-certificate-modal-card .enterprise-filing-panel .field {
  gap: 6px;
}

.enterprise-certificate-modal-card .enterprise-filing-panel .field span {
  color: #7a879d;
  font-size: 12px;
  font-weight: 700;
}

.enterprise-certificate-modal-card .enterprise-filing-panel .field input {
  min-height: 40px;
  padding-right: 12px;
  padding-left: 12px;
  font-size: 12px;
}

.enterprise-certificate-modal-card .enterprise-filing-actions {
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(126, 139, 168, 0.16);
}

.enterprise-certificate-modal-card .enterprise-filing-actions .hint {
  color: #7a879d;
  font-size: 12px;
  font-weight: 700;
}

.enterprise-certificate-modal-card #saveEnterpriseFilingBtn {
  min-width: 104px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 750;
}

.enterprise-certificate-modal-card > .stack-form > .modal-actions {
  margin-top: 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(126, 139, 168, 0.2);
  background: var(--surface-strong);
}

.enterprise-certificate-modal-card > .stack-form > .modal-actions button {
  min-width: 104px;
  min-height: 38px;
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 720px) {
  #enterpriseList .enterprise-domain-cell {
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 8px;
  }

  #enterpriseList .enterprise-domain-actions {
    width: 100px;
    min-width: 100px;
    padding-left: 8px;
  }

  #enterpriseList .enterprise-https-action,
  #enterpriseList .enterprise-filing-action {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .enterprise-certificate-modal-card {
    width: min(640px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .enterprise-certificate-modal-card > .modal-head {
    padding: 16px 18px 14px;
  }

  .enterprise-certificate-modal-card > .stack-form {
    gap: 14px;
    padding: 16px 18px 18px;
  }

  .enterprise-certificate-modal-card .enterprise-certificate-upload-zone {
    grid-template-columns: minmax(0, 1fr);
  }

  .enterprise-certificate-modal-card #chooseEnterpriseCertificateBtn,
  .enterprise-certificate-modal-card #saveEnterpriseFilingBtn {
    width: 100%;
  }

  .enterprise-certificate-modal-card .enterprise-filing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .enterprise-certificate-modal-card > .stack-form > .modal-actions {
    flex-wrap: wrap;
  }

  .enterprise-certificate-modal-card > .stack-form > .modal-actions button {
    flex: 1 1 120px;
  }
}

/* Canonical project-pair layout. This is intentionally last so generated
   legacy topology rules cannot merge a project's containers into its row. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: grid !important;
    gap: 24px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: grid !important;
    gap: 12px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row {
    display: grid !important;
    grid-template-columns: 120px max-content !important;
    gap: 12px;
    align-items: start;
    min-height: var(--runtime-topology-port-y);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: grid !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: flex !important;
    flex-flow: row nowrap;
    align-items: start;
    gap: 14px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width)) !important;
    column-gap: 14px;
    row-gap: 0;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    justify-self: center;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after {
    display: none !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(var(--runtime-project-column-count), var(--runtime-topology-node-width)) !important;
    grid-auto-flow: column;
    grid-auto-rows: max-content;
    gap: 14px;
    align-content: start;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::after {
    content: "";
    position: absolute;
    top: -12px;
    left: calc(var(--runtime-topology-node-width) / 2);
    z-index: 0;
    display: block;
    width: calc(100% - var(--runtime-topology-node-width));
    height: 1px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node {
    position: relative;
    z-index: 1;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 0;
    display: block;
    width: 1px;
    height: 12px;
    background: rgba(72, 105, 167, 0.58);
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: grid !important;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: grid !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-branches {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row;
    gap: 14px;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row;
    grid-auto-rows: max-content;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::before,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-container-project-group > .runtime-monitor-container-node::before {
    display: none !important;
  }
}

/* Current topology: each project and its Docker containers share one row. */
@media (min-width: 721px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: grid !important;
    gap: 24px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: block !important;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-projects {
    display: grid !important;
    grid-template-columns: 120px max-content !important;
    gap: 12px;
    align-items: start;
    min-height: var(--runtime-topology-port-y);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: none !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    display: flex !important;
    flex-flow: row nowrap;
    align-items: start;
    gap: 20px;
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    position: relative;
    display: grid !important;
    grid-template-columns: var(--runtime-topology-node-width) max-content !important;
    grid-template-rows: auto;
    align-items: start;
    gap: var(--runtime-topology-link-gap);
    width: max-content;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after {
    content: "";
    position: absolute;
    top: var(--runtime-topology-port-y);
    right: calc(-1 * var(--runtime-topology-link-gap));
    display: block;
    width: var(--runtime-topology-link-gap);
    height: 1px;
    background: rgba(72, 105, 167, 0.66);
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    position: relative;
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-flow: row nowrap;
    align-items: start;
    gap: 14px;
    width: max-content;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::before {
    content: "";
    position: absolute;
    top: var(--runtime-topology-port-y);
    right: 0;
    left: 0;
    z-index: 0;
    display: block;
    height: 1px;
    background: rgba(72, 105, 167, 0.66);
    pointer-events: none;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches > .runtime-monitor-container-node {
    position: relative;
    z-index: 1;
    flex: 0 0 var(--runtime-topology-node-width);
    width: var(--runtime-topology-node-width);
    min-width: var(--runtime-topology-node-width);
  }
}

@media (max-width: 720px) {
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pairs {
    display: grid !important;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-pair {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-workbench-resource-row.is-containers {
    display: none !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-branches {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-project-node {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100%;
    min-width: 0;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-node::after,
  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches::before {
    display: none !important;
  }

  .runtime-monitor-component-map.is-topology .runtime-monitor-project-graph > .runtime-monitor-container-branches {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    min-width: 0;
  }
}
