:root{
  --bg:#F5F6F7; --surface:#fff; --surface-2:#FAFBFC;
  --line:#E4E6EB; --line-strong:#D5D8DE;
  --text:#1F2329; --text-2:#4E5561; --muted:#8F959E;
  --brand:#3370FF; --brand-weak:#EAF1FF; --brand-deep:#245BDB;
  --ok:#2EA121; --ok-weak:#E8F7E6;
  --warn:#DE7802; --warn-weak:#FFF4E6;
  --danger:#D83931; --danger-weak:#FDECEC;
  --radius:12px; --radius-sm:8px;
  --shadow:0 1px 2px rgba(31,35,41,.05),0 4px 14px rgba(31,35,41,.06);
  --font:"PingFang SC","Microsoft YaHei","HarmonyOS Sans SC",system-ui,-apple-system,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  background:var(--bg);color:var(--text);font:14px/1.6 var(--font);
  -webkit-font-smoothing:antialiased;
}
button{font:inherit;color:inherit}
h1,h2,h3,p{margin:0}

/* ---------- topbar ---------- */
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  padding:22px 40px 18px;background:var(--surface);border-bottom:1px solid var(--line);
}
.greet h1{font-size:22px;line-height:1.35;font-weight:600;letter-spacing:.01em}
.greet p{margin-top:4px;color:var(--muted);font-size:13px}
.top-actions{display:flex;align-items:center;gap:14px;flex:0 0 auto}
.agent-btn{
  display:inline-flex;align-items:center;gap:8px;
  height:36px;padding:0 14px;border-radius:18px;
  border:1px solid var(--line-strong);background:var(--surface);
  cursor:pointer;font-size:13px;transition:border-color .15s,background .15s;
}
.agent-btn:hover{border-color:var(--brand);background:var(--brand-weak)}
.agent-btn .dot{width:8px;height:8px;border-radius:50%;background:var(--muted)}
.agent-btn.online .dot{background:var(--ok);box-shadow:0 0 0 3px var(--ok-weak)}
.agent-btn.online{border-color:#BFE3B8;background:#F3FBF1}
.avatar{
  width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#5B8CFF,#3370FF);
  color:#fff;display:grid;place-items:center;font-size:14px;font-weight:600;
}

/* ---------- tabs ---------- */
.tabs{
  display:flex;gap:6px;padding:0 40px;background:var(--surface);
  border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20;
}
.tab{
  position:relative;padding:13px 14px;border:0;background:none;cursor:pointer;
  color:var(--text-2);font-size:14px;
}
.tab:hover{color:var(--text)}
.tab.active{color:var(--brand);font-weight:600}
.tab.active::after{
  content:"";position:absolute;left:14px;right:14px;bottom:-1px;height:2px;
  background:var(--brand);border-radius:2px;
}

/* ---------- layout ---------- */
main{max-width:1280px;margin:0 auto;padding:26px 40px 60px}
.section-head{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  margin:26px 0 14px;
}
.section-head:first-child{margin-top:0}
.section-head h2{font-size:16px;font-weight:600}
.section-head .hint{color:var(--muted);font-size:12px}
.head-actions{display:flex;align-items:center;gap:10px}
.two-col{display:grid;grid-template-columns:1.15fr .85fr;gap:24px;align-items:start}
.foot-note{margin-top:16px;color:var(--muted);font-size:12px}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:34px;padding:0 14px;border-radius:8px;border:1px solid var(--line-strong);
  background:var(--surface);cursor:pointer;font-size:13px;white-space:nowrap;
  transition:background .15s,border-color .15s,color .15s;
}
.btn:hover{border-color:var(--brand);color:var(--brand)}
.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-deep);border-color:var(--brand-deep);color:#fff}
.btn-primary:disabled{background:#B9C9F5;border-color:#B9C9F5;cursor:not-allowed;color:#fff}
.btn-ghost{background:var(--surface-2)}
.btn-ghost:hover{background:var(--brand-weak)}
.btn-sm{height:28px;padding:0 10px;font-size:12px}
.icon-btn{
  width:32px;height:32px;border:0;border-radius:8px;background:none;
  font-size:22px;line-height:1;color:var(--muted);cursor:pointer;
}
.icon-btn:hover{background:var(--bg);color:var(--text)}

/* ---------- project cards ---------- */
.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.pcard{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:18px;box-shadow:var(--shadow);transition:transform .15s,border-color .15s;
}
.pcard:hover{transform:translateY(-2px);border-color:var(--line-strong)}
.pcard-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.pcard-name{font-size:15px;font-weight:600}
.pcard-customer{margin-top:3px;color:var(--muted);font-size:12px}
.badge{
  display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:6px;
  font-size:12px;background:var(--bg);color:var(--text-2);white-space:nowrap;
}
.badge.ok{background:var(--ok-weak);color:var(--ok)}
.badge.warn{background:var(--warn-weak);color:var(--warn)}
.badge.brand{background:var(--brand-weak);color:var(--brand)}
.pcard-metrics{display:flex;align-items:baseline;gap:6px;margin:16px 0 4px}
.metric-target{font-size:13px;color:var(--muted)}
.metric-done{font-size:26px;font-weight:650;letter-spacing:.01em;line-height:1.1}
.metric-done small{font-size:12px;color:var(--muted);font-weight:400;margin-left:4px}
.pct{margin-left:auto;font-size:12px;color:var(--muted)}
.gap{margin-left:auto;font-size:12px;padding:3px 8px;border-radius:6px;background:var(--bg)}
.gap.neg{background:var(--danger-weak);color:var(--danger)}
.gap.zero{background:var(--ok-weak);color:var(--ok)}
.bar{height:6px;border-radius:3px;background:#EEF0F3;overflow:hidden;margin:10px 0 14px}
.bar i{display:block;height:100%;border-radius:3px;background:linear-gradient(90deg,#5B8CFF,#3370FF)}
.batch{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-2);margin-bottom:12px}
.batch b{font-weight:600;color:var(--text)}
.pipe{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding-top:12px;border-top:1px dashed var(--line)}
.pipe div{text-align:center}
.pipe b{display:block;font-size:16px;font-weight:600}
.pipe span{display:block;margin-top:2px;font-size:11px;color:var(--muted);white-space:nowrap}

/* ---------- tasks ---------- */
.task-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.task{
  display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);
}
.task:last-child{border-bottom:0}
.task:hover{background:var(--surface-2)}
.task-main{min-width:0;flex:1}
.task-title{font-size:13px;line-height:1.5}
.task-meta{margin-top:3px;color:var(--muted);font-size:12px;display:flex;gap:10px;flex-wrap:wrap}
.pri{width:6px;height:6px;border-radius:50%;flex:0 0 6px;background:var(--brand)}
.pri.high{background:var(--danger)}
.pri.mid{background:var(--warn)}
.task-actions{display:flex;gap:8px;flex:0 0 auto}
.empty{padding:26px 16px;text-align:center;color:var(--muted);font-size:13px}

/* ---------- suggestions ---------- */
.suggest-list{display:flex;flex-direction:column;gap:12px}
.scard{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px;
  box-shadow:var(--shadow);
}
.scard-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.scard-title{font-size:14px;font-weight:600}
.scard-why{margin:8px 0 12px;color:var(--text-2);font-size:12.5px;line-height:1.65}
.scard-actions{display:flex;gap:8px}

/* ---------- tools ---------- */
.segmented{display:inline-flex;background:var(--bg);border-radius:8px;padding:3px}
.seg{border:0;background:none;padding:5px 14px;border-radius:6px;font-size:13px;color:var(--text-2);cursor:pointer}
.seg.active{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.06);font-weight:600}
.tool-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.tcard{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px;
  display:flex;flex-direction:column;gap:8px;box-shadow:var(--shadow);
}
.tcard-head{display:flex;align-items:center;gap:10px}
.tlogo{
  width:34px;height:34px;border-radius:9px;display:grid;place-items:center;
  background:var(--brand-weak);color:var(--brand);font-weight:650;font-size:14px;flex:0 0 34px;
}
.tname{font-size:14px;font-weight:600}
.tdesc{color:var(--text-2);font-size:12.5px;line-height:1.6;min-height:40px}
.tmeta{display:flex;gap:12px;color:var(--muted);font-size:11.5px;flex-wrap:wrap}
.tcard-actions{display:flex;gap:8px;margin-top:auto;padding-top:6px}

/* ---------- channels ---------- */
.chgroup{margin-bottom:26px}
.chgroup h3{font-size:13px;color:var(--muted);font-weight:500;margin-bottom:12px}
.chgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.chcard{
  display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);text-decoration:none;color:inherit;
  box-shadow:var(--shadow);transition:transform .15s,border-color .15s;
}
.chcard:hover{transform:translateY(-2px);border-color:var(--brand)}
.chlogo{width:36px;height:36px;border-radius:9px;display:grid;place-items:center;background:#F2F3F5;font-weight:650;font-size:13px}
.chname{display:block;font-size:14px;font-weight:600}
.chdesc{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.chcard .go{margin-left:auto;color:var(--brand);font-size:12px}

/* ---------- talent ---------- */
.vector-status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.vstat{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px}
.vstat b{display:block;font-size:20px;font-weight:650}
.vstat span{color:var(--muted);font-size:12px}
.search-bar{display:flex;gap:10px;margin-bottom:18px}
.search-bar input{
  flex:1;height:42px;padding:0 14px;border:1px solid var(--line-strong);border-radius:10px;
  background:var(--surface);font:inherit;outline:none;
}
.search-bar input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-weak)}
.talent-results{display:flex;flex-direction:column;gap:10px}
.rcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px}
.rcard-top{display:flex;align-items:center;gap:10px}
.rname{font-weight:600;font-size:14px}
.rscore{margin-left:auto;font-size:12px;color:var(--brand);background:var(--brand-weak);padding:2px 8px;border-radius:6px}
.rline{color:var(--text-2);font-size:12.5px;margin-top:6px}
.quote{margin-top:8px;padding:8px 10px;border-left:2px solid var(--line-strong);color:var(--muted);font-size:12px;background:var(--surface-2)}

/* ---------- drawer ---------- */
.drawer{
  position:fixed;top:0;right:0;bottom:0;width:420px;max-width:92vw;background:var(--surface);
  border-left:1px solid var(--line);box-shadow:-8px 0 30px rgba(31,35,41,.10);
  transform:translateX(100%);transition:transform .22s ease;z-index:60;
  display:flex;flex-direction:column;
}
.drawer.open{transform:none}
.drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px;border-bottom:1px solid var(--line)}
.drawer-head h2{font-size:16px}
.drawer-head p{margin-top:3px;color:var(--muted);font-size:12px}
.drawer-body{padding:18px 20px 28px;overflow:auto}
.steps{margin:0 0 12px;padding-left:18px;display:flex;flex-direction:column;gap:10px;font-size:13px}
.steps li{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.steps .muted{font-size:12px}
.code{
  background:#F7F8FA;border:1px solid var(--line);border-radius:8px;padding:10px 12px;
  font:12px/1.6 Consolas,"Courier New",monospace;white-space:pre-wrap;word-break:break-all;color:var(--text-2);
}
.field{display:block;margin:16px 0 10px}
.field span{display:block;font-size:12.5px;color:var(--text-2);margin-bottom:6px}
.field textarea{
  width:100%;padding:10px 12px;border:1px solid var(--line-strong);border-radius:10px;
  font:inherit;resize:vertical;outline:none;background:var(--surface);
}
.field textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-weak)}
.drawer-actions{display:flex;align-items:center;gap:10px}
.muted{color:var(--muted);font-size:12px}
.run-log{margin-top:22px;border-top:1px solid var(--line);padding-top:14px}
.run-log h3{font-size:13px;margin-bottom:10px}
.run{display:flex;gap:10px;padding:9px 0;border-bottom:1px dashed var(--line);font-size:12.5px}
.run:last-child{border-bottom:0}
.run .st{flex:0 0 auto;font-size:11px;padding:1px 6px;border-radius:5px}
.run .st.running{background:var(--brand-weak);color:var(--brand)}
.run .st.done{background:var(--ok-weak);color:var(--ok)}
.run .txt{color:var(--text-2);min-width:0}

/* ---------- modal ---------- */
.modal-root{position:fixed;inset:0;display:none;place-items:center;background:rgba(31,35,41,.35);z-index:80;padding:20px}
.modal-root.show{display:grid}
.modal{background:var(--surface);border-radius:14px;width:460px;max-width:100%;padding:20px;box-shadow:0 20px 50px rgba(0,0,0,.2)}
.modal h3{font-size:16px;margin-bottom:14px}
.modal label{display:block;margin-bottom:12px}
.modal label span{display:block;font-size:12.5px;color:var(--text-2);margin-bottom:5px}
.modal input,.modal select,.modal textarea{
  width:100%;height:36px;padding:0 10px;border:1px solid var(--line-strong);border-radius:8px;font:inherit;outline:none;background:var(--surface);
}
.modal textarea{height:auto;padding:8px 10px;resize:vertical}
.modal input:focus,.modal select:focus,.modal textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-weak)}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}

/* ---------- toast ---------- */
.toast{
  position:fixed;left:50%;bottom:30px;transform:translate(-50%,10px);
  background:#1F2329;color:#fff;padding:9px 16px;border-radius:8px;font-size:13px;
  opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:90;
}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- responsive ---------- */
@media (max-width:1100px){
  .project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tool-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .chgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:860px){
  .topbar{padding:16px 18px;flex-wrap:wrap}
  .tabs{padding:0 10px;overflow-x:auto}
  main{padding:18px 18px 50px}
  .two-col{grid-template-columns:1fr}
  .project-grid{grid-template-columns:1fr}
  .tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .chgrid{grid-template-columns:1fr}
  .vector-status{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:520px){
  .tool-grid{grid-template-columns:1fr}
  .drawer{width:100%}
  .greet h1{font-size:19px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}

/* ---------- shell / sidebar ---------- */
.shell{display:flex;min-height:100vh}
.sidebar{
  position:fixed;top:0;left:0;bottom:0;width:232px;z-index:30;
  display:flex;flex-direction:column;padding:20px 14px;
  background:var(--surface);border-right:1px solid var(--line);
}
.brand{display:flex;align-items:center;gap:10px;padding:2px 8px 22px}
.brand-mark{
  width:32px;height:32px;border-radius:9px;flex:0 0 32px;
  background:linear-gradient(135deg,#5B8CFF,#3370FF);color:#fff;
  display:grid;place-items:center;font-weight:700;font-size:14px;
}
.brand-text strong{display:block;font-size:15px;line-height:1.3}
.brand-text span{display:block;font-size:10px;color:var(--muted);letter-spacing:.09em}
.side-nav{display:flex;flex-direction:column;gap:2px}
.nav-item{
  display:flex;align-items:center;gap:10px;height:40px;padding:0 10px;
  border:0;border-radius:8px;background:none;color:var(--text-2);
  font-size:14px;text-align:left;cursor:pointer;
}
.nav-item svg{width:16px;height:16px;flex:0 0 16px;opacity:.85}
.nav-item:hover{background:var(--bg);color:var(--text)}
.nav-item.active{background:var(--brand-weak);color:var(--brand);font-weight:600}
.nav-item.active svg{opacity:1}
.side-foot{margin-top:auto;padding:14px 8px 2px;border-top:1px solid var(--line)}
.side-foot .user{display:flex;align-items:center;gap:10px}
.side-foot .avatar{width:32px;height:32px;font-size:13px}
.side-foot .user strong{display:block;font-size:13px}
.side-foot .user span{display:block;font-size:11.5px;color:var(--muted)}
.side-hint{margin-top:10px;font-size:11px;color:var(--muted);line-height:1.5}
.main-wrap{flex:1;min-width:0;margin-left:232px}
.topbar{padding:24px 36px 20px}
main{max-width:1180px;padding:24px 36px 60px}
.tag-me{
  display:inline-block;margin-left:6px;padding:0 6px;border-radius:5px;
  background:var(--warn-weak);color:var(--warn);font-size:11px;font-weight:400;vertical-align:1px;
}
@media (max-width:860px){
  .shell{display:block}
  .sidebar{
    position:sticky;top:0;width:auto;height:auto;flex-direction:row;
    align-items:center;gap:8px;padding:8px 12px;
    border-right:0;border-bottom:1px solid var(--line);
  }
  .brand{padding:0 6px 0 0}
  .brand-text{display:none}
  .side-nav{flex-direction:row;overflow-x:auto;flex:1;gap:2px}
  .nav-item{height:34px;padding:0 8px;white-space:nowrap}
  .nav-item svg{display:none}
  .side-foot{display:none}
  .main-wrap{margin-left:0}
  .topbar{padding:14px 16px 12px;flex-wrap:wrap;gap:10px}
  main{padding:16px 16px 50px}
}

/* ---------- dashboard ---------- */
.month-select{height:34px;padding:0 10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);font:inherit;color:var(--text)}
.kpi-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow)}
.kpi span{display:block;color:var(--muted);font-size:12px}
.kpi b{display:block;margin-top:6px;font-size:26px;font-weight:650;letter-spacing:.01em}
.bar-mini{display:block;height:4px;background:#EEF0F3;border-radius:2px;margin-top:10px;overflow:hidden}
.bar-mini i{display:block;height:100%;background:var(--brand);border-radius:2px}
.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow)}
.panel h3{font-size:13.5px;margin-bottom:14px}
.panel:nth-child(3){grid-column:1 / -1}
.bars{display:flex;flex-direction:column;gap:10px}
.brow{display:grid;grid-template-columns:92px 1fr 64px;gap:10px;align-items:center}
.blabel{font-size:12.5px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.btracks{display:flex;flex-direction:column;gap:3px}
.btrack{height:8px;background:#F2F3F5;border-radius:4px;overflow:hidden}
.btrack i{display:block;height:100%;border-radius:4px}
.bt{background:#B9C9F5}
.ba{background:var(--brand)}
.bval{font-size:11.5px;color:var(--muted);text-align:right}
.bval em{font-style:normal;margin-right:6px}
.bval b{color:var(--text)}
.donut-wrap{display:flex;align-items:center;gap:26px;flex-wrap:wrap}
.donut{width:150px;height:150px;border-radius:50%;display:grid;place-items:center;position:relative}
.donut::after{content:"";position:absolute;inset:24px;background:var(--surface);border-radius:50%}
.donut span{position:relative;z-index:1;font-size:22px;font-weight:650;text-align:center}
.donut span small{display:block;font-size:11px;color:var(--muted);font-weight:400}
.legend{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:12.5px}
.legend li{display:flex;align-items:center;gap:8px;min-width:180px}
.legend i{width:8px;height:8px;border-radius:2px;flex:0 0 8px}
.legend b{margin-left:auto;font-weight:600}
.legend span{color:var(--muted);width:38px;text-align:right}
@media(max-width:900px){
  .kpi-row{grid-template-columns:repeat(2,1fr)}
  .dash-grid{grid-template-columns:1fr}
  .panel:nth-child(3){grid-column:auto}
}
.plegend{float:right;font-weight:400;font-size:11px;color:var(--muted)}
.plegend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin:0 4px 0 8px}
[hidden]{display:none!important}
.agent-state{
  display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:13px;
  background:var(--bg);color:var(--muted);font-size:12px;margin-bottom:6px;
}
.agent-state.on{background:var(--ok-weak);color:var(--ok)}
.agent-state::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.7}

/* Agent software selection */
.agent-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 20px}.agent-choice{min-height:70px;text-align:left;padding:12px;border:1px solid var(--line-strong);border-radius:8px;background:#fff;cursor:pointer}.agent-choice:hover{border-color:var(--brand);background:var(--brand-weak)}.agent-choice:focus-visible,summary:focus-visible{outline:3px solid var(--brand);outline-offset:2px}.agent-choice b,.agent-choice span{display:block}.agent-choice span{font-size:12px;color:var(--text-2);margin-top:2px}#agent-wizard>*{margin-bottom:12px}#agent-wizard details{border:1px solid var(--line);padding:12px;border-radius:8px}#agent-wizard details>*{margin:10px 0}#agent-wizard summary{cursor:pointer;font-weight:600}#agent-target{width:100%;padding:9px;border:1px solid var(--line-strong);border-radius:8px;background:#fff;font:inherit}#agent-doc{color:var(--brand)}@media(max-width:420px){.agent-options{grid-template-columns:1fr}}
/* 工作台与看板 */
:root{--bg:#F5F6F8;--line:#E7E9EF;--radius:12px}body{font-variant-numeric:tabular-nums}.sidebar{width:220px;padding:22px 14px}.main-wrap{margin-left:220px}.topbar{background:transparent;border:0;padding:26px 36px 8px}.greet h1{font-size:21px}.topbar .greet p{color:#8F959E}.nav-label{font-size:11px;color:#A3A8B2;padding:17px 10px 6px;letter-spacing:.05em}.nav-toggle{display:none}main{max-width:1400px;padding-top:12px}.sync-bar{padding:7px 12px;background:transparent;border:0;color:#8F959E;font-size:12px}.sync-bar .btn{height:28px;font-size:12px}.workspace-intro{display:flex;justify-content:space-between;align-items:flex-end;margin:18px 0 20px}.eyebrow{font-size:10px;letter-spacing:.15em;font-weight:700;color:#8A96B0}.workspace-intro h2,.dashboard-head h2{font-size:22px;line-height:1.3;margin-top:4px}.workspace-intro p,.section-sub{font-size:12px;color:#8F959E;margin-top:5px}.workspace-month{font-size:13px;color:#7B8391}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.metric-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:17px 19px;min-height:112px;box-shadow:0 2px 12px rgba(31,35,41,.025)}.metric-card span,.metric-card small{display:block;color:#8F959E;font-size:12px}.metric-card strong{display:block;font-size:29px;line-height:1.2;margin:8px 0 5px;letter-spacing:-.03em}.metric-card.accent strong{color:#3370FF}.section-head{margin-top:26px}.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.project-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:0 2px 12px rgba(31,35,41,.025)}.project-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.project-client{font-size:11px;color:#3370FF;background:#EEF3FF;border-radius:5px;padding:2px 7px;font-weight:600}.project-state{font-size:11px;color:#6F7785}.project-card h3{font-size:16px;margin:13px 0}.project-counts{display:flex;align-items:baseline;gap:7px;color:#8F959E;font-size:12px}.project-counts strong{font-size:27px;color:#1F2329}.project-note{color:#4E5561;font-size:12px;margin:4px 0}.project-pipeline{font-size:12px;color:#8F959E;border-top:1px solid #F0F1F4;margin-top:15px;padding-top:12px}.project-link{border:0;background:none;padding:10px 0 0;color:#3370FF;cursor:pointer;font-size:12px}.quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.quick-grid button{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;text-align:left;cursor:pointer;transition:border-color .2s,transform .2s}.quick-grid button:hover{border-color:#B8CCFF;transform:translateY(-2px)}.quick-grid b,.quick-grid span{display:block}.quick-grid span{margin-top:8px;color:#8F959E;font-size:12px}.dashboard-head{align-items:flex-end}.dashboard-filters{display:flex;gap:10px}.dashboard-filters label{font-size:11px;color:#8F959E}.dashboard-filters select{display:block;min-width:130px;margin-top:4px;padding:8px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#333;font:inherit;font-size:13px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(250px,1fr);gap:14px;margin-bottom:14px}.data-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;min-width:0;margin-bottom:14px}.dashboard-grid .data-card{margin:0}.data-card h3{font-size:14px;font-weight:600}.chart-sub{font-size:12px;color:#8F959E;margin:5px 0 14px}.chart-legend{display:flex;gap:16px;font-size:11px;margin-bottom:10px}.offer-key{color:#3370FF}.join-key{color:#30B9B0}.trend-chart{height:185px;display:flex;align-items:stretch;gap:3px;border-bottom:1px solid #E8EAF0;overflow-x:auto}.trend-day{flex:1;min-width:14px;border:0;background:none;padding:0;display:flex;flex-direction:column;cursor:pointer}.trend-day:focus-visible{outline:2px solid #3370FF;outline-offset:-2px}.trend-bars{flex:1;display:flex;gap:2px;align-items:flex-end;justify-content:center;width:100%;border-bottom:1px solid #F1F2F5}.trend-bars i{width:7px;max-width:45%;border-radius:3px 3px 0 0;transform-origin:bottom;animation:bar-in .35s ease both}.bar-offer{background:#618BFF}.bar-join{background:#41C8BF}.trend-day small{font-size:9px;color:#9CA3AF;line-height:22px}.empty-chart{padding:38px 8px;text-align:center;color:#A0A6B0;font-size:12px}.list-bar{display:grid;grid-template-columns:minmax(60px,110px) 1fr auto;align-items:center;gap:10px;margin-top:16px;font-size:12px}.list-bar span{overflow-wrap:anywhere}.list-bar b{font-size:12px}.list-track{height:7px;background:#F1F3F7;border-radius:6px}.list-track i{display:block;height:100%;background:#8C7CF2;border-radius:6px;transform-origin:left;animation:bar-in .35s ease both}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}.data-table th{font-weight:500;color:#8F959E;background:#FAFBFD}.data-table th,.data-table td{padding:11px 12px;border-bottom:1px solid #F0F1F4;white-space:nowrap}.agent-steps{padding-left:22px;color:#4E5561}.agent-steps li{padding:4px 0}.agent-steps b,.agent-steps span{display:block}.agent-steps span{font-size:12px;color:#8F959E}.tab-panel:not([hidden]){animation:panel-in .24s ease both}@keyframes panel-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}@keyframes bar-in{from{transform:scaleY(.2);opacity:.3}to{transform:scaleY(1);opacity:1}}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #3370FF;outline-offset:2px}
@media(max-width:860px){.sidebar{width:auto;position:sticky;height:auto}.main-wrap{margin-left:0}.nav-toggle{display:block;border:1px solid var(--line);border-radius:8px;background:#fff;width:36px;height:34px;cursor:pointer}.side-nav{display:none;position:absolute;top:52px;left:12px;right:12px;max-height:70vh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px;box-shadow:0 10px 32px rgba(31,35,41,.12);flex-direction:column}.side-nav.mobile-open{display:flex}.nav-item{width:100%;height:40px}.nav-item svg{display:block}.nav-label{padding:9px 10px 4px}.metric-grid,.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-head{align-items:flex-start;flex-direction:column}.dashboard-filters{width:100%}.dashboard-filters label{flex:1}.dashboard-filters select{width:100%;min-width:0}.dashboard-grid{grid-template-columns:1fr}.topbar{padding:16px 16px 4px}main{padding:12px 16px 50px}}
@media(max-width:520px){.project-grid{grid-template-columns:1fr}.workspace-intro h2,.dashboard-head h2{font-size:19px}.metric-card{min-height:100px;padding:14px}.metric-card strong{font-size:25px}.section-head .btn{font-size:11px;padding:0 8px}.trend-day{min-width:18px}.drawer{max-width:100vw;width:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Refined compact header and charts */
html,body,button,input,select,textarea,h1,h2,h3,h4{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei','PingFang SC',sans-serif}body{font-size:14px}.topbar-label{font-size:13px;font-weight:600;color:#687385}.workspace-intro h1{font-size:22px;line-height:1.3}.workspace-intro p,.section-sub,.chart-sub,.metric-card span,.metric-card small,.project-pipeline,.quick-grid span,.muted{color:#687385;font-size:12px}.metric-head{display:flex;align-items:center;justify-content:space-between}.metric-icon{display:grid!important;place-items:center;width:32px;height:32px;border-radius:9px;background:#EEF3FF;color:#3370FF!important}.metric-icon svg{width:18px;height:18px}.metric-card:nth-child(2) .metric-icon{background:#E7F8F5;color:#1BAA9D!important}.metric-card:nth-child(3) .metric-icon{background:#F1EEFF;color:#8065E9!important}.metric-card:nth-child(4) .metric-icon{background:#FFF5E9;color:#DB912A!important}.metric-card strong{margin:3px 0 5px}.trend-frame{position:relative;padding-left:28px}.trend-grid{position:absolute;left:28px;right:0;top:0;bottom:22px;pointer-events:none}.grid-line{position:absolute;left:0;right:0;border-top:1px solid #EDF0F5}.grid-line span{position:absolute;right:100%;top:-9px;margin-right:7px;font-size:10px;color:#788292}.trend-chart{position:relative;border-bottom:0}.trend-bars{border-bottom:0}.channel-layout{display:flex;align-items:center;gap:20px;margin:20px 0}.channel-ring{width:112px;height:112px;flex:0 0 112px;border-radius:50%;display:grid;place-items:center}.channel-center{width:76px;height:76px;border-radius:50%;background:#fff;display:grid;align-content:center;text-align:center}.channel-center strong{font-size:22px}.channel-center span{font-size:11px;color:#687385}.channel-legend{flex:1;min-width:0}.channel-row{display:grid;grid-template-columns:8px minmax(40px,1fr) auto auto;align-items:center;gap:8px;margin:9px 0;font-size:12px}.channel-row i{width:8px;height:8px;border-radius:50%}.channel-row span{overflow-wrap:anywhere}.channel-row small{font-size:11px;color:#687385;min-width:34px;text-align:right}
@media(max-width:860px){.sidebar{height:54px}.brand-text{display:block}.brand-text strong{font-size:13px}.brand-text span{display:none}.topbar{position:absolute;top:0;right:12px;z-index:31;height:54px;padding:0;display:flex;align-items:center}.topbar-label{display:none}.topbar .agent-btn{height:32px;padding:0 10px}.top-actions{gap:6px}.sidebar .brand{order:1}.nav-toggle{order:0}.side-nav{top:53px}.workspace-intro{margin:12px 0 16px}.workspace-intro h1{font-size:20px}.sync-bar{margin:0 0 4px}}
@media(max-width:420px){.brand-text{display:none}.channel-layout{gap:12px}.channel-ring{width:90px;height:90px;flex-basis:90px}.channel-center{width:60px;height:60px}.channel-center strong{font-size:18px}}
.trend-day small{height:22px;flex:0 0 22px}
.quality-note{margin:-10px 0 18px;padding:10px 12px;background:#FFF8ED;border:1px solid #F5DFC0;border-radius:8px;color:#925C13;font-size:12px}.trend-day small,.grid-line span,.chart-legend,.chart-readout,.channel-row small,.sync-bar .btn,.nav-label{font-size:12px}
.side-foot .user .avatar{color:#fff}.project-card h3,.data-card h3,.section-head h2,.metric-card strong{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei','PingFang SC',sans-serif}
.knowledge-surface{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:0 2px 12px rgba(31,35,41,.025)}.knowledge-surface .search-bar{margin-top:16px}.knowledge-surface #knowledge-doc{margin-top:16px}.knowledge-surface .pilot-card{box-shadow:none}.chgrid .pilot-card{margin:0}.drawer-body>h3{font-size:14px}.drawer-body p{line-height:1.6}
.list-track i{animation-name:bar-horizontal}@keyframes bar-horizontal{from{transform:scaleX(.15);opacity:.3}to{transform:scaleX(1);opacity:1}}.metric-card{animation:panel-in .28s ease both}@media(prefers-reduced-motion:reduce){.list-track i,.metric-card{animation:none!important}}
/* Small blue text and controls retain contrast against light surfaces. */
.nav-item.active,.project-link,.project-client,#agent-doc,.pilot-card a{color:#285ED8}.btn-primary{background:#285ED8;border-color:#285ED8;color:#fff}.btn-primary:hover{background:#234FBA;border-color:#234FBA}
.unknown-key{color:#7D8795}.trend-bars .bar-unknown{background:#9BA3AF;border-radius:3px}

#agent-open{min-height:44px;padding:0 18px;font-weight:700;background:#526be0;color:#fff;border-color:#526be0}.language-toggle{min-width:44px;min-height:44px;border:1px solid #dfe4f1;border-radius:10px;background:#fff;color:#425375;font-weight:700;cursor:pointer}.task-primary-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 16px}.task-primary-actions .btn{min-height:44px}@media(max-width:860px){.topbar #agent-open,.topbar .language-toggle{min-height:44px;height:44px;padding:0 9px}.top-actions{gap:4px}}

.build-notice{margin:12px 0;padding:12px 16px;border:1px solid #e5d9ae;border-radius:12px;background:#fff9e8;color:#70561e;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.account-entry{width:100%;border:0;background:transparent;text-align:left;cursor:pointer;border-radius:12px;padding:6px;color:inherit;min-height:44px}.account-entry:hover,.account-entry:focus-visible{background:#eef0ff;outline:2px solid #a5adf5;outline-offset:2px}.account-identity{min-width:0;overflow:hidden}.account-identity strong,.account-identity span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:860px){.side-foot{display:block;margin:0 0 0 auto;padding:0;border:0}.account-entry{width:auto}.account-identity{display:none}}
.channel-search-label { display: block; max-width: 32rem; margin: 0 0 1rem; font-weight: 600; }
.channel-search-label input { display: block; width: 100%; margin-top: .5rem; }
.channel-library-card[hidden] { display: none; }
.task-suggestion details { margin-top: .75rem; }
.task-suggestion summary { cursor: pointer; font-weight: 600; }
.task-suggestion-item { border-top: 1px solid var(--border, #dbe3e8); margin-top: .7rem; padding-top: .7rem; }
.task-suggestion-item p { margin: .3rem 0; }
#task-preview label { display: block; margin: .8rem 0; }
#task-preview small { display: block; margin-top: .3rem; }
#ai-answer { min-height: 18rem; max-height: 55vh; overflow-y: auto; padding: 1rem; margin: 1rem 0; border-radius: 1rem; background: var(--surface, #f7faf9); }
.ai-message { max-width: 85%; padding: .8rem 1rem; margin: .7rem 0; border-radius: 1rem; background: #fff; box-shadow: 0 2px 12px #163c2d0d; }
.ai-message:nth-child(odd) { margin-left: auto; background: #eaf5ef; }
@media (max-width: 600px) { .ai-message { max-width: 100%; } #ai-answer { min-height: 12rem; } }
@media (prefers-reduced-motion: reduce) { .task-suggestion, .ai-message { animation: none !important; transition: none !important; } }

.ai-conversations { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.ai-conversations label { flex: 1 1 16rem; }
.ai-conversations select { display: block; width: 100%; margin-top: .35rem; }

/* A short, welcoming connection flow; advanced controls remain available. */
.agent-connect-card{padding:20px;border:1px solid #e5e3f4;border-radius:20px;background:linear-gradient(145deg,#fbfaff,#f3f2fc);box-shadow:0 8px 24px rgba(76,69,132,.05)}
.agent-connect-intro{margin:0 0 16px;color:#42506a;font-size:14px;line-height:1.7}.agent-status-wrap{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:14px;background:#fff;border:1px solid #e9e8f3}.agent-status-label{display:block;font-size:12px;color:#66728b}.agent-status-wrap #agent-state{margin:4px 0 0;color:#373c65;font-size:14px;font-weight:650}.agent-check-small{min-height:40px;white-space:nowrap}.agent-status-hint{margin:8px 2px 0;color:#68738c;font-size:12px;line-height:1.6}.agent-online-next{padding:10px 12px;border-radius:12px;background:#e9ebff;color:#434f9f;font-size:13px;line-height:1.5}.agent-client-title{margin:19px 0 4px;color:#313953;font-size:14px}.agent-connect-card .agent-steps{counter-reset:agent-step;list-style:none;margin:12px 0 18px;padding:0;display:grid;gap:14px}.agent-connect-card .agent-steps li{position:relative;min-height:30px;padding:0 0 0 40px;color:#35415a}.agent-connect-card .agent-steps li::before{counter-increment:agent-step;content:counter(agent-step);position:absolute;left:0;top:0;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#e6e6fb;color:#5259ba;font-size:13px;font-weight:700}.agent-connect-card .agent-steps b{font-size:14px}.agent-connect-card .agent-steps span{margin-top:3px;color:#68748b;font-size:12px;line-height:1.6}.agent-copy-main{width:100%;min-height:46px}.agent-connect-card #agent-copy-feedback{margin:8px 1px;color:#46569b;font-size:13px;line-height:1.5}.agent-connect-card #agent-copy-feedback:empty{display:none}.agent-connect-card #workbuddy-open:not([hidden]),.agent-connect-card #agent-view-confirm:not([hidden]){margin-top:10px;min-height:44px}.agent-instruction-details{margin-top:14px}.agent-instruction-details summary,.agent-more>summary{min-height:44px;display:flex;align-items:center;color:#4e5a78;font-weight:600;cursor:pointer}.agent-instruction-details summary::after,.agent-more>summary::after{content:'⌄';margin-left:auto;color:#6b7098}.agent-instruction-details textarea{width:100%;min-height:100px;resize:vertical}.agent-more{margin-top:12px;border-top:1px solid #ecebf3}.agent-more-content{padding:4px 0 14px}.agent-more-content>h3{margin-top:22px}.agent-more-content .field{margin-top:14px}.agent-more-content>details{margin:12px 0}.agent-more-content>p{line-height:1.6}.agent-more-content button{min-height:44px}
@media(max-width:480px){.drawer-body{padding:14px 14px 24px}.agent-connect-card{padding:16px}.agent-status-wrap{align-items:flex-start}.agent-check-small{flex:none}}
#agent-wizard .agent-instruction-details{padding:0;border:0}#agent-wizard .agent-instruction-details>summary{margin:0;min-height:44px}#agent-wizard .agent-instruction-details>label{margin:8px 0}.agent-copy-main{background:#5b61cc;border-color:#5b61cc}.agent-copy-main:hover{background:#4d53b9;border-color:#4d53b9}
@media(max-width:480px){.agent-connect-intro{font-size:16px}.agent-connect-card .agent-steps b{font-size:15px}.agent-connect-card .agent-steps span{font-size:14px}.agent-status-wrap #agent-state{font-size:15px}}
