:root {
  --bg: #f4faf7;
  --card: #ffffff;
  --line: #e4e9f2;
  --text: #1c2430;
  --sub: #6d8a80;
  --brand: #0f9d6b;
  --brand-soft: #e8f7f0;
  --ok: #11a36b;
  --ok-soft: #e6f7ef;
  --warn: #d98200;
  --warn-soft: #fff4e0;
  --bad: #d94a4a;
  --bad-soft: #fdecec;
  --purple: #7a5af8;
  --purple-soft: #f0ecff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; font-size: 14px; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100%; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1200px 600px at 15% -10%, #dff2e8 0%, rgba(223, 233, 255, 0) 60%),
    radial-gradient(900px 500px at 100% 110%, #e7e1ff 0%, rgba(231, 225, 255, 0) 60%),
    var(--bg);
}
.login-card {
  width: 400px; max-width: 100%; background: var(--card); border-radius: 18px;
  padding: 34px 32px 28px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.login-logo {
  margin-bottom: 16px;
}
.login-logo img { height: 46px; width: auto; display: block; }
.login-card h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: .5px; }
.login-card p.sub { color: var(--sub); margin: 0 0 22px; font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #f9fcfa; outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { resize: vertical; min-height: 84px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text); transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #d5e0dc; background: #f9fcfa; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #0d8a5e; border-color: #0d8a5e; }
.btn-danger { color: var(--bad); border-color: #f2caca; background: #fff; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; padding: 11px; font-weight: 600; }
.login-hint { margin-top: 18px; padding: 12px; border-radius: 10px; background: #f5fbf8; border: 1px dashed #d9e8e2; color: var(--sub); font-size: 12px; line-height: 1.9; }
.login-hint b { color: var(--text); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-bottom: 6px; }

/* ---------- 布局 ---------- */
.layout { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.sidebar { background: linear-gradient(180deg, #f0fbf5 0%, #e6f7ee 55%, #e2f4ef 100%); border-right: 1px solid #d5ebe1; color: #33544a; display: flex; flex-direction: column; padding: 18px 12px; gap: 4px; }
.brand-block { display: flex; gap: 9px; align-items: center; padding: 4px 8px 16px; }
.brand-logo { height: 30px; width: auto; display: block; flex: none; }
.brand-block .t { font-size: 13px; font-weight: 600; color: #12463a; line-height: 1.25; white-space: nowrap; }
.brand-block .s { font-size: 11px; color: #6f9689; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px;
  cursor: pointer; font-size: 13.5px; color: #3c6157; user-select: none;
  transition: background .14s, color .14s, box-shadow .14s;
}
.nav-item:hover { background: rgba(255, 255, 255, .78); color: #0e5c47; }
.nav-item.active { background: #fff; color: #0b7a55; font-weight: 600; box-shadow: 0 2px 10px rgba(15, 90, 68, .09); }
.nav-item .ic { width: 18px; text-align: center; opacity: .85; }
.nav-item.active .ic { opacity: 1; color: #16a06b; }
.nav-badge { margin-left: auto; background: #2fbf8a; color: #fff; font-size: 11px; padding: 0 6px; border-radius: 20px; line-height: 18px; min-width: 18px; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 11.5px; color: #7fa294; line-height: 1.7; }

.main { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line);
}
.topbar h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: .3px; }
.topbar .crumb { color: var(--sub); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.user-chip .n { font-size: 13px; font-weight: 600; }
.user-chip .r { font-size: 11.5px; color: var(--sub); }
.content { flex: 1; overflow: auto; padding: 20px 24px 48px; }

/* ---------- 通用 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.section-title h3 { margin: 0; font-size: 15px; font-weight: 650; }
.section-title .spacer { flex: 1; }
.grid { display: grid; gap: 14px; }
.muted { color: var(--sub); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.kpi .l { font-size: 12.5px; color: var(--sub); }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.5px; margin-top: 2px; }
.kpi .x { font-size: 12px; color: var(--sub); }
.kpi-accent { background: linear-gradient(135deg, #0f9d6b, #16a06b); color: #fff; border: none; }
.kpi-accent .l, .kpi-accent .x { color: rgba(255, 255, 255, .82); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--sub); padding: 11px 12px; background: #f8fafd; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #f2f6f4; vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafdfb; }
.table-wrap { overflow: auto; border-radius: 12px; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; line-height: 19px; white-space: nowrap; }
.tag-gray { background: #f2f6f4; color: #4f665d; }
.tag-blue { background: var(--brand-soft); color: var(--brand); }
.tag-green { background: var(--ok-soft); color: var(--ok); }
.tag-orange { background: var(--warn-soft); color: var(--warn); }
.tag-red { background: var(--bad-soft); color: var(--bad); }
.tag-purple { background: var(--purple-soft); color: var(--purple); }
.note-cell { max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar select, .filter-bar input {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; outline: none; min-width: 120px;
}
.filter-bar input { min-width: 220px; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--brand); }

/* ---------- 产品 ---------- */
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.prod-code { font-weight: 650; letter-spacing: .2px; }
.prod-sub { color: var(--sub); font-size: 12px; }
.tree-hint { color: var(--sub); font-size: 12.5px; margin: 0 0 8px; }
.clickable { cursor: pointer; }

.detail-head { display: flex; gap: 18px; align-items: flex-start; padding: 20px; }
.detail-head .code { font-size: 24px; font-weight: 700; letter-spacing: .3px; }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.detail-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; background: #fff; border-radius: 14px 14px 0 0; }
.tab { padding: 12px 14px; font-size: 13.5px; color: var(--sub); cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
.detail-body { padding: 18px 20px 28px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 13px; }
.kv .k { color: var(--sub); }
.kv .v { white-space: pre-wrap; word-break: break-word; }
.plain-box { background: #f9fcfa; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; font-size: 13px; line-height: 1.8; }
.mono { font-family: "Cascadia Code", Consolas, "SF Mono", monospace; }

/* ---------- 看板 ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.board-col { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; min-height: 120px; }
.board-col h4 { margin: 2px 4px 10px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.count-pill { background: #f3f7f5; color: var(--sub); border-radius: 20px; padding: 0 7px; font-size: 11.5px; }
.task-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; margin-bottom: 8px; background: #fbfefc; }
.task-card .t { font-size: 13px; font-weight: 600; line-height: 1.5; }
.task-card .m { font-size: 11.5px; color: var(--sub); margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; }
.task-card .a { margin-top: 8px; display: flex; gap: 6px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 40, .42); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: 620px; max-width: 100%; max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(16, 24, 40, .25); }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head .x { margin-left: auto; background: none; border: none; font-size: 20px; color: var(--sub); line-height: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bom-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1.6fr .6fr .7fr .8fr 1.1fr 1.2fr 30px; gap: 6px; margin-bottom: 6px; }
.bom-row input { padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; width: 100%; min-width: 0; }
.bom-row .del { border: 1px solid #f2caca; color: var(--bad); background: #fff; border-radius: 7px; height: 32px; }
.bom-labels { font-size: 11.5px; color: var(--sub); margin-bottom: 4px; }
.attach-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.attach { display: inline-flex; align-items: center; gap: 6px; background: #f5f9f7; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.attach button { border: none; background: none; color: var(--bad); }

/* ---------- 提示 ---------- */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: #101828; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #b42318; }
.empty { text-align: center; color: var(--sub); padding: 40px 10px; font-size: 13px; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 8px; gap: 4px; height: auto; }
  .brand-block, .sidebar-foot { display: none; }
  .nav-item { padding: 8px 10px; white-space: nowrap; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

/* ================= 思维导图产品库 ================= */
.mm-bar { flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid #deeae5; background: #fff; color: #3a534a; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; }
.chip.on { background: #12a56e; border-color: #12a56e; color: #fff; font-weight: 600; }
.mm-scroll { overflow: auto; background: radial-gradient(#eff6f3 1px, transparent 1px) 0 0/22px 22px, #fafdfb; border: 1px solid #e9f1ee; border-radius: 16px; padding: 26px 22px; min-height: 420px; }
.mm-canvas { min-width: max-content; }
.mm-cats { display: flex; flex-direction: column; gap: 30px; align-items: flex-start; }
.mm-branch { display: flex; align-items: flex-start; position: relative; }
.mm-children { display: flex; flex-direction: column; justify-content: flex-start; gap: 12px; position: relative; padding-left: 46px; }
.mm-children > .mm-branch::before { content: ''; position: absolute; left: -46px; top: 50%; width: 46px; height: 2px; background: #dbe8e3; }
.mm-spine { position: absolute; left: 0; width: 2px; background: #dbe8e3; pointer-events: none; }
.mm-node { margin-top: 0; background: #fff; border: 1px solid #e4ece9; border-radius: 12px; padding: 9px 12px; width: 186px; box-shadow: 0 2px 6px rgba(24, 52, 102, .05); cursor: pointer; transition: .15s; }
.mm-node:hover { border-color: #12a56e; box-shadow: 0 6px 16px rgba(47, 125, 255, .16); transform: translateY(-1px); }
.mm-node.lv0 { background: #123329; border-color: #123329; color: #fff; width: 132px; }
.mm-node.lv0 .mm-sub { color: #9cb3aa; }
.mm-node.lv1 { background: linear-gradient(135deg, #e9f8f1, #ffffff); border-color: #d3ece0; }
.mm-node.lv2 { background: #f8fcfa; }
.mm-node.dim { opacity: .45; }
.mm-node .mm-tt { font-weight: 700; font-size: 13.5px; }
.mm-node .mm-code { font-weight: 700; font-size: 13.5px; }
.mm-node .mm-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.mm-node .mm-kids { font-size: 11px; color: #12a56e; background: #e9f8f1; border-radius: 6px; padding: 1px 5px; }
.mm-node .mm-sub { font-size: 11.5px; color: #617c72; margin-top: 3px; line-height: 1.45; }
.mm-node .mm-foot { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.mm-node .warn { color: #d98200; }
.mm-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.prog-p1 { border-left: 4px solid #f5a623; }
.prog-p2 { border-left: 4px solid #12a56e; }
.prog-p3 { border-left: 4px solid #24a36b; }
.prog-p4 { border-left: 4px solid #d9534f; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; background: #eefaf4; border: 1px solid #d9efe4; color: #0b7a55; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; text-decoration: none; cursor: pointer; }
.acc-chip:hover { background: #e6f7ef; }
.acc-chip b { color: #0f2f66; font-weight: 600; }
.acc-grid { max-height: 52vh; overflow: auto; border: 1px solid #e9f1ee; border-radius: 10px; padding: 10px; }
.acc-cat { margin-bottom: 10px; }
.acc-cat-t { font-size: 12.5px; font-weight: 700; color: #12a56e; margin-bottom: 6px; }
.acc-item { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px 6px 0; font-size: 12.5px; }
.subtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.subtab { border: 1px solid #e2ebe7; background: #fff; border-radius: 10px; padding: 7px 16px; cursor: pointer; color: #3a534a; font-size: 13px; }
.subtab.on { background: #123329; color: #fff; border-color: #123329; font-weight: 600; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 42vh; overflow: auto; border: 1px solid #e9f1ee; border-radius: 10px; padding: 12px; background: #fafdfb; }
.perm-item { display: flex; align-items: center; justify-content: flex-start; gap: 8px; font-size: 12.5px; color: #2b4a40; }
.perm-item input { width: 15px; height: 15px; flex: 0 0 15px; margin: 0; }
.perm-item span { flex: 1; text-align: left; }

/* ================= 列表模式（手机/小屏） ================= */
.list-group { background: #fff; border: 1px solid #e9f1ee; border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.list-group-t { font-weight: 700; font-size: 14px; color: #123329; margin-bottom: 10px; }
.list-card { border: 1px solid #eef6f2; border-left: 4px solid #d5e2dd; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; background: #f8fcfa; }
.list-card:active { background: #f2fbf7; }
.list-card .lc-top { display: flex; align-items: center; gap: 8px; }
.list-card .lc-top b { font-size: 14px; }
.list-card .lc-meta { font-size: 12px; color: #405a51; margin-top: 4px; }
.list-card .lc-sub { font-size: 11.5px; color: #8ba199; margin-top: 2px; }

/* ================= 资料中心 ================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .span2 { grid-column: span 2; }
.file-input { border: 1px dashed #d8e4df; border-radius: 10px; padding: 10px; background: #fafdfb; width: 100%; }
.file-name { font-size: 13px; }
.file-name a { color: #0b7a55; text-decoration: none; font-weight: 600; }
.file-name a:hover { text-decoration: underline; }
.cert-card { margin-bottom: 12px; }
.cert-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; color: #405a51; }
.file-block { margin-bottom: 16px; }
.file-row { border-bottom: 1px dashed #e9f1ee; padding: 8px 0; }
.file-row:last-child { border-bottom: 0; }
.fr-name { display: flex; align-items: center; gap: 8px; }
.fr-name a { color: #0b7a55; text-decoration: none; font-weight: 600; font-size: 13px; }
.fr-meta { margin-top: 3px; }

/* ================= 手机适配 ================= */
@media (max-width: 760px) {
  .main { min-width: 0; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .topbar h2 { font-size: 17px; }
  .crumb { display: none; }
  .content { padding: 12px 12px 60px; }
  .sidebar { position: sticky; top: 0; z-index: 30; }
  .nav-item { font-size: 12.5px; padding: 7px 9px; }
  .filter-bar { gap: 6px; }
  .filter-bar input, .filter-bar select { min-width: 120px; flex: 1 1 120px; }
  .mm-node { width: 156px; }
  .mm-children { padding-left: 30px; }
  .mm-children > .mm-branch::before { left: -30px; width: 30px; }
  .modal { width: 100%; max-height: 100vh; border-radius: 14px; margin: 8px; }
  .modal-mask { padding: 8px; align-items: flex-start; }
  .modal-body { padding: 14px; }
  .detail-body { padding: 12px; }
  .kv { grid-template-columns: 88px 1fr; }
  .tab { padding: 8px 10px; font-size: 12.5px; }
  .detail-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .perm-grid { grid-template-columns: 1fr; max-height: 40vh; }
  .board { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 640px; }
  .cert-meta { gap: 8px; }
  .btn { padding: 7px 12px; }
  .section-title h3 { font-size: 15px; }
  .kpi-grid { grid-template-columns: 1fr; }
}

/* 细节修正 */
.tab { white-space: nowrap; }
@media (max-width: 760px) {
  .layout { max-width: 100vw; overflow-x: hidden; }
  .content { overflow-x: hidden; }
  .filter-bar { width: 100%; box-sizing: border-box; }
  .card, .table-wrap { max-width: 100%; }
  .detail-tabs { -webkit-overflow-scrolling: touch; }
  .topbar .btn { padding: 6px 10px; }
}

/* 资料中心分类页签 + 证书提醒 */
.file-tabs { flex-wrap: wrap; }
.remind-box { border: 1px solid #ffe2b8; background: #fffaf0; margin-bottom: 12px; }
.remind-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.remind-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; background: #fff; border: 1px solid #ffeccd; border-radius: 10px; font-size: 12.5px; }
@media (max-width: 760px) {
  .file-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .remind-item { align-items: flex-start; }
}

.file-tabs .subtab { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 760px) {
  .ftable thead { display: none; }
  .ftable, .ftable tbody, .ftable tr, .ftable td { display: block; width: auto; }
  .ftable tr { padding: 10px 12px; border-bottom: 1px solid #f0f5f3; }
  .ftable tr:last-child { border-bottom: 0; }
  .ftable td { border: 0; padding: 3px 0; }
  .ftable td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 62px; color: #8a9f97; font-size: 12px; }
  .ftable td:first-child::before { display: none; }
  .ftable td[data-label="操作"] { padding-top: 8px; }
}
@media (max-width: 760px) {
  .table-wrap:has(.ftable) { overflow: visible; }
}

/* ===== v5 节点操作：右键菜单 / 拖拽 / 剪贴板 ===== */
.ctx-menu { position: fixed; z-index: 90; min-width: 168px; background: #fff; border: 1px solid #e0ebe6; border-radius: 10px; box-shadow: 0 10px 28px rgba(20, 45, 90, .18); padding: 4px; }
.ctx-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: 7px; font-size: 13px; color: #223; cursor: pointer; }
.ctx-item:hover { background: #e9f8f1; }
.ctx-item.danger { color: #c0392b; }
.ctx-item.danger:hover { background: #fdecea; }
.mm-node.dragging { opacity: .45; }
.mm-node.drop-target { border-color: #0f9d6b; box-shadow: 0 0 0 2px rgba(43, 110, 246, .35); background: #eefaf4; }
.clip-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #0b7a55; background: #e9f8f1; border: 1px solid #d9efe4; border-radius: 8px; padding: 3px 6px 3px 10px; }
@media (max-width: 760px) {
  .ctx-menu { min-width: 150px; }
  .clip-chip { max-width: 100%; flex-wrap: wrap; }
}

/* ===== v6 待确认节点 / Excel 模板导入 ===== */
.pend-box { background: #fff; border: 1px dashed #e9b45a; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.pend-box h4 { margin: 0 0 4px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.pend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.pend-card { border: 1px solid #f0d6a8; background: #fffdf7; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.pend-card:hover { border-color: #e9b45a; box-shadow: 0 3px 10px rgba(180, 120, 30, .12); }
.pend-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.pending-banner { background: #fff8ea; border: 1px dashed #e9b45a; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.new-node-box { border: 1px dashed #d3e3dd; background: #f6fbf8; border-radius: 10px; padding: 12px; margin-top: 8px; }
.req-newtip { background: #fff8ea; border: 1px dashed #e9b45a; border-radius: 8px; padding: 6px 10px; font-size: 12px; color: #8a5a12; margin: 6px 0; }
.imp-block { margin-top: 12px; }
.imp-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12.5px; }
.imp-table th, .imp-table td { border-bottom: 1px solid #f0f5f3; padding: 6px 8px; text-align: left; }
@media (max-width: 760px) {
  .pend-grid { grid-template-columns: 1fr; }
  .pending-banner .row select { max-width: 100% !important; }
}

/* ===== v7 节点点击后的 5 个操作框 ===== */
.node-actions { position: fixed; z-index: 95; display: flex; gap: 2px; background: #fff; border: 1px solid #deeae5; border-radius: 12px; padding: 5px; box-shadow: 0 10px 26px rgba(20, 45, 90, .18); animation: naIn .12s ease-out; }
@keyframes naIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.na-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 52px; padding: 7px 8px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: #2c5c4b; font-size: 12px; line-height: 1; }
.na-btn:hover { background: #e9f8f1; color: #0b7a55; }
.na-btn:active { transform: scale(.96); }
.na-btn .na-ic { display: flex; }
.na-btn .na-tx { font-size: 11.5px; }
.na-btn.danger { color: #c0392b; }
.na-btn.danger:hover { background: #fdecea; }
.na-btn.off { opacity: .34; cursor: not-allowed; }
.mm-node.na-src { box-shadow: 0 0 0 2px rgba(43, 110, 246, .45), 0 2px 6px rgba(24, 52, 102, .05); }
@media (max-width: 760px) {
  .node-actions { gap: 0; padding: 4px; }
  .na-btn { min-width: 46px; padding: 7px 6px; }
}

/* ===== v7 按档位续航测试 ===== */
.test-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.gear-wrap { border: 1px solid var(--line); border-radius: 10px; }
.gear-table { font-size: 13px; }
.gear-table th { background: #f4faf7; font-size: 12px; white-space: nowrap; padding: 6px 8px; }
.gear-table td { padding: 4px 6px; vertical-align: middle; }
.gear-table input, .gear-table select { width: 100%; min-width: 56px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.gear-table td.gc { width: 1%; white-space: nowrap; }
.gear-table td.gc input, .gear-table td.gc select { min-width: 62px; text-align: center; }
.sec-h { font-size: 13px; font-weight: 600; color: #2c5c4b; margin: 6px 0 8px; }
.btn-xs { padding: 2px 7px; font-size: 12px; border-radius: 6px; }
@media (max-width: 760px) {
  .gear-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .gear-table { min-width: 760px; }
  .test-card { padding: 10px; }
}

/* ===== v7 导入时手动指定上级节点 ===== */
.imp-map { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.imp-map-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #f8fcfa; }
.imp-map-row select { width: 100%; margin-top: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.tag-orange { background: #fff4e5; color: #b26a00; }

/* v7 宽弹窗（按档位续航录入等表格较多的表单） */
.modal.wide { max-width: 1080px; width: 96vw; }
.modal.wide .modal-body { max-height: 72vh; }
@media (max-width: 760px) { .modal.wide { width: 100vw; max-width: 100vw; border-radius: 0; } }

/* v7 手机端：档位录入表格改为卡片式堆叠，方便手机上填写 */
@media (max-width: 760px) {
  .gear-table { min-width: 620px; }
  .gear-edit { min-width: 0 !important; display: block; }
  .gear-edit thead { display: none; }
  .gear-edit tbody { display: block; }
  .gear-edit tr { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; margin-bottom: 8px; background: #f8fcfa; }
  .gear-edit td { display: block; border: 0; padding: 3px 0; }
  .gear-edit td.gc { width: auto; text-align: left; white-space: normal; }
  .gear-edit td.gc input, .gear-edit td.gc select { min-width: 0; text-align: left; }
  .gear-edit td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: #7f9a90; margin-bottom: 2px; }
  .gear-edit td:last-child { text-align: right; padding-top: 6px; }
  .gear-edit td:last-child .btn-danger { padding: 4px 12px; }
}

/* v7 手机端弹窗改为全屏抽屉：头尾固定，中间滚动，避免表格/长表单被挤 */
@media (max-width: 760px) {
  .modal-mask { padding: 0; place-items: stretch; }
  .modal, .modal.wide { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; border-radius: 0; overflow: hidden; display: flex; flex-direction: column; }
  .modal-head, .modal-foot { position: static; flex: 0 0 auto; }
  .modal-head { padding: 12px 14px; }
  .modal-body { flex: 1 1 auto; overflow: auto; -webkit-overflow-scrolling: touch; max-height: none !important; padding: 14px; }
  .modal-foot { padding: 10px 14px; }
  .modal-foot .btn { flex: 1 1 0; }
}

/* ===== v8 五级树：横向分列 + 一次只展开一条链 ===== */
.tree-wrap { overflow-x: auto; overflow-y: visible; padding: 2px 2px 12px; }
.tree-cols { display: flex; gap: 26px; align-items: flex-start; min-height: 120px; }
.tree-col { flex: 0 0 auto; width: 236px; display: flex; flex-direction: column; gap: 8px; }
.tree-col-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5f7a70; padding: 0 2px 2px; border-bottom: 1px dashed #e3ebe8; margin-bottom: 2px; }
.tree-col-h b { font-size: 12px; font-weight: 600; color: #2f5f4e; }

.tnode { position: relative; background: #fff; border: 1px solid #dfeae5; border-left: 3px solid #d3e3dd; border-radius: 10px; padding: 9px 30px 9px 10px; cursor: pointer; transition: box-shadow .12s, border-color .12s, transform .12s; display: flex; gap: 9px; align-items: flex-start; }
.tnode:hover { border-color: #9dbdf0; box-shadow: 0 2px 10px rgba(30, 70, 140, .09); }
.tnode.on { border-color: #0f9d6b; border-left-color: #0f9d6b; box-shadow: 0 0 0 2px rgba(43, 110, 246, .13); }
.tnode.lv1 { border-left-color: #0f9d6b; background: #f6fbf8; }
.tnode.is-dev { border-left-color: #f5a623; }
.tnode.is-dev.prog-p3, .tnode.is-dev:nth-child(n) { }
.tnode.na-src { box-shadow: 0 0 0 2px rgba(43, 110, 246, .5); }
.tnode.dragging { opacity: .45; }
.tnode.drop-target { border-color: #0f9d6b; background: #e9f8f1; }
.tn-main { min-width: 0; flex: 1 1 auto; }
.tn-code { font-weight: 600; font-size: 13.5px; color: #16362c; word-break: break-all; }
.tn-meta { font-size: 11.5px; color: #7f9a90; margin-top: 2px; }
.tn-foot { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.tn-kids { font-size: 11px; color: #90a69e; }
.tn-img { width: 40px; height: 40px; object-fit: cover; border-radius: 7px; border: 1px solid #e8f0ed; flex: 0 0 auto; background: #f5f9f7; }
.tn-chev { position: absolute; right: 8px; bottom: 7px; font-size: 11px; color: #9ab2a9; }
.tn-btn { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #9ab2a9; border-radius: 6px; cursor: pointer; padding: 0; }
.tn-btn:hover { background: #e9f8f1; color: #0f9d6b; }

/* 手机：纵向手风琴 */
.tree-mobile { display: flex; flex-direction: column; gap: 7px; }
@media (max-width: 900px) {
  .tree-cols { flex-direction: column; gap: 12px; }
  .tree-col { width: 100%; }
  .tree-col-h { margin-top: 6px; }
}

/* 五级节点上的操作框：窄屏收紧 */
@media (max-width: 760px) {
  .node-actions { left: 8px !important; right: 8px; justify-content: space-around; }
  .na-btn { min-width: 0; flex: 1 1 0; }
}

/* v8 列宽自适应：五列也能塞进一屏，不再横向滚动 */
.tree-cols { gap: 18px; }
.tree-col { flex: 1 1 205px; width: auto; min-width: 188px; max-width: 330px; }
@media (max-width: 900px) { .tree-col { max-width: none; } }

/* v8 手机缩进更清楚 */
.tree-mobile .tnode { margin-right: 0 !important; }

/* ===== v9：产品库固定框架，只有树区域上下滚动 ===== */
.content.view-products { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 10px; }
.content.view-products .filter-bar { flex: none; }
.content.view-products .tree-wrap { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 2px 0 0; }
.content.view-products .tree-cols { height: 100%; align-items: stretch; }
.content.view-products .tree-col { min-height: 0; }
.tree-col-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 2px 6px 10px 2px; }
.tree-col-body::-webkit-scrollbar { width: 9px; }
.tree-col-body::-webkit-scrollbar-thumb { background: #d8e6e1; border-radius: 6px; }
.tree-col-body::-webkit-scrollbar-thumb:hover { background: #b3c8bf; }
.tree-col-h { flex: none; }
.content.view-products .mm-legend { flex: none; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }

/* 工具栏分两行：第一行筛选，第二行节点操作，各自不换行 */
.filter-bar.fb-row1, .filter-bar.fb-row2 { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 10px; }
.filter-bar.fb-row2 { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.filter-bar.fb-row2 .btn { flex: none; }
.fb-lbl { flex: none; font-size: 12px; color: #8ba199; letter-spacing: .5px; }
.fb-row1 input { flex: 0 1 260px; }
.fb-row1 .chips { flex: none; }
.fb-row1 select { flex: none; }
@media (max-width: 1180px) { .fb-row1 { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 900px) {
  .content.view-products { overflow: auto; display: block; padding-bottom: 40px; }
  .tree-col-body { overflow: visible; }
  .filter-bar.fb-row1, .filter-bar.fb-row2 { flex-wrap: wrap; overflow: visible; }
  .content.view-products .mm-legend { border-top: none; }
}

/* v9 侧栏品牌：logo + 公司名一行放下 */
.brand-block > div { min-width: 0; }
.brand-block .t { font-size: 12px; white-space: nowrap; }
.brand-block .s { white-space: nowrap; }

/* ===== v10：所有页面统一「外围固定、内容区滚动」 ===== */
.content { display: flex; flex-direction: column; overflow: hidden; padding: 20px 24px 16px; }
.content > * { flex: 0 0 auto; }
.page-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.fill-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.fill-card > .table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.fill-card > .table-wrap > table { margin: 0; }
.table-wrap > table > thead > tr > th { position: sticky; top: 0; z-index: 3; background: #f7fbf9; }
.page-scroll::-webkit-scrollbar, .fill-card > .table-wrap::-webkit-scrollbar { width: 9px; height: 9px; }
.page-scroll::-webkit-scrollbar-thumb, .fill-card > .table-wrap::-webkit-scrollbar-thumb { background: #d8e6e1; border-radius: 6px; }
/* 设备详情：tab 以下才是滚动区 */
.card.fill-card > .detail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
@media (max-width: 900px) {
  .content { display: block; overflow: auto; padding: 14px 12px 40px; }
  .page-scroll { overflow: visible; padding-right: 0; }
  .fill-card { display: block; overflow: visible; }
  .fill-card > .table-wrap { overflow: visible; }
  .card.fill-card > .detail-body { overflow: visible; }
  .table-wrap > table > thead > tr > th { position: static; }
}

/* ===== v11：测试续航页 4 个块各自滚动，其余固定 ===== */
.content.view-tests { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 12px; }
.content.view-tests .board-wrap { flex: 1 1 46%; min-height: 150px; display: flex; flex-direction: column; }
.content.view-tests .board-wrap > .section-title { flex: none; }
.content.view-tests .board { flex: 1 1 auto; min-height: 0; }
.content.view-tests .board-col { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 12px 6px 8px 12px; }
.content.view-tests .board-col h4 { flex: none; }
.content.view-tests .board-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 7px; }
.content.view-tests .board-body::-webkit-scrollbar { width: 8px; }
.content.view-tests .board-body::-webkit-scrollbar-thumb { background: #d8e6e1; border-radius: 6px; }
.content.view-tests .rec-card { flex: 1 1 54%; min-height: 150px; display: flex; flex-direction: column; overflow: hidden; }
.content.view-tests .rec-card > .table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.content.view-tests .mm-legend { flex: none; }
@media (max-width: 900px) {
  .content.view-tests { overflow: visible; display: block; }
  .content.view-tests .board-wrap { min-height: 0; display: block; }
  .content.view-tests .board-body { overflow: visible; padding-right: 0; }
  .content.view-tests .board-col { overflow: visible; }
  .content.view-tests .rec-card { min-height: 0; display: block; overflow: visible; }
  .content.view-tests .rec-card > .table-wrap { overflow: visible; }
}

/* v12：隐藏五列列标题（一级 · 大类目 / 二级 · 系列 …） */
.tree-col-h { display: none !important; }
.content.view-products .tree-col { padding-top: 2px; }

/* v13：列表视图同样「外围固定、列表区滚动」 */
.content.view-products .tree-mobile { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 6px 10px 2px; }
.content.view-products .tree-mobile::-webkit-scrollbar { width: 9px; }
.content.view-products .tree-mobile::-webkit-scrollbar-thumb { background: #d8e6e1; border-radius: 6px; }
@media (max-width: 900px) {
  .content.view-products .tree-mobile { overflow: visible; padding: 0; }
}

/* ===== v14：导航清新配色 + 手机自适应（手机上图标单排） ===== */
@media (max-width: 980px) {
  .sidebar { flex-direction: row; flex-wrap: nowrap; overflow: visible; padding: 6px 8px; gap: 2px; height: auto; align-items: center; border-right: 0; border-bottom: 1px solid #d5ebe1; }
  .brand-block, .sidebar-foot { display: none; }
  .nav-item { position: relative; flex: 1 1 0; min-width: 0; justify-content: center; padding: 9px 0; gap: 0; border-radius: 10px; font-size: 13px; white-space: nowrap; }
  .nav-item .lbl { display: none; }
  .nav-item .ic { width: auto; font-size: 18px; line-height: 1; }
  .nav-item:hover { background: transparent; }
  .nav-item.active { background: #e8f7f0; box-shadow: none; color: #0b7a55; }
  .nav-item.active::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 14px; height: 2px; margin-left: -7px; border-radius: 2px; background: #12a56e; }
  .nav-badge { position: absolute; top: 1px; right: 2px; margin: 0; font-size: 10px; line-height: 15px; min-width: 15px; padding: 0 4px; border-radius: 10px; }
}
/* 手机上表格允许横向滚动（不再整体溢出） */
@media (max-width: 760px) {
  .fill-card > .table-wrap { overflow-x: auto; overflow-y: visible; }
  .main, .layout { max-width: 100vw; }
  .modal .form-grid, .form-grid { grid-template-columns: 1fr !important; }
  .kv { grid-template-columns: 92px 1fr; }
}

/* ===== v14 配色收口：状态色统一为清新冷色系（绿 / 青 / 橙 / 红） ===== */
:root { --purple: #2f8f8a; --purple-soft: #e4f4f2; }
.tag-blue { background: #e6f6fb; color: #1285a8; }
.tag-purple { background: var(--purple-soft); color: var(--purple); }
.stat-pill.active, .chip.active { background: var(--brand); border-color: var(--brand); }

.subtab.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.detail-tabs .tab.on, .detail-tabs .tab.active { color: var(--brand); border-color: var(--brand); }
.topbar h2 { color: #123329; }

/* v14 手机端：导航用彩色 emoji 图标，桌面端仍用线条字形 */
.ic-m { display: none; }
@media (max-width: 980px) {
  .nav-item > .ic { display: none; }
  .nav-item > .ic-m { display: inline-block; font-size: 20px; line-height: 1; }
}

/* v14 导航图标统一为单色线性 SVG（跟随 currentColor） */
.nav-item .ic { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; opacity: .95; }
.nav-item .ic svg { width: 18px; height: 18px; display: block; }
.nav-item.active .ic { color: #12a56e; opacity: 1; }
@media (max-width: 980px) {
  .nav-item > .ic, .nav-item .ic svg { width: 21px; height: 21px; }
  .ic-m { display: none !important; }
}

/* ===== v15：所有弹窗统一「头尾固定 + 中间滚动 + 永不超屏」 ===== */
.modal-mask { padding: 16px; overflow: auto; }
.modal, .modal.wide {
  display: flex; flex-direction: column;
  max-height: calc(100vh - 32px); overflow: hidden;
}
.modal-head { position: static; flex: 0 0 auto; }
.modal-foot { position: static; flex: 0 0 auto; }
.modal-body, .modal.wide .modal-body {
  flex: 1 1 auto; min-height: 0; max-height: none !important;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal-body::-webkit-scrollbar { width: 9px; }
.modal-body::-webkit-scrollbar-thumb { background: #d8e6e1; border-radius: 6px; }
/* 窄屏（笔记本/小窗口）高度更紧时，收一点内边距保证内容区够用 */
@media (max-height: 780px) {
  .modal-head { padding: 12px 18px; }
  .modal-body { padding: 14px 18px; }
  .modal-foot { padding: 10px 18px; }
}
@media (max-width: 760px) {
  .modal-mask { padding: 0; overflow: hidden; }
  .modal, .modal.wide { max-height: 100%; height: 100%; border-radius: 0; }
}

/* v16：登录页去掉副标题后，整卡在整屏内水平+垂直居中 */
.login-wrap { min-height: 100vh; }
.login-card h1 { margin-bottom: 20px; }

/* ===== v17：登录页改为「左插画 + 右表单」分栏（参考样式） ===== */
.lg-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff;
}
.lg-art {
  display: flex; align-items: center; justify-content: center; padding: 36px;
  background: radial-gradient(760px 520px at 32% 22%, #f2fbf7 0%, rgba(255,255,255,0) 72%), #fcfefd;
}
.lg-art-svg { width: min(560px, 100%); height: auto; }
.lg-form { display: flex; align-items: center; justify-content: center; padding: 40px 56px; }
.lg-card { width: 100%; max-width: 392px; }
.lg-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lg-brand img { height: 42px; width: auto; display: block; }
.lg-brand span { font-size: 25px; font-weight: 700; color: #123329; letter-spacing: .5px; }
.lg-welcome { margin: 0 0 36px; color: #7f9a90; font-size: 14px; }
.lg-field { position: relative; margin-bottom: 22px; border-bottom: 1px solid #e2ece8; transition: border-color .15s; }
.lg-field:focus-within { border-bottom-color: var(--brand); }
.lg-field .lg-ic { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #a8bdb5; pointer-events: none; }
.lg-field input { width: 100%; border: 0; background: transparent; padding: 12px 42px 12px 30px; font-size: 15px; color: #123329; }
.lg-field input::placeholder { color: #a9bdb5; }
.lg-field input:focus { outline: none; }
.lg-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 60px #fff inset; -webkit-text-fill-color: #123329; }
.lg-eye { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; padding: 4px; border: 0; background: none; color: #a8bdb5; cursor: pointer; }
.lg-eye svg { width: 19px; height: 19px; }
.lg-eye:hover, .lg-eye.on { color: var(--brand); }
#loginErr { margin: -8px 0 12px; }
.lg-submit {
  width: 100%; height: 46px; margin-top: 12px; border: 0; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 3px;
  cursor: pointer; transition: background .15s, box-shadow .15s;
}
.lg-submit:hover { background: #0d8a5e; box-shadow: 0 8px 20px rgba(15, 157, 107, .22); }
.lg-submit:active { transform: translateY(1px); }
.lg-foot { margin-top: 28px; font-size: 12px; color: #a8bdb5; }

@media (max-width: 1024px) {
  .lg-wrap { grid-template-columns: 1fr 1fr; }
  .lg-form { padding: 32px; }
}
@media (max-width: 880px) {
  .lg-wrap { grid-template-columns: 1fr; }
  .lg-art { display: none; }
  .lg-form { padding: 30px 22px; }
  .lg-brand img { height: 36px; }
  .lg-brand span { font-size: 22px; }
  .lg-welcome { margin-bottom: 28px; }
}

/* v17 微调：插画再放大一点、竖向不超过一屏 */
.lg-art-svg { width: min(620px, 94%); max-height: 76vh; }
.lg-art { padding: 20px 24px; }

/* v17 修正：LOGO 与「产品资料库」字号比例协调 */
.lg-brand { gap: 10px; margin-bottom: 12px; align-items: center; }
.lg-brand img { height: 34px; }
.lg-brand span { font-size: 21px; font-weight: 600; letter-spacing: .5px; color: #22312c; line-height: 1; }
.lg-welcome { font-size: 13.5px; }
@media (max-width: 880px) {
  .lg-brand img { height: 30px; }
  .lg-brand span { font-size: 19px; }
}

/* ===== v18：主色调整体调淡，绿色只作点缀，底色回到中性灰白 ===== */
:root {
  --bg: #f7faf8;
  --brand: #24ab7f;
  --brand-soft: #eaf7f1;
  --line: #e8efec;
}
/* 侧栏：白底、细边，不再是整片薄荷绿 */
.sidebar {
  background: #fcfefd;
  border-right: 1px solid #edf3f0;
  color: #4e6a62;
}
.sidebar .nav-item { color: #53706a; }
.sidebar .nav-item:hover { background: rgba(36, 171, 127, .07); color: #1d6b53; }
.sidebar .nav-item.active { background: #ffffff; color: #1f8f68; box-shadow: 0 1px 3px rgba(20, 60, 48, .07); }
.brand-block .t { color: #2b4a40; }
.brand-block .s { color: #8ba69c; }
.sidebar-foot { color: #93aca3; }
/* 顶部栏与内容区之间更轻的分隔 */
.topbar { background: #fff; border-bottom: 1px solid #eef4f1; }
/* 卡片左侧色条淡化，只在选中/悬浮时才显绿 */
.tnode { border-color: #e8efec; border-left-color: #e3efea; }
.tnode:hover { border-color: #d5e8e0; }
.tnode.on { border-color: #7fcbb0; border-left-color: #24ab7f; box-shadow: 0 0 0 2px rgba(36, 171, 127, .1); }
.tnode.lv1 { border-left-color: #c6e6d8; background: #fcfefd; }
.tnode.is-dev { border-left-color: #f7d8ab; }
.list-card { border-color: #edf4f1; border-left-color: #e0ece7; background: #fcfefd; }
.prog-p2 { border-left-color: #8fd0b5; }
.prog-p3 { border-left-color: #b0ddc9; }
/* 主按钮略淡、悬停更明显，避免大面积深绿压眼 */
.btn-primary, .btn.btn-primary { background: #24ab7f; border-color: #24ab7f; }
.btn-primary:hover, .btn.btn-primary:hover { background: #1c9a70; border-color: #1c9a70; }
.chip.on { background: #24ab7f; border-color: #24ab7f; }
.subtab.on { background: #24ab7f; border-color: #24ab7f; }
.lg-submit { background: #24ab7f; }
.lg-submit:hover { background: #1c9a70; }
.nav-badge { background: #4cc79c; }
a { color: #1f9b73; }

/* v18 再收一档：标签与卡片色条也降饱和 */
:root { --bg: #f8faf9; }
.tnode { border-left-color: #e6efeb; }
.tnode.lv1 { border-left-color: #cfe9dc; }
.tnode.on { border-left-color: #3cb98d; }
.tag-orange { background: #fdf6ec; color: #b8823a; }
.tag-blue { background: #eef7fa; color: #4d90a3; }
.tag-purple { background: #eef6f4; color: #4a8f88; }
.tag-green { background: #edf8f2; color: #2c8f68; }
.tag-red { background: #fdf0ef; color: #c0615b; }
.tag-gray { background: #f4f7f6; color: #5f746e; }
.prog-p1 { border-left-color: #f0c58a; }
.prog-p4 { border-left-color: #e5a09c; }

/* ===== v19：内容区底色再淡一档，全站（除登录页）统一 ===== */
:root { --bg: #fbfcfc; --brand-soft: #eef8f4; --line: #eaeff0; }
.content { background: #fbfcfc; }
/* 表格 */
th { background: #fafbfb; }
.table-wrap > table > thead > tr > th { background: #fafbfb; }
.gear-table th { background: #fafbfb; }
tbody tr:hover td { background: #fdfdfc; }
/* 浅色容器统一 */
.plain-box, .file-input, .perm-grid, .task-card, .imp-map-row,
.new-node-box, .mm-node.lv2, .tnode.lv1, .list-card, .pend-card { background: #fcfdfc; }
.attach, .tn-img, .btn:hover, .login-hint { background: #f9fbfa; }
.count-pill, .tag-gray { background: #f5f7f6; }
.list-card:active { background: #f8fafa; }
/* 侧栏/顶栏保持纯白，与更淡的内容区只靠 1px 线分隔 */
.topbar { border-bottom: 1px solid #eef1f1; }
.sidebar { border-right: 1px solid #eef1f1; }
/* 手机导航选中态也淡一档 */
@media (max-width: 880px) {
  .nav-item.active { background: #eef8f4; color: #1f8f68; }
}

/* ===== v20：手机端 App 化（底部标签栏 + 全屏安全区） ===== */
.lbl-s { display: none; }

@supports (height: 100dvh) {
  .layout { height: 100dvh; }
}

@media (max-width: 760px) {
  /* 手机上一列布局：内容在上、导航固定到屏幕底部 */
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100dvh;
    padding-bottom: 0;
  }
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    z-index: 80;
    display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch;
    gap: 0; padding: 5px 2px calc(5px + env(safe-area-inset-bottom, 0px));
    height: auto; overflow: visible;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border: 0; border-top: 1px solid #ebf0ee;
    box-shadow: 0 -1px 0 rgba(20, 60, 48, .03), 0 -8px 24px rgba(20, 60, 48, .05);
  }
  .sidebar .brand-block, .sidebar .sidebar-foot { display: none; }

  .nav-item {
    flex: 1 1 0; min-width: 0;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 6px 0 3px; height: 50px;
    border-radius: 12px; background: transparent !important; box-shadow: none !important;
  }
  .nav-item .lbl { display: none; }
  .nav-item .lbl-s {
    display: block; font-size: 10.5px; line-height: 1; letter-spacing: .2px;
    color: #7c948c; white-space: nowrap; transform: scale(.98);
  }
  .nav-item .ic, .nav-item .ic svg { width: 22px; height: 22px; }
  .nav-item .ic { color: #7c948c; opacity: 1; }
  .nav-item.active .ic, .nav-item.active .ic svg { color: #1f8f68; }
  .nav-item.active .lbl-s { color: #1f8f68; font-weight: 600; }
  .nav-item.active::after { display: none; }
  .nav-item:active { background: rgba(36, 171, 127, .07) !important; }
  .nav-badge {
    position: absolute; top: 2px; right: 50%; margin-right: -20px;
    font-size: 9.5px; line-height: 14px; min-width: 14px; padding: 0 4px;
  }

  /* 顶栏压扁，内容区给底部栏留出空间 */
  .topbar {
    padding: calc(9px + env(safe-area-inset-top, 0px)) 14px 9px;
    gap: 8px; min-height: 50px;
  }
  .topbar h2 { font-size: 16px; }
  .topbar .crumb { display: none; }
  .topbar .user-chip { display: none; }
  .content { padding: 12px 12px calc(72px + env(safe-area-inset-bottom, 0px)); }
  .content.view-products, .content.view-tests { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

  /* 弹窗全屏时避开顶部状态栏，底部按钮不被手势条压住 */
  .modal-head { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .modal-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .modal-mask { padding: 0; }
}

/* 平板/小笔电：保留顶部横排图标导航 */
@media (min-width: 761px) and (max-width: 980px) {
  .lbl-s { display: none; }
}

/* 独立窗口（已安装为 App）时，去掉可以省的阴影，更像原生 */
@media (display-mode: standalone) {
  .sidebar { box-shadow: 0 -1px 0 rgba(20, 60, 48, .04); }
}

/* ===== v20：手机上筛选区收成两行横滑，顶栏更轻 ===== */
@media (max-width: 760px) {
  .filter-bar.fb-row1, .filter-bar.fb-row2 {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    gap: 6px; padding-bottom: 4px; margin-bottom: 6px;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .filter-bar.fb-row1::-webkit-scrollbar, .filter-bar.fb-row2::-webkit-scrollbar { display: none; }
  .filter-bar.fb-row1 > *, .filter-bar.fb-row2 > * { flex: 0 0 auto; }
  .filter-bar.fb-row1 input { flex: 0 0 58%; }
  .filter-bar .chips { flex-wrap: nowrap; }
  .filter-bar .fb-lbl { display: none; }
  .filter-bar select { max-width: 46vw; }

  /* 顶栏「退出」降为轻量文字操作，不抢标题 */
  .topbar > .btn { border: 0; background: transparent; color: #8aa39a; font-size: 12.5px; padding: 6px 4px; }
  .topbar > .btn:hover { color: #1f8f68; background: transparent; }
}

/* v20：手机上「+ 新增大类目」提为右下悬浮按钮，不藏在横滑行尾 */
@media (max-width: 760px) {
  .filter-bar.fb-row2 > [data-act="add-node"] {
    position: fixed; right: 14px; bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: 70; margin: 0; height: 42px; padding: 0 18px;
    border-radius: 999px; font-size: 13px;
    box-shadow: 0 8px 20px rgba(20, 120, 88, .28);
  }
  /* 横滑区域右侧淡出，暗示还能滑 */
  .filter-bar.fb-row1, .filter-bar.fb-row2 {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent 100%);
  }
}

/* v20 修正：mask 会把 fixed 悬浮按钮一起裁掉，改为不加遮罩 */
@media (max-width: 760px) {
  .filter-bar.fb-row1, .filter-bar.fb-row2 {
    -webkit-mask-image: none; mask-image: none;
  }
}

/* v20：手机上「测试记录」标题不再被压成竖排，看板改为整页滚动 */
@media (max-width: 760px) {
  .section-title { flex-wrap: wrap; row-gap: 8px; }
  .section-title h3 { flex: 0 0 auto; white-space: nowrap; }

  .content.view-tests { display: block; overflow: auto; }
  .content.view-tests .board-wrap { display: block; }
  .content.view-tests .board { grid-template-columns: 1fr; gap: 8px; }
  .content.view-tests .board-col { min-height: 0; padding: 10px 6px 8px 10px; }
  .content.view-tests .board-body { max-height: 104px; }
  .content.view-tests .rec-card { display: block; }
  .content.view-tests .rec-card > .table-wrap { overflow-x: auto; }
}

/* v20：手机上空表格的提示贴左侧，不被 8 列表格挤到屏幕外 */
@media (max-width: 760px) {
  .content { overflow-x: hidden; }
  td.empty {
    position: sticky; left: 0; white-space: normal; text-align: left;
    padding-left: 12px; padding-right: 12px;
  }
}

/* v20：手机上页签横滑不换行、滚动条细淡 */
@media (max-width: 760px) {
  .subtabs { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 6px; scrollbar-width: none; }
  .subtabs::-webkit-scrollbar { display: none; }
  .subtabs > * { flex: 0 0 auto; }
  .subtabs .subtab { font-size: 12.5px; padding: 5px 10px; }
  .table-wrap::-webkit-scrollbar { height: 6px; }
  .table-wrap::-webkit-scrollbar-thumb { background: #e3ece8; border-radius: 3px; }
  .table-wrap::-webkit-scrollbar-track { background: transparent; }
}

/* v20：平板（761–980）顶部图标导航居中收拢，不再被拉得稀疏 */
@media (min-width: 761px) and (max-width: 980px) {
  .sidebar {
    justify-content: center; gap: 4px;
    padding: 8px 12px; border-bottom: 1px solid #eef1f1;
    background: #fcfefd;
  }
  .nav-item {
    flex: 0 0 auto; padding: 8px 18px; border-radius: 10px;
    justify-content: center;
  }
  .nav-item.active { background: #eef8f4; box-shadow: none; }
  .nav-item.active::after { display: none; }
}

/* ===================================================================
   v21：手机端改成微信式 App 结构
   底栏 5 格「产品 / 需求 / ＋ / 测试 / 我的」，各页筛选压成一行 + 菜单键
   =================================================================== */
.only-m { display: none !important; }
.nav-add { display: none; }

/* 圆形图标按钮（＋ / 下载 / 导出 / 三条横杠） */
.btn-ic {
  width: 34px; height: 34px; padding: 0; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--brand); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-ic svg { width: 17px; height: 17px; }
.btn-ic:hover { background: var(--brand-soft); border-color: #d8ece4; }
.btn-ic.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-ic.primary:hover { filter: brightness(1.04); }

/* 底部动作面板（二级菜单） */
.sheet-mask {
  position: fixed; inset: 0; z-index: 900; background: rgba(18, 38, 32, .26);
  animation: sheetFade .16s ease-out;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 901;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: #f4f7f6; border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 30px rgba(16, 48, 38, .12);
  animation: sheetUp .22s cubic-bezier(.2, .8, .3, 1);
  max-height: 82vh; overflow: auto;
}
.sheet-t { text-align: center; font-size: 12.5px; color: var(--sub); padding: 8px 0 7px; }
.sheet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; background: #fff; border-radius: 11px;
  margin-bottom: 6px; font-size: 15px; color: var(--text);
  cursor: pointer;
}
.sheet-item:active { background: #eef7f3; }
.sheet-item .si-ic { display: flex; color: var(--brand); }
.sheet-item .si-ic svg { width: 18px; height: 18px; }
.sheet-cancel {
  padding: 15px; text-align: center; font-size: 15px;
  color: var(--sub); background: #fff; border-radius: 11px; cursor: pointer;
}
@keyframes sheetUp { from { transform: translateY(102%); } to { transform: translateY(0); } }
@keyframes sheetFade { from { opacity: 0; } to { opacity: 1; } }

/* 「我的」页（参考微信「我」） */
.mine { padding: 4px 0 10px; }
.mine-head { display: flex; align-items: center; gap: 13px; padding: 18px 16px 22px; }
.mine-avatar {
  width: 56px; height: 56px; border-radius: 14px; flex: 0 0 auto;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 600;
}
.mine-name { font-size: 17px; font-weight: 600; color: var(--text); }
.mine-role { font-size: 12.5px; color: var(--sub); margin-top: 3px; }
.mine-group {
  margin: 0 12px 10px; background: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid #f0f4f2;
}
.mine-row {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 14px; font-size: 14.5px; color: var(--text);
  border-bottom: 1px solid #f4f7f5; cursor: pointer;
}
.mine-row:last-child { border-bottom: 0; }
.mine-row:active { background: #f6faf8; }
.mine-row .mi { display: flex; color: var(--brand); }
.mine-row .mi svg { width: 18px; height: 18px; }
.mine-row .ar { margin-left: auto; color: #c9d6d1; font-size: 17px; line-height: 1; }
.mine-row .val { margin-left: auto; font-size: 12.5px; color: var(--sub); }
.mine-row .val.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.mine-row.danger { justify-content: center; color: #dc5f4f; font-size: 14.5px; }
.mine-foot { text-align: center; font-size: 11.5px; color: #c6d2cd; padding: 6px 0 18px; }

@media (max-width: 760px) {
  .only-m { display: inline-flex !important; }
  .only-wide { display: none !important; }

  /* 底栏 5 格：中间＋凸起，其余 4 格均分 */
  .sidebar { padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px)); }
  .nav-add {
    display: flex; align-items: center; justify-content: center;
    flex: 1 1 0; min-width: 0; height: 50px; cursor: pointer;
  }
  .nav-add .plus-btn {
    width: 42px; height: 42px; border-radius: 13px;
    background: var(--brand); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(31, 143, 104, .3);
    margin-top: -13px;
  }
  .nav-add .plus-btn svg { width: 22px; height: 22px; stroke-width: 2; }
  .nav-add:active .plus-btn { filter: brightness(1.05); transform: translateY(1px); }

  /* 产品库/需求/测试筛选区：一行放完，不再横滑 */
  .filter-bar.mm-bar.fb-row1 { flex-wrap: nowrap; gap: 6px; overflow: visible; }
  .filter-bar.fb-row2 { flex-wrap: nowrap; gap: 6px; overflow: hidden; }
  .filter-bar.mm-bar.fb-row1 input[data-filter="q"] {
    flex: 1 1 auto; min-width: 0; width: auto; max-width: none;
    font-size: 13px; padding: 7px 9px;
  }
  .filter-bar .chips { flex-wrap: nowrap; gap: 5px; overflow: visible; flex: 0 0 auto; }
  .filter-bar .chip { padding: 6px 9px; font-size: 12px; line-height: 1; white-space: nowrap; }
  .filter-bar .chip .n { display: none; }
  .filter-bar .chip-wide { display: none; }
  .filter-bar select { max-width: 42vw; font-size: 12.5px; padding: 7px 8px; }

  /* 测试记录 / 需求标题行不换行，图标靠右同一排 */
  .section-title { flex-wrap: nowrap; row-gap: 0; gap: 7px; }
  .section-title h3 { font-size: 15px; }
  .section-title select { font-size: 12.5px; padding: 5px 8px !important; max-width: 40vw; }
  .content.view-tests .rec-card .section-title { padding-bottom: 2px; }

  /* 资料中心：只显示当前分类 + 三条横杠 */
  .subtabs.file-tabs { overflow: visible; flex-wrap: nowrap; align-items: center; }
  .subtabs.file-tabs .file-cur { font-size: 13px; padding: 6px 12px; }
  .subtabs.file-tabs .btn-ic { margin-left: auto; }

  /* 中间＋菜单与我的页在窄屏铺满 */
  .content.view-mine { padding: 0 0 calc(72px + env(safe-area-inset-bottom, 0px)); }
  .mine-head { padding-top: 8px; }
}

/* v21 修正：桌面隐藏「我的」与中间＋，手机隐藏 BOM/资料/账号/备份 */
@media (min-width: 761px) {
  .nav-item.nav-mine { display: none !important; }
  .nav-add { display: none !important; }
}
@media (max-width: 760px) {
  .nav-item.nav-w { display: none !important; }
}

/* v21：手机上顶栏「退出」收进「我的」页，标题右侧不再重复操作 */
@media (max-width: 760px) {
  .topbar > .btn[data-act="logout"] { display: none !important; }
}

/* v21：面板选项更紧凑（资料分类有 10 项，一屏放得下） */
.sheet { max-height: 76vh; }
.sheet-item { padding: 13px 16px; margin-bottom: 5px; font-size: 14.5px; }
.sheet-cancel { padding: 14px; font-size: 14.5px; }

/* v21：分类选项多时面板两列，一屏放完不用滚 */
.sheet-list.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sheet-list.cols2 .sheet-item { margin-bottom: 0; justify-content: flex-start; padding: 14px 14px; font-size: 13.5px; }

/* ===================================================================
   v22：Android 端 Glassmorphism（玻璃态 / 毛玻璃）
   要点：弹窗与底部弹层做真正的 backdrop-filter「后方模糊」，
        不是半透明白底；同时提供不支持 blur 时的实色回退。
   作用域：≤760px（手机 WebView / PWA）
   =================================================================== */
@media (max-width: 760px) {
  /* 背景铺一点冷暖渐变，玻璃层才有可透出的色彩，否则一片白糊了看不出来 */
  .main {
    background:
      radial-gradient(115% 70% at 100% 0%, #e4f7ee 0%, rgba(228, 247, 238, 0) 58%),
      radial-gradient(115% 85% at 0% 100%, #e8f1fb 0%, rgba(232, 241, 251, 0) 56%),
      #f7fbf9;
  }

  /* ---------- 顶栏 / 底栏：细毛玻璃 ---------- */
  .topbar {
    background: rgba(255, 255, 255, .56);
    -webkit-backdrop-filter: blur(20px) saturate(185%);
    backdrop-filter: blur(20px) saturate(185%);
    border-bottom: 1px solid rgba(255, 255, 255, .55);
  }
  .sidebar {
    background: rgba(255, 255, 255, .58) !important;
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    border-top: 1px solid rgba(255, 255, 255, .62);
    box-shadow: 0 -1px 0 rgba(20, 60, 48, .03), 0 -10px 28px rgba(20, 60, 48, .06);
  }

  /* ---------- 弹窗：遮罩糊背景 + 面板自身也是一块玻璃 ---------- */
  .modal-mask {
    padding: 0;
    overflow: hidden;
    place-items: end center;
    background:
      radial-gradient(95% 62% at 50% 102%, rgba(14, 112, 80, .14), rgba(16, 38, 58, .2));
    -webkit-backdrop-filter: blur(4px) saturate(130%);
    backdrop-filter: blur(4px) saturate(130%);
  }
  .modal, .modal.wide {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .56));
    -webkit-backdrop-filter: blur(36px) saturate(200%);
    backdrop-filter: blur(36px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, .72);
    border-bottom: 0;
    box-shadow:
      0 -10px 44px rgba(10, 40, 30, .18),
      inset 0 1px 0 rgba(255, 255, 255, .8);
    animation: modalRise .26s cubic-bezier(.2, .85, .3, 1);
  }
  @supports (height: 92dvh) {
    .modal, .modal.wide { max-height: 92dvh; }
  }
  /* 头尾也玻璃：中间内容滚过时会被糊掉，这是玻璃弹窗的标志性效果 */
  .modal-head {
    background: rgba(255, 255, 255, .38);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, .55);
  }
  .modal-foot {
    background: rgba(255, 255, 255, .42);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, .6);
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* ---------- 底部动作面板：厚玻璃 ---------- */
  .sheet-mask {
    background: rgba(14, 38, 32, .16);
    -webkit-backdrop-filter: blur(4px) saturate(125%);
    backdrop-filter: blur(4px) saturate(125%);
  }
  .sheet {
    background: rgba(243, 250, 247, .58);
    -webkit-backdrop-filter: blur(34px) saturate(195%);
    backdrop-filter: blur(34px) saturate(195%);
    border-top: 1px solid rgba(255, 255, 255, .68);
    box-shadow: 0 -12px 42px rgba(10, 40, 30, .16), inset 0 1px 0 rgba(255, 255, 255, .65);
  }
  .sheet-item, .sheet-cancel {
    background: rgba(255, 255, 255, .6);
    border: 1px solid rgba(255, 255, 255, .72);
    box-shadow: 0 1px 2px rgba(14, 44, 34, .04);
  }
  .sheet-item:active { background: rgba(230, 246, 239, .72); }

  /* 节点操作浮层 / 右键菜单：小玻璃片 */
  .ctx-menu, .node-actions {
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    border-color: rgba(255, 255, 255, .7);
    box-shadow: 0 12px 32px rgba(16, 45, 35, .16), inset 0 1px 0 rgba(255, 255, 255, .7);
  }

  /* 提示条玻璃化，避免深色实心块破坏整体 */
  .toast {
    background: rgba(20, 44, 38, .62);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, .16);
  }
  .toast.bad { background: rgba(150, 42, 32, .66); }
}

@keyframes modalRise {
  from { transform: translateY(18px); opacity: .55; }
  to { transform: translateY(0); opacity: 1; }
}

/* 不支持 backdrop-filter 的旧 WebView：退回实色，保证能看清 */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  @media (max-width: 760px) {
    .topbar { background: rgba(255, 255, 255, .97); }
    .sidebar { background: #fff !important; }
    .modal-mask { background: rgba(14, 38, 32, .5); }
    .modal, .modal.wide { background: #fff; }
    .modal-head, .modal-foot { background: #fbfdfc; }
    .sheet-mask { background: rgba(14, 38, 32, .42); }
    .sheet { background: #f3f9f6; }
    .sheet-item, .sheet-cancel, .ctx-menu, .node-actions { background: #fff; }
  }
}

/* v22 微调：遮罩用中性深色、面板卡片更实一点、底部面板加提手 */
@media (max-width: 760px) {
  .modal-mask {
    background:
      radial-gradient(95% 62% at 50% 102%, rgba(10, 80, 60, .12), rgba(12, 24, 30, .2));
  }
  .sheet-mask { background: rgba(12, 26, 30, .16); }
  .sheet-item, .sheet-cancel {
    background: rgba(255, 255, 255, .74);
    border-color: rgba(255, 255, 255, .82);
  }
  .sheet {
    border-radius: 20px 20px 0 0;
    padding-top: 0;
  }
  .sheet::before {
    content: '';
    display: block;
    width: 38px; height: 4px;
    margin: 8px auto 2px;
    border-radius: 2px;
    background: rgba(20, 50, 42, .16);
  }
  .sheet-t { padding-top: 6px; }
}

/* ===================================================================
   v23：底栏改成「悬浮液态玻璃胶囊」（参考酷安一类悬浮 dock）
   浮在内容之上、左右留边、大圆角、真模糊、边缘高光 + 流动选中块
   =================================================================== */
.nav-pill { display: none; }

@media (max-width: 760px) {
  /* ---------- 悬浮胶囊本体 ---------- */
  .sidebar {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    height: 64px;
    padding: 0 !important;
    align-items: center !important;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, .78) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .42)) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    box-shadow:
      0 10px 32px rgba(12, 48, 36, .16),
      0 2px 8px rgba(12, 48, 36, .06),
      inset 0 1px 0 rgba(255, 255, 255, .95),
      inset 0 -10px 16px -12px rgba(12, 60, 44, .18) !important;
    overflow: visible;
  }
  /* 液态高光：斜向流动的一条亮带，模拟玻璃边缘的光 */
  .sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
      linear-gradient(112deg,
        rgba(255, 255, 255, .92) 0%,
        rgba(255, 255, 255, .28) 18%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, .1) 66%,
        rgba(255, 255, 255, .55) 100%);
    opacity: .7;
    z-index: 0;
  }
  /* 底缘的厚度感（玻璃是块实心材料，不是一层纸） */
  .sidebar::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 5px;
    height: 1px;
    border-radius: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
    z-index: 0;
  }

  .sidebar .brand-block, .sidebar .sidebar-foot { display: none !important; }

  /* ---------- 五个格子 ---------- */
  .nav-item {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 0;
    gap: 4px;
    border-radius: 20px;
    background: transparent !important;
  }
  .nav-item.active { background: transparent !important; }
  .nav-item .ic, .nav-item .ic svg { width: 23px; height: 23px; }
  .nav-item .lbl-s { font-size: 10.5px; margin-top: 1px; }
  .nav-item:active { background: rgba(255, 255, 255, .35) !important; }
  .nav-badge { top: 6px; margin-right: -18px; }

  /* 选中块：会滑动的胶囊，带一点弹性（液态） */
  .nav-pill {
    display: block;
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 0;
    width: 20%;
    border-radius: 20px;
    transform: translateX(calc(var(--i) * 100%));
    transition: transform .42s cubic-bezier(.34, 1.42, .44, 1);
    background: linear-gradient(180deg, rgba(11, 158, 102, .18), rgba(11, 158, 102, .09));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .85),
      inset 0 -1px 0 rgba(255, 255, 255, .35),
      0 1px 3px rgba(11, 120, 80, .1);
    pointer-events: none;
    z-index: 0;
  }

  /* ---------- 中间 ＋：实心玻璃珠 ---------- */
  .nav-add {
    position: relative;
    z-index: 2;
    height: 100%;
    align-items: center;
  }
  .nav-add .plus-btn {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    margin-top: 0;
    background: linear-gradient(155deg, #3ecd96 0%, #12a86c 52%, #0a9260 100%);
    box-shadow:
      0 6px 18px rgba(10, 150, 96, .34),
      0 2px 5px rgba(10, 150, 96, .22),
      inset 0 1px 1px rgba(255, 255, 255, .6),
      inset 0 -2px 6px rgba(0, 70, 46, .22);
  }
  .nav-add .plus-btn::after {
    content: '';
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 46%;
    border-radius: 14px 14px 40% 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
    pointer-events: none;
  }
  .nav-add .plus-btn svg { width: 21px; height: 21px; stroke-width: 2.1; }
  .nav-add:active .plus-btn { transform: scale(.93); }
  .nav-add .plus-btn { position: relative; transition: transform .18s cubic-bezier(.3, 1.5, .5, 1); }

  /* ---------- 给悬浮胶囊腾出空间 ---------- */
  .content { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }
  .content.view-products, .content.view-tests {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .content.view-mine { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }

  /* 弹窗/面板浮在胶囊之上，横向也收进来一点，和胶囊的边距对齐 */
  .sheet { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); border-radius: 22px; }
  .sheet-mask { background: rgba(12, 26, 30, .18); }
}

/* 旧 WebView 不支持 blur：胶囊退回偏实的白，仍保持悬浮感 */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  @media (max-width: 760px) {
    .sidebar { background: linear-gradient(180deg, #ffffff, #f7fbf9) !important; }
  }
}

/* v23 补：弹窗也改成悬浮玻璃块，和底栏胶囊保持同一种“悬浮”语言 */
@media (max-width: 760px) {
  .modal-mask { padding: 0 10px 10px !important; place-items: end center; }
  .modal, .modal.wide {
    border-radius: 22px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .72) !important;
    box-shadow:
      0 18px 50px rgba(10, 40, 30, .22),
      0 2px 8px rgba(10, 40, 30, .08),
      inset 0 1px 0 rgba(255, 255, 255, .85) !important;
  }
  .modal-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ===================================================================
   v24：页签行放操作图标、底栏点击反馈与阴影居中
   =================================================================== */
@media (max-width: 760px) {
  /* 页签行里放图标按钮：挤得下就右对齐，不再靠横滑 */
  .subtabs { align-items: center; gap: 6px; overflow: visible; }
  .subtabs > span[style*="flex:1"] { flex: 1 1 auto !important; min-width: 4px; }
  .subtabs > .subtab, .subtabs > .btn-ic { flex: 0 0 auto; }

  /* 点按反馈改成图标微缩，不再出现上下不齐的高亮块 */
  .nav-item:active { background: transparent !important; }
  .nav-item .ic { transition: transform .16s ease; }
  .nav-item:active .ic { transform: scale(.86); }

  /* 中间＋：投影围着中心均匀扩散，点击时收成同心光圈 */
  .nav-add .plus-btn {
    box-shadow:
      0 0 0 .5px rgba(255, 255, 255, .22),
      0 2px 9px rgba(10, 150, 96, .26),
      0 0 16px rgba(10, 150, 96, .18),
      inset 0 1px 1px rgba(255, 255, 255, .6),
      inset 0 -2px 6px rgba(0, 70, 46, .2) !important;
  }
  .nav-add:active .plus-btn {
    transform: scale(.94);
    box-shadow:
      0 0 0 8px rgba(10, 150, 96, .1),
      0 1px 5px rgba(10, 150, 96, .2),
      inset 0 1px 1px rgba(255, 255, 255, .5),
      inset 0 -2px 6px rgba(0, 70, 46, .24) !important;
    transition: transform .1s ease, box-shadow .12s ease;
  }
}

/* v24b：底栏「上下不居中」修正
   ① 玻璃底缘亮线原来压在 bottom:5px 处，视觉上把胶囊的"底"抬高了 5px，
      pill 就显得贴下、上面空 —— 移到贴底。
   ② 底部内阴影过重，同样把视觉重心往下拉，减半。
   ③ pill 与 ＋ 珠统一下移补偿取消，改用真实等距：上 6 下 6。 */
@media (max-width: 760px) {
  .sidebar::after { bottom: 2px; }

  .sidebar {
    box-shadow:
      0 10px 30px rgba(12, 48, 36, .14),
      0 2px 8px rgba(12, 48, 36, .05),
      inset 0 1px 0 rgba(255, 255, 255, .95),
      inset 0 -6px 10px -14px rgba(12, 60, 44, .14) !important;
  }

  .nav-pill {
    top: 6px;
    bottom: 6px;
    border-radius: 22px;
  }
}
