Initial import of streamline

This commit is contained in:
2026-11-16 17:26:44 -08:00
commit 8e4aec1855
1221 changed files with 274256 additions and 0 deletions
+516
View File
@@ -0,0 +1,516 @@
/*
* Styles only the Dashboard overlay (Dashboard.tsx + RsiPanel, TrendChart, …) renders — split out of
* styles.css so they ship with that panel's lazy chunk instead of the
* render-blocking global stylesheet.
*
* This file loads AFTER styles.css (Vite appends the chunk's <link> on first
* open, before the panel renders), so:
* - only add selectors built on classes used exclusively by this panel's
* chunk — control-web/test/panel_css_scope.test.ts enforces it;
* - a class shared with the board / drawer / another panel stays in styles.css;
* - don't depend on source order against a styles.css rule; use specificity.
*/
/* Toolbar: the sub-tabs on the left, the 人员 / 分组 filter (概览 only) on the right. */
.dash-toolbar {
display: flex; align-items: center; justify-content: space-between;
gap: 12px; flex-wrap: wrap; margin-bottom: -4px;
}
/* 概览 / 节点利用率 / … — a horizontal segmented control in the board's glass
(38px tall, same as the filter beside it); the pick is a translucent blue pill
with a solid blue label, like the create dialog's tabs. */
.dash-tabs {
display: inline-flex; align-items: center; gap: 2px; padding: 3px;
border: 1px solid var(--glass-ctl-edge); border-radius: 9999px;
background: var(--glass-ctl); box-shadow: none;
-webkit-backdrop-filter: var(--glass-ctl-blur); backdrop-filter: var(--glass-ctl-blur);
}
@media (prefers-reduced-transparency: reduce) {
.dash-tabs { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.dash-tabs > button.dash-tab {
display: inline-flex; align-items: center; gap: 7px;
height: 32px; padding: 0 16px; margin: 0;
border: 0; border-radius: 9999px; background: transparent; box-shadow: none;
color: var(--text-2); font-size: 13.5px; font-weight: 550; white-space: nowrap; cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
.dash-tabs > button.dash-tab:hover:not(.on) { background: var(--glass-ctl); color: var(--text); }
.dash-tabs > button.dash-tab.on { background: rgba(6, 147, 252, 0.14); color: #0067c7; }
:root[data-theme="dark"] .dash-tabs > button.dash-tab:hover:not(.on) { background: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] .dash-tabs > button.dash-tab.on { background: rgba(6, 147, 252, 0.2); color: #6cc0ff; }
.dash-filters { margin-left: auto; }
.dash-heroes {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px;
}
.dash-ring {
width: 84px; height: 84px; border-radius: 50%; flex: none;
display: grid; place-items: center;
}
.dash-ring-hole {
width: 64px; height: 64px; border-radius: 50%;
background: var(--surface);
display: grid; place-items: center;
font-size: 22px; font-weight: 700; color: var(--text);
}
.dash-ring-pct { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.dash-metric-meta { min-width: 0; }
.dash-metric-head {
display: flex; align-items: center; gap: 7px;
font-size: 13.5px; font-weight: 600; color: var(--text);
}
.dash-metric-head svg { color: var(--muted); }
.dash-cols {
display: grid;
grid-template-columns: 1.4fr 1fr;
gap: 16px;
align-items: start;
}
@media (max-width: 900px) {
.dash-cols { grid-template-columns: 1fr; }
.dash-fleet-grid { grid-template-columns: 1fr; }
.dash-fleet-grid > * { padding: 0; }
.dash-fleet-grid > * + * {
border-left: 0;
border-top: 1px solid var(--border);
padding-top: 16px;
margin-top: 16px;
}
}
.dash-col-side { display: flex; flex-direction: column; gap: 16px; }
.dash-bars { display: flex; flex-direction: column; gap: 9px; }
.dash-bar-row, .dash-split-row { display: grid; grid-template-columns: 88px 1fr 32px; align-items: center; gap: 10px; }
.dash-bar-label, .dash-split-label { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-bar-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.dash-bar-fill { height: 100%; border-radius: 999px; min-width: 2px; transition: width 0.3s ease; }
.dash-bar-val { font-size: 12.5px; font-weight: 600; color: var(--text); text-align: right; }
.dash-split { display: flex; flex-direction: column; gap: 12px; }
.dash-kind-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: -4px 0 12px; font-size: 11.5px; color: var(--muted); }
.dash-kind-key { display: inline-flex; align-items: center; gap: 6px; }
.dash-kind-swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.dash-kind-swatch--bug { background: #0693fc; }
.dash-kind-swatch--feature { background: #eb6834; }
.dash-kind-swatch--security { background: #1baf7a; }
.dash-kind-swatch--prototype { background: #eda100; }
.dash-kind-swatch--verify { background: #6250d6; }
.dash-bar-row--stack { grid-template-columns: 88px minmax(0, 1fr) 32px; }
.dash-bar-track--stack {
display: flex; height: 8px; border-radius: 999px;
background: var(--surface-2); overflow: hidden; min-width: 2px; justify-self: start;
}
.dash-stack { height: 100%; min-width: 0; }
.dash-stack--bug { background: #0693fc; }
.dash-stack--feature { background: #eb6834; opacity: 0.75; }
.dash-stack--security { background: #1baf7a; opacity: 0.8; }
.dash-stack--prototype { background: #eda100; opacity: 0.8; }
.dash-stack--verify { background: #6250d6; opacity: 0.75; }
.dash-fleet-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0;
align-items: start;
}
.dash-fleet-grid > * {
min-width: 0;
padding: 0 18px;
}
.dash-fleet-grid > :first-child { padding-left: 0; }
.dash-fleet-grid > :last-child { padding-right: 0; }
.dash-fleet-grid > * + * {
border-left: 1px solid var(--border);
}
.dash-kind-pie {
display: flex;
flex-direction: column;
gap: 12px;
}
.dash-kind-pie-head {
display: flex;
align-items: center;
gap: 14px;
}
.dash-kind-frac {
display: flex;
align-items: baseline;
flex-wrap: wrap;
gap: 2px;
margin-top: 6px;
font-variant-numeric: tabular-nums;
letter-spacing: -0.02em;
line-height: 1;
}
.dash-kind-frac-num {
font-size: 28px;
font-weight: 750;
color: var(--text);
}
.dash-kind-frac-slash {
font-size: 18px;
font-weight: 600;
color: var(--muted);
margin: 0 3px;
}
.dash-kind-frac-den {
font-size: 22px;
font-weight: 650;
color: var(--text-2);
}
.dash-kind-frac-note {
margin-left: 8px;
font-size: 11.5px;
font-weight: 500;
letter-spacing: 0;
color: var(--muted);
white-space: nowrap;
}
.dash-finish-scope {
border-top: 1px solid var(--border);
padding-top: 10px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 5px 10px;
}
.dash-finish-scope-title {
grid-column: 1 / -1;
font-size: 10.5px;
font-weight: 650;
color: var(--muted);
margin-bottom: 2px;
}
.dash-finish-scope-row {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
color: var(--muted);
}
.dash-finish-scope-label {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dash-finish-scope-n {
font-variant-numeric: tabular-nums;
font-weight: 650;
color: var(--text);
}
.dash-pie-swatch {
width: 7px; height: 7px; border-radius: 50%; flex: none;
}
.dash-outcome { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.dash-outcome-kind { width: 6.5rem; }
.dash-outcome-avg { width: 7.5rem; }
.dash-outcome-fail { width: 5.5rem; }
.dash-outcome-hint { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.45; max-width: 72rem; }
.dash-panel-title .dash-outcome-alltime { margin-left: auto; font-weight: 600; }
.dash-outcome th, .dash-outcome td { padding: 7px 6px; text-align: right; }
.dash-outcome thead th { color: var(--muted); font-weight: 600; font-size: 11px; white-space: nowrap; }
.dash-outcome thead th:first-child,
.dash-outcome tbody th { text-align: left; font-weight: 500; color: var(--text-2); }
.dash-outcome thead th:first-child { font-weight: 600; color: var(--muted); }
.dash-outcome tbody th { white-space: nowrap; }
.dash-outcome tbody th .dash-kind-swatch { display: inline-block; margin-right: 6px; vertical-align: middle; }
.dash-outcome tbody tr + tr th, .dash-outcome tbody tr + tr td { border-top: 1px solid var(--border); }
.dash-outcome td small,
.dash-outcome tbody th small { display: block; font-size: 10.5px; color: var(--muted-2); font-weight: 400; }
@media (max-width: 640px) {
.dash-heroes { grid-template-columns: 1fr 1fr; gap: 10px; }
.dash-ring { width: 72px; height: 72px; }
.dash-ring-hole { width: 54px; height: 54px; font-size: 19px; }
.dash-cols { gap: 12px; }
.dash-kind-frac-num { font-size: 24px; }
.dash-kind-frac-den { font-size: 18px; }
.dash-col-side { gap: 12px; }
.dash-bar-row, .dash-split-row, .dash-bar-row--stack { grid-template-columns: 70px 1fr 28px; gap: 8px; }
.dash-bar-label, .dash-split-label { font-size: 11px; }
}
/* Phones in portrait: two hero cards per row get tight — allow a single column. */
@media (max-width: 380px) {
.dash-heroes { grid-template-columns: 1fr; }
}
.lab-row-notes { font-size: 11px; line-height: 1.5; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-star { color: var(--warning); flex-shrink: 0; }
.lab-btn--wide { width: 100%; justify-content: center; }
/* Library editor */
.lab-lib-editor { display: flex; flex-direction: column; gap: 10px; }
.rsi-body { display: flex; flex-direction: column; gap: 14px; padding: 12px 2px 20px; }
.rsi-p { margin: 0 0 6px; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.rsi-p--em { color: var(--text); }
.rsi-muted { color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.rsi-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }
.rsi-pre { margin: 4px 0 10px; padding: 10px 12px; background: var(--surface-2);
border: 1px solid var(--hairline); border-radius: var(--r-sm);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
line-height: 1.5; color: var(--text-2); overflow-x: auto; }
.rsi-flash { padding: 8px 12px; font-size: 12.5px; color: var(--accent);
background: var(--accent-soft); border: 1px solid var(--accent-edge); border-radius: var(--r-sm); }
.rsi-warnline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
padding: 8px 12px; font-size: 12.5px; color: var(--danger);
background: var(--danger-bg); border: 1px solid var(--danger-edge); border-radius: var(--r-sm); }
.rsi-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rsi-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
padding: 5px 0; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--hairline); }
.rsi-kv:last-child { border-bottom: 0; }
.rsi-kv b { color: var(--text); font-variant-numeric: tabular-nums; }
.rsi-hl { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
/* Hero ring metrics — same idea as .dash-ring, sized for four across. */
.rsi-hero { display: flex; align-items: center; gap: 12px; padding: 14px 16px;
background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.rsi-hero--weak { opacity: 0.72; }
.rsi-hero-ring { width: 62px; height: 62px; border-radius: 50%; flex: none;
display: grid; place-items: center; }
.rsi-hero-hole { width: 48px; height: 48px; border-radius: 50%; background: var(--surface);
display: grid; place-items: center; font-size: 17px; font-weight: 700; color: var(--text);
font-variant-numeric: tabular-nums; }
.rsi-hero-hole span { font-size: 10px; color: var(--muted); margin-left: 1px; }
.rsi-hero-title { font-size: 13px; font-weight: 600; color: var(--text); }
.rsi-hero-note { font-size: 11.5px; color: var(--accent); }
.rsi-hero-sample { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
/* Metric tree rows: the whole row is the disclosure control for its methodology. */
.rsi-metrics { display: flex; flex-direction: column; }
.rsi-metric { border-bottom: 1px solid var(--hairline); }
.rsi-metric--weak .rsi-metric-val, .rsi-metric--weak .rsi-metric-label { color: var(--muted); }
.rsi-metric-row { width: 100%; display: grid; align-items: center; gap: 10px;
grid-template-columns: 14px 1fr 76px 62px 70px auto 60px;
padding: 8px 4px; background: none; border: 0; cursor: pointer; text-align: left; }
.rsi-metric-row:hover { background: var(--surface-2); }
.rsi-metric-label { font-size: 13px; color: var(--text); }
.rsi-metric-val { font-size: 14.5px; font-weight: 650; text-align: right;
font-variant-numeric: tabular-nums; color: var(--text); }
.rsi-metric-delta { font-size: 11.5px; display: inline-flex; align-items: center; gap: 2px;
font-variant-numeric: tabular-nums; }
.rsi-metric-delta.up { color: var(--success); }
.rsi-metric-delta.down { color: var(--danger); }
.rsi-metric-sample { font-size: 11.5px; color: var(--muted-2); text-align: right;
font-variant-numeric: tabular-nums; }
.rsi-metric-doc { display: flex; flex-direction: column; gap: 5px; padding: 8px 12px 12px 28px;
font-size: 12.5px; line-height: 1.75; color: var(--muted); background: var(--surface-2); }
.rsi-metric-doc b { display: inline-block; min-width: 74px; color: var(--text-2); font-weight: 600; }
.rsi-spark { width: 60px; height: 18px; }
.rsi-calib { display: flex; gap: 18px; }
.rsi-calib-col { flex: 1; text-align: center; padding: 10px; background: var(--surface-2);
border-radius: var(--r-sm); }
.rsi-calib-num { font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rsi-calib-lab { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
/* Badges — one small vocabulary shared by every RSI surface. */
.rsi-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
white-space: nowrap; border: 1px solid var(--border); color: var(--muted); background: var(--surface-3); }
.rsi-badge--ok { color: var(--success); background: var(--success-bg); border-color: var(--success-edge); }
.rsi-badge--warn { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-edge); }
.rsi-badge--bad { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-edge); }
.rsi-badge--info { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-edge); }
/* Failure clusters */
.rsi-cluster { border-bottom: 1px solid var(--hairline); padding: 4px 0; }
.rsi-cluster-head { width: 100%; display: grid; align-items: center; gap: 10px;
grid-template-columns: 14px 190px auto 1fr 190px; padding: 6px 4px;
background: none; border: 0; cursor: pointer; text-align: left; }
.rsi-cluster-head:hover { background: var(--surface-2); }
.rsi-cluster-name { font-size: 13px; color: var(--text); }
.rsi-cluster-bar { min-width: 60px; }
.rsi-cluster-num { font-size: 11.5px; color: var(--muted); text-align: right;
font-variant-numeric: tabular-nums; }
.rsi-samples { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px 12px 28px; }
.rsi-sample { border-left: 2px solid var(--border-strong); padding-left: 10px; }
.rsi-sample-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsi-sample-title { font-size: 12px; color: var(--text-2); }
.rsi-sample-body { font-size: 12px; color: var(--muted); line-height: 1.65; white-space: pre-wrap; }
/* Research log + strategies */
.rsi-log { display: flex; flex-direction: column; gap: 14px; }
.rsi-strategy { padding: 12px; margin-top: 8px; background: var(--surface-2);
border: 1px solid var(--border); border-radius: var(--r-sm);
display: flex; flex-direction: column; gap: 6px; }
.rsi-strategy-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsi-strategy-head b { font-size: 13px; color: var(--text); }
.rsi-strategy-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsi-knobhint { font-size: 11.5px; }
.rsi-evidence { font-size: 12px; padding: 6px 10px; border-radius: var(--r-sm); line-height: 1.6; }
.rsi-evidence.ok { color: var(--text-2); background: var(--surface-3); }
.rsi-evidence.bad { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-edge); }
.rsi-outcome { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.rsi-outcome .up { color: var(--success); }
.rsi-outcome .down { color: var(--danger); }
.rsi-finding { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.rsi-finding header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.rsi-item { padding: 6px 10px; margin-top: 6px; border-left: 3px solid var(--border-strong);
background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 12.5px; }
.rsi-item--critical { border-left-color: var(--danger); }
.rsi-item--warn { border-left-color: var(--warning); }
.rsi-deltas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rsi-delta { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3);
color: var(--muted); font-variant-numeric: tabular-nums; }
.rsi-delta.up { color: var(--success); background: var(--success-bg); }
.rsi-delta.down { color: var(--danger); background: var(--danger-bg); }
.rsi-delta.weak { opacity: 0.6; }
.rsi-compose { display: flex; flex-direction: column; gap: 8px; padding: 10px;
background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--r-sm); }
.rsi-compose-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rsi-compose-row .lab-input { flex: 1; min-width: 220px; }
.rsi-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Prompt lab */
.rsi-lab { display: flex; flex-direction: column; gap: 12px; }
.rsi-lab-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rsi-active-chip { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rsi-active-chip b { color: var(--text); }
.rsi-danger-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
padding: 8px 10px; font-size: 12px; color: var(--warning);
background: var(--warning-bg); border: 1px solid var(--warning-edge); border-radius: var(--r-sm); }
.rsi-weights { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rsi-weight { font-size: 11.5px; color: var(--muted); background: var(--surface-3);
border-radius: 999px; padding: 1px 8px; }
.rsi-batch-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 4px;
background: none; border: 0; border-bottom: 1px solid var(--hairline); cursor: pointer;
text-align: left; font-size: 12.5px; color: var(--text-2); }
.rsi-batch-row:hover { background: var(--surface-2); }
.rsi-batch-name { flex: 1; color: var(--text); }
.rsi-batch-prog { display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
font-variant-numeric: tabular-nums; }
.rsi-batch-detail { margin-top: 10px; padding: 10px; background: var(--surface-2);
border: 1px solid var(--border); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: 8px; }
.rsi-batch-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsi-scoreline { display: flex; gap: 14px; flex-wrap: wrap; }
.rsi-score { display: flex; flex-direction: column; }
.rsi-score-label { font-size: 11px; color: var(--muted); }
.rsi-score b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.rsi-runs { display: flex; flex-direction: column; }
.rsi-run { display: flex; align-items: center; gap: 8px; padding: 5px 4px; background: none;
border: 0; border-bottom: 1px solid var(--hairline); cursor: pointer; text-align: left; font-size: 12px; }
.rsi-run:hover { background: var(--surface-3); }
.rsi-run-title { flex: 1; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rsi-run-score { display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
font-variant-numeric: tabular-nums; }
.rsi-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.rsi-dot--done { background: var(--success); }
.rsi-dot--error { background: var(--danger); }
.rsi-dot--running { background: var(--warning); }
.rsi-caveats { margin: 4px 0 0; padding-left: 18px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
/* Run detail / propose modals */
.rsi-modal { position: fixed; inset: 0; z-index: 60; background: rgba(9, 11, 16, 0.45);
display: grid; place-items: center; padding: 24px; }
.rsi-modal-body { width: min(1180px, 96vw); max-height: 88vh; overflow: auto; padding: 16px;
background: var(--elev); border: 1px solid var(--border); border-radius: var(--r);
display: flex; flex-direction: column; gap: 10px; }
.rsi-modal-body--sm { width: min(620px, 94vw); }
.rsi-modal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rsi-modal-foot { display: flex; justify-content: flex-end; }
.rsi-two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; }
.rsi-col h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--text-2); }
.rsi-output { margin: 0; padding: 10px; max-height: 56vh; overflow: auto; white-space: pre-wrap;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; line-height: 1.6;
background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-sm); color: var(--text-2); }
.rsi-cond { padding: 7px 9px; margin-bottom: 6px; background: var(--surface-2);
border-left: 3px solid var(--border-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.rsi-cond--contradicted { border-left-color: var(--danger); }
.rsi-cond--predicted { border-left-color: var(--success); }
.rsi-cond-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; }
.rsi-cond-body { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.rsi-cond-said { font-size: 11.5px; color: var(--danger); }
.rsi-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
/* Tool gaps */
.rsi-gap { padding: 10px; margin-top: 8px; background: var(--surface-2);
border: 1px solid var(--border); border-radius: var(--r-sm);
display: flex; flex-direction: column; gap: 6px; }
.rsi-gap--ignored { opacity: 0.55; }
.rsi-gap--toolized { border-color: var(--success-edge); background: var(--success-bg); }
.rsi-gap-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsi-gap-sig { font-size: 12.5px; color: var(--text); }
.rsi-gap-num { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rsi-gap-sample { display: block; padding: 6px 8px; font-size: 11px; color: var(--muted);
background: var(--surface-3); border-radius: var(--r-sm); white-space: pre-wrap; word-break: break-all; }
.rsi-gap-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Methodology page */
.rsi-doc { display: flex; flex-direction: column; gap: 14px; }
.rsi-table { display: flex; flex-direction: column; font-size: 12.5px; }
.rsi-tr { display: grid; grid-template-columns: 70px 200px 1fr; gap: 10px; padding: 6px 4px;
border-bottom: 1px solid var(--hairline); align-items: baseline; }
.rsi-tr--head { font-weight: 600; color: var(--text-2); background: var(--surface-2); }
.rsi-tr--on { background: var(--success-bg); }
.rsi-tr--partial { background: var(--warning-bg); }
.rsi-rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px;
font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.rsi-rules b { display: block; color: var(--text); }
.rsi-loop { padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.rsi-loop-name { font-size: 13px; font-weight: 600; color: var(--text); }
.rsi-loop-line { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.rsi-loop-where { font-size: 11px; color: var(--accent); }
.rsi-loops { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rsi-loopcard { display: flex; flex-direction: column; gap: 3px; padding: 10px;
background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-sm); }
.rsi-loopcard b { font-size: 12.5px; color: var(--text); }
.rsi-loopcard span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.rsi-loopcard code { font-size: 10.5px; color: var(--accent); }
.rsi-sources ul { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
@media (max-width: 900px) {
.rsi-two-col { grid-template-columns: minmax(0, 1fr); }
.rsi-metric-row { grid-template-columns: 14px 1fr 70px 56px; }
.rsi-metric-row .rsi-metric-sample, .rsi-metric-row .rsi-spark { display: none; }
.rsi-cluster-head { grid-template-columns: 14px 1fr 150px; }
.rsi-cluster-head .rsi-cluster-bar, .rsi-cluster-head .rsi-badge { display: none; }
}
/* Hand-off from the board's live rates to the persisted quality snapshots. */
.dash-rsi-cta { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
margin-top: 12px; text-align: left; cursor: pointer;
background: var(--surface); border: 1px solid var(--accent-edge); border-radius: var(--r);
color: var(--text); transition: background 120ms ease, border-color 120ms ease; }
.dash-rsi-cta:hover { background: var(--accent-soft); border-color: var(--accent); }
.dash-rsi-cta > svg { color: var(--accent); flex: none; }
.dash-rsi-cta-main { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dash-rsi-cta-main b { font-size: 13px; }
.dash-rsi-cta-main span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.dash-rsi-cta-go { font-size: 12px; color: var(--accent); white-space: nowrap; }
/* ── RSI 自动实验(RsiLoop.tsx)────────────────────────────────────────────── */
.rsi-loop-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rsi-loop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rsi-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.rsi-chip.on { border-color: var(--accent-edge); background: var(--accent-soft); color: var(--accent); }
.rsi-loop-chart { width: 100%; height: 190px; display: block; background: var(--surface-2); border-radius: var(--r-sm); margin-bottom: 6px; }
.rsi-loop-axis { font-size: 10px; fill: var(--muted); }
.rsi-loop-detail { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.rsi-loop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .rsi-loop-grid { grid-template-columns: 1fr; } }
.rsi-loop-block { border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); padding: 8px 10px; min-width: 0; }
.rsi-loop-block-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 4px; display: flex; align-items: center; }
.rsi-loop-pre { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.rsi-loop-diff { font-family: var(--mono, ui-monospace, monospace); font-size: 11.5px; max-height: 360px; overflow: auto; }
.rsi-loop-diff .add { color: var(--success); background: var(--success-bg); }
.rsi-loop-diff .ctx { color: var(--muted); }
/* 上线决策(ShipPanel) */
.rsi-ship { display: flex; flex-direction: column; gap: 8px; border-color: var(--accent-edge); }
.rsi-ship-rule { font-weight: 400; margin-left: 8px; }
.rsi-ship-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .rsi-ship-sides { grid-template-columns: 1fr; } }
.rsi-ship-side { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 8px; background: var(--surface-2); min-width: 0; }
.rsi-ship-side.off { opacity: .6; }
.rsi-ship-side-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.rsi-ship-side-body { font-size: 12px; margin-top: 3px; line-height: 1.6; word-break: break-word; }
.rsi-ship-note { font-size: 12px; color: var(--text-2); background: var(--surface-3); border-radius: var(--r-sm); padding: 6px 8px; }
.rsi-ship-opt { border: 1px solid var(--success-edge); border-radius: var(--r-sm); padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.rsi-ship-opt.bad { border-color: var(--danger-edge); }
.rsi-ship-opt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.rsi-ship-check { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.rsi-ship-check.ok { color: var(--success); }
.rsi-ship-check.bad, .rsi-ship-err { color: var(--danger); }
.rsi-ship-err { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.rsi-ship-next { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); background: var(--warning-bg); border: 1px solid var(--warning-edge); border-radius: var(--r-sm); padding: 8px 10px; }
.rsi-ship-next > div:first-child { display: flex; align-items: center; gap: 6px; }
.rsi-ship-cmd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsi-ship-cmd code { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; background: var(--surface); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.rsi-loop-ev--approve, .rsi-loop-ev--ship { border-left-color: var(--success); }
.rsi-loop-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.rsi-loop-table th, .rsi-loop-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.rsi-loop-table th { color: var(--muted); font-weight: 600; }
.rsi-loop-table tr.target td { font-weight: 600; color: var(--text); }
.rsi-loop-table td.up { color: var(--success); }
.rsi-loop-table td.down { color: var(--danger); }
.rsi-loop-timeline { display: flex; flex-direction: column; gap: 4px; }
.rsi-loop-ev { padding: 5px 8px; border-left: 3px solid var(--border); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.rsi-loop-ev-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.rsi-loop-ev-type { font-size: 11px; font-weight: 700; color: var(--accent); }
.rsi-loop-ev-title { color: var(--text); }
.rsi-loop-ev--promote, .rsi-loop-ev--settle { border-left-color: var(--success); }
.rsi-loop-ev--rollback, .rsi-loop-ev--revert { border-left-color: var(--danger); }
.rsi-loop-ev--canary { border-left-color: var(--accent); }
.rsi-loop-ev--pause { border-left-color: var(--warning); }
+185
View File
@@ -0,0 +1,185 @@
/*
* Styles only the Lab panel (LabPanel.tsx + LabDetail, LabBatchUpdate, LabMembers) renders — split out of
* styles.css so they ship with that panel's lazy chunk instead of the
* render-blocking global stylesheet.
*
* This file loads AFTER styles.css (Vite appends the chunk's <link> on first
* open, before the panel renders), so:
* - only add selectors built on classes used exclusively by this panel's
* chunk — control-web/test/panel_css_scope.test.ts enforces it;
* - a class shared with the board / drawer / another panel stays in styles.css;
* - don't depend on source order against a styles.css rule; use specificity.
*/
.lab-split--collapsed { grid-template-columns: 18px 1fr; }
.lab-list-filters { display: flex; flex-direction: column; gap: 8px; }
/* Collapse handle: a pill on the list's right edge, vertically centered. */
.lab-list-handle { position: absolute; top: 50%; right: -13px; transform: translateY(-50%); z-index: 3; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 44px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text-2); cursor: pointer; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.06)); }
.lab-list-handle:hover { border-color: var(--accent-edge); color: var(--text); background: var(--surface-2); }
/* Collapsed: a slim sticky rail with a centered expand icon (stays in view). */
.lab-list-rail { position: sticky; top: 12px; display: flex; align-items: center; justify-content: center; height: 220px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.lab-list-rail:hover { border-color: var(--accent-edge); color: var(--text); background: var(--surface-2); }
.lab-search { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); }
.lab-search input { border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; width: 100%; }
.lab-refresh { align-self: flex-end; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm); padding: 5px 8px; cursor: pointer; color: var(--text-2); }
.lab-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; flex-shrink: 0; }
.lab-tag--task { background: rgba(185,28,28,0.12); color: var(--danger); }
.lab-tag--feature { background: var(--accent-soft); color: var(--accent); }
.lab-plat { text-transform: capitalize; }
.lab-status { color: var(--text-2); }
.lab-dot { display: inline-flex; }
.lab-dot--ok { color: var(--success); }
.lab-dot--err { color: var(--danger); }
.lab-dot--none { color: var(--text-2); opacity: 0.5; }
/* Detail playground */
.lab-detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lab-dh { display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.lab-dh-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.lab-dh-title { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.4; margin: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-dh-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); text-decoration: none; flex-shrink: 0; }
.lab-dh-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
/* Stacked vertically: 可读报告 on top (full width for compare mode), 原始报告 below. */
.lab-compare { display: flex; flex-direction: column; gap: 14px; }
.lab-pane { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); display: flex; flex-direction: column; overflow: hidden; }
.lab-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 11px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--text); }
.lab-pane-body { padding: 12px 14px; max-height: 48vh; overflow: auto; }
.lab-pane--readable .lab-pane-body { max-height: 62vh; }
.lab-pane--raw .lab-pane-body { max-height: 40vh; }
.lab-md { font-size: 13px; color: var(--text); line-height: 1.6; word-break: break-word; }
.lab-md pre { background: var(--surface-3); padding: 10px; border-radius: var(--r-sm); overflow: auto; }
.lab-md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.lab-md table { border-collapse: collapse; }
.lab-md th, .lab-md td { border: 1px solid var(--border); padding: 4px 8px; }
.lab-src { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-word; color: var(--text-2); margin: 0; }
.lab-report { position: relative; }
.lab-report-badge { position: sticky; top: 0; float: right; font-size: 10.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border-radius: 5px; padding: 1px 7px; margin-bottom: 4px; }
.lab-compare2-cap { font-size: 11px; font-weight: 700; color: var(--text-2); padding: 3px 0 6px; border-bottom: 1px dashed var(--border); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.lab-compare2-cap--cand { color: var(--accent); }
.lab-compare2-cap--alt { color: var(--text-2); }
.lab-compare2-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-verclose { margin-left: auto; border: none; background: none; color: var(--text-2); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.lab-verclose:hover { color: var(--danger); }
/* N-column readable compare (one column per selected prompt version + candidate) */
.lab-compareN { display: grid; gap: 10px; overflow-x: auto; }
@media (max-width: 900px) { .lab-compareN { grid-template-columns: 1fr !important; } }
/* Version tag chips — click to add/remove a compare column */
.lab-verchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-verchip {
display: inline-flex; align-items: center; gap: 4px;
font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
background: var(--surface-3); color: var(--text-2);
border: 1px solid transparent; cursor: pointer;
}
.lab-verchip:hover { border-color: var(--border); }
.lab-verchip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.lab-verchip--cur { box-shadow: inset 0 0 0 1px var(--accent-soft); }
.lab-verchip-star { color: var(--accent); font-size: 10px; }
.lab-verchip-tag { font-size: 9.5px; font-weight: 700; padding: 0 4px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
/* Bench */
.lab-bench { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.lab-bench-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.lab-bench-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.lab-editor { display: flex; flex-direction: column; gap: 8px; }
.lab-editor-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.lab-editor-actions code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-3); padding: 0 4px; border-radius: 4px; }
.lab-candidate-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--border); padding-top: 10px; }
.lab-error { display: flex; align-items: center; gap: 7px; color: var(--danger); font-size: 12.5px; background: rgba(185,28,28,0.08); border-radius: var(--r-sm); padding: 8px 11px; }
/* Run history */
.lab-history { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 10px 14px; }
.lab-history-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.lab-history-list { display: flex; flex-direction: column; gap: 5px; max-height: 30vh; overflow: auto; }
.lab-hrow { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: var(--r-sm); border: 1px solid transparent; font-size: 12px; color: var(--text-2); }
.lab-hrow:hover { background: var(--surface-2); }
.lab-hrow.on { border-color: var(--accent-edge); background: var(--accent-soft); }
.lab-hstatus { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.lab-hstatus--running { background: var(--accent-soft); color: var(--accent); }
.lab-hstatus--error { background: rgba(185,28,28,0.12); color: var(--danger); }
.lab-hstatus--done { background: rgba(4,120,87,0.12); color: var(--success); }
.lab-hver { font-weight: 600; color: var(--text); }
/* Members */
.lab-members { display: flex; justify-content: center; padding-top: 12px; }
.lab-members-card { width: 100%; max-width: 620px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.lab-members-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text); }
.lab-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; color: var(--text); }
.lab-chip--seed { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-edge); }
.lab-chip-x { display: inline-flex; border: 0; background: transparent; color: var(--text-2); cursor: pointer; padding: 0; }
.lab-chip-x:hover { color: var(--danger); }
.lab-members-add { display: flex; align-items: center; gap: 9px; }
.lab-members-add .lab-input { flex: 1; }
/* ── Batch 存量更新 ─────────────────────────────────────────────── */
.lab-batch { position: relative; display: flex; flex-direction: column; gap: 14px; }
/* Opt checkboxes out of the global `input { width:100%; padding; border }` rule —
otherwise each one balloons to full width and shoves the row content right. */
.lab-batch input[type="checkbox"] {
width: auto; flex: 0 0 auto; margin: 0; padding: 0; border: 0;
height: 15px; min-width: 15px; accent-color: var(--accent); cursor: pointer;
}
.lab-toast--float { position: absolute; top: -4px; right: 0; z-index: 5; }
.lab-batch-bar { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.lab-batch-bar-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.lab-batch-title { font-size: 14px; font-weight: 700; color: var(--text); }
.lab-batch-bar-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lab-batch-field { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.lab-batch-field .lab-select { min-width: 190px; }
.lab-batch-bar-ctl .lab-btn--primary { margin-left: auto; }
.lab-batch-bar-ctl .lab-refresh { align-self: auto; }
.lab-batch-body { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.lab-batch-list { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.lab-batch-listhead { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 11.5px; color: var(--text-2); }
.lab-batch-listhint { margin-left: auto; }
.lab-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); cursor: pointer; }
.lab-batch-scroll { display: flex; flex-direction: column; max-height: 66vh; overflow: auto; }
.lab-batch-row { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 12.5px; min-width: 0; }
.lab-batch-row:last-child { border-bottom: 0; }
.lab-batch-row:hover { background: var(--surface-2); }
.lab-batch-row.on { background: var(--accent-soft); }
.lab-batch-rowtitle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.lab-batch-row .lab-plat, .lab-batch-row .lab-mono { font-size: 11px; color: var(--text-2); flex-shrink: 0; }
.lab-ver--old { background: var(--danger-bg); color: var(--danger); flex-shrink: 0; }
/* Per-task version inventory chips (batch tab). */
.lab-batch-vers { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; flex: 0 1 auto; max-width: 46%; }
.lab-batch-vers .lab-ver--old { background: var(--surface-3); color: var(--text-2); }
.lab-ver--miss { background: var(--warning-bg); color: var(--warning); flex-shrink: 0; }
.lab-batch-side { display: flex; flex-direction: column; gap: 14px; }
.lab-batch-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--text-2); padding: 26px 16px; border: 1px dashed var(--border); border-radius: var(--r); font-size: 12.5px; line-height: 1.6; }
.lab-empty--sm { padding: 8px; font-size: 12px; }
.lab-batch-job { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 13px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.lab-batch-jobhead { display: flex; align-items: center; gap: 8px; }
.lab-batch-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.lab-batch-dot.ok { color: var(--success); }
.lab-batch-dot.fail { color: var(--danger); }
.lab-batch-dot.run { color: var(--accent); }
.lab-batch-jobmeta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-2); }
.lab-batch-progress { display: flex; flex-direction: column; gap: 7px; }
.lab-batch-progressbar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.lab-batch-progressbar span { display: block; height: 100%; background: var(--success); border-radius: 999px; transition: width 0.3s ease; }
.lab-batch-progressbar span.run { background: var(--accent); }
.lab-batch-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; }
.lab-batch-stats span { display: inline-flex; align-items: center; gap: 4px; }
.lab-batch-stats .ok { color: var(--success); }
.lab-batch-stats .fail { color: var(--danger); }
.lab-batch-stats .run { color: var(--accent); }
.lab-batch-joberr { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--danger); background: var(--danger-bg); border-radius: var(--r-sm); padding: 6px 9px; }
.lab-batch-items { display: flex; flex-direction: column; gap: 3px; max-height: 40vh; overflow: auto; margin-top: 2px; }
.lab-batch-item { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: var(--r-sm); font-size: 11.5px; min-width: 0; }
.lab-batch-item--done { background: var(--success-bg); }
.lab-batch-item--error { background: var(--danger-bg); }
.lab-batch-item--running { background: var(--accent-soft); }
.lab-batch-itemtitle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.lab-batch-itemerr { flex-shrink: 0; max-width: 40%; color: var(--danger); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-batch-item .ok { color: var(--success); }
.lab-batch-item .fail { color: var(--danger); }
.lab-batch-item .run { color: var(--accent); }
.lab-batch-history { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.lab-batch-histhead { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.lab-batch-histrow { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 7px 11px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.lab-batch-histrow:last-child { border-bottom: 0; }
.lab-batch-histrow:hover { background: var(--surface-2); }
.lab-batch-histrow.on { background: var(--accent-soft); }
.lab-batch-histmeta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; font-size: 11.5px; color: var(--text); }
.lab-batch-histmeta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-batch-histcounts { font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; flex-shrink: 0; }
.lab-batch-histcounts .ok { color: var(--success); }
.lab-batch-histcounts .fail { color: var(--danger); }
@media (max-width: 900px) { .lab-batch-body { grid-template-columns: 1fr; } }
.lab-nav-out { color: var(--muted-2); margin-left: 2px; }
+564
View File
@@ -0,0 +1,564 @@
/*
* Styles only the Management overlay (Management.tsx + its tab panels) renders — split out of
* styles.css so they ship with that panel's lazy chunk instead of the
* render-blocking global stylesheet.
*
* This file loads AFTER styles.css (Vite appends the chunk's <link> on first
* open, before the panel renders), so:
* - only add selectors built on classes used exclusively by this panel's
* chunk — control-web/test/panel_css_scope.test.ts enforces it;
* - a class shared with the board / drawer / another panel stays in styles.css;
* - don't depend on source order against a styles.css rule; use specificity.
*/
.kb-import-stream-cursor {
color: #8b5cf6;
margin-left: 1px;
animation: kb-import-stream-cursor-blink 0.9s step-end infinite;
}
.kb-import-launcher { gap: 6px; white-space: nowrap; }
.kb-import-launcher-badge {
display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
border-radius: 999px; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums;
color: var(--muted); background: var(--surface-3); border: 1px solid var(--border);
}
.kb-import-launcher-badge.is-active { color: #6d5be7; background: rgba(139, 92, 246, .10); border-color: rgba(139, 92, 246, .28); }
.kb-import-launcher-badge.is-done { color: var(--success); background: var(--success-bg); border-color: var(--success-edge); }
.kb-import-launcher-badge.is-error { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-edge); }
.kb-import-active-dot {
width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #8b5cf6;
animation: pulse 1.4s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
.kb-import-active-dot { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
.kb-import-stream-cursor { animation: none; }
}
.mgmt-rail { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; }
@media (max-width: 760px) { .mgmt-rail { flex-direction: row; position: static; } }
.mgmt-rail-item {
display: flex; align-items: center; gap: 10px;
padding: 10px 14px;
border: 1px solid transparent;
border-radius: 10px;
background: transparent;
color: var(--text-2);
font-size: 13.5px; font-weight: 500;
cursor: pointer; text-align: left;
}
.mgmt-rail-item:hover { background: var(--surface-2); }
.mgmt-rail-item.on { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-edge); font-weight: 600; }
.mgmt-rail-item svg { flex: none; }
.mgmt-content { min-width: 0; }
/* Settings forms cap at a reading width — admin rows and inputs stretched to
the full console width read badly. The consoles opt out: their swimlanes and
node grids were built for the full-page overlay they used to occupy and wrap
every row when squeezed. */
.mgmt-content--form { max-width: 880px; }
.mgmt-section {
padding: 24px 26px;
border: 1px solid var(--border);
border-radius: var(--r-lg);
background: var(--surface);
box-shadow: var(--shadow-sm);
}
.mgmt-section-head { margin-bottom: 20px; }
.mgmt-section-head h3 { margin: 0 0 6px; font-size: 16px; font-weight: 650; color: var(--text); }
.mgmt-section-head p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.admin-row--super { background: var(--accent-soft); border-color: var(--accent-edge); }
.admin-row--super .admin-ic { color: var(--accent); }
.admin-prefix { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; }
.admin-badge--super { background: var(--accent); border-color: var(--accent-2); color: #fff; }
.admin-locked { display: grid; place-items: center; color: var(--muted-2); flex: none; width: 28px; height: 28px; }
.admin-remove {
display: grid; place-items: center;
width: 28px; height: 28px; flex: none;
padding: 0; /* override global button padding so the × is centered */
border: 1px solid var(--border); border-radius: 8px;
background: var(--surface); color: var(--muted); cursor: pointer;
}
.admin-remove:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger-edge); color: var(--danger); }
.mgmt-add { display: flex; align-items: stretch; gap: 10px; }
.mgmt-add-field { position: relative; flex: 1; display: flex; align-items: center; }
.mgmt-add-field .dialog-input { padding-right: 132px; }
.mgmt-add-suffix {
position: absolute; right: 12px;
font-size: 12px; color: var(--muted); pointer-events: none;
}
.mgmt-placeholder {
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
padding: 56px 20px;
color: var(--muted);
border: 1px dashed var(--border-strong);
border-radius: var(--r);
background: var(--surface-2);
}
.mgmt-placeholder span { font-size: 13px; }
.opk-req-row { align-items: flex-start; }
.opk-req-actions { display: flex; gap: 8px; flex: none; }
.opk-req-actions button { padding: 7px 14px; font-size: 12.5px; }
.opk-req-history { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.opk-req-history h4 { margin: 0 0 10px; font-size: 12.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.opk-req-history .admin-row { opacity: 0.8; }
/* ─── cluster tab: node → cluster membership editor ──────────────── */
.mgmt-cluster-rule {
font-size: 12px; line-height: 1.55; color: var(--muted);
padding: 10px 14px; margin-bottom: 16px;
border: 1px solid var(--border); border-left: 3px solid var(--accent-edge);
border-radius: 8px; background: var(--surface-2);
}
.mgmt-nodes { display: flex; flex-direction: column; gap: 10px; }
.node-row {
display: flex; flex-direction: column; gap: 10px;
padding: 12px 14px;
border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2);
}
.node-row-head { display: flex; align-items: center; gap: 8px; }
.node-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.node-dot.on { background: var(--ok, #16a34a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok, #16a34a) 20%, transparent); }
.node-dot.off { background: var(--muted-2); }
.node-plat {
font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
padding: 2px 8px; border-radius: 999px; flex: none;
background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.node-plat--android { color: #2e7d32; border-color: color-mix(in srgb, #2e7d32 35%, var(--border)); }
.node-plat--ios { color: #5b5bd6; border-color: color-mix(in srgb, #5b5bd6 35%, var(--border)); }
.node-clusters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cluster-chip {
display: inline-flex; align-items: center; gap: 4px;
font-family: var(--font-mono); font-size: 12px; font-weight: 600;
padding: 3px 6px 3px 10px; border-radius: 999px;
background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
}
.cluster-chip--default { background: var(--accent-soft); border-color: var(--accent-edge); color: var(--accent); }
.cluster-chip-x {
display: grid; place-items: center; width: 16px; height: 16px; padding: 0; flex: none;
border: none; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
}
.cluster-chip-x:hover:not(:disabled) { background: var(--danger-bg); color: var(--danger); }
.cluster-parked {
font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
background: var(--danger-bg); border: 1px solid var(--danger-edge); color: var(--danger);
}
.cluster-add { display: inline-flex; align-items: center; gap: 4px; }
.cluster-add-input {
width: 108px; font-size: 12px; font-family: var(--font-mono);
padding: 4px 8px; border: 1px dashed var(--border-strong); border-radius: 999px;
background: var(--surface); color: var(--text);
}
.cluster-add-input:focus { outline: none; border-style: solid; border-color: var(--accent); }
.cluster-add-btn {
display: grid; place-items: center; width: 24px; height: 24px; padding: 0; flex: none;
border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer;
}
.cluster-add-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) {
.mgmt-rail { gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mgmt-rail-item { flex: 1 1 0; justify-content: center; padding: 9px 10px; white-space: nowrap; }
.mgmt-section { padding: 18px 16px; }
.mgmt-section-head h3 { font-size: 15px; }
.admin-prefix { flex: 1 1 100%; order: -1; }
.admin-locked { display: none; }
.mgmt-add { flex-direction: column; align-items: stretch; gap: 8px; }
.mgmt-add-field .dialog-input { padding-right: 124px; font-size: 16px; /* iOS no zoom */ }
}
/* ── 任务调度台 (/dispatch) — cross-node queue rebalancing ─────────────── */
.disp { display: flex; flex-direction: column; gap: 20px; padding: 2px 2px 88px; }
.disp-top { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.disp-top-lead { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 8px; }
.disp-top-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.disp-top-note b { color: var(--text-2); font-weight: 650; }
.disp-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.disp-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 12px; color: var(--muted); box-shadow: var(--shadow-xs); }
.disp-stat b { font-size: 15px; color: var(--text); font-weight: 750; }
.disp-refresh { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.disp-err { border: 1px solid var(--danger-edge); background: var(--danger-bg); color: var(--danger); border-radius: var(--r); padding: 10px 14px; font-size: 13px; }
.disp-lane { display: flex; flex-direction: column; gap: 12px; }
.disp-lane-head { display: flex; align-items: center; gap: 10px; }
.disp-lane-name { font-size: 13px; font-weight: 750; letter-spacing: .03em; color: var(--text); text-transform: uppercase; }
.disp-lane-sub { font-size: 12px; color: var(--muted); }
.disp-lane-rule { flex: 1; height: 1px; background: var(--hairline); }
.disp-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 14px; align-items: start; }
.disp-node { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); overflow: hidden; transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease; }
.disp-node.offline { opacity: .58; }
.disp-node.target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.disp-node.source { border-color: var(--border-strong); }
.disp-node-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 10px; }
.disp-node-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.disp-node-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--text); min-width: 0; }
.disp-ndot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.disp-node-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disp-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.disp-tag { font-size: 10.5px; line-height: 1.6; padding: 0 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.disp-tag.plat { background: var(--accent-soft); color: var(--accent-2); font-weight: 700; }
.disp-tag.cl { border: 1px solid var(--border); background: transparent; }
.disp-tag.off { background: var(--danger-bg); color: var(--danger); }
.disp-cap { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding-top: 1px; white-space: nowrap; }
.disp-load { padding: 0 14px 12px; display: flex; align-items: center; gap: 10px; }
.disp-load-track { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.disp-load-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s ease; }
.disp-load-num { font-size: 12.5px; font-weight: 750; color: var(--text); min-width: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.disp-load-idle { font-size: 11.5px; color: var(--success); font-weight: 650; display: inline-flex; align-items: center; gap: 5px; }
.disp-tasks { border-top: 1px solid var(--hairline); display: flex; flex-direction: column; max-height: 340px; overflow: auto; }
.disp-tasks-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; position: sticky; top: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(4px); border-bottom: 1px solid var(--hairline); z-index: 1; }
.disp-selall { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); cursor: pointer; user-select: none; }
.disp-selall:hover { color: var(--text-2); }
.disp-movein { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--accent-edge); background: var(--accent-soft); color: var(--accent-2); cursor: pointer; transition: background .12s, color .12s; }
.disp-movein:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.disp-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--hairline); cursor: pointer; transition: background .1s; }
.disp-row:last-child { border-bottom: 0; }
.disp-row:hover { background: var(--surface-2); }
.disp-row.on { background: var(--accent-soft); }
.disp-cb { width: 15px; height: 15px; min-width: 15px; flex: 0 0 auto; margin: 0; padding: 0; border: 0; accent-color: var(--accent); cursor: pointer; }
.disp-row-ic { color: var(--muted-2); flex: 0 0 auto; display: inline-flex; }
.disp-row.on .disp-row-ic { color: var(--accent); }
.disp-row-title { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disp-row-chip { font-size: 10px; line-height: 1.6; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--muted); flex: 0 0 auto; }
.disp-row-chip.cl { border: 1px solid var(--accent-edge); background: var(--accent-soft); color: var(--accent-2); }
.disp-empty-tasks { padding: 20px 14px; font-size: 12px; color: var(--muted-2); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* Sticky action bar — appears when something is selected. */
.disp-bar { position: sticky; bottom: 8px; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--accent-edge); box-shadow: var(--shadow-lg); }
.disp-bar-count { font-size: 13.5px; font-weight: 750; color: var(--text); white-space: nowrap; }
.disp-bar-to { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.disp-bar-targets { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.disp-target { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 650; color: var(--text); cursor: pointer; transition: all .12s; }
.disp-target:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); transform: translateY(-1px); }
.disp-target:disabled { opacity: .38; cursor: not-allowed; }
.disp-bar-none { font-size: 12.5px; color: var(--warning); font-weight: 600; }
.disp-bar-clear { margin-left: auto; font-size: 12px; }
.dep-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dep-latest { display: inline-flex; align-items: center; gap: 9px; flex: 1; min-width: 240px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-xs); }
.dep-latest-ver { font-size: 13.5px; font-weight: 750; color: var(--text); font-family: var(--mono, ui-monospace, monospace); }
.dep-latest-meta { font-size: 12px; color: var(--muted); }
.dep-latest-meta code { font-size: 11.5px; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
.dep-refresh { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.dep-note { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin: 0; }
.dep-note b { color: var(--text-2); font-weight: 650; }
.dep-note code { font-size: 11.5px; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
.dep-err { border: 1px solid var(--danger-edge); background: var(--danger-bg); color: var(--danger); border-radius: var(--r); padding: 10px 14px; font-size: 13px; }
.dep-nodes { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-xs); }
.dep-node { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--hairline); transition: background .12s; }
.dep-node:last-child { border-bottom: 0; }
.dep-node:hover { background: var(--surface-2); }
.dep-node.on { background: var(--accent-soft); }
.dep-node.offline { opacity: .6; }
.dep-node-pick { flex: 0 0 auto; display: inline-flex; }
.dep-node-pick input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.dep-node-pick input:disabled { cursor: not-allowed; opacity: .4; }
.dep-ndot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.dep-node-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.dep-node-name { font-size: 13.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-node-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.dep-tag { font-size: 10.5px; line-height: 1.6; padding: 0 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.dep-tag.plat { background: var(--accent-soft); color: var(--accent-2); font-weight: 700; }
.dep-tag.cl { border: 1px solid var(--border); background: transparent; }
.dep-tag.busy { background: var(--warning-bg, var(--surface-3)); color: var(--warning); font-weight: 650; }
/* A row that must not be re-homed (already executed): visibly inert, not merely
disabled-on-click, so nobody tries to select it. */
.disp-row.blocked { opacity: .62; cursor: default; }
/* ── 调度台:自动均衡 ─────────────────────────────────────────────────────── */
.disp-row.blocked:hover { background: transparent; }
.disp-row-lock { flex: 0 0 auto; color: var(--muted-2); }
.disp-row-chip.warn { background: var(--warning-bg, var(--surface-3)); color: var(--warning); font-weight: 650; }
.disp-stat.mode-on { color: var(--success); }
.disp-stat.mode-dry-run { color: var(--warning); }
.disp-stat.mode-off { color: var(--muted); }
.disp-stat > svg { vertical-align: -2px; margin-right: 4px; }
.disp-steals { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.disp-steal { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: var(--r); background: var(--surface-2); border: 0.5px solid var(--border); font-size: 12px; }
/* Observation-mode entries are records of a road not taken — muted so they can't
be misread as "this task moved". */
.disp-steal.dry-run { background: transparent; border-style: dashed; color: var(--muted); }
.disp-steal-time { flex: 0 0 auto; color: var(--muted-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.disp-steal-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disp-steal-move { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; color: var(--accent-2); font-family: var(--mono, ui-monospace, monospace); font-size: 11.5px; }
/* An arm for a bundle that is no longer the one on offer — accent, not warning:
it's an informational "a rollout is parked here", not a problem. */
.dep-tag.queued { background: var(--accent-soft); color: var(--accent-2); font-weight: 650; font-family: var(--mono, ui-monospace, monospace); }
.dep-node-ver { font-size: 12px; color: var(--muted); font-family: var(--mono, ui-monospace, monospace); flex: 0 0 auto; min-width: 78px; text-align: right; }
.dep-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; flex: 0 0 auto; min-width: 74px; justify-content: center; }
.dep-badge.current { background: var(--success-bg, color-mix(in srgb, var(--success) 14%, transparent)); color: var(--success); }
.dep-badge.stale { background: var(--warning-bg, color-mix(in srgb, var(--warning) 14%, transparent)); color: var(--warning); }
/* 已排队 (空档部署 armed): deliberately NOT the warning colour that 待更新 uses —
the node needs no further action, it is going to update itself. */
.dep-badge.queued { background: var(--accent-soft); color: var(--accent-2); }
.dep-badge.offline, .dep-badge.unknown { background: var(--surface-3); color: var(--muted); }
.dep-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12px; font-weight: 650; color: var(--text); cursor: pointer; flex: 0 0 auto; transition: all .12s; }
.dep-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.dep-btn:disabled { opacity: .4; cursor: not-allowed; }
.dep-empty { padding: 28px 14px; text-align: center; font-size: 12.5px; color: var(--muted-2); }
.dep-bar { position: sticky; bottom: 8px; z-index: 5; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); }
.dep-force { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.dep-force input { width: 15px; height: 15px; margin: 0; accent-color: var(--warning); cursor: pointer; }
.dep-bar-actions { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.dep-bar-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--text); cursor: pointer; transition: all .12s; }
.dep-bar-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); transform: translateY(-1px); }
.dep-bar-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.dep-bar-btn.primary:hover:not(:disabled) { filter: brightness(1.06); color: #fff; }
.dep-bar-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
/* ── 节点健康 (HealthPanel) ──────────────────────────────────────────────────
Node cards sit in an auto-filling grid so a wide screen shows the whole fleet
at once — the question this panel answers ("which box is unhappy?") is a
scan, and one card per row made it a scroll. Colour comes only from the token
set, so both themes follow; every bad state is doubled with an icon or a word,
because a red bar alone fails anyone who can't separate it from the green. */
.hp { display: flex; flex-direction: column; gap: 14px; padding: 2px 2px 20px; }
.hp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hp-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.hp-count { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.hp-count.ok { color: var(--success); background: var(--success-bg); border: 1px solid var(--success-edge); }
.hp-count.bad { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-edge); }
.hp-refresh { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 10px;
border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text-2); cursor: pointer; }
.hp-refresh:hover { background: var(--surface-2); }
.hp-refresh:disabled { opacity: .5; cursor: not-allowed; }
.hp-note { font-size: 12px; line-height: 1.75; color: var(--muted); margin: 0; }
.hp-note b { color: var(--text-2); font-weight: 600; }
.hp-err { font-size: 12.5px; color: var(--danger); background: var(--danger-bg);
border: 1px solid var(--danger-edge); border-radius: var(--r); padding: 8px 12px; }
/* auto-fill, not auto-fit: with a single node left, auto-fit would stretch that
one card across the entire width, which reads as a bug rather than a layout. */
.hp-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; align-items: start; }
.hp-node { display: flex; flex-direction: column; gap: 9px;
border: 1px solid var(--border); border-top: 2px solid var(--border);
border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-xs); padding: 12px 14px 11px; }
/* Status rides the TOP edge rather than the left: in a grid the top edges line
up across a row, so fleet health reads as one strip of colour. */
.hp-node.ok { border-top-color: var(--success); }
.hp-node.warn { border-top-color: var(--warning); }
.hp-node.critical { border-top-color: var(--danger); background: var(--danger-bg); }
.hp-node.offline { opacity: .72; }
.hp-node-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hp-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.hp-name { font-size: 13.5px; font-weight: 650; color: var(--text);
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hp-spacer { flex: 1 1 auto; }
.hp-seen { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hp-tag { font-size: 10px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border);
color: var(--muted); background: var(--surface-2); white-space: nowrap; flex: none; }
.hp-tag.plat { text-transform: capitalize; }
/* Link-reading capabilities a node advertises from its own MCP config. Tinted
like the accent so a missing one reads as absence, not as an alert — an
unconfigured node is a config gap to notice, not a failure to page on. */
.hp-tag.cap { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-edge); }
.hp-tag.cap-off { color: var(--muted-2); border-style: dashed; }
.hp-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600;
padding: 1.5px 7px; border-radius: 999px; white-space: nowrap; flex: none; }
.hp-badge.bad { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-edge); }
.hp-node-sub { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.hp-agent { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600;
padding: 1.5px 7px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.hp-agent.ok { color: var(--success); background: var(--success-bg); border-color: var(--success-edge); }
.hp-agent.bad { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-edge); }
.hp-agent.unknown { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.hp-alerts { display: flex; flex-direction: column; gap: 4px; }
.hp-alert { display: flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 5px 8px;
border-radius: var(--r-sm); border: 1px solid transparent; min-width: 0; }
.hp-alert.critical { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-edge); }
.hp-alert.warn { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-edge); }
.hp-alert svg { flex: none; }
.hp-alert b { font-weight: 700; flex: none; }
/* The message is what gives when the card is narrow; the rule name and how long
it has been true must survive — those are what you triage on. Full text is on
the row's title attribute. */
.hp-alert-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-alert-since { margin-left: auto; opacity: .75; font-size: 10.5px; white-space: nowrap; flex: none; }
/* One metric per row: label | bar | value. The values line up into a column you
can read straight down, which is the actual scanning motion on this panel. */
.hp-meters { display: flex; flex-direction: column; gap: 5px; }
.hp-m { display: flex; align-items: center; gap: 8px; }
.hp-m-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted);
width: 46px; flex: none; }
.hp-m-track { flex: 1 1 auto; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.hp-m-fill { display: block; height: 100%; border-radius: 3px; transition: width .3s ease; }
.hp-m.ok .hp-m-fill { background: var(--success); }
.hp-m.warn .hp-m-fill { background: var(--warning); }
.hp-m.bad .hp-m-fill { background: var(--danger); }
/* Hatched, not empty: a plain empty track reads as "measured, and it's 0%". */
.hp-m.unknown .hp-m-track { background: repeating-linear-gradient(90deg,
var(--surface-3) 0 4px, transparent 4px 8px); }
.hp-m-val { font-size: 11.5px; font-weight: 600; color: var(--text); width: 38px; text-align: right;
flex: none; font-variant-numeric: tabular-nums; }
.hp-m.unknown .hp-m-val { color: var(--muted); font-weight: 500; }
.hp-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10.5px; color: var(--muted);
font-variant-numeric: tabular-nums; }
.hp-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
padding-top: 8px; border-top: 1px solid var(--hairline); font-size: 10.5px; color: var(--muted); }
.hp-foot-err { color: var(--warning); font-weight: 600; }
.hp-link { background: none; border: 0; padding: 0; font-size: 11px; color: var(--accent); cursor: pointer; }
.hp-link:hover { text-decoration: underline; }
/* Trend modal. Wider than the default .modal so six hours of minute buckets
have somewhere to go; the charts are the content, so the body gets the room. */
.modal--trend { width: min(760px, 100%); }
.hp-close { display: inline-flex; padding: 4px; border: 0; background: none; color: var(--muted);
border-radius: var(--r-sm); cursor: pointer; }
.hp-close:hover { background: var(--surface-2); color: var(--text); }
.hp-chart { display: flex; flex-direction: column; gap: 5px; }
.hp-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hp-chart-label { font-size: 12px; font-weight: 600; color: var(--text); }
.hp-chart-stat { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Fixed 0-100 height: the y-axis is a percentage of capacity, so it must not
rescale per chart — a flat 4-6% CPU wobble stretched to fill would read as a
crisis next to a disk genuinely at 90%. */
.hp-chart-svg { width: 100%; height: 90px; display: block;
background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-sm); }
.hp-chart-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.hp-chart-line { stroke: var(--accent); }
.hp-chart-area { fill: var(--accent-soft); stroke: none; }
.hp-chart-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
/* Each metric keeps the colour it has on the card's bar, so the modal and the
grid agree about which row is which without a legend. */
.hp-chart.disk .hp-chart-line, .hp-chart.disk .hp-chart-dot { stroke: var(--warning); fill: none; }
.hp-chart.disk .hp-chart-dot { fill: var(--warning); stroke: var(--surface); }
.hp-chart.disk .hp-chart-area { fill: var(--warning-bg); }
.hp-chart.mem .hp-chart-line { stroke: var(--eval-accent); }
.hp-chart.mem .hp-chart-dot { fill: var(--eval-accent); stroke: var(--surface); }
.hp-chart.mem .hp-chart-area { fill: var(--eval-soft); }
.hp-chart.cpu .hp-chart-line { stroke: var(--success); }
.hp-chart.cpu .hp-chart-dot { fill: var(--success); stroke: var(--surface); }
.hp-chart.cpu .hp-chart-area { fill: var(--success-bg); }
.hp-chart-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); }
.hp-chart-note { margin: 4px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.hp-chart-note b { color: var(--text-2); font-weight: 600; }
.hp-spark-empty { font-size: 11.5px; color: var(--muted-2); font-style: italic; }
.hp-nodata { font-size: 11.5px; color: var(--muted); padding: 7px 9px;
background: var(--surface-2); border-radius: var(--r-sm); }
.hp-empty { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); text-align: center; padding: 28px; }
/* Claude 用量 — same node grid as 节点健康, plus a fleet strip and the token
total that health has no reason to carry. */
.up-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.up-sum-item { display: flex; flex-direction: column; gap: 2px;
border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
padding: 10px 14px 11px; }
.up-sum-label { font-size: 11px; color: var(--muted); }
.up-sum-val { font-size: 22px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.up-sum-sub { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Account tier. Wider cards than the node grid on purpose: there are ~5 of
these against ~14 nodes, and they are read first — quota is what tells you
whether the fleet is about to stall. */
.up-accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.up-acct { display: flex; flex-direction: column; gap: 8px;
border: 1px solid var(--border); border-left: 3px solid var(--success); border-radius: var(--r-lg);
background: var(--surface); padding: 10px 14px 11px; min-width: 0; }
.up-acct.warn { border-left-color: var(--warning); }
.up-acct.critical { border-left-color: var(--danger); }
.up-acct-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.up-acct-mail { font-size: 12.5px; font-weight: 650; color: var(--text);
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Scope and spend share a row of their own. In .hp-facts they'd ride a
wrapping flex line, where the right-aligning spacer silently stops working. */
.up-acct-foot { display: flex; align-items: baseline; gap: 10px; min-width: 0;
padding-top: 7px; border-top: 1px solid var(--hairline);
font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.up-acct-spend { font-weight: 650; color: var(--text); white-space: nowrap; }
.up-tok { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.up-tok-label { font-size: 11px; color: var(--muted); flex: none; }
.up-tok-val { font-size: 18px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.up-tok-asof { font-size: 10.5px; color: var(--muted-2); margin-left: auto; }
.up-econ { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px;
padding-top: 2px; }
.up-econ-item { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.up-econ-span { grid-column: 1 / -1; }
.up-econ-label { font-size: 10.5px; color: var(--muted); }
.up-econ-val { font-size: 12.5px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-econ-sub { font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.up .hp-m-label { width: 28px; justify-content: flex-start; }
.hp-count:not(.ok):not(.bad) { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
@media (max-width: 720px) {
.up-sum { grid-template-columns: 1fr; }
}
/* Claude 用量 › 消耗来源 (UsageSourcePanel). Categorical slots are the
validated dataviz palette, stepped separately for the dark surface; colour is
fixed per source (see SLOT in the component), never by rank. */
.up-src {
--up-src-1: #2a78d6; --up-src-2: #eb6834; --up-src-3: #1baf7a; --up-src-4: #eda100;
--up-src-5: #e87ba4; --up-src-6: #008300; --up-src-7: #6250d6; --up-src-8: #e34948;
--up-src-other: #a9adb8; --up-src-unknown: #52514e; --up-src-unknown-bg: #ecebe7;
display: flex; flex-direction: column; gap: 12px;
border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
padding: 12px 16px 14px; }
:root[data-theme="dark"] .up-src {
--up-src-1: #3987e5; --up-src-2: #d95926; --up-src-3: #199e70; --up-src-4: #c98500;
--up-src-5: #d55181; --up-src-6: #008300; --up-src-7: #9085e9; --up-src-8: #e66767;
--up-src-other: #5d626d; --up-src-unknown: #c3c2b7; --up-src-unknown-bg: #2a2b2e; }
.up-src-head { display: flex; align-items: center; gap: 7px; }
.up-src-title { font-size: 13px; font-weight: 650; color: var(--text); }
.up-src-seg-ctl { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.up-src-seg-ctl button { border: 0; background: none; padding: 3px 10px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.up-src-seg-ctl button + button { border-left: 1px solid var(--border); }
.up-src-seg-ctl button.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.up-src-main { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.up-src-donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.up-src-donut { width: 188px; height: 188px; display: block; }
.up-src-arc { stroke: var(--surface); stroke-width: 2; transition: opacity .12s; cursor: default; }
.up-src-arc.dim, .up-src-seg.dim { opacity: .28; }
.up-src-donut-val { font-size: 19px; font-weight: 650; fill: var(--text); font-variant-numeric: tabular-nums; }
.up-src-donut-sub { font-size: 10.5px; fill: var(--muted); }
.up-src-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 11px; color: var(--text-2); }
.up-src-legend-item { display: inline-flex; align-items: center; gap: 4px; transition: opacity .12s; }
.up-src-legend-item.dim { opacity: .4; }
.up-src-legend-item b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.up-src-sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; margin-right: 6px; vertical-align: -0.5px; }
.up-src-legend-item .up-src-sw { margin-right: 0; }
.up-src-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.up-src-table th { text-align: left; font-weight: 500; font-size: 10.5px; color: var(--muted);
padding: 0 8px 5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.up-src-table td { padding: 5px 8px; border-bottom: 1px solid var(--hairline); color: var(--text-2); white-space: nowrap; }
.up-src-table tr { transition: opacity .12s; }
.up-src-table tr.dim { opacity: .45; }
.up-src-table tr.unknown td { background: var(--surface-2); }
.up-src-table td:first-child { color: var(--text); }
.up-src-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.up-src-table .strong { color: var(--text); font-weight: 650; }
.up-src-table .muted, .up-src-note .muted { color: var(--muted); }
.up-src-up { color: var(--warning); font-weight: 600; }
.up-src-new { color: var(--muted); font-size: 11px; }
.up-src-flag { margin-left: 6px; font-size: 10px; font-weight: 650; color: var(--warning);
border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; }
.up-src-bars { position: relative; }
.up-src-bars svg { display: block; }
.up-src-grid { stroke: var(--hairline); stroke-width: 1; }
.up-src-axis { font-size: 10px; fill: var(--muted-2); font-variant-numeric: tabular-nums; }
.up-src-seg { stroke: none; transition: opacity .12s; }
.up-src-tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; z-index: 2;
min-width: 170px; white-space: nowrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
box-shadow: 0 4px 14px rgba(0, 0, 0, .12); padding: 6px 9px; font-size: 11px; color: var(--text-2); }
.up-src-tip-head { font-weight: 650; color: var(--text); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.up-src-tip-row { display: flex; align-items: center; gap: 0; line-height: 1.6; }
.up-src-tip-v { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; color: var(--text); }
.up-src-notes { display: flex; flex-direction: column; gap: 6px; }
.up-src-note { font-size: 11.5px; line-height: 1.65; color: var(--muted); }
.up-src-note b { color: var(--text-2); font-weight: 600; }
.up-src-note code { font-size: 10.5px; background: var(--surface-2); border-radius: 3px; padding: 0 4px; }
.up-src-samples { margin: 4px 0 0; padding-left: 18px; }
.up-src-samples li { margin: 1px 0; }
@media (max-width: 860px) {
.up-src-main { grid-template-columns: 1fr; }
.up-src-table { font-size: 11px; }
}
.product-notice { border-left: 2px solid var(--accent); padding: 8px 12px; font-size: 12px; line-height: 1.6; }
.product-settings-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.product-settings-card { margin: 16px 0; border: 1px solid var(--border); padding: 16px; border-radius: var(--r-sm); }
.product-settings-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.product-enable { margin-left: auto; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.product-enable, .product-platform-toggle { white-space: nowrap; }
.product-enable input[type="checkbox"], .product-platform-toggle input[type="checkbox"] { width: 14px; height: 14px; flex: 0 0 14px; margin: 0; padding: 0; }
.product-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.product-settings-grid input, .product-platform select { width: 100%; min-width: 0; box-sizing: border-box; }
.product-prompt { margin-top: 12px; }
.product-prompt textarea { width: 100%; min-width: 0; box-sizing: border-box; resize: vertical; font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; line-height: 1.5; }
.product-platform { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 14px; }
.product-platform-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 10px; }
.product-platform > .wizard-field { margin-bottom: 10px; }
.product-settings-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.product-settings-actions > :first-child { margin-right: auto; }
.product-settings-actions button { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 600px) { .product-settings-grid { grid-template-columns: minmax(0, 1fr); } }
/* 许愿 tab: the wish body is free text people typed, line breaks included. */
.wish-filter { padding-right: 12px; }
.wish-summary { font-size: 12px; color: var(--muted); margin: 2px 0 -4px; }
.wish-row { align-items: flex-start; }
.wish-text { margin-top: 4px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
+105
View File
@@ -0,0 +1,105 @@
/*
* Styles only the Prompts panel (PromptsPanel.tsx + PromptGraphPanel, PromptEditor, …) renders — split out of
* styles.css so they ship with that panel's lazy chunk instead of the
* render-blocking global stylesheet.
*
* This file loads AFTER styles.css (Vite appends the chunk's <link> on first
* open, before the panel renders), so:
* - only add selectors built on classes used exclusively by this panel's
* chunk — control-web/test/panel_css_scope.test.ts enforces it;
* - a class shared with the board / drawer / another panel stays in styles.css;
* - don't depend on source order against a styles.css rule; use specificity.
*/
.lab-diff-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.lab-diff-bar .lab-select { min-width: 180px; }
/* ── 提示词图谱 (PromptGraphPanel) ───────────────────────────────────────────
All colour comes from tokens, so the dark theme follows for free. The graph
itself is plain SVG — 23 nodes on a deterministic grid did not justify a
graph library, and a hand-drawn one stays themeable with the same variables
as the rest of the app. */
.pg { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.pg-empty { color: var(--text-2); font-size: 13px; padding: 32px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pg-empty--err { color: var(--danger); }
.pg-bar { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pg-bar-spacer { flex: 1; }
.pg-bar-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.pg-bar-stat > svg { color: var(--muted); }
.pg-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; user-select: none; }
.pg-toggle input { accent-color: var(--accent); cursor: pointer; }
.pg-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.pg-body:has(.pg-drawer) { grid-template-columns: 220px minmax(0, 1fr) 360px; }
/* Left explorer */
.pg-tree { display: flex; flex-direction: column; gap: 14px; max-height: 72vh; overflow: auto; padding-right: 4px; }
.pg-tree-group { display: flex; flex-direction: column; gap: 3px; }
.pg-tree-head { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-2); padding: 0 4px 4px; }
.pg-tree-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: var(--r-sm); padding: 6px 8px; cursor: pointer; color: var(--text-2); font-size: 12.5px; }
.pg-tree-row:hover { background: var(--surface-2); }
.pg-tree-row.on { background: var(--accent-soft); border-color: var(--accent-edge); color: var(--text); font-weight: 600; }
.pg-tree-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-tree-count { font-size: 10.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 1px 6px; }
/* Status dot — the same two states the graph nodes use. */
.pg-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.pg-dot--live { background: var(--success); }
.pg-dot--code { background: var(--muted-2); }
/* Canvas */
.pg-canvas { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: auto; max-height: 72vh; }
.pg-svg { display: block; height: auto; }
.pg-band { fill: var(--surface); }
.pg-band--alt { fill: var(--surface-2); }
.pg-band--frag { fill: var(--accent-soft); }
.pg-band-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; fill: var(--muted-2); }
.pg-col-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; fill: var(--muted); }
.pg-edge { fill: none; stroke: var(--border-strong); stroke-width: 1.4; }
.pg-edge--derive { stroke: var(--accent); stroke-dasharray: 5 4; }
.pg-edge.pg-dim { opacity: 0.1; }
.pg-node { cursor: pointer; }
.pg-node > rect:first-child { fill: var(--elev); stroke: var(--border); stroke-width: 1; transition: stroke 0.12s ease; }
.pg-node:hover > rect:first-child { stroke: var(--accent-edge); }
.pg-node.on > rect:first-child { stroke: var(--accent); stroke-width: 2; }
.pg-node-stripe { stroke: none; }
.pg-node--live .pg-node-stripe { fill: var(--success); }
.pg-node--code .pg-node-stripe { fill: var(--muted-2); }
.pg-node-title { font-size: 12.5px; font-weight: 650; fill: var(--text); pointer-events: none; }
.pg-node-meta { font-size: 10.5px; fill: var(--muted); pointer-events: none; }
.pg-node.pg-dim { opacity: 0.22; }
/* Right drawer */
.pg-drawer { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 14px; max-height: 72vh; overflow: auto; }
.pg-drawer-head { display: flex; align-items: center; gap: 8px; }
.pg-drawer-head h3 { flex: 1; margin: 0; font-size: 14.5px; font-weight: 700; color: var(--text); }
.pg-icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; border-radius: var(--r-sm); }
.pg-icon-btn:hover { background: var(--surface-2); color: var(--text); }
.pg-note { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.pg-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 12px; align-items: baseline; }
.pg-facts dt { color: var(--muted); white-space: nowrap; }
.pg-facts dd { margin: 0; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.pg-facts code { font-family: var(--font-mono); font-size: 11px; background: var(--surface-2); border-radius: 4px; padding: 1px 5px; }
.pg-sym { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.pg-rel { display: flex; flex-direction: column; gap: 7px; }
.pg-rel h4 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--muted); text-transform: uppercase; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pg-chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; cursor: pointer; }
.pg-chip:hover { border-color: var(--accent-edge); color: var(--accent); background: var(--accent-soft); }
.pg-muted { color: var(--muted); font-size: 11.5px; }
.pg-hint { line-height: 1.7; }
.pg-hint code { font-family: var(--font-mono); font-size: 11px; background: var(--surface-2); border-radius: 4px; padding: 1px 5px; }
.pg-preview { margin: 0; max-height: 260px; overflow: auto; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px; }
.pg-open { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: var(--r-sm); padding: 7px 12px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.pg-open:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
@media (max-width: 1100px) {
.pg-body, .pg-body:has(.pg-drawer) { grid-template-columns: minmax(0, 1fr); }
.pg-tree { max-height: 220px; }
}
/* ── 提示词控制台:版本时间线 ───────────────────────────────────────────────── */
.pg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pv { display: flex; flex-direction: column; gap: 12px; }
.pv-day { display: flex; flex-direction: column; gap: 6px; }
.pv-day-head { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted-2); padding-left: 2px; }
.pv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pv-item { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-2); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); padding: 7px 11px; min-width: 0; }
.pv-item--commit { background: var(--surface-2); }
.pv-icon { display: inline-flex; color: var(--muted); flex: none; }
.pv-node { flex: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 1px 9px; font-size: 11.5px; cursor: pointer; }
.pv-node:hover { border-color: var(--accent-edge); color: var(--accent); background: var(--accent-soft); }
.pv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.pv-sha { flex: none; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); background: var(--surface-3); border-radius: 4px; padding: 1px 6px; }
.pv-meta { flex: none; font-size: 11px; color: var(--muted); }