/* ==================================================================
   GG 控制台 · 壳层与业务页样式（v2 布局层）
   在 style.css 之后加载，覆盖旧样式
   ================================================================== */

:root {
  --bg:        #0d1117;
  --bg2:       #0a0d12;
  --panel:     #161b22;
  --panel2:    #12161d;
  --line:      #21262d;
  --line2:     #2d333b;
  --text:      #e6edf3;
  --text2:     #c9d1d9;
  --dim:       #8b949e;
  --dim2:      #6e7681;
  --red:       #3b82f6;
  --red-d:     #1d4ed8;
  --red-bg:    #1e3a8a;
  --green:     #22c55e;
  --blue:      #3b82f6;
  --purple:    #a855f7;
  --amber:     #f59e0b;
  --cyan:      #06b6d4;
  --pink:      #ec4899;
  --r:         10px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
.grow { flex: 1; min-width: 0; }
svg.ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9;
         stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* ---------------------------------------------------------------- 壳层 */
.shell { display: flex; height: 100vh; overflow: hidden; background: var(--bg); }
.xy-body { display: flex; flex: 1; min-width: 0; }
.xy-main { display: flex; flex: 1; min-width: 0; flex-direction: column; }

/* 侧栏 */
.xy-side {
  width: 180px; flex: 0 0 180px; background: #0a0d12;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.xy-side::after { display: none; }
.brand {
  height: 62px; flex: 0 0 62px; display: flex; align-items: center; gap: 9px;
  padding: 0 13px; border-bottom: 1px solid var(--line);
}
.brand-ico {
  width: 27px; height: 27px; flex: 0 0 27px; color: #3b82f6;
  display: grid; place-items: center;
}
.brand-ico svg { width: 26px; height: 26px; }
.brand-t { font-size: 13.5px; font-weight: 700; color: #3b82f6; letter-spacing: .2px; white-space: nowrap; }

.xy-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 8px 14px; display: flex; flex-direction: column; gap: 3px; }
.xy-group {
  padding: 13px 7px 4px; font-size: 11px; font-weight: 600; color: var(--dim2);
  letter-spacing: .3px;
}
.xy-item {
  position: relative; display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 10px; border-radius: 8px;
  font-size: 13px; color: var(--text2); text-align: left;
  background: #161b22; border: 1px solid #1f242c;
  transition: background .13s, border-color .13s, color .13s;
}
.xy-item:hover { background: #1c222b; border-color: #2a313a; color: #fff; }
.xy-item .ic { color: #8b949e; }
.xy-item.on {
  background: var(--red-bg); border-color: #1e40af; color: #60a5fa;
}
.xy-item.on .ic { color: #60a5fa; }
.xy-item.on::before { display: none; }
.xy-item .arw { width: 13px; height: 13px; margin-left: auto; color: #6e7681;
                fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.xy-item.open .arw { transform: rotate(180deg); }

.subnav { display: none; flex-direction: column; gap: 2px; margin: 2px 0 2px 13px;
          padding-left: 9px; border-left: 1px solid var(--line2); }
.subnav.open { display: flex; }
.sub-item {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; color: var(--dim); text-align: left;
}
.sub-item:hover { background: #161b22; color: var(--text); }
.sub-item:disabled { opacity: .5; cursor: default; }
.sub-item .ic { width: 12px; height: 12px; }

.sb-status {
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 11px 14px; font-size: 11.5px; color: var(--dim);
  border-top: 1px solid var(--line);
}
.sb-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green);
               box-shadow: 0 0 7px rgba(34,197,94,.85); }
.sb-status span { margin-left: auto; color: #4d5561; font-size: 11px; }
.xy-side-foot { display: none; }

/* 顶栏 */
.xytop {
  height: 54px; flex: 0 0 54px; display: flex; align-items: center; gap: 9px;
  padding: 0 14px; background: #0a0d12; border-bottom: 1px solid var(--line);
}
.top-toggle { width: 26px; height: 26px; display: grid; place-items: center; color: var(--dim); border-radius: 6px; }
.top-toggle:hover { background: #161b22; color: var(--text); }
.xyt-title { font-size: 13.5px; font-weight: 500; color: var(--text2); }

.top-money {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px;
  background: #161b22; border: 1px solid var(--line2); border-radius: 7px;
}
.top-money input {
  width: 74px; background: none; border: 0; outline: none; color: var(--text);
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.top-money input::placeholder { color: #5a6270; }
.top-money em { font-style: normal; font-size: 10.5px; color: var(--dim2); }

.top-sel {
  height: 30px; padding: 0 8px; border-radius: 7px; font-size: 11.5px;
  background: #161b22; border: 1px solid var(--line2); color: var(--text2);
  outline: none; cursor: pointer;
}
.top-eq { font-size: 12px; color: #5a6270; }
.top-clock { display: flex; align-items: center; gap: 5px; padding: 0 4px; white-space: nowrap; }
.top-clock em { font-style: normal; font-size: 10.5px; color: var(--dim2); }
.top-clock b { font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.top-clock i { font-style: normal; color: #3d444d; padding: 0 3px; }
.top-ico { width: 28px; height: 28px; display: grid; place-items: center; color: var(--dim); border-radius: 6px; }
.top-ico:hover { background: #161b22; color: var(--text); }
.top-bell { position: relative; width: 28px; height: 28px; display: grid; place-items: center; color: #3b82f6; border-radius: 6px; }
.top-bell:hover { background: #1f1518; }
.top-bell .ic { width: 16px; height: 16px; }
.top-bell i {
  position: absolute; top: 4px; right: 3px; width: 6px; height: 6px; border-radius: 50%;
  background: #3b82f6; box-shadow: 0 0 0 2px #0a0d12;
}

.subtop {
  height: 32px; flex: 0 0 32px; display: flex; align-items: center; gap: 8px;
  padding: 0 16px; background: #0a0d12; border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--dim);
}
.subtop i { font-style: normal; color: #3d444d; }
.subtop .st-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px rgba(34,197,94,.8); }
.subtop .ghost, .subtop .mini {
  height: 22px; padding: 0 9px; font-size: 11.5px; border-radius: 6px;
  background: #161b22; border: 1px solid var(--line2); color: var(--text2);
  display: inline-flex; align-items: center; gap: 5px;
}
.subtop .ghost .ic { width: 12px; height: 12px; }
.subtop .pill { height: 20px; padding: 0 9px; font-size: 11px; }

.main { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.view { display: none; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
.view.on { display: flex; }

/* 页面容器 */
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px;
        padding: 14px 16px 16px; overflow-y: auto; }
.page.tight { padding-bottom: 8px; }

/* 通用卡片 */
.card {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.card-h {
  display: flex; align-items: center; gap: 8px; flex: 0 0 44px;
  padding: 0 14px; border-bottom: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.card-h .hicon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9;
                 stroke-linecap: round; stroke-linejoin: round; color: var(--dim); }
.hicon.amber { color: var(--amber); }
.hicon.blue { color: var(--blue); }
.hicon.green { color: var(--green); }
.hicon.red { color: var(--red); }
.hicon.purple { color: var(--purple); }
.hicon.cyan { color: var(--cyan); }
.card-sub { font-size: 11.5px; color: var(--dim); font-weight: 400; }
.card-badge {
  font-size: 11px; padding: 1px 7px; border-radius: 5px; font-weight: 500;
  background: #21262d; color: var(--dim); border: 1px solid #2d333b;
}
.card-body { flex: 1; min-height: 0; overflow: auto; }
.card-desc { padding: 0 14px 10px; font-size: 11.5px; line-height: 1.75; color: var(--dim2); }

/* ---------------------------------------------------------------- 指标卡 */
.mcards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; flex: 0 0 auto; }
.mcard {
  position: relative; overflow: hidden; padding: 13px 14px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  min-height: 96px;
}
.mcard::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c, var(--red));
}
.mcard-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mcard-name { font-size: 12px; color: var(--text2); }
.mcard-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, var(--red)) 14%, transparent);
  color: var(--c, var(--red)); border: 1px solid color-mix(in srgb, var(--c, var(--red)) 26%, transparent);
}
.mcard-ico .ic { width: 15px; height: 15px; }
.mcard-v {
  display: flex; align-items: baseline; gap: 3px; margin-top: 7px;
  font-size: 25px; font-weight: 700; color: var(--text); letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}
.mcard-v em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--dim); }
.mcard-s { margin-top: 4px; font-size: 11px; color: var(--dim2); }
.mcard-bar { height: 3px; border-radius: 3px; background: #21262d; margin-top: 7px; overflow: hidden; }
.mcard-bar i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--red)); }

/* 控制台两栏 */
.dash-two { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.9fr 1fr; gap: 12px; }
.dash-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }

.notice-item {
  display: flex; gap: 11px; padding: 13px 14px; border-radius: 9px;
  background: #1a1f27; border: 1px solid #262c35;
}
.notice-item .nico {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(59, 130, 246, .12); color: #60a5fa;
}
.notice-item .nico .ic { width: 14px; height: 14px; }
.notice-item b { font-size: 12.5px; font-weight: 600; color: var(--text); }
.notice-item p { margin-top: 3px; font-size: 11.5px; color: var(--dim); line-height: 1.65; }
.notice-item time { margin-left: auto; font-size: 10.5px; color: #4d5561; white-space: nowrap; }

.dist-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.dist-name { width: 58px; flex: 0 0 58px; font-size: 12px; color: var(--text2); }
.dist-bar { flex: 1; height: 5px; border-radius: 4px; background: #21262d; overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 4px; background: #3b82f6; }
.dist-num { width: 22px; text-align: right; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }

.empty-hint {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 30px 0; color: #4d5561; font-size: 12px;
}
.empty-hint .ic { width: 26px; height: 26px; opacity: .45; }

/* ---------------------------------------------------------------- 设备页 */
.dvpage { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; }

.dv-stats { display: flex; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.dvs {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 7px; font-size: 12px; color: var(--text2);
  background: var(--panel); border: 1px solid var(--line);
}
.dvs b { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.dvs .ic { width: 13px; height: 13px; color: var(--c, var(--dim)); }
.dvs .dotc { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--dim)); }

.dv-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 0 auto;
  padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
}
.dv-batchbar { padding: 7px 10px; }
.bar-ico { width: 28px; height: 28px; display: grid; place-items: center; color: var(--dim); border-radius: 6px; }
.bar-ico:hover { background: #21262d; color: var(--text); }
.bar-search {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 9px; width: 300px;
  background: #0d1117; border: 1px solid var(--line2); border-radius: 7px; color: var(--dim2);
}
.bar-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none;
                    color: var(--text); font-size: 12px; }
.bar-search input::placeholder { color: #5a6270; }
.bar-search:focus-within { border-color: #3b82f6; }
.bar-sel {
  height: 30px; padding: 0 8px; border-radius: 7px; font-size: 11.5px;
  background: #0d1117; border: 1px solid var(--line2); color: var(--text2); outline: none; cursor: pointer;
}
.btn-line {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px;
  border-radius: 6px; font-size: 11.5px; color: var(--text2);
  background: #1c222b; border: 1px solid var(--line2);
}
.btn-line:hover { background: #242b35; color: #fff; border-color: #3d444d; }
.btn-line .ic { width: 12px; height: 12px; }
.btn-purple {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 6px;
  font-size: 11.5px; color: #fff; background: #7c3aed; border: 1px solid #8b5cf6;
}
.btn-purple:hover { background: #6d28d9; }
.btn-red {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 6px;
  font-size: 11.5px; color: #60a5fa; background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .5);
}
.btn-red:hover { background: rgba(59, 130, 246, .24); color: #93c5fd; }
.btn-blue {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 6px;
  font-size: 11.5px; color: #93c5fd; background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.45);
}
.btn-blue:hover { background: rgba(59,130,246,.22); color: #bfdbfe; }
.dv-check { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); }
.dv-check input { accent-color: #3b82f6; width: 13px; height: 13px; }

.dv-grid {
  flex: 1; min-height: 0; overflow-y: auto; align-content: start;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px;
  padding-right: 2px;
}
.dv-empty { grid-column: 1 / -1; padding: 90px 0; text-align: center; color: #4d5561; font-size: 13px; line-height: 2; }
.dv-empty span { font-size: 11.5px; color: #3d444d; }

.dcard {
  padding: 11px 13px 9px; border-radius: 10px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .14s, transform .14s;
}
.dcard:hover { border-color: #3d444d; transform: translateY(-1px); }
.dcard.off { opacity: .72; }
.dcard.sel { border-color: #3b82f6; box-shadow: 0 0 0 1px rgba(59, 130, 246, .35); }
.dc-head { display: flex; align-items: center; gap: 7px; }
.dc-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: #f59e0b; }
.dc-dot.on { background: var(--green); box-shadow: 0 0 7px rgba(34,197,94,.8); }
.dc-dot.off { background: #4d5561; }
.dc-title {
  min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px;
}
.dc-chip {
  font-size: 10.5px; padding: 1px 6px; border-radius: 4px; white-space: nowrap;
  background: #21262d; color: var(--dim); border: 1px solid #2d333b;
}
.dc-chip.on { color: #4ade80; border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.1); }
.dc-acts { margin-left: auto; display: flex; gap: 1px; }
.dca { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; color: #6e7681; }
.dca:hover { background: #262c35; color: #60a5fa; }
.dca .ic { width: 12px; height: 12px; }
.dc-id { margin: 6px 0 5px; font-family: Consolas, "SF Mono", monospace; font-size: 11px; color: var(--dim); }
.dc-badges { display: flex; gap: 5px; margin-bottom: 7px; }
.dc-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: #1c222b; border: 1px solid #2a313a; color: var(--dim);
}
.dc-badge.net { color: #93c5fd; border-color: rgba(59,130,246,.3); background: rgba(59,130,246,.08); }
.dc-badge.lock { color: #fbbf24; border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.08); }
.dc-badge.unlock { color: #4ade80; border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.08); }
.dc-kv div {
  display: flex; align-items: baseline; gap: 8px; padding: 2.5px 0; font-size: 11.5px;
}
.dc-kv em { font-style: normal; color: #6e7681; flex: 0 0 62px; }
.dc-kv b {
  font-weight: 500; color: var(--text2); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dc-kv b.red { color: #60a5fa; }
.dc-kv b.mut { color: #4d5561; }
.dc-kv b.mono { font-family: Consolas, monospace; font-size: 11px; color: var(--dim); }
.dc-kv b.green { color: #4ade80; }

.pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  flex: 0 0 auto; padding: 2px 2px 0; font-size: 11.5px; color: var(--dim);
}
.pg-sel {
  height: 26px; padding: 0 5px; border-radius: 5px; font-size: 11.5px;
  background: #0d1117; border: 1px solid var(--line2); color: var(--text2); outline: none;
}
.pg-btn {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 5px;
  background: #1c222b; border: 1px solid var(--line2); color: var(--dim);
}
.pg-btn:disabled { opacity: .35; }
.pg-btn:hover:not(:disabled) { color: #fff; border-color: #3d444d; }
.pg-btn .ic { width: 12px; height: 12px; }
.pg-btn.prev .ic { transform: rotate(180deg); }
.pg-num {
  min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0 7px;
  border-radius: 5px; background: #3b82f6; color: #fff; font-weight: 600; font-size: 11.5px;
}

/* ---------------------------------------------------------------- 页面级标题 */
.pagehead { display: flex; align-items: flex-start; gap: 12px; flex: 0 0 auto; padding: 2px 2px 0; }
.pagehead h1 {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.2px;
}
.pagehead h1 .ic { width: 18px; height: 18px; color: var(--red); }
.pagehead p { margin-top: 5px; font-size: 11.5px; color: var(--dim2); line-height: 1.7; }
.pagehead .ph-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- 表格 */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  height: 38px; padding: 0 14px; text-align: left; white-space: nowrap;
  font-size: 11.5px; font-weight: 500; color: var(--dim);
  background: transparent; border-bottom: 1px solid var(--line);
}
.tbl td {
  height: 44px; padding: 0 14px; font-size: 12.5px; color: var(--text2);
  border-bottom: 1px solid #1b2028; white-space: nowrap;
}
.tbl tbody tr:hover td { background: #1a1f27; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.mono, .tbl .mono { font-family: Consolas, "SF Mono", monospace; font-size: 11.5px; }
.tbl td.blue { color: #58a6ff; }
.tbl td.empty-cell { text-align: center; color: #4d5561; font-size: 12px; height: 120px; }
.tbl .rowacts { display: flex; align-items: center; gap: 6px; }
.tbl .rowacts button { white-space: nowrap; }

.tagmini {
  display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10.5px;
  background: #21262d; color: var(--dim); border: 1px solid #2d333b;
}
.tagmini.ok { color: #4ade80; background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); }
.tagmini.warn { color: #fbbf24; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }
.tagmini.bad { color: #60a5fa; background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .3); }
.tagmini.blue { color: #93c5fd; background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); }

/* 开关 */
.sw {
  position: relative; width: 38px; height: 21px; border-radius: 12px; flex: 0 0 38px;
  background: #30363d; border: 0; transition: background .15s; cursor: pointer;
}
.sw i {
  position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; transition: transform .15s;
}
.sw.on { background: #3b82f6; }
.sw.on i { transform: translateX(17px); }
.sw.sm { width: 32px; height: 18px; flex: 0 0 32px; }
.sw.sm i { width: 14px; height: 14px; }
.sw.sm.on i { transform: translateX(14px); }

/* 图标操作按钮 */
.iact { width: 24px; height: 24px; border-radius: 5px; display: inline-grid; place-items: center; color: #6e7681; }
.iact:hover { background: #262c35; color: var(--text); }
.iact.danger:hover { color: #60a5fa; }
.iact .ic { width: 13px; height: 13px; }

/* 迷你搜索 */
.msearch {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px;
  background: #0d1117; border: 1px solid var(--line2); border-radius: 7px;
  color: var(--dim2); min-width: 180px;
}
.msearch input { flex: 1; min-width: 0; background: none; border: 0; outline: none;
                 color: var(--text); font-size: 11.5px; }
.msearch input::placeholder { color: #5a6270; }
.msearch:focus-within { border-color: #3b82f6; }

/* ---------------------------------------------------------------- 三列区块（应用设置） */
.cols3 { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cols2 { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.block {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.block-h { display: flex; align-items: center; gap: 7px; padding: 12px 12px 0; flex: 0 0 auto; }
.block-h .bico { width: 15px; height: 15px; flex: 0 0 15px; }
.block-h b { font-size: 12.5px; font-weight: 600; color: var(--text); }
.block-acts { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.block-acts button {
  display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px;
  border-radius: 5px; font-size: 10.5px; color: var(--text2);
  background: #1c222b; border: 1px solid var(--line2);
}
.block-acts button:hover { background: #242b35; color: #fff; }
.block-acts button.danger { color: #60a5fa; background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .45); }
.block-acts .ic { width: 11px; height: 11px; }
.block-desc { padding: 7px 12px 9px; font-size: 10.5px; line-height: 1.7; color: var(--dim2); flex: 0 0 auto; }
.block-body { flex: 1; min-height: 0; overflow: auto; }
.block .tbl th { height: 32px; padding: 0 8px; font-size: 10.5px; }
.block .tbl td { height: 38px; padding: 0 8px; font-size: 11.5px; }
.block .pager { padding: 8px 10px; font-size: 10.5px; gap: 6px; }
.block .pager .pg-sel { height: 22px; font-size: 10.5px; }
.block .pager .pg-btn, .block .pager .pg-num { height: 22px; min-width: 22px; width: 22px; font-size: 10.5px; }

/* ---------------------------------------------------------------- AI 制作模板 */
.ai-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.16fr 1fr; gap: 12px; }
.ai-left { display: flex; flex-direction: column; min-height: 0;
           background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ai-hero { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column;
           align-items: center; justify-content: center; gap: 4px; padding: 22px 30px; }
.ai-hero > .star { width: 40px; height: 40px; color: #4d5561; margin-bottom: 10px; }
.ai-hero h3 { font-size: 15px; font-weight: 600; color: var(--text2); }
.ai-hero p { font-size: 11.5px; color: var(--dim2); margin-bottom: 18px; }
.ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 520px; }
.ai-type {
  display: flex; flex-direction: column; gap: 8px; padding: 13px 14px; text-align: left;
  background: #1a1f27; border: 1px solid #262c35; border-radius: 9px; transition: .14s;
}
.ai-type:hover { border-color: #3d444d; background: #1f252e; transform: translateY(-1px); }
.ai-type .tico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
                 background: rgba(59, 130, 246, .12); color: #60a5fa; }
.ai-type .tico .ic { width: 13px; height: 13px; }
.ai-type b { font-size: 12.5px; font-weight: 600; color: var(--text); }
.ai-type em { font-style: normal; font-size: 10.5px; color: var(--dim2); }
.ai-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); flex: 0 0 auto; }
.ai-input .attach { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px;
                    background: #1c222b; border: 1px solid var(--line2); color: var(--dim); }
.ai-input input {
  flex: 1; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 12px;
  background: #0d1117; border: 1px solid var(--line2); color: var(--text); outline: none;
}
.ai-input input:focus { border-color: #3b82f6; }
.ai-send { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
           background: #3b82f6; color: #fff; flex: 0 0 34px; }
.ai-right { display: flex; flex-direction: column; min-height: 0;
            background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ai-preview-body { flex: 1; min-height: 0; display: grid; place-items: center; gap: 8px; color: #4d5561; }
.ai-preview-body .ic { width: 34px; height: 34px; opacity: .45; }
.ai-preview-body span { font-size: 11.5px; }

/* ---------------------------------------------------------------- 用户设置 6 卡 */
.usr-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; }
.usr-card { display: flex; flex-direction: column;
            background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.usr-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.usr-row { display: flex; flex-direction: column; gap: 5px; }
.usr-row label { font-size: 11px; color: var(--dim); }
.usr-row input, .usr-row select, .usr-row textarea {
  height: 32px; padding: 0 10px; border-radius: 7px; font-size: 12px;
  background: #0d1117; border: 1px solid var(--line2); color: var(--text); outline: none;
  width: 100%; font-family: inherit;
}
.usr-row textarea { height: auto; padding: 8px 10px; resize: vertical; }
.usr-row input:focus, .usr-row select:focus, .usr-row textarea:focus { border-color: #3b82f6; }
.usr-inline { display: flex; align-items: center; gap: 8px; }
.usr-inline input { flex: 1; }
.usr-box {
  padding: 11px 12px; border-radius: 8px; background: #1a1f27; border: 1px solid #262c35;
  display: flex; align-items: center; gap: 9px;
}
.usr-box .ubi { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; display: grid; place-items: center;
                background: rgba(34,197,94,.12); color: #4ade80; }
.usr-box .ubi .ic { width: 13px; height: 13px; }
.usr-box b { font-size: 12px; color: var(--text); }
.usr-box em { font-style: normal; margin-left: auto; font-size: 10.5px; color: var(--dim2); }
.usr-warn {
  padding: 10px 12px; border-radius: 8px; font-size: 10.5px; line-height: 1.7;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.32); color: #fbbf24;
}
.usr-warn b { display: block; font-size: 11.5px; margin-bottom: 2px; }
.usr-item {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 8px;
  background: #1a1f27; border: 1px solid #262c35;
}
.usr-item b { font-size: 11.5px; color: var(--text2); }
.usr-item em { font-style: normal; font-size: 10.5px; color: var(--dim2); display: block; margin-top: 2px; }
.usr-item .iact { margin-left: auto; }
.usr-empty { padding: 46px 0; text-align: center; color: #4d5561; font-size: 12px; }
.usr-vol { display: flex; align-items: center; gap: 9px; }
.usr-vol input[type=range] { flex: 1; accent-color: #22c55e; height: 3px; }
.usr-vol em { font-style: normal; font-size: 11px; color: var(--dim); width: 32px; text-align: right; }
.usr-swrow { display: flex; align-items: center; justify-content: space-between; gap: 10px;
             padding: 9px 11px; border-radius: 8px; background: #1a1f27; border: 1px solid #262c35; }
.usr-swrow b { font-size: 11.5px; color: var(--text2); }
.usr-swrow em { font-style: normal; display: block; font-size: 10.5px; color: var(--dim2); margin-top: 2px; }
.usr-note { font-size: 10.5px; color: #4d5561; line-height: 1.7; }
.usr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 30px; padding: 0 12px; border-radius: 7px; font-size: 11.5px; color: #fff; background: #1d4ed8;
}
.usr-btn:hover { background: #2563eb; }
.usr-btn.wide { width: 100%; }

/* ---------------------------------------------------------------- 安全中心 */
.sec-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr 300px; gap: 12px; }
.sec-col { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.sec-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.sec-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px;
  background: #1a1f27; border: 1px solid #262c35; font-size: 11.5px;
}
.sec-item .sico { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; display: grid; place-items: center;
                  background: #21262d; color: var(--dim); }
.sec-item .sico .ic { width: 12px; height: 12px; }
.sec-item b { font-weight: 500; color: var(--text2); font-family: Consolas, monospace; font-size: 11px; }
.sec-item time { margin-left: auto; font-size: 10.5px; color: #4d5561; }
.stat-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.stat-line {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px; border-radius: 7px; background: #1a1f27; border: 1px solid #262c35;
  font-size: 11.5px; color: var(--text2);
}
.stat-line b { font-weight: 700; }
.stat-line.ok { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.28); color: #4ade80; }
.stat-line.bad { background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .28); color: #60a5fa; }
.sec-tabs { display: flex; gap: 6px; }
.sec-tabs button {
  height: 28px; padding: 0 12px; border-radius: 6px; font-size: 11.5px;
  background: #1c222b; border: 1px solid var(--line2); color: var(--text2);
}
.sec-tabs button.on { background: #1d4ed8; border-color: #2563eb; color: #fff; }

/* ---------------------------------------------------------------- 服务器状态 */
.srv-wrap { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.srv-head { display: flex; align-items: center; gap: 9px; }
.srv-head h1 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--text); }
.srv-head h1 .ic { width: 17px; height: 17px; color: var(--amber); }
.srv-pill {
  font-size: 10.5px; padding: 2px 8px; border-radius: 5px; color: #4ade80;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3);
}
.srv-pill.bad { color: #60a5fa; background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .3); }
.srv-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.srv-card {
  display: flex; align-items: center; gap: 12px; padding: 16px 15px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line);
}
.srv-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; }
.srv-ico .ic { width: 16px; height: 16px; }
.srv-ico.green { background: rgba(34,197,94,.12); color: #22c55e; }
.srv-ico.blue { background: rgba(59,130,246,.12); color: #3b82f6; }
.srv-ico.amber { background: rgba(245,158,11,.12); color: #f59e0b; }
.srv-ico.red { background: rgba(59, 130, 246, .12); color: #3b82f6; }
.srv-ico.purple { background: rgba(168,85,247,.12); color: #a855f7; }
.srv-card em { font-style: normal; display: block; font-size: 11px; color: var(--dim); }
.srv-card b { display: block; margin-top: 3px; font-size: 16px; font-weight: 700; color: var(--text); }
.srv-card b.green { color: #4ade80; }
.srv-card b.blue { color: #60a5fa; }

.srv-meter { display: flex; flex-direction: column; gap: 0; padding: 15px;
             background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.srv-meter-h { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--dim); }
.srv-meter-h .pct { margin-left: auto; font-size: 13px; font-weight: 700; color: #4ade80; }
.meter { height: 4px; border-radius: 4px; background: #21262d; margin: 11px 0 9px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #16a34a, #22c55e); }
.srv-kv { display: flex; justify-content: space-between; padding: 3px 0; font-size: 11px; color: var(--dim); }
.srv-kv b { font-weight: 500; color: var(--text2); }

.srv-net { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 15px; }
.srv-net-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
.srv-net-h .ic { width: 14px; height: 14px; color: #3b82f6; }
.srv-net-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 13px; }
.srv-net-grid div { display: flex; align-items: center; gap: 9px; }
.srv-net-grid .ni { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
                    background: rgba(59,130,246,.12); color: #3b82f6; }
.srv-net-grid .ni .ic { width: 14px; height: 14px; }
.srv-net-grid em { font-style: normal; display: block; font-size: 10.5px; color: var(--dim); }
.srv-net-grid b { display: block; font-size: 15px; font-weight: 700; color: var(--text); margin-top: 1px; }

.srv-health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hcard {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 34px 14px 15px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
}
.hcard.bad { border-color: rgba(59, 130, 246, .45); }
.hcard em { font-style: normal; font-size: 11px; color: var(--dim); }
.hcard b { font-size: 15px; font-weight: 700; color: var(--text); }
.hcard b.bad { color: #60a5fa; font-size: 13.5px; }
.hcard small { font-size: 10.5px; color: #4d5561; }
.hok { position: absolute; right: 11px; top: 13px; width: 17px; height: 17px; border-radius: 50%;
       display: grid; place-items: center; color: #22c55e; border: 1px solid rgba(34,197,94,.4); }
.hok.bad { color: #3b82f6; border-color: rgba(59, 130, 246, .45); }
.hok .ic { width: 10px; height: 10px; }

/* ---------------------------------------------------------------- 短信通知规则 */
.rule-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rule-tags { padding: 12px 13px; display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start; flex: 1;
             overflow-y: auto; }
.tagpill {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border-radius: 6px; font-size: 11.5px; background: #1c222b; border: 1px solid var(--line2);
  color: var(--text2);
}
.tagpill .x { color: #6e7681; font-size: 12px; }
.tagpill .x:hover { color: #60a5fa; }
.rule-row {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 8px;
  background: #1a1f27; border: 1px solid #262c35; font-size: 11.5px; color: var(--text2);
}
.rule-row em { font-style: normal; color: var(--dim); }
.rule-row b { font-weight: 500; color: var(--text); }

/* ---------------------------------------------------------------- APK 构建 */
.build-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 380px 1fr; gap: 12px; }
.build-form { padding: 12px 13px; display: flex; flex-direction: column; gap: 11px; overflow-y: auto; }
.build-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--dim); }
.build-form input, .build-form select {
  height: 32px; padding: 0 10px; border-radius: 7px; font-size: 12px;
  background: #0d1117; border: 1px solid var(--line2); color: var(--text); outline: none;
}
.build-form input:focus, .build-form select:focus { border-color: #3b82f6; }
.build-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.progress { height: 5px; border-radius: 5px; background: #21262d; overflow: hidden; margin-top: 4px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #1d4ed8, #3b82f6); transition: width .3s; }

/* ---------------------------------------------------------------- 通用小件 */
.mini-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px;
  border-radius: 6px; font-size: 11px; color: var(--text2);
  background: #1c222b; border: 1px solid var(--line2);
}
.mini-btn:hover { background: #242b35; color: #fff; }
.mini-btn .ic { width: 11px; height: 11px; }
.mini-btn.primary { background: #1d4ed8; border-color: #2563eb; color: #fff; }
.mini-btn.primary:hover { background: #2563eb; }

.loading-box { flex: 1; display: grid; place-items: center; color: var(--dim); font-size: 12px; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #444c56; }

@media (max-width: 1400px) {
  .mcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .usr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec-wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1150px) {
  .dash-two, .cols3, .rule-cols, .ai-wrap { grid-template-columns: 1fr; }
}

/* 裸输入框（IP 白名单等） */
.plain-in {
  height: 32px; padding: 0 10px; border-radius: 7px; font-size: 12px;
  background: #0d1117; border: 1px solid #2d333b; color: #e6edf3; outline: none;
  width: 100%; font-family: inherit;
}
.plain-in:focus { border-color: #3b82f6; }

/* 弹窗（新配色） */
.modal-layer {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(1, 4, 9, .72); backdrop-filter: blur(4px);
}
.modal {
  width: 520px; max-height: 84vh; display: flex; flex-direction: column;
  border-radius: 12px; border: 1px solid #30363d; background: #161b22;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .95);
}
.modal-h { display: flex; align-items: center; justify-content: space-between;
           padding: 14px 16px; border-bottom: 1px solid #21262d; }
.modal-h b { font-size: 13.5px; font-weight: 600; color: #e6edf3; }
.modal-x { color: #8b949e; display: grid; place-items: center; }
.modal-x:hover { color: #fff; }
.modal-b { padding: 15px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; overflow-y: auto; }
.modal-b label { display: flex; flex-direction: column; gap: 6px; }
.modal-b label.full { grid-column: 1 / -1; }
.modal-b label.inline { flex-direction: row; align-items: center; justify-content: space-between; }
.modal-b em { font-style: normal; font-size: 11.5px; color: #8b949e; }
.modal-b em i { color: #60a5fa; font-style: normal; }
.modal-b input, .modal-b select, .modal-b textarea {
  background: #0d1117; border: 1px solid #30363d; border-radius: 7px;
  padding: 8px 10px; color: #e6edf3; font-size: 12.5px; font-family: inherit; resize: vertical;
}
.modal-b input:focus, .modal-b select:focus, .modal-b textarea:focus {
  outline: none; border-color: #3b82f6;
}
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #21262d; }

/* 修正：绑定状态框内部布局 */
.usr-box > div { flex: 1; min-width: 0; }
.usr-box > div em { display: block; font-size: 10.5px; color: #6e7681; line-height: 1.6; }
.usr-box > em { margin-left: auto; flex: 0 0 auto; font-size: 10px; padding: 2px 7px;
                border-radius: 4px; background: #21262d; color: #8b949e; }
.ai-type .tico { transition: none; }

/* 修正：卡片头默认左对齐（避免旧样式的 space-between 顶开） */
.card-h { justify-content: flex-start; }
.card-h > span:first-of-type { flex: 0 0 auto; }
.card-h .grow { flex: 1 1 auto; }
.sec-tabs button { white-space: nowrap; }
.pagehead .ph-acts { flex: 0 0 auto; }

/* 文字型行内操作按钮 */
.txtbtn { font-size: 11.5px; padding: 2px 4px; border-radius: 4px; }
.txtbtn.blue { color: #60a5fa; }
.txtbtn.blue:hover { color: #93c5fd; background: rgba(59,130,246,.1); }
.txtbtn.red { color: #60a5fa; }
.txtbtn.red:hover { color: #93c5fd; background: rgba(59, 130, 246, .1); }

/* 开关统一尺寸 */
.sw { width: 36px; height: 20px; flex: 0 0 36px; border-radius: 11px; }
.sw i { width: 16px; height: 16px; }
.sw.on i { transform: translateX(16px); }
.sw.sm { width: 32px; height: 18px; flex: 0 0 32px; }
.sw.sm i { width: 14px; height: 14px; }
.sw.sm.on i { transform: translateX(14px); }

/* 安全中心 tab 不换行 */
.sec-tabs { flex: 0 0 auto; }
.sec-tabs button { flex: 0 0 auto; padding: 0 14px; white-space: nowrap; }

/* ==================================================================
   字号档位 —— 整体上调（基准 13 → 15px），同步加高各容器
   想再大/再小，只改这一块即可
   ================================================================== */
body { font-size: 15px; }

/* 侧栏 */
.brand { height: 66px; flex: 0 0 66px; }
.brand-t { font-size: 15px; }
.brand-ico, .brand-ico svg { width: 28px; height: 28px; }
.xy-group { font-size: 12px; padding: 14px 7px 5px; }
.xy-item { height: 41px; font-size: 14.5px; gap: 10px; padding: 0 11px; }
.xy-item .ic { width: 16px; height: 16px; }
.sub-item { height: 33px; font-size: 13px; }
.sub-item .ic { width: 13px; height: 13px; }
.sb-status { font-size: 12.5px; padding: 12px 14px; }
.sb-status span { font-size: 12px; }

/* 顶栏 / 副栏 */
.xytop { height: 58px; flex: 0 0 58px; }
.xyt-title { font-size: 15px; }
.top-money { height: 32px; }
.top-money input, .top-money em { font-size: 13px; }
.top-sel { height: 32px; font-size: 12.5px; }
.top-clock em { font-size: 12px; }
.top-clock b { font-size: 13.5px; }
.top-ico, .top-bell { width: 30px; height: 30px; }
.top-bell .ic { width: 17px; height: 17px; }
.subtop { height: 34px; flex: 0 0 34px; font-size: 12.5px; padding: 0 16px; }
.subtop .ghost, .subtop .mini { height: 24px; font-size: 12.5px; }

/* 指标卡 */
.mcards { gap: 13px; }
.mcard { min-height: 108px; padding: 14px 15px 13px; }
.mcard-name { font-size: 13.5px; }
.mcard-ico { width: 32px; height: 32px; border-radius: 10px; }
.mcard-ico .ic { width: 16px; height: 16px; }
.mcard-v { font-size: 29px; margin-top: 8px; }
.mcard-v em { font-size: 14px; }
.mcard-s { font-size: 12px; margin-top: 5px; }
.mcard-bar { height: 4px; }

/* 卡片 / 表格 */
.card-h { font-size: 15px; flex: 0 0 48px; padding: 0 15px; gap: 9px; }
.card-h .hicon { width: 17px; height: 17px; }
.card-badge { font-size: 12px; padding: 2px 8px; }
.card-sub { font-size: 12.5px; }
.card-desc { font-size: 12.5px; }
.tbl th { font-size: 12.5px; height: 42px; padding: 0 12px; }
.tbl td { font-size: 14px; height: 48px; padding: 0 12px; }
.tbl td.mono, .tbl .mono { font-size: 13px; }
.tbl td.empty-cell { font-size: 13px; }
.tagmini { font-size: 11.5px; padding: 2px 8px; }

/* 按钮 / 输入 */
.btn-line, .btn-blue { height: 31px; font-size: 12.5px; padding: 0 11px; }
.btn-purple { height: 31px; font-size: 12.5px; }
.btn-red { height: 28px; font-size: 12.5px; padding: 0 10px; }
.mini-btn { height: 28px; font-size: 12.5px; }
.txtbtn { font-size: 12.5px; }
.iact { width: 26px; height: 26px; }
.iact .ic { width: 14px; height: 14px; }
.bar-search { height: 32px; width: 320px; }
.bar-search input, .msearch input { font-size: 13px; }
.msearch { height: 32px; font-size: 13px; }
.bar-sel { height: 32px; font-size: 12.5px; }
.dv-check { font-size: 12.5px; }

/* 设备页 */
.dvs { height: 33px; font-size: 13px; padding: 0 12px; gap: 7px; }
.dvs b { font-size: 14.5px; }
.dc-title { font-size: 14px; max-width: 112px; }
.dc-chip { font-size: 11.5px; padding: 2px 7px; }
.dc-acts { gap: 2px; }
.dca { width: 24px; height: 24px; }
.dca .ic { width: 13px; height: 13px; }
.dc-id { font-size: 12px; margin: 7px 0 6px; }
.dc-badge { font-size: 11px; padding: 2px 7px; }
.dc-kv div { font-size: 13px; padding: 3.5px 0; }
.dc-kv em { flex: 0 0 70px; font-size: 12.5px; }
.dc-kv b.mono { font-size: 12px; }
.dv-empty { font-size: 14px; }

/* 分页 */
.pager { font-size: 12.5px; gap: 9px; }
.pg-sel { height: 28px; font-size: 12.5px; }
.pg-btn, .pg-num { height: 28px; min-width: 28px; }
.pg-btn .ic { width: 13px; height: 13px; }

/* 页面标题 */
.pagehead h1 { font-size: 19px; }
.pagehead h1 .ic { width: 20px; height: 20px; }
.pagehead p { font-size: 12.5px; margin-top: 6px; }

/* 三列区块 */
.block-h b { font-size: 13.5px; }
.block-acts button { height: 26px; font-size: 11.5px; padding: 0 8px; }
.block-desc { font-size: 11.5px; line-height: 1.75; }
.block .tbl th { font-size: 11.5px; height: 36px; padding: 0 9px; }
.block .tbl td { font-size: 12.5px; height: 42px; padding: 0 9px; }
.block .tbl td.mono { font-size: 12px; }
.block .pager { font-size: 11px; padding: 8px 10px; }
.block .pager .pg-sel, .block .pager .pg-btn, .block .pager .pg-num { height: 24px; font-size: 11px; min-width: 24px; }

/* 用户设置六卡 */
.usr-row label { font-size: 12px; }
.usr-row input, .usr-row select { font-size: 13px; height: 34px; }
.usr-box b { font-size: 13px; }
.usr-box > div em { font-size: 11.5px; }
.usr-box > em { font-size: 11px; }
.usr-warn { font-size: 11.5px; }
.usr-warn b { font-size: 12.5px; }
.usr-item b { font-size: 12.5px; }
.usr-item em { font-size: 11.5px; }
.usr-item .ubi { width: 28px; height: 28px; flex: 0 0 28px; }
.usr-swrow b { font-size: 12.5px; }
.usr-swrow em { font-size: 11.5px; }
.usr-note { font-size: 11.5px; }
.usr-btn { height: 32px; font-size: 12.5px; }
.usr-empty { font-size: 13px; }
.usr-vol em { font-size: 12px; width: 36px; }
.plain-in { height: 34px; font-size: 13px; }

/* 安全中心 */
.sec-item { font-size: 12.5px; padding: 10px 12px; }
.sec-item b { font-size: 12px; }
.sec-item time { font-size: 11.5px; }
.sec-item .sico { width: 24px; height: 24px; flex: 0 0 24px; }
.stat-line { font-size: 12.5px; padding: 10px 12px; }
.sec-tabs button { height: 30px; font-size: 12.5px; }

/* 服务器状态 */
.srv-head h1 { font-size: 18px; }
.srv-head h1 .ic { width: 19px; height: 19px; }
.srv-pill { font-size: 11.5px; padding: 3px 9px; }
.srv-card em { font-size: 12px; }
.srv-card b { font-size: 18px; }
.srv-card small { font-size: 11.5px; }
.srv-ico { width: 38px; height: 38px; flex: 0 0 38px; }
.srv-ico .ic { width: 17px; height: 17px; }
.srv-meter-h { font-size: 12.5px; }
.srv-meter-h .pct { font-size: 14px; }
.srv-kv { font-size: 12px; }
.srv-net-h { font-size: 13px; }
.srv-net-grid em { font-size: 11.5px; }
.srv-net-grid b { font-size: 16px; }
.hcard em { font-size: 12px; }
.hcard b { font-size: 16px; }
.hcard b.bad { font-size: 14.5px; }
.hcard small { font-size: 11.5px; }

/* 短信规则 / AI */
.rule-row { font-size: 12.5px; padding: 11px 13px; }
.tagpill { font-size: 12.5px; height: 29px; padding: 0 10px; }
.ai-hero h3 { font-size: 17px; }
.ai-hero p { font-size: 12.5px; }
.ai-type { padding: 14px 15px; }
.ai-type b { font-size: 13.5px; }
.ai-type em { font-size: 11.5px; }
.ai-type .tico { width: 28px; height: 28px; }
.ai-input input { height: 36px; font-size: 13px; }
.ai-send { width: 36px; height: 36px; flex: 0 0 36px; }

/* 构建页 */
.build-form label { font-size: 12px; }
.build-form input, .build-form select { height: 34px; font-size: 13px; }

/* 公告 / 分布 */
.notice-item b { font-size: 13.5px; }
.notice-item p { font-size: 12.5px; }
.notice-item time { font-size: 11.5px; }
.dist-name { font-size: 13px; width: 64px; flex: 0 0 64px; }
.dist-num { font-size: 12.5px; }
.empty-hint { font-size: 13px; }

/* 弹窗 */
.modal-h b { font-size: 15px; }
.modal-b em { font-size: 12.5px; }
.modal-b input, .modal-b select, .modal-b textarea { font-size: 13.5px; }

/* 三列区块内的小开关：加间距、缩尺寸，避免连成一片 */
.block .tbl td .sw { margin-right: 5px; }
.block .tbl .sw.sm { width: 29px; height: 16px; flex: 0 0 29px; border-radius: 9px; }
.block .tbl .sw.sm i { width: 12px; height: 12px; }
.block .tbl .sw.sm.on i { transform: translateX(13px); }
.block-body { overflow-x: auto; }

/* ==================================================================
   主题色：彩蓝（原红色系已全部替换）
   ================================================================== */
:root {
  --red:    #3b82f6;   /* 主色（变量名沿用，值为彩蓝） */
  --red-d:  #1d4ed8;
  --red-bg: #1e3a8a;
  --blue:   #38bdf8;
  --accent: #60a5fa;
}
/* 选中菜单：深蓝底 + 亮蓝字 + 蓝色左边线 */
.xy-item.on {
  background: linear-gradient(90deg, rgba(59, 130, 246, .22), rgba(59, 130, 246, .10));
  border-color: rgba(96, 165, 250, .55);
  color: #93c5fd;
}
.xy-item.on .ic { color: #93c5fd; }
/* 品牌与铃铛 */
.brand-ico { color: #3b82f6; }
.brand-t { color: #60a5fa; }
.top-bell { color: #60a5fa; }
.top-bell i { background: #3b82f6; box-shadow: 0 0 0 2px #0a0d12; }
/* 主按钮 / 分页当前页 */
.usr-btn { background: #2563eb; }
.usr-btn:hover { background: #3b82f6; }
.pg-num { background: #2563eb; }
.ai-send { background: #2563eb; }
.ai-send:hover { background: #3b82f6; }
.sec-tabs button.on { background: #1d4ed8; border-color: #3b82f6; color: #fff; }
/* 指标卡 / 分布条 / 进度条 */
.dist-bar i { background: linear-gradient(90deg, #1d4ed8, #60a5fa); }
.mcard::before { background: var(--c, #3b82f6); }
.srv-num { color: #3b82f6; }
/* 表格选中 / 聚焦 */
.bar-search:focus-within, .msearch:focus-within,
.usr-row input:focus, .usr-row select:focus, .plain-in:focus,
.modal-b input:focus, .modal-b select:focus, .modal-b textarea:focus {
  border-color: rgba(96, 165, 250, .65);
}

/* 统一到彩蓝：强调按钮 / 进度条 / 滑杆 */
.btn-purple {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: #60a5fa;
  box-shadow: 0 6px 16px -10px rgba(59, 130, 246, .9);
}
.btn-purple:hover { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.meter i { background: linear-gradient(90deg, #1d4ed8, #60a5fa); }
.usr-vol input[type=range] { accent-color: #3b82f6; }
.srv-meter-h .pct { color: #60a5fa; }
.mcard-bar i { background: var(--c, #3b82f6); }
/* 登录页 */
.login-card .login-logo, .login-logo { background: linear-gradient(145deg, #3b82f6, #1e3a8a); }
.login-card button, #btn-login { background: #2563eb; }
.login-card button:hover, #btn-login:hover { background: #3b82f6; }

/* ==================================================================
   视觉升级：背景质感 + 毛玻璃 + 彩色图标底块
   ================================================================== */

/* ---- 背景：多层径向光 + 细网格 ---- */
body {
  background:
    radial-gradient(1100px 620px at 12% -12%, rgba(59, 130, 246, .20), transparent 62%),
    radial-gradient(900px 520px at 92% -6%, rgba(168, 85, 247, .13), transparent 58%),
    radial-gradient(700px 500px at 50% 110%, rgba(14, 165, 233, .08), transparent 60%),
    #070a10;
}
.shell { background: transparent; }
.main { position: relative; background: transparent; }
.main::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 0%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 30%, transparent 85%);
}
.main > * { position: relative; z-index: 1; }

/* ---- 侧栏：渐变 + 右侧高光线 ---- */
.xy-side {
  background: linear-gradient(180deg, #0c1220 0%, #080b12 55%, #06080d 100%);
  border-right: 1px solid rgba(96, 165, 250, .13);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .03), 12px 0 40px -30px rgba(0, 0, 0, .9);
}
.brand {
  border-bottom: 1px solid rgba(148, 163, 184, .09);
  background: linear-gradient(180deg, rgba(59, 130, 246, .09), transparent);
}
.brand-ico {
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, .65));
}
.brand-t {
  color: #93c5fd;
  text-shadow: 0 0 18px rgba(59, 130, 246, .45);
}

/* ---- 顶栏 / 副栏：毛玻璃 ---- */
.xytop {
  background: rgba(8, 12, 20, .82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(148, 163, 184, .10);
}
.subtop {
  background: rgba(7, 10, 16, .7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, .07);
}
.top-money, .top-sel {
  background: rgba(20, 28, 42, .8);
  border-color: rgba(96, 165, 250, .18);
}
.top-sel:hover, .top-money:hover { border-color: rgba(96, 165, 250, .38); }

/* ---- 卡片：渐变 + 内高光 + 悬浮蓝光 ---- */
.card, .mcard, .block, .usr-card, .srv-card, .srv-meter, .srv-net, .hcard,
.ai-left, .ai-right, .split-side, .split-main, .side-card {
  background: linear-gradient(168deg, rgba(20, 28, 42, .92) 0%, rgba(11, 16, 25, .96) 62%, rgba(9, 13, 20, .98) 100%);
  border: 1px solid rgba(148, 163, 184, .13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 14px 34px -26px rgba(0, 0, 0, .95);
  transition: border-color .18s, box-shadow .18s;
}
.card:hover, .block:hover, .usr-card:hover {
  border-color: rgba(96, 165, 250, .28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 18px 40px -26px rgba(0, 0, 0, 1),
    0 0 0 1px rgba(59, 130, 246, .07);
}
.card-h {
  background: linear-gradient(180deg, rgba(59, 130, 246, .07), transparent);
  border-bottom: 1px solid rgba(148, 163, 184, .10);
}
.mcard { overflow: hidden; }
.mcard::after {
  content: ''; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, var(--c, #3b82f6) 0%, transparent 68%);
  opacity: .16; pointer-events: none;
}
.mcard-ico {
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 26%, transparent), color-mix(in srgb, var(--c) 8%, transparent));
  border-color: color-mix(in srgb, var(--c) 42%, transparent);
  box-shadow: 0 0 16px -6px var(--c);
}
.mcard-v { letter-spacing: -.8px; }

/* ---- 侧栏菜单图标：彩色圆角底块 ---- */
.xy-item { border-color: rgba(148, 163, 184, .10); background: rgba(23, 31, 45, .55); }
.xy-item .ic {
  width: 15px; height: 15px; padding: 4px; box-sizing: content-box;
  border-radius: 7px; background: color-mix(in srgb, var(--ic, #60a5fa) 16%, transparent);
  color: var(--ic, #60a5fa); stroke-width: 1.9;
  transition: background .15s, box-shadow .15s, color .15s;
}
.xy-item:hover .ic { background: color-mix(in srgb, var(--ic, #60a5fa) 26%, transparent); }
.xy-item.on .ic {
  background: color-mix(in srgb, var(--ic, #60a5fa) 34%, transparent);
  color: #dbeafe;
  box-shadow: 0 0 14px -3px var(--ic, #60a5fa);
}
.xy-item.on {
  background: linear-gradient(90deg, rgba(59, 130, 246, .26), rgba(59, 130, 246, .08));
  border-color: rgba(96, 165, 250, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 18px -12px rgba(59, 130, 246, .9);
}
.xy-item.on::after {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: #60a5fa;
  box-shadow: 0 0 12px rgba(96, 165, 250, .9);
}
.xy-item.on { position: relative; }
.sub-item .ic {
  width: 12px; height: 12px; padding: 3px; box-sizing: content-box; border-radius: 5px;
  background: rgba(148, 163, 184, .10); color: #94a3b8;
}

/* 每个菜单的图标主色 */
.xy-item[data-view="dash"] .ic      { --ic: #60a5fa; }
.xy-item[data-view="devices"] .ic   { --ic: #38bdf8; }
.xy-item[data-mod="sms"] .ic        { --ic: #34d399; }
.xy-item[data-mod="notice"] .ic     { --ic: #fbbf24; }
.xy-item[data-mod="bank"] .ic       { --ic: #f472b6; }
.xy-item[data-mod="injectdata"] .ic { --ic: #a78bfa; }
.xy-item[data-mod="groups"] .ic     { --ic: #facc15; }
.xy-item[data-mod="blacklist"] .ic  { --ic: #fb7185; }
.xy-item[data-mod="appsettings"] .ic { --ic: #22d3ee; }
.xy-item[data-mod="tpl"] .ic        { --ic: #818cf8; }
.xy-item[data-mod="aitpl"] .ic      { --ic: #c084fc; }
.xy-item[data-mod="smsrule"] .ic    { --ic: #2dd4bf; }
.xy-item[data-mod="bankdetect"] .ic { --ic: #fbbf24; }
.xy-item[data-mod="build"] .ic      { --ic: #fb923c; }
.xy-item[data-mod="userset"] .ic    { --ic: #93c5fd; }
.xy-item[data-mod="sec"] .ic        { --ic: #4ade80; }
.xy-item[data-mod="server"] .ic     { --ic: #60a5fa; }
.xy-item[data-mod="turn"] .ic       { --ic: #22d3ee; }
.xy-item[data-mod="tg"] .ic         { --ic: #38bdf8; }

/* ---- 统计胶囊 / 卡片头图标底块 ---- */
.dvs .ic {
  padding: 3px; box-sizing: content-box; border-radius: 6px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--c);
}
.card-h .hicon {
  padding: 4px; box-sizing: content-box; border-radius: 7px;
  background: color-mix(in srgb, currentColor 15%, transparent);
  width: 15px; height: 15px;
}
.block-h .bico {
  padding: 3px; box-sizing: content-box; border-radius: 6px;
  background: color-mix(in srgb, currentColor 15%, transparent);
  width: 13px; height: 13px;
}

/* ---- 按钮：渐变 + 光晕 ---- */
.btn-line, .mini-btn, .btn-blue, .btn-red {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0));
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-blue { box-shadow: 0 6px 16px -12px rgba(59, 130, 246, .9); }
.btn-blue:hover { box-shadow: 0 8px 20px -12px rgba(59, 130, 246, 1); }
.btn-red { box-shadow: 0 6px 16px -12px rgba(96, 165, 250, .8); }

/* ---- 表格：斑马纹 + 悬停渐变 ---- */
.tbl tbody tr:nth-child(even) td { background: rgba(148, 163, 184, .022); }
.tbl tbody tr:hover td {
  background: linear-gradient(90deg, rgba(59, 130, 246, .10), rgba(59, 130, 246, .03));
}
.tbl th { background: rgba(148, 163, 184, .04); }

/* ---- 设备卡 ---- */
.dcard {
  background: linear-gradient(168deg, rgba(21, 29, 44, .92), rgba(10, 15, 23, .97));
  border-color: rgba(148, 163, 184, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 28px -24px #000;
}
.dcard:hover {
  border-color: rgba(96, 165, 250, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 18px 34px -22px rgba(0, 0, 0, 1), 0 0 0 1px rgba(59, 130, 246, .12);
  transform: translateY(-2px);
}
.dc-dot.on { box-shadow: 0 0 10px rgba(34, 197, 94, .95); }

/* ---- 滚动条 ---- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(96, 165, 250, .38), rgba(59, 130, 246, .22));
  border-radius: 8px; border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(96, 165, 250, .55); background-clip: padding-box; }

/* ---- 登录页 ---- */
.login { background: radial-gradient(900px 600px at 50% 0%, rgba(59, 130, 246, .18), transparent 60%), #070a10; }
.login-card {
  background: linear-gradient(168deg, rgba(20, 28, 42, .96), rgba(9, 13, 20, .98));
  border: 1px solid rgba(96, 165, 250, .2);
  box-shadow: 0 40px 90px -40px #000, inset 0 1px 0 rgba(255, 255, 255, .06);
}
.login-logo, .login-card .login-logo {
  background: linear-gradient(145deg, #60a5fa, #1d4ed8);
  box-shadow: 0 10px 30px -10px rgba(59, 130, 246, .9);
}

/* 修正：区块/卡片头图标的描边继承（避免变成黑色实心块） */
.block-h .bico, .card-h .hicon,
.srv-head h1 .ic, .mon-title .pico, .panel-h .pico {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.block-h .bico { width: 14px; height: 14px; }
.card-h .hicon { width: 16px; height: 16px; }

/* 设备卡操作图标提亮 */
.dca { color: #94a3b8; border-radius: 6px; }
.dca:hover { color: #bfdbfe; background: rgba(59, 130, 246, .18); }
.dc-chip { color: #93b8e8; border-color: rgba(96, 165, 250, .22); background: rgba(59, 130, 246, .10); }
.dc-badge { color: #9aa8bd; }
.dc-badge.net { color: #7dd3fc; }

/* 修正：开关圆点（旧规则用 left 位移且把圆点染成主色，这里统一用 transform + 白点） */
.sw i {
  position: absolute; top: 2px; left: 2px;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.sw.on i { left: 2px; background: #fff; }
.sw.sm i { top: 2px; left: 2px; }
.sw.sm.on i { left: 2px; }
.sw.off i { left: 2px; }

/* ==================================================================
   设备卡操作按钮：分组胶囊 + 每个操作独立语义色
   ================================================================== */
.dc-acts {
  display: flex; align-items: center; gap: 3px;
  margin-left: auto; flex: 0 0 auto; padding: 2px;
  border-radius: 9px;
  background: rgba(148, 163, 184, .055);
  border: 1px solid rgba(148, 163, 184, .09);
}
.dca {
  position: relative;
  width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center;
  color: color-mix(in srgb, var(--a, #93c5fd) 68%, #8b98ad);
  background: transparent; border: 1px solid transparent;
  transition: color .14s, background .14s, border-color .14s, transform .12s, box-shadow .14s;
}
.dca .ic { width: 13px; height: 13px; stroke-width: 2; }
.dca:hover {
  color: #fff;
  background: color-mix(in srgb, var(--a, #60a5fa) 30%, transparent);
  border-color: color-mix(in srgb, var(--a, #60a5fa) 55%, transparent);
  box-shadow: 0 5px 14px -7px var(--a, #60a5fa);
  transform: translateY(-1px);
}
.dca:active { transform: translateY(0) scale(.94); }

.dca[data-op="cast"]    { --a: #60a5fa; }  /* 投屏 */
.dca[data-op="shot"]    { --a: #22d3ee; }  /* 截图 */
.dca[data-op="file"]    { --a: #fbbf24; }  /* 文件 */
.dca[data-op="cmd"]     { --a: #34d399; }  /* 终端 */
.dca[data-op="refresh"] { --a: #94a3b8; }  /* 刷新 */
.dca[data-op="copy"]    { --a: #a78bfa; }  /* 复制 */
.dca[data-op="meta"]    { --a: #38bdf8; }  /* 编辑 */
.dca[data-op="del"]     { --a: #fb7185; }  /* 删除 */

/* 删除与前面的操作之间加一条分隔 */
.dca[data-op="del"]::before {
  content: ''; position: absolute; left: -3px; top: 6px; bottom: 6px; width: 1px;
  background: rgba(148, 163, 184, .16);
}

/* 卡片更宽，容纳标题 + 分组 + 8 个按钮 */
.dv-grid { grid-template-columns: repeat(auto-fill, minmax(382px, 1fr)); }
.dc-head { gap: 6px; }
.dc-title { flex: 1 1 auto; min-width: 0; max-width: none; }
.dc-chip { flex: 0 0 auto; }

/* 设备统计胶囊图标底块配色更明确 */
.dvs .ic { stroke-width: 2; }

/* ---- 按钮微调：稍大一点、默认色更饱和 ---- */
.dca {
  width: 25px; height: 25px;
  color: color-mix(in srgb, var(--a, #93c5fd) 80%, #93a3b8);
}
.dca .ic { width: 13.5px; height: 13.5px; }
.dc-acts { gap: 2px; padding: 2px; }

/* 工具条：危险操作标玫红，下拉框悬停蓝边 */
.dv-batchbar .btn-line[data-bulk="del"] {
  color: #fb7185; border-color: rgba(251, 113, 133, .28);
}
.dv-batchbar .btn-line[data-bulk="del"]:hover {
  background: rgba(251, 113, 133, .14); border-color: rgba(251, 113, 133, .55); color: #fda4af;
}
.bar-sel:hover { border-color: rgba(96, 165, 250, .45); color: #dbeafe; }
.btn-line:hover { border-color: rgba(96, 165, 250, .4); }
.dv-check input { accent-color: #3b82f6; }

/* 操作按钮：默认给一层极淡的同色底，让 8 个彩色方块更立体 */
.dca {
  background: color-mix(in srgb, var(--a, #93c5fd) 11%, transparent);
  border-color: color-mix(in srgb, var(--a, #93c5fd) 18%, transparent);
}
.dca:hover {
  background: color-mix(in srgb, var(--a, #60a5fa) 34%, transparent);
  border-color: color-mix(in srgb, var(--a, #60a5fa) 62%, transparent);
}
.dca[data-op="del"] { background: color-mix(in srgb, #fb7185 12%, transparent); }

/* 卡片头间距：标题 / 分组 / 按钮组之间留呼吸 */
.dc-head { gap: 8px; }
.dc-acts { margin-left: 4px; }
.dc-chip { padding: 2px 9px; letter-spacing: .2px; }

/* ==================================================================
   设备控制页：三通道选择卡
   ================================================================== */
.stage-body { position: relative; }
.chans {
  position: absolute; inset: 0; z-index: 3;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; padding: 20px 22px; align-content: center;
  background: radial-gradient(620px 320px at 50% 38%, rgba(59, 130, 246, .07), transparent 72%);
}
.chans.hide { display: none; }
.chan {
  display: flex; flex-direction: column; gap: 11px; min-height: 168px;
  padding: 16px 17px 14px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(168deg, rgba(22, 30, 46, .94), rgba(10, 15, 24, .97));
  border: 1px solid rgba(148, 163, 184, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 38px -30px #000;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.chan:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--k) 48%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07),
              0 22px 44px -28px #000,
              0 0 26px -12px var(--k);
}
.chan.on {
  border-color: var(--k);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px var(--k), 0 0 30px -12px var(--k);
}
.chan-top { display: flex; align-items: center; gap: 9px; }
.chan-ico {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px;
  display: grid; place-items: center; color: var(--k);
  background: color-mix(in srgb, var(--k) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--k) 32%, transparent);
}
.chan-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor;
                stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.chan-top b { font-size: 14px; font-weight: 600; color: #e6edf3; }
.chan-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; background: #475569; transition: .2s; }
.chan-dot.on { background: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, .95); }
.chan p { flex: 1; font-size: 11.5px; line-height: 1.75; color: #8b949e; margin: 0; }
.chan-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chan-tag {
  font-size: 10.5px; padding: 2px 8px; border-radius: 5px; color: var(--k);
  background: color-mix(in srgb, var(--k) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--k) 26%, transparent);
}
.chan .mini-btn.primary {
  background: color-mix(in srgb, var(--k) 22%, transparent);
  border-color: color-mix(in srgb, var(--k) 52%, transparent);
  color: #fff;
}
.chan .mini-btn.primary:hover { background: color-mix(in srgb, var(--k) 38%, transparent); }

/* 无画面时的扫描线提示 */
.stage-body::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(180deg, rgba(148, 163, 184, .035) 0 1px, transparent 1px 3px);
  opacity: 0; transition: opacity .3s;
}
.stage-body.idle::after { opacity: 1; }

/* 通道卡要盖住锁屏遮罩（无画面时先让用户选通道） */
.chans { z-index: 40; }

/* 画面等比缩放，不撑破容器 */
.stage-body {
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 8px;
}
.stage-body canvas {
  max-width: 100%; max-height: 100%;
  min-width: 0; min-height: 0;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .95), 0 0 0 1px rgba(148, 163, 184, .18);
}

/* 通道卡：标题 + 一行三卡 */
.chans { display: flex; flex-direction: column; justify-content: center; gap: 13px; }
.chans-head { display: flex; align-items: baseline; gap: 10px; padding: 0 2px; }
.chans-head b { font-size: 15px; font-weight: 600; color: #e6edf3; }
.chans-head span { font-size: 11.5px; color: #6e7681; }
.chans-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.chan { min-height: 176px; }
.chan p { font-size: 12px; }

/* 轻提示 */
.toast-box {
  position: fixed; right: 22px; bottom: 22px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  max-width: 400px; padding: 10px 14px; border-radius: 9px; font-size: 12.5px; line-height: 1.6;
  color: #e6edf3; background: rgba(20, 28, 42, .97);
  border: 1px solid rgba(96, 165, 250, .38);
  box-shadow: 0 16px 38px -20px #000;
  transition: opacity .3s, transform .3s;
  animation: toastIn .22s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.ok { border-color: rgba(34, 197, 94, .45); }
.toast.bad { border-color: rgba(251, 113, 133, .5); color: #fda4af; }
.toast.warn { border-color: rgba(245, 158, 11, .5); color: #fcd34d; }

/* ==================================================================
   设备控制页 · 三通道手机框架（覆盖旧的三张通道卡）
   ================================================================== */
.stage-body {
  padding: 0;
  background:
    radial-gradient(760px 430px at 50% -6%, rgba(59, 130, 246, .11), transparent 70%),
    radial-gradient(520px 320px at 90% 100%, rgba(34, 211, 238, .06), transparent 72%),
    radial-gradient(420px 280px at 4% 100%, rgba(167, 139, 250, .06), transparent 72%),
    #06080c;
}
.stage-body::after { display: none; }

.pgrid {
  position: absolute; inset: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; padding: 14px 16px 12px;
  align-content: stretch; background: none;
  --pw: 210px; --ph: 448px;
}
.pgrid.hide { display: grid; }

.pslot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-width: 0; min-height: 0; position: relative;
}

/* ---- 手机外壳 ---- */
.phone {
  position: relative; flex: 0 0 auto;
  width: var(--pw); height: var(--ph);
  padding: 8px; border-radius: 34px;
  background: linear-gradient(152deg, #4c5567 0%, #1b212b 7%, #0a0e14 40%, #141a24 72%, #333b4a 97%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 0 0 1px rgba(0, 0, 0, .8),
    0 28px 56px -30px rgba(0, 0, 0, .98);
  transition: box-shadow .2s;
}
.pslot.on .phone {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .2),
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 0 0 2px color-mix(in srgb, var(--k, #60a5fa) 58%, transparent),
    0 26px 60px -30px rgba(0, 0, 0, .98),
    0 0 46px -16px color-mix(in srgb, var(--k, #60a5fa) 70%, transparent);
}
/* 侧边实体键 */
.phone-key {
  position: absolute; width: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #2c3442, #5b6577 60%, #1b2029);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .7);
}
.pk-pwr { left: -3px; top: 26%; height: 40px; }
.pk-vup { right: -3px; top: 22%; height: 30px; }
.pk-vdn { right: -3px; top: 30%; height: 50px; }

/* ---- 屏幕 ---- */
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 26px; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, #0b1220 0%, #05070b 62%, #030508 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .9),
    inset 0 0 22px 6px rgba(0, 0, 0, .55);
}
/* 刘海 */
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 46%; height: 19px; z-index: 9;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 0 0 13px 13px;
  background: #04060a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .65);
  pointer-events: none;
}
.phone-notch .cam {
  width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #4b6b95, #0a1017 70%);
  box-shadow: inset 0 0 0 1px #16202d;
}
.phone-notch .spk {
  width: 24px; height: 3px; border-radius: 3px; background: #131922;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .9);
}
/* 底部手势条 */
.phone-home {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  width: 40%; height: 4px; border-radius: 3px; z-index: 9;
  background: rgba(255, 255, 255, .38); pointer-events: none;
  box-shadow: 0 0 6px rgba(0, 0, 0, .6);
}

/* ---- 屏幕内：画面 / 镜像 / 空态 ---- */
.phone-screen canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  display: none; border-radius: 0; box-shadow: none;
  object-fit: contain; background: #04060a;
  z-index: 2;
}
.phone-screen canvas.show { display: block; }

.phone-screen .uimirror {
  z-index: 3;
  /* 底部留出屏幕内控制按钮条（返回/主页/最近任务/通知/设置）的高度，
     并裁掉溢出：节点树镜像再大也不会盖住按钮。 */
  padding: 10px 10px 48px;
  overflow: hidden;
  background: #04060a;
}
.phone-screen .uimirror[hidden] { display: none; }
.phone-screen .reader {
  z-index: 4; border-radius: 26px;
}

.pempty {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 0 16px; text-align: center;
  background:
    radial-gradient(120px 120px at 50% 44%, rgba(96, 165, 250, .07), transparent 72%);
}
.pempty[hidden] { display: none; }
.pempty b {
  font-size: 12.5px; font-weight: 600; letter-spacing: .2px; color: #8b95a6;
}
.pempty em {
  font-style: normal; font-size: 10.5px; line-height: 1.75; color: #4e5765;
}
/* 用 ~ 而不是 + ：中间可能插了转圈层，相邻选择器会失效，提示层就盖在画面上吃点击 */
.phone-screen .uimirror:not([hidden]) ~ .pempty { display: none; }
/* 空态提示只是一层说明，不接收鼠标，免得挡住节点树的点击 */
.pempty { pointer-events: none; }
.phone-screen canvas.show ~ .pempty { display: none; }

/* ---- 手机下方工具条 ---- */
.pbar {
  width: var(--pw); height: 34px; flex: 0 0 34px;
  display: flex; align-items: center; gap: 7px; padding: 0 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(26, 33, 46, .94), rgba(12, 17, 25, .97));
  border: 1px solid rgba(148, 163, 184, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .2s, background .2s;
}
.pslot.on .pbar {
  border-color: color-mix(in srgb, var(--k, #60a5fa) 48%, transparent);
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--k, #60a5fa) 14%, rgba(26, 33, 46, .94)),
              rgba(12, 17, 25, .97));
}
.pbar b {
  font-size: 11.5px; font-weight: 600; color: #cfd8e5; white-space: nowrap;
}
.pbar .pst {
  font-size: 10.5px; color: #6b7585; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.pdot {
  width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%;
  background: #454f5e; transition: .2s;
}
.pdot.on { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, .9); }
.pbar .pbtn {
  margin-left: auto; height: 22px; padding: 0 11px; border-radius: 6px;
  font-size: 11px; font-weight: 500; cursor: pointer; white-space: nowrap;
  color: #e6eefc;
  background: color-mix(in srgb, var(--k, #60a5fa) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--k, #60a5fa) 46%, transparent);
  transition: .14s;
}
.pbar .pbtn:hover {
  background: color-mix(in srgb, var(--k, #60a5fa) 36%, transparent);
  border-color: color-mix(in srgb, var(--k, #60a5fa) 70%, transparent);
}
.pbar .pbtn.on {
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--k, #60a5fa) 62%, transparent),
              color-mix(in srgb, var(--k, #60a5fa) 34%, transparent));
  border-color: color-mix(in srgb, var(--k, #60a5fa) 78%, transparent);
  color: #fff;
}

/* 窄屏：略降手机尺寸 */
@media (max-width: 1180px) {
  .pgrid { gap: 8px; padding: 10px 10px 8px; }
  .pbar { height: 30px; flex: 0 0 30px; padding: 0 8px; gap: 5px; }
  .pbar b { font-size: 11px; }
  .pbar .pst { display: none; }
}

/* ---- 手机质感增强 ---- */
.phone-screen::before {
  content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none;
  border-radius: 26px;
  background: linear-gradient(118deg,
    rgba(255, 255, 255, .085) 0%,
    rgba(255, 255, 255, .025) 14%,
    transparent 32%,
    transparent 100%);
}
.pempty::before {
  content: ''; width: 24px; height: 42px; margin-bottom: 2px;
  border: 1.5px solid rgba(148, 163, 184, .26);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(148, 163, 184, .08), transparent 62%);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .04);
}

/* 标题不换行 */
.xyt-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 0 auto; }

/* 中等宽度：右栏收窄，隐藏设备页重复的快捷按钮 */
@media (max-width: 1280px) {
  .stage { grid-template-columns: 1fr 244px; }
  .stage-bar .ghost.mini { display: none; }
  .stage-bar .cst { display: none; }
  .stage-bar .cdot { display: none; }
}

/* 切视图时彻底隐去旧层，避免合成残留透出 */
.view { visibility: hidden; }
.view.on { visibility: visible; }
#view-device.on {
  background:
    radial-gradient(900px 520px at 76% -14%, rgba(23, 32, 58, .55), transparent 62%),
    radial-gradient(700px 420px at 2% 108%, rgba(20, 26, 52, .5), transparent 58%),
    #080a0f;
}

/* 小屏：收起右侧信息栏，三列手机占满 */
@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; padding: 8px; }
  .stage-side { display: none; }
  .pgrid { gap: 6px; padding: 8px 8px 6px; }
}

/* ---- 锁屏卡收进录屏手机屏幕内 ---- */.phone-screen .lockwrap { z-index: 8; }
.phone-screen .locked {
  border-radius: 26px; padding: 10px;
  background: rgba(3, 5, 9, .94);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.phone-screen .locked-card {
  width: 100%; max-width: 100%;
  padding: 14px 12px 11px; border-radius: 13px;
  border-color: rgba(148, 163, 184, .16);
  box-shadow: 0 14px 30px -18px #000;
}
.phone-screen .locked-ico { font-size: 20px; }
.phone-screen .locked-t { font-size: 13px; margin-top: 5px; }
.phone-screen .locked-s { font-size: 10px; line-height: 1.6; margin-top: 5px; color: #7e8899; }
.phone-screen .locked input {
  width: 100%; margin-top: 8px; padding: 7px 9px;
  font-size: 11px; border-radius: 7px;
}
.phone-screen .locked-btns { flex-direction: column; gap: 5px; margin-top: 8px; }
.phone-screen .locked-btns button {
  padding: 7px; font-size: 11px; border-radius: 7px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #fff;
}
.phone-screen .locked-btns button.ghost {
  background: rgba(148, 163, 184, .1);
  border: 1px solid rgba(148, 163, 184, .26);
  color: #c3ccdb;
}
.phone-screen .keep-btn {
  margin-top: 7px; padding: 6px; font-size: 10.5px; border-radius: 7px; line-height: 1.4;
}
.phone-screen .locked-err { font-size: 10px; margin-top: 5px; min-height: 12px; }
.phone-screen .locked-tip { font-size: 9.5px; margin-top: 4px; line-height: 1.5; }

/* ==================================================================
   设备控制页 · 两列（左节点树 / 右画面，画面可切通道）
   ================================================================== */
.pgrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px; padding: 16px 22px 14px;
}

/* 画面通道切换 */
.pseg {
  display: flex; gap: 3px; padding: 2px; border-radius: 7px;
  background: rgba(7, 11, 17, .92);
  border: 1px solid rgba(148, 163, 184, .14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .55);
}
.pseg button {
  height: 20px; padding: 0 9px; border-radius: 5px; border: 0; cursor: pointer;
  font-size: 10.5px; font-weight: 500; letter-spacing: .2px;
  color: #7f8a9b; background: none; white-space: nowrap;
  transition: color .14s, background .14s;
}
.pseg button:hover { color: #e6eefc; background: rgba(148, 163, 184, .1); }
.pseg button.on {
  color: #fff;
  background: color-mix(in srgb, var(--k, #22d3ee) 26%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k, #22d3ee) 48%, transparent);
}

/* 两列下工具条更宽松 */
.pbar { gap: 8px; padding: 0 11px; }
.pbar .pbtn { padding: 0 13px; }
.pbar .pst { font-size: 10px; max-width: 72px; }
.pbar .pseg + .pst { margin-left: -2px; }

/* 左列：节点树镜面铺满屏幕 */
.phone-screen .uimirror {
  align-items: center; justify-content: center;
}

/* ==================================================================
   两列靠左对齐 + 齿轮设置面板
   ================================================================== */
.pgrid {
  grid-template-columns: repeat(2, max-content);
  justify-content: start;
  align-content: center;
  gap: 26px;
  padding: 16px 18px 14px;
}

/* 齿轮 */
.pgear {
  position: absolute; top: 25px; right: 7px; z-index: 12;
  width: 24px; height: 24px; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; font-family: inherit;
  color: #cfd8e5;
  background: rgba(9, 14, 21, .74);
  border: 1px solid rgba(148, 163, 184, .24);
  backdrop-filter: blur(6px);
  transition: .15s;
}
.pgear:hover {
  color: #fff; background: rgba(37, 99, 235, .55);
  border-color: rgba(96, 165, 250, .72);
}
.pgear.on { color: #fff; border-color: rgba(96, 165, 250, .8); }

/* 设置面板 */
.pset.pop {
  position: absolute; z-index: 70; width: 272px;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(21, 28, 40, .985), rgba(11, 16, 24, .99));
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 26px 54px -22px #000, inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px);
  animation: psetIn .16s ease-out;
}
@keyframes psetIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pset-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 11px; font-size: 12px; font-weight: 600; color: #e6edf3;
  cursor: move; user-select: none; touch-action: none;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  background: rgba(148, 163, 184, .05);
}
.pset-x {
  width: 18px; height: 18px; border-radius: 5px; cursor: pointer;
  display: grid; place-items: center; font-size: 14px; line-height: 1; color: #8b95a5;
}
.pset-x:hover { background: rgba(251, 113, 133, .18); color: #fda4af; }
.pset-b { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 9px; }
.pset-row { display: flex; align-items: center; gap: 8px; }
.pset-row em {
  flex: 0 0 30px; font-style: normal; font-size: 11px; color: #7f8a9b;
}
.pseg.sm { padding: 1px; gap: 2px; border-radius: 6px; }
.pseg.sm button { height: 20px; padding: 0 7px; font-size: 10.5px; border-radius: 5px; }
.pcolor { display: flex; gap: 6px; align-items: center; }
.pcolor button {
  width: 16px; height: 16px; border-radius: 50%; cursor: pointer;
  background: var(--c); border: 1px solid rgba(255, 255, 255, .24);
  transition: box-shadow .14s;
}
.pcolor button:hover { box-shadow: 0 0 0 2px rgba(148, 163, 184, .5); }
.pcolor button.on { box-shadow: 0 0 0 2px rgba(96, 165, 250, .9); }
.pset input[type="range"] {
  flex: 1; min-width: 0; height: 3px; accent-color: #3b82f6; cursor: pointer;
}
.pval { flex: 0 0 34px; text-align: right; font-size: 10.5px; color: #9aa6b8; font-weight: 500; }

/* 节点树显示：字色 / 背景 / 字号 */
.uibody .unode { color: var(--uic, #dfe6f2); }
.phone-screen[data-uibg="light"] .uimirror { background: #e9eef5; }
.phone-screen[data-uibg="light"] .uibody {
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18), 0 0 0 1px #d7dee8;
}
.phone-screen[data-uibg="light"] .unode { color: var(--uic, #1f2733); }
.phone-screen[data-uibg="light"] .unode.click { background: rgba(59, 130, 246, .1); outline-color: rgba(59, 130, 246, .32); }
.phone-screen[data-uibg="light"] .unode.edit { background: rgba(16, 185, 129, .12); outline-color: rgba(16, 185, 129, .5); }
.phone-screen[data-uibg="grid"] .uimirror {
  background-color: #06090e;
  background-image:
    linear-gradient(rgba(148, 163, 184, .085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .085) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* 画面缩放 */
.phone-screen { --zoom: 1; }
/* 画面尺寸与位置由 JS 按帧的真实比例算好后写进内联样式（保证不溢出手机屏幕框），
   这里只负责缩放倍率：zoom=1 时就是原样，放大时以中心为基准放大。 */
.phone-screen canvas.show {
  transform: scale(var(--zoom, 1));
  transform-origin: center center;
  object-fit: contain;
}

/* ---------- 设置面板：多选项排版 ---------- */
.pset-row.top { align-items: flex-start; }
.pset-row.top em { padding-top: 5px; }
.pseg.sm.wrap { flex-wrap: wrap; row-gap: 3px; max-width: 214px; }
.pcolor { flex-wrap: wrap; gap: 6px; max-width: 216px; align-items: center; }
.pcolor button.auto {
  background: conic-gradient(from 45deg, #f87171, #fbbf24, #34d399, #60a5fa, #a78bfa, #f87171);
  border-color: rgba(255, 255, 255, .3);
}
.pck {
  position: relative; width: 16px; height: 16px; border-radius: 50%;
  cursor: pointer; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .26);
  background: conic-gradient(from 180deg, #fda4af, #fcd34d, #6ee7b7, #93c5fd, #c4b5fd, #fda4af);
}
.pck:hover { box-shadow: 0 0 0 2px rgba(148, 163, 184, .5); }
.pck input {
  position: absolute; inset: -4px; width: 26px; height: 26px;
  opacity: 0; cursor: pointer; border: 0; padding: 0;
}

/* 节点树：圆角可调 */
.uibody .unode { border-radius: var(--uir, 3px); line-height: 1.05; }

/* ---------- 节点树背景预设 ---------- */
.phone-screen[data-uibg="green"] .uimirror { background: #cfe8d5; }
.phone-screen[data-uibg="green"] .uibody {
  background: #e6f5ea;
  box-shadow: 0 18px 40px rgba(31, 61, 43, .18), 0 0 0 1px #b7d7c1;
}
.phone-screen[data-uibg="paper"] .uimirror { background: #ece2cd; }
.phone-screen[data-uibg="paper"] .uibody {
  background: #fbf5e7;
  box-shadow: 0 18px 40px rgba(74, 58, 32, .2), 0 0 0 1px #ddceb2;
}
.phone-screen[data-uibg="blue"] .uimirror {
  background:
    radial-gradient(70% 50% at 50% 0%, #0d2038 0%, #050c17 70%);
}
.phone-screen[data-uibg="blue"] .uibody {
  background: #0a1728;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .5), 0 0 0 1px #17324f;
}
.phone-screen[data-uibg="green"] .unode.click,
.phone-screen[data-uibg="paper"] .unode.click { background: rgba(37, 99, 235, .1); outline-color: rgba(37, 99, 235, .3); }
.phone-screen[data-uibg="green"] .unode.edit,
.phone-screen[data-uibg="paper"] .unode.edit { background: rgba(5, 150, 105, .12); outline-color: rgba(5, 150, 105, .45); }

/* ==================================================================
   底部功能面板
   ================================================================== */
.fpanel {
  flex: 0 0 auto; padding: 6px 10px 9px;
  border-top: 1px solid rgba(148, 163, 184, .1);
  background: linear-gradient(180deg, rgba(10, 15, 22, .95), rgba(6, 10, 16, .99));
}
.fp-head { display: flex; align-items: center; gap: 6px; height: 24px; }
.fp-tabs { display: flex; gap: 3px; }
.fp-tabs button {
  height: 22px; padding: 0 10px; border-radius: 6px; cursor: pointer;
  font-size: 11.5px; color: #8b95a5; background: none; border: 1px solid transparent;
  transition: .12s;
}
.fp-tabs button:hover { color: #e6eefc; background: rgba(148, 163, 184, .1); }
.fp-tabs button.on {
  color: #fff; background: rgba(59, 130, 246, .22);
  border-color: rgba(96, 165, 250, .45);
}
.fp-mini {
  height: 22px; padding: 0 9px; border-radius: 6px; cursor: pointer;
  font-size: 11px; color: #8b95a5;
  background: rgba(148, 163, 184, .06);
  border: 1px solid rgba(148, 163, 184, .18);
  transition: .12s;
}
.fp-mini:hover { color: #e6eefc; border-color: rgba(96, 165, 250, .42); }
.fp-grid {
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(2, 30px);
  grid-auto-columns: minmax(96px, 1fr);
  gap: 5px; padding-top: 6px;
}
.fp-grid.rows1 { grid-template-rows: 30px; }
.fpanel.fold .fp-grid { display: none; }
.fbtn {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 9px;
  border-radius: 7px; cursor: pointer; text-align: left; font-size: 11.5px;
  color: #c6d0df; white-space: nowrap; overflow: hidden;
  background: rgba(148, 163, 184, .07);
  border: 1px solid rgba(148, 163, 184, .12);
  transition: .12s;
}
.fbtn:hover {
  color: #fff; background: rgba(59, 130, 246, .18);
  border-color: rgba(96, 165, 250, .45);
}
.fbtn:active { transform: translateY(1px); }
.fbtn i {
  width: 14px; flex: 0 0 14px; text-align: center;
  font-style: normal; font-size: 12px; opacity: .8;
}
.fbtn span { overflow: hidden; text-overflow: ellipsis; }
.fbtn.danger { color: #fda4af; background: rgba(251, 113, 133, .09); border-color: rgba(251, 113, 133, .22); }
.fbtn.danger:hover { background: rgba(251, 113, 133, .2); border-color: rgba(251, 113, 133, .5); }
.fbtn.on { color: #fff; background: rgba(34, 197, 94, .2); border-color: rgba(34, 197, 94, .48); }

/* 本地黑屏遮挡（防旁人偷看，不影响设备） */
.phone-screen.blackout::after {
  content: '屏幕已遮挡 · 仅本机隐藏';
  position: absolute; inset: 0; z-index: 25;
  display: grid; place-items: center;
  background: #000; color: #2c3542; font-size: 10.5px; letter-spacing: .5px;
}



/* ---- 顶部采集条 ---- */
.cbar {
  flex: 0 0 auto; display: flex; align-items: center;
  height: 38px; padding: 0 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  background: linear-gradient(180deg, rgba(11, 16, 24, .92), rgba(8, 12, 18, .88));
  overflow: hidden;
}
.cbar-label {
  flex: 0 0 auto; font-size: 11px; color: #6b7585; letter-spacing: .3px;
  padding-right: 10px; margin-right: 8px;
  border-right: 1px solid rgba(148, 163, 184, .14);
}
.cbar-scroll {
  flex: 1; min-width: 0; display: flex; align-items: center;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.cbar-scroll::-webkit-scrollbar { display: none; }
.cbar::-webkit-scrollbar { display: none; }
.cbar-in { display: flex; align-items: center; gap: 6px; min-width: max-content; }
.cbar button {
  display: flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 13px;
  font-size: 11px; color: #b9c3d2; white-space: nowrap; cursor: pointer;
  background: rgba(148, 163, 184, .07);
  border: 1px solid rgba(148, 163, 184, .14);
  transition: .12s;
}
.cbar button:hover {
  color: #fff; background: rgba(59, 130, 246, .2);
  border-color: rgba(96, 165, 250, .5);
}
.cbar button:active { transform: translateY(1px); }
.cbar button svg {
  width: 12px; height: 12px; flex: 0 0 12px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.cbar button.hot {
  color: #fda4af; background: rgba(251, 113, 133, .1);
  border-color: rgba(251, 113, 133, .34);
}
.cbar button.hot:hover { background: rgba(251, 113, 133, .22); border-color: rgba(251, 113, 133, .6); }
.cbar button.on { color: #fff; background: rgba(34, 197, 94, .22); border-color: rgba(34, 197, 94, .5); }


/* ---- 右栏：设备状态 ---- */
.stat-list { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 7px; }
.stat-row { display: flex; align-items: center; gap: 8px; }
.stat-row em { flex: 0 0 34px; width: 34px; white-space: nowrap; font-style: normal; font-size: 11px; color: #6b7588; }
.sbar {
  flex: 1; min-width: 0; height: 5px; border-radius: 3px;
  background: rgba(148, 163, 184, .14); overflow: hidden;
}
.sbar i {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6, #22d3ee);
  transition: width .35s ease, background .3s;
}
.sbar i.warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.sbar i.bad { background: linear-gradient(90deg, #ef4444, #fb7185); }
.stat-row b {
  flex: 0 0 46px; text-align: right; font-size: 11px; font-weight: 600;
  color: #d3dcea; font-variant-numeric: tabular-nums;
}
.stat-row b.wide { flex: 1; text-align: right; color: #b9c3d2; font-weight: 500; }

/* ---- 右栏：实时事件 ---- */
.ev-card { flex: 1 1 auto; min-height: 104px; display: flex; flex-direction: column; }
.ev-list {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 5px;
}
.ev-list .ev { display: flex; gap: 7px; font-size: 11px; line-height: 1.5; }
.ev-list .ev .t { flex: 0 0 auto; color: #55607a; font-variant-numeric: tabular-nums; }
.ev-list .ev .m {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #9aa6b8;
}
.ev-list .ev.ok .m { color: #74e0a6; }
.ev-list .ev.bad .m { color: #fda4af; }
.ev-list .ev.warn .m { color: #fcd34d; }
.ev-list .events-empty { color: #55607a; font-size: 11px; padding: 6px 0; }

/* 右栏紧凑：设备信息行距压缩，给事件卡留空间 */
.stage-side .side-kv div { padding: 5px 0; }
.stage-side .side-card { border-radius: 10px; }

/* 状态卡里的宽内容行（设备号 / 连接） */
.stat-row b.wide.mono { font-family: Consolas, "SF Mono", monospace; font-size: 10.5px; letter-spacing: .2px; }
.stat-row:has(b.wide.mono) { gap: 6px; }


/* ---- 右栏：数据采集列表 ---- */
.collect-card { flex: 1 1 auto; min-height: 0; height: 100%; display: flex; flex-direction: column; }
.collect-list {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px;
}
.collect-list button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  flex: 1 1 0; min-height: 30px; max-height: 40px;
  padding: 0 10px; border-radius: 8px; cursor: pointer;
  font-size: 12px; color: #c6d0df; text-align: left;
  background: rgba(148, 163, 184, .06);
  border: 1px solid rgba(148, 163, 184, .1);
  transition: .12s;
}
.collect-list button:hover {
  color: #fff; background: rgba(59, 130, 246, .18);
  border-color: rgba(96, 165, 250, .45);
}
.collect-list button:active { transform: translateY(1px); }
.collect-list button svg {
  width: 14px; height: 14px; flex: 0 0 14px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.collect-list button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collect-list button em {
  font-style: normal; font-size: 12px; color: #4e5765; flex: 0 0 auto;
}
.collect-list button.hot {
  color: #fda4af; background: rgba(251, 113, 133, .1);
  border-color: rgba(251, 113, 133, .3);
}
.collect-list button.hot em { color: #b4636f; }
.collect-list button.on { color: #fff; background: rgba(34, 197, 94, .2); border-color: rgba(34, 197, 94, .45); }


/* ==================================================================
   中间：数据采集面板（横排按钮矩阵）
   ================================================================== */
.cpanel {
  position: absolute; z-index: 41;
  left: calc(var(--pw, 210px) * 2 + 66px);
  right: 10px; top: 12px; bottom: 10px;
  display: flex; flex-direction: column;
  padding: 11px 13px 13px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 24, 34, .92), rgba(11, 16, 24, .96));
  border: 1px solid rgba(148, 163, 184, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 20px 40px -30px #000;
}
.cp-head { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 10px; }
.cp-head b { font-size: 12.5px; font-weight: 600; color: #e6edf3; }
.cp-head .cst { font-size: 11px; color: #6b7585; }
.cp-grid {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(44px, 1fr);
  gap: 8px;
}
.cp-grid button {
  display: flex; align-items: center; gap: 9px;
  height: auto; padding: 0 12px; border-radius: 9px; cursor: pointer;
  font-size: 12.5px; color: #c6d0df; text-align: left;
  white-space: nowrap; overflow: hidden;
  background: rgba(148, 163, 184, .07);
  border: 1px solid rgba(148, 163, 184, .12);
  transition: .12s;
}
.cp-grid button:hover {
  color: #fff; background: rgba(59, 130, 246, .18);
  border-color: rgba(96, 165, 250, .45);
}
.cp-grid button:active { transform: translateY(1px); }
.cp-grid button svg {
  width: 16px; height: 16px; flex: 0 0 16px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.cp-grid button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cp-grid button.hot {
  color: #fda4af; background: rgba(251, 113, 133, .1);
  border-color: rgba(251, 113, 133, .3);
}
.cp-grid button.hot:hover { background: rgba(251, 113, 133, .22); border-color: rgba(251, 113, 133, .6); }
.cp-grid button.on { color: #fff; background: rgba(34, 197, 94, .2); border-color: rgba(34, 197, 94, .45); }

/* 窄屏：中间面板折到两列 */
@media (max-width: 1180px) {
  .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-grid button { height: 36px; }
}
@media (max-width: 980px) {
  .cpanel { display: none; }
}


/* ==================================================================
   右侧：数据面板（标签 + 表格），对齐雄鹰设备页布局
   ================================================================== */
.stage { grid-template-columns: 1fr; }
.dpanel {
  position: absolute; z-index: 41;
  left: calc(var(--pw, 210px) * 2 + 66px);
  right: 10px; top: 12px; bottom: 10px;
  display: flex; flex-direction: column;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 21, 30, .96), rgba(10, 14, 21, .98));
  border: 1px solid rgba(148, 163, 184, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.dp-tabs {
  display: flex; gap: 2px; padding: 7px 8px 0; flex: 0 0 auto;
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid rgba(148, 163, 184, .1);
}
.dp-tabs::-webkit-scrollbar { display: none; }
.dp-tabs button {
  flex: 0 0 auto; height: 30px; padding: 0 12px; cursor: pointer;
  border-radius: 7px 7px 0 0; border: 1px solid transparent; border-bottom: 0;
  font-size: 11.5px; color: #8b95a5; white-space: nowrap; background: none;
  transition: .12s;
}
.dp-tabs button:hover { color: #e6eefc; background: rgba(148, 163, 184, .08); }
.dp-tabs button.on {
  color: #fff; background: rgba(59, 130, 246, .18);
  border-color: rgba(96, 165, 250, .38);
}
.dp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.dp-tools { display: flex; gap: 8px; padding: 10px 12px 8px; flex: 0 0 auto; }
.dp-tools input {
  flex: 1; min-width: 0; height: 30px; padding: 0 11px; border-radius: 7px;
  background: #0b0f16; border: 1px solid #232c3a; color: #dfe4ee;
  font-size: 11.5px; outline: none;
}
.dp-tools input:focus { border-color: rgba(96, 165, 250, .55); }
.dp-tools button {
  height: 30px; padding: 0 14px; border-radius: 7px; cursor: pointer;
  font-size: 11.5px; color: #cfd8e5;
  background: #1d4ed8; border: 1px solid #2563eb;
}
.dp-tools button.ghost {
  background: rgba(148, 163, 184, .08); border-color: rgba(148, 163, 184, .18); color: #9aa6b8;
}
.dp-tools button:hover { filter: brightness(1.12); }

.dp-table { flex: 1; min-height: 0; overflow: auto; }
.dp-t { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.dp-t th {
  position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 500;
  padding: 8px 10px; color: #7f8a9b; background: #0e131b;
  border-bottom: 1px solid rgba(148, 163, 184, .12); white-space: nowrap;
}
.dp-t td {
  padding: 7px 10px; color: #c6d0df; white-space: nowrap;
  border-bottom: 1px solid rgba(148, 163, 184, .07);
  max-width: 240px; overflow: hidden; text-overflow: ellipsis;
}
.dp-t tbody tr:hover td { background: rgba(59, 130, 246, .07); }
.dp-t .muted { color: #6b7588; }
.dp-t .mono { font-family: Consolas, "SF Mono", monospace; font-size: 10.5px; }
.dp-empty { flex: 1; display: grid; place-items: center; color: #55607a; font-size: 12px; text-align: center; padding: 0 20px; }
.dp-pager {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 8px 12px; border-top: 1px solid rgba(148, 163, 184, .1);
  font-size: 11px; color: #7f8a9b;
}
.dp-pager button {
  height: 24px; padding: 0 10px; border-radius: 6px; cursor: pointer;
  font-size: 11px; color: #b9c3d2;
  background: rgba(148, 163, 184, .08); border: 1px solid rgba(148, 163, 184, .16);
}
.dp-pager button:hover { color: #fff; border-color: rgba(96, 165, 250, .42); }
.dp-pager button:disabled { opacity: .35; cursor: not-allowed; }

/* 设备状态页 */
.dp-status { flex: 1; min-height: 0; display: flex; gap: 14px; padding: 12px; }
.dp-stat { flex: 0 0 210px; display: flex; flex-direction: column; gap: 10px; }
.dp-ev { flex: 1; min-width: 0; display: flex; flex-direction: column;
  border-radius: 9px; background: rgba(148, 163, 184, .04); border: 1px solid rgba(148, 163, 184, .1); }
.dp-ev-h { padding: 8px 10px; font-size: 11.5px; color: #b9c3d2; border-bottom: 1px solid rgba(148, 163, 184, .1); }
.dp-ev-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.dp-ev-list .ev { display: flex; gap: 7px; font-size: 11px; }
.dp-ev-list .ev .t { color: #55607a; }
.dp-ev-list .ev .m { color: #9aa6b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-ev-list .ev.ok .m { color: #74e0a6; }
.dp-ev-list .ev.bad .m { color: #fda4af; }
.dp-ev-list .ev.warn .m { color: #fcd34d; }
@media (max-width: 980px) { .dpanel { display: none; } }

/* 状态页字号略大一点 */
.dp-stat .stat-row em { font-size: 12px; color: #7b8697; }
.dp-stat .stat-row b { font-size: 12px; }
.dp-stat .stat-row b.wide { font-size: 11.5px; }
.dp-stat .sbar { height: 6px; }
.dp-stat { gap: 12px; }


/* ==================================================================
   设备列表：卡片视图 / 表格视图
   ================================================================== */
.dv-view {
  display: flex; gap: 2px; margin-left: 6px; padding: 2px;
  border-radius: 8px; background: rgba(148, 163, 184, .08);
  border: 1px solid rgba(148, 163, 184, .14);
}
.dv-view button {
  width: 27px; height: 24px; border-radius: 6px; cursor: pointer;
  display: grid; place-items: center; color: #8b95a5; background: none; border: 0;
}
.dv-view button:hover { color: #e6eefc; background: rgba(148, 163, 184, .12); }
.dv-view button.on { background: rgba(59, 130, 246, .3); color: #fff; }
.dv-view button svg { width: 14px; height: 14px; }

/* ---- 卡片 ---- */
.dv-grid.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px; padding: 14px;
}
.dv-grid.cards .dcard {
  padding: 8px 8px 10px; border-radius: 14px;
  background: linear-gradient(180deg, #131922, #0e131b);
  border: 1px solid rgba(148, 163, 184, .13);
  transition: .16s;
}
.dv-grid.cards .dcard:hover {
  border-color: rgba(96, 165, 250, .45);
  box-shadow: 0 14px 30px -18px #000;
  transform: translateY(-2px);
}
.dv-grid.cards .dcard.off { opacity: .62; }
.dc-thumb {
  position: relative; width: 100%; aspect-ratio: 9 / 15.5;
  border-radius: 10px; overflow: hidden; background: #080b11;
  border: 1px solid rgba(148, 163, 184, .1);
}
.dc-thumb img { width: 100%; height: 100%; object-fit: cover; display: none; }
.dc-thumb img[src] { display: block; }
.dc-noimg {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 10.5px; color: #3a4351;
}
.dc-thumb img[src] + .dc-noimg { display: none; }
.dc-live {
  position: absolute; left: 6px; top: 6px; z-index: 2;
  padding: 1px 7px; border-radius: 5px; font-size: 10px;
  color: #fda4af; background: rgba(251, 113, 133, .16);
  border: 1px solid rgba(251, 113, 133, .3);
}
.dc-live.on {
  color: #86efac; background: rgba(34, 197, 94, .16);
  border-color: rgba(34, 197, 94, .38);
}
.dc-flag {
  position: absolute; right: 6px; top: 6px; z-index: 2;
  padding: 1px 7px; border-radius: 5px; font-size: 10px;
  color: #dbe4f0; background: rgba(8, 12, 18, .68);
  border: 1px solid rgba(148, 163, 184, .2);
}
.dc-hud {
  position: absolute; left: 6px; right: 6px; bottom: 30px; z-index: 2;
  display: flex; gap: 4px;
}
.dc-hud span {
  flex: 1; text-align: center; padding: 2px 0; border-radius: 5px;
  font-size: 9.5px; color: #cfe0ff;
  background: rgba(8, 12, 18, .62); border: 1px solid rgba(96, 165, 250, .28);
  backdrop-filter: blur(2px);
}
.dc-a11y {
  position: absolute; left: 6px; bottom: 6px; z-index: 2;
  padding: 2px 8px; border-radius: 5px; font-size: 9.5px;
  color: #a9cbff; background: rgba(37, 99, 235, .28);
  border: 1px solid rgba(96, 165, 250, .4);
}
.dc-info { padding: 9px 3px 0; display: flex; flex-direction: column; gap: 3px; }
.dc-name {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: #e9eef8;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.dc-name b {
  flex: 0 0 auto; min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 4px;
  font-size: 10px; font-weight: 600; color: #cfe0ff;
  background: rgba(59, 130, 246, .22);
}
.dc-name span { overflow: hidden; text-overflow: ellipsis; }
.dc-pin { font-size: 10.5px; color: #7f8a9b; letter-spacing: .3px; }
.dc-note {
  font-size: 10.5px; color: #7f8a9b; cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.dc-note:hover { color: #93c5fd; }
.dc-note i { font-style: normal; }
.dc-country { font-size: 11px; color: #9aa6b8; }
.dc-sum { font-size: 10.5px; color: #6b7588; }
.dc-bank {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: #b9c3d2;
}
.dc-bank i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22d3ee; box-shadow: 0 0 6px rgba(34, 211, 238, .8);
}
.dc-created { font-size: 10px; color: #4e5765; }

/* ---- 表格 ---- */
.dv-grid.list { display: block; padding: 0 10px 10px; overflow-x: auto; }
.dvt { width: 100%; border-collapse: collapse; font-size: 12px; }
.dvt th {
  position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 500;
  padding: 9px 10px; color: #7f8a9b; white-space: nowrap;
  background: #0b0f16; border-bottom: 1px solid rgba(148, 163, 184, .14);
}
.dvt td {
  padding: 9px 10px; color: #c6d0df; white-space: nowrap;
  border-bottom: 1px solid rgba(148, 163, 184, .07);
  max-width: 260px; overflow: hidden; text-overflow: ellipsis;
}
.dvt tbody tr { cursor: pointer; }
.dvt tbody tr:hover td { background: rgba(59, 130, 246, .07); }
.dvt .c { text-align: center; }
.dvt .mono { font-family: Consolas, "SF Mono", monospace; font-size: 11px; color: #9fb4d6; }
.dvt .muted { color: #6b7588; }
.dvt em.muted { font-style: normal; font-size: 11px; }
.st-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #46505e;
}
.st-dot.on { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, .85); }
.tag.off {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 10.5px; color: #6b7585;
  background: rgba(148, 163, 184, .1);
  border: 1px solid rgba(148, 163, 184, .14);
}
.dvt-acts { display: flex; gap: 3px; justify-content: center; }
.dvt-acts .dca {
  width: 22px; height: 22px; border-radius: 5px; cursor: pointer;
  display: grid; place-items: center; color: #8b95a5; background: none; border: 0;
}
.dvt-acts .dca:hover { color: #fff; background: rgba(59, 130, 246, .22); }
.dvt-acts .dca svg { width: 13px; height: 13px; }


/* 打开方式切换 */
.dv-open {
  display: flex; gap: 2px; margin-left: 6px; padding: 2px;
  border-radius: 8px; background: rgba(148, 163, 184, .08);
  border: 1px solid rgba(148, 163, 184, .14);
}
.dv-open button {
  height: 24px; padding: 0 9px; border-radius: 6px; cursor: pointer;
  font-size: 11px; color: #8b95a5; background: none; border: 0; white-space: nowrap;
}
.dv-open button:hover { color: #e6eefc; background: rgba(148, 163, 184, .12); }
.dv-open button.on { background: rgba(59, 130, 246, .3); color: #fff; }

/* 表格更紧凑，操作列可见 */
.dvt { font-size: 11.5px; }
.dvt td, .dvt th { padding: 8px 8px; }
.dvt td { max-width: 200px; }
.dvt-acts .dca { width: 20px; height: 20px; }
@media (max-width: 1280px) {
  .dv-open button { padding: 0 7px; font-size: 10.5px; }
}


/* ==================================================================
   设备卡片：悬停显示「内部窗口 / 新窗口」打开
   ================================================================== */
.dc-open {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  opacity: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, rgba(8, 13, 22, .58), rgba(6, 9, 14, .78));
  transition: opacity .15s ease;
}
.dc-thumb:hover .dc-open,
.dcard:hover .dc-open { opacity: 1; pointer-events: auto; }
.dc-open button {
  width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center; color: #dbeafe;
  background: rgba(17, 24, 37, .88);
  border: 1px solid rgba(148, 163, 184, .34);
  box-shadow: 0 8px 20px -10px #000;
  transition: transform .12s, background .12s, border-color .12s;
}
.dc-open button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.dc-open button:hover { transform: translateY(-1px); }
.dc-open button[data-open="in"] {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-color: rgba(96, 165, 250, .9);
  box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .95);
}
.dc-open button[data-open="new"]:hover {
  color: #fff; background: rgba(34, 211, 238, .26); border-color: rgba(34, 211, 238, .7);
}

/* 新窗口模式：只留设备控制页 */
body.solo .xy-side { display: none !important; }
body.solo .xytop { display: none !important; }
body.solo .main { padding: 0; }

/* 投屏开关：正在投屏时按钮变「关闭」，用暖色区分，避免误以为还能再开一次 */
.pbar .pbtn.live {
  color: #ffd9d9;
  background: rgba(239, 68, 68, .18);
  border-color: rgba(239, 68, 68, .55);
}
.pbar .pbtn.live:hover {
  background: rgba(239, 68, 68, .30);
  border-color: rgba(239, 68, 68, .78);
}

/* 通道按钮禁用态：设备不支持就灰掉，别让人以为能点 */
.pseg button:disabled {
  opacity: .32;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ---- 卡片右上角删除按钮 ---- */
.dc-del {
  position: absolute; right: 6px; top: 6px; z-index: 6;
  width: 21px; height: 21px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  font-size: 14px; line-height: 1; font-weight: 600;
  color: #ff9d9d;
  background: rgba(20, 8, 10, .78);
  border: 1px solid rgba(239, 68, 68, .5);
  transition: background .12s, color .12s, border-color .12s, transform .12s;
}
.dc-del:hover {
  color: #fff; background: #dc2626; border-color: #ef4444;
  transform: scale(1.08);
}
/* 国家标签让位到删除按钮下面 */
.dc-flag { top: 32px; }

/* 被删除设备的恢复入口：橙红提示，别让人找不到 */
#dv-unblock.warn {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, .5);
  background: rgba(239, 68, 68, .12);
}
#dv-unblock.warn:hover {
  color: #fff;
  background: rgba(239, 68, 68, .85);
  border-color: #ef4444;
}

/* ---- 画面区加载态：点「开启」立刻转圈，别让人以为没反应 ---- */
.pspin {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: rgba(6, 9, 14, .82); backdrop-filter: blur(1px);
}
.pspin[hidden] { display: none; }
.pspin i {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(96, 165, 250, .22);
  border-top-color: #60a5fa;
  animation: ggspin .8s linear infinite;
}
.pspin span { font-size: 12px; color: #9fb3cc; letter-spacing: .5px; }
@keyframes ggspin { to { transform: rotate(360deg); } }
.pbar .pbtn:disabled {
  opacity: .75; cursor: progress;
}

/* ---- 手机底部导航条：返回 / 主页 / 最近任务 / 通知 / 锁屏 ----
   宽度跟手机同宽（--pw），视觉上是手机底座上的一排实体键 */
.pnav {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: stretch;
  gap: 4px; width: var(--pw); height: 32px;
  padding: 3px 5px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 34, 48, .94), rgba(8, 12, 19, .97));
  border: 1px solid rgba(148, 163, 184, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 24px -20px #000;
  user-select: none; -webkit-user-select: none;
}
.pslot.on .pnav {
  border-color: color-mix(in srgb, var(--k, #60a5fa) 40%, rgba(148, 163, 184, .16));
}
.pnav .pk {
  flex: 1 1 0; min-width: 0; height: 26px; padding: 0;
  display: grid; place-items: center;
  border-radius: 9px; cursor: pointer;
  color: #9fb3cc; background: transparent; border: 1px solid transparent;
  transition: color .12s, background .12s, border-color .12s, transform .08s;
}
.pnav .pk svg {
  width: 15px; height: 15px; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.85;
  stroke-linecap: round; stroke-linejoin: round;
}
.pnav .pk:hover { color: #e6edf3; background: rgba(96, 165, 250, .14); border-color: rgba(96, 165, 250, .3); }
.pnav .pk:active,
.pnav .pk.hit { transform: scale(.88); color: #fff; background: rgba(96, 165, 250, .34); }
.pnav .pk.danger:hover { color: #fca5a5; background: rgba(239, 68, 68, .16); border-color: rgba(239, 68, 68, .36); }
.pnav .pk.danger:active,
.pnav .pk.danger.hit { background: rgba(239, 68, 68, .38); color: #fff; }
.pnav .pk:disabled { opacity: .3; cursor: not-allowed; transform: none; background: transparent; }

/* 机身侧键也能点：电源=锁屏，上下键=音量。细条加透明命中区，不然 3px 点不到 */
.phone-key { cursor: pointer; position: absolute; }
.phone-key::after { content: ''; position: absolute; inset: -4px -7px; }
.phone-key:hover { background: linear-gradient(90deg, #3b82f6, #93c5fd 60%, #2563eb); }
.phone-key:active { background: #60a5fa; }

/* ---- 锁屏提示：只在画面顶部出一条小胶囊，不再铺满整屏挡画面 ----
   展开时才在画面底部弹出操作卡，上方画面照样看得见 */
.phone-screen .lockhint {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  z-index: 9; pointer-events: auto;
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px 0 7px;
  border-radius: 12px; cursor: pointer; white-space: nowrap;
  font-size: 10.5px; letter-spacing: .2px;
  color: #ffd9a8;
  background: rgba(30, 20, 8, .84);
  border: 1px solid rgba(245, 158, 11, .45);
  box-shadow: 0 6px 16px -10px #000;
}
.phone-screen .lockhint:hover {
  color: #1a1206; background: #f5b544; border-color: #f59e0b;
}
.phone-screen .lockhint[hidden] { display: none; }
.lockhint .lh-ico { font-size: 11px; }
.lockhint .lh-go { opacity: .75; }

.phone-screen .locked {
  inset: auto 6px 6px 6px;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0; border-radius: 14px;
  background: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.phone-screen .locked[hidden] { display: none; }
.phone-screen .locked-card {
  position: relative;
  width: 100%; max-width: 100%;
  padding: 12px 10px 10px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 26, 38, .98), rgba(12, 17, 25, .99));
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 10px 26px -18px #000;
}
.phone-screen .locked-t { font-size: 12px; font-weight: 600; margin: 0 0 2px; }
.phone-screen .locked input { margin-top: 6px; padding: 6px 8px; font-size: 11px; }
.phone-screen .locked-btns { margin-top: 6px; }
.phone-screen .locked-btns button { padding: 6px; font-size: 11px; }
.lock-close {
  position: absolute; right: 5px; top: 4px;
  width: 18px; height: 18px; padding: 0; line-height: 1;
  display: grid; place-items: center;
  border-radius: 50%; cursor: pointer; font-size: 13px;
  color: #8a94a6; background: transparent; border: 0;
}
.lock-close:hover { color: #fff; background: rgba(148, 163, 184, .22); }

/* ---- 导航键改到手机屏幕内部底部（用户要求：贴在画面里，不再挂在外框下面） ---- */
.phone-screen .pnav {
  position: absolute; left: 7px; right: 7px; bottom: 18px; z-index: 7;
  width: auto; height: 27px; padding: 2px 4px;
  display: flex; align-items: center; gap: 2px;
  border-radius: 14px;
  background: rgba(8, 12, 19, .58);
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 8px 20px -14px #000;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity .15s;
}
/* 画面在播时不抢视觉：淡一点，鼠标移上去恢复 */
.phone-screen .pnav { opacity: .78; }
.phone-screen:hover .pnav,
.phone-screen .pnav:hover { opacity: 1; }
.phone-screen .pnav .pk { height: 22px; border-radius: 7px; }
.phone-screen .pnav .pk svg { width: 13px; height: 13px; }
.phone-screen .pnav .pk:hover { background: rgba(96, 165, 250, .26); }

/* ---- 节点树控件：鼠标移上去就有反馈，能点的一眼看得出来 ---- */
.uibody .unode {
  cursor: pointer;
  transition: background .12s ease, outline-color .12s ease,
              box-shadow .12s ease, color .12s ease;
}
/* 所有节点：淡蓝底 + 亮边框 + 外发光，并浮到最上层（否则相邻节点会盖住边框） */
.uibody .unode.hover {
  z-index: 3;
  background: rgba(96, 165, 250, .20);
  outline: 1px solid rgba(147, 197, 253, .85);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, .20), 0 0 14px -2px rgba(96, 165, 250, .6);
}
/* 可点击的控件更亮一档 */
.uibody .unode.click.hover {
  background: rgba(96, 165, 250, .34);
  outline-color: #bfdbfe;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, .3), 0 0 18px -2px rgba(96, 165, 250, .85);
}
/* 输入框：绿色，跟 edit 常态一致 */
.uibody .unode.edit.hover {
  background: rgba(16, 185, 129, .30);
  outline: 1px dashed #6ee7b7;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .28), 0 0 18px -2px rgba(16, 185, 129, .8);
}
/* 纯文字节点：灰蓝，提示"这里也能点，但只是文字" */
.uibody .unode.txt.hover {
  background: rgba(148, 163, 184, .16);
  outline: 1px solid rgba(148, 163, 184, .6);
  box-shadow: 0 0 12px -3px rgba(148, 163, 184, .55);
}

/* 浅色 / 浅绿 / 纸色背景下换成深一点的蓝，别糊成一片 */
.phone-screen[data-uibg="light"] .uibody .unode.hover,
.phone-screen[data-uibg="paper"] .uibody .unode.hover,
.phone-screen[data-uibg="green"] .uibody .unode.hover {
  background: rgba(37, 99, 235, .16);
  outline-color: rgba(37, 99, 235, .75);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .18), 0 0 12px -2px rgba(37, 99, 235, .45);
}
.phone-screen[data-uibg="light"] .uibody .unode.click:hover,
.phone-screen[data-uibg="paper"] .uibody .unode.click:hover,
.phone-screen[data-uibg="green"] .uibody .unode.click.hover {
  background: rgba(37, 99, 235, .28);
  outline-color: #1d4ed8;
}
.phone-screen[data-uibg="light"] .uibody .unode.edit:hover,
.phone-screen[data-uibg="paper"] .uibody .unode.edit:hover,
.phone-screen[data-uibg="green"] .uibody .unode.edit.hover {
  background: rgba(5, 150, 105, .22);
  outline-color: #047857;
}

/* 节点树：禁止选中文字（按住拖动时浏览器会把所有文本选蓝，看着像界面糊了） */
.uibody,
.uibody .unode {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.uibody { touch-action: none; }
.uibody ::selection,
.uibody::selection { background: transparent; }

/* 高亮由 JS 按坐标反查后打 .hover 类（节点本身仍接收指针，否则 elementsFromPoint 查不到）。
   空容器节点在 JS 里被排除，所以指到空白不会亮一大片。 */
.uibody.on-node { cursor: pointer; }

/* ---- 框线（骨架）颜色可调：--uin，auto 时跟随字色 --uic ---- */
.phone-screen .uibody .unode.click {
  outline: 1px solid color-mix(in srgb, var(--uin, #3b82f6) 58%, transparent);
  background: color-mix(in srgb, var(--uin, #3b82f6) 13%, transparent);
}
.phone-screen .uibody .unode.edit {
  outline: 1px dashed color-mix(in srgb, var(--uin, #10b981) 78%, transparent);
  background: color-mix(in srgb, var(--uin, #10b981) 14%, transparent);
}
.phone-screen .uibody .unode.hover {
  outline: 1px solid var(--uin, #60a5fa);
  background: color-mix(in srgb, var(--uin, #60a5fa) 24%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--uin, #60a5fa) 22%, transparent),
              0 0 14px -2px color-mix(in srgb, var(--uin, #60a5fa) 65%, transparent);
}
.phone-screen .uibody .unode.click.hover {
  outline-color: var(--uin, #93c5fd);
  background: color-mix(in srgb, var(--uin, #93c5fd) 34%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--uin, #93c5fd) 30%, transparent),
              0 0 18px -2px color-mix(in srgb, var(--uin, #93c5fd) 82%, transparent);
}
.phone-screen .uibody .unode.edit.hover {
  outline-color: var(--uin, #34d399);
  background: color-mix(in srgb, var(--uin, #34d399) 30%, transparent);
}
.phone-screen .uibody .unode.txt.hover {
  outline: 1px solid color-mix(in srgb, var(--uin, #94a3b8) 62%, transparent);
  background: color-mix(in srgb, var(--uin, #94a3b8) 16%, transparent);
  box-shadow: 0 0 12px -3px color-mix(in srgb, var(--uin, #94a3b8) 55%, transparent);
}

/* ---- 拖动轨迹层：画在画面之上，不吃鼠标事件 ---- */
/* 用 .phone-screen canvas.ptrail 压过通用规则 .phone-screen canvas（那条会 display:none） */
.phone-screen canvas.ptrail {
  position: absolute; inset: 0;
  z-index: 30;
  display: block;
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  object-fit: fill;
  opacity: 1;
  pointer-events: none;
  border-radius: 26px;
  box-shadow: none;
  transform: none;
  background: transparent !important;   /* 别继承画面 canvas 的深色底，否则整块挡住画面 */
}

/* 等手机授权时的按钮态：橙色，点一下可以取消 */
.pbar .pbtn.wait {
  color: #fcd34d;
  background: rgba(245, 158, 11, .16);
  border-color: rgba(245, 158, 11, .5);
}
.pbar .pbtn.wait:hover {
  background: rgba(245, 158, 11, .3);
  border-color: rgba(245, 158, 11, .8);
}

/* 通道锁定态：正在投屏时其它通道灰掉（区别于"设备不支持"的删除线） */
.pseg button.locked {
  opacity: .34;
  text-decoration: none;
  filter: grayscale(.75);
  cursor: not-allowed;
}
.pseg button.locked:hover { background: transparent; }

/* ---- 点「录屏」前的确认条（仿常见远控的告警样式） ---- */
.cconf {
  position: absolute; left: 0; right: 0; top: 46px; z-index: 22;
  margin: 0 2px; padding: 9px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(60, 26, 20, .98), rgba(38, 16, 12, .99));
  border: 1px solid rgba(239, 68, 68, .55);
  box-shadow: 0 16px 34px -20px #000;
  display: flex; flex-direction: column; gap: 8px;
}
.cconf[hidden] { display: none; }
.cc-row { display: flex; gap: 6px; align-items: flex-start; }
.cc-warn { color: #f59e0b; font-size: 13px; line-height: 1.25; }
.cc-txt { color: #f3b4a8; font-size: 11.5px; line-height: 1.65; }
.cc-btns { display: flex; justify-content: flex-end; gap: 6px; }
.cc-btns button {
  padding: 5px 11px; font-size: 11.5px; border-radius: 7px;
  border: 1px solid transparent; cursor: pointer;
}
.cc-cancel { background: rgba(148, 163, 184, .12); border-color: rgba(148, 163, 184, .3); color: #c3ccdb; }
.cc-cancel:hover { background: rgba(148, 163, 184, .24); }
.cc-ok { background: linear-gradient(135deg, #dc2626, #f97316); color: #fff; font-weight: 600; }
.cc-ok:hover { filter: brightness(1.12); }

/* ---- 右列数据面板标签：放大 + 胶囊化（原来 11.5px/30px 太小太挤） ---- */
.dp-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 11px 9px;
  overflow: visible;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  background: linear-gradient(180deg, rgba(18, 24, 36, .92), rgba(11, 16, 24, .6));
}
.dp-tabs button {
  flex: 0 0 auto;
  height: 33px; padding: 0 15px;
  border: 1px solid rgba(148, 163, 184, .16);   /* 覆盖原来的 border-bottom:0 */
  border-radius: 9px;                            /* 覆盖原来的 7px 7px 0 0 */
  font-size: 12.5px; font-weight: 500; letter-spacing: .2px;
  color: #9aa7ba; white-space: nowrap;
  background: rgba(148, 163, 184, .05);
  transition: color .14s, background .14s, border-color .14s, box-shadow .14s, transform .1s;
}
.dp-tabs button:hover {
  color: #eaf1ff;
  background: rgba(96, 165, 250, .13);
  border-color: rgba(96, 165, 250, .38);
}
.dp-tabs button:active { transform: translateY(1px); }
.dp-tabs button.on {
  color: #fff; font-weight: 600;
  background: linear-gradient(180deg, rgba(59, 130, 246, .55), rgba(37, 99, 235, .42));
  border-color: rgba(147, 197, 253, .8);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .22), 0 10px 20px -12px rgba(59, 130, 246, .95);
}

/* ---- 底部工具条重做：标签胶囊化 + 按钮放大 + 两行等宽（原来 30px 高太挤） ---- */
.fpanel {
  flex: 0 0 auto;
  padding: 9px 12px 11px;
  border-top: 1px solid rgba(148, 163, 184, .12);
  background: linear-gradient(180deg, rgba(12, 17, 26, .96), rgba(6, 10, 16, .99));
  box-shadow: 0 -12px 26px -20px #000;
}
.fp-head { height: 30px; gap: 8px; }
.fp-tabs { gap: 5px; }
.fp-tabs button {
  height: 27px; padding: 0 13px; border-radius: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: .2px;
  color: #9aa7ba;
  background: rgba(148, 163, 184, .05);
  border: 1px solid rgba(148, 163, 184, .14);
}
.fp-tabs button:hover { color: #eaf1ff; background: rgba(96, 165, 250, .13); border-color: rgba(96, 165, 250, .38); }
.fp-tabs button.on {
  color: #fff; font-weight: 600;
  background: linear-gradient(180deg, rgba(59, 130, 246, .5), rgba(37, 99, 235, .38));
  border-color: rgba(147, 197, 253, .75);
  box-shadow: 0 8px 16px -12px rgba(59, 130, 246, .95);
}
.fp-mini {
  height: 27px; padding: 0 11px; border-radius: 8px;
  font-size: 11.5px;
  background: rgba(148, 163, 184, .07);
  border-color: rgba(148, 163, 184, .2);
}
.fp-grid {
  grid-template-rows: repeat(2, 34px);
  grid-auto-columns: minmax(124px, 1fr);
  gap: 7px; padding-top: 9px;
  overflow-x: auto; scrollbar-width: none;
}
.fp-grid::-webkit-scrollbar { display: none; }
.fp-grid.rows1 { grid-template-rows: 34px; }
.fbtn {
  height: 34px; padding: 0 11px; gap: 8px;
  border-radius: 9px; font-size: 12px;
  background: rgba(148, 163, 184, .075);
  border: 1px solid rgba(148, 163, 184, .14);
}
.fbtn i {
  width: 18px; flex: 0 0 18px;
  font-size: 14px; opacity: .9; color: #8fb3ff;
}
.fbtn:hover i { color: #d6e6ff; }

/* 底部工具条改成一张悬浮卡片，和右侧数据面板统一 */
.fpanel {
  margin: 6px 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .12);
  background: linear-gradient(180deg, rgba(16, 22, 32, .96), rgba(9, 13, 20, .99));
  box-shadow: 0 12px 30px -24px #000, inset 0 1px 0 rgba(255, 255, 255, .04);
}
.fpanel.fold { padding-bottom: 9px; }

/* ---- 底部工具条：只占两个屏幕下方，按钮紧凑（原来铺满整行、间距太大） ---- */
.fpanel {
  align-self: flex-start;                       /* 不被 flex 拉满整行 */
  width: calc(var(--pw, 210px) * 2 + 44px);
  max-width: calc(100% - 24px);
  margin: 6px 0 10px 12px;
  padding: 7px 10px 9px;
}
.fp-head { height: 24px; gap: 6px; }
.fp-tabs button { height: 23px; padding: 0 10px; font-size: 11.5px; border-radius: 6px; }
.fp-mini { height: 23px; padding: 0 9px; font-size: 11px; border-radius: 6px; }
.fp-grid {
  grid-template-rows: repeat(2, 31px);
  grid-auto-columns: minmax(88px, 1fr);
  gap: 4px; padding-top: 6px;
}
.fp-grid.rows1 { grid-template-rows: 31px; }
.fbtn {
  height: 31px; padding: 0 7px; gap: 5px;
  border-radius: 7px; font-size: 11.5px;
}
.fbtn i { width: 14px; flex: 0 0 14px; font-size: 12.5px; }

/* dpanel 现在相对 .stage 定位，延伸到页面底部，和左下工具卡片齐平 */
.stage { position: relative; }

/* 底部工具条顶部再贴近手机一点（原来隔 28px，显得空） */
.fpanel { margin-top: 0; }

/* ================================================================
   快捷控制：48 键精简为 10 键 · 5 列 2 行
   第一行「屏幕」，第二行「防护」，用色相区分两组
   ================================================================ */
.fp-cap {
  font-size: 11.5px; font-weight: 600; letter-spacing: .4px;
  color: #c7d4e6;
}
.fp-state {
  height: 19px; padding: 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center;
  font-size: 10.5px; letter-spacing: .2px;
  color: #7f8da3;
  background: rgba(148, 163, 184, .08);
  border: 1px solid rgba(148, 163, 184, .15);
}
.fp-state.warn {
  color: #fda4af;
  background: rgba(251, 113, 133, .13);
  border-color: rgba(251, 113, 133, .38);
  box-shadow: 0 0 12px -4px rgba(251, 113, 133, .5);
}

.fp-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, 32px);
  grid-auto-columns: auto;
  grid-auto-flow: row;
  gap: 5px;
  padding-top: 7px;
  overflow: visible;
}

.fbtn {
  position: relative;
  height: 32px; padding: 0 7px; gap: 6px;
  border-radius: 8px;
  font-size: 11.5px; font-weight: 500;
  color: #c2cfe0;
  background: rgba(148, 163, 184, .07);
  border: 1px solid rgba(148, 163, 184, .14);
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
}
.fbtn i {
  width: 16px; flex: 0 0 16px;
  display: grid; place-items: center;
  font-size: 13px;
  color: #8fb3ff;
}
.fbtn i svg { width: 15px; height: 15px; }
.fbtn.g-grd i { color: #f0b46a; }
.fbtn:hover {
  color: #eef5ff;
  background: rgba(96, 165, 250, .13);
  border-color: rgba(96, 165, 250, .4);
}
.fbtn.g-grd:hover {
  background: rgba(245, 158, 11, .12);
  border-color: rgba(245, 158, 11, .38);
}
.fbtn.on {
  color: #fff;
  background: linear-gradient(180deg, rgba(34, 197, 94, .22), rgba(22, 163, 74, .14));
  border-color: rgba(34, 197, 94, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 14px -12px rgba(34, 197, 94, .8);
}
.fbtn.on i { color: #86efac; }
.fbtn.danger.on {
  background: linear-gradient(180deg, rgba(251, 113, 133, .24), rgba(190, 18, 60, .16));
  border-color: rgba(251, 113, 133, .58);
  box-shadow: 0 6px 14px -12px rgba(251, 113, 133, .9);
}
.fbtn .fdot {
  position: absolute; top: 5px; right: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: transparent;
  transition: background .14s, box-shadow .14s;
}
.fbtn.on .fdot { background: #34d399; box-shadow: 0 0 6px #34d399; }
.fbtn.danger.on .fdot { background: #fb7185; box-shadow: 0 0 6px #fb7185; }
.fbtn.busy { opacity: .55; pointer-events: none; }
.fbtn.busy i { animation: fbspin .8s linear infinite; }
@keyframes fbspin { to { transform: rotate(360deg); } }

/* 亮度面板说明行 */
.pnote {
  padding: 6px 2px 0;
  font-size: 10.5px; line-height: 1.5;
  color: #75839a;
}

/* 亮度调节：工具条内展开行（不遮挡画面） */
.fp-bright {
  display: flex; align-items: center; gap: 9px;
  margin-top: 7px; padding: 7px 9px;
  border-radius: 9px;
  background: rgba(148, 163, 184, .06);
  border: 1px solid rgba(148, 163, 184, .14);
  animation: fbin .16s ease-out;
}
@keyframes fbin { from { opacity: 0; transform: translateY(-3px); } }
.fb-ico { display: grid; place-items: center; width: 15px; color: #7dd3fc; }
.fb-ico svg { width: 14px; height: 14px; }
.fp-bright input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1 1 auto; height: 4px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(125, 211, 252, .75), rgba(96, 165, 250, .22));
  outline: none;
}
.fp-bright input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #e8f3ff;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, .75);
  cursor: pointer;
}
.fb-val {
  min-width: 34px; text-align: right;
  font-size: 11.5px; font-weight: 600; color: #bae6fd;
  font-variant-numeric: tabular-nums;
}
.fb-pre { display: flex; gap: 3px; }
.fb-pre button {
  height: 22px; padding: 0 7px; border-radius: 6px;
  font-size: 10.5px; color: #9fb0c6;
  background: rgba(148, 163, 184, .08);
  border: 1px solid rgba(148, 163, 184, .16);
}
.fb-pre button:hover { color: #eaf4ff; background: rgba(56, 189, 248, .16); border-color: rgba(56, 189, 248, .42); }
.fb-tip { font-size: 10px; color: #64748b; white-space: nowrap; }
.fpanel.fold .fp-bright { display: none; }
