:root{
  --bg:#F4F6F9; --card:#FFFFFF; --line:#E3E7EE; --line2:#EEF1F5; --ink:#141821; --ink2:#3A4352; --mute:#556070;
  --blue:#1E4FD8; --blue2:#163BA3; --blueBg:#E6ECFB; --green:#146C37; --greenBg:#E3F2E9;
  --amber:#8A4B08; --amberBg:#FCEBD5; --red:#B4231A; --redBg:#FCECEA; --chat:#F3F1EC; --mine:#D9F2DF;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei","Noto Sans SC",sans-serif;font-size:14px}
button,input,select{font:inherit}
button{cursor:pointer}
h1,h2,h3{margin:0}
.boot{padding:40px;color:var(--mute)}
.muted{color:var(--mute)}
.num{font-variant-numeric:tabular-nums}

/* 登录 */
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.login-card{width:100%;max-width:880px;display:flex;flex-wrap:wrap;background:var(--card);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.login-form{flex:1 1 340px;padding:36px;display:flex;flex-direction:column;gap:14px}
.login-side{flex:1 1 300px;background:#141821;color:#fff;padding:36px;display:flex;flex-direction:column;gap:10px}
.login-side .acc{display:flex;justify-content:space-between;gap:8px;width:100%;text-align:left;background:#252C3A;border:1px solid #3A4458;color:#fff;border-radius:10px;padding:10px 12px;min-height:44px}
.login-side .acc span:last-child{color:#A9BBF0;font-size:12px}
label.field{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--mute)}
input.inp,select.inp{border:1px solid #DDE2EA;border-radius:10px;padding:10px 12px;min-height:44px;color:var(--ink);background:#fff}
.err{color:var(--red);font-size:13px;min-height:18px}

/* 框架 */
.shell{display:flex;min-height:100vh;flex-wrap:wrap}
.nav{flex:0 0 220px;background:#141821;color:#fff;padding:20px 14px;display:flex;flex-direction:column;gap:6px}
.nav .brand{font-weight:700;font-size:16px;padding:4px 10px 16px}
.nav .brand small{display:block;font-weight:400;font-size:12px;color:#A9B3C5;margin-top:4px}
.nav button{background:transparent;border:0;color:#C7D0E0;text-align:left;padding:11px 12px;border-radius:10px;min-height:44px}
.nav button.on{background:#252C3A;color:#fff;font-weight:600}
.nav .soon{font-size:12px;color:#7D879A;padding:10px 12px;line-height:1.6}
.nav .me{margin-top:auto;border-top:1px solid #2C3444;padding:14px 10px 0;font-size:13px;display:flex;flex-direction:column;gap:8px}
.nav .me button{border:1px solid #3A4458;text-align:center}
.main{flex:999 1 600px;min-width:0;padding:24px;display:flex;flex-direction:column;gap:16px}
.head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px}
.head .sub{font-size:13px;color:var(--mute);margin-bottom:4px}
.head h1{font-size:24px}
.tag{display:inline-block;white-space:nowrap;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px}
.t-blue{color:var(--blue2);background:var(--blueBg)} .t-green{color:var(--green);background:var(--greenBg)}
.t-amber{color:var(--amber);background:var(--amberBg)} .t-red{color:var(--red);background:var(--redBg)} .t-grey{color:var(--ink2);background:#F0F2F6}

.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px}
.card h2{font-size:17px;margin-bottom:12px}
.row{display:flex;flex-wrap:wrap;gap:16px}
.grow{flex:999 1 520px;min-width:0}
.side{flex:1 1 320px;min-width:0}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
.kpi{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:6px}
.kpi .l{font-size:13px;color:var(--mute)} .kpi .v{font-size:28px;font-weight:700;letter-spacing:-.01em}
.funnel{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}
.bar{height:8px;background:var(--blueBg);border-radius:4px;overflow:hidden}.bar i{display:block;height:8px;background:var(--blue)}
.alert{display:flex;gap:10px;padding:12px;border-radius:10px;margin-bottom:8px}
.alert b{display:block;font-size:14px;margin-bottom:3px}.alert span{font-size:12px;color:var(--ink2);line-height:1.5}
.a-bad{background:var(--redBg)}.a-warn{background:#FDF1E3}.a-good{background:#E7F5EC}
.tbl{overflow-x:auto}
table{width:100%;border-collapse:collapse;min-width:720px}
th{text-align:left;font-size:12px;color:var(--mute);font-weight:600;padding:10px;border-bottom:1px solid var(--line)}
td{padding:12px 10px;border-bottom:1px solid var(--line2)}
.btn{border:0;background:var(--ink);color:#fff;border-radius:8px;padding:8px 14px;min-height:38px;font-weight:600}
.btn.blue{background:var(--blue)} .btn.green{background:var(--green)}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid #DDE2EA;font-weight:500}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* 销售工作台 */
.ws{display:flex;flex-wrap:wrap;gap:14px;align-items:stretch}
.leads{flex:1 1 300px;max-width:360px;min-width:0;background:var(--card);border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;max-height:calc(100vh - 140px)}
.leads .tabs{display:flex;gap:6px;flex-wrap:wrap;padding:12px;border-bottom:1px solid var(--line2)}
.pill{border:1px solid #DDE2EA;background:#fff;border-radius:999px;padding:6px 12px;min-height:34px;font-size:13px;color:var(--ink2)}
.pill.on{background:var(--ink);color:#fff;border-color:var(--ink);font-weight:600}
.leads .list{overflow-y:auto}
.lead{display:flex;gap:10px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line2);border-left:3px solid transparent;background:#fff;padding:12px;color:inherit}
.lead.on{background:#F1F5FE;border-left-color:var(--blue)}
.avatar{width:38px;height:38px;flex:none;border-radius:50%;background:var(--greenBg);color:var(--green);display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.lead .b{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.lead .t{display:flex;justify-content:space-between;gap:6px}
.lead .m{font-size:12px;color:var(--ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lead .s{font-size:11px;color:var(--mute)}
.chat{flex:999 1 440px;min-width:0;background:var(--card);border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;max-height:calc(100vh - 140px)}
.chat .top{padding:14px 16px;border-bottom:1px solid var(--line2);display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}
.msgs{flex:1;overflow-y:auto;background:var(--chat);padding:16px;display:flex;flex-direction:column;gap:10px;min-height:300px}
.msg{max-width:74%;padding:10px 12px;border-radius:12px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.msg.c{align-self:flex-start;background:#fff;border-radius:12px 12px 12px 2px}
.msg.s{align-self:flex-end;background:var(--mine);border-radius:12px 12px 2px 12px}
.msg small{display:block;font-size:11px;color:var(--mute);margin-top:4px;text-align:right}
.composer{padding:12px;border-top:1px solid var(--line2);display:flex;gap:8px}
.composer textarea{flex:1;min-width:0;border:1px solid #DDE2EA;border-radius:10px;padding:10px 12px;min-height:44px;resize:vertical;font:inherit}
.info{flex:1 1 300px;max-width:360px;min-width:0;display:flex;flex-direction:column;gap:12px}
.kv{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:4px 0}.kv span:first-child{color:var(--mute)}
.ai{border:1px dashed #8FA8EE;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px;background:#F8FAFF}
.ai .lbl{font-size:12px;font-weight:700;color:var(--blue)}
.empty{padding:40px;text-align:center;color:var(--mute)}
[dir=rtl]{text-align:right}

#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#141821;color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;opacity:0;transition:opacity .2s;pointer-events:none;max-width:90vw}
#toast.show{opacity:1}

@media (max-width:760px){
  .nav{flex:1 1 100%;flex-direction:row;flex-wrap:wrap;align-items:center}
  .nav .brand{padding:4px 10px}
  .nav .soon{display:none}
  .nav .me{margin:0;border:0;padding:0;flex-direction:row;align-items:center}
  .main{padding:16px}
  .leads,.info{max-width:none}
  .leads,.chat{max-height:none}
}

/* ===== 经营驾驶舱 ===== */
:root{--navy:#0C1A2E;--navy2:#13274A;--sky:#7FA6FF;--onNavy:#E8EEFA;--onNavy2:#9FB0CC;--hair:#E6EAF0}
.dx{display:flex;flex-direction:column;gap:18px;max-width:1360px;width:100%}
.dx-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px}
.dx-eyebrow{font-size:12px;letter-spacing:.08em;color:var(--mute);font-weight:600;margin-bottom:6px}
.dx-title{font-size:26px;font-weight:700;letter-spacing:-.01em}
.dx-head-r{display:flex;gap:10px;align-items:center}
.dx-live{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--ink2);background:#fff;border:1px solid var(--hair);padding:5px 10px;border-radius:999px}
.dx-live i{width:7px;height:7px;border-radius:50%;background:#1F9D55;box-shadow:0 0 0 3px rgba(31,157,85,.15)}

.dx-hero{display:flex;flex-wrap:wrap;gap:24px;background:linear-gradient(135deg,var(--navy) 0%,var(--navy2) 100%);color:var(--onNavy);border-radius:20px;padding:28px;position:relative;overflow:hidden}
.dx-hero::after{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:32px 32px;pointer-events:none}
.dx-hero>*{position:relative;z-index:1}
.dx-hero-l{flex:1 1 300px;display:flex;flex-direction:column;gap:12px;min-width:0}
.dx-hero-r{flex:999 1 460px;min-width:0;display:flex;flex-direction:column;gap:8px}
.dx-hero-label{font-size:13px;color:var(--onNavy2);letter-spacing:.06em;font-weight:600}
.dx-hero-value{font-size:clamp(40px,5vw,60px);font-weight:700;letter-spacing:-.03em;line-height:1;color:#fff}
.dx-hero-delta{display:flex;flex-wrap:wrap;gap:10px;align-items:center;font-size:13px;color:var(--onNavy2)}
.dx-hero-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:rgba(255,255,255,.1);border-radius:12px;overflow:hidden;margin-top:auto}
.dx-hero-stats div{background:rgba(12,26,46,.55);padding:12px 14px;display:flex;flex-direction:column;gap:4px}
.dx-hero-stats span{font-size:12px;color:var(--onNavy2)}
.dx-hero-stats b{font-size:20px;color:#fff;letter-spacing:-.01em}
.dx-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--onNavy2)}
.dx-legend span{display:inline-flex;align-items:center;gap:6px}
.dx-lg-line{width:16px;height:2px;background:var(--sky);display:inline-block}
.dx-lg-dot{width:9px;height:9px;border-radius:50%;background:#F5C66B;display:inline-block}
.dx-hero-chart{width:100%;height:auto;display:block}
.dx-grid{stroke:rgba(255,255,255,.08);stroke-width:1}
.dx-axis{fill:var(--onNavy2);font-size:11px;font-family:inherit}
.dx-area-line{fill:none;stroke:var(--sky);stroke-width:2.2}
.dx-deal{fill:#F5C66B;stroke:var(--navy);stroke-width:2}

.dx-chip{display:inline-block;font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;white-space:nowrap;font-variant-numeric:tabular-nums}
.dx-up{color:#0F6B3A;background:#DDF3E6}.dx-down{color:#A3241B;background:#FBE5E3}.dx-flat{color:#3A4352;background:#EEF1F5}
.dx-hero .dx-up{color:#7EE2A8;background:rgba(126,226,168,.14)}.dx-hero .dx-down{color:#FFA39B;background:rgba(255,163,155,.14)}.dx-hero .dx-flat{color:var(--onNavy);background:rgba(255,255,255,.1)}

.dx-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.dx-kpi{background:#fff;border:1px solid var(--hair);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:8px;min-width:0}
.dx-kpi-ring{flex-direction:row;justify-content:space-between;align-items:center;gap:12px}
.dx-kpi-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;color:var(--mute);font-weight:500}
.dx-kpi-v{font-size:34px;font-weight:700;letter-spacing:-.02em;line-height:1.1}
.dx-kpi-v small{font-size:18px;font-weight:600;margin-left:2px;color:var(--mute)}
.dx-kpi-foot{font-size:12px;color:var(--mute);line-height:1.5}
.dx-spark{width:100%;height:44px;display:block}
.dx-spark-line{fill:none;stroke:var(--blue);stroke-width:2}
.dx-spark-fill{fill:var(--blueBg);opacity:.7}
.dx-spark-dot{fill:var(--blue);stroke:#fff;stroke-width:2}
.dx-ring{width:84px;height:84px;flex:none}
.dx-ring-bg{fill:none;stroke:#EEF1F5;stroke-width:8}
.dx-ring-fg{fill:none;stroke-width:8;stroke-linecap:round}
.dx-good .dx-ring-fg{stroke:#1F9D55}.dx-warn .dx-ring-fg{stroke:#D98A1C}.dx-bad .dx-ring-fg{stroke:#C8372D}
.dx-meter{height:6px;background:#EEF1F5;border-radius:3px;overflow:hidden}
.dx-meter i{display:block;height:6px;background:var(--blue);border-radius:3px}

.dx-row{display:flex;flex-wrap:wrap;gap:16px}
.dx-grow{flex:999 1 520px;min-width:0}
.dx-side{flex:1 1 340px;min-width:0}
.dx-card{background:#fff;border:1px solid var(--hair);border-radius:16px;padding:20px}
.dx-card-h{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:16px}
.dx-card-h h2{font-size:17px;font-weight:700}
.dx-card-h span{font-size:12px;color:var(--mute)}

.dx-funnel{display:flex;flex-direction:column;gap:12px}
.dx-f-row{display:grid;grid-template-columns:72px 1fr 52px 56px;gap:12px;align-items:center}
.dx-f-label{font-size:13px;color:var(--ink2)}
.dx-f-track{height:30px;background:#F3F5F9;border-radius:8px;overflow:hidden}
.dx-f-bar{height:30px;background:linear-gradient(90deg,var(--blue),#5C82F0);border-radius:8px}
.dx-f-val{font-size:18px;font-weight:700;text-align:right}
.dx-f-conv{text-align:right}

.dx-alerts{display:flex;flex-direction:column;gap:10px}
.dx-alert{display:flex;gap:12px;padding:12px;border-radius:12px;border:1px solid var(--hair);align-items:flex-start}
.dx-alert b{display:block;font-size:13px;line-height:1.45}
.dx-alert p{margin:4px 0 0;font-size:12px;color:var(--mute);line-height:1.5}
.dx-sev{flex:none;font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px}
.dx-a-bad .dx-sev{color:#fff;background:#C8372D}.dx-a-warn .dx-sev{color:#7A4207;background:#FCE7C8}.dx-a-good .dx-sev{color:#0F6B3A;background:#DDF3E6}

.dx-reps{display:flex;flex-direction:column}
.dx-rep{display:grid;grid-template-columns:28px minmax(180px,1.4fr) minmax(160px,1.2fr) repeat(3,minmax(96px,.7fr));gap:16px;align-items:center;padding:14px 4px;border-top:1px solid #F0F2F6}
.dx-rep:first-child{border-top:0}
.dx-rank{font-size:15px;font-weight:700;color:var(--mute);text-align:center}
.dx-rep:first-child .dx-rank{color:#B7791F}
.dx-who{display:flex;gap:12px;align-items:center;min-width:0}
.dx-who b{font-size:14px}.dx-who small{display:block;font-size:12px;color:var(--mute);margin-top:2px}
.dx-av{width:38px;height:38px;flex:none;border-radius:12px;background:var(--navy);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700}
.dx-gmv{display:flex;flex-direction:column;gap:6px}
.dx-gmv-v{font-size:16px;font-weight:700}
.dx-metric{display:flex;flex-direction:column;gap:3px}
.dx-metric small{font-size:11px;color:var(--mute)}
.dx-metric b{font-size:14px}
.dx-t-good{color:#0F6B3A}.dx-t-warn{color:#A35E0B}.dx-t-bad{color:#A3241B}.dx-t-flat{color:var(--ink2)}

.dx-table{min-width:820px}
.dx-table td small{display:block;font-size:12px;color:var(--mute);margin-top:2px;font-weight:400}
.dx-roas{display:flex;align-items:center;gap:10px}.dx-roas .dx-meter{flex:1}
.dx-roas b{min-width:52px;text-align:right}

@media (max-width:760px){
  .dx-hero{padding:20px}
  .dx-hero-stats b{font-size:16px}
  .dx-rep{grid-template-columns:28px 1fr;gap:10px}
  .dx-rep>.dx-gmv,.dx-rep>.dx-metric{grid-column:2}
  .dx-f-row{grid-template-columns:64px 1fr 44px;}
  .dx-f-conv{display:none}
}
@media (prefers-reduced-motion:no-preference){.dx-f-bar,.dx-meter i{transition:width .6s ease}}
.dx-grow{display:flex;flex-direction:column}
.dx-funnel{gap:16px}
.dx-insights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:auto;padding-top:20px}
.dx-insights div{background:#F6F8FB;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:4px}
.dx-insights small{font-size:12px;color:var(--mute)}
.dx-insights b{font-size:20px;letter-spacing:-.01em}
.dx-metric .dx-chip{align-self:flex-start}

/* ===== 统一风格：导航与各页面 ===== */
.nav{flex:0 0 248px;background:linear-gradient(180deg,#0C1A2E 0%,#0F2140 100%);padding:20px 14px;gap:4px;position:sticky;top:0;height:100vh;overflow-y:auto}
.nav .brand{display:flex;gap:12px;align-items:center;padding:4px 8px 18px;font-size:15px}
.nav .brand small{font-size:11px;color:#8FA0BD;margin-top:3px}
.brand-mark{width:36px;height:36px;flex:none;border-radius:10px;background:linear-gradient(135deg,#7FA6FF,#2457F5);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:17px}
.nav-sec{font-size:11px;color:#6F82A3;letter-spacing:.08em;padding:14px 10px 6px;font-weight:600}
.nav-sec span{font-weight:500;margin-left:4px}
.nav .nav-item{display:flex;align-items:center;gap:12px;width:100%;padding:9px 10px;border-radius:10px;color:#B9C6DC;min-height:50px;background:transparent;border:0;text-align:left}
.nav button.nav-item:hover{background:rgba(255,255,255,.05);color:#fff}
.nav .nav-item.on{background:rgba(127,166,255,.14);color:#fff}
.nav .nav-item.on .nav-ico{color:#7FA6FF}
.nav-ico{width:20px;height:20px;flex:none}
.nav-txt{display:flex;flex-direction:column;gap:1px;min-width:0}
.nav-txt b{font-size:14px;font-weight:600}
.nav-txt small{font-size:11px;color:#7C8DAB;letter-spacing:.02em}
.nav .nav-item.on .nav-txt small{color:#A9BDE6}
.nav-soon{opacity:.55;cursor:default}
.nav-soon em{margin-left:auto;font-style:normal;font-size:10px;font-weight:700;color:#C9D4E8;border:1px solid #33476B;padding:2px 6px;border-radius:6px}
.nav .me{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding:14px 6px 0;display:flex;flex-direction:row;align-items:center;gap:10px}
.me-av{width:34px;height:34px;flex:none;border-radius:50%;background:#1E3A66;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700}
.me-txt{flex:1;min-width:0;display:flex;flex-direction:column}
.me-txt b{font-size:13px}.me-txt small{font-size:11px;color:#8FA0BD;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav .me .me-out{flex:none;width:36px;height:36px;min-height:36px;padding:0;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:transparent;color:#C9D4E8;display:inline-flex;align-items:center;justify-content:center}
.nav .me .me-out:hover{background:rgba(255,255,255,.06)}
.main{background:var(--bg)}

/* 通用卡片升级 */
.card{border-radius:16px;border-color:var(--hair);padding:20px}
.card h2{font-size:17px}
.card .dx-card-h{margin-bottom:14px}
th{font-size:12px;letter-spacing:.02em;color:var(--mute);background:#F8FAFC;border-bottom:1px solid var(--hair)}
th:first-child{border-top-left-radius:10px}th:last-child{border-top-right-radius:10px}
td{border-bottom:1px solid #F0F2F6}
td small{display:block;font-size:12px;color:var(--mute);margin-top:2px}
.btn{border-radius:10px}
.btn.ghost:hover{background:#F6F8FB}

/* 迷你概览条 */
.dx-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1px;background:var(--hair);border:1px solid var(--hair);border-radius:16px;overflow:hidden}
.dx-strip div{background:#fff;padding:14px 18px;display:flex;flex-direction:column;gap:4px}
.dx-strip span{font-size:12px;color:var(--mute)}
.dx-strip b{font-size:22px;font-weight:700;letter-spacing:-.01em}
.dx-warn-t{color:#A35E0B}.dx-bad-t{color:#A3241B}

/* 销售工作台 */
.leads,.chat{border-radius:16px;border-color:var(--hair);max-height:calc(100vh - 230px);min-height:520px}
.leads .tabs{padding:14px}
.pill{border-radius:999px;display:inline-flex;align-items:center;gap:6px}
.pill-n{font-size:11px;font-weight:700;background:#EEF1F5;color:var(--ink2);padding:1px 7px;border-radius:999px}
.pill.on .pill-n{background:rgba(255,255,255,.18);color:#fff}
.pill.on{background:var(--navy);border-color:var(--navy)}
.lead{padding:12px 14px;border-left:3px solid transparent}
.lead:hover{background:#F8FAFC}
.lead.on{background:#EEF3FE;border-left-color:#2457F5}
.avatar{border-radius:12px;background:var(--navy);color:#fff;font-size:11px;letter-spacing:.04em}
.chat .top{padding:16px 18px}
.msgs{background:#F5F6F8;background-image:radial-gradient(#E3E7EE 1px,transparent 1px);background-size:18px 18px}
.msg{box-shadow:0 1px 1px rgba(12,26,46,.06)}
.msg.s{background:#DCF5E3}
.composer{padding:14px}
.composer textarea{border-radius:12px}
.info .card{padding:18px}
.ai{border:0;background:linear-gradient(160deg,#0C1A2E,#16305A);color:#E8EEFA;border-radius:16px;padding:16px;gap:10px}
.ai .lbl{color:#9DBBFF;font-size:12px}
.ai .lbl small{color:#7C8DAB;font-weight:500}
.ai .muted{color:#9FB0CC}
.ai .btn.blue{background:#fff;color:var(--navy)}

/* 投流 */
.dx-hero-sm{padding:20px}
.dx-hero-sm .dx-hero-stats{flex:1 1 100%;margin:0}
.dx-stats-5{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.dx-stats-4{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.dx-hero-stats small{font-size:11px;color:#8FA0BD}
.dx-meter-dark{background:rgba(255,255,255,.12);margin-top:6px}.dx-meter-dark i{background:#7FA6FF}
.dx-camps{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px}
.dx-camp{display:flex;flex-direction:column;gap:14px}
.dx-camp-h{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.dx-camp-h b{font-size:15px}.dx-camp-h small{display:block;font-size:12px;color:var(--mute);margin-top:3px}
.dx-camp-roas{display:flex;align-items:center;gap:14px}
.dx-camp-roas small{display:block;font-size:11px;color:var(--mute)}
.dx-camp-roas b{font-size:28px;letter-spacing:-.02em}
.dx-camp-roas .dx-meter{flex:1}
.dx-camp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--hair);border-radius:12px;overflow:hidden}
.dx-camp-grid div{background:#F8FAFC;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.dx-camp-grid small{font-size:11px;color:var(--mute)}.dx-camp-grid b{font-size:15px}
.dx-camp .dx-alert{padding:10px 12px}
.dx-camp .dx-alert p{font-size:12px;color:var(--ink2)}
.dx-budget{display:flex;flex-direction:column;gap:6px}
.dx-budget-row{display:flex;gap:8px}.dx-budget-row .inp{flex:1;min-width:0}
.dx-a-info .dx-sev{color:var(--ink2);background:#EEF1F5}

@media (max-width:760px){
  .nav{position:static;height:auto;flex:1 1 100%;flex-direction:row;flex-wrap:wrap;gap:6px;padding:12px}
  .nav .brand{flex:1 1 100%;padding:4px}
  .nav-sec,.nav-soon{display:none}
  .nav .nav-item{width:auto;flex:1 1 140px;min-height:44px}
  .nav .me{flex:1 1 100%;margin-top:6px}
  .leads,.chat{max-height:none;min-height:0}
}
.dx-camps{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.chat .top .tag{align-self:flex-start}
@media (min-width:761px){
  .shell{height:100vh;overflow:hidden;flex-wrap:nowrap}
  .nav{height:100vh}
  .main{height:100vh;overflow-y:auto}
}
.dx-hero-stats .dx-meter{padding:0;display:block;height:6px;gap:0;background:rgba(255,255,255,.12);margin-top:8px}.dx-hero-stats .dx-meter i{background:#7FA6FF}

/* ===== 对齐修正：投流运营 ===== */
.dx-camps{grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr));align-items:stretch}
.dx-camp{height:100%}
.dx-camp-h>div{min-width:0}
.dx-camp-h small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dx-camp-h .dx-live{flex:none;white-space:nowrap}
.dx-camp-roas{min-height:52px}
.dx-camp-grid b{white-space:nowrap}
.dx-camp .dx-alert{min-height:58px;align-items:center}
.dx-camp .dx-budget{margin-top:auto}
.dx-hero-sm .dx-hero-stats{background:rgba(255,255,255,.08)}
.dx-hero-sm .dx-hero-stats>div{background:rgba(12,26,46,.35)}

/* ===== 对齐修正：销售工作台（三栏等高，各自滚动） ===== */
@media (min-width:1100px){
  .ws{display:grid;grid-template-columns:minmax(280px,320px) minmax(0,1fr) minmax(300px,340px);gap:14px;height:calc(100vh - 262px);min-height:560px;align-items:stretch}
  .ws>.leads,.ws>.chat,.ws>.info{max-width:none;max-height:none;min-height:0;height:100%}
  .ws>.info{overflow-y:auto;padding-right:2px}
}
.leads .tabs{flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:12px;scrollbar-width:none}
.leads .tabs::-webkit-scrollbar{display:none}
.leads .tabs .pill{flex:none;padding:5px 10px;font-size:12px;min-height:32px}
.leads .list{flex:1;min-height:0}
.chat .msgs{min-height:0}
.info{gap:12px}
.info>*{flex:none}
.leads .tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:10px;overflow:visible}
.leads .tabs .pill{flex-direction:column;justify-content:center;gap:2px;padding:6px 2px;border-radius:10px;min-height:48px;font-size:12px;border-color:transparent;background:#F4F6F9}
.leads .tabs .pill.on{background:var(--navy);color:#fff}
.leads .tabs .pill-n{background:transparent;padding:0;font-size:13px}

/* ===== 开通账号与权限 ===== */
.dx-mform{border:2px solid #2457F5}
.dx-mgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.dx-perms{border:0;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}
.dx-perms legend{font-size:13px;font-weight:700;margin-bottom:10px;padding:0}
.dx-perms legend span{font-weight:400;font-size:12px;color:var(--mute);margin-left:6px}
.dx-perm{display:flex;gap:10px;align-items:center;border:1px solid var(--hair);border-radius:10px;padding:10px 12px;cursor:pointer;min-height:44px;box-sizing:border-box}
.dx-perm input{width:18px;height:18px;accent-color:#2457F5;margin:0;flex:none}
.dx-perm span{display:flex;flex-direction:column}.dx-perm b{font-size:13px}.dx-perm small{font-size:11px;color:var(--mute)}
.dx-perm:has(input:checked){border-color:#2457F5;background:#F3F6FE}
.dx-mfoot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:16px}
.dx-pchips{display:flex;flex-wrap:wrap;gap:4px}
.dx-pchip{font-size:11px;font-weight:600;color:#1A3FB8;background:#EEF3FE;padding:3px 8px;border-radius:6px;white-space:nowrap}
.dx-acts{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.dx-creds{border:2px solid #1F9D55;background:#F2FBF5}
.dx-creds-row{display:flex;flex-wrap:wrap;gap:16px;align-items:center}
.dx-creds-row div{display:flex;flex-direction:column;gap:2px;min-width:180px}
.dx-creds-row small{font-size:12px;color:var(--mute)}.dx-creds-row b{font-size:16px}
.dx-perms{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:760px){.dx-perms{grid-template-columns:1fr}}

/* ===== 素材中心 ===== */
.dx-drop{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;border:2px dashed #A9BBF0;background:#F5F8FF;border-radius:14px;padding:22px 14px;cursor:pointer;position:relative}
.dx-drop b{font-size:14px}.dx-drop small{font-size:12px;color:var(--mute);line-height:1.5}
.dx-file{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.dx-tags{border:0;margin:14px 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.dx-tags legend{font-size:13px;font-weight:700;margin-bottom:8px;padding:0}
.dx-tag{cursor:pointer}.dx-tag input{position:absolute;opacity:0;width:1px;height:1px}
.dx-tag span{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border:1px solid var(--hair);border-radius:999px;font-size:12px;font-weight:600;color:var(--ink2);background:#fff}
.dx-tag input:checked+span{border-color:#2457F5;background:#EEF3FE;color:#1A3FB8}
.dx-tag input:focus-visible+span{outline:2px solid #2457F5;outline-offset:2px}
#crForm{display:flex;flex-direction:column;gap:12px}
.dx-upl{border:1px solid var(--hair);border-radius:14px;padding:16px;background:#fff;display:flex;flex-direction:column;gap:14px}
.dx-upl+.dx-upl{margin-top:12px}
.dx-up-h{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.dx-up-h b{font-size:15px}.dx-up-h small{display:block;font-size:12px;color:var(--mute);margin-top:3px}
.dx-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.dx-steps li{display:flex;gap:12px;align-items:flex-start}
.dx-steps b{font-size:13px;display:block}.dx-steps small{font-size:12px;color:var(--mute)}
.dx-st-dot{width:22px;height:22px;flex:none;border-radius:50%;border:2px solid #C9D0DA;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:#fff;box-sizing:border-box}
.dx-st-done .dx-st-dot{background:#1F9D55;border-color:#1F9D55}
.dx-st-now .dx-st-dot{border-color:#2457F5;background:#fff;box-shadow:0 0 0 4px #E2EAFE}
.dx-st-now b{color:#1A3FB8}.dx-st-todo b{color:var(--mute)}
@media (prefers-reduced-motion:no-preference){.dx-st-now .dx-st-dot{animation:dxPulse 1.2s ease-in-out infinite}}
@keyframes dxPulse{50%{box-shadow:0 0 0 7px #EEF3FE}}
.dx-vars{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.dx-var{border:1px solid var(--hair);border-radius:12px;overflow:hidden;display:flex;flex-direction:column}
.dx-var-pv{height:150px;background:#0C1A2E;display:flex;align-items:center;justify-content:center;position:relative}
.dx-var-pv em{position:absolute;right:10px;bottom:10px;font-style:normal;font-size:11px;font-weight:700;color:#fff;background:rgba(0,0,0,.5);padding:2px 7px;border-radius:6px}
.dx-var-frame{background:#1F3150;color:#C7D2E8;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.dx-r-9-16{width:70px;height:124px}.dx-r-16-9{width:190px;height:107px}.dx-r-1-1{width:120px;height:120px}
.dx-var-b{padding:12px;display:flex;flex-direction:column;gap:6px;flex:1}
.dx-var-b b{font-size:13px}.dx-var-b small{font-size:12px;color:var(--mute);line-height:1.5}
.dx-var-b .dx-acts{margin-top:auto;padding-top:4px}
.dx-var-b .btn{font-size:12px;padding:7px 10px;min-height:36px}
.dx-warnbox{font-size:12px;color:#7A1F17;background:#FBE5E3;border-radius:8px;padding:8px 10px;line-height:1.5;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.dx-empty{border:1px dashed var(--hair);border-radius:14px;padding:30px;text-align:center}
.dx-empty b{font-size:15px}.dx-empty p{margin:8px auto 0;font-size:13px;color:var(--mute);max-width:420px;line-height:1.6}

/* ===== 市场雷达 ===== */
.dx-sugg{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between}
.dx-sugg-l{flex:1 1 480px;display:flex;flex-direction:column;gap:6px;min-width:0}
.dx-sugg-l b{font-size:19px;line-height:1.45;color:#fff}.dx-sugg-l small{font-size:13px;color:var(--onNavy2);line-height:1.5}
.dx-btn-w{background:#fff;color:var(--navy)}.dx-btn-o{background:transparent;border:1px solid #4A5D80;color:#fff}
.dx-mkts{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.dx-mkt{display:flex;flex-direction:column;gap:10px}
.dx-mkt-new{border:2px solid #8FA8EE}
.dx-mkt-score{display:flex;align-items:baseline;gap:4px}.dx-mkt-score b{font-size:36px;letter-spacing:-.02em}.dx-mkt-score small{color:var(--mute)}
.dx-kvs{display:flex;flex-direction:column;gap:6px}
.dx-kvs div{display:flex;justify-content:space-between;gap:10px;font-size:12px}.dx-kvs span{color:var(--mute)}
.dx-mkt-adv{margin:auto 0 0;padding-top:10px;border-top:1px solid #F0F2F6;font-size:12px;color:var(--ink2);line-height:1.55}
.dx-new{color:#1A3FB8;background:#E6ECFB}
.dx-list{display:flex;flex-direction:column}
.dx-li{display:flex;gap:12px;align-items:center;padding:11px 0;border-top:1px solid #F0F2F6}
.dx-li:first-child{border-top:0}
.dx-li>div{flex:1;min-width:0}.dx-li b{font-size:13px;display:block}.dx-li small{font-size:12px;color:var(--mute);display:block;margin-top:2px}
.dx-li-k{flex:none;width:56px;font-size:12px;font-weight:700;color:#1A3FB8;background:#EEF3FE;border-radius:8px;padding:6px 0;text-align:center}
.dx-faqs{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.dx-faq{border:1px solid var(--hair);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:8px}
.dx-faq-h{display:flex;justify-content:space-between;gap:8px}.dx-faq-h b{font-size:14px}.dx-faq-h span{font-weight:800;color:#1A3FB8}
.dx-faq small{font-size:12px;color:var(--mute);line-height:1.5}

/* ===== AI 自动回复 ===== */
.dx-rules{display:flex;flex-direction:column}
.dx-rule{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 0;border-top:1px solid #F0F2F6;font-size:13px}
.dx-rule:first-child{border-top:0}
.dx-seg{display:inline-flex;background:#F1F4F9;border-radius:10px;padding:3px;flex:none}
.dx-seg button{border:0;background:transparent;font-size:12px;padding:6px 10px;border-radius:8px;color:var(--ink2);min-height:32px}
.dx-seg button.on{background:#fff;color:#1A3FB8;font-weight:700;box-shadow:0 1px 2px rgba(12,26,46,.12)}
.dx-seg button.on.dx-seg-h{color:#A3241B}
.dx-seg button:disabled{color:#A6AEBB;cursor:not-allowed}
.dx-redline{margin-top:14px;background:#FBE5E3;border-radius:12px;padding:12px 14px;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:6px 16px;font-size:12px;color:#5B1712;line-height:1.5}
.dx-redline b{grid-column:1/-1;color:#7A1F17;font-size:13px}
.dx-test{display:flex;flex-direction:column;gap:8px}
.dx-test textarea{min-height:96px;font:inherit}
.dx-result{margin-top:14px;border-top:1px solid #F0F2F6;padding-top:14px;display:flex;flex-direction:column;gap:10px}
.dx-draft{background:linear-gradient(160deg,#0C1A2E,#16305A);color:#E8EEFA;border-radius:12px;padding:12px 14px;line-height:1.65;font-size:14px}
.dx-col{display:flex;flex-direction:column;gap:16px}
.dx-termform{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:8px;margin-top:12px}
.dx-termform .inp{min-width:0}
.dx-filebtn{margin-top:12px;display:inline-flex;align-items:center;justify-content:center;position:relative;cursor:pointer;width:100%;box-sizing:border-box}
.dx-tone{gap:10px}.dx-tone-sel{flex:none;width:120px;min-height:38px;padding:6px 8px}
@media (max-width:760px){.dx-termform{grid-template-columns:1fr 1fr}.dx-rule{flex-direction:column;align-items:flex-start}}
.dx-mkts{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}

/* ===== 集成与接口 ===== */
.dx-igroup{display:flex;flex-direction:column;gap:12px}
.dx-igroup-h{font-size:16px;font-weight:800;margin:6px 0 0}.dx-igroup-h span{font-size:12px;font-weight:500;color:var(--mute);margin-left:6px}
.dx-ints{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:14px;align-items:start}
.dx-int{display:flex;flex-direction:column;gap:12px}
.dx-int-open{grid-column:1/-1;border:2px solid #2457F5}
.dx-int-h{display:flex;align-items:center;gap:12px}
.dx-int-ico{width:42px;height:42px;flex:none;border-radius:12px;background:var(--navy);color:#9DBBFF;display:inline-flex;align-items:center;justify-content:center}
.dx-int-t{flex:1;min-width:0}.dx-int-t b{font-size:15px;display:block}.dx-int-t small{font-size:12px;color:var(--mute)}
.dx-int-d{margin:0;font-size:13px;color:var(--ink2);line-height:1.6}
.dx-int-msg{font-size:12px;color:#0F6B3A;background:#ECF8F1;border-radius:8px;padding:8px 10px;line-height:1.5}
.dx-int-msg.bad{color:#7A1F17;background:#FBE5E3}
.dx-int-form{display:flex;flex-direction:column;gap:14px;border-top:1px solid #F0F2F6;padding-top:14px}
.dx-int-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.dx-ichecks{border:0;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px;grid-column:1/-1}
.dx-ichecks legend{font-size:13px;color:var(--mute);margin-bottom:6px;padding:0}
.dx-int-info{display:flex;flex-direction:column;gap:6px;background:#F6F8FB;border-radius:10px;padding:10px 12px}
.dx-int-info small{font-size:12px;color:var(--mute)}
.dx-int-info>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.dx-int-info code{flex:1;min-width:0;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;color:var(--ink);word-break:break-all}
.dx-int-acts{display:flex;flex-wrap:wrap;gap:8px}
.dx-secret{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14px;word-break:break-all}
.msg-sys{align-self:center;font-size:12px;color:var(--ink2);background:#fff;border:1px solid var(--hair);border-radius:999px;padding:4px 12px}

/* ===== 登录与总台 ===== */
.dx-login-brand{display:flex;align-items:center;gap:12px}
.dx-login-brand b{font-size:17px;display:block}.dx-login-brand small{font-size:12px;color:var(--mute)}
.dx-login-tabs{display:flex;width:100%}
.dx-login-tabs button{flex:1;min-height:40px;font-size:13px}
.dx-login-f{display:flex;flex-direction:column;gap:14px}
.dx-code-row{display:flex;gap:8px}.dx-code-row .inp{flex:1;min-width:0}.dx-code-row .btn{flex:none;min-width:116px}
.dx-devcode{font-size:13px;background:#FFF7E6;color:#7A4207;border-radius:8px;padding:8px 12px}
.dx-login-pitch{justify-content:center;gap:14px;background:linear-gradient(160deg,#0C1A2E,#16305A)}
.dx-pitch-list{margin:6px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px;font-size:13px;color:#DCE5F5}
.dx-pitch-list li{padding-left:18px;position:relative}.dx-pitch-list li::before{content:"";position:absolute;left:0;top:7px;width:7px;height:7px;border-radius:50%;background:#7FA6FF}
