/* 页面整体布局 */ .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; } /* 设备控制:占剩余空间的3/4 */ .page-cbd .command-card { flex: 3; } /* 固件升级:占剩余空间的1/4 */ .page-cbd .firmware-card { flex: 1; } /* 左侧内容区域 */ .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: 12px; } /* 设备状态 */ .page-cbd .status-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin-bottom: 0; } .page-cbd .status-item { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; padding: 12px 14px; border: 1px solid #263650; border-left: 3px solid #3b82f6; border-radius: 6px; background: #151f33; } /* 设备状态及控制分组标题 */ .page-cbd .status-item span, .page-cbd .command-group h3 { color: #e2e8f0; font-size: 14px; font-weight: 500; } .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 #263650; border-radius: 6px; background: #151f33; } .page-cbd .command-group:last-child { margin-bottom: 0; } /* 分组标题 */ .page-cbd .command-group h3 { margin: 0 0 12px; padding-left: 9px; border-left: 3px solid #3b82f6; } /* 指令按钮布局 */ .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 18px; border: 1px solid #34445f; 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: 8px; top: 50%; width: 5px; height: 5px; border-radius: 50%; transform: translateY(-50%); } .page-cbd .cmd-btn-1::before { background: #36b99a; } .page-cbd .cmd-btn-0::before { background: #df826e; } .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 .firmware-content { padding: 12px; } /* 右栏:应用日志 */ .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 .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; } }