/* LATools Test Console — 1:1 NSYS 布局样式
   尺寸/配色取自 NSYS 线上 style/common 样式实测：
   顶栏 63px #0b2129 · 侧栏 220px #29414d · 激活 #4c788f · 卡片 300px/.72em
   色带 rgba(51,190,191,.1) · 底条 #29414d · 绿 #219653 */

:root {
  --nav-bg: #0b2129;          /* NSYS .site-header background-color */
  --nav-active: #4c788f;      /* NSYS .active-product background */
  --side-bg: #29414d;         /* NSYS #sidebar background */
  --side-hover: #153142;      /* NSYS a.item:hover background */
  --side-active: #4c788f;     /* NSYS a.active background */
  --sub-bg: #112731;          /* NSYS .submenu background */
  --accent: #4c788f;
  --accent-bright: #3cc;      /* NSYS hover 色 */
  --accent-soft: #e6f2f7;     /* 选中态底色（列设置/表格 selected） */
  --mint: rgba(51,190,191,.1);/* NSYS .blue-light */
  --green: #219653;           /* NSYS .accent_succeed */
  --red: #eb5757;
  --warn: #b26a00;            /* 非阻断警告（目录不完整/刷新失败显示缓存） */
  --hub: #848f96;             /* NSYS .hub background */
  --text: #29414d;
  --muted: #8a97a3;
  --border: #dfe5ea;
  --card-bg: #ffffff;
  --page-bg: #f2f2f2;         /* NSYS #wrapper background */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  color: #29414d; background: var(--page-bg); font-size: 14px;
  display: flex; flex-direction: column; overflow: hidden;
}
.svg-icon { width: 1.5em; height: 1.5em; flex: 0 0 auto; display: inline-block; vertical-align: -0.25em; }

/* ===== 顶部主导航（NSYS .site-header height:63px）===== */
.topnav {
  background: var(--nav-bg); color: #fff; height: 63px;
  display: flex; align-items: stretch; flex: 0 0 auto; padding: 0 1rem;
}
.brand {
  display: flex; align-items: center; gap: 9px; padding: 0 1rem 0 0;
  font-weight: 700; font-size: 20px; letter-spacing: .3px; color: #fff; white-space: nowrap;
  text-decoration: none;
}
/* 与 NSYS 一致：品牌名青色、All-in-One 白色 */
.brand .main { color: var(--accent-bright); }
.brand .dot { color: #fff; }
/* LATools 分子式 logo：青/黄/绿点群（正式位图见 resources/img） */
.brand .logo-mark {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  object-fit: contain;
}
.login-brand .logo-mark { width: 40px; height: 40px; border-radius: 9px; vertical-align: -12px; margin-right: 10px; }
.topnav .modules { display: flex; align-items: stretch; }
.module {
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  color: #fff; text-decoration: none; font-size: 14.5px; white-space: nowrap;
  border-left: 1px solid #fff;
}
.module:first-child { border-left: none; }
.module:last-child { border-right: 1px solid #fff; }
.module .svg-icon { width: 1.4em; height: 1.4em; opacity: .95; }
.module:hover { background: rgba(255,255,255,.08); color: #fff; }
.module.active { background: var(--nav-active); border-left: none; border-radius: 4px; }
.module.active:first-child { border-left: none; }
.module.active + .module { border-left: none; }
.topnav .right { margin-left: auto; display: flex; align-items: stretch; }
.topnav .right .ritem {
  display: flex; align-items: center; gap: 6px; padding: 0 13px;
  color: #fff; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.topnav .right .ritem:hover { background: var(--page-bg); color: #29414d; }
.topnav .right .caret { font-size: 9px; opacity: .9; }

/* ===== 布局 ===== */
.layout { display: flex; flex: 1 1 auto; min-height: 0; }

/* 侧栏（NSYS #sidebar 220px #29414d）*/
.sidebar {
  width: 220px; max-width: 220px; min-width: 220px;
  background: var(--side-bg); color: #fff;
  overflow-y: auto; flex: 0 0 auto; padding-bottom: 24px; position: relative;
}
.sidebar .sidebar-header { padding: 10px; position: relative; height: 40px; }
/* NSYS：收起箭头 #3cc 朝左，hover 提亮；收起后翻转朝右 */
.sidebar .sidebar-header .dbl {
  position: absolute; right: 10px; top: 8px; color: var(--accent-bright); cursor: pointer;
  display: inline-flex; opacity: .85;
}
.sidebar .sidebar-header .dbl:hover { opacity: 1; }
.sidebar .sidebar-header .dbl .svg-icon { transform: scaleX(-1); transition: transform .15s; }
body.side-collapsed .sidebar .sidebar-header .dbl .svg-icon { transform: scaleX(1); }
body.side-collapsed .sidebar .sidebar-header .dbl { right: 0; left: 0; justify-content: center; }
/* 侧栏收起：NSYS 行为 = 76px 图标窄条（图标保留、文字隐藏、激活项高亮） */
body.side-collapsed .sidebar { width: 76px; min-width: 76px; max-width: 76px; }
body.side-collapsed .sidebar ul.menu > li > a { justify-content: center; padding: 12px 0; }
body.side-collapsed .sidebar ul.menu > li > a .item-name { display: none; }
body.side-collapsed .sidebar ul.menu > li > a.dropdown-toggle::after { display: none; }
body.side-collapsed .sidebar ul.submenu { display: none; }
.sidebar ul.menu { list-style: none; margin-top: 8px; }
.sidebar ul.menu > li { position: relative; }
.sidebar ul.menu > li > a {
  color: #fff; display: flex; align-items: center; padding: 10px 10px 10px 15px;
  cursor: pointer; text-decoration: none; font-size: 14px;
}
.sidebar ul.menu > li > a .svg-icon { width: 1.5em; height: 1.5em; }
.sidebar ul.menu > li > a .item-name { margin-left: 8px; }
.sidebar ul.menu > li.active > a { color: #fff; font-weight: 700; background: var(--side-active); }
.sidebar ul.menu > li > a.item:hover { background: var(--side-hover); color: var(--accent-bright); }
.sidebar ul.menu > li > a.dropdown-toggle::after {
  content: ''; border-top: .5em solid; display: block; position: absolute; right: 20px; top: 40%;
  transform: translateY(-50%) rotate(180deg);
}
.sidebar ul.menu > li > a.collapsed.dropdown-toggle::after { transform: translateY(-50%) rotate(0deg); }
.sidebar ul.submenu {
  list-style: none; background: var(--sub-bg); padding-left: 35px;
}
.sidebar ul.submenu li:first-child a { padding-top: 10px; }
.sidebar ul.submenu li:last-child a { padding-bottom: 10px; }
.sidebar ul.submenu a {
  display: block; background: transparent; color: #c2d4de; padding: 2px 0 2px 20px;
  font-size: 13.5px; cursor: pointer; text-decoration: none;
}
.sidebar ul.submenu a:hover { color: var(--accent-bright); }
.sidebar ul.submenu a.active { color: #fff; font-weight: 600; }
/* 「即将上线」分组（073-C12）：延后模块不删入口，但整体降权——灰色小标题 + 淡文字 */
.sidebar .soon-head {
  margin: 14px 0 2px; padding: 0 10px 0 15px; font-size: 11.5px; letter-spacing: .6px;
  text-transform: uppercase; color: #7e94a0;
}
.sidebar ul.submenu a.soon { color: #8fa6b3; }
.sidebar ul.submenu a.soon:hover { color: var(--accent-bright); }

.content { flex: 1 1 auto; overflow-y: auto; padding: 1rem; position: relative; }

/* ===== 通用控件（NSYS .btn.btn-default）===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #f8f8f8; border: 1px solid #4c788f; color: #29414d;
  padding: 5px 13px; border-radius: 4px; font-size: 13.5px; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn .svg-icon { width: 1.35em; height: 1.35em; }
.btn:hover { background: #eef3f6; }
.btn.primary { background: var(--nav-active); border-color: var(--nav-active); color: #fff; }
.btn.primary:hover { background: #436982; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.input, select.input {
  border: 1px solid #bdbdbd; border-radius: 0; padding: 7px 10px;
  font-size: 13px; color: #29414d; background: #fff; width: 100%;
}
.input:focus { outline: none; border-color: #4c788f; }
.link { color: #4d7fa8; text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }

.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 16px; }
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.card-head h3 { font-size: 15px; color: #29414d; }
.card-head .chev { margin-left: auto; color: var(--muted); cursor: pointer; }
.card-body { padding: 18px; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .tbtn { font-weight: 400; }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.tbl th {
  text-align: left; padding: 10px 12px; color: #29414d; font-weight: 600;
  border-bottom: 1px solid var(--border); background: #f7f9fa; white-space: nowrap;
}
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { background: #eef4f7; }
.tbl th .sort { color: #7d97a8; font-size: 13px; line-height: 1; cursor: pointer; margin-left: 5px; }
.tbl th .sort.on { color: #2d7f8f; font-weight: 700; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #eef1f3; }
.tbl tr:hover td { background: #fafcfd; }
.tbl .num { color: var(--muted); }
.pager { display: flex; align-items: center; gap: 6px; padding: 12px; color: var(--muted); font-size: 13px; }
.pager .pg {
  min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 3px; cursor: pointer; background: #fff;
}
.pager .pg.cur { background: #4c788f; color: #fff; border-color: #4c788f; }
.pager .total { margin-left: auto; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 38px; height: 20px; flex: 0 0 auto; }
.switch input { display: none; }
.switch .track { position: absolute; inset: 0; border-radius: 20px; background: #cfd6dc; transition: .15s; }
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: .15s;
}
.switch input:checked + .track { background: #4c788f; }
.switch input:checked + .track::after { left: 20px; }

/* 单选/复选 */
.ck { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ck input { width: 15px; height: 15px; accent-color: #4c788f; }

/* 弹窗 */
.overlay {
  position: fixed; inset: 0; background: rgba(20,30,40,.45);
  display: flex; align-items: flex-start; justify-content: center; z-index: 50; padding-top: 10vh;
}
.modal { background: #fff; border-radius: 6px; min-width: 380px; max-width: 720px; box-shadow: 3px 3px 10px rgba(0,0,0,.25); }
.modal-head { background: var(--nav-bg); color: #fff; padding: 12px 16px; border-radius: 6px 6px 0 0; display: flex; }
.modal-head .x { margin-left: auto; cursor: pointer; opacity: .8; }
.modal-body { padding: 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.modal.wide { max-width: 980px; width: 92vw; }

/* 表格设置：左「可用列」/ 右「表格区域」双列穿梭（NSYS 版式） */
.col-wrap { display: flex; gap: 8px; align-items: stretch; }
.col-panel {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: #fff;
}
.col-hd {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: #f7f9fa; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; color: #29414d;
}
.col-count { color: #8a9aa4; font-weight: 400; font-size: 12px; }
.col-all { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-weight: 400; font-size: 12px; color: #5c6f7a; cursor: pointer; }
.col-all input { width: 14px; height: 14px; accent-color: #4c788f; }
.col-list { flex: 1 1 auto; min-height: 300px; max-height: 380px; overflow-y: auto; }
.col-pick {
  display: flex; align-items: center; padding: 7px 12px; font-size: 13px; color: #33484f;
  border-bottom: 1px solid #f2f5f7; cursor: pointer; user-select: none;
}
.col-pick:hover { background: #f6fafc; }
.col-pick.sel { background: var(--accent-soft); color: #235c6b; font-weight: 600; }
.col-pick.sel .col-name::before { content: '✓ '; color: #2d7f8f; }
.col-pick.off { color: #a7b2b9; cursor: default; }
.col-pick.off:hover { background: transparent; }
.col-sub {
  padding: 8px 12px 6px; font-size: 12px; color: #8a9aa4; background: #fbfcfd;
  border-bottom: 1px solid #eef2f5; border-top: 1px solid #eef2f5;
}
.col-flag {
  margin-left: 8px; font-size: 11px; font-weight: 400; color: #97a3aa;
  border: 1px solid #e2e8ec; border-radius: 3px; padding: 0 4px;
}
.col-side { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.col-btn {
  width: 36px; height: 32px; border: 1px solid var(--border); border-radius: 3px;
  background: #fff; color: #3f6d80; font-size: 14px; line-height: 1; cursor: pointer;
}
.col-btn:hover { background: var(--accent-soft); border-color: #a9c9d6; }
.dbl-arrow { display: inline-flex; flex-direction: column; align-items: center; line-height: .62; font-size: 8px; }
.col-note { margin-top: 12px; font-size: 12px; color: #8a9aa4; line-height: 1.7; }

/* 面包屑 */
.crumbs { color: #4d7fa8; font-size: 13px; margin-bottom: 12px; }
.crumbs span.sep { margin: 0 6px; color: var(--muted); }

/* 页标题 */
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }

/* ===== 工作区 ===== */
.ws-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ws-select-row { display: flex; align-items: center; margin-bottom: 4px; }
.ws-select-row .sel { color: #4d7fa8; cursor: pointer; font-size: 13.5px; }
/* 已选摘要 + 唯一编辑入口（原来的两个 readonly 虚线框已删：看着能改其实不能改）。
   R7：原先这里的 padding-right:150px 是为了避开 fixed 统计浮层，浮层改正常流后不再需要。 */
.ws-select-row .ws-sel-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ws-select-row .ws-sel-summary { font-size: 12.5px; color: #5b8094; }

/* R7-WORKBENCH：统计卡（NSYS 的 .workspace-filters）原来照抄成 position:fixed 浮层
   —— 1280 桌面下卡片排到第 3 张时，右缘 SN / 测试时间 / 底部图标操作条被浮层压住，
   点不到也看不全。这里改成**正常流**参与布局，物理上不可能再盖住卡片：
   · 宽屏（≥1334px，放得下 3 张 300px 卡 + 统计列）：统计列占右侧一列，sticky 保留
     "滚动时仍可见"的原有观感；
   · 再窄：统计改成卡片上方的横排条（order:-1），卡片拿回整行宽度，1280 仍能 3 列。
   断言见 probe_ws_layout.js（逐卡 × 浮层相交检测）与 verify_actions.js G 项。 */
.ws-body { display: flex; align-items: flex-start; gap: 16px; }
.ws-cards { flex: 1 1 auto; min-width: 0; min-height: 200px; }

/* 右侧筛选卡（NSYS .workspace-filters 的计数卡样式；定位已改为正常流）
   WB-HEALTH-GRADES-02：左侧色条 = 等级固定色，只表达等级：
     健康100% 绿 / 健康90–<100% 橙 / 健康<90% 红 / 健康未知 灰。
   色条不随「数量 > 0」或选中态改变（旧 .hot 规则让 >0 变红、0 条回落绿色，读不出等级）；
   选中只加描边 + 浅底，等级色保留。 */
.ws-filters { position: sticky; top: 12px; flex: 0 0 110px; width: 110px; z-index: 5; }
.ws-filters .f-item {
  display: block; text-align: left; text-transform: uppercase; background: #fff;
  max-width: 110px; min-width: 110px; padding: 10px; margin: 10px auto; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.14); text-decoration: none; color: #29414d;
}
.ws-filters .f-item > div { padding-left: 5px; border-left: 5px solid var(--band-color, #9aa5ad); }
.ws-filters .f-item .num { font-size: 2em; font-weight: 400; font-family: inherit; line-height: 1.1; }
.ws-filters .f-item .lbl { font-size: 12px; }
.ws-filters .f-item.band-full { --band-color: #219653; }
.ws-filters .f-item.band-high { --band-color: #f2994a; }
.ws-filters .f-item.band-low { --band-color: #eb5757; }
.ws-filters .f-item.band-unknown { --band-color: #9aa5ad; }
/* W1-a/WB-HEALTH-GRADES-02：选中态 = 描边 + 浅底，不改等级色条 */
.ws-filters .f-item.active { outline: 2px solid #2d9cdb; background: #f2f9fe; box-shadow: 0 1px 6px rgba(45,156,219,.35); }

/* 放不下「3 列卡片 + 统计列」时，统计卡改为卡片上方的横排条，卡片拿回整行宽度。
   （必须写在 .ws-filters 基础规则之后，否则同特异性规则会被基础规则覆盖回去。） */
@media (max-width: 1333.98px) {
  .ws-body { flex-direction: column; gap: 0; }
  .ws-filters { position: static; width: auto; flex: 0 0 auto; display: flex; flex-wrap: wrap;
                gap: 10px; margin: 0 0 6px; order: -1; }
  .ws-filters .f-item { margin: 0; }
}

/* ===== 设备卡片（NSYS .workspace-card 1:1）===== */
.workspace-card {
  display: inline-block; width: 300px; margin: 10px; font-size: .72em; text-align: left;
  background-color: #fff; box-shadow: 0 8px 10px -4px #000; position: relative;
  color: #29414d; vertical-align: top; cursor: default;
}
.workspace-card > div { padding: 5px; white-space: nowrap; }
.workspace-card header { padding: 0 15px 5px 0; }
/* WB-CARD-DENSITY-02：头部三段式 —— 序号 | 型号区（可换行） | 尾号 + 复选框（固定宽）。
   原实现把尾号与复选框一起塞进 .head-model（overflow:hidden），长型号 + 容量 + US/USB
   同时出现时它们被挤出卡片右缘裁掉；现在只有型号区参与收缩，复选框永不收缩、永不被裁。 */
.workspace-card header .h-row { display: flex; align-items: flex-start; }
.workspace-card header .hub {
  text-align: center; padding: 7px 10px; background: #848f96; color: #fff;
  width: 16.66666667%; flex: 0 0 auto;
}
/* （WB-CARD-SKU-01：原 header .status / .live-dot 规则已随头部改造移除——
   连接方式现在走 .head-model .conn-badge，IMEI4 走 header .imei4） */
.workspace-card header .checkbox { flex: 0 0 auto; display: inline-block; margin: 7px 0 0 8px; }
.workspace-card header .checkbox input {
  width: 15px; height: 15px; accent-color: #4c788f; opacity: 1; position: static;
}
/* WB-CARD-SKU-01：头部「USB 位置」改为 型号+容量 主文本（原独立 h4 型号行删除）。
   WB-CARD-DENSITY-02：空间不够时型号**换行**而不是被裁——容量/地区/连接角标一起
   自动换到下一行（flex-wrap），任何一个都不再压到复选框。 */
.workspace-card header .head-model {
  flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px; padding: 5px 0 0 15px;
}
.workspace-card header .head-model .head-name {
  flex: 0 1 auto;                      /* 型号不截断：放不下就换行（不省略号、不压别人） */
  font-size: 1.25em; font-weight: 700; text-transform: uppercase;
  white-space: normal; overflow-wrap: anywhere; line-height: 1.16; min-width: 0;
}
.workspace-card header .head-model .head-cap {
  flex: 0 1 auto; min-width: 0; overflow: hidden;   /* 可被压到 0 → 视觉上容量消失 */
  font-size: 1.05em; color: #5b8094; white-space: nowrap;
}
.workspace-card header .head-model .region-badge {
  flex: 0 0 auto; background: #e8eef2; color: #29414d; border: 1px solid #cdd9e0;
  border-radius: 8px; padding: 0 6px; font-size: .9em; font-weight: 700;
}
.workspace-card header .head-model .conn-badge {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px;
  background: #219653; color: #fff; border-radius: 8px; padding: 0 6px;
  font-size: .9em; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}
.workspace-card header .head-model .conn-badge::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%; background: #b8f0c9;
}
/* 极窄卡（<900 视口，单列/手机宽度）：容量让位，型号保完整。1280/1440 三列桌面
   卡片约 350-400px 宽，「PIXEL 8A 128G」完整放下，容量正常显示。 */
@media (max-width: 899.98px) {
  .workspace-card header .head-model .head-cap { display: none; }
}
.workspace-card header .imei4 {
  margin-left: auto; margin-right: 14px; font-weight: 700; font-size: 1.55em;
  letter-spacing: .5px; line-height: 1.1; color: #29414d; flex: 0 0 auto;
}
/* WB-CARD-SKU-01：IMEI/SN 点击复制 —— 可复制值给手型与 hover 下划线 */
.workspace-card .row .value.copyable { cursor: copy; }
.workspace-card .row .value.copyable:hover { text-decoration: underline; color: #2d9cdb; }
/* 复制结果 toast：成功绿 / 失败红，2.2s 自动消失（明确反馈，不静默） */
.copy-toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(8px);
  background: #29414d; color: #fff; border-radius: 6px; padding: 8px 16px;
  font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.3); z-index: 400;
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
  max-width: 80vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.copy-toast.ok { border-left: 4px solid #219653; }
.copy-toast.err { border-left: 4px solid #eb5757; }
/* 「已超时」徽标（手机端拔线软过期，纯展示，不影响任何判项/上传/报告）：灰黄小标签 */
.workspace-card .expired-badge {
  display: inline-flex; align-items: center; background: #f4e6bf; color: #6b5a1e;
  border: 1px solid #dcc98d; border-radius: 8px; padding: 0 6px; margin-left: 8px;
  font-size: .9em; font-weight: 700; letter-spacing: .4px; white-space: nowrap;
}
/* 证书复用标注（90 天策略纯展示，数据带 cert_reused/cert_reuse 才出现）：绿色小标签/提示条 */
.cert-reuse-badge {
  display: inline-block; background: #e2f3e8; color: #1e6b3a;
  border: 1px solid #bfe0cc; border-radius: 8px; padding: 0 6px; margin-left: 6px;
  font-size: .85em; font-weight: 700; white-space: nowrap; cursor: help;
}
.workspace-card .cert-reuse-banner {
  background: #e2f3e8; color: #1e6b3a; border-bottom: 1px solid #bfe0cc;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
}
/* ext-checks 色带 */
.workspace-card .blue-light { background-color: rgba(51,190,191,.1); }
.workspace-card .ext-checks { display: flex; }
.workspace-card .ext-checks > div {
  text-align: center; display: inline-block; padding: 0 5px; border-right: 2px solid #fff;
  min-width: 65px; flex: 1 1 auto;
}
.workspace-card .ext-checks > div:first-child { min-width: 35px; flex: 0 0 auto; }
.workspace-card .ext-checks > div:last-child { padding-right: 0; border-right: none; }
.workspace-card .ext-checks .xl { font-size: 1.05em; line-height: 1.4; }
.workspace-card .accent_succeed { color: #219653; }
.workspace-card .not-active { color: #a3a3a3; }
/* 信息行：caption 50px + value 105px | caption 55px + value 70px */
.workspace-card .row { line-height: 1.55; }
.workspace-card .row > div { display: inline-block; vertical-align: top; }
.workspace-card .row > div:nth-child(1) { width: 50px; }
.workspace-card .row > div:nth-child(2) { width: 105px; overflow: hidden; text-overflow: ellipsis; }
.workspace-card .row > div:nth-child(3) { width: 55px; }
.workspace-card .row > div:nth-child(4) { width: 70px; overflow: hidden; text-overflow: ellipsis; }
.workspace-card .caption { text-transform: uppercase; }
.workspace-card .value { font-weight: 700; }
/* 数值统一加粗（NSYS 卡片所有数值均为粗体） */
.workspace-card .test-tbl td { font-weight: 700; }
.workspace-card .test-tbl td:first-child { font-weight: 400; text-transform: none; }
.workspace-card .hidden-text { overflow: hidden; text-overflow: ellipsis; }
/* WB-CARD-DENSITY-02：SKU 独立整行、完整显示（可换行，不再 105px + ellipsis）；
   Note 只在有真实备注时出现，同样整行换行显示。两者都保留可点/可读语义。
   Part 只在「与卡头型号不是同一串」时出现（独立零件号），同样整行换行、不截成省略号。 */
.workspace-card .row.sku-row,
.workspace-card .row.note-row,
.workspace-card .row.part-row { display: flex; align-items: flex-start; gap: 6px; }
.workspace-card .row.sku-row > div:nth-child(1),
.workspace-card .row.note-row > div:nth-child(1),
.workspace-card .row.part-row > div:nth-child(1) { flex: 0 0 50px; width: 50px; }
.workspace-card .row.sku-row > div:nth-child(2),
.workspace-card .row.note-row > div:nth-child(2),
.workspace-card .row.part-row > div:nth-child(2) {
  flex: 1 1 auto; width: auto; min-width: 0;
  overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere;
}
.workspace-card .row.sku-row .sku-value a { overflow-wrap: anywhere; }
/* 电池带（两行三列 5/4/3）*/
.workspace-card .battery-info .b-row { display: flex; align-items: center; line-height: 1.7; }
.workspace-card .battery-info .b-c1 { width: 41.66%; display: flex; align-items: center; gap: 4px; }
.workspace-card .battery-info .b-c2 { width: 33.33%; display: flex; align-items: center; gap: 4px; padding: 0 5px; }
.workspace-card .battery-info .b-c3 { width: 25%; display: flex; align-items: center; gap: 4px; }
.workspace-card .battery-info .svg-icon { width: 1.25em; height: 1.25em; color: #848f96; }
/* SKU / Grade 带 */

/* Last test 表 */
.workspace-card .test-tbl { width: 100%; border-collapse: collapse; }
.workspace-card .test-tbl td { padding: 0 2px; line-height: 1.6; }
.workspace-card .test-tbl td:first-child { width: 38%; }
.workspace-card .test-tbl td.v-cell { font-weight: bold; }
.workspace-card .test-tbl .passed { color: #219653; text-align: right; }
.workspace-card .test-tbl .passed-v { color: #219653; font-weight: bold; }
/* 底部导航条（NSYS .nav-buttons #29414d）*/
.workspace-card .nav-buttons {
  display: flex; align-items: center; padding: 7px 15px; background-color: #29414d;
}
.workspace-card .nav-buttons a { margin-right: 25px; color: #fff; display: inline-flex; }
.workspace-card .nav-buttons a:first-child { margin-right: 10px; }
.workspace-card .nav-buttons a:hover .svg-icon { color: #3cc; }
.workspace-card .nav-buttons a:last-child { margin-right: 0; margin-left: auto; }
/* NSYS 底部条图标为固定像素尺寸（1.7em 在 .72em 卡片字号下过小，操作员反馈无法点击） */
.workspace-card .nav-buttons .svg-icon { color: #fff; width: 22px; height: 22px; }

/* ===== 设备详情 ===== */
.detail-grid { display: flex; gap: 18px; align-items: flex-start; }
.detail-anchors { width: 190px; flex: 0 0 auto; }
.detail-anchors .an {
  padding: 11px 14px; cursor: pointer; color: #29414d; font-size: 13.5px;
  border-radius: 4px; margin-bottom: 2px; border-left: 3px solid transparent;
  display: flex; align-items: center; gap: 6px;
}
.detail-anchors .an:hover { background: #eef3f5; }
/* 选中态原来是 10% 青色底 —— 白底页面上几乎看不出哪一项是当前分区。
   现在用「白卡 + 左侧实心竖条 + 加粗」，与右侧内容卡连成一体。 */
.detail-anchors .an.active {
  background: #fff; color: #14425c; font-weight: 700; border-left-color: #2d7f8f;
  box-shadow: 0 1px 3px rgba(20,66,92,.12);
}
/* 「延后开发」标记：content 取 data-badge，不写进锚点文本（文本是回归夹具的定位键） */
.detail-anchors .an[data-badge]::after {
  content: attr(data-badge); margin-left: auto;
  font-size: 10.5px; font-weight: 500; color: #96650f; background: #fdf6e9;
  border: 1px solid #eed9b5; border-radius: 8px; padding: 0 5px; line-height: 15px;
}
.detail-anchors .an.disabled { color: #b9c2c9; }
.detail-body { flex: 1 1 auto; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 20px; min-height: 320px; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 36px; }
.kv-grid .kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #eef1f3; font-size: 13px; }
.kv-grid .kv .k { color: var(--muted); }
.kv-grid .kv .v { font-weight: 500; }
.kv-grid .kv .v.good { color: #219653; }
.section-title { font-weight: 700; margin: 4px 0 10px; }
.pass-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; font-size: 13px; }
.issue-row { display: flex; align-items: center; gap: 8px; color: #219653; font-size: 13px; }

/* ===== 设备详情 · 测试结果（NSYS 版式：先结论清单，再问题/电池） ===== */
.result-meta { display: flex; gap: 40px; align-items: baseline; font-size: 13px; margin: 2px 0 14px; }
.result-meta .meta-k { color: var(--muted); margin-right: 8px; }
.result-meta .meta-v { font-weight: 600; }
.card-head .res-ico {
  width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; border: 1px solid currentColor;
}
.card-head .res-ico.ok { color: #219653; }
.card-head .res-ico.bad { color: #c0392b; }
.card-head .res-ico.neutral { color: #8a99a3; }
.card-head .res-title { font-size: 14px; font-weight: 700; color: #29414d; }
.card-head .res-count { color: var(--muted); font-size: 13px; }
.result-grid { columns: 4; column-gap: 24px; font-size: 13px; line-height: 1.9; }
.result-grid .result-item { break-inside: avoid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1200px) { .result-grid { columns: 3; } }
@media (max-width: 900px) { .result-grid { columns: 2; } }

/* ===== 统计 ===== */
.stats-layout { display: flex; gap: 18px; align-items: flex-start; }
.stats-panel { width: 220px; flex: 0 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 14px; }
.stats-panel .f-label { color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
.stats-panel .f-label:first-child { margin-top: 0; }
.stats-main { flex: 1 1 auto; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 14px 18px; }
.chart-tabs { display: flex; gap: 4px; border-bottom: 2px solid rgba(51,190,191,.1); margin-bottom: 12px; }
.chart-tab { padding: 8px 14px; cursor: pointer; color: #29414d; font-size: 13px; border-radius: 4px 4px 0 0; }
.chart-tab.active { background: rgba(51,190,191,.1); color: #2d7f8f; font-weight: 600; }

/* ===== 设置页表单 ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; }
.form-grid .full { grid-column: 1 / -1; }
.f-item label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.f-item label .req { color: #eb5757; }
.toggle-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef1f3; }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .t-name { font-weight: 600; font-size: 13.5px; }
.toggle-row .t-desc { color: var(--muted); font-size: 12px; margin-top: 3px; }
.radio-row { display: flex; gap: 26px; flex-wrap: wrap; padding: 8px 0; }

/* 双列 OS 对照 */
.os-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.os-card { border: 1px solid var(--border); border-radius: 4px; padding: 14px 16px; }
.os-card h4 { color: #2d7f8f; margin-bottom: 10px; }
.auto-tag { color: var(--muted); font-size: 12px; margin-left: 8px; }
.onoff { color: var(--muted); font-size: 12px; }

/* 检测设置 → 测试项目与顺序：拖拽排序把手（鼠标/触摸同一套 Pointer Events） */
.drag-handle {
  cursor: grab; color: var(--muted); font-size: 15px; line-height: 1;
  padding: 2px 4px; border-radius: 3px; touch-action: none; user-select: none;
}
.drag-handle:hover { color: var(--accent-bright); background: rgba(0, 0, 0, .05); }
.drag-handle:active { cursor: grabbing; }
.drag-handle.small { font-size: 12px; }
.sortable-row.is-dragging {
  opacity: .55; outline: 2px dashed var(--accent-bright); outline-offset: 2px;
  background: #fff; border-radius: 4px;
}

/* 空态 */
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* ===== 远程检测码（公司设置）===== */
.rc-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-weight: 700; letter-spacing: .06em;
}
/* 状态徽标：可用 / 已停用 / 已锁定 / 已耗尽（沿用工作区小标签的视觉语言） */
.rc-badge {
  display: inline-block; border-radius: 8px; padding: 0 6px;
  font-size: .85em; font-weight: 700; white-space: nowrap;
}
.rc-active { background: #e2f3e8; color: #1e6b3a; border: 1px solid #bfe0cc; }
.rc-disabled { background: #eef1f3; color: #5a6a76; border: 1px solid #d7dee3; }
.rc-locked { background: #fbe4e4; color: #9c2b2b; border: 1px solid #efc2c2; }
.rc-exhausted { background: #f4e6bf; color: #6b5a1e; border: 1px solid #dcc98d; }
/* 本次生成的行高亮 */
.tbl tr.rc-new td { background: #fffbe6; }
.rc-actions .link { margin-right: 8px; }
.rc-actions .link:last-child { margin-right: 0; }
.rc-codes {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 15px; letter-spacing: .12em; line-height: 1.7; resize: vertical;
}
.rc-err { color: #e06c75; font-size: 12.5px; margin-top: 8px; }
.btn.danger { color: #9c2b2b; border-color: #efc2c2; }
.btn.danger:hover { background: #fbe4e4; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c3ccd3; border-radius: 4px; }

/* ===== 登录页 ===== */
body.auth-mode #topnav, body.auth-mode #sidebar { display: none; }
body.auth-mode .layout { padding-left: 0; }
/* 背景满屏平铺：content 在登录态下去掉内边距与滚动 */
body.auth-mode #content { width: 100%; padding: 0; overflow: hidden; }
.login-wrap {
  height: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0b2129 0%, #29414d 60%, #2e4a56 100%);
}
.login-card {
  background: #fff; border-radius: 6px; padding: 34px 36px 30px; width: 360px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 10px;
}
.login-brand { font-size: 20px; font-weight: 800; color: #0b2129; text-align: center; }
.login-brand .main { color: #35b8ac; }
.login-brand .dot { color: #0b2129; }
.login-sub { text-align: center; color: #5a6a76; font-size: 13px; margin-bottom: 10px; }
.login-card .input { width: 100%; padding: 10px 12px; font-size: 13.5px; }
.login-err { color: #eb5757; font-size: 12.5px; text-align: center; }
.user-menu { cursor: pointer; }

/* ===== 网络设置 · 多 Wi-Fi 池 ===== */
.wifi-pool { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.wifi-row {
  display: grid; grid-template-columns: 1.4fr 1.4fr 110px 64px 44px;
  gap: 8px; align-items: center;
}
.wifi-row.wifi-head { font-size: 12px; color: #6b7a86; font-weight: 600; }
.wifi-row .input { width: 100%; }
.wifi-row input[type="checkbox"] { justify-self: center; width: 18px; height: 18px; }

/* ============ NSYS 工作区交互复刻（打印/导出/动作弹窗） ============ */
/* 勾选卡片亮蓝框（NSYS 语义：勾选即选中） */
.workspace-card.ws-checked { box-shadow: 0 0 0 2px #3cc, 0 4px 14px rgba(0,0,0,.18); }
/* 确认弹窗：设备行 + 追问句 */
.nsys-devs { margin: 4px 0 10px; }
.nsys-dev { background: #fff; border: 1px solid var(--border); padding: 10px 14px; margin-bottom: 6px; font-size: 13.5px; }
.nsys-dev b + span, .nsys-dev b { margin-left: 6px; }
.nsys-dev > b:first-child { margin-left: 0; margin-right: 14px; }
.nsys-q { text-align: center; font-size: 14px; margin: 14px 0 4px; }
/* 动作弹窗设备表 */
.nsys-act-tbl { font-size: 13px; }
.nsys-act-tbl th { background: #f2f6f8; padding: 7px 10px; font-weight: 600; }
.nsys-act-tbl td { padding: 9px 10px; border-bottom: 1px solid #eef2f5; }
.ok-dot, .no-dot {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700;
}
.ok-dot { background: #67c23a; }
.no-dot { background: #f56c6c; }
/* 导出 Excel 确认弹窗：Excel 图标 + 追问句 */
.xls-confirm { display: flex; align-items: center; gap: 26px; padding: 12px 4px; }
.xls-icon { flex: 0 0 auto; }
.xls-sheet {
  width: 84px; height: 84px; background: #107c41; color: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; font-weight: 800; box-shadow: inset -14px 0 0 rgba(255,255,255,.22);
}
.xls-q { font-size: 14.5px; }

/* 相机证据折叠（设备详情 · 测试结果） */
.evidence-details { padding: 12px 18px; }
.evidence-details > summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.evidence-details > summary:hover { text-decoration: underline; }
.evidence-details[open] > summary { margin-bottom: 10px; }
.evidence-details .card-body { padding: 0; }

/* ===== 浏览器打印（Ctrl+P）=====
   NSYS-PRINT-BLANK-003（2026-11-06）：外壳是 `body{display:flex;overflow:hidden}` +
   内层滚动容器，直接 Ctrl+P 会打出裁切/空白页（用户实测「详情页 Ctrl+P 也是空白」）。
   打印媒体把外壳还原成普通文档流并隐藏导航/侧栏/工具条，页面内容按 A4 自然分页。
   注意：报告/证书本身走「新窗口 + print()」路径，不受这段影响。 */
@media print {
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  body { display: block !important; }
  .topnav, .sidebar, .toolbar, .pager, .toast, .chart-tabs, .page-actions,
  #modal-root, .modal-root, .dropdown-menu { display: none !important; }
  .layout { display: block !important; height: auto !important; overflow: visible !important; }
  .content { display: block !important; height: auto !important; overflow: visible !important;
    padding: 0 !important; background: #fff !important; }
  .card, .card-body, table, .detail-grid { break-inside: avoid; }
  .card { box-shadow: none !important; border: 1px solid #dfe5ea !important; }
  a { color: inherit; text-decoration: none; }
}

/* R3-UI：宽表格自己横滚，别让整个 #content 跟着横移（1024 窄屏历史页） */
.tbl-scroll { overflow-x: auto; }
.tbl-scroll > .tbl { min-width: 100%; }

/* Keep long dialogs operable at normal zoom on short windows. */
.overlay { padding: min(10vh, 48px) 12px 16px; box-sizing: border-box; }
.modal { display: flex; flex-direction: column; min-width: 0; width: min(720px, 100%); max-height: calc(100dvh - min(10vh, 48px) - 16px); overflow: hidden; }
.modal-head, .modal-foot { flex-shrink: 0; }
.modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }

/* 固定身份网格保留双IMEI/SN，长值换行而非截断。 */
.workspace-card .identity-fields .row { display:grid; grid-template-columns: 48px minmax(0,1.6fr) 52px minmax(0,1fr); column-gap:4px; }
.workspace-card .identity-fields .row > div { width:auto; min-width:0; white-space:normal; overflow-wrap:anywhere; overflow:visible; text-overflow:clip; }
.workspace-card .card-test-summary { padding:8px 5px; }
.workspace-card .test-tbl { table-layout:fixed; }
.workspace-card .test-tbl td { white-space:normal; overflow-wrap:anywhere; }
.workspace-card .test-tbl td:first-child { width:30%; }
.workspace-card .test-tbl td:nth-child(2) { width:28%; }
.workspace-card .test-tbl td:nth-child(3) { width:21%; }
.workspace-card .test-tbl .result-label,.workspace-card .test-tbl .result-value { color:#29414d; }

/* v67: 明确标签和值，型号优先，操作区独立。 */
.workspace-card { border:1px solid #dbe4e9; border-radius:8px; box-shadow:0 3px 10px #18364418; }
.workspace-card header { padding:0 10px 10px 0; }
.workspace-card header .hub { width:34px; padding:10px 0; border-radius:7px 0 5px 0; background:#627985; }
.workspace-card header .head-model { padding:10px 8px 0 10px; gap:6px; flex-wrap:nowrap; align-items:flex-start; }
.workspace-card header .head-model .head-name { flex:0 1 auto; line-height:1.3; font-size:1.18em; }
.workspace-card header .imei4 { font-size:20px; font-weight:850; font-variant-numeric:tabular-nums; letter-spacing:1px; line-height:1; margin:8px 0 0; padding:4px 5px; border-radius:5px; background:#e9f1f5; color:#143d52; }
.workspace-card header .checkbox { margin-top:10px; }
.workspace-card .security-strip { display:flex; gap:12px; padding:9px 10px; background:#f2f6f8; white-space:normal; }
.workspace-card .security-item { display:flex; flex:1; flex-wrap:wrap; gap:4px 8px; align-items:center; font-weight:600; }
.workspace-card .security-label { color:#526978; font-weight:500; }
.workspace-card .security-item.status-unknown { color:#77848c; }
.workspace-card .security-item.status-neutral { color:#355466; }
.workspace-card .security-item.status-danger { color:#b73535; }
.workspace-card .identity-fields { padding:10px 8px; }
.workspace-card .identity-fields .row { padding-top:2px; padding-bottom:2px; }
.workspace-card .blue-light { background:#f0f7f8; }
.workspace-card .nav-buttons { border-radius:0 0 7px 7px; }

/* Compact card with fixed label tracks and complete identifiers. */
.workspace-card { width:min(300px, calc(100% - 20px)); font-size:10px; }
.workspace-card .identity-fields .row { grid-template-columns:48px minmax(0,1.6fr) 40px minmax(0,1fr); column-gap:4px; }
.workspace-card .identity-fields .row > .caption { white-space:nowrap; overflow-wrap:normal; }
.workspace-card .identity-fields .row > .value { overflow-wrap:break-word; }
.workspace-card .security-item { flex-wrap:nowrap; }
.workspace-card .card-test-summary { padding:9px 8px; }
.workspace-card .test-tbl td { white-space:nowrap; overflow-wrap:normal; }
.workspace-card .test-tbl td:first-child { width:20%; }
.workspace-card .test-tbl td:nth-child(2) { width:35%; }
.workspace-card .test-tbl td:nth-child(3) { width:20%; }
.workspace-card .test-tbl .result-value { text-align:right; font-variant-numeric:tabular-nums; }
.workspace-card .battery-info .b-row { min-height:24px; }
.workspace-card .battery-info .value { white-space:nowrap; font-variant-numeric:tabular-nums; }
.workspace-card .blue-light > .row:not(.sku-row):not(.note-row):not(.part-row) { display:grid; grid-template-columns:50px minmax(0,1fr) 55px 70px; gap:5px; }
.workspace-card .blue-light > .row:not(.sku-row):not(.note-row):not(.part-row) > div { width:auto; }

.workspace-card .nav-buttons { padding:5px 10px; gap:10px; }
.workspace-card .nav-buttons a { margin:0; min-width:28px; min-height:28px; align-items:center; justify-content:center; }
.workspace-card .nav-buttons .svg-icon { width:17px; height:17px; }

/* Full-width workbench with compact, keyboard-operable top navigation. */
.topnav { height:auto; min-height:60px; align-items:center; gap:16px; padding:8px 18px; position:relative; z-index:20; }
.topnav .brand { font-size:18px; gap:7px; padding:0; }
.topnav .brand .logo-mark { width:26px; height:26px; }
.primary-nav, .nav-actions { display:flex; align-items:center; gap:4px; }
.primary-nav { flex:1; }
.nav-actions { margin-left:auto; }
.topnav .nav-link, .nav-dropdown > summary { display:flex; align-items:center; gap:7px; padding:10px 12px; border:0; border-radius:6px; background:transparent; color:#dbe8ed; text-decoration:none; font:inherit; font-size:13px; white-space:nowrap; cursor:pointer; }
.topnav .nav-link:hover, .nav-dropdown > summary:hover { background:#24434f; color:white; }
.topnav .nav-link.active, .nav-dropdown.active > summary { background:#345c6c; color:white; }
.topnav .svg-icon { width:18px; height:18px; }
.nav-dropdown { position:relative; }
.nav-dropdown > summary { list-style:none; }
.nav-dropdown > summary::-webkit-details-marker { display:none; }
.nav-dropdown > summary .svg-icon:last-child { width:12px; height:12px; transition:transform .15s; }
.nav-dropdown[open] > summary .svg-icon:last-child { transform:rotate(180deg); }
.nav-popup { position:absolute; top:calc(100% + 8px); left:0; min-width:196px; padding:6px; background:white; border:1px solid #dbe4e9; border-radius:9px; box-shadow:0 8px 28px #102c3826; max-height:calc(100dvh - 130px); overflow:auto; }
.topnav .nav-popup .nav-link { color:#29414d; width:100%; text-align:left; padding:10px 12px; }
.topnav .nav-popup .nav-link:hover, .topnav .nav-popup .nav-link.active { background:#edf5f8; color:#17617b; }
.account-dropdown .nav-popup { left:auto; right:0; }
.account-name { padding:9px 12px; font-size:12px; color:#70818a; border-bottom:1px solid #edf1f3; margin-bottom:4px; }
.topnav .nav-popup .logout { border-top:1px solid #edf1f3; border-radius:0 0 5px 5px; margin-top:4px; }
.topnav .nav-popup button:disabled { opacity:.5; cursor:default; }
.topnav :focus-visible { outline:2px solid #33cccc; outline-offset:2px; }
@media(max-width:1100px) {
 .topnav { flex-wrap:wrap; gap:6px 12px; }
 .primary-nav { order:3; flex-basis:100%; }
 .topnav .brand { font-size:17px; }
}
@media(max-width:560px) {
 .topnav { padding:8px; }
 .topnav .brand .dot, .download-link span { display:none; }
 .primary-nav { flex-wrap:wrap; }
 .primary-nav > .nav-link, .nav-dropdown > summary { padding:9px 8px; font-size:12px; }
 .nav-popup { min-width:170px; }
 .primary-nav > .nav-dropdown:last-child .nav-popup { left:auto; right:0; }
}

/* Consolidated account and software settings. */
.settings-help { display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px; border:1px solid #8a9ba5; border-radius:50%; font-size:11px; color:#526e7c; cursor:help; margin-left:6px; vertical-align:middle; }
.settings-help:focus { outline:2px solid #4f7c91; outline-offset:2px; }
.remote-access { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.rc-scheduled, .rc-expired { background:#eef1f3; color:#647480; }

.settings-table { overflow-x:auto; }

.user-actions { white-space:nowrap; }
.user-actions .btn { padding:5px 9px; margin-right:5px; font-size:12px; }

.role-permissions {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;padding:16px 0;}
.role-row {display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #e1e7eb;}
.role-row strong {min-width:140px;}

/* Client downloads */
.client-downloads{display:grid;gap:18px}.download-section{padding:0 0 18px;border-bottom:1px solid #e1e8eb}.download-section:last-of-type{padding-bottom:0;border-bottom:0}.download-section h3{display:flex;align-items:center;gap:8px;margin:0 0 14px;font-size:16px}.download-help{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:1px solid #91a4ad;border-radius:50%;background:transparent;color:#587481;font-size:12px;cursor:help;flex:none}.download-help:focus-visible{outline:2px solid #4d7a8e;outline-offset:2px}.download-stations{display:grid;grid-template-columns:1fr 1fr;gap:12px}.download-platform{border:1px solid #dbe4e8;border-radius:8px;padding:14px;display:grid;gap:10px;align-content:start}.download-platform-name{display:flex;gap:8px;align-items:center;font-weight:600}.download-platform .btn{justify-self:start}.download-version{font-size:13px;color:#607884;overflow-wrap:anywhere}.download-phone{display:flex;align-items:center;gap:20px}.download-qr{width:152px;min-height:152px;display:flex;align-items:center;justify-content:center}.download-qr img{display:block;max-width:100%;height:auto}.download-qr-caption{text-align:center;font-size:12px;color:#607884;margin-top:4px}.download-phone-controls{flex:1;min-width:0;display:grid;gap:12px}.download-phone-controls input{min-width:0!important;width:100%;box-sizing:border-box}.download-phone-meta{display:flex;align-items:flex-start;flex-direction:column;gap:12px}.download-remote{display:flex;align-items:center;gap:8px;padding-top:4px}@media(max-width:560px){.download-stations{grid-template-columns:1fr}.download-phone{flex-direction:column;align-items:stretch}.download-phone>div:first-child{align-self:center}}

/* Shared settings list and editor layout. */
.settings-page { max-width:1200px; }
.settings-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:14px 0; }
.settings-search { flex:1 1 240px; max-width:440px; }
.settings-list { border:1px solid var(--border); border-radius:8px; overflow:auto; background:#fff; }
.settings-table { width:100%; border-collapse:collapse; text-align:left; }
.settings-table th { background:#f5f8fa; color:var(--muted); font-weight:600; }
.settings-table th,.settings-table td { padding:13px 16px; border-bottom:1px solid var(--border); vertical-align:middle; }
.settings-table tr:last-child td { border-bottom:0; }
.settings-table th:last-child,.settings-table td:last-child { width:160px; }
.settings-description { white-space:pre-wrap; overflow-wrap:anywhere; }
.settings-actions { display:flex; gap:8px; white-space:nowrap; }
.settings-actions .btn { padding:5px 12px; }
.settings-form { display:grid; gap:16px; }
.settings-form textarea { resize:vertical; }
.settings-help { display:inline-flex; align-items:center; justify-content:center; flex:0 0 18px; width:18px; height:18px; border:1px solid #839aa6; border-radius:50%; color:#607d8b; font-size:12px; cursor:help; }
.settings-help:focus { outline:2px solid var(--accent); outline-offset:2px; }
.settings-savebar { justify-content:flex-end; }
.settings-savebar [role=status] { margin-right:auto; }
.settings-cert-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 28px; }
.settings-cert-option { display:flex; align-items:center; gap:12px; padding:15px 0; border-bottom:1px solid var(--border); }
.settings-cert-option .settings-help { margin-left:auto; }
.test-plan-body { padding:0; min-height:0; }
.test-plan-body .os-card { box-shadow:none; border-radius:6px; }
@media(max-width:640px) { .settings-cert-grid {grid-template-columns:1fr;} .settings-table th,.settings-table td {padding:10px;} .settings-actions {flex-wrap:wrap;} }
.settings-cert-option .switch input { display:block; position:absolute; inset:0; width:100%; height:100%; opacity:0; z-index:1; margin:0; cursor:pointer; }
.settings-cert-option .switch input:focus-visible + .track { outline:2px solid var(--accent); outline-offset:3px; }

/* v77 shared pagination */
.list-pagination { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px; border-top:1px solid var(--border); color:var(--muted); font-size:13px; }
.list-pagination .pagination-total { margin-right:auto; white-space:nowrap; }
.list-pagination .input { width:auto; min-width:0; height:32px; padding:4px 8px; }
.list-pagination .btn { min-height:32px; padding:4px 10px; }
.pagination-nav, .pagination-jump { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.pagination-position { min-width:52px; text-align:center; }
.list-pagination .pagination-jump input { width:60px; }
.stats-layout .stats-main { min-width:0; }
.stats-main .chart-tabs { flex-wrap:wrap; }
.stats-main .stats-pie { width:min(100%,360px); margin:12px auto; }
.stats-main .stats-pie svg { display:block; width:100%; height:auto; max-height:360px; }
.stats-main .stats-legend { flex-wrap:wrap; }
.stats-detail-table { max-width:100%; overflow:auto; }
.stats-detail-table .tbl { min-width:660px; }
@media(max-width:800px) { .stats-layout { flex-direction:column; } .stats-layout .stats-panel,.stats-layout .stats-main { width:100%; box-sizing:border-box; } .list-pagination .pagination-total { width:100%; } }

/* Shared pagination keeps the total left and controls right in every list. */
.pagination-host { width:100%; }
.list-pagination { width:100%; box-sizing:border-box; }
.list-pagination select.input { appearance:none; padding-right:32px; min-width:108px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23536e7b' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 11px center; }
.download-password-form { display:grid; gap:16px; }
.download-password-form label { display:grid; gap:8px; }
.download-password-form .btn { justify-self:start; }

.download-settings-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;max-width:1100px;}
.download-settings-panel {padding:24px;min-width:0;}
.download-settings-panel h3 {margin:0 0 20px;display:flex;align-items:center;gap:8px;}
.download-settings-panel [role="status"] {padding:12px;background:#f1f6f8;border-radius:6px;font-size:14px;}
.download-entry-qr {text-align:center;padding:8px;}
@media(max-width:800px){.download-settings-grid{grid-template-columns:1fr;}}
.download-settings-panel input[readonly] {border:1px solid var(--border);border-radius:4px;padding:10px;background:#f7fafb;min-width:0!important;width:100%;}

/* 工位客户端版本一览（下载区底部）：显示「工位实际在跑什么版本」，
   与上方渠道版本对照就能看出哪台机器还没升级。跨两列避免挤在一个格子里。 */
.download-station-clients {grid-column:1/-1;font-size:12px;color:#607884;overflow-wrap:anywhere;}
