Files
ESP32_COMM/tools/css/components.css
T
小龙虾 770ae14156
SPI Link v2 Self-Test / selftest (push) Has been cancelled
feat(spi_link): 添加SPI Link v2 PC自测框架并优化协议稳定性
添加SPI Link v2的PC端自测功能,包含交叉校验基准测试,覆盖HELLO/OTA/CAN/PING等
多种协议场景。同时重构了health monitor中的多字段读取逻辑,消除了volatile变量
的撕裂读问题,并增强了BLE OTA的数据传输可靠性。

refactor(health_monitor): 修复heap hook多字段撕裂读问题

采用portMUX_CRITICAL临界区实现多字段一致快照读取,消除任务上下文与heap hook
之间的数据竞争。修改了HookSnap结构体设计,通过一次性拷贝volatile变量避免
跨字段组合时的数据不一致。JSON输出中明确标注estimated值的置信度。

fix(ble_ota): 实现DATA_IN丢包负反馈机制

当malloc失败或队列满时发送缺口ACK通知前端按completed_bytes续传,避免
静默丢包导致的8秒超时重传风暴。增加节流机制防止负ACK在重传叠加时打爆
NimBLE mbuf池,提升低内存环境下的OTA传输稳定性。

refactor(spi_master): 从堆分配改为固定Job池管理

将SPI worker的动态堆分配Job改为固定大小的静态池管理,避免频繁的
calloc/free操作影响实时性。新增acquireJobSlot/releaseJobSlot机制
管理池槽生命周期,提升SPI通信的可靠性和内存使用效率。
2026-07-21 01:16:43 +08:00

730 lines
33 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ============================================================
components.css — 上传 / 文件 / 进度 / 指标 / 徽章 / 阶段流 /
堆概况 / 任务栈 / 日志 / Toast / Tooltip 等组件
============================================================ */
/* ================= 上传区 ================= */
.upload-zone {
border: 2px dashed var(--border-strong); border-radius: var(--radius);
padding: 30px 16px; text-align: center; cursor: pointer;
background: rgba(255,255,255,.015);
transition: border-color .22s, background .22s, transform .22s, box-shadow .22s;
}
.upload-zone:hover, .upload-zone.dragover {
border-color: var(--esp32);
background: var(--esp32-dim);
box-shadow: 0 0 0 4px rgba(47,216,193,.07);
}
.upload-zone .upload-ico { font-size: 32px; margin-bottom: 10px; }
.upload-zone h4 {
font-family: var(--font-display);
font-size: 14px; font-weight: 600; margin-bottom: 4px; letter-spacing: .02em;
}
.upload-zone p { font-size: 12px; color: var(--text-dim); }
.upload-zone-sm { padding: 18px 12px; }
.upload-zone-sm .upload-ico { font-size: 24px; margin-bottom: 6px; }
.upload-zone-sm h4 { font-size: 13px; }
/* ================= 文件信息 ================= */
.file-info {
display: none; margin-top: 12px;
background: var(--bg-elevated); border: 1px solid var(--border);
border-radius: var(--radius-sm); padding: 13px 15px;
}
.file-info.show { display: block; }
.file-info-row { display: flex; justify-content: space-between; align-items: center; }
.file-info-row + .file-info-row { margin-top: 10px; }
.file-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.file-meta-item {
background: var(--bg-card); border: 1px solid var(--border-subtle);
padding: 8px 11px; border-radius: 7px; font-size: 12px;
}
.file-meta-item span {
color: var(--text-label); display: block;
font-family: var(--font-display);
font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px;
}
.file-meta-item b { font-weight: 600; font-family: var(--font-mono); }
/* ================= 阶段切换胶囊(ESP32 OTA / GD32 OTA)================= */
.progress-phase-row {
display: flex; align-items: center; gap: 4px; margin-bottom: 15px;
background: var(--bg-input); border: 1px solid var(--border);
border-radius: 999px; padding: 4px;
}
.pp-step {
flex: 1;
display: flex; align-items: center; justify-content: center; gap: 6px;
padding: 8px 10px; border-radius: 999px;
font-family: var(--font-display);
font-size: 12px; font-weight: 600; letter-spacing: .03em;
color: var(--text-dim); background: transparent;
transition: all .25s ease; white-space: nowrap; cursor: default;
}
.pp-ico { font-size: 13px; opacity: .45; transition: opacity .25s ease; }
.pp-step.active {
color: #04231e; background: linear-gradient(135deg, var(--esp32), #14b8a6);
box-shadow: 0 2px 12px rgba(47,216,193,.35);
}
.pp-step.active .pp-ico { opacity: 1; }
.pp-step.done { color: var(--can-hi); background: rgba(61,220,142,.13); }
.pp-step.done .pp-ico { opacity: 1; }
.pp-step.done .pp-txt::after { content: ' ✓'; font-size: 10px; }
/* ================= 进度条 ================= */
.progress-wrap { margin-top: 0; display: none; }
.progress-wrap.show { display: block; }
.progress-track {
width: 100%; height: 11px; border-radius: 999px;
background: var(--bg-input); overflow: hidden;
border: 1px solid var(--border-subtle);
box-shadow: inset 0 1px 3px rgba(0,0,0,.4);
}
.progress-fill {
height: 100%; border-radius: 999px;
background: linear-gradient(90deg, var(--esp32), #14b8a6);
width: 0%; transition: width .3s ease;
position: relative;
box-shadow: 0 0 10px rgba(47,216,193,.4);
}
.progress-fill::after {
content: ""; position: absolute; inset: 0;
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
animation: sweep 1.6s linear infinite;
}
.progress-fill.done {
background: linear-gradient(90deg, var(--green), #16a374);
box-shadow: 0 0 10px rgba(61,220,142,.4);
}
@keyframes sweep { 0% { transform: translateX(-100%);} 100% { transform: translateX(100%);} }
.progress-text {
display: flex; justify-content: space-between; margin-top: 8px;
font-size: 12px; color: var(--text-dim);
}
.progress-text #progressPct {
font-family: var(--font-display); font-weight: 700;
color: var(--esp32-hi); font-variant-numeric: tabular-nums;
}
/* ================= 按钮行 ================= */
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row .btn { flex: 1; }
/* ================= 运行指标 ================= */
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric {
position: relative;
background: var(--bg-elevated); border: 1px solid var(--border);
border-radius: var(--radius-sm); padding: 13px 15px;
overflow: hidden;
transition: border-color .22s, transform .22s, box-shadow .22s;
}
.metric::before {
content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
background: var(--metric-accent, var(--esp32));
opacity: .55;
}
.metric:nth-child(1) { --metric-accent: var(--esp32); } /* ESP32 温度 */
.metric:nth-child(2) { --metric-accent: var(--gd32); } /* GD32 温度 */
.metric:nth-child(3) { --metric-accent: var(--ble); } /* 输入 VCC */
.metric:nth-child(4) { --metric-accent: var(--mem); } /* VDDA */
.metric:nth-child(5) { --metric-accent: var(--gd32); } /* GD32 APP */
.metric:nth-child(6) { --metric-accent: var(--can); } /* GD32 BOOT */
.metric:hover {
border-color: color-mix(in srgb, var(--metric-accent, var(--esp32)) 45%, var(--border));
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(3,7,16,.4);
}
.metric .k {
font-family: var(--font-display);
font-size: 10px; color: var(--text-label);
text-transform: uppercase; letter-spacing: .13em; margin-bottom: 5px;
}
.metric .v {
font-family: var(--font-display);
font-size: 21px; font-weight: 700; word-break: break-word;
font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.metric .v.highlight, .metric .v.accent { color: var(--esp32-hi); }
.metric .v.ok { color: var(--green); }
.metric .v.warn { color: var(--amber); }
.metric .v.err { color: var(--red); }
.status-kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.status-kv {
background: var(--bg-elevated); border: 1px solid var(--border);
border-radius: var(--radius-sm); padding: 10px 13px;
}
.status-kv .k {
display: block; font-family: var(--font-display);
font-size: 10px; color: var(--text-label);
text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px;
}
.status-kv b {
display: block; color: var(--text); font-size: 13px; font-weight: 700;
word-break: break-word; font-family: var(--font-mono);
}
/* ================= 主状态徽章 ================= */
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge-stat {
background: var(--bg-elevated); border: 1px solid var(--border);
border-radius: var(--radius); padding: 16px 16px 13px; text-align: center;
transition: border-color .22s, transform .22s, box-shadow .22s;
}
.badge-stat:hover {
border-color: var(--border-strong); transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(3,7,16,.4);
}
.badge-stat .v {
font-family: var(--font-display);
font-size: 23px; font-weight: 700; letter-spacing: .01em;
font-variant-numeric: tabular-nums;
}
.badge-stat .v.accent { color: var(--esp32-hi); }
.badge-stat .v.ok { color: var(--green); text-shadow: 0 0 14px rgba(61,220,142,.35); }
.badge-stat .v.warn { color: var(--amber); }
.badge-stat .v.err { color: var(--red); }
.badge-stat .v.bad { color: var(--red); }
.badge-stat .k {
font-family: var(--font-display);
font-size: 10px; color: var(--text-label);
text-transform: uppercase; letter-spacing: .13em; margin-top: 4px;
}
/* ---- 健康状态 → 启动自检 ---- */
.badge-stat-click { cursor: pointer; user-select: none; }
.badge-stat-click:hover, .badge-stat-click:focus-visible {
outline: none;
border-color: color-mix(in srgb, var(--esp32) 45%, var(--border));
background: color-mix(in srgb, var(--esp32) 7%, var(--bg-elevated));
}
.badge-stat-click.is-open {
border-color: color-mix(in srgb, var(--esp32) 50%, var(--border));
}
.health-boot-hint {
font-size: 9px; letter-spacing: 0; text-transform: none;
color: var(--text-dim); font-weight: 500; margin-left: 3px;
}
.badge-stat-click.is-open .health-boot-hint { color: var(--esp32-hi); }
.health-boot-panel {
margin-top: 12px; padding: 13px 15px;
border-radius: var(--radius-sm);
border: 1px solid var(--border); background: var(--bg-elevated);
}
.health-boot-panel.collapsed, .health-boot-panel[hidden] { display: none; }
.health-boot-head {
display: flex; align-items: baseline; justify-content: space-between;
gap: 10px; margin-bottom: 7px;
}
.health-boot-title {
font-family: var(--font-display);
font-size: 11px; color: var(--text-label);
text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}
.health-boot-summary { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text); text-align: right; }
.health-boot-summary.ok { color: var(--green); }
.health-boot-summary.warn{ color: var(--amber); }
.health-boot-summary.err { color: var(--red); }
.health-boot-failed { font-size: 12px; color: var(--text-dim); margin-bottom: 9px; }
.health-boot-failed b { color: var(--text); font-weight: 600; }
.health-boot-failed b.ok { color: var(--green); }
.health-boot-failed b.warn{ color: var(--amber); }
.health-boot-failed b.err { color: var(--red); }
/* ---- 启动模块芯片 ---- */
.boot-module-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; min-height: 8px; }
.boot-mod {
display: inline-flex; align-items: center; gap: 6px;
padding: 4px 9px; border-radius: 999px;
border: 1px solid var(--border); background: var(--bg-root);
font-family: var(--font-mono);
font-size: 11px; font-weight: 600; color: var(--text-dim); line-height: 1.2;
}
.boot-mod .boot-mod-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; }
.boot-mod.ok { color: var(--can-hi); border-color: rgba(61,220,142,.4); background: rgba(61,220,142,.08); }
.boot-mod.ok .boot-mod-dot { background: var(--green); }
.boot-mod.fail { color: #ff9d9d; border-color: rgba(255,107,107,.4); background: rgba(255,107,107,.08); }
.boot-mod.fail .boot-mod-dot { background: var(--red); }
.boot-mod.fail.optional { color: var(--gd32-hi); border-color: rgba(252,191,63,.4); background: rgba(252,191,63,.08); }
.boot-mod.fail.optional .boot-mod-dot { background: var(--amber); }
.status-section-title {
margin-top: 15px; margin-bottom: 9px;
font-family: var(--font-display);
font-size: 11px; color: var(--text-label);
text-transform: uppercase; letter-spacing: .12em; font-weight: 600;
}
/* ================= 堆概况 / CPU / 任务栈 ================= */
.heap-group {
background: rgba(255,255,255,.02);
border: 1px solid var(--border); border-radius: 9px;
padding: 13px 15px; margin-bottom: 10px;
}
.heap-group:last-child { margin-bottom: 0; }
.cpu-group { margin-bottom: 8px; }
.cpu-task-list { margin-bottom: 12px; }
.cpu-task-list .status-task { background: rgba(255,255,255,.025); }
.cpu-fill { background: linear-gradient(90deg, var(--ble), var(--esp32)); }
.heap-group-title {
font-family: var(--font-display);
font-size: 11px; font-weight: 600; color: var(--text-label);
text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
}
.heap-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.heap-bar-text {
order: 1; flex: 1 1 auto; min-width: 0;
font-family: var(--font-display);
font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text);
}
.heap-bar-pct {
order: 2; flex: 0 0 auto;
font-family: var(--font-mono);
font-size: 12px; font-weight: 600; min-width: 44px; text-align: right;
font-variant-numeric: tabular-nums; color: var(--text-dim);
}
.heap-bar-track {
order: 3; flex: 1 1 100%; width: 100%; height: 14px;
background: rgba(255,255,255,.06); border-radius: 7px;
overflow: hidden; position: relative;
}
.heap-bar-fill {
display: block; height: 100%; border-radius: 7px;
background: linear-gradient(90deg, var(--esp32), #5eead4);
transition: width .5s cubic-bezier(.4,0,.2,1);
}
.heap-bar-fill.warn { background: linear-gradient(90deg, var(--amber), #d97706); }
.heap-bar-fill.danger { background: linear-gradient(90deg, var(--red), #dc2626); }
.heap-detail-row {
display: flex; gap: 16px; flex-wrap: wrap;
font-size: 11px; color: var(--text-dim);
margin-top: 7px; padding-top: 7px;
border-top: 1px solid rgba(255,255,255,.05);
}
.heap-detail-row span { display: inline-flex; align-items: center; gap: 4px; }
.heap-detail-row b { color: var(--text); font-weight: 500; font-family: var(--font-mono); font-size: 11px; }
/* ---- SRAM 分段条 ---- */
.mem-sram-track { display: flex; overflow: hidden; gap: 0; background: rgba(255,255,255,.04); }
.mem-seg { display: block; height: 100%; min-width: 0; transition: width .5s ease; }
.mem-seg-iram { background: linear-gradient(90deg, var(--mem), #7c5ce0); }
.mem-seg-data { background: linear-gradient(90deg, #fb923c, #ea580c); }
.mem-seg-bss { background: linear-gradient(90deg, #94a3b8, #64748b); }
.mem-seg-static { background: linear-gradient(90deg, #64748b, #475569); }
.mem-seg-used { background: linear-gradient(90deg, var(--esp32), #5eead4); }
.mem-seg-free { background: rgba(255,255,255,.08); }
.heap-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 9px; font-size: 11px; color: var(--text-dim); }
.heap-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.heap-legend-item b { color: var(--text); font-weight: 500; font-family: var(--font-mono); font-size: 11px; }
.mem-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.mem-dot-iram { background: var(--mem); }
.mem-dot-data { background: #f97316; }
.mem-dot-bss { background: #64748b; }
.mem-dot-static { background: #64748b; }
.mem-dot-used { background: var(--esp32); }
.mem-dot-free { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.22); box-sizing: border-box; }
.mem-static-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-dim); }
.mem-static-row {
display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.04);
}
.mem-static-row:last-child { border-bottom: 0; }
.mem-static-name { color: var(--text-label); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-static-size { font-family: var(--font-mono); color: var(--text); font-variant-numeric: tabular-nums; }
.mem-static-pct { font-family: var(--font-mono); min-width: 42px; text-align: right; color: var(--text-dim); }
.heap-hint {
margin-top: 8px; padding-top: 6px;
border-top: 1px solid rgba(255,255,255,.05);
font-size: 10px; line-height: 1.5; color: var(--text-dim); opacity: .9;
}
/* ---- 任务列表 ---- */
.status-task-list { display: grid; gap: 8px; }
.status-task-list.list-scroll-top3 {
--status-task-row-est: 6.9rem;
max-height: calc(3 * var(--status-task-row-est) + 2 * 8px);
overflow-y: auto; overflow-x: hidden;
padding-right: 4px; scrollbar-gutter: stable; overscroll-behavior: contain;
}
.status-task-list.list-scroll-top3::-webkit-scrollbar { width: 6px; }
.status-task-list.list-scroll-top3::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.status-task-list.list-scroll-top3::-webkit-scrollbar-track { background: transparent; }
.status-task {
background: var(--bg-elevated); border: 1px solid var(--border);
border-radius: var(--radius-sm); padding: 11px 13px;
}
.status-task-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.status-task-name { font-size: 12px; font-weight: 700; color: var(--text); font-family: var(--font-mono); }
.status-task-ratio { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.status-task-bar { width: 100%; height: 8px; border-radius: 999px; background: var(--bg-input); overflow: hidden; margin-bottom: 8px; }
.status-task-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--esp32), #14b8a6); }
.status-task-bar-fill.warn { background: linear-gradient(90deg, var(--amber), #d97706); }
.status-task-bar-fill.err { background: linear-gradient(90deg, var(--red), #dc2626); }
.status-task-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status-task-meta span {
display: block; font-family: var(--font-display);
font-size: 10px; color: var(--text-label);
text-transform: uppercase; letter-spacing: .07em;
}
.status-task-meta b { display: block; margin-top: 2px; color: var(--text); font-size: 11px; font-family: var(--font-mono); }
/* ---- 二级折叠 + 原始 JSON ---- */
.status-subfold { margin-top: 15px; }
.status-subfold-head {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
cursor: pointer; user-select: none; padding: 6px 0; border-radius: var(--radius-sm);
}
.status-subfold-head:hover { color: var(--text); }
.status-subfold-title { margin: 0 !important; flex: 1; }
.status-subfold-head .collapse-arrow { flex: none; font-size: 10px; color: var(--text-dim); transition: transform .15s ease; }
.status-subfold.collapsed .collapse-arrow { transform: rotate(-90deg); }
.status-subfold.collapsed .status-subfold-body { display: none; }
.status-subfold-body { margin-top: 6px; }
.status-json {
margin-top: 0; padding: 12px;
border-radius: var(--radius-sm); border: 1px solid var(--border);
background: var(--bg-input); color: var(--text-dim);
font-size: 11px; line-height: 1.65;
max-height: 280px; overflow: auto;
white-space: pre-wrap; word-break: break-word;
font-family: var(--font-mono); resize: vertical; min-height: 80px;
}
.status-empty {
padding: 13px; border: 1px dashed var(--border-strong);
border-radius: var(--radius-sm); color: var(--text-dim); font-size: 12px;
}
/* 抽屉内强制等宽 */
.sys-drawer-body .heap-bar-pct,
.sys-drawer-body .heap-detail-row b,
.sys-drawer-body .status-task-name,
.sys-drawer-body .status-task-ratio,
.sys-drawer-body .status-task-meta b,
.sys-drawer-body .status-json { font-family: var(--font-mono); }
.sys-drawer-body .status-section-title,
.sys-drawer-body .heap-group-title,
.sys-drawer-body .heap-bar-text { font-family: var(--font-display); color: inherit; }
.sys-drawer-body .status-section-title { color: var(--text-label); font-size: 11px; font-weight: 600; }
.sys-drawer-body .heap-bar-text { color: var(--text); font-size: 13px; font-weight: 600; }
.sys-drawer-body .status-json { color: var(--text-dim); font-size: 11px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
/* ================= OTA 阶段流 ================= */
.stage-flow { display: flex; align-items: flex-start; gap: 0; padding: 10px 0 6px; }
.stage-node { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.stage-node:not(:last-child)::after {
content: ""; position: absolute; top: 19px; left: calc(50% + 20px);
width: calc(100% - 40px); height: 2px;
background: var(--border); transition: background .3s;
}
.stage-node.done:not(:last-child)::after,
.stage-node.live:not(:last-child)::after { background: var(--esp32); }
.stage-dot {
width: 38px; height: 38px; border-radius: 50%;
background: var(--bg-input); border: 2px solid var(--border-strong);
display: flex; align-items: center; justify-content: center;
font-family: var(--font-display); font-size: 16px; font-weight: 700;
color: var(--text-label);
z-index: 1; transition: all .3s;
}
.stage-node.live .stage-dot {
background: linear-gradient(135deg, var(--esp32), #14b8a6);
border-color: var(--esp32); color: #04231e;
box-shadow: 0 0 16px rgba(47,216,193,.45);
}
.stage-node.done .stage-dot {
background: linear-gradient(135deg, var(--green), #16a374);
border-color: var(--green); color: #03231a;
box-shadow: 0 0 12px rgba(61,220,142,.35);
}
.stage-node.err .stage-dot {
background: linear-gradient(135deg, var(--red), #dc4c4c);
border-color: var(--red); color: #fff;
box-shadow: 0 0 12px rgba(255,107,107,.4);
}
.stage-label {
font-family: var(--font-display);
font-size: 11px; color: var(--text-label); text-align: center; line-height: 1.3;
letter-spacing: .02em;
}
.stage-detail {
font-size: 10px; color: var(--esp32-hi); text-align: center; line-height: 1.2;
margin-top: 2px; min-height: 14px;
font-family: var(--font-mono); transition: color .3s;
}
.stage-node.live .stage-label,
.stage-node.done .stage-label,
.stage-node.err .stage-label { color: var(--text); }
.stage-node.live .stage-detail { color: var(--esp32-hi); }
.stage-node.done .stage-detail { color: var(--green); }
.stage-node.err .stage-detail { color: var(--red); }
/* ---- 阶段状态条 ---- */
.stage-status-bar {
display: flex; align-items: center; gap: 10px;
margin-top: 15px; padding: 11px 17px;
border-radius: 999px;
background: var(--bg-elevated); border: 1px solid var(--border);
transition: all .3s;
}
.stage-status-bar .ssb-dot {
width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
background: var(--text-dim); animation: dotPulse 2.5s ease-in-out infinite;
}
.stage-status-bar .ssb-text {
font-family: var(--font-display);
color: var(--text-dim); font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
@keyframes dotPulse { 0%,100% { opacity: .45;} 50% { opacity: .85;} }
.stage-status-bar.active {
border-color: rgba(47,216,193,.35);
background: linear-gradient(135deg, rgba(47,216,193,.09), rgba(47,216,193,.02));
}
.stage-status-bar.active .ssb-dot {
background: var(--esp32); box-shadow: 0 0 8px var(--esp32-dim);
animation: dotPulseLive 1.2s ease-in-out infinite;
}
.stage-status-bar.active .ssb-text { color: var(--esp32-hi); }
@keyframes dotPulseLive { 0%,100% { opacity: .7; transform: scale(1);} 50% { opacity: 1; transform: scale(1.3);} }
.stage-status-bar.ok {
border-color: rgba(61,220,142,.35);
background: linear-gradient(135deg, rgba(61,220,142,.09), rgba(61,220,142,.02));
}
.stage-status-bar.ok .ssb-dot { background: var(--green); box-shadow: 0 0 8px rgba(61,220,142,.4); animation: none; }
.stage-status-bar.ok .ssb-text { color: var(--green); }
.stage-status-bar.err {
border-color: rgba(255,107,107,.35);
background: linear-gradient(135deg, rgba(255,107,107,.09), rgba(255,107,107,.02));
}
.stage-status-bar.err .ssb-dot { background: var(--red); box-shadow: 0 0 8px rgba(255,107,107,.4); animation: none; }
.stage-status-bar.err .ssb-text { color: var(--red); }
/* ---- 校验信息面板 ---- */
.stage-verify-info {
margin-top: 12px; padding: 13px 15px;
border-radius: var(--radius-sm);
background: var(--bg-elevated); border: 1px solid var(--border);
}
.svi-row {
display: flex; align-items: flex-start; gap: 12px;
padding: 7px 0; font-size: 12px;
border-bottom: 1px solid rgba(255,255,255,.04);
}
.svi-row:last-child { border-bottom: none; }
.svi-key {
color: var(--text-label); font-weight: 600;
font-family: var(--font-display);
text-transform: uppercase; letter-spacing: .07em; font-size: 10px;
min-width: 104px; flex-shrink: 0; padding-top: 2px;
}
.svi-val { color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; word-break: break-all; }
.svi-val.ok { color: var(--green); font-weight: 600; }
.svi-val.err { color: var(--red); font-weight: 600; }
/* ---- 阶段结果面板 ---- */
.stage-result {
margin-top: 12px; padding: 15px 17px;
border-radius: var(--radius-sm);
background: var(--bg-elevated); border: 1px solid var(--border);
display: flex; flex-direction: column; gap: 10px;
}
.stage-result.ok { border-color: rgba(61,220,142,.5); background: rgba(61,220,142,.08); }
.stage-result.err { border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.08); }
.stage-result .sr-head { display: flex; align-items: center; gap: 10px; }
.stage-result .sr-ico {
width: 32px; height: 32px; border-radius: 50%;
display: inline-flex; align-items: center; justify-content: center;
font-size: 18px; font-weight: 700; color: #04231e;
}
.stage-result.ok .sr-ico { background: var(--green); }
.stage-result.err .sr-ico { background: var(--red); color: #fff; }
.stage-result .sr-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.stage-result.ok .sr-title { color: var(--green); }
.stage-result.err .sr-title { color: var(--red); }
.stage-result .sr-detail { font-size: 13px; color: var(--text); line-height: 1.55; }
.stage-result .sr-actions { display: flex; justify-content: flex-end; gap: 8px; }
/* ================= 日志面板 ================= */
.log-panel { display: flex; flex-direction: column; min-height: 380px; }
.log-panel .card-body { flex: 1; display: flex; flex-direction: column; padding: 0; }
.log-toolbar {
display: flex; align-items: center; justify-content: space-between;
padding: 11px 16px; border-bottom: 1px solid var(--border-subtle);
gap: 10px; flex-wrap: wrap;
}
.log-filters { display: flex; gap: 6px; }
.log-filter {
padding: 5px 12px; border-radius: 999px;
font-family: var(--font-display);
font-size: 11px; font-weight: 600; letter-spacing: .03em;
border: 1px solid var(--border); background: transparent; color: var(--text-dim);
cursor: pointer; transition: all .18s;
}
.log-filter.active {
background: linear-gradient(135deg, var(--esp32), #14b8a6);
color: #04231e; border-color: var(--esp32);
box-shadow: 0 2px 10px rgba(47,216,193,.3);
}
.log-filter:hover:not(.active) { border-color: var(--border-strong); color: var(--text); }
.log-scroll {
flex: 1; overflow-y: auto; padding: 12px 16px;
font-family: var(--font-mono); font-size: 12px; line-height: 1.7;
max-height: 420px; background: rgba(4,8,16,.35);
}
.log-scroll::-webkit-scrollbar { width: 5px; }
.log-scroll::-webkit-scrollbar-track { background: transparent; }
.log-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.log-line {
display: flex; gap: 9px; padding: 3px 0;
border-bottom: 1px solid rgba(255,255,255,.025);
}
.log-line .lt { color: var(--text-label); flex-shrink: 0; }
.log-line .lv { font-weight: 700; min-width: 20px; flex-shrink: 0; }
.log-line .lv.E { color: var(--red); }
.log-line .lv.W { color: var(--amber); }
.log-line .lv.I { color: var(--esp32); }
.log-line .lv.D { color: var(--text-label); }
.log-line .lg, .log-line .tag { color: var(--mem-hi); flex-shrink: 0; }
.log-line .lm { color: var(--text); word-break: break-all; }
.log-line .t { color: var(--text-label); flex-shrink: 0; }
.log-foot {
display: flex; justify-content: space-between; align-items: center;
padding: 9px 16px; border-top: 1px solid var(--border-subtle);
font-size: 11px; color: var(--text-label);
}
/* ================= Toast ================= */
.toast {
position: fixed; top: 45%; left: 50%;
transform: translateX(-50%) translateY(30px);
z-index: 9999;
display: flex; align-items: center; gap: 11px;
padding: 14px 26px; border-radius: 12px;
font-family: var(--font-display);
font-size: 14px; font-weight: 600; letter-spacing: .02em;
color: #fff; pointer-events: none; opacity: 0;
transition: all .35s cubic-bezier(.4,0,.2,1);
box-shadow: 0 12px 40px rgba(2,5,12,.55);
border: 1px solid rgba(255,255,255,.12);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.ok { background: linear-gradient(135deg, #16a374, #0e8a5f); }
.toast.err { background: linear-gradient(135deg, #dc4c4c, #c03535); }
.toast.warn { background: linear-gradient(135deg, #d98a06, #b87405); }
.toast .toast-ico { font-size: 18px; }
/* ================= 杂项 ================= */
.row-2, .row-3, .row-4 { display: grid; gap: 10px; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: repeat(3, 1fr); }
.row-4 { grid-template-columns: repeat(4, 1fr); }
.sub-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.footer-note { margin-top: 12px; font-size: 12px; line-height: 1.7; color: var(--text-dim); }
code { color: var(--esp32-hi); font-family: var(--font-mono); }
/* ================= 自定义 Tooltip(pill)================= */
.pill[data-tooltip] { position: relative; cursor: help; }
.pill[data-tooltip]:hover::after {
content: attr(data-tooltip);
position: absolute; top: calc(100% + 10px); left: 50%;
transform: translateX(-50%);
background: var(--bg-elevated); color: var(--text);
font-size: 11px; font-weight: 400; font-family: var(--font-mono);
padding: 6px 12px; border-radius: 7px;
border: 1px solid var(--border-strong);
box-shadow: 0 6px 20px rgba(2,5,12,.5);
white-space: nowrap; z-index: 1000; pointer-events: none;
animation: tooltipFadeIn .15s ease-out;
}
.pill[data-tooltip]:hover::before {
content: ''; position: absolute; top: calc(100% + 4px); left: 50%;
transform: translateX(-50%);
border: 6px solid transparent; border-bottom-color: var(--border-strong);
z-index: 1001; pointer-events: none;
animation: tooltipFadeIn .15s ease-out;
}
@keyframes tooltipFadeIn {
from { opacity: 0; transform: translateX(-50%) translateY(3px); }
to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* ================= 堆低水位 Tooltip ================= */
.heap-low-tooltip {
position: fixed; z-index: 9999;
min-width: 480px; max-width: 640px;
padding: 11px 13px 9px;
background: var(--bg-elevated);
border: 1px solid var(--border-strong);
border-radius: 9px;
box-shadow: 0 8px 28px rgba(2,5,12,.6);
font-size: 11px; color: var(--text);
pointer-events: auto; visibility: hidden;
}
.heap-low-title { font-weight: 600; margin-bottom: 6px; color: var(--text); display: flex; align-items: center; }
.heap-low-sub { font-weight: 400; color: var(--text-dim); margin-left: 6px; }
.heap-low-clear {
margin-left: auto; margin-right: 6px; height: 22px; padding: 0 9px;
border: 1px solid rgba(255,107,107,.45); border-radius: 5px;
background: rgba(255,107,107,.12); color: #ff9d9d;
font-size: 11px; line-height: 20px; cursor: pointer;
transition: background .12s, color .12s, border-color .12s;
}
.heap-low-clear:hover:not(:disabled) { background: rgba(255,107,107,.22); border-color: rgba(255,107,107,.7); color: #ffcdd2; }
.heap-low-clear:disabled { opacity: .55; cursor: wait; }
.heap-low-close {
width: 22px; height: 22px; padding: 0; border: none; border-radius: 5px;
background: transparent; color: var(--text-dim);
font-size: 18px; line-height: 1; cursor: pointer;
transition: background .12s, color .12s;
}
.heap-low-close:hover { background: rgba(255,255,255,.08); color: var(--text); }
.heap-low-table-wrap { max-height: 360px; overflow-y: auto; }
.heap-low-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 10.5px; }
.heap-low-section { margin-bottom: 6px; }
.heap-low-section + .heap-low-section { margin-top: 8px; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,.15); }
.heap-low-section-title {
font-size: 11px; font-weight: 600; color: var(--text-dim);
padding: 4px 6px 2px; background: rgba(255,255,255,.03); border-radius: 3px 3px 0 0;
}
.heap-low-section-hist .heap-low-section-title { color: var(--gd32-hi); }
.heap-low-section-hist .heap-low-table { opacity: .92; }
.heap-low-table th, .heap-low-table td {
padding: 3px 6px; text-align: right; white-space: nowrap;
border-bottom: 1px solid rgba(255,255,255,.04);
}
.heap-low-table th { color: var(--text-dim); font-weight: 500; position: sticky; top: 0; background: var(--bg-elevated); text-align: right; }
.heap-low-table td:nth-child(5), .heap-low-table td:nth-child(6),
.heap-low-table td:nth-child(7), .heap-low-table td:nth-child(9) { text-align: left; }
.heap-low-table td:first-child { color: var(--text-dim); }
.heap-low-table tbody tr:hover { background: rgba(255,255,255,.03); }
.heap-low-table td.has-suspect { color: var(--red); font-weight: 500; }
.heap-low-table td.idle-suspect { color: var(--gd32-hi); }
.heap-low-detail-meta { display: flex; gap: 18px; font-size: 10px; color: var(--text-dim); margin-bottom: 6px; }
.heap-low-detail-meta b { color: var(--text); font-family: var(--font-mono); }
.heap-low-hook-meta {
margin: 8px 0 6px; padding: 6px 9px;
background: rgba(255,107,107,.08); border-left: 2px solid var(--red);
display: flex; flex-wrap: wrap; gap: 12px;
font-size: 10px; color: var(--text-dim);
}
.heap-low-hook-title { width: 100%; color: var(--red); font-weight: 600; margin-bottom: 2px; }
.heap-low-hook-meta b { color: var(--text); font-family: var(--font-mono); }
.heap-low-caller { color: var(--red); }
.heap-low-caller-hint { color: var(--text-dim); font-size: 9px; }
.heap-low-main-row { cursor: pointer; }
.heap-low-expand-hint { font-size: 9px; color: var(--text-dim); margin-left: 4px; }
.heap-low-stack-detail > td { padding: 6px 8px 8px; background: rgba(0,0,0,.2); }
.heap-low-stack-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 10px; }
.heap-low-stack-table th, .heap-low-stack-table td { padding: 2px 6px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.03); }
.heap-low-stack-table th { color: var(--text-dim); font-weight: 500; }
.heap-low-stack-table td:last-child { text-align: right; }
.heap-low-stack-table tr.crit td { color: var(--red); }
.heap-low-stack-table tr.warn td { color: var(--gd32-hi); }
.heap-low-empty { padding: 14px 6px; color: var(--text-dim); text-align: center; }
.heap-low-tip { margin-top: 6px; font-size: 10px; color: var(--text-dim); }