/* ================= 拟态(Neumorphism)风格 ================= */
:root {
  --bg: #e6e9ef;
  --panel: #e6e9ef;
  --panel2: #ecf0f6;
  --border: #d9dee7;
  --text: #3a4553;
  --text-soft: #4d5b6b;
  --muted: #8a95a5;
  --accent: #4a7dfc;
  --accent-soft: rgba(74, 125, 252, .12);
  --accent-border: rgba(74, 125, 252, .25);
  --green: #27a468;
  --red: #e0565b;
  --glass: rgba(230, 233, 239, .9);
  --glass-strong: rgba(230, 233, 239, .95);
  --overlay: rgba(230, 233, 239, .86);
  --map-bg: #e6e9ef;
  --poi-bg: rgba(236, 240, 246, .96);
  --toast-bg: #3a4553;
  --shadow-out: 8px 8px 16px rgba(163, 177, 198, .55), -8px -8px 16px rgba(255, 255, 255, .95);
  --shadow-out-sm: 4px 4px 9px rgba(163, 177, 198, .5), -4px -4px 9px rgba(255, 255, 255, .9);
  --shadow-in: inset 4px 4px 8px rgba(163, 177, 198, .6), inset -4px -4px 8px rgba(255, 255, 255, .95);
}

html[data-theme="dark"] {
  --bg: #1b1f26;
  --panel: #1b1f26;
  --panel2: #20252d;
  --border: #2a303a;
  --text: #dbe3ee;
  --text-soft: #c3cdda;
  --muted: #8b98a8;
  --accent: #6b9bff;
  --accent-soft: rgba(107, 155, 255, .15);
  --accent-border: rgba(107, 155, 255, .3);
  --green: #4ade80;
  --red: #f87171;
  --glass: rgba(27, 31, 38, .92);
  --glass-strong: rgba(27, 31, 38, .96);
  --overlay: rgba(27, 31, 38, .86);
  --map-bg: #1b1f26;
  --poi-bg: rgba(32, 37, 45, .96);
  --toast-bg: #0e1116;
  --shadow-out: 8px 8px 16px rgba(0, 0, 0, .55), -8px -8px 16px rgba(58, 68, 82, .22);
  --shadow-out-sm: 4px 4px 9px rgba(0, 0, 0, .5), -4px -4px 9px rgba(58, 68, 82, .2);
  --shadow-in: inset 4px 4px 8px rgba(0, 0, 0, .55), inset -4px -4px 8px rgba(58, 68, 82, .22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

/* ---------- 顶栏 ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; height: 60px;
  background: var(--bg);
  box-shadow: 0 6px 18px rgba(163, 177, 198, .35), 0 -2px 6px rgba(255, 255, 255, .5);
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px; z-index: 1100;
}
html[data-theme="dark"] header { box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 -2px 6px rgba(58, 68, 82, .25); }
.brand {
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.brand::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 2px 2px 5px rgba(74, 125, 252, .45), -2px -2px 5px rgba(255, 255, 255, .8);
}
.header-right {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px;
}
.top-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 10px;
  background: var(--bg); box-shadow: var(--shadow-out-sm);
  color: var(--text-soft); font-size: 12px; text-decoration: none;
  transition: all .15s ease;
}
.top-link:hover { color: var(--accent); }
.top-link:active { box-shadow: var(--shadow-in); }

.conn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
  background: var(--bg); box-shadow: var(--shadow-in);
}
.conn.on { color: var(--green); }
.conn.off { color: var(--red); }

#clock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; min-width: 64px; text-align: right; }

.icon-btn {
  background: var(--bg); color: var(--text-soft);
  border: none; border-radius: 10px;
  width: 36px; height: 36px; padding: 0; cursor: pointer;
  font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-out-sm);
  transition: all .15s ease;
}
.icon-btn:hover { color: var(--accent); }
.icon-btn:active { box-shadow: var(--shadow-in); }

/* 视图切换 */
.tabs {
  display: flex; gap: 4px; margin-left: 12px;
  background: var(--bg); border-radius: 12px; padding: 4px;
  box-shadow: var(--shadow-in);
}
.tab {
  border: none; background: transparent; color: var(--muted);
  font-size: 12.5px; padding: 7px 14px; border-radius: 9px;
  cursor: pointer; font-family: inherit; transition: all .15s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--bg); color: var(--accent); font-weight: 600;
  box-shadow: var(--shadow-out-sm);
}
body.view-dash #sidebar, body.view-dash #map-wrap { display: none; }
body.view-map #dashboard { display: none; }
body.view-dash #sidebar-toggle { display: none; }

/* ---------- 数据看板 ---------- */
#dashboard {
  position: absolute; top: 60px; left: 0; right: 0; bottom: 0;
  overflow-y: auto; padding: 22px;
}
.dash-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.stat {
  flex: 1; min-width: 140px;
  background: var(--bg); border-radius: 18px;
  padding: 18px 20px; box-shadow: var(--shadow-out);
}
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat.ok .stat-num { color: var(--green); }
.stat.off .stat-num { color: var(--red); }
.stat.warn .stat-num { color: var(--accent); }

.dash-list-wrap {
  background: var(--bg); border-radius: 20px;
  padding: 18px; box-shadow: var(--shadow-out);
}
.dash-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.dash-title { font-weight: 700; font-size: 14.5px; }
.dash-hint { color: var(--muted); font-size: 12px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.dev-card {
  border-radius: 18px; padding: 16px; background: var(--bg);
  box-shadow: var(--shadow-out-sm);
  transition: all .18s ease;
}
.dev-card:hover { box-shadow: var(--shadow-out); transform: translateY(-2px); }
.dc-top { display: flex; align-items: center; gap: 8px; }
.dc-name { font-weight: 700; font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-batt { font-size: 12px; color: var(--muted); }
.dc-chips { display: flex; gap: 6px; margin: 12px 0 4px; flex-wrap: wrap; }
.chip {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--bg); box-shadow: var(--shadow-out-sm); color: var(--muted);
}
.chip.ok { color: var(--green); }
.chip.off { color: var(--red); }
.chip.warn { color: var(--accent); }
.dc-meta { font-size: 12px; color: var(--muted); line-height: 1.9; }
.dc-meta b { color: var(--text-soft); font-weight: 600; }
.dc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.dash-empty { text-align: center; color: var(--muted); font-size: 13px; line-height: 2; padding: 46px 0; }

.dot-status { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-status.on { background: var(--green); box-shadow: 0 0 0 3px rgba(39, 164, 104, .15); }
.dot-status.off { background: #b9c2cf; }
html[data-theme="dark"] .dot-status.off { background: #3a4553; }

/* ---------- 按钮(拟态) ---------- */
.mini {
  background: var(--bg); color: var(--text-soft);
  border: none; border-radius: 10px;
  padding: 6px 11px; cursor: pointer; font-size: 11.5px;
  box-shadow: var(--shadow-out-sm);
  transition: all .13s ease; font-family: inherit;
}
.mini:hover { color: var(--accent); }
.mini:active { box-shadow: var(--shadow-in); }
.mini.danger { color: var(--red); }
.mini.active { color: var(--accent); box-shadow: var(--shadow-in); font-weight: 600; }

/* ---------- 设备侧栏(地图视图) ---------- */
#sidebar {
  position: fixed; top: 72px; left: 14px; bottom: 14px; width: 300px;
  background: var(--bg); border-radius: 18px; overflow-y: auto;
  z-index: 1000; box-shadow: var(--shadow-out);
  transition: transform .22s ease;
  padding-bottom: 10px;
}
body.sidebar-hidden #sidebar { transform: translateX(calc(-100% - 28px)); }
.sidebar-title { padding: 16px 18px 10px; font-size: 12px; color: var(--muted); letter-spacing: .4px; }
#device-list { padding: 0 10px; }
.device-item {
  padding: 12px 12px 10px; margin-bottom: 8px;
  border-radius: 14px; cursor: pointer;
  background: var(--bg); transition: all .15s ease;
  box-shadow: var(--shadow-out-sm);
}
.device-item:hover { box-shadow: var(--shadow-out); }
.device-item.active { box-shadow: var(--shadow-in); }
.device-item.active .d-name { color: var(--accent); }
.d-top { display: flex; align-items: center; gap: 8px; }
.d-name { font-weight: 600; font-size: 13.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-batt { color: var(--muted); font-size: 11.5px; }
.d-sub { margin-top: 5px; display: flex; gap: 10px; color: var(--muted); font-size: 11.5px; padding-left: 16px; }
.d-actions { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }
.no-device { padding: 34px 20px; color: var(--muted); font-size: 12.5px; line-height: 1.9; text-align: center; }

/* ---------- 地图 ---------- */
#map-wrap { position: absolute; top: 60px; bottom: 0; left: 324px; right: 0; }
body.sidebar-hidden #map-wrap { left: 0; }
#map { width: 100%; height: 100%; background: var(--map-bg); }
.leaflet-container { background: var(--map-bg); }

#controls {
  position: absolute; top: 14px; left: 14px; z-index: 900;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--bg); border-radius: 14px;
  padding: 7px; box-shadow: var(--shadow-out);
}
.ctl-btn {
  background: var(--bg); color: var(--text-soft);
  border: none; border-radius: 10px;
  padding: 7px 12px; cursor: pointer; font-size: 12.5px;
  transition: all .13s ease; white-space: nowrap; font-family: inherit;
  box-shadow: var(--shadow-out-sm);
}
.ctl-btn:hover { color: var(--accent); }
.ctl-btn:active { box-shadow: var(--shadow-in); }
.ctl-btn.active { color: var(--accent); font-weight: 600; box-shadow: var(--shadow-in); }
#controls select {
  background: var(--bg); color: var(--text-soft);
  border: none; border-radius: 10px;
  padding: 7px 8px; font-size: 12.5px; cursor: pointer; outline: none;
  box-shadow: var(--shadow-in); font-family: inherit;
}
#controls select:hover { color: var(--accent); }

/* ---------- 信息卡 ---------- */
#info-card {
  position: absolute; right: 14px; top: 14px; width: 300px;
  background: var(--bg); border-radius: 20px;
  padding: 16px; z-index: 900; box-shadow: var(--shadow-out);
}
.info-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.info-head span { font-size: 14.5px; font-weight: 700; }
.info-grid > div { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.info-grid .k { color: var(--muted); width: 46px; flex: none; }
.info-grid .v { flex: 1; word-break: break-all; color: var(--text-soft); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
.addr-row { align-items: flex-start !important; }
.addr-row .v { padding-top: 1px; }
.coord-note { margin-top: 10px; font-size: 11px; color: var(--muted); }
.info-btns { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.sheet-handle { display: none; }

/* ---------- 设备标记 ---------- */
.dev-marker { position: relative; width: 34px; height: 34px; }
.dev-marker .ring { position: absolute; inset: 0; border-radius: 50%; animation: pulse 2s ease-out infinite; }
.dev-marker .dot {
  position: absolute; inset: 7px; border-radius: 50%;
  border: 2.5px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .28);
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .55; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--toast-bg); color: #fff;
  padding: 10px 18px; border-radius: 12px;
  font-size: 12.5px; z-index: 1200;
  opacity: 0; transition: opacity .22s ease; pointer-events: none;
  box-shadow: var(--shadow-out);
}
.toast.show { opacity: 1; }

/* ---------- 登录 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--overlay);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
}
.overlay.hidden { display: none; }
.login-box {
  width: 344px; background: var(--bg);
  border-radius: 24px; padding: 40px 30px 32px;
  text-align: center; box-shadow: var(--shadow-out);
}
.login-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 18px; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); box-shadow: var(--shadow-in);
}
.login-box h1 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.login-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 24px; }
#password {
  width: 100%; padding: 13px 16px; border-radius: 14px;
  border: none; background: var(--bg); box-shadow: var(--shadow-in);
  color: var(--text); font-size: 14px; outline: none;
  transition: all .15s ease;
}
#password::placeholder { color: var(--muted); }
#password:focus { box-shadow: var(--shadow-in), 0 0 0 3px var(--accent-soft); }
#login-btn {
  width: 100%; margin-top: 16px; padding: 13px;
  border-radius: 14px; border: none;
  background: var(--bg); color: var(--accent);
  font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-out-sm);
  transition: all .15s ease;
}
#login-btn:hover { box-shadow: var(--shadow-out); }
#login-btn:active { box-shadow: var(--shadow-in); }
.login-err { margin-top: 12px; color: var(--red); font-size: 12.5px; min-height: 18px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 1900;
  background: rgba(30, 38, 50, .28);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--bg); border-radius: 20px;
  padding: 20px; max-width: 90vw; max-height: 90vh;
  overflow: auto; box-shadow: var(--shadow-out);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; font-weight: 700; gap: 12px; }
#info-json {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px; white-space: pre-wrap; word-break: break-all;
  max-height: 70vh; overflow: auto; margin: 0; color: var(--text-soft);
}

/* ---------- 周边网络 ---------- */
.net-box { width: 760px; max-width: 94vw; }
.net-head-right { display: flex; align-items: center; gap: 8px; }
.net-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.net-cols { display: flex; gap: 14px; }
.net-col { flex: 1; min-width: 0; }
.net-col-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text-soft); }
.net-col-title span { color: var(--muted); font-weight: 400; }
.net-list { max-height: 54vh; overflow: auto; padding: 2px; }
.net-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 12px; margin-bottom: 8px; background: var(--bg);
  box-shadow: var(--shadow-out-sm);
}
.net-row .sig { font-size: 12px; color: var(--accent); letter-spacing: 1px; width: 44px; flex: none; }
.net-info { min-width: 0; flex: 1; }
.net-info .nm { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net-info .sub { font-size: 11px; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 10px; padding: 2px 7px; border-radius: 6px; background: var(--bg); box-shadow: var(--shadow-out-sm); color: var(--accent); font-weight: 500; }
.net-empty { color: var(--muted); font-size: 12px; padding: 16px 0; text-align: center; }

/* ---------- 附近店名标注 ---------- */
.poi-label { background: none; border: none; }
.poi-label span {
  display: inline-block; white-space: nowrap;
  font-size: 11.5px; line-height: 1.5; padding: 3px 9px;
  border-radius: 9px; color: var(--text);
  background: var(--poi-bg);
  box-shadow: var(--shadow-out-sm);
  transform: translate(-50%, -50%);
}
.poi-amap {
  white-space: nowrap; font-size: 11.5px; line-height: 1.5;
  padding: 3px 9px; border-radius: 9px; color: var(--text);
  background: var(--poi-bg);
  box-shadow: var(--shadow-out-sm);
}

/* 滚动条 */
#sidebar::-webkit-scrollbar, #dashboard::-webkit-scrollbar, .net-list::-webkit-scrollbar { width: 6px; }
#sidebar::-webkit-scrollbar-thumb, #dashboard::-webkit-scrollbar-thumb, .net-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

@media (max-width: 860px) {
  #sidebar {
    top: 60px; left: 0; bottom: 0; width: 272px;
    border-radius: 0 18px 18px 0;
  }
  #map-wrap { left: 0; }
  #info-card {
    left: 10px; right: 10px; top: auto; bottom: 10px;
    width: auto; max-height: 74vh; overflow: auto;
    border-radius: 20px; padding-top: 20px;
    transition: transform .26s ease;
  }
  #info-card.sheet { transform: translateY(var(--sheet-hide, 0px)); }
  #info-card.sheet.expanded { transform: translateY(0); }
  #info-card.sheet.dragging { transition: none; }
  .sheet-handle {
    display: block; position: absolute; top: 8px; left: 50%;
    transform: translateX(-50%); width: 38px; height: 4px;
    border-radius: 2px; background: var(--border); cursor: grab;
    touch-action: none;
  }
  #controls { left: 10px; top: 10px; right: 10px; }
  #controls .ctl-btn { padding: 6px 9px; }
  .header-right { gap: 6px; }
  .top-link { display: none; }
  .coord-note { display: none; }
  #clock { display: none; }
  #dashboard { padding: 14px; }
  .stat { min-width: 42%; padding: 14px 16px; }
  .stat-num { font-size: 22px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-hint { display: none; }
  .net-cols { flex-direction: column; }
  .net-list { max-height: 34vh; }
}

.stat-num.ok-text { color: var(--green); }
.stat-num.off-text { color: var(--red); }
.dash-head .chip { margin-left: 2px; }

/* ---------- 服务器资源 ---------- */
.dash-server {
  background: var(--bg); border-radius: 20px; padding: 18px;
  box-shadow: var(--shadow-out); margin-top: 16px; margin-bottom: 16px;
}
.srv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.srv-item { background: var(--bg); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-out-sm); }
.srv-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 10px; gap: 8px; }
.srv-top span:last-child { color: var(--text-soft); font-weight: 600; text-align: right; }
.bar { height: 10px; border-radius: 999px; background: var(--bg); box-shadow: var(--shadow-in); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; transition: width .45s ease;
  background: linear-gradient(90deg, #6aa1ff, #4a7dfc); box-shadow: 2px 0 8px rgba(74, 125, 252, .35); }
/* 带宽条用绿色, 跟 CPU/内存/磁盘区分开 */
.bar-fill.net { background: linear-gradient(90deg, #34d399, #10b981); box-shadow: 2px 0 8px rgba(16, 185, 129, .35); }
html[data-theme="dark"] .bar-fill { background: linear-gradient(90deg, #4f7fd6, #6b9bff); }
html[data-theme="dark"] .bar-fill.net { background: linear-gradient(90deg, #2fbf86, #34d399); }

@media (max-width: 1080px) {
  .srv-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .srv-grid { grid-template-columns: 1fr; }
}

.dc-actions .mini.dc-open { width: 100%; text-align: center; padding: 8px 12px; font-size: 12.5px; }

/* ============================================================
   OPPO 云服务皮肤
   ============================================================ */
/* ------------------------------------------------------------
   1. 设计变量
   ------------------------------------------------------------ */
html[data-skin="oppo"] {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel2: #f7f9fb;
  --border: #e6ebf0;
  --text: #1a1d21;
  --text-soft: #3f4852;
  --muted: #8c959f;
  --accent: #00a462;
  --accent-strong: #008a53;
  --accent-soft: rgba(0, 164, 98, .10);
  --accent-border: rgba(0, 164, 98, .28);
  --green: #00a462;
  --red: #e5484d;
  --glass: rgba(255, 255, 255, .88);
  --glass-strong: #ffffff;
  --overlay: rgba(244, 246, 249, .92);
  --map-bg: #e9edf1;
  --poi-bg: #ffffff;
  --toast-bg: #1f2429;
  --shadow-out: 0 8px 26px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-out-sm: 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-in: inset 0 0 0 1px var(--border);
  --radius: 16px;
}
html[data-skin="oppo"][data-theme="dark"] {
  --bg: #0f1216;
  --panel: #161b21;
  --panel2: #1b2129;
  --border: #242c35;
  --text: #eef2f6;
  --text-soft: #c5ced8;
  --muted: #8b95a1;
  --accent: #26c98b;
  --accent-strong: #1fae77;
  --accent-soft: rgba(38, 201, 139, .14);
  --accent-border: rgba(38, 201, 139, .32);
  --green: #26c98b;
  --red: #f26267;
  --glass: rgba(22, 27, 33, .9);
  --glass-strong: #161b21;
  --overlay: rgba(15, 18, 22, .9);
  --map-bg: #10151a;
  --poi-bg: #1b2129;
  --toast-bg: #000000;
  --shadow-out: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-out-sm: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-in: inset 0 0 0 1px var(--border);
}

html[data-skin="oppo"] body { background: var(--bg); }
html[data-skin="oppo"], html[data-skin="oppo"] body { height: 100%; overflow: hidden; }
html[data-skin="oppo"] ::selection { background: rgba(0, 164, 98, .18); }

/* ------------------------------------------------------------
   2. 顶栏
   ------------------------------------------------------------ */
html[data-skin="oppo"] header {
  background: var(--panel);
  box-shadow: none;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  gap: 20px;
}
html[data-skin="oppo"] .brand { gap: 10px; font-size: 15px; letter-spacing: 0; }
html[data-skin="oppo"] .brand::before { display: none; }
html[data-skin="oppo"] .oppo-logo {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px; font-weight: 800; letter-spacing: .3px;
  color: #00a462; line-height: 1; user-select: none;
  white-space: nowrap;
}
html[data-skin="oppo"][data-theme="dark"] .oppo-logo { color: #26c98b; }
html[data-skin="oppo"] .brand-sep { width: 1px; height: 15px; background: var(--border); }
html[data-skin="oppo"] .brand-cloud { font-size: 14.5px; font-weight: 600; color: var(--text); }
html[data-skin="oppo"] .brand-page { font-size: 14.5px; color: var(--muted); }
html[data-skin="oppo"] .brand-page::before { content: "/"; margin-right: 8px; color: var(--border); }

html[data-skin="oppo"] .tabs {
  margin-left: 4px; gap: 2px; padding: 3px;
  background: var(--bg); border-radius: 10px; box-shadow: none;
}
html[data-skin="oppo"] .tab {
  font-size: 13px; padding: 7px 15px; border-radius: 8px; color: var(--muted);
}
html[data-skin="oppo"] .tab:hover { color: var(--text); }
html[data-skin="oppo"] .tab.active {
  background: var(--panel); color: var(--accent); font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .10);
}

html[data-skin="oppo"] .header-right { gap: 12px; color: var(--muted); font-size: 12.5px; }
html[data-skin="oppo"] .hint { color: var(--muted); font-size: 12.5px; }
html[data-skin="oppo"] .top-link {
  padding: 6px 12px; border-radius: 8px; background: transparent;
  border: 1px solid var(--border); box-shadow: none; color: var(--text-soft); font-size: 12.5px;
}
html[data-skin="oppo"] .top-link:hover {
  color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft);
}
html[data-skin="oppo"] .conn {
  padding: 5px 11px; background: var(--bg); box-shadow: none; font-size: 12px;
}
html[data-skin="oppo"] .conn.on { color: var(--accent); background: var(--accent-soft); }
html[data-skin="oppo"] .conn.off { color: var(--red); background: rgba(229, 72, 77, .10); }
html[data-skin="oppo"] #clock { color: var(--muted); font-size: 12px; }
html[data-skin="oppo"] .icon-btn {
  width: 34px; height: 34px; border-radius: 8px; font-size: 15px;
  background: transparent; box-shadow: none; color: var(--text-soft);
}
html[data-skin="oppo"] .icon-btn:hover { background: var(--bg); color: var(--accent); }
html[data-skin="oppo"] .icon-btn:active { background: var(--accent-soft); box-shadow: none; }
html[data-skin="oppo"] .icon-btn.ghost { color: var(--muted); font-size: 13px; width: 28px; height: 28px; }

/* ------------------------------------------------------------
   3. 设备列表(看板)
   ------------------------------------------------------------ */
html[data-skin="oppo"] #dashboard { padding: 22px 24px 34px; }
html[data-skin="oppo"] .stat,
html[data-skin="oppo"] .dash-list-wrap,
html[data-skin="oppo"] .dash-server {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: none;
}
html[data-skin="oppo"] .stat { padding: 18px 20px; }
html[data-skin="oppo"] .stat-num { font-size: 25px; font-weight: 700; letter-spacing: -.4px; }
html[data-skin="oppo"] .stat-label { color: var(--muted); font-size: 12.5px; }
html[data-skin="oppo"] .srv-item { background: var(--panel2); border-radius: 12px; box-shadow: none; }
html[data-skin="oppo"] .bar { background: var(--bg); box-shadow: none; height: 8px; }
html[data-skin="oppo"] .bar-fill {
  background: linear-gradient(90deg, #00a462, #34c98d);
  box-shadow: none;
}
html[data-skin="oppo"][data-theme="dark"] .bar-fill {
  background: linear-gradient(90deg, #1fae77, #26c98b);
}
html[data-skin="oppo"] .dev-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: none; padding: 16px 16px 14px;
}
html[data-skin="oppo"] .dev-card:hover {
  border-color: var(--accent-border); background: var(--panel2);
  transform: none; box-shadow: 0 6px 20px rgba(0, 164, 98, .10);
}
html[data-skin="oppo"] .chip {
  background: var(--bg); box-shadow: none; color: var(--muted);
  border-radius: 999px; padding: 3px 10px; font-size: 11px;
}
html[data-skin="oppo"] .chip.ok { color: var(--accent); background: var(--accent-soft); }
html[data-skin="oppo"] .chip.off { color: var(--red); background: rgba(229, 72, 77, .10); }
html[data-skin="oppo"] .chip.warn { color: #e0912a; background: rgba(224, 145, 42, .12); }
html[data-skin="oppo"] .dot-status.on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
html[data-skin="oppo"] .dot-status.off { background: #c3cbd4; }
html[data-skin="oppo"] .mini {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 9px; box-shadow: none; color: var(--text-soft);
  padding: 7px 12px; font-size: 12px;
}
html[data-skin="oppo"] .mini:hover {
  color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft);
}
html[data-skin="oppo"] .mini:active { box-shadow: none; background: var(--accent-soft); }
html[data-skin="oppo"] .mini.active { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); font-weight: 600; }
html[data-skin="oppo"] .mini.danger { color: var(--red); border-color: rgba(229, 72, 77, .22); }

/* ------------------------------------------------------------
   4. 设备侧栏
   ------------------------------------------------------------ */
html[data-skin="oppo"] #sidebar {
  top: 72px; left: 14px; bottom: auto; width: 296px;
  max-height: calc(100% - 118px);
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 8px 26px rgba(16, 24, 40, .07);
}
html[data-skin="oppo"] .sidebar-head { padding: 16px 16px 10px; }
html[data-skin="oppo"] .sidebar-title { padding: 0; font-size: 14.5px; font-weight: 700; color: var(--text); letter-spacing: 0; }
html[data-skin="oppo"] .sidebar-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
html[data-skin="oppo"] #device-list { padding: 0 10px 4px; }
html[data-skin="oppo"] .device-item {
  padding: 12px 12px 10px; margin-bottom: 8px; border-radius: 12px;
  border: 1px solid transparent; background: var(--panel2); box-shadow: none;
}
html[data-skin="oppo"] .device-item:hover { border-color: var(--border); background: var(--panel); }
html[data-skin="oppo"] .device-item.active {
  border-color: var(--accent-border); background: var(--accent-soft); box-shadow: none;
}
html[data-skin="oppo"] .device-item.active .d-name { color: var(--accent); }
html[data-skin="oppo"] .d-name { font-size: 13.5px; font-weight: 600; }
html[data-skin="oppo"] .d-sub { color: var(--muted); padding-left: 16px; }
html[data-skin="oppo"] .no-device { color: var(--muted); }
html[data-skin="oppo"] .no-device br + br { display: none; }

/* ------------------------------------------------------------
   5. 地图与工具条
   ------------------------------------------------------------ */
html[data-skin="oppo"] #map-wrap { top: 60px; left: 324px; }
html[data-skin="oppo"] #map, html[data-skin="oppo"] .leaflet-container { background: var(--map-bg); }
html[data-skin="oppo"][data-theme="dark"] #map,
html[data-skin="oppo"][data-theme="dark"] .leaflet-container { background: #10151a; }

html[data-skin="oppo"] #controls {
  top: auto; bottom: 46px; left: 14px; gap: 8px;
  background: transparent; box-shadow: none; padding: 0;
}
html[data-skin="oppo"] .ctl-group {
  display: flex; align-items: center; gap: 2px;
  padding: 4px; border-radius: 12px;
  background: var(--glass-strong); border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
  backdrop-filter: blur(10px);
}
html[data-skin="oppo"] .ctl-btn {
  background: transparent; border: none; box-shadow: none;
  border-radius: 9px; padding: 7px 11px; font-size: 12.5px; color: var(--text-soft);
}
html[data-skin="oppo"] .ctl-btn:hover { background: var(--bg); color: var(--accent); }
html[data-skin="oppo"] .ctl-btn:active { box-shadow: none; }
html[data-skin="oppo"] .ctl-btn.active {
  background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: none;
}
html[data-skin="oppo"] .ctl-btn.primary {
  background: var(--accent); color: #fff; font-weight: 600;
  padding: 7px 14px; box-shadow: 0 3px 10px rgba(0, 164, 98, .28);
}
html[data-skin="oppo"] .ctl-btn.primary:hover { background: var(--accent-strong); color: #fff; }
html[data-skin="oppo"] #controls select {
  background: transparent; border: none; box-shadow: none;
  color: var(--text-soft); font-size: 12.5px; padding: 7px 6px;
  border-radius: 8px;
}
html[data-skin="oppo"] #controls select:hover { background: var(--bg); color: var(--accent); }
html[data-skin="oppo"] .map-attrib {
  position: absolute; left: 14px; bottom: 12px; z-index: 800;
  font-size: 11px; color: var(--muted); pointer-events: none;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .8);
}
html[data-skin="oppo"][data-theme="dark"] .map-attrib { text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }

/* 右上角图层 */
html[data-skin="oppo"] #map-tools {
  position: absolute; top: 14px; right: 14px; z-index: 905;
  width: 96px; padding: 9px 8px 8px;
  background: var(--glass-strong); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
  backdrop-filter: blur(10px);
}
html[data-skin="oppo"] .mt-title {
  font-size: 12px; font-weight: 600; color: var(--text);
  padding: 0 6px 7px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
}
html[data-skin="oppo"] .mt-item {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 8px;
  padding: 7px 6px; margin-top: 1px; cursor: pointer;
  font-size: 12.5px; color: var(--text-soft); font-family: inherit;
}
html[data-skin="oppo"] .mt-item:hover { background: var(--bg); color: var(--accent); }
html[data-skin="oppo"] .mt-item.active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
html[data-skin="oppo"] #map-tools #layer-sel { display: none; }

/* 收起 / 展开 */
html[data-skin="oppo"] .info-toggle {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  z-index: 910; padding: 7px 18px;
  background: var(--glass-strong); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: 0 4px 16px rgba(16, 24, 40, .10);
  font-size: 12.5px; color: var(--text-soft); cursor: pointer; font-family: inherit;
}
html[data-skin="oppo"] .info-toggle:hover { color: var(--accent); border-color: var(--accent-border); }
html[data-skin="oppo"] #info-card.collapsed { display: none !important; }

/* ------------------------------------------------------------
   6. 设备信息卡
   ------------------------------------------------------------ */
html[data-skin="oppo"] #info-card {
  right: 14px; bottom: 46px; top: auto; width: 322px; padding: 16px;
  max-height: calc(100% - 120px); overflow: auto;
  background: var(--glass-strong); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 10px 30px rgba(16, 24, 40, .10);
  backdrop-filter: blur(12px);
}
html[data-skin="oppo"] .info-head {
  margin-bottom: 14px; align-items: flex-start;
  justify-content: space-between; gap: 10px;
}
html[data-skin="oppo"] .info-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
html[data-skin="oppo"] .info-avatar {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: var(--accent-soft); color: var(--accent);
}
html[data-skin="oppo"] .info-title-txt { min-width: 0; }
html[data-skin="oppo"] .info-head .info-name,
html[data-skin="oppo"] #info-name {
  font-size: 16px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 210px;
}
html[data-skin="oppo"] .info-sub { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
html[data-skin="oppo"] .info-head .status-pill,
html[data-skin="oppo"] .status-pill {
  font-size: 11px; font-weight: 600; line-height: 1;
  padding: 4px 9px; border-radius: 999px;
  background: var(--bg); color: var(--muted); border: none;
}
html[data-skin="oppo"] .status-pill.on { color: var(--accent); background: var(--accent-soft); }
html[data-skin="oppo"] .status-pill.off { color: var(--muted); background: var(--bg); }
html[data-skin="oppo"] .info-head .info-time,
html[data-skin="oppo"] #info-time { font-size: 11.5px; font-weight: 400; color: var(--muted); }

html[data-skin="oppo"] .info-addr-box {
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px; margin-bottom: 10px;
}
html[data-skin="oppo"] .addr-k { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
html[data-skin="oppo"] .addr-v { font-size: 13px; line-height: 1.5; color: var(--text); word-break: break-all; }

html[data-skin="oppo"] .info-grid > div {
  padding: 7px 0; font-size: 12.5px; border-bottom: 1px solid var(--border);
}
html[data-skin="oppo"] .info-grid > div:last-child { border-bottom: none; }
html[data-skin="oppo"] .info-grid .k { width: 46px; color: var(--muted); font-size: 12px; }
html[data-skin="oppo"] .info-grid .v { color: var(--text-soft); }
html[data-skin="oppo"] .info-grid .mini {
  padding: 3px 8px; font-size: 11px; border-radius: 7px;
  background: var(--panel2); border-color: var(--border);
}
html[data-skin="oppo"] .coord-note { color: var(--muted); font-size: 11px; margin-top: 8px; }
html[data-skin="oppo"] .info-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
html[data-skin="oppo"] .info-btns .mini { padding: 8px 4px; font-size: 11.5px; text-align: center; }

/* ------------------------------------------------------------
   7. 定位标记 / 轨迹 / 弹窗
   ------------------------------------------------------------ */
html[data-skin="oppo"] .dev-marker .ring {
  background: rgba(0, 164, 98, .22) !important;
  animation: oppo-pulse 2.4s cubic-bezier(.2, .6, .4, 1) infinite;
}
html[data-skin="oppo"] .dev-marker .dot {
  inset: 7px; background: #fff !important; color: var(--accent) !important;
  border: 3px solid var(--accent); font-size: 9px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 164, 98, .40);
}
html[data-skin="oppo"][data-theme="dark"] .dev-marker .dot { background: #fff !important; }
@keyframes oppo-pulse {
  0% { transform: scale(.7); opacity: .55; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

html[data-skin="oppo"] .poi-label span,
html[data-skin="oppo"] .poi-amap {
  background: var(--panel); color: var(--text); font-size: 11.5px;
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, .10);
}
html[data-skin="oppo"] .leaflet-popup-content-wrapper,
html[data-skin="oppo"] .amap-info-content {
  background: var(--panel); color: var(--text);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16);
  border: 1px solid var(--border);
}
html[data-skin="oppo"] .leaflet-popup-tip { background: var(--panel); }
html[data-skin="oppo"] .leaflet-popup-content { margin: 12px 14px; font-size: 12.5px; }
html[data-skin="oppo"] .oppo-pop .p-name { font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 3px; }
html[data-skin="oppo"] .oppo-pop .p-ll { font-family: Consolas, monospace; font-size: 11.5px; color: var(--text-soft); }
html[data-skin="oppo"] .oppo-pop .p-st { margin-top: 5px; font-size: 11.5px; color: var(--muted); }
html[data-skin="oppo"] .leaflet-control-zoom { border: none; box-shadow: 0 4px 14px rgba(16, 24, 40, .12); border-radius: 10px; overflow: hidden; }
html[data-skin="oppo"] .leaflet-control-zoom a {
  background: var(--panel); color: var(--text-soft); width: 30px; height: 30px;
  line-height: 30px; border-bottom: 1px solid var(--border);
}
html[data-skin="oppo"] .leaflet-control-zoom a:hover { background: var(--accent-soft); color: var(--accent); }
html[data-skin="oppo"] .leaflet-control-attribution {
  background: rgba(255, 255, 255, .75); font-size: 10px; color: var(--muted);
}

/* ------------------------------------------------------------
   8. 提示 / 弹窗 / 登录
   ------------------------------------------------------------ */
html[data-skin="oppo"] .toast {
  background: var(--toast-bg); border-radius: 10px; font-size: 12.5px;
  padding: 10px 16px; box-shadow: 0 10px 30px rgba(16, 24, 40, .25);
}
html[data-skin="oppo"] .modal { background: rgba(15, 20, 26, .32); backdrop-filter: blur(4px); }
html[data-skin="oppo"] .modal-box {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 16px 40px rgba(16, 24, 40, .18);
}
html[data-skin="oppo"] .modal-head { font-size: 14px; }
html[data-skin="oppo"] .net-row {
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: none;
}
html[data-skin="oppo"] .net-info .sub { font-size: 11px; }
html[data-skin="oppo"] .badge {
  background: var(--accent-soft); color: var(--accent); box-shadow: none;
}

html[data-skin="oppo"] .login-box {
  width: 360px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: 0 20px 50px rgba(16, 24, 40, .16);
  padding: 38px 30px 26px;
}
html[data-skin="oppo"] .login-logo {
  font-size: 22px; font-weight: 800; letter-spacing: .4px;
  color: #00a462; margin-bottom: 14px; text-align: center;
}
html[data-skin="oppo"][data-theme="dark"] .login-logo { color: #26c98b; }
html[data-skin="oppo"] .login-box h1 { font-size: 18px; font-weight: 700; }
html[data-skin="oppo"] .login-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 22px; }
html[data-skin="oppo"] #password {
  background: var(--panel2); border: 1px solid var(--border); box-shadow: none;
  border-radius: 10px; padding: 12px 14px; font-size: 14px;
}
html[data-skin="oppo"] #password:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
html[data-skin="oppo"] #login-btn {
  background: var(--accent); color: #fff; box-shadow: none;
  border-radius: 10px; font-size: 15px; font-weight: 600; padding: 12px;
}
html[data-skin="oppo"] #login-btn:hover { background: var(--accent-strong); box-shadow: 0 6px 18px rgba(0, 164, 98, .28); }
html[data-skin="oppo"] .login-foot { margin-top: 16px; font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------
   9. 深色细节
   ------------------------------------------------------------ */
html[data-skin="oppo"][data-theme="dark"] header { border-bottom-color: var(--border); }
html[data-skin="oppo"][data-theme="dark"] .ctl-group { box-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
html[data-skin="oppo"][data-theme="dark"] #info-card { box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }
html[data-skin="oppo"][data-theme="dark"] .dev-card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
html[data-skin="oppo"][data-theme="dark"] .leaflet-control-attribution { background: rgba(22, 27, 33, .8); }

/* ------------------------------------------------------------
   10. 窄屏
   ------------------------------------------------------------ */
@media (max-width: 860px) {
  html[data-skin="oppo"] header { gap: 10px; padding: 0 12px; }
  html[data-skin="oppo"] .brand-cloud,
  html[data-skin="oppo"] .brand-page,
  html[data-skin="oppo"] .brand-sep,
  html[data-skin="oppo"] .hint { display: none; }
  html[data-skin="oppo"] .tabs { margin-left: auto; }
  html[data-skin="oppo"] .oppo-logo { font-size: 15px; }
  html[data-skin="oppo"] .header-right { gap: 6px; margin-left: 0; }
  html[data-skin="oppo"] #sidebar {
    top: 60px; left: 0; bottom: 0; width: 268px;
    border-radius: 0 16px 16px 0; border-left: none;
  }
  html[data-skin="oppo"] #map-wrap { left: 0; }
  html[data-skin="oppo"] #controls {
    left: 10px; right: 10px; top: auto; bottom: 88px;
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    padding-bottom: 2px;
  }
  html[data-skin="oppo"] .ctl-group { padding: 3px; flex: none; }
  html[data-skin="oppo"] .ctl-btn { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
  html[data-skin="oppo"] .ctl-group select { font-size: 12px; }
  html[data-skin="oppo"] #map-tools { width: 84px; top: 10px; right: 10px; padding: 7px 6px 6px; }
  html[data-skin="oppo"] .mt-title { font-size: 11.5px; padding: 0 5px 6px; }
  html[data-skin="oppo"] .mt-item { padding: 6px 5px; font-size: 12px; }
  html[data-skin="oppo"] #info-card {
    left: 10px; right: 10px; bottom: 10px; top: auto; width: auto;
    max-height: 74vh; border-radius: 18px; padding: 18px 14px 14px;
    overflow: auto;
  }
  html[data-skin="oppo"] .info-toggle { display: none !important; }
  html[data-skin="oppo"] .sheet-handle {
    display: block; position: absolute; top: 7px; left: 50%;
    transform: translateX(-50%); width: 36px; height: 4px;
    border-radius: 2px; background: var(--border);
  }
  html[data-skin="oppo"] .map-attrib { display: none; }
  html[data-skin="oppo"] #dashboard { padding: 14px; }
}
/* 浅色底图叠一层 OPPO 绿清新调, 贴近云服务地图观感 */
html[data-skin="oppo"] #map-wrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: rgba(176, 214, 146, .30);
  mix-blend-mode: multiply;
}
html[data-skin="oppo"][data-theme="dark"] #map-wrap::after { display: none; }
/* ================= 远程拍照 (设备列表/看板/信息卡 -> 照片弹窗) ================= */
.photo-box { width: 820px; max-width: 94vw; }
.photo-dev { font-size: 12px; font-weight: 500; color: var(--muted); }
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px; max-height: 58vh; overflow: auto; padding: 2px;
}
.photo-card {
  position: relative; border-radius: 13px; overflow: hidden;
  background: var(--bg); box-shadow: var(--shadow-out-sm);
}
.photo-card img {
  display: block; width: 100%; height: 126px; object-fit: cover;
  cursor: zoom-in; background: var(--panel2);
}
.photo-card img:hover { opacity: .92; }
.photo-card .pbadge {
  position: absolute; top: 6px; left: 6px; font-size: 10px; line-height: 1;
  padding: 4px 7px; border-radius: 7px; color: #fff;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px);
}
.photo-card .pfoot {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 8px; font-size: 11px; color: var(--muted);
}
.photo-card .pfoot .psize { color: var(--text-soft); font-family: "SFMono-Regular", Consolas, monospace; }
.photo-card .pdel { color: var(--red); cursor: pointer; opacity: .8; }
.photo-card .pdel:hover { opacity: 1; text-decoration: underline; }
.photo-card.fail { border: 1px dashed var(--border); }
.photo-fail {
  height: 126px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; font-size: 11.5px;
  color: var(--red); padding: 10px; line-height: 1.55; word-break: break-all;
}
.photo-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 26px 0; line-height: 1.7; }
.photo-viewer {
  position: fixed; inset: 0; z-index: 2600; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: rgba(8, 11, 16, .9); backdrop-filter: blur(4px);
}
.photo-viewer img { max-width: 94vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.photo-viewer-info { color: #cfd8e4; font-size: 12px; }
.photo-viewer-close {
  position: absolute; top: 18px; right: 22px; width: 38px; height: 38px;
  border: none; border-radius: 50%; cursor: pointer; font-size: 16px;
  color: #fff; background: rgba(255, 255, 255, .14);
}
.photo-viewer-close:hover { background: rgba(255, 255, 255, .26); }
#photo-facing {
  height: 30px; padding: 0 8px; border: none; border-radius: 9px;
  background: var(--bg); color: var(--text); font-size: 12px;
  box-shadow: var(--shadow-in); outline: none; cursor: pointer;
}
@media (max-width: 860px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 52vh; }
  .photo-card img, .photo-fail { height: 96px; }
}

/* ================= 监听声音 (分片回传 + 连续播放) ================= */
.audio-box { width: 720px; max-width: 94vw; }
.audio-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  padding: 8px 12px; border-radius: 12px; background: var(--bg);
  box-shadow: var(--shadow-in);
}
.audio-now { font-size: 12px; color: var(--muted); }
.audio-list { max-height: 48vh; overflow: auto; padding: 2px; }
.audio-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 12px; margin-bottom: 7px; background: var(--bg);
  box-shadow: var(--shadow-out-sm);
}
.audio-row .a-seq {
  flex: none; width: 40px; font-size: 11px; color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
}
.audio-row .a-info { flex: 1; min-width: 0; }
.audio-row .a-t { font-size: 12.5px; font-weight: 600; }
.audio-row .a-s {
  font-size: 11px; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.audio-row.fail .a-t { color: var(--red); }
#audio-dur {
  height: 30px; padding: 0 8px; border: none; border-radius: 9px;
  background: var(--bg); color: var(--text); font-size: 12px;
  box-shadow: var(--shadow-in); outline: none; cursor: pointer;
}

/* ================= 通话记录 / 短信 ================= */
.logs-box { width: 760px; max-width: 94vw; }
.logs-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.ltab {
  border: none; cursor: pointer; font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 10px; color: var(--text-soft);
  background: var(--bg); box-shadow: var(--shadow-out-sm);
}
.ltab span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.ltab.active { color: var(--accent); box-shadow: var(--shadow-in); }
.logs-list { max-height: 52vh; overflow: auto; padding: 2px; }
.log-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px;
  border-radius: 12px; margin-bottom: 7px; background: var(--bg);
  box-shadow: var(--shadow-out-sm);
}
.log-type {
  flex: none; min-width: 44px; text-align: center; font-size: 11px;
  padding: 3px 7px; border-radius: 8px; color: var(--muted);
  background: var(--panel2); margin-top: 1px;
}
.log-type.in { color: var(--green); }
.log-type.out { color: var(--accent); }
.log-type.miss { color: var(--red); }
.log-info { flex: 1; min-width: 0; }
.log-nm { font-size: 12.5px; font-weight: 600; }
.log-sub {
  font-size: 11px; color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.log-body {
  font-size: 12px; color: var(--text-soft); margin-top: 3px; line-height: 1.55;
  word-break: break-all; max-height: 4.8em; overflow: hidden;
}
.log-time { flex: none; font-size: 11px; color: var(--muted); margin-top: 2px; }
.log-row.sms { align-items: flex-start; }
@media (max-width: 860px) {
  .audio-list, .logs-list { max-height: 46vh; }
  .log-time { display: none; }
}

/* ================= 监听声音: 实时对讲式界面 ================= */
.audio-live {
  display: flex; align-items: center; gap: 9px; margin: 6px 0 10px;
  padding: 14px 16px; border-radius: 14px; background: var(--bg);
  box-shadow: var(--shadow-in); font-size: 13px; color: var(--text-soft);
}
.audio-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--muted); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
.audio-dot.live { background: var(--green); animation: audioPulse 1.2s infinite; }
@keyframes audioPulse {
  0% { box-shadow: 0 0 0 0 rgba(39, 164, 104, .55); }
  70% { box-shadow: 0 0 0 12px rgba(39, 164, 104, 0); }
  100% { box-shadow: 0 0 0 0 rgba(39, 164, 104, 0); }
}

/* ================= 地图悬浮缩放(＋/－) ================= */
#zoom-ctl {
  position: absolute; right: 14px; z-index: 900;
  bottom: 150px; display: flex; flex-direction: column; gap: 6px;
}
#zoom-ctl button {
  width: 42px; height: 42px; border: 1px solid var(--border); cursor: pointer;
  border-radius: 12px; background: var(--glass-strong); color: var(--text);
  font-size: 20px; line-height: 1; font-weight: 600;
  box-shadow: 0 4px 16px rgba(16, 24, 40, .12);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
}
#zoom-ctl button:hover { color: var(--accent); }
#zoom-ctl button:active { box-shadow: var(--shadow-in); }
@media (max-width: 860px) {
  #zoom-ctl { right: 10px; bottom: 170px; }
  #zoom-ctl button { width: 46px; height: 46px; border-radius: 14px; font-size: 22px; }
}

/* ================= 服务器卡片底部: 运行 / 系统 / PHP / 采样 单独一行 ================= */
.srv-sys {
  display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px;
  padding: 10px 14px; border-radius: 12px; background: var(--bg);
  box-shadow: var(--shadow-in); font-size: 12px; color: var(--text-soft);
}
.srv-sys .sys-item { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.srv-sys .sys-item b { font-weight: 600; color: var(--muted); }
.srv-sys .sys-item span {
  font-family: "SFMono-Regular", Consolas, monospace; color: var(--text);
  word-break: break-all;
}
@media (max-width: 860px) {
  .srv-sys { font-size: 11.5px; gap: 8px 14px; }
}

/* 与 CPU/内存 同款卡片, 但没有百分比进度条的行 */
.srv-item.plain { display: flex; align-items: center; min-height: 66px; }
.srv-item.plain .srv-top { width: 100%; margin-bottom: 0; align-items: center; }
.srv-item.plain .srv-top span:last-child {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px; word-break: break-all;
}
@media (max-width: 860px) {
  .srv-item.plain { min-height: 52px; }
}
