/* ===== 小葵AI获客 · 设计系统 ===== */
:root {
  --bg: #ffffff;
  --bg-side: #faf9f7;
  --bg-sub: #f4f4f1;
  --bg-hover: #f1f1ee;
  --line: #eae9e4;
  --line-strong: #dedcd5;
  --text: #1b1b19;
  --text-2: #56564e;
  --muted: #8c8c83;
  --primary: #1b1b19;
  --primary-ink: #ffffff;
  --accent: #5b57d1;
  --accent-soft: #eeedfb;
  --ok: #15803d;
  --ok-soft: #e9f7ee;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --danger: #c0392b;
  --danger-soft: #fbebea;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20,20,18,.05);
  --shadow-md: 0 6px 24px rgba(20,20,18,.08), 0 1px 3px rgba(20,20,18,.04);
  --shadow-lg: 0 24px 64px rgba(20,20,18,.16);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #131316;
  --bg-side: #17171b;
  --bg-sub: #1d1d22;
  --bg-hover: #232329;
  --line: #2a2a31;
  --line-strong: #383840;
  --text: #eeece7;
  --text-2: #b6b4ac;
  --muted: #85858d;
  --primary: #f0eee9;
  --primary-ink: #17171a;
  --accent: #8b87f5;
  --accent-soft: #262441;
  --ok: #4ade80;
  --ok-soft: #1a2b21;
  --warn: #fbbf24;
  --warn-soft: #2c2415;
  --danger: #f87171;
  --danger-soft: #2e1a1a;
  --shadow-md: 0 6px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 布局 ===== */
.app { display: grid; grid-template-columns: 252px 1fr; height: 100vh; }
.sidebar {
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 14px 12px 12px;
  min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink);
}
.brand-mark svg { width: 17px; height: 17px; stroke-width: 2; }
.brand-name { font-size: 14px; font-weight: 650; letter-spacing: .2px; line-height: 1.2; }
.brand-ver { font-size: 11px; color: var(--muted); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .4px; padding: 14px 8px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text-2);
  font-size: 13.5px; border: 1px solid transparent; user-select: none;
  transition: background .12s, color .12s;
}
.nav-item svg { width: 17px; height: 17px; opacity: .8; }
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-sm); font-weight: 550; }
.nav-item.active svg { opacity: 1; }
.nav-item .nav-badge { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-item.active .nav-badge { color: var(--accent); }

.sidebar-foot { padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.balance-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); }
.balance-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.balance-label svg { width: 13px; height: 13px; }
.balance-value { display: flex; align-items: baseline; gap: 5px; margin: 4px 0 10px; }
.balance-value #balanceVal { font-size: 22px; font-weight: 650; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.balance-value em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.balance-btn {
  width: 100%; height: 31px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: var(--bg-sub); color: var(--text); font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.balance-btn:hover { background: var(--bg-hover); border-color: var(--muted); }
.server-chip {
  display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); font-size: 11.5px; color: var(--text-2);
  cursor: pointer; overflow: hidden;
}
.server-chip:hover { border-color: var(--line-strong); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.16); }
.dot.err { background: var(--danger); box-shadow: 0 0 0 3px rgba(192,57,43,.14); }
.server-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-go { width: 12px; height: 12px; margin-left: auto; opacity: .5; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 32px 14px; border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -.2px; }
.topbar p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 32px 48px; }
.wrap { max-width: 1080px; margin: 0 auto; }
.wrap-narrow { max-width: 780px; margin: 0 auto; }

/* ===== 通用组件 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--bg);
  color: var(--text); font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--bg-sub); border-color: var(--muted); }
.btn:active { transform: translateY(.5px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 550; }
.btn-primary:hover { opacity: .88; background: var(--primary); border-color: var(--primary); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-icon { width: 30px; padding: 0; justify-content: center; }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.stat { padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.stat .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .label svg { width: 14px; height: 14px; }
.stat .value { font-size: 25px; font-weight: 650; letter-spacing: -.6px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat .foot { font-size: 12px; color: var(--muted); margin-top: 6px; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 500; font-size: 11.5px; color: var(--muted);
  padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-sub);
}
table.tbl th:first-child { padding-left: 20px; }
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl td:first-child { padding-left: 20px; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--bg-sub); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.amount-pos { color: var(--ok); font-variant-numeric: tabular-nums; }
.amount-neg { color: var(--text-2); font-variant-numeric: tabular-nums; }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; background: var(--bg-sub); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.err { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tag.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag .dot { width: 5px; height: 5px; background: currentColor; box-shadow: none; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  font: inherit; font-size: 13px; outline: none; transition: border-color .12s, box-shadow .12s;
}
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238c8c83' stroke-width='1.8' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 30px; }
.textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.inline { display: flex; align-items: center; gap: 8px; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); border: 0; cursor: pointer; flex: none; transition: background .15s; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(16px); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }

/* 空态 */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty svg { width: 30px; height: 30px; opacity: .45; margin-bottom: 10px; }
.empty h4 { margin: 0 0 4px; font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.empty p { margin: 0 0 14px; font-size: 12.5px; }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(20,20,18,.36); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 80; padding: 24px; animation: fade .14s ease-out; }
[data-theme="dark"] .modal-mask { background: rgba(0,0,0,.6); }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 100%; max-width: 560px; max-height: 86vh; display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: pop .16s cubic-bezier(.2,.9,.3,1);
}
.modal.wide { max-width: 760px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99) } to { opacity: 1; transform: none } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 14.5px; font-weight: 620; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg-sub); border-radius: 0 0 14px 14px; }
.modal-foot .left { margin-right: auto; }

/* Toast */
.toast-root { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-md);
  animation: toastIn .18s ease-out; max-width: 520px;
}
.toast svg { width: 15px; height: 15px; }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: #16a34a; color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }

/* 分段控件 / tabs */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-sub); border: 1px solid var(--line); border-radius: 9px; }
.seg button { height: 27px; padding: 0 11px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; border-radius: 7px; cursor: pointer; }
.seg button.active { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 550; }

/* ===== 对话 ===== */
.chat { display: flex; flex-direction: column; height: 100%; max-width: 820px; margin: 0 auto; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 8px 2px 20px; }
.msg { display: flex; gap: 12px; margin-bottom: 22px; }
.msg .avatar { width: 27px; height: 27px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; }
.msg.user .avatar { background: var(--bg-sub); color: var(--text-2); border: 1px solid var(--line); }
.msg.assistant .avatar { background: var(--primary); color: var(--primary-ink); }
.msg .body { min-width: 0; flex: 1; }
.msg .who { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; display: flex; align-items: center; gap: 7px; }
.msg .who .tag { height: 18px; font-size: 10.5px; }
.msg .text { font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.msg.user .text { color: var(--text); }
.msg .meta { margin-top: 8px; font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.composer { border: 1px solid var(--line-strong); background: var(--bg); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-sm); margin-top: 4px; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; font: inherit; font-size: 14px; line-height: 1.6; background: transparent; color: var(--text); min-height: 24px; max-height: 180px; padding: 2px; }
.composer-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.composer-bar .grow { flex: 1; }
.mini-select { height: 27px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg-sub); color: var(--text-2); font: inherit; font-size: 12px; padding: 0 6px; max-width: 190px; outline: none; }
.send-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; cursor: pointer; }
.send-btn:disabled { opacity: .35; cursor: not-allowed; }
.send-btn svg { width: 15px; height: 15px; }
.chat-empty { text-align: center; padding: 60px 20px; }
.chat-empty h2 { font-size: 19px; margin: 0 0 6px; font-weight: 650; letter-spacing: -.3px; }
.chat-empty p { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 560px; margin: 0 auto; }
.chip-prompt { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; color: var(--text-2); cursor: pointer; font-family: inherit; }
.chip-prompt:hover { border-color: var(--line-strong); background: var(--bg-sub); color: var(--text); }
.cursor-blink::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0 } }

/* 图表 */
.chart { width: 100%; height: 130px; display: block; overflow: visible; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 118px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 34px; background: var(--bg-sub); border-radius: 5px 5px 2px 2px; min-height: 3px; transition: height .3s; position: relative; }
.bar.has { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--bg))); }
.bar-lbl { font-size: 10.5px; color: var(--muted); }

/* 连接页 */
.gate { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg-side); z-index: 120; padding: 24px; }
.gate-card { width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); padding: 26px; }
.gate-card .brand { padding: 0 0 18px; }
.gate-card h2 { font-size: 17px; margin: 0 0 4px; font-weight: 650; }
.gate-card p.sub { font-size: 12.5px; color: var(--muted); margin: 0 0 20px; }
.gate-card .err { font-size: 12.5px; color: var(--danger); margin: -4px 0 12px; min-height: 18px; }

/* 登录页：服务端连接状态条 */
.login-conn {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg-sub); font-size: 12px; line-height: 1.5; color: var(--text-2);
}
.login-conn.ok { border-color: rgba(34,197,94,.30); background: rgba(34,197,94,.06); }
.login-conn.err { border-color: rgba(192,57,43,.26); background: rgba(192,57,43,.05); }
.login-conn .login-conn-txt { flex: 1; min-width: 0; word-break: break-all; }
.login-conn code { font-family: var(--mono); font-size: 11.5px; color: var(--text); }
.login-conn .btn { flex: none; }


/* 代码/输出块 */
.pre {
  font-family: var(--mono); font-size: 12px; line-height: 1.6; background: var(--bg-sub);
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px;
  white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto; color: var(--text-2);
}
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text-2); word-break: break-all; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--bg-sub); }
.list-row .lr-main { min-width: 0; flex: 1; }
.list-row .lr-title { font-size: 13.5px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.list-row .lr-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-actions { display: flex; gap: 6px; flex: none; }
.hstack { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.section-title { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .3px; margin: 22px 0 10px; text-transform: uppercase; }
.section-title:first-child { margin-top: 0; }
.pill-input { display: flex; gap: 8px; }
.warn-banner { display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; margin-bottom: 14px; }
.warn-banner svg { width: 15px; height: 15px; margin-top: 2px; }
.ok-banner { display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-size: 12.5px; }

/* 对话视图专用布局 */
.content.chat-mode { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.content.chat-mode .chat { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: 860px; margin: 0 auto; padding: 18px 26px 20px; }
.content.chat-mode .chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }

/* 对话空态垂直居中 */
.chat-empty { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }

/* ===== 新媒体部门 ===== */
.chips-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-pick { border: 1px solid var(--line-strong); background: var(--bg); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: var(--text-2); font-family: inherit; }
.chip-pick:hover { border-color: var(--muted); color: var(--text); }
.chip-pick.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 550; }
.chk-list { display: flex; flex-direction: column; gap: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-sub); }
.chk-list .check { font-size: 13px; color: var(--text); }
.wl-steps { display: flex; flex-direction: column; }
.wl-step { display: flex; gap: 12px; padding: 9px 0; position: relative; }
.wl-step:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 36px; bottom: -1px; width: 1px; background: var(--line); }
.wl-dot { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--bg-sub); color: var(--muted); border: 1px solid var(--line); flex: none; }
.wl-dot svg { width: 13px; height: 13px; }
.wl-step.success .wl-dot { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.wl-step.failed .wl-dot { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.wl-step.running .wl-dot { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.wl-title { font-size: 13px; font-weight: 550; display: flex; align-items: center; gap: 7px; }
.wl-detail { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.55; }

/* 连接诊断 */
.diag-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.diag-row { display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-sub); }
.diag-row .tag { flex: none; margin-top: 1px; }

/* ============================================================
   视觉升级 v2：浅色科技蓝主题（底图光晕 + 蓝调卡片 + 排版优化）
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-side: #f5f9ff;
  --bg-sub: #f3f7fe;
  --bg-hover: #eaf2ff;
  --line: #e3ebf7;
  --line-strong: #cfdcf0;
  --text: #0e1a2b;
  --text-2: #3f5266;
  --muted: #7b8ca3;
  --primary: #1d4ed8;
  --primary-ink: #ffffff;
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --accent-soft: #e8f1ff;
  --accent-line: #bfd6ff;
  --ok: #0f9d58;
  --ok-soft: #e7f7ef;
  --warn: #b45309;
  --warn-soft: #fff6e6;
  --danger: #d64545;
  --danger-soft: #fdeeee;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(37, 99, 235, .06);
  --shadow-md: 0 8px 26px rgba(37, 99, 235, .10), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 28px 72px rgba(23, 58, 122, .18);
  --grad-blue: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #06b6d4 100%);
  --grad-soft: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  --ring: 0 0 0 3px rgba(37, 99, 235, .16);
}
[data-theme="dark"] {
  --bg: #0d1520;
  --bg-side: #0a111a;
  --bg-sub: #111c2b;
  --bg-hover: #16243a;
  --line: #1d2d43;
  --line-strong: #2b3f5c;
  --text: #e8eefc;
  --text-2: #a9bad2;
  --muted: #6f8298;
  --primary: #3b82f6;
  --primary-ink: #06101d;
  --accent: #60a5fa;
  --accent-2: #22d3ee;
  --accent-soft: #16263c;
  --accent-line: #24405f;
  --shadow-md: 0 8px 28px rgba(0, 0, 0, .45);
  --grad-soft: linear-gradient(180deg, #0f1a26 0%, #0c141f 100%);
}

/* 字体与排版 */
body {
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, "Segoe UI", Inter, sans-serif;
  font-size: 13.8px;
  letter-spacing: .005em;
  background:
    radial-gradient(1200px 620px at 12% -12%, rgba(59, 130, 246, .10), transparent 62%),
    radial-gradient(860px 520px at 96% 4%, rgba(6, 182, 212, .10), transparent 60%),
    radial-gradient(900px 700px at 78% 108%, rgba(99, 102, 241, .07), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
.topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--text); }
.topbar p { font-size: 12.8px; color: var(--muted); }
.brand-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.1px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.8px; }
.section-title { color: var(--muted); font-weight: 700; letter-spacing: .8px; font-size: 11px; }
.card-head h3 { font-size: 13.8px; font-weight: 700; letter-spacing: -.1px; }

/* 侧边栏：浅蓝渐变 + 玻璃感 */
.sidebar {
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(37, 99, 235, .10), transparent 70%),
    linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  border-right: 1px solid var(--line);
}
[data-theme="dark"] .sidebar { background: linear-gradient(180deg, #0b131d 0%, #0a1018 100%); }
.brand-mark { background: var(--grad-blue); box-shadow: 0 6px 16px rgba(37, 99, 235, .30); border-radius: 10px; }
.nav-group { color: #8fa4bf; }
.nav-item { color: var(--text-2); }
.nav-item:hover { background: rgba(37, 99, 235, .07); color: var(--accent); }
.nav-item.active {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent-line);
  box-shadow: 0 2px 10px rgba(37, 99, 235, .12);
  font-weight: 600;
}
.nav-item.active svg { color: var(--accent); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--grad-blue);
}
.nav-item { position: relative; }

/* 余额卡：浅蓝底 + 渐变描边 */
.balance-card {
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
  border-color: var(--accent-line);
  box-shadow: 0 4px 16px rgba(37, 99, 235, .08);
}
.balance-value #balanceVal {
  background: var(--grad-blue); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.balance-btn { background: #fff; border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.balance-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.server-chip { background: rgba(255, 255, 255, .8); border-color: var(--line); }
.server-chip:hover { border-color: var(--accent-line); color: var(--accent); }

/* 顶栏 */
.topbar { background: rgba(255, 255, 255, .72); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
[data-theme="dark"] .topbar { background: rgba(13, 21, 32, .8); }

/* 卡片与统计块 */
.card {
  background: var(--grad-soft);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(23, 58, 122, .04);
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.card:hover { box-shadow: 0 10px 30px rgba(37, 99, 235, .08); border-color: var(--accent-line); }
.card-head { background: linear-gradient(180deg, rgba(232, 241, 255, .55), transparent); border-bottom-color: var(--line); }
.stat {
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  border-color: var(--line);
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -34px; top: -34px; width: 96px; height: 96px;
  border-radius: 50%; background: radial-gradient(circle, rgba(37, 99, 235, .12), transparent 70%);
}
.stat .label { color: var(--muted); font-weight: 600; font-size: 12px; }
.stat .label svg { color: var(--accent); }
.stat .value { color: var(--text); }
.stat .foot { color: var(--muted); }

/* 按钮 */
.btn { background: #fff; border-color: var(--line-strong); color: var(--text-2); font-weight: 550; }
.btn:hover { background: #f6faff; border-color: var(--accent-line); color: var(--accent); }
.btn-primary {
  background: var(--grad-blue); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .28);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 6px 20px rgba(37, 99, 235, .34); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(37, 99, 235, .08); color: var(--accent); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* 表单 */
.input, .select, .textarea { background: #fff; border-color: var(--line-strong); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--accent-line); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.field > label { font-weight: 600; color: var(--text-2); letter-spacing: .1px; }

/* 表格 */
table.tbl th { background: #f6faff; color: #7b8ca3; font-weight: 600; letter-spacing: .2px; border-bottom-color: var(--line); }
table.tbl td { border-bottom-color: #eef4fc; }
table.tbl tbody tr:hover { background: #f7fbff; }

/* 标签与 chips */
.tag { background: #f2f7ff; border-color: var(--line); color: #4c6285; font-weight: 550; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.chip-pick { background: #fff; border-color: var(--line-strong); }
.chip-pick:hover { border-color: var(--accent); color: var(--accent); }
.chip-pick.on { background: var(--grad-blue); border-color: transparent; color: #fff; box-shadow: 0 3px 10px rgba(37, 99, 235, .25); }
.chip-prompt { background: #fff; border-color: var(--line); color: var(--text-2); }
.chip-prompt:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }

/* 对话 */
.msg.assistant .avatar { background: var(--grad-blue); box-shadow: 0 4px 12px rgba(37, 99, 235, .28); }
.msg.user .avatar { background: #fff; color: var(--accent); border: 1px solid var(--accent-line); }
.msg .who { color: #5b6f8a; }
.composer { border-color: var(--accent-line); box-shadow: 0 6px 22px rgba(37, 99, 235, .08); }
.composer:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.send-btn { background: var(--grad-blue); box-shadow: 0 4px 12px rgba(37, 99, 235, .28); }

/* 进度条/图表 */
.bar { background: #edf3fc; }
.bar.has { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.seg { background: #f2f7ff; border-color: var(--line); }
.seg button.active { background: #fff; color: var(--accent); box-shadow: 0 1px 4px rgba(37, 99, 235, .16); }

/* 时间线圆点着色 */
.wl-step.success .wl-dot { background: rgba(37, 99, 235, .10); color: var(--accent); }
.wl-step:not(:last-child)::after { background: linear-gradient(180deg, var(--accent-line), var(--line)); }

/* 代码块 */
.pre { background: #f7faff; border-color: var(--line); color: #3b4b60; }
.mono { color: #4a5f7d; }

/* 空态与滚动条 */
.empty svg { color: var(--accent); opacity: .5; }
::-webkit-scrollbar-thumb { background: #cfdcf0; }
::-webkit-scrollbar-thumb:hover { background: #a9bedd; }

/* ---- 细节打磨 ---- */
.chips-left { justify-content: flex-start; max-width: none; margin: 10px 0 0; }
.card-hero { position: relative; overflow: hidden; }
.card-hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad-blue); border-radius: var(--radius) 0 0 var(--radius);
}
.card-hero .card-head h3 svg { width: 15px; height: 15px; color: var(--accent); }
.card-hero .card-body { background: linear-gradient(180deg, rgba(232,241,255,.35), transparent 45%); }

/* 统计卡图标分色 */
.grid-4 > .stat:nth-child(1) .label svg { color: #2563eb; }
.grid-4 > .stat:nth-child(2) .label svg { color: #0ea5e9; }
.grid-4 > .stat:nth-child(3) .label svg { color: #6366f1; }
.grid-4 > .stat:nth-child(4) .label svg { color: #0f9d58; }
.grid-4 > .stat:nth-child(1)::after { background: radial-gradient(circle, rgba(37,99,235,.14), transparent 70%); }
.grid-4 > .stat:nth-child(2)::after { background: radial-gradient(circle, rgba(14,165,233,.14), transparent 70%); }
.grid-4 > .stat:nth-child(3)::after { background: radial-gradient(circle, rgba(99,102,241,.13), transparent 70%); }
.grid-4 > .stat:nth-child(4)::after { background: radial-gradient(circle, rgba(15,157,88,.12), transparent 70%); }

/* 图表底色柱子可见化 */
.bar { background: #e9f1fc; }
.bar.has { background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%); box-shadow: 0 2px 8px rgba(37,99,235,.22); }
.bars { position: relative; }
.bars::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* 顶栏标题左侧渐变装饰 */
.topbar-left { position: relative; padding-left: 12px; }
.topbar-left::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 3px;
  background: var(--grad-blue);
}

/* 弹窗与门卫卡也统一蓝调 */
.modal { background: #fff; border-color: var(--accent-line); }
.modal-head { background: linear-gradient(180deg, #f4f9ff, transparent); }
.modal-foot { background: #f7fbff; }
.gate-card { border-color: var(--accent-line); box-shadow: var(--shadow-lg); }
.gate .brand-mark { background: var(--grad-blue); }
.card-head h3 { display: flex; align-items: center; gap: 6px; }
.card-head h3 .sub { margin-left: 2px; }

/* 图表增强：网格 + 数值 */
.bars {
  background-image: repeating-linear-gradient(to top, transparent 0, transparent 33px, rgba(37,99,235,.06) 33px, rgba(37,99,235,.06) 34px);
  border-radius: 8px;
}
.bars::before { display: none; }
.bar-val { font-size: 10.5px; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.bar-col { justify-content: flex-end; }

/* ============ 抖音自动获客 ============ */
.dy-hero { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--accent-line);
  background: linear-gradient(120deg, #0b1e3d 0%, #12356b 42%, #0e7490 100%); color: #eaf2ff; }
.dy-hero-bg { position: absolute; inset: 0;
  background:
    radial-gradient(620px 300px at 88% -10%, rgba(6, 182, 212, .45), transparent 62%),
    radial-gradient(520px 260px at 6% 110%, rgba(59, 130, 246, .42), transparent 60%),
    radial-gradient(300px 200px at 55% 20%, rgba(147, 197, 253, .22), transparent 70%); }
.dy-hero-body { position: relative; display: flex; gap: 22px; padding: 24px 26px; align-items: stretch; }
.dy-hero-left { flex: 1; min-width: 0; }
.dy-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .13); color: #cfe3ff;
  border: 1px solid rgba(255, 255, 255, .18); }
.dy-badge svg { width: 13px; height: 13px; }
.dy-hero h2 { margin: 12px 0 4px; font-size: 25px; line-height: 1.25; letter-spacing: -.6px; color: #fff; font-weight: 750; }
.dy-hero-sub { font-size: 13px; color: #9dc0ea; letter-spacing: .3px; }
.dy-hero-tag { margin: 12px 0 0; font-size: 13.5px; line-height: 1.75; color: #d3e3f8; max-width: 640px; }
.dy-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dy-hero-actions .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #eaf2ff; }
.dy-hero-actions .btn:hover { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .35); }
.dy-hero-actions .btn-primary { background: linear-gradient(135deg, #38bdf8, #2563eb); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .45); }
.dy-audience { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; }
.dy-audience .muted { font-size: 12px; color: #8fb0d8; margin-right: 2px; }
.dy-audience .chip-pick { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #d6e6ff; }
.dy-hero-right { width: 232px; flex: none; display: flex; }
.dy-lic { flex: 1; border-radius: 13px; padding: 16px; background: rgba(6, 15, 30, .38);
  border: 1px solid rgba(255, 255, 255, .14); display: flex; flex-direction: column; justify-content: center; }
.dy-lic.ok { background: rgba(6, 78, 59, .35); border-color: rgba(52, 211, 153, .45); }
.dy-lic-title { font-size: 11.5px; letter-spacing: 1.2px; color: #8fb0d8; font-weight: 700; }
.dy-lic.ok .dy-lic-title { color: #6ee7b7; }
.dy-lic-code { font-size: 19px; font-weight: 750; color: #fff; margin: 6px 0 4px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.dy-lic-sub { font-size: 12px; color: #b6cdea; line-height: 1.5; }
.dy-lic-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .18); font-size: 11.5px; color: #8fb0d8; }

.dy-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.dy-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1180px) { .dy-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .dy-grid-2, .dy-grid-3 { grid-template-columns: 1fr; } .dy-hero-body { flex-direction: column; } .dy-hero-right { width: auto; } }

.dy-intro { margin: 0; font-size: 13.5px; line-height: 1.9; color: var(--text-2); }
.dy-mod { padding: 15px 16px; }
.dy-mod-head { display: flex; gap: 10px; align-items: flex-start; }
.dy-mod-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.dy-mod-icon svg { width: 16px; height: 16px; }
.dy-mod-name { font-size: 13.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; }
.dy-mod-name .tag { font-size: 10.5px; padding: 1px 6px; }
.dy-mod-desc { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 3px; }
.dy-points { margin: 11px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.dy-points li { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.dy-points li::marker { color: var(--accent); }

.dy-lock { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 11px;
  background: var(--warn-soft); border: 1px solid rgba(180, 83, 9, .22); margin-bottom: 14px; }
.dy-lock svg { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 2px; }
.dy-lock .strong { font-size: 13px; }
.dy-lock .muted { font-size: 12px; line-height: 1.65; margin-top: 2px; }
.dy-lic-panel { display: grid; gap: 7px; padding: 11px 13px; border-radius: 11px; background: var(--bg-sub);
  border: 1px solid var(--line); font-size: 12.5px; }
.dy-lic-panel > div { display: flex; align-items: center; gap: 8px; }
.dy-lic-panel .muted { min-width: 58px; }
.dy-lic-panel b { font-weight: 650; }
.dy-notes { margin: 0; padding-left: 17px; display: flex; flex-direction: column; gap: 6px; }
.dy-notes li { font-size: 12.5px; color: var(--text-2); line-height: 1.75; }
.dy-notes li::marker { color: var(--warn); }
.dy-faq { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.dy-faq details { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--bg-sub); }
.dy-faq summary { font-size: 12.8px; font-weight: 600; cursor: pointer; color: var(--text); }
.dy-faq details[open] summary { color: var(--accent); margin-bottom: 6px; }
.dy-faq details div { font-size: 12.3px; color: var(--text-2); line-height: 1.75; }
.dy-gift { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 12.3px; color: var(--text-2); line-height: 1.7; }
.dy-gift svg { width: 15px; height: 15px; color: var(--accent); flex: none; margin-top: 2px; }
.dy-link { display: flex; gap: 11px; align-items: center; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-sub); text-decoration: none; color: inherit; transition: .16s; }
.dy-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.dy-link-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: #fff; color: var(--accent); border: 1px solid var(--accent-line); }
.dy-link-icon svg { width: 15px; height: 15px; }
.dy-link .strong { font-size: 13px; }
.dy-link .muted { font-size: 12px; margin-top: 2px; line-height: 1.6; }
.dy-link > svg { width: 14px; height: 14px; color: var(--muted); margin-left: auto; flex: none; }

[data-theme="dark"] .dy-hero { border-color: #1e3a5f; }
[data-theme="dark"] .dy-link-icon { background: #0f1d2e; }

/* 备用网盘下载 */
.dy-cloud { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--bg-sub); border: 1px dashed var(--accent-line); }
.dy-cloud > svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.dy-cloud .strong { font-size: 12.8px; }
.dy-cloud .muted { font-size: 11.8px; margin-top: 2px; }

/* ============ AI 自动招聘 ============ */
.rc-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--bg-sub); }
.rc-step > b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--grad-blue); color: #fff; font-size: 12px; }
.rc-step .strong { font-size: 13px; }
.rc-step .muted { font-size: 12px; line-height: 1.6; margin-top: 2px; }

.rc-funnel { display: flex; align-items: flex-end; gap: 10px; height: 158px; padding: 6px 2px 0; }
.rc-fn { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.rc-fn-bar { width: 100%; max-width: 74px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #93c5fd, #2563eb);
  box-shadow: 0 2px 10px rgba(37, 99, 235, .18); min-height: 6px; transition: height .3s; }
.rc-fn-val { font-size: 15px; font-weight: 750; color: var(--text); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.rc-fn-lbl { font-size: 11.5px; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.rc-fn-rate { position: absolute; top: -2px; font-size: 10.5px; color: var(--accent); font-weight: 600; }
.rc-stage-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }

.rc-action { display: flex; gap: 11px; align-items: center; padding: 12px 15px; cursor: pointer; transition: .15s;
  border-bottom: 1px solid var(--line); }
.rc-action:last-child { border-bottom: 0; }
.rc-action:hover { background: var(--accent-soft); }
.rc-action-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: #fff; color: var(--accent); border: 1px solid var(--accent-line); }
.rc-action-icon svg { width: 15px; height: 15px; }
.rc-action .strong { font-size: 13px; }
.rc-action .muted { font-size: 11.8px; margin-top: 2px; line-height: 1.5; }
.rc-action > svg { width: 14px; height: 14px; color: var(--muted); margin-left: auto; flex: none; }

.rc-logs { max-height: 260px; overflow-y: auto; padding: 4px 2px; }
.rc-log { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 12.2px; color: var(--text-2); }
.rc-log-time { color: var(--muted); font-size: 11px; flex: none; font-variant-numeric: tabular-nums; }
.rc-log-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
.rc-log-dot.warn { background: var(--warn); }
.rc-log-dot.err { background: var(--danger); }

.rc-tip { font-size: 12.5px; line-height: 1.75; color: var(--text-2); padding: 11px 13px; border-radius: 10px;
  background: var(--bg-sub); border: 1px solid var(--line); }
.rc-tip b { display: block; color: var(--accent); font-size: 12.5px; margin-bottom: 3px; }

.rc-filters { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.rc-filters .select, .rc-filters .input { height: 34px; font-size: 12.5px; }
.rc-filters .select { width: auto; min-width: 120px; }
.rc-filters .input { flex: 1; min-width: 150px; }

.rc-score { display: inline-grid; place-items: center; min-width: 34px; height: 22px; padding: 0 6px; border-radius: 7px;
  font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums; }
.rc-score.hi { background: var(--ok-soft); color: var(--ok); }
.rc-score.mid { background: var(--accent-soft); color: var(--accent); }
.rc-score.low { background: var(--bg-sub); color: var(--muted); }

.rc-greet-head { padding: 10px 12px; border-radius: 10px; background: var(--bg-sub); border: 1px solid var(--line); margin-bottom: 12px; }

/* 会话 */
.rc-chat-wrap { display: flex; gap: 0; padding: 0 !important; max-width: none !important; height: calc(100vh - 130px); }
.content.chat-mode .rc-chat-wrap { height: 100%; }
.rc-chat-side { width: 268px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--bg-sub); }
.rc-chat-side-head { padding: 12px 14px; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.rc-chat-list { flex: 1; overflow-y: auto; }
.rc-chat-item { padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.rc-chat-item:hover { background: var(--accent-soft); }
.rc-chat-item.on { background: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.rc-ci-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; }
.rc-ci-sub { font-size: 11.8px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-ci-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rc-chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.rc-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.rc-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.rc-msg { display: flex; flex-direction: column; max-width: 76%; }
.rc-msg.in { align-self: flex-start; align-items: flex-start; }
.rc-msg.out { align-self: flex-end; align-items: flex-end; }
.rc-bubble { padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.rc-msg.in .rc-bubble { background: var(--bg-sub); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: 4px; }
.rc-msg.out .rc-bubble { background: var(--grad-blue); color: #fff; border-bottom-right-radius: 4px; }
.rc-meta { font-size: 10.8px; color: var(--muted); margin-top: 4px; }
.rc-msg-empty { margin: auto; text-align: center; color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rc-msg-empty svg { width: 26px; height: 26px; opacity: .5; }
.rc-draft { margin: 0 18px 10px; padding: 11px 13px; border-radius: 11px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.rc-draft-head { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-bottom: 7px; }
.rc-draft-head svg { width: 14px; height: 14px; color: var(--accent); }
.rc-draft-text { font-size: 12.8px; line-height: 1.75; color: var(--text); margin-bottom: 9px; white-space: pre-wrap; }
.rc-composer { padding: 10px 18px 14px; border-top: 1px solid var(--line); background: var(--bg); }
.rc-composer .textarea { font-size: 13px; }
.rc-composer-foot { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

.rc-cmd { margin-top: 14px; padding: 12px 14px; border-radius: 11px; background: var(--bg-sub); border: 1px dashed var(--accent-line); }
.rc-cmd-label { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.rc-cmd .pre { background: #fff; margin: 0; font-size: 12px; }

@media (max-width: 1000px) {
  .rc-chat-side { width: 190px; }
  .rc-chat-wrap { flex-direction: column; height: auto; }
}

/* 招聘 · 额度与节奏 */
.rc-kpi { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-sub); }
.rc-kpi-lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.rc-kpi-val { font-size: 22px; font-weight: 750; color: var(--text); letter-spacing: -.5px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.rc-kpi-val small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.rc-kpi-sub { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.rc-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .rc-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rc-slot { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rc-slot.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); background: var(--accent-soft); }
.rc-slot-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.rc-slot-top b { font-size: 12.5px; color: var(--text); }
.rc-slot-top span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-slot-bar { height: 5px; border-radius: 3px; background: #e9f1fc; margin: 8px 0 6px; overflow: hidden; }
.rc-slot-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.rc-slot-foot { font-size: 11px; color: var(--muted); }

/* 客户端更新提示条 */
.update-bar { display: flex; align-items: center; gap: 10px; padding: 9px 18px;
  background: linear-gradient(90deg, #eaf2ff, #f4faff 60%, #eef7ff);
  border-bottom: 1px solid var(--accent-line); font-size: 12.8px; color: var(--text-2); }
.update-bar .ub-icon { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: #fff; color: var(--accent); border: 1px solid var(--accent-line); flex: none; }
.update-bar .ub-icon svg { width: 13px; height: 13px; }
.update-bar .ub-text b { color: var(--accent); }
.update-bar .ub-spacer { flex: 1; }
.update-bar .ub-pct { font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ============ 领导驾驶舱 ============ */
.nav-item[data-id="dashboard"] { background: linear-gradient(90deg, rgba(37,99,235,.10), rgba(6,182,212,.06));
  border: 1px solid var(--accent-line); color: var(--accent); font-weight: 650; margin-bottom: 8px; }
.nav-item[data-id="dashboard"]:hover { background: linear-gradient(90deg, rgba(37,99,235,.16), rgba(6,182,212,.10)); }
.nav-item[data-id="dashboard"].active { background: var(--grad-blue); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(37,99,235,.28); }
.nav-item[data-id="dashboard"].active svg { color: #fff; }

.db-hero { display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: 16px; margin-bottom: 16px;
  background: linear-gradient(120deg, #0b1e3d 0%, #12356b 46%, #0e7490 100%); color: #eaf2ff; position: relative; overflow: hidden; }
.db-hero::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(520px 240px at 88% -20%, rgba(6,182,212,.42), transparent 62%),
              radial-gradient(420px 220px at 4% 120%, rgba(59,130,246,.40), transparent 62%); }
.db-hero-l { position: relative; flex: 1; min-width: 0; }
.db-hero-title { font-size: 21px; font-weight: 750; letter-spacing: -.4px; color: #fff; }
.db-hero-sub { font-size: 12.5px; color: #9dc0ea; margin-top: 5px; }
.db-hero-r { position: relative; text-align: right; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.16); }
.db-hero-num { font-size: 34px; font-weight: 780; letter-spacing: -1px; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.db-hero-num-lbl { font-size: 11.5px; color: #8fb0d8; margin-top: 2px; }

.db-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1280px) { .db-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.db-kpi { position: relative; overflow: hidden; padding: 15px 16px; border-radius: 13px;
  border: 1px solid var(--line); background: linear-gradient(180deg, #fff, #f7fbff); }
.db-kpi::after { content: ""; position: absolute; right: -26px; top: -26px; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.13), transparent 70%); }
.db-kpi-top { display: flex; align-items: center; gap: 7px; font-size: 12.3px; color: var(--muted); font-weight: 600; }
.db-kpi-ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.db-kpi-ic svg { width: 12px; height: 12px; }
.db-kpi-val { font-size: 27px; font-weight: 760; letter-spacing: -.8px; color: var(--text); margin: 7px 0 2px;
  font-variant-numeric: tabular-nums; }
.db-kpi-val small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.db-kpi-sub { font-size: 11.8px; color: var(--muted); line-height: 1.5; }
.db-kpi.c2 .db-kpi-ic { background: #e6f7ff; color: #0e7490; border-color: #bae6fd; }
.db-kpi.c3 .db-kpi-ic { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.db-kpi.c4 .db-kpi-ic { background: #ecfdf5; color: #0f9d58; border-color: #bbf7d0; }
.db-kpi.c5 .db-kpi-ic { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.db-kpi.c6 .db-kpi-ic { background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }

.db-row { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 1180px) { .db-row { grid-template-columns: 1fr; } }

.db-legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); }
.db-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.db-legend .lg-a { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.db-legend .lg-b { background: linear-gradient(180deg, #67e8f9, #0891b2); }

.db-bars { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding: 4px 2px 0;
  background-image: repeating-linear-gradient(to top, transparent 0, transparent 45px, rgba(37,99,235,.06) 45px, rgba(37,99,235,.06) 46px);
  border-radius: 8px; }
.db-bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.db-bar-vals { font-size: 10.5px; color: var(--accent); font-weight: 650; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.db-bar-stack { width: 100%; max-width: 46px; height: 78%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.db-bar { width: 100%; border-radius: 4px 4px 2px 2px; min-height: 0; transition: height .3s; }
.db-bar.b1 { background: linear-gradient(180deg, #93c5fd, #2563eb); box-shadow: 0 2px 8px rgba(37,99,235,.18); }
.db-bar.b2 { background: linear-gradient(180deg, #67e8f9, #0891b2); }
.db-bar-lbl { font-size: 11px; color: var(--muted); margin-top: 6px; }

.db-plat { margin-bottom: 11px; }
.db-plat:last-child { margin-bottom: 0; }
.db-plat-top { display: flex; justify-content: space-between; font-size: 12.3px; color: var(--text-2); margin-bottom: 5px; }
.db-plat-bar { height: 6px; border-radius: 4px; background: #eaf2fc; overflow: hidden; }
.db-plat-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #60a5fa, #2563eb); }

.db-fn { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; }
.db-fn:last-child { margin-bottom: 0; }
.db-fn-name { width: 76px; color: var(--text-2); flex: none; }
.db-fn-bar { flex: 1; height: 9px; border-radius: 5px; background: #eaf2fc; overflow: hidden; }
.db-fn-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #34d399, #0ea5e9); }
.db-fn-num { width: 40px; text-align: right; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.db-feed { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.db-feed:last-child { border-bottom: 0; }
.db-feed-tag { flex: none; font-size: 10.5px; font-weight: 650; padding: 2px 7px; border-radius: 6px; margin-top: 1px; }
.db-feed-tag.k-v { background: #e8f1ff; color: #2563eb; }
.db-feed-tag.k-c { background: #e6f7ff; color: #0e7490; }
.db-feed-tag.k-g { background: #eef2ff; color: #4f46e5; }
.db-feed-tag.k-p { background: #ecfdf5; color: #0f9d58; }
.db-feed-body { min-width: 0; }
.db-feed-title { font-size: 12.6px; color: var(--text); line-height: 1.5; }
.db-feed-sub { font-size: 11.4px; color: var(--muted); margin-top: 2px; }
