:root { --bg: #f1f5f9; --surface: #ffffff; --surface-2: #f8fafc; --text: #0f172a; --text-2: #475569; --text-3: #94a3b8; --accent: #2563eb; --accent-hover: #1d4ed8; --accent-bg: rgba(37, 99, 235, 0.06); --success: #059669; --danger: #ef4444; --danger-hover: #dc2626; --warning: #d97706; --border: #e2e8f0; --border-light: #f1f5f9; --radius: 0; --topbar-h: 42px; } * { box-sizing: border-box; margin: 0; } body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--border); font-size: 14px; line-height: 1.5; height: 100vh; overflow: hidden; } /* ── Topbar ─────────────────────────────────────── */ .topbar { display: flex; justify-content: space-between; align-items: center; height: var(--topbar-h); padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); } .title { font-size: 15px; font-weight: 700; color: var(--accent); } .status { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; } .ws-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; transition: background 0.3s; } .ws-dot.connected { background: #22c55e; } .ws-dot.disconnected { background: #ef4444; } .topbar-actions { display: flex; align-items: center; gap: 10px; } /* ── Tabs ───────────────────────────────────────── */ .tab-bar { display: flex; gap: 2px; } .tab-btn { padding: 0 16px; height: 28px; font-size: 13px; font-weight: 500; background: transparent; border: 1px solid var(--border); color: var(--text-2); cursor: pointer; } .tab-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; } .link-button { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 10px; color: var(--text-2); text-decoration: none; border: 1px solid var(--border); background: transparent; font-size: 12px; } .link-button:hover { background: var(--bg); border-color: var(--text-3); } /* ── Grid Layout ────────────────────────────────── */ .grid-ops, .grid-config { display: grid; gap: 1px; height: calc(100vh - var(--topbar-h)); } .grid-config { grid-template-columns: 320px minmax(0, 2fr) minmax(0, 1.3fr); grid-template-rows: 1fr 380px; } .grid-ops { grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: 1fr 260px; } /* config view slot assignments */ .grid-config .panel.top-left { grid-column: 1; grid-row: 1; } .grid-config .panel.top-right { grid-column: 2 / 4; grid-row: 1; } .grid-config .panel.bottom-left { grid-column: 1; grid-row: 2; } .grid-config .panel.bottom-mid { grid-column: 2; grid-row: 2; } .grid-config .panel.bottom-right{ grid-column: 3; grid-row: 2; } /* ops view slot assignments */ .grid-ops .panel.ops-main { grid-column: 1 / 3; grid-row: 1; } .grid-ops .panel.ops-bottom { grid-column: 1 / 3; grid-row: 2; } .panel { background: var(--surface); display: flex; flex-direction: column; min-height: 0; overflow: hidden; } .stack-panel { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; } .stack-section { display: flex; flex-direction: column; min-height: 0; flex: 1 1 0; } .stack-section-bordered { border-top: 1px solid var(--border-light); } /* ── Ops View ───────────────────────────────────── */ .ops-layout { display: flex; min-height: 0; flex: 1 1 auto; overflow: hidden; } .ops-unit-sidebar { width: 260px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; overflow: hidden; } .ops-unit-list { flex: 1 1 auto; overflow-y: auto; } .ops-equipment-area { flex: 1 1 auto; overflow: auto; padding: 12px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px; } .ops-placeholder { padding: 20px; } /* Equipment ops card */ .ops-eq-card { width: 220px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 0; } .ops-eq-card-head { padding: 8px 10px 6px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: 6px; } .ops-eq-card-head strong { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ops-signal-rows { padding: 6px 10px; display: flex; flex-direction: column; gap: 3px; } .ops-signal-row { display: flex; align-items: center; gap: 6px; font-size: 12px; } .ops-signal-label { width: 36px; color: var(--text-3); font-size: 11px; text-transform: uppercase; flex-shrink: 0; } .ops-signal-value { flex: 1; font-weight: 500; } .sig-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); transition: background 0.2s; } .sig-dot.sig-on { background: var(--success); } .sig-dot.sig-fault { background: var(--danger); } .sig-dot.sig-warn { background: var(--warning); } .ops-eq-card-actions { padding: 6px 10px 8px; display: flex; gap: 6px; border-top: 1px solid var(--border-light); } .ops-eq-card-actions button { flex: 1; padding: 3px 0; font-size: 12px; } /* ops unit list item */ .ops-unit-item { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 3px; } .ops-unit-item:hover { background: var(--accent-bg); } .ops-unit-item.selected { background: var(--accent-bg); border-left: 3px solid var(--accent); } .ops-unit-item-name { font-size: 13px; font-weight: 600; } .ops-unit-item-meta { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; } .ops-unit-item-actions { display: flex; gap: 4px; padding-top: 4px; } .ops-unit-item-actions button { padding: 2px 8px; font-size: 11px; } /* ── Panel Header ───────────────────────────────── */ .panel-head { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--border-light); flex-shrink: 0; flex-wrap: wrap; gap: 6px; } .ops-batch-actions { display: flex; gap: 4px; } .ops-batch-actions button { font-size: 11px; padding: 2px 8px; } h2, h3 { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.5px; } /* ── Buttons ────────────────────────────────────── */ button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 10px; border: none; border-radius: var(--radius); font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; background: var(--accent); color: #fff; white-space: nowrap; } button:hover { background: var(--accent-hover); } button:disabled { opacity: 0.4; cursor: not-allowed; } button.secondary { background: transparent; color: var(--text-2); border: 1px solid var(--border); } button.secondary:hover { background: var(--bg); border-color: var(--text-3); } button.danger { background: var(--danger); color: #fff; } button.danger:hover { background: var(--danger-hover); } /* ── Source List ─────────────────────────────────── */ .list { display: flex; flex-direction: column; overflow-y: auto; flex: 1 1 auto; min-height: 0; padding: 6px; gap: 4px; } .list-item { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: all 0.15s; } .list-item:hover { background: var(--accent-bg); border-color: rgba(37, 99, 235, 0.2); } .list-item.selected { background: var(--accent-bg); border-color: var(--accent); } .list-item .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; } .equipment-list { padding-top: 0; } .equipment-card, .source-card { background: var(--surface); } .equipment-card-actions, .source-card-actions { padding-top: 4px; } .source-panels { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px; overflow: auto; } .list-item button { padding: 2px 8px; font-size: 11px; } .muted { color: var(--text-3); font-size: 12px; } /* ── Badges ──────────────────────────────────────── */ .badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 0; text-transform: uppercase; letter-spacing: 0.3px; background: rgba(37, 99, 235, 0.1); color: var(--accent); } .badge.offline { background: rgba(239, 68, 68, 0.1); color: var(--danger); } .badge.quality-good { background: rgba(5, 150, 105, 0.1); color: var(--success); } .badge.quality-bad { background: rgba(239, 68, 68, 0.1); color: #dc2626; } .badge.quality-uncertain { background: rgba(217, 119, 6, 0.1); color: var(--warning); } .badge.quality-unknown { background: rgba(148, 163, 184, 0.12); color: #64748b; } /* ── Data Table (Points) ─────────────────────────── */ .table-wrap { flex: 1 1 auto; overflow: auto; min-height: 0; } .data-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; } .data-table thead { position: sticky; top: 0; z-index: 1; } .data-table th { background: var(--surface-2); text-align: left; padding: 5px 12px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1px solid var(--border); white-space: nowrap; } .data-table td { padding: 4px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .data-table td.point-actions { overflow: visible; text-overflow: clip; white-space: nowrap; } .point-actions { text-align: right; } .point-actions button + button { margin-left: 6px; } .data-table tbody tr { transition: background 0.1s; } .data-table tbody tr:hover { background: var(--accent-bg); } .data-table tbody tr.active { background: rgba(37, 99, 235, 0.1); } .point-name { font-weight: 500; color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; } .point-id { font-size: 11px; color: var(--text-3); font-family: "JetBrains Mono", "Consolas", monospace; } .point-value { font-family: "JetBrains Mono", "Consolas", monospace; font-weight: 600; font-size: 13px; color: var(--text); } .empty-state { text-align: center; color: var(--text-3); padding: 32px 12px !important; font-size: 13px; } /* ── Pager ────────────────────────────────────────── */ .pager { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--text-3); } .pager button { width: 22px; height: 22px; padding: 0; font-size: 16px; line-height: 1; } /* ── Toolbar ──────────────────────────────────────── */ .toolbar { display: flex; gap: 6px; flex-shrink: 0; } .point-batch-toolbar { align-items: center; justify-content: flex-end; padding: 8px 12px; border-bottom: 1px solid var(--border-light); flex-wrap: wrap; } .compact-check { margin-right: auto; } .compact-check input { margin: 0; } .equipment-toolbar { padding: 8px 12px 0; } .equipment-toolbar input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border); background: var(--surface); } .equipment-batch-toolbar { padding: 8px 12px; border-bottom: 1px solid var(--border-light); align-items: center; flex-wrap: wrap; } .equipment-batch-toolbar .muted { min-width: 90px; } .equipment-batch-toolbar select { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border); background: var(--surface); } /* ── Form ─────────────────────────────────────────── */ .form { display: flex; flex-direction: column; gap: 12px; } .form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); } .form input[type="text"], .form input[type="url"], .form input[type="password"], .form input[type="number"], .form input:not([type]), .form select { padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; transition: border-color 0.15s; } .form input:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12); } .check-row { flex-direction: row !important; align-items: center; gap: 6px; } .form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; } /* ── Tree ─────────────────────────────────────────── */ .tree { overflow-y: auto; padding: 4px 8px; flex: 1 1 auto; min-height: 0; } .tree details { margin-left: 12px; } .tree summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 2px 0; font-size: 13px; } .tree summary.has-children::before { content: "▸"; color: var(--text-3); font-size: 10px; } .tree details[open] > summary.has-children::before { content: "▾"; } .tree summary::-webkit-details-marker { display: none; } .tree .node-label { color: var(--text); } /* ── Log ──────────────────────────────────────────── */ .log { background: #0f172a; padding: 6px 10px; font-family: "JetBrains Mono", "Consolas", monospace; font-size: 12px; line-height: 1.55; color: #cbd5e1; overflow-y: auto; flex: 1 1 auto; display: flex; flex-direction: column; gap: 0; min-height: 0; } .log-line { white-space: pre-wrap; word-break: break-word; padding: 0 4px; border-radius: 0; } .log-line:hover { background: rgba(255, 255, 255, 0.04); } .log-line .level { font-weight: 700; margin-right: 6px; font-size: 11px; } .log-line .message { margin-left: 6px; } .log-line .muted { margin-left: 4px; color: #64748b; } .log-line.level-trace .level { color: #64748b; } .log-line.level-debug .level { color: #38bdf8; } .log-line.level-info .level { color: #34d399; } .log-line.level-warn .level { color: #fbbf24; } .log-line.level-error .level { color: #f87171; } /* ── Modal ────────────────────────────────────────── */ .modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: flex; align-items: center; justify-content: center; z-index: 50; backdrop-filter: blur(2px); } .hidden { display: none !important; } .modal.hidden { display: none; } .modal-content { width: min(860px, 94vw); max-height: 85vh; overflow: hidden; background: var(--surface); border-radius: 0; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15); display: flex; flex-direction: column; gap: 12px; padding: 16px; } .modal-content.modal-sm { width: min(420px, 94vw); } .modal-head { display: flex; justify-content: space-between; align-items: center; } .modal-head h3 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); } .modal-foot { display: flex; justify-content: space-between; align-items: center; } .chart-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .chart-panel { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 8px; padding: 8px 10px 10px; } .chart-canvas { width: 100%; height: auto; min-height: 320px; flex: 1 1 auto; border: 1px solid var(--border); background: linear-gradient(to bottom, rgba(37, 99, 235, 0.03), rgba(37, 99, 235, 0)), var(--surface); } .modal-content .tree { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; background: var(--surface-2); max-height: 50vh; } .unit-list { padding-top: 6px; } .unit-card-actions { padding-top: 4px; } .event-card { padding: 4px 8px; font-size: 12px; border-bottom: 1px solid var(--border); } .event-card:hover { background: var(--surface-hover, var(--surface)); } .event-meta { display: flex; align-items: baseline; gap: 6px; } .event-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .event-time { flex-shrink: 0; font-size: 11px; } .event-message { color: var(--text-muted, #888); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .equipment-select-row { display: flex; align-items: center; gap: 6px; cursor: pointer; } .equipment-select-row input { margin: 0; } .drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, 0.28); display: flex; justify-content: flex-end; } .drawer-backdrop.hidden { display: none; } .drawer { width: min(760px, 88vw); height: 100vh; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; box-shadow: -24px 0 48px rgba(15, 23, 42, 0.16); } .drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border-light); } .drawer-head h3 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); } .drawer-body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); } .api-drawer { width: min(1100px, 96vw); } .equipment-drawer { width: min(1120px, 96vw); } .equipment-layout { grid-template-columns: 320px minmax(0, 1fr); } .equipment-sidebar, .equipment-content { min-height: 0; display: flex; flex-direction: column; } .equipment-sidebar { border-right: 1px solid var(--border-light); background: var(--surface-2); } .equipment-toolbar { padding: 10px 12px 0; } .equipment-toolbar input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border); background: var(--surface); } .equipment-form { padding: 14px; border-bottom: 1px solid var(--border-light); } .equipment-points { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; } .equipment-role-hint { padding: 8px 14px 0; } .compact-table td, .compact-table th { padding-top: 6px; padding-bottom: 6px; } .point-meta { display: flex; flex-direction: column; gap: 2px; } .point-role { font-size: 11px; color: var(--text-3); } .inline-select { width: 100%; padding: 6px 8px; border: 1px solid var(--border); background: var(--surface); } .doc-toc { border-right: 1px solid var(--border-light); background: var(--surface-2); overflow: auto; padding: 14px 12px 18px; } .doc-toc-title { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 10px; } .doc-toc-list { display: flex; flex-direction: column; gap: 4px; } .doc-toc-item { display: block; text-decoration: none; color: var(--text-2); font-size: 13px; line-height: 1.45; padding: 4px 6px; } .doc-toc-item:hover { background: var(--surface); } .doc-toc-item.level-1 { padding-left: 6px; font-weight: 700; color: var(--text); } .doc-toc-item.level-2 { padding-left: 14px; } .doc-toc-item.level-3 { padding-left: 22px; } .doc-toc-item.level-4 { padding-left: 30px; } .markdown-doc { overflow: auto; padding: 18px 20px 24px; } .markdown-doc { max-width: 920px; margin: 0 auto; color: var(--text); } .markdown-doc > * + * { margin-top: 14px; } .markdown-doc h1, .markdown-doc h2, .markdown-doc h3, .markdown-doc h4 { color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 700; } .markdown-doc h1 { font-size: 28px; padding-bottom: 10px; border-bottom: 1px solid var(--border); } .markdown-doc h2 { font-size: 22px; padding-top: 4px; } .markdown-doc h3 { font-size: 18px; } .markdown-doc h4 { font-size: 15px; } .markdown-doc p, .markdown-doc li { font-size: 14px; line-height: 1.75; } .markdown-doc ul, .markdown-doc ol { padding-left: 22px; } .markdown-doc li + li { margin-top: 6px; } .markdown-doc code { padding: 1px 5px; background: var(--surface-2); border: 1px solid var(--border-light); font-family: "JetBrains Mono", "Consolas", monospace; font-size: 12px; } .markdown-doc pre { overflow: auto; padding: 12px 14px; border: 1px solid var(--border); background: #0f172a; color: #e2e8f0; } .markdown-doc pre code { padding: 0; border: none; background: transparent; color: inherit; } .markdown-doc hr { border: none; border-top: 1px solid var(--border); } .markdown-doc blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); color: var(--text-2); } .doc-page { height: auto; min-height: 100vh; overflow: auto; } .doc-view { min-height: calc(100vh - var(--topbar-h)); padding: 20px; background: var(--bg); } .doc-card { max-width: 1100px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); } .doc-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border-light); } .doc-card-head h2 { text-transform: none; letter-spacing: 0; color: var(--text); } .doc-body { padding: 16px; } .doc-body pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: "JetBrains Mono", "Consolas", monospace; font-size: 13px; line-height: 1.7; color: var(--text); } /* ── Toast ────────────────────────────────────────── */ #toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column-reverse; gap: 8px; z-index: 9999; pointer-events: none; } .toast { display: flex; align-items: flex-start; gap: 8px; min-width: 240px; max-width: 380px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--text-3); box-shadow: 0 4px 12px rgba(0,0,0,0.1); font-size: 13px; color: var(--text); pointer-events: auto; animation: toast-in 0.15s ease; cursor: pointer; } .toast.error { border-left-color: var(--danger); } .toast.warning { border-left-color: var(--warning); } .toast.success { border-left-color: var(--success); } .toast-icon { flex-shrink: 0; font-size: 14px; line-height: 1.5; } .toast-body { flex: 1; word-break: break-word; } .toast-title { font-weight: 600; margin-bottom: 2px; } .toast-title:only-child { margin-bottom: 0; } .toast-message { color: var(--text-2); font-size: 12px; } .toast.hiding { animation: toast-out 0.15s ease forwards; } .toast.shake { animation: toast-shake 0.4s ease; } @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } @keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(8px); } } @keyframes toast-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } } /* ── Scrollbar ────────────────────────────────────── */ ::-webkit-scrollbar { width: 5px; height: 5px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; } ::-webkit-scrollbar-thumb:hover { background: var(--text-3); } /* ── Responsive ───────────────────────────────────── */ @media (max-width: 900px) { .grid-config, .grid-ops { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; height: auto; } body { height: auto; overflow: auto; } .panel.top-left { min-height: 200px; } .panel.top-right { min-height: 300px; } .grid-config .panel.bottom-left { grid-column: 1; grid-row: 3; min-height: 200px; } .grid-config .panel.bottom-mid { grid-column: 1; grid-row: 4; min-height: 200px; } .grid-config .panel.bottom-right { grid-column: 1; grid-row: 5; min-height: 320px; } .drawer { width: 100vw; } .drawer-body { grid-template-columns: 1fr; } .equipment-layout { grid-template-columns: 1fr; } .equipment-sidebar { border-right: none; border-bottom: 1px solid var(--border-light); } .doc-toc { border-right: none; border-bottom: 1px solid var(--border-light); max-height: 180px; } .doc-view { padding: 0; } .doc-card { border-left: none; border-right: none; } }