/* ==========================================================================
   智呼宝 · 管理后台样式
   配色沿用品牌绿 #0F9D6C；不用任何 UI 框架，避免加载慢与被墙
   ========================================================================== */

:root {
  --brand: #0F9D6C;
  --brand-dark: #0B7A54;
  --brand-light: #E8F7F1;
  --nav-bg: #0E211B;
  --nav-hover: #17352C;
  --nav-active: #1B4335;
  --text: #1F2A25;
  --text-2: #5C6B64;
  --text-3: #8A9891;
  --line: #E4EAE7;
  --bg: #F5F7F6;
  --white: #fff;
  --red: #E5484D;
  --amber: #D98324;
  --blue: #2D7FF9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 32, .06), 0 4px 16px rgba(16, 40, 32, .04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--brand); text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------------- 登录 ---------------- */
#login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #E9F7F1 0%, var(--bg) 55%);
  padding: 24px;
}
.login-box {
  width: 100%; max-width: 380px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(16, 60, 45, .1);
  padding: 36px 32px 30px;
}
.login-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 21px; font-weight: 700; letter-spacing: .5px;
  margin-bottom: 6px;
}
.login-logo i {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 17px; font-style: normal; font-weight: 700;
}
.login-sub { color: var(--text-3); font-size: 13px; margin-bottom: 26px; }

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12.5px; color: var(--text-2);
  margin-bottom: 6px; font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FBFCFC;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 157, 108, .1);
  background: #fff;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px;
  border-radius: 8px;
  background: var(--brand); color: #fff;
  font-weight: 500;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; height: 42px; }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--text-2); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #C93A3F; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn.link { background: none; color: var(--brand); padding: 0 4px; height: auto; }
.btn.link:hover { text-decoration: underline; background: none; }

.login-err {
  display: none;
  margin-top: 12px; padding: 9px 12px;
  background: #FEF1F1; color: var(--red);
  border-radius: 8px; font-size: 13px;
}
.login-err.show { display: block; }

/* ---------------- 主框架（两级导航：rail 图标 + subnav 子菜单） ---------------- */
#app { display: none; height: 100vh; }
#app.on { display: flex; }
#app.collapsed .subnav { display: none; }

.rail {
  width: 76px; flex-shrink: 0;
  background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 3px; overflow-y: auto;
}
/* 图标在上、分类名在下 —— 不需要悬停提示，一眼能对上 */
.rail-item {
  width: 66px; height: 54px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  border-radius: 11px; color: var(--text-3); cursor: pointer;
  position: relative; transition: background .13s, color .13s;
}
.rail-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.rail-label {
  font-size: 11px; line-height: 1.15; font-weight: 500;
  letter-spacing: .1px; white-space: nowrap;
}
.rail-item:hover { background: #F2F7F4; color: var(--brand); }
.rail-item.on { background: var(--brand-light); color: var(--brand); }
.rail-item.on .rail-label { font-weight: 600; }
.rail-item.on::before {
  content: ""; position: absolute; left: -5px; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.rail-brand {
  width: 36px; height: 36px; margin-bottom: 10px;
  border-radius: 10px;
  background: linear-gradient(150deg, #2EC48E, var(--brand));
  color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 16px; font-weight: 700;
  box-shadow: 0 4px 10px rgba(15, 157, 108, .24);
}
.rail-brand span { font-style: normal; }

.subnav {
  width: 198px; flex-shrink: 0;
  background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 0 10px;
}
.subnav-brand {
  height: 56px; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 6px; border-bottom: 1px solid var(--line);
  font-size: 15.5px; font-weight: 650; color: var(--text);
}
.subnav-brand .mark {
  width: 25px; height: 25px; border-radius: 8px;
  background: linear-gradient(150deg, #2EC48E, var(--brand));
  color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
#subnavInner { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.subnav-head {
  font-size: 13.5px; font-weight: 650; color: var(--text);
  letter-spacing: .3px; padding: 15px 10px 12px; flex-shrink: 0;
}
.subnav-list { flex: 1; overflow-y: auto; }
.subnav-group {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: .6px; padding: 12px 10px 5px;
}
.subnav-group:first-child { padding-top: 2px; }
.subnav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; margin-bottom: 2px;
  border-radius: 8px; color: var(--text-2); font-size: 13.5px;
  cursor: pointer; transition: background .13s, color .13s;
}
.subnav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }
.subnav-item:hover { background: #F2F7F4; color: var(--text); }
.subnav-item.on { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.subnav-item.on svg { opacity: 1; color: var(--brand); }
.subnav-foot {
  padding: 10px 12px; margin: 0 -10px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-3);
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 56px; flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.collapse-btn {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; color: var(--text-3);
}
.collapse-btn:hover { background: #F2F6F4; color: var(--text); }
.topbar h1 { font-size: 15.5px; font-weight: 600; }
.topbar .crumb { color: var(--text-3); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.topbar .pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border-radius: 20px; font-size: 12px;
  background: var(--brand-light); color: var(--brand-dark);
}
.topbar .pill.warn { background: #FEF6E7; color: #97631A; }

.topbar__search {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  width: 240px; max-width: 28vw;
  height: 34px; padding: 0 11px;
  background: #F4F7F6; border: 1px solid transparent;
  border-radius: 9px; color: var(--text-3);
  transition: border-color .15s, background .15s;
}
.topbar__search:focus-within { background: #fff; border-color: var(--brand); }
.topbar__search svg { width: 16px; height: 16px; flex-shrink: 0; }
.topbar__search input {
  border: none; outline: none; background: transparent;
  flex: 1; min-width: 0; font-size: 13px; color: var(--text);
}
.search-menu {
  position: absolute; top: 40px; left: 0; right: 0; z-index: 55;
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow);
  padding: 6px; display: none; max-height: 340px; overflow-y: auto;
}
.search-menu.on { display: block; }
.search-menu .si {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px;
}
.search-menu .si:hover { background: #F2F7F4; }
.search-menu .si .cat { margin-left: auto; font-size: 11px; color: var(--text-3); }
.search-menu .empty { padding: 10px; text-align: center; color: var(--text-3); font-size: 12.5px; }

.icon-btn {
  position: relative;
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; color: var(--text-2);
}
.icon-btn:hover { background: #F2F6F4; color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 8px;
  font-size: 10px; line-height: 15px; text-align: center;
}

.avatar-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 6px; border-radius: 22px;
  cursor: pointer; transition: background .13s;
}
.avatar-wrap:hover { background: #F2F6F4; }
.avatar-wrap .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.avatar-wrap .nm { font-size: 13px; line-height: 1.2; }
.avatar-wrap .rl { font-size: 11px; color: var(--text-3); }

.view { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }

/* ---------------- 卡片与统计 ---------------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 14px; font-weight: 600; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 16px;
}
.stat .k { font-size: 12.5px; color: var(--text-3); margin-bottom: 7px; }
.stat .v { font-size: 25px; font-weight: 650; letter-spacing: -.5px; line-height: 1.1; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
.stat .d { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.stat.accent { background: linear-gradient(135deg, var(--brand) 0%, #12B37C 100%); color: #fff; }
.stat.accent .k, .stat.accent .d { color: rgba(255, 255, 255, .78); }
.stat.accent .v { color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }

/* 简易柱状趋势 */
.trend { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.trend .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend .bar {
  width: 100%; max-width: 34px;
  background: linear-gradient(180deg, #35C08D, var(--brand));
  border-radius: 5px 5px 2px 2px;
  min-height: 3px;
  position: relative;
  transition: opacity .15s;
}
.trend .bar:hover { opacity: .8; }
.trend .bar span {
  position: absolute; top: -19px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-2); white-space: nowrap;
  opacity: 0; transition: opacity .15s;
}
.trend .bar:hover span { opacity: 1; }
.trend .lbl { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }

/* ---------------- 表格 ---------------- */
.tbl-scroll { overflow-x: auto; }
table.dt { font-size: 13px; }
table.dt th {
  text-align: left; font-weight: 500;
  color: var(--text-3); font-size: 12px;
  padding: 10px 12px;
  background: #FAFBFB;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.dt td {
  padding: 11px 12px;
  border-bottom: 1px solid #F0F4F2;
  vertical-align: middle;
}
table.dt tr:last-child td { border-bottom: none; }
table.dt tbody tr:hover { background: #FAFCFB; }
table.dt .num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; }
.empty {
  padding: 44px 20px; text-align: center;
  color: var(--text-3); font-size: 13px;
}

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 8px;
  border-radius: 5px; font-size: 11.5px;
  background: #F0F4F2; color: var(--text-2);
  white-space: nowrap;
}
.tag.green { background: var(--brand-light); color: var(--brand-dark); }
.tag.red { background: #FDECEC; color: #B93035; }
.tag.amber { background: #FEF6E7; color: #97631A; }
.tag.blue { background: #EAF2FE; color: #1B5FC4; }
.tag.gray { background: #F0F4F2; color: #7A8A81; }

/* 录音列可点击播放 */
.tag.rec-play {
  cursor: pointer; text-decoration: none; user-select: none;
  transition: filter .12s ease;
}
.tag.rec-play::before { content: "▶"; font-size: 8.5px; margin-right: 3px; line-height: 1; }
.tag.rec-play:hover { filter: brightness(.93); }
.tag.rec-play:active { filter: brightness(.86); }
.rec-len { font-size: 10.5px; opacity: .75; margin-left: 3px; }

/* ---------------- 组织树 ---------------- */
.tree { font-size: 13.5px; }
.tree-node { }
.tree-row {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 8px; border-radius: 7px;
}
.tree-row:hover { background: #F7FAF9; }
.tree-row .tw {
  width: 16px; height: 16px; flex-shrink: 0;
  display: grid; place-items: center;
  color: var(--text-3); font-size: 10px;
  cursor: pointer;
}
.tree-row .ic {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 11px;
  background: var(--brand-light); color: var(--brand-dark);
}
.tree-row .ic.g2 { background: #EAF2FE; color: #1B5FC4; }
.tree-row .nm { font-weight: 500; }
.tree-row .meta { color: var(--text-3); font-size: 12px; }
.tree-row .ops { margin-left: auto; display: flex; gap: 2px; opacity: .28; transition: opacity .13s; }
.tree-row:hover .ops { opacity: 1; }
.tree-children { margin-left: 20px; border-left: 1px dashed var(--line); padding-left: 6px; }
.tree-children.hide { display: none; }

/* ---------------- 筛选条 ---------------- */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #FCFDFD;
}
.filters .f { display: flex; flex-direction: column; gap: 5px; }
.filters .f label { font-size: 11.5px; color: var(--text-3); }
.filters .f input, .filters .f select {
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 7px;
  background: #fff; outline: none; min-width: 118px;
}
.filters .f input:focus, .filters .f select:focus { border-color: var(--brand); }
.filters .spacer { flex: 1; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 30, 24, .35);
  display: none;
  backdrop-filter: blur(1px);
}
.drawer-mask.on { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: 520px; max-width: 92vw;
  background: var(--white);
  box-shadow: -8px 0 40px rgba(16, 40, 32, .16);
  transform: translateX(100%);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 15px; font-weight: 600; }
.drawer-head .x {
  margin-left: auto; width: 30px; height: 30px;
  border-radius: 7px; display: grid; place-items: center;
  color: var(--text-3); font-size: 18px;
}
.drawer-head .x:hover { background: #F2F6F4; color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; }
.drawer-foot {
  padding: 12px 18px; border-top: 1px solid var(--line);
  display: flex; gap: 9px; justify-content: flex-end;
}

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 9px 12px; font-size: 13px; }
.kv .k { color: var(--text-3); }
.kv .v { color: var(--text); word-break: break-all; }

.section-title {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  margin: 20px 0 10px; padding-left: 8px;
  border-left: 3px solid var(--brand);
  line-height: 1.2;
}
.section-title:first-child { margin-top: 0; }

/* 音频播放器 */
.audio {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  background: #F7FAF9; border: 1px solid var(--line);
  border-radius: 9px;
}
.audio audio { flex: 1; height: 34px; }
.audio .no { color: var(--text-3); font-size: 12.5px; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15, 30, 24, .4);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-mask.on { display: flex; }
.modal {
  width: 100%; max-width: 440px;
  background: var(--white); border-radius: 13px;
  box-shadow: 0 20px 60px rgba(16, 40, 32, .22);
  max-height: 88vh; display: flex; flex-direction: column;
}
.modal.wide { max-width: 560px; }
.modal-head {
  padding: 16px 18px 12px;
  font-size: 15px; font-weight: 600;
}
.modal-body { padding: 0 18px 6px; overflow-y: auto; }
.modal-foot {
  padding: 14px 18px 16px;
  display: flex; gap: 9px; justify-content: flex-end;
}
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-2 .full { grid-column: 1 / -1; }

/* ---------------- 提示 ---------------- */
#toasts {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 99; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 9px;
  background: rgba(20, 40, 32, .92); color: #fff;
  font-size: 13px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  animation: tin .2s ease-out;
  max-width: 82vw;
}
.toast.ok { background: #0F7C58; }
.toast.err { background: #C93A3F; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.loading { padding: 34px; text-align: center; color: var(--text-3); font-size: 13px; }
.spin {
  display: inline-block; width: 15px; height: 15px;
  border: 2px solid rgba(15, 157, 108, .25); border-top-color: var(--brand);
  border-radius: 50%; animation: sp .7s linear infinite;
  vertical-align: -3px; margin-right: 6px;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* 分页 */
.pager {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-3);
}
.pager .spacer { flex: 1; }
.pager button {
  height: 28px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--text-2); font-size: 12.5px;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* 设备卡 */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dev {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px;
  box-shadow: var(--shadow);
}
.dev .top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 11px; }
.dev .name { font-weight: 600; font-size: 14px; }
.dev .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.dev .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dev .dot.on { background: #24C08A; box-shadow: 0 0 0 3px rgba(36, 192, 138, .16); }
.dev .dot.off { background: #C9D3CE; }
.dev .sims { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.dev .sim {
  flex: 1; min-width: 116px;
  background: #F8FAF9; border-radius: 8px;
  padding: 8px 10px; font-size: 12px;
}
.dev .sim .sl { color: var(--text-3); font-size: 11px; margin-bottom: 3px; }
.dev .sim .no { font-weight: 500; }
.dev .meta { font-size: 12px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.dev .ops { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 11px; }
/* 远程指令那一行：标签不能被 flex 压成竖排 */
.dev .ops > .hint { flex: 0 0 auto; white-space: nowrap; }

/* 名单导入 */
.drop {
  border: 1.5px dashed #CBD8D2; border-radius: 10px;
  padding: 18px; text-align: center; color: var(--text-3);
  background: #FBFCFC; font-size: 13px;
}
.drop.hot { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
textarea.numbers {
  width: 100%; min-height: 148px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
  line-height: 1.75; resize: vertical; outline: none;
  background: #FBFCFC;
}
textarea.numbers:focus { border-color: var(--brand); background: #fff; }

.hint { font-size: 12px; color: var(--text-3); line-height: 1.65; }
.hint b { color: var(--text-2); font-weight: 500; }

@media (max-width: 760px) {
  .subnav { width: 158px; }
  .topbar__search { width: 150px; }
  .avatar-wrap .nm, .avatar-wrap .rl, .topbar .crumb { display: none; }
  .view { padding: 14px 12px 30px; }
  .form-2 { grid-template-columns: 1fr; }
}

/* ---------------- 通知中心 / 远程指令面板 ---------------- */
.notice-item {
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; margin-bottom: 8px; font-size: 13px;
}
.notice-item b { font-weight: 600; }
.notice-item .hint { margin-top: 4px; }

.cmd-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: #F7FAF9;
  border: 1px solid var(--line); border-radius: 9px;
}
.cmd-bar .spacer { flex: 1; }
.cmd-note {
  margin-top: 10px; padding: 9px 12px;
  background: #FFFBEF; border: 1px solid #F3E4BF;
  border-radius: 8px; color: #8A5A12; font-size: 12px; line-height: 1.7;
}

/* ---------------- 到期提醒横幅 ---------------- */
/* 放在 .view 外面（topbar 下方），所以自己带左右内边距，且不带底部间距时不留白 */
#noticeBar:not(:empty) { padding: 14px 20px 0; flex-shrink: 0; }

.nbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 38px 11px 15px; border-radius: 10px;
  font-size: 13px; line-height: 1.6; position: relative;
}
.nbar b { font-weight: 500; flex: none; }
.nbar span { opacity: .82; }

.nbar.warn {
  background: #FFF7E8; border: 1px solid #F3E0BC; color: #8A5A12;
}
.nbar.danger {
  background: #FDECEC; border: 1px solid #F3C6C6; color: #A32D2D;
  padding-right: 15px;
}
.nbar.danger b { color: #8C1F1F; }

.nb-x {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border: none; border-radius: 5px;
  background: transparent; color: #8A5A12; opacity: .5;
  font-size: 17px; line-height: 1; cursor: pointer; font-family: inherit;
}
.nb-x:hover { opacity: 1; background: rgba(0, 0, 0, .05); }

@media (max-width: 640px) {
  #noticeBar:not(:empty) { padding: 12px 14px 0; }
  .nbar { font-size: 12.5px; padding: 10px 34px 10px 12px; }
  .nbar b { display: block; }
}

/* ---------------- 套餐与用量页 ---------------- */
.plan-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.plan-name { font-size: 19px; font-weight: 500; letter-spacing: -.2px; }
.plan-meta { display: flex; align-items: center; white-space: nowrap; }

.quota-top {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 9px; font-size: 13px; color: var(--text-2);
}
.quota-top b { font-size: 17px; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

.ubar { height: 7px; background: #EFF4F1; border-radius: 4px; overflow: hidden; }
.ubar span { display: block; height: 100%; border-radius: 4px; transition: width .3s; }

@media (max-width: 640px) {
  .plan-line { flex-direction: column; gap: 10px; }
}

/* 平台发来的人工通知：中性蓝，和到期告警区分开 */
.nbar.info {
  background: #EEF4FC; border: 1px solid #CFE0F5; color: #1B4B7E;
}
.nbar.info b { color: #14406E; }
.nbar.info .nb-x { color: #1B4B7E; }

/* 三列 / 四列网格：套餐用量页和概览都要用，
   之前只有 grid-2，用了不存在的类会塌成单列 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- 拨号设置：概览条 + 开关行 ---------- */
.sum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
.sum-i {
  background: #F7FAF9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.sum-i .k { font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.sum-i .v { font-size: 19px; font-weight: 650; color: var(--text); line-height: 1.25; }
.sum-i .v small { font-size: 12px; font-weight: 400; color: var(--text-2); margin-left: 2px; }

.swline {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 8px; cursor: pointer; font-size: 13.5px; color: var(--text);
  user-select: none;
}
.swline input[type="checkbox"] {
  width: 17px; height: 17px; accent-color: var(--brand);
  cursor: pointer; flex: none;
}
.swline input:disabled { cursor: not-allowed; }

/* v3.3.0 转写与质检：要点三区块（只读展示，不引入新框架类） */
.st-v15-insight { border: 1px solid var(--line); border-radius: 10px; background: #FBFCFB; }
.st-v15-title { font-size: 12.5px; font-weight: 650; color: var(--text); margin: 10px 0 4px; }
.st-v15-title:first-child { margin-top: 0; }
.st-v15-value { font-size: 13px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }
.st-v15-badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 12px;
  background: var(--brand-soft, #E9F7F1); color: #0B7A53; font-size: 11px; font-weight: 600;
}

/* ---------------- v3.6.3 坐席话务数据 / 话务趋势 ---------------- */
.ag-dt {
  height: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 7px;
  background: #FBFCFC; color: var(--text);
  font-size: 12.5px; outline: none;
}
.ag-dt:focus { border-color: var(--brand); background: #fff; }

.ag-tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--line);
  margin: -2px 0 12px; overflow-x: auto;
}
.ag-tab {
  padding: 9px 14px; font-size: 13px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.ag-tab:hover { color: var(--brand); }
.ag-tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.ag-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.ag-seg button { padding: 6px 12px; font-size: 12px; color: var(--text-2); background: #fff; }
.ag-seg button:hover { background: #F2F7F4; }
.ag-seg button.on { background: var(--brand); color: #fff; }

.ag-chart-title { text-align: center; font-size: 14px; font-weight: 600; margin: 16px 0 12px; }
.ag-chart {
  display: flex; align-items: flex-end; gap: 4px;
  height: 168px; padding: 8px 4px 0;
  border-bottom: 1px solid var(--line);
}
.ag-group { flex: 1; min-width: 0; display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.ag-bar { width: 13px; max-width: 22%; min-height: 2px; border-radius: 3px 3px 0 0; position: relative; }
.ag-bar span {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; color: var(--text-2); white-space: nowrap;
  opacity: 0; transition: opacity .13s;
}
.ag-bar:hover span { opacity: 1; }
.ag-xaxis { display: flex; gap: 4px; margin-top: 6px; }
.ag-x { flex: 1; min-width: 0; text-align: center; font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.ag-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.ag-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

/* ---------------- v20261113i 实时指令通道 / 运维与高级（追加，不覆盖已有规则） ---------------- */
.ops-sse-state {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 10px; padding: 2px 9px; border-radius: 12px;
  font-size: 11.5px; font-weight: 600;
  background: var(--line); color: var(--text-2);
}
.ops-sse-state::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.ops-sse-state.ok { background: var(--brand-light); color: var(--brand-dark); }
.ops-sse-state.err { background: #FEF6E7; color: #97631A; }
.ops-sse-list { max-height: 320px; overflow-y: auto; }
.ops-sse-list .dt { width: 100%; }

.ops-adv-item { border-top: 1px solid var(--line); padding: 12px 0; }
.ops-adv-item:first-child { border-top: 0; padding-top: 0; }
.ops-adv-item-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ops-adv-out { max-height: 360px; overflow: auto; }
.ops-adv-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ops-adv-ctl input.ag-dt { min-width: 260px; }
.ops-adv-json {
  margin: 0; padding: 10px 12px; border-radius: 8px;
  background: #F7FAF8; border: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-all;
}

/* ---------------- v3.6.4 运维与高级：参数输入 / 指令队列 ---------------- */
.oa-p {
  height: 30px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 7px;
  background: #FBFCFC; color: var(--text);
  font-size: 12.5px; outline: none; min-width: 150px;
}
.oa-p:focus { border-color: var(--brand); background: #fff; }
select.oa-p { min-width: 128px; cursor: pointer; }
.oa-admin-note { color: #B93035; }
.oa-cq-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.oa-cq-badges .tag { font-variant-numeric: tabular-nums; }

/* ---------------- v20261113k 指令队列指令类型筛选 / 联系人名与来源标签 ---------------- */
/* 被 App 版本门控挡住、正等设备升级到 3.6.4 的重扫补传指令：整行淡蓝底，运维一眼能挑出来 */
.dt tbody tr.cq-row-gate > td { background: #F4F8FE; }
.dt tbody tr.cq-row-gate > td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.dt tbody tr.cq-row-gate:hover > td { background: #EDF4FD; }

/* 号码列下方挂的公司名：比联系人名（.hint）略深一档，形成层级 */
.hint.co { color: var(--text-2); }

/* 客户管理「姓名」列下方的来源标签：小一号，不抢主信息的视觉重心 */
.cu-src { margin-top: 4px; line-height: 1; }
.cu-src .tag { font-size: 11px; padding: 1px 6px; }

/* ---------------- v20261113m STT 服务设置：双通道分组 / 渠道预设 / 免费渠道说明 ---------------- */
/* 表单里的分组标题行（在 .form-2 的两列网格里横跨整行，用下边线做分隔） */
.form-sec {
  grid-column: 1 / -1;
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  margin: 4px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px; font-weight: 700; color: var(--text);
}
.form-sec .hint { font-weight: 400; }
/* 第一个分组标题上面不要多出空隙 */
#stCfg .form-sec:first-child { margin-top: 0; }

/* 渠道预设下拉：视觉上与 .field select 一致，但它在 .field 外面，需要单独给样式 */
.stt-preset {
  height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #FBFCFC; color: var(--text);
  font-size: 13px; outline: none; cursor: pointer;
  min-width: 280px; max-width: 100%;
}
.stt-preset:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 157, 108, .1); background: #fff; }

/* 可折叠的「免费渠道怎么申请」说明块：默认收起，不打扰老用户 */
.stt-help { margin-top: 11px; }
.stt-help > summary {
  cursor: pointer; display: inline-block;
  padding: 5px 12px; border-radius: 7px;
  background: var(--brand-light); color: var(--brand-dark);
  font-size: 12.5px; font-weight: 600; list-style: none;
  transition: filter .13s;
}
.stt-help > summary::-webkit-details-marker { display: none; }
.stt-help > summary::before { content: "▸ "; font-size: 11px; }
.stt-help[open] > summary::before { content: "▾ "; }
.stt-help > summary:hover { filter: brightness(.96); }
.stt-help-body {
  margin-top: 10px; padding: 14px 16px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #F9FBFA;
  font-size: 12.5px; line-height: 1.85; color: var(--text-2);
}
.stt-help-body .stt-help-lead { margin-bottom: 8px; color: var(--text-2); }
.stt-help-body ol { margin: 0; padding-left: 20px; }
.stt-help-body li { margin-bottom: 9px; }
.stt-help-body li:last-child { margin-bottom: 0; }
.stt-help-body b { color: var(--text); font-weight: 600; }
.stt-help-body code {
  padding: 1px 5px; border-radius: 4px;
  background: #EEF3F1; color: var(--brand-dark);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 11.5px; word-break: break-all;
}

/* ==================== 功能开关中心 ==================== */
.sw-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sw-card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(15,157,108,.08); }
.sw-card.on { border-color: rgba(15,157,108,.45); background: #F6FCF9; }
.sw-card input[type="checkbox"] {
  width: 18px; height: 18px; flex: none;
  accent-color: var(--brand); cursor: pointer;
}
.sw-card input:disabled { cursor: not-allowed; }
.sw-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sw-txt b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.sw-txt i { font-style: normal; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.sw-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #C9D2CE;
}
.sw-card.on .sw-dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(15,157,108,.12); }

/* 状态标签带悬停提示：失败原因（如「自动收尾：拨号超时未接通」）不常驻显示，
   鼠标悬停用原生 title 弹出，避免长文案把表格行高撑开。下划虚线是「这里有说明」的暗示。 */
.tag.has-tip {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

/* ==================== 概览页 · 文字版趋势 ====================
   原来两张柱状图标签被抽稀、数值挤在一起看不清，改成一行一天的文字列表，
   数字右对齐、底部带合计行。删除「常用功能」六宫格时顺带把它的样式一并清掉。 */
.trend-txt { display: flex; flex-direction: column; gap: 2px; overflow-x: auto; }
/* 窄屏（多坐席 8 列时约需 960px）让列表自己横向滚动，
   不要把它撑成整页横向滚动条 */
.trend-row { min-width: max-content; }
.trend-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 7px; font-size: 12.5px; color: var(--text-2);
}
.trend-row:nth-child(even) { background: #F8FBFA; }
.trend-row .tr-day { flex: 0 0 52px; width: 52px; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.trend-row .tr-wd { flex: 0 0 52px; width: 52px; color: var(--text-3); font-size: 11.5px; }
/* 定宽而不是 flex:1：单序列时如果让它拉伸，数字会被推到卡片最右边、中间留下大片空白 */
.trend-row .tr-n {
  flex: 0 0 96px; width: 96px; text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.trend-row .tr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }
.trend-row.trend-head { background: #F2F7F4; color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.trend-row.trend-head .tr-n { color: var(--text-2); }
.trend-row.trend-sum { border-top: 1px solid var(--line); background: transparent; font-weight: 600; color: var(--text); margin-top: 2px; padding-top: 8px; }

/* ==================== 顶栏 / 窄视口排版兜底 ====================
   h1 原来是 flex 项但没设不收缩，窗口一窄就被搜索框和右侧按钮挤成竖排文字，
   底部还会出现横向滚动条。这里补最小约束，宽屏表现完全不变。 */
.topbar h1 {
  white-space: nowrap; flex-shrink: 0;
  overflow: hidden; text-overflow: ellipsis; max-width: 180px;
}
.topbar .crumb { white-space: nowrap; flex-shrink: 0; }
.topbar .icon-btn, .topbar .btn, .topbar .pill, .topbar .avatar-wrap { flex-shrink: 0; }
.topbar__search { flex-shrink: 1; min-width: 90px; }
.main, .view { min-width: 0; }
.view { overflow-x: hidden; }
@media (max-width: 760px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar h1 { font-size: 14px; max-width: 110px; }
  .topbar__search { width: 120px; }
  .topbar .pill { display: none; }
}

/* 窄视口兜底：卡片标题与按钮区在空间不足时换行，避免标题被挤成竖排 */
.card-head { flex-wrap: wrap; row-gap: 8px; }
.card-head h2 { flex-shrink: 1; min-width: 0; }

/* ==========================================================================
   通用输入控件 .inp —— 此前 .inp 这个类名在 JS 里被引用了 11 处，
   但 CSS 里从来没有定义，控件只能吃浏览器默认样式（宽度约 170px、细边框、
   行距为 0），坐到卡片左上角挤成一团。这里补齐统一样式。
   ========================================================================== */
.inp {
  width: 100%;
  box-sizing: border-box;
  height: 36px;
  padding: 0 10px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color .13s, box-shadow .13s;
}
select.inp { padding-right: 26px; cursor: pointer; }
.inp::placeholder { color: var(--text-3); }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 157, 108, .12); }
.inp:disabled { background: #F7F9F8; color: var(--text-3); cursor: not-allowed; }

/* 表单行：标签在上、控件撑满、行距统一；空标签保留占位高度，避免按钮行上浮 */
.card-body > .f { margin-bottom: 12px; }
.card-body > .f > label {
  display: block; font-size: 12px; line-height: 19px;
  color: var(--text-3); margin-bottom: 5px;
}
.card-body > .f > .btn { margin-right: 6px; }
.card-body > .f:last-child { margin-bottom: 0; }

/* 筛选区紧凑网格：客户管理等页面有 8 个筛选项，两列会占掉 4 行、近 300px，
   一屏只剩几条数据。四列排布后压到 2 行，宽屏利用率也更高。 */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
}
.filter-grid .field { margin: 0; }
.filter-grid .field > label {
  display: block; font-size: 12px; line-height: 19px;
  color: var(--text-3); margin-bottom: 5px;
}
.filter-grid .field > input,
.filter-grid .field > select { width: 100%; box-sizing: border-box; }
@media (max-width: 1360px) { .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .filter-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   通话详情宽抽屉（v389）
   版式参考拓客宝详情抽屉：顶部 3px 品牌色条 + 宽抽屉 + 分栏 + 表格化 kv。
   目的：把原来分散在「通话记录 / 录音库 / 转写与质检」三处看到的东西
   合到同一个页面，不用来回切菜单。
   ========================================================================== */
.drawer.wide { width: min(1080px, 94vw); }
.drawer.wide::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), #34D399);
  pointer-events: none;
}

/* 头部摘要：号码最大，企业名/联系人一行，状态标签靠右 */
.dw-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 2px 0 15px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.dw-head .num {
  font-size: 22px; font-weight: 650; letter-spacing: .3px;
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.dw-head .sub { font-size: 13px; color: var(--text-2); margin-top: 5px; line-height: 1.6; }
.dw-head .tags {
  margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end; max-width: 46%;
}

/* 两栏正文 */
.dw-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
@media (max-width: 900px) { .dw-cols { grid-template-columns: 1fr; gap: 0; } }

.dw-sec { font-size: 13px; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.dw-sec .hint { font-weight: 400; }
.dw-sec.mt { margin-top: 22px; }

/* 表格化 kv：标签列浅灰底，右列内容；和拓客宝详情一致 */
.kv2 {
  display: grid; grid-template-columns: 86px minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.kv2 > .k {
  background: #F8FAFC; color: var(--text-3); font-size: 12.5px;
  padding: 9px 12px; border-bottom: 1px solid #F1F5F9;
}
.kv2 > .v {
  padding: 9px 12px; font-size: 13px; border-bottom: 1px solid #F1F5F9;
  word-break: break-all; background: #fff;
}
.kv2 > .k:last-of-type, .kv2 > .v:last-of-type { border-bottom: none; }

/* 文本块：转写摘要 / 质检结论 */
.dw-text {
  background: #F7FAF9; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 13px; line-height: 1.85;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
  max-height: 210px; overflow: auto;
}
.dw-text.empty { color: var(--text-3); background: #FAFBFB; }

.dw-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* 质检分数条 */
.qc-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qc-score { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.qc-bar { flex: 1; height: 7px; border-radius: 4px; background: #EDF2F0; overflow: hidden; }
.qc-bar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }

/* 二级抽屉：压在详情之上，琥珀色顶条，一眼能区分「这是从详情里再点开的」 */
.drawer-mask.lv2 { z-index: 65; background: rgba(15, 30, 24, .22); }
.drawer.lv2 { z-index: 66; width: min(760px, 90vw); }
.drawer.lv2::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
  pointer-events: none;
}

/* 抽屉底部按钮右侧留白：浏览器插件的悬浮球固定在右下角，会盖住最后一个按钮 */
.drawer-foot { padding-right: 76px; }

/* 抽屉本身裁切溢出：否则 body 内容多时会把 footer 顶出视口，底部按钮看不见 */
.drawer { overflow: hidden; }
/* ==========================================================================
   通话详情三块布局（v20261118drawer1）
   dw-topinfo 顶部本次通话信息条 / dw-histlist 左侧同号历史 / dw-detail 右侧详情。
   只新增规则；.drawer.wide 宽度保持 min(1080px,94vw) 不动。
   ========================================================================== */
.dw-topinfo {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.dw-topinfo-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.dw-topinfo-head .num {
  font-size: 22px; font-weight: 650; letter-spacing: .3px;
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.dw-topinfo-head .sub { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-top: 4px; }
.dw-topinfo-head .tags {
  margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end; max-width: 46%;
}
.dw-topinfo-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px; margin-top: 12px;
}
.dw-topinfo-grid .ti { min-width: 0; }
.dw-topinfo-grid .ti-k { font-size: 11.5px; color: var(--text-3); line-height: 1.5; margin-bottom: 3px; }
.dw-topinfo-grid .ti-v { font-size: 13px; color: var(--text); line-height: 1.6; word-break: break-all; }
@media (max-width: 900px) { .dw-topinfo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dw-topinfo-grid { grid-template-columns: 1fr; } }

.dw-main { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .dw-main { grid-template-columns: 1fr; } }

.dw-histlist {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
  max-height: 560px; overflow-y: auto;
}
.dw-histlist .dw-sec { margin: 0 0 2px; }
.dw-histitem {
  border: 1px solid var(--line); border-left: 3px solid transparent;
  border-radius: 8px; padding: 10px 11px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dw-histitem:hover { background: #F5FAF7; }
.dw-histitem.active { background: var(--brand-light); border-left-color: var(--brand); }
.dw-histitem .hi-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dw-histitem .hi-time { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dw-histitem .hi-meta { margin-top: 6px; font-size: 12px; color: var(--text-2); }
.dw-histitem .hi-dur { font-variant-numeric: tabular-nums; }
.dw-histitem .hi-staff { margin-right: auto; }
.dw-histitem .hi-note {
  margin-top: 5px; font-size: 11.5px; color: var(--text-3); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dw-detail { min-width: 0; }

/* ==================== AI 能力配置台（v23） ====================
   只新增样式、不改动既有规则：admin 端通过 @import 复用本文件。 */
.ai-console { max-width: 1360px; }
.ai-console__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.ai-console__head h2 { margin: 0 0 6px; font-size: 19px; }
.ai-console__head > div:first-child { flex: 1; min-width: 0; }
.ai-console__grid { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 16px; align-items: start; }
.ai-console__nav {
  background: #fff; border: 1px solid #E5ECE8; border-radius: 10px; padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.ai-console__navitem {
  padding: 11px 12px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  display: flex; flex-direction: column; gap: 4px; position: relative;
}
.ai-console__navitem:hover { background: #F2F7F4; }
.ai-console__navitem.on { background: var(--brand-light); border-color: var(--brand); }
.ai-console__navitem b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ai-console__navitem i { font-style: normal; font-size: 11.5px; color: var(--text-2); }
.ai-console__navitem.off { opacity: .55; cursor: not-allowed; }
.ai-console__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ai-console__badge {
  font-size: 10.5px; padding: 2px 7px; border-radius: 10px; background: #F0F3F1;
  color: #6B7B73; white-space: nowrap;
}
.ai-console__badge.ok { background: var(--brand-light); color: var(--brand-dark); }
.ai-console__badge.warn { background: #FFF4E5; color: #B3560F; }
.ai-console__msg {
  background: var(--brand-light); color: var(--brand-dark); border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px;
}
.ai-console__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 10px; }
.ai-console__card {
  border: 1px solid #E5ECE8; border-radius: 9px; padding: 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.ai-console__card:hover { border-color: var(--brand); }
.ai-console__card.sel { border-color: var(--brand); background: #FBFFFD; }
.ai-console__cardtop { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ai-console__cardtop b { font-size: 13px; color: var(--text); }
.ai-console__radio { color: var(--brand); font-size: 15px; }
.ai-console__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ai-console__check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; margin-right: 16px; }
.ai-console__snaps { display: flex; flex-direction: column; gap: 7px; }
.ai-console__snap {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--text-2); border-bottom: 1px dashed #E5ECE8; padding-bottom: 6px;
}
.ai-console__table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ai-console__table th, .ai-console__table td {
  text-align: left; padding: 9px 8px; border-bottom: 1px solid #EEF3F0; vertical-align: top;
}
.ai-console__table th { color: var(--text-2); font-weight: 600; background: #FAFCFB; }
@media (max-width: 980px) { .ai-console__grid { grid-template-columns: 1fr; } }

/* 合并版 AI 配置台：左导航底部的「规划中」提示。
   普通文本元素，不可点（不用 <a>、不加 role="button"），也不进 NAV 数组。 */
.ai-console__planhint {
  margin-top: auto; padding: 10px 6px 2px; font-size: 11.5px; line-height: 1.6;
  color: #9AA7A0; border-top: 1px dashed #E6EDE9;
}
/* ③ 接口与提示词：提示词文本域占满两列 */
.ai-console .form-2 .field textarea { width: 100%; }

/* ==========================================================================
   企业知识库（v1.0）：scope 徽标 / 确认态 / 待确认队列 / 已沉淀标记
   沿用品牌绿 #0F9D6C，不改既有品牌变量
   ========================================================================== */
.kb-scope {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11.5px; line-height: 1.6; white-space: nowrap; font-weight: 600;
}
.kb-scope.s0 { color: #1B6EC2; background: #EAF3FD; }   /* 官方：蓝 */
.kb-scope.s1 { color: #0B7A54; background: #E6F6EF; }   /* 公司：绿 */
.kb-scope.s2 { color: #A96A00; background: #FFF3DF; }   /* 部门：橙 */
.kb-scope.s3 { color: #6B7280; background: #F0F2F5; }   /* 个人：灰 */

.kb-confirm {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11.5px; line-height: 1.6; white-space: nowrap;
}
.kb-confirm.c0 { color: #A96A00; background: #FFF3DF; }  /* 待确认：amber */
.kb-confirm.c1 { color: #0B7A54; background: #E6F6EF; }  /* 已确认：green */
.kb-confirm.c2 { color: #B42318; background: #FDECEA; }  /* 已驳回：red */

.kb-pending { border-left: 3px solid #E0A800; }
.kb-pending .card-head h2::after {
  content: '候选'; font-size: 11px; font-weight: 400; color: #A96A00;
  margin-left: 8px; padding: 1px 6px; border-radius: 8px; background: #FFF3DF;
}
.kb-empty { padding: 18px 10px; text-align: center; color: #9AA7A0; font-size: 13px; }

.kb-deposited {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11.5px; color: #0B7A54; background: #E6F6EF; white-space: nowrap;
}

.kb-hitlist { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.kb-hititem { font-size: 12.5px; color: #5C6B64; }
.kb-hititem b { color: #0F9D6C; }
.kb-hitnum {
  display: inline-block; min-width: 22px; text-align: center;
  padding: 0 5px; border-radius: 8px; background: #E6F6EF;
  color: #0B7A54; font-size: 11px;
}
