netx/web/src/index.css
oliver f1ed4fe753 feat(collect): draft jobs, merged create UI, and unified start
Create collection jobs without auto-running; add /start for first run and re-run. Merge create form with filterable NE picker and selected list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 10:36:47 +08:00

1049 lines
16 KiB
CSS

* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Inter, "Segoe UI", Arial, sans-serif;
background: #eef2f7;
color: #1f2937;
}
#root {
min-height: 100vh;
}
.app--shell {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.app-brand {
display: flex;
align-items: center;
justify-content: space-between;
height: 52px;
padding: 0 24px;
background: linear-gradient(90deg, #1565c0 0%, #1e88e5 55%, #2196f3 100%);
box-shadow: 0 2px 8px rgba(21, 101, 192, 0.25);
}
.app-brand__logo {
font-size: 20px;
font-weight: 700;
letter-spacing: 0.4px;
color: #fff;
text-decoration: none;
flex-shrink: 0;
}
.app-brand__logo--static {
display: inline-block;
}
.app-brand__sep {
width: 1px;
height: 22px;
background: rgba(255, 255, 255, 0.35);
flex-shrink: 0;
}
.app-brand__start {
display: flex;
align-items: center;
gap: 14px;
min-width: 0;
}
.app-brand__apps {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
padding: 0;
border: none;
border-radius: 4px;
background: transparent;
color: #fff;
cursor: pointer;
}
.app-brand__apps:hover,
.app-brand__apps:focus-visible {
background: rgba(255, 255, 255, 0.16);
outline: none;
}
.app-brand__module-title {
font-size: 16px;
font-weight: 600;
color: #fff;
white-space: nowrap;
}
.app-brand__actions {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0;
}
.app-main {
flex: 1;
padding: 20px 28px 32px;
background: #eef2f7;
color: #1f2937;
}
.workbench {
max-width: 1280px;
}
.wb-section {
margin-bottom: 28px;
}
.wb-section__title {
margin: 0 0 14px;
padding-bottom: 10px;
font-size: 15px;
font-weight: 600;
color: #334155;
border-bottom: 1px solid #d8dee8;
}
.wb-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 14px;
}
.wb-card {
display: flex;
align-items: center;
gap: 14px;
min-height: 72px;
padding: 14px 16px;
border: 1px solid #e2e8f0;
border-radius: 4px;
background: #fff;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
cursor: pointer;
text-align: left;
text-decoration: none;
color: inherit;
transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.wb-card:hover {
border-color: #90caf9;
box-shadow: 0 4px 14px rgba(33, 150, 243, 0.15);
transform: translateY(-1px);
}
.wb-card__icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 4px;
flex-shrink: 0;
}
.wb-card__icon--blue {
background: #e3f2fd;
color: #1565c0;
}
.wb-card__icon--green {
background: #e8f5e9;
color: #2e7d32;
}
.wb-card__icon--amber {
background: #fff8e1;
color: #f57f17;
}
.wb-card__text {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.wb-card__label {
font-size: 14px;
font-weight: 600;
color: #1e293b;
}
.wb-card__desc {
font-size: 12px;
color: #64748b;
line-height: 1.35;
}
.conn-pill--on-brand {
border-color: rgba(255, 255, 255, 0.35);
background: rgba(255, 255, 255, 0.12);
color: #fff;
font-size: 12px;
}
.header-menu__trigger--on-brand {
border-color: rgba(255, 255, 255, 0.45);
background: rgba(255, 255, 255, 0.12);
color: #fff;
}
.header-menu__trigger--on-brand:hover,
.header-menu__trigger--on-brand:focus-visible {
background: rgba(255, 255, 255, 0.22);
border-color: #fff;
}
.header-menu__panel--light {
background: #fff;
border-color: #e2e8f0;
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.header-menu__label--light {
color: #64748b;
}
.header-menu__item--light {
color: #334155;
}
.header-menu__item--light:hover {
background: #f1f5f9;
color: #0f172a;
}
.header-menu__item--active-light {
background: #e3f2fd;
color: #1565c0;
}
.header-menu {
position: relative;
}
.header-menu__trigger {
min-width: 36px;
height: 36px;
padding: 0 10px;
font-size: 20px;
line-height: 1;
letter-spacing: 0.12em;
}
.header-menu__trigger:hover,
.header-menu__trigger:focus-visible {
border-color: #3d82f7;
outline: none;
}
.header-menu__panel {
position: absolute;
top: calc(100% + 6px);
right: 0;
z-index: 50;
min-width: 148px;
padding: 6px;
border: 1px solid #2c405f;
border-radius: 10px;
background: #0f1e34;
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.header-menu__label {
padding: 6px 10px 4px;
font-size: 11px;
color: #6b7f9c;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.header-menu__item {
display: block;
width: 100%;
text-align: left;
padding: 8px 10px;
border: none;
border-radius: 6px;
background: transparent;
color: #c1cde0;
font-size: 13px;
cursor: pointer;
}
.header-menu__item:hover {
background: rgba(61, 130, 247, 0.14);
color: #dce8ff;
}
.header-menu__item--active {
background: rgba(61, 130, 247, 0.22);
color: #dce8ff;
}
.app-main button,
.app-main select,
.app-main input,
.app-main textarea {
border: 1px solid #cbd5e1;
background: #fff;
color: #1f2937;
border-radius: 6px;
padding: 8px 10px;
}
button,
select,
input,
textarea {
border: 1px solid #cbd5e1;
background: #fff;
color: #1f2937;
border-radius: 6px;
padding: 8px 10px;
}
textarea {
width: 100%;
resize: vertical;
}
button {
cursor: pointer;
}
.cards {
display: grid;
grid-template-columns: repeat(3, minmax(220px, 1fr));
gap: 12px;
margin-bottom: 12px;
}
.app-main .card,
.app-main .panel {
border: 1px solid #e2e8f0;
background: #fff;
border-radius: 8px;
padding: 14px;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.card,
.panel {
border: 1px solid #e2e8f0;
background: #fff;
border-radius: 8px;
padding: 14px;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.card h3,
.panel h2 {
margin: 0 0 10px;
font-size: 16px;
}
.card input,
.card select,
.card textarea {
width: 100%;
margin-bottom: 8px;
}
.actions-row {
margin-top: 8px;
}
.actions-row--inline {
display: flex;
gap: 8px;
flex-wrap: nowrap;
overflow-x: auto;
}
.card--full {
grid-column: 1 / -1;
}
.filter-inline {
display: grid;
grid-template-columns: minmax(280px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr) 180px;
gap: 8px;
align-items: center;
}
.filter-inline input,
.filter-inline select {
width: 100%;
margin-bottom: 0;
}
a {
color: #1565c0;
text-decoration: none;
}
.muted {
color: #64748b;
}
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
border-bottom: 1px solid #e2e8f0;
padding: 8px;
text-align: left;
font-size: 13px;
vertical-align: top;
color: #334155;
}
th {
color: #64748b;
font-weight: 600;
}
.split {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
pre {
white-space: pre-wrap;
margin: 0;
background: #091425;
border: 1px solid #223651;
border-radius: 8px;
padding: 10px;
}
.ws-log-panel {
margin-top: 12px;
max-height: 240px;
overflow-y: auto;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 8px 10px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
line-height: 1.45;
}
.ws-log-line {
padding: 3px 0;
border-bottom: 1px solid #e8edf3;
word-break: break-word;
}
.ws-log-line:last-child {
border-bottom: none;
}
.ws-log-line--error {
color: #c62828;
}
.ws-log-line--warning {
color: #e65100;
}
.ws-log-line--info {
color: #475569;
}
.ws-log-ts {
color: #94a3b8;
margin-right: 8px;
}
.pill {
margin-top: 8px;
padding: 6px 10px;
border-radius: 6px;
width: fit-content;
font-size: 12px;
background: #f1f5f9;
color: #334155;
border: 1px solid #e2e8f0;
}
.pill--high {
background: #ffebee;
border-color: #ffcdd2;
color: #b71c1c;
}
.pill--medium {
background: #fff8e1;
border-color: #ffe082;
color: #e65100;
}
.pill--low {
background: #e8f5e9;
border-color: #c8e6c9;
color: #2e7d32;
}
.link-btn {
border: none;
background: transparent;
color: #1565c0;
padding: 0;
cursor: pointer;
}
.link-btn--danger {
color: #c62828;
}
.link-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.table-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
}
.status {
margin-top: 12px;
color: #9db2cf;
font-size: 12px;
}
.app-main .conn-pill:not(.conn-pill--on-brand) {
font-size: 12px;
border: 1px solid #cbd5e1;
border-radius: 999px;
padding: 4px 10px;
background: #f8fafc;
color: #475569;
}
.conn-pill {
font-size: 12px;
border: 1px solid #cbd5e1;
border-radius: 999px;
padding: 4px 10px;
background: #f8fafc;
}
.conn-pill--up {
border-color: #a5d6a7;
color: #2e7d32;
background: #e8f5e9;
}
.conn-pill--down {
border-color: #ef9a9a;
color: #c62828;
background: #ffebee;
}
.conn-pill--unknown {
border-color: #cbd5e1;
color: #64748b;
}
.toast {
position: fixed;
right: 20px;
bottom: 20px;
padding: 12px 16px;
border-radius: 8px;
border: 1px solid #cbd5e1;
background: #fff;
color: #1e293b;
font-size: 14px;
line-height: 1.45;
z-index: 60;
max-width: 420px;
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}
.toast--ok {
border-color: #81c784;
background: #e8f5e9;
color: #1b5e20;
}
.toast--error {
border-color: #ef9a9a;
background: #ffebee;
color: #b71c1c;
}
.inline-spinner {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 8px;
border: 2px solid rgba(255, 255, 255, 0.22);
border-top-color: rgba(255, 255, 255, 0.85);
border-radius: 50%;
vertical-align: -2px;
animation: inline-spin 0.65s linear infinite;
}
@keyframes inline-spin {
to {
transform: rotate(360deg);
}
}
.conn-pill--warn {
border-color: #ffe082;
color: #e65100;
background: #fff8e1;
}
.app-main .inline-spinner {
border-color: rgba(21, 101, 192, 0.2);
border-top-color: #1565c0;
}
.skeleton-line {
height: 32px;
border-radius: 8px;
margin-bottom: 10px;
background: linear-gradient(90deg, #14253e 25%, #1d3558 50%, #14253e 75%);
background-size: 200% 100%;
animation: shimmer 1.4s infinite;
}
.mini-chart {
margin-top: 10px;
}
.mini-chart__row {
display: grid;
grid-template-columns: 70px 1fr 36px;
gap: 8px;
align-items: center;
margin-bottom: 8px;
}
.mini-chart__label,
.mini-chart__value {
font-size: 12px;
color: #a8bad5;
}
.card-title-with-hint {
display: flex;
align-items: center;
gap: 8px;
margin: 0;
}
.help-hint {
position: relative;
display: inline-flex;
vertical-align: middle;
}
.help-hint__trigger {
width: 18px;
height: 18px;
padding: 0;
border: 1px solid #cbd5e1;
border-radius: 50%;
background: #f8fafc;
color: #64748b;
font-size: 12px;
font-weight: 700;
line-height: 1;
cursor: pointer;
}
.help-hint__trigger:hover,
.help-hint__trigger:focus-visible {
border-color: #1565c0;
color: #1565c0;
outline: none;
}
.help-hint__popover {
position: absolute;
top: calc(100% + 6px);
left: 0;
z-index: 40;
width: min(360px, 80vw);
padding: 10px 12px;
border: 1px solid #e2e8f0;
border-radius: 8px;
background: #fff;
color: #334155;
font-size: 13px;
font-weight: 400;
line-height: 1.45;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.mini-chart__bar-wrap {
height: 10px;
border-radius: 999px;
background: #10213a;
border: 1px solid #223651;
overflow: hidden;
}
.mini-chart__bar {
height: 100%;
background: linear-gradient(90deg, #3973d2, #5aa1ff);
}
.pager {
margin-top: 12px;
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.pager__meta {
color: #9db2cf;
font-size: 12px;
}
.pager__controls {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.pager__btn,
.pager__num {
min-width: 34px;
padding: 6px 10px;
}
.pager__num.active {
border-color: #4f7ec7;
background: rgba(61, 130, 247, 0.24);
color: #dce8ff;
}
.pager__size {
width: auto;
min-width: 88px;
}
@keyframes shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.page-stack {
display: flex;
flex-direction: column;
gap: 16px;
}
.panel--warn {
border-color: #ffe082;
background: #fff8e1;
color: #5d4037;
}
.panel__toolbar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
flex-wrap: wrap;
margin-bottom: 12px;
}
.panel__toolbar h2 {
margin: 0;
}
.panel__actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.table-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.modal-backdrop {
position: fixed;
inset: 0;
z-index: 50;
background: rgba(15, 23, 42, 0.45);
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
}
.modal {
width: min(720px, 100%);
max-height: 90vh;
overflow: auto;
background: #fff;
border-radius: 10px;
padding: 20px;
box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
}
.modal h3 {
margin: 0 0 16px;
}
.modal__actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 16px;
}
.form-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
.form-hint {
margin: 0 0 12px;
font-size: 12px;
color: #64748b;
}
.form-label__required {
color: #c62828;
font-weight: 600;
}
.form-label__optional {
color: #94a3b8;
font-weight: 400;
}
.form-field-hint {
font-size: 11px;
color: #94a3b8;
line-height: 1.35;
}
.form-grid label {
display: flex;
flex-direction: column;
gap: 4px;
font-size: 12px;
color: #64748b;
}
.form-grid input,
.form-grid select {
font-size: 14px;
}
.form-grid__full {
grid-column: 1 / -1;
}
.form-grid--single {
grid-template-columns: 1fr;
}
.panel__hint {
margin: 0 0 12px;
font-size: 13px;
color: #64748b;
line-height: 1.45;
}
.panel__hint--live {
color: #1565c0;
}
.collect-commands {
width: 100%;
min-height: 160px;
font-family: ui-monospace, Consolas, monospace;
font-size: 13px;
line-height: 1.4;
padding: 10px;
border: 1px solid #cbd5e1;
border-radius: 6px;
resize: vertical;
}
.collect-meta {
font-size: 13px;
color: #64748b;
margin-right: auto;
}
.collect-create-panel h3 {
margin: 0;
font-size: 15px;
font-weight: 600;
color: #334155;
}
.collect-selected-block,
.collect-pick-block {
margin-top: 20px;
padding-top: 16px;
border-top: 1px solid #e2e8f0;
}
.collect-selected-block__head {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px 16px;
margin-bottom: 10px;
}
.collect-selected-list {
display: flex;
flex-direction: column;
gap: 8px;
max-height: 220px;
overflow: auto;
padding: 4px 0;
}
.collect-selected-chip {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 12px;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
}
.collect-selected-chip__main {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.collect-selected-chip__meta {
font-size: 12px;
color: #64748b;
}
.collect-pick-filters {
margin-bottom: 12px;
}
.collect-cmd-preview {
font-size: 12px;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 6px;
padding: 10px;
max-height: 120px;
overflow: auto;
white-space: pre-wrap;
}
.collect-runs-panel {
display: flex;
flex-direction: column;
gap: 10px;
}
.collect-runs-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 12px;
}
.collect-runs-filter {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: #475569;
}
.collect-runs-filter select {
min-width: 140px;
padding: 6px 8px;
border: 1px solid #cbd5e1;
border-radius: 6px;
background: #fff;
}
.collect-runs-filter input {
min-width: 180px;
padding: 6px 8px;
border: 1px solid #cbd5e1;
border-radius: 6px;
background: #fff;
}
.collect-run-message {
max-width: 420px;
max-height: 160px;
overflow: auto;
white-space: pre-wrap;
word-break: break-word;
font-size: 12px;
line-height: 1.45;
color: #334155;
padding: 6px 8px;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 6px;
}
@media (max-width: 1200px) {
.cards {
grid-template-columns: 1fr;
}
.filter-inline {
grid-template-columns: 1fr;
}
.actions-row--inline {
flex-wrap: wrap;
}
.split {
grid-template-columns: 1fr;
}
.form-grid {
grid-template-columns: 1fr;
}
}