/* 电力监控云平台 · 大屏样式
 * 数值全部取自原站 umi.1a12308a.css 里属于本屏（PlatSite16）的规则。
 * 设计稿：1920 x 1080 固定画布，整屏等比缩放到窗口（见 app.js fit()）。
 */
:root{
  --ink:#fff;
  --panel:#050f17;        /* 兜底色（canvas 回落到静态图时用） */
  /* 整页透明：底色由外部（父页面 / iframe 外层 / 截图背景）决定。
     如果单独打开想看效果，临时给 .stage 加个 background 即可。 */
  --bg:linear-gradient(160deg, #c6e3f7 0%, #a6d0ec 26%, #85b8dd 56%, #669fc7 82%, #4f88b0 100%);
  /* 文字保护层：背景透明后白字会看不清。底层是深色就设 0；
     底层不确定 / 偏浅，调到 .35 ~ .55。 */
  --scrim:0;    /* 已有深色底衬，不再需要额外的保护层 */
  /* 入场动画时长。0s = 关闭（左右栏不再从屏幕外滑进来）。
     想恢复「左栏从左、右栏从右滑入 + 回弹」的效果，改成 1s 即可。 */
  --enter:0s;

  --title-grad:linear-gradient(#fff,#9dc3eb);
  --tip-grad:linear-gradient(#fff,#a0edfc);
  --gold-grad:linear-gradient(#fff,#dcca88);
  --purple-grad:linear-gradient(#fff,#7162c1);
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--panel);overflow:hidden}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;-webkit-font-smoothing:antialiased}
ul{margin:0;padding:0;list-style:none}

/* ---------- 舞台：固定 1920x1080 画布 + 等比缩放 ---------- */
.stage{position:fixed;inset:0;background:var(--bg);overflow:hidden}
.pageMain{
  position:absolute;top:0;left:0;width:1920px;height:1080px;
  overflow:hidden;background-color:transparent;
  transform-origin:top left;
}
/* 实时渲染的地形（three.js）。WebGL 不可用时没有地形层，补一层深色底，
   否则中间 1/3 会露出亮蓝页面底色，看着像坏了。 */
.mapBg{
  position:absolute;inset:0;display:block;width:1920px;height:1080px;background:none;
}
.mapBg.is-fallback{
  background:radial-gradient(120% 95% at 50% 45%, #0d2a3b 0%, #071a27 58%, #04101a 100%);
}

/* ---------- 文字保护层 ---------- */
.scrim{
  position:absolute;inset:0;pointer-events:none;opacity:var(--scrim);
  background:
    linear-gradient(180deg, rgba(3,12,20,.92) 0%, rgba(3,12,20,.30) 9%, rgba(3,12,20,0) 20%),
    linear-gradient(0deg,  rgba(3,12,20,.92) 0%, rgba(3,12,20,.35) 11%, rgba(3,12,20,0) 24%),
    radial-gradient(120% 100% at 100% 50%, rgba(3,12,20,.72) 0%, rgba(3,12,20,.28) 26%, rgba(3,12,20,0) 48%);
}

/* ---------- 站点标记 ---------- */
.markers{position:absolute;inset:0;pointer-events:none}
.mk{position:absolute;transform:translate(-50%,-50%) scale(1.5);pointer-events:auto;cursor:pointer}.stationSwitchPanel{position:absolute;top:13%;left:50%;transform:translateX(-50%);z-index:40;width:52%;padding:18px 22px;background:rgba(8,20,38,.88);border:1px solid rgba(64,160,255,.45);border-radius:12px;box-shadow:0 0 24px rgba(40,120,255,.35);pointer-events:auto}
.stationSwitchPanel .sspTitle{color:#8fd3ff;font-size:20px;letter-spacing:2px;margin-bottom:14px;text-align:center}
.stationSwitchPanel .sspGrid{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.sspChip{cursor:pointer;padding:8px 16px;border-radius:8px;border:1px solid rgba(64,160,255,.5);background:rgba(30,70,130,.5);color:#dff1ff;font-size:16px}
.sspChip:hover{background:rgba(64,160,255,.6);box-shadow:0 0 12px rgba(64,160,255,.8)}
.sspClose{margin-top:0;text-align:center;color:#6fb6ff;cursor:pointer;font-size:15px;letter-spacing:2px}
.sspClose:hover{color:#a9d7ff}
.sspFooter{display:flex;justify-content:center;align-items:center;gap:22px;margin-top:14px}
/* 大屏 → 管理面板（主页）的入口 */
.sspHome{padding:6px 18px;border-radius:8px;border:1px solid rgba(64,160,255,.5);background:rgba(30,70,130,.5);color:#dff1ff;font-size:15px;letter-spacing:2px;text-decoration:none}
.sspHome:hover{background:rgba(64,160,255,.6);box-shadow:0 0 12px rgba(64,160,255,.8)}
/* 地图绿点真实可点（容器是 none，子元素恢复命中） */
.mk{pointer-events:auto;cursor:pointer}
.mk .core{
  position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;
  background:radial-gradient(circle,#eafff6 0 25%,#38e39a 30% 100%);
  box-shadow:0 0 10px #38e39a,0 0 22px rgba(56,227,154,.65);
}
.mk .ring{
  position:absolute;left:50%;top:50%;width:50px;height:50px;margin:-25px 0 0 -25px;border-radius:50%;
  border:1.5px solid rgba(86,240,178,.85);
  /* 延迟必须用自定义属性：直接写 animation-delay 在父元素 .mk 上不会传给这里的动画 */
  animation:mkPulse 2.6s ease-out infinite;
  animation-delay:var(--mkd,0s);
}
@keyframes mkPulse{
  0%{transform:scale(.35);opacity:.95}
  70%{transform:scale(1.25);opacity:0}
  100%{transform:scale(1.25);opacity:0}
}
.mk .lb{
  position:absolute;left:24px;top:-13px;white-space:nowrap;font-size:18px;font-weight:600;color:#dcefff;
  padding:3px 10px;border-radius:4px;background:rgba(4,15,24,.85);
  text-shadow:0 1px 3px rgba(0,0,0,.95);
}
.mk .lb.lbLeft{left:auto;right:20px;text-align:right}
/* 原站 pageMain 的两块侧板背景：左右各 30% 宽、100% 高 */
/* 左右侧板。原版的 mainLeftBg/mainRightBg 是半透明的（平均 alpha 约 0.3），
   原本压在深色地图上透出蓝调；这里预合成成不透明版本，合成底色是**按原版面板
   实测亮度反解、再压暗约 23% 得到的**（右 rgb(16,50,70) / 左 rgb(14,46,62)）——
   完全照原版亮度会让「发生时间」等 4 处文字对比度掉到 3.0 以下。
   原始半透明素材留在 source/panel-*.png，想换底色可以重新合成。
   最下面那层 linear-gradient 是补的底衬，盖住右栏左边那条 44px 的缝。 */
.panelBg{
  position:absolute;inset:0;pointer-events:none;
  /* 第三层是补的底衬：右侧面板图只盖 x>=1344，而右栏内容从 x=1300 起，
     中间 44px 原来直接露出地图（白色省界线压在告警列表文字下，对比度低到 1.00）。
     底色和面板预合成时用的 rgb(21,65,91) 完全一致，所以 1344 处看不出接缝。
     ⚠️ 改面板的合成底色时，这里必须同步改，否则会露出接缝。 */
  background-image:
    url("img/mainRightBg.png"),
    url("img/mainLeftBg.png"),
    linear-gradient(90deg,
      rgba(4,15,24,0) 0%, rgba(4,15,24,0) 67.7%,
      rgba(4,15,24,.55) 67.7%, rgba(4,15,24,.55) 100%);
  background-position:right top,left top,left top;
  background-size:30% 100%,30% 100%,100% 100%;
  background-repeat:no-repeat,no-repeat,no-repeat;
}

/* ---------- 顶栏 ---------- */
.headerWrap{
  position:absolute;left:0;top:0;height:7.96%;width:100%;
  display:flex;justify-content:space-between;
  /* 顶栏文字直接压在背景上，浅色底会看不清 -> 加深色渐隐带 */
  background:linear-gradient(180deg, rgba(4,15,24,.92) 0%, rgba(4,15,24,.62) 55%, rgba(4,15,24,0) 100%);
  animation:topMove var(--enter) cubic-bezier(.5,0,.5,1) 4.3s forwards;
}
@keyframes topMove{0%{top:-86px}to{top:0}}
.headerBtn{width:10.6%;height:81.39%;background-size:contain;background-repeat:no-repeat}
.toggleStationBtn{background-image:url("img/headLeftBtnBg.png");background-size:100% 100%;cursor:pointer}
.toggleStationBtn .iconText{
  display:inline-block;margin:10px auto auto 28px;height:34px;line-height:34px;
  font-size:18px;color:#fff;padding-left:36px;
  background:url("img/stationIcon.png") 0 0 no-repeat;
}
.backBtn{position:relative;cursor:pointer;background-image:url("img/headRightBtnBg.png");background-size:100% 100%}
.backBtn:before{
  position:absolute;top:0;left:0;content:"";width:100%;height:100%;
  background:url("img/backBtn.png") center 25%/38px 28px no-repeat;
}
.hdrText{width:18.2%;display:flex;align-items:center}
.headerWrap .title{width:29.6%;height:100%;background:url("img/headTitle.png") 0 0/100% 100% no-repeat}
.headerWrap .title h3{
  margin:0;line-height:86px;font-size:30px;font-weight:700;text-align:center;
  background-image:var(--title-grad);-webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;
}
.serviceTime{height:44px;line-height:44px;font-weight:700;width:100%}
.serviceTime .tip{font-size:18px;background-image:var(--tip-grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.serviceTime .dayCount{padding:0 12px;font-size:25px;color:#5efec0;-webkit-text-fill-color:#5efec0}
.weatherTime{display:flex;align-items:center;height:38px;justify-content:flex-end;width:100%}
.weatherTime .time{line-height:20px;font-size:20px;color:#e8fffd;font-variant-numeric:tabular-nums}

/* ---------- 左右栏容器 ---------- */
.leftWrap,.rightWrap{position:absolute;top:8.3%;display:flex;flex-direction:column;justify-content:space-between}
/* 高度必须让 top(8.3%) + height <= 底栏顶边(85.6%)，否则底部卡片会压进底栏 */
/* 入场动画的时长走 --enter（默认 0s = 关）。
   开着时左栏从 left:-30% 滑到 1.56%、右栏从 right:-30% 滑到 1.56%，
   中间还有 3% → -1% → 2% 的过冲回弹 —— 也就是「左右两栏带着数据往中间一跳一跳」。 */
.leftWrap{left:1.56%;width:26.56%;height:77%;animation:leftMove var(--enter) cubic-bezier(.5,0,.5,1) 4.3s forwards}
.rightWrap{right:1.56%;width:30.72%;height:77%;align-items:flex-end;animation:rightMove var(--enter) cubic-bezier(.5,0,.5,1) 4.3s forwards}
@keyframes leftMove{0%{left:-30%}50%{left:3%}70%{left:-1%}90%{left:2%}to{left:1.56%}}
@keyframes rightMove{0%{right:-30%}50%{right:3%}70%{right:-1%}90%{right:2%}to{right:1.56%}}

.commonWrap{padding:5px 0;display:flex;flex-direction:column;overflow:hidden}
.commonTitle{
  box-sizing:border-box;padding-left:18px;padding-top:3px;line-height:25px;height:32px;
  width:100%;margin:0;font-size:16px;color:#fff;font-weight:700;flex:0 0 auto;
  background:url("img/titleBg.png") 0 0/100% 100% no-repeat;
}
.commonMain{flex:1 1 auto;min-height:0;overflow:hidden;position:relative}
.leftOne{height:19%;width:84.7%}
.leftTwo{width:84.7%;height:35%}
.leftThree{height:21.62%;width:84.7%}
.leftFour{height:29.4%;width:100%}
.rightOne{width:67.7%;height:35.3%}
.rightThree{width:67.7%;height:20.2%}
.rightFour{height:20.2%;width:67.7%}
.rightFive{height:28%;width:100%}

/* ---------- 信息概览 ---------- */
.oneWrap{display:flex;height:100%}
.infoItem{flex:1;display:flex;flex-direction:column;justify-content:space-around;align-items:center;min-width:0}
.infoItem .ico{width:69px;height:65px;background-image:url("img/icons.png");background-size:490px 95px;background-repeat:no-repeat}
.infoItem .title{width:auto;height:auto;background:none;font-size:15px;line-height:16px;font-weight:400}
.infoItem .val{height:30px;line-height:30px;font-size:29px;color:#fff;font-variant-numeric:tabular-nums}
.tone-gold .title{color:#f7c948}
.tone-green .title{color:#45e0b0}
.tone-blue .title{color:#cfe3f2}

/* ---------- 站点信息表格 ---------- */
.tableWrap{width:100%;height:100%;display:flex;flex-direction:column}
.tableTitle{
  display:flex;height:26px;line-height:26px;font-size:14px;color:#50cefb;
  text-shadow:0 0 4px #50cefb;position:relative;padding-bottom:24px;flex:0 0 auto;
  box-sizing:content-box;
}
.tableTitle span,.tableRow span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tableTitle:before,.tableTitle:after{content:"";position:absolute;bottom:-2px;width:4px;height:4px;background-color:#d1d1d1}
.tableTitle:before{left:7px}
.tableTitle:after{right:7px}
.divider{margin:0 26px;height:1px;background-color:#d1d1d1;position:relative;flex:0 0 auto}
.divider:before,.divider:after{content:"";position:absolute;top:-3px;width:12px;height:7px;background-color:#d1d1d1;border-radius:2px}
.divider:before{left:-12px}
.divider:after{right:-12px}
.tableBody{flex:1 1 auto;min-height:0;overflow:hidden;position:relative}
.tableBody ul{will-change:transform}
.tableRow{display:flex;height:24px;line-height:24px;font-size:13px;color:#c5d2de}
.tableRow.shadowBg{background-color:hsla(0,0%,100%,.1)}
.tableRow .load{color:#f0a83c}
.tableTitle .c1,.tableRow .c1{flex:0 0 34%}
.tableTitle .c2,.tableRow .c2{flex:0 0 22%}
.tableTitle .c3,.tableRow .c3{flex:0 0 24%}
.tableTitle .c4,.tableRow .c4{flex:0 0 20%}

/* ---------- 排名 ---------- */
.bottomWrap{display:flex;height:100%;justify-content:space-between}
.rankWrap{width:46%;display:flex;flex-direction:column;overflow:hidden}
.rankList{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;justify-content:space-around}
.rankItem{display:flex;flex-direction:column;justify-content:center;min-height:0}
.rankItem .title{height:14px;line-height:14px;font-size:12px;color:#cce0f7;display:flex;justify-content:space-between;gap:6px}
.rankItem .title .name{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rankItem .title .value{flex:0 0 auto;color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap}
.rankItem .title .value .unit{font-size:12px;margin:0 4px}
.rankItem .progress{position:relative;height:3px;margin:8px 0;width:100%;background-color:#303e3f;line-height:0}
.rankItem .progress .percent{position:absolute;display:inline-block;height:3px;left:0;border-radius:2px}
.rankItem .progress .point{position:absolute;height:20px;width:20px;border-radius:10px;top:-8px;margin-left:-10px}

/* ---------- 图表 ---------- */
.chart{display:block;width:100%;height:100%}

/* ---------- 本月任务占比 ---------- */
.middleWrap{height:100%;overflow:hidden;display:flex}
.task,.defect{width:50%;min-width:0}
.task{display:flex;flex-direction:column}
.task .top{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;align-items:center;height:60%;
  background:url("img/taskBg.png") 0 100%/100% 30% no-repeat;position:relative}
.task .top .countText{margin:0 0 7px;line-height:1}
.task .top .countText .count{height:46px;line-height:46px;font-size:45px;color:#fff;font-variant-numeric:tabular-nums}
.task .top .countText .unit{font-size:20px;color:#fff}
.task .top .tip{font-size:13px;color:#fff}
.task .top .halo{position:absolute;left:6%;bottom:6%;width:88%;height:22%;border-radius:50%;
  background:radial-gradient(closest-side,rgba(90,190,255,.5),rgba(90,190,255,0));pointer-events:none}
.task .bottom{flex:0 0 auto;height:70px}
.task .bottom .item{margin-top:8px;border-left:2px solid #3fa6eb;padding-left:14px;height:27px;line-height:27px;
  font-size:12px;color:#fff;background:linear-gradient(90deg,rgba(63,166,235,.4),rgba(37,99,146,0))}
.defect{display:flex;flex-direction:column}
.defect .chart{flex:1 1 auto;min-height:0}
.defect .legend{flex:0 0 auto;height:34px;display:flex;align-items:center;justify-content:center;gap:18px;font-size:12px;color:#fff;white-space:nowrap}
.defect .legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:-1px}

/* ---------- 最新告警列表 ---------- */
.alarmWrap{width:100%;height:100%;display:flex;flex-direction:column}
.alarmHead{display:flex;height:24px;line-height:24px;font-size:13px;color:#50cefb;text-shadow:0 0 4px #50cefb;flex:0 0 auto}
.alarmBody{flex:1 1 auto;min-height:0;overflow:hidden;position:relative}
.alarmBody ul{will-change:transform}
.alarmRow{display:flex;height:25px;line-height:25px;font-size:12px;color:#c5d2de}
.alarmRow.shadowBg{background-color:hsla(0,0%,100%,.1)}
.alarmHead span,.alarmRow span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:6px}
.alarmRow .lv{color:#ff6b6b}
.alarmRow .st{color:#4fd6c0}
.alarmHead .a1,.alarmRow .a1{flex:0 0 17%}
.alarmHead .a2,.alarmRow .a2{flex:0 0 23%}
.alarmHead .a3,.alarmRow .a3{flex:0 0 27%}
.alarmHead .a4,.alarmRow .a4{flex:0 0 16%}
.alarmHead .a5,.alarmRow .a5{flex:0 0 17%}

/* ---------- 底栏 ---------- */
.footerWrap{
  position:absolute;left:0;bottom:0;height:14.4%;width:100%;
  background-image:url("img/footerBg.png");
  background-size:100% 100%;background-repeat:no-repeat;
  animation:bottomMove var(--enter) cubic-bezier(.5,0,.5,1) 4.3s forwards;
}
@keyframes bottomMove{0%{bottom:-156px}to{bottom:0}}
.footerTop{height:40.6%;display:flex;justify-content:center}
.topItem{width:11.1%;display:flex;justify-content:space-evenly;align-items:center;padding:0 8px}
.topItem .label{padding-left:26px;font-size:13px;color:#abcbee;background-repeat:no-repeat;white-space:nowrap}
.topItem .value{font-size:30px;color:#fff;font-variant-numeric:tabular-nums}
/* 只作用于底栏上排（原来 .leftItem/.rightItem 会同时命中下排的标签，
   导致 20x18 的小图标被 repeat 平铺、盖住文字） */
.topItem.leftItem .label{margin-top:10px;background-image:url("img/engineer.png");background-size:20px 18px;background-repeat:no-repeat}
.topItem.rightItem .label{background-image:url("img/userCompany.png");background-size:20px 18px;background-repeat:no-repeat}
/* footerBg.png 中间是一条浅色带，白字压上去读不清 -> 加一层深色压底 */
.footerBottom{height:50%;display:flex;justify-content:space-between;padding:6px 0;position:relative}
.footerBottom:before{content:"";position:absolute;inset:0;background:rgba(4,15,24,.60)}
.footerBottom>*{position:relative}
.bottomItem{width:31.25%;display:flex;justify-content:space-around}
.innerItem{min-width:0}
.innerItem .label{margin-bottom:12px;height:17px;line-height:17px;font-size:13px;color:#fff;white-space:nowrap}
.innerItem .value{font-weight:700;height:24px;line-height:24px;font-size:23px;color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap}
.innerItem .value span{font-size:13px}
.innerTop{align-self:flex-start}
.innerMiddle{align-self:center}
.innerBottom{align-self:flex-end}
.bottomItem.leftItem .innerBottom .value{background-image:var(--gold-grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.bottomItem.rightItem .innerTop .value{background-image:var(--purple-grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.footerTitle{
  /* bottom 必须写死：原来只有动画终态设它，延迟期和「减少动态效果」下会停在越界 15.36px 处 */
  position:absolute;left:0;bottom:2.31%;margin:0;width:100%;text-align:center;font-size:30px;height:30px;line-height:30px;font-weight:700;
  background-image:var(--title-grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  animation:bottomTitle var(--enter) cubic-bezier(.5,0,.5,1) 4.5s forwards;
}
@keyframes bottomTitle{0%{bottom:-90px}to{bottom:2.31%}}

@media (prefers-reduced-motion: reduce){
  .headerWrap,.leftWrap,.rightWrap,.footerWrap,.footerTitle{animation:none}
}
