/* Shared Portal shell: compact navigation, fixed section tabs, quiet surfaces. */
.portal-page { --ink:#202832; --muted:#6b7583; --line:#e1e5eb; --paper:#f5f6f8; --surface:#fff; --surface-raised:#eef1f5; --accent:#28745a; color:var(--ink); background:var(--paper); }
.portal-page .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
:root[data-theme="dark"] .portal-page { --ink:#e5e9ef; --muted:#99a4b2; --line:#2c333d; --paper:#101419; --surface:#181e25; --surface-raised:#222b35; --accent:#8bd5b5; }
.portal-shell { --navigation-width:60px; }
.portal-shell[data-navigation="expanded"] { --navigation-width:202px; }
.portal-shell > .sidebar { background:var(--surface); padding:14px 8px; border-right:1px solid var(--line); }
:root[data-theme="dark"] .portal-shell > .sidebar { background:var(--surface); }
.portal-shell .brand { height:36px; min-height:36px; padding:0 4px; font-size:17px; gap:10px; }
.portal-shell .brand-mark { width:32px; height:32px; font-size:24px; border-radius:9px; }
.portal-shell .brand-name { letter-spacing:-.5px; }
.sidebar-brand-row { display:flex; align-items:center; justify-content:space-between; gap:3px; min-height:36px; }
.sidebar-brand-row .brand { min-width:0; }
.portal-shell[data-navigation="compact"] .sidebar-brand-row { justify-content:center; }
.portal-shell[data-navigation="compact"] .sidebar-toggle { display:none; }
.portal-shell[data-navigation="expanded"] .sidebar-brand-row .sidebar-toggle { display:flex; width:24px; min-width:24px; height:28px; min-height:28px; padding:3px; }
.sidebar-brand-row .sidebar-toggle svg { width:18px; height:18px; }
.portal-shell nav#navigation { flex:0 1 auto; overflow:visible; margin-top:28px; display:grid; gap:8px; }
.portal-shell .nav-item { min-height:44px; height:44px; margin:0; padding:10px; border-radius:9px; color:var(--muted); }
.portal-shell .nav-item svg { width:20px; height:20px; }
.portal-shell .nav-item:hover,.portal-shell .rail-control:hover { background:var(--surface-raised); color:var(--ink); }
.portal-shell .nav-item.active,.portal-shell #open-settings.active { background:#e5f1eb; color:#21684d; box-shadow:none; }
:root[data-theme="dark"] .portal-shell .nav-item.active,:root[data-theme="dark"] .portal-shell #open-settings.active { background:#234034; color:#9ce4c1; }
.portal-shell .nav-item.active:after { display:none; }
.portal-shell .sidebar-bottom { margin-top:auto; padding-top:14px; }
.portal-shell .endpoint-card { display:none; }
.portal-shell .rail-control { color:var(--muted); padding:10px; border-radius:8px; }
.portal-shell #open-settings { width:100%; }
.portal-shell .topbar { position:sticky; top:0; z-index:15; height:64px; min-height:64px; padding:0 24px 0 16px; gap:16px; background:var(--surface); border-bottom:1px solid var(--line); }
.portal-shell .sidebar-toggle { margin:0; min-width:34px; width:34px; min-height:34px; height:34px; padding:7px; flex-shrink:0; }
.section-heading { display:flex; align-items:center; gap:26px; flex:1; min-width:0; height:100%; }
.portal-shell #section-tabs { display:flex; flex-direction:row; gap:22px; margin:0; height:100%; min-width:0; overflow-x:auto; scrollbar-width:none; align-items:stretch; }
.section-tab { position:relative; border:0; border-radius:0; background:transparent; color:var(--muted); padding:0; font-size:12px; white-space:nowrap; }
.section-tab.active { color:var(--ink); font-weight:650; }
.section-tab.active:after { content:""; position:absolute; height:2px; background:var(--accent); bottom:0; left:0; right:0; }
.section-tab:hover { color:var(--ink); }
.page-context:empty { display:none; }
.portal-shell .topbar:has(.page-context:not(:empty)) { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); }
.topbar:has(.page-context:not(:empty)) .section-heading { grid-column:1; }
.topbar:has(.page-context:not(:empty)) .page-context { grid-column:2; justify-self:center; }
.topbar:has(.page-context:not(:empty)) .topbar-right { grid-column:3; justify-self:end; }
.cluster-context { display:flex; align-items:center; justify-content:center; gap:11px; white-space:nowrap; font-size:10px; color:var(--muted); }
.cluster-context b { color:var(--ink); font-weight:600; }
.lab-context { display:flex; align-items:center; justify-content:center; gap:9px; white-space:nowrap; font-size:11px; }
.lab-context[hidden],.lab-context small[hidden] { display:none; }
.lab-toolbar { display:flex; align-items:center; justify-content:center; gap:8px; }
.portal-shell .lab-toolbar button { padding:7px 12px; white-space:nowrap; }
.lab-toolbar .lab-context { margin-left:6px; }
.lab-context strong { font-weight:500; }
.lab-context small { color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.lab-status-dot { width:6px; height:6px; flex:none; background:var(--muted); border-radius:50%; }
.lab-status-dot.running { background:#61b58f; }
.topbar-right { display:flex; align-items:center; gap:12px; flex-shrink:0; max-width:100%; min-width:0; }
#page-actions { display:flex; align-items:center; gap:8px; overflow-x:auto; max-width:44vw; scrollbar-width:none; }
#page-actions:empty { display:none; }
#page-actions button { flex-shrink:0; white-space:nowrap; }
.portal-shell .topbar .pill { display:none; }
.portal-shell .topbar .icon-button { width:32px; height:32px; min-width:32px; color:var(--muted); font-size:20px; }
.account-menu { position:relative; }
.account-menu > summary { list-style:none; cursor:pointer; border-radius:50%; }
.account-menu > summary::-webkit-details-marker { display:none; }
.account-menu .avatar { height:30px; width:30px; background:#e0eee7; color:#32624c; font-size:12px; }
.account-popover { position:absolute; top:45px; right:0; width:264px; border:1px solid var(--line); background:var(--surface); box-shadow:0 12px 35px #0002; border-radius:12px; padding:8px; }
.profile-details { padding:12px; border-bottom:1px solid var(--line); margin-bottom:6px; }
.profile-details strong { display:block; font-size:12px; overflow-wrap:anywhere; }
.profile-details small { display:block; font-size:11px; color:var(--muted); margin-top:5px; }
.account-popover > a { display:block; padding:10px 12px; border-radius:7px; font-size:12px; }
.account-popover > a:hover { background:var(--surface-raised); }
.portal-shell[data-navigation] .account-popover #signout { width:100%; display:flex; justify-content:flex-start; margin:0; padding:10px 12px; gap:8px; border:0; font-size:12px; }
.portal-shell[data-navigation] .account-popover #signout > span { display:inline; }
.portal-shell > main { height:100dvh; display:flex; flex-direction:column; overflow:hidden; }
.portal-shell .topbar { flex-shrink:0; }
.portal-shell .page { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; padding:16px 22px 12px; max-width:none; margin:0; }
.content-card { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
#content { flex:1; min-height:0; min-width:0; overflow:auto; }
.content-card > .error { flex-shrink:0; border-radius:0; border:0; border-bottom:1px solid var(--line); margin:0; }
.content-card[hidden] { display:none!important; }
#content > .panel,.content-card .two-col > .panel { border:0; border-radius:0; margin:0; box-shadow:none; background:transparent; }
#content > .panel + .panel { border-top:1px solid var(--line); }
.content-card .two-col { gap:0; margin:0; border-bottom:1px solid var(--line); }
.content-card .two-col > .panel:first-child { border-right:1px solid var(--line); }
.portal-shell[data-page="overview"] .stats { gap:0; margin:0; border-bottom:1px solid var(--line); }
.portal-shell[data-page="overview"] .stat { border:0; border-right:1px solid var(--line); border-radius:0; }
.portal-shell[data-page="overview"] .stat:last-child { border-right:0; }
.portal-shell .panel,.portal-shell .stat { background:var(--surface); border-color:var(--line); border-radius:10px; }
.portal-shell .panel-header { padding:17px 20px; }
.portal-shell .panel-header h2 { font-size:13px; }
.portal-shell .panel-header p { font-size:11px; }
.portal-shell .stat { padding:17px 20px; }
.portal-shell .stat-value { font-size:28px; margin:12px 0 6px; }
.portal-shell table { font-size:12px; }
.portal-shell th { background:var(--surface); color:var(--muted); font-size:9px; }
:root[data-theme="dark"] .portal-shell th { background:var(--surface-raised); }
.portal-shell td { padding:14px 20px; }
.portal-shell .panel p,.portal-shell .panel td .muted { font-size:11px; }
.portal-shell .page-footer { display:none; }
#testlab-view { flex:1; min-height:0; overflow:hidden; }
#testlab-view[hidden] { display:none!important; }
#testlab-host { height:100%; overflow:auto; }
.portal-shell[data-page="testlab"] .page-footer { display:none; }
.portal-shell[data-page="testlab"] .content-card { background:transparent; border:0; border-radius:0; }
.portal-shell .primary,.portal-shell .secondary { font-size:11px; padding:9px 13px; }
.portal-shell input,.portal-shell select,.portal-shell textarea { border-color:var(--line); }
.settings-panel { background:transparent; padding:0 26px; }
.settings-section { padding:26px 0; border-bottom:1px solid var(--line); }
.settings-section:last-child { border:0; }
.settings-section h2 { font-size:14px; margin:0 0 6px; }
.settings-section p { font-size:12px; margin:0 0 22px; }
.appearance-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; padding:0; border:0; margin:0; max-width:660px; }
.appearance-option { position:relative; border:1px solid var(--line); border-radius:10px; padding:10px; cursor:pointer; }
.appearance-option:has(:checked) { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.appearance-option input { position:absolute; right:10px; bottom:20px; width:14px; accent-color:#358363; }
.appearance-option strong { display:block; font-size:12px; margin:11px 0 3px; }
.appearance-option small { font-size:10px; color:var(--muted); display:block; padding-right:18px; }
.theme-preview { display:grid; grid-template-columns:17% 1fr; grid-template-rows:15px 1fr; height:86px; background:#f2f4f7; border:1px solid #dbe0e7; border-radius:6px; overflow:hidden; }
.theme-preview i:first-child { grid-row:span 2; background:#fff; border-right:1px solid #dbe0e7; }
.theme-preview i:nth-child(2) { background:#fff; border-bottom:1px solid #dbe0e7; }
.theme-preview i:nth-child(3) { margin:9px; border-radius:4px; border:1px solid #dbe0e7; background:#fff; }
.preview-dark { background:#101419; border-color:#323b47; }
.preview-dark i:first-child,.preview-dark i:nth-child(2),.preview-dark i:nth-child(3) { background:#202832; border-color:#323b47; }
.preview-system { background:linear-gradient(90deg,#f2f4f7 50%,#101419 50%); }
.preview-system i:nth-child(2),.preview-system i:nth-child(3) { background:linear-gradient(90deg,#fff 40%,#202832 40%); }
.settings-check { display:flex; align-items:center; gap:10px; font-size:12px; }
.settings-check input { width:16px; accent-color:#358363; }
.settings-panel code { padding:10px 12px; border:1px solid var(--line); border-radius:7px; display:inline-block; font-size:12px; overflow-wrap:anywhere; }
/* Serving workspaces use the fixed tabs as their page heading. */
.portal-shell:is([data-page="cluster"],[data-page="pipelines"],[data-page="metrics"]) .page-footer { display:none; }
.portal-shell[data-page="cluster"] #content { display:flex; overflow:hidden; }
.cluster-card { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; background:var(--surface); overflow:hidden; }
.cluster-toolbar { flex-wrap:nowrap; justify-content:center; }
.cluster-summary { height:66px; display:flex; align-items:center; justify-content:space-between; gap:16px; font-size:11px; }
.cluster-summary > div { display:flex; gap:12px; align-items:center; }
.cluster-summary strong { font-size:12px; font-weight:600; }
.cluster-summary span { color:var(--muted); }
.live-dot { width:6px; height:6px; background:#61b58f; border-radius:50%; }
.summary-separator { opacity:.4; }
.cluster-update { font-size:10px; }
.cluster-layout { flex:1; display:grid; grid-template-columns:218px minmax(300px,1fr) 306px; min-height:0; background:var(--surface); overflow:hidden; }
.cluster-directory { min-width:0; min-height:0; display:flex; flex-direction:column; border-right:1px solid var(--line); }
.cluster-panel-title { display:flex; padding:18px 16px 12px; align-items:center; justify-content:space-between; }
.cluster-layout h2 { margin:0; font-size:13px; letter-spacing:-.1px; }
.cluster-panel-title > span { background:var(--surface-raised); border-radius:5px; padding:3px 7px; font-size:10px; color:var(--muted); }
.node-search { margin:0 12px; }
.portal-shell .node-search input { width:100%; padding:9px 10px; border-radius:7px; margin:0; font-size:11px; background:var(--paper); }
.directory-filter { display:flex; align-items:center; justify-content:space-between; padding:14px 14px 8px; gap:6px; }
.directory-filter button { font-size:10px; background:transparent; border:0; color:var(--ink); padding:0; font-weight:600; }
.directory-filter > span { font-size:8px; color:var(--muted); }
.cluster-node-list { overflow-y:auto; min-height:0; padding:5px 8px 12px; }
.cluster-node-row { display:flex; align-items:center; text-align:left; width:100%; gap:9px; padding:11px 8px; margin:2px 0; border:1px solid transparent; background:transparent; color:var(--ink); border-radius:8px; }
.cluster-node-row:hover { background:var(--surface-raised); }
.cluster-node-row.selected { background:#edf5f1; border-color:#cee2d7; }
:root[data-theme="dark"] .cluster-node-row.selected { background:#21352f; border-color:#315849; }
.cluster-node-row > span:nth-child(2) { min-width:0; flex:1; }
.cluster-node-row strong { display:block; font-size:10px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cluster-node-row small { display:block; font-size:9px; color:var(--muted); margin-top:5px; }
.node-glyph { width:30px; height:32px; display:grid; place-items:center; background:var(--surface-raised); border-radius:7px; color:var(--muted); flex-shrink:0; }
.node-glyph svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.4; }
.node-glyph.reachable { color:var(--accent); }
.node-presence { width:5px; height:5px; border-radius:50%; background:#96a0ac; flex-shrink:0; }
.node-presence.online { background:#5baf88; }
.cluster-canvas-panel { position:relative; display:flex; min-width:0; min-height:0; flex-direction:column; overflow:hidden; background:var(--paper); container-type:inline-size; }
.cluster-activity-panel { position:absolute; right:12px; top:12px; bottom:120px; z-index:2; width:270px; max-width:calc(100% - 24px); overflow-y:auto; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 8px 24px #0002; padding:12px; }
.activity-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.cluster-activity-panel article { padding:12px 0; border-bottom:1px solid var(--line); }
.cluster-activity-panel strong { font-size:11px; display:block; overflow-wrap:anywhere; }
.cluster-activity-panel small { display:block; color:var(--muted); font-size:10px; margin-top:6px; }
.canvas-toolbar { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:12px 14px; }
.canvas-toolbar > div:first-child span { display:block; margin-top:5px; color:var(--muted); font-size:10px; }
.canvas-controls { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
#graph-zoom { color:var(--muted); font-size:9px; min-width:34px; text-align:center; }
.topology-svg { cursor:grab; }
.topology-svg:active { cursor:grabbing; }
.canvas-controls button { font-size:11px; min-width:28px; height:29px; padding:5px 7px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); }
.canvas-controls .connect-button { margin-left:5px; color:var(--accent); }
.graph-surface { position:relative; flex:1; min-height:250px; overflow:hidden; }
.topology-svg { position:absolute; inset:0; display:block; width:100%; height:100%; touch-action:none; }
#cluster-grid circle { fill:var(--line); }
.topology-edge { stroke:#bdcbd2; stroke-width:1.8; }
.topology-connection { cursor:pointer; outline:none; }
.topology-edge-hit { fill:transparent; stroke:none; pointer-events:all; }
.topology-connection:hover .topology-edge,.topology-connection:focus-visible .topology-edge,.topology-connection.selected .topology-edge { stroke:var(--accent); stroke-width:4; }
.departed-edge { stroke-dasharray:5 5; opacity:.45; }
.node-offline .node-shape { stroke-dasharray:4 3; opacity:.7; }
.node-offline .node-dot { fill:var(--muted); }
.connection-handle { fill:var(--surface); stroke:var(--accent); stroke-width:2; cursor:crosshair; }
.connection-handle:hover,.connection-handle:focus-visible { fill:var(--accent); stroke-width:3; outline:none; }
.pending-wire { stroke:var(--accent); stroke-width:2; stroke-dasharray:5 4; pointer-events:none; }
.graph-surface.node-drop-active { outline:2px dashed var(--accent); outline-offset:-4px; }
:root[data-theme="dark"] .topology-edge { stroke:#45555e; }
.topology-node { cursor:grab; outline:none; }
.topology-node:active { cursor:grabbing; }
.node-halo { fill:transparent; stroke:transparent; stroke-width:1.4; }
.node-shape { fill:var(--surface); stroke:#b7c9c0; stroke-width:1.5; }
:root[data-theme="dark"] .node-shape { stroke:#425849; }
.server-symbol { fill:none; stroke:var(--accent); stroke-width:1.5; stroke-linejoin:round; }
.node-dot { fill:#63b18b; stroke:var(--paper); stroke-width:3; }
.endpoint .node-shape { fill:#e0eee7; stroke:#5c9a7a; }
:root[data-theme="dark"] .endpoint .node-shape { fill:#214236; stroke:#78bc9a; }
.topology-node.selected .node-halo,.topology-node:focus-visible .node-halo { stroke:var(--accent); fill:#52a38109; }
.graph-node-name { font-size:12px; font-weight:600; fill:var(--ink); pointer-events:none; }
.graph-node-meta { font-size:10px; fill:var(--muted); pointer-events:none; }
.graph-task-owner,.graph-task-executor { font-size:11px; font-weight:600; fill:var(--muted); pointer-events:none; font-variant-numeric:tabular-nums; }
.graph-task-owner { fill:#397ec0; }
:root[data-theme="dark"] .graph-task-owner { fill:#8bc0ff; }
.graph-task-owner.unknown,.node-unknown .graph-task-executor { fill:var(--muted); }
.node-dispatching .node-shape { stroke:#6b9ed4; stroke-width:2; }
.node-executing .node-shape,.node-recent .node-shape { fill:#fff5df; stroke:#bb852d; stroke-width:2.4; }
:root[data-theme="dark"] :is(.node-executing,.node-recent) .node-shape { fill:#30291c; stroke:#efbc5c; }
.node-executing .graph-task-executor,.node-recent .graph-task-executor { fill:#a16d19; }
:root[data-theme="dark"] :is(.node-executing,.node-recent) .graph-task-executor { fill:#ffd166; }
.node-executing .node-dot,.node-recent .node-dot { fill:#efbc5c; }
.node-task-pulse { fill:none; stroke:#efbc5c; stroke-width:1.5; opacity:0; pointer-events:none; }
.node-task-pulse.task-completed { animation:cluster-task-completed 1.8s ease-out; transform-box:fill-box; transform-origin:center; }
@keyframes cluster-task-completed { 0% { opacity:.8; transform:scale(1); } 100% { opacity:0; transform:scale(2.6); } }
@media(prefers-reduced-motion:reduce) { .node-task-pulse.task-completed { animation:none; } }
.task-route { stroke:#6299d4; stroke-width:2.3; stroke-dasharray:6 5; fill:none; }
#cluster-task-arrow path { fill:#6299d4; }
.execution-row { padding:10px 0; border-bottom:1px solid var(--line); font-size:10px; }
.execution-row strong { display:block; font-size:10px; font-weight:500; overflow-wrap:anywhere; }
.execution-row small { display:block; color:var(--muted); font-size:9px; margin-top:6px; line-height:1.7; }
.execution-row code { overflow-wrap:anywhere; font-size:8px; }
.graph-legend { display:flex; justify-content:center; align-items:center; gap:13px; padding:14px 10px; font-size:9px; color:var(--muted); }
.graph-legend span { display:flex; gap:5px; align-items:center; }
.graph-legend i { width:6px; height:6px; border-radius:50%; background:#a4b9ad; }
.graph-legend .legend-endpoint { background:#4c9e76; }
.cluster-activity-strip { border-top:1px solid var(--line); display:grid; grid-template-columns:110px repeat(4,minmax(0,1fr)); padding:10px 14px; gap:10px; align-items:center; background:var(--surface); }
.cluster-rate-gauge { text-align:center; font-variant-numeric:tabular-nums; }
.cluster-rate-gauge svg { width:94px; height:54px; display:block; margin:auto; }
.cluster-rate-gauge path { fill:none; stroke-width:6; }
.cluster-rate-gauge .gauge-track { stroke:var(--line); }
.cluster-rate-gauge .gauge-value { stroke:var(--accent); }
.cluster-rate-gauge text { font-size:20px; font-weight:600; fill:var(--ink); text-anchor:middle; }
.cluster-rate-gauge small { color:var(--muted); font-size:9px; }
.cluster-activity-strip .inspector-metric strong { font-size:19px; }
@container(max-width:600px) { .cluster-activity-strip { grid-template-columns:100px 1fr 1fr; } .cluster-rate-gauge { grid-row:span 2; } .cluster-activity-strip .inspector-metric small { margin-bottom:4px; } }
.inspector-metric small { color:var(--muted); font-size:9px; display:block; margin-bottom:8px; }
.inspector-metric strong { display:block; font-size:23px; letter-spacing:-.6px; font-weight:600; }
.inspector-metric em { font-size:10px; font-weight:400; font-style:normal; color:var(--muted); padding-left:4px; letter-spacing:0; }
.cluster-inspector { border-left:1px solid var(--line); display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden; }
.inspector-heading { display:flex; gap:11px; align-items:center; padding:18px 18px 16px; }
.inspector-close { margin-left:auto; align-self:flex-start; border:0; background:transparent; color:var(--muted); font-size:18px; cursor:pointer; }
.cluster-layout.inspector-closed { grid-template-columns:218px minmax(300px,1fr); }
.cluster-layout.inspector-closed .cluster-inspector { display:none; }
.inspector-heading h2 { overflow-wrap:anywhere; }
.inspector-heading small { display:block; font-size:10px; color:var(--muted); margin-top:5px; }
.inspector-tabs { display:flex; gap:18px; padding:0 18px; border-bottom:1px solid var(--line); }
.inspector-tabs button { border:0; border-bottom:2px solid transparent; border-radius:0; padding:12px 0; background:transparent; color:var(--muted); font-size:10px; }
.inspector-tabs button.active { border-bottom-color:var(--accent); color:var(--ink); }
.inspector-tabs span { font-size:8px; }
.inspector-body { padding:18px; overflow-y:auto; min-height:0; }
.inspector-metrics { display:grid; grid-template-columns:1fr 1fr; gap:22px 12px; margin-bottom:22px; }
.detail-list { margin:12px 0; font-size:10px; }
.detail-list > div { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); }
.detail-list dt { color:var(--muted); min-width:0; overflow-wrap:anywhere; }
.detail-list dd { text-align:right; margin:0; max-width:65%; overflow-wrap:anywhere; }
.inspector-note { font-size:9px; line-height:1.7; color:var(--muted); margin-top:16px; }
.task-history { min-height:74px; border:1px solid var(--line); border-radius:7px; padding:10px 10px 0; color:var(--muted); font-size:8px; }
.task-history svg { display:block; width:100%; height:60px; }
.task-history polyline { fill:none; stroke:var(--accent); stroke-width:2; }
.inspector-body h3 { font-size:11px; font-weight:600; margin:22px 0 12px; }
.node-connections { border-top:1px solid var(--line); margin-top:20px; }
.node-connections h3 span { color:var(--muted); font-size:9px; margin-left:6px; }
.node-connections > div { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:9px; padding:8px 0; }
.disconnect-link { border:0; background:transparent; color:var(--muted); font-size:9px; padding:4px 0; }
.disconnect-link:hover { color:#b46555; }
.node-connections > .secondary { width:100%; margin-top:14px; }
.cluster-empty { color:var(--muted); font-size:10px; line-height:1.7; }
.provider-detail { border:1px solid var(--line); border-radius:8px; padding:13px; margin-bottom:12px; }
.provider-detail > div:first-child { display:flex; justify-content:space-between; gap:8px; align-items:start; }
.provider-detail strong { font-size:11px; overflow-wrap:anywhere; }
.provider-detail > small { font-size:9px; color:var(--muted); display:block; margin-top:8px; overflow-wrap:anywhere; }
.readiness { border:1px solid var(--line); border-radius:4px; color:var(--muted); padding:3px 5px; font-size:8px; flex-shrink:0; }
.readiness.ready { color:var(--accent); background:#58a17c0d; }
.capability-tags { display:flex; gap:4px; margin:12px 0 4px; flex-wrap:wrap; }
.capability-tags span { background:var(--surface-raised); color:var(--muted); border-radius:4px; font-size:8px; padding:4px 6px; }
.provider-detail .detail-list { font-size:9px; }
.provider-detail details { font-size:9px; color:var(--muted); }
.provider-detail code { display:block; font-size:8px; margin-top:10px; overflow-wrap:anywhere; }
.resource-row { border-bottom:1px solid var(--line); padding:11px 0; font-size:9px; display:flex; justify-content:space-between; gap:10px; }
.resource-row strong { font-weight:500; overflow-wrap:anywhere; min-width:0; }
.resource-row span { white-space:nowrap; color:var(--muted); }
.cluster-notice { font-size:11px; padding:10px 14px; border:1px solid var(--line); background:var(--surface); border-radius:8px; margin-bottom:10px; }
.cluster-notice.is-error,.connection-error { color:#be775c; }
.cluster-loading { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:65px 24px; text-align:center; color:var(--muted); font-size:12px; }
.connection-dialog label { display:block; font-size:12px; margin:16px 0; }
.connection-dialog select { display:block; width:100%; margin-top:8px; }
.connection-dialog h2 { font-size:20px; }
.connection-dialog p { font-size:12px; line-height:1.7; }
.connection-error { font-size:11px; }
.portal-shell:is([data-page="metrics"],[data-page="pipelines"]) #content { overflow:hidden; }
#observability-workspace { height:100%; min-height:0; min-width:0; }
.metric-workspace { display:grid; grid-template-columns:240px minmax(0,1fr); height:100%; min-height:0; }
.metric-picker { padding:0 18px 18px; border-right:1px solid var(--line); min-height:0; overflow:auto; }
.metric-picker label { display:block; font-size:11px; margin-top:18px; color:var(--muted); }
.metric-picker select,.metric-picker input { width:100%; display:block; margin-top:8px; font-size:11px; padding:9px; }
#metric-items { margin-top:18px; }
.metric-option { display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--line); padding:12px 0; font-size:11px; cursor:grab; }
.metric-option>span:first-child { flex:1; min-width:0; overflow-wrap:anywhere; }
.metric-drag-handle { color:var(--muted); font-size:17px; padding:0 5px; }
.metric-option:hover,.metric-option:focus-visible { color:var(--accent); }
#metric-message { color:var(--muted); font-size:10px; line-height:1.7; }
.metric-charts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:max-content; align-content:start; align-items:start; gap:18px; padding:18px; min-height:0; overflow:auto; }
.metric-charts.columns-1 { grid-template-columns:minmax(0,1fr); }
.metric-charts.columns-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.metric-cell { display:flex; flex-direction:column; height:400px; min-width:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); overflow:hidden; }
.metric-cell.selected { border-color:var(--accent); }
.metric-cell.drop-target { border-color:var(--accent); box-shadow:inset 0 0 0 2px var(--accent); }
.metric-cell>header { display:flex; flex-shrink:0; justify-content:space-between; padding:8px 12px; border-bottom:1px solid var(--line); }
.metric-cell>header button,.metric-legend button { background:transparent; border:0; color:var(--muted); padding:3px 6px; font-size:12px; }
.metric-cell>header button[aria-pressed="true"] { color:var(--accent); }
.metric-cell-plot { height:230px; flex-shrink:0; margin:14px 12px 0; min-width:0; }
.metric-cell-plot[hidden] { display:none; }
.metric-legend { flex:1; min-height:0; overflow:auto; padding:8px 12px; margin:0; list-style:none; }
.metric-legend li { display:flex; gap:8px; align-items:center; min-height:42px; font-size:11px; }
.metric-source { min-width:0; flex:1; overflow-wrap:anywhere; }
.metric-source small { display:block; font-size:9px; color:var(--muted); margin-top:4px; }
.metric-legend output { font-variant-numeric:tabular-nums; font-size:13px; }
.metric-swatch { width:8px; height:8px; border-radius:50%; background:var(--series-color); flex-shrink:0; }
.metric-color-0 { --series-color:#43a786; }.metric-color-1 { --series-color:#599ae6; }.metric-color-2 { --series-color:#d2953d; }.metric-color-3 { --series-color:#bb7fda; }.metric-color-4 { --series-color:#dd6c79; }.metric-color-5 { --series-color:#45a9b7; }.metric-color-6 { --series-color:#8caa44; }.metric-color-7 { --series-color:#bd825d; }
.metric-unavailable output { color:var(--muted); }
.metric-gauges { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); align-content:start; overflow:auto; gap:8px; }
.metric-gauge { height:180px; min-width:0; }
.metric-gauge canvas { display:block; }
.metric-tools { display:flex; gap:6px; align-items:center; white-space:nowrap; }
.portal-shell[data-page="metrics"] .topbar { padding-inline:20px; }
.metric-tools :is(button,select) { box-sizing:border-box; height:32px; min-height:32px; margin:0; padding:0 10px; border:1px solid var(--line); border-radius:5px; background:var(--surface-raised); color:var(--ink); font-size:10px; line-height:1.2; min-width:0; }
.metric-tools button { display:inline-flex; align-items:center; justify-content:center; }
.metric-tools select { width:auto; }
#metric-settings { width:32px; flex-shrink:0; padding:0; }
#metric-settings svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.metric-drop-hint,.metric-empty { color:var(--muted); font-size:12px; padding:20px; }
.metric-empty { grid-column:1/-1; }
.metric-cell:has(.metric-cell-plot[hidden]) .metric-legend { display:none; }
.metric-cell:has(.metric-cell-plot[hidden]) .metric-drop-hint { display:grid; place-items:center; flex:1; margin:0; }
.metric-settings-dialog { background:var(--surface); color:var(--ink); width:380px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; }
.metric-settings-dialog .dialog-header h2 { font-size:16px; }
.metric-settings-dialog .metric-dialog-close { display:grid; place-items:center; width:28px; height:28px; padding:0; border:0; background:transparent; color:var(--muted); font-size:22px; }
.metric-settings-dialog label { margin-bottom:16px; }
.metric-settings-dialog select { background:var(--paper); color:var(--ink); font-size:12px; padding:10px; }
.metric-settings-note { font-size:11px; color:var(--muted); line-height:1.7; margin:0; }
.metric-settings-scale { border:0; border-top:1px solid var(--line); padding:16px 0 0; margin:20px 0 0; min-width:0; }
.metric-settings-scale legend { color:var(--ink); font-size:12px; font-weight:600; padding-right:8px; }
.metric-scale-bounds { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.metric-scale-bounds[hidden] { display:none; }
.metric-scale-bounds input { width:100%; padding:10px; font-size:12px; }
.metric-settings-error { color:#db6976; font-size:11px; line-height:1.6; margin:0; }
.metric-settings-error:empty { display:none; }
.metric-cell .dygraph-legend { background:var(--surface-raised); color:var(--ink); border:1px solid var(--line); padding:8px; border-radius:5px; font-size:10px; max-width:100%; }
.metric-cell .dygraph-axis-label { color:var(--muted); font-size:10px; }
.settings-section>label[for="metrics-history"] { display:block; margin:0 0 12px; font-size:13px; }
#metrics-history { max-width:240px; }
.settings-section>.muted { max-width:620px; font-size:12px; line-height:1.8; margin-top:18px; }
@media(max-width:1200px) { .metric-charts.columns-3 { grid-template-columns:repeat(2,minmax(0,1fr)); } .portal-shell[data-page="metrics"] .topbar:has(.page-context:not(:empty)) { grid-template-columns:minmax(0,1fr) auto; } .portal-shell[data-page="metrics"] .topbar .page-context { grid-column:1; grid-row:2; justify-self:center; } .portal-shell[data-page="metrics"] .topbar .topbar-right { grid-column:2; grid-row:1; } .portal-shell[data-page="metrics"] .topbar { height:auto; min-height:88px; gap:8px; padding-bottom:8px; } }
@media(max-width:850px) { .metric-charts.columns-2,.metric-charts.columns-3 { grid-template-columns:minmax(0,1fr); } .metric-tools { gap:4px; } .metric-tools :is(button,select) { padding-inline:6px; font-size:10px; } .metric-tools #metric-settings { padding:0; } }
.metric-chart { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:18px; min-width:0; }
.metric-chart-heading { display:flex; justify-content:space-between; align-items:start; gap:12px; }
.metric-chart-heading h2 { font-size:13px; margin:0 0 6px; }
.metric-chart-heading small { color:var(--muted); font-size:10px; }
.metric-chart-heading button { background:transparent; border:0; color:var(--muted); font-size:18px; padding:0 3px; }
.metric-reading { font-size:27px; margin-top:20px; font-variant-numeric:tabular-nums; }
.metric-chart svg { width:100%; height:175px; margin-top:10px; }
.metric-chart svg text { fill:var(--muted); font-size:10px; }
.metric-chart polyline { stroke:var(--accent); fill:none; stroke-width:2; }
.metric-chart p { min-height:15px; font-size:10px; color:var(--muted); }
.pipeline-workspace { display:grid; grid-template-columns:245px minmax(0,1fr); background:var(--surface); height:100%; min-height:0; overflow:hidden; }
.pipeline-list { padding:10px; border-right:1px solid var(--line); overflow-y:auto; min-height:0; }
.pipeline-node { margin-bottom:6px; }
.pipeline-node>summary { display:flex; align-items:center; gap:7px; min-height:40px; padding:8px 5px; list-style:none; cursor:pointer; color:var(--ink); border-radius:6px; font-size:11px; font-weight:600; }
.pipeline-node>summary::-webkit-details-marker { display:none; }
.pipeline-node>summary:hover { background:var(--surface-raised); }
.pipeline-node>summary svg { width:14px; height:14px; flex-shrink:0; fill:none; stroke:var(--muted); stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.pipeline-node[open]>summary svg { transform:rotate(90deg); }
.pipeline-node-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pipeline-node-count { color:var(--muted); background:var(--surface-raised); border-radius:4px; padding:2px 5px; font-size:9px; font-weight:400; font-variant-numeric:tabular-nums; }
.pipeline-node:has(button.selected)>summary { color:var(--accent); }
.pipeline-node-items { margin-left:12px; padding-left:6px; border-left:1px solid var(--line); }
.pipeline-list button { display:block; width:100%; padding:13px 11px; background:transparent; border:1px solid transparent; border-radius:8px; text-align:left; color:var(--ink); margin-bottom:5px; }
.pipeline-list button.selected { background:var(--surface-raised); border-color:var(--line); }
.pipeline-list strong { display:block; font-size:11px; overflow-wrap:anywhere; }
.pipeline-list small { display:block; font-size:9px; color:var(--muted); margin-top:7px; }
.pipeline-detail { min-width:0; min-height:0; position:relative; }
.pipeline-graph-tools { display:flex; align-items:center; justify-content:center; gap:6px; }
.pipeline-graph-tools button { border:1px solid var(--line); border-radius:5px; background:var(--surface-raised); color:var(--ink); font-size:10px; padding:6px 9px; min-width:28px; }
.pipeline-graph-tools output { min-width:40px; text-align:center; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
#pipeline-graph { background:var(--paper); height:100%; overflow:hidden; }
#pipeline-graph svg { display:block; width:100%; height:100%; cursor:grab; touch-action:none; user-select:none; }
#pipeline-graph svg.panning { cursor:grabbing; }
#pipeline-graph line { stroke:var(--muted); stroke-width:1.5; }
#pipeline-graph rect { fill:var(--surface); stroke:var(--accent); stroke-width:1.3; }
#pipeline-graph text { fill:var(--ink); font-size:13px; pointer-events:none; }
#pipeline-graph .filter-type { fill:var(--muted); font-size:10px; }
#pipeline-graph [data-filter] { cursor:pointer; }
.pipeline-filter-details { position:absolute; right:16px; bottom:16px; max-width:min(440px,calc(100% - 32px)); max-height:50%; overflow:auto; padding:18px; font-size:11px; background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:0 5px 24px #0002; }
.pipeline-filter-details[hidden] { display:none; }
.pipeline-close-details { float:right; border:0; background:transparent; color:var(--muted); cursor:pointer; font-size:18px; margin:-7px -4px 0 12px; }
.pipeline-filter-details h3 { font-size:13px; }
.pipeline-filter-details pre { padding:18px; max-height:350px; overflow:auto; font-size:10px; }
.portal-shell :is(button,a,input,select,summary):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media (max-width:1250px) {
  .cluster-layout { grid-template-columns:180px minmax(280px,1fr) 270px; }
  .portal-shell .page { padding-inline:14px; }
  .canvas-toolbar { padding:14px 12px; }
  .canvas-toolbar > div:first-child span { display:none; }
  .section-heading { gap:16px; }
  .portal-shell #section-tabs { gap:17px; }
}
@media (max-width:1050px) {
  .metric-charts { grid-template-columns:1fr; }
  .cluster-layout { grid-template-columns:190px 1fr; height:auto; min-height:0; }
  .cluster-directory { grid-row:span 2; }
  .cluster-canvas-panel { min-height:480px; }
  .cluster-inspector { border-left:0; border-top:1px solid var(--line); max-height:520px; }
  .inspector-body { display:block; }
  .portal-shell[data-page="cluster"] .cluster-card { overflow:auto; }
  .portal-shell[data-page="cluster"] .cluster-layout { flex:none; display:flex; flex-direction:column; overflow:visible; }
  .portal-shell[data-page="cluster"] .cluster-directory { border-right:0; border-bottom:1px solid var(--line); max-height:280px; flex:none; }
  .portal-shell[data-page="cluster"] .cluster-canvas-panel { min-height:440px; height:440px; flex:none; }
  .portal-shell[data-page="cluster"] .cluster-inspector { max-height:480px; flex:none; }
}
@media (max-width:1000px) {
  .portal-shell .topbar:has(.page-context:not(:empty)) { height:96px; min-height:96px; grid-template-columns:minmax(0,1fr) 76px; grid-template-rows:52px 40px; row-gap:0; }
  .topbar:has(.page-context:not(:empty)) .section-heading { grid-column:1; grid-row:1; }
  .topbar:has(.page-context:not(:empty)) .page-context { grid-column:1 / -1; grid-row:2; }
  .page-context #page-actions { max-width:calc(100vw - 84px); }
  .topbar:has(.page-context:not(:empty)) .topbar-right { grid-column:2; grid-row:1; }
}
@media (max-width:740px) {
  .metric-workspace,.pipeline-workspace { grid-template-columns:1fr; }
  .metric-workspace { grid-template-rows:minmax(160px,35%) minmax(0,1fr); }
  .metric-picker { border-right:0; border-bottom:1px solid var(--line); }
  .content-card .two-col > .panel:first-child { border-right:0; border-bottom:1px solid var(--line); }
  .pipeline-workspace { grid-template-rows:minmax(92px,24%) minmax(0,1fr); }
  .pipeline-list { border-right:0; border-bottom:1px solid var(--line); }
  .portal-shell > main { margin-left:60px; }
  .portal-shell .topbar { gap:9px; padding:0 12px; height:56px; min-height:56px; }
  .topbar-right { gap:8px; }
  .topbar-right #refresh { display:none; }
  .portal-shell #section-tabs { gap:16px; }
  .section-heading { gap:0; }
  .section-tab { font-size:11px; }
  .portal-shell .page { padding:12px 14px; }
  .portal-shell[data-navigation="expanded"] > .sidebar { box-shadow:12px 0 28px #0002; }
  .portal-shell[data-navigation="expanded"] .brand-name { font-size:17px; }
  .account-popover { right:-3px; }
  .cluster-summary { height:auto; min-height:70px; flex-direction:column; align-items:start; justify-content:center; gap:8px; }
  .cluster-summary > div { gap:8px; font-size:9px; }
  .cluster-summary strong { font-size:10px; }
  .cluster-layout { display:flex; flex-direction:column; border-radius:9px; }
  .cluster-directory { border-right:0; border-bottom:1px solid var(--line); max-height:260px; }
  .cluster-node-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px; }
  .cluster-panel-title { padding:12px 14px 10px; }
  .cluster-node-row { padding:8px 5px; gap:6px; }
  .cluster-node-row .node-glyph { display:none; }
  .cluster-node-row strong { font-size:9px; }
  .cluster-node-row small { font-size:8px; }
  .cluster-canvas-panel { min-height:390px; }
  .canvas-toolbar { gap:8px; padding:12px 8px; }
  .canvas-toolbar h2 { font-size:11px; }
  .canvas-controls button { font-size:9px; min-width:23px; padding:4px; }
  #graph-zoom { display:none; }
  .graph-surface,.topology-svg { min-height:230px; }
  .graph-legend { gap:7px; font-size:7px; }
  .cluster-activity-strip { padding:12px; gap:8px; }
  .inspector-metric small { font-size:8px; }
  .inspector-metric strong { font-size:20px; }
  .appearance-options { gap:9px; }
  .settings-panel { padding:0 16px; }
  .appearance-option small { display:none; }
  .appearance-option input { bottom:12px; right:7px; }
  .appearance-option { padding:7px; }
  .appearance-option strong { font-size:10px; }
  .theme-preview { height:64px; }
}
@media (max-height:560px) {
  .portal-shell nav#navigation { overflow-y:auto; flex-shrink:1; }
}
