/**
 * AI智诊云 - 样式文件 (Stylesheet)
 * 分区: [A]基础布局 [B]面板组件 [C]表单按钮 [D]分区面板 [E]进度条 [F]日志 [G]地图 [H]弹窗 [I]浅色主题
 */

/* ===== [A] 基础布局 (Base Layout) ===== */
/* AI智诊云 - 样式文件 (从 dashboard.html 提取) */

/* === Style Block 1 === */
/* Mobile optimizations */
@media (max-width: 768px) {
  body { padding: 0; font-size: 15px; }
  h1 { font-size: 16px !important; padding: 10px 12px; margin: 0; background: #16213e; }
  h1 img { height: 28px !important; }
  .panel { padding: 10px 8px; margin-bottom: 8px; border-radius: 0; }
  /* Top bar compact */
  .row { gap: 6px; padding: 8px; }
  /* D1-D7: vertical accordion list */
  .zone-panel { display: block !important; overflow: visible; max-height: none; }
  .zone-group { flex: unset !important; width: 100% !important; border-right: none !important; border-bottom: 1px solid #0f3460; height: auto !important; }
  .zone-group-hdr { font-size: 14px !important; padding: 10px 8px !important; }
  .zone-items { overflow: visible !important; }
  .zone-items label { font-size: 13px !important; padding: 8px !important; white-space: normal !important; }
  /* Bigger touch targets */
  button { padding: 10px 16px !important; font-size: 15px !important; min-height: 40px; }
  input, select { font-size: 16px !important; padding: 10px 12px !important; min-height: 40px; }
  /* Single column layout for form */
  .form-grid { flex-direction: column !important; }
  .form-field { width: 100% !important; }
  #btnExport { width: 100%; }
  /* Login */
  #loginOverlay { padding: 0 !important; }
  #loginBox { width: 100vw !important; height: 100svh !important; grid-template-columns: 1fr !important; border-radius: 0 !important; }
  .login-art-panel { display: none !important; }
  .login-form-panel { padding: 26px 22px !important; }
  .login-form-inner { width: 100% !important; max-width: 360px !important; }
  /* User mgmt */
  #userMgrOverlay > div { min-width: unset !important; width: 96vw !important; padding: 14px !important; }
  /* Progress */
  .progress-bar { height: 22px !important; }
  .progress-text { font-size: 13px !important; }
  /* Log */
  #log { height: 200px; font-size: 12px; }
  /* Map */
  #mapOverlay > div { width: 100vw !important; height: 100vh !important; }
  /* Top icons */
  .row > span[style*="margin-left"] { display: none; }
  /* Hide toolbar text, keep icons */
  .zone-toolbar { flex-wrap: wrap; gap: 4px; font-size: 13px !important; }
  .zone-toolbar a, .scene-chip { font-size: 13px !important; padding: 5px 10px !important; }
  /* Info panel */
  #mapInfoPanel { top: 60px !important; left: 8px !important; min-width: 180px !important; font-size: 12px !important; }
  /* Version info popup */
  #versionInfo { right: 4px !important; min-width: 300px !important; max-width: 95vw !important; }
  .top-header { align-items: flex-start; margin: 0 0 12px; padding: 8px; }
  .top-left { flex-direction: column; align-items: flex-start; gap: 8px; }
  .overview-head { flex-direction: column; padding: 12px; }
  .product-summary { display: block; }
  .product-summary .overview-head, .product-summary .product-main-grid, .product-summary .overview-map-block { grid-column: auto; grid-row: auto; }
  .product-main-grid { grid-template-columns: 1fr; }
  .product-main-grid { padding-top: 0; }
  .overview-map-card { width: 100%; height: 300px; }
  .overview-lower-grid { grid-template-columns: 1fr; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-metrics { padding-top: 0; }
  .overview-grid, .tool-grid-page, .device-overview-grid { grid-template-columns: 1fr; }
  .overview-controls { width: 100%; align-items: stretch; }
  .overview-map-card { min-height: 280px; }
  .mini-section { border-radius: 16px; padding: 18px 16px; }
  .mini-overview .module-title { font-size: 28px; }
  .metric-number { font-size: 38px; }
  #overviewAmap { min-height: 300px; }
  .detail-command-row { grid-template-columns: 1fr 1fr; }
  .detail-command-row input { grid-column: 1 / -1; width: 100%; }
  .detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-info-grid, .sim-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-sim-layout { grid-template-columns: 1fr; }
  .traffic-ring-card { min-height: 180px; }
  .tool-inline { flex-direction: column; align-items: stretch; }
  .tool-input { width: 100%; min-width: 0; }
  .tool-section, .tool-card-sm, .tool-card-md, .tool-card-wide, .tool-card-xl { width: 100%; }
  .content-fit-section { width: 100%; }
}

/* === Style Block 2 === */
* { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: rgba(0,212,170,.28); color: #fff; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; letter-spacing: 0.02em; line-height: 1.6; background: #1a1a2e; color: #e0e0e0; padding: 20px; font-size: 17px; }
h1 { color: #00d4aa; font-size: 25px; margin-bottom: 12px; }
.top-header { position: sticky; top: 0; z-index: 80; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: -20px -20px 0; border-bottom: 1px solid #4a4d51; padding: 8px 20px; overflow: visible; background: #35373a; }
.header-actions { position: relative; z-index: 1; }
.top-left { display: flex; align-items: center; min-width: 0; }
.top-left h1 { position: relative; z-index: 1; }
.top-brand { display: flex; align-items: center; gap: 10px; min-width: max-content; margin: 0; padding: 0; color: #e8edf3; background: transparent; }
.top-brand-logo { display: block; width: 58px; height: 48px; flex: 0 0 58px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.34)); }
.top-brand-lockup { display: flex; align-items: center; gap: 2px; min-width: max-content; }
.top-brand-haier { display: block; width: 57px; height: 32px; flex: 0 0 57px; object-fit: contain; }
.top-brand-title { color: inherit; font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 20px; font-weight: 400; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.user-role-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid currentColor; border-radius: 4px; cursor: default; }
.user-role-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.user-role-icon.role-admin { color: #e2b84c; background: rgba(226,184,76,.1); border-color: rgba(226,184,76,.62); }
.user-role-icon.role-after-sales, .user-role-icon.role-hardware-test { color: #d1d7df; background: rgba(209,215,223,.09); border-color: rgba(209,215,223,.55); }
.user-role-icon.role-user { color: #f8fafc; background: #111827; border-color: #f8fafc; }
body.light .user-role-icon.role-admin { color: #a16207; background: #fff8dc; border-color: #d6a72d; }
body.light .user-role-icon.role-after-sales, body.light .user-role-icon.role-hardware-test { color: #64748b; background: #f8fafc; border-color: #aeb9c7; }
body.light .user-role-icon.role-user { color: #111827; background: #fff; border-color: #111827; }
.fullscreen-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: #b7c4d4; background: rgba(255,255,255,.035); border: 1px solid rgba(148,163,184,.2); border-radius: 4px; }
.fullscreen-toggle:hover { color: #fff; background: rgba(255,255,255,.1); transform: none; }
.fullscreen-toggle:focus-visible { outline: 2px solid #00d4aa; outline-offset: 2px; }
.fullscreen-toggle svg { grid-area: 1 / 1; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen-toggle .fullscreen-exit-icon { display: none; }
.fullscreen-toggle.is-active { color: #00d4aa; border-color: rgba(0,212,170,.48); background: rgba(0,212,170,.09); }
.fullscreen-toggle.is-active .fullscreen-enter-icon { display: none; }
.fullscreen-toggle.is-active .fullscreen-exit-icon { display: block; }
.fullscreen-toggle:disabled { color: #687386; cursor: not-allowed; opacity: .58; }
body.light .fullscreen-toggle { color: #64748b; background: #f8fafc; border-color: #d9e2ec; }
body.light .fullscreen-toggle:hover { color: #0f766e; background: #edf5f5; }
body.light .fullscreen-toggle.is-active { color: #0f766e; border-color: #7ccfc1; background: #e7f8f5; }
.panel { background: #16213e; border: 1px solid #0f3460; border-radius: 6px; padding: 16px; margin-bottom: 16px; }
.main-tabs { position: absolute; top: 50%; left: 50%; z-index: 1; display: grid; grid-template-columns: repeat(7, minmax(76px, 1fr)); align-items: stretch; width: min(790px, calc(100vw - 430px)); min-width: 560px; margin: 0; padding: 0; transform: translate(-50%, -50%); }
.main-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px; padding: 4px 8px; overflow: hidden; background: transparent; color: #94a3b8; border: 0; border-radius: 0; font-size: 13px; line-height: 1.25; transition: color .16s ease, background-color .16s ease; }
.main-tab::before { position: absolute; top: 0; left: 18%; width: 64%; height: 3px; background: #00d4aa; border-radius: 0 0 2px 2px; content: ""; opacity: 0; transform: scaleX(.35); transition: opacity .16s ease, transform .16s ease; }
.main-tab-icon { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main-tab:hover { transform: none; background: rgba(15, 52, 96, .52); color: #e2e8f0; }
.main-tab:focus-visible { z-index: 1; outline: 2px solid #00d4aa; outline-offset: -2px; }
.main-tab.active { background: rgba(0, 212, 170, .08); color: #00d4aa; border-color: transparent; }
.main-tab.active::before { opacity: 1; transform: scaleX(1); }
.fault-reminder { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: #b7c4d4; background: rgba(255,255,255,.035); border: 1px solid rgba(148,163,184,.2); border-radius: 4px; }
.fault-reminder:hover { background: rgba(255,255,255,.1); color: #fff; transform: none; }
.fault-reminder:focus-visible { outline: 2px solid #00d4aa; outline-offset: 2px; }
.fault-reminder svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fault-reminder-count { position: absolute; top: -7px; right: -8px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid #1a1a2e; border-radius: 10px; color: #fff; background: #ef4444; font-size: 10px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
body.light .fault-reminder { color: #64748b; background: #f8fafc; border-color: #d9e2ec; }
body.light .fault-reminder:hover { background: #edf5f5; color: #0f766e; }
body.light .fault-reminder-count { border-color: #fff; }
body.light .top-header { background: #eff5f7; }
body.light .top-brand { color: #1f2937; }
body.light .top-brand-haier { filter: invert(1) grayscale(1) contrast(1.2); }
@media (max-width: 768px) {
  .top-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 10px; }
  .top-left { display: contents; }
  .top-brand { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
  .top-brand-logo { width: 38px !important; height: 30px !important; flex-basis: 38px; }
  .top-brand-haier { width: 42px !important; height: 24px !important; flex-basis: 42px; }
  .top-brand-title { font-size: 16px; }
  .main-tabs { position: static; grid-column: 1; grid-row: 2; grid-template-columns: repeat(7, minmax(82px, 1fr)); width: 100%; min-width: 0; overflow-x: auto; transform: none; scrollbar-width: none; }
  .header-actions { position: static; grid-column: 2; grid-row: 2; align-self: start; }
  .main-tabs::-webkit-scrollbar { display: none; }
  .main-tab { min-height: 68px; padding: 4px 6px; font-size: 13px; }
}
@media (min-width: 769px) and (max-width: 1400px) {
  .top-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; }
  .top-left { display: contents; }
  .top-brand { grid-column: 1; grid-row: 1; justify-self: start; }
  .main-tabs { position: static; grid-column: 1 / -1; grid-row: 2; width: min(790px, 100%); min-width: 560px; justify-self: center; transform: none; }
  .header-actions { position: static; grid-column: 2; grid-row: 1; }
}
.main-page { display: none !important; }
.main-page.active { display: block !important; animation: pageFade 0.16s ease-out; }
.main-page.active.mini-overview { display: flex !important; }
#overviewPage.active { animation: overviewPageFade 0.12s ease-out; }
/* Leave the top edge of page-level panels clear of the fixed header. */
#anomalyOverviewPage.active,
#exportPage.active {
  min-height: 0 !important;
  padding-top: 12px;
}
body:has(#anomalyOverviewPage.active),
body:has(#exportPage.active) {
  padding-bottom: 0;
}
#exportPage .panel { border-radius: 22px; }
#exportPage.active > .panel:last-child { margin-bottom: 0; }
#exportPage .panel:nth-child(2) { padding-bottom: 8px; }
#exportPage .panel:nth-child(2) > .cmd-section:last-child { margin-bottom: 0; }
#exportPage .zone-panel + .form-grid { align-items: flex-end; }
.export-action-grid { display: grid; grid-template-columns: calc(21% - 6.3px) calc(12.5% - 3.75px) repeat(2, calc(25% - 7.5px)); justify-content: start; gap: 10px; margin-bottom: 10px; }
.export-action-card {
  min-width: 0;
  min-height: 190px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(105deg, #292e36 0%, #333943 56%, #3b424d 100%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.06), inset -1px -1px 0 rgba(0,0,0,0.22), 0 4px 10px rgba(0,0,0,0.16);
}
.export-action-title { margin-bottom: 10px; padding-bottom: 7px; color: #cbd5e1; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 15px; font-weight: 900; }
.export-device-sn-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; }
.export-device-sn-row > span { color: #8b949e; font-size: 15px; font-weight: 800; }
#exportPage .export-device-sn-row #sn { width: 100%; min-width: 0; box-sizing: border-box; color: #e0e0e0; font-size: 18px; font-weight: 900; }
.export-device-model { margin-top: 7px; color: #cbd5e1; font-size: 15px; }
.export-field-error { margin-top: 5px; color: #e94560; font-size: 13px; font-weight: 800; }
.export-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.export-status-row #status { min-width: 0; color: #cbd5e1; }
.export-status-row #btnConnect { flex: 0 0 auto; }
@media (min-width: 1601px) {
  .export-status-row { margin-top: 24px; }
}
.export-start-fields, .export-erase-fields { display: grid; gap: 10px; }
.export-start-fields { grid-template-columns: minmax(140px, .68fr) minmax(0, 1.32fr); align-items: start; }
.export-action-card .form-field { min-width: 0; }
.export-action-card .form-field label { color: #9aa7b5; font-size: 13px; font-weight: 800; }
#exportPage .export-action-card input, #exportPage .export-action-card select { width: 100%; min-width: 0; box-sizing: border-box; }
.export-auth-row { display: grid; grid-template-columns: minmax(0, 1fr) 30px auto; gap: 5px; align-items: center; }
.export-password-toggle { width: 30px; min-width: 30px; height: 32px; min-height: 32px; padding: 0; display: grid; place-items: center; background: transparent; border-color: transparent; font-size: 16px; }
.export-password-toggle:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.10); }
.export-inline-action { align-self: end; min-height: 36px; padding: 7px 14px; white-space: nowrap; }
.export-quick-row { display: grid; grid-template-columns: minmax(90px, 1fr) auto; gap: 8px; align-items: center; }
.export-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }
.export-card-actions button { padding: 8px 18px; }
.export-estimate { color: #f0883e; font-size: 16px; }
.export-traffic { color: #3fb950; font-size: 13px; }
.export-erase-card { position: relative; }
.export-erase-card .export-action-title { padding-right: 30px; }
.export-erase-card .export-card-help {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px !important;
  padding: 0 !important;
  box-sizing: border-box;
  color: #dce6f2;
  background: rgba(15,23,42,.22);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 50%;
  font: 700 12px/1 Arial, sans-serif;
  font-size: 12px !important;
}
.export-card-help:hover,
.export-card-help:focus-visible { color: #fff; background: rgba(15,23,42,.48); border-color: rgba(94,234,212,.72); outline: 0; }
.export-card-help-panel {
  position: absolute;
  top: 38px;
  right: 12px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 210px;
  max-width: calc(100% - 24px);
  padding: 9px 11px;
  color: #dce6f2;
  background: #151b26;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0,0,0,.28);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.export-card-help-panel .fc-code { color: #f0883e; font-weight: 800; }
.export-card-help:hover + .export-card-help-panel,
.export-card-help:focus + .export-card-help-panel,
.export-card-help:focus-visible + .export-card-help-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.export-erase-fields { grid-template-columns: minmax(0, .85fr) minmax(230px, 1.15fr); }
.export-clear-status { color: #9aa7b5; font-size: 13px; }
.shared-card-layout { position: relative; }
.shared-card-boundary-resizer {
  position: absolute;
  top: 0;
  z-index: 8;
  width: 14px;
  min-width: 14px;
  padding: 0;
  transform: translateX(-50%);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: col-resize;
  touch-action: none;
}
.shared-card-boundary-resizer::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  opacity: 0;
  background: rgba(148,163,184,.22);
  border-radius: 2px;
  transition: opacity .14s ease, background .14s ease, box-shadow .14s ease;
}
.shared-card-boundary-resizer:hover::before,
.shared-card-boundary-resizer:focus-visible::before,
.shared-card-boundary-resizer.is-active::before {
  opacity: 1;
  background: #5eead4;
  box-shadow: 0 0 0 2px rgba(94,234,212,.16);
}
.shared-card-boundary-resizer:focus-visible { outline: 1px solid rgba(94,234,212,.55); outline-offset: -2px; }
.shared-card-layout.is-shared-card-resizing,
.shared-card-layout.is-shared-card-resizing * { cursor: col-resize !important; user-select: none !important; }
.shared-card-layout[data-shared-layout-enabled="false"] > .shared-card-boundary-resizer { display: none; }
.has-shared-card-height-resizer { position: relative; }
.shared-card-height-resizer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  height: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  cursor: row-resize;
  touch-action: none;
}
.shared-card-height-resizer::before {
  content: '';
  position: absolute;
  right: 18px;
  bottom: 3px;
  left: 18px;
  height: 2px;
  opacity: 0;
  border-radius: 2px;
  background: rgba(148,163,184,.34);
  transition: opacity .14s ease, height .14s ease, background .14s ease, box-shadow .14s ease;
}
.shared-card-height-resizer:hover::before,
.shared-card-height-resizer:focus-visible::before,
.shared-card-height-resizer.is-active::before {
  height: 4px;
  opacity: 1;
  background: #5eead4;
  box-shadow: 0 0 8px rgba(94,234,212,.44);
}
.shared-card-height-resizer:focus-visible { outline: 1px solid rgba(94,234,212,.55); outline-offset: -2px; }
.shared-card-layout.is-shared-card-height-resizing,
.shared-card-layout.is-shared-card-height-resizing * { cursor: row-resize !important; user-select: none !important; }
.shared-card-layout[data-shared-layout-enabled="false"] .shared-card-height-resizer { display: none; }
@media (max-width: 1600px) {
  .export-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .export-action-grid { grid-template-columns: minmax(0, 1fr); }
  .export-action-card { min-height: 0; }
  .export-start-fields, .export-erase-fields { grid-template-columns: minmax(0, 1fr); }
  .export-start-fields > .form-field:first-child { width: 100%; }
  .export-auth-row { grid-template-columns: minmax(0, 1fr) 30px; }
  .export-auth-row #btnExport { grid-column: 1 / -1; width: 100%; }
  .export-quick-row { grid-template-columns: minmax(0, 1fr); }
  .export-quick-row #btnClearZone { width: 100%; }
}
body.neutral-workspace { background: #111827; }
body.neutral-workspace #exportPage.active,
body.neutral-workspace #faultAnalysisPage.active,
body.neutral-workspace #toolsPage.active,
body.neutral-workspace #diagnosticAgentPage.active { background: #111827; }
body:not(.light) #anomalyOverviewPage.active,
body:not(.light) #exportPage.active,
body:not(.light) #faultAnalysisPage.active,
body:not(.light) #toolsPage.active,
body:not(.light) #generationOverviewPage.active,
body:not(.light) #diagnosticAgentPage.active { min-height: calc(100svh - 62px); background: #111827 !important; }
body.neutral-workspace:not(.light) #exportPage.active { background: #111827 !important; }
body:not(.light) #faultAnalysisPage.active,
body:not(.light) #toolsPage.active { background: #111827 !important; }
body.neutral-workspace:not(.light) #exportPage .panel { background: #1f2533 !important; border-color: rgba(255,255,255,.10); }
body.neutral-workspace:not(.light) #exportPage .zone-panel { background: transparent; border-color: transparent; }
body.neutral-workspace:not(.light) #exportPage .zone-group {
  background: linear-gradient(105deg, #292e36 0%, #333943 56%, #3b424d 100%);
  border-color: rgba(255,255,255,0.09);
}
body.neutral-workspace:not(.light) #exportPage .zone-group-hdr { background: rgba(255,255,255,.035); }
body.neutral-workspace:not(.light) #exportPage .zone-group-hdr:hover { background: rgba(255,255,255,.075); }
body.neutral-workspace:not(.light) #exportPage #log {
  background: #151b26;
  border-color: rgba(255,255,255,.10);
  color: #dce5ef;
}
body.neutral-workspace:not(.light) #exportPage input:not([type="checkbox"]),
body.neutral-workspace:not(.light) #exportPage select,
body.neutral-workspace:not(.light) #exportPage .scene-chip { background: #151b26; border-color: rgba(255,255,255,.12); color: #f1f5f9 !important; }
body.neutral-workspace:not(.light) #exportPage input:not([type="checkbox"])::placeholder { color: #8b98a8; }
body.neutral-workspace:not(.light) #exportPage input:not([type="checkbox"]):focus,
body.neutral-workspace:not(.light) #exportPage select:focus { border-color: #00a98f; box-shadow: 0 0 0 2px rgba(0,212,170,.16); }
body.neutral-workspace:not(.light) #exportPage .scene-chip:hover { background: #252d3b; border-color: #00a98f; color: #ffffff; }
body.neutral-workspace:not(.light) #exportPage select option { background: #151b26; color: #f1f5f9; }
body.neutral-workspace:not(.light) #exportPage .export-action-card input:not([type="checkbox"]),
body.neutral-workspace:not(.light) #exportPage .export-action-card select {
  background: #4b535e;
  border-color: #69727e;
  color: #f1f5f9 !important;
  color-scheme: dark;
}
body.neutral-workspace:not(.light) #exportPage .export-action-card input:not([type="checkbox"])::placeholder { color: #cbd5e1; }
body.neutral-workspace:not(.light) #exportPage .export-action-card select option { background: #3f4650; color: #f1f5f9; }
body.light.neutral-workspace { background: #f5f7f9; }
body.light.neutral-workspace #exportPage.active,
body.light.neutral-workspace #faultAnalysisPage.active,
body.light.neutral-workspace #toolsPage.active,
body.light.neutral-workspace #diagnosticAgentPage.active { background: #f5f7f9; }
body.light .export-action-card {
  background: linear-gradient(105deg, #fbfbfc 0%, #f2f3f5 56%, #e7e9ec 100%);
  border-color: rgba(148,163,184,0.18);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.95), inset -1px -1px 0 rgba(100,116,139,0.10), 0 4px 10px rgba(15,23,42,0.07);
}
body.light .export-action-title { color: #334155; border-bottom-color: rgba(148,163,184,.18); }
body.light .export-device-sn-row > span, body.light .export-action-card .form-field label, body.light .export-clear-status { color: #64748b; }
body.light .export-device-model { color: #334155; }
body.light #exportPage .export-device-sn-row #sn { color: #111827; }
body.light .export-password-toggle:hover { background: rgba(15,23,42,.06); border-color: rgba(148,163,184,.22); }
body.light .export-card-help { color: #28435d; background: rgba(255,255,255,.55); border-color: rgba(15,52,96,.25); }
body.light .export-card-help:hover, body.light .export-card-help:focus-visible { color: #0f172a; background: #fff; border-color: #14b8a6; }
body.light .export-card-help-panel { color: #334155; background: #f8fafc; border-color: #cbd5e1; box-shadow: 0 8px 18px rgba(15,23,42,.14); }
body.light #exportPage .export-action-card input:not([type="checkbox"]),
body.light #exportPage .export-action-card select { background: #d8dadd; border-color: #aab0b8; color: #1f2937; color-scheme: light; }
body.light #exportPage .export-action-card input:not([type="checkbox"])::placeholder { color: #667085; }
@keyframes pageFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes overviewPageFade { from { opacity: .96; } to { opacity: 1; } }
.mini-overview { display: flex; flex-direction: column; gap: 14px; background: #111827; border: 1px solid #0f3460; border-radius: 10px; padding: 14px; }
.mini-overview.active { height: auto; min-height: 0; overflow: visible; }
.overview-dashboard-layout { display: grid; grid-template-columns: minmax(760px, 1.48fr) minmax(500px, .95fr); gap: 14px; width: 100%; height: 100%; min-height: 0; }
.overview-left-column, .overview-right-column { min-width: 0; min-height: 0; }
.overview-left-column { display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.overview-right-column { overflow: hidden; }
.mini-section { border: 1px solid rgba(255,255,255,0.08); border-radius: 22px; padding: 22px 26px; overflow: hidden; }
.content-fit-section { overflow: visible; }
.product-summary { background: #1f2533; color: #c9d1d9; }
.device-summary { background: #1f2533; color: #c9d1d9; }
.device-detail { background: #1f2533; color: #c9d1d9; }
.product-summary { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 18px; align-items: start; width: 100%; max-width: 100%; overflow: hidden; }
.product-summary .overview-head { grid-column: 1; grid-row: 1; }
.product-summary .product-main-grid { grid-column: 1 / -1; grid-row: 1; }
.product-summary .overview-map-block { grid-column: 2; grid-row: 1; }
.overview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; background: transparent; border: 0; border-radius: 0; padding: 0; margin-bottom: 18px; }
.product-summary .overview-head { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 10px; margin-bottom: 0; pointer-events: auto; }
.module-title { color: #00d4aa; font-size: 20px; font-weight: bold; margin-bottom: 4px; }
.mini-overview .module-title { color: #e6edf3; font-size: 29px; line-height: 1.05; letter-spacing: 0; white-space: nowrap; }
.module-subtitle, .section-note { color: #a1afbd; font-size: 13px; line-height: 1.5; }
.mini-overview .module-subtitle { color: #8b949e; margin-top: 6px; }
.overview-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.overview-controls label { font-size: 13px; margin-bottom: 2px; color: #8b949e; }
.overview-controls select { min-width: 118px; background: rgba(0,0,0,0.3); color: #c9d1d9; border-color: rgba(255,255,255,0.1); font-weight: bold; }
.overview-scene-select-wrap { width:100%; }
#overviewSceneSelect { position:relative; z-index:4; min-width:120px; width:120px; font-size:13px; padding-left:8px; padding-right:24px; cursor:pointer; background:rgba(0,0,0,0.3); color:#c9d1d9; border-color:rgba(255,255,255,0.1); font-weight:bold; }
#overviewSceneSelect option { font-size:13px; }
#overviewProductType { position: relative; z-index: 4; min-width: 120px; width: 120px; font-size: 13px; padding-left: 8px; padding-right: 24px; cursor: pointer; }
#overviewProductType option { font-size: 13px; }
.product-main-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 18px; align-items: start; width: 100%; min-width: 0; padding-top: 0; pointer-events: none; }
.product-main-grid .overview-metrics, .product-main-grid .overview-map-block { pointer-events: auto; }
.overview-metrics { display: grid; grid-template-columns: 128px; gap: 8px; margin: 0; padding-top: 228px; justify-content: start; }
.metric-box { border: 1px solid rgba(255,255,255,0.10); border-radius: 14px; padding: 10px 12px; min-height: 78px; scroll-margin-top: 96px; scroll-margin-bottom: 18px; background: rgba(255,255,255,0.06); box-shadow: inset 1px 1px 0 rgba(255,255,255,0.07), inset -1px -1px 0 rgba(0,0,0,0.20), 0 4px 10px rgba(0,0,0,0.16); }
.metric-number { color: #e6edf3; font-family: Arial, "Microsoft YaHei", sans-serif; font-size: 34px; font-weight: 900; line-height: 1; }
.metric-produced { background: linear-gradient(105deg, #30405e 0%, #3b4f75 100%); }
.metric-installed { background: linear-gradient(105deg, #4b4331 0%, #62573b 100%); }
.metric-online { background: linear-gradient(105deg, #294b3b 0%, #34634c 100%); }
.metric-offline { background: linear-gradient(105deg, #303640 0%, #3b4450 100%); }
.metric-fault { background: linear-gradient(105deg, #4c2f3a 0%, #623848 100%); }
.metric-label { color: #8b949e; font-size: 15px; margin-top: 6px; }
.overview-grid, .tool-grid-page { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
.tool-grid-page { grid-template-columns: repeat(5, 230px); justify-content: start; align-items: start; gap: 18px; overflow-x: auto; overflow-y: visible; padding: 14px 0 12px; }
.overview-section, .tool-section { background: #16213e; border: 1px solid #0f3460; border-radius: 6px; padding: 16px; }
.device-summary-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.current-product-note { display: inline-flex; flex-wrap: wrap; column-gap: 26px; row-gap: 4px; font-size: 12px; color: #8b949e; }
.overview-note-part { white-space: nowrap; }
.tool-section { width: fit-content; max-width: 100%; }
.tool-pastel { position: relative; border: 0; border-radius: 28px; color: #172033; cursor: pointer; min-height: 150px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15,52,96,.08), 0 6px 16px rgba(15,23,42,.10); transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.tool-pastel::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 18% 14%, rgba(255,255,255,.72), transparent 34%); opacity: .65; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.tool-pastel::after { content: ''; position: absolute; left: 22px; right: 22px; bottom: 14px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.56); opacity: .45; pointer-events: none; transform: scaleX(.42); transform-origin: left; transition: transform .2s ease, opacity .2s ease; }
.tool-pastel:hover { transform: translateY(-8px) scale(1.025); filter: saturate(1.08); box-shadow: inset 0 0 0 1px rgba(15,52,96,.18), 0 18px 34px rgba(15,23,42,.20); }
.tool-pastel:hover::before { opacity: .95; transform: translate(8px, -8px) scale(1.06); }
.tool-pastel:hover::after { opacity: .9; transform: scaleX(1); }
.tool-pastel:active { transform: translateY(-3px) scale(1.01); }
.tool-pastel > * { position: relative; z-index: 1; }
.tool-pastel .section-title2 { color: #111827; font-size: 20px; line-height: 1.25; }
.tool-pastel .section-note { color: #526174; font-size: 14px; line-height: 1.55; }
.tool-pastel .section-row { min-height: 108px; flex-direction: column; justify-content: space-between; }
.tool-pastel .section-row::after { content: '\70b9\51fb\5c55\5f00'; align-self: flex-end; color: #64748b; font-size: 12px; white-space: nowrap; margin-left: 0; margin-top: 12px; transition: transform .18s ease, color .18s ease; }
.tool-pastel:hover .section-row::after { color: #0f766e; transform: translateX(3px); }
.tool-pastel.open .section-row::after { content: '\6536\8d77'; }
.tool-pastel.tool-direct .section-row::after { content: '\70b9\51fb\6253\5f00'; }
.tool-card-body { display: none; margin-top: 12px; cursor: default; }
.tool-modal-open .tool-pastel:not(.open) { filter: brightness(.45) saturate(.65); opacity: .72; }
#toolModalOverlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.78); align-items: center; justify-content: center; padding: 28px; }
.tool-modal-panel { width: fit-content; min-width: min(520px, 88vw); max-width: 92vw; max-height: 82vh; overflow-y: auto; overflow-x: hidden; background: #16213e; border: 1px solid #0f3460; border-radius: 12px; padding: 28px 36px; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.tool-modal-panel-wide { width: 96vw; max-width: 96vw; max-height: 90vh; }
.tool-modal-panel-wide .overview-table-wrap { max-height: 62vh !important; }
.tool-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; border-bottom: 1px solid #0f3460; padding-bottom: 12px; }
.tool-modal-head h3 { color: #00d4aa; margin: 0; font-size: 20px; }
.tool-modal-head span { color: #888; font-size: 13px; }
.tool-modal-close { background: transparent !important; border: 0 !important; color: #e94560 !important; font-size: 28px; line-height: 1; padding: 0 6px !important; min-height: 0; cursor: pointer; }
#toolModalBody .tool-card-body { display: block; margin-top: 0; }
#toolModalBody .tool-inline { margin-top: 12px; }
#toolModalBody .overview-table-wrap { max-height: 430px; width: 100%; overflow-x: hidden; background: rgba(255,255,255,.06); }
#toolModalBody .overview-table { width: 100%; min-width: 0; table-layout: fixed; }
#toolModalBody .overview-table th, #toolModalBody .overview-table td { padding: 7px 8px; }
#toolModalBody .overview-table th { background: #e8eef7; color: #172033; }
#toolModalBody .overview-table td { background: rgba(255,255,255,.035); color: #e8eef7; border-bottom-color: rgba(255,255,255,.08); }
#toolModalBody .overview-table tr:hover td { background: rgba(0,212,170,.08); }
#toolModalBody .overview-table th:nth-child(1), #toolModalBody .overview-table td:nth-child(1) { width: 52px; }
#toolModalBody .overview-table th:nth-child(2), #toolModalBody .overview-table td:nth-child(2) { width: 130px; }
#toolModalBody .overview-table th:nth-child(3), #toolModalBody .overview-table td:nth-child(3) { width: 84px; }
#toolModalBody .overview-table th:nth-child(4), #toolModalBody .overview-table td:nth-child(4) { width: 76px; }
#toolModalBody .overview-table th:nth-child(5), #toolModalBody .overview-table td:nth-child(5) { width: 96px; }
#toolModalBody .overview-table th:nth-child(6), #toolModalBody .overview-table td:nth-child(6) { width: 80px; }
#toolModalBody .overview-table th:nth-child(7), #toolModalBody .overview-table td:nth-child(7) { width: 88px; }
#toolModalBody .overview-table th:nth-child(8), #toolModalBody .overview-table td:nth-child(8) { width: 132px; }
.pastel-blue { background: #dff3ff; }
.pastel-green { background: #e1f7e8; }
.pastel-yellow { background: #fff2c9; }
.pastel-peach { background: #ffe6dc; }
.pastel-lavender { background: #eee7ff; }
.tool-card-sm, .tool-card-md, .tool-card-wide, .tool-card-xl { width: 230px; }
.tool-card-sm.open, .tool-card-md.open, .tool-card-wide.open, .tool-card-xl.open { width: 230px; min-height: 150px; }
.overview-section { margin-bottom: 14px; }
.overview-map-block { margin-top: 0; min-width: 0; }
.device-overview-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: stretch; }
.device-overview-grid.is-drilled { grid-template-columns: minmax(0, 1fr); }
.overview-map-card { position: relative; width: 100%; height: clamp(520px, 34vw, 720px); min-height: 420px; background: linear-gradient(145deg, #050c22 0%, #0a183b 100%); border: 1px solid rgba(52,200,232,.6); border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(52,200,232,.14), 0 0 28px rgba(52,200,232,.24), 0 18px 42px rgba(0,0,0,.38), inset 0 0 34px rgba(52,200,232,.08); }
.overview-map-card::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(rgba(52,200,232,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(52,200,232,.055) 1px, transparent 1px), radial-gradient(circle at 50% 48%, rgba(52,200,232,.12), transparent 58%); background-size: 26px 26px, 26px 26px, 100% 100%; opacity: .42; mix-blend-mode: screen; }
.overview-map-card::after { content: ''; position: absolute; inset: 8px; z-index: 2; pointer-events: none; border-radius: 14px; border: 1px solid rgba(52,200,232,.22); box-shadow: inset 0 0 24px rgba(52,200,232,.12), 0 0 18px rgba(52,200,232,.16); }
#overviewAmap { width: 100%; height: 100%; min-height: 0; display: block; background: #0b2450; filter: saturate(1.18) brightness(.9) contrast(1.08) drop-shadow(0 0 5px rgba(52,200,232,.34)); }
.device-overview-grid.is-drilled #overviewAmap { filter: saturate(1.12) brightness(1.22) contrast(1.04) drop-shadow(0 0 5px rgba(52,200,232,.3)); }
.device-overview-grid.is-street-detail #overviewAmap { filter: saturate(1.04) brightness(1.06) contrast(1.02) drop-shadow(0 0 4px rgba(52,200,232,.22)); }
.overview-province-isolation { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.overview-province-isolation[hidden] { display: none; }
.overview-province-isolation #overviewProvinceIsolationPath { fill: #020817; }
.overview-province-depth { fill: none; stroke: rgba(2,35,68,.98); stroke-width: 16px; stroke-linejoin: round; filter: drop-shadow(0 10px 9px rgba(0,0,0,.78)); }
.overview-province-surface { fill: rgba(18,145,195,.34); stroke: #6feaff; stroke-width: 3px; stroke-linejoin: round; filter: drop-shadow(0 0 7px rgba(45,214,242,.68)); }
.overview-country-depth { fill: rgba(3,45,84,.28); stroke: rgba(5,64,112,.96); stroke-width: 14px; stroke-linejoin: round; transform: translateY(10px); filter: drop-shadow(0 10px 10px rgba(0,0,0,.82)); }
.overview-country-surface { fill: rgba(12,133,183,.16); stroke: #65e9fa; stroke-width: 2.2px; stroke-linejoin: round; filter: drop-shadow(0 0 7px rgba(39,210,238,.72)); }
body.light .overview-province-isolation #overviewProvinceIsolationPath { fill: #eef3f8; }
body.light .overview-province-depth { stroke: rgba(15,77,111,.38); filter: drop-shadow(0 7px 6px rgba(15,23,42,.24)); }
body.light .overview-province-surface { stroke: #1689a6; filter: drop-shadow(0 0 4px rgba(14,116,144,.24)); }
body.light .overview-country-depth { fill: rgba(15,77,111,.12); stroke: rgba(15,77,111,.34); filter: drop-shadow(0 7px 6px rgba(15,23,42,.24)); }
body.light .overview-country-surface { fill: rgba(14,116,144,.08); stroke: #1689a6; filter: drop-shadow(0 0 4px rgba(14,116,144,.24)); }
.overview-map-hit-layer { position: absolute; inset: 0; z-index: 4; cursor: pointer; background: transparent; touch-action: none; }
.overview-amap-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; }
.overview-map-count-marker { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #10233f; background: #fff; border: 2px solid rgba(91,220,243,.92); box-shadow: 0 0 0 3px rgba(47,197,232,.14), 0 3px 9px rgba(0,0,0,.3); font-size: 10px; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.overview-map-count-marker:hover { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(47,197,232,.18), 0 4px 11px rgba(0,0,0,.34); }
.overview-map-count-marker.is-wide { font-size: 8px; }
.overview-city-name-marker { transform: translate(-50%, 16px); color: #fff; font-size: 12px; line-height: 1; font-weight: 800; letter-spacing: 0; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.98), 0 0 6px rgba(4,34,58,.9); pointer-events: none; user-select: none; }
.overview-device-marker { position: relative; width: 28px; height: 28px; display: block; cursor: pointer; filter: drop-shadow(0 4px 8px rgba(0,0,0,.38)); transition: transform .16s ease, filter .16s ease; }
.overview-device-marker::before { content: ''; position: absolute; left: 4px; bottom: -1px; width: 20px; height: 10px; border-radius: 50%; background: var(--marker-color, #00d4aa); opacity: .3; filter: blur(3px); }
.overview-device-marker img { position: relative; width: 28px; height: 28px; display: block; object-fit: contain; }
.overview-device-marker:hover { transform: translateY(-2px) scale(1.06); filter: drop-shadow(0 6px 10px rgba(0,0,0,.46)); }
.map-empty { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: #8b98a8; font-size: 14px; background: rgba(13,17,23,.72); }
.map-empty.is-loading { color: #b7dce5; background: rgba(13,17,23,.18); pointer-events: none; }
.map-scale-badge, .map-center-badge, .map-size-badge { position: absolute; left: 14px; z-index: 5; display: none; color: #dffcff; padding: 4px 7px; border: 1px solid rgba(70,217,240,.28); border-radius: 3px; background: rgba(3,19,43,.74); font: 11px/1.25 Consolas, monospace; text-shadow: 0 1px 3px rgba(0,0,0,.75); pointer-events: none; }
.device-overview-grid.is-drilled .map-scale-badge, .device-overview-grid.is-drilled .map-center-badge { display: block; }
.map-scale-badge { top: 54px; }
.map-center-badge { top: 82px; }
.map-size-badge { top: 76px; }
.map-china-btn { position: absolute; right: 12px; top: 10px; z-index: 9; width: 40px; height: 40px; min-height: 40px; box-sizing: border-box; display: grid; place-items: center; padding: 0 !important; border: 0; border-radius: 6px; background: transparent; color: #7ddde2; line-height: 1; box-shadow: none; cursor: pointer; }
.map-china-btn::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(48,207,220,.28); border-radius: 6px; background: rgba(5,28,38,.72); box-shadow: 0 2px 10px rgba(0,0,0,.14); backdrop-filter: blur(8px); transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.map-china-btn::after { content: attr(data-tooltip); position: absolute; right: 44px; top: 50%; width: max-content; max-width: 120px; padding: 5px 8px; border: 1px solid rgba(48,207,220,.24); border-radius: 4px; background: rgba(3,19,30,.9); color: #dffcff; box-shadow: 0 4px 12px rgba(0,0,0,.18); font-size: 12px; line-height: 1.25; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(4px, -50%); transition: opacity .14s ease, transform .14s ease; }
.map-china-btn:hover, .map-china-btn:focus-visible { color: #b8f6f3; background: transparent; transform: none; box-shadow: none; }
.map-china-btn:hover::before, .map-china-btn:focus-visible::before { border-color: rgba(80,230,235,.65); background: rgba(10,65,72,.88); box-shadow: 0 0 12px rgba(43,210,218,.18); }
.map-china-btn:hover::after, .map-china-btn:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.map-china-btn:focus-visible { outline: 2px solid rgba(94,234,212,.72); outline-offset: 1px; }
.map-china-btn:active::before { background: rgba(12,82,86,.94); box-shadow: 0 0 8px rgba(43,210,218,.14); }
.map-china-btn svg { position: relative; z-index: 1; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
body.light .map-china-btn { color: #187f83; background: transparent; }
body.light .map-china-btn::before { border-color: rgba(20,120,130,.2); background: rgba(255,255,255,.76); box-shadow: 0 2px 10px rgba(15,23,42,.1); }
body.light .map-china-btn::after { border-color: rgba(20,120,130,.18); background: rgba(255,255,255,.96); color: #245f63; box-shadow: 0 4px 12px rgba(15,23,42,.12); }
body.light .map-china-btn:hover, body.light .map-china-btn:focus-visible { color: #0f666a; background: transparent; }
body.light .map-china-btn:hover::before, body.light .map-china-btn:focus-visible::before { border-color: rgba(18,145,145,.48); background: rgba(230,248,247,.96); box-shadow: 0 0 12px rgba(18,145,145,.14); }
body.light .map-china-btn:active::before { background: rgba(218,242,240,.98); }
.device-overview-grid.is-drilled .map-china-btn { right: 224px; }
.overview-map-nav { position: absolute; left: 14px; top: 14px; z-index: 7; display: inline-flex; align-items: center; gap: 8px; color: #dffcff; font-size: 13px; }
.overview-map-nav[hidden] { display: none; }
.overview-map-nav button { width: 30px; min-height: 30px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(70,217,240,.5); border-radius: 50%; background: rgba(3,19,43,.84); color: #5ce7f6; box-shadow: 0 5px 16px rgba(0,0,0,.25); }
.overview-map-nav button:hover { color: #fff; border-color: #5ce7f6; background: rgba(6,45,76,.94); }
.overview-map-nav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.overview-map-nav span { padding: 5px 8px; border-radius: 4px; background: rgba(3,19,43,.72); text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.province-stats { position: absolute; top: 60px; right: 12px; bottom: 12px; z-index: 8; width: 98px; min-height: 0; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(46,178,226,.48); border-radius: 6px; background: transparent; color: #dffcff; box-shadow: inset 0 0 22px rgba(40,171,225,.06), 0 10px 26px rgba(0,0,0,.26); backdrop-filter: none; pointer-events: auto; }
.province-stats[hidden] { display: none; }
.province-stats-title { flex: 0 0 auto; padding: 10px 10px 8px; border-bottom: 1px solid rgba(76,196,226,.22); color: #8eeaf4; font-size: 11px; line-height: 1.3; font-weight: 800; }
.province-stats-list { min-height: 0; overflow-y: auto; padding: 5px; scrollbar-width: thin; scrollbar-color: rgba(92,213,232,.5) transparent; }
.province-stat-item { width: 100%; min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px; border: 0; border-radius: 3px; background: transparent; color: #dffcff; font-size: 11px; line-height: 1.2; font-weight: 700; cursor: pointer; text-align: left; text-shadow: none; }
.province-stat-item:hover { background: rgba(55,205,229,.18); color: #fff; transform: none; box-shadow: inset 0 0 0 1px rgba(94,234,212,.18); }
.province-stat-item:focus-visible { outline: 2px solid #5eead4; outline-offset: -2px; }
.province-stat-item.active { background: rgba(0,184,148,.52); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.72); box-shadow: inset 3px 0 0 #6ffff0, inset 0 0 0 1px rgba(111,255,240,.48), 0 0 12px rgba(0,212,170,.18); }
.province-stat-item.active:hover { background: rgba(0,198,160,.62); box-shadow: inset 3px 0 0 #9afff2, inset 0 0 0 1px rgba(154,255,242,.58), 0 0 14px rgba(0,212,170,.24); }
.province-stat-item.active .province-stat-count { color: #fff; }
.province-stat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.province-stat-count { flex: 0 0 auto; min-width: 18px; padding: 0; border-radius: 0; background: transparent; color: #f4fdff; font-size: 11px; line-height: 1.2; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.province-count-marker { color: #10233f; background: #fff; border: 2px solid rgba(91,220,243,.92); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-size: 10px; font-weight: 900; white-space: nowrap; box-shadow: 0 0 0 3px rgba(47,197,232,.14), 0 3px 9px rgba(0,0,0,.3); }
.province-map-tooltip { position: absolute; z-index: 8; min-width: 104px; padding: 7px 9px; border: 1px solid rgba(0,245,212,.46); border-radius: 8px; background: rgba(4,13,30,.88); color: #dffcff; box-shadow: 0 8px 22px rgba(0,0,0,.28), 0 0 18px rgba(0,212,170,.18); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease; backdrop-filter: blur(8px); }
.province-map-tooltip.show { opacity: 1; transform: translateY(0); }
.province-map-tooltip strong { display: block; font-size: 13px; line-height: 1.25; color: #00f5d4; }
.province-map-tooltip span { display: block; margin-top: 3px; font-size: 11px; color: rgba(223,252,255,.82); }
.overview-map-debug { position: absolute; left: 14px; top: 108px; z-index: 9; display: none; max-width: 260px; padding: 6px 8px; border-radius: 6px; background: rgba(0,0,0,.72); color: #ffe66d; font-size: 11px; line-height: 1.45; pointer-events: none; }
.overview-map-debug.show { display: block; }
.overview-station-panel { position: absolute; top: 12px; right: 12px; z-index: 8; width: min(198px, calc(100% - 24px)); height: calc(100% - 24px); max-height: calc(100% - 24px); min-height: 0; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(32,145,217,.66); border-radius: 2px; background: rgba(2,18,36,.46); color: #eafcff; box-shadow: inset 0 0 0 1px rgba(56,184,229,.08), 0 10px 24px rgba(0,0,0,.18); backdrop-filter: blur(1.5px); }
.overview-station-panel[hidden] { display: none; }
.overview-station-panel header { display: flex; align-items: center; padding: 16px 14px 10px; }
.overview-station-panel header strong { color: #fff; font-size: 15px; line-height: 1.25; letter-spacing: 0; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.85); }
.overview-station-search { position: relative; display: block; min-width: 0; margin: 0 12px 10px; }
.overview-station-search svg { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: #6f9eb0; stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.overview-station-search input { width: 100%; height: 34px; box-sizing: border-box; padding: 0 8px 0 32px; border: 1px solid rgba(39,177,225,.64); border-radius: 4px; outline: 0; background: rgba(5,24,43,.55); color: #effdff; font-size: 12px; }
.overview-station-search input:focus { border-color: #58e7f4; box-shadow: 0 0 0 2px rgba(64,218,238,.14); }
.overview-station-search input::placeholder { color: #668391; }
.overview-station-list { min-height: 0; min-width: 0; flex: 1; overflow-x: hidden; overflow-y: auto; padding: 0 6px 12px 10px; scrollbar-color: rgba(92,213,232,.55) transparent; scrollbar-width: thin; scrollbar-gutter: stable; }
.overview-station-group { width: 100%; min-width: 0; max-width: 100%; overflow: hidden; }
.overview-station-group + .overview-station-group { margin-top: 10px; }
.overview-station-group-title { width: 100%; min-width: 0; min-height: 32px; box-sizing: border-box; padding: 0 5px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 0; background: transparent; color: #dffcff; text-align: left; font-size: 12px; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.overview-station-group-title:hover { color: #fff; background: rgba(51,201,224,.08); transform: none; box-shadow: none; }
.overview-station-group-title span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-station-group-title b { color: #fff; font-size: 12px; }
.overview-station-items { width: calc(100% - 6px); min-width: 0; box-sizing: border-box; border-left: 1px solid rgba(62,181,212,.22); margin-left: 6px; overflow: hidden; }
.overview-station-item { width: 100%; min-width: 0; max-width: 100%; min-height: 34px; box-sizing: border-box; display: block; padding: 6px 6px 6px 10px; border: 0; border-radius: 0; background: transparent; color: #f2fdff; text-align: left; overflow: hidden; }
.overview-station-item:hover { background: rgba(45,195,222,.1); transform: none; box-shadow: none; }
.overview-station-item strong { display: block; width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.45; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.overview-station-empty { padding: 32px 10px; color: #6e939f; font-size: 12px; text-align: center; }
@media (max-width: 900px) {
  .province-stats { width: 86px; }
  .overview-station-panel { width: min(168px, calc(100% - 24px)); }
  .overview-station-panel header { padding-inline: 10px; }
  .overview-station-search { margin-inline: 8px; }
  .overview-station-list { padding-left: 7px; padding-right: 4px; }
  .device-overview-grid.is-drilled .map-china-btn { left: 14px; right: auto; top: auto; bottom: 14px; }
}
.overview-locate-marker { width: 28px; height: 28px; border-radius: 50%; background: rgba(0,212,170,.18); border: 2px solid #00d4aa; box-shadow: 0 0 0 8px rgba(0,212,170,.16), 0 8px 18px rgba(0,0,0,.24); display: flex; align-items: center; justify-content: center; animation: locatePulse 1.2s ease-out infinite; }
.overview-locate-marker span { width: 10px; height: 10px; border-radius: 50%; background: #00d4aa; border: 2px solid #fff; }
.overview-self-marker { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(37,99,235,.2), 0 4px 12px rgba(0,0,0,.22); }
@keyframes locatePulse { 0% { box-shadow: 0 0 0 0 rgba(0,212,170,.34), 0 8px 18px rgba(0,0,0,.24); } 100% { box-shadow: 0 0 0 14px rgba(0,212,170,0), 0 8px 18px rgba(0,0,0,.24); } }
.overview-map-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; color: #64748b; font-size: 13px; }
.overview-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #9aa7b5; }
.dot.online { background: #3fb950; }
.dot.fault { background: #f0883e; }
.dot.offline { background: #8b98a8; }
.section-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.content-fit-section { width: min(100%, 1298px); max-width: 100%; }
.overview-lower-grid { display: grid; grid-template-columns: min(100%, 1298px); gap: 14px; align-items: start; }
.section-title2 { color: #e6edf3; font-size: 26px; font-weight: 900; margin-bottom: 3px; }
.tool-section .section-title2 { color: #d8e2ef; font-size: 16px; }
.tool-section.tool-pastel .section-title2 { color: #111827; font-size: 20px; }
.overview-table-wrap { overflow: auto; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; max-height: 360px; background: rgba(0,0,0,0.25); }
.overview-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1224px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.overview-table th, .overview-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.06); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-table th { color: #c9d1d9; background: #1a2a2e; position: sticky; top: 0; z-index: 1; font-size: 15px; }
.overview-table td { color: #c9d1d9; font-size: 14px; }
.overview-table tbody tr { cursor: pointer; }
.overview-table tbody tr.selected td,
body.light .overview-table tbody tr.selected td { background: rgba(0,212,170,0.12) !important; box-shadow: inset 0 1px 0 rgba(0,212,170,0.22), inset 0 -1px 0 rgba(0,212,170,0.22); }
.overview-table tbody tr.selected td:first-child,
body.light .overview-table tbody tr.selected td:first-child { box-shadow: inset 4px 0 0 #00d4aa, inset 0 1px 0 rgba(0,212,170,0.22), inset 0 -1px 0 rgba(0,212,170,0.22); color: #00d4aa; }
.overview-table tbody tr.selected .status-pill { box-shadow: 0 0 0 1px rgba(0,168,135,.24); }
.th-filter { display: flex; flex-direction: column; gap: 5px; }
.th-filter span { font-size: 15px; font-weight: 900; color: #c9d1d9; line-height: 1.1; }
.th-filter input, .th-filter select { width: 100%; min-height: 28px; height: 28px; padding: 3px 22px 3px 8px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); background-color: rgba(0,0,0,0.3); color: #c9d1d9; font-size: 12px; }
.th-filter select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%); background-position: calc(100% - 12px) 11px, calc(100% - 7px) 11px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.device-overview-table .th-filter-inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
.device-overview-table .th-filter-inline span { flex: 0 0 auto; white-space: nowrap; }
.device-overview-table .th-filter-inline input,
.device-overview-table .th-filter-inline select { flex: 1 1 auto; width: auto; min-width: 0; }
.device-overview-table .th-filter-inline select { padding-right: 18px; }
.overview-table th:nth-child(1), .overview-table td:nth-child(1) { width: 212px; }
.overview-table th:nth-child(2), .overview-table td:nth-child(2) { width: 180px; }
.overview-table th:nth-child(3), .overview-table td:nth-child(3) { width: 84px; }
.overview-table th:nth-child(4), .overview-table td:nth-child(4) { width: 132px; }
.overview-table th:nth-child(5), .overview-table td:nth-child(5) { width: 120px; }
.overview-table th:nth-child(6), .overview-table td:nth-child(6) { width: 170px; }
.overview-table th:nth-child(7), .overview-table td:nth-child(7) { width: 170px; }
.overview-table th:nth-child(8), .overview-table td:nth-child(8) { width: 170px; }
.device-overview-table { min-width: 1370px; }
.device-overview-table th:nth-child(1), .device-overview-table td:nth-child(1) { width: 54px; text-align: center; }
.device-overview-table th:nth-child(2), .device-overview-table td:nth-child(2) { width: 191px; }
.device-overview-table th:nth-child(3), .device-overview-table td:nth-child(3) { width: 150px; }
.device-overview-table th:nth-child(4), .device-overview-table td:nth-child(4) { width: 97px; }
.device-overview-table th:nth-child(5), .device-overview-table td:nth-child(5) { width: 92px; }
.device-overview-table th:nth-child(6), .device-overview-table td:nth-child(6) { width: 108px; }
.device-overview-table th:nth-child(7), .device-overview-table td:nth-child(7) { width: 83px; text-align: center; }
.device-overview-table th:nth-child(8), .device-overview-table td:nth-child(8) { width: 82px; text-align: center; }
.device-overview-table th:nth-child(9), .device-overview-table td:nth-child(9),
.device-overview-table th:nth-child(10), .device-overview-table td:nth-child(10),
.device-overview-table th:nth-child(11), .device-overview-table td:nth-child(11) { width: 107px; }
.device-overview-table .overview-index-col,
.device-overview-table .overview-index-cell { color: #8b949e; font-weight: 800; }
.overview-health-cell { font-weight: 950; color: #16a34a !important; }
.overview-health-cell.health-warn { color: #f0883e !important; }
.overview-health-cell.health-danger { color: #ef4444 !important; }
.overview-child-count-cell { font-weight: 900; color: #58a6ff !important; }
.device-overview-table tbody tr.selected td {
  background: rgba(0, 212, 170, 0.2) !important;
  box-shadow: inset 0 1px 0 rgba(0,212,170,0.34), inset 0 -1px 0 rgba(0,212,170,0.34);
}
.device-overview-table tbody tr.selected td:first-child {
  color: #00d4aa;
  box-shadow: inset 4px 0 0 #00d4aa, inset 0 1px 0 rgba(0,212,170,0.34), inset 0 -1px 0 rgba(0,212,170,0.34);
}
.device-summary .section-row { align-items: center; margin-bottom: 6px; }
.device-summary .module-title { line-height: 1; margin-bottom: 0; }
.device-summary .current-product-note { line-height: 1.2; font-size: 14px; font-weight: 800; color: #9aa8b8; }
.current-product-highlight { color: #00d4aa; font-weight: 950; }
.device-summary .overview-table-wrap { --device-table-head-height: 46px; --device-table-row-height: 46px; --device-table-body-height: 184px; height: calc(var(--device-table-head-height) + var(--device-table-body-height)); max-height: calc(var(--device-table-head-height) + var(--device-table-body-height)); overflow-x: auto; overflow-y: scroll; }
body:not(.light) .device-summary .overview-table-wrap { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.45) rgba(15,23,42,.34); }
body:not(.light) .device-summary .overview-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
body:not(.light) .device-summary .overview-table-wrap::-webkit-scrollbar-track { background: rgba(15,23,42,.34); border-radius: 999px; }
body:not(.light) .device-summary .overview-table-wrap::-webkit-scrollbar-thumb { background: rgba(148,163,184,.45); border: 2px solid rgba(15,23,42,.34); border-radius: 999px; }
body:not(.light) .device-summary .overview-table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.62); }
.device-overview-table thead tr { height: var(--device-table-head-height); }
.device-overview-table tbody tr { height: var(--device-table-row-height); }
.device-overview-table th { padding-top: 5px; padding-bottom: 5px; }
.device-overview-table .th-filter-inline input,
.device-overview-table .th-filter-inline select { min-height: 26px; height: 26px; }
.device-overview-table td.overview-time-cell { white-space: normal; vertical-align: middle; line-height: 1.12; }
.overview-time-wrap { display: inline-flex; flex-direction: column; gap: 2px; max-width: 100%; font-variant-numeric: tabular-nums; }
.overview-time-date, .overview-time-clock { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-time-clock { color: #aeb9c8; font-size: 12px; }
body.light .overview-time-clock { color: #64748b; }
.device-overview-table .plain-table-heading { vertical-align: middle; font-size: 15px; font-weight: 900; color: #c9d1d9; }
.overview-left-column .product-summary { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; width: 100%; max-width: none; flex: 0 0 auto; min-height: 0; padding: 16px 18px; overflow: hidden; }
.overview-left-column .product-main-grid { grid-template-columns: 112px minmax(0, 1fr); width: 100%; height: auto; min-height: 0; gap: 14px; }
.overview-left-column .overview-metrics { grid-template-columns: 112px; height: 100%; align-content: end; padding-top: 120px; gap: 10px; }
.overview-left-column .metric-box { min-height: 78px; padding: 10px 10px; border-radius: 12px; }
.overview-left-column .metric-number { font-size: 32px; }
.overview-left-column .metric-label { font-size: 13px; margin-top: 4px; }
.overview-left-column .overview-map-block, .overview-left-column .device-overview-grid { min-width: 0; height: 100%; }
.overview-left-column .device-overview-grid { grid-template-rows: minmax(0, 1fr); gap: 0; }
.overview-left-column .overview-map-card { width: 100%; height: clamp(520px, 34vw, 720px); min-height: 420px; }
.overview-left-column .overview-lower-grid { display: block; flex: 0 0 auto; width: 100%; }
.overview-left-column .device-summary { width: 100%; padding: 12px 18px 14px; }
.overview-right-column .device-detail { width: 100%; height: 100%; padding: 16px 18px; overflow: auto; }
.overview-right-column .detail-title-row { align-items: center; gap: 12px; }
.overview-right-column .detail-query-inline { min-width: 0; }
.overview-right-column .detail-query-inline input { width: min(260px, 28vw); min-width: 180px; font-size: 14px; padding: 7px 10px; border-radius: 8px; }
.overview-right-column .detail-query-inline button { height: 28px; min-height: 28px; padding: 0 12px; border-radius: 4px; font-size: 13px; font-weight: 900; }
.overview-right-column .detail-location-info { flex-wrap: wrap; align-items: flex-start; }
.overview-right-column .detail-location-info .detail-address { min-width: min(100%, 280px); }
.overview-right-column .detail-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.overview-right-column .device-info-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.overview-right-column .detail-card, .overview-right-column .detail-esc-card, .overview-right-column .detail-ecs-diag-card { width: auto; min-width: 0; }
.overview-right-column .detail-card { min-height: 54px; padding: 8px 10px; }
.overview-right-column .detail-card span { font-size: 12px; margin-bottom: 4px; }
.overview-right-column .detail-card b { font-size: 15px; }
.overview-right-column .device-info-grid .detail-card { height: 146px; min-height: 146px; padding: 6px 8px; overflow: hidden; }
.overview-right-column .device-info-grid .detail-card.detail-health-card { overflow: visible; position: relative; z-index: 20; }
.overview-right-column .device-info-grid .detail-card.detail-esc-card { overflow: visible; position: relative; z-index: 20; }
.overview-right-column .device-info-grid .detail-card.detail-ecs-diag-card { overflow: visible; position: relative; z-index: 20; }
.overview-right-column .device-info-grid .detail-card.detail-health-card:hover,
.overview-right-column .device-info-grid .detail-card.detail-esc-card:hover,
.overview-right-column .device-info-grid .detail-card.detail-ecs-diag-card:hover { z-index: 80; }
.overview-right-column .detail-health-card .avail-tip-pop,
.overview-right-column .detail-esc-card .avail-tip-pop,
.overview-right-column .detail-ecs-diag-card .avail-tip-pop { top: calc(100% + 8px); bottom: auto; left: auto; right: 0; transform: none; min-width: 260px; max-width: 360px; white-space: normal; z-index: 10000; }
.overview-right-column .device-info-grid .detail-card span { font-size: 11px; margin-bottom: 3px; }
.overview-right-column .device-info-grid .detail-card b { font-size: 12px; }
.overview-right-column .device-info-grid .detail-figure-card { padding: 6px 6px 4px; }
.overview-right-column .device-info-grid .detail-figure-card span { margin-bottom: 3px; }
.overview-right-column .device-info-grid .detail-figure-card .detail-figure-wrap { border-radius: 0; }
.overview-right-column .device-info-grid .detail-figure-card img { border-radius: 0; transform: none; object-fit: contain; }
.overview-right-column .detail-esc-card small { margin-top: 2px; font-size: 9px; line-height: 1.18; }
.overview-right-column .detail-esc-card #detailEscCommand { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-right-column .detail-ecs-diag-card b { font-size: 10px !important; line-height: 1.3 !important; }
.overview-right-column .device-info-grid .detail-card b.health-score {
  display: block;
  margin-top: 8px;
  font-size: 30px !important;
  line-height: 1;
  font-weight: 950;
  overflow: visible;
  white-space: nowrap;
}
.overview-right-column .sim-info-group { padding: 8px 14px 10px; }
.overview-right-column .detail-sim-head { margin-bottom: 6px; }
.overview-right-column .detail-sim-layout { grid-template-columns: minmax(200px, .864fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.overview-right-column .traffic-ring-card { min-height: 87px; padding: 7px 10px; gap: 3px; justify-content: flex-start; }
.overview-right-column .traffic-ring-card > span { font-size: 12px; line-height: 1.1; }
.overview-right-column .traffic-ring-body { grid-template-columns: minmax(38px, .64fr) 84px minmax(48px, .7fr); gap: 6px; flex: 1 1 auto; }
.overview-right-column .traffic-ring-labels,
.overview-right-column .traffic-ring-values { gap: 4px; }
.overview-right-column .traffic-ring-labels span,
.overview-right-column .traffic-ring-values b { font-size: 12px; line-height: 1.12; }
.overview-right-column .traffic-ring { width: 84px; height: 84px; }
.overview-right-column .traffic-ring-inner { width: 64px; height: 64px; }
.overview-right-column .traffic-ring-inner b { font-size: 22px; }
.overview-right-column .sim-info-grid { display: contents; }
.overview-right-column .sim-id-card, .overview-right-column .sim-date-summary { width: auto; max-width: none; min-height: 87px !important; padding: 6px 10px; }
.overview-right-column .sim-id-card { grid-column: 2; }
.overview-right-column .sim-date-summary { grid-column: 3; }
.overview-right-column .sim-id-card { gap: 3px; }
.overview-right-column .sim-date-summary { gap: 3px; }
.overview-right-column .sim-id-card b { line-height: 1.15 !important; }
.overview-right-column .sim-date-summary b { font-size: 13px !important; line-height: 1.12 !important; }
.overview-right-column .traffic-daily-card { grid-column: 1 / -1; }
.overview-right-column .traffic-daily-chart { height: 178px; }
@media (max-width: 1280px) {
  .mini-overview.active { height: auto; overflow: visible; }
  .overview-dashboard-layout { grid-template-columns: 1fr; height: auto; }
  .overview-left-column, .overview-right-column { overflow: visible; }
  .overview-right-column .device-detail { height: auto; max-height: none; }
  .overview-right-column .device-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-left-column .product-summary { min-height: 520px; }
}
.status-pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 12px; background: #263142; color: #aeb9c8; }
.status-pill.online { background: rgba(63,185,80,.15); color: #3fb950; }
.status-pill.fault { background: rgba(240,136,62,.15); color: #f0883e; }
.type-pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 11px; white-space: nowrap; }
.type-pill.type-4g { background: rgba(88,166,255,.15); color: #58a6ff; }
.type-pill.type-wifi { background: rgba(168,85,247,.15); color: #d2a8ff; }
.type-pill.type-grid { background: rgba(245,158,11,.15); color: #f59e0b; }
.esc-status { font-weight: 800; white-space: nowrap; }
.esc-status.open { color: #e6edf3; }
.esc-status.closed, .detail-esc-closed { color: #d92d20 !important; font-weight: 800; white-space: nowrap; }
.esc-status.unknown { color: #6b7280; }
.overview-table td.esc-cell { white-space: normal; line-height: 1.3; }
.esc-state-note { margin-top: 3px; color: #8b949e; font-size: 11px; white-space: normal; }
.esc-action-btn { margin-left: 6px; min-height: 24px; padding: 2px 9px; border-radius: 5px; border: 1px solid rgba(0,212,170,0.25); background: rgba(0,212,170,0.1); color: #00d4aa; font-size: 12px; font-weight: 900; cursor: pointer; vertical-align: middle; }
.esc-action-btn:hover { background: rgba(0,212,170,0.18); color: #00e4ba; }
.status-bars { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.status-bars span { display: block; color: #9aa7b5; font-size: 13px; margin-bottom: 4px; }
.bar { height: 10px; background: #0d1117; border-radius: 999px; overflow: hidden; border: 1px solid #30363d; }
.bar i { display: block; height: 100%; width: 0%; background: #00d4aa; transition: width .25s ease; }
#barOffline { background: #8b98a8; }
#barFault { background: #f0883e; }
.overview-actions, .tool-inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.tool-divider { height: 1px; background: #0f3460; margin: 16px 0 2px; }
.tool-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-top: 4px; border: 1px solid #0f3460; border-radius: 8px; background: rgba(13,17,23,.46); }
.tool-tab { min-height: 32px; padding: 6px 14px; border: 0; border-radius: 6px; background: transparent; color: #c9d1d9; box-shadow: none; font-size: 13px; font-weight: 800; }
.tool-tab:hover { background: rgba(255,255,255,.08); color: #e6edf3; }
.tool-tab.active { background: #00d4aa; color: #0d1117; }
.sn-hex-panel { display: none; }
.sn-hex-panel.active { display: block; }
.sn-hex-dev-note { border-color: rgba(0,212,170,.22); background: rgba(0,212,170,.08); color: #d8fff7; }
.sn-hex-gen2-table { max-height: 220px; }
.tool-textarea { width: 100%; min-height: 110px; margin-top: 12px; padding: 10px 12px; border: 1px solid #0f3460; border-radius: 8px; background: #0d1117; color: #e0e0e0; resize: vertical; }
.tool-wide-table { margin-top: 12px; max-height: 360px; }
.tool-wide-table .overview-table { width: 100%; min-width: 620px; }
.tool-alert-row td { background: rgba(233,69,96,.16); color: #ffd6df; }
#toolModalBody .tool-wide-table { width: min(860px, 86vw); overflow-x: auto; }
#toolModalBody .short-log-table { table-layout: fixed; min-width: 760px; }
#toolModalBody .short-log-table th:nth-child(1), #toolModalBody .short-log-table td:nth-child(1) { width: 54px; }
#toolModalBody .short-log-table th:nth-child(2), #toolModalBody .short-log-table td:nth-child(2) { width: 70px; }
#toolModalBody .short-log-table th:nth-child(3), #toolModalBody .short-log-table td:nth-child(3) { width: 210px; }
#toolModalBody .short-log-table th:nth-child(4), #toolModalBody .short-log-table td:nth-child(4) { width: 140px; }
#toolModalBody .short-log-table th:nth-child(5), #toolModalBody .short-log-table td:nth-child(5) { width: auto; }
#toolModalBody #snHexScript { white-space: pre-wrap; max-height: 220px; overflow: auto; }
#toolModalBody #snHexBytes { word-break: break-all; }
.filter-btn { background: rgba(255,255,255,0.08); color: #c9d1d9; }
.filter-btn.active { background: rgba(0,212,170,0.15); color: #00d4aa; }
.overview-refresh-btn { background: rgba(0,212,170,0.1); color: #00d4aa; border-color: rgba(0,212,170,0.2); box-shadow: none; }
.overview-refresh-btn:hover { background: rgba(0,212,170,0.18); color: #00e4ba; }
.detail-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.detail-query-inline { display: flex; align-items: center; gap: 8px; }
.detail-query-inline input { width: 28ch; background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.1); color: #e6edf3; font-size: 17px; padding: 10px 16px; border-radius: 12px; }
.detail-query-inline button { min-height: 42px; border-radius: 12px; background: rgba(255,255,255,0.08); color: #c9d1d9; border: 1px solid rgba(255,255,255,0.10); }
.detail-command-row { display: block; margin: 0 0 12px; }
.detail-location-info { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-height: 44px; padding: 6px 8px; border-radius: 12px; background: rgba(255,255,255,0.05); color: #8b949e; font-size: 12px; overflow: hidden; }
.detail-location-info b { color: #e6edf3; font-size: 13px; font-weight: 900; }
.detail-location-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.detail-location-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; padding: 5px 10px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); white-space: nowrap; }
.detail-location-chip span { color: #8b949e; font-size: 12px; }
.detail-location-chip b { margin-left: 3px; }
.detail-location-info .detail-address { flex: 1 1 auto; min-width: 220px; }
.detail-location-info .detail-address > span { flex: 0 0 auto; }
.detail-location-info .detail-address b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-location-info button { min-height: 30px; padding: 4px 12px; border-radius: 10px; background: rgba(255,255,255,0.08); color: #c9d1d9; border: 1px solid rgba(255,255,255,0.10); }
.detail-location-info button:disabled { opacity: .45; cursor: not-allowed; }
.detail-location-info .detail-connect-btn { flex: 0 0 auto; margin-left: 2px; font-weight: 900; }
.detail-locate-status { color: #8b949e; font-weight: 900; font-size: 13px; white-space: nowrap; }
.detail-locate-icon-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.08) !important; color: #c9d1d9 !important; border-color: rgba(255,255,255,0.10) !important; font-weight: 900; }
.detail-locate-icon-btn img { width: 17px; height: 17px; object-fit: contain; }
.detail-relocate-btn { background: rgba(255,255,255,0.08) !important; color: #c9d1d9 !important; border-color: rgba(255,255,255,0.10) !important; }
.detail-location-info .detail-locate-icon-btn,
.detail-location-info .detail-connect-btn,
.detail-location-info #detailNavigateBtn {
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08) !important;
  color: #c9d1d9 !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}
.detail-location-info .detail-connect-btn,
.detail-location-info #detailNavigateBtn {
  height: 28px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08) !important;
  color: #86efac !important;
  border-color: rgba(34,197,94,0.28) !important;
  font-size: 13px;
  font-weight: 900;
}
.detail-location-info .detail-connect-btn:hover,
.detail-location-info #detailNavigateBtn:hover {
  background: rgba(255,255,255,0.12) !important;
  color: #bbf7d0 !important;
}
.detail-groups { display: grid; gap: 10px; }
.detail-group { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 10px 14px 12px; }
.detail-group-title { color: #e6edf3; font-size: 16px; font-weight: 900; margin-bottom: 8px; }
.detail-group-subtitle { color: #8b949e; font-size: 12px; margin: -6px 0 10px; }
.detail-heartbeat-log { max-height: 160px; overflow-y: auto; border-radius: 10px; background: rgba(0,0,0,0.18); border: 1px solid rgba(255,255,255,0.06); }
.detail-heartbeat-empty { padding: 14px; color: #8b949e; font-size: 13px; text-align: center; }
.detail-heartbeat-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.detail-heartbeat-table th { position: sticky; top: 0; background: rgba(0,0,0,0.35); color: #8b949e; font-weight: 600; text-align: left; padding: 8px 10px; }
.detail-heartbeat-table td { padding: 7px 10px; color: #c9d1d9; border-bottom: 1px solid rgba(255,255,255,0.04); }
.detail-heartbeat-table tr:last-child td { border-bottom: none; }
.detail-heartbeat-table td:nth-child(1) { width: 40px; color: #8b949e; }
.detail-sim-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.detail-log-filter { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.detail-log-filter select { background: rgba(0,0,0,0.3); color: #c9d1d9; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 6px 8px; font-size: 12px; outline: none; }
.detail-inter-dir-up { color: #3fb950; font-weight: 600; }
.detail-inter-dir-down { color: #58a6ff; font-weight: 600; }
.detail-inter-result-OK { color: #3fb950; }
.detail-inter-result-TIMEOUT { color: #f85149; }
.detail-inter-result-FAIL { color: #f85149; }
.detail-inter-result-PENDING { color: #d29922; }
.detail-log-filter-time { align-items: center; }
.detail-log-time { background: rgba(0,0,0,0.3); color: #c9d1d9; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 5px 8px; font-size: 12px; outline: none; color-scheme: dark; }
.detail-log-time-sep { color: #8b949e; font-size: 12px; }
.detail-log-btn { background: #0f3460; color: #c9d1d9; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 6px 14px; font-size: 12px; cursor: pointer; }
.detail-log-btn:hover { background: #16498a; }
.detail-log-btn-reset { background: transparent; }
.detail-log-sn { flex: 1 1 220px; min-width: 180px; background: rgba(0,0,0,0.3); color: #c9d1d9; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 6px 10px; font-size: 12px; outline: none; }
.detail-log-sn:focus, .detail-log-time:focus { border-color: rgba(34,195,232,.75); box-shadow: 0 0 0 2px rgba(34,195,232,.16); }
.detail-inter-stats { font-size: 12px; color: #8b949e; margin-bottom: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.detail-inter-stats { padding: 4px 2px; }
.detail-inter-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.detail-inter-table th, .detail-inter-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.06); text-align: left; white-space: nowrap; }
.detail-inter-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #8b949e;
  font-weight: 600;
  background: #101a30;
  background-clip: padding-box;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.10);
}
.detail-inter-row { cursor: pointer; }
.detail-inter-row:hover { background: rgba(34,195,232,0.08); }
.detail-inter-sn { font-family: monospace; color: #8b949e; }
.detail-inter-payload-row td { background: rgba(0,0,0,0.36); }
.detail-inter-payload { padding: 4px 6px; font-size: 12px; color: #c9d1d9; }
.detail-inter-payload-section { margin-bottom: 10px; }
.detail-inter-payload-label { color: #8b949e; margin-bottom: 4px; font-weight: 600; }
.detail-inter-payload pre { margin: 0 0 6px; padding: 8px 10px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; white-space: pre-wrap; word-break: break-all; font-family: monospace; font-size: 11.5px; color: #9fd0ff; max-height: 220px; overflow: auto; }
.detail-inter-payload-summary { color: #e6edf3; white-space: pre-wrap; }
.detail-inter-payload-hex { color: #9fd0ff; white-space: pre !important; }
.detail-inter-payload-b64 { color: #d2a8ff; font-size: 10.5px; }
.detail-inter-payload-decoded { color: #7ee787 !important; }
.detail-inter-more-wrap { text-align: center; padding: 10px 0 2px; }
.detail-log-more-btn { background: #0f3460; color: #c9d1d9; border: 1px solid rgba(255,255,255,0.12); border-radius: 18px; padding: 7px 22px; font-size: 12px; cursor: pointer; }
.detail-log-more-btn:hover { background: #16498a; }
.global-inter-log { max-height: 62vh; overflow: auto; }
.global-inter-table { min-width: 1580px; }
.global-inter-table th { padding: 6px 7px; }
.global-inter-table .global-inter-col-index { width: 34px; min-width: 34px; }
.global-inter-table .global-inter-col-time { min-width: 278px; }
.global-inter-table .global-inter-col-direction { min-width: 112px; }
.global-inter-table .global-inter-col-category { min-width: 116px; }
.global-inter-table .global-inter-col-function { min-width: 126px; }
.global-inter-table .global-inter-col-function-meaning { min-width: 238px; }
.global-inter-table .global-inter-col-property-name { width: 240px; min-width: 240px; max-width: 240px; }
.global-inter-table .global-inter-col-property-value { width: 220px; min-width: 220px; max-width: 220px; }
.global-inter-table .global-inter-col-result { min-width: 112px; }
.global-inter-table .global-inter-col-sn { min-width: 184px; }
.global-inter-table .global-inter-col-summary { min-width: 148px; }
.global-inter-th, .global-inter-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.global-inter-th { justify-content: space-between; }
.global-inter-th > span { flex: 0 0 auto; }
.global-inter-th-time {
  display: grid;
  gap: 4px;
}
.global-inter-time-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 5px;
}
.global-inter-time-label {
  color: #8b949e;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}
.global-inter-head-control {
  height: 26px;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 5px;
  background: rgba(0,0,0,0.30);
  color: #c9d1d9;
  outline: none;
  font-size: 11px;
  padding: 2px 6px;
}
.global-inter-th select.global-inter-head-control { width: 78px; }
.global-inter-head-time { width: 144px; color-scheme: dark; }
.global-inter-head-sn { width: 146px; }
.global-inter-head-meaning { width: 128px !important; }
.global-inter-head-property { width: 122px; }
.global-inter-head-control:focus { border-color: rgba(34,195,232,.75); box-shadow: 0 0 0 2px rgba(34,195,232,.14); }
.global-inter-head-btn { height: 26px; padding: 3px 9px; border-radius: 5px; font-size: 11px; white-space: nowrap; }
.global-inter-message-row td { text-align: center; }
.global-function-log-panel { margin-top: 16px; border-top: 1px solid rgba(139,148,158,.22); padding-top: 12px; }
.global-function-log-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.global-function-log-head strong { color:#00d4aa; font-size:14px; }
.global-function-log-head span { color:#8b949e; font-size:12px; margin-left:10px; }
.global-function-log { margin:0; max-height:260px; overflow:auto; padding:10px 12px; background:rgba(5,12,25,.72); border:1px solid rgba(31,58,95,.75); border-radius:5px; color:#c9d1d9; font:12px/1.65 Consolas,Monaco,monospace; white-space:pre-wrap; word-break:break-all; }
body.light .global-function-log { background:#f8fafc; border-color:rgba(15,52,96,.18); color:#334155; }
.global-function-log-entry + .global-function-log-entry { margin-top:10px; padding-top:10px; border-top:1px solid rgba(255,255,255,.07); }
body.light .global-function-log-entry + .global-function-log-entry { border-top-color:rgba(15,52,96,.10); }
.global-function-log-meta { color:#7ee787; white-space:pre-wrap; word-break:break-all; }
.global-function-log-summary { margin-top:2px; color:#d2a8ff; white-space:pre-wrap; word-break:break-all; }
.global-function-log-hex { margin:4px 0 0; color:#ff9f43; white-space:pre-wrap; word-break:break-all; }
.global-function-log-empty { margin-top:4px; color:#8b949e; }
.detail-inter-function-meaning { color: #9fd0ff; }
.detail-inter-property-name {
  width: 240px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d2a8ff;
}
.detail-inter-property-value {
  width: 220px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #7ee787;
}
.detail-sim-head .detail-group-title { margin-bottom: 0; }
.sim-info-group { position: relative; z-index: 30; }
.sim-info-group:hover { z-index: 90; }
.sim-debug-tip .avail-tip-pop { top: calc(100% + 8px); bottom: auto; left: 0; right: auto; transform: none; min-width: 320px; white-space: normal !important; z-index: 10000; }
.device-summary .overview-controls { position: relative; z-index: 35; }
.overview-debug-tip { display: inline-flex; align-items: center; }
.overview-debug-tip .avail-tip-pop { left: auto; right: 0; }
.sim-debug-pop b { color: inherit !important; font-size: 12px !important; font-weight: inherit; }
body.light .sim-debug-pop b { color: inherit !important; }
.detail-sim-manual-query { display: flex; align-items: center; justify-content: flex-end; flex: 1 1 auto; min-width: 260px; }
.detail-sim-manual-field { display: grid; justify-items: end; }
.detail-sim-manual-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.detail-sim-manual-query input { width: 260px; height: 28px; min-height: 28px; padding: 2px 9px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.28); color: #e6edf3; font-size: 13px; outline: none; }
.detail-sim-manual-query input:focus { border-color: rgba(34,195,232,.75); box-shadow: 0 0 0 2px rgba(34,195,232,.16); }
.detail-sim-manual-query button,
.detail-refresh-topology-btn { height: 28px; min-height: 28px; padding: 0 12px; border-radius: 4px; font-size: 13px; font-weight: 900; }
.detail-metrics { display: grid; grid-template-columns: repeat(4, 138px); gap: 10px; justify-content: start; }
.device-info-grid { grid-template-columns: 170px repeat(6, minmax(0, 1fr)); }
.detail-figure-card { min-width: 0; display: flex; flex-direction: column; padding: 8px 8px 6px; }
.detail-figure-card span { margin-bottom: 6px; }
.detail-figure-card .detail-figure-wrap { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; padding: 0; overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
.detail-figure-card img { display: block; width: auto; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center center; border-radius: 0; background: transparent; filter: drop-shadow(0 0 1px rgba(221,235,241,.48)) drop-shadow(0 10px 9px rgba(0,0,0,.44)); transform: none; transform-origin: center center; transition: transform .2s ease, filter .2s ease; }
.detail-figure-card img:not([src]) { display: none; }
.detail-figure-card:hover img { filter: drop-shadow(0 0 1px rgba(221,235,241,.58)) drop-shadow(0 13px 11px rgba(0,0,0,.5)); transform: translateY(-2px) scale(1.025); }
.overview-right-column .detail-figure-card { padding: 8px; }
.overview-right-column .detail-figure-card span { margin-bottom: 4px; }
.overview-right-column .detail-figure-card .detail-figure-wrap { min-height: 0; }
.sim-info-grid { grid-template-columns: 1.35fr 0.95fr 0.9fr; gap: 10px; align-content: stretch; width: 100%; max-width: none; }
.sim-info-grid .detail-card { min-height: 46px; padding: 7px 10px; border-radius: 10px; }
.sim-info-grid .detail-card span { font-size: 12px; margin-bottom: 3px; }
.sim-info-grid .detail-card b { font-size: 16px; line-height: 1.08; }
.sim-id-card { display: grid; gap: 5px; align-content: start; min-height: 106px !important; width: 100%; max-width: none; padding-top: 4px; }
.sim-id-card div { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: baseline; column-gap: 6px; min-width: 0; }
.sim-id-card span { flex: 0 0 auto; display: inline !important; margin: 0 !important; font-size: 12px !important; white-space: nowrap; }
.sim-id-card b { flex: 1 1 auto; display: inline !important; margin-top: 0; font-size: 12px !important; line-height: 1.25 !important; letter-spacing: 0; white-space: pre-line; word-break: break-word; overflow-wrap: anywhere; }
.sim-date-summary { display: grid; gap: 4px; align-content: start; min-height: 90px !important; width: 100%; max-width: none; background: rgba(0,212,170,0.07) !important; padding-top: 4px; }
.sim-date-summary div { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: baseline; column-gap: 6px; min-width: 0; text-align: left; }
.sim-date-summary span { margin-bottom: 0 !important; white-space: nowrap; }
.sim-date-summary b { white-space: nowrap; overflow: visible; text-overflow: clip; font-size: 14px !important; overflow-wrap: normal; word-break: keep-all; }
.sim-status-row { align-items: baseline; min-width: 0 !important; }
.sim-status-row span { flex: 0 0 auto; }
#detailSimStatus { flex: 0 0 auto; display: inline !important; white-space: nowrap !important; overflow-wrap: normal !important; word-break: keep-all !important; font-size: 12px !important; overflow: visible !important; min-width: max-content !important; }
#detailSimStatus span { display: inline !important; white-space: nowrap !important; word-break: keep-all !important; overflow-wrap: normal !important; }
.detail-sim-layout { display: grid; grid-template-columns: 250px max-content minmax(0, 1fr); gap: 12px; align-items: stretch; }
.sim-traffic-state { grid-column: 1 / -1; display: flex; min-height: 30px; padding: 6px 10px; align-items: center; gap: 10px; border: 1px solid rgba(148,163,184,.2); border-radius: 6px; background: rgba(148,163,184,.08); color: #cbd5e1; box-sizing: border-box; }
.sim-traffic-state[hidden] { display: none; }
.sim-traffic-state::before { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: currentColor; content: ""; }
.sim-traffic-state strong { font-size: 13px; line-height: 1.35; }
.sim-traffic-state small { margin-left: auto; color: inherit; font-size: 12px; white-space: nowrap; opacity: .82; }
.sim-traffic-state.is-success { color: #cbd5e1; border-color: rgba(148,163,184,.2); background: rgba(148,163,184,.08); }
.sim-traffic-state.is-success::before { background: #3fb950; }
.sim-traffic-state.is-warning { color: #f5b942; border-color: rgba(245,185,66,.3); background: rgba(245,185,66,.1); }
.sim-traffic-state.is-danger { color: #ff7b72; border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.1); }
@media (max-width: 768px) {
  .detail-sim-head { align-items: stretch; flex-direction: column; }
  .detail-sim-manual-query, .detail-sim-manual-field, .detail-sim-manual-row { width: 100%; min-width: 0; }
  .detail-sim-manual-query input { width: auto; min-width: 0; flex: 1 1 auto; }
  .detail-sim-layout,
  .overview-right-column .detail-sim-layout { grid-template-columns: minmax(0, 1fr); }
  .sim-info-grid,
  .overview-right-column .sim-info-grid { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .overview-right-column .sim-id-card,
  .overview-right-column .sim-date-summary { grid-column: auto; width: 100%; max-width: none; }
  .sim-date-summary,
  body.light .sim-date-summary { max-width: none; }
  .sim-traffic-state { align-items: flex-start; flex-wrap: wrap; }
  .sim-traffic-state small { width: 100%; margin-left: 18px; white-space: normal; }
}
.detail-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); border-radius: 12px; padding: 10px 12px; min-height: 58px; }
.detail-card:nth-child(6n+1) { background: rgba(100,149,237,0.18); }
.detail-card:nth-child(6n+2) { background: rgba(163,113,247,0.18); }
.detail-card:nth-child(6n+3) { background: rgba(63,185,80,0.16); }
.detail-card:nth-child(6n+4) { background: rgba(255,193,50,0.15); }
.detail-card:nth-child(6n+5) { background: rgba(233,69,96,0.15); }
.detail-card:nth-child(6n) { background: rgba(0,212,170,0.15); }
.overview-right-column .device-info-grid > .detail-card {
  background: linear-gradient(105deg, #292e36 0%, #333943 56%, #3b424d 100%) !important;
  border-color: rgba(255,255,255,0.09);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.06), inset -1px -1px 0 rgba(0,0,0,0.22), 0 4px 10px rgba(0,0,0,0.16);
}
.detail-card span { display: block; color: #8b949e; font-size: 14px; margin-bottom: 5px; }
.detail-card b { color: #e6edf3; font-size: 18px; overflow-wrap: anywhere; line-height: 1.12; }
.device-info-grid .detail-card b { font-size: 17px; }
.detail-health-card { position: relative; }
.detail-health-card .health-rule-tip { position: absolute !important; top: 8px; right: 10px; }
.detail-health-card .health-rule-tip .avail-tip-icon { margin-left: 0; }
.detail-health-card .health-rule-tip .avail-tip-pop { top: calc(100% + 8px); bottom: auto; left: auto; right: 0; transform: none; min-width: 270px; max-width: 340px; white-space: normal; }
.detail-ecs-diag-card { width: 190px; min-width: 0; }
.detail-ecs-diag-card b { display: block; font-size: 12px !important; line-height: 1.35 !important; white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; font-weight: normal !important; }
.detail-card .health-score { color: #16a34a; font-family: Arial, "Microsoft YaHei", sans-serif; font-size: 34px; }
.detail-card .health-score.health-good { color: #16a34a; }
.detail-card .health-score.health-warn { color: #f0883e; }
body.light .detail-card .health-score.health-good { color: #16a34a; }
body.light .detail-card .health-score.health-warn { color: #e94560; }
.detail-card b.detail-status-online { color: #3fb950 !important; }
.detail-card b.detail-status-offline { color: #ef4444 !important; }
.detail-card b.detail-status-fault { color: #e94560 !important; }
.detail-status-signal { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; color: #8b949e; font-size: 11px; line-height: 1.25; white-space: normal; }
.detail-signal-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.detail-signal-label { color: inherit; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.detail-signal-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; padding: 1px 8px; border-radius: 999px; border: 1px solid transparent; font-size: 11px; font-weight: 900; line-height: 1.2; letter-spacing: 0.2px; }
.detail-signal-chip.very_strong { color: #365314; background: rgba(101,163,13,.22); border-color: rgba(101,163,13,.38); }
.detail-signal-chip.strong { color: #0f766e; background: rgba(20,184,166,.18); border-color: rgba(20,184,166,.34); }
.detail-signal-chip.medium { color: #b45309; background: rgba(234,179,8,.18); border-color: rgba(234,179,8,.34); }
.detail-signal-chip.weak { color: #c2410c; background: rgba(249,115,22,.18); border-color: rgba(249,115,22,.34); }
.detail-signal-chip.very_weak { color: #be123c; background: rgba(225,29,72,.18); border-color: rgba(225,29,72,.34); }
.detail-signal-chip.unknown { color: #64748b; background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.24); }
.detail-signal-dbm { color: #8b949e; font-size: 11px; line-height: 1.2; flex: 0 0 auto; }
.detail-esc-open { color: #e6edf3; font-weight: 800; white-space: nowrap; }
.detail-esc-card { width: 190px; min-width: 0; }
.detail-esc-card small { display: block; margin-top: 5px; color: #8b949e; font-size: 12px; line-height: 1.6; }
.sim-gprs-closed { color: #ef4444 !important; font-weight: 900; }
.sim-gprs-open { color: #3fb950 !important; font-weight: 900; }
.sim-status-normal { color: #3fb950 !important; font-weight: 900; }
.sim-status-abnormal { color: #ef4444 !important; font-weight: 900; }
.traffic-ring-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 10px 12px; min-height: 150px; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 7px; }
.overview-right-column .sim-info-group .traffic-ring-card,
.overview-right-column .sim-info-group .sim-id-card,
.overview-right-column .sim-info-group .sim-date-summary {
  background: linear-gradient(105deg, #2b3038 0%, #343a44 56%, #3b424d 100%) !important;
  border-color: rgba(255,255,255,0.09);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.06), inset -1px -1px 0 rgba(0,0,0,0.22), 0 4px 10px rgba(0,0,0,0.16);
}
.traffic-ring-card span { align-self: flex-start; color: #8b949e; font-size: 14px; font-weight: 700; }
.traffic-ring-card strong { color: #e6edf3; font-size: 15px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.traffic-ring-body { width: 100%; display: grid; grid-template-columns: minmax(60px, .8fr) 92px minmax(60px, .9fr); align-items: center; justify-content: center; gap: 6px; }
.traffic-ring-labels, .traffic-ring-values { display: grid; gap: 5px; align-content: center; min-width: 0; }
.traffic-ring-labels span { align-self: auto; margin: 0; color: #8b949e; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.traffic-ring-values b { color: #e6edf3; font-size: 14px; line-height: 1.2; text-align: right; overflow-wrap: normal; white-space: nowrap; }
#detailSimRecharge.is-positive { color: #f5b942; }
.traffic-ring-summary { width: 100%; display: grid; gap: 4px; margin-top: 2px; }
.traffic-ring-summary div { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 1.2; }
.traffic-ring-summary span { align-self: auto; color: #8b949e; font-size: 12px; font-weight: 700; }
.traffic-ring-summary b { color: #e6edf3; font-size: 14px; line-height: 1.2; text-align: right; overflow-wrap: anywhere; }
.traffic-ring { --traffic-percent: 0; --traffic-color: #1f9ec9; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--traffic-color) calc(var(--traffic-percent) * 1%), #3a3f4a 0); display: grid; place-items: center; }
.traffic-ring.traffic-ring-warning, .traffic-ring.traffic-ring-recharged { --traffic-color: #d99a28; }
.traffic-ring.traffic-ring-danger { --traffic-color: #ef4444; }
.traffic-ring-inner { width: 72px; height: 72px; border-radius: 50%; background: rgba(0,0,0,0.4); display: grid; place-items: center; }
.traffic-ring-inner b { color: #e6edf3; font-size: 26px; line-height: 1; }
.traffic-ring-inner b.traffic-warning, .traffic-ring-inner b.traffic-recharged { color: #f5b942; }
.traffic-ring-inner b.traffic-over-limit { color: #ef4444; }
.traffic-alert-line { margin: 8px 0 10px; padding: 8px 10px; border-radius: 8px; background: rgba(239,68,68,.12); color: #ff8a8a; border: 1px solid rgba(239,68,68,.24); font-size: 12px; line-height: 1.5; }
.traffic-daily-card { position: relative; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 12px 14px 10px; min-width: 0; box-shadow: 0 8px 22px rgba(0,0,0,0.15); }
.traffic-daily-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.traffic-daily-title { color: #e6edf3; font-size: 16px; font-weight: 900; }
.traffic-daily-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.traffic-month-picker { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #8b949e; font-size: 12px; font-weight: 800; }
.traffic-month-picker input { width: 150px; height: 24px; min-height: 24px; padding: 1px 8px; border-radius: 4px; border-color: rgba(255,255,255,0.1); background: rgba(0,0,0,0.3); color: #c9d1d9; font-size: 12px; color-scheme: dark; }
.traffic-month-picker input::-webkit-calendar-picker-indicator { filter: invert(1); }
.traffic-daily-subhead { height: 18px; display: flex; align-items: center; justify-content: flex-end; color: #8b949e; font-size: 12px; font-weight: 800; }
.traffic-daily-chart { position: relative; height: 200px; min-width: 0; overflow: hidden; border-radius: 4px; background: rgba(0,0,0,0.2); }
.traffic-daily-chart svg { display: block; width: 100%; height: 100%; }
.traffic-daily-empty { height: 100%; display: grid; place-items: center; color: #8b949e; font-size: 13px; font-weight: 800; }
.traffic-daily-axis { stroke: rgba(255,255,255,0.15); stroke-width: 1; }
.traffic-daily-grid { stroke: rgba(255,255,255,0.08); stroke-width: 1; stroke-dasharray: 4 4; }
.traffic-daily-hit { fill: transparent; cursor: crosshair; }
.traffic-daily-label { fill: #8b949e; font-size: 12px; font-weight: 800; }
.traffic-daily-value-label { fill: #58a6ff; font-size: 12px; font-weight: 900; }
.traffic-daily-axis-title { fill: #c9d1d9; font-size: 12px; font-weight: 900; }
.traffic-daily-value-over { fill: #ef4444; }
.traffic-daily-bar-limit { fill: rgba(255, 255, 255, .10); }
.traffic-daily-bar-future { fill: rgba(255, 255, 255, .04); }
.traffic-daily-bar-limit-future { fill: rgba(255, 255, 255, .03); }
.traffic-daily-bar { fill: #22c3e8; }
.traffic-daily-bar-red { fill: #ef4444; }
.traffic-daily-tooltip { position: absolute; z-index: 5; min-width: 150px; padding: 9px 12px; border-radius: 3px; background: #1a2740; color: #e6edf3; box-shadow: 0 8px 24px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); font-size: 12px; line-height: 1.6; pointer-events: none; }
.traffic-daily-tooltip b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1677ff; margin-right: 8px; vertical-align: middle; }
.detail-sub-device-group { min-width: 0; }
.detail-sub-device-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.detail-sub-device-head .detail-group-title { margin-bottom: 0; }
.detail-sub-device-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; margin-left: auto; }
.detail-refresh-topology-btn { flex: 0 0 auto; cursor: pointer; white-space: nowrap; }
.detail-refresh-topology-btn:disabled { cursor: wait; opacity: .65; }
.detail-sub-device-head span { color: #8b949e; font-size: 12px; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.detail-sub-device-table-wrap { max-height: 168px; overflow: auto; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; background: rgba(0,0,0,0.16); scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.45) rgba(15,23,42,.34); }
.detail-sub-device-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.detail-sub-device-table-wrap::-webkit-scrollbar-track { background: rgba(15,23,42,.34); border-radius: 999px; }
.detail-sub-device-table-wrap::-webkit-scrollbar-thumb { background: rgba(148,163,184,.45); border: 2px solid rgba(15,23,42,.34); border-radius: 999px; }
.detail-sub-device-table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.62); }
.detail-sub-device-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; color: #cbd5e1; font-size: 12px; }
.detail-sub-device-table th { position: sticky; top: 0; z-index: 1; padding: 8px 9px; color: #8b949e; background: #111d2e; border-bottom: 1px solid rgba(148,163,184,.22); text-align: left; white-space: nowrap; }
.topology-sort-button { display:inline-flex; align-items:center; justify-content:center; gap:5px; max-width:100%; padding:0; color:inherit; background:transparent; border:0; border-radius:0; font:inherit; font-weight:inherit; line-height:inherit; white-space:nowrap; cursor:pointer; }
.topology-sort-button:hover { color:#5be1c9; }
.topology-sort-button:focus-visible { outline:2px solid #5be1c9; outline-offset:3px; }
.topology-sort-indicator { flex:0 0 auto; color:#42d2ba; font-size:12px; font-weight:900; line-height:1; }
.detail-sub-device-table td { height: 34px; padding: 7px 9px; border-bottom: 1px solid rgba(148,163,184,.10); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.detail-sub-device-table tr:last-child td { border-bottom: 0; }
.detail-sub-device-table tbody tr:hover td { background: rgba(0,212,170,.045); }
.detail-sub-device-table th:nth-child(1), .detail-sub-device-table td:nth-child(1) { width: 30px; }
.detail-sub-device-table th:nth-child(2), .detail-sub-device-table td:nth-child(2) { width: 80px; }
.detail-sub-device-table th:nth-child(3), .detail-sub-device-table td:nth-child(3) { width: 80px; }
.detail-sub-device-table th:nth-child(4), .detail-sub-device-table td:nth-child(4) { width: 50px; }
.detail-sub-device-table th:nth-child(5), .detail-sub-device-table td:nth-child(5) { width: 60px; }
.detail-sub-device-table th:nth-child(6), .detail-sub-device-table td:nth-child(6) { width: 130px; }
.detail-sub-device-table th:nth-child(7), .detail-sub-device-table td:nth-child(7) { width: 130px; }
.detail-sub-device-empty { height: 76px !important; color: #8b949e; text-align: center; white-space: normal !important; }
.overview-table td.traffic-over-limit { color: #ef4444 !important; font-weight: 900; }
body.light .overview-table td.traffic-over-limit { color: #991b1b !important; font-weight: 900; }
.tool-input { min-width: 220px; width: min(100%, 340px); }
.tool-input-short { min-width: 110px; width: 120px; }
.tool-conn-info { color: #9aa7b5; font-size: 14px; line-height: 1.8; }
.tool-conn-info b { color: #00d4aa; }
.tool-result { color: #f8fafc; background: rgba(15,23,42,.32); border: 1px solid rgba(148,163,184,.28); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 500; margin-top: 10px; min-height: 18px; line-height: 1.45; white-space: pre-wrap; }
.sn-iccid-rw-body { display: grid; gap: 18px; }
.sn-iccid-section { border: 1px solid rgba(100,149,237,.28); border-radius: 8px; background: rgba(15,23,42,.28); padding: 16px; }
.sn-iccid-write-section { border-color: rgba(16,185,129,.34); background: rgba(6,78,59,.13); }
.sn-iccid-section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; margin-bottom: 16px; }
.sn-iccid-kicker { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; background: rgba(37,99,235,.16); color: #93c5fd; font-size: 12px; font-weight: 700; }
.sn-iccid-write-section .sn-iccid-kicker { background: rgba(16,185,129,.16); color: #86efac; }
.sn-iccid-section h4 { margin: 8px 0 4px; color: #e6edf3; font-size: 18px; line-height: 1.25; }
.sn-iccid-section p { margin: 0; color: #9aa7b5; font-size: 13px; line-height: 1.55; }
.sn-iccid-status { display: grid; gap: 4px; min-width: 190px; padding: 10px 12px; border: 1px solid rgba(100,149,237,.24); border-radius: 8px; background: rgba(15,52,96,.22); }
.sn-iccid-write-section .sn-iccid-status { border-color: rgba(16,185,129,.22); background: rgba(16,185,129,.08); }
.sn-iccid-status span { color: #8b949e; font-size: 12px; font-weight: 600; }
.sn-iccid-status strong { color: #e6edf3; font-size: 14px; line-height: 1.35; }
.sn-iccid-action-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(31,58,95,.8); }
.sn-iccid-action-text { display: grid; gap: 4px; }
.sn-iccid-action-text strong, .sn-iccid-step strong { color: #e6edf3; font-size: 14px; }
.sn-iccid-action-text span { color: #8b949e; font-size: 12px; line-height: 1.45; }
.sn-iccid-control { display: flex; gap: 10px; align-items: center; min-width: 0; }
.sn-iccid-maintain-control { flex-wrap: wrap; }
.sn-iccid-input { flex: 1 1 240px; min-width: 0; padding: 10px 14px; border: 1px solid #1f3a5f; border-radius: 6px; background: #0d1117; color: #e6edf3; font-size: 14px; box-sizing: border-box; }
.sn-iccid-btn { min-height: 40px; padding: 8px 18px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; font-size: 14px; font-weight: 600; white-space: nowrap; }
.sn-iccid-btn-primary { background: #2563eb; color: #fff; }
.sn-iccid-btn-primary:hover { background: #1d4ed8; }
.sn-iccid-btn-ghost { background: transparent; border-color: #1f3a5f; color: #c9d1d9; }
.sn-iccid-btn-ghost:hover { border-color: #00d4aa; color: #e6edf3; }
.sn-iccid-btn-danger { background: #dc2626; color: #fff; }
.sn-iccid-btn-danger:hover { background: #b91c1c; }
.sn-iccid-import-steps { display: grid; gap: 12px; }
.sn-iccid-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; padding-top: 12px; border-top: 1px solid rgba(31,58,95,.8); }
.sn-iccid-step > span { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(16,185,129,.18); color: #86efac; font-size: 13px; font-weight: 800; }
.sn-iccid-step > div { display: grid; gap: 8px; min-width: 0; }
.sn-iccid-step-file { align-items: stretch; }
.sn-iccid-import-zone { display: flex; min-height: 198px; padding: 28px 16px; border: 2px dashed #1f3a5f; border-radius: 8px; background: rgba(13,17,23,.4); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; text-align: center; transition: border-color .18s ease, background .18s ease; }
.sn-iccid-import-zone:hover, .sn-iccid-import-zone:focus-visible, .sn-iccid-import-zone.dragover { border-color: #00d4aa; background: rgba(0,212,170,.06); outline: none; }
.sn-iccid-import-zone.has-file { border-style: solid; border-color: rgba(0,212,170,.7); background: rgba(0,212,170,.08); }
.sn-iccid-import-zone.is-busy { cursor: wait; opacity: .72; }
.sn-iccid-import-icon { margin-bottom: 8px; color: #8b949e; font-size: 28px; line-height: 1; }
.sn-iccid-import-zone.has-file .sn-iccid-import-icon { color: #00d4aa; }
.sn-iccid-import-zone strong { max-width: 100%; color: #c9d1d9; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.sn-iccid-import-zone > span:last-child { margin-top: 4px; color: #6e7681; font-size: 12px; line-height: 1.4; }
.sn-iccid-import-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sn-iccid-import-button { min-height: 40px; padding: 8px 20px; border: 0; border-radius: 6px; background: #10b981; color: #fff; cursor: pointer; font-weight: 600; }
.sn-iccid-import-button:hover:not(:disabled) { background: #0da271; }
.sn-iccid-import-button:disabled { background: #334155; color: #94a3b8; cursor: not-allowed; }
.device-label-query-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.device-label-query-row .tool-input { flex: 1 1 280px; width: auto; }
.device-label-summary { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 68px; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(148,163,184,.25); border-radius: 6px; background: rgba(15,23,42,.38); }
.device-label-summary > div { min-width: 0; }
.device-label-summary strong, .device-label-summary > div > span { display: block; overflow-wrap: anywhere; }
.device-label-summary strong { color: #e6edf3; font-size: 14px; }
.device-label-summary > div > span { margin-top: 4px; color: #8b949e; font-size: 12px; line-height: 1.45; }
.device-label-badge { justify-self: start; min-width: 72px; padding: 5px 8px; border: 1px solid #475569; border-radius: 4px; color: #cbd5e1; background: rgba(71,85,105,.22); text-align: center; font-size: 12px; font-weight: 800; }
.device-label-summary.is-customer_site .device-label-badge { border-color: rgba(34,197,94,.55); color: #4ade80; background: rgba(34,197,94,.12); }
.device-label-summary.is-lab_unit .device-label-badge { border-color: rgba(245,158,11,.55); color: #fbbf24; background: rgba(245,158,11,.12); }
.device-label-summary.is-lab_board .device-label-badge { border-color: rgba(244,63,94,.55); color: #fb7185; background: rgba(244,63,94,.12); }
.device-label-summary.is-other .device-label-badge { border-color: rgba(148,163,184,.55); color: #cbd5e1; background: rgba(100,116,139,.14); }
.device-label-summary.is-empty .device-label-badge { border-color: rgba(148,163,184,.45); color: #cbd5e1; background: rgba(100,116,139,.12); }
.device-label-fields { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(240px, 1.3fr); gap: 12px; margin-top: 14px; }
.device-label-fields label { margin: 0; color: #9aa7b5; font-size: 12px; }
.device-label-fields select, .device-label-fields input { width: 100%; min-height: 40px; margin-top: 5px; box-sizing: border-box; }
.device-label-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.device-label-actions .device-label-reset, .device-label-template-btn { border: 1px solid rgba(148,163,184,.35); background: transparent; color: #cbd5e1; }
.device-label-divider { margin: 20px 0 16px; }
.device-label-import-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.device-label-import-head strong { color: #e6edf3; font-size: 14px; }
.device-label-import-zone { min-height: 112px; padding: 18px 14px; margin-bottom: 12px; }
.device-label-import-zone .sn-iccid-import-icon { margin-bottom: 4px; font-size: 22px; }
.device-label-list-section { min-width: 0; }
.device-label-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.device-label-list-head > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.device-label-list-head strong { color: #e6edf3; font-size: 14px; }
.device-label-list-head span { color: #8b949e; font-size: 12px; }
.device-label-list-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.device-label-list-refresh { display: grid; place-items: center; width: 30px; height: 30px; min-height: 30px; padding: 0; border: 1px solid rgba(148,163,184,.35); border-radius: 5px; color: #cbd5e1; background: transparent; font-size: 18px; line-height: 1; }
.device-label-list-refresh:hover { color: #00d4aa; background: rgba(0,212,170,.08); border-color: rgba(0,212,170,.5); transform: none; }
.device-label-filter-clear { min-height: 32px; padding: 4px 12px; border: 1px solid rgba(148,163,184,.35); border-radius: 5px; color: #cbd5e1; background: transparent; font-size: 12px; }
.device-label-filter-clear:hover { color: #00d4aa; background: rgba(0,212,170,.08); border-color: rgba(0,212,170,.5); transform: none; }
.device-label-table-wrap { max-height: 380px; overflow: auto; border: 1px solid rgba(148,163,184,.22); border-radius: 6px; scrollbar-width: thin; }
.device-label-table { width: 100%; min-width: 1020px; border-collapse: collapse; table-layout: fixed; color: #cbd5e1; font-size: 12px; }
.device-label-table th { position: sticky; top: 0; z-index: 1; padding: 9px 10px; color: #8b949e; background: #111d2e; border-bottom: 1px solid rgba(148,163,184,.24); text-align: left; font-weight: 700; white-space: nowrap; }
.device-label-th-filter { display: flex; align-items: center; gap: 7px; min-width: 0; }
.device-label-th-filter > span { flex: 0 0 auto; color: #8b949e; font-size: 12px; font-weight: 700; }
.device-label-th-filter select, .device-label-th-filter input { flex: 1 1 auto; min-width: 0; width: auto; height: 26px; min-height: 26px; padding: 2px 7px; border-radius: 4px; border: 1px solid rgba(148,163,184,.28); background: rgba(15,23,42,.46); color: #cbd5e1; font-size: 12px; box-sizing: border-box; }
.device-label-th-filter input::placeholder { color: #64748b; }
.device-label-table td { height: 44px; padding: 8px 10px; border-bottom: 1px solid rgba(148,163,184,.12); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.device-label-table tr:last-child td { border-bottom: 0; }
.device-label-table tbody tr:hover { background: rgba(0,212,170,.045); }
.device-label-table th:nth-child(1), .device-label-table td:nth-child(1) { width: 220px; }
.device-label-table th:nth-child(2), .device-label-table td:nth-child(2) { width: 170px; }
.device-label-table th:nth-child(3), .device-label-table td:nth-child(3) { width: 150px; }
.device-label-table th:nth-child(4), .device-label-table td:nth-child(4) { width: 240px; }
.device-label-table th:nth-child(5), .device-label-table td:nth-child(5) { width: 150px; }
.device-label-table th:nth-child(6), .device-label-table td:nth-child(6) { width: 140px; }
.device-label-sn-link { max-width: 100%; min-height: 0; padding: 0; color: #58a6ff; background: transparent; border: 0; border-radius: 0; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.device-label-sn-link:hover { color: #7dd3fc; background: transparent; text-decoration: underline; transform: none; }
.device-label-table-badge { display: inline-block; max-width: 100%; padding: 3px 6px; border: 1px solid rgba(148,163,184,.35); border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.device-label-table-badge.is-customer_site { color: #4ade80; border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.08); }
.device-label-table-badge.is-lab_unit { color: #fbbf24; border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.08); }
.device-label-table-badge.is-lab_board { color: #fb7185; border-color: rgba(244,63,94,.45); background: rgba(244,63,94,.08); }
.device-label-table-badge.is-other { color: #cbd5e1; border-color: rgba(148,163,184,.45); background: rgba(100,116,139,.10); }
.device-label-imported-table { font-size: 14px; }
.device-label-imported-table th { font-size: 14px; }
.device-label-imported-table td { font-size: 14px; }
.device-label-imported-table .device-label-th-filter > span { font-size: 14px; }
.device-label-imported-table .device-label-th-filter select,
.device-label-imported-table .device-label-th-filter input { font-size: 14px; }
.device-label-imported-table .device-label-sn-link { font-size: 14px; }
.device-label-imported-table th:nth-child(4),
.device-label-imported-table td:nth-child(4) { width: 168px; }
.device-label-list-empty { height: 88px !important; color: #8b949e; text-align: center; white-space: normal !important; }
.device-label-list-status { min-height: 18px; margin-top: 7px; color: #6e7681; font-size: 11px; }
.tools-c > .tool-card-body { display: none !important; }

/* Inverter parameter debugging drawer */
.reg-debug-body { width: min(980px, 100%); }
.reg-debug-intro { margin-bottom: 18px; color: #8b949e; font-size: 13px; line-height: 1.6; }
.reg-debug-section { padding: 18px 0; border-top: 1px solid rgba(31,58,95,.88); }
.reg-debug-section:first-of-type { padding-top: 0; border-top: 0; }
.reg-debug-section-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.reg-debug-step { display: grid; flex: 0 0 36px; place-items: center; box-sizing: border-box; width: 36px; height: 36px; margin-top: 1px; border: 1px solid rgba(0,212,170,.5); border-radius: 50%; color: #00d4aa; background: rgba(0,212,170,.08); font-family: Consolas, monospace; font-size: 24px; font-weight: bold; line-height: 1; }
.reg-debug-section-head > div { min-width: 0; }
.reg-debug-section-head h4 { margin: 0; color: #e6edf3; font-size: 15px; line-height: 1.35; }
.reg-debug-section-head p { margin: 2px 0 0; color: #8b949e; font-size: 12px; line-height: 1.45; }
.reg-debug-target-grid { display: grid; grid-template-columns: minmax(150px, .32fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.reg-debug-slave-field { margin: 0; }
.reg-debug-slave-field .tool-input { width: 100%; }
.reg-debug-list-control { min-width: 0; }
.reg-debug-control-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin-bottom: 8px; }
.reg-debug-control-head strong { color: #00d4aa; font-size: 13px; }
.reg-debug-control-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.reg-debug-control-actions .tool-input { width: 220px; }
.reg-debug-group-actions .tool-input:first-child { width: 160px; }
.reg-debug-group-actions .tool-input:nth-child(2) { width: 76px; }
.reg-debug-list { display: flex; flex-direction: column; gap: 6px; min-height: 34px; }
.reg-debug-preset-row, .reg-debug-action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.reg-debug-preset-row { margin-bottom: 14px; }
.reg-debug-action-row .topo-btn-primary { box-shadow: 0 0 0 1px rgba(0,212,170,.18); }
.reg-debug-sampling-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.reg-debug-loop-fields { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) auto; gap: 10px; align-items: end; }
.reg-debug-loop-fields .debug-field { margin: 0; }
.reg-debug-loop-fields .tool-input { width: 100%; }
.reg-debug-loop-actions { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.reg-debug-snapshot-btn { min-height: 34px; white-space: nowrap; }
.reg-debug-loop-status { margin-top: 8px; color: #8b949e; font-size: 12px; }
.reg-debug-results { padding-bottom: 0; }
.reg-debug-results .reg-debug-section-head { align-items: center; }
.reg-debug-clear-btn { margin-left: auto; flex: 0 0 auto; }

@media (max-width: 720px) {
  .reg-debug-target-grid, .reg-debug-sampling-grid { grid-template-columns: 1fr; }
  .reg-debug-control-head { align-items: flex-start; flex-direction: column; }
  .reg-debug-control-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .reg-debug-control-actions .tool-input, .reg-debug-group-actions .tool-input:first-child, .reg-debug-group-actions .tool-input:nth-child(2) { width: auto; flex: 1 1 140px; }
  .reg-debug-loop-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reg-debug-loop-actions { grid-column: 1 / -1; }
  .reg-debug-snapshot-btn { justify-self: start; }
}

@media (max-width: 480px) {
  .reg-debug-section { padding: 15px 0; }
  .reg-debug-action-row .topo-btn, .reg-debug-preset-row .topo-btn { flex: 1 1 145px; }
  .reg-debug-loop-fields { grid-template-columns: 1fr; }
  .reg-debug-loop-actions { grid-column: auto; }
  .reg-debug-clear-btn { padding: 5px 9px; font-size: 12px; }
}

/* Communication stick property debugging drawer */
.prop-debug-body { width: min(1280px, 100%); }
.prop-debug-section { padding: 20px 0; border-top: 1px solid rgba(31,58,95,.88); }
.prop-debug-section:first-child { padding-top: 0; border-top: 0; }
.prop-debug-section-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.prop-debug-step { display: grid; flex: 0 0 36px; place-items: center; box-sizing: border-box; width: 36px; height: 36px; margin-top: 1px; border: 1px solid rgba(88,166,255,.58); border-radius: 50%; color: #58a6ff; background: rgba(88,166,255,.09); font-family: Consolas, monospace; font-size: 24px; font-weight: bold; line-height: 1; }
.prop-debug-section-head > div { min-width: 0; }
.prop-debug-section-head h4 { margin: 0; color: #e6edf3; font-size: 15px; line-height: 1.35; }
.prop-debug-section-head p { margin: 2px 0 0; color: #8b949e; font-size: 12px; line-height: 1.45; }
.prop-debug-connection-row { display: grid; grid-template-columns: minmax(320px, 1fr) auto; gap: 16px; align-items: end; }
.prop-debug-sn-field { position: relative; min-width: 0; }
.prop-debug-sn-field > label, .prop-debug-property-grid .debug-field > label { display: block; margin-bottom: 5px; color: #8b949e; font-size: 12px; }
.prop-debug-sn-input-row { display: flex; gap: 8px; align-items: center; }
.prop-debug-sn-input-row .tool-input { flex: 1 1 auto; width: auto; min-width: 0; font-size: 16px; font-weight: bold; }
.prop-debug-sn-input-row .topo-btn { flex: 0 0 auto; white-space: nowrap; }
.prop-debug-sn-suggest { display: none; position: absolute; top: calc(100% + 2px); left: 0; z-index: 50; width: max-content; min-width: min(320px, 100%); max-width: min(620px, 88vw); max-height: 240px; overflow: auto; border: 1px solid #00d4aa; border-radius: 6px; background: #0f3460; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.prop-debug-connection-status { min-width: 175px; min-height: 34px; display: flex; align-items: center; padding: 6px 10px; border-left: 2px solid #1f3a5f; color: #8b949e; font-size: 13px; white-space: nowrap; }
.prop-debug-property-grid { display: grid; grid-template-columns: minmax(160px, .38fr) minmax(280px, 1fr) auto; gap: 14px; align-items: end; }
.prop-debug-property-grid .debug-field { margin: 0; min-width: 0; }
.prop-debug-property-grid .tool-input { width: 100%; }
.prop-debug-command-row { display: flex; gap: 8px; min-height: 34px; align-items: center; }
.prop-debug-command-row .topo-btn { white-space: nowrap; }
.prop-debug-result-head { margin: 18px 0 8px; color: #8b949e; font-size: 12px; font-weight: bold; }
.prop-debug-result-head + .debug-result { margin-top: 0; }
.prop-debug-topology-actions { margin-bottom: 12px; }
.prop-debug-topology .topo-summary { margin: 0 0 10px; }
.prop-debug-topology .topo-table-wrap { margin-top: 0; }

@media (max-width: 900px) {
  .prop-debug-property-grid { grid-template-columns: minmax(140px, .42fr) minmax(240px, 1fr); }
  .prop-debug-command-row { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .prop-debug-connection-row, .prop-debug-property-grid { grid-template-columns: 1fr; }
  .prop-debug-connection-status { min-width: 0; border-top: 1px solid #1f3a5f; border-left: 0; }
  .prop-debug-command-row { grid-column: auto; }
  .prop-debug-sn-suggest { width: 100%; min-width: 0; }
}

@media (max-width: 480px) {
  .prop-debug-section { padding: 16px 0; }
  .prop-debug-sn-input-row { align-items: stretch; flex-direction: column; }
  .prop-debug-command-row .topo-btn, .prop-debug-topology-actions .topo-btn { flex: 1 1 140px; }
}

/* OTA upgrade workflow drawer */
.ota-workflow-body { width: 100%; }
.ota-workflow-section { padding: 20px 0; border-top: 1px solid rgba(31,58,95,.88); }
.ota-workflow-section:first-child { padding-top: 0; border-top: 0 !important; }
.ota-workflow-head, .ota-workflow-divider { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.ota-workflow-step { display: grid; flex: 0 0 36px; place-items: center; box-sizing: border-box; width: 36px; height: 36px; margin-top: 1px; border: 1px solid rgba(240,136,62,.62); border-radius: 50%; color: #f0883e; background: rgba(240,136,62,.10); font-family: Consolas, monospace; font-size: 24px; font-weight: bold; line-height: 1; }
.ota-workflow-head > div, .ota-workflow-divider > div { min-width: 0; }
.ota-workflow-head h4, .ota-workflow-divider h4 { margin: 0; color: #e6edf3; font-size: 15px; line-height: 1.35; }
.ota-workflow-head p, .ota-workflow-divider p { margin: 2px 0 0; color: #8b949e; font-size: 12px; line-height: 1.45; }
.ota-target-section .ota-workflow-head { flex-basis: 100%; }
.ota-sn-field { min-width: 0 !important; }
.ota-sn-field > label, .ota-signal-field > label, .ota-config-target label, .ota-firmware-section label { display: block; margin-bottom: 6px; color: #8b949e !important; font-size: 12px !important; }
.ota-sn-control { gap: 8px !important; flex-wrap: wrap; }
.ota-sn-control #otaSn { width: min(420px, 100%) !important; min-width: 220px; }
.ota-sn-control .topo-btn { white-space: nowrap; }
.ota-sn-suggest { display: none; position: absolute; top: calc(100% + 2px); left: 0; z-index: 50; width: max-content; min-width: min(320px, 100%); max-width: min(620px, 88vw); max-height: 240px; overflow: auto; border: 1px solid #00d4aa; border-radius: 6px; background: #0f3460; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.ota-signal-field { display: flex; flex-direction: column; justify-content: center; min-height: 46px; padding-left: 14px; border-left: 2px solid #1f3a5f; }
.ota-signal-field #otaSignalStrength { color: #e6edf3 !important; }
.ota-config-target { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.ota-config-target > label { flex-basis: auto; }
.ota-config-target .debug-select { min-height: 34px; }
.ota-query-loading { pointer-events: none; }
.ota-query-dots { display: inline-flex; width: 1.1em; overflow: hidden; }
.ota-query-dots i { display: inline-block; width: .36em; font-style: normal; opacity: .2; animation: ota-query-dot 1.05s infinite ease-in-out; }
.ota-query-dots i:nth-child(2) { animation-delay: .15s; }
.ota-query-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ota-query-dot { 0%, 80%, 100% { opacity: .2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-1px); } }
.ota-device-table-section { margin-top: 16px; }
.ota-firmware-section { margin-top: 18px; }
.ota-firmware-section #otaFwSelect { width: fit-content !important; max-width: 100%; }
.ota-fw-column-filter { width: 72px; max-width: 100%; margin-left: 4px; padding: 2px 3px; border: 1px solid #31547f; border-radius: 3px; background: #0d1117; color: #c9d1d9; font-size: 11px; vertical-align: middle; }
.ota-workflow-divider { padding-top: 20px; margin-top: 20px; border-top: 1px solid rgba(31,58,95,.88); }
.ota-execution-actions .topo-btn-primary { box-shadow: 0 0 0 1px rgba(0,212,170,.18); }
.ota-progress-section { width: 100%; max-width: none; }
.ota-history-section { padding-top: 0; }
.ota-hist-scroll { max-height: 240px; }
.ota-history-table th { white-space: nowrap; }
.ota-history-column-filter { width: 6ch; min-width: 48px; margin-left: 4px; padding: 2px 4px; border: 1px solid #31547f; border-radius: 3px; background: #0d1117; color: #c9d1d9; font-size: 12px; vertical-align: middle; }
.ota-history-section .ota-workflow-divider { margin-top: 0; }

@media (max-width: 720px) {
  .ota-target-section { align-items: stretch !important; }
  .ota-target-section .ota-sn-field { flex-basis: 100%; }
  .ota-signal-field { min-width: 0 !important; padding: 8px 0 0; border-top: 1px solid #1f3a5f; border-left: 0; }
  .ota-config-target { align-items: stretch; flex-direction: column; }
  .ota-config-target .debug-select { width: 100%; }
}

@media (max-width: 480px) {
  .ota-workflow-section { padding: 16px 0; }
  .ota-sn-control { flex-direction: column; align-items: stretch !important; }
  .ota-sn-control #otaSn { width: 100% !important; min-width: 0; }
  .ota-sn-control .topo-btn, .ota-execution-actions .topo-btn { flex: 1 1 auto; }
  .ota-sn-suggest { width: 100%; min-width: 0; }
}
.tools-dr-bd .db-read-body, #toolModalBody .db-read-body { display: grid !important; gap: 18px; }
/* 设备数据库读取和设备标签读写抽屉：所有内容文字统一增加 2px。 */
.tools-dr.font-up2 .tools-dr-hd h3 { font-size: 22px; }
#toolsDrawerBody .db-read-body,
#toolsDrawerBody .device-label-body { font-size: 18px; }
#toolsDrawerBody .db-read-body input,
#toolsDrawerBody .db-read-body select,
#toolsDrawerBody .db-read-body button,
#toolsDrawerBody .device-label-body input,
#toolsDrawerBody .device-label-body select,
#toolsDrawerBody .device-label-body button { font-size: 19px; }
#toolsDrawerBody .db-read-body .tool-result,
#toolsDrawerBody .device-label-body .tool-result { font-size: 16px; }
#toolsDrawerBody .db-read-body .overview-table { font-size: 15px; }
#toolsDrawerBody .db-read-body .overview-table th { font-size: 17px; }
#toolsDrawerBody .db-read-body .overview-table td { font-size: 16px; }
#toolsDrawerBody .db-read-body .db-section-index { font-size: 15px; }
#toolsDrawerBody .db-read-body .db-section-head h4 { font-size: 18px; }
#toolsDrawerBody .db-read-body .db-section-head p,
#toolsDrawerBody .db-read-body .db-section-steps span,
#toolsDrawerBody .db-read-body .db-sub-head span,
#toolsDrawerBody .db-read-body .db-topology-toolbar span,
#toolsDrawerBody .db-read-body .db-topology-th-filter > span,
#toolsDrawerBody .db-read-body .db-topology-th-filter input,
#toolsDrawerBody .db-read-body .db-topology-th-filter select { font-size: 14px; }
#toolsDrawerBody .db-read-body .db-sub-head strong,
#toolsDrawerBody .db-read-body .db-topology-toolbar strong,
#toolsDrawerBody .db-read-body .db-topology-form-title,
#toolsDrawerBody .db-read-body .db-topology-manual .tool-input { font-size: 15px; }
#toolsDrawerBody .db-read-body .db-topology-table,
#toolsDrawerBody .db-read-body .db-topology-table th,
#toolsDrawerBody .db-read-body .db-topology-table td,
#toolsDrawerBody .db-read-body .db-topology-table .device-label-sn-link { font-size: 14px; }
#toolsDrawerBody .db-read-body label { font-size: 18px; }
#toolsDrawerBody .db-read-body .sn-iccid-import-zone strong { font-size: 16px; }
#toolsDrawerBody .db-read-body .sn-iccid-import-zone > span:last-child { font-size: 14px; }
#toolsDrawerBody .device-label-body .device-label-summary strong,
#toolsDrawerBody .device-label-body .device-label-import-head strong,
#toolsDrawerBody .device-label-body .device-label-list-head strong { font-size: 16px; }
#toolsDrawerBody .device-label-body .device-label-summary > div > span,
#toolsDrawerBody .device-label-body .device-label-badge,
#toolsDrawerBody .device-label-body .device-label-fields label,
#toolsDrawerBody .device-label-body .device-label-list-head span,
#toolsDrawerBody .device-label-body .device-label-filter-clear,
#toolsDrawerBody .device-label-body .sn-iccid-import-zone > span:last-child { font-size: 14px; }
#toolsDrawerBody .device-label-body .sn-iccid-import-zone strong { font-size: 16px; }
#toolsDrawerBody .device-label-body > label { font-size: 18px; }
#toolsDrawerBody .device-label-body .sn-iccid-import-icon { font-size: 30px; }
#toolsDrawerBody .device-label-body .device-label-list-refresh { font-size: 20px; }
#toolsDrawerBody .device-label-body .device-label-imported-table,
#toolsDrawerBody .device-label-body .device-label-imported-table th,
#toolsDrawerBody .device-label-body .device-label-imported-table td,
#toolsDrawerBody .device-label-body .device-label-imported-table .device-label-th-filter > span,
#toolsDrawerBody .device-label-body .device-label-imported-table .device-label-th-filter select,
#toolsDrawerBody .device-label-body .device-label-imported-table .device-label-th-filter input,
#toolsDrawerBody .device-label-body .device-label-imported-table .device-label-sn-link { font-size: 16px; }
#toolsDrawerBody .device-label-body .device-label-list-status { font-size: 13px; }
.db-read-section { min-width: 0; display: grid; gap: 13px; padding: 16px; border: 1px solid rgba(96,165,250,.26); border-radius: 10px; background: rgba(15,23,42,.32); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.db-topology-section { border-color: rgba(45,212,191,.28); background: rgba(20,184,166,.055); }
.db-section-head { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; }
.db-section-index { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #93c5fd; background: rgba(37,99,235,.20); border: 1px solid rgba(96,165,250,.38); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.db-topology-section .db-section-index { color: #5eead4; background: rgba(20,184,166,.16); border-color: rgba(45,212,191,.38); }
.db-section-head h4 { margin: 0; color: #e6edf3; font-size: 16px; line-height: 1.3; }
.db-section-head p { margin: 5px 0 0; color: #8b949e; font-size: 12px; line-height: 1.55; }
.db-section-steps { display: flex; flex-wrap: wrap; gap: 8px; padding: 9px 10px; border: 1px solid rgba(148,163,184,.18); border-radius: 8px; background: rgba(0,0,0,.12); }
.db-section-steps span { display: inline-flex; align-items: center; gap: 6px; color: #aeb9c8; font-size: 12px; line-height: 1.35; }
.db-section-steps span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.12); }
.db-topology-section .db-section-steps span::before { background: #2dd4bf; box-shadow: 0 0 0 3px rgba(45,212,191,.12); }
.db-device-actions, .db-topology-query { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.db-device-actions .tool-input, .db-topology-query .tool-input { flex: 1 1 260px; width: auto; min-width: 220px; }
.db-primary-btn { padding: 9px 18px; border-radius: 6px; background: #2563eb; color: #fff; border: none; cursor: pointer; font-weight: 700; }
.db-primary-btn:hover { background: #1d4ed8; }
.db-ghost-btn { padding: 9px 16px; border-radius: 6px; background: transparent; border: 1px solid rgba(148,163,184,.35); color: #c9d1d9; cursor: pointer; font-weight: 600; }
.db-ghost-btn:hover { color: #00d4aa; background: rgba(0,212,170,.08); border-color: rgba(0,212,170,.5); }
.db-section-result { margin-top: 0; }
.db-device-output { display: none; }
.db-device-output.on { display: block; }
.db-json-block.db-device-output.on { display: grid; }
.db-device-table { margin-top: 0 !important; }
.db-device-table .overview-table { min-width: 0; }
.db-json-block { display: grid; gap: 7px; }
.db-sub-head, .db-topology-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; }
.db-sub-head strong, .db-topology-toolbar strong { color: #cbd5e1; font-size: 13px; }
.db-sub-head span, .db-topology-toolbar span { color: #6b7280; font-size: 12px; }
.db-json-block pre { max-height: 220px; overflow: auto; white-space: pre-wrap; margin: 0; }
.db-topology-form-title { margin-top: 2px; color: #cbd5e1; font-size: 13px; font-weight: 800; }
.db-topology-manual { display: grid; grid-template-columns: minmax(170px, 1.15fr) minmax(170px, 1.15fr) 70px 92px minmax(130px, .9fr) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid rgba(148,163,184,.16); border-radius: 8px; background: rgba(15,23,42,.24); }
.db-topology-manual .tool-input { width: 100%; min-width: 0; box-sizing: border-box; font-size: 13px; }
.db-topology-import-zone { min-height: 84px; padding: 12px 14px; }
.db-topology-table-wrap { max-height: 340px; }
.db-topology-table { min-width: 1680px; }
.db-topology-th-filter { display: flex; align-items: center; gap: 6px; min-width: 0; }
.db-topology-th-filter > span { flex: 0 0 auto; color: #8b949e; font-size: 12px; font-weight: 800; }
.db-topology-th-filter input, .db-topology-th-filter select { flex: 1 1 auto; min-width: 0; width: auto; height: 25px; min-height: 25px; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(148,163,184,.28); background: rgba(15,23,42,.48); color: #cbd5e1; font-size: 12px; box-sizing: border-box; }
.db-topology-th-filter input::placeholder { color: #64748b; }
.db-topology-table th:nth-child(1), .db-topology-table td:nth-child(1) { width: 210px; }
.db-topology-table th:nth-child(2), .db-topology-table td:nth-child(2) { width: 86px; }
.db-topology-table th:nth-child(3), .db-topology-table td:nth-child(3) { width: 220px; }
.db-topology-table th:nth-child(4), .db-topology-table td:nth-child(4) { width: 150px; }
.db-topology-table th:nth-child(5), .db-topology-table td:nth-child(5) { width: 130px; }
.db-topology-table th:nth-child(6), .db-topology-table td:nth-child(6) { width: 150px; }
.db-topology-table th:nth-child(7), .db-topology-table td:nth-child(7) { width: 110px; }
.db-topology-table th:nth-child(8), .db-topology-table td:nth-child(8) { width: 190px; }
.db-topology-table th:nth-child(9), .db-topology-table td:nth-child(9) { width: 140px; }
.db-topology-table th:nth-child(10), .db-topology-table td:nth-child(10) { width: 170px; }
@media (max-width: 980px) {
  .db-topology-manual { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .device-label-fields { grid-template-columns: 1fr; }
  .device-label-summary { grid-template-columns: 1fr; }
  .device-label-table-wrap { max-height: 330px; }
  .device-label-sn-link { min-height: 0 !important; padding: 0 !important; font-size: 12px !important; }
  .device-label-list-refresh { width: 34px; height: 34px; min-height: 34px !important; padding: 0 !important; font-size: 18px !important; }
}
.mono { font-family: "Consolas", "Cascadia Code", "Microsoft YaHei", monospace; }
label { color: #aaa; font-size: 16px; display: block; margin-bottom: 4px; }
input, button, select { font-family: inherit; font-size: 17px; padding: 7px 12px; border-radius: 4px; border: 1px solid #0f3460; background: #0f3460; color: #e0e0e0; outline: none; }
input:focus { border-color: #00d4aa; }
input[type=password] { font-family: system-ui, sans-serif; -webkit-text-security: disc; }
button { cursor: pointer; background: #00d4aa; color: #1a1a2e; border: none; font-weight: bold; transition: transform 0.1s, background 0.15s; }
button:hover { background: #00e4ba; transform: scale(1.10); }
button:active { transform: scale(0.90); }
button.danger { background: #e94560; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row label { display: inline; margin-right: 4px; }
#log { background: #0d1117; border: 1px solid #30363d; border-radius: 4px; padding: 10px; height: 174px; overflow-y: auto; font-size: 16px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
#log .info { color: #58a6ff; }
#log .send { color: #d2a8ff; }
#log .recv { color: #3fb950; }
#log .error { color: #e94560; }
#log .data { color: #f0883e; }
#status { font-size: 16px; color: #aaa; }
#status .ok { color: #3fb950; }
#status .fail { color: #e94560; }
.file-list { display: flex; gap: 10px; flex-wrap: wrap; }
.file-card { background: #0f3460; border-radius: 4px; padding: 8px 12px; font-size: 16px; min-width: 200px; }
.file-card a { color: #00d4aa; text-decoration: none; }
.file-card a:hover { text-decoration: underline; }
.file-card-zip {
  background: linear-gradient(135deg, #124e4a 0%, #0d3b57 100%);
  border: 2px solid #00d4aa;
  box-shadow: 0 0 0 1px rgba(0,212,170,.18), 0 8px 22px rgba(0,0,0,.24);
  min-width: min(360px, 100%);
  padding: 12px 14px;
}
.file-card-zip-head { display: flex; align-items: center; gap: 8px; color: #eafffb; font-size: 17px; }
.file-card-zip-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 24px; padding: 0 8px; border-radius: 4px; background: #00d4aa; color: #062c2b; font-size: 13px; font-weight: 900; letter-spacing: .5px; }
.file-card-zip-name { margin-top: 8px; color: #b9fff0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.file-card-zip-meta { margin-top: 5px; color: #b8cbd2; font-size: 13px; }
.file-card-zip-download { display: inline-flex; align-items: center; margin-top: 10px; padding: 7px 13px; border: 1px solid #7fffe8; border-radius: 4px; background: #00d4aa; color: #062c2b !important; font-size: 14px; font-weight: 800; text-decoration: none !important; }
.file-card-zip-download:hover { background: #7fffe8; color: #062c2b !important; }
.file-card-parse-btn { margin-top: 6px; padding: 4px 14px; border: 1px solid #00d4aa; border-radius: 4px; background: rgba(0,212,170,0.12); color: #00d4aa; font-size: 13px; cursor: pointer; }
.file-card-parse-btn:hover { background: #00d4aa; color: #102027; }
.file-card-copy-btn { margin-top: 6px; margin-left: 6px; padding: 4px 14px; border: 1px solid #ffb86c; border-radius: 4px; background: rgba(255,184,108,0.12); color: #ffb86c; font-size: 13px; cursor: pointer; }
.file-card-copy-btn:hover { background: #ffb86c; color: #102027; }
.cmd-section { margin-bottom: 14px; }
.cmd-section-title { font-size: 17px; font-weight: bold; color: #aaa; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid #0f3460; }
.form-grid { display: flex; gap: 8px 16px; margin-bottom: 8px; flex-wrap: wrap; align-items: flex-start; }
.form-grid.col1 .form-field { flex: 1; }
.form-field { display: flex; flex-direction: column; }
.form-field label { margin-bottom: 2px; }
.form-field input, .form-field select { width: auto; min-width: 120px; }
.form-field input.narrow { width: 100px; }
.form-field input.wide { width: 200px; }
.form-field select.wide { width: 100%; }
.form-hint { font-size: 15px; color: #888; margin-top: 2px; }
.progress-wrap { margin-top: 10px; display: none; flex-direction: column; gap: 4px; }
.progress-wrap.show { display: flex; }
.progress-caption { color: #9aa7b5; font-size: 14px; font-weight: bold; margin-top: 2px; }
.progress-bar { width: 100%; height: 30px; background: #0d1117; border: 1px solid #30363d; border-radius: 6px; overflow: hidden; position: relative; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #0a8d6d, #00d4aa, #00f5c0); border-radius: 5px; transition: width 0.3s ease-out; position: relative; display: flex; align-items: center; justify-content: flex-end; }
.total-progress-bar { height: 26px; }
.total-progress-fill { background: linear-gradient(90deg, #2563eb, #00d4aa, #3fb950); }
.progress-fill::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%); border-radius: 5px; }
.progress-text { font-size: 17px; font-weight: bold; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.6); white-space: nowrap; padding-right: 8px; z-index: 1; }
.progress-info { display: flex; justify-content: space-between; font-size: 15px; color: #888; }
.zone-panel { display: flex; gap: 6px; overflow-x: auto; padding: 1px 1px 7px; border: 1px solid transparent; border-radius: 12px; background: transparent; }
.zone-group {
  flex: 1 1 0;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(105deg, #292e36 0%, #333943 56%, #3b424d 100%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.06), inset -1px -1px 0 rgba(0,0,0,0.22), 0 4px 10px rgba(0,0,0,0.16);
}
.zone-group-hdr { display: flex; align-items: center; gap: 4px; padding: 5px 6px; background: rgba(255,255,255,.035); border-bottom: 1px solid rgba(255,255,255,.06); cursor: pointer; user-select: none; font-size: 15px; font-weight: bold; color: #ccc; flex-shrink: 0; }
.zone-group-hdr:hover { background: rgba(255,255,255,.075); }
.zone-group-info { font-size: 12px; font-weight: normal; color: #999; }
.zone-group-hdr input[type=checkbox] { margin: 0; transform: scale(0.85); }
#exportPage .zone-group-hdr input[type=checkbox] { transform: scale(1.7); }
#exportPage .zone-group-hdr > div { margin-left: 8px; }
.zone-items { overflow-y: auto; flex: 1; padding: 2px 0; }
@media (min-width: 901px) {
  #exportPage .zone-panel {
    overflow: visible;
    padding: 1px 0 0;
  }
  #exportPage .zone-group { min-width: 0; }
  #exportPage .zone-items {
    min-height: 276px;
    flex: 0 0 auto;
    overflow: visible;
  }
  #exportPage .zone-items::after {
    content: '';
    display: block;
    height: 30px;
  }
}
.zone-items label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 3px 6px; cursor: pointer; font-size: 15px; color: #ccc; }
.zone-items label:hover { background: #0f3460; color: #fff; }
.zone-items label input[type=checkbox]:checked { accent-color: #00d4aa; }
.zone-items label:has(input[type=checkbox]:checked) { background: #0a5a3a; border-left: 3px solid #00d4aa; color: #fff; }
#exportPage .zone-items label.zone-analysis-ready {
  background: rgba(0,212,170,.16);
  border-left: 2px solid rgba(0,212,170,.58);
  color: #d7f5ef;
}
#exportPage .zone-items label.zone-analysis-ready:hover {
  background: rgba(0,212,170,.22);
  color: #fff;
}
#exportPage .zone-items label.zone-analysis-ready:has(input[type=checkbox]:checked) {
  background: rgba(0,212,170,.30);
  border-left: 4px solid #00d4aa;
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(0,212,170,.22);
}
.zone-addr { font-size: 12px; color: #00d4aa; padding-left: 20px; display: none; }
.hide-addr .zone-addr, .hide-addr .zone-group-info { display: none !important; }
.hide-fc .fc-code { display: none; }
/* Map pulse animations */
@keyframes mapPulse { 0%{transform:scale(1);opacity:0.6} 100%{transform:scale(2.5);opacity:0} }
@keyframes mapPulse2 { 0%{transform:scale(1);opacity:0.4} 100%{transform:scale(3);opacity:0} }
/* Map edge glow */
/* Map font */
#mapOverlay *,#mapInfoPanel *{font-family:"Noto Sans SC","Source Han Sans SC","PingFang SC","Microsoft YaHei",sans-serif}
/* Light theme map */
body.light #mapOverlay > div{background:#fff!important;border-color:#d0d5dd!important}
body.light #mapInfoPanel{background:rgba(255,255,255,0.92)!important;border-color:#d0d5dd!important;color:#333!important}
body.light #mapInfoPanel div{color:#333!important}
body.light #mapSn,body.light #mapLngVal,body.light #mapLatVal{color:#1a2a50!important}
body.light #mapAccVal{color:#c06020!important}
body.light #mapTime{color:#555!important}
body.light #mapAddr{color:#333!important}
body.light #mapEta{color:#0a8d6d!important}
body.light #mapWeather{color:#555!important}
/* Map edge glow */
#mapOverlay > div::before { content:''; position:absolute; top:-2px;left:-2px;right:-2px;bottom:-2px;border-radius:14px;background:linear-gradient(135deg,#00d4aa33,#0088cc33,#00d4aa33,#0088cc33);z-index:-1;filter:blur(8px);animation:edgeGlow 3s ease-in-out infinite; }
@keyframes edgeGlow { 0%,100%{opacity:0.5} 50%{opacity:1} }
/* Popup font size bump */
#versionInfo, #versionInfo table, #versionInfo td, #versionInfo th, #versionInfo input, #versionInfo button { font-size: 15px !important; }
#versionAddForm input, #versionAddForm button { font-size: 14px !important; }
#userMgrOverlay, #userMgrOverlay table, #userMgrOverlay td, #userMgrOverlay th { font-size: 15px !important; }
#userMgrOverlay input, #userMgrOverlay select, #userMgrOverlay button, #userMgrOverlay label { font-size: 14px !important; }
#permEditor, #permEditor label, #permEditor button { font-size: 14px !important; }
.zone-denied { opacity: 0.4; pointer-events: none; }
.zone-denied input { pointer-events: none; }
.zone-items label input[type=checkbox] { margin: 0; flex-shrink: 0; transform: scale(0.8); accent-color: #00d4aa; }
.zone-items label input[type=checkbox]:checked { filter: drop-shadow(0 0 2px #00d4aa); }
input[type=checkbox]:hover, .zone-group-hdr input[type=checkbox]:hover { filter: drop-shadow(0 0 3px #00d4aa); cursor: pointer; }
select option { background: #0f3460; color: #e0e0e0; padding: 4px 8px; }
select option:checked { background: #00d4aa; color: #1a1a2e; font-weight: bold; }
select option:hover { background: #1a4080; }
body.light select option { background: #fff; color: #222; }
body.light select option:checked { background: #0a8d6d; color: #fff; }
body.light select option:hover { background: #e8f4f0; }
.zone-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 15px; color: #888; }
.zone-toolbar a { color: #00d4aa; cursor: pointer; text-decoration: none; }
.zone-toolbar a:hover { text-decoration: underline; }
.scene-chip { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 13px; cursor: pointer; background: #0f3460; color: #ccc; border: 1px solid #1a4080; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }
.scene-chip:hover { background: #1a4080; border-color: #00d4aa; color: #fff; }
.scene-chip-save { border-style: dashed; color: #888; }
.scene-chip-save:hover { color: #00d4aa; }
body.light .scene-chip { background: #e8eaed; color: #555; border-color: #d0d5dd; }
body.light .scene-chip:hover { background: #d0ddf0; border-color: #0a8d6d; color: #222; }
body.light .scene-chip-save { color: #888; }
body.light .scene-chip-save:hover { color: #0a8d6d; }
.timer-text { color: #f0883e; font-weight: bold; font-size: 18px; min-width: 70px; }

/* 登录遮罩 */
#loginOverlay { position: fixed; inset: 0; background: #f8fafc; z-index:9999; display: flex; align-items: stretch; justify-content: center; }
#loginBox { width: 100%; min-height: 100svh; display: grid; grid-template-columns: minmax(460px, 1fr) minmax(380px, 1fr); color: #111827; overflow: hidden; text-align: left; background: radial-gradient(circle at 20% 20%, rgba(108,63,245,.14), transparent 32%), radial-gradient(circle at 80% 80%, rgba(45,45,45,.08), transparent 30%), linear-gradient(135deg, #f8fafc, #f1f5f9); }
.login-art-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; padding: 48px; color: #fff; overflow: hidden; background: linear-gradient(135deg, #8b949f, #68727e 54%, #565f6b); }
.login-art-panel::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 20px 20px; pointer-events: none; }
.login-art-panel::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top right, rgba(255,255,255,.22), transparent 35%), radial-gradient(circle at bottom left, rgba(255,255,255,.16), transparent 30%), linear-gradient(135deg, rgba(255,255,255,.08), transparent 45%); pointer-events: none; }
.login-brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 18px; color: #fff; font-size: 34px; font-weight: 900; letter-spacing: 0; }
.login-brand img { width: 66px; height: 66px; border-radius: 16px; object-fit: cover; background: rgba(255,255,255,.12); padding: 5px; box-shadow: 0 14px 38px rgba(0,0,0,.18); }
.login-art-copy { position: relative; z-index: 2; color: rgba(255,255,255,.78); font-size: 19px; font-weight: 700; line-height: 1.65; }
.login-art-slogan { max-width: 680px; margin-top: 10px; color: rgba(255,255,255,.66); font-size: 14px; font-weight: 600; line-height: 1.7; }
.cc-characters { position: relative; z-index: 2; width: 550px; height: 400px; max-width: 100%; align-self: center; margin: auto 0; }
.cc-character { position: absolute; bottom: 0; transform-origin: bottom center; transition: height .7s ease, transform .7s ease; box-shadow: 0 18px 34px rgba(31,41,55,.16); }
.cc-purple { left: 70px; width: 180px; height: 400px; background: #6c3ff5; border-radius: 10px 10px 0 0; z-index: 1; transform: skewX(var(--cc-skew, 0deg)) translateX(var(--cc-tx, 0)); }
.cc-black { left: 240px; width: 120px; height: 310px; background: #2d2d2d; border-radius: 8px 8px 0 0; z-index: 2; transform: skewX(var(--cc-skew, 0deg)) translateX(var(--cc-tx, 0)); }
.cc-orange { left: 0; width: 240px; height: 200px; background: #ff9b6b; border-radius: 120px 120px 0 0; z-index: 3; transform: skewX(var(--cc-skew, 0deg)); }
.cc-yellow { left: 310px; width: 140px; height: 230px; background: #e8d754; border-radius: 70px 70px 0 0; z-index: 4; transform: skewX(var(--cc-skew, 0deg)); }
.cc-face { position: absolute; left: var(--cc-face-left, 45px); top: var(--cc-face-top, 40px); display: flex; gap: var(--cc-eye-gap, 32px); transition: left .2s ease-out, top .2s ease-out; }
.cc-purple .cc-face { --cc-eye-gap: 32px; }
.cc-black .cc-face { --cc-face-left: 26px; --cc-face-top: 32px; --cc-eye-gap: 24px; }
.cc-orange .cc-face { --cc-face-left: 82px; --cc-face-top: 90px; --cc-eye-gap: 32px; }
.cc-yellow .cc-face { --cc-face-left: 52px; --cc-face-top: 40px; --cc-eye-gap: 24px; }
.cc-eye { width: var(--cc-eye-size, 18px); height: var(--cc-eye-size, 18px); border-radius: 50%; background: #fff; overflow: hidden; display: grid; place-items: center; transition: height .15s ease; }
.cc-black .cc-eye { --cc-eye-size: 16px; }
.cc-eye i { width: var(--cc-pupil-size, 7px); height: var(--cc-pupil-size, 7px); border-radius: 50%; background: #2d2d2d; transform: translate(var(--cc-pupil-x, 0), var(--cc-pupil-y, 0)); transition: transform .1s ease-out; }
.cc-black .cc-eye i { --cc-pupil-size: 6px; }
.cc-dot-eye { width: 12px; height: 12px; border-radius: 50%; background: #2d2d2d; transform: translate(var(--cc-pupil-x, 0), var(--cc-pupil-y, 0)); transition: transform .1s ease-out; }
.cc-mouth { position: absolute; left: var(--cc-mouth-left, 40px); top: var(--cc-mouth-top, 88px); width: 80px; height: 4px; border-radius: 999px; background: #2d2d2d; transition: left .2s ease-out, top .2s ease-out; }
.cc-login-typing .cc-purple { height: 440px; --cc-tx: 40px; }
.cc-login-hide-password .cc-purple { height: 440px; --cc-tx: 40px; }
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: 48px; background: hsl(0 0% 100%); }
.login-form-inner { position: relative; isolation: isolate; width: min(420px, 100%); padding: 32px; border-radius: 32px; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.72); backdrop-filter: blur(22px); box-shadow: 0 40px 90px rgba(15,23,42,.12); }
.login-form-inner::before { content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: 32px; background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.18)); filter: blur(.5px); }
#loginBox h2 { color: #0f172a; margin: 0 0 8px; font-size: 30px; line-height: 1.15; font-weight: 900; letter-spacing: 0; text-align: center; }
.login-form-inner p { margin: 0 0 34px; color: #64748b; font-size: 14px; text-align: center; }
.login-form-inner label:not(.login-check) { display: block; color: #111827; font-size: 14px; font-weight: 700; margin: 20px 0 9px; }
#loginBox input[type="text"], #loginBox input[type="password"] { width: 100%; height: 48px; border: 1px solid rgba(203,213,225,.9); border-radius: 999px; background: #fff; color: #111827; font-size: 15px; padding: 0 16px; text-align: left; transition: border-color .18s ease, box-shadow .18s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,.65); }
#loginBox input[type="text"]:focus, #loginBox input[type="password"]:focus { border-color: #6c3ff5; box-shadow: 0 0 0 3px rgba(108,63,245,.12), inset 0 1px 0 rgba(255,255,255,.7); }
.login-password-wrap { position: relative; }
.login-password-wrap input { padding-right: 58px !important; }
.login-pwd-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 38px; min-height: 0 !important; padding: 4px 0 !important; border: 0 !important; background: transparent !important; color: #6c3ff5 !important; font-size: 13px !important; font-weight: 800; line-height: 1; white-space: nowrap; text-align: center; }
.login-pwd-toggle:hover { transform: translateY(-50%) !important; color: #8b5cf6 !important; background: transparent !important; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 22px 0 24px; color: #64748b; font-size: 14px; }
.login-check { display: inline-flex; align-items: center; gap: 8px; color: #64748b; font-size: 14px; cursor: pointer; }
.login-check input { width: 16px !important; height: 16px; min-height: 0; accent-color: #6c3ff5; }
.login-link { min-height: 0; padding: 0 !important; border: 0 !important; background: transparent !important; color: #4f46b5 !important; font-size: 14px; font-weight: 700; }
#loginBox .login-submit { width: 100%; min-height: 48px; margin: 0; border: 0; border-radius: 999px; background: #111827; color: #fff; font-size: 16px; font-weight: 900; box-shadow: 0 12px 24px rgba(17,24,39,.14); transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
#loginBox .login-submit:hover { background: #6c3ff5; transform: translateY(-1px); box-shadow: 0 16px 30px rgba(108,63,245,.22); }
#loginBox .login-submit:disabled { cursor: wait; opacity: .72; transform: none; box-shadow: none; }
.login-version { margin-top: 28px; color: #94a3b8; font-size: 13px; text-align: center; }
#loginErr { color:#e94560; font-size:13px; margin-top:10px; display:none; text-align:center; }
@keyframes ccFloat { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,-18px,0); } }

/* Fault Analysis fallback styles */
/* Fault Analysis page styles.
   故障解析页专属样式：只负责 35 卡片入口、灰度状态和开发中抽屉。 */

.fault-analysis-page {
  min-height: 0 !important;
  padding-bottom: 28px;
  overflow-x: auto;
}

#faultAnalysisMount {
  display: grid;
  grid-template-columns: repeat(7, var(--fault-analysis-section-width, minmax(190px, 1fr)));
  align-items: start;
  gap: 12px;
  min-width: var(--fault-analysis-mount-width, 1402px);
}

.fault-analysis-sec .tools-sec-hdr h2 {
  font-size: 16px;
  letter-spacing: 0;
}

.fault-analysis-sec .tools-sec-hdr {
  gap: 6px;
}

.tools-g.fault-analysis-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px;
}

.tools-c.fault-analysis-card {
  --fault-card-ring: 0 0 0 0 rgba(0,0,0,0);
  width: 100% !important;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  padding: 12px 14px 10px;
  background-color: #303640;
  background-image: linear-gradient(180deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,.035) 18%, rgba(255,255,255,0) 48%, rgba(0,0,0,.14) 100%), linear-gradient(105deg, #292e36 0%, #3d444e 58%, #343a43 100%);
  background-clip: padding-box;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 1px 0 0 rgba(255,255,255,.045), inset 0 -1px 0 rgba(0,0,0,.48), inset -1px 0 0 rgba(0,0,0,.26), var(--fault-card-ring), 0 2px 4px rgba(0,0,0,.38), 0 7px 14px rgba(0,0,0,.24);
}
.tools-c.fault-analysis-card:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.19), inset 1px 0 0 rgba(255,255,255,.055), inset 0 -1px 0 rgba(0,0,0,.52), inset -1px 0 0 rgba(0,0,0,.30), var(--fault-card-ring), 0 3px 6px rgba(0,0,0,.42), 0 9px 18px rgba(0,0,0,.30);
  transform: translateY(-2px);
}
.tools-c.fault-analysis-card:active { transform: scale(0.98); }

.fault-card-width-resizer {
  position: absolute; top: 0; right: -5px; z-index: 3;
  width: 11px; height: 100%; cursor: col-resize;
  touch-action: none; background: transparent;
}
.fault-card-width-resizer::after {
  content: ''; position: absolute; top: 12px; right: 4px; bottom: 12px;
  width: 2px; border-radius: 1px; background: transparent;
  transition: background .16s ease;
}
.fault-card-width-resizer:hover::after,
.fault-card-width-resizer:focus-visible::after,
.fault-card-width-resizer.dragging::after { background: #00d4aa; }
.fault-card-width-resizer:focus-visible { outline: 2px solid #00d4aa; outline-offset: 1px; }
body.fault-card-resizing, body.fault-card-resizing * { cursor: col-resize !important; user-select: none !important; }
body.fault-card-resizing .fault-analysis-card { transform: none !important; }

.fault-analysis-card .tools-c-top {
  gap: 8px;
  margin-bottom: 8px;
}

.fault-analysis-card .tools-c-icon {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.fault-analysis-card .tools-c-top .tools-c-title {
  font-size: 15px;
  line-height: 1.25;
}

.fault-card-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.fault-card-id,
.fault-card-name {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fault-card-name {
  color: inherit;
}

.fault-analysis-card .tools-c-info {
  gap: 10px;
  margin-top: 0;
}

.fault-analysis-card:not(.disabled) {
  --fault-card-ring: 0 0 0 1px rgba(0,212,170,.88);
  border-color: #00d4aa;
}

.fault-analysis-card:not(.disabled) .fault-analysis-ready {
  color: #061a16;
  background: #00d4aa;
  border-color: #00d4aa;
}

.fault-analysis-card.disabled {
  filter: none;
  opacity: 1;
  border-color: rgba(255,255,255,.13);
  cursor: pointer;
}
.fault-analysis-card.disabled .tools-c-icon { color: #9aa3ad; background: rgba(139,148,158,.13); filter: grayscale(1); }
.fault-analysis-card.disabled > .tools-c-top, .fault-analysis-card.disabled > .tools-c-info { opacity: 1; }

.fault-analysis-card.disabled:hover {
  opacity: 1;
  border-color: rgba(255,255,255,.21);
  transform: translateY(-2px);
}

.fault-analysis-ready,
.fault-analysis-dev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.fault-analysis-ready {
  color: #00d4aa;
  background: rgba(0,212,170,0.12);
  border: 1px solid rgba(0,212,170,0.28);
}

.fault-analysis-dev {
  color: #8b949e;
  background: rgba(139,148,158,0.12);
  border: 1px solid rgba(139,148,158,0.24);
}

.fault-analysis-dev-panel {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 26px;
  border: 1px dashed #2d4a6f;
  border-radius: 8px;
  background: rgba(13,17,23,0.54);
  text-align: center;
}

.fault-analysis-dev-title {
  color: #e6edf3;
  font-size: 18px;
  font-weight: 800;
}

.fault-analysis-dev-sub {
  color: #8b949e;
  font-size: 13px;
  line-height: 1.8;
}

.tools-dr.faultwide {
  width: min(1280px, calc(100vw - 32px));
}

.fault-parser { display: flex; flex-direction: column; gap: 14px; }
.fault-upload-zone {
  position: relative;
  border: 2px dashed #1f3a5f;
  border-radius: 8px;
  padding: 26px 18px;
  background: rgba(13,17,23,0.42);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.fault-upload-zone:hover, .fault-upload-zone.dragover {
  border-color: #00d4aa;
  background: rgba(0,212,170,0.06);
  box-shadow: 0 0 0 3px rgba(0,212,170,0.08);
}
.fault-upload-icon { color: #58a6ff; font-size: 34px; line-height: 1; margin-bottom: 8px; }
.fault-upload-title { color: #e6edf3; font-size: 15px; font-weight: 600; }
.fault-upload-sub { color: #8b949e; font-size: 12px; margin-top: 6px; }
.fault-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fault-file-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(88,166,255,0.28);
  border-radius: 8px;
  background: rgba(88,166,255,0.08);
  color: #8b949e;
  font-size: 13px;
}
.fault-file-name { color: #e6edf3; font-weight: 600; flex: 1; min-width: 0; word-break: break-all; }
.fault-icon-btn {
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: #1f3a5f; color: #8b949e; cursor: pointer;
}
.fault-icon-btn:hover { background: #2d4a6f; color: #fff; }
.fault-data-input { min-height: 142px; }
.fault-actions { align-items: center; gap: 8px; }
.fault-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(118px, 1fr)); gap: 10px; }
.fault-summary-item {
  border: 1px solid #1f3a5f;
  border-radius: 8px;
  background: #0d1117;
  padding: 11px 12px;
  min-height: 70px;
}
.fault-summary-label { color: #8b949e; font-size: 12px; }
.fault-summary-value { color: #e6edf3; font-family: Consolas, monospace; font-size: 20px; font-weight: 700; margin-top: 5px; }
.fault-summary-value.warn { color: #f0883e; }
.fault-summary-value.err { color: #ff6b6b; }
.fault-summary-value.ok { color: #00d4aa; }
.fault-insight { line-height: 1.8; }
.fault-help-wrap { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.fault-help-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(88,166,255,0.16); color: #58a6ff;
  border: 1px solid rgba(88,166,255,0.35);
  font-size: 11px; font-weight: 800; cursor: help; line-height: 1;
}
.fault-help-pop {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 320px;
  max-width: 520px;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid #2d4a6f;
  background: #0d1117;
  color: #d7dde5;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  font-size: 12px;
  line-height: 1.75;
  white-space: normal;
  text-align: left;
}
.fault-help-wrap:hover .fault-help-pop { display: block; }
.fault-inline-item { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; }
.fault-checklist, .fault-attribution, .fault-diagnostics { display: flex; flex-direction: column; gap: 8px; }
.fault-section-title { color: #c9d1d9; font-size: 13px; font-weight: 700; margin: 2px 0 0; }
.fault-diag-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 8px; }
.fault-diag-item {
  border: 1px solid #1f3a5f;
  border-radius: 8px;
  background: rgba(13,17,23,0.54);
  padding: 10px 12px;
  min-height: 66px;
}
.fault-diag-label { color: #8b949e; font-size: 12px; display: flex; align-items: center; gap: 5px; }
.fault-diag-value { color: #e6edf3; font-family: Consolas, monospace; font-size: 13px; line-height: 1.6; margin-top: 5px; word-break: break-word; }
.fault-check-item, .fault-attr-item {
  border: 1px solid #1f3a5f;
  border-radius: 8px;
  background: rgba(13,17,23,0.54);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: start;
}
.fault-priority {
  display: inline-flex; justify-content: center; align-items: center;
  min-width: 56px; height: 24px; border-radius: 999px;
  font-size: 12px; font-weight: 800;
}
.fault-priority.p1 { background: rgba(233,69,96,0.18); color: #ff6b6b; border: 1px solid rgba(233,69,96,0.38); }
.fault-priority.p2 { background: rgba(240,136,62,0.16); color: #f0883e; border: 1px solid rgba(240,136,62,0.35); }
.fault-priority.p3 { background: rgba(88,166,255,0.14); color: #58a6ff; border: 1px solid rgba(88,166,255,0.35); }
.fault-check-main, .fault-attr-main { color: #e6edf3; font-size: 13px; line-height: 1.7; }
.fault-check-main b, .fault-attr-main b { color: #00d4aa; }
.fault-check-sub, .fault-attr-sub { color: #8b949e; font-size: 12px; line-height: 1.7; margin-top: 3px; }
.fault-attr-meta { color: #f0883e; font-size: 12px; margin-top: 3px; }
.fault-filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fault-filter-row .tool-input { min-width: 150px; width: auto; }
.fault-filter-row input.tool-input { flex: 1; min-width: 220px; }
.fault-count { color: #8b949e; font-size: 13px; margin-left: auto; white-space: nowrap; }
.tools-dr-bd .fault-data-table-wrap { background: #0d1117; border-radius: 6px; max-height: 52vh; overflow-y: auto; overflow-x: hidden; }
.tools-dr-bd .fault-data-table { table-layout: fixed; width: 100%; min-width: 0; }
.tools-dr-bd .fault-data-table th { background: #1a2332; color: #c9d1d9; font-size: 12px; padding: 8px 8px; position: sticky; top: 0; z-index: 2; }
.tools-dr-bd .fault-data-table th, .tools-dr-bd .fault-data-table td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.tools-dr-bd .fault-data-table td { background: #0d1117; color: #e6edf3; font-size: 12px; padding: 6px 8px; border-bottom-color: #1a2332; vertical-align: top; overflow: visible; text-overflow: clip; }
.tools-dr-bd .fault-data-table tr:hover td { background: #111d2e; }
.tools-dr-bd .fault-data-table th:nth-child(1), .tools-dr-bd .fault-data-table td:nth-child(1) { width: 5%; }
.tools-dr-bd .fault-data-table th:nth-child(2), .tools-dr-bd .fault-data-table td:nth-child(2) { width: 14%; }
.tools-dr-bd .fault-data-table th:nth-child(3), .tools-dr-bd .fault-data-table td:nth-child(3) { width: 7%; }
.tools-dr-bd .fault-data-table th:nth-child(4), .tools-dr-bd .fault-data-table td:nth-child(4) { width: 8%; }
.tools-dr-bd .fault-data-table th:nth-child(5), .tools-dr-bd .fault-data-table td:nth-child(5) { width: 8%; }
.tools-dr-bd .fault-data-table th:nth-child(6), .tools-dr-bd .fault-data-table td:nth-child(6) { width: 10%; }
.tools-dr-bd .fault-data-table th:nth-child(7), .tools-dr-bd .fault-data-table td:nth-child(7) { width: 9%; }
.tools-dr-bd .fault-data-table th:nth-child(8), .tools-dr-bd .fault-data-table td:nth-child(8) { width: 9%; }
.tools-dr-bd .fault-data-table th:nth-child(9), .tools-dr-bd .fault-data-table td:nth-child(9) { width: 8%; }
.tools-dr-bd .fault-data-table th:nth-child(10), .tools-dr-bd .fault-data-table td:nth-child(10) { width: 22%; }
.fault-level { display: inline-flex; min-width: 34px; justify-content: center; border-radius: 999px; padding: 1px 8px; font-weight: 700; font-size: 11px; }
.fault-level.info { color: #58a6ff; background: rgba(88,166,255,0.12); }
.fault-level.warn { color: #f0883e; background: rgba(240,136,62,0.14); }
.fault-level.error { color: #ff6b6b; background: rgba(233,69,96,0.18); }
.fault-event-badge { color: #00d4aa; font-family: Consolas, monospace; font-weight: 600; }
.fault-raw {
  margin: 0;
  padding: 14px;
  border: 1px solid #1f3a5f;
  border-radius: 8px;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 52vh;
  overflow: auto;
}

body.light .tools-c.fault-analysis-card {
  background-color: #f1f3f5;
  background-image: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.52) 20%, rgba(255,255,255,0) 52%, rgba(100,116,139,.12) 100%), linear-gradient(105deg, #fbfbfc 0%, #eef1f4 58%, #e3e7eb 100%);
  border-color: rgba(100,116,139,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), inset 1px 0 0 rgba(255,255,255,.78), inset 0 -1px 0 rgba(71,85,105,.24), inset -1px 0 0 rgba(71,85,105,.14), var(--fault-card-ring), 0 2px 4px rgba(15,23,42,.12), 0 7px 14px rgba(15,23,42,.08);
}
body.light .tools-c.fault-analysis-card:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,1), inset 1px 0 0 rgba(255,255,255,.84), inset 0 -1px 0 rgba(71,85,105,.28), inset -1px 0 0 rgba(71,85,105,.17), var(--fault-card-ring), 0 3px 6px rgba(15,23,42,.15), 0 9px 18px rgba(15,23,42,.12); }

body.light .fault-analysis-card.disabled {
  opacity: 1;
  border-color: rgba(100,116,139,.26);
}

body.light .fault-analysis-card:not(.disabled) {
  --fault-card-ring: 0 0 0 1px rgba(5,150,105,.72);
  border-color: #059669;
}

body.light .fault-analysis-card:not(.disabled) .fault-analysis-ready {
  color: #ffffff;
  background: #059669;
  border-color: #059669;
}

body.light .fault-analysis-ready {
  color: #047857;
  background: #d1fae5;
  border-color: #a7f3d0;
}

body.light .fault-analysis-dev {
  color: #64748b;
  background: #f1f5f9;
  border-color: #d1d5db;
}

body.light .fault-analysis-dev-panel {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.light .fault-analysis-dev-title {
  color: #111827;
}

body.light .fault-analysis-dev-sub {
  color: #64748b;
}

@media (max-width: 720px) {
  .fault-card-width-resizer { display: none; }

  .tools-g.fault-analysis-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .tools-dr.faultwide {
    width: 100vw;
  }

  .fault-diag-grid {
    grid-template-columns: 1fr;
  }
}

/* 浅色主题 */
body.light { background: #f0f2f5; color: #222; }
body.light .panel { background: #fff; border-color: #c0c4cc; }
body.light h1 { color: #0a8d6d; }
body.light label { color: #444; font-weight: bold; }
body.light input, body.light button, body.light select { background: #fff; border-color: #c0c4cc; color: #222; }
body.light input:focus { border-color: #0a8d6d; }
body.light button { background: #0a8d6d; color: #fff; }
body.light #overviewProductType,
body.light .overview-refresh-btn,
body.light .detail-command-row > button,
body.light .detail-connect-btn,
body.light #detailNavigateBtn,
body.light .filter-btn { background: #f4f8fb !important; color: #0f766e !important; border: 1px solid #d9e5ec !important; box-shadow: none; }
body.light #overviewProductType:hover,
body.light .overview-refresh-btn:hover,
body.light .detail-command-row > button:hover,
body.light .detail-connect-btn:hover,
body.light #detailNavigateBtn:hover,
body.light .filter-btn:hover { background: #ffffff !important; color: #0a8d6d !important; border-color: #c8d8e0 !important; box-shadow: 0 3px 8px rgba(15,23,42,.06); }
body.light .filter-btn.active { background: #dff8f3 !important; color: #087967 !important; border-color: #ace7db !important; }
body.light #detailNavigateBtn:disabled { background: #eef2f6 !important; color: #94a3b8 !important; border-color: #dde5ec !important; box-shadow: none; }
body.light .main-tab { background: transparent; color: #64748b; border-color: transparent; box-shadow: none; }
body.light .main-tab:hover { background: #e7f0f3; color: #0f766e; border-color: transparent; }
body.light .main-tab.active { background: #e0f7f2; color: #087967; border-color: transparent; box-shadow: none; }
body.light button.danger { background: #e94560; }
body.light #log { background: #f8f9fa; border-color: #c0c4cc; color: #222; }
body.light #log .info { color: #0a6dd4; }
body.light #log .send { color: #7c3aed; }
body.light #log .recv { color: #0a8d6d; }
body.light #log .error { color: #e94560; }
body.light #log .data { color: #d97706; }
body.light .zone-panel { background: transparent; border-color: transparent; }
body.light .zone-group {
  background: linear-gradient(105deg, #fbfbfc 0%, #f2f3f5 56%, #e7e9ec 100%);
  border-color: rgba(148,163,184,0.18);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.95), inset -1px -1px 0 rgba(100,116,139,0.10), 0 4px 10px rgba(15,23,42,0.07);
}
body.light .zone-group-hdr { background: rgba(255,255,255,.34); border-bottom-color: rgba(148,163,184,.14); color: #333; }
body.light .zone-group-hdr:hover { background: rgba(255,255,255,.68); }
body.light .zone-items label { color: #333; }
body.light .zone-items label:hover { background: #d0d5dd; color: #111; }
body.light .zone-items label:has(input[type=checkbox]:checked) { background: #d0f0e4; border-left: 3px solid #0a8d6d; color: #111; }
body.light #exportPage .zone-items label.zone-analysis-ready {
  background: rgba(10,141,109,.15);
  border-left: 2px solid rgba(10,141,109,.52);
  color: #17443b;
}
body.light #exportPage .zone-items label.zone-analysis-ready:hover {
  background: rgba(10,141,109,.22);
  color: #0f172a;
}
body.light #exportPage .zone-items label.zone-analysis-ready:has(input[type=checkbox]:checked) {
  background: #b3e7d8;
  border-left: 4px solid #0a8d6d;
  color: #053f35;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(10,141,109,.18);
}
body.light .zone-items label:hover .zone-addr { color: #0a8d6d; }
body.light .zone-addr { color: #666; }
body.light .zone-toolbar { color: #555; }
body.light .zone-toolbar a { color: #0a8d6d; }
body.light .zone-group-info { color: #555; }
body.light .form-hint { color: #555; }
body.light .progress-bar { background: #e8eaed; border-color: #c0c4cc; }
body.light .progress-info { color: #555; }
body.light .file-card { background: #e8eaed; border: 1px solid #c0c4cc; }
body.light #versionInfo { background: #fff; border-color: #c0c4cc; color: #444; }
body.light #status { color: #444; }
body.light #status .fail { color: #c00; }
body.light #snModel { color: #0a8d6d; }
body.light .overview-head,
body.light .overview-section,
body.light .metric-box,
body.light .tool-section { background: #fff; border-color: #c0c4cc; }
body.light .product-summary .overview-head { background: transparent; border-color: transparent; }
body.light .pastel-blue { background: #dff3ff; }
body.light .pastel-green { background: #e1f7e8; }
body.light .pastel-yellow { background: #fff2c9; }
body.light .pastel-peach { background: #ffe6dc; }
body.light .pastel-lavender { background: #eee7ff; }
body.light .module-title { color: #0a8d6d; }
body.light .module-subtitle,
body.light .section-note,
body.light .metric-label,
body.light .status-bars span,
body.light .overview-map-legend { color: #374151; }
body.light .tool-result { color: #1f2937; background: rgba(255,255,255,.76); border-color: #cfd8e3; }
body.light .sn-iccid-section { border-color: #bfdbfe; background: #f8fafc; }
body.light .sn-iccid-write-section { border-color: #bbf7d0; background: #f0fdf4; }
body.light .sn-iccid-kicker { background: #dbeafe; color: #1d4ed8; }
body.light .sn-iccid-write-section .sn-iccid-kicker { background: #dcfce7; color: #047857; }
body.light .sn-iccid-section h4,
body.light .sn-iccid-action-text strong,
body.light .sn-iccid-step strong,
body.light .sn-iccid-status strong { color: #111827; }
body.light .sn-iccid-section p,
body.light .sn-iccid-action-text span,
body.light .sn-iccid-status span { color: #64748b; }
body.light .sn-iccid-status { border-color: #bfdbfe; background: #eff6ff; }
body.light .sn-iccid-write-section .sn-iccid-status { border-color: #bbf7d0; background: #ecfdf5; }
body.light .sn-iccid-action-row,
body.light .sn-iccid-step { border-top-color: #dbe4f0; }
body.light .sn-iccid-input { border-color: #d1d5db; background: #fff; color: #111827; }
body.light .sn-iccid-btn-ghost { border-color: #d1d5db; background: #fff; color: #374151; }
body.light .sn-iccid-btn-ghost:hover { border-color: #0a8d6d; background: #ecfdf5; }
body.light .sn-iccid-step > span { background: #dcfce7; color: #047857; }
body.light .sn-iccid-import-zone { border-color: #cbd5e1; background: #f8fafc; }
body.light .sn-iccid-import-zone:hover, body.light .sn-iccid-import-zone:focus-visible, body.light .sn-iccid-import-zone.dragover, body.light .sn-iccid-import-zone.has-file { border-color: #0a8d6d; background: #ecfdf5; }
body.light .sn-iccid-import-zone strong { color: #111827; }
body.light .sn-iccid-import-zone > span:last-child { color: #64748b; }
body.light .device-label-summary { border-color: #d1d5db; background: #f8fafc; }
body.light .device-label-summary strong, body.light .device-label-import-head strong { color: #111827; }
body.light .device-label-summary > div > span, body.light .device-label-fields label { color: #64748b; }
body.light .device-label-summary.is-lab_unit .device-label-badge { color: #92400e; background: #fffbeb; border-color: #f59e0b; }
body.light .device-label-summary.is-lab_board .device-label-badge { color: #9f1239; background: #fff1f2; border-color: #fb7185; }
body.light .device-label-summary.is-customer_site .device-label-badge { color: #166534; background: #f0fdf4; border-color: #22c55e; }
body.light .device-label-summary.is-other .device-label-badge { color: #334155; background: #f1f5f9; border-color: #94a3b8; }
body.light .device-label-actions .device-label-reset, body.light .device-label-template-btn { border-color: #cbd5e1; color: #334155; }
body.light .device-label-list-head strong { color: #111827; }
body.light .device-label-list-head span, body.light .device-label-list-status { color: #64748b; }
body.light .device-label-list-refresh { color: #475569; border-color: #cbd5e1; }
body.light .device-label-filter-clear { color: #475569; border-color: #cbd5e1; background: #fff; }
body.light .device-label-filter-clear:hover { color: #047857; background: #ecfdf5; border-color: #34d399; }
body.light .device-label-table-wrap { border-color: #d1d5db; }
body.light .device-label-table { color: #1f2937; }
body.light .device-label-table th { color: #475569; background: #e8eaed; border-color: #d1d5db; }
body.light .device-label-th-filter > span { color: #475569; }
body.light .device-label-th-filter select, body.light .device-label-th-filter input { background: #fff; color: #111827; border-color: #cbd5e1; }
body.light .db-topology-th-filter > span { color: #475569; }
body.light .db-topology-th-filter select, body.light .db-topology-th-filter input { background: #fff; color: #111827; border-color: #cbd5e1; }
body.light .db-read-section {
  background: #f8fafc;
  border-color: #bfdbfe;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}
body.light .db-topology-section {
  background: #f0fdfa;
  border-color: #99f6e4;
}
body.light .db-section-index {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}
body.light .db-topology-section .db-section-index {
  background: #ccfbf1;
  color: #0f766e;
  border-color: #5eead4;
}
body.light .db-section-head h4,
body.light .db-sub-head strong,
body.light .db-topology-toolbar strong,
body.light .db-topology-form-title {
  color: #111827;
}
body.light .db-section-head p,
body.light .db-section-steps span,
body.light .db-sub-head span,
body.light .db-topology-toolbar span {
  color: #475569;
}
body.light .db-section-steps {
  background: rgba(255,255,255,.72);
  border-color: #cbd5e1;
}
body.light .db-topology-manual {
  background: rgba(255,255,255,.78);
  border-color: #cbd5e1;
}
body.light .db-ghost-btn {
  background: #fff;
  border-color: #cbd5e1;
  color: #374151;
}
body.light .db-ghost-btn:hover {
  background: #ecfdf5;
  border-color: #34d399;
  color: #047857;
}
body.light .db-json-block pre {
  background: #fff;
  color: #111827;
  border-color: #d1d5db;
}
body.light .db-topology-table td,
body.light .device-label-table td {
  color: #111827;
}
body.light .device-label-table td { border-color: #e5e7eb; }
body.light .device-label-table tbody tr:hover { background: #ecfdf5; }
body.light .device-label-list-empty { color: #64748b; }
body.light .tool-divider { background: #d0d5dd; }
body.light .section-title2,
body.light .overview-table td { color: #333; }
body.light .tool-section .section-title2 { color: #333; }
body.light .overview-table-wrap,
body.light .overview-table th,
body.light .overview-table td { border-color: #d0d5dd; }
body.light .overview-table th { background: #e8eaed; color: #555; }
body.light .metric-number { color: #111; }
body.light .overview-map-card { background: #f8f9fa; border-color: #c0c4cc; box-shadow: inset 0 0 0 1px rgba(15,52,96,.08); }
body.light .overview-map-card::before,
body.light .overview-map-card::after { display: none; }
body.light #overviewAmap { background: #f8f9fa; filter: none; }
body.light .province-stats { background: transparent; border-color: rgba(15,118,110,.24); box-shadow: 0 10px 24px rgba(15,23,42,.12); }
body.light .province-stats-title { color: #0f766e; border-bottom-color: #dbe8e6; }
body.light .province-stat-item { background: #f4f8fb !important; color: #64748b !important; border-color: #d9e5ec !important; box-shadow: none; }
body.light .province-stat-item:hover { background: #ffffff !important; color: #0f766e !important; border-color: #c8d8e0 !important; box-shadow: 0 3px 8px rgba(15,23,42,.06); }
body.light .province-stat-item.active { background: #a7ead7 !important; color: #064e3b !important; border-color: #55c9aa !important; box-shadow: inset 3px 0 0 #0f8f73, 0 0 0 1px rgba(15,118,110,.16), 0 4px 12px rgba(15,118,110,.14); text-shadow: none; }
body.light .province-stat-count { background: transparent; color: #0f766e; box-shadow: none; }
body.light .overview-station-panel { background: rgba(242,249,252,.58); border-color: rgba(15,118,110,.34); box-shadow: 0 10px 24px rgba(15,23,42,.1); }
body.light .overview-station-panel header strong,
body.light .overview-station-group-title,
body.light .overview-station-item { color: #17324a; text-shadow: 0 1px 2px rgba(255,255,255,.9); }
body.light .overview-station-group-title,
body.light .overview-station-item { background: transparent; }
body.light .overview-station-search input { background: rgba(255,255,255,.68); color: #17324a; }
body.light .province-map-tooltip { background: rgba(255,255,255,.94); color: #0f172a; border-color: rgba(15,118,110,.2); box-shadow: 0 8px 22px rgba(15,23,42,.12); }
body.light .province-map-tooltip strong { color: #0f766e; }
body.light .province-map-tooltip span { color: #475569; }
body.light .mini-overview { background: #f0f2f5; border-color: #c0c4cc; }
body.light .metric-produced, body.light .metric-box.metric-produced { background: linear-gradient(105deg, #f1f5ff 0%, #dce8ff 100%); }
body.light .metric-installed, body.light .metric-box.metric-installed { background: linear-gradient(105deg, #fff8e5 0%, #ffedb8 100%); }
body.light .metric-online, body.light .metric-box.metric-online { background: linear-gradient(105deg, #ecfbf2 0%, #d4f5e1 100%); }
body.light .metric-offline, body.light .metric-box.metric-offline { background: linear-gradient(105deg, #fbfcfd 0%, #e9eef2 100%); }
body.light .metric-fault, body.light .metric-box.metric-fault { background: linear-gradient(105deg, #fff1f0 0%, #ffd9d6 100%); }
/* Light theme: 产品总览三个大框 */
body.light .mini-section { border-color: rgba(71,85,105,.34); }
body.light .product-summary { background: #e5e7eb; color: #142033; }
body.light .device-summary { background: #e5e7eb; color: #142033; }
body.light .device-detail { background: #e5e7eb; color: #142033; }
body.light .mini-overview .module-title { color: #111827; }
body.light .section-title2 { color: #111827; }
body.light .metric-box { background: rgba(255,255,255,.7); border-color: rgba(148,163,184,.16); box-shadow: inset 1px 1px 0 rgba(255,255,255,.95), inset -1px -1px 0 rgba(100,116,139,.10), 0 4px 10px rgba(15,23,42,.07); }
body.light .metric-number { color: #07111f; }
body.light .overview-table-wrap { background: rgba(255,255,255,.74); border-color: rgba(15,52,96,.12); }
body.light .overview-table th { color: #334155; background: rgba(255,255,255,.86); }
body.light .overview-table td { color: #111827; }
body.light .overview-table th, body.light .overview-table td { border-bottom-color: rgba(15,52,96,.1); }
body.light .th-filter span { color: #334155; }
body.light .th-filter input, body.light .th-filter select { background-color: rgba(255,255,255,.82); border-color: rgba(15,52,96,.14); color: #64748b; }
body.light .detail-group { background: rgba(255,255,255,.38); border-color: rgba(15,52,96,.08); }
body.light .detail-group-title { color: #111827; }
body.light .detail-group-subtitle { color: #64748b; }
body.light .detail-heartbeat-log { background: rgba(255,255,255,.52); border-color: rgba(15,52,96,.08); }
body.light .detail-heartbeat-empty { color: #64748b; }
body.light .detail-heartbeat-table th { background: rgba(255,255,255,.62); color: #475569; }
body.light .detail-heartbeat-table td { color: #334155; border-bottom-color: rgba(15,52,96,.06); }
body.light .detail-heartbeat-table td:nth-child(1) { color: #64748b; }
body.light .detail-log-filter select { background: #fff; color: #334155; border-color: rgba(15,52,96,.15); }
body.light .detail-log-time { background: #fff; color: #334155; border-color: rgba(15,52,96,.15); color-scheme: light; }
body.light .detail-log-sn { background: #fff; color: #334155; border-color: rgba(15,52,96,.15); }
body.light .detail-log-btn { background: #e8f1fb; color: #1f4e79; border-color: rgba(15,52,96,.18); }
body.light .detail-log-btn:hover { background: #d6e8fa; }
body.light .detail-log-btn-reset { background: transparent; }
body.light .detail-log-more-btn { background: #e8f1fb; color: #1f4e79; border-color: rgba(15,52,96,.18); }
body.light .detail-inter-stats { color: #64748b; }
body.light .detail-inter-table th { background: #f1f5f9; color: #475569; box-shadow: inset 0 -1px 0 rgba(15,52,96,.14); }
body.light .detail-inter-table td { color: #334155; border-bottom-color: rgba(15,52,96,.06); }
body.light .detail-inter-row:hover { background: rgba(31,78,121,.08); }
body.light .detail-inter-sn { color: #64748b; }
body.light .detail-inter-function-meaning { color: #1f6fb2; }
body.light .detail-inter-property-name { color: #7c3aed; }
body.light .detail-inter-property-value { color: #1a7f37; }
body.light .detail-inter-payload-row td { background: rgba(31,78,121,.06); }
body.light .detail-inter-payload { color: #334155; }
body.light .detail-inter-payload-label { color: #64748b; }
body.light .detail-inter-payload pre { background: #fff; border-color: rgba(15,52,96,.15); color: #1f6fb2; }
body.light .detail-inter-payload-summary { color: #334155; }
body.light .detail-inter-payload-hex { color: #1f6fb2; }
body.light .detail-inter-payload-b64 { color: #7c3aed; }
body.light .detail-inter-payload-decoded { color: #1a7f37 !important; }
body.light .global-inter-head-control { background: rgba(255,255,255,.82); border-color: rgba(15,52,96,.16); color: #334155; color-scheme: light; }
body.light .detail-card { background: #f8fbff; border-color: rgba(148,163,184,.14); }
body.light .detail-card:nth-child(6n+1) { background: #f0f7ff; }
body.light .detail-card:nth-child(6n+2) { background: #f5f1ff; }
body.light .detail-card:nth-child(6n+3) { background: #f1fbf5; }
body.light .detail-card:nth-child(6n+4) { background: #fff8e6; }
body.light .detail-card:nth-child(6n+5) { background: #fff1f5; }
body.light .detail-card:nth-child(6n) { background: #eefaf9; }
body.light .overview-right-column .device-info-grid > .detail-card {
  background: linear-gradient(105deg, #fbfbfc 0%, #f2f3f5 56%, #e7e9ec 100%) !important;
  border-color: rgba(148,163,184,0.18);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.95), inset -1px -1px 0 rgba(100,116,139,0.10), 0 4px 10px rgba(15,23,42,0.07);
}
body.light .detail-card span { color: #94a3b8; }
body.light .overview-right-column .detail-location-chip span,
body.light .overview-right-column .detail-locate-status,
body.light .overview-right-column .device-info-grid .detail-card > span,
body.light .overview-right-column .traffic-ring-card > span,
body.light .overview-right-column .traffic-ring-summary span,
body.light .overview-right-column .traffic-ring-labels span,
body.light .overview-right-column .sim-id-card span,
body.light .overview-right-column .sim-date-summary span {
  color: #475569 !important;
  font-weight: 800;
}
body.light .detail-card b { color: #111827; }
body.light .detail-figure-card .detail-figure-wrap { background: transparent; box-shadow: none; }
body.light .detail-figure-card img { background: transparent; filter: drop-shadow(0 0 1px rgba(15,23,42,.2)) drop-shadow(0 9px 8px rgba(15,23,42,.2)); }
body.light .detail-figure-card:hover img { filter: drop-shadow(0 0 1px rgba(15,23,42,.25)) drop-shadow(0 12px 10px rgba(15,23,42,.26)); }
body.light .detail-card b.detail-status-online { color: #16a34a !important; }
body.light .detail-card b.detail-status-offline { color: #ef4444 !important; }
body.light .detail-esc-open { color: #111827; }
body.light .detail-status-signal { color: #64748b; }
body.light .detail-signal-label { color: #64748b; }
body.light .detail-signal-dbm { color: #64748b; }
body.light .detail-location-info { background: rgba(255,255,255,.52); color: #64748b; }
body.light .detail-location-info b { color: #111827; }
body.light .detail-location-chip { background: rgba(255,255,255,.68); border-color: rgba(148,163,184,.14); }
body.light .detail-location-chip span { color: #475569; font-weight: 800; }
body.light .detail-esc-card small { color: #64748b; }
body.light .traffic-ring-card { background: #f0f7ff; border-color: rgba(148,163,184,.14); }
body.light .overview-right-column .sim-info-group .traffic-ring-card,
body.light .overview-right-column .sim-info-group .sim-id-card,
body.light .overview-right-column .sim-info-group .sim-date-summary {
  background: linear-gradient(105deg, #fbfbfc 0%, #f2f3f5 56%, #e7e9ec 100%) !important;
  border-color: rgba(148,163,184,.18);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.95), inset -1px -1px 0 rgba(100,116,139,.10), 0 4px 10px rgba(15,23,42,.07);
}
body.light .traffic-ring-card span { color: #475569; font-weight: 800; }
body.light .traffic-ring-card strong { color: #111827; }
body.light .traffic-ring-summary span { color: #64748b; }
body.light .traffic-ring-summary b { color: #111827; }
body.light .traffic-ring-values b { color: #111827; }
body.light #detailSimRecharge.is-positive { color: #b7791f; }
body.light .traffic-ring-inner { background: rgba(255,255,255,.95); }
body.light .traffic-ring-inner b { color: #111827; }
body.light .traffic-ring-inner b.traffic-warning,
body.light .traffic-ring-inner b.traffic-recharged { color: #a16207; }
body.light .traffic-ring-inner b.traffic-over-limit { color: #dc2626; }
body.light .sim-traffic-state { color: #475569; background: #f8fafc; border-color: #dbe4ef; }
body.light .sim-traffic-state.is-success { color: #475569; background: #f8fafc; border-color: #dbe4ef; }
body.light .sim-traffic-state.is-warning { color: #a16207; background: #fffbeb; border-color: #fde68a; }
body.light .sim-traffic-state.is-danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
body.light .traffic-daily-card { background: #fff; border-color: rgba(148,163,184,.18); box-shadow: 0 8px 22px rgba(15,23,42,.06); }
body.light .detail-sim-manual-query input { background: #fff; color: #111827; border-color: rgba(148,163,184,.45); }
body.light .detail-sim-manual-query input:focus { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22,119,255,.14); }
body.light .traffic-daily-title { color: #111827; }
body.light .traffic-daily-chart { background: #fff; }
body.light .traffic-daily-tooltip { background: #fff; color: #111827; border-color: rgba(148,163,184,.18); box-shadow: 0 8px 24px rgba(15,23,42,.16); }
body.light .traffic-daily-axis { stroke: rgba(100,116,139,.36); }
body.light .traffic-daily-grid { stroke: rgba(148,163,184,.24); }
body.light .traffic-daily-label { fill: #64748b; }
body.light .traffic-daily-axis-title { fill: #334155; }
body.light .traffic-daily-bar-limit { fill: rgba(100, 116, 139, .22); }
body.light .traffic-daily-bar-future { fill: rgba(100, 116, 139, .10); }
body.light .traffic-daily-bar-limit-future { fill: rgba(100, 116, 139, .08); }
body.light .traffic-month-picker { color: #64748b; }
body.light .traffic-month-picker input { background: #fff; border-color: #cfd8e3; color: #334155; color-scheme: light; }
body.light .traffic-month-picker input::-webkit-calendar-picker-indicator { filter: none; }
body.light .traffic-daily-subhead { color: #64748b; }
body.light .traffic-daily-empty { color: #94a3b8; }
body.light .detail-sub-device-group {
  background: #fff;
  border-color: rgba(148,163,184,.24);
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
}
body.light .detail-sub-device-head span { color: #334155; }
body.light .detail-sub-device-table-wrap {
  background: #fff;
  border-color: #cbd5e1;
  scrollbar-color: rgba(100,116,139,.7) #eef2f7;
}
body.light .detail-sub-device-table { color: #111827; }
body.light .detail-sub-device-table th {
  background: #e8eef7;
  color: #1f2937;
  border-bottom-color: #cbd5e1;
}
body.light .detail-sub-device-table td {
  color: #111827;
  border-bottom-color: #e2e8f0;
}
body.light .detail-sub-device-table tbody tr:hover td { background: #f0f9ff; }
body.light .detail-sub-device-empty { color: #475569; }
body.light .detail-sub-device-table .status-online,
body.light .detail-sub-device-table .online,
body.light .detail-sub-device-table .topo-online {
  color: #047857 !important;
  background: #d1fae5 !important;
}
body.light .detail-sub-device-table .status-offline,
body.light .detail-sub-device-table .offline,
body.light .detail-sub-device-table .topo-offline {
  color: #374151 !important;
  background: #e5e7eb !important;
}
body.light .traffic-ring { --traffic-color: #0369a1; background: conic-gradient(var(--traffic-color) calc(var(--traffic-percent) * 1%), #b0b7c3 0); }
body.light .traffic-ring.traffic-ring-warning,
body.light .traffic-ring.traffic-ring-recharged { --traffic-color: #b7791f; }
body.light .traffic-ring.traffic-ring-danger { --traffic-color: #dc2626; }
body.light .sim-date-summary { background: #eefaf9 !important; max-width: 260px; }
body.light .sim-date-summary b { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
body.light .overview-controls label { color: #94a3b8; }
body.light .overview-controls select { background: rgba(255,255,255,.74); color: #0f766e; border-color: rgba(255,255,255,.92); }
body.light #overviewSceneSelect { background: rgba(255,255,255,.74); color: #0f766e; border-color: rgba(255,255,255,.92); }
body.light .filter-btn { background: rgba(255,255,255,.72); color: #334155; }
body.light .filter-btn.active { background: #e9f7ff; color: #0f766e; }
body.light .overview-refresh-btn { background: #f3fbf8; color: #0f766e; border-color: rgba(15,118,110,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.72); }
body.light .overview-refresh-btn:hover { background: #ffffff; color: #0a8d6d; }
body.light .detail-query-inline input { background: rgba(255,255,255,.8); border-color: rgba(15,52,96,.16); color: #334155; }
body.light .detail-query-inline button { background: #eef8f7; color: #0f766e; }
body.light .current-product-note { color: #64748b; }
body.light .device-summary .current-product-note { color: #334155; font-size: 14px; font-weight: 800; }
body.light .current-product-highlight { color: #0f766e; }
body.light .device-overview-table tbody tr.selected td {
  background: #d8f3ed !important;
  box-shadow: inset 0 1px 0 rgba(15,118,110,.28), inset 0 -1px 0 rgba(15,118,110,.28);
}
body.light .device-overview-table tbody tr.selected td:first-child {
  color: #0f766e;
  box-shadow: inset 4px 0 0 #0f766e, inset 0 1px 0 rgba(15,118,110,.28), inset 0 -1px 0 rgba(15,118,110,.28);
}
body.light .esc-status.open { color: #111827; }
body.light .esc-action-btn { background: #eef8f7; color: #0f766e; border-color: rgba(15,118,110,.22); }
body.light .esc-action-btn:hover { background: #dff8f3; color: #0a8d6d; }
body.light .detail-locate-status { color: #64748b; }
body.light .detail-relocate-btn { background: #e5e7eb !important; color: #64748b !important; border-color: #cbd5e1 !important; }
body.light .traffic-daily-value-label { fill: #1677ff; }
.detail-sim-manual-query button,
.detail-refresh-topology-btn {
  background: rgba(255,255,255,0.08) !important;
  color: #c9d1d9 !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: none !important;
}
.detail-sim-manual-query button:hover:not(:disabled),
.detail-refresh-topology-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.12) !important;
  color: #e6edf3 !important;
  transform: none !important;
}
body.light .detail-sim-manual-query button,
body.light .detail-refresh-topology-btn {
  background: #fff !important;
  color: #0f766e !important;
  border-color: #cbd5e1 !important;
  font-weight: 900;
}
body.light .detail-sim-manual-query button:hover:not(:disabled),
body.light .detail-refresh-topology-btn:hover:not(:disabled) {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #34d399 !important;
}
body.light .detail-location-info .detail-connect-btn,
body.light .detail-location-info #detailNavigateBtn {
  background: #fff !important;
}
body.light .detail-location-info .detail-connect-btn:hover:not(:disabled),
body.light .detail-location-info #detailNavigateBtn:hover:not(:disabled) {
  background: #ecfdf5 !important;
}
body.light .detail-sim-manual-query button:disabled,
body.light .detail-refresh-topology-btn:disabled,
body.light .detail-location-info .detail-connect-btn:disabled,
body.light .detail-location-info #detailNavigateBtn:disabled {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
  opacity: 1;
  cursor: not-allowed;
}
body.light .device-summary .overview-controls .filter-btn,
body.light .device-summary .overview-controls .overview-refresh-btn,
.device-summary .overview-controls .filter-btn,
.device-summary .overview-controls .overview-refresh-btn {
  background: rgba(255,255,255,0.08) !important;
  color: #c9d1d9 !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: none !important;
  transform: none !important;
}
body.light .device-summary .overview-controls .filter-btn,
body.light .device-summary .overview-controls .overview-refresh-btn {
  background: #fff !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  font-weight: 900;
}
.device-summary .overview-controls .filter-btn.active {
  background: rgba(255,255,255,0.08) !important;
  color: #00d4aa !important;
  border-color: rgba(255,255,255,0.10) !important;
}
body.light .device-summary .overview-controls .filter-btn.active {
  background: #dff8f3 !important;
  color: #065f46 !important;
  border-color: #7dd3c7 !important;
}
.device-summary .overview-controls .filter-btn:hover,
.device-summary .overview-controls .overview-refresh-btn:hover {
  background: rgba(255,255,255,0.12) !important;
  color: #e6edf3 !important;
  transform: none !important;
}
body.light .device-summary .overview-controls .filter-btn:hover,
body.light .device-summary .overview-controls .overview-refresh-btn:hover {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #34d399 !important;
}
/* Light theme popups */
body.light #versionInfo { background: #fff !important; border-color: #c0c4cc !important; color: #333 !important; }
body.light #versionInfo table { color: #333 !important; }
body.light #versionInfo td { border-color: #d0d5dd !important; }
body.light #versionInfo hr { border-color: #d0d5dd !important; }
body.light #versionInfo .about-us-line { border-top-color: #d0d5dd !important; color: #555 !important; }
body.light #versionInfo input { background: #f0f2f5 !important; border-color: #c0c4cc !important; color: #333 !important; }
body.light #versionAddForm { background: #f0f2f5 !important; border-color: #c0c4cc !important; }
body.light #userMgrOverlay > div { background: #fff !important; border-color: #c0c4cc !important; }
body.light #userMgrOverlay table { color: #333 !important; }
body.light #userMgrOverlay td { border-color: #d0d5dd !important; }
body.light #userMgrOverlay input, body.light #userMgrOverlay select { background: #fff !important; border-color: #c0c4cc !important; color: #333 !important; }
body.light #userMgrOverlay > div > div:first-of-type { border-color: #c0c4cc !important; }
body.light #userMgrOverlay > div > div:nth-of-type(2) { background: #f8f9fa !important; border-color: #d0d5dd !important; }
body.light #userMgrOverlay thead tr { background: #e8eaed !important; }
body.light #permEditor > div { background: #fff !important; border-color: #c0c4cc !important; color: #333 !important; }
body.light #permEditor label { color: #333 !important; }
body.light #mapOverlay > div { background: #fff !important; border-color: #c0c4cc !important; }
body.light #loginOverlay, body.light #loginBox, body.light .login-form-panel { background: #fff !important; }
body.light #sn { color: #111 !important; }
body.light b, body.light strong { color: #111; }
body.light .cmd-section-title { color: #444; border-bottom-color: #c0c4cc; }


/* ===== AI智诊云 v2.0 - 侧栏模块系统 ===== */
#appShell{display:flex;min-height:100vh;width:100%;overflow:hidden}
#sidebar{width:220px;min-width:220px;background:#0f1a2e;border-right:1px solid #0f3460;display:flex;flex-direction:column;transition:width .25s,min-width .25s;overflow:hidden;z-index:100;flex-shrink:0}
#sidebar.collapsed{width:60px;min-width:60px}
body.light #sidebar{background:#e8eaed;border-right-color:#c0c4cc}
.sidebar-header{display:flex;align-items:center;gap:10px;padding:14px 12px;border-bottom:1px solid #0f3460;min-height:56px}
.sidebar-header img{height:30px;width:30px;border-radius:6px;flex-shrink:0}
.sidebar-header .sidebar-title{color:#00d4aa;font-size:14px;font-weight:bold;white-space:nowrap;overflow:hidden}
#sidebar.collapsed .sidebar-title,#sidebar.collapsed .sidebar-item-label{display:none}
body.light .sidebar-header{border-bottom-color:#c0c4cc}
body.light .sidebar-header .sidebar-title{color:#0a8d6d}
.sidebar-menu{flex:1;overflow-y:auto;padding:6px 0}
.sidebar-item{display:flex;align-items:center;gap:10px;padding:11px 14px;cursor:pointer;color:#aaa;text-decoration:none;transition:background .15s,color .15s;white-space:nowrap;overflow:hidden;border-left:3px solid transparent;font-size:14px;user-select:none}
.sidebar-item:hover{background:rgba(0,212,170,0.08);color:#ccc}
.sidebar-item.active{background:rgba(0,212,170,0.12);color:#00d4aa;border-left-color:#00d4aa}
body.light .sidebar-item{color:#555}
body.light .sidebar-item:hover{background:#d0d5dd;color:#333}
body.light .sidebar-item.active{background:rgba(10,141,109,0.1);color:#0a8d6d;border-left-color:#0a8d6d}
.sidebar-item-icon{font-size:18px;width:24px;text-align:center;flex-shrink:0}
.sidebar-footer{padding:8px;border-top:1px solid #0f3460;display:flex;justify-content:center}
body.light .sidebar-footer{border-top-color:#c0c4cc}
.sidebar-toggle-btn{cursor:pointer;color:#888;font-size:16px;padding:6px;transition:color .15s;user-select:none}
.sidebar-toggle-btn:hover{color:#00d4aa}
body.light .sidebar-toggle-btn:hover{color:#0a8d6d}
#mainArea{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden}
#topBar{display:flex;align-items:center;justify-content:space-between;padding:6px 14px;background:#16213e;border-bottom:1px solid #0f3460;min-height:48px;flex-shrink:0}
body.light #topBar{background:#fff;border-bottom-color:#c0c4cc}
body.light .top-header{background:#f0f2f5;border-bottom-color:#c0c4cc}
.topbar-left{display:flex;align-items:center;gap:8px}
.topbar-left .topbar-title{font-size:16px;font-weight:bold;color:#00d4aa;margin:0;display:flex;align-items:center}
.topbar-left .topbar-title img{height:26px;margin-right:6px}
body.light .topbar-left .topbar-title{color:#0a8d6d}
.hamburger-btn{cursor:pointer;color:#888;font-size:20px;padding:0 4px;transition:color .15s;user-select:none}
.hamburger-btn:hover{color:#00d4aa}
.topbar-right{display:flex;align-items:center;gap:8px}
#moduleContent{flex:1;overflow-y:auto;padding:12px;position:relative}
.module-page{display:none}
.module-page.active{display:block}
.module-page-header{font-size:18px;font-weight:bold;color:#00d4aa;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #0f3460}
body.light .module-page-header{border-bottom-color:#c0c4cc;color:#0a8d6d}
.module-subnav{display:flex;gap:0;margin-bottom:10px;border-bottom:1px solid #0f3460;overflow-x:auto}
body.light .module-subnav{border-bottom-color:#c0c4cc}
.module-subnav-item{padding:7px 14px;font-size:13px;color:#888;cursor:pointer;white-space:nowrap;border-bottom:2px solid transparent;transition:color .15s,border-color .15s;user-select:none}
.module-subnav-item:hover{color:#ccc}
.module-subnav-item.active{color:#00d4aa;border-bottom-color:#00d4aa}
body.light .module-subnav-item{color:#555}
body.light .module-subnav-item:hover{color:#333}
body.light .module-subnav-item.active{color:#0a8d6d;border-bottom-color:#0a8d6d}
.module-subpage{display:none}
.module-subpage.active{display:block}
.dev-placeholder{text-align:center;padding:40px 20px;color:#888}
.dev-placeholder .dev-icon{font-size:44px;margin-bottom:12px}
.dev-placeholder .dev-title{font-size:15px;margin-bottom:4px}
.dev-placeholder .dev-hint{font-size:13px;color:#999}
#logPanel{border-top:1px solid #0f3460;background:#16213e;flex-shrink:0;overflow:hidden;display:flex;flex-direction:column;max-height:260px}
body.light #logPanel{background:#fff;border-top-color:#c0c4cc}
#logPanel.collapsed{max-height:34px}
.log-panel-header{display:flex;justify-content:space-between;align-items:center;padding:6px 14px;cursor:pointer;user-select:none;background:rgba(0,0,0,0.15);flex-shrink:0}
.log-panel-header span:first-child{font-size:12px;font-weight:bold;color:#888}
.log-panel-toggle{font-size:12px;color:#999}
.log-panel-body{flex:1;overflow:hidden;padding:6px 12px;display:flex;flex-direction:column}
#logPanel.collapsed .log-panel-body{display:none}
#logPanel #log{height:130px;font-size:13px}
#logPanel .log-actions{display:flex;gap:6px;margin-top:4px;flex-wrap:wrap;align-items:center}
.conn-badge{font-size:12px;padding:2px 8px;border-radius:10px;font-weight:bold}
.conn-badge.ok{background:rgba(63,185,80,0.15);color:#3fb950}
.conn-badge.fail{background:rgba(233,69,96,0.15);color:#e94560}
body.light .conn-badge.ok{background:#d0f0d4}
body.light .conn-badge.fail{background:#fdd}
/* ---- Topology Management ---- */
.topo-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.topo-sn-input{flex:1;min-width:180px}
.topo-btn{padding:8px 16px;border-radius:8px;border:1px solid transparent;cursor:pointer;font-size:13px;font-weight:600;white-space:nowrap;transition:opacity 0.2s}
.topo-btn:disabled{opacity:0.4;cursor:not-allowed}
.topo-btn-primary{background:#0f3460;color:#00d4aa;border-color:#00d4aa}
.topo-btn-primary:hover{background:#1a4a7a}
.topo-btn-add{background:#0d3320;color:#3fb950;border-color:#3fb950}
.topo-btn-add:hover{background:#164a30}
.topo-btn-del{background:#3a1a1a;color:#ff6b6b;border-color:#ff6b6b}
.topo-btn-del:hover{background:#552525}
.topo-btn-danger{background:#4a1a1a;color:#ff4444;border-color:#ff4444}
.topo-btn-danger:hover{background:#662525}
.topo-summary{padding:10px 16px;border-radius:8px;background:rgba(15,52,96,0.3);margin-bottom:12px}
.topo-table-wrap{overflow-x:auto;overflow-y:auto;max-height:420px;border:1px solid rgba(255,255,255,0.08);border-radius:10px;background:rgba(0,0,0,0.15)}
.topo-table{min-width:1180px;table-layout:fixed;width:100%}
.topo-table th,.topo-table td{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:10px 8px;font-size:12px;line-height:1.45;vertical-align:middle}
.topo-table th{font-weight:600;color:#c9d1d9;background:#1a2332}
.topo-table td{background:#0d1117;color:#e6edf3;border-bottom:1px solid #1a2332}
.topo-table tr:hover td{background:#111d2e}
.topo-table th:nth-child(1),.topo-table td:nth-child(1){width:42px}
.topo-table th:nth-child(2),.topo-table td:nth-child(2){width:50px}
.topo-table th:nth-child(3),.topo-table td:nth-child(3){width:95px}
.topo-table th:nth-child(4),.topo-table td:nth-child(4){width:115px}
.topo-table th:nth-child(5),.topo-table td:nth-child(5){width:95px}
.topo-table th:nth-child(6),.topo-table td:nth-child(6){width:85px}
.topo-table th:nth-child(7),.topo-table td:nth-child(7){width:95px}
.topo-table th:nth-child(8),.topo-table td:nth-child(8){width:270px}
.topo-table th:nth-child(9),.topo-table td:nth-child(9){width:210px}
.topo-table th:nth-child(10),.topo-table td:nth-child(10){width:50px}
.shared-column-table th { position: relative; }
.shared-column-table th:not(:last-child)::after {
  content: ''; position: absolute; top: 7px; right: 0; bottom: 7px; width: 1px;
  background: rgba(88,166,255,.62); pointer-events: none;
}
.shared-column-resizer {
  position: absolute; z-index: 3; top: 0; right: -4px; width: 8px; height: 100%;
  cursor: col-resize; touch-action: none;
}
.shared-column-resizer:hover, .shared-column-table.is-resizing .shared-column-resizer { background: rgba(0,212,170,.25); }
body.shared-column-resizing { cursor: col-resize; user-select: none; }
.topo-table.shared-column-table th:not(:last-child)::after {
  top: 0; right: 0; bottom: 0; width: 1px; background: rgba(88,166,255,.78);
}
.topo-table.shared-column-table .shared-column-resizer { z-index: 8; }
.topo-chk-col{width:42px;text-align:center}
.topo-chk{width:16px;height:16px;cursor:pointer;accent-color:#00d4aa}
.topo-status{display:inline-block;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:600}
.topo-online{background:rgba(63,185,80,0.2);color:#3fb950}
.topo-offline{background:rgba(225,228,232,0.15);color:#8b949e}
.topo-row-del-btn{background:transparent;color:#ff6b6b;border:1px solid #ff6b6b;border-radius:4px;padding:2px 6px;cursor:pointer;font-size:12px;line-height:1.4;min-width:26px}
.topo-row-del-btn:hover{background:rgba(255,107,107,0.15)}
.topo-tabs{display:flex;gap:0;margin-bottom:16px;border-bottom:1px solid #0f3460}
.topo-tab{padding:10px 24px;background:transparent;color:#888;border:0;cursor:pointer;font-size:14px;border-bottom:2px solid transparent;transition:all 0.2s}
.topo-tab.active{color:#00d4aa;border-bottom-color:#00d4aa}
.topo-tab:hover{color:#ccc}
.topo-add-panel{padding:4px 0}
.topo-select{width:100%;padding:8px 12px;border-radius:6px;background:#0d1117;color:#ccc;border:1px solid #30363d;font-size:14px}
.topo-input{width:100%;padding:8px 12px;border-radius:6px;background:#0d1117;color:#ccc;border:1px solid #30363d;font-size:14px;box-sizing:border-box}
.topo-submit-btn{width:100%;padding:10px;margin-top:16px;border-radius:6px;background:#0f3460;color:#00d4aa;border:1px solid #00d4aa;cursor:pointer;font-size:14px;font-weight:600}
.topo-submit-btn:hover{background:#1a4a7a}
.topo-add-status{margin-top:12px;padding:10px;border-radius:6px;background:rgba(15,52,96,0.2);font-size:13px}

/* ---- Debug 0x18/0x19 ---- */
.pastel-purple{background:rgba(139,92,246,0.06);border-color:rgba(139,92,246,0.2)}
.debug-sn-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.debug-sn-input{flex:1;min-width:160px}
.debug-row{display:flex;gap:16px;flex-wrap:wrap}
.debug-field{display:flex;flex-direction:column;gap:4px;min-width:160px}
.debug-val-field{flex:1}
.debug-field label{color:#8b949e;font-size:12px}
.debug-val-row{display:flex;gap:8px}
.debug-val-row .tool-input{flex:1}
.debug-select{padding:8px 12px;border-radius:6px;background:#0d1117;color:#ccc;border:1px solid #30363d;font-size:13px}
.debug-result{margin-top:16px;padding:16px;border-radius:8px;background:#0d1117;border:1px solid #30363d;max-height:400px;overflow-y:auto}
.debug-result pre{color:#00d4aa;font-family:Consolas,monospace;font-size:12px;line-height:1.5}

@media(max-width:900px){
#sidebar:not(.force-open){width:60px;min-width:60px}
#sidebar:not(.force-open) .sidebar-title,#sidebar:not(.force-open) .sidebar-item-label{display:none}
#moduleContent{padding:8px}
}

/* ---- 防逆流485报文解析 左右两栏布局 ---- */
.rs485-result-body { font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.55; }
.rs485-empty { color: #8b949e; text-align: center; padding: 40px 20px; font-size: 14px; }
.rs485-row { display: flex; gap: 0; margin-bottom: 1px; min-height: 28px; align-items: stretch; }
.rs485-row:hover { background: rgba(0,212,170,0.04); }
.rs485-raw { flex: 0 0 510px; padding: 5px 10px; background: rgba(0,0,0,0.22); color: #c9d1d9; word-break: break-all; font-size: 13px; border-right: 2px solid #1f3a5f; display: flex; align-items: flex-start; gap: 6px; }
.rs485-raw .rs485-time { color: #6e7681; font-size: 11px; white-space: nowrap; flex-shrink: 0; }
.rs485-raw .rs485-hex { color: #e6edf3; }
.rs485-parsed { flex: 1; padding: 5px 12px; color: #e6edf3; min-width: 0; }
.rs485-frame-tag { display: inline-block; font-weight: bold; font-size: 12px; padding: 1px 8px; border-radius: 3px; margin-right: 8px; white-space: nowrap; }
.rs485-tag-request { background: #1a3a5c; color: #58a6ff; }
.rs485-tag-response { background: #1a3c2a; color: #3fb950; }
.rs485-tag-error { background: #3c1a1a; color: #ff6b6b; }
.rs485-tag-write { background: #3c2a1a; color: #f0883e; }
.rs485-frame-info { color: #8b949e; font-size: 12px; }
.rs485-reg-chips { margin-top: 2px; display: flex; flex-wrap: wrap; gap: 3px 10px; }
.rs485-reg-chip { display: inline-flex; align-items: baseline; gap: 3px; font-size: 12px; padding: 2px 0; }
.rs485-reg-chip .reg-addr { color: #6e7681; font-size: 11px; }
.rs485-reg-chip .reg-name { color: #c9d1d9; }
.rs485-reg-chip .reg-value { color: #e6edf3; font-weight: bold; }
.rs485-reg-chip .reg-unit { color: #8b949e; font-size: 11px; }
.rs485-reg-chip.reg-defined .reg-value { color: #00d4aa; }
.rs485-reg-chip.reg-enum-enable { color: #00d4aa; }
.rs485-reg-chip.reg-enum-disable { color: #f0883e; }
.rs485-reg-chip.reg-fault { color: #ff6b6b; }
.rs485-raw-single { color: #8b949e; padding: 5px 10px; font-size: 12px; font-style: italic; }
.rs485-reg-more { color: #58a6ff; font-size: 11px; cursor: pointer; }
/* 从站分隔线 */
.rs485-slave-sep { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; padding: 4px 10px; background: rgba(0,212,170,0.06); border-left: 3px solid #00d4aa; }
.rs485-slave-sep span { color: #00d4aa; font-weight: bold; font-size: 13px; }
.rs485-slave-sep small { color: #6e7681; font-size: 11px; }

/* 异常摘要面板 */
.rs485-warn-panel { margin-bottom: 10px; border: 1px solid #f0883e; border-radius: 8px; overflow: hidden; }
.rs485-warn-panel.collapsed .rs485-warn-body { display: none; }
.rs485-warn-header { display: flex; align-items: center; padding: 8px 14px; background: rgba(240,136,62,0.1); color: #f0883e; font-size: 14px; font-weight: bold; cursor: pointer; user-select: none; }
.rs485-warn-header:hover { background: rgba(240,136,62,0.16); }
.rs485-warn-body { max-height: 240px; overflow-y: auto; }
.rs485-warn-item { display: flex; align-items: center; gap: 8px; padding: 5px 14px; font-size: 12px; cursor: pointer; border-bottom: 1px solid rgba(240,136,62,0.06); transition: background 0.15s; }
.rs485-warn-item:hover { background: rgba(240,136,62,0.08); }
.rs485-warn-item:last-child { border-bottom: none; }
.rs485-warn-idx { color: #8b949e; font-size: 11px; min-width: 22px; }
.rs485-warn-icon { font-size: 13px; flex-shrink: 0; }
.rs485-warn-type { color: #f0883e; font-weight: bold; white-space: nowrap; min-width: 80px; }
.rs485-warn-slave { color: #8b949e; font-size: 11px; white-space: nowrap; }
.rs485-warn-time { color: #6e7681; font-size: 11px; font-family: Consolas,monospace; white-space: nowrap; }
.rs485-warn-desc { color: #c9d1d9; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs485-warn-rate { color: #f0883e; font-size: 10px; font-family: Consolas,monospace; white-space: nowrap; background: rgba(240,136,62,0.08); padding: 1px 6px; border-radius: 3px; }
.rs485-warn-goto { color: #58a6ff; font-size: 11px; white-space: nowrap; opacity: 0; transition: opacity 0.15s; }
.rs485-warn-item:hover .rs485-warn-goto { opacity: 1; }

/* 异常摘要从站筛选按钮 */
.rs485-warn-fbtn { padding: 2px 10px; border: 1px solid #3a5068; border-radius: 3px; background: transparent; color: #8b949e; font-size: 11px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.rs485-warn-fbtn:hover { border-color: #f0883e; color: #f0883e; }
.rs485-warn-fbtn.active { background: rgba(240,136,62,0.15); border-color: #f0883e; color: #f0883e; font-weight: bold; }

/* RS485解析帮助弹窗 */
.rs485-help-scene { display: flex; gap: 12px; padding: 12px 14px; margin-bottom: 8px; background: rgba(0,212,170,0.03); border-radius: 8px; border: 1px solid rgba(0,212,170,0.08); }
.rs485-help-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,212,170,0.15); color: #00d4aa; font-weight: bold; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rs485-help-title { color: #e6edf3; font-weight: bold; font-size: 13px; margin-bottom: 4px; }
.rs485-help-desc { color: #8b949e; font-size: 12px; margin-bottom: 6px; }
.rs485-help-example { font-family: Consolas,monospace; font-size: 11px; color: #c9d1d9; background: rgba(0,0,0,0.35); padding: 6px 10px; border-radius: 4px; word-break: break-all; line-height: 1.8; }
.rs485-help-tag { display: inline-block; padding: 0 5px; border-radius: 2px; font-size: 10px; font-weight: bold; margin-right: 2px; vertical-align: middle; }
.rs485-help-tag.tag-req { background: #1a3a5c; color: #58a6ff; }
.rs485-help-tag.tag-resp { background: #1a3c2a; color: #3fb950; }
.rs485-help-tag.tag-write { background: #3c2a1a; color: #f0883e; }
.rs485-help-tag.tag-wresp { background: #2a3c1a; color: #00d4aa; }
.rs485-help-tag.tag-orphan { background: #3c1a3c; color: #a371f7; }

/* ===== [J] 工具页卡片+抽屉布局 ===== */
#toolsPage.new-tools {
  --tool-card-width: 256px;
  --tool-section-width: max(300px, calc((100vw - 120px) / 5));
  box-sizing: border-box;
  width: 100%;
  min-height: 0 !important;
  padding: 12px 28px 40px;
  max-width: none;
  margin: 0;
}
#toolsPage.new-tools.active {
  display: grid !important;
  grid-template-columns: repeat(5, var(--tool-section-width));
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
}
/* 页面头部 */
.tools-pg-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 18px; margin-bottom: 6px;
}
.tools-pg-hdr h1 {
  font-size: 22px; font-weight: 600; color: #e6edf3;
  display: flex; align-items: baseline; gap: 12px;
  margin: 0;
}
.tools-pg-hdr h1 small {
  font-weight: 400; font-size: 14px; color: #a1afbd;
}
.tools-pg-cnt {
  font-size: 13px; color: #a1afbd;
  background: rgba(255,255,255,0.04); border: 1px solid #1f3a5f;
  padding: 4px 16px; border-radius: 20px;
}

/* 分区 */
.tools-sec { margin-bottom: 30px; }
#toolsPage.new-tools > .tools-sec {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  margin-bottom: 0;
  padding: 6px 20px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background: #1f2533;
}
#faultAnalysisPage.new-tools .tools-sec {
  box-sizing: border-box;
  margin-bottom: 15px;
  padding: 6px 20px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background: #1f2533;
}
body.light #toolsPage.new-tools .tools-sec {
  border-color: #d1d5db;
  background: #ffffff;
}
body.light #faultAnalysisPage.new-tools .tools-sec {
  border-color: #d1d5db;
  background: #ffffff;
}
.tools-sec-hdr {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
#toolsPage.new-tools .tools-sec-hdr { margin-bottom: 10px; }
.tools-sec-hdr .line { flex: 1; height: 1px; background: #1f3a5f; }
.tools-sec-hdr h2 {
  font-size: 18px; font-weight: 600; color: #a1afbd;
  letter-spacing: 0.3px; white-space: nowrap; margin: 0;
}
.tools-sec-hdr .sec-icon {
  margin-right: 8px; font-size: 14px; color: #00d4aa;
}
#toolsPage.new-tools .tools-sec-hdr .sec-icon { font-size: 32px; }

/* 卡片网格 */
.tools-g {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
#toolsPage.new-tools > .tools-sec > .tools-g {
  grid-template-columns: var(--tool-card-width);
  align-content: start;
  justify-content: start;
}

/* 卡片 */
.tools-c {
  background: #252d3b; border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px; padding: 18px 20px 14px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  cursor: pointer; display: flex; flex-direction: column;
  position: relative; user-select: none;
}
#toolsPage.new-tools .tools-c { padding: 12px 20px 10px; }
#toolUserMgrCard .tool-card-width-resizer {
  position: absolute; top: 0; right: -4px; z-index: 2;
  width: 9px; height: 100%; cursor: col-resize;
  touch-action: none; background: transparent;
}
#toolUserMgrCard .tool-card-width-resizer::after {
  content: ''; position: absolute; top: 12px; right: 3px; bottom: 12px;
  width: 2px; border-radius: 1px; background: transparent;
  transition: background .16s ease;
}
#toolUserMgrCard .tool-card-width-resizer:hover::after,
#toolUserMgrCard .tool-card-width-resizer.dragging::after { background: #a371f7; }
body.tool-card-resizing, body.tool-card-resizing * { cursor: col-resize !important; user-select: none !important; }
body.tool-card-resizing #toolUserMgrCard { transform: none !important; }
#toolConnectionSection .tool-section-width-resizer {
  position: absolute; top: 0; right: -4px; z-index: 3;
  width: 9px; height: 100%; cursor: col-resize;
  touch-action: none; background: transparent;
}
#toolConnectionSection .tool-section-width-resizer::after {
  content: ''; position: absolute; top: 16px; right: 3px; bottom: 16px;
  width: 2px; border-radius: 1px; background: transparent;
  transition: background .16s ease;
}
#toolConnectionSection .tool-section-width-resizer:hover::after,
#toolConnectionSection .tool-section-width-resizer.dragging::after { background: #00d4aa; }
body.tool-section-resizing, body.tool-section-resizing * { cursor: col-resize !important; user-select: none !important; }
.tools-c:hover {
  box-shadow: 0 6px 22px rgba(0,0,0,0.32);
  border-color: #00d4aa;
  transform: translateY(-2px);
}
.tools-c:active { transform: scale(0.98); }
/* 工具卡片马卡龙色系（深色主题） */
.tools-c[data-tool="ecs"],
.tools-c[data-tool="iccid"],
.tools-c[data-tool="log"],
.tools-c[data-tool="fault-data"],
.tools-c[data-tool="debug-prop"] { background: rgba(100,149,237,0.10); border-color: rgba(100,149,237,0.22); }
.tools-c[data-tool="debug-modbus"] { background: rgba(63,185,80,0.10); border-color: rgba(63,185,80,0.20); }
.tools-c[data-tool="import"],
.tools-c[data-tool="rs485"] { background: rgba(240,136,62,0.10); border-color: rgba(240,136,62,0.20); }
.tools-c[data-tool="user"],
.tools-c[data-tool="snhex"] { background: rgba(163,113,247,0.10); border-color: rgba(163,113,247,0.20); }
.tools-c[data-tool="encrypt"] { background: rgba(233,69,96,0.08); border-color: rgba(233,69,96,0.18); }
.tools-c[data-tool="inverter-fault-collect"] { background: rgba(233,69,96,0.08); border-color: rgba(0,212,170,0.28); }
.tools-c[data-tool="generation-manage"] { display:none !important; background: rgba(63,185,80,0.10); border-color: rgba(63,185,80,0.20); }
/* Keep database and firmware tools visually quiet within the neutral tools workspace. */
.tools-c[data-tool="db-read"],
.tools-c[data-tool="location-transfer"],
.tools-c[data-tool="data-environment"] { background: rgba(100,116,139,.16); border-color: rgba(148,163,184,.30); }
.tools-c[data-tool="device-label"] { background: rgba(63,185,80,.09); border-color: rgba(63,185,80,.24); }
.tools-c[data-tool="debug-ota"],
.tools-c[data-tool="debug-firmware"] { background: rgba(240,136,62,.08); border-color: rgba(240,136,62,.23); }
/* hover时加强对应色系 */
.tools-c[data-tool="ecs"]:hover,
.tools-c[data-tool="iccid"]:hover,
.tools-c[data-tool="log"]:hover,
.tools-c[data-tool="fault-data"]:hover,
.tools-c[data-tool="debug-prop"]:hover { border-color: rgba(100,149,237,0.50); box-shadow: 0 6px 22px rgba(100,149,237,0.16); }
.tools-c[data-tool="debug-modbus"]:hover { border-color: rgba(63,185,80,0.50); box-shadow: 0 6px 22px rgba(63,185,80,0.16); }
.tools-c[data-tool="import"]:hover,
.tools-c[data-tool="rs485"]:hover { border-color: rgba(240,136,62,0.50); box-shadow: 0 6px 22px rgba(240,136,62,0.16); }
.tools-c[data-tool="user"]:hover,
.tools-c[data-tool="snhex"]:hover { border-color: rgba(163,113,247,0.50); box-shadow: 0 6px 22px rgba(163,113,247,0.16); }
.tools-c[data-tool="encrypt"]:hover { border-color: rgba(233,69,96,0.45); box-shadow: 0 6px 22px rgba(233,69,96,0.13); }
.tools-c[data-tool="inverter-fault-collect"]:hover { border-color: rgba(0,212,170,0.58); box-shadow: 0 6px 22px rgba(0,212,170,0.14); }
.tools-c[data-tool="generation-manage"]:hover { border-color: rgba(63,185,80,0.52); box-shadow: 0 6px 22px rgba(63,185,80,0.14); }
.tools-c[data-tool="db-read"]:hover,
.tools-c[data-tool="location-transfer"]:hover,
.tools-c[data-tool="data-environment"]:hover { border-color: rgba(148,163,184,.62); box-shadow: 0 6px 22px rgba(100,116,139,.18); }
.tools-c[data-tool="device-label"]:hover { border-color: rgba(63,185,80,.50); box-shadow: 0 6px 22px rgba(63,185,80,.14); }
.tools-c[data-tool="debug-ota"]:hover,
.tools-c[data-tool="debug-firmware"]:hover { border-color: rgba(240,136,62,.52); box-shadow: 0 6px 22px rgba(240,136,62,.14); }
#toolsPage .tools-c {
  background-image: linear-gradient(105deg, rgba(0,0,0,.10) 0%, rgba(255,255,255,.07) 100%);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.06), inset -1px -1px 0 rgba(0,0,0,.22), 0 4px 10px rgba(0,0,0,.16);
}
#toolsPage .tools-c:hover {
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.08), inset -1px -1px 0 rgba(0,0,0,.24), 0 7px 18px rgba(0,0,0,.24);
  transform: translateY(-6px);
}
#toolsPage .tools-c:active { transform: scale(0.98); }
.generation-tool-form { display:grid; gap:12px; color:#c9d1d9; }.generation-tool-form label { display:grid; gap:5px; color:#a1afbd; font-size:14px; }.generation-tool-form input { width:100%; min-width:0; padding:8px 10px; color:#e6edf3; background:#0d1117; border:1px solid #1f3a5f; border-radius:6px; font-size:15px; }.generation-tool-pair { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.generation-tool-form p { color:#8b949e; font-size:14px; line-height:1.55; }.generation-tool-submit,.generation-tool-subtle,.generation-file-label { width:max-content; padding:8px 13px; border-radius:6px; border:1px solid #0b9780; background:#00bfa5; color:#062824; font-size:15px; font-weight:600; cursor:pointer; }.generation-tool-subtle,.generation-file-label { border-color:#315174; background:transparent; color:#9bc9e8; }.generation-import-actions { display:flex; align-items:center; gap:10px; }.generation-file-label input { display:none; }body.light .generation-tool-form { color:#334155; }body.light .generation-tool-form input { color:#1f2937; background:#fff; border-color:#cbd5e1; }body.light .generation-tool-form p { color:#64748b; }
.generation-field-note { color:#7f93a7; font-size:12px; line-height:1.45; }body.light .generation-field-note { color:#64748b; }
.generation-history-dropzone { display:grid; place-items:center; gap:3px; min-height:96px; padding:13px; color:#a8b9ca; border:1px dashed #38628d; border-radius:7px; background:rgba(21,48,83,.22); cursor:pointer; transition:.16s; }.generation-history-dropzone:hover,.generation-history-dropzone.is-dragging { border-color:#00d4aa; background:rgba(0,212,170,.08); }.generation-history-dropzone strong { color:#cbd8e4; font-size:15px; }.generation-history-dropzone span,.generation-history-dropzone b { font-size:13px; font-weight:400; }.generation-history-dropzone b { color:#00d4aa; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.generation-manual-row { display:grid; gap:10px; padding-top:12px; border-top:1px solid #1f3a5f; }.generation-manual-row > div:first-child { display:flex; align-items:baseline; gap:10px; }.generation-manual-row strong { font-size:15px; }.generation-manual-row span { color:#8b949e; font-size:13px; }.generation-manual-fields { display:grid; grid-template-columns:1.1fr 1fr 1fr auto; gap:8px; }.generation-history-feedback { min-height:19px; color:#8b949e; font-size:14px; }.generation-history-feedback.is-error { color:#f0883e; }.generation-history-feedback.is-success { color:#3fb950; }body.light .generation-history-dropzone { color:#64748b; background:#f8fafc; border-color:#93c5fd; }body.light .generation-history-dropzone strong { color:#334155; }@media(max-width:640px){.generation-tool-pair,.generation-manual-fields{grid-template-columns:1fr}.generation-manual-row > div:first-child{display:grid;gap:2px}.generation-tool-submit,.generation-tool-subtle{width:100%;}}
.generation-tool-module + .generation-tool-module { margin-top:22px; padding-top:20px; border-top:1px solid #28425b; }.generation-tool-module-head { margin-bottom:13px; }.generation-tool-module-head strong,.generation-tool-module-head span { display:block; }.generation-tool-module-head strong { color:#e6edf3; font-size:17px; }.generation-tool-module-head span { margin-top:2px; color:#8b949e; font-size:14px; }body.light .generation-tool-module + .generation-tool-module { border-color:#d8e0ea; }body.light .generation-tool-module-head strong { color:#1f2937; }
.generation-manage-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,.9fr); gap:24px; align-items:start; }.generation-manage-layout > .generation-tool-module,.generation-history-stack { min-width:0; margin:0; padding:0; }.generation-manage-layout > .generation-tool-module + .generation-tool-module,.generation-history-stack { border-left:1px solid #28425b; padding-left:24px; }.generation-history-stack { display:grid; gap:22px; }.generation-history-stack .generation-tool-module + .generation-tool-module { padding-top:20px; border-top:1px solid #28425b; }.generation-manage-layout .generation-tool-module-head { min-height:52px; padding-bottom:10px; border-bottom:1px solid rgba(71,103,134,.45); }.generation-manage-layout .generation-tool-form { gap:13px; }.generation-manage-layout .generation-manual-row { border-top:0; padding-top:0; }.generation-manage-layout .generation-manual-fields { grid-template-columns:1fr 1fr; }.generation-manage-layout .generation-manual-fields button { grid-column:1/-1; width:100%; }.generation-manage-layout .generation-import-actions { flex-wrap:wrap; }.generation-manage-layout .generation-tool-submit { width:100%; }.generation-manage-layout .generation-history-dropzone { min-height:110px; }body.light .generation-manage-layout > .generation-tool-module + .generation-tool-module,body.light .generation-history-stack { border-left-color:#d8e0ea; }body.light .generation-history-stack .generation-tool-module + .generation-tool-module { border-top-color:#d8e0ea; }body.light .generation-manage-layout .generation-tool-module-head { border-bottom-color:#d8e0ea; }@media(max-width:1120px){.generation-manage-layout{grid-template-columns:1fr}.generation-manage-layout > .generation-tool-module + .generation-tool-module,.generation-history-stack{border-left:0;border-top:1px solid #28425b;padding:20px 0 0}.generation-manage-layout .generation-manual-fields{grid-template-columns:1fr 1fr}.generation-manage-layout .generation-manual-fields button{grid-column:auto;width:max-content;}}
.generation-station-list { margin-bottom:20px; padding-bottom:18px; border-bottom:1px solid #28425b; }.generation-station-list-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:10px; }.generation-station-list-head strong,.generation-station-list-head span { display:block; }.generation-station-list-head strong { color:#e6edf3; font-size:17px; }.generation-station-list-head span { color:#8b949e; font-size:14px; }.generation-station-table-wrap { overflow:auto; border:1px solid #25496b; border-radius:6px; }.generation-station-table-wrap table { width:100%; min-width:780px; border-collapse:collapse; color:#c9d1d9; font-size:14px; }.generation-station-table-wrap th,.generation-station-table-wrap td { padding:8px 10px; border-bottom:1px solid rgba(64,95,126,.55); text-align:left; white-space:nowrap; }.generation-station-table-wrap th { color:#8fa9c0; background:rgba(19,48,77,.45); font-weight:600; }.generation-station-table-wrap tr:last-child td { border-bottom:0; }.generation-station-table-wrap td[colspan] { color:#8b949e; text-align:center; }body.light .generation-station-list { border-bottom-color:#d8e0ea; }body.light .generation-station-list-head strong { color:#1f2937; }body.light .generation-station-table-wrap { border-color:#cbd5e1; }body.light .generation-station-table-wrap table { color:#334155; }body.light .generation-station-table-wrap th { color:#475569; background:#f8fafc; }body.light .generation-station-table-wrap th,body.light .generation-station-table-wrap td { border-bottom-color:#e2e8f0; }
.generation-template-grid { display:grid; grid-template-columns:1.3fr .7fr 1.3fr .7fr; gap:10px; padding:11px; border:1px solid #28425b; border-radius:6px; background:rgba(10,26,42,.42); }.generation-template-grid label { display:grid; gap:5px; color:#a1afbd; font-size:14px; }.generation-template-grid input { width:100%; min-width:0; padding:8px 10px; color:#e6edf3; background:#0d1117; border:1px solid #1f3a5f; border-radius:6px; font-size:15px; }body.light .generation-template-grid { border-color:#d8e0ea; background:#f8fafc; }body.light .generation-template-grid input { color:#1f2937; background:#fff; border-color:#cbd5e1; }@media(max-width:640px){.generation-template-grid{grid-template-columns:1fr}}
.generation-settlement-title { margin:4px 0 -5px; color:#d5e5f0; font-size:15px; font-weight:600; }body.light .generation-settlement-title { color:#1f2937; }
.generation-register-list { display:grid; gap:8px; }.generation-register-row,.generation-extra-register-row { display:grid; grid-template-columns:110px minmax(0,1fr) minmax(0,.72fr); gap:9px; align-items:end; padding:9px; border:1px solid #28425b; border-radius:6px; background:rgba(10,26,42,.42); }.generation-register-row strong { align-self:center; color:#d5e5f0; font-size:15px; }.generation-register-row label,.generation-extra-register-row label { display:grid; gap:4px; color:#a1afbd; font-size:13px; }.generation-register-row input,.generation-extra-register-row input { width:100%; min-width:0; padding:8px 10px; color:#e6edf3; background:#0d1117; border:1px solid #1f3a5f; border-radius:6px; font-size:15px; }.generation-extra-registers { display:grid; gap:8px; padding-top:4px; }.generation-extra-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }.generation-extra-head strong,.generation-extra-head span { display:block; }.generation-extra-head strong { color:#d5e5f0; font-size:15px; }.generation-extra-head span { color:#8b949e; font-size:13px; }.generation-extra-register-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.72fr) auto; }.generation-extra-register-row button { height:34px; padding:0 9px; color:#d6a5aa; background:transparent; border:1px solid #7a4450; border-radius:5px; font-size:13px; cursor:pointer; }body.light .generation-register-row,body.light .generation-extra-register-row { border-color:#d8e0ea; background:#f8fafc; }body.light .generation-register-row strong,body.light .generation-extra-head strong { color:#1f2937; }body.light .generation-register-row input,body.light .generation-extra-register-row input { color:#1f2937; background:#fff; border-color:#cbd5e1; }@media(max-width:720px){.generation-register-row,.generation-extra-register-row{grid-template-columns:1fr}.generation-register-row strong{align-self:auto}.generation-extra-register-row button{width:100%;}}
.generation-tool-form select { color:#e6edf3; background:#0d1117; border:1px solid #1f3a5f; border-radius:6px; padding:8px 10px; font-size:15px; }body.light .generation-tool-form select { color:#1f2937; background:#fff; border-color:#cbd5e1; }.generation-manual-fields { grid-template-columns:1.05fr 1fr 1fr .9fr auto; }
.generation-manage-layout { display:block; min-width:0; }
.generation-manage-tabs { display:flex; gap:2px; margin:0 0 20px; padding:4px; border-bottom:1px solid #28425b; background:#0d1725; }
.generation-manage-tabs button { flex:0 0 auto; min-height:36px; padding:0 16px; border:0; border-bottom:2px solid transparent; border-radius:4px 4px 0 0; background:transparent; color:#8fa9c0; font-size:16px; font-weight:600; cursor:pointer; }
.generation-manage-tabs button:hover { color:#d5e5f0; background:rgba(31,67,96,.42); }
.generation-manage-tabs button.is-active { color:#dcfff9; border-bottom-color:#00bfa5; background:rgba(0,191,165,.12); }
.generation-manage-panel { width:100%; min-width:0; }
.generation-manage-panel[hidden] { display:none !important; }
.generation-manage-panel .generation-tool-form { width:100%; }
#generationPerformanceModule .generation-tool-form,#generationPerformanceModule .generation-tool-submit { width:100%; }
body.light .generation-manage-tabs { border-bottom-color:#d8e0ea; background:#f8fafc; }
body.light .generation-manage-tabs button { color:#64748b; }
body.light .generation-manage-tabs button:hover { color:#1f2937; background:#eef7f6; }
body.light .generation-manage-tabs button.is-active { color:#087a69; background:#e6f7f3; }
@media(max-width:640px){.generation-manage-tabs{gap:0;overflow-x:auto;margin-bottom:16px}.generation-manage-tabs button{padding:0 13px;font-size:15px;white-space:nowrap;}}
.generation-station-table-wrap table { min-width:1840px; }.generation-station-table-wrap tbody tr:hover td { background:rgba(0,191,165,.08); }.generation-station-table-wrap tbody tr.is-selected td { background:rgba(0,191,165,.16); color:#dcfff9; }.generation-inverter-sns { max-width:280px; overflow:hidden; text-overflow:ellipsis; }.generation-station-address { min-width:220px; max-width:320px; overflow:hidden; text-overflow:ellipsis; }.generation-station-filter-label { display:inline-flex; align-items:center; gap:6px; color:inherit; font:inherit; white-space:nowrap; }.generation-station-filter-label input { width:94px; height:25px; padding:0 7px; color:#dce6f0; background:#0d1117; border:1px solid #31516f; border-radius:3px; font:13px Consolas,monospace; }.generation-station-filter-label input::placeholder { color:#6f8498; }.generation-station-filter-label input:focus { border-color:#00bfa5; outline:0; box-shadow:0 0 0 2px rgba(0,191,165,.14); }.generation-favorite,.generation-station-monitor,.generation-station-edit { display:grid; place-items:center; width:28px; height:28px; padding:0; background:transparent; border:1px solid transparent; border-radius:4px; line-height:1; cursor:pointer; }.generation-favorite { color:#718096; font-size:20px; }.generation-favorite:hover,.generation-favorite:focus-visible { color:#f3c651; background:rgba(243,198,81,.11); border-color:rgba(243,198,81,.45); transform:none; outline:0; }.generation-favorite.is-active { color:#f3c651; text-shadow:0 0 8px rgba(243,198,81,.38); }.generation-station-monitor { display:inline-grid; margin-right:4px; color:#82b7f0; font-size:18px; vertical-align:middle; }.generation-station-monitor:hover,.generation-station-monitor:focus-visible { color:#d8ebff; background:rgba(86,166,255,.14); border-color:rgba(86,166,255,.52); transform:none; outline:0; }.generation-station-edit { display:inline-grid; color:#8fd4ca; font-size:19px; vertical-align:middle; }.generation-station-edit:hover,.generation-station-edit:focus-visible { color:#dcfff9; background:rgba(0,191,165,.14); border-color:rgba(0,191,165,.52); transform:none; outline:0; }.generation-station-remark { width:210px; min-width:160px; padding:6px 8px; color:#dce6f0; background:#0d1117; border:1px solid #31516f; border-radius:4px; font-size:14px; line-height:1.35; }.generation-station-remark::placeholder { color:#6f8498; }.generation-station-remark:hover { border-color:#507692; }.generation-station-remark:focus { border-color:#00bfa5; outline:0; box-shadow:0 0 0 2px rgba(0,191,165,.14); }.generation-station-edit-overlay { display:none; position:fixed; inset:0; z-index:10020; align-items:center; justify-content:center; padding:20px; background:rgba(3,9,18,.7); }.generation-station-edit-overlay.is-open { display:flex; }.generation-station-edit-dialog { width:min(620px, 100%); max-height:calc(100vh - 40px); overflow:auto; padding:20px; color:#c9d1d9; background:#16213e; border:1px solid #315174; border-radius:6px; box-shadow:0 22px 56px rgba(0,0,0,.5); }.generation-station-edit-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; padding-bottom:13px; border-bottom:1px solid #28425b; }.generation-station-edit-head h3 { margin:0; color:#dcfff9; font-size:20px; }.generation-station-edit-head span { display:block; margin-top:3px; color:#8b949e; font-size:14px; }.generation-station-edit-close { width:30px; height:30px; padding:0; color:#9fb3c8; background:transparent; border:1px solid transparent; border-radius:4px; font-size:26px; line-height:1; cursor:pointer; }.generation-station-edit-close:hover,.generation-station-edit-close:focus-visible { color:#fff; background:rgba(255,255,255,.09); border-color:#41617f; outline:0; }.generation-station-edit-form { width:100%; }.generation-station-edit-form input[readonly] { color:#8fa9c0; background:#0a1523; cursor:not-allowed; }.generation-station-edit-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:18px; }.generation-station-edit-actions .generation-tool-submit,.generation-station-edit-actions .generation-tool-subtle { width:auto; }.generation-collect-status { display:inline-flex; align-items:center; min-height:22px; padding:0 8px; border:1px solid; border-radius:4px; font-size:13px; font-weight:600; }.generation-collect-status.is-enabled { color:#7cf2de; border-color:rgba(0,191,165,.48); background:rgba(0,191,165,.12); }.generation-collect-status.is-disabled { color:#f4b8bd; border-color:rgba(240,136,62,.45); background:rgba(240,136,62,.1); }body.light .generation-station-filter-label input { color:#1f2937; background:#fff; border-color:#cbd5e1; }body.light .generation-favorite { color:#94a3b8; }body.light .generation-favorite:hover,body.light .generation-favorite:focus-visible,body.light .generation-favorite.is-active { color:#a16207; }body.light .generation-favorite:hover,body.light .generation-favorite:focus-visible { background:#fff8dc; border-color:#e6bd4d; }body.light .generation-station-monitor { color:#2563eb; }body.light .generation-station-monitor:hover,body.light .generation-station-monitor:focus-visible { color:#1d4ed8; background:#eff6ff; border-color:#93c5fd; }body.light .generation-station-edit { color:#087a69; }body.light .generation-station-edit:hover,body.light .generation-station-edit:focus-visible { color:#065f46; background:#e6f7f3; border-color:#65c8b9; }body.light .generation-station-remark { color:#1f2937; background:#fff; border-color:#cbd5e1; }body.light .generation-station-remark::placeholder { color:#94a3b8; }body.light .generation-station-edit-overlay { background:rgba(15,23,42,.36); }body.light .generation-station-edit-dialog { color:#334155; background:#fff; border-color:#cbd5e1; box-shadow:0 22px 56px rgba(15,23,42,.2); }body.light .generation-station-edit-head { border-bottom-color:#e2e8f0; }body.light .generation-station-edit-head h3 { color:#0f766e; }body.light .generation-station-edit-form input[readonly] { color:#64748b; background:#f8fafc; }body.light .generation-station-edit-close { color:#64748b; }body.light .generation-station-edit-close:hover,body.light .generation-station-edit-close:focus-visible { color:#1f2937; background:#f1f5f9; border-color:#cbd5e1; }body.light .generation-collect-status.is-enabled { color:#087a69; background:#e6f7f3; }body.light .generation-collect-status.is-disabled { color:#a14f12; background:#fff0e4; }@media(max-width:640px){.generation-station-edit-overlay { align-items:flex-end; padding:0; }.generation-station-edit-dialog { width:100%; max-height:88vh; border-radius:8px 8px 0 0; }.generation-station-edit-actions { display:grid; grid-template-columns:1fr 1fr; }.generation-station-edit-actions .generation-tool-submit,.generation-station-edit-actions .generation-tool-subtle { width:100%; }}
.generation-history-records { display:grid; gap:9px; margin-top:4px; padding-top:14px; border-top:1px solid #28425b; }.generation-history-records-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }.generation-history-records-head strong,.generation-history-records-head span { display:block; }.generation-history-records-head strong { color:#d5e5f0; font-size:15px; }.generation-history-records-head span { margin-top:2px; color:#8b949e; font-size:13px; }.generation-history-records-table-wrap { max-height:260px; overflow:auto; border:1px solid #25496b; border-radius:6px; }.generation-history-records table { width:100%; min-width:440px; border-collapse:collapse; color:#c9d1d9; font-size:14px; }.generation-history-records th,.generation-history-records td { padding:8px 10px; border-bottom:1px solid rgba(64,95,126,.55); text-align:left; white-space:nowrap; }.generation-history-records th { position:sticky; top:0; color:#8fa9c0; background:#13283f; font-weight:600; }.generation-history-records tr:last-child td { border-bottom:0; }.generation-history-records td[colspan] { color:#8b949e; text-align:center; }body.light .generation-history-records { border-top-color:#d8e0ea; }body.light .generation-history-records-head strong { color:#1f2937; }body.light .generation-history-records-table-wrap { border-color:#cbd5e1; }body.light .generation-history-records table { color:#334155; }body.light .generation-history-records th { color:#475569; background:#f8fafc; }body.light .generation-history-records th,body.light .generation-history-records td { border-bottom-color:#e2e8f0; }
.generation-station-pin { display:inline-grid; place-items:center; width:28px; height:28px; padding:0; background:transparent; border:1px solid transparent; border-radius:4px; color:#718096; font-size:18px; line-height:1; vertical-align:middle; cursor:pointer; }.generation-station-pin:hover,.generation-station-pin:focus-visible { color:#5ec7ff; background:rgba(94,199,255,.11); border-color:rgba(94,199,255,.45); outline:0; }.generation-station-pin.is-active { color:#5ec7ff; background:rgba(94,199,255,.12); border-color:rgba(94,199,255,.36); }body.light .generation-station-pin { color:#64748b; }body.light .generation-station-pin:hover,body.light .generation-station-pin:focus-visible,body.light .generation-station-pin.is-active { color:#0369a1; background:#e0f2fe; border-color:#7dd3fc; }
.generation-station-monitor { display:inline-grid; place-items:center; width:30px; height:28px; margin-left:2px; padding:0; background:transparent; border:1px solid transparent; border-radius:4px; vertical-align:middle; cursor:pointer; }.generation-monitor-screen { position:relative; display:block; width:18px; height:13px; overflow:hidden; border:2px solid #bfd6e8; border-radius:2px; background:linear-gradient(135deg,#1767d8 0 34%,#12c6b0 34% 62%,#f4b942 62%); box-shadow:0 1px 4px rgba(16,170,244,.36); }.generation-monitor-screen i,.generation-monitor-screen b { position:absolute; display:block; border-radius:50%; }.generation-monitor-screen i { width:4px; height:4px; right:2px; top:2px; background:#fff; opacity:.9; }.generation-monitor-screen b { width:9px; height:3px; left:2px; bottom:2px; background:#e9f9ff; opacity:.85; }.generation-monitor-stand { position:relative; display:block; width:12px; height:5px; margin-top:1px; border-bottom:2px solid #bfd6e8; }.generation-monitor-stand:before { content:''; position:absolute; left:5px; top:-1px; width:2px; height:4px; background:#bfd6e8; }.generation-station-monitor:hover,.generation-station-monitor:focus-visible { background:rgba(86,166,255,.14); border-color:rgba(86,166,255,.52); outline:0; }.generation-station-monitor:hover .generation-monitor-screen,.generation-station-monitor:focus-visible .generation-monitor-screen { border-color:#fff; box-shadow:0 0 8px rgba(79,190,255,.8); }body.light .generation-monitor-screen { border-color:#2563eb; }body.light .generation-monitor-stand,body.light .generation-monitor-stand:before { border-color:#2563eb; background:#2563eb; }
.generation-station-name.is-custom { display:inline-flex; align-items:center; gap:6px; color:#62ead2; font-weight:700; }.generation-station-name.is-custom em { padding:1px 5px; color:#062b27; background:#5eead4; border-radius:3px; font-size:12px; font-style:normal; font-weight:700; line-height:1.4; }body.light .generation-station-name.is-custom { color:#087a69; }body.light .generation-station-name.is-custom em { color:#fff; background:#0f9b86; }
.generation-station-table-wrap td.generation-station-actions { display:flex; align-items:center; gap:2px; min-width:92px; white-space:nowrap; }.generation-station-table-wrap td.generation-station-actions .generation-station-pin,.generation-station-table-wrap td.generation-station-actions .generation-favorite,.generation-station-table-wrap td.generation-station-actions .generation-station-monitor { flex:0 0 auto; margin:0; }.generation-station-delete { display:none; place-items:center; width:28px; height:28px; padding:0; color:#dd858d; background:transparent; border:1px solid transparent; border-radius:4px; font-size:17px; cursor:pointer; }.generation-station-delete:hover,.generation-station-delete:focus-visible { color:#ffe2e5; background:rgba(221,133,141,.14); border-color:rgba(221,133,141,.52); outline:0; }.generation-test-mode .generation-station-delete { display:inline-grid; }body.light .generation-station-delete { color:#be3645; }body.light .generation-station-delete:hover,body.light .generation-station-delete:focus-visible { color:#9f2130; background:#fff0f1; border-color:#f2a2aa; }
.generation-station-pin { color:#7b8794; font-family:Arial,sans-serif; font-size:22px; font-weight:700; }.generation-station-pin:hover,.generation-station-pin:focus-visible { color:#aebbc8; background:rgba(174,187,200,.1); border-color:rgba(174,187,200,.34); }.generation-station-pin.is-active { color:#5ec7ff; background:rgba(94,199,255,.12); border-color:rgba(94,199,255,.36); }body.light .generation-station-pin { color:#94a3b8; background:transparent; border-color:transparent; }body.light .generation-station-pin:hover,body.light .generation-station-pin:focus-visible { color:#64748b; background:#f1f5f9; border-color:#cbd5e1; }body.light .generation-station-pin.is-active { color:#0369a1; background:#e0f2fe; border-color:#7dd3fc; }
.location-transfer-body { display:grid; gap:16px; }.location-transfer-summary { padding:14px; border-left:3px solid #00bfa5; background:rgba(0,191,165,.06); }.location-transfer-summary h4 { margin:0 0 10px; color:#d6fffa; font-size:15px; }.location-transfer-summary dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:0; }.location-transfer-summary dl div { padding:9px 10px; border:1px solid rgba(61,107,126,.55); background:rgba(5,12,20,.28); }.location-transfer-summary dt { color:#67d8c8; font-size:12px; font-weight:700; }.location-transfer-summary dd { margin:4px 0 0; color:#aebbc8; font-size:12px; line-height:1.5; }.location-transfer-summary p { margin:11px 0 0; color:#8fa9c0; font-size:12px; line-height:1.65; }.location-transfer-actions { display:flex; align-items:center; gap:10px; }.location-transfer-file { display:inline-flex; align-items:center; min-height:34px; padding:0 13px; color:#b9e9e1; border:1px solid #2b6680; border-radius:4px; background:#11233a; font-size:13px; font-weight:600; cursor:pointer; }.location-transfer-file:hover { color:#e5fffa; border-color:#48ac9d; background:#17334e; }.location-transfer-file input { display:none; }body.light .location-transfer-summary { background:#effcf9; }body.light .location-transfer-summary h4 { color:#087a69; }body.light .location-transfer-summary dl div { border-color:#cde7e2; background:#fff; }body.light .location-transfer-summary dd,body.light .location-transfer-summary p { color:#475569; }body.light .location-transfer-file { color:#087a69; border-color:#71cabe; background:#eefcf8; }@media(max-width:680px){.location-transfer-summary dl{grid-template-columns:1fr}.location-transfer-actions{display:grid}.location-transfer-actions .db-primary-btn,.location-transfer-file{width:100%;justify-content:center;box-sizing:border-box;}}
.data-environment-body { display:grid; gap:16px; }.data-environment-summary,.data-environment-section { padding:16px; border:1px solid rgba(61,107,126,.55); background:rgba(5,12,20,.28); }.data-environment-head { display:flex; justify-content:space-between; gap:12px; align-items:baseline; }.data-environment-head h4,.data-environment-section h4 { margin:0; color:#d6fffa; font-size:16px; }.data-environment-head span { color:#67d8c8; font-size:13px; }.data-environment-summary dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0 0; }.data-environment-summary dl div { padding:10px; border:1px solid rgba(61,107,126,.42); }.data-environment-summary dt { color:#8fa9c0; font-size:12px; }.data-environment-summary dd { margin:5px 0 0; color:#e6edf3; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }.data-environment-section { display:grid; gap:10px; }.data-environment-section label { color:#b9e9e1; font-weight:700; }.data-environment-section textarea { width:100%; min-height:100px; box-sizing:border-box; resize:vertical; }.data-environment-section p { margin:0; color:#8fa9c0; font-size:13px; line-height:1.6; }.data-environment-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }.data-environment-actions .tool-input { flex:1 1 260px; }.data-environment-actions .db-primary-btn { white-space:nowrap; }body.light .data-environment-summary,body.light .data-environment-section { background:#fff; border-color:#cde7e2; }body.light .data-environment-head h4,body.light .data-environment-section h4,body.light .data-environment-summary dd { color:#0f172a; }body.light .data-environment-head span,body.light .data-environment-section label { color:#087a69; }body.light .data-environment-summary dt,body.light .data-environment-section p { color:#475569; }@media(max-width:680px){.data-environment-summary dl{grid-template-columns:1fr}.data-environment-head{display:grid}.data-environment-actions{display:grid}.data-environment-actions .tool-input,.data-environment-actions .db-primary-btn,.data-environment-actions .location-transfer-file{width:100%;box-sizing:border-box;justify-content:center;}}
.data-environment-section-head { display:flex; justify-content:space-between; gap:16px; align-items:end; }.data-environment-add { display:flex; gap:8px; align-items:center; }.data-environment-add .tool-input { width:290px; }.data-environment-allowlist-table { max-height:300px; overflow:auto; }.data-environment-allowlist-table .overview-table { min-width:920px; }.data-environment-remark { display:flex; gap:6px; min-width:210px; }.data-environment-remark input { min-width:0; width:150px; padding:4px 7px; color:#e6edf3; border:1px solid rgba(104,160,205,.55); border-radius:3px; background:#102641; font-size:12px; }.data-environment-remark button { padding:4px 8px; color:#b9e9e1; border:1px solid #2b6680; border-radius:3px; background:#11233a; font-size:12px; cursor:pointer; }.data-environment-remark button:hover { color:#e5fffa; border-color:#48ac9d; background:#17334e; }.data-environment-remove { padding:4px 10px; color:#ffb5bd; border:1px solid rgba(233,69,96,.52); border-radius:4px; background:rgba(233,69,96,.08); font-size:12px; cursor:pointer; }.data-environment-remove:hover { color:#fff; border-color:#e94560; background:rgba(233,69,96,.24); }body.light .data-environment-remark input { color:#0f172a; border-color:#93c5fd; background:#eff6ff; }body.light .data-environment-remark button { color:#087a69; border-color:#71cabe; background:#eefcf8; }body.light .data-environment-remove { color:#b42332; border-color:#f3a0aa; background:#fff2f3; }@media(max-width:680px){.data-environment-section-head,.data-environment-add{display:grid}.data-environment-add .tool-input{width:100%;box-sizing:border-box;}}
.data-environment-th-filter { display:flex; align-items:center; gap:6px; white-space:nowrap; }.data-environment-th-filter select { min-width:0; max-width:108px; padding:2px 18px 2px 5px; color:#dbeafe; border:1px solid rgba(104,160,205,.55); border-radius:3px; background:#102641; font-size:11px; cursor:pointer; }.data-environment-th-filter select:focus { border-color:#00d4aa; outline:0; }body.light .data-environment-th-filter select { color:#1e3a5f; border-color:#93c5fd; background:#eff6ff; }
#generationPerformanceModule .generation-tool-form { width:min(600px, 100%); }
#generationPerformanceModule .generation-tool-form input { background:#05070a; border-color:#213e61; }
#generationPerformanceModule .generation-tool-submit { width:min(600px, 100%); }
#generationGlobalTemplateModule { display:flex; flex-direction:column; min-height:0; max-height:calc(100vh - 250px); }
#generationGlobalTemplateModule .generation-tool-form { width:min(1460px, 100%); min-height:0; overflow:auto; padding-right:14px; scrollbar-gutter:stable; }
#generationGlobalTemplateModule .generation-template-mode { display:grid; gap:8px; width:min(900px, 100%); padding:12px 0 14px; border-bottom:1px solid rgba(40,66,91,.72); }
#generationGlobalTemplateModule .generation-template-mode + .generation-template-mode { padding-top:16px; }
#generationGlobalTemplateModule .generation-template-mode > header { display:grid; gap:3px; }
#generationGlobalTemplateModule .generation-template-mode > header strong { color:#d5e5f0; font-size:19px; }
#generationGlobalTemplateModule .generation-template-mode > header span { color:#8fa9c0; font-size:15px; line-height:1.5; }
body.light #generationGlobalTemplateModule .generation-template-mode > header strong { color:#1f2937; }
body.light #generationGlobalTemplateModule .generation-template-mode > header span { color:#64748b; }
#generationGlobalTemplateModule .generation-tool-pair { width:min(720px, 100%); grid-template-columns:repeat(2, minmax(0, 1fr)); }
#generationGlobalTemplateModule .generation-register-list { width:min(1420px, 100%); }
#generationGlobalTemplateModule .generation-register-row { grid-template-columns:48px 120px minmax(130px, 170px) 82px 82px 76px 88px 104px 104px 76px 126px 62px; }
#generationGlobalTemplateModule .generation-register-status { display:grid; align-self:center; justify-self:center; width:62px; min-height:34px; place-items:center; padding:0 6px; border:1px solid #55718c; border-radius:5px; color:#9eb4c8; background:#101a27; font-size:12px; font-weight:700; cursor:pointer; }
#generationGlobalTemplateModule .generation-register-status b { font-weight:800; }
#generationGlobalTemplateModule .generation-register-status.is-enabled { border-color:#20c997; color:#fff; background:#119f7b; box-shadow:inset 0 0 0 1px rgba(255,255,255,.16); }
#generationGlobalTemplateModule .generation-register-status.is-enabled b { font-size:22px; line-height:1; text-shadow:0 1px 1px rgba(0,0,0,.3); }
#generationGlobalTemplateModule .generation-register-status:hover { border-color:#72e2c4; }
#generationGlobalTemplateModule .generation-template-actions { display:flex; align-items:center; gap:12px; width:min(720px, 100%); padding-top:2px; }
#generationGlobalTemplateModule .generation-template-type-tabs { display:flex; gap:8px; width:min(720px, 100%); margin:0 0 14px; padding-bottom:10px; border-bottom:1px solid rgba(64,95,126,.55); }
#generationGlobalTemplateModule .generation-template-type-tabs button { min-width:136px; min-height:36px; padding:0 14px; border:1px solid #315174; border-radius:5px; color:#9eb4c8; background:transparent; font-size:16px; font-weight:600; cursor:pointer; }
#generationGlobalTemplateModule .generation-template-type-tabs button:hover { color:#d8f6ef; border-color:#00bfa5; }
#generationGlobalTemplateModule .generation-template-type-tabs button.is-active { color:#063b35; border-color:#35c99e; background:#35c99e; }
#generationGlobalTemplateModule .generation-template-type-banner { display:grid; gap:3px; width:min(720px,100%); margin:-4px 0 15px; padding:10px 12px; border:1px solid rgba(53,201,158,.48); border-left:4px solid #35c99e; background:rgba(53,201,158,.10); }
#generationGlobalTemplateModule .generation-template-type-banner strong { color:#c6fff1; font-size:17px; }
#generationGlobalTemplateModule .generation-template-type-banner span { color:#a8c6be; font-size:14px; }
#generationGlobalTemplateModule .generation-template-type-banner.is-commercial { border-color:rgba(96,165,250,.55); border-left-color:#60a5fa; background:rgba(96,165,250,.11); }
#generationGlobalTemplateModule .generation-template-type-banner.is-commercial strong { color:#cfe5ff; }
#generationGlobalTemplateModule .generation-template-type-banner.is-commercial span { color:#aec8e8; }
body.light #generationGlobalTemplateModule .generation-template-type-tabs { border-bottom-color:#d8e0ea; }
body.light #generationGlobalTemplateModule .generation-template-type-tabs button { color:#475569; border-color:#cbd5e1; }
body.light #generationGlobalTemplateModule .generation-template-type-tabs button.is-active { color:#064e3b; border-color:#34d399; background:#a7f3d0; }
#generationGlobalTemplateModule .generation-template-actions .generation-tool-submit { width:auto; min-width:156px; padding:7px 11px; font-size:16px; }
#generationGlobalTemplateModule .generation-template-audit { color:#8fa9c0; font-size:15px; }
#generationGlobalTemplateModule .generation-sampling-control { display:flex; align-items:end; gap:14px; width:min(420px, 100%); }
#generationGlobalTemplateModule .generation-sampling-control label { display:grid; gap:5px; width:140px; color:#a1afbd; font-size:16px; }
#generationGlobalTemplateModule .generation-sampling-control select { width:100%; }
#generationGlobalTemplateModule .generation-sampling-control > span { min-height:34px; display:flex; align-items:center; color:#8fa9c0; font-size:16px; white-space:nowrap; }
#generationGlobalTemplateModule .generation-sampling-control b { margin-left:4px; color:#d5e5f0; font:600 13px Consolas,monospace; }
#generationGlobalTemplateModule .generation-group-list { display:grid; gap:4px; width:min(1120px,100%); }
#generationGlobalTemplateModule .generation-group-table-head,#generationGlobalTemplateModule .generation-group-row { display:grid; grid-template-columns:48px 150px 116px 104px 104px 76px 126px 62px 34px; gap:9px; align-items:center; }
#generationGlobalTemplateModule .generation-group-table-head { padding:0 9px 5px; color:#a1afbd; font-size:15px; }
#generationGlobalTemplateModule .generation-group-row { padding:7px 9px; border:1px solid #28425b; border-radius:6px; background:rgba(10,26,42,.42); }
#generationGlobalTemplateModule .generation-group-row > span { color:#b7cad9; font-size:16px; }
#generationGlobalTemplateModule .generation-group-row label { display:grid; gap:0; color:#a1afbd; font-size:0; }
#generationGlobalTemplateModule .generation-group-row input,#generationGlobalTemplateModule .generation-group-row select { min-height:34px; padding:5px 8px; color:#e6edf3; border:1px solid #1f3a5f; border-radius:5px; background:#0d1117; font-size:15px; }
#generationGlobalTemplateModule .generation-group-row .generation-quick-enable { display:grid; place-items:center; min-height:34px; padding:0; border:1px solid #315174; border-radius:5px; background:rgba(13,17,23,.7); }
#generationGlobalTemplateModule .generation-group-row .generation-quick-enable input { width:16px; height:16px; min-height:0; margin:0; padding:0; accent-color:#00bfa5; }
#generationGlobalTemplateModule .generation-group-row .generation-group-delete { width:30px; height:30px; padding:0; color:#f1a6ae; border:1px solid #7a4450; border-radius:5px; background:transparent; font-size:20px; cursor:pointer; }
body.light #generationGlobalTemplateModule .generation-template-type-banner { border-color:#6ee7b7; background:#ecfdf5; }body.light #generationGlobalTemplateModule .generation-template-type-banner strong { color:#065f46; }body.light #generationGlobalTemplateModule .generation-template-type-banner span { color:#047857; }body.light #generationGlobalTemplateModule .generation-group-row { border-color:#d8e0ea; background:#f8fafc; }body.light #generationGlobalTemplateModule .generation-group-row input,body.light #generationGlobalTemplateModule .generation-group-row select { color:#1f2937; border-color:#cbd5e1; background:#fff; }
body.light #generationGlobalTemplateModule .generation-template-audit,body.light #generationGlobalTemplateModule .generation-sampling-control > span { color:#64748b; }
body.light #generationGlobalTemplateModule .generation-sampling-control b { color:#1f2937; }
#generationGlobalTemplateModule .generation-extra-registers { width:min(900px, 100%); }
#generationGlobalTemplateModule .generation-extra-register-row { grid-template-columns:minmax(130px, 170px) minmax(130px, 170px) minmax(88px, 104px) 74px 84px 84px auto; }
#generationGlobalTemplateModule .generation-settlement-read-head,#generationGlobalTemplateModule .generation-settlement-title,#generationGlobalTemplateModule .generation-settlement-read-row,#generationGlobalTemplateModule .generation-template-feedback { width:min(720px, 100%); }
@media(max-width:820px){#generationGlobalTemplateModule .generation-register-row,#generationGlobalTemplateModule .generation-extra-register-row{grid-template-columns:1fr 1fr}#generationGlobalTemplateModule .generation-register-row strong{grid-column:1/-1}#generationGlobalTemplateModule .generation-extra-register-row button{width:100%;}}
@media(max-width:560px){#generationGlobalTemplateModule .generation-template-actions{align-items:stretch;flex-direction:column;gap:7px}#generationGlobalTemplateModule .generation-template-actions .generation-tool-submit{width:100%;}}
@media(max-width:560px){#generationGlobalTemplateModule .generation-template-type-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px}#generationGlobalTemplateModule .generation-template-type-tabs button{min-width:0;padding:0 8px;font-size:14px;}}
@media(max-width:1280px){#generationGlobalTemplateModule{max-height:none}#generationGlobalTemplateModule .generation-tool-form{overflow:visible;padding-right:0}#generationGlobalTemplateModule .generation-group-table-head{display:none}#generationGlobalTemplateModule .generation-group-row{grid-template-columns:1fr 1fr}#generationGlobalTemplateModule .generation-group-row label{gap:4px;font-size:13px}#generationGlobalTemplateModule .generation-group-row > span{grid-column:1/-1}}
@media(max-width:560px){#generationGlobalTemplateModule .generation-tool-pair,#generationGlobalTemplateModule .generation-register-row,#generationGlobalTemplateModule .generation-extra-register-row{grid-template-columns:1fr}#generationGlobalTemplateModule .generation-sampling-control{align-items:stretch;flex-direction:column;gap:5px}#generationGlobalTemplateModule .generation-sampling-control label{width:100%;}}
#generationHistoryModule .generation-tool-form,#generationManualModule .generation-tool-form { width:min(780px, 100%); }
#generationHistoryModule label:first-child { width:min(520px, 100%); }
#generationHistoryModule .generation-import-actions { width:max-content; max-width:100%; }
#generationHistoryModule .generation-history-dropzone { width:min(620px, 100%); }
#generationHistoryModule .generation-tool-form > p { width:min(720px, 100%); }
#generationHistoryModule .generation-tool-submit { width:max-content; min-width:128px; }
#generationHistoryModule .generation-history-records { width:min(780px, 100%); }
#generationHistoryModule .generation-history-records-table-wrap { width:100%; }
#generationHistoryModule .generation-history-records table { min-width:0; table-layout:fixed; }
#generationHistoryModule .generation-history-records th:nth-child(1),#generationHistoryModule .generation-history-records td:nth-child(1) { width:26%; }
#generationHistoryModule .generation-history-records th:nth-child(2),#generationHistoryModule .generation-history-records td:nth-child(2) { width:30%; }
#generationHistoryModule .generation-history-records th:nth-child(3),#generationHistoryModule .generation-history-records td:nth-child(3) { width:18%; }
#generationHistoryModule .generation-history-records th:nth-child(4),#generationHistoryModule .generation-history-records td:nth-child(4) { width:26%; }
#generationManualModule .generation-manual-row { width:min(780px, 100%); }
#generationManualModule .generation-manual-fields { grid-template-columns:150px 150px 130px 130px auto; }
#generationManualModule .generation-manual-fields button { width:max-content; min-width:76px; }
@media(max-width:820px){#generationManualModule .generation-manual-fields{grid-template-columns:1fr 1fr}#generationManualModule .generation-manual-fields button{width:max-content;}}
@media(max-width:560px){#generationHistoryModule .generation-import-actions,#generationHistoryModule .generation-tool-submit{width:100%}#generationManualModule .generation-manual-fields{grid-template-columns:1fr}#generationManualModule .generation-manual-fields button{width:100%;}}
.generation-template-feedback { min-height:18px; color:#8b949e; font-size:14px; }.generation-template-feedback.is-success { color:#3fb950; }.generation-template-feedback.is-error { color:#f0883e; }
.generation-settlement-read-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:3px 0 -5px; }.generation-settlement-read-head strong { color:#d5e5f0; font-size:15px; }.generation-settlement-read-head span { color:#8b949e; font-size:13px; }.generation-settlement-read-row { display:grid !important; grid-template-columns:auto auto minmax(0,1fr); align-items:center; gap:9px; padding:9px 10px; color:#d5e5f0 !important; border:1px solid #28425b; border-radius:6px; background:rgba(10,26,42,.42); cursor:pointer; }.generation-settlement-read-row input { width:16px !important; height:16px; margin:0; accent-color:#00bfa5; }.generation-settlement-read-row span { font-size:15px; font-weight:600; }.generation-settlement-read-row b { min-width:0; color:#8fa9c0; font-size:13px; font-weight:400; text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }body.light .generation-settlement-read-head strong,body.light .generation-settlement-read-row { color:#1f2937 !important; }body.light .generation-settlement-read-row { border-color:#d8e0ea; background:#f8fafc; }body.light .generation-settlement-read-row b { color:#64748b; }@media(max-width:720px){.generation-settlement-read-head{display:grid;gap:3px}.generation-settlement-read-row{grid-template-columns:auto 1fr}.generation-settlement-read-row b{grid-column:2;text-align:left;}}
#generationManualDate { color-scheme:dark; }
#generationManualDate::-webkit-calendar-picker-indicator {
  width:18px;
  height:18px;
  margin-right:-4px;
  padding:7px;
  border-radius:5px;
  background-color:rgba(155,201,232,.16);
  filter:invert(1) brightness(2.4) contrast(1.15);
  opacity:1;
  cursor:pointer;
}
#generationManualDate:hover::-webkit-calendar-picker-indicator,
#generationManualDate:focus::-webkit-calendar-picker-indicator {
  background-color:rgba(0,212,170,.24);
  filter:invert(1) brightness(2.8) contrast(1.2);
}
body.light #generationManualDate { color-scheme:light; }
body.light #generationManualDate::-webkit-calendar-picker-indicator {
  background-color:transparent;
  filter:none;
}
.generation-register-row { grid-template-columns:110px minmax(0,1fr) minmax(0,.62fr) minmax(0,.52fr) minmax(0,.58fr) minmax(0,.58fr); }.generation-extra-register-row { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,.62fr) minmax(0,.45fr) minmax(0,.58fr) minmax(0,.58fr) auto; }.generation-extra-register-row select { width:100%; min-width:0; padding:8px 7px; color:#e6edf3; background:#0d1117; border:1px solid #1f3a5f; border-radius:6px; font-size:14px; }.generation-register-row input[readonly] { color:#9eb4c8; background:#111923; cursor:default; }body.light .generation-extra-register-row select { color:#1f2937; background:#fff; border-color:#cbd5e1; }body.light .generation-register-row input[readonly] { color:#475569; background:#f1f5f9; }@media(max-width:1040px){.generation-register-row,.generation-extra-register-row{grid-template-columns:1fr 1fr}.generation-register-row strong{grid-column:1/-1;}.generation-extra-register-row button{width:100%;}}
.generation-station-list-head { justify-content:flex-start; gap:10px; }.generation-station-count { color:#8fa9c0; font-size:14px; }
.generation-auto-collect-toggle { display:flex!important; align-items:center; justify-content:space-between; gap:18px; min-height:58px; padding:10px 12px; border:1px solid #28425b; border-radius:6px; background:#101a29; cursor:pointer; }.generation-auto-collect-toggle > span { display:grid; gap:3px; min-width:0; }.generation-auto-collect-toggle strong { color:#d8e6ed; font-size:14px; }.generation-auto-collect-toggle small { color:#7f93a7; font-size:12px; line-height:1.4; }.generation-auto-collect-toggle input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }.generation-auto-collect-toggle i { position:relative; flex:0 0 42px; width:42px; height:24px; border:1px solid #53677b; border-radius:12px; background:#263442; transition:.16s ease; }.generation-auto-collect-toggle i:after { content:''; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#a5b3c0; transition:.16s ease; }.generation-auto-collect-toggle input:checked + i { border-color:#00bfa5; background:#087f70; }.generation-auto-collect-toggle input:checked + i:after { left:21px; background:#eafffb; }.generation-auto-collect-toggle input:focus-visible + i { outline:2px solid #5ec7ff; outline-offset:2px; }body.light .generation-auto-collect-toggle { border-color:#d8e0ea; background:#f8fafc; }body.light .generation-auto-collect-toggle strong { color:#334155; }body.light .generation-auto-collect-toggle small { color:#64748b; }body.light .generation-auto-collect-toggle i { border-color:#94a3b8; background:#e2e8f0; }body.light .generation-auto-collect-toggle i:after { background:#64748b; }body.light .generation-auto-collect-toggle input:checked + i { border-color:#0f9f8b; background:#0f9f8b; }body.light .generation-auto-collect-toggle input:checked + i:after { background:#fff; }
/* Fixed register fields use a single shared header on desktop to reduce row height. */
#generationGlobalTemplateModule .generation-register-list { gap:4px; }
#generationGlobalTemplateModule .generation-register-table-head { display:grid; grid-template-columns:48px 120px minmax(130px,170px) 82px 82px 76px 88px 104px 104px 76px 126px 62px; gap:9px; padding:0 9px 5px; color:#a1afbd; font-size:15px; }
#generationGlobalTemplateModule .generation-register-row { grid-template-columns:48px 120px minmax(130px,170px) 82px 82px 76px 88px 104px 104px 76px 126px 62px; align-items:center; padding:7px 9px; }
#generationGlobalTemplateModule .generation-register-row label { gap:0; font-size:0; }
#generationGlobalTemplateModule .generation-register-row input { padding-top:7px; padding-bottom:7px; font-size:17px; }
#generationGlobalTemplateModule .generation-register-refresh { grid-column:8 / 12; display:grid; grid-template-columns:104px 104px 76px 126px; gap:9px; align-items:center; padding:0; border:0; }
#generationGlobalTemplateModule .generation-register-refresh label { display:grid; gap:0; color:#a1afbd; font-size:0; }
#generationGlobalTemplateModule .generation-register-refresh select { width:100%; min-height:34px; padding:5px 8px; color:#e6edf3; border:1px solid #1f3a5f; border-radius:5px; background:#0d1117; font-size:15px; }
#generationGlobalTemplateModule .generation-register-refresh .generation-quick-enable { display:grid; grid-template-columns:1fr; place-items:center; min-height:34px; padding:0; color:#b8c8d6; border:1px solid #315174; border-radius:5px; background:rgba(13,17,23,.7); }
#generationGlobalTemplateModule .generation-quick-enable input { width:16px; height:16px; margin:0; accent-color:#00bfa5; }
#generationGlobalTemplateModule .generation-quick-enable em { display:none; }
body.light #generationGlobalTemplateModule .generation-register-refresh { border-top-color:#d8e0ea; }body.light #generationGlobalTemplateModule .generation-register-refresh select { color:#1f2937; border-color:#cbd5e1; background:#fff; }body.light #generationGlobalTemplateModule .generation-register-refresh .generation-quick-enable { color:#334155; border-color:#cbd5e1; background:#f8fafc; }
@media(max-width:1280px){#generationGlobalTemplateModule .generation-register-table-head{display:none}#generationGlobalTemplateModule .generation-register-row{grid-template-columns:repeat(2,minmax(0,1fr))}#generationGlobalTemplateModule .generation-register-refresh{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));padding-top:7px;border-top:1px solid rgba(40,66,91,.58)}#generationGlobalTemplateModule .generation-register-refresh label{font-size:13px}}@media(max-width:820px){#generationGlobalTemplateModule .generation-register-refresh{grid-template-columns:1fr 1fr}}@media(max-width:560px){#generationGlobalTemplateModule .generation-register-refresh{grid-template-columns:1fr}}
@media(max-width:820px){#generationGlobalTemplateModule .generation-register-table-head{display:none}#generationGlobalTemplateModule .generation-register-row label{gap:4px;font-size:15px}}
.tools-c-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.tools-c-top .tools-c-title {
  flex: 1; margin-bottom: 0; font-size: 17px; font-weight: 600; color: #e6edf3;
}
.tools-c-icon {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.tools-c-icon.c-blue  { background: rgba(0,212,170,0.12); color: #00d4aa; }
.tools-c-icon.c-green { background: rgba(63,185,80,0.14); color: #3fb950; }
.tools-c-icon.c-orange{ background: rgba(240,136,62,0.14); color: #f0883e; }
.tools-c-icon.c-red   { background: rgba(233,69,96,0.14); color: #e94560; }
.tools-c-icon.c-purple{ background: rgba(163,113,247,0.14); color: #a371f7; }
.tools-c-badge {
  font-size: 11px; font-weight: 600; flex-shrink: 0;
  background: rgba(255,255,255,0.06); color: #8b949e;
  padding: 2px 10px; border-radius: 20px;
  letter-spacing: 0.3px;
}
.tools-c-badge.sens { background: rgba(233,69,96,0.14); color: #e94560; }
.tools-c-title { font-size: 17px; font-weight: 600; color: #e6edf3; }
body.light .tools-c-top .tools-c-title { color: #111827; }
.tools-c-desc {
  font-size: 13px; color: #a1afbd; line-height: 1.4; margin-bottom: 10px; flex: 1;
}
.tools-c-info {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: #a1afbd; margin-top: 2px; flex-wrap: wrap;
}
.tools-c-info .dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 3px;
}
.tools-c-info .dot.on  { background: #3fb950; box-shadow: 0 0 5px rgba(63,185,80,0.4); }
.tools-c-info .dot.off { background: #6e7681; }
.fault-collect-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px;
}
.fault-collect-tags span {
  color: #c9d1d9; background: rgba(0,212,170,0.08);
  border: 1px solid rgba(0,212,170,0.18);
  border-radius: 6px; padding: 3px 8px; font-size: 12px;
}
.fault-collect-module {
  background: rgba(13,17,23,0.38); border: 1px solid #1f3a5f; border-radius: 8px;
}
.fault-collect-modules {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start;
}
.fault-collect-module { padding: 16px; }
.fault-collect-purpose {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start;
  margin-bottom: 14px; padding: 11px 13px;
  background: rgba(100,149,237,0.08); border: 1px solid rgba(100,149,237,0.18); border-radius: 6px;
}
.fault-collect-purpose b {
  color: #00d4aa; font-size: 13px; line-height: 1.55; white-space: nowrap;
}
.fault-collect-purpose span {
  color: #a1afbd; font-size: 12px; line-height: 1.55;
}
.fault-collect-module-head {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: start;
}
.fault-collect-module-head h4 {
  margin: 0 0 5px; color: #e6edf3; font-size: 16px; line-height: 1.3;
}
.fault-collect-module-head p {
  margin: 0; color: #8b949e; font-size: 12px; line-height: 1.55;
}
.fault-collect-module-head > span {
  color: #00d4aa; background: rgba(0,212,170,0.08);
  border: 1px solid rgba(0,212,170,0.20);
  border-radius: 6px; padding: 4px 8px; font-size: 12px; white-space: nowrap;
}
.fault-collect-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 14px 0 12px;
}
.fault-collect-steps span {
  min-height: 34px; display: flex; align-items: center;
  color: #a1afbd; background: rgba(100,149,237,0.08);
  border: 1px solid rgba(100,149,237,0.16);
  border-radius: 6px; padding: 5px 7px; font-size: 11px; line-height: 1.25;
}
.tools-c-ft {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid #1f3a5f;
  display: flex; justify-content: flex-end;
}
.tools-c-btn {
  font-size: 13px; font-weight: 500; color: #00d4aa;
  background: transparent; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
  transition: background .2s;
}
.tools-c-btn:hover { background: rgba(0,212,170,0.1); }
.tools-c-dir .tools-c-ft { border-top-color: rgba(240,136,62,0.18); }
.tools-c-dir .tools-c-btn { color: #f0883e; }
.tools-c-dir .tools-c-btn:hover { background: rgba(240,136,62,0.1); }

/* 遮罩 */
.tools-ov {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.58); backdrop-filter: blur(3px);
  z-index: 9000; opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.tools-ov.on { opacity: 1; visibility: visible; }

/* 抽屉 */
.tools-dr {
  position: fixed; top: 0; right: -580px;
  width: 540px; max-width: 94vw; height: 100%;
  background: #16213e; z-index: 9100;
  box-shadow: -6px 0 36px rgba(0,0,0,0.5);
  transition: right .32s cubic-bezier(0.22, 1, 0.36, 1), width .32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
.tools-dr.on { right: 0; }
.tools-dr-resize { position: absolute; top: 0; left: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 9101; touch-action: none; background: transparent; }
.tools-dr-resize:hover, .tools-dr-resize.dragging { background: rgba(0, 212, 170, 0.3); }
body.tool-drawer-resizing, body.tool-drawer-resizing * { cursor: col-resize !important; user-select: none !important; }
.tools-dr.wide15 { right: -850px; width: 810px; }
.tools-dr.wide15.on { right: 0; }
.tools-dr.labelwide { right: -1255px; width: 1215px; max-width: 96vw; }
.tools-dr.labelwide.on { right: 0; }
.tools-dr.wide { right: -1120px; width: 1080px; }
.tools-dr.wide.on { right: 0; }
.tools-dr.wide25 { right: -1390px; width: 1350px; }
.tools-dr.wide25.on { right: 0; }
.tools-dr.wide3 { right: -1660px; width: 1620px; max-width: 96vw; }
.tools-dr.wide3.on { right: 0; }
.tools-dr.otawide { right: -1984px; width: 1944px; max-width: 96vw; }
.tools-dr.otawide.on { right: 0; }
.tools-dr.firmwarewide { right: -1984px; width: 1944px; max-width: 96vw; }
.tools-dr.firmwarewide.on { right: 0; }
.tools-dr.faultwide { right: -1280px; width: 1240px; }
.tools-dr.faultwide.on { right: 0; }
.tools-dr.storagewide { right: -1320px; width: 1280px; max-width: 96vw; }
.tools-dr.storagewide.on { right: 0; }
#toolsDrawer.labelwide { right: -1255px; width: 1215px; max-width: 96vw; }
#toolsDrawer.labelwide.on { right: 0; }
.tools-dr-hd {
  padding: 18px 26px; border-bottom: 1px solid #1f3a5f;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; background: #111d2e;
}
.tools-dr-hd h3 {
  font-size: 17px; font-weight: 600; color: #e6edf3; margin: 0;
}
.tools-dr-cls {
  width: 34px; height: 34px; border: none;
  background: #1f3a5f; border-radius: 50%;
  font-size: 17px; color: #8b949e; cursor: pointer;
  transition: background .2s, color .2s;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.tools-dr-cls:hover { background: #2d4a6f; color: #e6edf3; }
.tools-dr-bd {
  flex: 1; overflow-y: auto; padding: 22px 26px 30px;
}
.tools-dr-bd .tool-card-body { display: block; margin-top: 0; }
/* 抽屉内0x19读取结果字体放大 */
.tools-dr-bd .debug-result { font-size: 16px !important; }
.tools-dr-bd .debug-result pre { font-size: 16px !important; }
.tools-dr-bd .tool-inline { margin-top: 12px; }
.tools-dr-bd .overview-table-wrap { max-height: 400px; }
/* 抽屉内短日志表格 */
.tools-dr-bd .short-log-table-wrap { background: #0d1117; border-radius: 6px; }
.tools-dr-bd .short-log-table { table-layout: fixed; min-width: 0; width: 100%; }
.tools-dr-bd .short-log-table th { background: #1a2332; color: #c9d1d9; font-size: 13px; padding: 8px 10px; }
.tools-dr-bd .short-log-table td { background: #0d1117; color: #e6edf3; font-size: 13px; padding: 6px 10px; border-bottom-color: #1a2332; }
.tools-dr-bd .short-log-table tr:hover td { background: #111d2e; }
.tools-dr-bd .short-log-table th:nth-child(1), .tools-dr-bd .short-log-table td:nth-child(1) { width: 48px; }
.tools-dr-bd .short-log-table th:nth-child(2), .tools-dr-bd .short-log-table td:nth-child(2) { width: 56px; }
.tools-dr-bd .short-log-table th:nth-child(3), .tools-dr-bd .short-log-table td:nth-child(3) { width: 170px; }
.tools-dr-bd .short-log-table th:nth-child(4), .tools-dr-bd .short-log-table td:nth-child(4) { width: 130px; }
.tools-dr-bd .short-log-table th:nth-child(5), .tools-dr-bd .short-log-table td:nth-child(5) { width: auto; }
/* 异常行高亮 */
.tools-dr-bd .tool-alert-row td { background: rgba(233,69,96,0.14); color: #ffbdbd; }

/* 浅色主题 */
body.light .tools-pg-hdr h1 { color: #111827; }
body.light .tools-pg-hdr h1 small { color: #6b7280; }
body.light .tools-pg-cnt { color: #64748b; background: #f3f4f6; border-color: #d1d5db; }
body.light .tools-sec-hdr h2 { color: #64748b; }
body.light .tools-sec-hdr .line { background: #d1d5db; }
body.light .tools-c { background: #fff; border-color: #d1d5db; }
body.light .tools-c:hover { border-color: #2563eb; box-shadow: 0 6px 22px rgba(0,0,0,0.08); }
/* 工具卡片马卡龙色系（浅色主题） */
body.light .tools-c[data-tool="ecs"],
body.light .tools-c[data-tool="iccid"],
body.light .tools-c[data-tool="log"],
body.light .tools-c[data-tool="fault-data"],
body.light .tools-c[data-tool="debug-prop"] { background: #e4ecf8; border-color: #b8cce8; }
body.light .tools-c[data-tool="debug-modbus"] { background: #e2f3e6; border-color: #b0d8ba; }
body.light .tools-c[data-tool="import"],
body.light .tools-c[data-tool="rs485"] { background: #fdeddc; border-color: #e8c8a8; }
body.light .tools-c[data-tool="user"],
body.light .tools-c[data-tool="snhex"] { background: #efe5fa; border-color: #d0b8e8; }
body.light .tools-c[data-tool="encrypt"] { background: #fde4e4; border-color: #e8b0b0; }
body.light .tools-c[data-tool="inverter-fault-collect"] { background: #eefaf7; border-color: #9dd9cb; }
/* 浅色hover保持对应色系 */
body.light .tools-c[data-tool="ecs"]:hover,
body.light .tools-c[data-tool="iccid"]:hover,
body.light .tools-c[data-tool="log"]:hover,
body.light .tools-c[data-tool="fault-data"]:hover,
body.light .tools-c[data-tool="debug-prop"]:hover { border-color: #80a8e0; box-shadow: 0 6px 22px rgba(100,149,237,0.14); }
body.light .tools-c[data-tool="debug-modbus"]:hover { border-color: #70b880; box-shadow: 0 6px 22px rgba(63,185,80,0.14); }
body.light .tools-c[data-tool="import"]:hover,
body.light .tools-c[data-tool="rs485"]:hover { border-color: #d89860; box-shadow: 0 6px 22px rgba(240,136,62,0.14); }
body.light .tools-c[data-tool="user"]:hover,
body.light .tools-c[data-tool="snhex"]:hover { border-color: #b088e0; box-shadow: 0 6px 22px rgba(163,113,247,0.14); }
body.light .tools-c[data-tool="encrypt"]:hover { border-color: #e08080; box-shadow: 0 6px 22px rgba(233,69,96,0.12); }
body.light .tools-c[data-tool="inverter-fault-collect"]:hover { border-color: #0a8d6d; box-shadow: 0 6px 22px rgba(10,141,109,0.12); }
body.light #toolsPage .tools-c {
  background-image: linear-gradient(105deg, rgba(255,255,255,.72) 0%, rgba(148,163,184,.08) 100%);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.95), inset -1px -1px 0 rgba(100,116,139,.10), 0 4px 10px rgba(15,23,42,.07);
}
body.light #toolsPage .tools-c:hover {
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.98), inset -1px -1px 0 rgba(100,116,139,.12), 0 7px 18px rgba(15,23,42,.11);
}
body.light .tools-c-title { color: #111827; }
body.light .tools-c-desc { color: #6b7280; }
body.light .tools-c-info { color: #6b7280; }
body.light .tools-c-ft { border-top-color: #e5e7eb; }
body.light .tools-c-btn { color: #2563eb; }
body.light .tools-c-btn:hover { background: #eff6ff; }
body.light .tools-c-badge { background: #f3f4f6; color: #6b7280; }
body.light .fault-collect-tags span {
  color: #065f46; background: #ecfdf5; border-color: #a7f3d0;
}
body.light .fault-collect-module {
  background: #f8fafc; border-color: #d1d5db;
}
body.light .fault-collect-module-head h4 { color: #111827; }
body.light .fault-collect-module-head p { color: #4b5563; }
body.light .fault-collect-purpose {
  background: #eef2ff; border-color: #c7d2fe;
}
body.light .fault-collect-purpose b { color: #065f46; }
body.light .fault-collect-purpose span { color: #374151; }
body.light .fault-collect-module-head > span {
  color: #065f46; background: #ecfdf5; border-color: #a7f3d0;
}
body.light .fault-collect-steps span {
  color: #374151; background: #eef2ff; border-color: #c7d2fe;
}
body.light .tools-ov { background: rgba(15,23,42,0.4); }
body.light .tools-dr { background: #fff; box-shadow: -6px 0 36px rgba(0,0,0,0.1); }
body.light .tools-dr.wide { box-shadow: -6px 0 36px rgba(0,0,0,0.1); }
body.light .tools-dr-hd { background: #f8fafc; border-bottom-color: #e2e8f0; }
body.light .tools-dr-hd h3 { color: #0f172a; }
body.light .tools-dr-bd .short-log-table-wrap { background: #f3f4f6; }
body.light .tools-dr-bd .short-log-table th { background: #e5e7eb; color: #374151; }
body.light .tools-dr-bd .short-log-table td { background: #fff; color: #111827; border-bottom-color: #e5e7eb; }
body.light .tools-dr-bd .short-log-table tr:hover td { background: #f0f9ff; }
body.light .tools-dr-bd .tool-alert-row td { background: #fef2f2; color: #dc2626; }
body.light .fault-upload-zone { background: #f9fafb; border-color: #d1d5db; }
body.light .fault-upload-zone:hover, body.light .fault-upload-zone.dragover { background: #f0fdf4; border-color: #0a8d6d; }
body.light .fault-upload-title, body.light .fault-file-name { color: #111827; }
body.light .fault-upload-sub, body.light .fault-file-bar, body.light .fault-count, body.light .fault-summary-label { color: #374151; }
body.light .fault-file-bar { background: #eff6ff; border-color: #bfdbfe; }
body.light .fault-summary-item { background: #fff; border-color: #d1d5db; }
body.light .fault-summary-value { color: #111827; }
body.light .fault-help-icon { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
body.light .fault-help-pop { background: #fff; color: #1f2937; border-color: #d1d5db; box-shadow: 0 10px 28px rgba(15,23,42,0.16); }
body.light .fault-section-title { color: #111827; }
body.light .fault-check-item, body.light .fault-attr-item { background: #fff; border-color: #d1d5db; }
body.light .fault-check-main, body.light .fault-attr-main { color: #111827; }
body.light .fault-check-main b, body.light .fault-attr-main b { color: #0a8d6d; }
body.light .fault-check-sub, body.light .fault-attr-sub { color: #4b5563; }
body.light .fault-attr-meta { color: #ea580c; }
body.light .tools-dr-bd .fault-data-table-wrap, body.light .fault-raw { background: #fff; border-color: #d1d5db; }
body.light .tools-dr-bd .fault-data-table th { background: #f3f4f6; color: #374151; }
body.light .tools-dr-bd .fault-data-table td { background: #fff; color: #111827; border-bottom-color: #e5e7eb; }
body.light .tools-dr-bd .fault-data-table tr:hover td { background: #f0f9ff; }
body.light .fault-raw { color: #111827; }
body.light .tools-dr-cls { background: #e2e8f0; color: #64748b; }
body.light .tools-dr-cls:hover { background: #cbd5e1; color: #334155; }
/* 抽屉头帮助按钮 */
.tools-drawer-help-wrap { position: relative; display: inline-grid; place-items: center; }
.tools-drawer-help-pop { display: none; position: absolute; top: 40px; right: 0; z-index: 10004; width: 360px; max-width: min(360px, calc(100vw - 32px)); padding: 12px 14px; color: #dce6f2; background: #111d2e; border: 1px solid rgba(94,234,212,.24); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.36); font-size: 12px; line-height: 1.55; text-align: left; white-space: normal; }
.tools-drawer-help-pop.show-on-hover { pointer-events: none; }
.tools-drawer-help-pop.show-on-hover::before { content: ''; position: absolute; top: -7px; right: 12px; width: 12px; height: 12px; background: #111d2e; border-left: 1px solid rgba(94,234,212,.24); border-top: 1px solid rgba(94,234,212,.24); transform: rotate(45deg); }
.tools-drawer-help-wrap:hover .tools-drawer-help-pop.show-on-hover,
.tools-drawer-help-wrap:focus-within .tools-drawer-help-pop.show-on-hover { display: block; }
.tools-drawer-help-pop b { display: block; margin-bottom: 6px; color: #5eead4; font-size: 13px; }
.tools-drawer-help-pop ol { margin: 0; padding-left: 18px; }
.tools-drawer-help-pop li { margin: 3px 0; }
body.light #toolsDrawerHelpBtn { background: #e2e8f0 !important; color: #64748b !important; }
body.light #toolsDrawerHelpBtn:hover { background: #cbd5e1 !important; color: #334155 !important; }
body.light .tools-drawer-help-pop { color: #1f2937; background: #fff; border-color: #cbd5e1; box-shadow: 0 12px 28px rgba(15,23,42,.16); }
body.light .tools-drawer-help-pop.show-on-hover::before { background: #fff; border-color: #cbd5e1; }
body.light .tools-drawer-help-pop b { color: #047857; }

/* ---- 浅色主题：工具抽屉内部组件 ---- */
/* 抽屉内通用标签 */
body.light .tools-dr-bd label { color: #374151 !important; }
body.light .tools-dr-bd .debug-field label { color: #374151 !important; }

/* 抽屉内输入框、选择框、文本域 */
body.light .tools-dr-bd input[type="text"],
body.light .tools-dr-bd input[type="password"],
body.light .tools-dr-bd input[type="number"],
body.light .tools-dr-bd input[type="month"],
body.light .tools-dr-bd input:not([type]),
body.light .tools-dr-bd select,
body.light .tools-dr-bd textarea,
body.light .tools-dr-bd .tool-input,
body.light .tools-dr-bd .mono { background: #fff !important; border-color: #d1d5db !important; color: #111827 !important; }
body.light .tools-dr-bd input:focus,
body.light .tools-dr-bd select:focus,
body.light .tools-dr-bd textarea:focus,
body.light .tools-dr-bd .tool-input:focus { border-color: #0a8d6d !important; }

/* 抽屉内 tool-textarea */
body.light .tools-dr-bd .tool-textarea { background: #f9fafb !important; border-color: #d1d5db !important; color: #111827 !important; }

/* 抽屉内 tool-result */
body.light .tools-dr-bd .tool-result { color: #1f2937 !important; background: #f3f4f6 !important; border-color: #d1d5db !important; }

/* 抽屉内信息摘要栏 (ecs/iccid/import/encrypt 等共用的 rgba 深色背景条) */
body.light .tools-dr-bd [style*="background:rgba(15,52,96,0.2)"],
body.light .tools-dr-bd [style*="background: rgba(15,52,96,0.2)"] { background: #f0f9ff !important; border-color: #bae6fd !important; }
body.light .tools-dr-bd [style*="background:rgba(15,52,96,0.2)"] span,
body.light .tools-dr-bd [style*="background: rgba(15,52,96,0.2)"] span { color: #374151 !important; }
/* 灰色文字 → 深色保证可读性 */
body.light .tools-dr-bd [style*="color:#8b949e"],
body.light .tools-dr-bd [style*="color:#6e7681"] { color: #374151 !important; }
body.light .tools-dr-bd [style*="color:#c9d1d9"] { color: #1f2937 !important; }
body.light .tools-dr-bd [style*="color:#e6edf3"],
body.light .tools-dr-bd [style*="color: #e6edf3"] { color: #111827 !important; }

/* 抽屉内 info 条中的连接状态文字 */
body.light .tools-dr-bd [style*="font-weight:600"] { color: #111827 !important; }

/* 抽屉内普通按钮（边框样式） */
body.light .tools-dr-bd button[style*="background:transparent"],
body.light .tools-dr-bd button[style*="background: transparent"] { background: #fff !important; border-color: #d1d5db !important; color: #374151 !important; }
body.light .tools-dr-bd button[style*="background:transparent"]:hover,
body.light .tools-dr-bd button[style*="background: transparent"]:hover { background: #f3f4f6 !important; border-color: #9ca3af !important; }

/* 抽屉内蓝色主按钮 */
body.light .tools-dr-bd button[style*="background:#2563eb"],
body.light .tools-dr-bd button[style*="background: #2563eb"] { background: #2563eb !important; color: #fff !important; }
body.light .tools-dr-bd button[style*="background:#2563eb"]:hover,
body.light .tools-dr-bd button[style*="background: #2563eb"]:hover { background: #1d4ed8 !important; }

/* 抽屉内绿色按钮 */
body.light .tools-dr-bd button[style*="background:#10b981"],
body.light .tools-dr-bd button[style*="background: #10b981"] { background: #059669 !important; color: #fff !important; }

/* 抽屉内红色按钮 */
body.light .tools-dr-bd button[style*="background:#dc2626"],
body.light .tools-dr-bd button[style*="background: #dc2626"] { background: #dc2626 !important; color: #fff !important; }

/* 抽屉内上传拖拽区域 */
body.light .tools-dr-bd [style*="border:2px dashed #1f3a5f"],
body.light .tools-dr-bd [style*="border: 2px dashed #1f3a5f"] { border-color: #d1d5db !important; background: #f9fafb !important; }
body.light .tools-dr-bd [style*="border:2px dashed #1f3a5f"]:hover,
body.light .tools-dr-bd [style*="border: 2px dashed #1f3a5f"]:hover { border-color: #0a8d6d !important; background: #f0fdf4 !important; }

/* 抽屉内已导入证书列表 */
body.light .tools-dr-bd [style*="background:rgba(13,17,23,0.4)"],
body.light .tools-dr-bd [style*="background: rgba(13,17,23,0.4)"] { background: #f9fafb !important; border-color: #d1d5db !important; }

/* 抽屉内用户管理新增区域 */
body.light .tools-dr-bd [style*="background:#0f1a2e"],
body.light .tools-dr-bd [style*="background: #0f1a2e"] { background: #f0f9ff !important; border-color: #d1d5db !important; }
/* 用户管理表格行 */
body.light .tools-dr-bd table tr[style*="border-bottom:1px solid #0f3460"] { border-bottom-color: #e5e7eb !important; }
body.light .tools-dr-bd table td[style*="border-bottom"] { border-bottom-color: #e5e7eb !important; }
body.light .tools-dr-bd table[style*="color:#ccc"] { color: #1f2937 !important; }
/* 当前用户行高亮 */
body.light .tools-dr-bd tr[style*="background:rgba(0,212,170,0.05)"] { background: rgba(10,141,109,0.06) !important; }

/* ---- RS485 图表区域 ---- */
body.light #rs485ChartWrap,
body.light #rs485TimelineWrap,
body.light #rs485RttWrap,
body.light #rs485EnergyWrap { background: #f9fafb !important; border-color: #d1d5db !important; }
body.light #rs485ChartWrap [style*="color:#00d4aa"],
body.light #rs485TimelineWrap [style*="color:#00d4aa"],
body.light #rs485RttWrap [style*="color:#00d4aa"],
body.light #rs485EnergyWrap [style*="color:#00d4aa"] { color: #0a8d6d !important; }
/* 图表内灰色文字加黑 */
body.light #rs485ChartWrap [style*="color:#6e7681"],
body.light #rs485TimelineWrap [style*="color:#6e7681"],
body.light #rs485RttWrap [style*="color:#6e7681"],
body.light #rs485EnergyWrap [style*="color:#6e7681"],
body.light #rs485ChartWrap [style*="color:#8b949e"],
body.light #rs485TimelineWrap [style*="color:#8b949e"],
body.light #rs485RttWrap [style*="color:#8b949e"],
body.light #rs485EnergyWrap [style*="color:#8b949e"] { color: #374151 !important; }
/* 图表内浅色文字（标题等）加黑 */
body.light #rs485ChartWrap [style*="color:#c9d1d9"],
body.light #rs485TimelineWrap [style*="color:#c9d1d9"],
body.light #rs485RttWrap [style*="color:#c9d1d9"],
body.light #rs485EnergyWrap [style*="color:#c9d1d9"],
body.light #rs485ChartWrap [style*="color:#e6edf3"],
body.light #rs485TimelineWrap [style*="color:#e6edf3"],
body.light #rs485RttWrap [style*="color:#e6edf3"],
body.light #rs485EnergyWrap [style*="color:#e6edf3"] { color: #111827 !important; }
/* 图表 tooltip 浅色主题 */
body.light #rs485ChartTooltip,
body.light #rs485TimelineTooltip,
body.light #rs485RttTooltip,
body.light #rs485EnergyTooltip { background: #fff !important; border-color: #d1d5db !important; color: #111827 !important; box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important; }
/* 图表 tooltip 内文字 */
body.light #rs485ChartTooltip [style*="color:#8b949e"],
body.light #rs485TimelineTooltip [style*="color:#8b949e"],
body.light #rs485RttTooltip [style*="color:#8b949e"],
body.light #rs485EnergyTooltip [style*="color:#8b949e"] { color: #374151 !important; }
body.light #rs485ChartTooltip [style*="color:#c9d1d9"],
body.light #rs485TimelineTooltip [style*="color:#c9d1d9"],
body.light #rs485RttTooltip [style*="color:#c9d1d9"],
body.light #rs485EnergyTooltip [style*="color:#c9d1d9"] { color: #1f2937 !important; }
body.light #rs485ChartTooltip [style*="color:#e6edf3"],
body.light #rs485TimelineTooltip [style*="color:#e6edf3"],
body.light #rs485RttTooltip [style*="color:#e6edf3"],
body.light #rs485EnergyTooltip [style*="color:#e6edf3"] { color: #111827 !important; }
/* 图表图例文字：浅色背景下全部用深色 */
body.light #rs485ChartLegend [style*="color:#c9d1d9"],
body.light #rs485ChartLegend [style*="color:#8b949e"],
body.light #rs485ChartLegend [style*="color:#6e7681"],
body.light #rs485TimelineLegend [style*="color:#c9d1d9"],
body.light #rs485TimelineLegend [style*="color:#8b949e"],
body.light #rs485RttLegend [style*="color:#c9d1d9"],
body.light #rs485RttLegend [style*="color:#6e7681"],
body.light #rs485EnergyLegend [style*="color:#c9d1d9"],
body.light #rs485EnergyLegend [style*="color:#8b949e"],
body.light #rs485EnergyLegend [style*="color:#e6edf3"] { color: #111827 !important; }
/* 图表图例复选框标签 */
body.light #rs485ChartLegend label,
body.light #rs485TimelineLegend label,
body.light #rs485RttLegend label,
body.light #rs485EnergyLegend label { color: #374151 !important; }
/* 图表悬浮竖线 */
body.light #rs485ChartWrap canvas ~ div [style*="color:#fff"],
body.light #rs485TimelineWrap canvas ~ div [style*="color:#fff"],
body.light #rs485RttWrap canvas ~ div [style*="color:#fff"],
body.light #rs485EnergyWrap canvas ~ div [style*="color:#fff"] { color: #111827 !important; }
/* 额定功率显示区 */
body.light #rs485RatedPower [style*="color:#6e7681"] { color: #374151 !important; }
body.light #rs485RatedPower [style*="color:#fff"] { color: #111827 !important; }

/* ---- RS485 解析结果行 ---- */
body.light .rs485-raw { background: #f3f4f6 !important; color: #374151 !important; border-right-color: #d1d5db !important; }
body.light .rs485-raw .rs485-hex { color: #111827 !important; }
body.light .rs485-raw .rs485-time { color: #374151 !important; }
body.light .rs485-parsed { color: #111827 !important; }
body.light .rs485-row:hover { background: rgba(10,141,109,0.06) !important; }
body.light .rs485-frame-info { color: #374151 !important; }
body.light .rs485-reg-chip .reg-addr { color: #374151 !important; }
body.light .rs485-reg-chip .reg-name { color: #1f2937 !important; }
body.light .rs485-reg-chip .reg-value { color: #111827 !important; }
body.light .rs485-reg-chip .reg-unit { color: #374151 !important; }
body.light .rs485-reg-chip.reg-defined .reg-value { color: #0a8d6d !important; }
body.light .rs485-slave-sep { background: rgba(10,141,109,0.06) !important; border-left-color: #0f766e !important; }
body.light .rs485-slave-sep span { color: #0f766e !important; }
body.light .rs485-slave-sep small { color: #374151 !important; }
body.light .rs485-empty { color: #374151 !important; }
body.light .rs485-raw-single { color: #374151 !important; }
body.light .rs485-reg-more { color: #2563eb !important; }

/* RS485 帧标签 */
body.light .rs485-tag-request { background: #dbeafe !important; color: #2563eb !important; }
body.light .rs485-tag-response { background: #d1fae5 !important; color: #059669 !important; }
body.light .rs485-tag-error { background: #fee2e2 !important; color: #dc2626 !important; }
body.light .rs485-tag-write { background: #ffedd5 !important; color: #ea580c !important; }
body.light .rs485-frame-tag[style*="background:#1a3a5c"] { background: #dbeafe !important; color: #2563eb !important; }
body.light .rs485-frame-tag[style*="background:#1a3c2a"] { background: #d1fae5 !important; color: #059669 !important; }

/* RS485 警告面板 */
body.light .rs485-warn-panel { border-color: #ea580c !important; }
body.light .rs485-warn-header { background: rgba(234,88,12,0.06) !important; color: #ea580c !important; }
body.light .rs485-warn-header:hover { background: rgba(234,88,12,0.1) !important; }
body.light .rs485-warn-desc { color: #1f2937 !important; }
body.light .rs485-warn-type { color: #ea580c !important; }
body.light .rs485-warn-slave,
body.light .rs485-warn-time,
body.light .rs485-warn-idx { color: #374151 !important; }
body.light .rs485-warn-rate { color: #ea580c !important; background: rgba(234,88,12,0.06) !important; }
body.light .rs485-warn-goto { color: #2563eb !important; }
body.light .rs485-warn-fbtn { border-color: #d1d5db !important; color: #374151 !important; }
body.light .rs485-warn-fbtn:hover { border-color: #ea580c !important; color: #ea580c !important; }
body.light .rs485-warn-fbtn.active { background: rgba(234,88,12,0.1) !important; border-color: #ea580c !important; color: #ea580c !important; }
body.light .rs485-warn-item { border-bottom-color: #e5e7eb !important; }
body.light .rs485-warn-item:hover { background: rgba(234,88,12,0.04) !important; }

/* ---- 拓扑 / 调试组件 ---- */
body.light .topo-select,
body.light .topo-input { background: #fff !important; color: #111827 !important; border-color: #d1d5db !important; }
body.light .topo-submit-btn { background: #f0f9ff !important; color: #0a8d6d !important; border-color: #0a8d6d !important; }
body.light .topo-submit-btn:hover { background: #d1fae5 !important; }
body.light .topo-add-status { background: #f3f4f6 !important; color: #374151 !important; }
body.light .debug-select { background: #fff !important; color: #111827 !important; border-color: #d1d5db !important; }
body.light .debug-result { background: #f9fafb !important; border-color: #d1d5db !important; color: #374151 !important; }
body.light .debug-result pre { color: #0a8d6d !important; }
body.light .topo-tabs { border-bottom-color: #d1d5db !important; }
body.light .topo-tab { color: #6b7280 !important; }
body.light .topo-tab:hover { color: #374151 !important; }
body.light .topo-tab.active { color: #0a8d6d !important; border-bottom-color: #0a8d6d !important; }
body.light .topo-btn-primary { background: #f0f9ff !important; color: #065f46 !important; border-color: #065f46 !important; }
body.light .topo-btn-primary:hover { background: #d1fae5 !important; }
body.light .topo-btn-add { background: #ecfdf5 !important; color: #047857 !important; border-color: #047857 !important; }
body.light .topo-btn-add:hover { background: #d1fae5 !important; }
body.light .topo-btn-del { background: #fef2f2 !important; color: #b91c1c !important; border-color: #b91c1c !important; }
body.light .topo-btn-del:hover { background: #fee2e2 !important; }
body.light .topo-btn-danger { background: #fef2f2 !important; color: #b91c1c !important; border-color: #b91c1c !important; }
body.light .topo-btn-danger:hover { background: #fee2e2 !important; }
body.light .topo-btn { background: #fff !important; color: #374151 !important; border-color: #d1d5db !important; }
body.light .topo-btn:hover { background: #f3f4f6 !important; }
body.light .topo-online { background: rgba(5,150,105,0.1) !important; color: #047857 !important; }
body.light .topo-offline { background: rgba(107,114,128,0.1) !important; color: #374151 !important; }

/* ---- 添加设备弹窗 (Add Device Modal) ---- */
body.light #addDeviceOverlay > div { background: #fff !important; border-color: #d1d5db !important; }
body.light #addDeviceOverlay h3 { color: #0a8d6d !important; }
body.light #addDeviceOverlay [style*="border-bottom:1px solid #0f3460"] { border-bottom-color: #d1d5db !important; }
body.light .topo-add-panel p { color: #6b7280 !important; }
body.light .topo-add-panel label { color: #374151 !important; }

/* ---- RS485 解析帮助弹窗 ---- */
body.light #rs485HelpOverlay > div { background: #fff !important; border-color: #d1d5db !important; }
body.light #rs485HelpOverlay h3 { color: #0a8d6d !important; }
body.light #rs485HelpOverlay [style*="border-bottom:1px solid #0f3460"] { border-bottom-color: #d1d5db !important; }
body.light .rs485-help-scene { background: #f9fafb !important; border-color: #d1d5db !important; }
body.light .rs485-help-num { background: rgba(10,141,109,0.1) !important; color: #0a8d6d !important; }
body.light .rs485-help-title { color: #111827 !important; }
body.light .rs485-help-desc { color: #6b7280 !important; }
body.light .rs485-help-example { background: #f3f4f6 !important; color: #374151 !important; }
body.light .rs485-help-tag.tag-req { background: #dbeafe !important; color: #2563eb !important; }
body.light .rs485-help-tag.tag-resp { background: #d1fae5 !important; color: #059669 !important; }
body.light .rs485-help-tag.tag-write { background: #ffedd5 !important; color: #ea580c !important; }
body.light .rs485-help-tag.tag-wresp { background: #d1fae5 !important; color: #0a8d6d !important; }
body.light .rs485-help-tag.tag-orphan { background: #f3e8ff !important; color: #7c3aed !important; }
/* RS485 帮助弹窗内联强调文字 */
body.light #rs485HelpOverlay [style*="color:#e6edf3"],
body.light #rs485HelpOverlay [style*="color: #e6edf3"] { color: #0a8d6d !important; }
body.light #rs485HelpOverlay p { color: #374151 !important; }
body.light #rs485HelpOverlay [style*="color:#8b949e"] { color: #6b7280 !important; }
body.light #rs485HelpOverlay [style*="border-left:3px solid #00d4aa"] { border-left-color: #0a8d6d !important; }

/* 抽屉内 .debug-result 区域文字 */
body.light .tools-dr-bd .debug-result { color: #111827 !important; }

/* 抽屉内拓扑按钮通用样式 */
body.light .tools-dr-bd .topo-btn { background: #fff !important; color: #374151 !important; border-color: #d1d5db !important; }
body.light .tools-dr-bd .topo-btn:hover { background: #f3f4f6 !important; }
body.light .tools-dr-bd .topo-btn-primary { background: #f0f9ff !important; color: #065f46 !important; border-color: #065f46 !important; }
body.light .tools-dr-bd .topo-btn-primary:hover { background: #d1fae5 !important; }
body.light .tools-dr-bd .topo-btn-add { background: #ecfdf5 !important; color: #047857 !important; border-color: #047857 !important; }
body.light .tools-dr-bd .topo-btn-add:hover { background: #d1fae5 !important; }

body.light .topo-table th{background:#f3f4f6;color:#374151}
body.light .topo-table td{background:#fff;color:#111827;border-bottom-color:#e5e7eb}
body.light .topo-table tr:hover td{background:#f0f9ff}
body.light .topo-table-wrap{background:#f9fafb;border-color:rgba(15,52,96,.12)}

/* 抽屉内危险按钮 */
body.light .tools-dr-bd button.danger,
body.light .tools-dr-bd .danger { background: #dc2626 !important; color: #fff !important; }

/* 抽屉内拓扑表格行 */
body.light .tools-dr-bd .topo-row-del-btn { background: #fff !important; color: #dc2626 !important; border-color: #dc2626 !important; }
body.light .tools-dr-bd .topo-row-del-btn:hover { background: #fef2f2 !important; }

/* 抽屉内抽屉按钮（0x18/0x19等操作按钮） */
body.light .tools-dr-bd .debug-row button,
body.light .tools-dr-bd button.topo-btn { font-weight: 600; }

/* 抽屉内表单区域（用户管理等） */
body.light .tools-dr-bd [style*="color:#f0883e"] { color: #ea580c !important; }
body.light .tools-dr-bd .form-field label,
body.light .tools-dr-bd label[style*="color:#888"] { color: #374151 !important; }

/* 抽屉内连接状态 fail/ok 文字 */
body.light .tools-dr-bd .fail { color: #dc2626 !important; }
body.light .tools-dr-bd .ok { color: #059669 !important; }

/* 抽屉内表格表头通用 */
body.light .tools-dr-bd table thead tr[style*="background:#0f1a2e"],
body.light .tools-dr-bd table thead tr[style*="background: #0f1a2e"] { background: #f3f4f6 !important; color: #374151 !important; }

/* 拓扑表格（在抽屉中时） ---- */
body.light .tools-dr-bd .overview-table-wrap { background: #fff !important; border-color: #d1d5db !important; }
body.light .tools-dr-bd .overview-table th { background: #f3f4f6 !important; color: #374151 !important; }
body.light .tools-dr-bd .overview-table td { background: #fff !important; color: #111827 !important; border-bottom-color: #e5e7eb !important; }
body.light .tools-dr-bd .overview-table tr:hover td { background: #f0f9ff !important; }
body.light .tools-dr-bd .topo-summary { background: #f3f4f6 !important; color: #374151 !important; }
body.light .tools-dr-bd .tool-conn-info { color: #374151 !important; }
body.light .tools-dr-bd .tool-conn-info b { color: #0a8d6d !important; }

/* ---- ECS 诊断卡片（设备详情页） ---- */
body.light .detail-card.detail-ecs-diag-card { background: #f0f9ff !important; }
body.light .detail-esc-card small { color: #6b7280 !important; }
body.light .esc-state-note { color: #64748b; }

/* ---- 顶部 header 版本信息 ---- */
body.light #versionInfo { background: #fff !important; border-color: #d1d5db !important; color: #374151 !important; }
body.light #versionInfo td { color: #374151 !important; }
body.light #versionInfo th { color: #6b7280 !important; }
body.light #versionInfo .about-us-line { border-top-color: #e5e7eb !important; color: #6b7280 !important; }
body.light #versionAddForm { background: #f9fafb !important; border-color: #d1d5db !important; }
body.light #versionAddForm input { background: #fff !important; border-color: #d1d5db !important; color: #111827 !important; }
body.light #versionAddBtn [style*="color:#f0883e"] { color: #ea580c !important; }

/* ---- 抽屉内 Modbus 寄存器读取区域 ---- */
body.light .tools-dr-bd [style*="border-top:1px solid #1f3a5f"],
body.light .tools-dr-bd [style*="border-top: 1px solid #1f3a5f"],
body.light .tools-dr-bd [style*="border-top:1px dashed #1f3a5f"],
body.light .tools-dr-bd [style*="border-top: 1px dashed #1f3a5f"] { border-top-color: #e5e7eb !important; }
body.light .tools-dr-bd [style*="color:#00d4aa"] { color: #0a8d6d !important; }
body.light .tools-dr-bd [style*="color: #00d4aa"] { color: #0a8d6d !important; }
body.light .tools-dr-bd [style*="color:#888"],
body.light .tools-dr-bd [style*="color: #888"] { color: #374151 !important; }
body.light .tools-dr-bd [style*="color:#ccc"],
body.light .tools-dr-bd [style*="color: #ccc"] { color: #1f2937 !important; }
body.light .tools-dr-bd [style*="color:#aaa"] { color: #374151 !important; }

/* ---- RS485 图表按钮 ---- */
body.light #btnIntervalChart[style*="background:#a371f7"],
body.light #btnTimelineChart[style*="background:#e85d75"],
body.light #btnRttChart[style*="background:#f0883e"],
body.light #btnEnergyChart[style*="background:#00d4aa"] { color: #fff !important; }

/* RS485 图表警告条 */
body.light #rs485ChartWarn,
body.light #rs485EnergyWarn { background: rgba(234,88,12,0.06) !important; border-left-color: #ea580c !important; color: #b45309 !important; }

/* 能量图"全局"按钮 */
body.light #rs485EnergyWrap button[style*="background:#1f3a5f"] { background: #e2e8f0 !important; color: #374151 !important; border: 1px solid #d1d5db !important; }

/* RS485 图表图例分隔线 */
body.light #rs485ChartLegend [style*="border-bottom:1px solid #1f3a5f"],
body.light #rs485TimelineLegend [style*="border-bottom:1px solid #1f3a5f"],
body.light #rs485RttLegend [style*="border-bottom:1px solid #1f3a5f"],
body.light #rs485EnergyLegend [style*="border-bottom:1px solid #1f3a5f"] { border-bottom-color: #d1d5db !important; }

/* ---- 应用配置区域的连接状态框 ---- */
body.light .tools-dr-bd [style*="border:1px solid #1f3a5f"] { border-color: #d1d5db !important; }
body.light .tools-dr-bd [style*="border: 1px solid #1f3a5f"] { border-color: #d1d5db !important; }

/* 剩余可用流量帮助提示 */
.avail-tip-wrap { position: relative; display: inline; }
.avail-tip-icon { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 50%; background: rgba(255,255,255,0.15); color: #8b949e; font-size: 11px; font-weight: 700; cursor: help; margin-left: 3px; vertical-align: middle; user-select: none; transition: background .15s, color .15s; }
.avail-tip-icon:hover { background: #00d4aa; color: #1a1a2e; }
.avail-tip-pop { display: none !important; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #1a2740; border: 1px solid rgba(0,212,170,0.3); border-radius: 8px; padding: 12px 16px; color: #e6edf3; font-size: 12px; line-height: 1.8; white-space: nowrap; z-index: 10; box-shadow: 0 8px 28px rgba(0,0,0,0.5); text-align: left; }
.detail-card .avail-tip-wrap { display: inline !important; position: relative; }
.detail-card .avail-tip-icon { display: inline-block !important; width: 16px; height: 16px; line-height: 16px; font-size: 11px; margin-bottom: 0; }
.detail-card .avail-tip-pop { display: none !important; font-size: 12px; margin-bottom: 0; white-space: nowrap; }
.avail-tip-pop b { color: #00d4aa; }
.avail-tip-pop .avail-tip-formula { color: #f0883e; font-weight: 700; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,0.08); }
.avail-tip-wrap:hover .avail-tip-pop { display: block !important; }
body.light .avail-tip-icon { background: rgba(0,0,0,0.08); color: #666; }
body.light .avail-tip-icon:hover { background: #00d4aa; color: #fff; }
body.light .avail-tip-pop { background: #fff; border-color: rgba(0,212,170,0.4); color: #333; box-shadow: 0 8px 28px rgba(0,0,0,0.12); }
body.light .avail-tip-pop b { color: #008f6b; }
body.light .avail-tip-pop .avail-tip-formula { border-top-color: rgba(0,0,0,0.06); }

/* ---- OTA 升级设备表格 ---- */
#otaDeviceTableWrap { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
.ota-table-wrap { box-shadow: 0 4px 18px rgba(0,0,0,0.28); }
.ota-device-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: center; }
.ota-device-table thead tr { background: #0f1a2e; color: #e6edf3; position: sticky; top: 0; z-index: 1; }
.ota-device-table th {
  padding: 10px 8px; font-weight: 600; font-size: 13px; letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(0,212,170,0.25); white-space: nowrap;
}
.ota-device-table td {
  padding: 11px 8px; border-bottom: 1px solid rgba(96,178,224,0.10); vertical-align: middle;
  transition: background .15s ease;
}
.ota-device-table tbody tr:hover td { background: rgba(0,212,170,0.06); }
.ota-device-table tbody tr:nth-child(even) { background: rgba(13,17,23,0.3); }
.ota-col-chk { width: 40px; text-align: center; }
.ota-col-idx { width: 48px; color: #8b949e; font-family: Consolas, monospace; font-size: 14px; }
.ota-col-model { width: 110px; font-weight: 600; color: #e6edf3; font-size: 14px; }
.ota-col-sn { min-width: 110px; font-family: Consolas, monospace; color: #c9d1d9; font-size: 13px; }
.ota-col-ver { width: 130px; font-family: Consolas, monospace; font-size: 13px; }
.ota-col-status { width: 100px; }
.sn-fuzzy-suggest { position: fixed; z-index: 9999; max-height: 260px; overflow: auto; background: #0f3460; border: 1px solid #00d4aa; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.4); min-width: 260px; width: max-content; }
.ota-sn-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-family: Consolas, monospace; font-size: 13px; color: #e6edf3; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ota-sn-item:last-child { border-bottom: 0; }
.ota-sn-item:hover { background: rgba(0,212,170,0.18); color: #00d4aa; }
.ota-sn-item.is-active { background: rgba(0,212,170,0.18); color: #00d4aa; outline: none; }
.ota-sn-txt { flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ota-sn-ver { flex: 0 0 auto; font-size: 12px; color: #58a6ff; font-family: Consolas, monospace; }
.ota-sn-status { flex: 0 0 auto; font-size: 11px; padding: 1px 8px; border-radius: 10px; font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif; }
.ota-status-online { background: rgba(63,185,80,0.18); color: #3fb950; }
.ota-status-offline { background: rgba(220,38,38,0.18); color: #dc2626; }
.ota-status-weak { background: rgba(245,158,11,0.18); color: #f59e0b; }
.ota-status-fault { background: rgba(220,38,38,0.20); color: #ff6b6b; }
.ota-status-unknown { background: rgba(139,148,158,0.18); color: #8b949e; }
.ota-col-rs485 { width: 72px; color: #8b949e; font-family: Consolas, monospace; font-size: 14px; }
.ota-cell input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.ota-status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px;
  font-weight: 700; text-transform: lowercase; letter-spacing: 0.4px; min-width: 52px;
}
.ota-status-online { background: rgba(63,185,80,0.15); color: #3fb950; border: 1px solid rgba(63,185,80,0.35); }
.ota-status-offline { background: rgba(220,38,38,0.12); color: #ff6b6b; border: 1px solid rgba(220,38,38,0.35); }
.ota-ver-current { color: #00d4aa; }
.ota-ver-need { color: #f59e0b; font-weight: 700; }
.ota-ver-empty { color: #888; }
.ota-upgrade-icon { color: #f59e0b; font-size: 12px; }
.ota-dev-row { transition: background .15s, border-left .15s; }
.ota-dev-row.ota-selected { background: rgba(0,212,170,0.12) !important; border-left: 2px solid #00d4aa; }
.ota-dev-row td:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.ota-dev-row td:last-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }

body.light .ota-device-table thead tr { background: #f3f4f6; color: #374151; }
body.light .ota-device-table th { border-bottom-color: #d1d5db; }
body.light .ota-device-table td { border-bottom-color: #e5e7eb; color: #111827; }
body.light .ota-device-table tbody tr:nth-child(even) { background: #f9fafb; }
body.light .ota-device-table tbody tr:hover td { background: #f0f9ff; }
body.light .ota-col-idx { color: #6b7280; }
body.light .ota-col-model { color: #111827; }
body.light .ota-col-sn { color: #374151; }
body.light .ota-col-rs485 { color: #6b7280; }
body.light .ota-status-online { background: rgba(5,150,105,0.10); color: #047857; border-color: rgba(5,150,105,0.35); }
body.light .ota-status-offline { background: rgba(220,38,38,0.08); color: #dc2626; border-color: rgba(220,38,38,0.25); }
body.light .ota-ver-current { color: #0a8d6d; }
body.light .ota-ver-need { color: #b45309; }
body.light .ota-table-wrap { background: #fff; border-color: #d1d5db; }

/* ---- OTA 升级历史记录表格 ---- */
.ota-history-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; }
.ota-history-table thead tr { background: #0f1a2e; color: #e6edf3; position: sticky; top: 0; z-index: 1; }
.ota-history-table th {
  padding: 7px 4px; font-weight: 600; font-size: 11px; letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(0,212,170,0.20); white-space: nowrap;
}
.ota-history-table td {
  padding: 7px 4px; border-bottom: 1px solid rgba(96,178,224,0.08); vertical-align: middle;
  color: #c9d1d9;
}
.ota-history-table tbody tr:hover td { background: rgba(0,212,170,0.04); }
.ota-history-table tbody tr:nth-child(even) { background: rgba(13,17,23,0.2); }
.ota-hist-th-time { width: 140px; }
.ota-hist-th-gsn { width: 100px; }
.ota-hist-th-dsn { width: 120px; }
.ota-hist-th-model { width: 100px; }
.ota-hist-th-oldver { width: 85px; }
.ota-hist-th-newver { width: 85px; }
.ota-hist-th-operator { width: 90px; }
.ota-hist-th-result { width: 40px; }
.ota-hist-th-reason { width: 200px; text-align: left; padding-left: 10px; }
.ota-hist-td-reason { color: #f59e0b; text-align: left; font-size: 11px; padding-left: 10px; word-break: break-all; }
body.light .ota-hist-td-reason { color: #b45309; }
.ota-hist-th-signal { width: 70px; }
.ota-hist-td-signal { font-family: Consolas, monospace; color: #58a6ff; }
.ota-hist-td-time { color: #8b949e; font-family: Consolas, monospace; font-size: 11px; }
.ota-hist-td-gsn { font-family: Consolas, monospace; }
.ota-hist-td-dsn { font-family: Consolas, monospace; font-size: 11px; }
.ota-hist-td-model { font-weight: 600; color: #e6edf3; font-size: 13px; }
.ota-hist-td-oldver { font-family: Consolas, monospace; color: #8b949e; }
.ota-hist-td-newver { font-family: Consolas, monospace; color: #00d4aa; }
.ota-hist-th-detail { width: 50px; }
.ota-hist-td-detail { padding: 4px; }
.ota-hist-detail-row td { padding: 0; border-bottom: 1px solid rgba(0,212,170,0.08); }
.ota-hist-detail-panel { padding: 10px 12px; background: rgba(13,17,23,0.45); border-top: 1px dashed rgba(0,212,170,0.22); text-align: left; }
.ota-hist-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 16px; }
.ota-hist-detail-item { display: flex; flex-direction: column; gap: 2px; }
.ota-hist-detail-full { grid-column: 1 / -1; }
.ota-hist-detail-label { font-size: 11px; color: #8b949e; }
.ota-hist-detail-value { font-size: 12px; color: #e6edf3; word-break: break-all; line-height: 1.5; }
.ota-hist-detail-value.mono { font-family: Consolas, monospace; background: rgba(0,0,0,0.2); padding: 4px 6px; border-radius: 4px; }

body.light .ota-hist-detail-row td { border-bottom-color: #e5e7eb; }
body.light .ota-hist-detail-panel { background: #f3f4f6; border-top-color: #d1d5db; }
body.light .ota-hist-detail-label { color: #6b7280; }
body.light .ota-hist-detail-value { color: #111827; }
body.light .ota-hist-detail-value.mono { background: #e5e7eb; }
.ota-hist-td-result { font-weight: 700; font-size: 12px; }
.ota-history-table td.ota-hist-success { color: #3fb950; }
.ota-history-table td.ota-hist-fail { color: #dc2626; }

#toolsDrawerBody .ota-upgrade-body,
#toolsDrawerBody .ota-upgrade-body .debug-select,
#toolsDrawerBody .ota-upgrade-body .tool-input,
#toolsDrawerBody .ota-upgrade-body .topo-btn { font-size: 15px !important; }
#toolsDrawerBody .ota-upgrade-body label,
#toolsDrawerBody .ota-upgrade-body summary { font-size: 15px !important; }
#toolsDrawerBody .ota-upgrade-body #otaSn,
#toolsDrawerBody .ota-upgrade-body #otaSignalStrength,
#toolsDrawerBody .ota-upgrade-body #otaQueryDeviceBtn,
#toolsDrawerBody .ota-upgrade-body #otaRefreshBtn { font-size: 18px !important; }
#toolsDrawerBody .ota-upgrade-body #otaTargetTypeSelect,
#toolsDrawerBody .ota-upgrade-body #otaDeviceSelect,
#toolsDrawerBody .ota-upgrade-body #otaFwSelect,
#toolsDrawerBody .ota-upgrade-body #otaCommand { font-size: 16px !important; }
#toolsDrawerBody .ota-upgrade-body #otaTargetVer,
#toolsDrawerBody .ota-upgrade-body #otaCmdPreview,
#toolsDrawerBody .ota-upgrade-body #otaStatusDetail { font-size: 15px !important; }
#toolsDrawerBody .ota-upgrade-body > div:first-child label { font-size: 14px !important; }
#toolsDrawerBody .ota-upgrade-body > div:nth-child(2) > div:first-child { font-size: 18px !important; }
#toolsDrawerBody .ota-upgrade-body #otaFwBindHint,
#toolsDrawerBody .ota-upgrade-body #otaPhaseLabel,
#toolsDrawerBody .ota-upgrade-body #otaElapsedTime,
#toolsDrawerBody .ota-upgrade-body #otaProgressTitle,
#toolsDrawerBody .ota-upgrade-body #otaProgressPercent,
#toolsDrawerBody .ota-upgrade-body #otaHistoryFilter input,
#toolsDrawerBody .ota-upgrade-body #otaHistoryFilter select,
#toolsDrawerBody .ota-upgrade-body #otaHistoryFilter label { font-size: 14px !important; }
#toolsDrawerBody .ota-upgrade-body #otaProgressText { font-size: 16px !important; }
#toolsDrawerBody .ota-upgrade-body #otaDeviceTableWrap > div:first-child span,
#toolsDrawerBody .ota-upgrade-body #otaHistoryWrap > div:first-child > span:not(.ota-workflow-step) { font-size: 16px !important; }
#toolsDrawerBody .ota-upgrade-body #otaDeviceTableWrap > div:first-child div > span { font-size: 14px !important; }
#toolsDrawerBody .ota-upgrade-body #otaAdvancedSection div,
#toolsDrawerBody .ota-upgrade-body #otaStatusDetail span { font-size: 13px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-device-table { font-size: 16px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-device-table th { font-size: 15px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-col-idx,
#toolsDrawerBody .ota-upgrade-body .ota-col-model,
#toolsDrawerBody .ota-upgrade-body .ota-col-rs485 { font-size: 16px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-col-sn,
#toolsDrawerBody .ota-upgrade-body .ota-col-ver,
#toolsDrawerBody .ota-upgrade-body .ota-status-pill { font-size: 14px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-sn-item { font-size: 15px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-sn-ver { font-size: 14px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-sn-status { font-size: 13px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-history-table { font-size: 14px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-history-table th { font-size: 13px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-hist-td-time,
#toolsDrawerBody .ota-upgrade-body .ota-hist-td-dsn { font-size: 13px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-hist-td-model,
#toolsDrawerBody .ota-upgrade-body .ota-hist-detail-value { font-size: 14px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-hist-detail-label { font-size: 13px !important; }
#toolsDrawerBody .ota-upgrade-body .ota-hist-td-result,
#toolsDrawerBody .ota-upgrade-body .ota-hist-td-detail button { font-size: 14px !important; }
#toolsDrawerBody .ota-upgrade-body #otaHistoryWrap .topo-btn,
#toolsDrawerBody .ota-upgrade-body button[onclick="otaClearProgress()"],
#toolsDrawerBody .ota-upgrade-body .ota-hist-td-detail button { font-size: 13px !important; }

body.light .ota-history-table thead tr { background: #f3f4f6; color: #374151; }
body.light .ota-history-table th { border-bottom-color: #d1d5db; }
body.light .ota-history-table td { border-bottom-color: #e5e7eb; color: #374151; }
body.light .ota-history-table tbody tr:nth-child(even) { background: #f9fafb; }
body.light .ota-history-table tbody tr:hover td { background: #f0f9ff; }
body.light .ota-hist-td-time { color: #6b7280; }
body.light .ota-hist-td-model { color: #111827; }
body.light .ota-hist-td-newver { color: #0a8d6d; }
body.light .ota-hist-td-oldver { color: #6b7280; }
body.light .ota-history-table td.ota-hist-success { color: #047857; }
body.light .ota-history-table td.ota-hist-fail { color: #dc2626; }

/* ---- OTA 固件管理 ---- */
.ota-fw-upload-zone {
  border: 2px dashed #1f3a5f; border-radius: 8px; padding: 18px;
  text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
  background: rgba(13,17,23,0.2);
}
.ota-fw-upload-zone:hover, .ota-fw-upload-zone.ota-fw-dragover {
  border-color: #00d4aa; background: rgba(0,212,170,0.06);
}
.ota-fw-upload-icon { color: #58a6ff; font-size: 28px; line-height: 1; margin-bottom: 6px; }
.ota-fw-upload-title { color: #e6edf3; font-size: 14px; font-weight: 600; }
.ota-fw-upload-sub { color: #8b949e; font-size: 11px; margin-top: 4px; }

.ota-fw-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; table-layout: fixed; }
.ota-fw-table thead tr { background: #0f1a2e; color: #e6edf3; position: sticky; top: 0; z-index: 1; }
.ota-fw-table th {
  padding: 8px 6px; font-weight: 600; font-size: 12px; letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(0,212,170,0.20); white-space: nowrap;
}
.ota-fw-table td {
  padding: 8px 6px; border-bottom: 1px solid rgba(96,178,224,0.08); vertical-align: middle;
  color: #c9d1d9;
}
.ota-fw-table tbody tr:hover td { background: rgba(0,212,170,0.04); }
.ota-fw-table tbody tr:nth-child(even) { background: rgba(13,17,23,0.2); }
.ota-fw-row.ota-fw-selected td { background: rgba(0,212,170,0.12) !important; border-left: 2px solid #00d4aa; }
.ota-fw-th-seq, .ota-fw-td-seq { width: 46px; color: #8b949e; text-align: center; }
.ota-fw-th-copy { width: 40px; }
.ota-fw-th-name { width: 80px; text-align: left; padding-left: 8px; }
.ota-fw-th-type { width: 90px; }
.ota-fw-th-ver { width: 110px; }
.ota-fw-th-account { width: 90px; }
.ota-fw-th-timeout { width: 50px; }
.ota-fw-th-retry { width: 45px; }
.ota-fw-th-size { width: 60px; }
.ota-fw-th-time { width: 140px; }
.ota-fw-th-del { width: 40px; }
.ota-fw-th-edit { width: 40px; }
.ota-fw-td-name { text-align: left; padding-left: 8px; font-family: Consolas, monospace; font-size: 13px; color: #e6edf3; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ota-fw-td-type { font-weight: 600; line-height: 1.3; }
.ota-fw-td-ver { font-family: Consolas, monospace; color: #00d4aa; font-weight: 600; font-size: 12px; }
.ota-fw-th-feature { width: 220px; text-align: left; }
.ota-fw-td-feature { max-width: 220px; text-align: left; line-height: 1.35; overflow: hidden; color: #c9d1d9; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ota-fw-feature-description { margin-top: 8px; padding: 7px 10px; border-left: 3px solid #58a6ff; background: rgba(88,166,255,.08); color: #c9d1d9; font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.ota-fw-td-account { color: #58a6ff; font-size: 12px; }
.ota-fw-td-timeout { color: #f59e0b; }
.ota-fw-td-retry { color: #8b949e; }
.ota-fw-td-size { color: #8b949e; font-size: 12px; }
.ota-fw-td-time { color: #8b949e; font-size: 12px; white-space: nowrap; }
.ota-fw-th-ver:hover, .ota-fw-th-time:hover { color: #00d4aa; }
.ota-fw-group td { border-bottom: 1px solid rgba(0,212,170,0.18); }
.ota-fw-list-scroll { max-height: calc(100vh - 320px); min-height: 240px; }
#otaFwGroupBtn.active { background: rgba(0,212,170,0.15); border-color: #00d4aa; color: #00d4aa; }

#toolsDrawerBody #otaFwUploadZone,
#toolsDrawerBody #otaFwUploadForm,
#toolsDrawerBody #otaFwListWrap,
#toolsDrawerBody #otaFwPager,
#toolsDrawerBody #otaFwFilterEmpty { font-size: 15px !important; }
#toolsDrawerBody .ota-fw-upload-icon { font-size: 30px !important; }
#toolsDrawerBody .ota-fw-upload-title { font-size: 16px !important; }
#toolsDrawerBody .ota-fw-upload-sub { font-size: 13px !important; }
#toolsDrawerBody #otaFwUploadForm label,
#toolsDrawerBody #otaFwListWrap label { font-size: 16px !important; }
#toolsDrawerBody #otaFwUploadForm input,
#toolsDrawerBody #otaFwUploadForm select,
#toolsDrawerBody #otaFwListWrap input,
#toolsDrawerBody #otaFwListWrap select { font-size: 17px !important; }
#toolsDrawerBody #otaFwUploadForm button,
#toolsDrawerBody #otaFwListWrap button,
#toolsDrawerBody #otaFwPager button { font-size: 15px !important; }
#toolsDrawerBody #otaFwListWrap > div:first-child > span { font-size: 14px !important; }
#toolsDrawerBody #otaFwHeaderPreview { font-size: 15px !important; }
#toolsDrawerBody #otaFwUploadStatus { font-size: 16px !important; }
#toolsDrawerBody #otaFwFilterEmpty { font-size: 14px !important; }
#toolsDrawerBody #otaFwPager span { font-size: 14px !important; }
#toolsDrawerBody #otaFwPager button { font-size: 13px !important; }
#toolsDrawerBody .ota-fw-table { font-size: 15px !important; }
#toolsDrawerBody .ota-fw-table th { font-size: 14px !important; }
#toolsDrawerBody .ota-fw-table button { font-size: 12px !important; }
#toolsDrawerBody .ota-fw-td-name { font-size: 15px !important; }
#toolsDrawerBody .ota-fw-td-ver,
#toolsDrawerBody .ota-fw-td-account,
#toolsDrawerBody .ota-fw-td-size,
#toolsDrawerBody .ota-fw-td-time { font-size: 14px !important; }
#toolsDrawerBody .ota-fw-td-feature,
#toolsDrawerBody .ota-fw-feature-description { font-size: 14px !important; }

body.light .ota-fw-upload-zone { border-color: #d1d5db; background: #f9fafb; }
body.light .ota-fw-upload-zone:hover, body.light .ota-fw-upload-zone.ota-fw-dragover { border-color: #0a8d6d; background: #f0fdf4; }
body.light .ota-fw-upload-title { color: #111827; }
body.light .ota-fw-upload-sub { color: #6b7280; }
body.light .ota-fw-table thead tr { background: #f3f4f6; color: #374151; }
body.light .ota-fw-table th { border-bottom-color: #d1d5db; }
body.light .ota-fw-table td { border-bottom-color: #e5e7eb; color: #374151; }
body.light .ota-fw-table tbody tr:nth-child(even) { background: #f9fafb; }
body.light .ota-fw-table tbody tr:hover td { background: #f0f9ff; }

/* OTA 固件型号管理弹窗 */
.ota-model-mask {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.ota-model-box {
  width: 92vw; max-width: 500px; max-height: 82vh; overflow-y: auto;
  background: #0d1422; border: 1px solid #1f3a5f; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); padding: 16px 18px;
}
.ota-model-title {
  font-size: 16px; font-weight: 700; color: #00d4aa; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.ota-model-close {
  background: transparent; border: 0; color: #e94560; font-size: 24px; line-height: 1;
  cursor: pointer; padding: 0 6px;
}
.ota-model-body { font-size: 13px; }
body.light .ota-fw-row.ota-fw-selected td { background: rgba(0,212,170,0.10) !important; }
body.light .ota-fw-td-name { color: #111827; }
body.light .ota-fw-td-ver { color: #0a8d6d; }
body.light .ota-fw-td-timeout { color: #b45309; }
body.light .ota-fw-td-retry, body.light .ota-fw-td-size, body.light .ota-fw-td-time { color: #6b7280; }

/* 响应式 */
@media (max-width: 768px) {
  #toolsPage.new-tools { padding: 12px 10px 20px; }
  #toolsPage.new-tools.active { grid-template-columns: minmax(0, 1fr); gap: 15px; overflow-x: visible; }
  #toolsPage.new-tools > .tools-sec { width: 100%; max-width: 100%; }
  .tools-g { grid-template-columns: 1fr; }
  #toolsPage.new-tools > .tools-sec > .tools-g { grid-template-columns: minmax(0, 1fr); }
  #toolUserMgrCard .tool-card-width-resizer, #toolConnectionSection .tool-section-width-resizer, .fault-card-width-resizer, .tools-dr-resize { display: none; }
  .tools-g.fault-analysis-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .tools-dr { width: 100%; max-width: 100%; right: -100%; border-radius: 0; }
  .tools-dr.wide15, .tools-dr.wide, .tools-dr.wide25, .tools-dr.wide3, .tools-dr.otawide, .tools-dr.firmwarewide, .tools-dr.labelwide, .tools-dr.faultwide, .tools-dr.storagewide { width: 100%; max-width: 100%; right: -100%; }
  .tools-dr.wide15.on, .tools-dr.wide.on, .tools-dr.wide25.on, .tools-dr.wide3.on, .tools-dr.otawide.on, .tools-dr.firmwarewide.on, .tools-dr.labelwide.on, .tools-dr.faultwide.on, .tools-dr.storagewide.on { right: 0; }
  .tools-dr-hd { padding: 14px 18px; }
  .tools-dr-bd { padding: 14px 18px; }
  .sn-iccid-section { padding: 14px; }
  .sn-iccid-section-head { grid-template-columns: 1fr; }
  .sn-iccid-status { min-width: 0; }
  .sn-iccid-action-row { grid-template-columns: 1fr; }
  .sn-iccid-control { align-items: stretch; flex-direction: column; }
  .sn-iccid-input, .sn-iccid-btn { width: 100%; }
  .tools-pg-hdr { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 0 10px; }
  .fault-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fault-check-item, .fault-attr-item { grid-template-columns: 1fr; }
  .fault-help-pop { min-width: min(320px, 78vw); max-width: 78vw; }
  .fault-filter-row .tool-input, .fault-filter-row input.tool-input { width: 100%; min-width: 0; }
  .fault-count { margin-left: 0; }
}

@media (max-width: 1180px) {
  .fault-collect-modules { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .fault-collect-module-head { grid-template-columns: 38px minmax(0, 1fr); }
  .fault-collect-module-head > span { grid-column: 1 / -1; width: fit-content; }
  .fault-collect-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-summary { display: block; overflow: visible; }
  .product-summary .overview-head,
  .product-summary .product-main-grid,
  .product-summary .overview-map-block { grid-column: auto; grid-row: auto; }
  .product-main-grid { grid-template-columns: 1fr; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 0; }
  .overview-map-card { height: 300px; min-height: 280px; }
}

/* Keep the favorites column visually continuous across station rows. */
.generation-station-table-wrap tbody td:nth-child(1) { border-bottom-color: transparent; }

/* The drawer width can be resized and is also persisted per tool. Fixed
   negative offsets (especially faultwide) can therefore leave a visible strip
   when closing. Keep every closed drawer fully outside the viewport. */
.tools-dr:not(.on) { right: calc(-100% - 8px); }
.amap-usage-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;color:#c9d1d9;font-size:13px}.amap-usage-toolbar select,.amap-usage-toolbar button{margin-left:8px;padding:6px 10px;border:1px solid #1f3a5f;border-radius:5px;background:#0d1117;color:#e6edf3}.amap-usage-toolbar button{cursor:pointer;color:#58a6ff}.amap-usage-summary{display:flex;align-items:baseline;gap:12px;padding:12px 14px;margin-bottom:12px;background:#0f1a2e;border:1px solid #1f3a5f;border-radius:7px}.amap-usage-summary b{font-size:24px;color:#58a6ff}.amap-usage-summary span{font-size:12px;color:#8b949e}.amap-usage-chart{min-height:250px;background:#0b1220;border:1px solid #1f3a5f;border-radius:7px;padding:8px;overflow:hidden}.amap-usage-chart svg{display:block;width:100%;height:250px}.amap-usage-empty{display:flex;align-items:center;justify-content:center;height:250px;color:#8b949e}.amap-usage-legend{display:flex;gap:18px;flex-wrap:wrap;padding-top:10px;color:#c9d1d9;font-size:12px}.amap-usage-legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}
.amap-usage-body{color:#c9d1d9}.amap-usage-eyebrow{display:block;font-size:11px;letter-spacing:.08em;color:#58a6ff;text-transform:uppercase;margin-bottom:4px}.amap-usage-toolbar strong{font-size:18px;color:#f0f6fc}.amap-usage-summary{min-height:54px}.amap-usage-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}.amap-usage-kpis article{background:#101d34;border:1px solid #203b62;border-radius:7px;padding:12px 14px}.amap-usage-kpis span,.amap-usage-kpis small{display:block;color:#8b949e;font-size:12px}.amap-usage-kpis strong{display:block;font-size:24px;color:#f0f6fc;margin:6px 0 2px}.amap-usage-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,.9fr);gap:14px}.amap-usage-panel{background:#0d172b;border:1px solid #203b62;border-radius:8px;min-width:0}.amap-usage-panel header{display:flex;justify-content:space-between;align-items:flex-start;padding:14px 16px 0}.amap-usage-panel header span{font-size:11px;color:#8b949e}.amap-usage-panel h4{margin:4px 0 0;font-size:16px;color:#f0f6fc}.amap-usage-panel-wide .amap-usage-chart{border:0;background:transparent}.amap-usage-chart{height:300px;min-height:300px;padding:8px 12px}.amap-usage-chart svg{height:100%;width:100%;overflow:visible}.amap-grid line{stroke:#263a58;stroke-width:1}.amap-grid text,.amap-x-label{fill:#73849e;font-size:11px}.amap-line{fill:none;stroke-width:1.5;opacity:.7}.amap-total-line{fill:none;stroke:#f0f6fc;stroke-width:2.5}.amap-forecast{stroke:#f0883e;stroke-dasharray:4 4;opacity:.8}.amap-forecast-dot{fill:#f0883e}.amap-forecast-label{fill:#f0883e;font-size:11px}.amap-usage-legend{padding:0;gap:10px}.amap-usage-legend span{white-space:nowrap}.amap-usage-legend i{background:#f0f6fc}.amap-usage-legend i.total{background:#f0f6fc}.amap-usage-services{padding:10px 16px 16px}.amap-service-row{padding:12px 0;border-bottom:1px solid #1b2b45}.amap-service-row:last-child{border-bottom:0}.amap-service-row>div:first-child{display:flex;align-items:center;gap:7px}.amap-service-row strong{font-size:13px;flex:1}.amap-service-row b{font-size:16px;color:#f0f6fc}.amap-service-dot{width:8px;height:8px;border-radius:50%}.amap-service-track{height:5px;background:#1a2b45;border-radius:3px;margin:9px 0 6px;overflow:hidden}.amap-service-track i{display:block;height:100%;border-radius:3px}.amap-service-row small{color:#8b949e;font-size:11px}.amap-usage-insight{display:flex;align-items:center;gap:12px;margin-top:14px;padding:11px 14px;background:#101d34;border-left:3px solid #f0883e;border-radius:5px;font-size:12px}.amap-usage-insight span{color:#8b949e}.amap-usage-insight strong{color:#f0f6fc}.amap-usage-insight em{color:#8b949e;font-style:normal}.amap-usage-empty.small{height:100px}@media(max-width:900px){.amap-usage-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.amap-usage-grid{grid-template-columns:1fr}.amap-usage-toolbar{gap:12px;flex-wrap:wrap}}
.amap-console-config{margin-bottom:14px;padding:14px 16px;background:#0b1629;border:1px solid #27456d;border-radius:8px}.amap-console-config-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.amap-console-config-head strong{display:block;color:#f0f6fc;font-size:14px}.amap-console-config-head span{display:block;color:#8b949e;font-size:11px;margin-top:4px}.amap-console-config-form{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-top:12px}.amap-console-config-form label{display:flex;flex-direction:column;gap:5px;color:#8b949e;font-size:12px;min-width:210px}.amap-console-config-form input{height:32px;padding:0 9px;border:1px solid #29496f;border-radius:5px;background:#101d34;color:#f0f6fc;outline:none}.amap-console-config-form button{height:32px;padding:0 13px;border:1px solid #2d6db5;border-radius:5px;background:#123b68;color:#dbeafe;cursor:pointer}.amap-console-config-form button:last-child{background:#0e7490;border-color:#22d3ee}.amap-console-config-note{margin-top:9px;color:#71829b;font-size:11px}.amap-console-official-rows{margin-top:11px;border-top:1px solid #1b3354;padding-top:8px}.amap-console-official-title{color:#58a6ff;font-size:12px;margin-bottom:5px}.amap-console-official-rows>div:not(.amap-console-official-title){display:flex;gap:12px;align-items:center;padding:5px 0;color:#a9b7ca;font-size:12px}.amap-console-official-rows b{color:#f0f6fc;margin-left:auto}.amap-console-official-rows em{font-style:normal;color:#71829b;min-width:220px;text-align:right}.amap-console-official-empty{color:#71829b;font-size:12px}
.amap-console-action-result{margin-top:10px;padding:8px 10px;border-radius:5px;background:#13233b;color:#8b9bb2;font-size:12px}.amap-console-action-result.loading{color:#f0b45b;border-left:3px solid #f0883e}.amap-console-action-result.success{color:#75d99a;border-left:3px solid #3fb950}.amap-console-action-result.error{color:#ff9b9b;border-left:3px solid #f85149}.amap-console-action-result.info{color:#8fc7ff;border-left:3px solid #58a6ff}.amap-console-config-form button:disabled{opacity:.55;cursor:wait}
