274 lines
13 KiB
CSS
274 lines
13 KiB
CSS
/* =========================================================================
|
|
泡沫轴 - 工控交互工作台样式规范 (严格基于 #2563EB 设计系统)
|
|
========================================================================= */
|
|
|
|
:root {
|
|
--color-primary: #2563EB;
|
|
--color-primary-dark: #1D4ED8;
|
|
--color-on-primary-container: #1E40AF;
|
|
--color-primary-light: #EFF6FF;
|
|
--color-primary-container: #EFF6FF;
|
|
--color-primary-border: #DBEAFE;
|
|
--color-primary-glow: rgba(37, 99, 235, 0.22);
|
|
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
|
|
|
|
--bg: #EEF2F6;
|
|
--surface: #FFFFFF;
|
|
--surface-sub: #F8FAFC;
|
|
--text-main: #0F172A;
|
|
--text-sub: #64748B;
|
|
--text-dim: #94A3B8;
|
|
--divider: #E2E8F0;
|
|
|
|
--color-success: #059669;
|
|
--color-success-bg: #ECFDF5;
|
|
--color-success-border: #A7F3D0;
|
|
|
|
--color-danger: #E11D48;
|
|
--color-danger-bg: #FFF1F2;
|
|
--color-danger-border: #FFE4E6;
|
|
--color-danger-gradient: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
|
|
|
|
--content-max-width: 1240px;
|
|
--content-gutter: clamp(14px, 2vw, 24px);
|
|
--appbar-height: 56px;
|
|
}
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", Roboto, sans-serif;
|
|
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
|
padding: var(--content-gutter); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
.device-wrapper {
|
|
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
|
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
|
overflow: hidden; position: relative; min-height: 720px; display: flex; flex-direction: column;
|
|
}
|
|
|
|
/* 1. AppBar */
|
|
.appbar {
|
|
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
|
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface); flex-shrink: 0;
|
|
}
|
|
.appbar-left { display: flex; align-items: center; }
|
|
.appbar-nav, .appbar-more {
|
|
width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
|
cursor: pointer; background: transparent; border: none; transition: all 0.15s ease;
|
|
}
|
|
.appbar-nav:hover, .appbar-more:hover { background: rgba(15, 23, 42, 0.06); transform: scale(0.96); }
|
|
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
|
|
.appbar-title { font-size: 18px; font-weight: 700; margin-left: 10px; }
|
|
|
|
/* 2. 核心三栏工控布局 */
|
|
.tri-body {
|
|
padding: clamp(16px, 2vw, 24px); background: #F8FAFC; flex: 1; overflow-y: auto;
|
|
display: grid; grid-template-columns: 310px 1.15fr 1fr; gap: 18px;
|
|
}
|
|
|
|
.panel-card {
|
|
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 20px;
|
|
display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
|
|
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03); position: relative; transition: all 0.25s ease;
|
|
}
|
|
|
|
.panel-header-title {
|
|
font-size: 17px; font-weight: 700; color: var(--text-main);
|
|
}
|
|
|
|
/* =========================================================================
|
|
左栏:设备连接与蓝牙扫描
|
|
========================================================================= */
|
|
.left-stack { display: flex; flex-direction: column; gap: 16px; }
|
|
|
|
.left-device-card { padding: 18px; }
|
|
|
|
.device-status-box {
|
|
display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
|
|
padding: 8px 0 16px; border-bottom: 1px solid var(--divider); min-height: 190px; justify-content: center;
|
|
}
|
|
.fr100-product-img {
|
|
width: 170px; height: 85px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
|
|
transition: all 0.3s ease;
|
|
}
|
|
.fr100-disconnected-img {
|
|
width: 140px; height: 60px; display: flex; align-items: center; justify-content: center; opacity: 0.65;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.device-meta-list { width: 100%; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
|
|
.meta-item { display: flex; justify-content: space-between; align-items: center; }
|
|
.meta-label { color: var(--text-sub); }
|
|
.meta-val { font-weight: 700; color: var(--text-main); font-family: ui-monospace, monospace; }
|
|
|
|
.battery-pill {
|
|
background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border);
|
|
padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px;
|
|
}
|
|
.battery-pill.dim {
|
|
background: #F1F5F9; color: var(--text-dim); border-color: #E2E8F0;
|
|
}
|
|
|
|
.device-btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
|
|
.btn-mini {
|
|
height: 38px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
|
|
display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.15s ease; border: 1.5px solid transparent;
|
|
}
|
|
.btn-ghost-neutral { background: #F1F5F9; color: var(--text-main); border-color: #CBD5E1; }
|
|
.btn-ghost-neutral:hover { background: #E2E8F0; }
|
|
.btn-primary-blue { background: var(--color-primary-gradient); color: white; box-shadow: 0 4px 10px var(--color-primary-glow); }
|
|
.btn-primary-blue:hover { transform: translateY(-1px); }
|
|
.btn-danger-outline { background: white; color: var(--color-danger); border-color: #FECDD3; }
|
|
.btn-danger-outline:hover { background: var(--color-danger-bg); }
|
|
.btn-disabled-style { background: #F1F5F9; color: var(--text-dim); border-color: #E2E8F0; cursor: not-allowed; }
|
|
|
|
.scan-list-card {
|
|
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 16px;
|
|
display: flex; flex-direction: column; gap: 10px; flex: 1; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
|
|
}
|
|
.scan-header {
|
|
font-size: 13px; font-weight: 700; color: var(--text-sub); display: flex; align-items: center; justify-content: space-between;
|
|
}
|
|
.scan-status-tag { font-size: 11px; color: var(--color-primary); font-weight: 600; }
|
|
|
|
.scan-item {
|
|
height: 44px; padding: 0 12px; border-radius: 8px; background: #F8FAFC; border: 1px solid var(--divider);
|
|
display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: all 0.15s ease;
|
|
}
|
|
.scan-item:hover { border-color: var(--color-primary); background: var(--color-primary-light); }
|
|
.scan-item.highlight { border-color: var(--color-primary); background: var(--color-primary-light); }
|
|
.scan-name { font-size: 13.5px; font-weight: 700; font-family: ui-monospace, monospace; }
|
|
.rssi-bars { display: flex; gap: 2px; align-items: flex-end; height: 12px; }
|
|
.rssi-bar { width: 3px; background: #CBD5E1; border-radius: 1px; }
|
|
.rssi-bar.active { background: var(--color-primary); }
|
|
|
|
/* =========================================================================
|
|
中栏:开始 (倒计时控制中心)
|
|
========================================================================= */
|
|
.center-timer-panel {
|
|
padding: 24px; align-items: center; text-align: center;
|
|
}
|
|
.panel-top-row { width: 100%; text-align: left; }
|
|
|
|
.timer-core-area {
|
|
display: flex; flex-direction: column; align-items: center; width: 100%;
|
|
}
|
|
|
|
.countdown-hero {
|
|
font-size: clamp(54px, 6.5vw, 80px); font-weight: 900; font-family: "SF Pro Display", ui-monospace, monospace;
|
|
color: var(--text-main); letter-spacing: -0.03em; margin: 12px 0 8px; transition: color 0.2s ease;
|
|
}
|
|
.countdown-hero.dim-state { color: var(--text-dim); }
|
|
|
|
.wheel-picker-box {
|
|
width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 12px 0; position: relative;
|
|
mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
|
|
-webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
|
|
}
|
|
.wheel-item {
|
|
height: 36px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600;
|
|
color: var(--text-dim); transition: all 0.2s ease; cursor: pointer; border-radius: 8px;
|
|
}
|
|
.wheel-item:hover { color: var(--text-main); }
|
|
.wheel-item.selected {
|
|
font-size: 18px; font-weight: 800; color: var(--color-primary); background: var(--color-primary-light);
|
|
border: 1px solid var(--color-primary-border);
|
|
}
|
|
|
|
.timer-actions-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
|
|
.btn-ctrl {
|
|
height: 46px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
|
|
display: flex; align-items: center; justify-content: center; gap: 8px; border: none; transition: all 0.15s ease;
|
|
}
|
|
.btn-start { background: var(--color-primary-gradient); color: white; box-shadow: 0 4px 12px var(--color-primary-glow); }
|
|
.btn-start:hover { transform: translateY(-1px); }
|
|
.btn-pause { background: var(--color-danger-gradient); color: white; box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25); }
|
|
.btn-pause:hover { transform: translateY(-1px); }
|
|
|
|
/* =========================================================================
|
|
右栏:设备信息 (模式与参数配置)
|
|
========================================================================= */
|
|
.right-config-panel { padding: 22px; }
|
|
|
|
.right-top-section { display: flex; flex-direction: column; gap: 14px; }
|
|
|
|
.mode-segmented-capsule {
|
|
display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #F1F5F9; border-radius: 10px; padding: 4px;
|
|
}
|
|
.mode-cap-btn {
|
|
height: 36px; border-radius: 8px; border: none; font-size: 13.5px; font-weight: 700; cursor: pointer;
|
|
display: flex; align-items: center; justify-content: center; color: var(--text-sub); background: transparent;
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
.mode-cap-btn.active-blue {
|
|
background: white; color: var(--color-primary); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
|
|
}
|
|
.mode-cap-btn.active-red {
|
|
background: white; color: var(--color-danger); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
|
|
}
|
|
|
|
.dual-wheel-matrix {
|
|
display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px;
|
|
}
|
|
.wheel-col {
|
|
background: #F8FAFC; border: 1px solid var(--divider); border-radius: 10px; padding: 8px 4px;
|
|
display: flex; flex-direction: column; gap: 2px;
|
|
}
|
|
.col-header { font-size: 12px; font-weight: 700; color: var(--text-sub); text-align: center; margin-bottom: 4px; }
|
|
.matrix-item {
|
|
height: 32px; font-size: 13.5px; font-weight: 600; color: var(--text-dim); display: flex; align-items: center;
|
|
justify-content: center; border-radius: 6px; cursor: pointer; transition: all 0.15s ease;
|
|
}
|
|
.matrix-item:hover { color: var(--text-main); }
|
|
.matrix-item.selected {
|
|
background: var(--color-primary-light); color: var(--color-primary); font-weight: 800;
|
|
border: 1px solid var(--color-primary-border);
|
|
}
|
|
|
|
.strength-box { display: flex; flex-direction: column; gap: 8px; }
|
|
.strength-header-row {
|
|
display: flex; justify-content: space-between; align-items: center;
|
|
}
|
|
.strength-title { font-size: 13px; font-weight: 700; color: var(--text-sub); }
|
|
.strength-current-tag {
|
|
font-size: 12px; font-weight: 800; color: var(--color-primary); background: var(--color-primary-light);
|
|
border: 1px solid var(--color-primary-border); padding: 2px 8px; border-radius: 6px;
|
|
}
|
|
.strength-grid {
|
|
display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%;
|
|
}
|
|
.strength-btn {
|
|
height: 38px; min-width: 0; border-radius: 8px; border: 1.5px solid var(--divider); background: #F8FAFC;
|
|
font-size: 14px; font-weight: 800; color: var(--text-main); cursor: pointer; display: flex; align-items: center;
|
|
justify-content: center; transition: all 0.15s ease;
|
|
}
|
|
.strength-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: white; }
|
|
.strength-btn.active {
|
|
background: var(--color-primary); color: white; border-color: var(--color-primary);
|
|
box-shadow: 0 4px 10px var(--color-primary-glow);
|
|
}
|
|
|
|
.btn-save-full {
|
|
width: 100%; height: 44px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
|
|
background: var(--color-primary-gradient); color: white; border: none; box-shadow: 0 4px 12px var(--color-primary-glow);
|
|
display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.15s ease;
|
|
}
|
|
.btn-save-full:hover { transform: translateY(-1px); }
|
|
|
|
/* 禁用与弱化保护态 */
|
|
.disabled-panel-state {
|
|
opacity: 0.75; pointer-events: none;
|
|
}
|
|
|
|
/* Toast 提示浮窗 */
|
|
.toast-popup {
|
|
position: absolute; top: 72px; left: 50%; transform: translateX(-50%) translateY(-20px);
|
|
background: #0F172A; color: white; padding: 10px 20px; border-radius: 100px; font-size: 13.5px;
|
|
font-weight: 600; opacity: 0; pointer-events: none; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); z-index: 1000;
|
|
}
|
|
.toast-popup.show {
|
|
transform: translateX(-50%) translateY(0); opacity: 1;
|
|
}
|