@layer components { /* Computer overview */ .screens-page { display: flex; flex-direction: column; gap: 20px; padding: 24px max(20px, calc((100% - 1040px) / 2)) 32px; } .computers-group { display: flex; flex-direction: column; gap: 8px; } .computers-group[hidden] { display: none; } .computer-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; padding: 0 2px; } .computer-group-heading h2 { display: inline-flex; align-items: baseline; gap: 6px; margin: 0; color: var(--secondaryLabel); font-size: 12px; font-weight: 500; line-height: 18px; } .computer-group-heading h2 > span { color: var(--tertiaryLabel); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; } .computer-group-refresh { height: 26px; padding-inline: 8px; color: var(--secondaryLabel); font-size: 12px; font-weight: 400; } .computer-list { display: flex; flex-direction: column; container: computers / inline-size; border: 1px solid var(--separator); border-radius: var(--radius-card); background: var(--plain); overflow: clip; } .computer-list-row { position: relative; display: grid; grid-template-columns: minmax(210px, 1.15fr) minmax(220px, 1fr) auto; align-items: center; column-gap: 20px; row-gap: 10px; min-inline-size: 0; min-height: 64px; padding: 11px 16px; transition: background var(--transition); } .computer-list-row[data-offline] { grid-template-columns: minmax(0, 1fr) auto; min-height: 52px; padding: 8px 16px; } .computer-list-row[hidden] { display: none; } .computer-list-row:not([hidden]) ~ .computer-list-row:not([hidden])::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: var(--hairline, 1px); background: var(--separator); pointer-events: none; transition: opacity var(--transition); } .computer-list-header { grid-column: 1; grid-row: 1; display: flex; align-items: center; min-inline-size: 0; gap: 12px; } .computer-row-mark { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 7px; background: var(--fill); box-shadow: inset 0 0 0 var(--hairline, 1px) var(--separator); color: var(--secondaryLabel); } .computer-list-row[data-current] .computer-row-mark { background: color-mix(in oklab, var(--label) 6%, var(--fill)); color: var(--label); } .computer-list-row[data-offline] .computer-row-mark { background: color-mix(in oklab, var(--fill) 55%, transparent); color: var(--tertiaryLabel); opacity: .72; } .computer-list-name { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: 1px; } .computer-list-title { display: flex; align-items: center; gap: 6px; min-inline-size: 0; } .computer-list-title h2 { margin: 0; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; line-height: 19px; color: var(--label); } .computer-list-row[data-offline] .computer-list-title h2 { color: var(--secondaryLabel); font-weight: 450; } .computer-list-name > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tertiaryLabel); font-size: 12px; line-height: 17px; } .computer-list-title [data-slot="badge"] { flex: none; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 500; } .computer-list-row :is([title="给电脑命名"], .computer-row-hover-action) { flex: none; color: var(--tertiaryLabel); opacity: 0; transition: opacity 140ms ease-out, color 140ms ease-out, background-color 140ms ease-out; } .computer-list-row:is(:hover, :focus-within) :is([title="给电脑命名"], .computer-row-hover-action), .computer-list-row :is([title="给电脑命名"], .computer-row-hover-action):is(:focus-visible, [data-state="open"], [aria-expanded="true"]) { opacity: 1; } @media (hover: none) { .computer-list-row :is([title="给电脑命名"], .computer-row-hover-action) { opacity: 1; } } .computer-telemetry { display: contents; } .computer-telemetry-summary { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 10px; min-inline-size: 0; } .computer-telemetry-summary:empty { display: none; } .computer-telemetry-readings { min-inline-size: 0; } .computer-resource-readings { display: flex; align-items: center; gap: 18px; margin: 0; font-variant-numeric: tabular-nums; } .computer-resource-readings > div { display: flex; flex-direction: column; gap: 1px; min-inline-size: 38px; } .computer-resource-readings dt { color: var(--tertiaryLabel); font-size: 11px; line-height: 15px; white-space: nowrap; } .computer-resource-readings dd { margin: 0; color: var(--label); font-size: 13px; font-weight: 500; line-height: 18px; white-space: nowrap; } .computer-resource-toggle { flex: none; width: 24px; height: 24px; color: var(--tertiaryLabel); } .computer-resource-toggle > svg { width: 14px; height: 14px; transition: transform 150ms ease-out; } .computer-resource-toggle[aria-expanded="true"] > svg { transform: rotate(180deg); } .computer-telemetry-status { display: inline-flex; align-items: center; gap: 8px; min-inline-size: 0; color: var(--tertiaryLabel); font-size: 12px; line-height: 18px; } .computer-telemetry-status > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .computer-telemetry-status[data-pending], .screen-idle-status[data-pending] { opacity: 0; animation: screen-list-wait 150ms ease-out 400ms forwards; } .computer-list-actions { grid-column: 3; grid-row: 1; justify-self: end; min-inline-size: 0; } .computer-list-row[data-offline] .computer-list-actions { grid-column: 2; } .computer-list-actions :is(.screen-page.screen-is-idle, .screen-idle) { justify-content: flex-end; gap: 12px; } .computer-list-actions .screen-idle-offline { gap: 6px; } .computer-offline-label { color: var(--tertiaryLabel); font-size: 12px; line-height: 18px; white-space: nowrap; } .computer-list-loading { min-height: 62px; } .computer-telemetry-details { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(230px, .85fr); gap: 12px 28px; min-inline-size: 0; margin-top: 2px; padding: 14px 0 4px; border-top: var(--hairline, 1px) solid var(--separator); } .computer-resource-details { display: flex; flex-direction: column; gap: 10px; min-inline-size: 0; margin: 0; font-size: 12px; line-height: 18px; } .computer-resource-details > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; } .computer-resource-details dt { color: var(--secondaryLabel); } .computer-resource-details dd { min-inline-size: 0; margin: 0; color: var(--label); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; } .computer-resource-details small { display: block; margin-top: 3px; color: var(--tertiaryLabel); font-size: inherit; } .computer-history { min-inline-size: 0; align-self: start; padding: 10px 12px; border-radius: var(--radius-control); background: color-mix(in oklab, var(--fill) 55%, transparent); box-shadow: inset 0 0 0 var(--hairline, 1px) var(--separator); } .computer-history-heading, .computer-history-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--secondaryLabel); font-size: 12px; line-height: 16px; } .computer-history-caption { color: var(--tertiaryLabel); } .computer-history-heading > span:last-child { display: inline-flex; align-items: center; gap: 6px; } .computer-history-heading i { display: inline-block; width: 12px; border-top: 2px solid var(--monitorCpu); } .computer-history-heading i[data-tone="memory"] { margin-left: 6px; border-color: var(--monitorMemory); border-top-style: dashed; } .computer-history-frame { height: 84px; margin: 8px 0 6px; } .computer-wave { display: block; width: 100%; height: 100%; overflow: visible; } .computer-wave-guide { stroke: var(--separator); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; } .computer-wave [data-tone="cpu"] { color: var(--monitorCpu); } .computer-wave [data-tone="memory"] { color: var(--monitorMemory); } .computer-wave circle { fill: currentColor; } .computer-wave-line { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; } .computer-wave [data-tone="memory"] .computer-wave-line { stroke-dasharray: 4 3; opacity: .85; } .computer-wave-fill { fill: currentColor; opacity: .05; } .computer-telemetry-note { grid-column: 1 / -1; margin: 0; color: var(--tertiaryLabel); font-size: 12px; line-height: 17px; } @container computers (max-width: 780px) { .computer-list-row:not([data-offline]) { grid-template-columns: minmax(0, 1fr) auto; } .computer-telemetry-summary { grid-column: 1 / -1; grid-row: 2; padding-inline-start: 44px; } .computer-list-actions { grid-column: 2; } .computer-telemetry-details { grid-row: 3; } } @container computers (max-width: 520px) { .computer-list-row:not([data-offline]) { grid-template-columns: minmax(0, 1fr); } .computer-telemetry-summary { padding-inline-start: 0; } .computer-resource-readings { gap: 14px; flex-wrap: wrap; } .computer-list-actions { grid-column: 1; grid-row: 3; justify-self: stretch; } .computer-list-actions :is(.screen-page.screen-is-idle, .screen-idle) { justify-content: space-between; } .computer-telemetry-details { grid-row: 4; grid-template-columns: minmax(0, 1fr); } .computer-resource-details > div { grid-template-columns: 64px minmax(0, 1fr); } .computer-list-loading > :nth-child(2) { grid-row: 2; } .computer-list-loading > :last-child { grid-row: 3; justify-self: start; } } .screen-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 0; color: var(--quaternaryLabel, var(--tertiaryLabel)); font-size: 12px; } .screen-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; min-height: 64px; min-width: 0; transition: background var(--transition); } /* The status + action group sits flush right, not floating in a wide column. */ .screen-row > .screen-idle, .screen-row > .screen-page { justify-self: end; } .screen-row[data-current] { background: var(--sidebarAccent); } /* While the computers load: rows in the list's own shape, and words only once the wait is noticeable (300 ms), so a quick load doesn't flash a spinner. */ .screen-row-skeleton, .screen-row-skeleton:hover { background: transparent; } .screen-list-wait { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; color: var(--tertiaryLabel); font-size: 12px; opacity: 0; animation: screen-list-wait 150ms ease-out 300ms forwards; } .screen-list-wait > svg { width: 14px; height: 14px; } @keyframes screen-list-wait { to { opacity: 1; } } .screen-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--tertiaryLabel); transition: background 0.14s ease; } .screen-dot[data-on] { background: var(--ok); } .screen-dot[data-tone="waiting"] { background: var(--waiting); } .screen-dot[data-tone="danger"] { background: var(--danger); } .screen-idle, .screen-idle-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 12px; min-inline-size: 0; } .screen-idle-status { justify-content: flex-start; gap: 7px; color: var(--secondaryLabel); } .screen-idle-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px; color: var(--secondaryLabel); } .screen-idle-status[data-tone="waiting"] .screen-idle-label { color: var(--waiting); } .screen-idle-status[data-tone="danger"] .screen-idle-label { color: var(--danger); } .screen-idle-status > div { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; max-width: 240px; font-size: 12px; line-height: 18px; color: var(--secondaryLabel); } .screen-idle-status strong, .screen-idle-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .screen-idle-status strong { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--label); } .screen-idle-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; } .screen-idle-actions > [data-button]:not([data-size^="icon"]) { min-width: 78px; } .screen-idle [role="alert"], .screen-start [role="alert"] { max-width: 36rem; overflow-wrap: anywhere; } .screen-permission-details { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--separator); padding-top: 12px; font-size: 12px; color: var(--secondaryLabel); } .screen-permission-details p { display: flex; justify-content: space-between; gap: 12px; } .screen-permission-details strong { font-weight: 400; color: var(--label); } .screen-permission-actions { display: flex; gap: 8px; margin-top: 4px; } .screen-permission-actions > [data-button] { flex: 1; } /* The popover's own layout: labels in one column, the choices filling the other. */ .screen-settings-list { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 12px; border-top: 1px solid var(--separator); padding-top: 12px; } .screen-settings-list > span { font-size: 12px; color: var(--secondaryLabel); } /* Viewer */ .screen-page { display: flex; flex-direction: column; min-width: 0; } /* Compact (list-row) viewer: status on the left, actions on the right, one centered row — not the stacked column the full viewer uses. */ .screen-page.screen-is-idle { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 12px; } .screen-is-idle .screen-idle-status { align-items: center; } .screen-embedded { min-height: 0; } .screen-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; padding: 8px 12px; border-bottom: 1px solid var(--separator); } .screen-settings, .screen-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; } .screen-settings { flex: 1 1 300px; } .screen-settings > button { max-width: 100%; } .screen-view-title { display: none; align-items: center; gap: 8px; min-width: 0; max-width: 100%; margin-right: auto; font-size: 13px; } .screen-view-title > svg { flex-shrink: 0; } .screen-view-title > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .screen-stage { position: relative; flex: 1; min-width: 0; min-height: 320px; overflow: hidden; background: var(--fill); } .screen-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; } .screen-drop-overlay { position: absolute; inset: 10px; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; border: 2px dashed var(--accent); border-radius: var(--radius-card); background: color-mix(in srgb, var(--plain) 92%, transparent); color: var(--label); text-align: center; pointer-events: auto; } .screen-drop-overlay span { font-size: 12px; color: var(--secondaryLabel); } .screen-upload-toast { position: absolute; left: 50%; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 8px; max-width: min(520px, calc(100% - 32px)); padding: 7px 12px; border-radius: var(--radius-card); transform: translateX(-50%); color: #fff; font-size: 13px; line-height: 18px; background: rgb(28 28 30 / .88); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 0 0 .5px rgb(255 255 255 / .12), 0 8px 24px -6px rgb(0 0 0 / .5); } .screen-upload-toast[data-tone="error"] { background: color-mix(in srgb, var(--destructive) 90%, rgb(20 20 22)); } .screen-upload-toast [data-button] { color: rgb(255 255 255 / .85) !important; } .screen-start { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: safe center; align-items: center; gap: 12px; padding: 24px; overflow: auto; text-align: center; color: var(--secondaryLabel); } .screen-display-mark { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--separator); border-radius: var(--radius-card); background: var(--plain); } .screen-start h3 { margin: 0; color: var(--label); font-size: 16px; font-weight: 600; } .screen-start p { max-width: 40em; font-size: 13px; line-height: 1.6; } .screen-permissions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: 12px; } .screen-start-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; } .screen-connecting { gap: 24px; } .screen-connecting h3 { font-size: 16px; } .screen-connecting p { max-width: 340px; margin: 10px 0 0; overflow-wrap: anywhere; } .screen-connecting-art { position: relative; width: 104px; height: 84px; flex: none; color: var(--accent); } /* A still drawing of a screen: no glow, no sweep (what moves while connecting is the spinner). */ .screen-connecting-monitor { position: absolute; inset: 6px 4px 17px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--radius-card); background: color-mix(in srgb, var(--accent) 5%, transparent); overflow: hidden; } .screen-connecting-monitor::before { content: ''; position: absolute; top: 12px; left: 12px; width: 23px; height: 4px; border-radius: var(--radius-small); background: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: 0 11px 0 color-mix(in srgb, var(--accent) 12%, transparent), 0 22px 0 color-mix(in srgb, var(--accent) 12%, transparent); } .screen-connecting-stand { position: absolute; bottom: 8px; left: 50%; width: 26px; height: 10px; transform: translateX(-50%); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); } .screen-connecting-stand::before { content: ''; position: absolute; left: 50%; height: 9px; border-left: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); } .screen-connecting-steps { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--secondaryLabel); } .screen-connecting-steps [data-active="true"] { color: var(--accent); } .screen-connecting-steps i { width: 24px; height: 1px; background: var(--separator); } .screen-connecting[data-failed="true"] .screen-connecting-art { opacity: .5; } .screen-caption { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; min-height: 36px; padding: 6px 12px; border-top: 1px solid var(--separator); color: var(--secondaryLabel); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .screen-caption > span:first-child { display: inline-flex; align-items: center; gap: 6px; } .screen-caption > span:last-child { margin-left: auto; } .screen-metrics { font-family: var(--font-mono); } .screen-page.screen-focused, .screen-page:fullscreen { position: fixed; inset: 0; z-index: 40; width: 100%; height: 100dvh; background: var(--plain); } .screen-focused .screen-view-title, .screen-page:fullscreen .screen-view-title { display: flex; flex-basis: 100%; } .screen-focused .screen-toolbar, .screen-page:fullscreen .screen-toolbar { flex-shrink: 0; } .screen-focused .screen-stage, .screen-page:fullscreen .screen-stage { min-height: 0; } /* Detail page */ .screen-detail-page { display: flex; flex: 1; flex-direction: column; min-height: 0; gap: 16px; padding: 20px; } .screen-detail-page > .screen-page { flex: 1; min-height: 480px; border: 1px solid var(--separator); border-radius: var(--radius-card); overflow: hidden; } .screen-detail-page > .screen-page.screen-focused, .screen-detail-page > .screen-page:fullscreen { min-height: 0; border: 0; border-radius: 0; } /* Rows shared with the computer table and device list in App.tsx */ .computer-name { display: flex; align-items: center; gap: 8px; min-width: 0; } .computer-name > svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--secondaryLabel); } .computer-name > span { display: grid; min-width: 0; gap: 2px; } .computer-name strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 500; } .computer-name small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--secondaryLabel); } .computer-device-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; } .computer-device-row + .computer-device-row { border-top: 1px solid var(--separator); } .computer-device-row > strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 500; } .computer-agent-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center; } .computer-agent-row > * { margin-left: 0; } .computer-agent-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; } .computer-agent-label { flex: none; max-width: 60%; font-size: 13px; font-weight: 500; } .computer-agent-version { color: var(--tertiaryLabel); font-family: var(--mono); font-size: 12px; } .computer-agent-auth { justify-self: end; max-width: 360px; color: var(--tertiaryLabel); font-size: 12px; } .computer-agent-row:not([data-installed]) .computer-agent-label { color: var(--tertiaryLabel); font-weight: 400; } .computer-agent-row:not([data-installed]) > .agent-mark { opacity: .5; } :is(.computer-agent-label, .computer-agent-version, .computer-agent-auth) { width: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } @media (max-width: 640px) { .computer-agent-row { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 12px; } .computer-agent-row > .agent-mark { grid-column: 1; grid-row: 1 / 3; } .computer-agent-label { grid-column: 2; grid-row: 1; } .computer-agent-version { grid-column: 3; grid-row: 1; max-width: 110px; } .computer-agent-auth { grid-column: 2 / -1; grid-row: 2; justify-self: start; } .screen-row { grid-template-columns: minmax(0, 1fr); min-height: 0; } .screen-row > .screen-idle, .screen-row > .screen-page { justify-self: stretch; } } @media (max-width: 720px) { .screens-page { padding: 16px; } .screen-detail-page { padding: 12px 16px 16px; } .screen-stage { min-height: 280px; } .screen-settings { flex-basis: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .screen-settings > button { width: 100%; } .screen-actions { width: 100%; } .screen-actions > button:first-child { margin-right: auto; } .screen-caption > span:last-child { margin-left: 0; } .computer-name > svg { display: none; } } @media (prefers-reduced-motion: reduce) { .screen-row { transition: none; } } }