.command-screen {
  background:var(--surface-subtle);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:20px;
}
.command-header {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;margin-bottom:12px}
.command-heading {text-align:center;min-width:0}
.command-heading h2 {font-size:22px;line-height:32px;color:var(--ink);margin:0}
.command-heading p {font-size:11px;line-height:20px;color:var(--muted);margin:6px 0 0}
.command-live {display:inline-flex;align-items:center;gap:7px;color:var(--green);border:1px solid #bbdfc8;border-radius:20px;background:#f0fdf4;padding:5px 9px;font-size:11px;justify-self:start;white-space:nowrap}
.command-live i {width:6px;height:6px;border-radius:50%;background:currentColor}
.command-live.stale {color:var(--amber);border-color:#fed7aa;background:#fff7ed}
.command-clock-area {justify-self:end;text-align:right;min-width:0}
.command-clock-area time {font-size:12px;font-variant-numeric:tabular-nums;color:var(--muted)}
.command-header-actions {display:flex;gap:6px;justify-content:flex-end;margin-top:6px}
.command-screen .command-header-actions .icon-btn,.command-screen .command-header-actions .btn {color:var(--text);border-color:var(--line);background:var(--surface)}
.command-screen .command-header-actions .icon-btn:hover,.command-screen .command-header-actions .btn:hover {background:var(--primary-soft)}
.command-update {display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;line-height:18px;color:var(--muted);margin-bottom:14px;min-height:20px;flex-wrap:wrap;overflow-wrap:anywhere}
.command-update:has(strong) {justify-content:flex-start;color:var(--amber)}
.command-update strong {font-weight:500}
.command-update .icon {width:14px;height:14px;flex-shrink:0}
.command-screen .command-stats {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.command-screen .screen-stat,.command-screen .screen-panel {background:var(--surface);border:1px solid var(--line);border-radius:8px}
.command-screen .screen-stat {padding:10px 8px;gap:4px;min-height:108px}
.command-screen .screen-stat small {font-size:12px;line-height:18px;color:var(--muted)}
.command-screen .screen-stat b {font-size:25px;line-height:34px;font-weight:500;color:var(--primary-ink);white-space:nowrap;font-variant-numeric:tabular-nums}
.command-screen .screen-stat.amber b {color:var(--amber)}
.command-screen .screen-stat em {font-size:10px;line-height:17px;color:var(--muted);overflow-wrap:anywhere}
.command-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr);gap:10px;margin-top:14px;min-height:600px}
.command-stack {display:grid;grid-template-rows:minmax(240px,1fr) minmax(260px,1fr);gap:10px;min-width:0}
.command-screen .screen-panel {padding:15px;min-width:0;overflow:hidden}
.command-panel-head {display:flex;justify-content:space-between;align-items:flex-start;gap:8px;flex-wrap:wrap;margin-bottom:14px;flex-shrink:0}
.command-screen .command-panel-head h3 {font-size:13px;line-height:20px;font-weight:600;margin:0;color:var(--ink)}
.command-panel-head>span {font-size:10px;line-height:20px;color:var(--muted)}
.command-trend {position:relative;display:flex;flex-direction:column}
.command-chart {position:relative;flex:1;min-height:160px}
.command-chart canvas {position:absolute;inset:0;display:block;width:100%;height:100%}
.command-chart-empty {font-size:12px;text-align:center;color:var(--muted);margin:10px 0 0}
.command-screen ol {padding:0;margin:0;list-style:none}
.command-calls ol {display:grid;align-content:start;gap:7px}
.command-calls,.command-ranking {display:flex;flex-direction:column}
.command-calls ol,.command-ranking ol {flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable}
.command-call {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;border:1px solid var(--line);border-radius:5px;background:var(--surface-subtle);padding:8px;color:var(--text);text-decoration:none;font-size:11px;line-height:18px}
.command-call:hover {border-color:var(--primary-border);background:var(--primary-soft)}
.command-call time {color:var(--muted);font-variant-numeric:tabular-nums}
.command-call>span {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.command-call strong {font-weight:500;color:var(--green);font-variant-numeric:tabular-nums}
.command-call.failed strong {color:var(--red)}
.command-topology-panel {display:flex;flex-direction:column}
.command-topology {flex:1;position:relative;min-height:420px;border:1px solid var(--line);border-radius:8px;background:var(--surface-subtle)}
.command-topology canvas {position:absolute;inset:0;display:block;width:100%;height:100%}
.command-hub {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:86px;height:86px;border:2px solid var(--primary);border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;background:var(--primary-soft);color:var(--primary-ink);pointer-events:none}
.command-hub .icon {width:24px;height:24px}
.command-hub strong {font-size:11px}
.command-node {position:absolute;display:flex;align-items:center;gap:5px;transform:translate(-50%,-50%);padding:5px 7px;border:1px solid #cbd5e1;border-radius:16px;background:var(--surface);color:var(--ink);font-size:10px;line-height:16px;width:100px;text-decoration:none}
.command-node[hidden] {display:none}
.command-node:hover {border-color:var(--primary);background:var(--primary-soft)}
.command-node i {width:7px;height:7px;flex-shrink:0;border-radius:50%;background:var(--muted)}
.command-node.running i {background:var(--green)}
.command-node.abnormal i {background:var(--red)}
.command-node>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.command-topology-empty {position:absolute;bottom:20px;left:0;right:0;text-align:center;color:var(--muted);font-size:12px}
.command-legend {display:flex;justify-content:center;flex-wrap:wrap;gap:8px 12px;font-size:10px;line-height:18px;margin-top:12px;color:var(--muted)}
.command-legend span {display:inline-flex;align-items:center;gap:5px}
.command-legend span:before {content:"";width:6px;height:6px;border-radius:50%;background:var(--muted)}
.command-legend .hub:before {background:var(--primary)}
.command-legend .running:before {background:var(--green)}
.command-legend .abnormal:before {background:var(--red)}
.command-ranking li+li {margin-top:17px}
.command-ranking li>div {display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;line-height:18px;margin-bottom:6px}
.command-ranking li span {white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.command-ranking a {color:var(--ink);text-decoration:none}
.command-ranking a:hover {color:var(--primary-ink);text-decoration:underline}
.command-ranking b {color:var(--primary-ink);font-weight:500;font-variant-numeric:tabular-nums}
.command-ranking progress {display:block;width:100%;height:6px;border:0;border-radius:4px;appearance:none;overflow:hidden;background:var(--line);color:var(--primary)}
.command-ranking progress::-webkit-progress-bar {background:var(--line)}
.command-ranking progress::-webkit-progress-value {background:var(--primary);border-radius:4px}
.command-ranking progress::-moz-progress-bar {background:var(--primary)}
.command-health {display:flex;flex-direction:column}
.command-health-rings {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:14px;flex-shrink:0}
.command-health-item {min-width:0;text-align:center;color:var(--green)}
.command-health-item.amber {color:var(--amber)}
.command-health-item.violet {color:#6d28d9}
.command-ring {position:relative;width:64px;height:64px;max-width:100%;aspect-ratio:1;margin:0 auto 7px}
.command-ring svg {display:block;width:100%;height:100%;transform:rotate(-90deg)}
.command-ring circle {fill:none;stroke-width:7}
.command-ring .ring-track {stroke:var(--line)}
.command-ring .ring-value {stroke:currentColor}
.command-ring b {position:absolute;inset:0;display:grid;place-items:center;font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.command-health-item>span {display:block;color:var(--muted);font-size:10px;line-height:16px;overflow-wrap:anywhere}
.command-alerts {flex:1;max-height:250px;overflow:auto;min-height:0;scrollbar-gutter:stable}
.command-alert {display:flex;align-items:center;gap:8px;padding:9px 8px;border:1px solid #fde68a;border-radius:5px;background:#fffbeb;text-decoration:none;color:var(--ink);font-size:11px;line-height:17px}
.command-alert+.command-alert {margin-top:6px}
.command-alert:hover {background:#fef3c7}
.command-alert>b {color:var(--amber);font-weight:500;flex-shrink:0}
.command-alert.error {border-color:#fda29b;background:#fff1f0}
.command-alert.error:hover {background:#fee4e2}
.command-alert.error>b {color:var(--red)}
.command-alert>span {min-width:0;flex:1}
.command-alert strong {display:block;font-weight:500;overflow-wrap:anywhere}
.command-alert small {display:block;color:var(--text);font-size:10px;overflow-wrap:anywhere}
.command-alert>.icon {width:13px;height:13px;flex-shrink:0}
.command-screen .empty {min-height:100px;padding:18px 8px;color:var(--muted)}
.command-screen .empty .icon {color:var(--muted)}
.command-screen .empty p {font-size:12px;line-height:20px;color:var(--muted)}
.command-screen a:focus-visible,.command-screen button:focus-visible,.command-alerts:focus-visible,.command-screen ol:focus-visible {outline:2px solid var(--primary);outline-offset:3px}
.command-screen:fullscreen {display:flex;flex-direction:column;padding:24px;overflow:auto}
.command-screen:fullscreen #command-content {display:flex;flex-direction:column;flex:1}
.command-screen:fullscreen .command-grid {flex:1}
.command-standalone-page .sidebar,.command-standalone-page .topbar,.command-standalone-page .workspace-footer {display:none}
.command-standalone-page .workspace {margin:0}
.command-standalone-page .content {padding:0}
.command-standalone {min-height:100vh;border-radius:0;border:0;display:flex;flex-direction:column}
.command-standalone #command-content {flex:1;display:flex;flex-direction:column}
.command-standalone .command-grid {flex:1}
@media(min-width:1201px) {
  .command-standalone {height:100dvh;min-height:720px}
  .command-screen:fullscreen #command-content,.command-standalone #command-content {min-height:0}
  .command-screen:fullscreen .command-grid,.command-standalone .command-grid {min-height:0}
  .command-screen:fullscreen .command-stack,.command-standalone .command-stack {min-height:0;grid-template-rows:minmax(0,1fr) minmax(0,1fr)}
  .command-screen:fullscreen .command-topology,.command-standalone .command-topology {min-height:0}
}
@media(min-width:1900px) {
  .command-screen {padding:28px}
  .command-grid {min-height:760px;gap:14px}
  .command-stack {gap:14px}
  .command-screen .screen-panel {padding:20px}
  .command-screen .command-panel-head h3 {font-size:16px}
  .command-panel-head>span,.command-screen .screen-stat em,.command-legend {font-size:12px}
  .command-call,.command-alert {font-size:13px;padding:11px}
  .command-node {font-size:12px;width:112px}
}
@media(min-width:1201px) and (max-height:800px) {
  .command-screen {padding:16px}
  .command-screen .screen-panel {padding:12px}
  .command-panel-head {margin-bottom:8px}
  .command-screen .command-panel-head h3 {font-size:13px}
  .command-panel-head>span {font-size:10px}
  .command-chart {min-height:120px}
  .command-ranking li+li {margin-top:8px}
  .command-ranking li>div {font-size:11px;line-height:16px;margin-bottom:4px}
  .command-ranking progress {height:5px}
  .command-health-rings {margin-bottom:10px}
  .command-ring {width:52px;height:52px;margin-bottom:5px}
  .command-ring b {font-size:13px}
  .command-call,.command-alert {font-size:11px;padding:8px}
}
@media(max-width:1200px) {
  .command-header {grid-template-columns:1fr auto}
  .command-heading {grid-column:1/-1;grid-row:1}
  .command-live {grid-column:1;grid-row:2}
  .command-clock-area {grid-column:2;grid-row:2}
  .command-grid {grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
  .command-grid>.command-stack:last-child {grid-column:1/-1;grid-template-columns:1fr 1fr;grid-template-rows:330px}
  .command-screen .command-stats {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px) {
  .command-screen {padding:12px}
  .command-heading h2 {font-size:17px;line-height:26px}
  .command-heading p {font-size:9px}
  .command-live {font-size:10px;padding:3px 7px}
  .command-clock-area time {font-size:10px}
  .command-update {font-size:10px}
  .command-grid {grid-template-columns:1fr}
  .command-grid>.command-stack:last-child {grid-column:auto;grid-template-columns:1fr;grid-template-rows:270px 360px}
  .command-stack {grid-template-rows:260px auto}
  .command-calls {min-height:160px}
  .command-screen .command-stats {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .command-screen .screen-stat b {font-size:23px}
  .command-screen .screen-stat {min-height:108px}
  .command-screen .screen-panel {padding:12px}
  .command-topology {min-height:380px}
  .command-topology-panel {grid-row:1}
  .command-node {width:92px;font-size:10px}
  .command-screen:fullscreen {padding:12px}
}
