/* 何美合云调试 · 云端控制服务 管理后台
   视觉延续 App：单一品牌蓝 #0060FF + 浅色光感，不引入第二主色 */

:root {
  --brand: #0060ff;
  --brand-deep: #0043b8;
  --brand-soft: #eaf2ff;
  --brand-line: #cfe0ff;

  --bg: #f4f7fc;
  --bg-top: #fbfdff;
  --card: #ffffff;
  --line: #e6edf7;
  --line-strong: #d5e0ef;

  --text: #0f1b30;
  --text-sub: #4a5a73;
  --text-weak: #8695ab;
  --text-faint: #adbad0;

  --ok: #12a864;
  --ok-soft: #e6f8ef;
  --warn: #f08a13;
  --warn-soft: #fef3e4;
  --danger: #e5484d;
  --danger-soft: #fdecec;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 40, 80, .04), 0 8px 24px -12px rgba(16, 40, 80, .12);
  --shadow-lg: 0 2px 8px rgba(16, 40, 80, .06), 0 24px 60px -24px rgba(16, 40, 80, .22);

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* hidden 属性必须压过组件自己的 display。
   .shell / .login-wrap 都声明了 display:grid，作者样式优先级高于 UA 的
   [hidden]{display:none}，不写这条的话两个视图会同时显示、上下堆叠。 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a { color: var(--brand); text-decoration: none; }

/* ---------------- 登录 ---------------- */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 15% -10%, #dcebff 0%, rgba(220, 235, 255, 0) 60%),
    radial-gradient(900px 500px at 100% 110%, #e8f1ff 0%, rgba(232, 241, 255, 0) 55%),
    var(--bg-top);
}

.login-card {
  width: 100%;
  max-width: 388px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px 32px 30px;
  box-shadow: var(--shadow-lg);
  animation: rise .38s cubic-bezier(.22, .9, .28, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.login-brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(150deg, #3d86ff, var(--brand) 55%, var(--brand-deep));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.4px;
  box-shadow: 0 6px 16px -6px rgba(0, 96, 255, .7);
}

.login-brand .name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.2px;
}

.login-brand .sub {
  font-size: 12px;
  color: var(--text-weak);
  margin-top: -1px;
}

.login-card h1 {
  font-size: 21px;
  margin: 0 0 4px;
  letter-spacing: -.4px;
}

.login-card .hint {
  font-size: 13px;
  color: var(--text-weak);
  margin: 0 0 22px;
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-sub);
  margin-bottom: 7px;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--bg-top);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.field input:focus,
.field select:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(0, 96, 255, .12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-weight: 550;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s, border-color .15s;
  white-space: nowrap;
}

.btn:hover { background: #0056e6; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn.block { width: 100%; height: 46px; border-radius: 12px; font-size: 14.5px; }
.btn.block:hover { box-shadow: 0 8px 22px -10px rgba(0, 96, 255, .8); }

.btn.ghost {
  background: #fff;
  color: var(--text-sub);
  border-color: var(--line-strong);
}
.btn.ghost:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }

.btn.soft {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-line);
}
.btn.soft:hover { background: #dceaff; }

.btn.danger {
  background: #fff;
  color: var(--danger);
  border-color: #f6d0d1;
}
.btn.danger:hover { background: var(--danger-soft); }

.btn.sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.alert.show { display: block; }
.alert.err { background: var(--danger-soft); color: #b3261e; border: 1px solid #f6d0d1; }
.alert.warn { background: var(--warn-soft); color: #8a5300; border: 1px solid #f8e0bd; }
.alert.ok { background: var(--ok-soft); color: #0a6b41; border: 1px solid #c9ebd9; }

.login-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
}

/* ---------------- 应用外壳 ---------------- */

.shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.side {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-head {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-head .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(150deg, #3d86ff, var(--brand) 55%, var(--brand-deep));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 5px 14px -6px rgba(0, 96, 255, .75);
  flex: none;
}

.side-head .name { font-size: 14px; font-weight: 650; letter-spacing: -.2px; }
.side-head .sub { font-size: 11px; color: var(--text-faint); letter-spacing: .2px; }

/* min-height:0 是必须的：flex 子项默认 min-height:auto，内容一超出就顶着
   「不收缩」，把底部用户卡盖住。日志页展开二级菜单后就正好踩到这个坑。 */
.nav { padding: 2px 10px; flex: 1; overflow-y: auto; min-height: 0; }

.nav-group {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: .6px;
  padding: 10px 10px 4px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--text-sub);
  cursor: pointer;
  /* 二级比一级小一号、轻一档 —— 层级靠这个拉开，不靠缩进硬撑 */
  font-size: 12.5px;
  font-weight: 500;
  transition: background .14s, color .14s;
  margin-bottom: 0;
}

.nav-item svg { width: 14px; height: 14px; flex: none; opacity: .62; }
.nav-item:hover { background: #f5f8fe; color: var(--text); }
.nav-item.on {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
.nav-item.on svg { opacity: 1; }

.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 20px;
  padding: 0 7px;
  height: 18px;
  line-height: 17px;
}

.side-foot {
  border-top: 1px solid var(--line);
  padding: 10px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.user-row:hover { background: #f5f8fe; }

.avatar {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  font-weight: 650; font-size: 12.5px;
  flex: none;
}

.user-row .u-name { font-size: 13px; font-weight: 550; line-height: 1.3; }
.user-row .u-meta { font-size: 11px; color: var(--text-faint); line-height: 1.3; }

/* ---------------- 主区 ---------------- */

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

.topbar {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h2 {
  font-size: 16.5px;
  margin: 0;
  letter-spacing: -.3px;
  font-weight: 650;
}

.topbar .crumb {
  font-size: 12.5px;
  color: var(--text-faint);
}

.topbar .spacer { flex: 1; }

.topbar .stamp {
  font-size: 12px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.content { padding: 22px 26px 60px; }

/* ---------------- 卡片与统计 ---------------- */

.grid { display: grid; gap: 14px; }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1180px) {
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { display: flex; overflow-x: auto; padding: 6px 10px 10px; }
  .nav-group { display: none; }
  .nav-item { flex: none; }
  .grid.c4, .grid.c3, .grid.c2 { grid-template-columns: 1fr; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.2px;
}

.card-head .desc { font-size: 12px; color: var(--text-faint); }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 10px 18px 16px; }

.stat {
  padding: 17px 18px 15px;
  position: relative;
  overflow: hidden;
}

.stat .label {
  font-size: 12.5px;
  color: var(--text-weak);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat .value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.stat .value small {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0;
  margin-left: 4px;
}

.stat .foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat .ico {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--brand-soft);
  display: grid; place-items: center;
  color: var(--brand);
}
.stat .ico svg { width: 16px; height: 16px; }

.stat.hl {
  background: linear-gradient(152deg, #f7fbff, #fff 62%);
  border-color: var(--brand-line);
}

/* ---------------- 表格 ---------------- */

.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }

/* 家庭多的时候（线上 60+）整页会被拉得很长，批量条被顶到屏幕外。
   这里给个固定高度的滚动区，表头吸顶，批量按钮就一直在视线里。 */
.table-wrap.scroll {
  max-height: 540px;
  overflow: auto;
}
.table-wrap.scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
  box-shadow: inset 0 -1px 0 var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  /* fixed + th 上写死的 width：列宽就是设计稿上的宽度，
     不会被某一格长内容撑开，也不会出现表头表体两套算法。 */
  table-layout: fixed;
}

/* 固定布局下没有指定 width 的列会自动均分剩余，这里让长文本自己省略 */
tbody td { overflow: hidden; text-overflow: ellipsis; }

thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-weak);
  letter-spacing: .3px;
  padding: 10px 14px;
  background: #fafcff;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  /* 不要给 th 加 position:sticky。表格外层是 overflow-x:auto，
     sticky 会让表头脱离列宽计算，造成表头与内容列整体错位。 */
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f2f6fc;
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafcff; }

td.num { font-variant-numeric: tabular-nums; }
td.mono, .mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.2px; }
.nowrap { white-space: nowrap; }

.code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border: 1px solid #dbe9ff;
  border-radius: 6px;
  padding: 1px 7px;
  letter-spacing: -.2px;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 550;
  border-radius: 20px;
  padding: 1px 9px;
  height: 21px;
  white-space: nowrap;
}

.tag.ok { background: var(--ok-soft); color: #0a7a4b; }
.tag.off { background: #f1f4f9; color: var(--text-weak); }
.tag.warn { background: var(--warn-soft); color: #8a5300; }
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.tag.plain { background: #f4f7fc; color: var(--text-sub); }

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}
.dot.off { background: var(--text-faint); }

.cell-sub { font-size: 11.5px; color: var(--text-faint); line-height: 1.35; }

/* 账号体系身份条 —— 公有 / 私享两页共用一套版式，只换左侧色标与徽章。
   公有 = 中性蓝灰（被动同步、只读），私享 = 品牌蓝（云控自建、可操作）。
   这块不是为了好看：两页表格长得像，没有它就看不出是两套账号、两个来源。 */
.acct-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 14px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.acct-hero::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.acct-hero.pub::before { background: linear-gradient(180deg, #9db2cd, #cbd8e7); }
.acct-hero.priv::before { background: linear-gradient(180deg, #0060ff, #5a9bff); }

.acct-hero .ah-badge {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
}
.acct-hero.pub .ah-badge {
  background: #f0f4fa;
  border: 1px solid #dde7f4;
  color: #4a6b93;
}
.acct-hero.priv .ah-badge {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand);
}

.acct-hero .ah-body { flex: 1; min-width: 0; }
.acct-hero .ah-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.acct-hero .ah-title .code { font-size: 11.5px; font-weight: 500; }
.acct-hero .ah-desc {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-sub);
}

.acct-hero .ah-jump {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease;
}
.acct-hero .ah-jump:hover { background: var(--brand-soft); }

@media (max-width: 860px) {
  .acct-hero { flex-wrap: wrap; }
  .acct-hero .ah-jump { width: 100%; padding-left: 0; }
}

.ellip {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 工具条 ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

/* 密码页「全部家庭」上方的批量操作条：浅底压一层，和下面的表格分开 */
.toolbar.batch {
  padding: 10px 18px;
  background: var(--brand-soft);
  border-bottom: 1px solid var(--brand-line);
  gap: 8px;
}
.toolbar.batch b { color: var(--brand-deep); font-weight: 600; }
.toolbar.batch .btn { background: #fff; }

.search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 33px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 96, 255, .1);
}

.search svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-faint);
  pointer-events: none;
}

select.sel {
  height: 36px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238695ab' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  outline: none;
  cursor: pointer;
}
select.sel:focus { border-color: var(--brand); }

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-weak);
}
.pager .spacer { flex: 1; }

/* ---------------- 空态 / 骨架 ---------------- */

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-faint);
}
.empty svg { width: 34px; height: 34px; opacity: .5; margin-bottom: 8px; }
.empty .t { font-size: 13.5px; color: var(--text-sub); font-weight: 550; }
.empty .d { font-size: 12.5px; margin-top: 3px; }

.loading {
  padding: 40px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--brand-line);
  border-top-color: var(--brand);
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
  margin-right: 7px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 弹窗 ---------------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 26, 48, .42);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
  animation: fadein .16s ease both;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop .2s cubic-bezier(.22, .9, .3, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  padding: 19px 22px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.modal-head-txt { flex: 1; min-width: 0; }
.modal-head h3 { margin: 0; font-size: 16px; letter-spacing: -.3px; }
.modal-head .d { font-size: 12.5px; color: var(--text-weak); margin-top: 3px; }

/* 关闭按钮：每个弹窗都有，位置固定右上角，不靠「点外面」这种猜的交互。
   动效分三层：进场弹一下 → 悬停蓝色光斑散开 + 图标微歪 → 按下回弹压缩。
   ✕ 是 90° 对称图形，纯旋转肉眼看不出来，所以用「歪 9° + 放大」代替旋转。 */
.modal-x {
  position: relative; flex: none;
  width: 30px; height: 30px; margin: -3px -6px 0 0;
  display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 9px; cursor: pointer;
  /* 常态用 text-weak 而不是 text-faint：#adbad0 在 1x 屏上几乎看不见，
     而「看不见的 ✕」等于「没有 ✕」，上一轮用户抱怨的就是这个 */
  color: var(--text-weak, #8695ab); font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: color .16s ease, border-color .16s ease,
              box-shadow .2s ease, transform .16s cubic-bezier(.34, 1.56, .64, 1);
  /* backwards：只借「起点状态」做延迟，播完就交还给普通样式，
     否则 animation 的 forwards 会永久压住 :active 的 transform */
  animation: modal-x-in .34s cubic-bezier(.22, .9, .3, 1) .05s backwards;
}
/* 光斑从中心散开，比直接换底色更像「按下去会发光」 */
.modal-x::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  background: radial-gradient(115% 115% at 50% 38%, #f4f8ff 0%, var(--brand-soft) 52%, #dfeaff 100%);
  opacity: 0; transform: scale(.7); pointer-events: none;
  transition: opacity .16s ease, transform .26s cubic-bezier(.34, 1.56, .64, 1);
}
.modal-x svg { position: relative; z-index: 1; transition: transform .24s cubic-bezier(.34, 1.56, .64, 1); }
.modal-x:hover {
  color: var(--brand-deep); border-color: var(--brand-line);
  box-shadow: 0 3px 10px -6px rgba(0, 96, 255, .65);
}
.modal-x:hover::before,
.modal-x:focus-visible::before { opacity: 1; transform: scale(1); }
.modal-x:hover svg { transform: rotate(-9deg) scale(1.12); }
.modal-x:active {
  transform: scale(.9); box-shadow: none;
  color: var(--brand-deep); border-color: var(--brand-line);
  transition-duration: .07s;
}
.modal-x:active::before { opacity: 1; transform: scale(.94); background: #dfeaff; transition-duration: .07s; }
.modal-x:active svg { transform: rotate(6deg) scale(.9); transition-duration: .07s; }
/* 键盘走 Tab 到它时也得看得见，不然「有 ✕」对键盘用户等于没有 */
.modal-x:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 96, 255, .16); }

@keyframes modal-x-in {
  from { opacity: 0; transform: scale(.5) rotate(-40deg); }
  to { opacity: 1; transform: none; }
}

/* 改过内容后点遮罩：不关，抖一下告诉用户「还在」 */
@keyframes modal-nudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
  88% { transform: translateX(2px); }
}
.modal.nudge { animation: modal-nudge .34s cubic-bezier(.36, .07, .19, .97) both; }

.modal-body { padding: 18px 22px 8px; }
.modal-foot {
  padding: 14px 22px 20px;
  display: flex;
  gap: 9px;
  justify-content: flex-end;
}

/* 密码格：数字输入，等宽排布 */
.pin-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 6px 0 14px;
}

.pin-box {
  width: 46px; height: 52px;
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  background: #fbfdff;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}

.pin-box.filled { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-deep); }
.pin-box.focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 96, 255, .13); background: #fff; }

.code-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fbfdff;
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 8px;
  text-align: center;
  outline: none;
}
.code-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 96, 255, .12);
  background: #fff;
}

.modal-note {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.55;
  margin-top: 10px;
  display: flex;
  gap: 6px;
}
.modal-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

/* ---------------- Toast ---------------- */

.toasts {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  align-items: center;
}

.toast {
  background: #17233a;
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  animation: toastin .22s ease both;
  max-width: 420px;
}
.toast.ok { background: #0d7a4c; }
.toast.err { background: #b3261e; }
@keyframes toastin {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 其他小件 ---------------- */

.kv { display: grid; grid-template-columns: 132px 1fr; gap: 9px 14px; font-size: 13px; }
.kv .k { color: var(--text-weak); }
.kv .v { color: var(--text); }

.sec-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f2f6fc;
}
.sec-line:last-child { border-bottom: none; }
.sec-line .t { font-size: 13.5px; font-weight: 600; }
.sec-line .d { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.sec-line .spacer { flex: 1; }

.pw-view {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 5px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border: 1px dashed var(--brand-line);
  border-radius: 9px;
  padding: 6px 12px;
  min-width: 92px;
  text-align: center;
}
.pw-view.masked { letter-spacing: 4px; color: var(--text-faint); }

/* 表格行里的紧凑版：同一颗密码芯片，缩到一行放得下 */
.pw-view.compact {
  min-width: 0;
  padding: 4px 9px;
  font-size: 15px;
  letter-spacing: 3px;
}

.audit-row {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f2f6fc;
  font-size: 13px;
  align-items: baseline;
}
.audit-row:last-child { border-bottom: none; }
.audit-row .at { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); width: 128px; flex: none; }
.audit-row .who { width: 84px; flex: none; color: var(--text-sub); font-weight: 550; }
.audit-row .act { flex: none; }

.api-block {
  background: #0e1a2e;
  color: #d7e3f7;
  border-radius: 11px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}
.api-block .c { color: #6d8ab5; }
.api-block .m { color: #7fd1a0; font-weight: 600; }
.api-block .p { color: #8ab8ff; }
.api-block .s { color: #f3c97a; }

.hr { height: 1px; background: var(--line); margin: 18px 0; }

.muted { color: var(--text-weak); }
.faint { color: var(--text-faint); }
.small { font-size: 12.5px; }
.row-between { display: flex; align-items: center; gap: 10px; }
.row-between .spacer { flex: 1; }

/* ---------------- 补充件 ---------------- */

.ico-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #f1f5fc;
  color: var(--text-weak);
  display: grid;
  place-items: center;
  flex: none;
}
.ico-badge.brand { background: var(--brand-soft); color: var(--brand); }

/* 密码格：真正的输入框透明覆盖在格子上，点哪都能唤起输入 */
.pin-wrap { position: relative; }

.pin-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  outline: none;
  cursor: text;
}

input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
  vertical-align: -2px;
}

/* 「是否启用校验」开关：表格行里放得下，又能一眼看出当前状态 */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 11.5px;
  color: var(--text-weak);
  white-space: nowrap;
}
.switch input {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: #d7dfeb;
  position: relative;
  margin: 0;
  cursor: pointer;
  transition: background .16s ease;
  flex: 0 0 auto;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .2);
  transition: transform .16s ease;
}
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(14px); }
.switch input:disabled { opacity: .5; cursor: progress; }

/* 家庭列表的访问密码格：标签在上、开关在下 */
.sec-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

code.mono {
  background: #f4f7fc;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  font-size: 12px;
  color: var(--brand-deep);
}

/* 概览页密码行：描述只占一行，长文案换行会把行高压乱 */
.sec-txt { min-width: 0; }
.sec-txt .d {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* 一行「标签 …… 数值 / 总数」的轻量统计 */
.stat-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 0 0;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.stat-line b { font-size: 13px; font-weight: 650; color: var(--text); }

/* 云控功能锁：逐项一行，左侧名称+说明，右侧开关/三态选择 */
.lock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.lock-row:last-child { border-bottom: 0; }
.lock-txt { min-width: 0; flex: 1; }
.lock-name {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.lock-row .small.muted { line-height: 1.5; }
.lock-sel { width: 118px; flex: 0 0 118px; }
.lock-row .switch { flex: 0 0 auto; }

/* 锁分组：功能锁 / 工程模式参数锁 */
.lock-group + .lock-group { margin-top: 2px; padding-top: 4px; }
.lock-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 2px;
}
.lock-group-title {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: .2px;
}
.lock-group-head .spacer { flex: 1; }
.lock-group-note { margin: 0 0 4px; line-height: 1.55; }

/* 后台实时刷新：收到 App 上报后自动更新，绿色呼吸点表示通道正常 */
.live-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-sub);
  white-space: nowrap;
  vertical-align: middle;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 7px;
  background: var(--text-faint);
}
.live-dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
  animation: live-pulse 2.2s ease-in-out infinite;
}
.live-dot.off { background: var(--danger); }
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--ok-soft); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* 灯态快照：家庭分组行 */
tr.snap-group td {
  background: var(--bg-top);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 12px;
  color: var(--text-sub);
}
tr.snap-group:first-child td { border-top: 0; }
tr.snap-group td > * { vertical-align: middle; }

/* ---------------- 家庭 × 设备对照（独立页） ---------------- */

/* 家庭页上的跳转入口：摘走大表后只留一张窄卡，不占首屏 */
.dir-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
}
.dir-entry .ico-badge { flex: 0 0 auto; width: 38px; height: 38px; }
.dir-entry-txt { min-width: 0; flex: 1; }
.dir-entry-txt .t {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 3px;
}
.dir-entry-txt .d {
  font-size: 12.5px;
  color: var(--text-weak);
  line-height: 1.5;
}
.dir-entry .btn { flex: 0 0 auto; }

/* 第二行筛选条：比主工具条浅一档，和表格拉开层次 */
.toolbar.dir-filters {
  background: var(--bg-top);
  padding-top: 10px;
  padding-bottom: 10px;
}
.toolbar.dir-filters .sel { max-width: 220px; }

/* 表格里可点的编号 / 标签：默认保持原型，hover 才提示可跳转 */
.dir-link { cursor: pointer; }
.code.dir-link:hover,
.tag.brand.dir-link:hover { border-color: var(--brand); filter: brightness(.97); }
.mono.dir-link:hover,
span.dir-link:hover .tag { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 860px) {
  .dir-entry { flex-wrap: wrap; }
  .dir-entry .btn { width: 100%; }
  .toolbar.dir-filters .sel { max-width: none; flex: 1 1 160px; }
}

/* ---------------- 热力图：状态灯 / 传感器有无人 ---------------- */

.heat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: stretch;
}
.heat-map-card, .heat-side { display: flex; flex-direction: column; min-width: 0; }

.heat-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; row-gap: 4px; }
.heat-lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-sub);
  white-space: nowrap;
}
.heat-lg i {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.heat-lg i.hollow {
  background: #fff !important;
  border: 1.5px dashed var(--line-strong);
}

.heat-canvas {
  position: relative;
  padding: 6px 10px 2px;
  background: radial-gradient(ellipse at 42% 38%, #fbfdff 0%, #f6faff 62%, #f2f7ff 100%);
  border-bottom: 1px solid var(--line);
}
.heat-main-svg { display: block; width: 100%; height: auto; }
.heat-main-svg.zoomed { cursor: grab; touch-action: none; }
.heat-main-svg.zoomed.grabbing { cursor: grabbing; }

/* 缩放控件：右上角悬浮，避开右下角的南海诸岛附图 */
.heat-zoom {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 14px -6px rgba(16, 40, 80, .26);
  backdrop-filter: blur(6px);
}
.hz-btn {
  width: 26px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.hz-btn:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); }
.hz-btn:disabled { opacity: .34; cursor: default; }
.hz-btn.hz-reset { margin-top: 1px; border-top: 1px solid var(--line); border-radius: 0; }
.hz-btn.hz-fs { border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.hz-val {
  font-size: 10px;
  line-height: 14px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* 地图全屏：只放大画布，标题 / 筛选 / 右侧明细仍留在页面上 */
.heat-canvas:fullscreen,
.heat-canvas:-webkit-full-screen {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 42% 38%, #fbfdff 0%, #f6faff 62%, #f2f7ff 100%);
  border-bottom: none;
  overflow: hidden;
}
.heat-canvas:fullscreen .heat-main-svg,
.heat-canvas:-webkit-full-screen .heat-main-svg {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  flex: none;
}
.heat-canvas:fullscreen .heat-zoom,
.heat-canvas:-webkit-full-screen .heat-zoom { top: 16px; right: 20px; }
.heat-canvas:fullscreen .heat-south,
.heat-canvas:-webkit-full-screen .heat-south {
  right: 24px;
  bottom: 26px;
  min-width: 150px;
  max-width: 236px;
}
.heat-canvas:fullscreen .heat-map-note,
.heat-canvas:-webkit-full-screen .heat-map-note {
  position: absolute;
  left: 22px;
  bottom: 20px;
  max-width: 42%;
  padding: 0;
}
.hm-land path {
  fill: #e4eeff;
  stroke: #b7cff5;
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.hm-dash path {
  fill: none;
  stroke: #7ea8e6;
  stroke-width: 2.2;
  stroke-dasharray: 7 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
#hm-dots-m circle, #hm-dots-s circle { transition: stroke-width .18s ease, r .18s ease; }
#hm-dots-m [data-heat-mac]:hover, #hm-dots-s [data-heat-mac]:hover { stroke-width: 5; }

/* ---------------- 在线星点闪烁 ----------------
   有人 / 开：三颗亮星错相位连闪（两次短闪 + 一段静默，像星光抖动）；
   无人 / 关：单颗微光缓慢明灭，看得出在线但不抢有人的注意力；
   「无人 → 有人」那一次切换：额外一圈向外扩散的爆闪，1.15s × 2 次后自动消失。
   星点尺寸在 JS 里已按缩放倍数归一，所以 20% 和 800% 下屏显一样大；
   全屏只是画布变大，动画照旧。只动 opacity（爆闪再动 r），不触发布局回流。 */
.hm-spk {
  animation-name: hm-twinkle;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  pointer-events: none;
}
.hm-spk-soft { animation-name: hm-breathe; }

@keyframes hm-twinkle {
  0%   { opacity: 0; }
  7%   { opacity: var(--pk, .95); }
  19%  { opacity: 0; }
  33%  { opacity: calc(var(--pk, .95) * .62); }
  44%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes hm-breathe {
  0%, 100% { opacity: .1; }
  50%      { opacity: var(--pk, .55); }
}

.hm-burst {
  animation: hm-burst 1.15s cubic-bezier(.22, .8, .3, 1) 2 both;
  pointer-events: none;
}
@keyframes hm-burst {
  0%   { r: var(--r0); stroke-width: var(--w0); opacity: .92; }
  55%  { opacity: .42; }
  100% { r: var(--r1); stroke-width: .25px; opacity: 0; }
}

/* 图例里的星点示意：跟真实点位同一套节奏 */
.heat-lg i.spk {
  background: #37527A;
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  animation: hm-legend 2.4s ease-in-out infinite;
}
@keyframes hm-legend {
  0%, 100% { opacity: .26; }
  45%      { opacity: 1; }
}

/* 系统开了「减少动态效果」就不闪：星点改成常亮的小点缀，仍然能看出在线 */
@media (prefers-reduced-motion: reduce) {
  .hm-spk, .hm-burst, .heat-lg i.spk { animation: none !important; }
  .hm-spk { opacity: .62; }
  .hm-burst { opacity: 0; }
  .heat-lg i.spk { opacity: .82; }
  /* 关闭按钮只留「变蓝」的静态反馈，不做缩放/回弹 */
  .modal-x, .modal-x::before, .modal-x svg { animation: none !important; transition: none !important; }
  .modal-x:active { transform: none; }
  .modal-x:hover svg, .modal-x:active svg { transform: none; }
}

/* 南海诸岛附图：国家标准地图惯例，右下角单独框，九段线只在这里出现 */
.heat-south {
  position: absolute;
  right: 14px;
  bottom: 24px;
  width: 20%;
  min-width: 108px;
  max-width: 168px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px -4px rgba(16, 40, 80, .18);
  overflow: hidden;
}
.heat-south svg { display: block; width: 100%; height: auto; }
.heat-south .hm-land path { fill: #dbe9ff; stroke: #9dbce9; stroke-width: 1; }
.heat-south-label {
  position: absolute;
  top: 3px; left: 6px;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: .4px;
  pointer-events: none;
}
.heat-map-note {
  padding: 2px 4px 6px;
  font-size: 11px;
  color: var(--text-weak);
}
.heat-map-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
}

.heat-list.scroll { flex: 1; max-height: 566px; overflow: auto; }
.heat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-bottom: 1px solid #f2f6fc;
  cursor: pointer;
}
.heat-item:last-child { border-bottom: none; }
.heat-item:hover { background: #fafcff; }
.heat-item.focus { background: var(--brand-soft); }
.heat-item-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 3px rgba(15, 27, 48, .06);
}
.heat-item-main { min-width: 0; flex: 1; }
.heat-item-main .t {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.heat-item-main .d { font-size: 11px; color: var(--text-faint); }
.heat-item-state { flex: none; text-align: right; }

@media (max-width: 1180px) {
  .heat-layout { grid-template-columns: 1fr; }
  .heat-list.scroll { max-height: 320px; }
  .heat-south { width: 18%; }
}

/* ---------------- MeoW 推送 ---------------- */

/* 多行输入：与 .field input 共用边框与聚焦光圈，避免多出一个视觉体系 */
.field textarea {
  width: 100%;
  min-height: 112px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--bg-top);
  outline: none;
  resize: vertical;
  line-height: 1.65;
  font-size: 13.5px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(0, 96, 255, .12);
}

/* 手机通知预览：让人在点发送之前，先看见这条通知落到手机上是什么样 */
.meow-pv {
  margin: 2px 0 14px;
  padding: 12px 13px 10px;
  border-radius: 16px;
  background: linear-gradient(158deg, #edf4ff 0%, #f7faff 52%, #ffffff 100%);
  border: 1px solid var(--brand-line);
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px -16px rgba(16, 40, 80, .5);
}
.meow-pv-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.meow-pv-app {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--brand);
  text-transform: uppercase;
}
.meow-pv-now { margin-left: auto; font-size: 10.5px; color: var(--text-faint); }
.meow-pv-row { display: flex; gap: 10px; align-items: flex-start; }
.meow-pv-ico {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--brand-line);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.meow-pv-ico img { width: 100%; height: 100%; object-fit: cover; }
.meow-pv-main { min-width: 0; flex: 1; }
.meow-pv-title {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meow-pv-msg {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.meow-pv-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.meow-pv-cat {
  font-size: 10.5px;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 6px;
  padding: 1px 6px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meow-pv-type {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-faint);
  font-family: var(--mono);
}

/* ---------------- 操作日志：侧栏二级 + 分类页签 + 检索条 ---------------- */

/* 二级菜单：只在停在这一组时展开。7 个子项竖排会把侧栏顶出一屏，
   所以压成两列 —— 4 行就能放完，不用滚也能看全。 */
.nav-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 3px 0 3px 11px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.nav-child {
  height: 26px;
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-weak);
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-child:hover { background: #f5f8fe; color: var(--text); }
.nav-child.on {
  background: transparent;
  color: var(--brand);
  font-weight: 650;
}
.nav-child-all { grid-column: 1 / -1; color: var(--text-faint); }

/* 分类页签：横向可滑，计数用全量，不跟着筛选变 */
.audit-tabs {
  display: flex;
  gap: 6px;
  padding: 0 18px 13px;
  overflow-x: auto;
  scrollbar-width: none;
}
.audit-tabs::-webkit-scrollbar { display: none; }
.audit-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 31px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-sub);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s;
}
.audit-tab svg { opacity: .68; }
.audit-tab:hover { border-color: var(--brand-line); color: var(--text); }
.audit-tab.on {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
  font-weight: 600;
}
.audit-tab b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-faint);
  background: #f2f6fc;
  border-radius: 20px;
  padding: 1px 6px;
}
.audit-tab.on b { color: var(--brand); background: #fff; }

/* 检索条：时间范围 / 关键词 / 操作人 / 动作，一行放不下就换行 */
.audit-filter {
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
}
.au-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.au-range { width: 114px; flex: none; }
/* 自定义时间单独占一行：和搜索框、两个下拉挤在一行会把「重置」顶到下一行去 */
.au-row-time { margin-top: 8px; }
.au-row-time[hidden] { display: none; }
.au-dt {
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-top);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.au-dt:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 96, 255, .11);
}
.au-search {
  flex: 1;
  min-width: 208px;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-top);
  color: var(--text-faint);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.au-search:focus-within {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 96, 255, .11);
}
.au-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
}
.au-actor { width: 152px; flex: none; }
.au-act { width: 182px; flex: none; }

/* 筛选摘要：让人一眼确认「我看的是哪一段」 */
.au-sum {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 11px;
  font-size: 12px;
}
.au-count { color: var(--text-sub); }
.au-count b { color: var(--text); font-family: var(--mono); font-size: 13px; }
.au-chip {
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-line);
  font-size: 11.5px;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 日志行：这里要精确到秒，时间列比概览里的「最近操作」宽一档 */
.audit-row.audit-line .at { width: 150px; }
.audit-row.audit-line .who { width: 94px; }
/* 注意特异性：IP 列本身也带 .at，必须比上面那条更具体才不被写成 150 */
.audit-row.audit-line .au-ip { width: 110px; text-align: right; }
.audit-row .au-target {
  margin-left: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}

@media (max-width: 1180px) {
  .audit-row.audit-line .au-ip { display: none; }
  .au-actor, .au-act { width: 144px; }
}

/* ---------------- 设备日志（传感器状态变化） ---------------- */

/* 这张卡直接以筛选 chips 开头，没有 card-head，得自己补上内边距 */
.card > .audit-tabs:first-child { padding-top: 14px; }

/* 状态筛选 chips：比操作日志的类别页签矮一档，点哪态就只看哪态 */
.ev-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 29px;
  padding: 0 11px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-sub);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s;
}
.ev-chip:hover { border-color: var(--brand-line); color: var(--text); }
.ev-chip.on {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
  font-weight: 600;
}
.ev-chip b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-faint);
  background: #f2f6fc;
  border-radius: 20px;
  padding: 1px 6px;
}
.ev-chip.on b { color: var(--brand); background: #fff; }
.ev-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
}
.ev-chip.ev-moving .dot { background: #15803d; }
.ev-chip.ev-still .dot { background: #b45309; }
.ev-chip.ev-none .dot { background: #6b7280; }

/* 三态标签：与 App 侧同一套语义色（移动绿 / 静止琥珀 / 无人灰） */
.tag.ev-moving { background: #dcfce7; color: #15803d; }
.tag.ev-still { background: #fef3c7; color: #b45309; }
.tag.ev-none { background: #f1f4f9; color: #4b5563; }
.tag.ev-unknown { background: #f4f7fc; color: var(--text-faint); }
/* 参数上报不是「状态」，用紫色系把两类事件分开，扫一眼就知道这条是配置快照 */
.tag.ev-params { background: #ede9fe; color: #6d28d9; }
.ev-chip.ev-params .dot { background: #7c3aed; }

/* 探测设置开关动作：品牌蓝，和「参数上报」的紫色拉开——一个是用它、一个是它的配置 */
.tag.ev-probe-on { background: #e7effd; color: var(--brand); }
.tag.ev-probe-off { background: #f1f4f9; color: #4b5563; }
.ev-chip.ev-probe .dot { background: var(--brand); }
.ev-chip.dim { opacity: .55; }
tr.ev-probe-row > td:first-child { box-shadow: inset 2px 0 0 var(--brand); }

/* 公有 / 私享两个身份：左标签定宽，两个号码才能对齐成一条竖线 */
.ev-acct { display: flex; align-items: baseline; gap: 5px; line-height: 1.55; }
.ev-acct .k {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--text-faint);
  background: #f2f6fc;
  border-radius: 4px;
  padding: 0 4px;
}
.ev-acct .v { font-size: 12px; color: var(--text); }
.ev-acct .v.miss { color: var(--text-faint); }
/* 设备副行（原名 + 编号）在窄列里会被硬切，给出省略号 */
.ev-table .cell-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
/* 探测设置页「最近参数」：2×2 排布，避免单行拼接在窄列里断在数值中间 */
.pb-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
}
.pb-p { display: flex; align-items: baseline; gap: 4px; font-size: 11.5px; white-space: nowrap; }
.pb-p .k { color: var(--text-faint); }
.pb-p .v { font-family: var(--mono); font-weight: 600; color: var(--text); }
.ev-probe-note {
  flex: 1 0 100%;
  font-size: 11.5px;
  color: var(--brand);
  padding-bottom: 2px;
}

/* 参数详情行：挂在「参数上报」那条下面，整行铺开六组配置 */
.ev-params-row > td {
  padding: 0 12px 12px;
  border-top: 0;
  background: #fbfcff;
}
.ev-params-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 20px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.ev-param {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.ev-param .k { color: var(--text-faint); }
/* 灵敏度九档标出档位序号，否则九个数字看不出哪个是 g0 */
.ev-param .k em {
  font-style: normal;
  font-size: 10px;
  margin-left: 4px;
  opacity: .68;
}
.ev-param .v {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text);
}
.ev-param .v.miss { color: var(--text-faint); font-weight: 400; }

/* 灵敏度 9 档：逐档小方块，超出门限的压暗（与 App 灵敏度图同一套读法） */
.ev-sens { display: inline-flex; align-items: center; gap: 3px; }
.ev-sens i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  min-width: 21px;
  padding: 1px 3px;
  text-align: center;
  border-radius: 5px;
  background: #f2f6fc;
  color: var(--text-sub);
}
.ev-sens i.over { opacity: .42; }
.ev-sens i.miss { background: transparent; color: var(--text-faint); }

/* 列宽之和超过容器时让表格横向滚动，而不是把「设备 / 原名 / 编号」压成三行 */
.ev-table { min-width: 1136px; }

#ev-rows .cell-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
/* 家庭列例外：历史家庭要折行才看得全，截断就没意义了 */
#ev-rows td.ev-homes .cell-sub { white-space: normal; overflow: visible; }


/* ---------------- 私享账号 · 昵称 ---------------- */
/* 整格可点：点一下就能看最近 5 次改过什么、也能直接改。
   按钮做成透明块而不是 .btn，是为了不让它跟右边的操作按钮抢注意力。 */
.nick-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  margin-left: -6px;
  padding: 3px 6px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nick-cell:hover { background: var(--brand-soft); }
/* 子行不折行：11.5px 的「用户改 · 2 天前」只差几个像素就会掉一个字到第二行，
   看起来像排版事故。宁可省略也不留孤字。 */
.nick-cell .cell-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nick-val {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.nick-val.faint { font-weight: 400; color: var(--text-faint); }
.nick-cell:hover .nick-val { color: var(--brand); }

/* 昵称历史：最新一条在最上面并高亮，竖排点线串起来 */
.nick-hist {
  margin-top: 2px;
  border-top: 1px solid var(--line);
}
.nick-hist-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.nick-hist-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.nick-hist-row .dot {
  width: 8px;
  height: 8px;
  margin: 5px 0 0 2px;
  border-radius: 50%;
  background: var(--line-strong);
}
.nick-hist-row.now .dot {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.nick-hist-row .v {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  line-height: 1.35;
}
.nick-hist-row.now .v { color: var(--brand); }
.nick-hist-row .at {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  padding-top: 2px;
}

/* 页首说明条：解释「这页改的东西什么时候生效」，比一串灰色小字好读 */
.info-strip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: #17427f;
  font-size: 12.8px;
  line-height: 1.62;
}
.info-strip svg { flex: none; margin-top: 2px; color: var(--brand); }
.info-strip b { color: var(--brand-deep); }
.info-strip .mono { font-size: 12px; background: #fff; border-radius: 4px; padding: 0 4px; }

/* ---------------- App 菜单顺序预览 ---------------- */
.mm-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.mm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.5;
  border: 1px solid var(--line-strong);
  background: #f7fafd;
  color: var(--text-sub);
}
.mm-chip i {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  background: #e9eef7;
  color: var(--text-weak);
}
/* 云端下发的项用品牌色，和「内置」区分开 */
.mm-chip.is-cloud {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 550;
}
.mm-chip.is-cloud i { background: var(--brand); color: #fff; }

/* 私享菜单表格：图标 + 标题/副标题两行 */
.tm-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tm-ico {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-line);
}
.tm-cell > div { min-width: 0; flex: 1; }

/* ---------------- 全量同步（公有模式登录后自动巡检） ---------------- */

/* 展开后的逐家庭明细：整行跨满，避免和上面 8 列的列宽打架 */
tr.sw-detail td {
  background: var(--bg-top);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 14px 10px;
}
tr.sw-detail:last-child td { border-bottom: 0; }
.sw-hint {
  font-size: 11.5px;
  color: var(--text-faint);
  padding: 3px 2px 7px;
}
.sw-hrow {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 130px minmax(220px, 2fr) 138px 78px;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 6px;
}
.sw-hrow:last-child { margin-bottom: 0; }
.sw-hname { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sw-hname b {
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-hnum { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.sw-htags { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.sw-htime { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.sw-hflag { text-align: right; }

/* 展开中的会话行给一点底色，跟下面的明细连成一块 */
tr.sw-row.open td { background: #f8fbff; }

/* 失败标签：现有 tag 只有 ok/warn/brand/plain/off，红的得单独给 */
.tag.err { background: #fee2e2; color: #b91c1c; }

/* ---- 公有账号密码台账：列表里的入口 + 弹窗里的密码行 ----
   入口做成整格可点，是因为这一列表头是「登录密码」而不是「操作」，
   用户的第一反应是点那个「未登记」标签，不是去找右侧的按钮。 */
.pw-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin-left: -6px;
  padding: 3px 6px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pw-cell:hover { background: var(--brand-soft); }
.pw-cell .tag { align-self: flex-start; }
.pw-cell .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pw-row { display: flex; align-items: center; gap: 8px; }
.pw-row input { flex: 1; min-width: 0; }
.pw-value {
  flex: 1;
  min-width: 0;
  height: 44px;
  line-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #f8fbff;
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: .06em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 打码态拉开字距，让人一眼看出「这里有个 6 位的值」，而不是当成占位符 */
.pw-value.masked { letter-spacing: .24em; color: var(--text-sub); }

/* ===== 人员活动：监测任务卡 + 能量曲线 + 九波段 ===== */
.pl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pl-head-actions { display: flex; gap: 8px; }

.pl-mon { border-color: var(--brand-line, var(--line-strong)); }
.pl-mon-head { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint, #9aa3b2); flex: none; }
.pl-dot.on { background: var(--ok, #14a36b); box-shadow: 0 0 0 3px rgba(20,163,107,.16); }
.pl-dot.off { background: var(--text-faint, #9aa3b2); }
.pl-bar { height: 6px; border-radius: 99px; background: var(--line, #e8eef7); overflow: hidden; margin: 12px 0 10px; }
.pl-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.pl-mon-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--text-sub); }
.pl-mon-meta b { color: var(--text); font-weight: 600; }
.pl-devs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pl-dev {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 1px solid var(--line-strong); border-radius: 99px; font-size: 12px; color: var(--text-sub);
}
.pl-dev .dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; }
.pl-dev.ok .dot { background: #14a36b; }
.pl-dev.warn .dot { background: #f0a020; }
.pl-dev em { font-style: normal; color: var(--text-faint, #8a94a6); }

.pl-table th, .pl-table td { vertical-align: middle; }
.pl-row.is-out td:first-child { box-shadow: inset 3px 0 0 #f0a020; }
.pl-row.is-in td:first-child { box-shadow: inset 3px 0 0 var(--brand, #0060ff); }
.tag.pl-in { background: rgba(0,96,255,.10); color: #0052d9; }
.tag.pl-out { background: rgba(240,160,32,.14); color: #a86a00; }

.pl-detail > td { background: #f8fbff; border-top: 1px dashed var(--line-strong); padding: 16px 18px 18px; }
.pl-detail-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }
.pl-sec-title { font-size: 12px; color: var(--text-faint, #8a94a6); margin-bottom: 7px; }

.pl-spark { width: 100%; height: 132px; display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.pl-grid { stroke: #eef2f8; stroke-width: 1; }
.pl-axis { font-size: 9px; fill: #9aa3b2; font-family: var(--mono); }
.pl-t0 { stroke: #94a3b8; stroke-width: 1; stroke-dasharray: 4 3; }
.pl-line-move { fill: none; stroke: #0060ff; stroke-width: 1.8; }
.pl-line-still { fill: none; stroke: #12b5a5; stroke-width: 1.6; }
.pl-area-move { fill: rgba(0,96,255,.10); stroke: none; }
.pl-area-still { fill: rgba(18,181,165,.10); stroke: none; }
.pl-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-sub); margin-top: 7px; }
.pl-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: 3px; }
.pl-legend .lg-move { background: #0060ff; }
.pl-legend .lg-still { background: #12b5a5; }

.pl-dist { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.pl-nodata { padding: 22px; text-align: center; font-size: 12.5px; color: var(--text-faint, #8a94a6); background: #fff; border: 1px dashed var(--line-strong); border-radius: 10px; }

.pl-bands { width: 100%; border-collapse: separate; border-spacing: 3px; font-family: var(--mono); font-size: 11.5px; }
.pl-bands th { color: var(--text-faint, #8a94a6); font-weight: 500; text-align: center; font-family: var(--font, inherit); }
.pl-bands tbody th { text-align: left; white-space: nowrap; padding-right: 6px; color: var(--text-sub); }
.pl-bands td { text-align: center; padding: 5px 0; background: #fff; border-radius: 6px; border: 1px solid var(--line); color: var(--text); }
.pl-bands td.hot { background: rgba(0,96,255,.10); border-color: rgba(0,96,255,.35); color: #0043b8; font-weight: 700; }

.pl-pres { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-pres-i { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; }
.pl-pres-i.on { background: rgba(0,96,255,.10); color: #0052d9; }
.pl-pres-i.off { background: #f1f5f9; color: #64748b; }

/* 多路监测：一个家庭一张卡，纵向排开 */
.pl-mons { display: flex; flex-direction: column; gap: 12px; }

/* 翻转推送开关：和数据卡区分开，用浅灰底把「设置」和「数据」两种东西分开 */
.pl-nf { margin-top: 12px; }
.pl-nf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-nf-head b { font-size: 14px; }
.pl-nf-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 12px;
  background: #f7f9fc; border: 1px solid var(--border); border-radius: 10px;
}
.pl-nf-to { font-size: 12px; color: var(--text-sub); }
.pl-nf-warn {
  margin-top: 10px; padding: 8px 12px; border-radius: 8px;
  background: var(--warn-soft); color: #8a5300; font-size: 12px; line-height: 1.7;
}

/* ============ 监测任务 ============ */
.mt-agent .card-body { padding: 14px 16px; }
.mt-agent-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-agent-row b { font-size: 14.5px; }

/* 通用小胶囊（筛选项 / 时长快捷 / 昵称多选） */
.chip {
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text-sub);
  font-size: 12.5px; line-height: 1; cursor: pointer; transition: .14s;
}
.chip:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.chip.on {
  background: var(--brand-soft); border-color: var(--brand-line);
  color: var(--brand); font-weight: 600;
}

.mt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }

.mt-list { display: flex; flex-direction: column; gap: 12px; }
/* 正在跑的那条给一圈蓝边：一屏里有三五条任务时，得一眼看出哪条是活的 */
.mt-task.live { border-color: var(--brand-line); box-shadow: 0 0 0 1px var(--brand-line), 0 12px 28px -20px rgba(0, 96, 255, .5); }
.mt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-head b { font-size: 15px; color: var(--text); }
.mt-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-sub); margin-top: 8px; }
.mt-meta b { color: var(--text); font-weight: 600; }
.mt-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line);
}
.mt-foot-k { font-size: 12px; color: var(--text-weak); }
.mt-acts { display: flex; gap: 7px; flex-wrap: wrap; }
.danger-ghost:hover { border-color: #f3c2c4; color: var(--danger); background: var(--danger-soft); }

/* 目标选择器 */
.mt-pickbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mt-picked { font-size: 12.5px; color: var(--text-weak); }
.mt-picked.on { color: var(--brand); font-weight: 600; }
.mt-tree {
  max-height: 258px; overflow: auto; padding: 6px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fbfcfe;
}
.mt-acc { padding: 4px 0; }
.mt-acc + .mt-acc { border-top: 1px dashed var(--line); }
.mt-line { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 13px; }
.mt-line input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); flex: none; }
.mt-kids { margin: 2px 0 6px 22px; padding-left: 10px; border-left: 1px solid var(--line); }
.mt-sub { font-size: 11.5px; color: var(--text-faint); margin: 7px 0 2px; letter-spacing: .04em; }
.mt-room, .mt-dev { cursor: pointer; border-radius: 6px; }
.mt-room:hover, .mt-dev:hover { background: #eef3fb; }

/* 时间计划 */
.mt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.mt-lbl { width: 44px; font-size: 12.5px; color: var(--text-sub); flex: none; }
.rd { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.rd input { accent-color: var(--brand); }
.mt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-bad { color: var(--danger); font-weight: 600; }
.mt-notchips { display: flex; gap: 14px; flex-wrap: wrap; }
.mt-nicks { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-keyrow { display: flex; gap: 8px; align-items: center; }
.mt-keyrow .input { flex: 1; }

/* 空状态与代码块 */
.empty { text-align: center; padding: 34px 10px; }
.empty-t { font-size: 15px; font-weight: 600; color: var(--text); }
.empty-d {
  font-size: 12.5px; color: var(--text-sub); margin: 6px auto 14px;
  max-width: 430px; line-height: 1.65;
}
.code-block {
  background: #f4f7fc; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-top: 8px; overflow: auto;
  font: 12px/1.65 ui-monospace, Menlo, Consolas, monospace; color: #334;
}
/* 「+N」这类纯计数胶囊，别跟在线状态抢颜色 */
.pl-dev.plain { background: #f2f5fa; color: var(--text-weak); }

/* 监测任务弹窗：默认 430px 宽塞不下目标树，单独放宽一档 */
.modal.modal-wide { max-width: 820px; }
.modal.modal-wide .modal-body {
  max-height: calc(100vh - 214px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* 260px：展开一户（采集账号 + 房间 + 设备）刚好放得下，又不至于把弹窗推到需要滚动 */
.modal.modal-wide .mt-tree { max-height: 260px; }
/* 搜索态放宽到 320px：刚好放下「一户 + 房间 + 两台设备」 */
.modal.modal-wide .mt-tree.is-filtered { max-height: 320px; }
/* 宽弹窗内容天然偏高，正文是可滚动的。给底部按钮区一条分隔 + 实底，
   滚动截断处才读得出「下面还有」，而不是像渲染断了。 */
.modal.modal-wide .modal-foot {
  border-top: 1px solid var(--line, #e8eef7);
  background: #fff;
  border-radius: 0 0 var(--radius, 16px) var(--radius, 16px);
}

/* .field input 是 width:100%，落到一行多控的 .mt-row 里会把同行控件全挤到下一行。
   这里按「按需收缩」重置，让单选、输入框、胶囊能真正并排。 */
.mt-row > .input { width: auto; flex: 0 1 240px; min-width: 0; }
.mt-row > .input#mt-mail { flex: 1 1 320px; }
.mt-row > .input#mt-min { flex: 0 0 92px; }
.rd { white-space: nowrap; flex: none; }
.rd input[type="radio"] { width: 14px; height: 14px; margin: 0; flex: none; }
.mt-picked { white-space: nowrap; }
.mt-nicks .chip { white-space: nowrap; }
/* 目标树靠滚动条提示还有内容：不用 mask 渐隐，否则短内容（只有两行）时
   最后一行会被无缘无故淡掉，反而像没渲染完。 */
.mt-tree { scrollbar-width: thin; }
.mt-tree::-webkit-scrollbar { width: 8px; }
.mt-tree::-webkit-scrollbar-thumb { background: #d5dded; border-radius: 8px; }
.mt-tree::-webkit-scrollbar-thumb:hover { background: #c2cee2; }

/* ---------------- 监测历史 ---------------- */
.mh-bar .card-body { padding: 14px 16px; }
.mh-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 34px; }
.mh-row + .mh-row { margin-top: 9px; }
.mh-lbl { width: 40px; flex: none; text-align: right; font-size: 12.5px; color: var(--text-faint, #8a94a6); }
.mh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mh-custom { display: inline-flex; align-items: center; gap: 6px; }
.mh-custom[hidden] { display: none; }
/* 三个下拉并排会挤成一列：显式给基础宽度，别让 .input 的 width:100% 生效 */
.mh-sel { width: auto; flex: 1 1 160px; min-width: 130px; max-width: 250px; }
.mh-q { flex: 1 1 300px; max-width: 520px; }

.mh-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line, #e8eef7); margin-bottom: 12px; }
.mh-tab {
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 8px 12px 9px; font-size: 13.5px; color: var(--text-sub, #5b6678); font-family: inherit;
}
.mh-tab:hover { color: var(--text, #111); }
.mh-tab.on { color: var(--brand, #0060ff); border-bottom-color: var(--brand, #0060ff); font-weight: 600; }
.mh-tab em { font-style: normal; font-size: 11px; color: var(--text-faint, #8a94a6); margin-left: 3px; }

.mh-task .mt-head { align-items: center; }
.mh-none { text-align: center; padding: 26px 10px; color: var(--text-faint, #8a94a6); font-size: 12.5px; }

.mh-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 4px; }
.mh-kv > div {
  background: #f7f9fc; border: 1px solid var(--line, #e8eef7);
  border-radius: 10px; padding: 8px 12px;
}
.mh-kv span { display: block; font-size: 11.5px; color: var(--text-faint, #8a94a6); margin-bottom: 2px; }
.mh-kv b { font-size: 14.5px; font-weight: 600; }

.mh-sec { margin-top: 15px; }
.mh-sec-h { font-size: 12.5px; font-weight: 600; color: var(--text-sub, #5b6678); margin-bottom: 7px; }
.mh-sec-b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* 详情里的表：时间和数字不许折行（折了就读不出是哪一天），
   家庭/房间这类长文本允许换行，别为了「一行显示」把整张表撑出横向滚动。 */
.mh-detail .pl-table { min-width: 600px; }
.mh-detail .pl-table th { white-space: nowrap; }
.mh-detail .pl-table .mono { white-space: nowrap; }

/* 目标树的两种找法：公有账号 / 私享账号。同一份已选，切换只是换入口 */
.mt-src {
  display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 8px;
  background: #f1f5fb; border: 1px solid var(--line, #e8eef7); border-radius: 10px;
}
.mt-src-btn {
  border: 0; background: none; cursor: pointer; font-family: inherit;
  font-size: 12.5px; line-height: 1.2; color: var(--text-sub, #5b6678);
  padding: 5px 12px; border-radius: 8px;
}
.mt-src-btn em { font-style: normal; font-size: 11px; margin-left: 4px; color: var(--text-faint, #8a94a6); }
.mt-src-btn:hover { color: var(--text, #111); }
.mt-src-btn.on {
  background: #fff; color: var(--brand, #0060ff); font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 40, 80, .1);
}
.mt-src-btn.on em { color: var(--brand, #0060ff); opacity: .65; }

/* 树被裁时给一句明确的「还有内容」：做成贴在树底部的渐隐条，
   把被切半的行盖住，比让它硬生生卡在边框上干净。 */
.mt-tree-wrap { position: relative; }
.mt-more {
  position: absolute; left: 1px; right: 1px; bottom: 1px;
  padding: 16px 0 6px; text-align: center; pointer-events: none;
  font-size: 11.5px; color: var(--text-faint, #8a94a6);
  background: linear-gradient(to bottom, rgba(251, 252, 254, 0), #fbfcfe 58%);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.mt-more[hidden] { display: none; }

/* 搜索命中提示：让人一眼看出「搜到几户、几台」，以及搜索不改变提交范围 */
.mt-hit {
  margin: -2px 0 8px; padding: 6px 10px;
  font-size: 12px; line-height: 1.5; color: var(--text-sub, #5b6678);
  background: #f2f7ff; border: 1px solid #dbe8ff; border-radius: 8px;
}
.mt-hit[hidden] { display: none; }

/* 云信：标题前那枚「置顶」小标。比常规 tag 矮一档，
   否则夹在 13px 粗标题行里会把行高顶起来 */
.tag.sm-tag {
  height: 17px;
  padding: 0 6px;
  font-size: 10.5px;
  vertical-align: 1px;
}

/* 云信的标题行：置顶 / 草稿小标与标题同一行，标题过长时省略而不是把标签挤走 */
.cm-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cm-title > b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 云信「消息」列的正文摘要：铺满这一格再省略。
   通用 .ellip 有 240px 上限，用在这里会在右边留一大块空白 */
.cm-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 云信：消息 / 私信 分段 ---------------- */

/* 分段控件：和 App 里的胶囊切换同一种手感 —— 浅底槽 + 白色滑块，靠阴影分层，
   不用描边（描边会把「当前选中」和「可点击」混成同一档视觉权重） */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #eef3fb;
  border-radius: 11px;
}
.seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .18s ease;
}
.seg button:hover { color: var(--text); }
.seg button.on {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 1px 2px rgba(16, 40, 80, .07), 0 4px 12px -6px rgba(16, 40, 80, .26);
}
.seg-badge {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* 未读数挂在白底滑块上，红色要压一点亮度，否则在 #fff 上发飘 */
.seg button.on .seg-badge { background: var(--danger); box-shadow: 0 2px 6px -3px rgba(229, 72, 77, .9); }

/* 私信正文：最多 4 行，点一下展开。
   500 字的信摊在表格里会把整页拉成一屏一条，但也不该截断到看不见内容 */
.ib-body {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  color: var(--text-sub);
  cursor: pointer;
}
.ib-body.open {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* 收件人一展开，云信弹窗就比 800 高的屏还高一截：让弹窗整体封顶、正文区自己滚，
   底部「取消 / 发布」永远留在视线里 */
.modal.modal-tall {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}
.modal.modal-tall .modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal.modal-tall .modal-foot { flex: none; }

/* ---------------- 云信弹窗：收件人 ---------------- */

.field .rcp-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.rcp-count {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-weak);
}
.rcp-count b {
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.rcp-count .warn-txt { color: var(--warn); }

/* 两态选择：卡片自带说明文字，比一个「全体 / 指定」的下拉更难选错 */
.rcp-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rcp-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .18s ease;
}
.rcp-opt:hover:not([disabled]) { border-color: var(--brand-line); background: #fafcff; }
.rcp-opt[disabled] { cursor: not-allowed; opacity: .55; }
.rcp-opt.on {
  border-color: var(--brand);
  background: #f7fbff;
  box-shadow: 0 0 0 3px rgba(0, 96, 255, .09);
}
.rcp-opt .dot {
  position: relative;
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border: 1.6px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  transition: border-color .16s ease, background .16s ease;
}
.rcp-opt.on .dot { border-color: var(--brand); background: var(--brand); }
.rcp-opt.on .dot::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}
.rcp-opt b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.rcp-opt.on b { color: var(--brand-deep); }
.rcp-opt em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-weak);
}

/* 回信：收件人被锁成来信人，用虚线框明示「不可改」，别让它看起来像坏掉的输入框 */
.rcp-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px dashed var(--brand-line);
  border-radius: 12px;
  background: #f7fbff;
}
.rcp-lock .ic {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.rcp-lock b { display: block; font-size: 12.5px; }
.rcp-lock em {
  display: block;
  margin-top: 1px;
  font-style: normal;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-weak);
}

.rcp-panel {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  overflow: hidden;
}
.rcp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  max-height: 92px;
  overflow-y: auto;
}
.rcp-chips[hidden] { display: none; }
.rcp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 6px 0 9px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 11.5px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rcp-chip.orphan {
  border-color: #f6cfd0;
  background: var(--danger-soft);
  color: var(--danger);
}
.rcp-chip button {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  opacity: .55;
  cursor: pointer;
  transition: opacity .14s ease, background .14s ease;
}
.rcp-chip button:hover { opacity: 1; background: rgba(255, 255, 255, .7); }

.rcp-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.rcp-bar input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-top);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.rcp-bar input[type="search"]:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 96, 255, .12);
}
.rcp-link {
  flex: none;
  height: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  transition: background .14s ease;
}
.rcp-link:hover { background: var(--brand-soft); }

.rcp-list {
  max-height: 150px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
}
.rcp-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .13s ease;
}
.rcp-item:hover { background: #f1f6ff; }
.rcp-item.on { background: var(--brand-soft); }
.rcp-item input[type="checkbox"] {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--brand);
  pointer-events: none;
}
.rcp-item .nm {
  flex: none;
  max-width: 38%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}
.rcp-item.on .nm { color: var(--brand-deep); }
.rcp-item .mt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--text-weak);
  font-variant-numeric: tabular-nums;
}
.rcp-empty {
  padding: 20px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--text-weak);
}

/* 私享账号列表里的「密码显示」：默认打码，点开才显示明文 */
.pwd-line { display: flex; align-items: center; gap: 6px; }
.pwd-toggle {
  color: var(--brand);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  white-space: nowrap;
}
.pwd-toggle:hover { color: var(--brand-deep); }
.pwd-plain {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.2px;
  user-select: all;
}

/* 云信列表里的「回的是哪封私信」副行：比正文更淡一档，图标跟着缩到 11px */
.cm-quote {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-weak);
  font-style: normal;
}
.cm-quote svg { flex: 0 0 auto; opacity: .75; }

/* 回信弹窗顶部的原文引用块。左侧蓝条 + 浅蓝底是引文的通用写法，
   不靠标题里的「回复：」前缀去猜 —— 标题是管理员随时能改的。 */
.cq-box {
  border-left: 3px solid var(--brand);
  background: #f2f7fe;
  border-radius: 0 10px 10px 0;
  padding: 9px 12px 10px;
  margin: 0 0 14px;
}
.cq-head {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
}
.cq-head svg { flex: 0 0 auto; }
.cq-meta {
  margin-left: auto;
  color: var(--text-weak);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.cq-body {
  margin-top: 5px;
  color: var(--text-sub);
  font-size: 12.5px;
  line-height: 1.55;
  /* 原文可能有换行，但引用块最多三行 —— 弹窗里正文才是主角 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------- 超级指令：搜索结果条目 ---------------- */
/* 别套 .btn —— .btn 是固定 38px 高的，两行内容（家庭房间设备 + 编号 MAC）
   塞进去必然上下贴死。这里让高度由内容自己撑开。 */
.sc-hit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-top);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sc-hit:hover {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 96, 255, .09);
}
.sc-hit-main {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.sc-hit-name { font-weight: 600; }
.sc-hit-sub {
  font: 11.5px/1.5 ui-monospace, Menlo, Consolas, monospace;
  color: var(--text-sub);
  letter-spacing: .2px;
}

/* 搜索框放大版：列表页只要 36px，页面主搜索用这个尺寸才撑得住 */
.search.wide { max-width: none; min-width: 0; }
.search.lg input {
  height: 46px;
  border-radius: 12px;
  font-size: 14px;
  padding: 0 14px 0 40px;
  background: var(--bg-top);
}
.search.lg input:focus { background: #fff; box-shadow: 0 0 0 3.5px rgba(0, 96, 255, .12); }
.search.lg svg { left: 14px; width: 16px; height: 16px; }

/* ---------------- 操作记录：时间线 ---------------- */
/* 多来源混排用表格会被窄容器挤烂（行高失控、动作列吃掉），改成一条一块 */
.op-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-top);
}
.op-when {
  flex: none;
  width: 118px;
  font: 12px/1.6 ui-monospace, Menlo, Consolas, monospace;
  color: var(--text-sub);
  white-space: nowrap;
}
.op-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.op-line1 {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 13px; line-height: 1.5; color: var(--text);
}
.op-line2 { font-size: 12.5px; line-height: 1.5; color: var(--text-sub); }
.op-line2 b { color: var(--text); }
.op-state { flex: none; }

/* 参数行：四列摆在一起必然挤，改成「名称 / 当前值 / 控件」三段自适应 */
.param-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-top);
}
.param-name { flex: 1; min-width: 0; }
.param-name .pn-entity {
  font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;
  color: var(--text-faint);
  overflow-wrap: anywhere;
}
.param-cur { flex: none; width: 78px; text-align: right; font-size: 13px; }
.param-ctl { flex: none; display: flex; gap: 6px; align-items: center; }
.param-ctl .input { width: 100px; height: 34px; padding: 0 8px; }

/* ---------------- 热力图：星点 ---------------- */
/* 远看像夜空里的星，鼠标靠近才放大 —— 一味把小圆点缩小会更糊，得换成带芒的形状 */
.hm-star {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .16s ease;
  cursor: pointer;
}
.hm-star:hover,
.hm-star.is-focus { transform: scale(2.7); }
.hm-star .hm-ray { animation: hmTwinkle 3.4s ease-in-out infinite; }
@keyframes hmTwinkle {
  0%, 100% { opacity: .45; }
  50% { opacity: .95; }
}

/* ---------------- 参数模板：九档灵敏度 ---------------- */
/* 一格一个档位：窄一点、高一点，像一排小旋钮，而不是九个扁长方块 */
.sens-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 54px));
  gap: 7px;
  justify-content: start;
}
.sens-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
}
/* 与 .field label / .field input 对齐：同一张表单里不该出现第二套输入框长相 */
.sens-g {
  font-size: 12px;
  font-weight: 550;
  line-height: 1.2;
  color: var(--text-sub);
  text-align: center;
}
.sens-input {
  width: 100%;
  height: 44px;
  padding: 0 4px;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--bg-top);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.sens-input:hover:not(:disabled) { border-color: var(--brand-line); }
.sens-input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(0, 96, 255, .12);
}
.sens-input:disabled {
  background: var(--bg-top);
  color: var(--text-faint);
  border-color: var(--line);
}

/* ---------------- 参数模板：形状预览（阶梯图 + 数值行） ---------------- */
.cb { border-top: 1px dashed var(--line); padding-top: 10px; }
.cb:first-child { border-top: none; padding-top: 0; }
.cb-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.cb-title { font-size: 13px; font-weight: 600; color: var(--text); }
.cb-note { font-size: 11.5px; color: var(--text-sub); }
.cb-off { font-size: 11px; color: var(--warn); }
.cb-vals {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0;
  margin: 2px 10px 0 34px;   /* 左右留白对齐 svg 绘图区（L=34 / RT=10） */
  border-top: 1px solid var(--line);
  padding-top: 5px;
}
.cb-v {
  text-align: center;
  font: 11.5px/1.4 ui-monospace, Menlo, Consolas, monospace;
  color: var(--text);
}
.cb-v.off { color: var(--text-faint); opacity: .55; }

/* ---------------- 参数模板：参数胶囊 ---------------- */
/* 四个基础参数压成一行胶囊：一行一个太占高度，四个就吃掉 270px */
/* 2×2 而不是自动换行：四个胶囊排成「3+1」时最后一个孤零零很难看 */
.pill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;   /* 标签靠左、值靠右，像一条设置项 */
  gap: 7px;
  height: 38px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  color: var(--text-sub);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pill:hover { border-color: var(--brand-line); }
.pill.on { border-color: var(--brand-line); background: #F7FAFF; color: var(--text); }
.pill input[type=checkbox] { width: 15px; height: 15px; margin: 0; flex: none; }
.pill-k { white-space: nowrap; }
.pill-in {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  width: 62px;
  text-align: right;
  padding: 0;
}
.pill-in:disabled { color: var(--text-faint); font-weight: 500; }
select.pill-in { width: 72px; text-align: left; cursor: pointer; }

/* ==========================================================================
   动效层（2026-11-16）
   --------------------------------------------------------------------------
   对齐鸿蒙的动效语义，但不追求「炫」：
   - curves.springMotion 那种轻微过冲，用在弹窗和卡片落位
   - 时间控制在 160–260ms：后台是干活的地方，动效得比手快
   - 全部可一键关闭：body[data-motion="off"]，或系统「减少动态效果」自动生效
   ========================================================================== */

:root {
  --ease-spring: cubic-bezier(.34, 1.32, .52, 1);   /* 轻微过冲，不是乱弹 */
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
}

/* 卡片不做位移（列表里一片卡片同时抖很廉价），只让阴影和描边跟上手 */
.card {
  transition: box-shadow .24s var(--ease-out), border-color .18s var(--ease-out);
}
.card:hover { box-shadow: 0 2px 14px -8px rgba(16, 40, 80, .4); }

/* 可点的条目才抬起：给出的信号是「这一条能点」 */
.sc-hit,
.op-row {
  transition: transform .2s var(--ease-spring), border-color .16s var(--ease-out),
              background .16s var(--ease-out), box-shadow .2s var(--ease-out);
}
.sc-hit:hover,
.op-row:hover { transform: translateY(-1.5px); }

/* 弹窗：弹性入场，比原来的 pop 更轻 */
@keyframes popSpring {
  0%   { transform: scale(.94) translateY(10px); opacity: 0; }
  62%  { transform: scale(1.008) translateY(-1px); opacity: 1; }
  100% { transform: scale(1) translateY(0); }
}
.modal { animation: popSpring .26s var(--ease-spring) both; }

/* 页面内容：上浮淡入，用弹簧收尾 */
@keyframes riseSpring {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

/* 按钮：按下有实在的反馈，不靠放大 */
.btn { transition: transform .12s var(--ease-out), background .16s, border-color .16s, color .16s; }
.btn:active { transform: scale(.975); }

/* 输入框聚焦时标签跟着亮一点点，眼睛能连上 */
.field label { transition: color .16s var(--ease-out); }
.field:focus-within label { color: var(--brand); }

/* 数值刷新：给一次轻微的「吸一口气」，而不是数字乱跳 */
@keyframes tickUp {
  0% { transform: translateY(0); opacity: 1; }
  35% { transform: translateY(-3px); opacity: .55; }
  100% { transform: translateY(0); opacity: 1; }
}
.num-tick { animation: tickUp .32s var(--ease-out) both; }

/* ---- 关闭开关 ---- */
/* 后台干活时嫌动效碍事：localStorage.motion = 'off' 后整个动效层失效 */
body[data-motion="off"] *,
body[data-motion="off"] *::before,
body[data-motion="off"] *::after {
  animation-duration: .001ms !important;
  animation-delay: 0s !important;
  transition-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------------- 参数模板：四种参数的控件 ---------------- */
/* 探测间距用点选按钮（只有两档，选哪个必须一眼看出），其余三个用滑块 + 数字框 */
.prow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-top);
  transition: border-color .16s var(--ease-out), background .16s var(--ease-out);
}
.prow.on { background: #F7FAFF; border-color: var(--brand-line); }
.prow-lab {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 152px;
  flex: none;
  font-size: 12.5px;
  color: var(--text-sub);
  cursor: pointer;
}
.prow.on .prow-lab { color: var(--text); }
.prow-lab input[type=checkbox] { width: 15px; height: 15px; margin: 0; flex: none; }
.prow-ctl { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }

/* 分段按钮：选中是品牌蓝实心，未选是白底描边 —— 不能只靠颜色深浅区分 */
.opt-group {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
.opt {
  border: none;
  background: transparent;
  padding: 0 15px;
  height: 30px;
  font-size: 12.5px;
  color: var(--text-sub);
  cursor: pointer;
  transition: background .14s var(--ease-out), color .14s var(--ease-out);
}
.opt + .opt { border-left: 1px solid var(--line-strong); }
.opt:hover:not(.on):not(:disabled) { background: var(--bg-top); }
.opt.on { background: var(--brand); color: #fff; font-weight: 600; }
.opt:disabled { color: var(--text-faint); cursor: default; }

/* 滑块：细轨 + 描边圆钮，和鸿蒙的 Slider 观感接近 */
.prow-range {
  flex: 1;
  min-width: 76px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--line-strong);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.prow-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  box-shadow: 0 1px 3px rgba(16, 40, 80, .25);
  transition: transform .12s var(--ease-out);
}
.prow-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.prow-range:disabled { cursor: default; }
.prow-range:disabled::-webkit-slider-thumb { border-color: var(--line-strong); box-shadow: none; }

.prow-num {
  width: 74px;
  height: 32px;
  padding: 0 6px;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.prow-num:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 96, 255, .12); }
.prow-num:disabled { background: #fff; color: var(--text-faint); }
.prow-unit { font-size: 11.5px; color: var(--text-faint); }

/* 直调页：灵敏度只读格子（比输入框矮一档，明确「不给改」） */
.sens-val {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-top);
  font: 12.5px/1 ui-monospace, Menlo, Consolas, monospace;
  color: var(--text);
}
.sens-val.over { opacity: .45; }          /* 超出门限：写了也不生效 */
.sens-val.empty { color: var(--text-faint); }

/* 直调页右卡变窄后的参数行：标签单行，控件不被挤出去 */
.param-row.tight { gap: 8px; }
.param-name.tight {
  width: 96px;
  flex: none;
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.param-row.tight .param-ctl { min-width: 0; }
.param-row.tight .param-ctl select,
.param-row.tight .param-ctl input { min-width: 0; }

/* ---------------- 侧栏：分组折叠 + 整体收起 ---------------- */
.nav-group {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 9px;
  margin: 3px 2px 1px;
  border-radius: 9px;
  cursor: pointer;
  user-select: none;
  /* 一级菜单才是「主目录」：字号、颜色、图标都要压过下面那些项 */
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--text);
  transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.nav-group:hover { background: var(--bg-top); }
/* 当前页所在的组整体点亮：一眼知道自己在哪一区 */
.nav-group.active { background: #EEF4FF; color: var(--brand); }
.nav-group.active .ng-icon { opacity: 1; }
.ng-icon {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-flex;
  align-items: center;
  color: var(--text-sub);
  opacity: .9;
}
.nav-group.active .ng-icon, .nav-group:hover .ng-icon { color: inherit; }
.ng-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group:hover { color: var(--text-sub); }
.nav-caret {
  display: inline-block;
  width: 12px;
  flex: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: currentColor;
  opacity: .55;
  transform: rotate(90deg);          /* 展开时朝下 */
  transition: transform .18s var(--ease-out), opacity .15s var(--ease-out);
}
.nav-group:hover .nav-caret { opacity: 1; }
.nav-group.closed .nav-caret { opacity: .45; }
.nav-group.closed .nav-caret { transform: rotate(0deg); }  /* 收起时朝右 */
.nav-items {
  overflow: hidden;
  margin-left: 17px;                 /* 与一级图标的中心对齐，看着像从属关系 */
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.nav-items.hidden { display: none; }

/* 收起 / 展开按钮 */
.side-collapse {
  margin-left: auto;
  width: 26px;
  height: 26px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.side-collapse:hover { color: var(--brand); border-color: var(--brand-line); background: #F7FAFF; }

.side-show {
  display: none;
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 45;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  color: var(--text-sub);
  cursor: pointer;
  box-shadow: 0 2px 10px -6px rgba(16, 40, 80, .5);
}
.side-show:hover { color: var(--brand); border-color: var(--brand-line); }

body.side-hidden .side { display: none; }
/* 关键：display:none 的元素不参与 grid 布局，此时 .main 会顶到第一列。
   所以这里必须是「单列」，不能写 `0 1fr` —— 那样 .main 会被塞进 0 宽那一格，
   整页挤成一条竖线（踩过）。 */
body.side-hidden .shell { grid-template-columns: 1fr; }
/* 浮出的展开按钮是 fixed 定位，会压在页面标题上 —— 给标题让出这段宽度 */
body.side-hidden .topbar { padding-left: 58px; }
body.side-hidden .side-show { display: inline-flex; }

/* 新版本提示条：一条就行，不弹窗不挡操作 */
#update-tip {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  background: #12243c;
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 6px 20px -8px rgba(10, 24, 44, .7);
}
#update-tip button {
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#update-tip button:hover { filter: brightness(1.08); }
