/* MeaiChat 平台控制台：在客服系统样式（/admin/app.css）基础上加的部分，类名统一 cx- 开头 */
html, body { background: var(--bg); }
.cx-app { min-height: 100vh; display: flex; flex-direction: column; }
.cx-top { position: sticky; top: 0; z-index: 50; height: 56px; display: flex; align-items: center; gap: 20px; padding: 0 24px; background: var(--card); box-shadow: inset 0 -1px 0 var(--line); }
.cx-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.cx-brand b { font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.cx-brand span { font-size: 12px; color: var(--p); background: var(--p-soft); padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.cx-nav { display: flex; gap: 2px; height: 100%; }
.cx-nav a { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500; position: relative; }
.cx-nav a svg.i { width: 16px; height: 16px; }
.cx-nav a:hover { color: var(--ink); }
.cx-nav a.on { color: var(--p); }
.cx-nav a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--p); }
.cx-top .grow { flex: 1; }
.cx-me { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; position: relative; }
.cx-me:hover, .cx-me.pop-open { background: var(--hover); color: var(--ink); }
.cx-me svg.i { width: 16px; height: 16px; }
.cx-dot { position: absolute; top: 6px; left: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--card); }
.cx-main { flex: 1; min-width: 0; }
.cx-main .page { max-width: 1280px; margin: 0 auto; overflow: visible; }

.cx-kpis .d { line-height: 1.6; }
.cx-kpis5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cx-kpis5 .sq-bar { margin-top: 8px; max-width: none; }
.cx-v-sm { font-size: 20px !important; margin-top: 10px !important; }
.cx-red { color: var(--bad); }
.cx-warn { color: var(--warn); }
.cx-bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
.cx-search { margin-left: auto; width: 260px; }
.cx-search .input { height: 34px; }

.cx-tb td { white-space: nowrap; }
.cx-co b { display: block; font-weight: 600; }
.cx-co small, .cx-exp small { display: block; font-size: 12px; color: var(--ink-3); }
.cx-exp small.cx-red { color: var(--bad); }
.cx-exp small.cx-warn { color: var(--warn); }
.cx-health { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.cx-health i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.cx-health.ok i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.cx-health.warn i { background: var(--warn); }
.cx-health.bad { color: var(--bad); }
.cx-health.bad i { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.cx-mem { margin-left: 8px; font-size: 12px; }
.cx-empty { padding: 56px 20px; }

/* 开通 / 编辑表单 */
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cx-sec { margin-bottom: 8px; }
.cx-sec + .cx-sec { border-top: 1px solid var(--line-2); padding-top: 16px; }
.cx-sec h4 { margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cx-sec-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.cx-sec-hd h4 { margin: 0 0 4px; font-size: 14px; }
.cx-sec-hd p { margin: 0; font-size: 12.5px; }
.cx-p { margin: -6px 0 12px; font-size: 12.5px; }
.cx-slug { display: flex; align-items: stretch; }
.cx-slug .input { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1; min-width: 0; }
.cx-slug span { display: inline-flex; align-items: center; padding: 0 10px; background: var(--fill); border: 1px solid var(--line); border-left: 0; border-radius: 0 6px 6px 0; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.hint.cx-okh { color: var(--ok); }
.hint.cx-badh { color: var(--bad); }
.cx-pw { display: flex; gap: 6px; }
.cx-pw .input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cx-unit { display: flex; align-items: center; gap: 8px; }
.cx-unit .input { width: 90px; }
.cx-unit span { color: var(--ink-3); }
.cx-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cx-plan { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.cx-plan b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.cx-plan span { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.cx-plan:hover { border-color: var(--ink-3); }
.cx-plan.on { border-color: var(--p); box-shadow: 0 0 0 3px var(--p-soft); background: var(--p-soft); }
.cx-plan.on b { color: var(--p); }
.modal-ft .grow { flex: 1; font-size: 12.5px; }

.cx-kv { margin-bottom: 14px; }
.cx-kv span { min-width: 84px; }
.cx-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.cx-pre { margin: 0; white-space: pre-wrap; background: var(--fill); border-radius: 8px; padding: 12px 14px; font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); max-height: 220px; overflow: auto; }
.confirm-ic.ok { background: var(--ok-soft); color: var(--ok); }

/* 详情 */
.cx-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); text-decoration: none; font-size: 13px; margin-bottom: 10px; }
.cx-back svg.i { width: 14px; height: 14px; transform: rotate(180deg); }
.cx-back:hover { color: var(--p); }
.page-hd h1 .tag { font-size: 12px; font-weight: 500; }
.cx-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; }
.cx-tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; font-size: 13.5px; color: var(--ink-3); font-weight: 500; position: relative; cursor: pointer; }
.cx-tabs button:hover { color: var(--ink); }
.cx-tabs button.on { color: var(--p); }
.cx-tabs button.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--p); }
.cx-card { padding: 20px 22px; margin-bottom: 16px; }
.cx-save { display: flex; justify-content: flex-end; align-items: center; gap: 12px; border-top: 1px solid var(--line-2); padding-top: 16px; margin-top: 8px; }
.cx-url { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.cx-url .k { font-weight: 500; font-size: 13.5px; }
.cx-url .k small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.cx-url code { font-size: 13px; background: var(--fill); padding: 6px 10px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-url a.btn { text-decoration: none; }
.cx-note { font-size: 12.5px; margin: 14px 0 0; }
.cx-log { margin: 0; background: #14161c; color: #c9cdd6; border-radius: 8px; padding: 14px 16px; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; height: 480px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.cx-ev td { vertical-align: top; }
.cx-lv { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin: 0 8px 1px 0; background: var(--info); }
.cx-lv.ok { background: var(--ok); } .cx-lv.warn { background: var(--warn); } .cx-lv.bad { background: var(--bad); }
.cx-ev a { color: var(--p); text-decoration: none; }
.cx-renew { margin-top: 16px; padding: 12px 14px; background: var(--fill); border-radius: 8px; font-size: 13.5px; }

/* 设置 */
.cx-set { max-width: 900px; }
.cx-set code { font-size: 12px; background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.cx-totp { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
.cx-qr { background: #fff; border-radius: 8px; padding: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.cx-qr svg { display: block; width: 100%; height: auto; }
.cx-secret { display: inline-block; font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .5px; background: var(--fill); padding: 6px 10px; border-radius: 6px; user-select: all; }
.cx-prog { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; font-size: 13px; color: var(--ink-2); }
.cx-prog .sq-bar { flex: 0 0 200px; margin: 0; }

@media (max-width: 1000px) {
  .cx-kpis5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cx-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .cx-top { padding: 0 12px; gap: 8px; }
  .cx-brand b, .cx-brand span, .cx-me span { display: none; }
  .cx-nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .cx-nav::-webkit-scrollbar { display: none; }
  .cx-top .grow { display: none; }
  .cx-nav a { padding: 0 8px; }
  .cx-nav a svg.i { display: none; }
  .cx-main .page { padding: 16px; }
  .kpis, .cx-kpis5 { grid-template-columns: 1fr 1fr; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .cx-search { width: 100%; margin-left: 0; }
  .cx-url { grid-template-columns: 1fr auto auto; }
  .cx-url .k { grid-column: 1 / -1; }
  .cx-totp { grid-template-columns: 1fr; }
  .cx-qr { max-width: 200px; }
}

/* 异地备份 */
.cx-sec-hd .switch { flex: none; margin-top: 2px; }
.cx-otb { margin-top: 14px; }
.cx-oerr { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.cx-key { display: block; word-break: break-all; white-space: normal; font-size: 13.5px; line-height: 1.7; }

/* 试用申请 */
.cx-badge { margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.cx-ip { display: block; font-size: 11.5px; }
.cx-msg { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-size: 13px; }

/* 域名 */
.cx-ck { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-right: 6px; }
.cx-ck svg.i { width: 14px; height: 14px; }
.cx-ck.ok { color: var(--ok); } .cx-ck.bad { color: var(--bad); }
.cx-dm-main { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cx-dm-main > div { background: var(--fill); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.cx-dm-main code { font-size: 14px; }
.cx-card code { font-size: 12px; background: var(--fill); padding: 1px 5px; border-radius: 4px; }

/* 邮件 */
.info-box.ok { background: var(--ok-soft, #e8f6ee); color: var(--ok, #1f8a4c); }
.info-box.warn { background: var(--warn-soft, #fff4e0); color: var(--warn); }
.cx-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; padding: 2px 0 4px; }
.cx-checks .check-inline { margin: 0; }
.cx-mailchk { margin: 6px 0 0; }
.cx-sub-hd { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 18px 0 8px; }
.cx-mlog { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cx-mrow { display: grid; grid-template-columns: 128px 64px 120px minmax(120px, 220px) minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; font-size: 12.5px; }
.cx-mrow + .cx-mrow { border-top: 1px solid var(--line); }
.cx-mrow .t { color: var(--ink-3); white-space: nowrap; }
.cx-mrow .to, .cx-mrow .s, .cx-mrow .err { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-mrow .err { color: var(--bad, #d23b3b); }
@media (max-width: 900px) { .cx-checks { grid-template-columns: 1fr; } .cx-mrow { grid-template-columns: 1fr 1fr; } }
.cx-own { margin-top: 4px; }
.cx-own summary { cursor: pointer; font-size: 13px; color: var(--p); font-weight: 500; padding: 4px 0; }
.cx-own[open] summary { margin-bottom: 8px; }
/* 团队 */
.cx-role { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--fill); color: var(--ink-3); margin-left: 2px; }
.cx-perms { display: flex; flex-wrap: wrap; gap: 4px; max-width: 520px; }
.cx-perms span { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--fill); color: var(--ink-2); }
.cx-permgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-top: 8px; }
.cx-permgrid .check-inline { margin: 0; }
.cx-permgrid .cx-danger { color: var(--bad); }
.cx-presets { float: right; display: inline-flex; gap: 6px; font-weight: 400; }
.cx-permlist { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-permlist span { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 4px 10px; border-radius: 6px; background: var(--p-soft); color: var(--p-2); }
.cx-permlist svg.i { width: 14px; height: 14px; }
tr.cx-off td { opacity: .55; }
.cx-ret { display: block; margin-top: 2px; font-size: 11px; }
