/* ==================== LISN-AVS 100% 复刻原PC工具界面 ==================== */
/* 全局 */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Microsoft YaHei UI','Segoe UI',sans-serif; font-size:13px; background:#f0f0f0; color:#333; overflow:hidden; height:100vh; }
.hidden { display:none !important; }
.text-gray { color:#999; }
.text-center { text-align:center; }
.small { font-size:11px; }
.blue { color:#2196F3; }
.pink { color:#E91E63; }
.orange { color:#FF9800; }
.green { color:#4CAF50; }
b { font-weight:bold; }

/* 宽度工具类 */
.w30{width:30px}.w40{width:40px}.w50{width:50px}.w60{width:60px}.w70{width:70px}
.w80{width:80px}.w85{width:85px}.w90{width:90px}.w100{width:100px}.w120{width:120px}
.w140{width:140px}.w160{width:160px}.w200{width:200px}.flex1{flex:1}
.w100p{width:100%;box-sizing:border-box}

/* ==================== 顶部工具切换栏 ==================== */
#top-bar { display:flex; align-items:center; height:36px; background:#1a237e; color:#fff; padding:0 8px; gap:12px; }
.top-brand { font-weight:bold; font-size:14px; white-space:nowrap; }
.top-tabs { display:flex; gap:2px; }
.top-tab { background:transparent; border:none; color:rgba(255,255,255,0.6); padding:6px 16px; cursor:pointer; font-size:13px; border-radius:4px 4px 0 0; }
.top-tab:hover { color:rgba(255,255,255,0.9); background:rgba(255,255,255,0.1); }
.top-tab.active { background:#f0f0f0; color:#1a237e; font-weight:bold; }
.top-spacer { flex:1; }

/* ==================== 工具面板 ==================== */
.tool-panel { display:none; height:calc(100vh - 36px); }
.tool-panel.active { display:flex; flex-direction:column; }

/* ==================== 小车工具布局 ==================== */
#vehicle-tool { flex-direction:column; }
.hsplit { flex:1; display:flex; overflow:hidden; min-height:0; }
.split-left { width:400px; min-width:300px; display:flex; flex-direction:column; padding:4px; gap:4px; overflow-y:auto; border-right:2px solid #ccc; }
.split-right { flex:1; display:flex; flex-direction:column; overflow:hidden; }

/* fieldset通用 */
fieldset { border:1px solid #bbb; border-radius:4px; padding:6px 8px; margin-bottom:4px; }
legend { font-weight:bold; padding:0 4px; font-size:12px; }
.conn-group legend, .list-group legend { font-size:13px; }

/* 连接设置 */
.conn-group .conn-row { display:flex; align-items:center; gap:4px; margin-bottom:3px; }
.conn-row label { white-space:nowrap; }
.conn-row input, .conn-row select { padding:2px 4px; border:1px solid #ccc; border-radius:2px; }
.status-offline { color:gray; }
.status-online { color:#4CAF50; font-weight:bold; }

/* 小车列表 */
.list-group { flex:1; display:flex; flex-direction:column; min-height:200px; }
.toolbar-row { display:flex; align-items:center; gap:6px; margin-bottom:4px; flex-wrap:wrap; }

/* 表格 */
.table-wrap { flex:1; overflow:auto; border:1px solid #ddd; border-radius:3px; margin-bottom:4px; }
.data-table { width:100%; border-collapse:collapse; font-size:12px; }
.data-table th { background:#e3f2fd; padding:4px 6px; text-align:left; border-bottom:2px solid #90caf9; white-space:nowrap; position:sticky; top:0; z-index:1; }
.data-table td { padding:3px 6px; border-bottom:1px solid #eee; }
.data-table tr:hover { background:#f5f5f5; }
.data-table tr.selected { background:#bbdefb; }

/* 按钮 */
.btn-sm { padding:3px 8px; border:1px solid #ccc; background:#f5f5f5; border-radius:3px; cursor:pointer; font-size:12px; }
.btn-sm:hover:not(:disabled) { background:#e0e0e0; }
.btn-sm:disabled { opacity:0.5; cursor:not-allowed; }
.btn-blue { background:#2196F3 !important; color:#fff !important; border-color:#1976D2 !important; }
.btn-blue:hover:not(:disabled){ background:#1976D2 !important; }
.btn-green { background:#4CAF50 !important; color:#fff !important; border-color:#388E3C !important; }
.btn-red { background:#e74c3c !important; color:#fff !important; border-color:#c0392b !important; }
.btn-orange { background:#FF9800 !important; color:#fff !important; border-color:#F57C00 !important; }
.btn-purple { background:#9C27B0 !important; color:#fff !important; border-color:#7B1FA2 !important; }
.btn-pink { background:#E91E63 !important; color:#fff !important; border-color:#C2185B !important; }

/* 运动按钮 */
.btn-motion { padding:5px 10px; border:none; border-radius:3px; cursor:pointer; font-size:12px; font-weight:bold; color:#fff; }
.btn-motion:disabled { opacity:0.4; cursor:not-allowed; }
.btn-motion.green { background:#4CAF50; }
.btn-motion.blue { background:#2196F3; }
.btn-motion.red { background:#f44336; }
.btn-motion.orange { background:#FF9800; }
.btn-motion.dark-red { background:#D32F2F; }
.btn-motion.purple { background:#9C27B0; }
.btn-motion.deep-orange { background:#FF5722; }
.btn-motion.indigo { background:#673AB7; }
.btn-motion.teal { background:#00796B; }
.btn-row { display:flex; gap:5px; margin-bottom:6px; flex-wrap:wrap; }

/* 参数行 */
.param-row { display:flex; align-items:center; gap:5px; margin-bottom:4px; flex-wrap:wrap; }
.param-row label { white-space:nowrap; }
.param-row input, .param-row select { padding:2px 4px; border:1px solid #ccc; border-radius:2px; font-size:12px; }
.section-label { font-weight:bold; color:#1976D2; margin:6px 0 2px; display:block; }
.bold-label .section-label { font-size:13px; }
.sep { color:#ccc; margin:0 2px; }

/* 控制面板Tab */
.ctrl-tabs { display:flex; border-bottom:2px solid #1a237e; }
.ctrl-tab { padding:6px 20px; border:none; background:#e0e0e0; cursor:pointer; font-size:13px; border-radius:4px 4px 0 0; margin-right:2px; }
.ctrl-tab.active { background:#1a237e; color:#fff; font-weight:bold; }
.ctrl-panel { display:none; flex:1; overflow:hidden; }
.ctrl-panel.active { display:flex; flex-direction:column; }
.scroll-area { flex:1; overflow-y:auto; padding:6px 8px; }

/* 选中小车信息 */
.selected-info { padding:4px 0; font-size:13px; }
.selected-info strong { font-size:14px; color:#1a237e; }

/* 紧凑状态组 */
.compact-group { padding:4px 8px; }
.status-row { display:flex; align-items:center; gap:3px; margin-bottom:2px; flex-wrap:wrap; font-size:12px; }
.status-row span { white-space:nowrap; }

/* 进度条 */
.progress-wrap { flex:1; height:18px; background:#e0e0e0; border-radius:9px; overflow:hidden; margin-right:8px; }
.progress-bar { height:100%; background:linear-gradient(90deg,#4CAF50,#8BC34A); transition:width 0.3s; text-align:center; line-height:18px; color:#fff; font-size:11px; }

/* ==================== 底部日志区域 ==================== */
.log-area { height:200px; min-height:100px; display:flex; border-top:2px solid #1a237e; background:#fff; }
.log-col { flex:1; display:flex; flex-direction:column; border-right:1px solid #ddd; min-width:200px; }
.log-col:last-child { border-right:none; }
.log-header { font-weight:bold; font-size:11px; padding:3px 6px; background:#f5f5f5; border-bottom:1px solid #ddd; display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.log-text { flex:1; overflow-y:auto; font-family:Consolas,monospace; font-size:11px; padding:4px; background:#1e1e1e; color:#4CAF50; white-space:pre-wrap; word-break:break-all; }
.irda-debug-log { min-height:80px; }
.log-btn { padding:2px 6px; font-size:10px; border:1px solid #ccc; background:#fff; border-radius:2px; cursor:pointer; }
.log-btn:hover { background:#f0f0f0; }
.log-btn.runtime-on { background:#4CAF50; color:#fff; border-color:#388E3C; }
.log-btn.runtime-off { background:#9E9E9E; color:#fff; border-color:#757575; }
.log-auto { font-weight:normal; display:flex; align-items:center; gap:2px; font-size:10px; }
.irda-debug-controls { padding:4px 6px; font-size:11px; border-bottom:1px solid #ddd; background:#fafafa; }
#rt-stations { width:100%; font-family:Consolas,monospace; font-size:12px; padding:4px; border:1px solid #ccc; border-radius:3px; resize:vertical; }
#station-tool { flex-direction:column; }
.station-toolbar { display:flex; align-items:center; gap:6px; padding:6px 8px; background:#e8eaf6; border-bottom:1px solid #c5cae9; flex-wrap:wrap; }
.station-toolbar label { white-space:nowrap; }
.station-toolbar input, .station-toolbar select { padding:3px 6px; border:1px solid #ccc; border-radius:3px; }
.st-spacer { flex:1; }
.st-divider { color:#999; }

.station-tabs { display:flex; border-bottom:2px solid #00796B; background:#b2dfdb; }
.st-tab { padding:6px 16px; border:none; background:transparent; cursor:pointer; font-size:13px; }
.st-tab:hover { background:rgba(255,255,255,0.3); }
.st-tab.active { background:#00796B; color:#fff; font-weight:bold; border-radius:4px 4px 0 0; }

.station-content { flex:1; overflow-y:auto; padding:8px; background:#fff; }
.st-panel { display:none; }
.st-panel.active { display:block; }

/* 网格布局 */
.grid-2col { display:grid; grid-template-columns:1fr 1fr; gap:4px 16px; padding:4px 0; }
.grid-2col div { display:flex; gap:4px; align-items:center; }
.grid-2col label { color:#666; white-space:nowrap; }

/* 大按钮 */
.big-buttons { display:flex; gap:12px; padding:12px; }
.big-btn { flex:1; min-height:60px; font-size:16px; font-weight:bold; border:none; border-radius:6px; cursor:pointer; background:#e0e0e0; color:#333; }
.big-btn:disabled { opacity:0.5; cursor:not-allowed; }

/* 触发模式单选 */
.trigger-radio-group { display:flex; gap:20px; padding:8px 0; }
.trigger-radio-group label { display:flex; align-items:center; gap:4px; }

.station-log-full { height:calc(100vh - 220px); }

/* 状态栏 */
.station-statusbar { display:flex; justify-content:space-between; align-items:center; padding:4px 12px; background:#37474f; color:#fff; font-size:12px; }
.st-status-right { display:flex; gap:16px; }

/* ==================== 弹窗 ==================== */
.modal { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); display:flex; align-items:center; justify-content:center; z-index:10005; }
.modal-content { background:#fff; border-radius:8px; width:600px; max-width:90%; max-height:80vh; overflow:hidden; display:flex; flex-direction:column; }
.modal-header { display:flex; justify-content:space-between; align-items:center; padding:8px 16px; background:#1a237e; color:#fff; font-weight:bold; }
.modal-close { background:none; border:none; color:#fff; cursor:pointer; font-size:18px; }
.modal-body { padding:16px; overflow-y:auto; font-family:Consolas,monospace; font-size:12px; max-height:60vh; }

/* 选中行高亮 */
.vehicle-row-selected { background:#bbdefb !important; }

/* 拖拽分割条（预留） */
.split-handle { width:4px; background:#ccc; cursor:col-resize; flex-shrink:0; }


/* ==================== 站点配置工具 — 复刻Node_Config_Tool V2 ==================== */

/* ===== 连接设置 ===== */
.st-conn-group { border:1px solid #bbb; border-radius:4px; padding:4px 8px; margin-bottom:2px; background:#fafafa; }
.st-conn-group legend { font-weight:bold; padding:0 4px; font-size:12px; }
.st-conn-group .conn-row { display:flex; align-items:center; gap:4px; margin-bottom:2px; flex-wrap:nowrap; white-space:nowrap; overflow-x:auto; }
.st-conn-group .conn-row > * { flex:0 0 auto; white-space:nowrap; }
.conn-label { font-weight:bold; min-width:112px; white-space:nowrap; }
.conn-label.blue { color:#2196F3; }
.conn-label.orange { color:#FF9800; }
.conn-row label { white-space:nowrap; font-size:12px; }
.conn-row input, .conn-row select { padding:2px 4px; border:1px solid #ccc; border-radius:2px; font-size:12px; }
.status-offline { color:gray; }
.status-online { color:#4CAF50; font-weight:bold; }

/* ===== 中部主体 ===== */
.st-body { flex:1; display:flex; overflow:hidden; min-height:0; }

/* 左侧站点列表 */
.st-left { width:400px; min-width:280px; display:flex; flex-direction:column; border-right:2px solid #ccc; }
.st-list-tabs { display:flex; border-bottom:2px solid #00796B; }
.slt { padding:4px 14px; border:none; background:#e0e0e0; cursor:pointer; font-size:12px; border-radius:4px 4px 0 0; margin-right:2px; }
.slt.active { background:#00796B; color:#fff; font-weight:bold; }
.slt-panel { display:none; flex:1; flex-direction:column; padding:4px; overflow:hidden; }
.slt-panel.active { display:flex; }

/* 右侧功能面板 */
.st-right { flex:1; display:flex; flex-direction:column; overflow:hidden; }

/* 站点信息 + 模式选择 */
.st-info-bar { display:flex; gap:4px; padding:4px; border-bottom:1px solid #ddd; align-items:flex-start; }
.st-info-group { flex:1; border:1px solid #ccc; border-radius:4px; padding:4px 8px; }
.st-info-group legend { font-weight:bold; font-size:11px; padding:0 4px; }
.st-mode-group { flex:1; border:1px solid #ccc; border-radius:4px; padding:4px 8px; }
.st-mode-group legend { font-weight:bold; font-size:11px; padding:0 4px; }
.info-item { font-size:13px; margin-right:16px; white-space:nowrap; }
/* 站点信息分组（Snapshot 全字段回填，一次拿全） */
.st-info-grid { display:flex; flex-direction:column; gap:3px; }
.station-summary .status-row { gap:4px; margin-bottom:2px; font-size:12px; }
.station-summary .status-row b { font-size:12px; font-weight:bold; }
.station-summary .station-uid-row { flex-wrap:nowrap; align-items:flex-start; }
.station-summary .station-uid-value {
  font-family:Consolas,monospace;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:520px;
}
.st-info-sub { display:flex; flex-wrap:wrap; align-items:center; gap:2px 10px; }
.st-info-sub .info-item { margin-right:0; }  /* gap 已控制间距，避免双重间隔 */
.st-info-sub-title { font-size:10px; font-weight:bold; color:#888; min-width:52px; }
.mode-notice { font-size:10px; color:#666; margin-top:2px; }

/* Mode0面板 */
.st-mode0-panel { flex:1; overflow:hidden; }
.scroll-area { height:100%; overflow-y:auto; padding:4px; }

/* 角色提示卡：主控/子站选中时替代「小车控制」面板（hidden 复用全局 .hidden，带 !important） */
.st-role-hint { flex:1; overflow:hidden; display:flex; align-items:center; justify-content:center; padding:8px; }
.st-role-hint-card {
  background:#f5f5f5; border:1px solid #e0e0e0; border-radius:6px;
  padding:24px 28px; max-width:560px; text-align:center;
}
.st-role-hint-title { font-size:16px; font-weight:bold; color:#333; margin-bottom:14px; }
.st-role-hint-body { font-size:13px; color:#333; line-height:1.7; }
.st-role-hint-body p { margin:6px 0; }
.st-role-hint-body b { color:#1565C0; font-family:Consolas,monospace; }
.m0-split { display:flex; gap:4px; min-height:100%; }

/* 左列 */
.m0-left { flex:0 0 55%; display:flex; flex-direction:column; padding:4px; gap:4px; }
.m0-title-row { display:flex; align-items:center; justify-content:space-between; }
.m0-title-row b { font-size:13px; }
.m0-title-row label { font-size:11px; }

/* 控制按钮网格 */
.m0-btn-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:3px; }
.m0-btn { padding:6px; border:none; border-radius:3px; cursor:pointer; font-size:11px; font-weight:bold; color:#fff; min-height:28px; }
.m0-btn:disabled { opacity:0.4; cursor:not-allowed; }
.m0-btn.green { background:#4CAF50; }
.m0-btn.blue { background:#2196F3; }
.m0-btn.red { background:#f44336; }
.m0-btn.purple { background:#9C27B0; }
.m0-btn.gray { background:#757575; }
.m0-btn.gray.active { background:#4CAF50; }

/* IO模拟区 */
.m0-io-row { display:flex; gap:6px; margin:4px 0; }
.m0-di-frame { background:#f0f0f0; border-radius:4px; padding:4px 6px; display:flex; align-items:center; gap:4px; }
.m0-di-frame label { font-size:10px; color:#666; }
.m0-di-btn { font-size:13px; font-weight:bold; background:#795548; color:#fff; border:2px solid #5D4037; border-radius:4px; padding:4px 10px; cursor:pointer; }
.m0-di-btn:hover { background:#8D6E63; }
.m0-di-btn:active, .m0-di-btn.triggered { background:#4CAF50; border-color:#388E3C; }
.m0-di-btn:disabled { opacity:0.4; cursor:not-allowed; }
.m0-do-frame { display:flex; align-items:center; gap:6px; padding:4px 6px; }
.m0-do-frame label { font-size:10px; color:#666; }
.m0-do-led { width:36px; height:20px; border-radius:50%; background:#e0e0e0; border:2px solid #bbb; text-align:center; line-height:16px; font-size:9px; color:#666; }
.m0-do-led.on { background:#4CAF50; border-color:#388E3C; color:#fff; box-shadow:0 0 6px #4CAF50; }

/* 分隔线 */
.m0-sep { border:none; border-top:1px solid #e0e0e0; margin:4px 0; }
.m0-section-title { font-weight:bold; font-size:11px; color:#333; margin-bottom:2px; }

/* 右列：指令说明 */
.m0-right { flex:1; display:flex; flex-direction:column; padding:4px; }
.m0-info-scroll { flex:1; overflow-y:auto; border:1px solid #ddd; border-radius:4px; background:#f9f9f9; padding:6px; font-size:11px; line-height:1.6; }
.m0-info-scroll p { margin-bottom:4px; }
.m0-info-scroll hr { border:none; border-top:1px dashed #ccc; margin:4px 0; }

/* ===== 底部日志区域 ===== */
.st-log-area { height:200px; min-height:80px; display:flex; border-top:2px solid #37474f; background:#fff; }
.log-col { flex:1; display:flex; flex-direction:column; border-right:1px solid #ddd; min-width:180px; }
.log-col:last-child { border-right:none; }
.log-header { font-weight:bold; font-size:11px; padding:3px 6px; border-bottom:1px solid #ddd; }
.log-header.blue-header { color:#2196F3; background:#e3f2fd; }
.log-header.purple-header { color:#9C27B0; background:#f3e5f5; }
.log-header.orange-header { color:#FF9800; background:#fff3e0; }
.log-send-row { display:flex; align-items:center; gap:3px; padding:3px; border-bottom:1px solid #eee; }
.log-send-row input { flex:1; padding:2px 4px; border:1px solid #ccc; border-radius:2px; font-family:Consolas,monospace; font-size:11px; }
.toggle-off { background:#e0e0e0; color:#999; }
.toggle-on { background:#2196F3; color:#fff; }
.log-text { flex:1; overflow-y:auto; font-family:Consolas,monospace; font-size:11px; padding:4px; background:#1e1e1e; color:#d4d4d4; white-space:pre-wrap; word-break:break-all; margin:0; }
.log-toolbar { display:flex; align-items:center; gap:4px; padding:2px 4px; border-top:1px solid #eee; }
.log-btn { padding:2px 6px; font-size:10px; border:1px solid #ccc; background:#fff; border-radius:2px; cursor:pointer; }
.log-btn:hover { background:#f0f0f0; }
.log-auto { font-weight:normal; display:flex; align-items:center; gap:2px; font-size:10px; }

/* ===== 状态栏 ===== */
.st-statusbar { display:flex; justify-content:space-between; align-items:center; padding:3px 10px; background:#37474f; color:#fff; font-size:11px; }
.st-copyright { color:#999; font-size:10px; }

/* ===== 工具栏行（复用） ===== */
.toolbar-row { display:flex; align-items:center; gap:4px; margin-bottom:3px; flex-wrap:wrap; }
.toolbar-row label { white-space:nowrap; font-size:12px; }
.toolbar-row input, .toolbar-row select { padding:2px 4px; border:1px solid #ccc; border-radius:2px; font-size:12px; }

/* ===== 按钮 ===== */
.btn-xs { padding:2px 6px; border:1px solid #ccc; background:#f5f5f5; border-radius:3px; cursor:pointer; font-size:10px; }
.btn-xs:hover:not(:disabled) { background:#e0e0e0; }
.btn-xs:disabled { opacity:0.5; cursor:not-allowed; }
.btn-sm { padding:3px 8px; border:1px solid #ccc; background:#f5f5f5; border-radius:3px; cursor:pointer; font-size:12px; }
.btn-sm:hover:not(:disabled) { background:#e0e0e0; }
.btn-sm:disabled { opacity:0.5; cursor:not-allowed; }
.btn-blue { background:#2196F3!important; color:#fff!important; border-color:#1976D2!important; }
.btn-green { background:#4CAF50!important; color:#fff!important; border-color:#388E3C!important; }
.btn-red { background:#f44336!important; color:#fff!important; border-color:#c0392b!important; }
.btn-orange { background:#FF9800!important; color:#fff!important; border-color:#F57C00!important; }

/* ===== 表格 ===== */
.table-wrap { flex:1; overflow:auto; border:1px solid #ddd; border-radius:3px; margin-top:2px; }
.data-table { width:100%; border-collapse:collapse; font-size:12px; }
.data-table th { background:#e3f2fd; padding:4px 6px; text-align:left; border-bottom:2px solid #90caf9; white-space:nowrap; position:sticky; top:0; z-index:1; }
.data-table td { padding:3px 6px; border-bottom:1px solid #eee; }
.data-table tr:hover { background:#f5f5f5; }
.data-table tr.selected { background:#bbdefb; }

/* ===== 进度条 ===== */
.progress-wrap { flex:0 0 auto; height:16px; background:#e0e0e0; border-radius:8px; overflow:hidden; margin:2px 0; }
.progress-wrap.hidden { display:none; }
.progress-bar { height:100%; background:linear-gradient(90deg,#4CAF50,#8BC34A); transition:width 0.3s; }

/* ===== 宽度类 ===== */
.w30{width:30px}.w50{width:50px}.w60{width:60px}.w70{width:70px}
.w80{width:80px}.w100{width:100px}.w120{width:120px}
.hidden{display:none!important}
.text-gray{color:#999}.text-center{text-align:center}.small{font-size:11px}

/* ===== 电池健康弹窗按钮 ===== */
.btn-tiny {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.btn-tiny:hover { opacity: 1; }

/* ===== 响应状态高亮 ===== */
#log-lora .log-line:nth-last-child(-n+3) {
  animation: highlight 0.5s ease;
}
@keyframes highlight {
  from { background: rgba(183, 121, 31, 0.2); }
  to { background: transparent; }
}

/* ==================== CANopen测试弹窗样式 ==================== */

/* 弹窗宽度和滚动 */
.modal-wide { max-width:1100px; }
.modal-body-scroll { max-height:75vh; }

/* 电机卡片样式 */
.motor-card {
  border: 2px solid #9e9e9e;
  border-radius: 6px;
  background: #f7f7f7;
  padding: 8px 10px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.motor-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.motor-dot { color: #9e9e9e; }

/* 电机卡片颜色状态 */
.motor-card.active { background: #f4f8f6; }
.motor-card.active-good { border-color: #2e7d32; }
.motor-card.active-good .motor-dot { color: #2e7d32; }
.motor-card.active-warn { border-color: #f9a825; }
.motor-card.active-warn .motor-dot { color: #f9a825; }
.motor-card.active-error { border-color: #d32f2f; }
.motor-card.active-error .motor-dot { color: #d32f2f; }

/* 分组框样式 */
.group-box {
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 8px;
  background: #fafafa;
}

.group-title {
  font-weight: bold;
  font-size: 13px;
  color: #1a237e;
  margin-bottom: 6px;
}

/* 进度条样式 */
.progress-bar {
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  transition: width 0.3s ease;
}

/* 表格样式增强 */
.canopen-table-row {
  text-align: center;
}

.canopen-table-row:hover {
  background: #f5f5f5;
}

/* ==================== 拖拽分割线 ==================== */

/* 主分割线（粗） */
.splitter-handle.splitter-v {
  flex: 0 0 5px;
  background: #c8c0b0;
  cursor: col-resize;
  transition: background 0.15s;
  z-index: 10;
}
.splitter-handle.splitter-v:hover,
.splitter-handle.splitter-v:active {
  background: var(--accent, #b7791f);
}

.splitter-handle.splitter-h {
  flex: 0 0 5px;
  background: #c8c0b0;
  cursor: row-resize;
  transition: background 0.15s;
  z-index: 10;
}
.splitter-handle.splitter-h:hover,
.splitter-handle.splitter-h:active {
  background: var(--accent, #b7791f);
}

/* 日志列间分割线（细） */
.splitter-handle.splitter-v-thin {
  flex: 0 0 3px;
  background: #d5cec0;
  cursor: col-resize;
  transition: background 0.15s;
}
.splitter-handle.splitter-v-thin:hover,
.splitter-handle.splitter-v-thin:active {
  background: var(--accent, #b7791f);
}

/* 拖拽中禁用iframe/选区 */
body.splitter-active { cursor: col-resize !important; user-select: none !important; }
body.splitter-active * { pointer-events: none !important; }
body.splitter-active .splitter-handle { pointer-events: auto !important; }

/* ======== flex布局确保分割线工作 ======== */
/* 小车工具：主区域水平分割 */
#vehicle-hsplit {
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
#vehicle-left {
  flex: 0 0 35%;
  overflow: auto;
  min-width: 200px;
}
#vehicle-right {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 300px;
}

/* 小车工具：整体垂直分割（主区/日志区） */
#vehicle-tool {
  flex-direction: column;
  height: calc(100vh - 42px);
  overflow: hidden;
}
#vehicle-hsplit {
  flex: 1 1 auto;
  min-height: 100px;
  overflow: hidden;
}
#vehicle-log-area {
  flex: 0 0 180px;
  min-height: 60px;
}

/* 日志区域：水平flex */
#vehicle-log-area {
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
#vehicle-log-area .log-col {
  flex: 1 1 0;
  min-width: 80px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#vehicle-log-area .log-col .log-text {
  flex: 1 1 auto;
  overflow: auto;
}

/* ======== 站点工具布局 ======== */
#station-tool {
  flex-direction: column;
  height: calc(100vh - 42px);
  overflow: hidden;
}
.st-body {
  display: flex;
  flex-direction: row;
  flex: 1 1 auto;
  overflow: hidden;
  min-height: 100px;
}
.st-left {
  flex: 0 0 38%;
  min-width: 250px;
  overflow: auto;
}
.st-right {
  flex: 1 1 auto;
  min-width: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.st-log-area {
  display: flex;
  flex-direction: row;
  flex: 0 0 160px;
  min-height: 60px;
  overflow: hidden;
}
.st-log-area .log-col {
  flex: 1 1 0;
  min-width: 80px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.st-log-area .log-col .log-text {
  flex: 1 1 auto;
  overflow: auto;
}
/* 运行日志窗口表头（绿）*/
.log-header.green-header { color:#2E7D32; background:#E8F5E9; }
/* 站点日志发送工具栏（位于日志窗口上方）*/
.st-log-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 4px 8px; background: #F5F7FA; border-top: 1px solid #D9E2EC;
  border-bottom: 1px solid #D9E2EC; font-size: 12px;
}
.st-log-toolbar .st-cmd-input { width: 180px; padding: 2px 4px; border: 1px solid #ccc; border-radius: 2px; font-family: Consolas, monospace; font-size: 11px; }
.st-log-area .log-header {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
}
.st-log-area .log-header > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-log-area .log-header .log-btn {
  flex: 0 0 auto;
  padding: 1px 5px;
  font-size: 11px;
  line-height: 16px;
}
.st-log-area .log-header .log-auto {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  font-size: 11px;
}
/* 4 列日志区：收窄最小宽度，保证 4 列在宽屏并排 */
.st-log-area-4 .log-col { min-width: 60px; }
.st-log-area-4 .log-col .log-text { font-size: 11px; }

/* Mode0 左右分割 */
.m0-split {
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.m0-left {
  flex: 0 0 55%;
  min-width: 200px;
}
.m0-right {
  flex: 1 1 auto;
  min-width: 150px;
}

/* 电池健康等级单元格 → 已迁移为 .cell-popup-btn--grade-*（Task 0.3，见文件末尾区块） */

/* ===== 电池健康弹窗 ===== */
.battery-modal-overlay {
    position: fixed; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.5); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.battery-modal {
    background: #fff; border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    width: 820px; max-width: 95vw; max-height: 90vh;
    display: flex; flex-direction: column; overflow: hidden;
}
.battery-modal-header {
    padding: 12px 20px; border-bottom: 1px solid #e0e0e0;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 16px; font-weight: 700;
}
.battery-modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.battery-modal-footer {
    padding: 10px 20px; border-top: 1px solid #e0e0e0;
    display: flex; justify-content: flex-end; gap: 10px;
}
.grade-card {
    display: flex; align-items: center; gap: 20px;
    padding: 12px 16px; border: 1px solid #e0e0e0; border-radius: 8px;
    margin-bottom: 14px; background: #f8f9fa;
}
.grade-letter-box {
    width: 90px; height: 90px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; font-weight: 800; border: 1px solid rgba(0,0,0,0.1); flex-shrink: 0;
}
.grade-info { flex: 1; }
.grade-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.grade-desc { font-size: 13px; color: #666; line-height: 1.5; }
.battery-stats-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 13px; }
.battery-stats-table th { background: #f0f0f0; padding: 6px 10px; text-align: left; font-weight: 600; border: 1px solid #ddd; }
.battery-stats-table td { padding: 6px 10px; border: 1px solid #ddd; }
.battery-stats-table td:nth-child(odd) { color: #666; width: 18%; }
.battery-stats-table td:nth-child(even) { font-weight: 700; color: #222; }
.battery-snapshots-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.battery-snapshots-table th { background: #f0f0f0; padding: 5px 6px; text-align: center; font-weight: 600; border: 1px solid #ddd; white-space: nowrap; }
.battery-snapshots-table td { padding: 4px 6px; text-align: center; border: 1px solid #ddd; }

/* ======== Flash日志弹窗 (100%复刻QT FlashLogWidget) ======== */
/* 顶部工具栏 (对应QT top_layout) */
.fl-toolbar { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.fl-toolbar label { font-size: 12px; white-space: nowrap; }
.fl-toolbar input[type="number"] { padding: 3px 4px; border: 1px solid #ccc; border-radius: 2px; font-size: 12px; width: 100%; box-sizing: border-box; }
.fl-toolbar select { padding: 3px 4px; border: 1px solid #ccc; border-radius: 2px; font-size: 12px; width: 100%; box-sizing: border-box; }

/* 状态栏 (对应QT status_layout) */
.fl-status-bar { display: flex; align-items: center; gap: 12px; font-size: 12px; margin-bottom: 4px; padding: 4px 0; }
.fl-status-bar b { font-weight: 700; }

/* 表格容器 (对应QT log_table区) */
.fl-table-wrap { border: 1px solid #ddd; border-radius: 3px; max-height: 350px; overflow: auto; margin-bottom: 6px; }
.fl-table-wrap { border: 1px solid #ddd; border-radius: 3px; max-height: 55vh; min-height: 200px; overflow: auto; margin-bottom: 6px; }
.fl-table { width: 100%; font-size: 11px; border-collapse: collapse; }
.fl-table th { background: #e3f2fd; padding: 4px 6px; text-align: left; border-bottom: 2px solid #90caf9; white-space: nowrap; position: sticky; top: 0; z-index: 1; font-weight: 600; }
.fl-table td { padding: 3px 6px; border-bottom: 1px solid #eee; white-space: nowrap; }
/* 交替行颜色 (对应QT setAlternatingRowColors) */
.fl-table tbody tr:nth-child(odd) { background: #fafafa; }
.fl-table tbody tr:hover { background: #e3f2fd; }

/* Boot行高亮 (对应QT boot_bg = #FFF9C4) */
.fl-table tr.fl-row-boot { background: #FFF9C4 !important; }
/* 历史session灰底 (对应QT old_bg = #F5F5F5) */
.fl-table tr.fl-row-historical { background: #F5F5F5; color: #555; }

/* 底部操作栏 (对应QT bottom_layout) */
.fl-bottom-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; }

/* 特殊单元格状态 */
.fl-empty, .fl-loading, .fl-error { text-align: center; color: #999; padding: 20px; }
.fl-loading { color: #2196F3; }
.fl-error { color: #F44336; }
.snapshot-grade { display: inline-block; width: 22px; height: 20px; line-height: 20px; border-radius: 3px; font-weight: 700; font-size: 12px; }
.section-title { font-size: 14px; font-weight: 700; margin: 12px 0 6px; color: #333; }
.battery-empty { text-align: center; padding: 30px; color: #999; font-size: 14px; }

/* ==================== 主控站点配置弹窗 ==================== */
.modal-wide { max-width: 820px; width: 90%; }
.modal-body-scroll { max-height: 75vh; overflow-y: auto; padding: 12px 16px; }

.master-status-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #e0e0e0;
}
/* 第1行三状态格：大字居中，背景色随状态切换（class 由 _renderStatusHeader 设置）*/
.master-status-cell {
  text-align: center; font-size: 20px; font-weight: 700; color: #fff;
  padding: 14px 8px; border-radius: 6px; background: #757575; min-height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.master-status-cell.cell-mode-run  { background: #FF9800; }   /* 运行模式-橙 */
.master-status-cell.cell-mode-cfg  { background: #4CAF50; }   /* 配置模式-绿 */
.master-status-cell.cell-master    { background: #2196F3; }   /* 主控站点-蓝 */
.master-status-cell.cell-motor-on  { background: #4CAF50; }   /* 电机使能-绿 */
.master-status-cell.cell-motor-off { background: #9E9E9E; }   /* 电机失能-灰 */
.master-badge {  /* 保留兼容（顶栏已改用 master-status-cell）*/
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 600; color: white;
}
.master-cb { font-size: 13px; cursor: pointer; }
.master-cb input { margin-right: 4px; }

/* 配置模式入口行（运行/配置模式切换，醒目显示）*/
.ms-config-mode-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin: 8px 0;
  background: #FFF3E0; border-left: 5px solid #FF9800; border-radius: 4px;
  font-size: 16px; font-weight: 600;
}
.ms-config-mode-row .master-cb { font-size: 16px; font-weight: 600; }
.ms-mode-hint { font-size: 15px; font-weight: 700; color: #E65100; }

/* 三区布局（对齐原工具：左栏 站点列表+CANopen+IO/DO | 右栏 机型+Mode面板）*/
.master-body {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 10px;
}
.master-left-col {
  flex: 0 0 400px; display: flex; flex-direction: column; gap: 8px;
  max-height: 72vh; overflow-y: auto; padding-right: 4px;
}
.master-right-col {
  flex: 1; min-width: 0;
}
/* 主控弹窗加宽 + 右下角可拖动调整大小（尺寸持久化到 localStorage）*/
#master-modal .modal-content {
  width: 95%; max-width: 1360px; min-width: 1000px;
  min-height: 400px; max-height: 90vh;
  resize: both; overflow: hidden;
}
/* body 随 modal-content 拖动伸缩（去掉固定 75vh 上限，flex 填满剩余高度）*/
#master-modal .modal-body {
  flex: 1; min-height: 0; max-height: none;
}
/* 左栏内 站点列表 + CANopen 上下叠加（CANopen 在站点列表下方，对齐原工具）*/
.master-left-col .master-split {
  flex-direction: column;
}
/* 拓扑运行视图：独立浮层（对齐原工具完整功能弹窗，非内嵌面板）*/
#ms-topo-panel {
  position: fixed; top: 3vh; left: 5vw; width: 90vw; max-width: 1400px;
  max-height: 94vh;                                 /* 默认高度=内容自然高度,拉高时上限94vh */
  resize: both; overflow: hidden;                   /* 右下角可拖动调大小;无滚动条(内容不溢出,日志区吃拉高空间) */
  background: #fff; z-index: 10001;
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  padding: 12px 16px; box-sizing: border-box;
}
#ms-topo-panel.hidden { display: none; }
.topo-runtime-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.topo-runtime-header .modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #666; }
.topo-mode-badge { padding:2px 10px; border-radius:10px; font-size:12px; font-weight:bold; }
.topo-mode-badge.mode-cfg { background:#FFF3E0; color:#E65100; border:1px solid #FFB74D; }
.topo-mode-badge.mode-run { background:#E8F5E9; color:#2E7D32; border:1px solid #81C784; }
/* 拓扑弹窗 5 区布局（对齐原工具 topology_runtime_dialog）*/
#ms-topo-panel .topo-hint { font-size:12px; color:#546E7A; line-height:1.6; background:#F7FAFC; border:1px solid #D9E2EC; border-radius:8px; padding:8px 12px; margin:8px 0; }
#ms-topo-panel .topo-summary-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px 18px; background:#F7FAFC; border:1px solid #D9E2EC; border-radius:12px; padding:14px; margin:8px 0; font-size:13px; }
#ms-topo-panel .topo-summary-grid .ts-item b { color:#102A43; }
#ms-topo-panel .topo-split { display:flex; gap:12px; margin:8px 0; align-items:flex-start; }
#ms-topo-panel .topo-split-left { flex:3; min-width:0; }
#ms-topo-panel .topo-split-right { flex:2; min-width:0; background:#FBFCFE; border:1px solid #D9E2EC; border-radius:8px; padding:10px; max-height:520px; overflow-y:auto; }
#ms-topo-panel .topo-split-title { font-weight:bold; font-size:15px; margin-bottom:6px; }
#ms-topo-panel .topo-detail-title { font-weight:bold; font-size:14px; color:#102A43; margin-bottom:8px; }
#ms-topo-panel .topo-sub-group { font-weight:bold; font-size:13px; color:#334E68; margin:10px 0 4px; border-top:1px solid #EAEFF3; padding-top:8px; }
#ms-topo-panel .topo-split-left #topo-g6 { position:relative; height:380px; border:1px solid #D9E2EC; border-radius:6px; background:#FBFCFE; padding:18px 10px; box-sizing:border-box; }
/* 卡片式拓扑关系图（对照 TopologyGraphWidget）*/
#ms-topo-panel .topo-graph { position:relative; height:100%; display:flex; flex-direction:column; justify-content:center; }
#ms-topo-panel .tg-svg { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:1; }
#ms-topo-panel .tg-row { display:flex; justify-content:center; align-items:center; gap:28px; position:relative; z-index:2; }
#ms-topo-panel .tg-servo-row { display:flex; justify-content:center; margin-top:40px; position:relative; z-index:2; }
#ms-topo-panel .tg-card { width:180px; min-height:118px; background:#fff; border:2px solid #90A4AE; border-radius:14px; padding:12px 14px; cursor:pointer; box-shadow:0 1px 3px rgba(0,0,0,.06); box-sizing:border-box; transition:box-shadow .12s; }
#ms-topo-panel .tg-card:hover { box-shadow:0 2px 8px rgba(0,0,0,.14); }
#ms-topo-panel .tg-card.selected { border-width:4px; }
#ms-topo-panel .tg-card-title { font-weight:bold; font-size:15px; color:#102A43; white-space:pre-line; }
#ms-topo-panel .tg-card-addr { font-size:13px; color:#455A64; margin:2px 0 4px; }
#ms-topo-panel .tg-card-status { font-weight:bold; font-size:13px; color:#102A43; }
#ms-topo-panel .tg-card-meta { color:#546E7A; font-size:11px; line-height:1.5; margin-top:4px; }
/* 站点详情面板（对照 TopologyDetailPanel）*/
#ms-topo-panel .topo-meta-grid { display:grid; grid-template-columns:78px 1fr; gap:3px 8px; font-size:12px; margin-bottom:6px; }
#ms-topo-panel .topo-meta-grid b { color:#102A43; }
#ms-topo-panel .topo-line { font-size:12px; color:#334E68; line-height:1.6; word-break:break-all; margin-bottom:2px; }
#ms-topo-panel .topo-fault-row { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; font-size:12px; margin:6px 0; padding:6px 8px; background:#FFF8F8; border:1px solid #FFCDD2; border-radius:6px; }
#ms-topo-panel .topo-fault-row b { font-weight:bold; }
#ms-topo-panel .topo-cmd-grid { display:grid; grid-template-columns:auto 1fr; gap:5px 8px; align-items:center; font-size:12px; margin-top:2px; }
#ms-topo-panel .topo-cmd-grid select, #ms-topo-panel .topo-cmd-grid input { width:100%; box-sizing:border-box; }
#ms-topo-panel .topo-cmd-grid button { grid-column:1 / -1; justify-self:start; margin-top:2px; }
#ms-topo-panel .topo-cmd-hint { font-size:11px; color:#607D8B; margin-top:4px; line-height:1.5; }
#ms-topo-panel .topo-servo-cmd-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:2px; }
#ms-topo-panel .topo-irda-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin:6px 0; }
#ms-topo-panel .topo-irda-col { display:flex; flex-direction:column; min-height:0; }
#ms-topo-panel .topo-irda-head { font-weight:bold; color:#334E68; font-size:12px; margin-bottom:2px; }
#ms-topo-panel .topo-irda-tools { display:flex; gap:4px; align-items:center; padding:2px 0; font-size:10px; }
#ms-topo-panel .topo-irda-tools .log-btn { padding:1px 5px; font-size:10px; }
#ms-topo-panel .topo-irda-auto { display:flex; align-items:center; gap:2px; cursor:pointer; }
#ms-topo-panel .topo-irda-col pre { flex:1; min-height:130px; font-size:10px; font-family:Consolas,monospace; background:#1e1e1e; color:#d4d4d4; border:1px solid #3a3a3a; border-radius:6px; padding:4px; overflow:auto; margin:0; }
#ms-topo-panel .topo-footer { display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-top:8px; padding-top:8px; border-top:1px solid #EAEFF3; }
#ms-topo-panel .topo-status-row { display:flex; gap:8px; align-items:center; margin-top:6px; }
.master-split {
  display: flex; gap: 12px; margin-top: 0;
}
.master-left-panel { flex: 1; min-width: 160px; }
.master-right-panel { flex: 1; min-width: 160px; }
.master-left-panel fieldset,
.master-right-panel fieldset {
  border: 1px solid #ccc; border-radius: 4px; padding: 8px;
}
.master-left-panel legend,
.master-right-panel legend {
  font-size: 12px; font-weight: 600; color: #555; padding: 0 6px;
}

.ms-mode-tabs {
  display: flex; gap: 0; margin-top: 10px; border-bottom: 2px solid #2196F3;
}
.ms-tab {
  padding: 6px 14px; border: none; background: #e0e0e0; cursor: pointer;
  font-size: 12px; border-radius: 4px 4px 0 0; margin-right: 2px;
}
.ms-tab.active { background: #2196F3; color: white; font-weight: 600; }

.ms-mode-panel { padding: 10px 0; }
.ms-mode-panel.hidden { display: none; }
/* 未配置机型时的占位提示（对照 _show_unconfigured_hint）*/
.ms-unconfigured-hint { text-align:center; font-size:14px; color:#666; padding:32px 24px; line-height:1.7; }

.ms-servo-row { display: flex; gap: 12px; }
.ms-servo-status {
  flex: 1; background: #f5f5f5; border-radius: 4px; padding: 8px;
}
.ms-status-line {
  font-size: 12px; margin: 3px 0; color: #555;
}
.ms-status-line b { color: #333; }

.ms-led {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 700; color: white; margin-left: 6px;
}

.ms-section-title {
  font-size: 13px; font-weight: 700; color: #333; margin: 8px 0 4px;
}
.ms-btn-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.ms-btn {
  padding: 6px 8px; border: none; border-radius: 4px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: white; transition: opacity 0.15s;
}
.ms-btn:hover { opacity: 0.85; }
.ms-pos-row {
  display: flex; gap: 6px; margin: 4px 0; flex-wrap: wrap;
}
.ms-pos-row .ms-btn { flex: 1; min-width: 110px; }

.btn-teal { background: #009688; }

/* 拓扑视图 */
.topo-grid {
  display: flex; gap: 12px; margin: 10px 0;
}
.topo-node {
  flex: 1; border: 2px solid #2196F3; border-radius: 6px; padding: 10px;
  background: #e3f2fd; text-align: center;
}
.topo-node-title {
  font-size: 13px; font-weight: 700; color: #1565C0; margin-bottom: 6px;
}
.topo-node-body { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.topo-node-body b { color: #333; }

.topo-status-row {
  display: flex; align-items: center; gap: 12px; margin: 8px 0;
}
.topo-led {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 600; color: white; background: #4CAF50;
}

.m0-sep { border: none; border-top: 1px solid #e0e0e0; margin: 8px 0; }

/* 主控站点按钮（站点列表行） */
.btn-master {
  padding: 2px 8px; font-size: 11px; border: 1px solid #2196F3;
  background: #e3f2fd; color: #1565C0; border-radius: 3px; cursor: pointer;
}
.btn-master:hover { background: #2196F3; color: white; }

/* IO状态指示灯样式 */
.io-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0;
}

.io-group {
  background: #f5f5f5;
  border-radius: 4px;
  padding: 8px;
}

.io-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.io-led-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  margin: 4px 0;
}

.io-led-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.io-led-label {
  font-size: 11px;
  color: #555;
  min-width: 24px;
}

.io-led {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  transition: background-color 0.2s;
}

.io-led-on {
  background-color: #4CAF50;
  color: white;
  box-shadow: 0 0 6px #4CAF50;
}

.io-led-off {
  background-color: #9E9E9E;
  color: #616161;
}

/* DO输出联动网格（3列等宽，每列下拉+反转纵向堆叠，不换行）*/
.do-link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0;
}
.do-link-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.do-link-col select {
  width: 100%;
  box-sizing: border-box;
  padding: 2px 4px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 12px;
}
.do-link-col label {
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.do-link-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}
.do-link-duration label { font-size: 12px; white-space: nowrap; }

/* 配置锁定功能 */
.ms-config-lockable:disabled,
.ms-config-lockable.locked {
  background-color: #e0e0e0 !important;
  color: #999 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

/* ===== 拓扑配置网格 (MODE1/MODE2) ===== */
.ms-topo-grid {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr;
  gap: 6px 10px;
  align-items: center;
  margin: 6px 0;
}
.ms-topo-grid-4col {
  grid-template-columns: auto 1fr auto 1fr;
}
.ms-topo-label {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: #555;
}
.ms-topo-station-select {
  min-width: 110px;
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
}
.ms-radio-group {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ms-radio-group label {
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.ms-radio-group input[type="radio"] {
  margin-right: 3px;
  cursor: pointer;
}
.ms-master-label {
  font-weight: bold;
  color: #1565C0;
  background: #E3F2FD;
  border: 1px solid #BBDEFB;
  border-radius: 4px;
  padding: 4px 10px;
  text-align: center;
  font-size: 12px;
}
.ms-topo-hint {
  padding: 8px 10px;
  background: #F5F7FA;
  border: 1px solid #D7DEE8;
  border-radius: 4px;
  color: #455A64;
  font-size: 11px;
  margin: 4px 0;
  line-height: 1.5;
}
.ms-topo-tip {
  padding: 6px 10px;
  background: #FFF3E0;
  border: 1px solid #FFE0B2;
  border-radius: 3px;
  color: #E65100;
  font-size: 11px;
  margin: 4px 0;
  line-height: 1.5;
}

/* ===== 手动控制样式 ===== */
.ms-unit {
  font-size: 11px;
  color: #888;
  margin-right: 4px;
}
.ms-pos-val {
  font-weight: bold;
  color: #4CAF50;
  font-size: 12px;
}
.ms-status-val {
  font-weight: bold;
  color: #3F51B5;
  font-size: 12px;
}
.ms-vel-val {
  font-weight: bold;
  color: #FF9800;
  font-size: 12px;
}
.ms-manual-ctrl:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 往返测试状态 ===== */
.ms-recip-status {
  color: #9C27B0;
  font-weight: bold;
  font-size: 12px;
  margin: 4px 0;
  min-height: 16px;
}
.ms-recip-custom.hidden {
  display: none;
}

.ms-config-lockable:disabled,
.ms-config-lockable.locked {
  border-color: #ccc !important;
}

/* ==================== IRDA日志轮询面板 ==================== */
.irda-log-panel {
  border-top: 2px solid #9C27B0;
  background: #fff;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

.irda-log-panel.collapsed .irda-log-content {
  display: none;
}

.irda-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: #f3e5f5;
  border-bottom: 1px solid #e1bee7;
}

.irda-log-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.irda-log-title span {
  font-weight: bold;
  font-size: 12px;
  color: #9C27B0;
}

.irda-log-content {
  display: flex;
  flex-direction: column;
  min-height: 120px;
  max-height: 250px;
  overflow: hidden;
}

.irda-log-stats {
  display: flex;
  gap: 16px;
  padding: 4px 8px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  font-size: 11px;
}

.irda-log-stats b {
  color: #9C27B0;
}

.irda-log-table-wrap {
  flex: 1;
  overflow: auto;
}

#irda-log-table {
  font-size: 11px;
}

#irda-log-table th {
  background: #f3e5f5;
  color: #9C27B0;
  font-weight: bold;
  padding: 3px 6px;
  border-bottom: 2px solid #ce93d8;
  position: sticky;
  top: 0;
  z-index: 10;
}

#irda-log-table td {
  padding: 2px 6px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

#irda-log-table tbody tr:hover {
  background: #fafafa;
}

.irda-log-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.irda-log-frame {
  font-family: Consolas, monospace;
  color: #2196F3;
  font-weight: bold;
}

.irda-log-cmd {
  font-weight: bold;
  color: #4CAF50;
}

.irda-log-dir {
  font-weight: bold;
  color: #FF9800;
}

.irda-log-payload {
  color: #666;
  font-size: 10px;
}

/* === Flash日志 — QT对齐补充样式 === */
.fl-toolbar input[type="text"][list] {
    padding: 3px 4px; border: 1px solid #ccc; border-radius: 2px;
    font-size: 12px; width: 100%; box-sizing: border-box;
}
.fl-toolbar input[type="text"][list]:focus {
    border-color: #2196F3; outline: none;
}
.fl-toolbar .w160 { width: 160px !important; }
.fl-toolbar .w85 { width: 85px !important; }
.fl-toolbar .w80 { width: 80px !important; }
/* QT alternating row colors */
.fl-table tbody tr:nth-child(even) { background: #fff; }
.fl-table tbody tr:nth-child(odd) { background: #f7f9fc; }
/* 参数列允许换行显示完整内容 */
.fl-table td:nth-child(6),
.fl-table td:nth-child(7) {
    white-space: normal; word-break: break-all;
}
/* 表格行最小高度 */
.fl-table td { min-height: 22px; line-height: 1.4; }

/* === Flash日志弹窗可拖拽缩放 === */
#dlg-flash-log .battery-modal {
    position: relative;
    resize: both;
    overflow: auto;
    min-width: 600px;
    min-height: 300px;
}
/* 缩放手柄可见区域 */
#dlg-flash-log .battery-modal::-webkit-resizer {
    background: linear-gradient(135deg, transparent 50%, #bbb 50%);
}

/* Flash日志弹窗 — 可见缩放手柄 */
#dlg-flash-log .battery-modal::after {
    content: '';
    position: absolute;
    right: 0; bottom: 0;
    width: 16px; height: 16px;
    background: linear-gradient(135deg, transparent 0%, transparent 45%, #aaa 50%, transparent 55%, transparent 70%, #aaa 75%, transparent 80%);
    pointer-events: none;
    border-bottom-right-radius: 10px;
    z-index: 10;
}


/* ==================== OTA 进度条专用样式 ==================== */
.ota-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2196F3, #00BCD4) !important;
  transition: width 0.3s ease;
  border-radius: 9px;
}

/* ==================== 全局按钮按下反馈 ==================== */
/* 所有按钮在按下时提供视觉反馈（颜色变浅+轻微缩小） */

/* btn-sm 系列 */
.btn-sm:active:not(:disabled) {
  filter: brightness(0.82);
  transform: scale(0.96);
  transition: filter 0.05s, transform 0.05s;
}
.btn-blue:active:not(:disabled) { filter: brightness(0.82); transform: scale(0.96); }
.btn-green:active:not(:disabled) { filter: brightness(0.82); transform: scale(0.96); }
.btn-red:active:not(:disabled) { filter: brightness(0.82); transform: scale(0.96); }
.btn-orange:active:not(:disabled) { filter: brightness(0.82); transform: scale(0.96); }
.btn-purple:active:not(:disabled) { filter: brightness(0.82); transform: scale(0.96); }
.btn-pink:active:not(:disabled) { filter: brightness(0.82); transform: scale(0.96); }

/* btn-motion 系列（有色运动控制按钮） */
.btn-motion:active:not(:disabled) {
  filter: brightness(0.82);
  transform: scale(0.96);
  transition: filter 0.05s, transform 0.05s;
}

/* btn-xs / btn-tiny 系列 */
.btn-xs:active:not(:disabled) { filter: brightness(0.82); transform: scale(0.95); }
.btn-tiny:active { filter: brightness(0.82); transform: scale(0.95); }

/* btn-master / btn-teal 系列 */
.btn-master:active { filter: brightness(0.82); transform: scale(0.96); }
.btn-teal:active { filter: brightness(0.82); transform: scale(0.96); }

/* 通用 button 元素按下反馈 */
button:active:not(:disabled) {
  filter: brightness(0.88);
}

/* top-tab / ctrl-tab / st-tab 按下反馈 */
.top-tab:active, .ctrl-tab:active, .st-tab:active {
  filter: brightness(0.88);
  transform: scale(0.97);
}

/* vehicle-row 点击反馈 */
.vehicle-row:active {
  background: #E3F2FD !important;
}

/* DI 按钮保持原有 active 样式不变 */

/* ===== 单元格填充式弹窗按钮（Task 0.3，对照 PC 工具 table_button_utils.py）=====
 * 按钮即单元格：填满 / 无边框 / min-height 24 / 字号 10 / padding 0
 * 由 table_utils.js 的 cellPopupBtn() 生成 <button class="cell-popup-btn [--变体]">
 * 仅车辆/站点列表使用；后续 Task 2.2（E22 列）/2.3（驱型列）/3.2（站点 E22 列）复用同一套
 */
.cell-popup-btn {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  min-height: 24px;
  line-height: 24px;
  font-size: 10px;
  cursor: pointer;
  color: #fff;
  background: #607D8B;            /* 默认中性色 */
  transition: filter 0.08s;
}
.cell-popup-btn:hover:not(:disabled) { filter: brightness(1.08); }
.cell-popup-btn:active:not(:disabled) { filter: brightness(0.82); }
.cell-popup-btn:disabled { background: #CCCCCC; color: #666666; cursor: not-allowed; }

/* 语义变体：电池健康等级 A/B/C/D（颜色对照原工具） */
.cell-popup-btn--grade-a { background: #4CAF50; color: #fff; }   /* 优秀 绿 */
.cell-popup-btn--grade-b { background: #2196F3; color: #fff; }   /* 良好 蓝 */
.cell-popup-btn--grade-c { background: #FF9800; color: #000; }   /* 注意 橙 */
.cell-popup-btn--grade-d { background: #F44336; color: #fff; }   /* 警告 红 */
.cell-popup-btn--grade-0 { background: #9E9E9E; color: #fff; }   /* 未查询 灰（可点击，开弹窗查询） */
/* 主控配置（主控蓝） */
.cell-popup-btn--master { background: #2196F3; color: #fff; }
/* 初始化（中性） */
.cell-popup-btn--init { background: #607D8B; color: #fff; }
/* E22 已发现/同步（绿，可点击开配置弹窗） */
.cell-popup-btn--e22-sync { background: #4CAF50; color: #fff; }
/* 驱型（2WD 绿 / 4WD 灰蓝） */
.cell-popup-btn--drive-2wd { background: #4CAF50; color: #fff; }
.cell-popup-btn--drive-4wd { background: #607D8B; color: #fff; }
/* 站点 E22 配置入口（青，区别于 e22-sync 绿/master 蓝） */
.cell-popup-btn--e22 { background: #009688; color: #fff; }

/* P7.1 地址配置模式高亮（MCU≠E22）：整行 #FFE0B2，MCU 列 #FFF3CD */
.vehicle-row-addr-mismatch { background: #FFE0B2 !important; }
.vehicle-row-addr-mismatch:hover { background: #FFD54F !important; }
.cell-mcu-mismatch { background: #FFF3CD !important; }

/* P7.2 路由站点序列彩色方块（45×45，按类型着色）*/
.rt-seq-blocks { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; align-items: center; }
.rt-seq-block { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: bold; border-radius: 4px; color: #fff; }
.rt-seq-block.seq-block-normal { background: #9E9E9E; }
.rt-seq-block.seq-block-ng { background: #FF9800; }
.rt-seq-block.seq-block-branch { background: #03A9F4; }
.rt-seq-block.seq-block-merge { background: #8BC34A; }
.rt-seq-block.seq-block-skip { background: #E91E63; opacity: 0.5; }
.rt-seq-legend { display: flex; gap: 6px; margin-top: 8px; margin-left: 8px; font-size: 11px; }
.rt-seq-legend .rt-seq-block { width: auto; height: auto; padding: 2px 8px; border-radius: 3px; font-size: 11px; }

/* 行高 28 + 含按钮单元格 padding:0（仅车辆/站点列表，不影响其他 .data-table 表）
 * 注意：不能改 .data-table td 的 padding（57/307 行全表共用，会污染 routing/IRDA/battery 等表）
 * 故用窄作用域：含按钮的 td 显式加 class="cell-btn" */
.vehicle-row td, .station-row td { height: 28px; vertical-align: middle; }
.vehicle-row td.cell-btn, .station-row td.cell-btn { padding: 0; }

/* ==================== 运行监控 TAB ==================== */
#monitor-tool { height:100%; padding:6px; box-sizing:border-box; }
#monitor-tool.active { display:flex; flex-direction:column; }
.mon-toolbar { display:flex; gap:6px; align-items:center; padding:6px 8px; border-bottom:1px solid #D9E2EC; flex-wrap:wrap; }
.mon-body { display:flex; flex:1; min-height:0; }
.mon-left { width:240px; border-right:1px solid #D9E2EC; overflow:auto; padding:6px; box-sizing:border-box; }
.mon-center { flex:1; overflow:auto; padding:8px; }
.mon-station-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; }
.mon-station-box { border:1px solid #B0BEC5; border-radius:6px; padding:6px 8px; background:#FAFBFC; }
.mon-station-box.mon-online { border-color:#4CAF50; box-shadow:0 0 0 1px #4CAF50 inset; }
.mon-station-box.mon-offline { opacity:0.45; }
.mon-box-head { font-weight:bold; font-size:13px; margin-bottom:2px; }
.mon-box-body { font-size:12px; color:#555; }
.mon-list { font-size:12px; }
.mon-row { padding:3px 4px; display:flex; gap:6px; align-items:center; border-bottom:1px dashed #ECEFF1; }
.mon-row.mon-online { color:#2E7D32; }
.mon-row.mon-offline { color:#9E9E9E; }
.mon-bottom { display:flex; height:190px; border-top:1px solid #D9E2EC; }
.mon-bottom > div { flex:1; overflow:auto; padding:6px; border-right:1px solid #D9E2EC; box-sizing:border-box; }
.mon-bottom > div:last-child { border-right:0; }
.mon-log { font-family:Consolas, Monaco, monospace; font-size:11px; line-height:1.6; }
.mon-event-row, .mon-alert-row { padding:2px 4px; border-bottom:1px dashed #ECEFF1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* 详情弹窗：双列日志区（左车 | 右站） */
.mon-detail-dual { display:flex; gap:8px; margin-top:6px; }
.mon-log-pane { flex:1; min-width:0; border:1px solid #D9E2EC; border-radius:6px; display:flex; flex-direction:column; max-height:320px; background:#fff; }
.mon-log-pane-head { padding:4px 8px; background:#F5F7FA; border-bottom:1px solid #E0E6ED; font-size:12px; font-weight:bold; display:flex; gap:6px; align-items:center; }
.mon-log-pane-body { margin:0; padding:6px 8px; overflow:auto; font-family:Consolas, Monaco, monospace; font-size:11px; line-height:1.5; white-space:pre-wrap; word-break:break-all; flex:1; background:#FAFBFC; }

/* 主控段框（主界面聚合）：E22地址 + 主控FSM + 入口/主控/驶离三在线灯 */
.mon-station-box.mon-segment-box { border-width:2px; }
.mon-seg-fsm { font-size:12px; color:#555; }
.mon-seg-lamps { margin-top:5px; display:flex; gap:10px; font-size:11px; align-items:center; color:#666; }
.mon-seg-lamps span { display:inline-flex; align-items:center; gap:3px; }
.mon-lamp { display:inline-block; width:9px; height:9px; border-radius:50%; }
.mon-lamp.on { background:#4CAF50; box-shadow:0 0 4px rgba(76,175,80,0.7); }
.mon-lamp.off { background:#C2CFD8; }

/* 主控段三栏组合窗口（左入口/中主控/右驶离 + 底部双列日志） */
.modal-xwide { max-width:1080px; width:96%; }
.mon-seg-cols { display:flex; gap:10px; }
.mon-seg-col { flex:1; min-width:0; border:1px solid #D9E2EC; border-radius:6px; padding:8px 10px; background:#FAFBFC; }
.mon-seg-col.entry { border-color:#FB8C00; }
.mon-seg-col.master { border-color:#1976D2; box-shadow:0 0 0 1px #1976D2 inset; }
.mon-seg-col.exit { border-color:#9C27B0; }
.mon-seg-col-head { font-weight:bold; font-size:13px; margin-bottom:6px; padding-bottom:4px; border-bottom:1px solid #E0E6ED; text-align:center; }
.mon-seg-col-row { font-size:12px; margin:3px 0; color:#555; }
.mon-seg-col-row b { color:#1a1a1a; }

/* BOMA6 地址配置高亮（对称小车 addr_config_mode #FFE0B2，待固件 Snapshot 带 addr_config_mode） */
.mon-station-box.mon-config { border-color:#FB8C00; background:#FFF3E0; box-shadow:0 0 0 1px #FB8C00 inset, 0 0 6px rgba(251,140,0,0.4); }

/* 配置TAB 站点列表 BOMA6 地址配置高亮（对称 addr_config_mode #FFE0B2） */
.station-row.station-row-addr-config td { background:#FFF3E0 !important; }

/* 子站点（经主控代理带出，无LoRa硬件）缩进展示在主控下方 */
.station-row.station-row-sub td { padding-left: 26px; background: rgba(255,152,0,0.05); }
.station-row.station-row-sub td:first-child::before {
  content: '└ '; color: #FB8C00; font-weight: bold; margin-right: 2px;
}
.proxy-badge {
  display: inline-block; padding: 0 5px; margin-left: 4px;
  font-size: 11px; line-height: 16px; border-radius: 3px;
  color: #FB8C00; border: 1px solid #FB8C00; background: #FFF3E0;
}
.gray { color:#9e9e9e; }


/* ==================== AI诊断 TAB (左列:对话+输入 | 右栏:证据全高; 可拖动分隔, localStorage保存) ==================== */
#diagnose-tool { padding: 0; gap: 0; overflow: hidden; }
#diagnose-tool.active { display: flex; flex-direction: row; }
.diag-left { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.diag-chat { flex: 1 1 auto; overflow-y: auto; padding: 16px 18px; background: #fff; min-height: 0; }
/* 对话气泡 */
.diag-welcome { text-align: center; padding: 44px 24px; color: #888; }
.diag-welcome-emoji { font-size: 40px; margin-bottom: 8px; }
.diag-welcome-title { font-size: 19px; color: #333; margin-bottom: 8px; font-weight: 600; }
.diag-welcome-desc { font-size: 13px; line-height: 1.7; margin: 0 auto 18px; max-width: 460px; }
.diag-welcome-desc strong { color: #1976D2; }
.diag-examples { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.diag-example { cursor: pointer; }
.diag-msg { display: flex; margin-bottom: 14px; }
.diag-msg-user { justify-content: flex-end; }
.diag-msg-assistant { justify-content: flex-start; cursor: pointer; border-radius: 10px; padding: 2px; transition: background .12s; }
.diag-msg-assistant:hover { background: #f5f7fa; }
.diag-msg-active { background: #e3f0ff !important; }
.diag-avatar { width: 30px; height: 30px; margin-right: 8px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg, #42a5f5, #1565C0); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: 0.5px; box-shadow: 0 1px 3px rgba(21,101,192,0.3); }
.diag-bubble { max-width: 78%; padding: 10px 14px; border-radius: 10px; font-size: 14px; line-height: 1.7; word-wrap: break-word; }
.diag-bubble-user { background: #1976D2; color: #fff; }
.diag-bubble-assistant { background: #f0f2f5; color: #333; }
.diag-bubble-assistant strong { color: #111; }
.diag-bubble-assistant code { background: #e0e0e0; padding: 1px 5px; border-radius: 3px; font-size: 13px; }
.diag-ev-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; background: #1565C0; color: #fff; border-radius: 10px; font-size: 11px; }
.diag-click-hint { display: block; margin-top: 6px; font-size: 11px; color: #1565C0; }
.diag-loading { color: #FF9800; }
.diag-error-text { color: #F44336; }
/* 左列底部输入栏(默认高165, 拖动覆盖, 只在对话下方) */
.diag-input-bar { flex: 0 0 165px; border-top: 1px solid #ddd; padding: 8px 14px 10px; background: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.diag-status-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex: 0 0 auto; }
.diag-input-row { display: flex; gap: 8px; align-items: stretch; flex: 1; min-height: 0; }
.diag-input { flex: 1; resize: none; padding: 8px 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 14px; font-family: inherit; line-height: 1.5; height: 100%; }
.diag-input:focus { outline: none; border-color: #1976D2; }
/* 右栏证据(默认宽520, 全高直通到底, 拖动覆盖) */
.diag-evidence-panel { flex: 0 0 520px; border-left: 1px solid #e0e0e0; display: flex; flex-direction: column; background: #fafafa; min-width: 0; }
.diag-evidence-panel.hidden { display: none; }
.diag-evidence-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #e0e0e0; font-size: 13px; font-weight: 600; color: #333; background: #f0f2f5; flex: 0 0 auto; }
.diag-evidence-content { flex: 1; overflow-y: auto; padding: 8px 10px; }
.diag-evidence-empty { text-align: center; color: #aaa; font-size: 13px; padding: 40px 12px; line-height: 1.8; }
.diag-evidence-tip { font-size: 12px; color: #666; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed #ddd; }
.diag-evidence-item { padding: 7px 8px; border-bottom: 1px solid #eee; background: #fff; border-radius: 4px; margin-bottom: 5px; }
.diag-evidence-score { color: #1565C0; font-weight: bold; font-size: 12px; }
.diag-evidence-src { color: #666; font-size: 12px; }
.diag-evidence-snippet { color: #444; margin-top: 3px; font-size: 12px; line-height: 1.5; }
/* 可拖动分隔线 */
.diag-splitter { flex: 0 0 6px; background: #e8e8e8; transition: background .12s; z-index: 5; }
.diag-splitter:hover { background: #1976D2; }
.diag-splitter-v { cursor: col-resize; }
.diag-splitter-h { cursor: row-resize; }
