:root {
  --brand: #2678ef;
  --brand-dark: #1b5fc4;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #22272e;
  --text-2: #5c6b80;
  --text-3: #98a5b8;
  --line: #e6eaf2;
  --green: #18a058;
  --orange: #f0883e;
  --red: #d03050;
  --purple: #7c5cff;
  --sidebar: #1e2734;
  --sidebar-2: #171e28;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(24, 39, 75, .06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--brand); text-decoration: none; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e2734 0%, #2b3a52 55%, #2678ef 180%);
}
.login-card {
  width: 380px; background: #fff; border-radius: 14px; padding: 36px 34px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
}
.login-card .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-card .logo i {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand);
  display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 700; font-size: 16px;
}
.login-card h1 { font-size: 19px; letter-spacing: .3px; }
.login-card .sub { color: var(--text-3); font-size: 12.5px; margin: 6px 0 24px; }
.login-card .err { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.login-card .tip { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line);
  color: var(--text-3); font-size: 12px; line-height: 1.8; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; background: var(--sidebar); color: #c8d2e0; flex: 0 0 216px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  padding: 20px 18px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar .brand i {
  width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px;
}
.sidebar .brand span { font-size: 14.5px; font-weight: 600; color: #fff; letter-spacing: .3px; }
.nav { padding: 12px 10px; flex: 1; overflow: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: #aab7c9; font-size: 13.5px; margin-bottom: 2px; cursor: pointer; user-select: none;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(38, 120, 239, .35); }
.nav a .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }
/* 导航分组标题：样机 / 售前 / 系统 */
.nav-group {
  padding: 14px 12px 6px; font-size: 11px; letter-spacing: 1.2px;
  color: #5d6b7d; text-transform: uppercase;
}
.nav-group:first-child { padding-top: 4px; }
.sidebar .foot { padding: 12px 16px; font-size: 11.5px; color: #5d6b7d; border-top: 1px solid rgba(255,255,255,.07); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 22px; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 16px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600;
}
.content { padding: 20px 22px 40px; }

/* ---------- 通用组件 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card-title { font-size: 14.5px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title .sub { font-weight: 400; color: var(--text-3); font-size: 12.5px; }

.btn {
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--text); cursor: pointer; display: inline-flex;
  align-items: center; gap: 6px; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #c9d6ea; color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.danger { color: var(--red); border-color: #f3c6cf; }
.btn.danger:hover { background: #fdf2f4; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text); outline: none; transition: .15s;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 70px; line-height: 1.6; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(38, 120, 239, .12); }
.hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.7; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }   /* min-width:0 必需，否则 date/number 控件会撑破容器 */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.search { width: 320px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 8px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--text-2); font-weight: 600; background: #fafbfe; font-size: 12.5px; white-space: nowrap; }
tbody tr:hover { background: #f8fbff; }

/* 可点击进入下一层的表格行（如售前产品的工厂汇总） */
tr.rowlink { cursor: pointer; }
tr.rowlink:hover { background: #eff6ff; }
tr.rowlink td:first-child b { color: var(--brand); }
tr.rowlink:hover td:first-child b { text-decoration: underline; }

/* 看板里的「最近退回」等列表行，点击可进入明细 */
.list-line.rowlink { cursor: pointer; border-radius: 6px; }
.list-line.rowlink:hover { background: #eff6ff; }
th:first-child, td:first-child { padding-left: 14px; }
th:last-child, td:last-child { padding-right: 14px; }
/* 操作列：按钮靠右紧凑排布，最后一颗不留右边距，避免贴边被裁 */
th.act { width: 1px; }   /* 收缩到内容宽度，把多余空间让给左侧信息列 */
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn { margin-right: 5px; }
td.actions .btn:last-child { margin-right: 0; }
td.actions .btn.sm { padding: 0 8px; }

/* 台账表在窄屏（<1280）会横向滚动，用内侧渐隐提示「右边还有内容」 */
.card.is-scroll-x {
  box-shadow: var(--shadow), inset -16px 0 16px -16px rgba(16, 24, 40, .32);
}
.mono { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12.5px; }

/* 自定义下拉选择（替代原生 datalist，保证任何浏览器都能点开下拉） */
.combo { position: relative; }
.combo .input { padding-right: 34px; }
.combo-btn {
  position: absolute; right: 4px; top: 4px; width: 28px; height: 28px;
  border: none; background: transparent; border-radius: 6px;
  color: var(--text-2); cursor: pointer; font-size: 11px; line-height: 1;
}
.combo-btn:hover { background: #eef4ff; color: var(--brand); }
.combo-list {
  display: none; position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 180px; overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); padding: 4px;
}
.combo-list.open { display: block; }
.combo-item {
  padding: 8px 10px; border-radius: 6px; font-size: 13px; cursor: pointer;
  font-family: ui-monospace, Consolas, Menlo, monospace; white-space: nowrap;
}
.combo-item:hover, .combo-item.active { background: #eff6ff; color: var(--brand); }
.combo-empty { padding: 10px; font-size: 12px; color: var(--text-3); text-align: center; }

/* 表格按主板型号分组 */
tr.bp-group td {
  background: #f6f9fe; font-size: 12.5px; padding: 8px 8px 8px 14px;
  cursor: pointer; user-select: none; border-bottom: 1px solid var(--line);
}
tr.bp-group:hover td { background: #eff6ff; }
.bp-caret { display: inline-block; width: 16px; color: var(--brand); transition: transform .15s; }
tr.bp-group.folded .bp-caret { transform: rotate(-90deg); }
.bp-count { color: var(--text-3); margin-left: 8px; font-weight: 400; }
/* 设备参数：主控 + Sensor + 通信模块 合成一列 */
.params { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12.5px; white-space: nowrap; }
.params i { font-style: normal; color: #c8d0dc; margin: 0 6px; }
.params b { font-weight: 600; color: var(--text); }
.params .sensor { color: var(--text-2); }
.params em { font-style: normal; color: var(--brand); }
/* 关键标识类字段不折行，避免窄屏下被压成两行 */
td.mono, td.nowrap, td.nowrap .sub-txt { white-space: nowrap; }
.empty { text-align: center; color: var(--text-3); padding: 46px 0; font-size: 13px; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; line-height: 19px;
  border: 1px solid transparent; white-space: nowrap;
}
.tag.在库 { background: #eaf7ef; color: var(--green); border-color: #c6ebd5; }
.tag.借出 { background: #eef4ff; color: var(--brand); border-color: #cfe0ff; }
.tag.维修 { background: #fff5e9; color: var(--orange); border-color: #ffe0bd; }
.tag.报废 { background: #f3f4f6; color: #8a94a6; border-color: #e3e6ec; }
.tag.送样 { background: #f3f0ff; color: var(--purple); border-color: #e0d8ff; }
.tag.已超期 { background: #fdf0f2; color: var(--red); border-color: #f8d3da; }
.tag.进行中 { background: #eef4ff; color: var(--brand); border-color: #cfe0ff; }
.tag.已归还 { background: #f3f4f6; color: #6b7688; border-color: #e3e6ec; }
.tag.gray { background: #f3f4f6; color: #6b7688; border-color: #e3e6ec; }
.tag.purple { background: #f3f0ff; color: var(--purple); border-color: #e0d8ff; }

/* ---------- 权限设置 ---------- */
.perm-box {
  margin-top: 2px; padding: 14px 16px; border-radius: 10px;
  background: #f8fafd; border: 1px solid #e8eef7;
}
.perm-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.perm-title span { font-weight: 400; font-size: 11.5px; color: var(--text-3); margin-left: 6px; }
.seg { display: flex; gap: 8px; }
.seg-item {
  flex: 1; display: flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; color: var(--text-2); transition: .15s;
}
.seg-item:hover { border-color: #c9d6ea; }
.seg-item:has(input:checked) { border-color: var(--brand); background: #f2f7ff; color: var(--brand); font-weight: 500; }
.seg-item input { margin: 0; accent-color: var(--brand); }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 9px; cursor: pointer; }
.chk:last-child { margin-bottom: 0; }
.chk input { margin: 0; width: 15px; height: 15px; accent-color: var(--brand); }
.perm-txt { font-size: 12.5px; color: var(--text-2); }

/* 售前产品表：主板型号 + 版本号合并成一格 */
.board-cell { display: inline-flex; align-items: baseline; gap: 6px; font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12.5px; }
.board-cell b { font-weight: 600; color: var(--text); }
.board-cell i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
/* 产品表列多，收窄内边距和编码类文本，保证 1180 宽下操作列不被挤出 */
.prod-table th, .prod-table td { padding-left: 6px; padding-right: 6px; }
.prod-table .code-chip { max-width: 150px; }
.prod-table .uuid-chip { max-width: 118px; }
/* 窄一点再把编码文本收紧，优先保住操作列 */
@media (max-width: 1320px) {
  .prod-table .code-chip { max-width: 118px; }
  .prod-table .uuid-chip { max-width: 92px; }
}

/* 模块授权：两个并排的带说明勾选项 */
.perm-mods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mod-item {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; transition: .15s;
}
.mod-item:hover { border-color: #c9d6ea; }
.mod-item:has(input:checked) { border-color: var(--brand); background: #f2f7ff; }
.mod-item input { margin: 2px 0 0; width: 15px; height: 15px; accent-color: var(--brand); flex: none; }
.mod-item span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mod-item b { font-size: 13px; font-weight: 600; color: var(--text); }
.mod-item:has(input:checked) b { color: var(--brand); }
.mod-item i { font-style: normal; font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.req { color: var(--danger, #d64545); font-style: normal; }

/* 只读提示条 */
.notice {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; margin-bottom: 12px; border-radius: 9px;
  background: #fff8ec; border: 1px solid #ffe2b8;
  font-size: 12.5px; color: #9a6b18; line-height: 1.5;
}

/* 可点击复制的编码类文本（授权码 / UUID） */
.code-chip {
  display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom; max-height: 24px;
  font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12px;
  background: #f4f6fa; border: 1px solid var(--line); border-radius: 5px;
  padding: 2px 7px; cursor: pointer; transition: .15s;
}
.code-chip:hover { background: #eef4ff; border-color: #cfe0ff; color: var(--brand); }

/* 通信模块 / 样机归属（数字开头的类名在 CSS 里非法，统一映射成安全类名） */
.tag.m4g { background: #eef4ff; color: var(--brand); border-color: #cfe0ff; }
.tag.mwifi { background: #eaf7ef; color: var(--green); border-color: #c6ebd5; }
.tag.m4gwifi { background: #f3f0ff; color: var(--purple); border-color: #e0d8ff; }
.tag.b-yy { background: #fff5e9; color: var(--orange); border-color: #ffe0bd; }
.tag.b-zk { background: #eef4ff; color: var(--brand); border-color: #cfe0ff; }

.sub-txt { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.sub-txt.danger-txt { color: var(--red); }
.danger-txt { color: var(--red); }
.ok-txt { color: #16a34a; }

/* 扫码录入框（售前产品表单顶部）：扫码枪扫 4G 模块二维码自动解析 SN / IMEI */
.scan-box { border: 1px dashed var(--brand); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; background: #f4f8ff; }
.scan-box > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--brand); margin-bottom: 6px; }
.scan-box .hint { margin-top: 6px; }
.muted { color: var(--text-3); }

/* ---------- 看板 ---------- */
/* 样机 / 售前 视图切换 */
.dash-tabs {
  display: inline-flex; gap: 4px; padding: 3px; margin-bottom: 16px;
  background: #eef1f7; border-radius: 9px;
}
.dash-tab {
  border: 0; background: transparent; padding: 7px 20px; border-radius: 7px;
  font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: .15s;
  font-family: inherit;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 4px rgba(16, 24, 40, .1); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat {
  background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat .k { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.stat .v { font-size: 27px; font-weight: 700; letter-spacing: -.5px; }
.stat .u { font-size: 12.5px; color: var(--text-3); margin-left: 4px; font-weight: 400; }
.stat::after {
  content: ''; position: absolute; right: -26px; top: -26px; width: 108px; height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(38, 120, 239, .16), rgba(38, 120, 239, 0) 70%);
}
.stat.warn::after { background: radial-gradient(circle at 50% 50%, rgba(240, 136, 62, .22), rgba(240, 136, 62, 0) 70%); }
.stat.danger::after { background: radial-gradient(circle at 50% 50%, rgba(208, 48, 80, .2), rgba(208, 48, 80, 0) 70%); }
.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; font-size: 13px; }
.bar-row .name { width: 96px; color: var(--text-2); flex: 0 0 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { flex: 1; height: 8px; background: #eef1f7; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #4d94ff, #2678ef); border-radius: 6px; }
.bar-row .n { width: 34px; text-align: right; color: var(--text-2); font-size: 12.5px; }

.list-line {
  display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.list-line:last-child { border-bottom: none; }
.list-line .t { color: var(--text-3); font-size: 12px; margin-left: auto; white-space: nowrap; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: flex;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: #fff; border-radius: 12px; width: 560px; max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.modal.wide { width: 760px; }
.modal .head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal .head h3 { font-size: 15.5px; font-weight: 600; }
.modal .head .x { margin-left: auto; cursor: pointer; color: var(--text-3); font-size: 18px; line-height: 1; }
.modal .body { padding: 18px 20px; overflow: auto; }
.modal .foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.toast {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); z-index: 200;
}
.toast.err { background: var(--red); }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { width: 62px; flex: 0 0 62px; }
  .sidebar .brand span, .nav a span, .sidebar .foot { display: none; }
  .nav a { justify-content: center; padding: 12px 0; }
  .content { padding: 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .search { width: 100%; }
}

/* ---------------- 下拉选项配置页 ---------------- */
.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
  align-items: start;
}
.opt-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.opt-head { display: flex; flex-direction: column; gap: 4px; }
.opt-head b { font-size: 15px; }
.opt-head span { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.opt-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  min-height: 46px; margin: 14px 0;
  align-content: flex-start;
}
.opt-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 6px;
  background: #f4f6fa; border: 1px solid #e4e8f0;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.opt-chip em {
  font-style: normal; font-weight: 400;
  font-size: 11px; color: var(--text-3);
  background: #fff; border-radius: 4px; padding: 1px 5px;
}
.opt-chip button {
  border: 0; background: none; padding: 0 1px;
  color: #b6bfcc; cursor: pointer; font-size: 13px; line-height: 1;
}
.opt-chip button:hover { color: var(--red); }
.opt-add { display: flex; gap: 8px; }
.opt-add .input { flex: 1; min-width: 0; }
.opt-empty { font-size: 13px; color: var(--text-3); }

@media (max-width: 1100px) {
  .opt-grid { grid-template-columns: 1fr; }
}

/* ---------------- 不良主板：批次二级明细 ---------------- */
.detail-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.detail-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.detail-title b { font-size: 16px; }
.detail-title span { font-size: 12px; color: var(--text-3); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.stat-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.stat-box i { font-style: normal; font-size: 12px; color: var(--text-3); width: 100%; }
.stat-box b { font-size: 22px; line-height: 1.2; }
.stat-box span { font-size: 12px; color: var(--text-3); }
.stat-box.orange b { color: var(--orange); }
.stat-box.green b { color: var(--green); }
.stat-box.red b { color: var(--red); }

.prog-link { color: var(--brand); text-decoration: none; font-weight: 600; border-bottom: 1px dashed rgba(38,120,239,.4); }
/* 二级页顶部的型号标题 */
.detail-name { font-size: 17px; font-weight: 700; color: var(--text); }
.detail-sub { font-size: 12.5px; color: var(--text-2); }
/* UUID 这种长串在表格里截断显示，鼠标悬停看全 */
.uuid-cell { max-width: 250px; font-size: 12px; color: var(--text-2); word-break: break-all; line-height: 1.35; }
/* 高级信息折叠块 */
.adv-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: #fafbfc; }
.adv-box > summary { cursor: pointer; font-size: 13px; color: var(--text-2); font-weight: 600; }
.adv-box[open] > summary { margin-bottom: 10px; }
/* 送样信息区：状态选「送样」时才出现 */
.sample-box { border: 1px solid #e6dcf7; border-radius: 8px; padding: 10px 12px 2px; margin: 10px 0; background: #faf7fe; }
.sample-box::before { content: '送样信息'; display: block; font-size: 12px; font-weight: 600; color: #7b52c9; margin-bottom: 8px; }
.prog-link:hover { border-bottom-color: var(--brand); }

.verdict-sel {
  height: 30px; padding: 0 6px; font-size: 13px;
  border-radius: 6px;
}
.verdict-sel.is-ok { color: var(--green); border-color: #b7e3c8; background: #f2fbf5; font-weight: 600; }
.verdict-sel.is-ng { color: var(--red); border-color: #f2c4cc; background: #fdf4f5; font-weight: 600; }

.cell-analysis { max-width: 320px; color: var(--text-2); font-size: 13px; }

@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 产品图片列表缩略图 */
.spec-thumb {
  width: 56px; height: 56px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: zoom-in;
  display: block;
}
.spec-thumb:hover { border-color: var(--brand); }

/* ---- 固件版本：逐级页面导航 ---- */
.fw-crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13.5px; flex-wrap: wrap; }
.fw-crumb { color: var(--brand); cursor: pointer; }
.fw-crumb:hover { text-decoration: underline; }
.fw-crumb.cur { color: var(--text-1, #1f2937); font-weight: 600; cursor: default; }
.fw-crumb-sep { color: var(--text-3); }
.fw-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; width: 100%; max-width: 100%; }
.fw-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 42px 10px 14px; cursor: pointer; transition: box-shadow .15s, border-color .15s; position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; width: 100%; max-width: 100%; }
.fw-card:hover { box-shadow: 0 4px 14px rgba(31, 66, 135, .12); border-color: var(--brand); }
.fw-card-del { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 24px; height: 24px; line-height: 22px; text-align: center; border: 1px solid var(--line); background: #fff; color: var(--text-3, #9ca3af); border-radius: 6px; font-size: 13px; cursor: pointer; padding: 0; opacity: 0; transition: opacity .15s, color .15s, border-color .15s, background .15s; }
.fw-card:hover .fw-card-del, .fw-card-del:focus { opacity: 1; }
.fw-card-del:hover { color: #dc2626; border-color: #dc2626; background: #fef2f2; opacity: 1; }
.fw-card-ico { font-size: 18px; line-height: 1; flex: none; }
.fw-card-name { font-weight: 600; font-size: 13.5px; flex: 1 1 auto; min-width: 0; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.fw-card-sub { color: var(--text-3); font-size: 12px; white-space: nowrap; flex: none; }
.fw-ver-status { flex: none; font-size: 11.5px; }
select.fw-ver-sel { flex: none; width: 96px; height: 28px; padding: 0 6px; font-size: 12px; cursor: pointer; }
.fw-sec { font-weight: 600; margin: 14px 0 8px; font-size: 13px; color: var(--text-2, #4b5563); }
