/* 数字员工面板：卡通形象、微信式聊天、资料和记忆。ERP 页面的样式在 app.css。 */
#team{display:none;flex:1;min-width:0;min-height:0;background:#fff}
#team.open{display:flex}
.dot{width:8px;height:8px;border-radius:50%;background:#2f7bff;flex:none}

/* 卡通形象：呼吸、眨眼、东张西望；在想事情时眼睛转得快、身体轻跳 */
.face{display:inline-block;flex:none;position:relative}
.face svg{width:100%;height:100%;display:block;overflow:visible}
.face .body{transform-box:fill-box;transform-origin:50% 100%;animation:breathe 4.2s ease-in-out infinite;animation-delay:var(--d)}
.face .look{animation:look 8s ease-in-out infinite;animation-delay:var(--d)}
.face .lid{transform-box:fill-box;transform-origin:center;animation:blink 5.5s infinite;animation-delay:var(--d)}
.face.watch .look,.face.gaze .look{animation:none;transition:none;will-change:transform}
.face.gaze svg{will-change:transform}
.face.easeback .look{animation:none;transition:transform .85s var(--spring)}
.face.easeback svg{transition:transform .6s var(--spring)}
.face.think .look{animation:ponder 1.4s ease-in-out infinite}
.face.think .body{animation:hop .7s ease-in-out infinite}
@keyframes breathe{0%,100%{transform:scale(1,1)}50%{transform:scale(1.03,.97)}}
@keyframes blink{0%,90%,96%,100%{transform:scaleY(1)}93%{transform:scaleY(.12)}}
@keyframes look{0%,30%{transform:translate(0,0)}36%,52%{transform:translate(5px,-2px)}58%,74%{transform:translate(-5px,1px)}80%,100%{transform:translate(0,0)}}
@keyframes ponder{0%,100%{transform:translate(-5px,-5px)}50%{transform:translate(5px,-5px)}}
@keyframes hop{0%,100%{transform:translateY(0)}50%{transform:translateY(-5%)}}
.gface{display:inline-grid;grid-template-columns:1fr 1fr;place-items:center;align-content:center;flex:none;background:#eceef2;border-radius:30%;padding:3px}
.gface.n1{grid-template-columns:1fr}
.gface.n3 .face:last-child{grid-column:span 2}
.av{display:flex;align-items:center;justify-content:center;flex:none}
.av.group{width:32px;height:32px;border-radius:8px;background:#eef0f3;color:var(--ink2)}
.av.person{border-radius:50%;color:#fff;font-size:11px;font-weight:600;letter-spacing:.5px}
.msg .av.person{border-radius:6px;font-size:12px}

/* 左栏 */
.tm-list{width:272px;flex:none;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:14px 12px 0;background:#f7f7f8;min-height:0}
.tm-rows{flex:1;overflow:auto;margin:0 -4px;padding:0 4px}
.tm-tools{display:flex;align-items:center;gap:8px;padding:2px 4px 14px}
.tm-tools b{font-size:16px;font-weight:600}
.round{margin-left:auto;width:34px;height:34px;border-radius:50%;background:#fff;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;color:var(--ink)}
.round:hover{border-color:var(--brand-line);color:var(--brand)}
.tm-main{display:flex;flex-direction:column;align-items:center;gap:2px;padding:18px 12px 14px;margin-bottom:6px;border-radius:16px;background:#fff;border:1px solid var(--line);color:var(--ink);position:relative;text-align:center}
.tm-main:hover{color:var(--ink);border-color:#f3c792}
.tm-main.on{border-color:#f3c792;background:#fff8ef}
.tm-main b{font-size:15px;font-weight:600}
.tm-main small{font-size:12px;color:var(--muted)}
.tm-main .dot{position:absolute;right:14px;top:14px}
.halo{position:relative;margin-bottom:6px;display:flex}
.star{position:absolute;right:-4px;bottom:0;width:24px;height:24px;border-radius:50%;background:#f7931a;color:#fff;border:2px solid #fff;display:flex;align-items:center;justify-content:center}
.star svg{width:13px;height:13px;fill:#fff}
.tm-list h5{margin:16px 6px 6px;font-size:12px;font-weight:400;color:var(--muted);display:flex;justify-content:space-between;align-items:center}
.tm-list h5 a{color:var(--ink2);display:flex}
.tm-list h5 svg{width:15px;height:15px}
.tm-item{display:flex;gap:12px;align-items:center;padding:9px 10px;border-radius:12px;color:var(--ink)}
.tm-item:hover{background:#eceef1;color:var(--ink)}
.tm-item.on{background:#e4e6ea}
.tm-item div{min-width:0;flex:1}
.tm-item b{display:block;font-size:14px;font-weight:600}
.tm-item small{display:block;font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 中栏：微信式聊天 */
.tm-chat{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:#fff}
.tm-head{height:58px;flex:none;display:flex;align-items:center;justify-content:center;padding:0 64px;position:relative}
.pill{display:flex;align-items:center;gap:8px;background:#fff;border-radius:22px;padding:5px 16px 5px 6px;border:1px solid #ededee;box-shadow:0 2px 10px rgba(0,0,0,.08);min-width:0}
.pill b{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill>svg{width:18px;height:18px;margin-left:6px}
.msgs{flex:1;overflow:auto;padding:8px 22px 16px 18px}
.tagline{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--amber);background:#fff3dd;border-radius:10px;padding:1px 9px 1px 7px;margin-bottom:5px}
.tagline svg{width:13px;height:13px}
.typing{display:flex;gap:5px;padding:7px 2px}
.typing i{width:7px;height:7px;border-radius:50%;background:#b5b9c1;animation:dots 1.2s infinite}
.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes dots{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.handoff{display:flex;align-items:center;gap:6px;margin:0 auto 14px;width:fit-content;max-width:90%;background:#f5f5f6;border-radius:18px;padding:4px 14px 4px 6px;font-size:12.5px;color:var(--ink2)}
.handoff b{font-weight:600;white-space:nowrap}
.handoff .go{display:flex;color:var(--muted)}
.handoff .go svg{width:14px;height:14px}
.handoff em{font-style:normal;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:6px;min-width:0}
.relay{display:flex;gap:8px;margin:-4px 0 16px 48px;max-width:70%;border-left:2px solid #cfd3d9;padding:2px 0 2px 10px}
.relay b{font-size:12px;color:var(--ink2);font-weight:600}
.relay p{margin:2px 0 0;font-size:13px;color:var(--ink2);white-space:pre-wrap}
.sys{text-align:center;margin:0 0 14px}
.sys span{display:inline-block;max-width:80%;font-size:12px;color:#8a8a8a;background:rgba(0,0,0,.05);border-radius:4px;padding:3px 10px;white-space:pre-wrap}
.empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--muted);font-size:13.5px}
.composer{flex:none;margin:0 20px 18px;background:#fff;border-radius:24px;display:flex;align-items:flex-end;gap:8px;padding:7px 7px 7px 18px;border:1px solid #e6e6e8;box-shadow:0 2px 10px rgba(0,0,0,.05)}
.composer textarea{flex:1;border:0;outline:none;resize:none;padding:8px 0;line-height:1.5;background:transparent;font-size:14px;max-height:120px}
.composer .send{width:38px;height:38px;flex:none;border-radius:50%;border:0;background:#07c160;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.composer .send:hover{background:#06ad56}
.composer .send svg{width:18px;height:18px}

/* 右栏：资料 / 记忆 */
.tm-side{width:372px;flex:none;border-left:1px solid var(--line);overflow-x:hidden;overflow-y:auto;background:#fff;transition:width .34s var(--ease),opacity .24s}
.tm-side .side-tabs,.tm-side .pf-body{width:372px}
#team.side-closed .tm-side{width:0;opacity:0;border-left-color:transparent}
.pf-head{display:flex;flex-direction:column;align-items:center;padding:30px 20px 6px;gap:6px}
.pf-head h3{margin:6px 0 8px;font-size:19px;font-weight:600}
.seg{display:flex;background:var(--canvas);border-radius:16px;padding:3px}
.seg a{padding:3px 16px;border-radius:13px;color:var(--ink2);font-size:13px}
.seg a.on{background:#fff;color:var(--ink);font-weight:600;box-shadow:0 0 0 1px var(--line)}
.pf-body{padding:4px 20px 28px}
.pf-body section{margin-top:20px}
.pf-body h6{display:flex;align-items:center;margin:0 0 8px;font-size:13px;color:var(--muted);font-weight:400}
.pf-body h6 a{margin-left:auto;display:flex;align-items:center;gap:4px;color:var(--brand);font-size:12.5px}
.pf-body h6 a svg{width:14px;height:14px}
.persona{margin:0;font-size:13.5px;color:var(--ink2);background:#f6f7f9;border-radius:10px;padding:10px 12px}
.abilities{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:12px}
.abilities li{display:flex;align-items:center;gap:10px;padding:9px 12px;font-size:13.5px}
.abilities li+li{border-top:1px solid var(--line2)}
.abilities svg{width:16px;height:16px;color:var(--muted)}
.abilities li.w svg{color:var(--amber)}
.abilities em{margin-left:auto;font-style:normal;font-size:12px;color:var(--amber);white-space:nowrap}
.abilities em.deny{color:var(--muted)}
.note{font-size:12px;color:var(--muted);margin:8px 2px 0}
.routine{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:12px}
.routine>svg{width:20px;height:20px;color:var(--ink2)}
.routine div{flex:1;min-width:0}
.routine b{display:block;font-size:14px;font-weight:600}
.routine small{font-size:12px;color:var(--muted)}
.prompt{margin:6px 2px 0;font-size:12.5px;color:var(--ink2)}
.prompt summary{cursor:pointer;color:var(--muted)}
.prompt p{margin:6px 0 0;background:#f6f7f9;border-radius:8px;padding:8px 10px}
.ctx{position:relative;padding-top:20px}
.ctx .bar{display:flex;height:26px;border-radius:6px;overflow:hidden;background:#f1f2f4;gap:1px}
.ctx .bar i{display:block;height:100%}
.ctx .limit{position:absolute;top:2px;bottom:-4px;border-left:2px dashed var(--red)}
.ctx .limit em{position:absolute;top:-2px;right:5px;white-space:nowrap;font-style:normal;font-size:11px;color:var(--red)}
.ctx-legend{list-style:none;padding:0;margin:12px 0 6px}
.ctx-legend li{display:flex;align-items:center;gap:8px;font-size:13px;padding:3px 0;color:var(--ink2)}
.ctx-legend i{width:10px;height:10px;border-radius:3px}
.ctx-legend span{margin-left:auto}
.steps3{display:flex;align-items:center}
.steps3 span{flex:1;text-align:center;font-size:12px;line-height:1.5;color:var(--ink2);background:#f6f7f9;border-radius:10px;padding:10px 4px}
.steps3 b{display:block;width:20px;height:20px;margin:0 auto 4px;border-radius:50%;background:var(--brand);color:#fff;font:500 12px/20px var(--num)}
.steps3 i{width:12px;border-top:1.5px solid #c9ced6;flex:none}
details.layer{border:1px solid var(--line);border-radius:10px;margin-bottom:8px}
details.layer summary{padding:9px 12px;cursor:pointer;font-size:13.5px;display:flex;gap:8px;align-items:center}
details.layer summary code{margin-left:auto;font:11px var(--mono);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
details.layer pre{margin:0;padding:0 12px 12px;white-space:pre-wrap;font:12px/1.7 var(--mono);color:var(--ink2)}
.member{display:flex;align-items:center;gap:10px;padding:6px 4px;color:var(--ink);border-radius:10px}
.member:hover{background:#f6f7f9;color:var(--ink)}
.member b{font-weight:600;font-size:14px}
.member em{margin-left:auto;font-style:normal;font-size:12px;color:var(--muted)}
.pf-tip{padding:48px 24px;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;color:var(--ink2);font-size:13.5px}
.pf-tip p{margin:0}

/* 新建数字员工 / 群 */
.tm-form{flex:1;overflow:auto;padding:4px 32px 32px;max-width:620px;width:100%;margin:0 auto}
.tm-form .preview{display:flex;justify-content:center;padding:6px 0 2px}
.tm-form .c{text-align:center;margin:4px 0 0;font-size:12.5px}
.tm-form label.f{display:block;margin:16px 0 6px;font-size:13px;color:var(--ink2)}
.tm-form input[type=text],.tm-form textarea{width:100%;border:1px solid transparent;border-radius:10px;padding:9px 12px;background:#fff;outline:none}
.tm-form input[type=text]:focus,.tm-form textarea:focus{border-color:#07c160}
.checks{display:flex;flex-wrap:wrap;gap:8px}
.checks label{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid transparent;border-radius:16px;padding:4px 12px;font-size:13px;cursor:pointer}
.checks label:has(input:checked){border-color:#07c160;color:#06ad56}
.checks input{margin:0;accent-color:#07c160}
.picks{display:flex;flex-wrap:wrap;gap:10px}
.picks label{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;width:100px;padding:14px 6px 10px;border-radius:14px;background:#fff;border:2px solid transparent;cursor:pointer;font-size:13px}
.picks input{position:absolute;opacity:0}
.picks label:has(input:checked){border-color:#07c160}
.tm-form .actions{display:flex;gap:10px;align-items:center;margin-top:22px}


/* 左栏补充：搜索、当前员工 */
.find{flex:1;display:flex;align-items:center;gap:6px;height:34px;padding:0 12px;border-radius:17px;background:#fff;border:1px solid var(--line);color:var(--muted)}
.find svg{width:15px;height:15px}
.find input{border:0;outline:none;background:transparent;width:100%;font-size:13px}
.tm-tools .round{margin-left:0}
.faint{color:#b3b8c2}
.tm-me{flex:none;display:flex;align-items:center;gap:10px;margin:8px -12px 0;padding:12px 16px;border-top:1px solid var(--line)}
.tm-me b{display:block;font-size:13.5px;font-weight:600}
.tm-me small{font-size:12px;color:var(--muted)}

/* 气泡下面挂的单据卡片 */
.refs{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.refs:empty{display:none}
.ref{display:flex;align-items:center;gap:8px;max-width:360px;background:#fff;border:1px solid #e2e4e8;border-radius:10px;padding:7px 10px;color:var(--ink);font-size:12.5px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.ref:hover{border-color:var(--brand-line);color:var(--ink)}
.ref>svg{width:16px;height:16px;color:var(--brand)}
.ref>svg:last-child{color:var(--muted);width:14px;height:14px}
.ref span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink2)}
.ref span b{color:var(--ink);font-weight:500;margin-right:8px}
.ref em{font-style:normal;font-size:12px}
.relay .refs{margin-top:4px}

/* 右栏：页签 */
.side-tabs{position:sticky;top:0;z-index:2;display:flex;gap:4px;padding:12px 16px;background:#fff;border-bottom:1px solid var(--line2)}
.side-tabs a{display:flex;align-items:center;gap:6px;padding:4px 14px;border-radius:15px;color:var(--ink2);font-size:13.5px}
.side-tabs a:hover{background:var(--canvas);color:var(--ink)}
.side-tabs a.on{background:var(--ink);color:#fff;font-weight:600}
.side-tabs a span{min-width:18px;height:18px;border-radius:9px;background:var(--brand);color:#fff;font-size:11px;line-height:18px;text-align:center;padding:0 5px}
.pf-body .pf-head{padding:16px 0 0}

/* 单据 */
.doc-pick{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 2px}
.doc-pick a{font-size:12px;padding:2px 10px;border-radius:12px;border:1px solid var(--line);color:var(--ink2)}
.doc-pick a.on{border-color:var(--brand);color:var(--brand);background:var(--brand-tint)}
.doc{margin-top:14px;border:1px solid var(--line);border-radius:14px;padding:16px}
.doc.flash{animation:flash 1.2s ease-out}
@keyframes flash{0%{box-shadow:0 0 0 4px rgba(31,88,214,.25);transform:translateY(-4px)}100%{box-shadow:0 0 0 0 rgba(31,88,214,0);transform:none}}
.doc-top{display:flex;align-items:center;gap:8px}
.doc-top .kind{display:flex;align-items:center;gap:4px;font-size:12.5px;color:var(--muted)}
.doc-top .kind svg{width:15px;height:15px}
.doc-top b{font-size:15px;font-weight:500}
.doc-top .tag,.doc-top .chip{margin-left:auto}
.doc-amount{margin:14px 0 6px}
.doc-amount span{display:block;font-size:12px;color:var(--muted)}
.doc-amount b{font:500 28px/1.2 var(--num);font-variant-numeric:tabular-nums}
.doc-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;margin:12px 0 0}
.doc-grid div{min-width:0}
.doc-grid .full{grid-column:span 2}
.doc-grid dt{font-size:12px;color:var(--muted)}
.doc-grid dd{margin:2px 0 0;font-size:13.5px}
.doc-grid dd small{margin-left:6px;color:var(--muted);font-size:12px}
.doc h6,.modal h6{display:flex;justify-content:space-between;margin:20px 0 10px;font-size:13px;font-weight:600;color:var(--ink)}
.doc h6 small{font-weight:400;color:var(--muted);font-size:12px}

/* 审批进度：节点 + 连线，点节点弹窗 */
.pflow{display:flex;align-items:flex-start}
.pn{display:flex;flex-direction:column;align-items:center;gap:3px;width:72px;flex:none;background:none;border:0;padding:4px 0;cursor:pointer;border-radius:10px}
.pn:hover{background:var(--canvas)}
.pn .ring{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1.5px dashed #c3c8d1;color:#b3b8c2;background:#fff}
.pn .ring svg{width:17px;height:17px;stroke-width:2}
.pn b{font-size:12.5px;font-weight:600;color:var(--ink)}
.pn small{font-size:11.5px;color:var(--muted);white-space:nowrap}
.pn.done .ring{border:0;background:var(--green);color:#fff}
.pn.warn .ring{border:0;background:#f5a524;color:#fff}
.pn.now .ring{border:2px solid var(--brand);color:var(--brand);animation:nowring 1.8s infinite}
.pn.now small{color:var(--brand)}
.pn.fail .ring{border:0;background:var(--red);color:#fff}
.pn.skip .ring{border-style:solid;color:#c3c8d1}
@keyframes nowring{0%,100%{box-shadow:0 0 0 0 rgba(31,88,214,.3)}50%{box-shadow:0 0 0 7px rgba(31,88,214,0)}}
.pl{flex:1;height:0;margin-top:21px;border-top:2px dashed #d3d7de;min-width:8px}
.pl.on{border-top-style:solid;border-color:var(--green)}

/* 制度逐条 */
.rules{list-style:none;margin:10px 0 0;padding:0}
.rules li{display:flex;gap:10px;padding:10px 0;border-top:1px solid var(--line2)}
.rules li svg{width:18px;height:18px;margin-top:2px;flex:none}
.rules li b{display:block;font-size:14px;font-weight:600}
.rules li small{font-size:12.5px;color:var(--muted)}
.rules li.good svg{color:var(--green)}
.rules li.bad svg{color:var(--red)}
.rules li.bad small{color:var(--red)}
.rules li.na{opacity:.55}

/* 凭证：资金流向 */
.mflow{margin-top:4px}
.mflow .mh{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:6px}
.mflow svg{width:100%;display:block;overflow:visible}
.mflow .pipes path{fill:none;stroke:#9fd8b6;stroke-linecap:round;opacity:.85}
.mflow rect.cr{fill:#f3f5f8;stroke:#dde1e7}
.mflow rect.dr{fill:#eaf6ef;stroke:#bfe3cd}
.mflow .an{font-size:12.5px;fill:var(--ink)}
.mflow .am{font-size:12px;fill:var(--ink2);font-family:var(--num)}
table.mini{min-width:0;margin-top:14px;font-size:12.5px}
table.mini th,table.mini td{padding:6px 8px;position:static}
table.mini td+td,table.mini th+th{border-left:0}

/* 弹窗 */
.modal-mask{position:fixed;inset:0;z-index:20;background:rgba(17,24,39,.32);display:flex;align-items:center;justify-content:center;animation:fade .15s}
.modal{width:440px;max-width:calc(100vw - 32px);max-height:calc(100vh - 64px);overflow:auto;background:#fff;border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.18);animation:pop .18s ease-out}
.modal header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 6px}
.modal header b{font-size:16px;font-weight:600}
.modal header a{display:flex;width:30px;height:30px;align-items:center;justify-content:center;border-radius:50%;color:var(--ink2)}
.modal header a:hover{background:var(--canvas)}
.modal header svg{width:16px;height:16px}
.modal-body{padding:4px 20px 22px;font-size:14px}
.modal-body .btn .face{margin-right:2px}
@keyframes fade{from{opacity:0}}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}}

/* 右栏收放按钮 */
.side-btn{position:absolute;right:18px;top:12px;width:34px;height:34px;border-radius:50%;border:0;background:#fff;color:var(--ink2);display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.06);transition:color .18s,transform .25s var(--spring)}
.side-btn:hover{color:var(--ink);transform:scale(1.08)}
.side-btn svg{width:17px;height:17px}
#team.side-closed .side-btn{color:var(--brand)}

/* 聊天里的“记住了” */
.memo{display:flex;align-items:center;gap:6px;margin:0 auto 14px;width:fit-content;max-width:86%;background:#f5f5f6;border-radius:16px;padding:4px 14px 4px 6px;font-size:12.5px;color:var(--ink2)}
.memo span{color:#c2255c;white-space:nowrap}
.memo b{font-weight:500;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 授权卡片：AI 准备好改动，你点授权才写进账套 */
.auth{margin:0 0 20px 48px;max-width:470px;background:#fff;border-radius:22px;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.05),0 8px 24px rgba(16,24,40,.07)}
.auth-head{display:flex;align-items:center;gap:12px;padding:16px 18px 14px;background:#f7f8fa;transition:background .3s}
.auth.wait .auth-head{background:#fff7ea}
.auth.ok .auth-head{background:#eefaf3}
.auth.fail .auth-head{background:#fdf1f0}
.auth-head div{min-width:0}
.auth-head b{display:block;font-size:14.5px;font-weight:600}
.auth-head small{font-size:12.5px;color:var(--ink2)}
.auth-state{margin-left:auto;font-size:12px;padding:3px 11px;border-radius:12px;white-space:nowrap;background:#eceef2;color:#5b6577}
.auth.wait .auth-state{background:#ffe6bd;color:#8a5300}
.auth.ok .auth-state{background:#cfeedd;color:#17693b}
.auth.fail .auth-state{background:#fbd9d6;color:#a1271d}
.auth-body{padding:14px 18px 2px}
.auth-body .refs{margin:0 0 10px}
.chg{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:#f7f8fa;margin-bottom:8px;font-size:14px}
.chg .k{color:var(--muted);font-size:12.5px;min-width:56px}
.chg .from{color:var(--muted);text-decoration:line-through}
.chg svg{width:14px;height:14px;color:var(--muted)}
.chg .to{font-weight:600}
.auth.wait .chg .to{color:#b35c00}
.auth.ok .chg .to{color:var(--green)}
.chg .to.bad{color:var(--red)}
.ent{border:1px dashed #d5dae2;border-radius:14px;padding:10px 12px;margin-bottom:8px;transition:border-color .3s}
.auth.ok .ent{border-style:solid;border-color:#cbe8d7}
.ent h6{margin:0 0 6px;font-size:12.5px;font-weight:600;display:flex;justify-content:space-between;gap:8px}
.ent h6 small{font-weight:400;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ent-row{display:flex;align-items:center;gap:10px;padding:4px 0;font-size:13.5px}
.ent-row em{font-style:normal;width:22px;height:22px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;flex:none}
.ent-row em.dr{background:#e6efff;color:var(--brand)}
.ent-row em.cr{background:#fff0dc;color:#b35c00}
.ent-row span{flex:1}
.ent-row b{font-weight:500}
.auth-foot{display:flex;align-items:center;gap:8px;padding:10px 18px 16px}
.auth-foot>span{display:flex;align-items:center;gap:6px;margin-right:auto;font-size:12.5px;color:var(--muted)}
.auth-foot>span svg{width:14px;height:14px}
.auth-foot .btn{height:36px;padding:0 18px;border-radius:12px}
.auth.going .auth-foot .btn.pri::after{content:"";width:13px;height:13px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
.auth.going .auth-head{background:#eefaf3}
.auth-result{display:flex;align-items:center;gap:8px;margin:6px 18px 14px;padding:10px 12px;border-radius:12px;font-size:13.5px;background:#f3f4f6;color:var(--ink2)}
.auth-result svg{width:18px;height:18px;flex:none}
.auth.ok .auth-result{background:var(--green-tint);color:#17693b}
.auth.ok .auth-result svg{animation:popin2 .45s var(--spring)}
.auth.fail .auth-result{background:var(--red-tint);color:var(--red)}
.auth-links{display:flex;gap:8px;padding:0 18px 16px;margin-top:-4px;flex-wrap:wrap}
.auth-links a{display:flex;align-items:center;gap:6px;padding:7px 12px;border-radius:12px;background:var(--canvas);color:var(--ink);font-size:13px;transition:background .18s,color .18s}
.auth-links a:hover{background:var(--brand-tint);color:var(--brand)}
.auth-links svg{width:15px;height:15px}
.modal-body .auth{margin:4px 0 0;max-width:none;box-shadow:none;border:1px solid var(--line)}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes popin2{from{transform:scale(.3);opacity:0}}

/* 资料页：工作说明编辑、记住的要求 */
.persona-box textarea{width:100%;line-height:1.6}
.persona-box .actions{display:flex;gap:8px;margin-top:8px}
.pref-list{list-style:none;padding:0;margin:0}
.pref-list li{display:flex;gap:8px;align-items:flex-start;padding:8px 10px;background:#fff5f8;border-radius:10px;margin-bottom:6px;font-size:13.5px}
.pref-list svg{width:15px;height:15px;color:#e64980;margin-top:3px;flex:none}
.auth.fail .chg .to,.auth.deny .chg .to{color:var(--muted);text-decoration:line-through}
.auth-warn{display:flex;gap:8px;align-items:flex-start;margin:6px 18px 0;padding:10px 12px;border-radius:12px;background:var(--amber-tint);color:#8a5300;font-size:13px}
.auth-warn svg{width:16px;height:16px;flex:none;margin-top:2px}

/* ───── 聊天里的图片 ───── */
.bubble .pic,.relay .pic,.handoff .pic{display:block;margin:4px 0;max-width:240px}
.pic img{display:block;max-width:100%;max-height:220px;border-radius:10px;border:1px solid rgba(0,0,0,.06);cursor:zoom-in}
.auth-pic{display:block;margin:0 0 10px}
.auth-pic img{max-height:180px}
.composer .attach{width:34px;height:34px;flex:none;align-self:center;margin-left:-8px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--muted);cursor:pointer}
.composer .attach:hover{background:var(--line2);color:var(--ink)}
.composer .attach svg{width:20px;height:20px}
.pending{display:flex;gap:8px;margin:0 22px 8px;flex-wrap:wrap}
.pending:empty{display:none}
.pend{position:relative;width:64px;height:64px;border-radius:10px;overflow:hidden;background:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.pend img{width:100%;height:100%;object-fit:cover}
.pend a{position:absolute;top:3px;right:3px;width:18px;height:18px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;display:flex;align-items:center;justify-content:center}
.pend a svg{width:11px;height:11px}
.spin{width:18px;height:18px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--brand);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}


/* ───────────── 群聊消息：1:1 照 Grok Bot 群聊 ─────────────
   名字标签（本人颜色）在气泡上方；浅灰大圆角气泡；头像在气泡左下角外侧；@提及 = 小头像 + 彩色名字；鼠标停留出现 表情/回复/更多 */
.msg{position:relative;margin:0 0 18px;display:flex;flex-direction:column;align-items:flex-start}
.msg .name{font-size:13px;font-weight:500;color:color-mix(in srgb,var(--c,#8a8a8a) 82%,#000);margin:0 0 6px 48px;line-height:1.3}
.msg .tagline{margin-left:48px}
.msg .line{display:flex;align-items:flex-end;gap:10px;max-width:100%;min-width:0}
.msg .line>.face{flex:none;margin-bottom:-7px}
.msg .line>.av{flex:none;width:26px!important;height:26px!important;margin-bottom:-7px}
.bubble{position:relative;min-width:0;max-width:760px;background:#f3f3f4;border-radius:18px;padding:11px 17px;font-size:15px;line-height:1.72;white-space:normal;word-break:break-word;color:#1a1a1a}
.msg.me{align-items:flex-end}
.msg.me .line{flex-direction:row-reverse}
.msg.me .bubble{background:#ececee}
.msg.notice .bubble{box-shadow:inset 0 0 0 1px #f0d3a0;background:#fffaf0}
.msg .refs{margin-left:48px}
.msg.me .refs{margin:6px 48px 0 0}
.bubble p{margin:0 0 9px}
.bubble>:last-child{margin-bottom:0}
.bubble h4{font-size:15px;font-weight:700;margin:12px 0 4px;line-height:1.6}
.bubble h4:first-child{margin-top:0}
.bubble ul,.bubble ol{margin:2px 0 10px;padding-left:22px}
.bubble ul{list-style:disc}
.bubble li{margin:4px 0;padding-left:2px}
.bubble li::marker{color:#9a9aa0}
.bubble ol li::marker{color:#6b6b70}
.bubble li.sub{margin-left:18px;list-style:circle}
.bubble b{font-weight:650}
.bubble code{font-family:ui-monospace,"Cascadia Mono",Consolas,"SFMono-Regular",monospace;font-size:.86em;background:#e6e6e8;color:#2a2a2e;border-radius:6px;padding:2px 6px;margin:0 1px;white-space:pre-wrap}
.bubble pre{background:#e9e9eb;border-radius:10px;padding:10px 12px;margin:4px 0 10px;overflow:auto}
.bubble pre code{background:none;padding:0;font-size:13px;white-space:pre}
.bubble hr{border:0;border-top:1px solid #dcdce0;margin:10px 0}
.bubble a:not(.pic):not(.mention){color:#2563eb;text-decoration:none}
.bubble a:not(.pic):hover{text-decoration:underline}
.bubble .tbl{overflow:auto;margin:4px 0 10px}
.bubble table{border-collapse:collapse;font-size:13.5px;line-height:1.5;background:#fff;border-radius:8px;overflow:hidden}
.bubble th,.bubble td{border:1px solid #e2e2e6;padding:5px 10px;text-align:left;white-space:nowrap}
.bubble th{background:#f7f7f8;font-weight:600}
.mention{display:inline-flex;align-items:center;gap:4px;vertical-align:-3px;margin:0 2px;white-space:nowrap}
.mention>.face,.mention>.av{width:18px!important;height:18px!important;flex:none}
.mention b{font-weight:650;color:color-mix(in srgb,var(--c) 85%,#000)}
.acts{display:flex;align-self:flex-start;gap:2px;margin-left:6px;padding-top:2px;opacity:0;transition:opacity .12s}
.msg:hover .acts,.acts:focus-within{opacity:1}
.msg.me .acts{margin:0 6px 0 0}
.acts button{width:30px;height:30px;border:0;background:none;border-radius:8px;color:#8e8e93;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.acts button:hover{background:#f0f0f2;color:#3a3a3c}
.acts svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.reacts{margin:6px 0 0 48px;display:flex;gap:6px}
.msg.me .reacts{margin-right:48px}
.react{font-size:12.5px;background:#f3f3f4;border:1px solid #e4e4e7;border-radius:12px;padding:1px 9px}
.msg.thinking .bubble{padding:9px 16px}

/* 窗口窄的时候：右栏浮在聊天上面（不再把聊天挤成一列字），列表收窄 */
@media (max-width:1280px){
  #team{position:relative}
  .tm-side{position:absolute;top:0;right:0;bottom:0;z-index:6;box-shadow:-12px 0 32px rgba(15,23,42,.12)}
  .tm-list{width:232px}
}
@media (max-width:900px){
  .tm-list{width:188px;padding:12px 8px 0}
  .tm-side{width:min(372px,86vw)}
}
/* 聊天里的表格：长文字列自动换行，不再被气泡右边截掉 */
.bubble table{width:100%}
.bubble th,.bubble td{white-space:normal;word-break:break-word;padding:5px 8px}
.msg .col:has(.tbl){max-width:86%}
.bubble:has(.tbl){width:100%;box-sizing:border-box}
.bubble .tbl{max-width:100%}
.bubble td:first-child{white-space:nowrap}
.bubble td.nw{white-space:nowrap;word-break:keep-all}
/* 例行任务：新建、修改、删除 */
.routines h6 a{margin-left:auto}
.routine .r-acts{display:flex;align-items:center;gap:6px;margin-left:auto}
.routine .r-acts a{color:var(--muted);display:flex}
.routine .r-acts a:hover{color:var(--brand)}
.routine .r-acts svg{width:15px;height:15px}
.routine-form{display:flex;flex-direction:column;gap:8px;margin-top:8px;padding:10px;border:1px solid var(--line);border-radius:10px}
.routine-form .two{display:grid;grid-template-columns:1fr 120px;gap:8px}
.routine-form .actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}
.r-msg{font-size:12px;color:#d4380d;margin-right:auto}

/* ───── 报销单草稿卡片（审单员预审） ───── */
.draft{margin:0 0 20px 48px;max-width:560px;background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.05),0 8px 24px rgba(16,24,40,.07);border:1px solid transparent}
.draft.need{border-color:#fbd5d0}
.d-head{display:flex;align-items:center;gap:10px;padding:14px 16px;background:#fff8ee}
.draft.ok .d-head{background:#effaf3}.draft.done .d-head{background:#f3f6fb}.draft.deny .d-head{background:#f5f5f5}
.d-head b{display:block;font-size:14px}.d-head small{color:var(--muted);font-size:12px}
.d-state{margin-left:auto;font-size:12px;font-weight:600;padding:3px 10px;border-radius:99px;background:#fff;color:var(--amber)}
.draft.ok .d-state{color:var(--green)}.draft.done .d-state{color:var(--brand)}.draft.deny .d-state{color:var(--muted)}
.d-pics{display:flex;gap:8px;padding:12px 16px 0;flex-wrap:wrap}
.d-pic{position:relative;display:block;width:76px;height:96px;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:#f6f7f9}
.d-pic img{width:100%;height:100%;object-fit:cover;object-position:top}
.d-pic span{position:absolute;left:0;right:0;bottom:0;font-size:11px;text-align:center;color:#fff;background:rgba(20,24,33,.62);padding:2px 0}
.d-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;padding:12px 16px}
.d-f{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--muted)}
.d-f.d-reason,.d-f.d-invoice_no{grid-column:1/-1}
.d-f input,.d-f select,.d-f textarea{font:inherit;font-size:14px;color:var(--ink);border:1.5px solid var(--line);border-radius:9px;padding:7px 10px;background:#fff;resize:vertical}
.d-f input:focus,.d-f select:focus,.d-f textarea:focus{outline:none;border-color:var(--brand)}
.d-f input[readonly],.d-f textarea[readonly],.d-f select:disabled{background:#f8f9fb;color:#4b5563}
.d-f.bad input,.d-f.bad select,.d-f.bad textarea{border-color:#e5322d;background:#fff7f6}
.d-f em{font-style:normal;color:#d0352a;font-size:12px}
.d-foot{padding:0 16px 14px;display:flex;flex-direction:column;gap:10px}
.d-sum{display:flex;gap:6px;align-items:flex-start;margin:0;font-size:13px;line-height:1.5}
.d-sum svg{width:15px;height:15px;margin-top:2px;flex:none}
.d-sum.bad{color:#d0352a}.d-sum.ok{color:var(--green)}
.d-btns{display:flex;gap:8px;justify-content:flex-end}
.draft [data-dcheck]{display:none}
.draft.need [data-dcheck],.draft.dirty [data-dcheck]{display:inline-flex}
.draft.need [data-dsubmit],.draft.dirty [data-dsubmit]{display:none}   /* 没补齐不能授权执行；“不同意”（这单不报了）一直能点，比如假票 */
.jobbar{margin:0 16px 6px;padding:8px 12px;border-radius:10px;background:#f3f6fb;color:var(--brand);font-size:13px}
.jobbar span{display:flex;align-items:center;gap:8px}
.jobbar .spin{width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .8s linear infinite;display:inline-block}
.newpill{align-self:center;margin:0 auto 6px;display:flex;align-items:center;gap:6px;border:0;border-radius:99px;background:var(--brand);color:#fff;font-size:13px;padding:6px 14px;cursor:pointer;box-shadow:0 4px 12px rgba(37,99,235,.3)}
.newpill svg{width:14px;height:14px}
@keyframes spin{to{transform:rotate(360deg)}}

/* ───── 聊天像微信：灰底，数字员工绿泡泡，自己白泡泡，带小尖角 ───── */
.tm-chat{background:#ededed}
.tm-head{background:#ededed}
.msg:not(.me) .bubble{background:#95ec69;border-radius:6px;padding:9px 13px;color:#111}
.msg.me .bubble{background:#fff;border-radius:6px;padding:9px 13px;color:#111}
.msg .bubble::before{content:"";position:absolute;top:12px;width:0;height:0;border:6px solid transparent}
.msg:not(.me) .bubble::before{left:-11px;border-right-color:#95ec69}
.msg.me .bubble::before{right:-11px;border-left-color:#fff}
.msg.notice .bubble{box-shadow:none;background:#95ec69}
.msg.thinking .bubble{background:#fff}
.msg.thinking .bubble::before{border-right-color:#fff}
.bubble code{background:rgba(255,255,255,.55)}
.composer{background:#f7f7f7}

/* ───── 草稿卡片：缺的票据、上传票据、一键提交 ───── */
.d-pics{align-items:stretch}
.d-miss{width:76px;height:96px;border-radius:10px;border:1.5px dashed #e5322d;background:#fff6f5;color:#d0352a;font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}
.d-miss svg{width:18px;height:18px}
.d-up{width:76px;height:96px;border-radius:10px;border:1.5px dashed #9db8f5;background:#f5f8ff;color:var(--brand);font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer}
.d-up svg{width:18px;height:18px}
.d-up input{display:none}
.d-imgs-msg{padding:6px 16px 0;margin:0;color:#d0352a;font-size:12px;line-height:1.5}
.draft.busy{position:relative}
.draft.busy::after{content:"审单员正在识别票据……";position:absolute;inset:0;background:rgba(255,255,255,.78);display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--brand);border-radius:20px}
.submitbar{margin:0 16px 6px;padding:9px 12px 9px 14px;border-radius:12px;background:#effaf3;color:var(--green);font-size:14px;display:flex;align-items:center;gap:10px}
.submitbar span{flex:1}
/* 卡片上的留痕说明：替票、超标已报备 */
.d-notes{margin:2px 0 8px;padding:8px 10px;background:#fff8e8;border-radius:8px;font-size:12.5px;color:#6b5418}
.d-notes p{margin:0;display:flex;gap:5px;align-items:flex-start;line-height:1.55}
.d-notes svg{width:13px;height:13px;margin-top:3px;flex:none;color:var(--amber)}
