/* Livebrain workspace: quiet surfaces, strong hierarchy, restrained motion. */
:root {
  --blue: #243c32;
  --line: #e8ebe8;
  --muted: #88908a;
  --accent: #c3ed9c;
  color: #222b25;
  background: #f6f7f5;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}
body { background: #f6f7f5; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
button:active { transform: translateY(1px); }
button:disabled { transform: none; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -1px; color: #202922; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
h3 { color: #334339; }
input, select { border-color: #e1e6e1; background: #fff; border-radius: 9px; color: #304137; padding: 12px 14px; }
input:focus, select:focus { border-color: #9db48f; outline: 3px solid #c3ed9c35; }
input::placeholder { color: #a2aaa4; }
input[type=checkbox], input[type=radio] { accent-color: #486b3d; }
label { color: #455349; font-weight: 500; font-size: 13px; }
.primary { background: #243c32; border-radius: 9px; border-color: #243c32; box-shadow: none; }
.primary:hover { background: #355445; border-color: #355445; }
.secondary { border-radius: 9px; border-color: #dfe5df; color: #48594c; }
.secondary:hover { background: #f4f7f1; border-color: #bfd0b9; }
.text-button { color: #6e7b72; }
.text-button:hover { color: #293e2c; }
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: 226px;
  height: 100dvh;
  min-height: 540px;
  padding: 35px 20px 20px;
  border: 0;
  background: #202c26;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 48px;
  z-index: 10;
}
.brand { color: #fff; padding: 0 8px; gap: 12px; font-size: 23px; letter-spacing: -.7px; font-weight: 600; }
.brand:hover { color: #fff; }
.brand small { display: block; font-size: 10px; font-weight: 400; color: #8eab97; letter-spacing: 1px; margin-top: 2px; }
.brand-mark { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: #c3ed9c; color: #263d2e; font-size: 26px; font-weight: 650; font-family: Inter,sans-serif; box-shadow: inset 0 0 0 1px #ffffff30; }
.site-header nav { display: flex; flex-direction: column; flex: 1; align-self: auto; gap: 8px; }
.nav-item { text-align: left; color: #95a59a; font-size: 13px; padding: 14px 17px; border-radius: 10px; display: flex; align-items: center; gap: 13px; min-height: 47px; }
.nav-item::before { display: inline-grid; place-items: center; font-size: 18px; width: 19px; color: #91a798; }
.nav-item[data-view=tasks]::before { content: '↥'; }
.nav-item[data-view=results]::before { content: '▤'; }
.nav-item[data-view=experience-runs]::before { content: '≡'; }
.nav-item[data-view=settings]::before { content: '⚙'; }
.nav-item[data-view=docs]::before { content: '⌘'; }
.nav-item:hover { color: #e4eee5; background: #ffffff08; }
.nav-item.active { color: #e7f2e3; background: #ffffff0d; font-weight: 550; }
.nav-item.active::before { color: #c3ed9c; }
.nav-item.active::after { display: none; }
.small-dot { margin-left: auto; background: #dca85a; width: 5px; height: 5px; }
.small-dot.ready { background: #c3ed9c; }
.sidebar-footer { padding: 10px 7px 0; border-top: 1px solid #ffffff10; }
.database-label { color: #81998a; font-size: 10px; letter-spacing: .3px; padding: 17px 0; display: flex; gap: 8px; align-items: center; }
.database-label>span { width: 5px; height: 5px; border-radius: 50%; background: #b5d5a0; }
.sidebar-footer #logout { padding: 10px 0 0; color: #91a397; width: 100%; display: flex; justify-content: space-between; font-size: 12px; }
.sidebar-footer #logout:hover { color: #fff; }
main { width: auto; max-width: 1540px; margin: 0 0 0 226px; padding: 44px 42px 24px; }
.page-heading { margin-bottom: 32px; align-items: center; }
.page-heading p { font-size: 12px; margin-top: 10px; color: #8b968e; }
.worker-status { font-size: 11px; border: 1px solid #e4e9e2; padding: 7px 12px; border-radius: 20px; background: #fff; color: #7b897f; }
.worker-status.ready:before { background: #89b66c; box-shadow: 0 0 0 3px #88b56b12; animation: breathe 3s ease-in-out infinite; }
.panel { border: 1px solid #e8ece6; border-radius: 15px; box-shadow: 0 3px 12px #263b2703; padding: 26px; }
.panel-heading { margin-bottom: 25px; }
.workspace-grid { grid-template-columns: minmax(0,1.4fr) minmax(340px,1fr); gap: 25px; }
.field-block { margin-bottom: 26px; }
.dropzone { background: #fbfcfa; border: 1px dashed #cdd8c7; border-radius: 13px; padding: 26px 18px; min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.dropzone strong { color: #56684e; font-size: 13px; font-weight: 500; }
.dropzone .small { font-size: 11px; color: #a0aca2; }
.dropzone:hover, .dropzone.dragging { background: #f2f8ec; border-color: #91b177; transform: translateY(-1px); }
.upload-icon { height: 37px; width: 37px; border: 1px solid #e3eadd; border-radius: 10px; background: #fff; color: #81946d; font-size: 24px; margin-bottom: 7px; }
.attachment { border-color: #e5eae2; border-radius: 10px; padding: 16px 13px; }
.attachment:hover { background: #fbfdf9; border-color: #b5cda6; }
.attachment-title { color: #596b5b; font-size: 12px; font-weight: 500; }
.mode-choice { border-radius: 10px; border-color: #e6ebe4; padding: 14px 12px; }
.mode-choice:has(input:checked) { background: #f6faf1; border-color: #a8c393; }
.mode-choice strong { color: #4c6149; font-weight: 500; }
.mode-choice .small { font-size: 10px; }
.field-help { color: #97a197; font-size: 11px; line-height: 1.8; }
.advanced { color: #8b968b; margin: 23px 0; font-size: 12px; }
.detail-panel { position: sticky; top: 28px; min-height: 390px; }
.empty-state { padding: 57px 5px; }
.empty-icon { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 20px; border: 1px solid #edf0e9; background: #fafbf8; color: #adbda2; border-radius: 16px; font-size: 25px; }
.empty-state h3 { color: #7b8c7c; font-size: 13px; font-weight: 500; }
.empty-state p { color: #a7afa6; font-size: 11px; }
.status { font-size: 10px; border-radius: 6px; padding: 4px 9px; }
.status.completed { color: #66884b; background: #f0f7e9; }
.status.running, .status.queued { color: #5c7b59; background: #f0f5ec; }
.phase-list li.current { color: #507541; }
.phase-list li.current:before { background: #7b9e60; border-color: #7b9e60; box-shadow: 0 0 0 3px #f0f6eb; }
.phase-list li.done { color: #8e9c8a; }
.phase-list li.done:before { background: #b3c7a4; border-color: #b3c7a4; }
.experience-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.experience-review-details { margin: 10px 0; color: #50614d; font-size: 13px; }
.experience-review-details summary { cursor: pointer; font-weight: 600; }
.history-panel .panel-heading .task-actions { margin-top: 0; }
.detail-message { color: #7f8e7e; font-size: 11px; }
.detail-metrics { color: #8b9786; font-size: 11px; }
.artifact { border-radius: 9px; color: #697c63; border-color: #ebeee7; padding: 10px 12px; font-size: 11px; }
.artifact:hover { background: #f7faf3; border-color: #c6d8b7; }
.artifact.bundle { background: #f6faef; color: #5d794b; border-color: #e0ebd3; font-weight: 500; }
.artifact .size { color: #a4aea0; font-size: 10px; }
.history-panel { margin-top: 26px; }
th { background: #fafbf8; color: #9aa595; font-size: 11px; font-weight: 400; border-color: #edf0e9; padding: 12px; }
td { color: #697b66; border-color: #edf0e9; font-size: 12px; padding: 16px 12px; }
tbody tr.selected { background: #fcfdf9; }
footer { display: flex; justify-content: space-between; gap: 7px; color: #abb3a6; font-size: 10px; padding-top: 28px; }
footer span:last-child { margin-left: auto; }
.settings-panel, .model-explanation { max-width: 820px; }
.model-explanation h2 { color: #5b6f54; }
.model-explanation p { color: #92a08b; font-size: 12px; }
.password-field { border-color: #e1e6e1; border-radius: 9px; }
.result-toolbar { padding: 18px 24px; gap: 16px; }
.result-toolbar select { border: 0; background: #f7f9f4; }
.result-tabs { gap: 28px; margin: 23px 0; }
.result-tabs button { color: #97a38e; font-size: 12px; padding-bottom: 13px; }
.result-tabs button.active { color: #537342; border-color: #91b86a; font-weight: 500; }
.conversation-layout { grid-template-columns: 285px minmax(0,1fr); gap: 23px; }
.conversation-sidebar { padding: 20px; }
.conversation-entry { border-radius: 10px; border-color: #edf0e9; color: #667f5c; padding: 14px 12px; }
.conversation-entry:hover { background: #fbfdf8; }
.conversation-entry.active { background: #f6faef; border-color: #c8dcb3; }
.conversation-entry strong { font-size: 12px; font-weight: 500; }
.conversation-entry small { color: #9ca991; font-size: 10px; }
.message-panel h2 { font-size: 17px; color: #536f47; }
.person-details { border-color: #eaf0e4; background: #fafcf7; padding: 7px 10px; }
.person-details summary { color: #819273; font-size: 11px; }
.person-fields dt { color: #9aa990; }
.person-fields dd { color: #6e865f; }
.message-card { border: 1px solid #edf0e9; background: #fff; border-radius: 12px; padding: 18px; }
.message-card.staff { border-color: #e5eedc; background: #f8fbf3; }
.message-meta { color: #7f936f; font-size: 11px; }
.message-meta strong { font-weight: 500; }
.message-body { color: #4b6340; font-size: 13px; line-height: 1.95; }
.message-source { color: #b1bbaa; font-size: 10px; }
.inline-filter input[type=search] { min-width: 180px; }
.experience-card { border-left: 3px solid #b8d59c; }
.experience-card h2 { color: #527243; font-size: 19px; line-height: 1.7; }
.experience-card .experience-body { color: #718767; font-size: 13px; }
.experience-card .experience-source { margin-top: 18px; color: #96a58c; font-size: 12px; overflow-wrap: anywhere; }
.api-example { border-color: #e6ecdf; border-radius: 11px; padding: 16px 18px; }
.api-example summary { color: #718b61; font-size: 12px; }
.api-method { color: #8ca973; font-size: 11px; }
.docs-panel pre { background: #f8faf5; border-color: #eaf0e3; color: #769066; border-radius: 10px; }
.docs-panel p { color: #95a58a; font-size: 12px; }
.toast { background: #31492d; border-radius: 10px; }
.login-screen { background: #f4f6f0; position: relative; }
.login-card { border-color: #e7eddf; border-radius: 23px; box-shadow: 0 24px 90px #273f1e08; padding: 46px 40px; width: 450px; }
.login-card .brand-mark { width: 48px; height: 48px; font-size: 32px; margin-bottom: 27px; }
.login-card h1 { font-size: 26px; }
.login-card p.muted { color: #9ba992; font-size: 12px; }
.view { animation: reveal .25s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 50% { opacity: .5; } }
@media (min-width: 1800px) { main { margin-left: 226px; padding: 50px 60px; } }
@media (max-width: 1250px) {
  .site-header { width: 192px; padding: 30px 14px 20px; }
  .brand { font-size: 21px; }
  main { margin-left: 192px; padding: 32px 26px 20px; }
  .workspace-grid { grid-template-columns: minmax(0,1.25fr) minmax(300px,1fr); gap: 18px; }
  .panel { padding: 22px; }
  .mode-grid, .attachment-grid { grid-template-columns: 1fr; }
  .message-filter { grid-template-columns: 1fr 1fr; }
  .conversation-layout { grid-template-columns: 250px minmax(0,1fr); }
}
@media (max-width: 960px) {
  .site-header { position: static; width: 100%; height: auto; min-height: 0; padding: 16px 23px 0; flex-direction: row; flex-wrap: wrap; gap: 14px; align-items: center; }
  .brand { font-size: 21px; padding: 0; margin: 0 !important; }
  .brand small { display: none; }
  .brand-mark { width: 33px; height: 33px; font-size: 23px; }
  .site-header nav { order: 3; flex-basis: 100%; flex-direction: row; gap: 14px; overflow: auto; height: auto; align-self: auto; }
  .nav-item { flex: 0 0 auto; padding: 12px 6px 14px; gap: 7px; font-size: 12px; border-radius: 0; min-height: 0; }
  .nav-item::before { font-size: 16px; }
  .nav-item.active { background: transparent; border-bottom: 2px solid #c3ed9c; }
  .sidebar-footer { margin-left: auto; border: 0; padding: 0; }
  .database-label { display: none; }
  .sidebar-footer #logout { padding: 0; font-size: 11px; gap: 14px; }
  main { margin: 0; padding: 29px 22px 20px; width: 100%; }
  h1 { font-size: 27px; }
  .detail-panel { top: 20px; }
}
@media (max-width: 760px) {
  .workspace-grid, .conversation-layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .mode-grid, .attachment-grid { grid-template-columns: 1fr 1fr; }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 11px; }
  .worker-status { font-size: 10px; padding: 5px 8px; }
  main { padding: 26px 16px 20px; }
  .panel { padding: 22px; border-radius: 13px; }
  .result-toolbar { gap: 10px; }
  .inline-filter select { max-width: 100%; }
  .api-example { padding: 12px; }
}
@media (max-width: 440px) {
  .site-header { padding: 15px 17px 0; }
  .site-header nav { gap: 10px; }
  .nav-item { font-size: 11px; gap: 5px; }
  .nav-item::before { font-size: 14px; width: 14px; }
  .mode-grid, .attachment-grid { grid-template-columns: 1fr; }
  .worker-status { display: none; }
  .login-card { padding: 35px 28px; border-radius: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

h1, h2 { color: #25372b; }
.message-body { color: #344d2e; font-size: 14px; }
.message-meta { color: #647d56; font-size: 12px; }
.conversation-entry strong { color: #4d673e; font-size: 13px; }
.docs-panel p, .model-explanation p { color: #6f8066; }
.experience-card .experience-body { color: #4d6544; font-size: 14px; }

.model-config-button { display:flex; align-items:center; gap:12px; width:100%; padding:14px 0; border:0; background:none; color:#c9d9ce; text-align:left; font-size:12px; }
.model-config-button:hover { color:#c3ed9c; }
#api-dialog { width:min(760px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:30px; border:1px solid #e1e8dd; border-radius:20px; color:#304137; background:#fff; box-shadow:0 28px 110px #10201940; overflow:auto; }
#api-dialog::backdrop { background:#17261c80; backdrop-filter:blur(5px); }
#api-dialog[open] { animation:reveal .18s ease-out; }
.modal-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding-bottom:20px; }
.modal-heading h2 { font-size:21px; }
.modal-heading p { margin-top:9px; font-size:12px; }
#close-api-settings { font-size:25px; line-height:1; }
#api-dialog .settings-panel { padding:0; border:0; box-shadow:none; }
.key-list { display:grid; gap:8px; }
.key-row { display:flex; align-items:center; gap:12px; padding:10px 12px; background:#f7faf3; border:1px solid #e5eddc; border-radius:8px; }
.key-row code { font-family:monospace; font-size:13px; overflow-wrap:anywhere; }
.key-row button { margin-left:auto; }
#view-results>.page-heading { margin-bottom:12px; }
.result-navigation { display:flex; align-items:center; gap:16px; border-bottom:1px solid var(--line); margin-bottom:clamp(6px,.8dvh,12px); }
.result-navigation>.result-tabs { flex:1; min-width:0; margin:0; border:0; }
.task-filter { position:relative; flex:0 0 auto; margin:0; padding:0; z-index:4; }
.task-filter>summary { display:grid; place-items:center; width:32px; height:32px; padding:0; border-radius:6px; cursor:pointer; list-style:none; }
.task-filter>summary::-webkit-details-marker { display:none; }
.task-filter>summary::after { content:''; width:7px; height:7px; border:solid #6a7e60; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
.task-filter>summary:hover,.task-filter[open]>summary { background:#edf3e8; }
.task-filter[open]>summary::after { transform:rotate(225deg); }
.task-filter .result-toolbar { position:absolute; right:0; top:calc(100% + 8px); display:grid; gap:10px; width:min(420px,calc(100vw - 32px)); padding:18px; background:#fff; border:1px solid #e1e7db; border-radius:12px; box-shadow:0 12px 34px #283d2220; }
.task-filter .result-toolbar select { max-width:100%; }
.task-filter #result-task-state { font-size:11px; }
@media(max-width:960px) {
  .sidebar-footer { display:flex; align-items:center; gap:15px; }
  .model-config-button { padding:0; white-space:nowrap; font-size:11px; }
  #api-dialog { padding:23px; }
}
@media(prefers-reduced-motion:reduce) { #api-dialog[open] { animation:none; } }

.result-source { margin-left:auto; display:flex; align-items:center; gap:12px; }
.result-source label { white-space:nowrap; margin:0; font-size:12px; }
.result-source select { min-width:130px; }
.collector-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-bottom:26px; }
.collector-card { display:flex; align-items:center; gap:16px; padding:24px; border:1px solid #e0e7dc; border-radius:14px; background:#fff; text-align:left; color:#52654c; }
.collector-card.active { border-color:#789c66; background:#f4f9ee; box-shadow:0 0 0 1px #789c6620; }
.collector-symbol { display:grid; place-items:center; width:45px; height:45px; border-radius:12px; background:#e7f2df; color:#4e773d; font-size:22px; font-weight:600; flex-shrink:0; }
.feishu-symbol { background:#e8eef7; color:#56769c; }
.collector-card-title { display:grid; gap:3px; }
.collector-card-title strong { font-size:16px; font-weight:600; }
.collector-card-title small { color:#8c9a86; font-size:11px; }
.collector-card-state { margin-left:auto; color:#7d9070; font-size:11px; text-align:right; }
.collector-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr); gap:26px; align-items:start; }
.collector-form { max-width:none; }
.collector-form fieldset { border:0; margin:0; padding:0; min-width:0; }
.collector-form .panel-heading { align-items:center; flex-wrap:wrap; gap:12px; }
.collector-form .collector-enable { margin:0; font-size:11px; color:#718368; }
.collector-form input:not([type=checkbox]), .collector-form select, .collector-form textarea { margin-bottom:18px; }
.collector-form textarea { width:100%; resize:vertical; min-height:90px; padding:13px; font:12px/1.7 'IBM Plex Mono',monospace; color:#304137; border:1px solid #e1e6e1; border-radius:9px; background:#fff; }
.collector-form textarea:focus { border-color:#9db48f; outline:3px solid #c3ed9c35; }
.collector-form input[readonly] { color:#84917c; background:#f6f8f3; }
.collector-form input[type=file] { padding:8px; font-size:11px; min-height:46px; }
.collector-form .secret-clear { margin:-10px 0 22px; font-size:10px; color:#87957e; }
.collector-form .field-help { margin-top:-9px; margin-bottom:18px; }
.collector-form .field-help+.secret-clear { margin-top:0; }
.collector-two-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.collector-oss { border-top:1px solid #e7ecdf; padding-top:20px; margin-top:24px; }
.collector-oss>summary { cursor:pointer; color:#5c7350; font-size:13px; }
.collector-oss>summary span { float:right; color:#8a9c7d; font-size:11px; }
.collector-oss .advanced-content { padding-top:22px; }
.collector-form .settings-actions { margin-top:20px; }
.collector-progress-column { display:grid; gap:22px; min-width:0; }
.collector-progress .panel-heading { margin-bottom:20px; }
.collector-phase { font-size:13px; color:#667d59; min-height:22px; }
.collector-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:25px 0; padding:18px 0; border-top:1px solid #edf0e8; border-bottom:1px solid #edf0e8; }
.collector-metrics>div { display:grid; gap:5px; }
.collector-metrics strong { font-size:26px; font-weight:600; color:#3b5832; letter-spacing:-1px; }
.collector-metrics span { color:#8b9a80; font-size:11px; }
.collector-detail-list { display:grid; grid-template-columns:auto minmax(0,1fr); gap:13px 12px; margin:0; font-size:11px; }
.collector-detail-list dt { color:#95a18c; }
.collector-detail-list dd { text-align:right; margin:0; color:#59724c; overflow-wrap:anywhere; }
.collector-file-progress { margin-top:23px; padding-top:19px; border-top:1px solid #edf0e8; }
.collector-file-progress>p:first-child { font-size:11px; overflow-wrap:anywhere; }
.collector-file-progress progress { width:100%; height:8px; accent-color:#7f9f69; margin:12px 0 7px; }
.collector-progress .error-text { font-size:11px; line-height:1.8; }
.collector-recent .panel-heading { margin-bottom:7px; }
.collector-recent-message { padding:16px 0; border-bottom:1px solid #edf0e8; overflow-wrap:anywhere; }
.collector-recent-message:last-child { border-bottom:0; padding-bottom:0; }
.collector-message-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; color:#738b65; font-size:10px; }
.collector-message-meta strong { font-weight:500; }
.collector-message-meta time { color:#9ca88f; }
.collector-message-body { font-size:12px; color:#4d6544; line-height:1.8; white-space:pre-wrap; max-height:100px; overflow:auto; margin:8px 0; }
.collector-recent-message>small { font-size:9px; }
@media(max-width:1150px) {
  .collector-layout { grid-template-columns:minmax(0,1.2fr) minmax(285px,1fr); gap:18px; }
  .collector-card { padding:19px; gap:12px; }
  .collector-card-state { max-width:95px; }
}
@media(max-width:760px) {
  .collector-layout { grid-template-columns:1fr; }
  .collector-cards { gap:12px; }
  .collector-card { padding:16px 12px; gap:10px; flex-wrap:wrap; }
  .collector-symbol { width:34px; height:34px; font-size:17px; border-radius:9px; }
  .collector-card-title strong { font-size:14px; }
  .collector-card-state { flex-basis:100%; max-width:none; text-align:left; padding-left:44px; }
  .result-source { margin-left:0; }
  .result-source label { display:none; }
  .result-source select { min-width:100px; }
}
@media(max-width:440px) { .collector-two-fields { grid-template-columns:1fr; gap:0; } }
.collector-pending-help { margin:-9px 0 20px; }

.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.collector-time-range { background:#f5f8f1; border:1px solid #e8eddf; border-radius:10px; padding:15px 17px; margin:18px 0 0; }
.collector-time-range>span { display:block; color:#839276; font-size:11px; margin-bottom:8px; }
.collector-time-range>p { color:#86957b; font-size:12px; }
#collector-range-values { display:grid; gap:4px; }
#collector-range-values time { color:#426036; font-size:13px; font-variant-numeric:tabular-nums; }
#collector-range-values>span { font-size:10px; color:#a0ad96; }
#collector-status.running::before,.collector-card-state.is-collecting::before { content:''; display:inline-block; height:5px; width:5px; margin-right:6px; vertical-align:middle; background:#7caa54; border-radius:50%; animation:breathe 1.6s ease-in-out infinite; }
.metric-updated { animation:metric-update .45s ease-out; }
@keyframes metric-update { from { color:#74aa49; transform:translateY(-2px); } to { color:#3b5832; transform:translateY(0); } }
button.collector-recent-message { display:block; width:100%; background:none; border:0; border-bottom:1px solid #edf0e8; text-align:left; border-radius:0; }
button.collector-recent-message:hover { background:#f6f9f1; }

.chat-workspace.conversation-layout {
  display:grid;
  grid-template-columns:292px minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);
  align-items:stretch;
  gap:0;
  height:max(280px,calc(100dvh - var(--chat-top,340px) - clamp(48px,6.5dvh,80px)));
  border:1px solid #dce0db;
  border-radius:13px;
  overflow:hidden;
  background:#f3f3f3;
  box-shadow:0 6px 30px #1e2d2105;
}
.chat-workspace .chat-sidebar { background:#e9eae8; border-right:1px solid #d9dcd6; padding:0; display:flex; flex-direction:column; overflow:hidden; min-height:0; }
.chat-sidebar-heading { display:flex; align-items:center; gap:9px; padding:20px 14px 15px; }
.chat-sidebar-heading h2 { font-size:16px; color:#303a30; }
.chat-sidebar-heading>span { font-size:10px; margin-left:auto; white-space:nowrap; }
.conversation-kind-toggles { display:flex; gap:4px; }
.conversation-kind-toggles button { padding:5px 7px; border:0; border-radius:5px; background:transparent; color:#667061; font-size:11px; white-space:nowrap; }
.conversation-kind-toggles button[aria-pressed="true"] { background:#ccdbbd; color:#355b29; }
.conversation-kind-toggles button:focus-visible { outline:2px solid #5a803f; outline-offset:2px; }
.chat-conversation-filter { display:flex; gap:7px; padding:0 14px 14px; }
.chat-conversation-filter>input { min-width:0; flex:1; }
.chat-conversation-filter>input { border:0; background:#dedfdd; border-radius:7px; padding:9px 12px; font-size:12px; }
.chat-sidebar .conversation-list { margin:0; display:block; flex:1; min-height:0; max-height:none; overflow:auto; overflow-anchor:none; }
.chat-sidebar .chat-conversation { display:flex; gap:12px; align-items:center; width:100%; min-height:82px; padding:15px 17px; border:0; border-radius:0; background:none; text-align:left; color:#292f28; }
.chat-sidebar .chat-conversation:hover { background:#dedfdd; }
.chat-sidebar .chat-conversation.active { background:#d5d9d1; border:0; }
.chat-avatar { width:39px; height:39px; border-radius:5px; background:#bfd4c4; color:#42604a; display:inline-grid; place-items:center; flex:0 0 auto; position:relative; overflow:hidden; font-size:18px; font-weight:500; }
.chat-avatar.group-avatar { background:#c8d2bf; color:#587248; }
.chat-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.chat-conversation-content { display:grid; gap:7px; min-width:0; flex:1; }
.chat-conversation-title,.chat-conversation-preview { display:flex; justify-content:space-between; align-items:center; gap:8px; min-width:0; }
.chat-conversation-title strong { font-size:13px; font-weight:500; color:#30392d; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.single-conversation .chat-conversation-title strong { white-space:normal; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.chat-conversation-title time { flex-shrink:0; color:#93998d; font-size:9px; }
.chat-conversation-preview small { color:#838b7e; font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-message-count { color:#90998a; font-size:9px; flex-shrink:0; }
.chat-list-pager { padding:10px 12px; margin:0; border-top:1px solid #dce0d7; font-size:10px; gap:4px; }
.chat-list-pager button { padding:4px; font-size:11px; }
.pager { flex-wrap:wrap; }
.pager .page-jump { display:flex; flex-direction:row; align-items:center; justify-content:center; gap:6px; margin:0; }
.page-jump label { margin:0; font-size:inherit; font-weight:400; }
.page-jump input { width:58px; min-width:0; padding:4px 5px; border-radius:5px; font:inherit; text-align:center; }
.page-jump button { padding:4px 6px; font:inherit; }
.chat-list-pager .page-jump { flex-basis:100%; }
.chat-thread.message-panel { display:flex; flex-direction:column; padding:0; min-width:0; min-height:0; background:#f3f3f3; overflow:hidden; }
.chat-thread-header { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:18px 24px; background:#f5f5f4; border-bottom:1px solid #e2e4df; min-height:78px; }
.chat-thread-heading { min-width:0; flex:1; }
.chat-thread-actions { display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.chat-calendar-toggle { display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:6px; background:none; color:#6d825e; }
.chat-calendar-toggle:hover { background:#e8eee2; }
.chat-calendar-icon { position:relative; display:block; width:17px; height:16px; border:1.5px solid currentColor; border-radius:3px; }
.chat-calendar-icon::before { content:''; position:absolute; left:-1px; right:-1px; top:3px; border-top:1.5px solid currentColor; }
.chat-calendar-icon::after { content:''; position:absolute; left:3px; top:7px; width:2px; height:2px; background:currentColor; box-shadow:5px 0 currentColor,0 4px currentColor,5px 4px currentColor; }
.chat-thread-header #conversation-title { color:#2e362b; font-size:17px; font-weight:500; white-space:normal; overflow-wrap:anywhere; }
.chat-thread-header #message-total { color:#9a9f93; font-size:10px; margin-top:4px; }
.chat-members { position:relative; flex-shrink:0; font-size:11px; color:#86927c; }
.chat-members>summary { cursor:pointer; white-space:nowrap; }
.chat-member-list { position:absolute; right:0; top:28px; width:280px; max-height:300px; overflow:auto; background:#fff; border:1px solid #dce3d6; box-shadow:0 12px 34px #283d2220; border-radius:9px; padding:14px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px 9px; z-index:3; }
.chat-member { display:grid; justify-items:center; gap:6px; overflow:hidden; }
.chat-member>span:last-child { font-size:10px; color:#728267; max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.chat-search-panel { border-bottom:1px solid #e3e5df; background:#f5f5f4; }
.chat-search-panel>summary { padding:9px 24px; color:#929c88; font-size:10px; cursor:pointer; }
.chat-search-panel .message-filter { margin:0; padding:0 17px 13px; display:grid; grid-template-columns:minmax(100px,1.3fr) minmax(100px,1fr) minmax(100px,1fr) auto; gap:8px; }
.chat-search-panel input { font-size:11px; padding:8px 9px; min-width:0; }
.chat-search-panel button { font-size:11px; padding:7px 11px; }
.chat-messages.message-list { flex:1; min-height:0; overflow:auto; padding:20px 25px 24px; margin:0; display:block; scroll-behavior:auto; overscroll-behavior:contain; }
.chat-empty { display:grid; place-items:center; text-align:center; min-height:120px; color:#a0a79a; font-size:12px; padding:24px; }
.chat-time { text-align:center; color:#a5a99f; font-size:10px; margin:10px 0 22px; font-variant-numeric:tabular-nums; }
.chat-message { display:flex; align-items:flex-start; gap:12px; margin:0 0 18px; }
.chat-message.outgoing { flex-direction:row-reverse; }
.chat-message-content { max-width:min(78%,610px); min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:5px; }
.chat-message.outgoing .chat-message-content { align-items:flex-end; }
.chat-sender { color:#979e8e; font-size:10px; padding:0 2px; }
.chat-bubble { background:#fff; border:1px solid #e5e7e1; border-radius:5px; padding:10px 13px; position:relative; min-height:38px; max-width:100%; color:#2c3228; }
.chat-bubble::before { content:''; position:absolute; top:13px; left:-5px; width:8px; height:8px; background:inherit; border-left:1px solid #e5e7e1; border-bottom:1px solid #e5e7e1; transform:rotate(45deg); }
.chat-message.outgoing .chat-bubble { background:#b4e68b; border-color:#a9d985; }
.chat-message.outgoing .chat-bubble::before { left:auto; right:-5px; border:0; border-top:1px solid #a9d985; border-right:1px solid #a9d985; }
.chat-message-text { margin:0; font-size:14px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-structured-content,.chat-mixed-content,.chat-content-assets { display:grid; gap:10px; max-width:100%; }
.chat-forward-card { display:block; width:280px; max-width:100%; padding:0; border:0; border-radius:0; background:none; text-align:left; color:inherit; }
.chat-forward-card>strong { display:block; margin-bottom:8px; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.chat-forward-lines p { margin:3px 0; font-size:12px; color:#8b9287; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-forward-card>small,.chat-content-card>small { display:block; margin-top:10px; padding-top:7px; border-top:1px solid #e4e7df; color:#8b9384; font-size:11px; }
.chat-content-card { display:block; width:280px; max-width:100%; color:inherit; text-decoration:none; }
.chat-content-card:hover { text-decoration:none; }
.chat-card-body { display:flex; align-items:flex-start; gap:11px; }
.chat-card-symbol { display:grid; place-items:center; width:34px; height:38px; flex-shrink:0; border-radius:4px; background:#edf2e8; color:#6b825d; font-size:22px; }
.chat-card-copy { min-width:0; flex:1; }
.chat-card-copy>strong { display:block; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.chat-card-copy>p { font-size:12px; color:#858c7d; white-space:pre-wrap; overflow-wrap:anywhere; margin:5px 0 0; }
.chat-card-body>img { width:56px; height:56px; object-fit:cover; border-radius:4px; }
.chat-card-fields { display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 9px; font-size:11px; margin:8px 0 0; }
.chat-card-fields dt { color:#889080; }
.chat-card-fields dd { margin:0; overflow-wrap:anywhere; }
.chat-call-card { display:grid; gap:10px; min-width:170px; max-width:100%; }
.chat-call-heading { display:flex; align-items:center; gap:14px; }
.chat-call-symbol { font-size:27px; color:#536a45; }
.chat-call-heading strong { font-size:14px; font-weight:500; }
.chat-call-heading p { margin:4px 0 0; font-size:12px; color:#808d74; }
.chat-content-redpacket,.chat-content-external_redpacket { padding:10px; border-radius:6px; background:#ec9d51; color:#fff; }
.chat-content-redpacket>small,.chat-content-external_redpacket>small { color:#fff2e3; border-color:#ffffff33; }
.chat-content-redpacket .chat-card-symbol,.chat-content-external_redpacket .chat-card-symbol { background:#fff1; }
.chat-system-message { display:flex; flex-direction:column; align-items:center; gap:4px; color:#939c89; font-size:12px; margin:12px 0 20px; text-align:center; }
.chat-system-message>p { margin:0; }
#chat-record-dialog { width:min(660px,calc(100vw - 28px)); max-height:calc(100dvh - 36px); padding:0; border:1px solid #dde3d7; border-radius:12px; background:#f3f4f1; color:#30392c; }
#chat-record-dialog::backdrop { background:#17201580; }
.chat-record-heading { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 20px; background:#f7f8f4; border-bottom:1px solid #dde2d6; }
.chat-record-heading h2 { margin:0; font-size:16px; font-weight:500; overflow-wrap:anywhere; flex:1; }
#chat-record-messages { padding:18px 22px 24px; }
.chat-forward-item { padding:13px 0; border-bottom:1px solid #e1e5da; overflow-wrap:anywhere; }
.chat-forward-item:last-child { border-bottom:0; }
.chat-forward-meta { margin:0 0 8px; color:#909b86; font-size:11px; }
.chat-inline-emoji { display:inline; border:0; padding:0 1px; background:none; font:inherit; font-size:1.35em; line-height:1; vertical-align:-.06em; cursor:zoom-in; }
.chat-inline-emoji:hover { background:#71865c14; }
.chat-bubble.has-visual-media { background:none; border:0; padding:0; min-height:0; }
.chat-bubble.has-visual-media::before { display:none; }
.chat-bubble.has-visual-media .chat-message-text { background:#fff; border:1px solid #e4e8de; border-radius:5px; padding:10px 13px; margin-bottom:9px; }
.chat-image { padding:0; border:0; display:block; max-width:270px; background:none; cursor:zoom-in; border-radius:5px; overflow:hidden; margin-top:4px; }
.chat-image img { display:block; max-width:100%; max-height:300px; width:auto; object-fit:contain; border-radius:5px; }
.chat-image.media-failed { padding:18px; border:1px solid #dce3d5; font-size:11px; color:#839576; background:#fff; }
.chat-image.media-failed img { display:none; }
.chat-video { display:block; width:min(360px,100%); max-height:300px; background:#20251f; border-radius:6px; margin-top:4px; }
.chat-video-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; padding:7px 2px; }
.chat-video-sound,.chat-video-expand { border:1px solid #dce3d6; background:#f7f9f4; border-radius:5px; padding:6px 9px; color:#506346; font-size:12px; white-space:nowrap; }
.chat-file { display:flex; align-items:center; gap:13px; color:#35412e; width:255px; max-width:100%; min-height:64px; text-decoration:none; }
.chat-file:hover { text-decoration:none; }
.chat-file-type { width:40px; height:44px; flex-shrink:0; border-radius:4px; display:grid; place-items:center; background:#d5e3c8; color:#58734a; font-size:10px; font-weight:600; }
.chat-file-info { display:grid; gap:7px; min-width:0; }
.chat-file-info strong { font-size:12px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-file-info small { color:#95a18a; font-size:10px; }
.chat-voice { display:flex; align-items:center; gap:13px; min-width:160px; flex-wrap:wrap; }
.chat-voice-toggle { display:flex; align-items:center; justify-content:space-between; gap:30px; border:0; background:none; color:#35432a; padding:0; min-height:30px; min-width:110px; }
.chat-voice-duration { font-size:12px; }
.chat-voice-wave { display:flex; align-items:center; gap:3px; width:22px; height:20px; }
.chat-voice-wave span { display:block; width:3px; border-radius:3px; background:#5b744a; height:7px; }
.chat-voice-wave span:nth-child(2) { height:13px; }
.chat-voice-wave span:nth-child(3) { height:19px; }
.chat-voice-toggle.playing .chat-voice-wave span { animation:voice-playing .8s infinite alternate; }
.chat-voice-toggle.playing .chat-voice-wave span:nth-child(2) { animation-delay:.2s; }
.chat-voice-toggle.playing .chat-voice-wave span:nth-child(3) { animation-delay:.4s; }
.chat-voice-toggle.loading { opacity:.5; }
@keyframes voice-playing { to { transform:scaleY(.35); } }
.chat-voice audio { display:none; }
.chat-audio-download { font-size:9px; color:#7d956b; white-space:nowrap; }
.chat-attachment-status { display:block; color:#8c9682; padding:8px; font-size:11px; background:#edf0e8; border-radius:4px; }
.chat-message-source { margin-top:1px; font-size:9px; color:#acb3a4; max-width:100%; }
.chat-message-source>summary { cursor:pointer; font-size:9px; }
.chat-message-source>p { font-size:10px; color:#98a58c; overflow-wrap:anywhere; line-height:1.6; padding-top:5px; }
.chat-history-pager { margin:0; padding:10px 20px; background:#f4f5f2; border-top:1px solid #e2e5dd; font-size:11px; gap:10px; flex-wrap:wrap; }
.chat-history-pager button { font-size:11px; padding:5px 0; }
.chat-list-pager,.chat-history-pager { flex:0 0 auto; min-height:52px; line-height:1.6; }
.chat-sidebar-heading,.chat-conversation-filter,.chat-thread-header,.chat-search-panel { flex-shrink:0; }
.chat-back-list { display:none; }
#chat-image-dialog { max-width:calc(100vw - 40px); max-height:calc(100dvh - 40px); padding:18px; border:0; border-radius:12px; background:#232922; box-shadow:0 30px 100px #0006; }
#chat-image-dialog::backdrop { background:#111a11cc; }
.chat-image-actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; margin-bottom:14px; }
.chat-image-actions .secondary { background:#f5f7f1; padding:7px 12px; font-size:12px; }
#chat-image-full { display:block; max-width:calc(100vw - 80px); max-height:calc(100dvh - 130px); object-fit:contain; margin:auto; }
#chat-video-full { display:block; max-width:calc(100vw - 80px); max-height:calc(100dvh - 190px); width:min(1000px,80vw); background:#111; margin:auto; }
#chat-emoji-full { display:grid; place-items:center; width:min(420px,70vw); min-height:240px; font-size:120px; }
#chat-media-caption,#chat-media-status { color:#e5ebdf; text-align:center; font-size:12px; margin:12px 0 0; overflow-wrap:anywhere; }
@media(max-width:1100px) { .chat-workspace.conversation-layout { grid-template-columns:245px minmax(0,1fr); } .chat-messages.message-list { padding:17px; } .chat-thread-header { padding:16px 18px; } }
@media(max-width:760px) {
  .chat-workspace.conversation-layout { display:flex; }
  .chat-workspace .chat-sidebar { width:100%; border-right:0; }
  .chat-workspace .chat-thread { display:none; width:100%; }
  .chat-workspace.has-chat .chat-sidebar { display:none; }
  .chat-workspace.has-chat .chat-thread { display:flex; }
  .chat-back-list { display:block; padding:0; flex-shrink:0; color:#779365; font-size:12px; }
  .chat-thread-header { padding:14px; gap:12px; min-height:74px; }
  .chat-thread-actions { gap:8px; }
  .chat-thread-header #conversation-title { font-size:15px; max-width:190px; }
  .chat-thread-header #message-total { font-size:9px; }
  .chat-members { font-size:10px; }
  .chat-member-list { width:245px; }
  .chat-search-panel>summary { padding:8px 14px; }
  .chat-search-panel .message-filter { grid-template-columns:1fr 1fr; }
  .chat-messages.message-list { padding:14px 12px 20px; }
  .chat-message-content { max-width:calc(100% - 48px); }
  .chat-message { gap:9px; }
  .chat-avatar { width:34px; height:34px; font-size:16px; }
  .chat-image { max-width:215px; }
  .chat-video { max-width:245px; }
  .chat-file { width:200px; }
  .chat-file-info strong { max-width:145px; }
  .chat-history-pager { padding:9px 12px; gap:6px; }
  .chat-history-pager span { font-size:10px; }
}
main { padding-bottom:calc(48px + env(safe-area-inset-bottom,0px)); }
main:has(> #view-results:not([hidden])) { padding-top:clamp(16px,2.5dvh,32px); padding-bottom:calc(clamp(16px,2.5dvh,32px) + env(safe-area-inset-bottom,0px)); }
main:has(> #view-results:not([hidden]) > #result-conversations:not([hidden]))>footer { padding-top:12px; }
#chat-calendar-dialog { position:fixed; inset:auto; margin:0; width:312px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; padding:15px; color:#394b31; background:#fff; border:1px solid #dfe6d8; border-radius:12px; box-shadow:0 12px 42px #24372030; }
#chat-calendar-dialog::backdrop { background:transparent; }
#chat-calendar-dialog button:focus-visible { outline:2px solid #92b479; outline-offset:2px; }
.chat-calendar-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.chat-calendar-heading h3 { font-size:14px; font-weight:500; }
.chat-calendar-heading button { width:30px; height:30px; padding:0; border:0; border-radius:5px; background:none; color:#617b50; font-size:22px; }
.chat-calendar-heading button:hover:not(:disabled) { background:#edf4e7; }
.chat-calendar-heading button:disabled { cursor:default; }
.chat-calendar-weekdays,.chat-calendar-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; text-align:center; }
.chat-calendar-weekdays { margin-bottom:6px; color:#9aa68f; font-size:11px; }
.chat-calendar-day { min-height:34px; padding:4px 0; border:0; border-radius:6px; background:none; color:#c3c9be; font-size:12px; }
.chat-calendar-day.has-records { background:#ebf4e3; color:#4e733b; font-weight:600; }
.chat-calendar-day.has-records:hover { background:#dbeccf; }
.chat-calendar-day.has-records.selected { background:#6b8b54; color:#fff; }
.chat-calendar-day:disabled { opacity:1; cursor:default; }
.chat-calendar-status { margin-top:12px; color:#89967e; font-size:12px; text-align:center; }
#chat-calendar-latest { display:block; width:100%; border-top:1px solid #e9eee4; margin-top:12px; padding:11px 0 0; font-size:12px; }
