/* 页面整体布局 */ .page-cbd { display: flex; flex-direction: column; gap: 12px; overflow: hidden; } /* 左右拆分的栏 */ .page-cbd .panes { display: flex; gap: 12px; flex: 1; min-height: 0; overflow: hidden; } /* 左栏 */ .page-cbd .left-pane { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow: hidden; } .page-cbd .left-pane .card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; } /* 设备状态:固定高度 */ .page-cbd .status-card { flex: none; height: 180px; white-space: normal; } /* 设备控制:占剩余空间 */ .page-cbd .command-card { flex: 1; min-height: 0; } /* 固件升级:保持合适的最小高度 */ .page-cbd .firmware-card { flex: none; min-height: 150px; } /* 左侧内容区域 */ .page-cbd .status-content, .page-cbd .command-content, .page-cbd .firmware-content { flex: 1; min-height: 0; overflow: auto; } /* 设备状态内容 */ .page-cbd .status-content { display: flex; align-items: center; padding: 0; } /* 设备状态 */ .page-cbd .status-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; margin-bottom: 0; } .page-cbd .status-item { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; padding: 14px; border: 1px solid #2d405e; border-left: 3px solid #3b82f6; border-radius: 6px; background: linear-gradient(135deg, #192941, #151f33); transition: border-color 0.2s, background 0.2s; } .page-cbd .status-item:hover { border-color: #45658d; background: #1c2d48; } /* 设备状态及控制分组标题 */ .page-cbd .status-item span, .page-cbd .command-group h3 { color: #e2e8f0; font-size: 14px; font-weight: 500; } .page-cbd .status-item span { position: relative; padding-left: 11px; } .page-cbd .status-item span::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); transform: translateY(-50%); } .page-cbd .status-item strong { color: #60a5fa; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } /* 设备控制内容 */ .page-cbd .command-content { padding: 0; } /* 控制分组 */ .page-cbd .command-group { padding: 14px; margin-bottom: 12px; border: 1px solid #2d405e; border-radius: 6px; background: linear-gradient(135deg, #192941, #151f33); transition: border-color 0.2s; } .page-cbd .command-group:hover { border-color: #45658d; } .page-cbd .command-group:last-child { margin-bottom: 0; } /* 分组标题 */ .page-cbd .command-group h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid #2b3d58; } .page-cbd .command-group h3::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); } /* 指令按钮布局 */ .page-cbd .command-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } /* 指令按钮 */ .page-cbd .cmd-btn { position: relative; width: 100%; min-width: 0; min-height: 38px; padding: 6px 8px 6px 23px; border: 1px solid #344965; border-radius: 5px; background: #1c2940; color: #cbd5e1; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, color 0.15s; } .page-cbd .cmd-btn::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); } .page-cbd .cmd-btn-1::before { background: #36b99a; box-shadow: 0 0 6px rgba(54, 185, 154, 0.5); } .page-cbd .cmd-btn-0::before { background: #df826e; box-shadow: 0 0 6px rgba(223, 130, 110, 0.4); } .page-cbd .cmd-btn:hover { border-color: #52749c; background: #243750; color: #e2e8f0; } .page-cbd .cmd-btn:active { background: #293e58; color: #fff; } .page-cbd .cmd-btn:disabled { opacity: 0.5; cursor: not-allowed; } .page-cbd .cmd-btn:disabled::before { box-shadow: none; } /* 固件升级内容 */ .page-cbd .firmware-content { display: flex; flex-direction: column; gap: 0; padding: 0; } /* 固件升级项目 */ .page-cbd .firmware-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 14px; margin-bottom: 12px; border: 1px solid #2d405e; border-radius: 6px; background: linear-gradient(135deg, #192941, #151f33); min-width: 0; overflow: hidden; transition: border-color 0.2s, background 0.2s; } .page-cbd .firmware-item:last-child { margin-bottom: 0; } .page-cbd .firmware-item:hover { border-color: #45658d; background: #1c2d48; } .page-cbd .firmware-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, #60a5fa, #2563eb); } /* 固件升级名称 */ .page-cbd .firmware-name { display: flex; align-items: center; gap: 7px; flex: none; width: 90px; color: #e2e8f0; font-size: 13px; font-weight: 500; } .page-cbd .firmware-name .icon { width: 17px; height: 17px; flex: none; fill: none; stroke: #60a5fa; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } /* 固件文件选择 */ .page-cbd .firmware-item input[type="file"] { flex: 1; min-width: 0; color: #cbd5e1; font-size: 12px; } /* 固件升级状态 */ .page-cbd .firmware-status { min-width: 90px; color: #94a3b8; font-size: 12px; overflow-wrap: anywhere; } /* 固件升级按钮 */ .page-cbd .firmware-item .btn { flex: none; } /* 右栏:应用日志 */ .page-cbd .right-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; } .page-cbd .right-pane .log-card { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; } .page-cbd .right-pane .output { flex: 1; min-height: 0; } /* ================= 移动端适配 (≤768px) ================= */ @media (max-width: 768px) { .page-cbd .panes { flex-direction: column; flex: none; overflow: visible; } .page-cbd .left-pane, .page-cbd .right-pane { width: 100%; flex: none; overflow: visible; } .page-cbd .status-card { flex: none; height: auto; min-height: 140px; } .page-cbd .status-content { flex: none; min-height: auto; align-items: stretch; overflow: visible; } .page-cbd .status-group { flex: none; grid-template-columns: 1fr; } .page-cbd .command-card { flex: none; min-height: 240px; } .page-cbd .firmware-card { flex: none; min-height: 180px; } .page-cbd .firmware-content { flex: none; overflow: visible; } .page-cbd .right-pane .log-card { min-height: 400px; } } /* ================= 小屏适配 (≤480px) ================= */ @media (max-width: 480px) { .page-cbd .command-buttons { grid-template-columns: 1fr; } .page-cbd .log-actions { gap: 4px; } .page-cbd .firmware-item { flex-wrap: wrap; } .page-cbd .firmware-name { width: 100%; } .page-cbd .firmware-item input[type="file"] { flex-basis: 100%; } .page-cbd .firmware-status { flex: 1; min-width: 0; } }