/* 泵站监控仿真演示（demo.html） */
.demo{background:#07131c;color:#dbe6ea;padding-top:48px;padding-bottom:70px}
.demo h2{font-size:16px;letter-spacing:1px;color:#9fb4be;font-weight:500;margin:0 0 14px}
.demo .notice{background:#0b212c;color:#8ea2ae;border:1px solid #ffffff14}
.dm-top{display:flex;flex-wrap:wrap;align-items:center;gap:14px 22px;margin-bottom:20px}
.dm-badge{display:flex;align-items:center;gap:10px;font-size:13px;color:#9fb4be;margin-right:auto}
.dm-live{width:9px;height:9px;border-radius:50%;background:#86e0d1;animation:dm-live 1.8s ease-out infinite}
@keyframes dm-live{0%{box-shadow:0 0 0 0 #86e0d199}100%{box-shadow:0 0 0 10px #86e0d100}}
.dm-clock{font-size:13px;color:#9fb4be}
.dm-clock b{font:600 18px Arial,sans-serif;color:#86e0d1;margin-left:6px;font-variant-numeric:tabular-nums}
.dm-seg{display:inline-flex;border:1px solid #ffffff2b;border-radius:8px;overflow:hidden}
.dm-seg button{font:inherit;font-size:14px;cursor:pointer;background:transparent;color:#b8c9d1;border:0;padding:7px 16px;transition:background .2s,color .2s}
.dm-seg button+button{border-left:1px solid #ffffff2b}
.dm-seg button:hover{color:#fff}
.dm-seg button[aria-pressed=true]{background:#86e0d1;color:#07242a;font-weight:600}
.dm-btn{font:inherit;font-size:14px;cursor:pointer;border-radius:8px;border:1px solid #86e0d1;background:#86e0d1;color:#07242a;padding:7px 16px;min-width:72px;transition:background .2s,opacity .2s,border-color .2s,color .2s}
.dm-btn:hover{background:#b1eee3}
.dm-btn:disabled{opacity:.35;cursor:not-allowed}
.dm-btn.ghost{background:transparent;color:#b8c9d1;border-color:#ffffff2b}
.dm-btn.ghost:hover{color:#fff;border-color:#ffffff66}
.dm-btn.warn{background:transparent;color:#ffd36e;border-color:#ffd36e66;margin-left:8px}
.dm-btn.warn:hover{border-color:#ffd36e}
.dm-btn.warn[aria-pressed=true]{background:#ff8f8f;border-color:#ff8f8f;color:#3b0d0d}
.demo button:focus-visible,.demo input:focus-visible{outline:3px solid #86e0d1;outline-offset:3px}
.dm-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);gap:18px;margin-bottom:18px}
.dm-grid-2{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}
.dm-card{background:#0b212c;border:1px solid #ffffff14;border-radius:12px;padding:20px 22px;min-width:0}
.dm-svg{display:block;width:100%;height:auto}
.dm-flow{stroke-dasharray:10 9;opacity:.12}
.dm-flow.on{opacity:1;animation:dm-dash .7s linear infinite}
@keyframes dm-dash{to{stroke-dashoffset:-19}}
.dm-pump .dm-body{fill:#06141c;stroke:#6f8a96;stroke-width:2}
.dm-pump .dm-rotor{fill:#6f8a96;transform-box:fill-box;transform-origin:center}
.dm-pump .dm-state{fill:#8ea2ae}
.dm-pump.run .dm-body{stroke:#86e0d1}
.dm-pump.run .dm-rotor{fill:#86e0d1;animation:dm-spin 1.1s linear infinite}
.dm-pump.run .dm-state{fill:#86e0d1}
.dm-pump.fault .dm-body{stroke:#ff8f8f;animation:dm-blink 1s steps(2) infinite}
.dm-pump.fault .dm-rotor{fill:#ff8f8f}
.dm-pump.fault .dm-state{fill:#ff8f8f}
@keyframes dm-spin{to{transform:rotate(360deg)}}
@keyframes dm-blink{50%{stroke-opacity:.25}}
.dm-latest{margin:12px 0 0;padding-top:12px;border-top:1px solid #ffffff14;font-size:13px;color:#9fb4be;min-height:22px}
.dm-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #ffffff14;font-size:15px}
.dm-row em{font-style:normal;font-size:12px;margin-left:8px;padding:2px 10px;border-radius:99px;background:#ffffff14;color:#9fb4be}
.dm-row em.run{background:#86e0d133;color:#86e0d1}
.dm-row em.fault{background:#ff8f8f33;color:#ff8f8f}
.dm-slider{display:block;padding:14px 0 4px;font-size:14px}
.dm-slider span{display:flex;justify-content:space-between;color:#b8c9d1;margin-bottom:6px}
.dm-slider output{color:#86e0d1;font-variant-numeric:tabular-nums}
.dm-slider input{width:100%;accent-color:#86e0d1;cursor:pointer}
.dm-hint{margin:14px 0 0;font-size:12px;line-height:1.8;color:#7f98a4}
.dm-tiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:18px}
.dm-tiles>div{background:#0b212c;border:1px solid #ffffff14;border-radius:12px;padding:14px 16px}
.dm-tiles small{display:block;font-size:12px;color:#8ea2ae}
.dm-tiles b{display:block;font:600 21px/1.5 Arial,"Microsoft YaHei",sans-serif;color:#86e0d1;white-space:nowrap;font-variant-numeric:tabular-nums}
.dm-tiles b.bad{color:#ff8f8f}
.dm-trend{display:block;width:100%;height:200px}
.dm-legend{display:flex;flex-wrap:wrap;gap:6px 18px;margin:10px 0 0;font-size:12px;color:#8ea2ae}
.dm-legend span:before{content:'';display:inline-block;width:16px;height:0;border-top:2px solid #86e0d1;margin-right:6px;vertical-align:middle}
.dm-legend .lg-start:before{border-top:2px dashed #ffd36e}
.dm-legend .lg-stop:before{border-top:2px dashed #86e0d1}
.dm-legend .lg-run:before{height:8px;border:0;background:linear-gradient(90deg,#86e0d1 50%,#78beff 50%)}
.dm-alarm-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.dm-alarms{list-style:none;margin:0;padding:0;max-height:236px;overflow-y:auto;font-size:13px}
.dm-alarms li{display:grid;grid-template-columns:48px 44px 1fr;gap:8px;align-items:baseline;padding:7px 0;border-bottom:1px solid #ffffff0f}
.dm-alarms li.empty{display:block;color:#7f98a4}
.dm-alarms time{color:#7f98a4;font-variant-numeric:tabular-nums}
.dm-alarms span{font-size:11px;text-align:center;border-radius:4px;padding:1px 0;background:#ffffff14;color:#9fb4be}
.dm-alarms p{margin:0;color:#c8d6dc}
.dm-alarms .alarm span{background:#ff8f8f33;color:#ff8f8f}
.dm-alarms .ok span{background:#86e0d133;color:#86e0d1}
.dm-alarms .unack p{color:#ffb4b4;font-weight:600}
.demo-hero:after{content:'';position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,transparent,#86e0d1,transparent);opacity:.7}
@media(max-width:1000px){.dm-grid,.dm-grid-2{grid-template-columns:1fr}.dm-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.dm-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.dm-tiles b{font-size:18px}.dm-card{padding:16px}.dm-process{overflow-x:auto}.dm-svg{min-width:560px}.dm-row{flex-wrap:wrap}.dm-badge{margin-right:0;width:100%}}
@media(prefers-reduced-motion:reduce){.dm-flow.on,.dm-pump.run .dm-rotor,.dm-pump.fault .dm-body,.dm-live{animation:none}}

/* 报警列表填满卡片高度（列表绝对定位，不撑高行），深色滚动条 */
.dm-alarm-card{display:flex;flex-direction:column}
.dm-alarm-box{position:relative;flex:1;min-height:236px;margin-top:6px}
.dm-alarm-box .dm-alarms{position:absolute;inset:0;max-height:none;scrollbar-width:thin;scrollbar-color:#3a5563 transparent}
.dm-alarms::-webkit-scrollbar{width:8px}.dm-alarms::-webkit-scrollbar-thumb{background:#3a5563;border-radius:4px}.dm-alarms::-webkit-scrollbar-track{background:transparent}
