:root{--navy:#09184c;--blue:#335cff;--ink:#15204a;--muted:#77809a;--line:#e8eaf1;--panel:#f7f8fc;--white:#fff}
*{box-sizing:border-box}
body{margin:0;overflow-x:hidden;background:var(--panel);color:var(--ink);font-family:"PingFang SC","Microsoft YaHei",Arial,sans-serif}
.app-shell{min-height:100vh;display:grid;grid-template-columns:252px minmax(0,1fr)}
.sidebar{background:var(--navy);color:#d6defa;padding:24px 16px;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:11px;color:white;text-decoration:none;font-size:16px;font-weight:650;letter-spacing:.2px;padding:2px 8px}
.brand small{display:block;font-size:8px;letter-spacing:1.65px;color:#9faddd;margin-top:3px}
.brand-mark{width:31px;height:31px;display:grid;place-items:center;border:1px solid #7386ce;border-radius:9px;font-family:Georgia,serif;font-size:21px;font-style:italic}
.new-chat{margin:36px 0 26px;background:#2a48af;color:#fff;border:0;border-radius:9px;height:43px;text-align:left;padding:0 16px;font-size:14px;cursor:pointer}
.new-chat span{font-size:20px;vertical-align:-1px;margin-right:8px;font-weight:300}
.workspace-switch{display:flex;flex-direction:column;gap:4px;margin:0 0 25px}
.workspace-switch a{display:block;border-radius:7px;color:#aebbe7;text-decoration:none;padding:9px 8px;font-size:13px}
.workspace-switch a:hover{background:#152867;color:#fff}
.workspace-switch a.active{background:#21377f;color:#fff;font-weight:650}
.history p{font-size:11px;color:#8c9aca;margin:0 8px 10px}
.history button{display:block;width:100%;border:0;background:transparent;color:#c6ceeb;border-radius:7px;text-align:left;padding:10px 8px;font:13px inherit;cursor:pointer}
.history button:hover{background:#152867;color:white}
.history-section+.history-section{margin-top:22px}
.recent-history{display:flex;flex-direction:column;gap:2px}
.history-row{display:flex;align-items:center;border-radius:7px}
.recent-history .history-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.recent-history .history-item.active{background:#152867;color:#fff}
.history-delete{width:28px!important;height:30px;padding:0!important;flex:0 0 28px;text-align:center!important;color:#8f9fd2!important;font-size:19px!important;line-height:24px!important}
.history-delete:hover{background:#3a245c!important;color:#ffbbcb!important}
.empty-history{display:block;color:#7988ba;font-size:12px;padding:8px}
.sidebar-footer{margin-top:auto;font-size:11px;color:#a3b2e3;padding:10px 8px}
.sidebar-footer i{display:inline-block;width:7px;height:7px;background:#65d6a0;border-radius:99px;margin-right:7px}
.conversation{height:100vh;min-width:0;display:grid;grid-template-rows:74px 1fr auto;max-width:1120px;width:100%;margin:auto;background:var(--white);box-shadow:0 0 40px rgba(31,43,90,.04)}
.topbar{border-bottom:1px solid var(--line);padding:0 36px;display:flex;align-items:center;justify-content:space-between}
.topbar strong{font-size:16px}
.topbar span{display:block;font-size:12px;color:var(--muted);margin-top:4px}
.more{border:0;background:transparent;font-size:20px;color:#6f7893;letter-spacing:2px;cursor:pointer}
.messages{min-width:0;overflow:auto;padding:40px max(36px,8%);display:flex;flex-direction:column;gap:26px}
.message{display:flex;min-width:0;gap:12px;max-width:min(760px,100%)}
.message.assistant{width:min(760px,100%)}
.avatar{flex:0 0 32px;height:32px;border-radius:10px;background:linear-gradient(135deg,#2449ba,#5a77f5);color:white;display:grid;place-items:center;font-size:11px;font-weight:700}
.bubble{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word;font-size:14px;line-height:1.75;background:#f5f7ff;border:1px solid #e8ecfc;border-radius:4px 14px 14px 14px;padding:13px 17px}
.bubble p{margin:0 0 8px}
.bubble p:last-child{margin-bottom:0}
.bubble h3,.bubble h4,.bubble h5{line-height:1.4;margin:15px 0 7px}
.bubble h3:first-child,.bubble h4:first-child,.bubble h5:first-child{margin-top:0}
.bubble ul,.bubble ol{margin:7px 0;padding-left:21px}
.bubble li{margin:3px 0}
.bubble code{overflow-wrap:anywhere;word-break:break-word;font:12px ui-monospace,SFMono-Regular,Menlo,monospace;background:#e7ebf8;border-radius:4px;padding:1px 5px;color:#223a9a}
.bubble pre{max-width:100%;overflow:auto;margin:10px 0;background:#17203c;color:#e8eeff;border-radius:8px;padding:11px}
.bubble pre code{padding:0;background:transparent;color:inherit}
.bubble a{color:#284bc7;text-decoration:underline}
.markdown-table{max-width:100%;overflow-x:auto;margin:10px 0;border:1px solid #dce2f2;border-radius:7px}
.markdown-table table{width:100%;border-collapse:collapse;font-size:12px}
.markdown-table th,.markdown-table td{padding:7px 9px;border-bottom:1px solid #e3e7f2;text-align:left;white-space:nowrap}
.markdown-table th{background:#edf1fc;color:#31416e;font-weight:600}
.markdown-table tr:last-child td{border-bottom:0}
.process-panel{max-width:100%;margin:0 0 12px;border:1px solid #d9e1f5;border-radius:8px;background:#fbfcff;color:#52607f}
.process-panel summary{cursor:pointer;padding:8px 10px;color:#3e5298;font-size:12px;font-weight:600}
.process-panel summary span{float:right;color:#7583aa;font-weight:400}
.process-content{overflow-wrap:anywhere;word-break:break-word;border-top:1px solid #e5eaf7;padding:8px 10px;font-size:12px;line-height:1.55}
.process-content p{margin:0 0 5px}
.final-answer[hidden]{display:none}
.report-link{margin-top:12px}
.report-link a{display:inline-flex;align-items:center;padding:8px 11px;border-radius:7px;background:#e1e7ff;color:#2443bd;font-size:13px;font-weight:600;text-decoration:none}
.report-link a:hover{background:#d3dcff}
.message.user{align-self:flex-end;flex-direction:row-reverse}
.message.user .avatar{background:#e5e9f5;color:#4a5a86}
.message.user .bubble{background:var(--blue);border-color:var(--blue);color:white;border-radius:14px 4px 14px 14px}
.suggestions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.suggestions button{border:1px solid #d4dcf5;background:#fff;color:#2844b1;padding:7px 10px;border-radius:7px;font:12px inherit;cursor:pointer}
.composer{border-top:1px solid var(--line);margin:0 32px 22px;border:1px solid #dce1ef;border-radius:12px;padding:11px 13px 8px;box-shadow:0 4px 16px rgba(30,48,104,.05)}
textarea{border:0;width:100%;resize:none;outline:0;min-height:32px;max-height:160px;font:14px/1.5 inherit;color:var(--ink);background:transparent}
.composer-bottom{display:flex;align-items:center;justify-content:space-between;color:#969eb4;font-size:11px}
.send{border:0;width:30px;height:30px;border-radius:8px;background:var(--blue);color:white;font-size:19px;line-height:20px;cursor:pointer}
.send:disabled{background:#bbc4df;cursor:wait}
.typing .bubble{color:var(--muted);font-style:italic}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:720px){.app-shell{display:block}
.sidebar{display:none}
.conversation{height:100vh}
.topbar{padding:0 18px}
.messages{padding:26px 18px}
.composer{margin:0 14px 14px}
.composer-bottom span{display:none}
}
