/* ===========================================================
   智慧云闪充 · H5 现场运维端
   移动优先。与 PC 后台同一套品牌色，同一套接口，同一套登录态。
   =========================================================== */
:root {
  --brand: #0AA5E8;
  --brand2: #12B8A0;
  --brand-ink: #066B78;
  --ink: #0C2B30;
  --ink-2: #10383E;
  --bg: #F2F8F7;
  --white: #fff;
  --line: #E4EFEE;
  --line-2: #EFF6F5;
  --text: #17262B;
  --text2: #5C7075;
  --text3: #93A5A8;
  --ok: #12B8A0;
  --busy: #0AA5E8;
  --bad: #E5484D;
  --warn: #F5A623;
  --off: #9AA8AB;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(16, 60, 70, .06), 0 1px 2px rgba(16, 60, 70, .04);
  --hdr: 52px;
  --tab: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; border: 0; background: none; color: inherit; }
input { font-family: inherit; font-size: 16px; } /* 16px 可避免 iOS 聚焦时自动放大 */

/* ---------------- 登录 ---------------- */
.m-login {
  min-height: 100vh; min-height: 100dvh;
  background: linear-gradient(158deg, #0C2B30 0%, #0A3640 42%, #0B5A6B 78%, #0E7E92 100%);
  display: flex; flex-direction: column;
  padding: calc(46px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom));
}
.ml-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ml-brand img { width: 40px; height: 40px; border-radius: 10px; }
.ml-brand .t1 { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.ml-brand .t2 { color: rgba(255, 255, 255, .55); font-size: 10px; letter-spacing: 1.2px; }
.ml-slogan { color: rgba(255, 255, 255, .62); font-size: 13px; margin: 0 0 26px; }

.ml-card {
  background: rgba(255, 255, 255, .98);
  border-radius: 18px; padding: 20px 18px 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}
.ml-tabs { display: flex; gap: 6px; background: #EEF4F5; border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.ml-tab {
  flex: 1; padding: 8px 0; border-radius: 8px; font-size: 13.5px;
  color: var(--text2); font-weight: 500; transition: .18s;
}
.ml-tab.active { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 3px rgba(16, 60, 70, .12); }

.ml-label { display: block; font-size: 12.5px; color: var(--text2); margin: 0 0 6px 2px; }
.ml-input {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #FBFDFD; color: var(--text); outline: none; transition: .18s; margin-bottom: 14px;
}
.ml-input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(10, 165, 232, .12); }
.ml-code-row { display: flex; gap: 8px; margin-bottom: 14px; }
.ml-code-row .ml-input { margin-bottom: 0; flex: 1; }
.ml-code-btn {
  flex: 0 0 auto; padding: 0 14px; border-radius: 10px; font-size: 13px;
  color: var(--brand); border: 1px solid rgba(10, 165, 232, .35); background: rgba(10, 165, 232, .06);
  font-weight: 600; white-space: nowrap;
}
.ml-code-btn:disabled { color: var(--text3); border-color: var(--line); background: #F5F8F8; }
.ml-tip { font-size: 12px; color: var(--brand-ink); min-height: 16px; margin: -6px 0 10px 2px; }

.m-btn {
  width: 100%; padding: 13px; border-radius: 11px; font-size: 15.5px; font-weight: 650;
  color: #fff; background: linear-gradient(135deg, #0AA5E8, #0A8FC7);
  box-shadow: 0 6px 16px rgba(10, 165, 232, .28); transition: .15s;
}
.m-btn:active { transform: scale(.985); opacity: .92; }
.m-btn:disabled { background: #C9D6D8; box-shadow: none; }
.ml-err { color: var(--bad); font-size: 12.5px; min-height: 18px; margin-top: 8px; text-align: center; }
.ml-hint { text-align: center; color: rgba(255, 255, 255, .4); font-size: 12px; line-height: 1.9; margin-top: 18px; }
.ml-foot {
  margin-top: auto; padding-top: 22px; text-align: center;
  color: rgba(255, 255, 255, .42); font-size: 11.5px; line-height: 1.8;
}
.ml-foot a { color: rgba(255, 255, 255, .58); }

/* ---------------- 框架 ---------------- */
.m-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--hdr) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.mh-back {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  color: var(--ink); margin-left: 2px;
}
.mh-back svg { width: 21px; height: 21px; }
.mh-title {
  flex: 1; font-size: 16px; font-weight: 650; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 4px;
}
.mh-title.center { text-align: center; padding-right: 40px; }
.mh-act {
  min-width: 44px; height: 36px; padding: 0 12px; border-radius: 9px;
  font-size: 13px; color: var(--brand); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.mh-act:active { background: rgba(10, 165, 232, .08); }

.m-view {
  padding: calc(var(--hdr) + env(safe-area-inset-top) + 12px) 14px
           calc(var(--tab) + env(safe-area-inset-bottom) + 20px);
  max-width: 640px; margin: 0 auto;
}

.m-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
}
.mt-item {
  height: var(--tab); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--text3); font-size: 10.5px; font-weight: 500; transition: .15s;
}
.mt-item svg { width: 21px; height: 21px; }
.mt-item.active { color: var(--brand); font-weight: 650; }
.mt-item:active { opacity: .6; }

/* ---------------- 通用块 ---------------- */
.sec { margin-bottom: 16px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 9px; }
.sec-t { font-size: 13.5px; font-weight: 650; color: var(--ink); letter-spacing: .2px; }
.sec-more { font-size: 12.5px; color: var(--brand); font-weight: 500; }

.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.card-pad { padding: 14px; }
.row-line { border-top: 1px solid var(--line-2); }

/* 顶部数据区（墨青渐变，品牌感） */
.hero-card {
  border-radius: 18px; padding: 17px 16px 15px; margin-bottom: 16px;
  background: linear-gradient(150deg, #0C2B30 0%, #0E4149 52%, #0B6272 100%);
  box-shadow: 0 10px 26px rgba(12, 43, 48, .22);
  position: relative; overflow: hidden;
}
.hero-card::after {
  content: ""; position: absolute; right: -46px; top: -56px;
  width: 168px; height: 168px; border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 184, 160, .32), transparent 68%);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; position: relative; }
.hero-lbl { color: rgba(255, 255, 255, .58); font-size: 12px; letter-spacing: .4px; }
.hero-big {
  color: #fff; font-size: 31px; font-weight: 700; letter-spacing: -.5px;
  line-height: 1.12; font-variant-numeric: tabular-nums; position: relative;
}
.hero-big small { font-size: 15px; font-weight: 500; opacity: .72; margin-left: 3px; }
.hero-sub { display: flex; gap: 18px; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); position: relative; }
.hero-sub div { flex: 1; }
.hero-sub .k { color: rgba(255, 255, 255, .5); font-size: 11px; }
.hero-sub .v { color: #fff; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 1px; }
.hero-badge {
  font-size: 10.5px; padding: 3px 8px; border-radius: 20px;
  background: rgba(18, 184, 160, .18); color: #6FE3CE; font-weight: 600;
  border: 1px solid rgba(18, 184, 160, .3);
}

/* 指标格 */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  background: var(--white); border-radius: var(--radius-sm); padding: 12px 13px;
  box-shadow: var(--shadow);
}
.kpi .v { font-size: 21px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.25; }
.kpi .v.bad { color: var(--bad); }
.kpi .v.ok { color: var(--ok); }
.kpi .l { font-size: 11.5px; color: var(--text3); margin-top: 1px; }

/* 列表项 */
.li {
  display: flex; align-items: center; gap: 11px; padding: 13px 14px;
  background: var(--white); position: relative;
}
.li + .li { border-top: 1px solid var(--line-2); }
.li:active { background: #F7FBFB; }
.li-main { flex: 1; min-width: 0; }
.li-t {
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.li-s {
  font-size: 12px; color: var(--text3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chev { color: #C4D2D4; font-size: 17px; flex: 0 0 auto; margin-left: 4px; }
.li > .tag { margin-left: 4px; flex: 0 0 auto; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(18, 184, 160, .15); }
.dot.busy { background: var(--busy); box-shadow: 0 0 0 3px rgba(10, 165, 232, .15); animation: pulse 1.6s infinite; }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }
.dot.off { background: var(--off); box-shadow: 0 0 0 3px rgba(154, 168, 171, .15); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .38; } }

/* 小标签 */
.tag {
  display: inline-block; font-size: 10.5px; padding: 1.5px 7px; border-radius: 6px;
  font-weight: 600; line-height: 1.6;
}
.tag.ok { background: rgba(18, 184, 160, .1); color: #0A8F7C; }
.tag.busy { background: rgba(10, 165, 232, .1); color: #0779AC; }
.tag.bad { background: rgba(229, 72, 77, .1); color: #C33236; }
.tag.off { background: rgba(154, 168, 171, .14); color: #6B7B7E; }
.tag.gray { background: #F1F5F5; color: var(--text2); }

/* 搜索框 */
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--text3);
}
.search {
  width: 100%; padding: 11px 14px 11px 38px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--white);
  outline: none; transition: .18s; color: var(--text);
}
.search:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10, 165, 232, .1); }

/* 详情页段落 */
.dl { display: flex; padding: 11px 14px; font-size: 13.5px; }
.dl + .dl { border-top: 1px solid var(--line-2); }
.dl .k { flex: 0 0 88px; color: var(--text3); }
.dl .v { flex: 1; color: var(--text); word-break: break-all; }

/* 操作按钮组 */
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.acts.one { grid-template-columns: 1fr; }
.act {
  padding: 12px; border-radius: 11px; font-size: 14.5px; font-weight: 600;
  background: var(--white); color: var(--ink); box-shadow: var(--shadow);
  border: 1px solid var(--line); transition: .14s;
}
.act:active { transform: scale(.98); opacity: .85; }
.act.primary { background: linear-gradient(135deg, #0AA5E8, #0A8FC7); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(10, 165, 232, .25); }
.act.danger { color: var(--bad); border-color: rgba(229, 72, 77, .28); background: #FFF8F8; }
.act.warn { color: #B8730A; border-color: rgba(245, 166, 35, .3); background: #FFFBF2; }
.act:disabled { color: var(--text3); background: #F5F8F8; border-color: var(--line); box-shadow: none; }

/* 空态 / 加载 */
.empty { text-align: center; padding: 46px 20px; color: var(--text3); font-size: 13.5px; }
.empty svg { width: 46px; height: 46px; opacity: .3; margin-bottom: 10px; }
.loading { text-align: center; padding: 40px; color: var(--text3); font-size: 13.5px; }
.spin {
  width: 22px; height: 22px; border: 2.2px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; margin: 0 auto 10px; animation: rot .7s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

/* 提示条 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab) + env(safe-area-inset-bottom) + 18px);
  transform: translateX(-50%) translateY(8px);
  background: rgba(12, 43, 48, .94); color: #fff;
  padding: 10px 18px; border-radius: 22px; font-size: 13.5px; font-weight: 500;
  z-index: 90; opacity: 0; pointer-events: none; transition: .22s;
  max-width: 82vw; text-align: center; line-height: 1.45;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(196, 40, 45, .95); }

/* 弹层 */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(6, 26, 30, .45); z-index: 60;
  display: flex; align-items: flex-end; opacity: 0; transition: .2s;
}
.sheet-mask.show { opacity: 1; }
.sheet {
  width: 100%; max-width: 640px; margin: 0 auto;
  background: #fff; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(14px); transition: .22s;
}
.sheet-mask.show .sheet { transform: translateY(0); }
.sheet-h { font-size: 16px; font-weight: 650; color: var(--ink); margin-bottom: 4px; }
.sheet-sub { font-size: 12.5px; color: var(--text3); margin-bottom: 14px; }
.sheet textarea, .sheet .ml-input { margin-bottom: 12px; }
.sheet-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.sheet-acts .act { box-shadow: none; }
textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #FBFDFD; color: var(--text); outline: none; font-family: inherit; font-size: 16px;
  resize: none; transition: .18s;
}
textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(10, 165, 232, .12); }

/* 我的页 */
.me-head {
  display: flex; align-items: center; gap: 13px;
  background: linear-gradient(150deg, #0C2B30, #0E4650 60%, #0B6272);
  border-radius: 18px; padding: 20px 17px; margin-bottom: 16px;
  box-shadow: 0 10px 26px rgba(12, 43, 48, .2);
}
.me-avatar {
  width: 50px; height: 50px; border-radius: 15px; flex: 0 0 auto;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; font-weight: 700;
}
.me-name { color: #fff; font-size: 17px; font-weight: 650; }
.me-role { color: rgba(255, 255, 255, .55); font-size: 12px; margin-top: 2px; }

/* 打印不需要 */
@media (min-width: 720px) {
  .m-view { max-width: 680px; }
}
