:root {
  font-family:Inter,"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  color:#172b43;
  background:#f3f5f9;
  font-size:14px;
  line-height:1.6;
  font-synthesis:none;
  --blue:#315fda;
  --line:#e3e8f0;
  --muted:#738096
}

* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select {
  font:inherit
}
button,a,input,summary {
  outline-offset:4px
}
button {
  cursor:pointer
}
button:disabled {
  cursor:wait;
  opacity:.6
}
input,select {
  width:100%;
  padding:11px 13px;
  color:#172b43;
  border:1px solid #d5dde9;
  border-radius:7px;
  background:#fff
}
input:focus,select:focus {
  outline:2px solid #b5c7ff;
  border-color:#315fda
}
input[type=checkbox],input[type=radio] {
  width:auto;
  accent-color:var(--blue)
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:26px;
  font-weight:650;
  letter-spacing:-.6px;
  line-height:1.3
}
h2 {
  font-size:17px;
  font-weight:650
}
h3 {
  font-size:15px;
  font-weight:600
}
label {
  display:block;
  font-weight:550;
  margin-bottom:8px
}
a {
  color:var(--blue);
  text-decoration:none
}
a:hover {
  text-decoration:underline
}
[hidden] {
  display:none!important
}
.muted {
  color:var(--muted)
}
.small {
  font-size:12px
}
.optional {
  font-weight:400;
  color:var(--muted);
  font-size:12px;
  margin-left:6px
}
.primary,.secondary {
  border-radius:7px;
  padding:10px 18px;
  font-weight:550;
  border:1px solid transparent;
  transition:background .15s
}
.primary {
  background:var(--blue);
  color:#fff;
  box-shadow:0 2px 4px #223f8412
}
.primary:hover {
  background:#254fbf
}
.secondary {
  background:#fff;
  border-color:#d7dfeb;
  color:#2a4161
}
.secondary:hover {
  background:#f2f5fb
}
.wide {
  width:100%;
  padding:12px 20px
}
.text-button {
  border:0;
  background:none;
  color:#526680;
  padding:4px 8px
}
.text-button:hover {
  color:var(--blue)
}
.error-text {
  color:#b43e37;
  font-size:13px;
  margin:10px 0;
  min-height:0
}
.error-text:empty {
  display:none
}
.field-help {
  font-size:12px;
  color:var(--muted);
  margin:8px 0 0
}
.site-header {
  height:76px;
  background:#fff;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:42px;
  padding:0 max(30px,calc((100vw - 1360px)/2));
  position:sticky;
  top:0;
  z-index:5
}
.brand {
  display:flex;
  align-items:center;
  gap:11px;
  color:#192f4c;
  font-size:17px;
  font-weight:650;
  white-space:nowrap
}
.brand:hover {
  text-decoration:none
}
.brand-mark {
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:9px;
  background:#25446c;
  color:#fff;
  font-size:19px;
  font-weight:600
}
.site-header nav {
  display:flex;
  align-self:stretch;
  gap:28px;
  flex:1
}
.nav-item {
  border:0;
  background:none;
  color:#6b7890;
  padding:0 2px;
  position:relative
}
.nav-item.active {
  color:#224cbe;
  font-weight:600
}
.nav-item.active:after {
  content:"";
  position:absolute;
  height:3px;
  left:0;
  right:0;
  bottom:0;
  background:#315fda;
  border-radius:2px
}
.small-dot {
  display:inline-block;
  width:6px;
  height:6px;
  background:#d69c35;
  border-radius:50%;
  vertical-align:middle;
  margin-left:7px
}
.small-dot.ready {
  background:#30936c
}
main {
  max-width:1360px;
  margin:0 auto;
  padding:38px 30px 20px
}
.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:27px;
  gap:20px
}
.page-heading p {
  margin-top:8px
}
.worker-status {
  font-size:12px;
  color:#64758c;
  white-space:nowrap
}
.worker-status:before {
  content:"";
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#b3bdcc;
  margin-right:8px
}
.worker-status.ready:before {
  background:#33a27a
}
.workspace-grid {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(340px,1fr);
  gap:24px;
  align-items:start
}
.panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 4px 18px #1f36510a;
  padding:27px
}
.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:24px
}
.field-block {
  margin-bottom:24px
}
.label-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
  gap:12px
}
.label-row label {
  margin:0
}
.dropzone {
  border:1.5px dashed #c4d0e1;
  border-radius:8px;
  background:#fafbfe;
  display:flex;
  align-items:center;
  flex-direction:column;
  padding:25px 20px;
  gap:6px;
  cursor:pointer
}
.dropzone:hover,.dropzone.drag {
  background:#f0f4ff;
  border-color:#6689e7
}
.dropzone strong {
  font-weight:550;
  font-size:14px
}
.upload-icon {
  height:34px;
  width:34px;
  border:1px solid #dbe3f2;
  border-radius:8px;
  display:grid;
  place-items:center;
  color:#5275c9;
  font-size:25px;
  line-height:1;
  margin-bottom:4px
}
.file-list {
  display:grid;
  gap:7px;
  margin-top:12px
}
.file-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) 112px 25px;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1px solid #e5eaf2;
  border-radius:7px
}
.file-info {
  min-width:0
}
.file-name {
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:13px
}
.file-size {
  font-size:11px;
  color:var(--muted)
}
.file-row select {
  font-size:12px;
  padding:6px 8px
}
.remove-file {
  border:0;
  background:none;
  color:#95a1b1;
  font-size:21px;
  line-height:1;
  padding:3px
}
.remove-file:hover {
  color:#a94040
}
.file-row.invalid {
  border-color:#c9675e
}
.attachment-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.attachment {
  position:relative;
  border:1px solid #dbe3ed;
  border-radius:8px;
  background:#fff;
  padding:15px 13px;
  min-width:0;
  cursor:pointer;
  margin:0;
  font-weight:400
}
.attachment:hover {
  border-color:#7c9aea;
  background:#fafbff
}
.attachment-title {
  display:block;
  font-size:13px;
  font-weight:550;
  margin-bottom:4px
}
.attachment .small {
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.attachment input {
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
  width:100%;
  height:100%;
  padding:0
}
.mode-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px
}
.mode-choice {
  display:flex;
  gap:9px;
  border:1px solid #dbe2ec;
  border-radius:8px;
  padding:12px 10px;
  cursor:pointer;
  margin:0;
  font-weight:400;
  align-items:flex-start
}
.mode-choice:has(input:checked) {
  border-color:#6b8ce8;
  background:#f7f9ff
}
.mode-choice input {
  margin-top:5px
}
.mode-choice strong {
  display:block;
  font-size:12px;
  font-weight:550;
  margin-bottom:2px
}
.mode-choice .small {
  font-size:11px
}
.advanced {
  margin:20px 0;
  color:#586b84;
  font-size:13px
}
.advanced summary {
  cursor:pointer;
  user-select:none
}
.advanced-content {
  padding:16px 0 0
}
.advanced-content .check {
  margin-top:14px;
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:400
}
.upload-progress {
  margin:16px 0 12px;
  color:var(--muted);
  font-size:12px
}
.progress-track {
  height:5px;
  background:#e8edf7;
  border-radius:4px;
  overflow:hidden;
  margin-bottom:5px
}
.progress-track div {
  height:100%;
  width:0;
  background:#537be2;
  transition:width .2s
}
.detail-panel {
  min-height:370px;
  position:sticky;
  top:100px
}
.empty-state {
  text-align:center;
  padding:46px 8px 40px
}
.empty-icon {
  font-size:30px;
  color:#b3c0d4;
  margin-bottom:13px
}
.empty-state h3 {
  font-size:14px;
  margin-bottom:8px
}
.empty-state p {
  font-size:13px
}
.detail-title-row {
  display:flex;
  gap:14px;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:24px
}
.detail-title-row h3 {
  word-break:break-word;
  line-height:1.6
}
.status {
  display:inline-block;
  white-space:nowrap;
  font-size:11px;
  font-weight:500;
  border-radius:5px;
  background:#eef1f6;
  color:#687993;
  padding:3px 8px
}
.status.running,.status.queued {
  background:#edf2ff;
  color:#4267c4
}
.status.completed {
  background:#eaf6ef;
  color:#29805e
}
.status.failed {
  background:#fcefed;
  color:#ac534a
}
.status.paused {
  background:#fff6e7;
  color:#a7782f
}
.phase-list {
  list-style:none;
  padding:0;
  margin:0 0 18px;
  display:grid;
  gap:0;
  font-size:12px;
  color:#92a0b3
}
.phase-list li {
  padding:0 0 15px 23px;
  position:relative;
  line-height:20px
}
.phase-list li:before {
  position:absolute;
  content:"";
  left:2px;
  top:6px;
  width:7px;
  height:7px;
  border:1px solid #c8d0dc;
  border-radius:50%;
  background:#fff;
  z-index:1
}
.phase-list li:not(:last-child):after {
  position:absolute;
  content:"";
  left:5px;
  top:14px;
  width:1px;
  bottom:0;
  background:#e1e6ef
}
.phase-list li.current {
  color:#315fda;
  font-weight:600
}
.phase-list li.current:before {
  background:#315fda;
  border-color:#315fda;
  box-shadow:0 0 0 3px #e9efff
}
.phase-list li.done {
  color:#647993
}
.phase-list li.done:before {
  background:#6988bc;
  border-color:#6988bc
}
.detail-message {
  font-size:12px;
  color:#63758c;
  overflow-wrap:anywhere;
  white-space:pre-wrap
}
.detail-message.failure {
  color:#ae5046
}
.detail-metrics {
  font-size:12px;
  color:#63758c;
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px
}
.task-actions {
  display:flex;
  gap:9px;
  margin-top:17px
}
.section-label {
  font-size:13px;
  margin:24px 0 10px
}
.artifact-list {
  display:grid;
  gap:7px
}
.artifact {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid #e4eaf3;
  border-radius:7px;
  padding:10px 12px;
  color:#315580;
  font-size:12px
}
.artifact:hover {
  background:#f6f9ff;
  text-decoration:none;
  border-color:#b9cbee
}
.artifact span:first-child {
  overflow-wrap:anywhere
}
.artifact .size {
  color:#8a99ae;
  white-space:nowrap;
  font-size:11px
}
.artifact.bundle {
  background:#f4f7ff;
  border-color:#c6d5f6;
  color:#315fda;
  font-weight:600
}
.log-details {
  margin-top:22px;
  font-size:12px;
  color:#75849c
}
.log-details summary {
  cursor:pointer
}
.log-details pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  background:#f5f7fa;
  padding:12px;
  border-radius:6px;
  font-family:"SFMono-Regular",Consolas,monospace;
  font-size:11px;
  line-height:1.7;
  max-height:230px;
  overflow:auto;
  margin-bottom:0
}
.history-panel {
  margin-top:24px
}
.history-panel .panel-heading {
  margin-bottom:14px
}
.table-scroll {
  overflow:auto
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:13px
}
th {
  font-weight:500;
  text-align:left;
  color:#8794a7;
  background:#fafbfc;
  padding:11px 12px;
  white-space:nowrap;
  border-bottom:1px solid #e4e9f0
}
td {
  padding:15px 12px;
  border-bottom:1px solid #edf0f5;
  vertical-align:middle
}
tbody tr:last-child td {
  border-bottom:0
}
tbody tr.selected {
  background:#f8faff
}
td .text-button {
  font-size:12px
}
.history-empty {
  font-size:13px;
  padding:20px 0
}
.more-jobs {
  display:block;
  margin:15px auto 0
}
footer {
  padding:26px 2px 0;
  font-size:11px;
  color:#a0acbc
}
.settings-panel {
  max-width:760px
}
.settings-panel>input,.password-field {
  margin-bottom:6px
}
.settings-panel>label {
  margin-top:22px
}
.settings-panel .panel-heading {
  margin-bottom:8px
}
.password-field {
  display:flex;
  align-items:center;
  border:1px solid #d5dde9;
  border-radius:7px
}
.password-field input {
  border:0;
  background:transparent;
  min-width:0
}
.password-field .text-button {
  font-size:12px;
  white-space:nowrap;
  padding-right:13px
}
.password-field:focus-within {
  outline:2px solid #b5c7ff
}
.password-field input:focus {
  outline:0
}
.settings-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px
}
.settings-grid label {
  font-size:12px
}
.settings-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding-top:10px
}
.feedback {
  font-size:13px;
  margin-top:15px
}
.feedback.error {
  color:#ae5046
}
.feedback.success {
  color:#27825b
}
.docs-panel {
  max-width:1040px
}
.docs-panel h2 {
  margin:7px 0 14px
}
.docs-panel h2:not(:first-child) {
  margin-top:30px
}
.docs-panel p {
  color:#64748b;
  font-size:13px;
  margin:12px 0;
  line-height:1.9
}
.docs-panel pre {
  background:#f6f8fc;
  color:#3b526f;
  font-family:"SFMono-Regular",Consolas,monospace;
  font-size:12px;
  line-height:1.85;
  border:1px solid #e6ebf3;
  border-radius:7px;
  padding:16px;
  overflow:auto
}
.docs-panel td:nth-child(2) {
  font-family:Consolas,monospace;
  font-size:12px
}
.link-button {
  display:inline-block;
  font-size:12px;
  white-space:nowrap
}
.link-button:hover {
  text-decoration:none
}
.login-screen {
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:30px;
  background:#f2f5fa
}
.login-card {
  width:420px;
  max-width:100%;
  background:#fff;
  border:1px solid #e1e7f0;
  border-radius:14px;
  box-shadow:0 12px 50px #1e345814;
  padding:38px
}
.login-card .brand-mark {
  margin-bottom:22px;
  width:43px;
  height:43px;
  font-size:23px
}
.login-card h1 {
  font-size:24px
}
.login-card p.muted {
  font-size:13px;
  margin-top:9px;
  margin-bottom:30px
}
.login-card .primary {
  margin-top:20px
}
.toast {
  position:fixed;
  bottom:30px;
  left:50%;
  transform:translateX(-50%);
  background:#243c5b;
  color:#fff;
  border-radius:8px;
  padding:11px 19px;
  box-shadow:0 5px 24px #20365526;
  max-width:calc(100vw - 40px);
  font-size:13px;
  z-index:20
}

@media(min-width:1600px) {
  main {
  padding-top:45px
}

}
@media(max-width:1050px) {
  .workspace-grid {
  grid-template-columns:minmax(0,1fr) 340px;
  gap:18px
}
.panel {
  padding:21px
}
.attachment-grid,.mode-grid {
  grid-template-columns:1fr
}
.site-header {
  gap:26px
}
.site-header nav {
  gap:22px
}
main {
  padding:28px 22px
}
.page-heading h1 {
  font-size:24px
}

}
@media(max-width:760px) {
  .site-header {
  padding:0 18px;
  height:auto;
  min-height:69px;
  flex-wrap:wrap;
  gap:0 18px
}
.brand {
  font-size:15px
}
.brand-mark {
  width:31px;
  height:31px;
  font-size:17px
}
.site-header nav {
  order:3;
  flex-basis:100%;
  height:44px;
  gap:25px
}
.site-header>#logout {
  margin-left:auto
}
.site-header>.brand,.site-header>#logout {
  margin-top:15px;
  margin-bottom:4px
}
.workspace-grid {
  grid-template-columns:1fr
}
.detail-panel {
  position:static;
  min-height:240px
}
.page-heading {
  align-items:flex-start;
  margin-bottom:21px
}
.page-heading p {
  font-size:12px
}
.worker-status {
  font-size:11px;
  margin-top:6px
}
.page-heading h1 {
  font-size:22px
}
main {
  padding:24px 16px
}
.panel {
  padding:21px
}
.mode-grid,.attachment-grid {
  grid-template-columns:1fr 1fr
}
.file-row {
  grid-template-columns:minmax(0,1fr) 100px 22px
}
.settings-grid {
  grid-template-columns:1fr
}
.history-panel {
  padding:20px 12px
}
.history-panel .panel-heading {
  padding:0 8px
}
.docs-panel {
  padding:20px 15px
}
.docs-panel pre {
  font-size:11px
}
.login-card {
  padding:30px
}
.empty-state {
  padding:20px 8px
}

}
@media(max-width:440px) {
  .mode-grid,.attachment-grid {
  grid-template-columns:1fr
}
.worker-status {
  display:none
}
.settings-actions>* {
  flex:1
}
.detail-title-row {
  gap:8px
}
.file-row {
  gap:5px
}
.page-heading .link-button {
  padding:8px;
  font-size:11px
}

}


.model-explanation { max-width: 760px; margin-bottom: 22px; }
.model-explanation p { color: #60748d; margin-top: 12px; font-size: 13px; }
.result-toolbar { display: flex; align-items: center; gap: 18px; padding: 18px 24px; }
.result-toolbar label { margin: 0; white-space: nowrap; }
.result-toolbar select { max-width: 550px; }
.result-tabs { display: flex; gap: 25px; margin: 22px 0; border-bottom: 1px solid var(--line); }
.result-tabs button { border: 0; background: none; padding: 10px 0; color: #66778e; }
.result-tabs button.active { color: var(--blue); border-bottom: 3px solid var(--blue); font-weight: 600; }
.conversation-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 22px; align-items: start; }
.conversation-sidebar { padding: 20px; }
.conversation-sidebar form { display: grid; gap: 10px; }
.conversation-sidebar label { margin: 0; }
.conversation-list { margin-top: 12px; display: grid; gap: 7px; max-height: 680px; overflow: auto; }
.conversation-entry { text-align: left; width: 100%; background: #fff; padding: 13px 12px; border: 1px solid var(--line); border-radius: 8px; color: #283f5e; overflow-wrap: anywhere; }
.conversation-entry strong { display: block; font-size: 13px; }
.conversation-entry.active { border-color: #7c9aea; background: #f1f5ff; }
.conversation-entry small { display: block; color: var(--muted); margin-top: 5px; }
.message-panel h2 { overflow-wrap: anywhere; }
.message-filter { display: grid; grid-template-columns: minmax(120px,1fr) 145px 145px auto; gap: 8px; margin: 22px 0 14px; }
.message-filter input { min-width: 0; padding: 8px; font-size: 12px; }
.participant-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.person-details { border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; font-size: 12px; background: #fafbfd; }
.person-details summary { cursor: pointer; color: #3e5e87; }
.person-fields { display: grid; grid-template-columns: minmax(90px,140px) minmax(120px,1fr); gap: 7px 12px; margin: 12px 0 0; font-size: 12px; max-width: 650px; }
.person-fields dt { color: var(--muted); }
.person-fields dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-list { display: grid; gap: 16px; margin-top: 18px; }
.message-card { border: 1px solid #e1e8f2; background: #fafcfe; border-radius: 9px; padding: 16px; }
.message-card.staff { background: #f2f6ff; border-color: #dbe5fa; }
.message-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #425e80; font-size: 12px; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 10px; font-size: 14px; line-height: 1.9; }
.message-source { margin-top: 12px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.pager { display: flex; justify-content: center; gap: 12px; align-items: center; margin-top: 22px; font-size: 12px; color: var(--muted); }
.pager button:disabled { opacity: .4; cursor: default; }
.inline-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.inline-filter input[type=search] { width: auto; min-width: 200px; flex: 1; }
.inline-filter select { width: auto; max-width: 300px; }
.inline-filter .check { display: flex; align-items: center; gap: 7px; font-size: 13px; margin: 0; font-weight: 400; }
.experience-list { display: grid; gap: 18px; margin-top: 18px; }
.experience-card h2 { margin: 8px 0 15px; }
.experience-card .experience-body { white-space: pre-wrap; line-height: 2; }
.api-example { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 15px 18px; }
.api-example summary { cursor: pointer; font-weight: 550; color: #344d70; overflow-wrap: anywhere; }
.api-example h3 { margin-top: 18px; font-size: 13px; }
.api-method { color: var(--blue); font-family: monospace; margin-right: 12px; }
@media (max-width: 1100px) {
  .conversation-layout { grid-template-columns: 260px minmax(0,1fr); }
  .message-filter { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .result-toolbar { display: grid; gap: 10px; }
  .conversation-layout { grid-template-columns: 1fr; }
  .conversation-list { max-height: 270px; }
  .result-tabs { gap: 18px; font-size: 12px; }
  .inline-filter { align-items: stretch; }
  .inline-filter select { max-width: 100%; }
  .person-fields { grid-template-columns: 110px minmax(0,1fr); }
  .api-example { padding: 12px; }
}

#reload-results { flex-shrink: 0; white-space: nowrap; }

.collector-attachment-progress { margin: 18px 0; padding: 14px; border: 1px solid var(--border, #dce3e7); border-radius: 10px; }
.collector-attachment-progress h3 { margin: 0 0 10px; font-size: 14px; }
.collector-attachment-progress progress { width: 100%; height: 10px; accent-color: #17876b; }
