584 lines
16 KiB
CSS
584 lines
16 KiB
CSS
.control-page {
|
|
background: #f2f0e9;
|
|
min-height: 100vh;
|
|
padding-bottom: 40px;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.control-page .top-nav {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 50;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 14px 16px;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(10px);
|
|
border-bottom: 1px solid rgba(18, 63, 55, 0.08);
|
|
}
|
|
|
|
.control-page .back-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
border: 0;
|
|
background: transparent;
|
|
color: #0c5045;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.control-page .top-nav h2 {
|
|
margin: 0;
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
color: #153e37;
|
|
}
|
|
|
|
.control-page .refresh-btn {
|
|
border: 0;
|
|
background: transparent;
|
|
color: #0c5045;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.control-page .refresh-btn:disabled,
|
|
.control-page .text-refresh:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.control-page .control-content {
|
|
padding: 14px;
|
|
}
|
|
|
|
/* 汇总卡片 */
|
|
.control-page .summary-box {
|
|
background: linear-gradient(135deg, #0c5045, #14443c);
|
|
color: #fff;
|
|
border-radius: 20px;
|
|
padding: 16px;
|
|
margin-bottom: 14px;
|
|
box-shadow: 0 6px 20px rgba(12, 80, 69, 0.12);
|
|
}
|
|
|
|
.control-page .summary-info {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
padding-bottom: 14px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
|
|
}
|
|
|
|
.control-page .stat-item {
|
|
text-align: center;
|
|
}
|
|
|
|
.control-page .stat-item .num {
|
|
display: block;
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
font-family: serif;
|
|
}
|
|
|
|
.control-page .stat-item .num.online {
|
|
color: #92eec4;
|
|
}
|
|
|
|
.control-page .stat-item .label {
|
|
font-size: 11px;
|
|
color: rgba(255, 255, 255, 0.75);
|
|
}
|
|
|
|
.control-page .scene-actions-grid {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin-top: 14px;
|
|
}
|
|
|
|
.control-page .scene-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 10px 14px;
|
|
border-radius: 12px;
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
cursor: pointer;
|
|
text-align: left;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.control-page .scene-btn:disabled {
|
|
opacity: 0.62;
|
|
cursor: wait;
|
|
}
|
|
|
|
.control-page .sleep-btn {
|
|
background: rgba(214, 166, 87, 0.2);
|
|
color: #fff;
|
|
}
|
|
|
|
.control-page .sleep-btn:active {
|
|
background: rgba(214, 166, 87, 0.35);
|
|
}
|
|
|
|
.control-page .off-btn {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
color: rgba(255, 255, 255, 0.85);
|
|
}
|
|
|
|
.control-page .s-icon {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.control-page .s-text strong {
|
|
display: block;
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.control-page .s-text small {
|
|
display: block;
|
|
font-size: 11px;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.control-page .operation-status {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
min-height: 38px;
|
|
padding: 9px 12px;
|
|
margin: -4px 2px 14px;
|
|
border: 1px solid rgba(12, 80, 69, 0.12);
|
|
border-radius: 12px;
|
|
background: rgba(255, 255, 255, 0.72);
|
|
color: #536a62;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.control-page .operation-status.success {
|
|
border-color: rgba(12, 80, 69, 0.22);
|
|
background: #f0f8f5;
|
|
color: #0c5045;
|
|
}
|
|
|
|
.control-page .operation-status.fail {
|
|
border-color: rgba(176, 72, 56, 0.24);
|
|
background: #fff4f1;
|
|
color: #9f3f32;
|
|
}
|
|
|
|
.control-page .operation-message {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-width: 0;
|
|
gap: 7px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.control-page .operation-status small {
|
|
flex: none;
|
|
color: #86968f;
|
|
font-size: 10px;
|
|
}
|
|
|
|
.control-page .operation-result {
|
|
display: inline-grid;
|
|
place-items: center;
|
|
width: 17px;
|
|
height: 17px;
|
|
border-radius: 50%;
|
|
background: currentColor;
|
|
color: #fff;
|
|
font-size: 11px;
|
|
font-style: normal;
|
|
}
|
|
|
|
.control-page .operation-spinner {
|
|
width: 15px;
|
|
height: 15px;
|
|
border: 2px solid rgba(12, 80, 69, 0.18);
|
|
border-top-color: #0c5045;
|
|
border-radius: 50%;
|
|
animation: operation-spin 0.75s linear infinite;
|
|
}
|
|
|
|
@keyframes operation-spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* 设备卡片 */
|
|
.control-page .device-card {
|
|
background: #ffffff;
|
|
border-radius: 20px;
|
|
padding: 16px;
|
|
margin-bottom: 14px;
|
|
border: 1px solid rgba(18, 63, 55, 0.06);
|
|
box-shadow: 0 4px 16px rgba(18, 63, 55, 0.04);
|
|
}
|
|
|
|
.control-page .device-head {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 14px;
|
|
padding-bottom: 12px;
|
|
border-bottom: 1px solid rgba(18, 63, 55, 0.06);
|
|
}
|
|
|
|
.control-page .speaker-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.control-page .category-tag {
|
|
font-size: 10px;
|
|
color: #0c5045;
|
|
background: #eef6f3;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.control-page .dev-info h3 {
|
|
margin: 4px 0 2px;
|
|
font-size: 15px;
|
|
color: #173d36;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.control-page .status-dot {
|
|
font-size: 11px;
|
|
color: #8c9e97;
|
|
}
|
|
|
|
.control-page .status-dot.online {
|
|
color: #0c5045;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.control-page .text-refresh {
|
|
border: 0;
|
|
background: transparent;
|
|
color: #0c5045;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.control-page .params-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 18px;
|
|
}
|
|
|
|
.control-page .param-row {
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
}
|
|
|
|
.control-page .param-row.inline-row {
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.control-page .param-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.control-page .p-title {
|
|
font-size: 13px;
|
|
color: #556c64;
|
|
font-weight: 600;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.control-page .p-val {
|
|
font-size: 14px;
|
|
color: #0c5045;
|
|
font-weight: 700;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.control-page .p-tip {
|
|
font-size: 11px;
|
|
color: #8fa099;
|
|
}
|
|
|
|
.control-page .mattress-mode-note {
|
|
margin: 0;
|
|
padding: 9px 11px;
|
|
border-radius: 9px;
|
|
background: #fff7e8;
|
|
color: #8a6428;
|
|
font-size: 11px;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.control-page .mattress-recommendation {
|
|
padding: 12px;
|
|
border: 1px solid #cde3dc;
|
|
border-radius: 12px;
|
|
background: #f3faf7;
|
|
color: #174d40;
|
|
font-size: 12px;
|
|
line-height: 1.55;
|
|
}
|
|
.control-page .mattress-recommendation strong { font-size: 13px; }
|
|
.control-page .mattress-recommendation p { margin: 7px 0 0; }
|
|
.control-page .mattress-recommendation small { display: block; margin-top: 6px; color: #6a8479; }
|
|
.control-page .mattress-advanced { border-top: 1px solid #e8efea; padding-top: 12px; }
|
|
.control-page .mattress-advanced summary { cursor: pointer; color: #0c5045; font-weight: 700; font-size: 14px; }
|
|
.control-page .mattress-advanced .mattress-mode-note { margin: 12px 0; }
|
|
.control-page .mattress-select-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf1ee; }
|
|
.control-page .mattress-select-row label { color: #556c64; font-size: 12px; }
|
|
.control-page .mattress-select-row select { width: 48%; min-height: 36px; border: 1px solid #d9e6de; border-radius: 9px; background: #fff; padding: 5px 8px; color: #174d40; font-size: 12px; }
|
|
|
|
.control-page .light-mode-panel {
|
|
padding: 12px;
|
|
border-radius: 12px;
|
|
background: #fff8ec;
|
|
border: 1px solid #f2e3c7;
|
|
}
|
|
|
|
.control-page .light-mode-panel strong,
|
|
.control-page .light-mode-panel small {
|
|
display: block;
|
|
}
|
|
|
|
.control-page .light-mode-panel strong {
|
|
color: #684b24;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.control-page .light-mode-panel small {
|
|
margin-top: 4px;
|
|
color: #8b7759;
|
|
font-size: 11px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.control-page .light-mode-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 11px;
|
|
}
|
|
|
|
.control-page .light-mode-actions button {
|
|
flex: 1;
|
|
padding: 8px 10px;
|
|
border: 1px solid #dab989;
|
|
border-radius: 9px;
|
|
background: #fff;
|
|
color: #795320;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.control-page .light-mode-actions button:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* 滑块样式:左右各预留 10px 间距,使滑块在 0% 和 100% 端点时,外凸的圆形按钮完整居中且不被裁剪 */
|
|
.control-page .param-row .van-slider {
|
|
margin: 10px 10px 14px 10px;
|
|
height: 4px;
|
|
border-radius: 2px;
|
|
background-color: #e6eae8;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.control-page .param-row .van-slider__bar {
|
|
height: 4px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.control-page .param-row .van-slider__button-wrapper {
|
|
z-index: 2;
|
|
}
|
|
|
|
.control-page .param-row .van-slider__button {
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
background-color: #ffffff;
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
|
|
border: 1px solid rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.control-page .slider-scale {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 10px;
|
|
color: #8d9e97;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
.control-page .btn-group {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.control-page .btn-group button {
|
|
flex: 1;
|
|
padding: 8px 4px;
|
|
background: #f7f6f2;
|
|
border: 1px solid rgba(18, 63, 55, 0.1);
|
|
border-radius: 8px;
|
|
font-size: 12px;
|
|
color: #4b5e57;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.control-page .btn-group button.active {
|
|
background: #0c5045;
|
|
color: #fff;
|
|
border-color: #0c5045;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.control-page .mattress-mode-buttons button.active:not(.running) {
|
|
background: #e4f1ec;
|
|
color: #0c5045;
|
|
border-color: #87b9a7;
|
|
}
|
|
|
|
.control-page .btn-group button:disabled,
|
|
.control-page .mini-toggle:disabled {
|
|
opacity: 0.55;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.control-page .mini-toggle {
|
|
padding: 6px 14px;
|
|
border-radius: 14px;
|
|
border: 1px solid rgba(18, 63, 55, 0.15);
|
|
background: #f4f3ef;
|
|
color: #6a7c76;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.control-page .mini-toggle.active {
|
|
background: #0c5045;
|
|
color: #fff;
|
|
border-color: #0c5045;
|
|
}
|
|
|
|
/* 传感器网格 */
|
|
.control-page .sensor-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 8px;
|
|
}
|
|
|
|
.control-page .sensor-box {
|
|
background: #f8f7f2;
|
|
border-radius: 12px;
|
|
padding: 10px 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.control-page .s-label {
|
|
display: block;
|
|
font-size: 11px;
|
|
color: #798a83;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.control-page .sensor-box strong {
|
|
font-size: 14px;
|
|
color: #173d36;
|
|
}
|
|
|
|
.control-page .sensor-box small {
|
|
font-size: 10px;
|
|
color: #8c9e97;
|
|
}
|
|
|
|
.control-page .scale-note {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
color: #72847d;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.control-page .tcm-guide-button {
|
|
width: 100%;
|
|
margin-top: 10px;
|
|
border: 1px solid rgba(255, 255, 255, .35);
|
|
border-radius: 12px;
|
|
background: rgba(255, 255, 255, .12);
|
|
color: #fff;
|
|
min-height: 40px;
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
/* 总览只放简洁设备卡片;完整参数继续复用独立详情卡片。 */
|
|
.control-page .climate-readings { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
|
|
.control-page .device-mode-buttons { flex-wrap: wrap; margin-top: 10px; }
|
|
.control-page .device-mode-buttons button { min-height: 40px; min-width: 58px; }
|
|
.control-page .curtain-actions button { flex: 1; }
|
|
.control-page .top-nav h2 { min-width: 0; margin: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.control-page .back-btn, .control-page .refresh-btn { flex-shrink: 0; }
|
|
.control-page .device-list-heading { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 0; }
|
|
.control-page .device-list-heading h3 { margin: 0; color: #173d36; font-size: 18px; }
|
|
.control-page .device-list-heading > span { color: #86948b; font-size: 12px; }
|
|
.control-page .device-list-hint { margin: 7px 2px 14px; color: #84948b; font-size: 12px; line-height: 1.6; }
|
|
.control-page .device-room-tabs { display: flex; gap: 22px; overflow-x: auto; padding: 0 2px; margin-bottom: 14px; scrollbar-width: none; }
|
|
.control-page .device-room-tabs button { flex-shrink: 0; border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 8px 0; color: #8a978f; font-size: 14px; cursor: pointer; }
|
|
.control-page .device-room-tabs button.active { color: #0c5045; font-weight: 700; border-bottom-color: #0c5045; }
|
|
.control-page .device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
|
|
.control-page .device-overview-tile { position: relative; min-width: 0; background: #fff; border: 1px solid rgba(18, 63, 55, .06); border-radius: 20px; overflow: hidden; box-shadow: 0 3px 16px rgba(18, 63, 55, .025); }
|
|
.control-page .device-overview-tile.powered { border-color: #bfd7cb; }
|
|
.control-page .device-tile-open { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 230px; padding: 17px 14px 13px; border: 0; background: transparent; color: #31584a; text-align: left; cursor: pointer; }
|
|
.control-page .device-tile-category { width: calc(100% - 42px); font-size: 10px; color: #87968c; }
|
|
.control-page .device-glyph { width: 76px; height: 76px; margin: 13px 0 9px; flex-shrink: 0; }
|
|
.control-page .device-tile-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; width: 100%; min-height: 38px; line-height: 19px; font-size: 14px; font-weight: 700; color: #203d32; overflow-wrap: anywhere; }
|
|
.control-page .device-tile-status { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: #708279; font-size: 11px; line-height: 16px; }
|
|
.control-page .device-tile-status i { width: 5px; height: 5px; border-radius: 50%; background: #bcc4be; flex-shrink: 0; }
|
|
.control-page .device-tile-status i.online { background: #609b7f; }
|
|
.control-page .device-tile-metric { margin-top: 3px; color: #9aa59d; font-size: 10px; line-height: 16px; }
|
|
.control-page .device-tile-footer { display: flex; justify-content: space-between; align-items: center; gap: 4px; width: 100%; padding-top: 10px; margin-top: auto; color: #a0aaa2; font-size: 10px; line-height: 15px; }
|
|
.control-page .device-tile-footer > span { font-size: 18px; color: #738b7d; }
|
|
.control-page .device-tile-power { position: absolute; right: 11px; top: 12px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f0f2ed; color: #849187; cursor: pointer; }
|
|
.control-page .device-tile-power.on { background: #e3f0e8; color: #0c5045; }
|
|
.control-page .device-tile-power svg { width: 21px; height: 21px; }
|
|
.control-page .device-tile-power:disabled { opacity: .45; cursor: not-allowed; }
|
|
.control-page .device-overview-tile.offline .device-glyph { opacity: .45; }
|
|
.control-page .device-overview-tile.offline .device-tile-name { color: #8e9991; }
|
|
.control-page .device-tile-open:focus-visible, .control-page .device-tile-power:focus-visible, .control-page .device-room-tabs button:focus-visible { outline: 2px solid #649b82; outline-offset: -3px; }
|
|
.control-page .device-tile-skeleton { height: 252px; border-radius: 20px; background: #f9faf6; border: 1px solid rgba(18, 63, 55, .04); }
|
|
.control-page .device-empty-state { padding: 28px 20px; border-radius: 20px; background: #fff; text-align: center; color: #86968d; font-size: 13px; line-height: 1.7; }
|
|
.control-page .device-empty-state strong { display: block; color: #3f5e4d; font-size: 15px; }
|
|
.control-page .device-empty-state p { margin: 10px 0 16px; overflow-wrap: anywhere; }
|
|
.control-page .device-connection-note { padding: 11px 13px; margin-bottom: 14px; background: #fff5e5; border-radius: 12px; color: #a47b43; font-size: 12px; line-height: 1.6; }
|
|
.control-page .device-information { padding: 17px; border-radius: 20px; background: #fff; }
|
|
.control-page .device-information h3 { margin: 0 0 10px; font-size: 13px; color: #607a6b; }
|
|
.control-page .device-information p { display: flex; justify-content: space-between; gap: 16px; margin: 10px 0 0; font-size: 12px; color: #87968d; }
|
|
.control-page .device-information p span:last-child { color: #486657; text-align: right; overflow-wrap: anywhere; }
|
|
@media (max-width: 350px) {
|
|
.control-page .device-grid { gap: 8px; }
|
|
.control-page .device-tile-open { padding-left: 11px; padding-right: 11px; }
|
|
.control-page .device-tile-name { font-size: 13px; }
|
|
.control-page .operation-status { flex-wrap: wrap; }
|
|
}
|