﻿/* ============================================================
   v3 后台 · 按参考站（collect panel）排版重做
   令牌来源：C:\tg\ref\panel\spec.json + 7 张 1440x900 截图取色
   侧栏 228px / 内容底色 #f0f1f6(#f0f0f0 系) / 卡片圆角 14px
   按钮高 30px 圆角 6px / 表格 13px 行高 38px
   ============================================================ */

:root {
  --purple: #6c5ce7;
  --purple-d: #6455d8;
  --purple-l: #7b6be5;
  --grad: linear-gradient(100deg, #6455d8 0%, #7b6be5 100%);
  --grad-soft: linear-gradient(100deg, #f1eeff 0%, #ece8ff 100%);

  --bg: #f0f1f6;          /* 内容区底色（#f0f0f0 系，取自 dashboard.png 700,870） */
  --card: #ffffff;
  --side-w: 228px;
  --top-h: 62px;

  --line: #eceef4;        /* 卡片细边框 */
  --line-2: #f2f3f8;      /* 表格行分隔 */
  --head-bg: #fafbfd;     /* 表头浅灰 */
  --zebra: #fbfbfe;       /* 斑马纹（很淡） */

  --txt: #1e2334;
  --txt-2: #666e82;
  --txt-3: #9aa1b0;

  --r-card: 14px;
  --r-btn: 6px;
  --r-input: 8px;
  --btn-h: 30px;
  --row-h: 38px;
  --fs: 13.3px;
  --fs-table: 13px;

  --ok: #16a34a;
  --ok-bg: #e9f7ee;
  --warn: #d97706;
  --warn-bg: #fff5e8;
  --err: #e5484d;
  --err-bg: #fdecec;
  --info: #3b62d9;
  --info-bg: #eef2ff;

  --shadow-card: 0 1px 2px rgba(20, 20, 60, .04), 0 8px 24px rgba(20, 20, 60, .035);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 400 var(--fs)/1.5 -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--purple); text-decoration: none; }
button { font-family: inherit; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }

/* ---------------------------------------------------------------- 登录页 */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(900px 460px at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    var(--bg);
}
.login-card {
  width: 420px; max-width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(20, 20, 60, .04), 0 20px 48px rgba(20, 20, 60, .07);
  padding: 32px 32px 26px;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand-block {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--grad);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(100, 85, 216, .32);
}
.login-brand .t1 { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.login-brand .t2 { font-size: 12px; color: var(--txt-3); margin-top: 2px; }
.login-h { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.login-sub { font-size: 12.5px; color: var(--txt-3); margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field > label {
  display: block; font-size: 12.5px; color: var(--txt-2);
  margin-bottom: 6px; font-weight: 500;
}
.input {
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid #e3e5ee; border-radius: var(--r-input);
  background: #fff; color: var(--txt); font-size: 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: #b9afff; box-shadow: 0 0 0 3px rgba(108, 92, 231, .12); }
.input::placeholder { color: #b6bcc9; }
.login-card .input { height: 44px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.login-card .btn-primary { height: 44px; font-size: 14px; border-radius: 10px; }
.login-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--txt-3); line-height: 1.7;
}

/* ---------------------------------------------------------------- 主框架 */
.app { display: flex; min-height: 100vh; }

.side {
  width: var(--side-w); flex: none;
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  transition: width .16s ease;
}
.side.collapsed { width: 68px; }
.side-head {
  height: 62px; flex: none; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--line-2);
}
.side-head .brand-block { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; }
.side-head .meta { min-width: 0; }
.side-head .t1 { font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.side-head .t2 { font-size: 11.5px; color: var(--txt-3); margin-top: 1px; white-space: nowrap; }
.side.collapsed .side-head { padding: 0 16px; }
.side.collapsed .side-head .meta { display: none; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 12px 16px; }
.side.collapsed .side-nav { padding: 10px 8px 16px; }

.nav-group {
  font-size: 12px; color: var(--txt-3); font-weight: 500;
  padding: 14px 12px 6px; letter-spacing: .3px; white-space: nowrap;
}
.side.collapsed .nav-group {
  padding: 14px 0 6px; text-align: center; font-size: 10px;
  overflow: hidden; color: #c2c7d3;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px; margin-bottom: 4px;
  border-radius: 10px; color: #3b4152; font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: 0; background: transparent; width: 100%; text-align: left;
  transition: background .14s, color .14s, box-shadow .14s;
}
.nav-item svg { flex: none; opacity: .85; }
.nav-item:hover { background: #f5f6fb; color: #1e2334; }
.nav-item.active {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 16px rgba(100, 85, 216, .28);
}
.nav-item.active svg { opacity: 1; }
.side.collapsed .nav-item { justify-content: center; padding: 0; }
.side.collapsed .nav-item .lbl { display: none; }

.side-foot { flex: none; border-top: 1px solid var(--line-2); padding: 10px 12px; }
.collapse-btn {
  width: 100%; height: 32px; border: 0; background: transparent; border-radius: 8px;
  color: var(--txt-3); font-size: 12px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; gap: 6px;
}
.collapse-btn:hover { background: #f5f6fb; color: var(--txt-2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--top-h); flex: none;
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.pill {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 6px; font-size: 11px; font-weight: 600;
  background: #eeeafd; color: var(--purple);
}
.topbar .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 9px; padding-right: 4px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #ece9fd; color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; text-transform: uppercase;
}
.who .n { font-size: 13px; font-weight: 600; line-height: 1.25; }
.who .e { font-size: 11.5px; color: var(--txt-3); line-height: 1.25; }
.topbar .divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

.content { flex: 1; padding: 18px 22px 28px; min-width: 0; }

/* ---------------------------------------------------------------- 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 14px; }
.card-h {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 0;
}
.card-h .t { font-size: 14.5px; font-weight: 700; }
.card-h .sub { font-size: 12px; color: var(--txt-3); }
.card-h .grow { flex: 1; }
.card-b { padding: 12px 18px 16px; }

/* KPI */
.kpi-row {
  display: grid; gap: 14px; margin-bottom: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); padding: 16px 18px 15px;
  display: flex; align-items: flex-start; gap: 12px; min-height: 96px;
  position: relative; overflow: hidden;
}
.kpi .body { min-width: 0; flex: 1; }
.kpi .lb { font-size: 12.5px; color: var(--txt-2); font-weight: 500; }
.kpi .vl { font-size: 24px; font-weight: 700; line-height: 1.5; letter-spacing: .2px; }
.kpi .vl.p { color: var(--purple); }
.kpi .vl.b { color: #2563eb; }
.kpi .vl.g { color: var(--ok); }
.kpi .vl.o { color: #ea580c; }
.kpi .vl.d { color: var(--txt); }
.kpi .un { font-size: 12px; color: var(--txt-3); font-weight: 500; margin-left: 4px; }
.kpi .sb { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }
.kpi .ico {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #f1eeff; color: var(--purple);
}
.kpi .ico.g { background: #e9f7ee; color: var(--ok); }
.kpi .ico.o { background: #fff5e8; color: var(--warn); }
.kpi .ico.b { background: #eaf1ff; color: #2563eb; }

/* ---------------------------------------------------------------- 工具条 */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line-2);
}
.toolbar .grow { flex: 1; }
.toolbar .search { position: relative; width: 230px; }
.toolbar .search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: #b0b6c4; pointer-events: none;
}
.toolbar .search .input { padding-left: 30px; height: 32px; }
.toolbar .input { height: 32px; }
.toolbar .note { font-size: 11.5px; color: var(--txt-3); }
.hint-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--txt-3); }
.hint-dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }

/* 分段 chip */
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 12px; }
.chip {
  height: 30px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #e3e5ee; background: #fff; color: var(--txt-2);
  font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip b { font-weight: 600; color: var(--txt-3); }
.chip:hover { border-color: #cfc9f7; color: var(--purple); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(100, 85, 216, .25); }
.chip.active b { color: rgba(255, 255, 255, .8); }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  height: var(--btn-h); padding: 0 12px;
  border-radius: var(--r-btn); border: 1px solid #e3e5ee;
  background: #fff; color: #333a4b; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; white-space: nowrap;
  transition: border-color .14s, background .14s, color .14s, box-shadow .14s, opacity .14s;
}
.btn:hover { border-color: #cfc9f7; color: var(--purple); background: #fdfcff; }
.btn:active { transform: translateY(.5px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(100, 85, 216, .28);
}
.btn-primary:hover { color: #fff; background: var(--grad); border-color: transparent; filter: brightness(1.04); }
.btn-danger { color: var(--err); border-color: #f6d4d5; background: #fff; }
.btn-danger:hover { color: var(--err); border-color: #efb9bb; background: #fff8f8; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.btn-link {
  border: 0; background: transparent; color: var(--purple);
  font-size: 12.5px; padding: 0 4px; height: 24px; border-radius: 5px;
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
}
.btn-link:hover { background: #f4f1ff; }
.btn-link.danger { color: var(--err); }
.btn-link.danger:hover { background: #fdecec; }
.btn-link.muted { color: var(--txt-2); }
.btn-icon {
  width: 30px; height: 30px; padding: 0; border-radius: var(--r-btn);
  border: 1px solid #e3e5ee; background: #fff; color: var(--txt-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-icon:hover { border-color: #cfc9f7; color: var(--purple); }

/* loading / 成功 / 失败 反馈 */
.btn.is-loading, .btn-link.is-loading, .btn-icon.is-loading { color: transparent !important; position: relative; }
.btn.is-loading::after, .btn-link.is-loading::after, .btn-icon.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(108, 92, 231, .9) rgba(108, 92, 231, .22) rgba(108, 92, 231, .22);
  color: var(--purple); animation: spin .7s linear infinite;
}
.btn-primary.is-loading::after { border-color: #fff rgba(255,255,255,.35) rgba(255,255,255,.35); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.just-ok { border-color: #b7e4c7 !important; background: #f2fbf5 !important; color: var(--ok) !important; }
.btn.just-err { border-color: #f3c2c4 !important; background: #fff7f7 !important; color: var(--err) !important; }

/* ---------------------------------------------------------------- 表格 */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-table); }
table.tbl th {
  text-align: left; font-weight: 500; font-size: 12.5px; color: var(--txt-2);
  background: var(--head-bg); padding: 9px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.tbl th:first-child, table.tbl td:first-child { padding-left: 18px; }
table.tbl td {
  height: var(--row-h); padding: 0 12px; color: #2a3040;
  border-bottom: 1px solid var(--line-2); vertical-align: middle;
  white-space: nowrap;
}
table.tbl tbody tr:nth-child(even) { background: var(--zebra); }
table.tbl tbody tr:hover { background: #f7f6ff; }
table.tbl tbody tr.sel { background: #f4f1ff; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl th:last-child, table.tbl td.col-act {
  position: sticky; right: 0; z-index: 3;
  box-shadow: -8px 0 10px -10px rgba(20, 20, 60, .22);
  border-left: 1px solid var(--line-2);
}
table.tbl th:last-child { background: var(--head-bg); }
table.tbl td.col-act { background: #fff; }
table.tbl tbody tr:nth-child(even) td.col-act { background: var(--zebra); }
table.tbl tbody tr:hover td.col-act { background: #f7f6ff; }
table.tbl tbody tr.sel td.col-act { background: #f4f1ff; }
table.tbl .th-i { color: #c3c8d4; font-size: 10px; margin-left: 3px; }
.cell-2 { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.cell-2 .a { font-weight: 600; }
.cell-2 .b { font-size: 11.5px; color: var(--txt-3); }
.cell-trunc {
  display: inline-block; max-width: 210px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.td-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #3d4457; }
.acts { display: flex; align-items: center; gap: 2px; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 21px;
  padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500;
  background: #f1f2f7; color: var(--txt-2); white-space: nowrap;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.err { background: var(--err-bg); color: var(--err); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.purple { background: #efeafd; color: var(--purple); }
.tag.plain { background: #f5f6fa; color: var(--txt-2); }
.tag i.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .2px; }

/* 分页 */
.pager {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-top: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--txt-2);
}
.pager .total { margin-right: auto; color: var(--txt-3); }
.pager .sel-wrap { position: relative; }
.pager select {
  height: 30px; border: 1px solid #e3e5ee; border-radius: 6px; background: #fff;
  color: var(--txt-2); font-size: 12.5px; padding: 0 6px; outline: none; cursor: pointer;
}
.pg-btn {
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px;
  border: 1px solid #e3e5ee; background: #fff; color: var(--txt-2);
  font-size: 12.5px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
}
.pg-btn:hover { border-color: #cfc9f7; color: var(--purple); }
.pg-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pg-btn.cur {
  background: var(--grad); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(100, 85, 216, .28);
}
.pg-jump { display: flex; align-items: center; gap: 5px; color: var(--txt-3); }
.pg-jump input {
  width: 44px; height: 28px; text-align: center; border: 1px solid #e3e5ee;
  border-radius: 6px; font-size: 12.5px; outline: none; color: var(--txt);
}
.pg-jump input:focus { border-color: #b9afff; }

/* 空状态 / 骨架 */
.empty { padding: 44px 16px; text-align: center; color: var(--txt-3); font-size: 12.5px; }
.empty .big { font-size: 13.5px; color: var(--txt-2); margin-bottom: 4px; }
.skel { padding: 26px 18px; display: grid; gap: 10px; }
.skel i {
  height: 14px; border-radius: 6px; display: block;
  background: linear-gradient(90deg, #f3f4f9 25%, #eceef6 37%, #f3f4f9 63%);
  background-size: 400% 100%; animation: sh 1.2s ease infinite;
}
@keyframes sh { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 提示条 */
.alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
  margin-bottom: 12px;
}
.alert.ok { background: var(--ok-bg); color: #157347; }
.alert.err { background: var(--err-bg); color: #b4232a; }
.alert.info { background: var(--info-bg); color: #2b4bb5; }
.alert.warn { background: var(--warn-bg); color: #a35b04; }
.alert .m { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.alert .m b { font-weight: 700; }
.alert .x { border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.alert .x:hover { opacity: 1; }
.errbar {
  position: sticky; top: var(--top-h); z-index: 28;
  background: var(--err-bg); color: #b4232a; border-bottom: 1px solid #f6d4d5;
  padding: 9px 22px; font-size: 12.5px; display: flex; gap: 10px; align-items: flex-start;
  white-space: pre-wrap; word-break: break-word;
}
.errbar b { font-weight: 700; }
.errbar .x { margin-left: auto; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; }

/* 建设中占位页 */
.building { display: grid; gap: 14px; }
.building .hd { display: flex; align-items: center; gap: 12px; }
.building .hd .ico {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad-soft);
  color: var(--purple); display: flex; align-items: center; justify-content: center; flex: none;
}
.building .hd .t { font-size: 16px; font-weight: 700; }
.building .hd .s { font-size: 12px; color: var(--txt-3); margin-top: 2px; }
.building .desc { font-size: 13px; color: var(--txt-2); line-height: 1.85; }
.building .plans { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.building .plans li {
  display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--txt-2);
  background: #fafbfd; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px;
}
.building .plans li b { color: var(--txt); font-weight: 600; }
.building .plans li .idx {
  width: 18px; height: 18px; border-radius: 50%; flex: none; background: #efeafd;
  color: var(--purple); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.kv {
  display: grid; grid-template-columns: 132px 1fr; gap: 1px 14px;
  font-size: 12.5px; color: var(--txt-2);
}
.kv .k { color: var(--txt-3); padding: 5px 0; }
.kv .v { color: var(--txt); padding: 5px 0; word-break: break-all; }
.src-note {
  margin-top: 12px; font-size: 11.5px; color: var(--txt-3);
  background: #fafbfd; border: 1px dashed #e3e5ee; border-radius: 9px; padding: 9px 11px;
}

/* 展开面板（钱包行） */
.expand-row > td { padding: 0 !important; background: #fcfcff !important; border-bottom: 1px solid var(--line) !important; }
.expand-box { padding: 14px 18px 18px; }
.expand-box .sec + .sec { margin-top: 14px; }
.expand-box .sec-h {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 13px; font-weight: 600; color: var(--txt);
}
.expand-box .sec-h .n { font-weight: 400; color: var(--txt-3); font-size: 12px; }
.expand-box .sec-h .grow { flex: 1; }
table.sub { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.sub th {
  text-align: left; font-weight: 500; color: var(--txt-2); font-size: 12px;
  background: #f7f8fc; padding: 7px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.sub td {
  padding: 8px 10px; border-bottom: 1px solid #f4f5f9; color: #2a3040;
  vertical-align: middle; white-space: nowrap; height: 34px;
}
table.sub tr:last-child td { border-bottom: 0; }
.ks-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12px;
}
.ks-chip .meta { color: var(--txt-3); font-size: 11.5px; }
.secret-box {
  margin-top: 8px; padding: 10px 12px; border-radius: 9px;
  background: #0f1320; color: #d6ffe3; font-size: 12px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-all;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* ---------------------------------------------------------------- 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(17, 20, 34, .42);
  display: flex; align-items: center; justify-content: center; z-index: 90;
  padding: 24px;
  animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 620px; max-width: 100%; max-height: 86vh; overflow: auto;
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 64px rgba(17, 20, 34, .22);
  animation: pop .16s ease;
}
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: .6; } to { transform: none; opacity: 1; } }
.modal.sm { width: 420px; }
.modal-h {
  display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 0;
}
.modal-h .t { font-size: 15.5px; font-weight: 700; }
.modal-h .sub { font-size: 12px; color: var(--txt-3); margin-top: 3px; }
.modal-h .x {
  margin-left: auto; border: 0; background: transparent; color: var(--txt-3);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.modal-h .x:hover { background: #f5f6fb; color: var(--txt); }
.modal-b { padding: 14px 20px 4px; }
.modal-f {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px 18px;
}

/* ---------------------------------------------------------------- toast */
#toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  display: flex; flex-direction: column; gap: 8px; max-width: 420px;
}
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--purple);
  border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--txt);
  box-shadow: 0 10px 30px rgba(20, 20, 60, .12);
  animation: tin .16s ease;
}
@keyframes tin { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast .m { flex: 1; word-break: break-word; }
.toast .x { border: 0; background: transparent; color: var(--txt-3); cursor: pointer; font-size: 14px; line-height: 1; }

/* ---------------------------------------------------------------- 自适应 */
@media (max-width: 1280px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; z-index: 60; box-shadow: 12px 0 32px rgba(20,20,60,.12); }
  .side.collapsed { width: 0; border: 0; overflow: hidden; }
  .main { width: 100%; }
  .kpi-row, .kpi-row.three { grid-template-columns: 1fr; }
  .content { padding: 12px; }
  .topbar { padding: 0 12px; }
  .who .e { display: none; }
}

/* ------------------------------------------------- 转账记录页（/transfer） */
.tbl-tx tbody tr.row-link { cursor: pointer; }
.tbl-tx tbody tr.row-link:hover td { background: #f7f6ff; }
.tbl-tx tbody tr.row-link.sel td { background: #f4f1ff; }
.toolbar .sel-wrap { position: relative; }
.toolbar select.sel {
  height: 32px; min-width: 132px; padding: 0 26px 0 10px;
  border: 1px solid #e3e5ee; border-radius: var(--r-input); background: #fff;
  color: var(--txt-2); font-size: 12.5px; outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9aa1b0 50%), linear-gradient(135deg, #9aa1b0 50%, transparent 50%);
  background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.toolbar select.sel:hover { border-color: #cfc9f7; }

/* 行点击详情：右侧抽屉 */
.drawer-mask {
  position: fixed; inset: 0; z-index: 118; display: flex; justify-content: flex-end;
  background: rgba(17, 20, 34, .32); animation: fade .14s ease;
}
.drawer {
  width: 470px; max-width: 100%; height: 100%; background: #fff;
  display: flex; flex-direction: column; box-shadow: -16px 0 48px rgba(20, 20, 60, .18);
  animation: drawerin .18s ease;
}
@keyframes drawerin { from { transform: translateX(22px); opacity: .7; } to { transform: none; opacity: 1; } }
.drawer-h {
  display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-h .t { font-size: 15px; font-weight: 700; }
.drawer-h .s { font-size: 12px; color: var(--txt-3); margin-top: 3px; }
.drawer-h .x {
  margin-left: auto; border: 0; background: transparent; color: var(--txt-3);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.drawer-h .x:hover { background: #f5f6fb; color: var(--txt); }
.drawer-b { padding: 4px 18px 16px; overflow: auto; }
.drawer-f {
  margin-top: auto; display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 18px; border-top: 1px solid var(--line); background: #fcfcfe;
}
.drawer-f a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 10px 12px; padding: 12px 0; font-size: 12.5px; }
.kv .k { color: var(--txt-3); }
.kv .v { color: var(--txt); word-break: break-all; line-height: 1.55; }
.kv .v.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #3d4457; }


/* ===================== v3.3 原生打包 / TOTP ===================== */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.mode-card { text-align: left; background: #fff; border: 1px solid #e3e5ee; border-radius: 10px;
  padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; }
.mode-card b { font-size: 13px; }
.mode-card span { font-size: 11.5px; color: var(--txt-3); line-height: 1.55; }
.mode-card:hover { border-color: #cfc9f7; }
.mode-card.active { border-color: transparent; background: var(--grad); color: #fff;
  box-shadow: 0 4px 12px rgba(100, 85, 216, .25); }
.mode-card.active span { color: rgba(255, 255, 255, .88); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.row2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hint { font-size: 11.5px; color: var(--txt-3); margin-top: 4px; display: flex;
  align-items: center; gap: 6px; flex-wrap: wrap; }
.ico-preview { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--line); }
.sub-line { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }
.err-text { color: var(--err); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog { height: 6px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
.texts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 8px; }
.texts-grid .ti label { font-size: 11.5px; color: var(--txt-3); display: block; margin-bottom: 3px; }
.texts-grid .ti code { color: #b0b6c4; font-size: 10.5px; }
.texts-grid textarea { resize: vertical; font-family: inherit; line-height: 1.55; height: auto; padding: 6px 8px; }
.key-line { word-break: break-all; }
.qr-wrap { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.qr-box { width: 212px; height: 212px; border: 1px solid var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; background: #fff; flex: none; }
.qr-box img { border-radius: 8px; }
.qr-empty { font-size: 12px; color: var(--txt-3); text-align: center; line-height: 1.7; padding: 0 12px; }
.qr-side { flex: 1; min-width: 260px; }
.kv.one { grid-template-columns: 92px 1fr; }
.state-line { font-size: 13px; line-height: 1.9; }
.log-box { margin-top: 12px; background: #0f1420; color: #d7e0f0; border-radius: 10px; padding: 12px;
  font-size: 12px; line-height: 1.65; max-height: 280px; overflow: auto; white-space: pre-wrap;
  word-break: break-all; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block;
  max-width: 320px; vertical-align: bottom; }
.muted { color: var(--txt-3); }

/* ===================== v3.4 与参考站对齐：设备列 / 钱包分段 / 仪表板两块 / 打包开关 ===================== */

/* 仪表板：两块并排（参考站 dashboard 底部两栏） */
.dash-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.dash-duo .card + .card { margin-top: 0; }
.dash-duo .card { min-width: 0; display: flex; flex-direction: column; }
.dash-duo .card .card-b { flex: 1; }
@media (max-width: 1180px) { .dash-duo { grid-template-columns: minmax(0, 1fr); } }

/* 设备页：钱包/助记词/地址 三连小方块（参考站 0/0/0 彩色方框） */
.mini-row { display: inline-flex; align-items: center; gap: 5px; }
.mini {
  min-width: 24px; height: 22px; padding: 0 6px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: #f5f6fa; color: var(--txt-3);
}
.mini.b { background: #eef7ee; color: #2f7d32; }
.mini.g { background: #e9f7ee; color: var(--ok); }
.mini.o { background: #f3f0fe; color: var(--purple); }
.mini.z { background: #f5f6fa; color: #b6bcc9; }
.mini-sep { color: #d3d7e0; font-size: 11px; }
.usdt { color: #1c9c56; font-variant-numeric: tabular-nums; }
table.tbl.dev-tbl td { height: 38px; }
table.tbl.dev-tbl th, table.tbl.dev-tbl td { font-size: 13px; }

/* 筛选 chip（可清除的条件） */
.fchip {
  height: 26px; padding: 0 4px 0 10px; border-radius: 7px;
  border: 1px solid #e3e5ee; background: #fbfbff; color: var(--txt-2);
  font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.fchip .x {
  border: 0; background: transparent; color: var(--txt-3); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 2px; border-radius: 4px;
}
.fchip .x:hover { color: var(--err); background: #fdecec; }

/* 钱包行内展开 */
table.tbl.w-tbl tbody tr.exp-tr > td { padding: 0; background: #fcfcff; white-space: normal; }
table.tbl.w-tbl tbody tr.exp-tr .expand-box { padding: 10px 18px 14px; }
table.tbl.w-tbl tbody tr.exp-tr table.sub { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl.w-tbl tbody tr.exp-tr table.sub th {
  position: static; background: #f7f8fc; color: var(--txt-2); font-weight: 500;
  padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px;
}
table.tbl.w-tbl tbody tr.exp-tr table.sub td {
  height: 32px; padding: 0 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.tbl.w-tbl tbody tr.exp-tr table.sub tr:last-child td { border-bottom: 0; }

/* 生成包：两个开关 */
.opt-wrap { margin: 6px 0 4px; }
.opt-field { margin-bottom: 4px; }
.opt-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1180px) { .opt-row { grid-template-columns: minmax(0, 1fr); } }
.opt-item {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  border: 1px solid #e3e5ee; border-radius: 10px; padding: 9px 12px; background: #fff;
}
.opt-item.on { border-color: #cfc9f7; background: #fbfaff; }
.opt-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt-txt b { font-size: 13px; }
.opt-txt span { font-size: 11.5px; color: var(--txt-3); }
.sw {
  flex: none; width: 42px; height: 24px; border-radius: 99px; border: 1px solid #dfe2ea;
  background: #eef0f6; cursor: pointer; position: relative; padding: 0;
  transition: background .16s, border-color .16s;
}
.sw i {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(20, 20, 60, .18); transition: left .16s;
}
.sw.on { background: var(--grad); border-color: transparent; }
.sw.on i { left: 22px; }
.sw.is-loading { opacity: .7; }

/* 窄下拉（工具栏里的筛选框，不撑满整行） */
.toolbar .sel-sm { width: auto; min-width: 118px; max-width: 168px; }
.toolbar select.input { flex: none; }

/* 仪表板错误汇总：错误文本允许折两行（不截断成省略号） */
.err-cell {
  font-size: 12.5px; color: var(--err); line-height: 1.45; max-width: 250px;
  white-space: normal; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}


/* ===================== v3.5 原生模块：相册 / 上传 / 采集配置 / 系统设置 ===================== */
.tb-label { font-size: 12px; color: var(--txt-3); }
.input.date-sm { width: 132px; flex: none; padding: 0 8px; font-size: 12.5px; }
.tag.gray, .tag.plain-gray { background: #f5f6fa; color: var(--txt-3); }
.sub-line { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }

/* ---------- 相册网格 ---------- */
.alb-body { padding: 4px 14px 6px; }
.alb-grid {
  display: grid; gap: 12px; padding: 4px 14px 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1520px) { .alb-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1240px) { .alb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.alb-tile {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.alb-tile:hover { border-color: #d9d2fb; box-shadow: 0 6px 18px rgba(20, 20, 60, .07); }
.alb-tile.picked { border-color: #b9aefc; box-shadow: 0 0 0 2px rgba(108, 92, 231, .16); }
.alb-cb {
  position: absolute; top: 8px; left: 8px; z-index: 3; width: 16px; height: 16px;
  cursor: pointer; accent-color: var(--purple); margin: 0;
}
.alb-thumb {
  position: relative; height: 116px; background: #f7f7fb;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.alb-thumb.can { cursor: zoom-in; }
.alb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alb-miss {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #b6bcc9; font-size: 11px; text-align: center; padding: 8px;
}
.alb-miss b { font-size: 12px; color: #9aa1b0; font-weight: 600; }
.alb-zoom {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: linear-gradient(180deg, rgba(17, 20, 34, 0), rgba(17, 20, 34, .62));
  color: #fff; font-size: 11.5px; opacity: 0; transition: opacity .16s;
}
.alb-thumb:hover .alb-zoom { opacity: 1; }
.alb-meta { padding: 8px 10px 9px; }
.alb-name { font-size: 12.5px; font-weight: 600; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alb-sub { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--txt-3); margin-top: 3px; }
.alb-act { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.alb-selbar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  background: #fcfcff;
}
.alb-selbar .sb-txt { font-size: 12.5px; color: var(--txt-2); }
.alb-selbar .sb-txt b { color: var(--purple); font-size: 14px; }
.alb-selbar .grow { flex: 1; }
@media (max-width: 1240px) { .alb-thumb { height: 100px; } }

/* ---------- 预览大图 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(12, 14, 24, .78);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  animation: fade .14s ease;
}
.lb-inner {
  width: 640px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
}
.lb-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.lb-t { font-size: 13.5px; font-weight: 700; }
.lb-s { font-size: 11.5px; color: var(--txt-3); }
.lb-head .grow { flex: 1; }
.icon-x {
  border: 0; background: transparent; color: var(--txt-3); font-size: 20px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.icon-x:hover { background: #f5f6fb; color: var(--txt); }
.lb-img { flex: 1; min-height: 0; background: #0f1220; display: flex; align-items: center; justify-content: center; padding: 10px; }
.lb-img img { max-width: 100%; max-height: 56vh; object-fit: contain; image-rendering: auto; border-radius: 6px; }
.lb-ocr {
  padding: 10px 16px; font-size: 12px; color: var(--txt-2); white-space: pre-wrap;
  max-height: 96px; overflow: auto; border-top: 1px solid var(--line-2); background: #fbfbfe;
}
.lb-ocr b { display: block; font-size: 11.5px; color: var(--txt-3); margin-bottom: 3px; }
.lb-foot { padding: 8px 16px 10px; font-size: 11px; color: var(--txt-3); word-break: break-all; border-top: 1px solid var(--line-2); }

/* ---------- 删除确认 ---------- */
.ck-row {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 4px;
  font-size: 12.5px; color: var(--txt-2); line-height: 1.5; cursor: pointer;
}
.ck-row input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--purple); flex: none; }
.modal-note { margin-top: 10px; font-size: 11.5px; color: var(--txt-3); word-break: break-all; }

/* ---------- 上传文件表 ---------- */
table.tbl.u-tbl th, table.tbl.u-tbl td,
table.tbl.c-tbl th, table.tbl.c-tbl td,
table.tbl.s-tbl th, table.tbl.s-tbl td { font-size: 13px; }
/* 行高 38px（border-box：含 1px 分隔线） */
table.tbl.u-tbl td, table.tbl.c-tbl td, table.tbl.s-tbl td { height: 38px; }
table.tbl.c-tbl tr.off td { color: #9aa1b0; }
table.tbl.c-tbl tr.off b { color: var(--txt-3); }
.c-tbl .sw { vertical-align: middle; }
.s-tbl .lag { color: #ea580c; }
.s-tbl td.mono { font-size: 12px; }

/* ---------- 采集配置开关行 ---------- */
.c-tbl td:first-child { padding-left: 18px; }

/* ---------- 系统设置 ---------- */
.svc-row { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 2px 18px 14px; }
@media (max-width: 1320px) { .svc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.svc {
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px 12px; background: #fff;
}
.svc.on { border-color: #d8efe1; background: linear-gradient(180deg, #fbfefc 0%, #fff 60%); }
.svc.off { border-color: #f6d4d5; background: linear-gradient(180deg, #fffafa 0%, #fff 60%); }
.svc-h { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.svc-h b { font-size: 13px; }
.svc-h .tag { margin-left: auto; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .14); }
.dot.err { background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .14); }
.svc-b { display: flex; flex-direction: column; gap: 4px; }
.kv { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.kv > span { color: var(--txt-3); min-width: 52px; flex: none; }
.kv > b { color: var(--txt); font-weight: 600; word-break: break-all; }
.svc-f { margin-top: 8px; font-size: 11.5px; color: var(--txt-3); }
.acc-grid { display: grid; gap: 8px 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px 18px 8px; }
.acc-grid .kv > span { min-width: 76px; }

/* ---------- v3 表行数概览 ---------- */
.cnt-grid {
  display: grid; gap: 10px; padding: 6px 18px 12px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
@media (max-width: 1520px) { .cnt-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1240px) { .cnt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cnt {
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; background: #fcfcff;
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.cnt .lb { font-size: 11.5px; color: var(--txt-3); }
.cnt .vl { font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--txt); font-variant-numeric: tabular-nums; }
.cnt .tb { font-size: 10.5px; color: #b6bcc9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 弹层背景层（只用于点击关闭，不用 inline stopPropagation，避免拦掉全局 data-act 委托） */
.lb-bg, .mask-bg { position: absolute; inset: 0; }
.lb-inner { position: relative; z-index: 2; }
.mask .modal { position: relative; z-index: 2; }

/* 上传表：两行单元格压到 38px 行高（tag 不撑高） */
.type-cell { display: flex; align-items: center; gap: 6px; line-height: 1; }
.type-cell .t-sub { font-size: 11.5px; color: var(--txt-3); }
table.tbl.u-tbl td .cell-2 { line-height: 1.15; gap: 0; }
table.tbl.u-tbl td .cell-2 .tag { height: 17px; padding: 0 5px; font-size: 10.5px; }
table.tbl.u-tbl td .cell-2 .b { line-height: 1.3; }
table.tbl.u-tbl td .acts { min-height: 0; height: auto; }

/* ============================================================ wave1 三个页面
   令牌沿用顶部 :root（卡片圆角 14 / 表格 13px / 行高 38 / 按钮 30）
   备忘录 /notes · TG·WS /tgws · 爆破恢复 /recover              */

/* ---- 三张表统一：13px + 38 行高 + 卡内圆角 ---- */
table.tbl.n-tbl th, table.tbl.n-tbl td,
table.tbl.g-tbl th, table.tbl.g-tbl td,
table.tbl.r-tbl th, table.tbl.r-tbl td { font-size: var(--fs-table); }
table.tbl.n-tbl td, table.tbl.g-tbl td, table.tbl.r-tbl td { height: var(--row-h); }
table.tbl.n-tbl td .cell-2, table.tbl.g-tbl td .cell-2 { line-height: 1.15; gap: 0; }
table.tbl.n-tbl td .tags, table.tbl.g-tbl td .tags { display: flex; gap: 4px; flex-wrap: nowrap; }

/* 助记词命中标签 */
.tag.mn-tag { background: #fff7e6; color: #b45309; }
.mark-mn, mark.mn {
  background: #fff1c2; color: #7a4b00; border-radius: 3px;
  padding: 0 1px; font-weight: 600;
}

/* ---- 备忘录详情 ---- */
.note-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.note-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: #fcfcff;
}
.note-h {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; margin-bottom: 6px;
}
.note-h b { font-size: 13.5px; }
.note-b {
  font-size: 13px; line-height: 1.9; color: #2a3040;
  white-space: pre-wrap; word-break: break-word;
  max-height: 320px; overflow: auto;
  background: #fff; border-radius: 9px; padding: 8px 10px; border: 1px solid var(--line-2);
}

/* ---- tdata 任务小标签 / 状态 ---- */
.tag.queued { background: #f1f2f7; color: var(--txt-2); }
.tag.run { background: var(--info-bg); color: var(--info); }
.err-inline {
  font-size: 11.5px; color: var(--err); margin-left: 4px;
  text-decoration: underline dotted; cursor: help;
}

/* ---- 进度条 ---- */
.pbar {
  width: 108px; height: 5px; border-radius: 4px; background: #eef0f6;
  margin-top: 5px; overflow: hidden;
}
.pbar > i { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .4s; }
.pbar.big { width: 100%; height: 7px; margin: 10px 0 4px; }

/* ---- 爆破恢复提交表单 ---- */
.rec-form { display: flex; flex-direction: column; gap: 10px; }
.rec-form .rf-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-form .rf-row > label {
  width: 84px; flex: none; font-size: 12.5px; color: var(--txt-2); text-align: right;
}
.rec-form select.input { max-width: 520px; }
.rec-form textarea.input { max-width: 620px; min-height: 54px; resize: vertical; line-height: 1.6; }
.rec-form .rf-num { width: 108px; }
.rec-form .rf-hint { font-size: 11.5px; color: var(--txt-3); }

/* ---- 结果区小标题 ---- */
.sec-h {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 8px; font-size: 13px;
}

/* ---- 二次确认框正文 ---- */
.confirm-b {
  font-size: 13px; line-height: 1.85; color: var(--txt-2);
  white-space: pre-wrap; word-break: break-word;
}

/* ---- 宽弹层（备忘录详情 / 恢复结果）---- */
.modal.wide { width: 980px; max-width: 94vw; }
.modal.wide .modal-b { max-height: 68vh; overflow: auto; }
/* 注意：app.css 后段有一条 .kv{display:flex} （账号/设置卡片用），
   这里必须显式写回 grid，否则详情里的 kv 会被摊成一整行 */
.modal.wide .kv {
  display: grid; grid-template-columns: 92px 1fr; gap: 1px 14px;
  align-items: baseline; padding: 6px 0; font-size: 12.5px;
}
.modal.wide .kv .k { padding: 4px 0; }
.modal.wide .kv .v { padding: 4px 0; }
.modal.wide .kv .k { white-space: nowrap; }
.modal.wide .kv .v { word-break: break-word; overflow-wrap: anywhere; }
/* 备忘录详情的元信息条（比两列 kv 更耐窄宽度） */
.meta-strip {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 12.5px; color: var(--txt-2); line-height: 1.9;
}
.meta-strip > span { display: inline-flex; gap: 6px; align-items: baseline; }
.meta-strip > span > i {
  font-style: normal; color: var(--txt-3); font-size: 11.5px;
}
.meta-strip > span > b { font-weight: 600; color: var(--txt); word-break: break-all; }

/* ---- 揭示后的完整值（竖排，长私钥不横向溢出）---- */
.reveal-item {
  border: 1px solid #f6d4d5; border-radius: 12px; padding: 10px 12px;
  background: #fffafa; margin-bottom: 10px;
}
.reveal-item .ri-h {
  display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px;
}
.reveal-item .ri-row {
  display: grid; grid-template-columns: 62px 1fr; gap: 8px;
  font-size: 12.5px; line-height: 1.8; padding: 2px 0;
}
.reveal-item .ri-row > i { font-style: normal; color: var(--txt-3); }
.reveal-item .ri-row > span {
  color: #1e2334; word-break: break-all; overflow-wrap: anywhere;
}
.pbar.err > i { background: var(--err); }

/* ============================================================ wave2 */
/* 只读角色提示（顶栏 pill + 页面内黄条） */
.pill.ro { background: #fff5e8; color: var(--warn); border-color: #f6e2c6; }
.ro-note {
  margin: 0 0 14px; padding: 9px 12px; border-radius: 10px;
  background: #fff8ec; border: 1px solid #f6e2c6; color: #8a5a12;
  font-size: 12.5px; line-height: 1.7;
}
.ro-note b { color: #7a4c06; }

/* 弹层表单 */
.fform { display: block; }
.fform .field { margin-bottom: 12px; }
.fform .field > label { display: block; font-size: 12.5px; color: var(--txt-2); margin-bottom: 6px; }
.fform .field > label b.req { color: var(--err); font-weight: 600; }
.fform .field2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fform .input { width: 100%; }
.fform select.input { height: 32px; }
.fform .src-note { margin: 4px 0 6px; }

/* 菜单权限勾选 */
.perm-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.perm-tools .note { font-size: 11.5px; color: var(--txt-3); }
.perm-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  max-height: 272px; overflow: auto; padding: 8px; border: 1px solid var(--line);
  border-radius: 10px; background: #fcfcfe;
}
.perm-item {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; cursor: pointer;
  border: 1px solid transparent; border-radius: 8px; font-size: 12.5px; background: #fff;
}
.perm-item:hover { border-color: #e2ddfb; background: #faf8ff; }
.perm-item.on { border-color: #cfc9f7; background: #f4f1ff; }
.perm-item input { margin: 0; }
.perm-item span { flex: 1; }
.perm-item i { font-style: normal; font-size: 10.5px; color: var(--txt-3); }
.sw-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt-2); cursor: pointer; }
.sw-line input { margin: 0; }

/* 审计筛选栏 */
.au-toolbar { flex-wrap: wrap; row-gap: 8px; }
.au-toolbar .fl {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--txt-3);
}
.au-toolbar .fl .input { height: 32px; width: 148px; }
.au-toolbar .search { width: 210px; }
.au-toolbar .input { height: 32px; }

/* 五页表格统一：数值右对齐、时间不换行 */
table.tbl.st-tbl td.num, table.tbl.rl-tbl td.num, table.tbl.us-tbl td.num,
table.tbl.rc-tbl td.num, table.tbl.au-tbl td.num { text-align: right; }
table.tbl .nw { white-space: nowrap; }
table.tbl td .muted { color: var(--txt-3); }

/* ================= r2：三端账号体系（admin / agent / staff） ================= */
.pill.kind { font-weight: 700; }
.pill.kind-admin { background: #eef1ff; color: #3a45c4; }
.pill.kind-agent { background: #e9f7f1; color: #127a55; }
.pill.kind-staff { background: #fff4e6; color: #a05a00; }
.perm-matrix { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow: auto; padding: 2px 4px 2px 0; margin-top: 8px; }
.perm-group { font-size: 11.5px; font-weight: 700; color: #8a90a6; letter-spacing: .04em; margin: 8px 0 2px; }
.perm-row { display: grid; grid-template-columns: 1fr 74px 74px; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #e8eaf2; border-radius: 10px; background: #fff; }
.perm-row.off { background: #fafbfe; opacity: .66; }
.perm-row .pl { font-size: 13px; font-weight: 600; line-height: 1.35; }
.perm-row .pk { font-size: 11px; color: #9aa0b4; }
.perm-row .lv { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #4a5168; }
.perm-row .lv input { width: 14px; height: 14px; }
.perm-tools { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; flex-wrap: wrap; }
.perm-tools .note { font-size: 12px; color: #6b7286; }

/* ============================ wave3：设备详情抽屉 + 任务中心 ============================ */
.drawer.lg { width: 62vw; min-width: 720px; max-width: 100%; }
.dd-tabs {
  display: flex; gap: 4px; padding: 10px 18px 0; border-bottom: 1px solid var(--line);
  background: #fcfcfe;
}
.dd-tab {
  position: relative; border: 1px solid transparent; border-bottom: 0; background: transparent;
  font: inherit; font-size: 13px; color: var(--txt-2); padding: 8px 14px 9px;
  border-radius: 10px 10px 0 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.dd-tab:hover { background: #f3f2fb; color: var(--txt); }
.dd-tab.active {
  background: #fff; border-color: var(--line); color: var(--purple);
  font-weight: 600; margin-bottom: -1px;
}
.dd-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); display: inline-block; }
.drawer.lg .drawer-b { padding: 12px 18px 18px; }
.dd-alert { margin: 6px 0 12px; }
.dd-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--txt-3); margin: 4px 0 12px;
}
.dd-bar .btn { height: 28px; }
.dd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.dd-chip {
  font-size: 12px; color: var(--txt-2); background: #f7f7fc;
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
}
.dd-chip b { color: var(--txt); margin-left: 4px; }
.dd-kvwrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px;
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px; background: #fcfcff;
}
/* 注意：app.css 里 .kv 有两条定义（后者是 flex），抽屉里必须显式恢复成 grid */
.dd-kvwrap .kv {
  display: grid; grid-template-columns: 92px 1fr; gap: 4px 10px;
  padding: 4px 0; align-items: start;
}
.dd-kvwrap .kv .k { color: var(--txt-3); font-size: 12.5px; padding: 3px 0; white-space: nowrap; }
.dd-kvwrap .kv .v { font-size: 12.5px; padding: 3px 0; word-break: break-all; line-height: 1.5; }
/* 抽屉里的相册大图：.lightbox 默认 z-index 100，抽屉遮罩是 118，必须抬高 */
.lightbox.lb-drawer { z-index: 200; }
@media (max-width: 980px) {
  .dd-kvwrap { grid-template-columns: 1fr; }
}
.dd-note { margin-top: 10px; font-size: 12px; color: var(--txt-3); line-height: 1.7; }
.dd-sub { margin: 14px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--txt-2); }
.dd-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.dd-tile .alb-meta { padding: 6px 2px 0; }
.dd-pager {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 0 4px; font-size: 12px; color: var(--txt-3);
}
.dd-apps {
  display: flex; flex-wrap: wrap; gap: 6px; max-height: 210px; overflow: auto; padding: 2px 0 4px;
}
.dd-app {
  font-size: 11.5px; font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #f6f5ff; color: #4a4370; border-radius: 6px; padding: 3px 7px;
}
.dd-logtext {
  max-width: 620px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: #3d4457;
}
.dd-src { font-size: 11.5px; color: var(--txt-3); }
table.dd-tbl th, table.dd-tbl td { font-size: var(--fs-table); }
table.dd-tbl td { height: var(--row-h); }
.tk-pct { font-size: 11px; color: var(--txt-3); margin-top: 3px; }
.tk-tbl td .pbar { width: 100px; }
.tk-tbl .tk-title { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-tbl .tk-brief { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .drawer.lg { width: 100vw; min-width: 0; }
  .dd-kv { grid-template-columns: 88px 1fr; }
}


/* ============================================================================
   v3.6 wave4：分段条 / 开关 / 批量条 / 面包屑 / 空态 / 骨架 / 移动端 390×844
   令牌不动：表格 13px / 行高 38px / 卡片圆角 14px
   ========================================================================== */

/* ---------- 顶栏：面包屑 + 角色胶囊（参考站「页面名 + 角色」两段） ---------- */
.topbar { gap: 12px; }
.tb-title { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; }
.topbar .crumb {
  display: flex; align-items: center; gap: 6px; line-height: 1.2;
  font-size: 11.5px; color: var(--txt-3); white-space: nowrap;
}
.topbar .crumb .cg { color: var(--txt-3); }
.topbar .crumb .sep { color: #ccd1dd; font-size: 11px; }
.topbar .crumb .cur { color: var(--txt-2); font-weight: 500; }
.topbar .page-title { font-size: 17.5px; line-height: 1.28; letter-spacing: .2px; }
.pill.kind { border-radius: 20px; padding: 0 10px; }
.pill.kind-admin { background: #eeecfd; color: var(--purple); }
.pill.kind-agent { background: #e8f3ff; color: #1b6fd6; }
.pill.kind-staff { background: #f1f2f7; color: #5b6274; }
.pill.ro { background: #f5f6fa; color: var(--txt-2); }

.tb-br { display: none; }

/* ---------- 工具条 / 筛选区：统一 18px 内边距与 10px 间距 ---------- */
.toolbar { padding: 14px 18px; gap: 10px; }
.toolbar .search { width: 250px; }
.filterbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 0 18px 13px;
}
.filterbar .grow, .segrow .grow, .batchbar .grow { flex: 1; }
.chips.chips-flat { padding: 0 18px 12px; }
.segrow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 0 18px 12px;
}
.toolbar + .segrow, .toolbar + .filterbar { padding-top: 0; }

/* ---------- 分段条：紫底当前项 + 灰色计数胶囊 ---------- */
.segbar {
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 3px; border-radius: 10px; background: #f3f4f9;
}
.segbar .seg {
  height: 28px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--txt-2); font-size: 12.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap;
  transition: background .14s, color .14s, box-shadow .14s;
}
.segbar .seg:hover { background: #fff; color: var(--purple); }
.segbar .seg .cnt {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
  background: #e3e6f0; color: #6b7286; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center;
}
.segbar .seg.on {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(100, 85, 216, .24);
}
.segbar .seg.on:hover { color: #fff; }
.segbar .seg.on .cnt { background: rgba(255, 255, 255, .26); color: #fff; }
.segbar .seg.is-loading { color: transparent; position: relative; }
.segbar .seg.is-loading .cnt { opacity: .35; }
.segbar .seg.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 13px; height: 13px;
  border-radius: 50%; border: 2px solid #fff; border-color: #fff rgba(255, 255, 255, .35) rgba(255, 255, 255, .35);
  animation: spin .7s linear infinite;
}

/* 其他列表页的分段 chip（相册/上传/回收站…）：统一成「紫底当前项 + 灰计数胶囊」 */
.chips .chip { border-radius: 8px; }
.chips .chip b {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
  background: #e3e6f0; color: #6b7286; font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.chips .chip.active b { background: rgba(255, 255, 255, .26); color: #fff; }

/* ---------- 开关控件（显示 UUID / IP） ---------- */
.sw-line {
  display: inline-flex; align-items: center; gap: 9px; height: 32px;
  padding: 0 12px 0 9px; border: 1px solid #e3e5ee; border-radius: 8px;
  background: #fff; color: var(--txt-2); font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: border-color .14s, background .14s, color .14s;
}
.sw-line:hover { border-color: #cfc9f7; color: var(--purple); }
.sw-line.on { border-color: #cec7fb; background: #fbfaff; color: var(--purple); }
.sw-line .sw { flex: none; width: 38px; height: 22px; }
.sw-line .sw i { width: 18px; height: 18px; }
.sw-line .sw.on i { left: 18px; }
.sw-line .sw-txt { line-height: 1; }
.sw-line.is-loading .sw-txt { opacity: .5; }

/* ---------- 批量操作条 ---------- */
.batchbar { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.batchbar .bb-n { font-size: 12px; color: var(--txt-3); }
.batchbar .bb-n b { color: var(--purple); font-variant-numeric: tabular-nums; }
.btn.soft { color: var(--txt-3); border-color: #eceef4; background: #fcfcfe; }
.btn.soft:hover { color: var(--purple); border-color: #ddd7fa; background: #fbfaff; }
.btn-link.is-off { color: #c2c7d3; }

/* ---------- 表格勾选列 ---------- */
table.tbl th.cb-cell, table.tbl td.cb-cell { width: 36px; padding-left: 18px; padding-right: 0; }
table.tbl td.cb-cell { position: relative; }
.tbl-cb {
  width: 15px; height: 15px; margin: 0; accent-color: var(--purple);
  cursor: pointer; vertical-align: middle;
}
table.tbl tbody tr.picked { background: #f7f5ff; }
table.tbl tbody tr.picked td.col-act { background: #f7f5ff; }

/* ---------- 批量操作弹层 ---------- */
.wb-list {
  margin-top: 10px; max-height: 240px; overflow: auto;
  border: 1px solid var(--line); border-radius: 10px; background: #fcfcfe;
}
.wb-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid var(--line-2); font-size: 12.5px;
}
.wb-item:last-child { border-bottom: 0; }
.wb-item .wb-i {
  width: 20px; height: 20px; border-radius: 6px; flex: none; background: #efeafd;
  color: var(--purple); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.wb-item .wb-l { flex: 1; min-width: 0; color: var(--txt); }
.wb-item .wb-s { font-size: 11px; color: var(--txt-3); }
.wb-item.done .wb-i { background: #e9f7ee; color: var(--ok); }

/* ---------- 空态：图标 + 主文案 + 次文案 ---------- */
.empty { padding: 46px 16px; text-align: center; color: var(--txt-3); font-size: 12.5px; }
.empty .ico {
  width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 11px;
  background: var(--grad-soft); color: var(--purple);
  display: flex; align-items: center; justify-content: center;
}
.empty .big { font-size: 14px; font-weight: 600; color: var(--txt-2); line-height: 1.5; }
.empty .sub { font-size: 12px; color: var(--txt-3); margin-top: 5px; line-height: 1.7; max-width: 560px; margin-left: auto; margin-right: auto; }
td > .empty { padding: 34px 16px; }
td > .empty .ico { width: 42px; height: 42px; border-radius: 13px; }

/* ---------- 加载骨架：3~5 行，不空白闪烁 ---------- */
.skel { padding: 18px; display: grid; gap: 12px; }
.skel i {
  height: 16px; border-radius: 7px; display: block;
  background: linear-gradient(90deg, #f2f3f9 25%, #e9ebf4 37%, #f2f3f9 63%);
  background-size: 400% 100%; animation: sh 1.2s ease infinite;
}
td > .skel { padding: 18px 18px 22px; }

/* ---------- 分页器：与参考站一致的下拉 + 跳页 ---------- */
.pager { padding: 12px 18px; gap: 10px; }
.pager .sel-wrap select {
  height: 30px; min-width: 100px; padding: 0 26px 0 10px; border-radius: 8px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #9aa1b0 50%),
                    linear-gradient(135deg, #9aa1b0 50%, transparent 50%);
  background-position: calc(100% - 14px) 13px, calc(100% - 9px) 13px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.pager .pg-jump input { width: 46px; height: 30px; border-radius: 8px; }
.pager .total { font-size: 12.5px; }

/* ============================================================================
   移动端 390×844：侧栏 → 顶部横滑条；表格横向滚动；KPI 两列；抽屉全屏
   ========================================================================== */
@media (max-width: 900px) {
  html, body { overflow-x: clip; }
  .app { flex-direction: column; min-height: 100vh; }

  /* 侧栏变顶部横条（可横滑） */
  .side {
    position: sticky; top: 0; left: auto; width: 100%; height: auto; z-index: 70;
    border-right: 0; border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 14px rgba(20, 20, 60, .06);
    flex-direction: column;
  }
  .side.collapsed { width: 100%; border: 0; overflow: visible; }
  .side-head { height: 50px; padding: 0 12px; border-bottom: 0; }
  .side-head .brand-block { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
  .side-head .t1 { font-size: 13.5px; }
  .side-head .t2 { font-size: 10.5px; }
  .side.collapsed .side-head .meta { display: block; }
  .side-nav {
    display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden;
    padding: 0 12px 9px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav .nav-group { display: none; }
  .side-nav .nav-item {
    width: auto; flex: 0 0 auto; height: 34px; margin: 0; padding: 0 12px;
    border-radius: 9px; font-size: 12.5px; gap: 6px;
    border: 1px solid #eceef4; background: #fbfbfe;
  }
  .side-nav .nav-item svg { width: 15px; height: 15px; }
  .side-nav .nav-item.active {
    background: var(--grad); border-color: transparent; color: #fff;
    box-shadow: 0 4px 12px rgba(100, 85, 216, .22);
  }
  .side-nav .nav-item.active svg { opacity: 1; }
  .side.collapsed .side-nav { padding: 0 12px 9px; }
  .side.collapsed .nav-item { justify-content: flex-start; padding: 0 12px; }
  .side.collapsed .nav-item .lbl { display: inline; }
  .side-foot { display: none; }

  /* 顶栏：两行（标题+胶囊 / 账号+按钮） */
  .topbar {
    position: static; height: auto; padding: 9px 12px; gap: 8px;
    flex-wrap: wrap; row-gap: 8px;
  }
  .topbar .page-title { font-size: 15.5px; }
  .topbar .crumb { font-size: 10.5px; }
  .topbar .tb-br { display: block; flex: 0 0 100%; width: 100%; height: 0; order: 3; }
  .topbar .spacer { display: none; }
  .topbar .who { margin-left: auto; padding-right: 0; order: 4; }
  .topbar .who .n { font-size: 12px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .who .e { display: none; }
  .topbar .avatar { width: 26px; height: 26px; font-size: 12px; }
  .topbar .divider { display: none; }
  .topbar .btn { height: 28px; padding: 0 9px; font-size: 12px; }
  .topbar .pill.kind, .topbar .pill.ro { height: 19px; font-size: 10.5px; padding: 0 8px; order: 2; }
  .topbar .tb-title { order: 1; }
  .topbar .btn[data-act="pw"] { order: 5; }
  .topbar .btn[data-act="logout"] { order: 6; }

  /* 内容 */
  .content { padding: 10px 10px 22px; }
  .card { border-radius: 14px; }
  .card + .card { margin-top: 10px; }
  .card-h { padding: 12px 12px 0; flex-wrap: wrap; row-gap: 4px; }
  .card-h .sub { flex-basis: 100%; }
  .card-b { padding: 10px 12px 12px; }

  /* KPI 两列 */
  .kpi-row, .kpi-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
  .kpi { min-height: 82px; padding: 12px 12px 11px; gap: 8px; border-radius: 14px; }
  .kpi .lb { font-size: 11.5px; }
  .kpi .vl { font-size: 20px; line-height: 1.45; }
  .kpi .sb { font-size: 10.5px; line-height: 1.4; }
  .kpi .ico { width: 30px; height: 30px; border-radius: 9px; }
  .kpi .ico svg { width: 15px; height: 15px; }

  /* 工具条 / 筛选区：收紧 */
  .toolbar { padding: 10px 12px; gap: 8px; }
  .toolbar .search { width: 100%; }
  .toolbar .grow { display: none; }
  .toolbar .hint-dot { order: 9; flex-basis: 100%; }
  .filterbar, .segrow, .chips.chips-flat { padding: 0 12px 10px; gap: 8px; }
  .filterbar { flex-wrap: wrap; }
  .filterbar .grow { display: none; }
  .segbar { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .segbar::-webkit-scrollbar { display: none; }
  .segrow { align-items: stretch; }
  .segrow .grow { display: none; }
  .segrow .batchbar { flex-basis: 100%; }
  .tools, .au-toolbar { row-gap: 8px; }

  /* 表格：横向滚动不撑破布局 */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  table.tbl { min-width: 720px; }
  table.tbl th:first-child, table.tbl td:first-child { padding-left: 12px; }
  table.tbl th:last-child, table.tbl td.col-act { box-shadow: -6px 0 8px -8px rgba(20, 20, 60, .28); }
  .tbl-wrap::after { content: ""; }

  /* 分页器：换行 + 紧凑 */
  .pager { padding: 10px 12px; flex-wrap: wrap; row-gap: 8px; gap: 6px; }
  .pager .total { flex-basis: 100%; }
  .pager .sel-wrap select { height: 28px; min-width: 92px; font-size: 12px; }
  .pg-btn { min-width: 26px; height: 26px; font-size: 12px; }
  .pager .pg-jump { font-size: 12px; }
  .pager .pg-jump input { width: 40px; height: 26px; }

  /* 弹层 / 抽屉：内边距收紧，抽屉全屏 */
  .mask { padding: 10px; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 14px; }
  .modal.sm { width: 100%; }
  .modal-h { padding: 14px 14px 0; }
  .modal-b { padding: 12px 14px 4px; }
  .modal-f { padding: 12px 14px 14px; }
  .drawer-mask .drawer, .drawer.lg { width: 100%; min-width: 0; max-width: 100%; }
  .drawer-h { padding: 12px 14px; }
  .drawer-b { padding: 10px 12px 14px; }
  .drawer-f { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
  .drawer.lg .drawer-b { padding: 10px 12px 14px; }
  .dd-tabs { padding: 8px 12px 0; overflow-x: auto; scrollbar-width: none; }
  .dd-tabs::-webkit-scrollbar { display: none; }
  .dd-tab { padding: 7px 11px 8px; font-size: 12.5px; white-space: nowrap; }
  .dd-kvwrap { padding: 6px 12px; }

  /* 仪表板两块 / 打包选项 / 弹层表单：单列 */
  .dash-duo { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
  .modes, .form-grid, .opt-row, .texts-grid, .field2, .row2 { grid-template-columns: minmax(0, 1fr); }
  .qr-wrap { flex-direction: column; }
  .qr-box { width: 100%; max-width: 220px; margin: 0 auto; }
  .qr-side { min-width: 0; width: 100%; }
  .kv, .kv.one { grid-template-columns: 84px 1fr; }

  /* 相册网格 */
  .alb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px 12px 8px; }
  .alb-thumb { height: 96px; }
  .dd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* toast 移到顶部，避免盖住底部抽屉式弹层 */
  #toasts { top: 8px; bottom: auto; left: 10px; right: 10px; max-width: none; gap: 6px; }
  .toast { font-size: 12px; padding: 8px 10px; border-radius: 9px; }

  /* 登录 */
  .login-wrap { padding: 18px 12px; align-items: flex-start; padding-top: 12vh; }
  .login-card { width: 100%; padding: 22px 18px 18px; border-radius: 16px; }

  /* 两列按钮组收窄 */
  .perm-row { grid-template-columns: 1fr 62px 62px; padding: 7px 9px; }
  .tb-label { font-size: 11.5px; }
  .input.date-sm { width: 112px; }
}
@media (max-width: 430px) {
  .kpi .vl { font-size: 19px; }
  .toolbar .btn, .filterbar .btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
  .sw-line { height: 30px; padding: 0 10px 0 8px; font-size: 12px; }
  .segbar .seg { height: 26px; padding: 0 9px; font-size: 12px; }
}

/* ============================================================
   r3：设备详情独立页（/device/:uuid）+ 代理申请（/apply）
   令牌不变：表格 13px / 行高 38 / 卡片圆角 14
   ============================================================ */
.ddv-hero { margin-bottom: 14px; }
.ddv-hero-h {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px 10px; border-bottom: 1px solid var(--line);
}
.ddv-hero-t { min-width: 0; }
.ddv-hero-t .t { font-size: 15px; font-weight: 600; color: var(--txt); display: flex; align-items: center; gap: 8px; }
.ddv-hero-t .s { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }
.ddv-src { font-size: 11.5px; color: var(--txt-3); }
.ddv-kv {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 22px; padding: 6px 18px 14px;
}
.ddv-kv .it {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 0;
  border-bottom: 1px dashed var(--line-2); font-size: var(--fs-table); min-width: 0;
}
.ddv-kv .it.wide { grid-column: span 3; }
.ddv-kv .k { flex: 0 0 78px; color: var(--txt-3); font-size: 12.5px; }
.ddv-kv .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt); }
.ddv-kv .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.ddv-card { overflow: hidden; }
.ddv-tabs {
  display: flex; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.ddv-tabs::-webkit-scrollbar { display: none; }
.ddv-tab {
  height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent;
  background: #f3f4f9; color: #4a5162; font-size: 12.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.ddv-tab:hover { background: #eceafb; color: var(--purple); }
.ddv-tab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(108, 92, 231, .22); }
.ddv-tab .n {
  font-style: normal; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 8px;
  background: #e3e6f0; color: #6b7286;
}
.ddv-tab.active .n { background: rgba(255, 255, 255, .26); color: #fff; }
.ddv-tabbody { padding: 14px 18px 16px; }
.ddv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ddv-chip {
  font-size: 12px; color: var(--txt-2); background: #f6f7fb; border: 1px solid var(--line);
  border-radius: 9px; padding: 4px 10px;
}
.ddv-chip b { color: var(--txt); margin-left: 4px; }
.ddv-tbl th, .ddv-tbl td { font-size: var(--fs-table); }
.ddv-tbl tr { height: var(--row-h); }
.secret-plain {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.7; word-break: break-all;
  background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}
.ap-tbl th, .ap-tbl td { font-size: var(--fs-table); }
@media (max-width: 1180px) {
  .ddv-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ddv-kv .it.wide { grid-column: span 2; }
}
@media (max-width: 900px) {
  .ddv-kv { grid-template-columns: minmax(0, 1fr); }
  .ddv-kv .it.wide { grid-column: span 1; }
  .ddv-hero-h { padding: 12px; }
  .ddv-tabbody { padding: 10px 12px 14px; }
  .ddv-tab { height: 27px; padding: 0 9px; font-size: 12px; }
}
/* ============================================================
   v3.5 · 钱包列表 / 设备列表 对齐参考站（品牌 chip、四象限、备注内联编辑）
   约束延续：表格 13px / 行高 38px / 卡片圆角 14px
   ============================================================ */

/* ---------- 品牌描边 chip（Bitpie / Trust / TokenPocket / imToken / OKX 固定色，其它灰） ---------- */
.br {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px;
  border-radius: 5px; border: 1px solid #e3e6ee; background: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: .1px;
  color: var(--txt-2); white-space: nowrap; max-width: 104px;
  overflow: hidden; text-overflow: ellipsis;
}
.br.bitpie      { color: #1d4ed8; border-color: #bfd4fb; background: #f4f8ff; }
.br.trust       { color: #2563eb; border-color: #c3d6fb; background: #f5f9ff; }
.br.tokenpocket { color: #0f766e; border-color: #b9e3dd; background: #f2fbfa; }
.br.imtoken     { color: #c2410c; border-color: #f8cdae; background: #fff8f2; }
.br.okx         { color: #111827; border-color: #cfd3dc; background: #f8f9fb; }
.br.tronlink    { color: #dc2626; border-color: #f6c4c4; background: #fff6f6; }
.br.metamask    { color: #b45309; border-color: #f3d6a6; background: #fffaf0; }
.br.global      { color: #7c3aed; border-color: #ddd0fb; background: #faf8ff; }
.br.notes       { color: #a16207; border-color: #f0dcae; background: #fffdf3; }
.br.mnemonic    { color: #b45309; border-color: #f0dcae; background: #fffdf3; }
.br.wa          { color: #15803d; border-color: #bfe4c9; background: #f5fcf7; }
.br.tg          { color: #0284c7; border-color: #b6e0f7; background: #f4fbff; }
.br.other       { color: #6b7280; border-color: #e3e6ee; background: #fafbfd; }

/* ---------- iOS 版本彩色徽标 ---------- */
.ios {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px;
  border-radius: 5px; border: 1px solid transparent;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ios.iv { color: #6d28d9; background: #f3efff; border-color: #ddd0fb; }
.ios.ip { color: #6c5ce7; background: #f1eeff; border-color: #dcd5fb; }
.ios.ib { color: #1d4ed8; background: #eef4ff; border-color: #cadcfb; }
.ios.is { color: #475569; background: #f4f6fa; border-color: #dfe4ee; }
.ios.iz { color: #8a91a0; background: #f6f7fa; border-color: #e6e9f0; }

/* ---------- 计数徽标：钱包紫 / 助记词橙 / 地址绿，0 → 灰 ---------- */
.mini.w { background: #f1eeff; color: var(--purple); }
.mini.m { background: #fff3e6; color: #c2410c; }
.mini.a { background: #e9f7ee; color: #15803d; }
.mini.z { background: #f5f6fa; color: #b6bcc9; }
.mini-row { gap: 6px; }

/* ---------- 备注：黄标签 + 内联编辑 ---------- */
.tag.note { background: #fff8dd; color: #a16207; border: 1px solid #f6e7a8; }
.mini-link { margin-left: 6px; font-size: 12px; }
.note-edit { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.note-edit .note-in { height: 26px; font-size: 12px; padding: 0 8px; }
.note-edit .note-acts { display: flex; gap: 5px; }
.note-edit .note-err { font-size: 11px; color: var(--err); }
.btn.btn-xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 5px; }
.src-rm { font-size: 10.5px; color: var(--txt-3); margin-top: 2px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.row-link .note-edit, tr.row-link .note-edit * { cursor: text; }

/* ---------- 表头排序 ---------- */
table.tbl th.th-sort { padding: 0; }
table.tbl th .th-b {
  display: inline-flex; align-items: center; gap: 3px; width: 100%;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; font-weight: 600; padding: 9px 8px; text-align: left;
}
table.tbl th .th-b:hover { color: var(--purple); }
table.tbl th.th-sort.on .th-b { color: var(--purple); }
table.tbl th .s-arrow { font-size: 9px; color: #c3c8d4; font-style: normal; }
table.tbl th.th-sort.on .s-arrow { color: var(--purple); }

/* ---------- 钱包列表（7 列行结构） ---------- */
table.tbl.wl2-tbl td { height: 38px; vertical-align: middle; }
table.tbl.wl2-tbl tbody tr td { padding-top: 6px; padding-bottom: 6px; }
.chev-b { width: 22px; height: 22px; border: 0; background: transparent; color: var(--txt-3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chev-b:hover { color: var(--purple); }
.idcell { display: inline-flex; align-items: center; gap: 4px; }
.idcell b { font-weight: 600; }
.btn-copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border: 0; border-radius: 4px;
  background: transparent; color: #b6bcc9; cursor: pointer;
}
.btn-copy:hover { color: var(--purple); background: #f4f1ff; }
.wcell { display: flex; flex-direction: column; gap: 3px; line-height: 1.25; }
.wcell .wc1 { display: flex; align-items: center; gap: 5px; min-width: 0; }
.wcell .wname { font-size: 11.5px; color: var(--txt-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 84px; }
.wcell .wc2 { display: flex; gap: 4px; }
.wcell .wc3 { font-size: 11px; color: var(--txt-3); }
.wcell .tag { height: 18px; padding: 0 6px; font-size: 10.5px; }
.acell { display: flex; flex-direction: column; gap: 3px; line-height: 1.3; }
.acell .ac1 { display: flex; align-items: center; gap: 3px; }
.acell .addr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #2a3040; }
.acell .ac2 { font-size: 11.5px; color: var(--txt-3); }
.balcell { display: flex; flex-direction: column; gap: 3px; line-height: 1.3; }
.balcell .bc1 { font-size: 13px; }
.balcell .bc2 { font-size: 11px; color: var(--txt-3); }
.balcell .unit { font-size: 11px; color: var(--txt-3); }
.balcell .zero { color: #8a91a0; font-weight: 600; }
.proxycell { display: flex; align-items: center; }
.card-h .hint { font-size: 11.5px; color: var(--txt-3); font-variant-numeric: tabular-nums; }
.card-h .n { font-size: 12px; font-weight: 500; color: var(--txt-3); margin-left: 8px; }
.filterbar .note-off { font-size: 11.5px; color: var(--txt-3); }
.sw-line.is-off { opacity: .58; cursor: not-allowed; }
.sw-line.is-off:hover { border-color: var(--line); color: var(--txt-3); }

/* ---------- 钱包分析弹层 ---------- */
.ana-kv {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 14px; padding: 2px 0 12px;
}
.ana-kv .kv-i { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ana-kv .k { font-size: 11px; color: var(--txt-3); }
.ana-kv .v { font-size: 12.5px; font-weight: 600; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ana-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 6px; }
.ana-tbl th { background: var(--head-bg); color: var(--txt-3); font-weight: 600; font-size: 11.5px; text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.ana-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.ana-tbl tr:last-child td { border-bottom: 0; }
.ana-tbl .bc2 { font-size: 11px; color: var(--txt-3); }
.ana-sub { font-size: 12.5px; font-weight: 600; color: var(--txt-2); margin: 10px 0 6px; }

@media (max-width: 980px) {
  .ana-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wcell .wname { max-width: 60px; }
}

/* ---------- 定宽表格（1440 视口内不裁列，窄屏由 .tbl-wrap 横向滚动） ---------- */
table.tbl.wl2-tbl, table.tbl.dev2-tbl { table-layout: fixed; }
table.tbl.wl2-tbl td, table.tbl.dev2-tbl td { overflow: hidden; }
table.tbl.wl2-tbl td > *, table.tbl.dev2-tbl td > * { max-width: 100%; }
.proxycell { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.proxycell .pname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proxycell .mini-link { margin-left: 0; font-size: 11.5px; }
.exp-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 2px 0 8px; }
.exp-meta .em { font-size: 11.5px; color: var(--txt-2); max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-meta .em i { font-style: normal; color: var(--txt-3); margin-right: 5px; }
.sw-line.is-off { cursor: pointer; }
table.tbl.dev2-tbl td .acts { flex-wrap: nowrap; }
table.tbl.dev2-tbl td .acts .br { flex: none; }

/* 定宽表格里的长文本一律省略号（不裁半个字） */
.acell .ac1 .addr, .acell .ac2, .balcell .bc2, .wcell .wc3,
.dev2-tbl .cell-2 .a, .dev2-tbl .cell-2 .b, .dev2-tbl .sub-line {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acell .ac2 { display: block; }
table.tbl.wl2-tbl td .wc3 .tag { max-width: 100%; }

/* 行高贴 38px：两行 cell 用 1.15 行距 + 5px 内边距 */
table.tbl.dev2-tbl td { padding-top: 5px; padding-bottom: 5px; }
table.tbl.dev2-tbl td .cell-2 { line-height: 1.15; gap: 0; }
table.tbl.dev2-tbl td .mini { height: 19px; }
table.tbl.dev2-tbl td .ios, table.tbl.dev2-tbl td .br, table.tbl.dev2-tbl td .tag { height: 19px; }

.note-add { display: flex; align-items: center; gap: 5px; min-width: 0; }
.note-add .src-rm { margin-top: 0; max-width: 74px; }

/* ================================================================
   钱包分析弹层（TRON · TronGrid 官方 API）—— v3.6 / wave6
   对齐参考站「钱包分析」：KPI×4 / 日终余额折线 / 余额参考区间 /
   区间分布 / 安全画像 / 月度明细。表格强制 13px · 行高 38 · 圆角 14。
   ================================================================ */
.modal.wa {
  width: 90vw; max-width: 1720px; height: 90vh; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 16px; padding: 0;
}
.wa-h {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 14px 20px 12px; border-bottom: 1px solid var(--line);
}
.wa-h .ico {
  width: 30px; height: 30px; border-radius: 9px; background: #efeaff;
  color: var(--purple); display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.wa-h .t { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.wa-h .sub { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.wa-h .sub .mono { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--txt-2); }
.wa-h .r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wa-sel {
  height: 24px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
  color: var(--txt-2); font-size: 11.5px; padding: 0 6px; outline: none; cursor: pointer;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.wa-sel:hover { border-color: #cfc9f7; }
.wa-chip {
  font-size: 11.5px; color: var(--txt-2); background: #f5f6fb;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.wa-b { flex: 1 1 auto; overflow: auto; padding: 14px 20px 20px; }

/* KPI */
.wa-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wa-kpi { border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; padding: 11px 14px; min-width: 0; }
.wa-kpi .lb { font-size: 12.5px; color: var(--txt-2); font-weight: 500; }
.wa-kpi .vl { font-size: 24px; font-weight: 700; line-height: 1.35; letter-spacing: .2px; color: var(--txt); }
.wa-kpi .vl .un { font-size: 12px; font-weight: 600; color: var(--txt-3); margin-left: 5px; }
.wa-kpi .sb { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-kpi.p .vl { color: var(--purple); }
.wa-kpi.r .vl { color: var(--err); }
.wa-kpi.g .vl { color: var(--ok); }
.wa-kpi.o .vl { color: var(--warn); }

/* 主栅格 */
.wa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 12px; margin-top: 12px; }
.wa-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 424px; gap: 12px; margin-top: 12px; }
.wa-card { border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; min-width: 0; }
.wa-card-h { display: flex; align-items: center; gap: 8px; padding: 11px 14px 0; flex-wrap: wrap; }
.wa-card-h .t { font-size: 13.5px; font-weight: 700; }
.wa-card-h .u { font-size: 11px; color: var(--txt-3); }
.wa-card-b { padding: 6px 14px 12px; }

/* 区间切换 */
.wa-seg { margin-left: auto; display: flex; gap: 2px; background: #f4f5fa; border-radius: 9px; padding: 2px; }
.wa-seg button {
  border: 0; background: transparent; font-size: 11.5px; color: var(--txt-2);
  padding: 4px 9px; border-radius: 7px; cursor: pointer; line-height: 1.5;
}
.wa-seg button:hover { color: var(--purple); }
.wa-seg button.on { background: #fff; color: var(--purple); font-weight: 700; box-shadow: 0 1px 3px rgba(20, 20, 60, .1); }

/* 折线（纯 SVG：线条在 svg 里，文字用 HTML 覆盖层，避免被拉伸） */
.wa-chart { position: relative; width: 100%; }
.wa-plot { position: relative; height: 292px; }
.wa-plot .wa-svg { display: block; width: 100%; height: 292px; overflow: visible; }
.wa-ylb { position: absolute; inset: 0; pointer-events: none; }
.wa-ylb span {
  position: absolute; left: 0; width: 48px; text-align: right; font-size: 10.5px;
  color: var(--txt-3); transform: translateY(-50%); font-variant-numeric: tabular-nums;
}
.wa-xlb { position: absolute; left: 0; right: 0; bottom: 0; height: 16px; pointer-events: none; }
.wa-xlb span { position: absolute; font-size: 10.5px; color: var(--txt-3); transform: translateX(-50%); white-space: nowrap; }
.wa-xlb span.s { transform: translateX(0); }
.wa-xlb span.e { transform: translateX(-100%); }
.wa-pk {
  position: absolute; transform: translate(9px, -50%); font-size: 10.5px; color: #e2483d;
  white-space: nowrap; pointer-events: none; font-weight: 600;
  text-shadow: 0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff;
}
.wa-pk.l { transform: translate(-100%, -50%) translateX(-9px); }
.wa-tip {
  position: absolute; pointer-events: none; background: rgba(23, 25, 39, .94); color: #fff;
  border-radius: 8px; padding: 7px 10px; font-size: 11.5px; line-height: 1.7;
  opacity: 0; transition: opacity .1s ease; white-space: nowrap; z-index: 3;
  box-shadow: 0 8px 22px rgba(20, 20, 60, .28);
}
.wa-tip b { font-weight: 700; }
.wa-cap { font-size: 11.5px; color: var(--txt-3); line-height: 1.75; padding: 4px 2px 0; }
.wa-cap b { color: var(--txt-2); font-weight: 600; }

/* 右侧参考区间 */
.wa-ref { display: flex; flex-direction: column; gap: 11px; }
.wa-ref .h { font-size: 11px; color: var(--txt-3); letter-spacing: .3px; }
.wa-ref-row .lb { font-size: 11.5px; color: var(--txt-3); }
.wa-ref-row .vl { font-size: 13.5px; font-weight: 700; color: var(--txt); margin-top: 1px; }
.wa-ref-row .vl small { font-size: 11px; font-weight: 500; color: var(--txt-3); margin-left: 4px; }
.wa-bar { height: 6px; border-radius: 999px; background: #f1f2f7; position: relative; margin-top: 5px; overflow: hidden; }
.wa-bar i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--grad); }
.wa-bar i.soft { background: #cfc8fb; }

/* 分布 */
.wa-dist { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.wa-dist .cell { min-width: 0; }
.wa-dist .cell .lb { font-size: 11.5px; color: var(--txt-3); white-space: nowrap; }
.wa-dist .cell .vl { font-size: 15px; font-weight: 700; margin: 1px 0 5px; color: var(--txt); }
.wa-dist .cell .vl.hi { color: var(--purple); }
.wa-dist .cell .bar { height: 5px; border-radius: 999px; background: #f1f2f7; overflow: hidden; }
.wa-dist .cell .bar i { display: block; height: 100%; border-radius: 999px; background: var(--purple); }

/* 安全画像（无数据 → 置灰 + 原因） */
.wa-off { opacity: .62; }
.wa-sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.wa-sec-grid .lb { font-size: 11.5px; color: var(--txt-3); }
.wa-sec-grid .vl { font-size: 13.5px; font-weight: 700; margin-top: 2px; color: var(--txt-2); display: flex; align-items: center; gap: 6px; }
.wa-note {
  margin-top: 10px; font-size: 11.5px; color: var(--warn); background: var(--warn-bg);
  border-radius: 9px; padding: 7px 10px; line-height: 1.7;
}

/* 月度明细表：13px / 行高 38 / 圆角 14 */
.wa-tbl-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 4px; }
table.wa-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
table.wa-tbl th:nth-child(1), table.wa-tbl td:nth-child(1) { width: 16%; }
table.wa-tbl th:nth-child(2), table.wa-tbl td:nth-child(2) { width: 26%; }
table.wa-tbl th:nth-child(3), table.wa-tbl td:nth-child(3) { width: 26%; }
table.wa-tbl th:nth-child(4), table.wa-tbl td:nth-child(4) { width: 24%; }
table.wa-tbl th:nth-child(5), table.wa-tbl td:nth-child(5) { width: 8%; }
table.wa-tbl tbody tr { height: 38px; }
table.wa-tbl th {
  height: 38px; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--txt-3);
  background: var(--head-bg); text-align: right; white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--line);
}
table.wa-tbl th:first-child { text-align: left; }
table.wa-tbl td {
  height: 38px; line-height: 38px; padding: 0 12px; text-align: right;
  box-shadow: inset 0 -1px 0 var(--line-2); color: var(--txt); white-space: nowrap;
}
table.wa-tbl td:first-child { text-align: left; color: var(--txt-2); }
table.wa-tbl td .m { font-variant-numeric: tabular-nums; }
table.wa-tbl tbody tr:last-child td { box-shadow: none; }
table.wa-tbl tbody tr:hover td { background: #fafaff; }
table.wa-tbl td.hi { font-weight: 700; }
table.wa-tbl td.mute { color: var(--txt-3); }

/* 空态 / 报错 / 骨架 */
.wa-empty { padding: 52px 20px; text-align: center; }
.wa-empty .ic { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px; background: #f4f5fa; color: var(--txt-3); display: flex; align-items: center; justify-content: center; }
.wa-empty .big { font-size: 15px; font-weight: 700; color: var(--txt); }
.wa-empty .sub { font-size: 12.5px; color: var(--txt-3); margin-top: 6px; line-height: 1.8; }
.wa-err { border: 1px solid #f6cfd0; background: var(--err-bg); border-radius: 12px; padding: 12px 14px; }
.wa-err .t { font-size: 13px; font-weight: 700; color: var(--err); display: flex; align-items: center; gap: 8px; }
.wa-err .m {
  font-size: 12px; color: #8c3b3b; margin-top: 6px; line-height: 1.75; word-break: break-word;
  font-family: ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap;
}
.wa-err .acts { margin-top: 10px; display: flex; gap: 8px; }
.wa-skel { padding: 8px 0; }
.wa-skel .row { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #f2f3f8 25%, #eceef6 37%, #f2f3f8 63%); background-size: 400% 100%; animation: waShim 1.2s ease infinite; margin-bottom: 10px; }
.wa-skel .row.big { height: 84px; border-radius: 14px; }
.wa-skel .row.mid { height: 240px; border-radius: 14px; }
@keyframes waShim { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.wa-meta {
  margin-top: 12px; font-size: 11px; color: var(--txt-3); line-height: 1.8;
  border-top: 1px dashed var(--line); padding-top: 9px;
}
.wa-meta code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--txt-2); }
.wa-warn { font-size: 11.5px; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 6px 9px; margin-top: 8px; line-height: 1.7; }

@media (max-width: 1400px) {
  .wa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-grid, .wa-grid2 { grid-template-columns: 1fr; }
  .modal.wa { width: 94vw; height: 92vh; }
}
@media (max-width: 900px) {
  .wa-kpis { grid-template-columns: 1fr; }
  .wa-dist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal.wa { width: 96vw; height: 94vh; }
}

/* NO_FLASH_ANIM：弹层每次内部更新都会重放 pop 动画（translateY+opacity），
   看起来就是"点一下闪一下"——弹层内更新时禁用入场动画 */
.mask .modal,
.mask .modal.sm,
.wa-mask .modal,
.wa-mask .wa-sheet,
.wa-mask .modal-card {
  animation: none !important;
}
/* 首次打开仍保留一点淡入，交给遮罩本身 */
.mask { animation: fade .12s ease; }
.wa-mask { animation: fade .12s ease; }

/* V3_MODAL_HOST：弹层容器在 #root 之外，内部滚动由 .v3m-scroll 承担 */
#v3modal .v3m-mask { position: fixed; inset: 0; background: rgba(17,20,34,.38); z-index: 90;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 18px; }
#v3modal .v3m-scroll { max-height: calc(100vh - 80px); overflow: auto; width: 100%;
  display: flex; align-items: flex-start; justify-content: center; }
#v3modal .modal, #v3modal .wa-sheet, #v3modal .modal-card { animation: none !important; }

/* ===================== v3f1 第 1/2 组修复（列表交互 + 归属贯穿） ===================== */
/* 设备行 ID 单元格：ID + 设备名两行都可点进详情；列头排序是独立按钮，互不冲突 */
.id-link {
  border: 0; background: none; padding: 0; cursor: pointer; text-align: left;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 0;
  line-height: 1.12; color: #2a3040; max-width: 104px;
}
.id-link:hover b { color: var(--purple); }
.id-name {
  display: block; max-width: 100px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 10.5px; color: var(--txt-3); font-weight: 400;
}
/* 代理列：最小 120px，名称可点，不被操作列挤出视口 */
table.tbl th.agent-col, table.tbl td.agent-col { min-width: 120px; }
table.tbl td.agent-col { white-space: nowrap; }
.agent-link {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: #3f4759;
  max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle; text-align: left;
}
.agent-link:hover { color: var(--purple); text-decoration: underline; }
.agent-txt { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: middle; color: #3f4759; }
/* 备注：两行截断（title 给全文），编辑态仍是原来的内联输入框 */
.note-clamp2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal; word-break: break-word; text-align: left;
  line-height: 1.22; max-height: 32px;
}
.note-btn { height: auto; min-height: 21px; max-width: 124px; padding: 2px 6px; align-items: flex-start; }
table.tbl td.note-col { white-space: normal; }
/* 心跳 / 更新 双排序表头：一个 th 两个 ▲▼ 按钮 */
.th-pair { padding-left: 8px; padding-right: 6px; }
.th-pair .th-b2 {
  display: inline-flex; align-items: center; gap: 2px; border: 0; background: none;
  padding: 0 4px 0 0; cursor: pointer; font: inherit; color: var(--txt-2);
}
.th-pair .th-b2 + .th-b2 { padding-left: 4px; border-left: 1px solid var(--line); }
.th-pair .th-b2.on { color: var(--purple); font-weight: 600; }
.hb-up { margin-left: 6px; font-size: 10.5px; color: var(--txt-3); font-weight: 400; }
/* 面包屑「代理 · 名称」+ 一键清除 */
.agent-crumb { color: var(--purple); font-weight: 600; max-width: 180px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.crumb-x {
  border: 0; background: #f1eeff; color: var(--purple-d); cursor: pointer; font-size: 13px;
  line-height: 1; width: 17px; height: 17px; border-radius: 50%; margin-left: 6px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.crumb-x:hover { background: #e2dcff; }
/* 钱包名可点 → 设备详情「已解锁钱包」标签 */
.wname-btn { border: 0; background: none; padding: 0; font: inherit; cursor: pointer;
  color: inherit; text-align: left; max-width: 118px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.wname-btn:hover { color: var(--purple); text-decoration: underline; }
.wname-btn[disabled] { cursor: default; color: var(--txt-3); text-decoration: none; }
/* 地址列：默认截断；展开后显示完整地址（可换行），展开态在本次会话内保持 */
.acell .ac1 { display: flex; align-items: center; gap: 4px; min-width: 0; }
.acell.is-open .ac1 { align-items: flex-start; }
.addr-full { white-space: normal !important; word-break: break-all; line-height: 1.3;
  max-width: 100%; display: inline-block; }
.addr-tg { flex: none; font-size: 11.5px; }
.addr-len { color: var(--txt-3); }
table.tbl.w-tbl tbody tr td .acell.is-open { white-space: normal; }
/* 三列表（相册 / 上传 / TG-WS）新增代理 + 设备列 */
.alb-own { display: flex; gap: 5px; font-size: 11.5px; line-height: 1.3; color: var(--txt-2);
  margin-top: 1px; min-width: 0; }
.alb-own .own-k { color: var(--txt-3); flex: none; }
.alb-own .own-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 压缩备注 / 应用列，优先保证代理列与操作列 */
table.tbl.dev2-tbl td.apps-col, table.tbl.dev2-tbl th.apps-col { max-width: 200px; }
table.tbl.dev2-tbl td.apps-col .acts { flex-wrap: nowrap; overflow: hidden; }
/* 设备表：表头允许换行，避免长表头把表格撑宽后「心跳/更新」排序按钮被右侧固定操作列盖住 */
table.tbl.dev2-tbl th { white-space: normal; line-height: 1.25; vertical-align: middle; }
table.tbl.dev2-tbl th .th-b, table.tbl.dev2-tbl th .th-b2 { white-space: nowrap; }
table.tbl.dev2-tbl th.th-pair { line-height: 1.2; }
/* 设备表行高锁 38：压掉默认 1.5 行高带来的 2px 溢出 */
table.tbl.dev2-tbl tbody td { line-height: 1.2; }
table.tbl.dev2-tbl tbody td.id-cell, table.tbl.dev2-tbl tbody td .id-link { line-height: 1.05; }
table.tbl.dev2-tbl tbody td .id-name { line-height: 1.05; }
table.tbl.dev2-tbl tbody td .cell-2 { line-height: 1.15; gap: 0; }
/* 设备详情：备注完整展示（列表里两行截断，这里不截断、可换行） */
.ddv-kv .v.note-full { white-space: normal; word-break: break-word; overflow: visible;
  text-overflow: clip; line-height: 1.55; }
.ddv-kv .it.wide .v.note-full { max-height: none; }
/* 修正：代理列 120px 只用于设备表；钱包表 96px 即可，避免把「心跳/更新」挤到固定操作列下面 */
table.tbl wl2-tbl th.agent-col { min-width: 96px; }
table.tbl.wl2-tbl th.agent-col, table.tbl.wl2-tbl td.agent-col { min-width: 96px; }
.wcell .wname-btn { max-width: 70px; min-width: 0; flex: 0 1 auto; }
/* 心跳/更新 双排序按钮同一行，不再折行占用表头高度 */
table.tbl.dev2-tbl th.th-pair, table.tbl.wl2-tbl th.th-pair { white-space: nowrap; }
.th-pair .th-b2 { font-size: 12px; padding: 0 3px; }
.th-pair .th-b2 + .th-b2 { padding-left: 5px; }
/* ID 列：列头 100px，原样展示机型名（超出截断，title 保留全文） */
.id-link { max-width: 72px; }
.id-name { max-width: 72px; }
/* 备注单元格收窄到列宽内，避免把设备表撑宽 → 心跳/更新 排序按钮被固定操作列盖住 */
.note-btn { max-width: 96px; }
.note-clamp2 { max-width: 86px; }
/* 关键修正：th-b 默认 width:100%，双排序按钮必须还原为 auto，否则表头内容超宽把表格撑出 50px */
table.tbl th.th-pair .th-b2 { display: inline-flex; width: auto; padding: 9px 4px; gap: 2px; }
/* TG/WS 文件列：给「文件不在本机」完整宽度，不被固定操作列压住 */
table.tbl.g-tbl th.file-col, table.tbl.g-tbl td.file-col { min-width: 124px; white-space: nowrap; }
/* TG/WS 列表：固定列宽，保证「代理 / 设备 / 文件」都在视口内且固定操作列不压内容 */
table.tbl.g-tbl { table-layout: fixed; }
/* 固定列宽后：单元格内容裁剪在列内，避免包名/大小互相压字 */
table.tbl.g-tbl td { overflow: hidden; }
table.tbl.g-tbl td .cell-trunc { max-width: 100% !important; }

/* ============================================================ 第 3~7 组新增样式 */
/* 表格基线复核：13px / 行高 38 / 卡片圆角 14（新表格显式沿用变量） */
.tg-tbl td, .tg-log td, .u-tbl td, .ddv-tbl td { font-size: var(--fs-table); height: var(--row-h); }

/* ---- 第 3 组 A：TG 通知页 ---- */
.tg-hint {
  margin: 0 0 14px; padding: 11px 14px; border-radius: 12px;
  background: #fff8e8; border: 1px solid #f6e0b0; color: #7a5a12; font-size: 12.5px; line-height: 1.6;
}
.tg-hint b { color: #5d4308; }
.tg-hint-sub { display: block; margin-top: 4px; color: #8a6a1a; font-size: 12px; }
.tg-token {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbff;
}
.tg-token-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--txt-2); }
.tg-token-l b { font-size: 13px; color: #2a3040; letter-spacing: .3px; }
.tg-token-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tg-token-r .input { width: 320px; }
.tg-switches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tg-sw {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff;
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
}
.tg-sw.on { border-color: #c9bdf7; background: #f8f6ff; }
.tg-sw.off { opacity: .6; }
.tg-sw-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tg-sw-t b { font-size: 12.5px; font-weight: 600; color: #2a3040; }
.tg-sw-t i { font-style: normal; font-size: 11px; color: var(--txt-3); }
.tg-form { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; }
.tg-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.tg-kk {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; cursor: pointer; background: #fff;
}
.tg-kk.on { border-color: #b9a8f5; background: #f4f1ff; color: #4b32b8; }
.tg-tbl td .sub-line, .tg-log td .sub-line { font-size: 11.5px; color: var(--txt-3); }

/* ---- 第 3 组 B：爆破恢复三级选择 ---- */
.rec-casc { display: grid; grid-template-columns: 1fr 1.25fr 1.35fr; gap: 12px; }
.rc-step { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rc-step > label { font-size: 12px; color: var(--txt-2); display: flex; align-items: center; gap: 6px; }
.rc-n {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  border-radius: 50%; background: #efeafd; color: #5a3fd0; font-size: 10.5px; font-style: normal; font-weight: 700;
}
.rc-kw { height: 30px; font-size: 12px; }
.rec-picked { margin: 12px 0 2px; }
.rec-pick { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.rec-pick b { color: #2a3040; }
.rec-pick .muted { color: var(--txt-3); }

/* ---- 第 7 组：上传分组 ---- */
.upl-groups { display: flex; flex-direction: column; }
.upl-group { border-bottom: 1px solid var(--line-2); }
.upl-group:last-child { border-bottom: 0; }
.upl-group-h {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 18px;
  background: #fbfbfe; border: 0; cursor: pointer; font-size: 13px; color: #2a3040; text-align: left;
}
.upl-group-h:hover { background: #f5f4fd; }
.upl-group-h .caret { color: #9aa1b2; font-size: 11px; width: 12px; }
.upl-group-h b { font-weight: 600; }
.upl-group-h .muted { font-size: 11.5px; color: var(--txt-3); }
.upl-group-h .badge {
  min-width: 26px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: #eef0f7; color: #4a5163; text-align: center;
}
.upl-group-h .badge.purple { background: #f0eafe; color: #5a3fd0; }
.upl-group-h .badge.info { background: #e6f2fd; color: #1c6fb5; }
.upl-group-h .badge.ok { background: #e7f7ee; color: #1c7a4a; }
.upl-group-h .badge.warn { background: #fdf2e3; color: #96631a; }
.upl-group-b { background: #fff; }
.upl-album { padding: 14px 18px; font-size: 12.5px; color: var(--txt-2); display: flex; align-items: center; gap: 10px; }
table.tbl tbody tr.row-missing td { color: #9aa1b2; background: #fbfbfc; }
table.tbl tbody tr.row-missing:hover td { background: #f6f6f8; }
table.tbl tbody tr.row-missing .tag.err { background: #fdecec; color: #c0392b; }
.err-text { color: #c0392b; }

/* ---- 第 6 组：口令掩码 / 揭示 / 分词 ---- */
table.tbl tbody tr.row-revealed td { background: #fffdf3; }
.secret-inline { font-size: 12px; line-height: 1.5; word-break: break-all; white-space: normal; max-width: 300px; }
.secret-inline .si-foot { font-size: 11px; color: #96631a; margin-top: 2px; }
.secret-plain.is-mn { font-size: 12.5px; letter-spacing: .4px; }
.words-wrap { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.words-block { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wb-h { padding: 7px 12px; background: #f7f6ff; font-size: 11.5px; color: #5a3fd0; font-weight: 600; }
.words-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px 12px; }
.word {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; cursor: pointer; font-size: 12.5px; color: #2a3040; text-align: left;
}
.word:hover { border-color: #b9a8f5; background: #f8f6ff; }
.word .wn { font-style: normal; font-size: 10.5px; color: #9aa1b2; min-width: 16px; }
.word span { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; }
.word .wc { color: #c3c8d4; display: inline-flex; }
.word:hover .wc { color: #5a3fd0; }

@media (max-width: 1200px) {
  .tg-switches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-form { grid-template-columns: 1fr; }
  .rec-casc { grid-template-columns: 1fr; }
  .words-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============================ 规则 B（2026-11-23）：待审批徽标 / 无权限页 / 403 条 ============================ */
.nav-item .nb {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #e8452f; color: #fff; font-style: normal; font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center; letter-spacing: 0;
}
.nav-item .nb.big {
  margin-left: 8px; min-width: 0; height: 20px; padding: 0 8px; border-radius: 10px;
  line-height: 20px; font-size: 11.5px; vertical-align: middle;
}
.side.collapsed .nav-item .nb { display: none; }

.deny-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 26px 28px; border: 1px dashed #e6c3bb; border-radius: 14px; background: #fffaf8;
}
.deny-ico { color: #d8381f; display: inline-flex; }
.deny-t { font-size: 16px; font-weight: 700; color: #2b2f3a; }
.deny-s { font-size: 13px; color: #5b6274; line-height: 1.6; }
.deny-s .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.deny-meta { margin-top: 6px; font-size: 11.5px; color: #9aa1b2; }
.errbar { border-left-color: #e8452f; }
