:root{font:16px/1.55 "Inter","Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;color:#172946;background:#f4f6fa;font-synthesis:none;--navy:#182b53;--blue:#2856ba;--ink:#172946;--muted:#59687d;--line:#dbe2ec;--paper:#fff}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}button,a,input,textarea,select{outline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #45a8ec}h1,h2,h3,p{margin:0}h1{font-size:clamp(1.8rem,3vw,2.7rem);letter-spacing:-.055em;line-height:1.22}h2{font-size:1.2rem;line-height:1.5}h3{font-size:1rem}button{background:transparent;border:0;color:inherit}.sub,.muted{color:var(--muted)}.sub{font-size:.9rem}.sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.brand{display:flex;align-items:center;gap:.65rem;font-weight:760;font-size:1.45rem;letter-spacing:.04em}.mark{display:inline-flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:4px;width:29px;height:32px;transform:skew(-14deg)}.mark i{height:5px;background:#8cd5ff;width:100%;border-radius:1px}.mark i:nth-child(2){width:74%}.mark i:nth-child(3){width:49%}
#access{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(17rem,47%) 1fr;background:white}.loginCover{position:relative;overflow:hidden;isolation:isolate;background:#203d7c;color:white;display:flex;flex-direction:column;justify-content:space-between;padding:clamp(2rem,5vw,5rem)}.coverTitle{z-index:1;padding-bottom:8vh}.coverTitle span{display:block;color:#c8e4ff;letter-spacing:.1em;margin-bottom:1rem}.coverTitle h1{font-size:clamp(2.6rem,5vw,4.7rem);font-weight:650}.contours{position:absolute;width:115%;aspect-ratio:1;right:-60%;top:7%;transform:rotate(-27deg);z-index:-1}.contours i{position:absolute;inset:0;border:1.5px solid #6ba8df88;border-radius:31% 46% 31% 45%}.contours i:nth-child(2){inset:5%}.contours i:nth-child(3){inset:10%}.contours i:nth-child(4){inset:15%}.contours i:nth-child(5){inset:20%}.contours i:nth-child(6){inset:25%}.contours i:nth-child(7){inset:30%}
.loginPane{display:grid;place-items:center;padding:2rem}.loginPane form{width:min(100%,23rem)}.loginPane h2{font-size:1.85rem;letter-spacing:-.04em}.loginPane .sub{margin:.5rem 0 2.25rem}label:has(>input),.formField{display:grid;gap:.45rem;font-size:.9rem;font-weight:600}.loginPane label+label,.formField+.formField{margin-top:1rem}input,textarea,select{background:white;border:1px solid #bbc8d8;border-radius:.45rem;padding:.65rem .8rem;color:var(--ink);min-width:0}textarea{resize:vertical;min-height:5.25rem}.primary,.soft,.plain,.danger,.linkButton{font-size:.875rem;font-weight:620;line-height:1.45;min-height:2.35rem;padding:.45rem .85rem;border-radius:.42rem}.primary{color:#fff;background:var(--blue)}.primary:hover{background:#214795}.soft{color:#224b9e;background:#eaf0fc}.plain,.danger{border:1px solid #c4cede;background:#fff}.danger{color:#a9323f}.linkButton{color:var(--blue);padding:.25rem .35rem}.wide{width:100%;min-height:2.8rem}.formerror{color:#a73139;min-height:1.6rem;font-size:.88rem;margin:.35rem 0}.errorBox{border-left:3px solid #c54c56;background:#fff2f1;padding:1rem;color:#822c34}
#shell{display:grid;grid-template-columns:208px minmax(0,1fr);min-height:100vh}.rail{background:var(--navy);color:#e8edf9;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;height:100dvh;padding:2rem 1rem 1.15rem}.identity{padding:0 .95rem 2.2rem}.identity>span{display:block;font-size:.84rem;color:#b8c7e2;margin:.45rem 0 0 2.5rem}.rail nav{display:grid;gap:.35rem}.rail nav button{display:flex;align-items:center;gap:.75rem;text-align:left;color:#cbd7eb;padding:.68rem .9rem;border-radius:.45rem;font-size:.95rem}.rail nav button:hover{background:#243c69}.rail nav button[aria-current=page]{background:#345990;color:white;box-shadow:inset 3px 0 #9edcff}.icon{width:1.13rem;height:1.13rem;flex:none}.railFoot{display:grid;gap:.3rem;margin-top:auto;padding:.9rem .9rem 0;border-top:1px solid #405276}.railFoot span{overflow-wrap:anywhere}.railFoot button{color:#c6d3eb;text-align:left;font-size:.85rem;padding:0}.workspace{min-width:0}.top{height:3.65rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0 clamp(1.2rem,3.2vw,3.4rem);background:white;border-bottom:1px solid var(--line);font-size:.83rem;color:var(--muted)}.topStatus{font-variant-numeric:tabular-nums;text-align:right}.frame{max-width:1680px;margin:auto;padding:2rem clamp(1.2rem,3.2vw,3.4rem) 4rem}.pageHead,.sectionHead,.dialogHead,.rowHead{display:flex;align-items:center;justify-content:space-between;gap:1rem}.pageHead{align-items:flex-end;margin-bottom:1.75rem}.pageHead .sub{margin-top:.45rem}.toolbar,.actions,.meta,.filters{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}.date input{padding:.4rem .55rem;font-size:.88rem;font-weight:500;min-height:2.35rem}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:.75rem;padding:1.3rem 1.45rem;min-width:0}.panel+.panel,.stack>*+*{margin-top:1rem}.sectionHead{margin-bottom:1rem}.sectionHead h2{letter-spacing:-.03em}.sectionHead .muted,.meta,.note,.badge{font-size:.8rem}.overviewGrid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(15rem,1fr);gap:1.1rem;align-items:start}.overviewGrid>.panel+.panel{margin-top:0}.overviewGrid .panel{padding:1.2rem}.brief{background:#eaf1fb;border-color:#c8d7ed;border-top:3px solid #345c9a}.brief ul,.notes{margin:.5rem 0;padding-left:1.15rem}.brief li,.notes li{padding:.22rem 0}.brief li::marker{color:#5682c3}.brief li{font-size:.93rem}.brief .actions{border-top:1px solid #c5d4e8;margin-top:1rem;padding-top:.65rem}
.productRow{display:grid;grid-template-columns:minmax(6.3rem,.75fr) minmax(9rem,1.45fr) auto;gap:.7rem;align-items:center;padding:1rem 0;border-top:1px solid var(--line)}.productLabel{font-weight:680;line-height:1.4;padding:0;text-align:left}.productLabel:hover,.rowTitle:hover{text-decoration:underline;text-underline-offset:3px}.productFacts{display:flex;flex-wrap:wrap;gap:.3rem .85rem}.fact{display:inline-flex;align-items:baseline;gap:.35rem;color:var(--muted);font-size:.8rem}.fact b{font-size:.96rem;color:var(--ink);font-variant-numeric:tabular-nums}.badge{display:inline-flex;align-items:center;gap:.3rem;color:#294981;background:#eaf0f9;padding:.2rem .48rem;line-height:1.4;border-radius:.32rem;white-space:nowrap}.badge.good{color:#135740;background:#e5f5ed}.badge.warn{color:#7d4904;background:#fff0cc}.badge.bad{color:#9b3039;background:#fce7e9}.badge.neutral{color:#536276;background:#eef1f6}
.feedPanel{margin-top:1.1rem}.row{padding:.95rem 0;border-top:1px solid var(--line)}.rowTitle{padding:0;text-align:left;font-size:1rem;font-weight:640;overflow-wrap:anywhere}.row p,.dialogText{overflow-wrap:anywhere;white-space:pre-wrap}.row p{font-size:.9rem;margin:.35rem 0;color:var(--muted)}.meta{color:var(--muted);gap:.4rem .85rem;margin-top:.35rem}.empty{color:var(--muted);padding:1rem 0;line-height:1.7;font-size:.92rem}.filters{margin-bottom:1rem}.filters select,.filters button{font-size:.85rem}.filters .active{background:#dce8fb;border-color:#adc2e7;color:#143b83}
.productTabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}.metricGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:0 1.25rem}.metric{padding:1rem 0;border-top:1px solid var(--line)}.metric b{font-size:1.65rem;letter-spacing:-.04em;line-height:1.45;font-variant-numeric:tabular-nums}.metric span{margin-left:.35rem;color:var(--muted);font-size:.82rem}.metric p,.note{color:var(--muted);font-size:.83rem}.trendRow{display:grid;grid-template-columns:8rem minmax(0,1fr) 6.5rem;align-items:center;gap:.7rem;padding:.38rem 0;font-size:.86rem}.trendRow b{text-align:right}.track{height:.5rem;background:#eef2f8;border-radius:.3rem;overflow:hidden}.track i{display:block;background:#5284c5;height:100%;border-radius:.3rem}.eventTime{list-style:none;margin:0;padding:0}.eventTime li{border-left:2px solid #bacfe7;padding:0 0 1rem 1rem;position:relative}.eventTime li::before{content:"";position:absolute;width:.5rem;height:.5rem;top:.4rem;left:-.3rem;background:var(--blue);border-radius:100%}.eventTime time{font-size:.8rem;color:var(--muted)}.eventTime p{overflow-wrap:anywhere}.divider{margin:1.15rem 0;border:0;border-top:1px solid var(--line)}
dialog{width:min(34rem,calc(100% - 2rem));max-height:85vh;overflow:auto;padding:1.4rem;border:1px solid #c7d4e3;border-radius:.8rem;color:var(--ink);box-shadow:0 1rem 4rem #14284b30}dialog::backdrop{background:#14243f70}.dialogHead{margin-bottom:1rem}.dialogHead button{font-size:1.55rem;line-height:1;width:2rem;height:2rem;border-radius:50%;background:#eff3f8}.dialogText{padding:.65rem 0}.dialogFoot{display:flex;justify-content:flex-end;gap:.5rem;flex-wrap:wrap;margin:1rem 0 .2rem}.dialogHead h2{overflow-wrap:anywhere}#notice{position:fixed;z-index:15;bottom:1.4rem;left:50%;transform:translateX(-50%);border-radius:.5rem;background:#162d50;color:white;padding:.64rem 1.15rem;min-width:8rem;max-width:min(32rem,90vw);text-align:center;pointer-events:none}
@media(max-width:1150px){#shell{grid-template-columns:178px minmax(0,1fr)}.overviewGrid{grid-template-columns:1fr}.productRow{grid-template-columns:minmax(8rem,.8fr) 1.8fr auto}.frame{padding-top:1.5rem}}
@media(max-width:800px){#shell{display:block}.rail{position:static;height:auto;padding:.65rem 1rem;display:grid;grid-template-columns:1fr auto;gap:.6rem}.identity{padding:0;display:flex;align-items:center;gap:.65rem}.identity>span{margin:0}.brand{font-size:1.18rem}.mark{width:22px;height:22px;gap:3px}.mark i{height:4px}.rail nav{order:3;grid-column:1/-1;display:flex;overflow-x:auto}.rail nav button{padding:.45rem .65rem;white-space:nowrap}.rail .icon{width:1rem}.railFoot{margin:0;border:0;padding:0;display:flex;gap:.65rem;align-items:center}.railFoot span{max-width:8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top{height:2.7rem}.pageHead{align-items:flex-start;flex-direction:column}.panel{padding:1rem}.toolbar{gap:.4rem}.frame{padding:1.3rem 1rem 2.5rem}.metricGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#access{display:flex;flex-direction:column}.loginCover{min-height:12rem;padding:1.35rem 1.55rem}.coverTitle{padding:1.6rem 0 0}.coverTitle span{font-size:.85rem;margin-bottom:.3rem}.coverTitle h1{font-size:2.1rem}.contours{width:86%;right:-22%;top:-50%}.loginPane{padding:2.5rem 1.45rem}.productRow{grid-template-columns:1fr auto}.productFacts{grid-row:2;grid-column:1/-1}.rowHead{align-items:flex-start}.top{font-size:.75rem}.identity>span{font-size:.72rem}.rail nav button{font-size:.81rem;gap:.3rem}.meta{font-size:.75rem}.trendRow{grid-template-columns:5.5rem 1fr 4.5rem}.railFoot span{font-size:.83rem}.sectionHead{align-items:flex-start}.sectionHead h2{font-size:1.1rem}}
.topStatus.stale{background:#fff0ca;color:#714000;border-left:3px solid #bf770c;border-radius:.25rem;padding:.3rem .65rem;font-weight:650}.infra{display:block;font-size:.75rem;color:var(--muted);font-weight:450;line-height:1.5;margin-top:.1rem}@media(max-width:600px){.top:has(.stale){height:auto;min-height:2.7rem;padding-top:.35rem;padding-bottom:.35rem}.topStatus.stale{max-width:65%}}
.membersGrid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(18rem,1fr);gap:1.15rem;align-items:start}.membersGrid>.panel+.panel{margin-top:0}.memberRow{display:flex;align-items:center;justify-content:space-between;gap:.8rem;border-top:1px solid var(--line);padding:.85rem 0}.memberRow>div{min-width:0;overflow-wrap:anywhere}.memberRow button{flex:none}.accessGroup{border:0;padding:0;margin:1.2rem 0 .4rem;min-width:0}.accessGroup legend{font-size:.93rem;font-weight:650;margin-bottom:.45rem;padding:0}.scopeChoices{display:grid;grid-template-columns:repeat(auto-fit,minmax(9.5rem,1fr));gap:.35rem}.scopeChoices .scopeChoice{display:flex;align-items:center;gap:.5rem;border:1px solid var(--line);background:#f8faff;padding:.55rem .6rem;border-radius:.4rem;cursor:pointer;font-size:.85rem;font-weight:500}.scopeChoice input{padding:0;accent-color:var(--blue);width:1.05rem;height:1.05rem;flex:none}.scopeChoice:has(:checked){border-color:#91aee0;background:#ecf2fc}.accessGroup .note{margin-top:.5rem}.memberRow .note{margin-top:.2rem}@media(max-width:1050px){.membersGrid{grid-template-columns:1fr}}

/* Operations assistant */
#agentLauncher {
  position: fixed;
  z-index: 10;
  inset-inline-end: max(1.5rem, env(safe-area-inset-right));
  bottom: max(1.35rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.9rem;
  padding: .55rem 1.1rem;
  border: 1px solid #415779;
  border-radius: 2rem;
  background: var(--navy);
  color: white;
  font-weight: 650;
  box-shadow: 0 5px 16px #172b502b;
}
#agentLauncher:hover { background: #263e68 }
#agentLauncher .icon { color: #acdeff; width: 1.2rem; height: 1.2rem }
#shell:has(#agentLauncher:not([hidden])) .frame { padding-bottom: 5.7rem }

#agentDrawer {
  --chat-ink: #172d4b;
  --chat-muted: #556981;
  --chat-line: #d9e3ed;
  --chat-tint: #f4f7fa;
  --chat-user: #e8f0ff;
  --chat-x: clamp(1rem, 2vw, 1.65rem);
  position: fixed;
  z-index: 11;
  right: max(1.35rem, env(safe-area-inset-right));
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  width: min(36rem, calc(100vw - 2.7rem));
  height: min(46rem, calc(100dvh - 2.4rem));
  overflow: hidden;
  border: 1px solid #adbed2;
  border-radius: 1.1rem;
  color: var(--chat-ink);
  background: white;
  box-shadow: 0 20px 64px #10284429, 0 3px 12px #10284416;
  line-break: strict;
}
#agentDrawer.expanded {
  inset: max(.8rem, env(safe-area-inset-top)) max(.8rem, env(safe-area-inset-right)) max(.8rem, env(safe-area-inset-bottom)) max(.8rem, env(safe-area-inset-left));
  width: auto;
  height: auto;
}
.drawerHead {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: none;
  padding: .95rem var(--chat-x) .65rem;
}
.drawerHead > .icon {
  width: 2.35rem;
  height: 2.35rem;
  padding: .5rem;
  color: #c5e8ff;
  background: var(--navy);
  border-radius: .75rem;
}
.drawerHeading { min-width: 0; flex: 1 }
.drawerHeading:has(.agentProjectScope) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name scope" "context scope";
  column-gap: .55rem;
  align-items: center;
}
.drawerHeading h2 { grid-area: name; font-size: 1.12rem; line-height: 1.4; font-weight: 680 }
.drawerContext { grid-area: context; margin-top: .12rem; color: var(--chat-muted); font-size: .79rem; line-height: 1.4; overflow-wrap: anywhere }
.agentProjectScope {
  grid-area: scope;
  max-width: 10rem;
  min-height: 2rem;
  padding: .2rem .35rem;
  border: 1px solid #d5dfea;
  border-radius: .45rem;
  background: #f6f8fb;
  color: #39506e;
  font-size: .79rem;
  line-height: 1.4;
}
.drawerHead button { flex: none; color: #425a75; border-radius: .5rem; min-width: 2.35rem; min-height: 2.35rem }
.drawerExpand { font-size: .83rem }
.drawerHead button:hover { background: #eef3f8; color: #1e4380 }
.drawerClose { font-size: 1.45rem; line-height: 1 }
.drawerTabs {
  display: flex;
  align-items: center;
  flex: none;
  gap: .25rem;
  padding: .15rem var(--chat-x) 0;
  border-bottom: 1px solid var(--chat-line);
}
.drawerTabs button {
  position: relative;
  flex: none;
  padding: .55rem .7rem .7rem;
  min-height: 2.45rem;
  color: var(--chat-muted);
  font-size: .86rem;
  font-weight: 540;
}
.drawerTabs button:hover { color: var(--blue); background: #f5f8fc }
.drawerTabs button[aria-selected=true] { color: #214da3; font-weight: 680 }
.drawerTabs button[aria-selected=true]::after {
  position: absolute;
  content: "";
  height: 3px;
  background: #3767c1;
  inset: auto .65rem -1px;
  border-radius: 3px 3px 0 0;
}
.drawerTabList { display: flex; align-items: center }
.drawerTabs .drawerNewChat {
  margin: 0 0 .32rem auto;
  min-height: 1.95rem;
  padding: .18rem .7rem;
  border: 1px solid #c1d2e8;
  border-radius: .48rem;
  background: #f4f8ff;
  color: #244d91;
  font-size: .8rem;
  font-weight: 620;
}
.agentUnread { display: inline-block; margin-left: .35rem; padding: 0 .38rem; border-radius: 1rem; color: #214989; background: #deebff; font-size: .69rem; font-weight: 700; line-height: 1.55 }
.drawerContent, .chatPanel { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column }
.chatLog, .chatHistory, .drawerDuty {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c2cfdd transparent;
  scrollbar-gutter: stable;
}
.chatLog { padding: 1.25rem var(--chat-x) 1.5rem; background: white }
.chatLog:focus-visible { outline: 2px solid #7295c6; outline-offset: -3px }
.chatTurn, .chatEmpty { max-width: 48rem; margin-inline: auto }
.chatTurn { display: flex; flex-direction: column; gap: .7rem; min-width: 0 }
.chatTurn + .chatTurn { padding-top: .95rem; margin-top: .95rem; border-top: 1px solid #e7edf4 }
.chatQuestion {
  align-self: flex-end;
  max-width: min(90%, 37rem);
  padding: .65rem .95rem;
  background: var(--chat-user);
  color: #19375c;
  border-radius: 1rem 1rem .3rem 1rem;
  font-size: .95rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chatAnswer { min-width: 0; max-width: 46rem; line-height: 1.75; overflow-wrap: anywhere }
.chatAuthor { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem; margin-bottom: .32rem; font-weight: 650; font-size: .82rem; color: #354e6c }
.chatQuestion > .chatAuthor { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.chatTime { font-size: .74rem; font-weight: 450; color: var(--chat-muted); font-variant-numeric: tabular-nums }
.chatAnswerText { font-size: .955rem; line-height: 1.82; overflow-wrap: anywhere }
.chatAnswerText > * { margin: 0 }
.chatAnswerText > * + * { margin-top: .55rem }
.replyParagraph, .replyList li { white-space: pre-wrap }
.replyHeading { font-weight: 670; font-size: 1.01rem; line-height: 1.65 }
.replyList { padding-inline-start: 1.45rem }
.replyList li + li { margin-top: .25rem }
.chatAnswerText > .replySnapshot { margin-top: .82rem; color: var(--chat-muted); font-size: .82rem; line-height: 1.65 }
.chatAnswerText > .replySnapshot:first-child { margin-top: 0 }
.replySnapshot strong { font-weight: 630; color: #324c6d }
.replyMetrics { padding: .1rem .8rem; background: #f6f8fb; border: 1px solid #e4eaf1; border-radius: .65rem }
.replyMetrics > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .15rem .7rem; padding: .46rem 0; line-height: 1.55 }
.replyMetrics > div + div { border-top: 1px solid #dee6ee }
.replyMetrics dt { flex: 1 1 7em; min-width: 0; font-size: .87rem; color: #415570 }
.replyMetrics dd { min-width: 0; max-width: 100%; margin: 0 0 0 auto; text-align: end; font-weight: 640; font-variant-numeric: tabular-nums }
.replyMetrics dd small { display: block; text-align: start; color: var(--chat-muted); font-size: .82rem; font-weight: 450 }
.replyMetrics > div:has(small) { display: grid; grid-template-columns: minmax(0, 1fr) auto }
.replyMetrics dd:has(small) { display: contents }
.replyMetrics dd small { grid-column: 1 / -1 }
.replySource, .chatMeta { color: var(--chat-muted); font-size: .78rem; line-height: 1.65; overflow-wrap: anywhere }
.replyEvent { padding: .65rem .85rem; border: 1px solid #dce5ee; border-radius: .65rem; }
.replyEvent h4 { margin: 0; font-size: .94rem; font-weight: 640; line-height: 1.65 }
.replyEvent p { margin-top: .35rem; white-space: pre-wrap; line-height: 1.7 }
.chatMeta { margin-top: .65rem }
.chatMeta summary { width: fit-content; padding-block: .1rem; cursor: pointer; color: #526882 }
.chatMeta summary:focus-visible { outline: 2px solid #4b78bc; outline-offset: 2px }
.chatMeta[open] p { margin: .25rem 0; padding-left: .7rem; border-left: 2px solid #cfdae7 }
.agentReferences { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem }
.agentReferences button {
  min-height: 2rem;
  max-width: 100%;
  padding: .28rem .6rem;
  border: 1px solid #cbd9e9;
  border-radius: .5rem;
  background: #fbfcff;
  text-align: left;
  font-size: .79rem;
  overflow-wrap: anywhere;
}
.agentReferences button:hover { background: #ebf2fc; border-color: #94add3 }
.chatEmpty { display: grid; align-content: center; justify-items: stretch; gap: .65rem; min-height: 100%; padding-block: 1.5rem }
.chatEmpty h3 { font-size: 1.35rem; font-weight: 660; letter-spacing: -.02em; margin-bottom: .4rem }
.agentExample {
  padding: .7rem .85rem;
  border: 1px solid #d7e2ef;
  border-radius: .65rem;
  color: #2e4d77;
  background: #fafcff;
  font-size: .9rem;
  text-align: start;
}
.agentExample:hover { color: #18448c; background: #edf4ff; border-color: #a8bfe0 }
.chatCompose {
  flex: none;
  padding: .7rem var(--chat-x) .9rem;
  border-top: 1px solid var(--chat-line);
  background: var(--chat-tint);
}
.chatCompose > * { max-width: 48rem; margin-inline: auto }
.chatCompose textarea {
  display: block;
  width: 100%;
  min-height: 3.55rem;
  max-height: 7rem;
  resize: none;
  padding: .65rem .85rem;
  background: white;
  border: 1px solid #b9c9dc;
  border-radius: .7rem;
  font-size: .94rem;
  line-height: 1.6;
}
.chatCompose textarea:focus-visible { outline: 2px solid #4b78bc; outline-offset: 1px }
.chatCompose textarea::placeholder { color: #667b93 }
.chatComposeActions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .55rem }
.chatComposeActions .actions { gap: .3rem }
.chatComposeActions .plain, .chatComposeActions .linkButton { font-size: .81rem; min-height: 2.15rem }
#agentSend { margin-inline-start: auto; padding-inline: 1.05rem; border-radius: .55rem }
.agentSelected { margin-bottom: .4rem; overflow-wrap: anywhere; font-size: .8rem; color: var(--chat-muted) }

.chatHistory, .drawerDuty { padding: 1.15rem var(--chat-x) 1.4rem }
.chatHistory > *, .drawerDuty > * { max-width: 48rem; margin-inline: auto }
.historyItem {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: .28rem;
  padding: .85rem .9rem;
  margin-block: .25rem;
  border: 1px solid transparent;
  border-bottom-color: #e4eaf1;
  border-radius: .55rem;
  text-align: start;
  background: white;
}
.historyItem:hover { background: #f3f7fc; border-color: #d2deeb }
.historyItem[aria-current]:not([aria-current=false]) { background: #edf3fe; border-color: #bbcfeb; box-shadow: inset 3px 0 #4074c1 }
.historyTitle { font-size: .96rem; line-height: 1.5; font-weight: 580; color: var(--chat-ink); overflow-wrap: anywhere }
.historyTime, .dutyMeta { color: var(--chat-muted); font-size: .78rem; font-variant-numeric: tabular-nums }
.agentProposal { margin-top: .85rem; padding: .8rem .9rem; border: 1px solid #bed0e6; background: #f2f6fc; border-radius: .65rem }
.agentProposal p, .dutyEntry p { white-space: pre-wrap; overflow-wrap: anywhere }
.agentProposal ul { margin: .45rem 0; padding-left: 1.3rem; overflow-wrap: anywhere }
.agentProposal .actions { margin-top: .65rem }
.agentChoices { display: grid; min-width: 0; max-height: 52vh; overflow: auto; border: 0; padding: 0; margin: 0 }
.agentChoice:has(>input) { display: flex; align-items: center; gap: .7rem; cursor: pointer; padding: .65rem .25rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere }
.agentChoice input { flex: none; width: 1rem; height: 1rem; accent-color: var(--blue) }
.agentChoice b, .agentChoice small { display: block }
.agentChoice small { font-weight: 400; color: var(--muted); margin-top: .2rem }
.drawerDuty .sectionHead { margin-bottom: .6rem }
.dutyList { list-style: none; padding: 0; margin-block: 0 }
.dutyEntry { border-top: 1px solid var(--chat-line); padding: .85rem 0 }
.dutyEntry h3 { margin: .25rem 0; font-size: .96rem; overflow-wrap: anywhere }
.dutyEntry p { font-size: .87rem; color: #415570 }
.dutyMeta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap }
.dutyMeta time { margin-left: auto }
.dutyEntry.unread .dutyMeta::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--blue) }
.dutyEntry .linkButton { min-height: 2.1rem; padding-left: 0; text-align: left; font-size: .82rem }

@media (max-width: 600px) {
  #agentLauncher { right: .8rem; bottom: max(.8rem, env(safe-area-inset-bottom)); font-size: .88rem }
  #agentDrawer, #agentDrawer.expanded {
    inset: auto 0 0;
    width: 100%;
    height: 100dvh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    border-width: 0;
    border-radius: 0;
  }
  .drawerHead { padding-top: .65rem; gap: .5rem }
  .drawerExpand { display: none }
  .chatQuestion { max-width: 92% }
  .chatCompose textarea { font-size: 1rem }
  .chatCompose { padding-block: .6rem }
  .chatLog { padding-block: 1.05rem }
}
@media (max-height: 460px) {
  .drawerHead { padding-block: .25rem }
  .drawerTabs button { padding-block: .25rem; min-height: 2rem }
  .chatCompose { padding-block: .35rem }
  .chatCompose textarea { min-height: 2.5rem; height: 2.5rem }
}

.modelSettings{max-width:66rem}
.modelControls{min-width:0;margin:0;padding:0;border:0}
.modelRouting{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.modelRouting .note{margin-top:.3rem}
.modelRouting .formField{min-width:13rem}
.modelProvider{margin-top:1rem;padding-top:1.15rem;border-top:1px solid var(--line)}
.modelProviderTitle,.modelKeyLabel,.modelTest,.modelFooter{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}
.modelProviderTitle h3{font-size:1.06rem}
.badge.modelPrimary{color:#224b9e;background:#eaf0fc}
.modelFields{display:grid;grid-template-columns:1fr 1fr;gap:.9rem 1.2rem;margin:.85rem 0 .7rem}
.modelField{min-width:0;display:grid;align-content:start;gap:.45rem}
.modelField input,.modelField select{width:100%}
.modelPickerRow{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.65rem}
.modelPickerRow a{display:inline-flex;align-items:center;min-height:2.5rem;color:var(--blue);font-size:.85rem;white-space:nowrap;text-underline-offset:.15rem}
.modelCatalog{display:flex;align-items:baseline;gap:.5rem;flex-wrap:wrap}
.modelKeyLabel{font-size:.9rem;font-weight:600}
.modelKeyLabel .note{font-weight:400}
.modelTest .plain{min-height:2rem;padding:.25rem .7rem}
.modelProviders>.sectionHead{margin-bottom:.1rem}
.modelQuota{margin-top:.9rem;background:#f6f8fb;padding:.8rem 1rem;border-radius:.4rem}
.modelQuotaGrid{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1fr) minmax(0,1.3fr);gap:.65rem 1rem;overflow-wrap:anywhere}
.modelQuotaGrid h4{font-size:.84rem;margin:0 0 .3rem}
.modelQuotaGrid p{font-size:.84rem}
.modelQuotaGrid .note,.modelQuotaGrid a{font-size:.79rem}
.modelQuotaGrid a{display:inline-block;text-underline-offset:.15rem;color:var(--blue);margin-top:.25rem}
.modelQuotaAlert{color:#9b3039}
.modelFooter{margin:1.2rem 0 .65rem}
.modelStatus{color:var(--muted);font-size:.86rem;overflow-wrap:anywhere}
.modelStatus.good{color:#135740}.modelStatus.bad{color:#9b3039}
.settlements { border-top:3px solid #287761 }
.agentBillDetails { margin-top:.7rem; padding:.55rem .8rem; border:1px solid var(--line); border-radius:.45rem }
.agentBillDetails p { display:flex; gap:.6rem; align-items:baseline; flex-wrap:wrap; font-size:.86rem }
.agentBillDetails strong { color:var(--muted) }
.agentBillDetails .billMargin,.agentBillDetails .billPayer { display:grid; gap:.15rem }
.settlementBand { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:1rem; padding:.2rem 0 1.05rem }
.settlementSummary { display:flex; align-items:flex-end; flex-wrap:wrap; gap:clamp(1.5rem,4vw,4rem) }
.settlementSummary>div { display:grid; gap:.25rem }
.settlementLabel,.settlementStamp,.revenueReport small { font-size:.82rem; color:var(--muted) }
.settlementStamp { line-height:1.5 }
.settlementAmount,.settlementCount,.billAmount,.revenueReport b { font-variant-numeric:tabular-nums }
.settlementAmount { color:#185d4b; font-size:clamp(1.85rem,3.7vw,2.8rem); line-height:1.06; letter-spacing:-.045em }
.settlementCount { font-size:1.4rem; line-height:1.25 }
.billTable { width:100%; border-collapse:collapse; text-align:left; font-size:.88rem }
.billTable th,.billTable td { padding:.7rem .65rem; border-bottom:1px solid var(--line); vertical-align:middle }
.billTable th { color:var(--muted); font-size:.77rem; font-weight:600; background:#f3f6f8 }
.billTable th:first-child { border-radius:.35rem 0 0 .35rem }
.billTable th:last-child,.billAmount { text-align:right }
.billTable td:first-child,.billAmount { white-space:nowrap }
.billRef { color:#38506d; font: .84rem/1.5 ui-monospace,Consolas,monospace; overflow-wrap:anywhere }
.billPayer { overflow-wrap:anywhere }
.billPayer span { display:block }
.payerNickname { font-weight:600 }
.payerPhone { font-variant-numeric:tabular-nums; white-space:nowrap }
.payerNickname+.payerPhone,.payerStatus { font-size:.8rem; color:var(--muted) }
.agentBillContacts { margin:.65rem 0; padding:.65rem .8rem; border-left:2px solid #c0d4cd; background:#f4f8f6 }
.agentBillContacts p { display:flex; align-items:baseline; flex-wrap:wrap; gap:.3rem .65rem; overflow-wrap:anywhere }
.agentBillContacts .billPayer { display:inline-flex; align-items:baseline; flex-wrap:wrap; gap:.3rem .6rem }
.billAmount { color:#185d4b; font-weight:700 }
.billMargin { display:grid; gap:.14rem; margin-top:.22rem; font-size:.78rem; line-height:1.45; color:#405a56; font-weight:500; white-space:normal }
.billMarkup,.billCommission,.billMarginNote { color:var(--muted); font-size:.76rem }
.billPager { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem; margin-top:1rem }
.billPager>span { margin-right:auto }
.revenueReports { display:flex; flex-wrap:wrap; gap:.85rem 2rem; margin-bottom:.85rem }
.revenueReport { display:grid; grid-template-columns:auto auto; gap:.2rem .8rem; align-items:baseline }
.revenueReport small { grid-column:1/-1 }
.revenueReport .reportGross { font-weight:650; color:#315c50; font-variant-numeric:tabular-nums }
@media(max-width:680px) {
  .billListPanel .sectionHead { display:grid; gap:.65rem; align-items:start }
  .billListPanel .filters { gap:.35rem }
  .billTable,.billTable tbody { display:block }
  .billTable thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%) }
  .billTable tr { display:grid; grid-template-columns:1fr auto; column-gap:.65rem; row-gap:.32rem; padding:.7rem 0; border-top:1px solid var(--line) }
  .billTable td { padding:0; border:0 }
  .billTable td:first-child { grid-column:2; grid-row:2; color:var(--muted); font-size:.8rem }
  .billTable td:nth-child(2) { grid-row:1; grid-column:1; font-weight:650 }
  .billTable .billChannel { grid-row:2; grid-column:1; font-size:.82rem }
  .billTable .billAmount { display:contents }
  .billValue { grid-row:1; grid-column:2; text-align:right }
  .billMargin { grid-row:4; grid-column:1/-1; display:flex; flex-wrap:wrap; gap:.25rem .65rem; margin-top:0 }
  .billTable .billPayer { grid-column:1/-1; grid-row:3; display:flex; align-items:baseline; flex-wrap:wrap; gap:.3rem; font-size:.84rem }
  .billTable .billPayer::before { content:'付款人'; color:var(--muted); font-size:.78rem }
  .billTable .billRef { grid-column:1/-1; grid-row:5; font-size:.78rem }
  .billTable tr:not(:has(.billMargin)) .billRef { grid-row:4 }
  .billRef::before { content:'商户订单号 '; font-family:system-ui,sans-serif; color:var(--muted) }
}
.modelControls:disabled .modelFooter button{opacity:.65}
@media(max-width:650px){
  .modelRouting{display:grid}
  .modelFields{grid-template-columns:minmax(0,1fr)}
  .modelQuotaGrid{grid-template-columns:1fr 1fr}
  .modelQuotaGrid>div:last-child{grid-column:1/-1;border-top:1px solid var(--line);padding-top:.55rem}
  .modelTest .plain{min-height:2.5rem}
}
