This repository has been archived on 2026-10-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
maestro/web/src/styles.css
T
naps62-yoloandClaude Opus 4.8 c02ff02849
ci / rust (push) Successful in 4m26s
feat(maestro): terminal-native web UI pass + design kit
Live-review iteration on the browser SPA, driven by crit feedback.

Sidebar / session tree
- Compact single-line leaf rows; status shown as a faint "alive" row wash
  instead of per-row dots (exited rows dim + keep the "exited" badge).
- Host is now the first level of nesting (host → label path → session); the
  inline @daemon is dropped from rows.
- Flush, borderless search input spanning the sidebar; drag-to-resize grip on
  the sidebar edge (width persisted to localStorage); narrower default.
- Per-row clone action (opens the spawn modal prefilled); right-pointing
  chevron when collapsed.

Chrome / layout
- Buttons swapped to a bracket terminal style ([ + Spawn ]); ghost/icon drop
  the brackets. Old filled styles removed.
- Squared corners globally (radius tokens) and tighter, denser spacing.
- Session tally + daemon chips moved into the centered app header.
- Shorter control height; shared --bar-h aligns the search and attach bars.

Attach / terminal
- Useful attach title (name · command @ host) over a bare UUID.
- Robust fit: compute columns from the viewport's scrollbar-excluded
  clientWidth (fixes mobile under-fit and desktop overflow); ResizeObserver +
  font-load refit; full-bleed terminal on mobile.

Spawn / empty states
- Spawn modal accepts a prefill (clone); real "+ Spawn" buttons in welcome and
  no-sessions empty states.

Dev
- New ?kit design-kit page (kit.ts/kit.css, DEV-only) showcasing components.
- Richer ?mock fixture with deeper label nesting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 12:11:43 +00:00

1572 lines
31 KiB
CSS

/* =========================================================================
maestro web — design system
Register: product (a tool; design serves the task).
Identity: precise, calm, alive. Monospace-as-UI; signal-green = "alive".
Theme: dark (default) + light, all via OKLCH custom-property tokens.
========================================================================= */
:root {
/* ---- type ---- */
--font-mono:
ui-monospace, "SF Mono", "SFMono-Regular", "Cascadia Code", "JetBrains Mono",
"Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
--font-sans:
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
--fs-11: 0.6875rem;
--fs-12: 0.75rem;
--fs-13: 0.8125rem;
--fs-14: 0.875rem;
--fs-15: 0.9375rem;
--fs-17: 1.0625rem;
--fs-20: 1.25rem;
/* ---- spacing ---- */
--sp-1: 4px;
--sp-2: 8px;
--sp-3: 12px;
--sp-4: 16px;
--sp-5: 20px;
--sp-6: 24px;
--sp-8: 32px;
/* ---- radii ----
Terminal-native: crisp, near-square corners. Round dots (status, brand)
use border-radius:50% directly and are unaffected; these tokens govern
rectangles (buttons, inputs, cards, tags) and stay sharp on purpose. */
--r-1: 2px;
--r-2: 3px;
--r-3: 4px;
--r-pill: 3px;
/* ---- sizing ---- */
--row-h: 46px;
--control-h: 30px;
--tap: 40px;
/* Height of the two top-of-pane bars (sidebar search + attach header) — shared
so they line up across the split. */
--bar-h: 34px;
/* ---- motion ---- */
--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
--dur-fast: 120ms;
--dur: 180ms;
--dur-slow: 240ms;
/* ---- z-index scale ---- */
--z-sticky: 10;
--z-backdrop: 40;
--z-modal: 50;
--z-toast: 60;
/* ---- color: dark (default) ---- */
color-scheme: dark;
--bg: oklch(0.178 0.012 256);
--bg-grid: oklch(0.215 0.014 256);
--surface: oklch(0.214 0.014 256);
--surface-2: oklch(0.252 0.016 256);
--surface-3: oklch(0.292 0.018 256);
--border: oklch(0.318 0.018 256);
--border-strong: oklch(0.4 0.022 256);
--ink: oklch(0.945 0.006 256);
--muted: oklch(0.722 0.014 256);
--faint: oklch(0.58 0.014 256);
/* signal green = "alive", primary action, focus, selection */
--accent: oklch(0.83 0.16 152);
--accent-strong: oklch(0.88 0.17 152);
--accent-ink: oklch(0.2 0.03 256);
--accent-tint: oklch(0.83 0.16 152 / 0.12);
--accent-ring: oklch(0.83 0.16 152 / 0.55);
--live: oklch(0.84 0.17 152);
--live-glow: oklch(0.84 0.17 152 / 0.55);
--danger: oklch(0.72 0.18 25);
--danger-tint: oklch(0.72 0.18 25 / 0.14);
--warn: oklch(0.82 0.14 85);
--shadow-1: 0 1px 2px oklch(0 0 0 / 0.4);
--shadow-2:
0 12px 28px -8px oklch(0 0 0 / 0.6), 0 2px 8px oklch(0 0 0 / 0.4);
--term-bg: oklch(0.158 0.012 256);
}
:root[data-theme="light"],
:root[data-theme="light"] body {
color-scheme: light;
--bg: oklch(0.985 0.003 256);
--bg-grid: oklch(0.93 0.006 256);
--surface: oklch(1 0 0);
--surface-2: oklch(0.965 0.004 256);
--surface-3: oklch(0.93 0.006 256);
--border: oklch(0.892 0.008 256);
--border-strong: oklch(0.82 0.012 256);
--ink: oklch(0.26 0.014 256);
--muted: oklch(0.47 0.016 256);
--faint: oklch(0.62 0.016 256);
--accent: oklch(0.6 0.15 151);
--accent-strong: oklch(0.55 0.16 151);
--accent-ink: oklch(0.99 0.01 152);
--accent-tint: oklch(0.6 0.15 151 / 0.12);
--accent-ring: oklch(0.6 0.15 151 / 0.5);
--live: oklch(0.6 0.16 151);
--live-glow: oklch(0.6 0.16 151 / 0.45);
--danger: oklch(0.55 0.21 27);
--danger-tint: oklch(0.55 0.21 27 / 0.1);
--warn: oklch(0.66 0.15 75);
--shadow-1: 0 1px 2px oklch(0.5 0.02 256 / 0.12);
--shadow-2:
0 16px 36px -12px oklch(0.4 0.03 256 / 0.28),
0 2px 8px oklch(0.5 0.02 256 / 0.1);
--term-bg: oklch(0.165 0.012 256);
}
/* Follow the OS when the user hasn't pinned a theme. */
@media (prefers-color-scheme: light) {
:root:not([data-theme]) {
color-scheme: light;
--bg: oklch(0.985 0.003 256);
--bg-grid: oklch(0.93 0.006 256);
--surface: oklch(1 0 0);
--surface-2: oklch(0.965 0.004 256);
--surface-3: oklch(0.93 0.006 256);
--border: oklch(0.892 0.008 256);
--border-strong: oklch(0.82 0.012 256);
--ink: oklch(0.26 0.014 256);
--muted: oklch(0.47 0.016 256);
--faint: oklch(0.62 0.016 256);
--accent: oklch(0.6 0.15 151);
--accent-strong: oklch(0.55 0.16 151);
--accent-ink: oklch(0.99 0.01 152);
--accent-tint: oklch(0.6 0.15 151 / 0.12);
--accent-ring: oklch(0.6 0.15 151 / 0.5);
--live: oklch(0.6 0.16 151);
--live-glow: oklch(0.6 0.16 151 / 0.45);
--danger: oklch(0.55 0.21 27);
--danger-tint: oklch(0.55 0.21 27 / 0.1);
--warn: oklch(0.66 0.15 75);
--shadow-1: 0 1px 2px oklch(0.5 0.02 256 / 0.12);
--shadow-2:
0 16px 36px -12px oklch(0.4 0.03 256 / 0.28),
0 2px 8px oklch(0.5 0.02 256 / 0.1);
--term-bg: oklch(0.165 0.012 256);
}
}
/* ---------- reset / base ---------- */
* {
box-sizing: border-box;
}
*:focus {
outline: none;
}
html,
body {
height: 100%;
margin: 0;
}
body {
overflow-x: hidden;
}
body {
background: var(--bg);
color: var(--ink);
font-family: var(--font-mono);
font-size: var(--fs-15);
line-height: 1.45;
font-feature-settings: "ss01", "cv01";
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
/* faint structural grid — terminal texture, not a CRT costume */
background-image:
linear-gradient(var(--bg-grid) 1px, transparent 1px),
linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
background-size: 100% 64px, 64px 100%;
background-position: center top;
/* dim the grid via opacity on a fixed overlay would cost a node; bake it low instead */
}
#app {
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
a {
color: inherit;
text-decoration: none;
}
code {
font-family: var(--font-mono);
font-size: 0.92em;
padding: 1px 5px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-1);
}
::selection {
background: var(--accent-tint);
color: var(--ink);
}
button,
input,
select,
textarea {
font-family: inherit;
font-size: inherit;
color: inherit;
}
::placeholder {
color: var(--faint);
opacity: 1;
}
:focus-visible {
outline: 2px solid var(--accent-ring);
outline-offset: 2px;
border-radius: var(--r-1);
}
/* ---------- buttons ----------
Terminal-native: the brackets are the chrome. Default + primary wear
[ brackets ]; ghost/icon drop them for quieter nav and single glyphs. */
.btn {
appearance: none;
border: 1px solid transparent;
background: transparent;
color: var(--ink);
padding: 0 var(--sp-1);
height: var(--control-h);
min-height: var(--control-h);
cursor: pointer;
font-family: var(--font-mono);
font-size: var(--fs-13);
font-weight: 500;
letter-spacing: 0.01em;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
white-space: nowrap;
transition:
color var(--dur-fast) var(--ease-out),
background var(--dur-fast) var(--ease-out),
transform var(--dur-fast) var(--ease-out);
}
.btn::before {
content: "[";
color: var(--faint);
}
.btn::after {
content: "]";
color: var(--faint);
}
.btn:hover {
color: var(--accent);
}
.btn:hover::before,
.btn:hover::after {
color: var(--accent);
}
.btn:active {
transform: translateY(1px);
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.btn-primary {
color: var(--accent);
font-weight: 600;
}
.btn-primary::before,
.btn-primary::after {
color: var(--accent);
}
.btn-primary:hover {
background: var(--accent-tint);
}
/* Ghost: no brackets — quiet nav (back, disconnect, theme, kit) and icons. */
.btn-ghost {
color: var(--muted);
}
.btn-ghost::before,
.btn-ghost::after {
content: none;
}
.btn-ghost:hover {
color: var(--ink);
background: var(--surface-2);
}
.btn-icon {
width: var(--control-h);
padding: 0;
font-size: var(--fs-15);
}
.btn-icon::before,
.btn-icon::after {
content: none;
}
.btn-icon:hover {
background: var(--surface-2);
}
/* ---------- app shell: sidebar + content ---------- */
/* Global app header: brand + app-level actions (spawn, theme toggle), spanning
the full width above the split. */
.app-header {
display: flex;
align-items: center;
gap: var(--sp-3);
flex: 0 0 auto;
padding: var(--sp-1) var(--sp-3);
border-bottom: 1px solid var(--border);
background: color-mix(in oklab, var(--surface) 82%, transparent);
backdrop-filter: blur(8px);
}
/* Three-part header: brand (left), status (centered), actions (right). Equal
flex on the outer two keeps the status group truly centered. */
.app-header .brand {
flex: 1 1 0;
min-width: 0;
margin-right: 0;
}
.app-status {
flex: 0 1 auto;
display: flex;
justify-content: center;
min-width: 0;
overflow: hidden;
}
.app-status .statusbar {
border-bottom: 0;
background: transparent;
padding: 0;
flex-wrap: nowrap;
}
.app-status .statusbar .spacer {
display: none;
}
.app-actions {
display: flex;
align-items: center;
gap: var(--sp-2);
flex: 1 1 0;
justify-content: flex-end;
}
.app-shell {
flex: 1 1 auto;
min-height: 0;
}
/* Desktop: persistent two-pane split. Sidebar holds the session list; the
content pane shows the welcome state or the attached terminal. */
@media (min-width: 860px) {
.app-shell {
display: grid;
grid-template-columns:
var(--sidebar-w, clamp(220px, 22vw, 320px)) minmax(0, 1fr);
}
}
.sidebar {
display: flex;
flex-direction: column;
min-height: 0;
height: 100%;
overflow: hidden;
position: relative;
background: color-mix(in oklab, var(--surface) 26%, var(--bg));
border-right: 1px solid var(--border);
}
/* Drag-to-resize grip on the sidebar's right edge (desktop split only). */
.sidebar-resize {
position: absolute;
top: 0;
right: -3px;
width: 6px;
height: 100%;
cursor: col-resize;
z-index: var(--z-sticky);
touch-action: none;
}
.sidebar-resize:hover,
.sidebar-resize:active {
background: var(--accent-ring);
}
@media (max-width: 859px) {
.sidebar-resize {
display: none;
}
.app-status {
display: none;
}
}
/* Sidebar's own slim header: just the session search (app-level actions live
in the global top bar). */
/* The search input IS the header — it spans edge to edge, flush, with just a
bottom rule for separation. No wrapper padding, no boxed border/radius. */
.sidebar-search {
flex: 0 0 auto;
}
.sidebar-search .search {
width: 100%;
max-width: none;
height: var(--bar-h);
border: 0;
border-bottom: 1px solid var(--border);
border-radius: 0;
background: transparent;
}
.sidebar-search .search:hover {
background: var(--surface-2);
border-bottom-color: var(--border-strong);
}
.sidebar-search .search:focus {
background: var(--surface-2);
border-bottom-color: var(--accent);
box-shadow: none;
}
.content {
min-width: 0;
min-height: 0;
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--bg);
}
.content-welcome {
margin: auto;
max-width: 48ch;
}
/* Off-screen home for parked-but-connected terminals. Kept in the DOM (not
display:none) so the live WS keeps buffering into each terminal; on
re-mount we fit + the scrollback is already there, so switching is instant. */
.conn-cache {
position: fixed;
left: -99999px;
top: 0;
width: 1px;
height: 1px;
overflow: hidden;
}
/* ---------- catalog ---------- */
.catalog {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
}
.catalog-header {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--sp-3);
padding: var(--sp-2) var(--sp-3);
border-bottom: 1px solid var(--border);
background: color-mix(in oklab, var(--surface) 82%, transparent);
backdrop-filter: blur(8px);
position: sticky;
top: 0;
z-index: var(--z-sticky);
}
.brand {
display: inline-flex;
align-items: center;
gap: var(--sp-2);
margin-right: auto;
}
.brand-dot {
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--live);
box-shadow: 0 0 0 4px var(--live-glow);
flex: 0 0 auto;
animation: pulse 2.4s var(--ease-out) infinite;
}
.brand h1 {
margin: 0;
font-size: var(--fs-17);
font-weight: 600;
letter-spacing: -0.01em;
}
.brand .blink {
color: var(--accent);
font-weight: 400;
animation: blink 1.2s steps(1) infinite;
}
.catalog-actions {
display: flex;
flex: 1 1 280px;
gap: var(--sp-2);
align-items: center;
justify-content: flex-end;
}
.search {
flex: 1 1 200px;
max-width: 340px;
height: var(--control-h);
padding: 0 var(--sp-3);
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-2);
color: var(--ink);
transition:
border-color var(--dur-fast) var(--ease-out),
background var(--dur-fast) var(--ease-out);
}
.search:hover {
border-color: var(--border-strong);
}
.search:focus {
border-color: var(--accent);
background: var(--surface);
box-shadow: 0 0 0 3px var(--accent-tint);
}
/* ---------- daemon / status bar ---------- */
.statusbar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--sp-2) var(--sp-3);
padding: var(--sp-2) var(--sp-3);
border-bottom: 1px solid var(--border);
background: var(--surface);
font-size: var(--fs-12);
color: var(--muted);
}
.session-tally {
display: inline-flex;
align-items: center;
gap: var(--sp-2);
color: var(--ink);
font-size: var(--fs-13);
}
.session-tally b {
font-weight: 600;
}
.tally-live {
display: inline-flex;
align-items: center;
gap: 5px;
color: var(--accent);
}
.tally-live::before {
content: "";
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--live);
box-shadow: 0 0 6px var(--live-glow);
}
.statusbar .spacer {
/* zero basis: claim leftover space without inflating the bar's min width */
flex: 1 1 0;
min-width: var(--sp-2);
}
.daemons {
display: inline-flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: var(--sp-2);
align-items: center;
min-width: 0;
}
.daemon-chip {
display: inline-flex;
align-items: center;
gap: 6px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-pill);
padding: 3px var(--sp-3) 3px var(--sp-2);
font-size: var(--fs-12);
color: var(--ink);
}
.daemon-chip::before {
content: "";
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--live);
box-shadow: 0 0 5px var(--live-glow);
}
.daemon-empty {
display: inline-flex;
align-items: center;
gap: 7px;
color: var(--muted);
}
.daemon-empty::before {
content: "";
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--warn);
}
/* ---------- session tree ---------- */
.tree {
flex: 1 1 auto;
overflow: auto;
padding: var(--sp-1) 0 var(--sp-4);
scrollbar-width: thin;
scrollbar-color: var(--border-strong) transparent;
}
.tree-folder {
display: flex;
flex-direction: column;
}
.tree-folder-header {
display: flex;
align-items: center;
gap: var(--sp-2);
background: transparent;
border: 0;
width: 100%;
text-align: left;
height: 38px;
padding-right: var(--sp-4);
color: var(--muted);
cursor: pointer;
font-family: var(--font-mono);
font-size: var(--fs-12);
transition: color var(--dur-fast) var(--ease-out);
}
.tree-folder-header:hover {
color: var(--ink);
}
.tree-folder-header .chevron {
width: 16px;
text-align: center;
color: var(--faint);
font-size: var(--fs-11);
transition:
transform var(--dur) var(--ease-out),
color var(--dur-fast) var(--ease-out);
}
.tree-folder-header[aria-expanded="false"] .chevron {
transform: rotate(-90deg);
}
.tree-folder-header:hover .chevron {
color: var(--accent);
}
.folder-name {
flex: 1 1 auto;
color: var(--ink);
font-size: var(--fs-14);
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.folder-count {
font-size: var(--fs-11);
color: var(--muted);
padding: 1px 8px;
border-radius: var(--r-pill);
background: var(--surface-2);
border: 1px solid var(--border);
}
.tree-leaf {
display: flex;
align-items: center;
gap: var(--sp-2);
min-height: 30px;
margin: 1px var(--sp-2);
padding: 4px var(--sp-3);
border-radius: var(--r-1);
color: var(--ink);
position: relative;
transition:
background var(--dur-fast) var(--ease-out),
box-shadow var(--dur-fast) var(--ease-out);
}
/* "Alive" reads as a faint wash on the row itself — no per-row status icon. */
.tree-leaf[data-status="running"] {
background: color-mix(in oklab, var(--accent) 6%, transparent);
}
.tree-leaf:hover {
background: var(--surface-2);
}
.tree-leaf[data-status="running"]:hover {
background: color-mix(in oklab, var(--accent) 13%, var(--surface-2));
}
.tree-leaf:focus-visible {
outline: none;
box-shadow: inset 0 0 0 1px var(--accent-ring);
}
/* The session currently mounted in the content pane. */
.tree-leaf.is-active,
.tree-leaf.is-active[data-status="running"] {
background: var(--accent-tint);
box-shadow: inset 0 0 0 1px var(--accent-ring);
}
.tree-leaf.is-active .leaf-name {
color: var(--ink);
}
/* Exited sessions recede: dimmed name + an "exited" badge carry status, so it's
never the running tint's absence alone doing the work. */
.tree-leaf[data-status="dead"] {
color: var(--muted);
}
.tree-leaf[data-status="dead"] .leaf-name {
color: var(--muted);
font-weight: 400;
}
.leaf-name {
font-weight: 500;
font-size: var(--fs-13);
flex: 0 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.leaf-meta {
font-size: var(--fs-11);
color: var(--muted);
margin-left: auto;
padding-left: var(--sp-2);
min-width: 0;
flex: 0 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-flex;
align-items: baseline;
gap: var(--sp-2);
}
.leaf-daemon {
color: var(--faint);
flex: 0 0 auto;
}
.leaf-daemon::before {
content: "@";
opacity: 0.6;
}
.leaf-cmd {
color: var(--muted);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.leaf-badge {
font-size: var(--fs-11);
letter-spacing: 0.02em;
text-transform: uppercase;
color: var(--muted);
border: 1px solid var(--border);
border-radius: var(--r-pill);
padding: 1px 8px;
flex: 0 0 auto;
}
.leaf-actions {
position: absolute;
right: var(--sp-1);
top: 50%;
transform: translateY(-50%);
display: inline-flex;
gap: 2px;
}
.leaf-act {
background: var(--surface-3);
color: var(--faint);
border: 1px solid var(--border);
border-radius: var(--r-1);
width: 24px;
height: 24px;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: var(--fs-12);
transition:
color var(--dur-fast) var(--ease-out),
background var(--dur-fast) var(--ease-out),
border-color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) {
.leaf-actions {
opacity: 0;
transition: opacity var(--dur-fast) var(--ease-out);
}
.tree-leaf:hover .leaf-actions,
.tree-leaf:focus-within .leaf-actions {
opacity: 1;
}
}
.leaf-clone:hover {
color: var(--accent);
background: var(--accent-tint);
border-color: color-mix(in oklab, var(--accent) 40%, transparent);
}
.leaf-kill:hover {
color: var(--danger);
background: var(--danger-tint);
border-color: color-mix(in oklab, var(--danger) 40%, transparent);
}
/* ---------- empty / loading ---------- */
.empty {
padding: var(--sp-5) var(--sp-4);
color: var(--muted);
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--sp-3);
font-family: var(--font-sans);
}
.empty-glyph {
font-family: var(--font-mono);
font-size: var(--fs-20);
color: var(--accent);
border: 1px solid var(--border);
border-radius: var(--r-3);
width: 56px;
height: 56px;
display: grid;
place-items: center;
background: var(--surface);
}
.empty-title {
color: var(--ink);
font-size: var(--fs-15);
font-family: var(--font-mono);
}
.empty-hint {
font-size: var(--fs-13);
max-width: 42ch;
}
.empty-hint kbd {
font-family: var(--font-mono);
font-size: 0.9em;
background: var(--surface-2);
border: 1px solid var(--border);
border-bottom-width: 2px;
border-radius: var(--r-1);
padding: 1px 6px;
color: var(--ink);
}
.empty-actions {
display: flex;
gap: var(--sp-2);
margin-top: var(--sp-2);
}
.empty.connecting .empty-glyph {
color: var(--warn);
animation: pulse 1.6s var(--ease-out) infinite;
}
/* ---------- attach view ---------- */
.attach {
display: flex;
flex-direction: column;
height: 100%;
background: var(--bg);
}
.attach-header {
display: flex;
align-items: center;
gap: var(--sp-2);
height: var(--bar-h);
padding: 0 var(--sp-2);
border-bottom: 1px solid var(--border);
background: var(--surface);
}
/* Compact controls so the bar hugs the title — no tall buttons. */
.attach-header .btn {
height: 26px;
min-height: 26px;
}
.attach-header .btn-icon {
width: 26px;
}
.attach-header .back {
font-size: var(--fs-15);
width: 28px;
height: 26px;
}
/* Desktop keeps the session list permanently in view, so the in-header "back"
arrow is redundant — the sidebar is the nav. Mobile (single-pane) keeps it. */
@media (min-width: 860px) {
.attach-header .back {
display: none;
}
}
.attach-header .disconnect {
color: var(--faint);
}
.attach-header .disconnect:hover {
color: var(--danger);
background: var(--danger-tint);
border-color: color-mix(in oklab, var(--danger) 40%, transparent);
}
.attach-title {
font-family: var(--font-mono);
font-size: var(--fs-13);
color: var(--ink);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1 1 auto;
}
.attach-title .sid {
color: var(--muted);
}
.attach-title .at-name {
color: var(--ink);
font-weight: 500;
}
.attach-title .at-cmd {
color: var(--muted);
}
.attach-title .at-cmd::before {
content: "·";
margin: 0 6px;
color: var(--faint);
}
.attach-title .at-host {
color: var(--faint);
margin-left: 6px;
}
.attach-title .at-host::before {
content: "@";
opacity: 0.6;
}
.attach-state {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: var(--fs-12);
padding: 2px var(--sp-2);
border-radius: var(--r-pill);
background: var(--surface-2);
color: var(--muted);
border: 1px solid var(--border);
white-space: nowrap;
}
.attach-state::before {
content: "";
width: 7px;
height: 7px;
border-radius: 50%;
background: currentColor;
}
.attach-state[data-state="connecting"] {
color: var(--warn);
}
.attach-state[data-state="connecting"]::before {
animation: pulse 1.2s var(--ease-out) infinite;
}
.attach-state[data-state="open"] {
color: var(--accent);
}
.attach-state[data-state="open"]::before {
box-shadow: 0 0 6px var(--live-glow);
}
.attach-state[data-state="closed"],
.attach-state[data-state="error"] {
color: var(--danger);
}
.attach-body {
flex: 1 1 auto;
min-height: 0;
padding: var(--sp-2);
display: flex;
overflow: hidden;
background: var(--term-bg);
}
.attach-body .xterm {
width: 100%;
height: 100%;
}
/* xterm hard-codes overflow-y: scroll on its viewport — an always-on bar that
(a) shows even with no scrollback and (b) makes FitAddon subtract its width,
costing a column. Hide it entirely: scroll still works via wheel/touch/keys,
and fit reclaims the full width. */
/* Higher specificity than xterm's own `.xterm .xterm-viewport` (which loads
after this and would otherwise win the tie) so the always-on scrollbar
reservation actually goes away. */
.attach-body .xterm .xterm-viewport {
overflow-y: auto;
scrollbar-width: none;
}
.attach-body .xterm .xterm-viewport::-webkit-scrollbar {
width: 0;
height: 0;
}
/* Mobile: full-bleed terminal — the desktop frame padding wastes space and the
sub-cell remainder it left was triggering a stray scrollbar. */
@media (max-width: 859px) {
.attach-body {
padding: 0;
}
}
.attach-status {
margin: var(--sp-4);
padding: var(--sp-2) var(--sp-3);
border-radius: var(--r-2);
background: var(--surface);
border: 1px solid var(--border);
font-size: var(--fs-14);
color: var(--muted);
}
.attach-status.status-error {
border-color: color-mix(in oklab, var(--danger) 50%, var(--border));
color: var(--danger);
}
/* ---------- modal ---------- */
.modal-backdrop {
position: fixed;
inset: 0;
background: oklch(0.12 0.01 256 / 0.6);
backdrop-filter: blur(3px);
display: flex;
align-items: flex-end;
justify-content: center;
padding: 0;
z-index: var(--z-modal);
animation: fade var(--dur) var(--ease-out);
}
@media (min-width: 600px) {
.modal-backdrop {
align-items: center;
padding: var(--sp-6);
}
}
.modal {
background: var(--surface);
border-radius: var(--r-3) var(--r-3) 0 0;
border: 1px solid var(--border);
width: 100%;
max-width: 560px;
max-height: 92vh;
display: flex;
flex-direction: column;
box-shadow: var(--shadow-2);
animation: sheet-up var(--dur-slow) var(--ease-out);
}
@media (min-width: 600px) {
.modal {
border-radius: var(--r-3);
animation: pop var(--dur) var(--ease-out);
}
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--sp-3);
border-bottom: 1px solid var(--border);
}
.modal-header h2 {
margin: 0;
font-size: var(--fs-15);
font-weight: 600;
display: inline-flex;
align-items: center;
gap: var(--sp-2);
}
.modal-header h2::before {
content: "+";
color: var(--accent);
font-weight: 700;
}
.modal-body {
padding: var(--sp-3);
overflow: auto;
display: flex;
flex-direction: column;
gap: var(--sp-2);
scrollbar-width: thin;
scrollbar-color: var(--border-strong) transparent;
}
.modal-body label {
display: flex;
flex-direction: column;
gap: 5px;
font-size: var(--fs-12);
color: var(--muted);
letter-spacing: 0.01em;
}
.modal-body label.row-inline {
flex-direction: row;
align-items: center;
gap: var(--sp-2);
color: var(--ink);
font-size: var(--fs-14);
cursor: pointer;
}
.modal-body input[type="text"],
.modal-body input[type="search"],
.modal-body select {
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-2);
padding: 10px var(--sp-3);
color: var(--ink);
font-family: var(--font-mono);
font-size: var(--fs-15);
width: 100%;
transition:
border-color var(--dur-fast) var(--ease-out),
box-shadow var(--dur-fast) var(--ease-out),
background var(--dur-fast) var(--ease-out);
}
.modal-body input[type="text"]:hover,
.modal-body select:hover {
border-color: var(--border-strong);
}
.modal-body input[type="text"]:focus,
.modal-body input[type="search"]:focus,
.modal-body select:focus {
outline: none;
border-color: var(--accent);
background: var(--surface);
box-shadow: 0 0 0 3px var(--accent-tint);
}
.modal-body input[type="checkbox"] {
width: 18px;
height: 18px;
accent-color: var(--accent);
flex: 0 0 auto;
}
.worktree {
border: 1px solid var(--border);
border-radius: var(--r-2);
padding: var(--sp-3);
margin: 0;
display: flex;
flex-direction: column;
gap: var(--sp-3);
background: color-mix(in oklab, var(--surface-2) 50%, transparent);
}
.worktree legend {
padding: 0 6px;
color: var(--ink);
font-size: var(--fs-13);
}
.modal-actions {
display: flex;
gap: var(--sp-2);
justify-content: flex-end;
margin-top: var(--sp-2);
}
.form-error {
color: var(--danger);
margin: 0;
font-size: var(--fs-13);
min-height: 1.2em;
}
.form-error:not(:empty) {
padding: var(--sp-2) var(--sp-3);
background: var(--danger-tint);
border-radius: var(--r-2);
}
/* ---------- directory autocomplete (NAP-329) ---------- */
.dir-ac {
position: fixed;
z-index: var(--z-toast); /* above the modal it completes within */
margin: 0;
padding: var(--sp-1);
list-style: none;
max-height: 280px;
overflow-y: auto;
background: var(--surface);
border: 1px solid var(--border-strong);
border-radius: var(--r-2);
box-shadow: var(--shadow-2);
scrollbar-width: thin;
scrollbar-color: var(--border-strong) transparent;
}
.dir-ac-item {
padding: 6px var(--sp-2);
border-radius: var(--r-1);
color: var(--ink);
font-family: var(--font-mono);
font-size: var(--fs-14);
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dir-ac-item:hover {
background: var(--surface-2);
}
.dir-ac-item.is-active {
background: var(--accent-tint);
color: var(--ink);
}
.dir-ac-more {
padding: 6px var(--sp-2);
color: var(--faint);
font-size: var(--fs-12);
font-style: italic;
}
/* ---------- not-found ---------- */
.not-found {
margin: auto;
padding: var(--sp-5) var(--sp-4);
display: flex;
flex-direction: column;
gap: var(--sp-3);
align-items: center;
text-align: center;
}
.not-found h1 {
margin: 0;
font-size: var(--fs-20);
}
.not-found p {
margin: 0;
color: var(--muted);
}
/* ---------- theme toggle ---------- */
.theme-toggle {
position: relative;
overflow: hidden;
}
.theme-toggle .sun,
.theme-toggle .moon {
position: absolute;
inset: 0;
display: grid;
place-items: center;
transition:
transform var(--dur) var(--ease-out),
opacity var(--dur) var(--ease-out);
}
.theme-toggle .moon {
transform: translateY(0);
opacity: 1;
}
.theme-toggle .sun {
transform: translateY(120%);
opacity: 0;
}
:root[data-theme="light"] .theme-toggle .moon {
transform: translateY(-120%);
opacity: 0;
}
:root[data-theme="light"] .theme-toggle .sun {
transform: translateY(0);
opacity: 1;
}
@media (prefers-color-scheme: light) {
:root:not([data-theme]) .theme-toggle .moon {
transform: translateY(-120%);
opacity: 0;
}
:root:not([data-theme]) .theme-toggle .sun {
transform: translateY(0);
opacity: 1;
}
}
/* ---------- keyframes ---------- */
@keyframes pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.4;
}
}
@keyframes ripple {
0% {
transform: scale(1);
opacity: 0.6;
}
70%,
100% {
transform: scale(2.4);
opacity: 0;
}
}
@keyframes blink {
0%,
50% {
opacity: 1;
}
50.01%,
100% {
opacity: 0;
}
}
@keyframes fade {
from {
opacity: 0;
}
}
@keyframes sheet-up {
from {
transform: translateY(16px);
opacity: 0;
}
}
@keyframes pop {
from {
transform: scale(0.98);
opacity: 0;
}
}
/* ---------- responsive ---------- */
@media (max-width: 520px) {
.brand h1 {
font-size: var(--fs-15);
}
.catalog-actions {
flex: 1 1 100%;
flex-wrap: wrap;
justify-content: stretch;
}
.search {
flex: 1 1 100%;
max-width: none;
order: -1;
}
/* daemons drop to their own full-width wrapped line; no side overflow */
.statusbar .spacer {
display: none;
}
.daemons {
flex: 1 1 100%;
justify-content: flex-start;
}
.tree-leaf .leaf-actions {
opacity: 1;
}
}
/* Mobile: no room for a split, so show one pane at a time. The catalog route
shows the session list full-width; opening a session swaps to the terminal
(its header's ← returns to the list). The connection still lives in the pool,
so returning to it is instant. */
@media (max-width: 859px) {
.app-shell[data-route="catalog"] > .content {
display: none;
}
.app-shell:not([data-route="catalog"]) > .sidebar {
display: none;
}
.sidebar {
border-right: 0;
}
}
/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
}
.brand-dot,
[data-status="running"] .leaf-status::before,
.tally-live::before {
animation: none;
}
}