Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

refactor: split CSS into component files

Mariob522f6e13094
diff --git a/dashboard/agents.css b/dashboard/agents.css
new file mode 100644
index 00000000..143340a2
--- /dev/null
+++ b/dashboard/agents.css
@@ -0,0 +1,127 @@
+ /* Left panel — agents */
+ .agents-panel {
+ width: 340px;
+ border-right: 1px solid var(--border);
+ overflow-y: auto;
+ padding: 16px;
+ }
+ .agents-panel h2 {
+ font-size: 13px;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+ color: var(--text-muted);
+ margin-bottom: 12px;
+ }
+ .agent-card {
+ background: var(--bg-card);
+ border: 1px solid var(--border);
+ border-radius: 8px;
+ padding: 14px;
+ margin-bottom: 10px;
+ cursor: pointer;
+ transition: border-color 0.2s;
+ }
+ .agent-card:hover, .agent-card.selected { border-color: var(--primary); }
+ .agent-card .agent-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 8px;
+ }
+ .agent-card .agent-name { font-weight: bold; font-size: 15px; }
+ .agent-card .agent-status {
+ font-size: 11px;
+ padding: 2px 8px;
+ border-radius: 10px;
+ font-weight: 600;
+ }
+ .agent-status.active { background: var(--success-bg); color: var(--success); }
+ .agent-status.idle { background: var(--warning-bg); color: var(--warning); }
+ .agent-status.disconnected { background: var(--inactive-bg); color: var(--text-dim); }
+ .agent-card .agent-url {
+ font-size: 12px;
+ color: var(--text-muted);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ margin-bottom: 4px;
+ }
+ .agent-card .agent-meta {
+ font-size: 11px;
+ color: var(--text-faint);
+ display: flex;
+ gap: 12px;
+ }
+
+ /* Right panel — activity feed */
+ .feed-panel {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ }
+ .feed-header {
+ padding: 16px 24px;
+ border-bottom: 1px solid var(--border);
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+ .feed-header h2 { font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
+ .feed-header .filter-btns { display: flex; gap: 6px; }
+ .feed-header .filter-btn {
+ background: var(--bg-hover);
+ border: 1px solid var(--border-light);
+ color: var(--text-subtle);
+ padding: 4px 10px;
+ border-radius: 4px;
+ font-size: 11px;
+ cursor: pointer;
+ font-family: inherit;
+ }
+ .feed-header .filter-btn.active { border-color: var(--primary); color: var(--primary); }
+
+ .feed-list {
+ flex: 1;
+ overflow-y: auto;
+ padding: 8px 24px;
+ }
+ .event-row {
+ display: grid;
+ grid-template-columns: 90px 100px 1fr 70px 60px;
+ gap: 12px;
+ padding: 8px 0;
+ border-bottom: 1px solid var(--bg-hover);
+ font-size: 13px;
+ align-items: center;
+ animation: fadeIn 0.3s ease;
+ }
+ @keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }
+ .event-row .time { color: var(--text-faint); font-size: 11px; }
+ .event-row .agent {
+ color: var(--primary);
+ font-weight: 600;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ .event-row .action-detail {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ .event-row .action-detail .method {
+ display: inline-block;
+ padding: 1px 5px;
+ border-radius: 3px;
+ font-size: 10px;
+ font-weight: bold;
+ margin-right: 4px;
+ }
+ .method.GET { background: #1a3a2a; color: var(--success); }
+ .method.POST { background: #1a2a3a; color: #60a5fa; }
+ .method.DELETE { background: var(--danger-bg); color: var(--danger); }
+ .event-row .duration { color: var(--text-dim); text-align: right; font-size: 12px; }
+ .event-row .status-code { text-align: right; font-size: 12px; }
+ .status-code.ok { color: var(--success); }
+ .status-code.err { color: var(--danger); }
diff --git a/dashboard/base.css b/dashboard/base.css
new file mode 100644
index 00000000..a992d26a
--- /dev/null
+++ b/dashboard/base.css
@@ -0,0 +1,160 @@
+:root {
+ /* Brand */
+ --primary: #f5c542;
+ --primary-dark: #0a0a0a;
+
+ /* Surfaces */
+ --bg: #0a0a0a;
+ --bg-raised: #111;
+ --bg-card: #151515;
+ --bg-input: #0a0a0a;
+ --bg-hover: #1a1a1a;
+ --bg-subtle: #0d0d0d;
+
+ /* Borders */
+ --border: #222;
+ --border-light: #333;
+ --border-active: #444;
+
+ /* Text */
+ --text: #e0e0e0;
+ --text-muted: #888;
+ --text-dim: #666;
+ --text-faint: #555;
+ --text-subtle: #aaa;
+ --text-bright: #ccc;
+
+ /* Status */
+ --success: #4ade80;
+ --success-bg: #064e3b;
+ --warning: #fbbf24;
+ --warning-bg: #422006;
+ --danger: #f87171;
+ --danger-bg: #3a1a1a;
+ --inactive-bg: #1c1917;
+
+ /* Typography */
+ --font: 'SF Mono', 'Fira Code', monospace;
+ }
+
+ * { margin: 0; padding: 0; box-sizing: border-box; }
+ body {
+ font-family: var(--font);
+ background: var(--bg);
+ color: var(--text);
+ min-height: 100vh;
+ }
+ header {
+ background: var(--bg-raised);
+ border-bottom: 2px solid var(--primary);
+ padding: 16px 24px;
+ display: flex;
+ align-items: center;
+ gap: 16px;
+ }
+ header h1 { font-size: 20px; color: var(--primary); }
+ header .status { font-size: 13px; color: var(--text-muted); }
+ header .status .dot {
+ display: inline-block;
+ width: 8px; height: 8px;
+ border-radius: 50%;
+ background: var(--success);
+ margin-right: 4px;
+ animation: pulse 2s infinite;
+ }
+ @keyframes pulse {
+ 0%, 100% { opacity: 1; }
+ 50% { opacity: 0.4; }
+ }
+
+ .container { display: flex; height: calc(100vh - 60px); }
+
+ /* View toggle */
+ .view-toggle { margin-left: auto; display: flex; gap: 4px; }
+ .view-btn {
+ background: var(--bg-hover);
+ border: 1px solid var(--border-light);
+ color: var(--text-subtle);
+ padding: 6px 14px;
+ border-radius: 4px;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: inherit;
+ }
+ .view-btn.active { border-color: var(--primary); color: var(--primary); }
+
+ .empty-state {
+ text-align: center;
+ color: var(--text-faint);
+ padding: 60px;
+ font-size: 14px;
+ }
+ .empty-state .crab { font-size: 48px; margin-bottom: 12px; }
+
+ /* Profile management modal */
+ .modal-overlay {
+ display: none;
+ position: fixed;
+ inset: 0;
+ background: rgba(0,0,0,0.7);
+ z-index: 100;
+ justify-content: center;
+ align-items: center;
+ }
+ .modal-overlay.open { display: flex; }
+ .modal {
+ background: var(--bg-card);
+ border: 1px solid var(--border-light);
+ border-radius: 12px;
+ padding: 24px;
+ width: 420px;
+ max-width: 90vw;
+ }
+ .modal h3 { color: var(--primary); margin-bottom: 16px; }
+ .modal input, .modal select {
+ width: 100%;
+ background: var(--bg);
+ border: 1px solid var(--border-light);
+ color: var(--text);
+ padding: 10px;
+ border-radius: 6px;
+ font-family: inherit;
+ font-size: 13px;
+ margin-bottom: 12px;
+ }
+ .modal .btn-row { display: flex; gap: 8px; justify-content: flex-end; }
+ .modal button {
+ background: var(--primary);
+ color: var(--primary-dark);
+ border: none;
+ padding: 8px 18px;
+ border-radius: 6px;
+ font-weight: bold;
+ cursor: pointer;
+ font-family: inherit;
+ }
+ .modal button.secondary { background: var(--border-light); color: var(--text); }
+ .modal button.danger { background: var(--danger); color: #fff; }
+
+ /* Loading spinner */
+ .spinner {
+ display: inline-block;
+ width: 16px; height: 16px;
+ border: 2px solid var(--border-light);
+ border-top-color: var(--primary);
+ border-radius: 50%;
+ animation: spin 0.6s linear infinite;
+ vertical-align: middle;
+ margin-right: 6px;
+ }
+ @keyframes spin { to { transform: rotate(360deg); } }
+
+ .loading-overlay {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 40px;
+ color: var(--text-muted);
+ font-size: 13px;
+ gap: 8px;
+ }
diff --git a/dashboard/dashboard.html b/dashboard/dashboard.html
index 39e1d31a..59e8801a 100644
--- a/dashboard/dashboard.html
+++ b/dashboard/dashboard.html
@@ -4,7 +4,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>🦀 Pinchtab Dashboard</title>
-<link rel="stylesheet" href="/dashboard/styles.css">
+<link rel="stylesheet" href="/dashboard/base.css">
+<link rel="stylesheet" href="/dashboard/agents.css">
+<link rel="stylesheet" href="/dashboard/profiles.css">
+<link rel="stylesheet" href="/dashboard/screencast.css">
+<link rel="stylesheet" href="/dashboard/settings.css">
</head>
<body>
diff --git a/dashboard/profiles.css b/dashboard/profiles.css
new file mode 100644
index 00000000..18147311
--- /dev/null
+++ b/dashboard/profiles.css
@@ -0,0 +1,114 @@
+ /* Profiles panel (bottom) */
+ .profiles-bar {
+ border-top: 1px solid var(--border);
+ padding: 12px 24px;
+ display: flex;
+ gap: 10px;
+ overflow-x: auto;
+ background: var(--bg-subtle);
+ }
+ .profile-chip {
+ background: var(--bg-hover);
+ border: 1px solid var(--border-light);
+ border-radius: 6px;
+ padding: 8px 14px;
+ font-size: 12px;
+ white-space: nowrap;
+ cursor: pointer;
+ transition: border-color 0.2s;
+ }
+ .profile-chip:hover { border-color: var(--primary); }
+ .profile-chip .pname { font-weight: bold; color: var(--text); }
+ .profile-chip .psize { color: var(--text-faint); margin-left: 8px; }
+ .profile-chip .psource { color: var(--primary); font-size: 10px; margin-left: 6px; }
+
+ /* Instances view */
+ .instances-view { height: calc(100vh - 60px); display: flex; flex-direction: column; }
+ .inst-toolbar {
+ padding: 12px 24px;
+ border-bottom: 1px solid var(--border);
+ display: flex;
+ gap: 8px;
+ }
+ .launch-btn {
+ background: var(--primary);
+ color: var(--primary-dark);
+ border: none;
+ padding: 8px 18px;
+ border-radius: 6px;
+ font-weight: bold;
+ cursor: pointer;
+ font-family: inherit;
+ font-size: 13px;
+ }
+ .refresh-btn {
+ background: #333;
+ color: var(--text);
+ border: 1px solid var(--border-active);
+ padding: 8px 14px;
+ border-radius: 6px;
+ cursor: pointer;
+ font-family: inherit;
+ font-size: 13px;
+ }
+ .instances-grid {
+ flex: 1;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
+ gap: 14px;
+ padding: 16px 24px;
+ overflow-y: auto;
+ align-content: start;
+ }
+ .inst-card {
+ background: var(--bg-card);
+ border: 1px solid var(--border);
+ border-radius: 10px;
+ overflow: hidden;
+ }
+ .inst-card .inst-header {
+ padding: 14px 16px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 1px solid var(--bg-hover);
+ }
+ .inst-card .inst-name { font-weight: bold; font-size: 16px; color: var(--primary); }
+ .inst-card .inst-badge {
+ font-size: 11px;
+ padding: 3px 10px;
+ border-radius: 10px;
+ font-weight: 600;
+ }
+ .inst-badge.running { background: var(--success-bg); color: var(--success); }
+ .inst-badge.starting { background: var(--warning-bg); color: var(--warning); }
+ .inst-badge.stopped { background: var(--inactive-bg); color: var(--text-dim); }
+ .inst-badge.error { background: var(--danger-bg); color: var(--danger); }
+ .inst-card .inst-body { padding: 12px 16px; }
+ .inst-card .inst-row {
+ display: flex;
+ justify-content: space-between;
+ font-size: 13px;
+ padding: 3px 0;
+ }
+ .inst-card .inst-row .label { color: var(--text-dim); }
+ .inst-card .inst-row .value { color: var(--text-bright); }
+ .inst-card .inst-actions {
+ padding: 10px 16px;
+ border-top: 1px solid #1a1a1a;
+ display: flex;
+ gap: 6px;
+ }
+ .inst-card .inst-actions button {
+ flex: 1;
+ background: var(--bg-hover);
+ border: 1px solid var(--border-light);
+ color: var(--text-subtle);
+ padding: 6px;
+ border-radius: 4px;
+ font-size: 11px;
+ cursor: pointer;
+ font-family: inherit;
+ }
+ .inst-card .inst-actions button:hover { border-color: var(--primary); color: var(--primary); }
+ .inst-card .inst-actions button.danger:hover { border-color: var(--danger); color: var(--danger); }
diff --git a/dashboard/screencast.css b/dashboard/screencast.css
new file mode 100644
index 00000000..f2e18afe
--- /dev/null
+++ b/dashboard/screencast.css
@@ -0,0 +1,56 @@
+ /* Live view */
+ .live-view { height: calc(100vh - 60px); display: flex; flex-direction: column; }
+ .live-toolbar { padding: 12px 24px; border-bottom: 1px solid var(--border); }
+ .screencast-grid {
+ flex: 1;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
+ gap: 12px;
+ padding: 16px;
+ overflow-y: auto;
+ }
+ .screen-tile {
+ background: var(--bg-raised);
+ border: 1px solid var(--border);
+ border-radius: 8px;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ }
+ .screen-tile .tile-header {
+ padding: 8px 12px;
+ background: var(--bg-card);
+ border-bottom: 1px solid var(--border);
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 12px;
+ }
+ .screen-tile .tile-header .tile-url {
+ color: var(--text-muted);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 280px;
+ }
+ .screen-tile .tile-header .tile-id { color: var(--primary); font-weight: 600; }
+ .screen-tile .tile-header .tile-status {
+ width: 8px; height: 8px; border-radius: 50%;
+ display: inline-block; margin-left: 8px;
+ }
+ .screen-tile .tile-header .tile-status.streaming { background: var(--success); }
+ .screen-tile .tile-header .tile-status.connecting { background: var(--warning); }
+ .screen-tile .tile-header .tile-status.error { background: var(--danger); }
+ .screen-tile canvas {
+ width: 100%;
+ background: #000;
+ cursor: pointer;
+ }
+ .screen-tile .tile-footer {
+ padding: 4px 12px;
+ background: var(--bg-subtle);
+ font-size: 11px;
+ color: var(--text-faint);
+ display: flex;
+ gap: 12px;
+ }
diff --git a/dashboard/settings.css b/dashboard/settings.css
new file mode 100644
index 00000000..9515f693
--- /dev/null
+++ b/dashboard/settings.css
@@ -0,0 +1,52 @@
+ /* Settings view */
+ .settings-view { height: calc(100vh - 60px); overflow-y: auto; }
+ .settings-container { max-width: 600px; margin: 0 auto; padding: 24px; }
+ .settings-title { color: var(--primary); font-size: 18px; margin-bottom: 24px; }
+ .settings-section {
+ background: var(--bg-card);
+ border: 1px solid var(--border);
+ border-radius: 10px;
+ padding: 18px;
+ margin-bottom: 16px;
+ }
+ .settings-section h3 { color: var(--text); font-size: 14px; margin-bottom: 14px; }
+ .setting-row {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 8px 0;
+ border-bottom: 1px solid var(--bg-hover);
+ }
+ .setting-row:last-child { border-bottom: none; }
+ .setting-row label { color: var(--text-muted); font-size: 13px; }
+ .setting-control { display: flex; align-items: center; gap: 10px; }
+ .setting-value { color: var(--primary); font-size: 13px; min-width: 50px; text-align: right; }
+ .setting-control input[type="range"] {
+ width: 140px;
+ accent-color: var(--primary);
+ }
+ .setting-control select {
+ background: var(--bg);
+ border: 1px solid var(--border-light);
+ color: var(--text);
+ padding: 6px 10px;
+ border-radius: 4px;
+ font-family: inherit;
+ font-size: 12px;
+ }
+ .setting-info {
+ font-size: 11px;
+ color: var(--text-dim);
+ margin-top: 8px;
+ padding: 8px;
+ background: var(--bg-subtle);
+ border-radius: 4px;
+ }
+ .toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text-muted); }
+ .toggle input { accent-color: var(--primary); }
+ .toggle-label { min-width: 24px; }
+ .server-info { font-size: 12px; color: var(--text-muted); line-height: 1.8; }
+ .server-info .info-row { display: flex; justify-content: space-between; }
+ .server-info .info-label { color: var(--text-dim); }
+ .server-info .info-val { color: var(--text); }
+ .settings-actions { display: flex; gap: 8px; margin-top: 8px; }
diff --git a/dashboard/styles.css b/dashboard/styles.css
deleted file mode 100644
index a25ae2f8..00000000
--- a/dashboard/styles.css
+++ /dev/null
@@ -1,513 +0,0 @@
-:root {
- /* Brand */
- --primary: #f5c542;
- --primary-dark: #0a0a0a;
-
- /* Surfaces */
- --bg: #0a0a0a;
- --bg-raised: #111;
- --bg-card: #151515;
- --bg-input: #0a0a0a;
- --bg-hover: #1a1a1a;
- --bg-subtle: #0d0d0d;
-
- /* Borders */
- --border: #222;
- --border-light: #333;
- --border-active: #444;
-
- /* Text */
- --text: #e0e0e0;
- --text-muted: #888;
- --text-dim: #666;
- --text-faint: #555;
- --text-subtle: #aaa;
- --text-bright: #ccc;
-
- /* Status */
- --success: #4ade80;
- --success-bg: #064e3b;
- --warning: #fbbf24;
- --warning-bg: #422006;
- --danger: #f87171;
- --danger-bg: #3a1a1a;
- --inactive-bg: #1c1917;
-
- /* Typography */
- --font: 'SF Mono', 'Fira Code', monospace;
- }
-
- * { margin: 0; padding: 0; box-sizing: border-box; }
- body {
- font-family: var(--font);
- background: var(--bg);
- color: var(--text);
- min-height: 100vh;
- }
- header {
- background: var(--bg-raised);
- border-bottom: 2px solid var(--primary);
- padding: 16px 24px;
- display: flex;
- align-items: center;
- gap: 16px;
- }
- header h1 { font-size: 20px; color: var(--primary); }
- header .status { font-size: 13px; color: var(--text-muted); }
- header .status .dot {
- display: inline-block;
- width: 8px; height: 8px;
- border-radius: 50%;
- background: var(--success);
- margin-right: 4px;
- animation: pulse 2s infinite;
- }
- @keyframes pulse {
- 0%, 100% { opacity: 1; }
- 50% { opacity: 0.4; }
- }
-
- .container { display: flex; height: calc(100vh - 60px); }
-
- /* Left panel — agents */
- .agents-panel {
- width: 340px;
- border-right: 1px solid var(--border);
- overflow-y: auto;
- padding: 16px;
- }
- .agents-panel h2 {
- font-size: 13px;
- text-transform: uppercase;
- letter-spacing: 1px;
- color: var(--text-muted);
- margin-bottom: 12px;
- }
- .agent-card {
- background: var(--bg-card);
- border: 1px solid var(--border);
- border-radius: 8px;
- padding: 14px;
- margin-bottom: 10px;
- cursor: pointer;
- transition: border-color 0.2s;
- }
- .agent-card:hover, .agent-card.selected { border-color: var(--primary); }
- .agent-card .agent-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 8px;
- }
- .agent-card .agent-name { font-weight: bold; font-size: 15px; }
- .agent-card .agent-status {
- font-size: 11px;
- padding: 2px 8px;
- border-radius: 10px;
- font-weight: 600;
- }
- .agent-status.active { background: var(--success-bg); color: var(--success); }
- .agent-status.idle { background: var(--warning-bg); color: var(--warning); }
- .agent-status.disconnected { background: var(--inactive-bg); color: var(--text-dim); }
- .agent-card .agent-url {
- font-size: 12px;
- color: var(--text-muted);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- margin-bottom: 4px;
- }
- .agent-card .agent-meta {
- font-size: 11px;
- color: var(--text-faint);
- display: flex;
- gap: 12px;
- }
-
- /* Right panel — activity feed */
- .feed-panel {
- flex: 1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- }
- .feed-header {
- padding: 16px 24px;
- border-bottom: 1px solid var(--border);
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .feed-header h2 { font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
- .feed-header .filter-btns { display: flex; gap: 6px; }
- .feed-header .filter-btn {
- background: var(--bg-hover);
- border: 1px solid var(--border-light);
- color: var(--text-subtle);
- padding: 4px 10px;
- border-radius: 4px;
- font-size: 11px;
- cursor: pointer;
- font-family: inherit;
- }
- .feed-header .filter-btn.active { border-color: var(--primary); color: var(--primary); }
-
- .feed-list {
- flex: 1;
- overflow-y: auto;
- padding: 8px 24px;
- }
- .event-row {
- display: grid;
- grid-template-columns: 90px 100px 1fr 70px 60px;
- gap: 12px;
- padding: 8px 0;
- border-bottom: 1px solid var(--bg-hover);
- font-size: 13px;
- align-items: center;
- animation: fadeIn 0.3s ease;
- }
- @keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }
- .event-row .time { color: var(--text-faint); font-size: 11px; }
- .event-row .agent {
- color: var(--primary);
- font-weight: 600;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .event-row .action-detail {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .event-row .action-detail .method {
- display: inline-block;
- padding: 1px 5px;
- border-radius: 3px;
- font-size: 10px;
- font-weight: bold;
- margin-right: 4px;
- }
- .method.GET { background: #1a3a2a; color: var(--success); }
- .method.POST { background: #1a2a3a; color: #60a5fa; }
- .method.DELETE { background: var(--danger-bg); color: var(--danger); }
- .event-row .duration { color: var(--text-dim); text-align: right; font-size: 12px; }
- .event-row .status-code { text-align: right; font-size: 12px; }
- .status-code.ok { color: var(--success); }
- .status-code.err { color: var(--danger); }
-
- /* Profiles panel (bottom) */
- .profiles-bar {
- border-top: 1px solid var(--border);
- padding: 12px 24px;
- display: flex;
- gap: 10px;
- overflow-x: auto;
- background: var(--bg-subtle);
- }
- .profile-chip {
- background: var(--bg-hover);
- border: 1px solid var(--border-light);
- border-radius: 6px;
- padding: 8px 14px;
- font-size: 12px;
- white-space: nowrap;
- cursor: pointer;
- transition: border-color 0.2s;
- }
- .profile-chip:hover { border-color: var(--primary); }
- .profile-chip .pname { font-weight: bold; color: var(--text); }
- .profile-chip .psize { color: var(--text-faint); margin-left: 8px; }
- .profile-chip .psource { color: var(--primary); font-size: 10px; margin-left: 6px; }
-
- /* Settings view */
- .settings-view { height: calc(100vh - 60px); overflow-y: auto; }
- .settings-container { max-width: 600px; margin: 0 auto; padding: 24px; }
- .settings-title { color: var(--primary); font-size: 18px; margin-bottom: 24px; }
- .settings-section {
- background: var(--bg-card);
- border: 1px solid var(--border);
- border-radius: 10px;
- padding: 18px;
- margin-bottom: 16px;
- }
- .settings-section h3 { color: var(--text); font-size: 14px; margin-bottom: 14px; }
- .setting-row {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 8px 0;
- border-bottom: 1px solid var(--bg-hover);
- }
- .setting-row:last-child { border-bottom: none; }
- .setting-row label { color: var(--text-muted); font-size: 13px; }
- .setting-control { display: flex; align-items: center; gap: 10px; }
- .setting-value { color: var(--primary); font-size: 13px; min-width: 50px; text-align: right; }
- .setting-control input[type="range"] {
- width: 140px;
- accent-color: var(--primary);
- }
- .setting-control select {
- background: var(--bg);
- border: 1px solid var(--border-light);
- color: var(--text);
- padding: 6px 10px;
- border-radius: 4px;
- font-family: inherit;
- font-size: 12px;
- }
- .setting-info {
- font-size: 11px;
- color: var(--text-dim);
- margin-top: 8px;
- padding: 8px;
- background: var(--bg-subtle);
- border-radius: 4px;
- }
- .toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text-muted); }
- .toggle input { accent-color: var(--primary); }
- .toggle-label { min-width: 24px; }
- .server-info { font-size: 12px; color: var(--text-muted); line-height: 1.8; }
- .server-info .info-row { display: flex; justify-content: space-between; }
- .server-info .info-label { color: var(--text-dim); }
- .server-info .info-val { color: var(--text); }
- .settings-actions { display: flex; gap: 8px; margin-top: 8px; }
-
- /* Instances view */
- .instances-view { height: calc(100vh - 60px); display: flex; flex-direction: column; }
- .inst-toolbar {
- padding: 12px 24px;
- border-bottom: 1px solid var(--border);
- display: flex;
- gap: 8px;
- }
- .launch-btn {
- background: var(--primary);
- color: var(--primary-dark);
- border: none;
- padding: 8px 18px;
- border-radius: 6px;
- font-weight: bold;
- cursor: pointer;
- font-family: inherit;
- font-size: 13px;
- }
- .refresh-btn {
- background: #333;
- color: var(--text);
- border: 1px solid var(--border-active);
- padding: 8px 14px;
- border-radius: 6px;
- cursor: pointer;
- font-family: inherit;
- font-size: 13px;
- }
- .instances-grid {
- flex: 1;
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
- gap: 14px;
- padding: 16px 24px;
- overflow-y: auto;
- align-content: start;
- }
- .inst-card {
- background: var(--bg-card);
- border: 1px solid var(--border);
- border-radius: 10px;
- overflow: hidden;
- }
- .inst-card .inst-header {
- padding: 14px 16px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid var(--bg-hover);
- }
- .inst-card .inst-name { font-weight: bold; font-size: 16px; color: var(--primary); }
- .inst-card .inst-badge {
- font-size: 11px;
- padding: 3px 10px;
- border-radius: 10px;
- font-weight: 600;
- }
- .inst-badge.running { background: var(--success-bg); color: var(--success); }
- .inst-badge.starting { background: var(--warning-bg); color: var(--warning); }
- .inst-badge.stopped { background: var(--inactive-bg); color: var(--text-dim); }
- .inst-badge.error { background: var(--danger-bg); color: var(--danger); }
- .inst-card .inst-body { padding: 12px 16px; }
- .inst-card .inst-row {
- display: flex;
- justify-content: space-between;
- font-size: 13px;
- padding: 3px 0;
- }
- .inst-card .inst-row .label { color: var(--text-dim); }
- .inst-card .inst-row .value { color: var(--text-bright); }
- .inst-card .inst-actions {
- padding: 10px 16px;
- border-top: 1px solid #1a1a1a;
- display: flex;
- gap: 6px;
- }
- .inst-card .inst-actions button {
- flex: 1;
- background: var(--bg-hover);
- border: 1px solid var(--border-light);
- color: var(--text-subtle);
- padding: 6px;
- border-radius: 4px;
- font-size: 11px;
- cursor: pointer;
- font-family: inherit;
- }
- .inst-card .inst-actions button:hover { border-color: var(--primary); color: var(--primary); }
- .inst-card .inst-actions button.danger:hover { border-color: var(--danger); color: var(--danger); }
-
- /* View toggle */
- .view-toggle { margin-left: auto; display: flex; gap: 4px; }
- .view-btn {
- background: var(--bg-hover);
- border: 1px solid var(--border-light);
- color: var(--text-subtle);
- padding: 6px 14px;
- border-radius: 4px;
- font-size: 12px;
- cursor: pointer;
- font-family: inherit;
- }
- .view-btn.active { border-color: var(--primary); color: var(--primary); }
-
- /* Live view */
- .live-view { height: calc(100vh - 60px); display: flex; flex-direction: column; }
- .live-toolbar { padding: 12px 24px; border-bottom: 1px solid var(--border); }
- .screencast-grid {
- flex: 1;
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
- gap: 12px;
- padding: 16px;
- overflow-y: auto;
- }
- .screen-tile {
- background: var(--bg-raised);
- border: 1px solid var(--border);
- border-radius: 8px;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- }
- .screen-tile .tile-header {
- padding: 8px 12px;
- background: var(--bg-card);
- border-bottom: 1px solid var(--border);
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 12px;
- }
- .screen-tile .tile-header .tile-url {
- color: var(--text-muted);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 280px;
- }
- .screen-tile .tile-header .tile-id { color: var(--primary); font-weight: 600; }
- .screen-tile .tile-header .tile-status {
- width: 8px; height: 8px; border-radius: 50%;
- display: inline-block; margin-left: 8px;
- }
- .screen-tile .tile-header .tile-status.streaming { background: var(--success); }
- .screen-tile .tile-header .tile-status.connecting { background: var(--warning); }
- .screen-tile .tile-header .tile-status.error { background: var(--danger); }
- .screen-tile canvas {
- width: 100%;
- background: #000;
- cursor: pointer;
- }
- .screen-tile .tile-footer {
- padding: 4px 12px;
- background: var(--bg-subtle);
- font-size: 11px;
- color: var(--text-faint);
- display: flex;
- gap: 12px;
- }
-
- .empty-state {
- text-align: center;
- color: var(--text-faint);
- padding: 60px;
- font-size: 14px;
- }
- .empty-state .crab { font-size: 48px; margin-bottom: 12px; }
-
- /* Profile management modal */
- .modal-overlay {
- display: none;
- position: fixed;
- inset: 0;
- background: rgba(0,0,0,0.7);
- z-index: 100;
- justify-content: center;
- align-items: center;
- }
- .modal-overlay.open { display: flex; }
- .modal {
- background: var(--bg-card);
- border: 1px solid var(--border-light);
- border-radius: 12px;
- padding: 24px;
- width: 420px;
- max-width: 90vw;
- }
- .modal h3 { color: var(--primary); margin-bottom: 16px; }
- .modal input, .modal select {
- width: 100%;
- background: var(--bg);
- border: 1px solid var(--border-light);
- color: var(--text);
- padding: 10px;
- border-radius: 6px;
- font-family: inherit;
- font-size: 13px;
- margin-bottom: 12px;
- }
- .modal .btn-row { display: flex; gap: 8px; justify-content: flex-end; }
- .modal button {
- background: var(--primary);
- color: var(--primary-dark);
- border: none;
- padding: 8px 18px;
- border-radius: 6px;
- font-weight: bold;
- cursor: pointer;
- font-family: inherit;
- }
- .modal button.secondary { background: var(--border-light); color: var(--text); }
- .modal button.danger { background: var(--danger); color: #fff; }
-
- /* Loading spinner */
- .spinner {
- display: inline-block;
- width: 16px; height: 16px;
- border: 2px solid var(--border-light);
- border-top-color: var(--primary);
- border-radius: 50%;
- animation: spin 0.6s linear infinite;
- vertical-align: middle;
- margin-right: 6px;
- }
- @keyframes spin { to { transform: rotate(360deg); } }
-
- .loading-overlay {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 40px;
- color: var(--text-muted);
- font-size: 13px;
- gap: 8px;
- }