@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #1d3430;
  --ink-light: #53655f;
  --muted: #89958f;
  --line: #e6ebe8;
  --line-strong: #d7e0da;
  --teal: #167c66;
  --teal-dark: #11634f;
  --teal-soft: #eaf5ef;
  --amber: #a87427;
  --amber-soft: #fcf5e7;
  --red: #be5b55;
  --red-soft: #fcf0ee;
  --sidebar: #172e28;
  --radius: 12px;
  --shadow: 0 3px 18px rgb(25 54 40 / 3%);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 360px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button { appearance: none; }
a { color: var(--teal); text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #8bc4ad; outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
input[type="checkbox"] { accent-color: var(--teal); }
::selection { background: #cfe9dc; color: #163d2f; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d6dfd9; border: 1px solid transparent; border-radius: 10px; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 216px; background: var(--sidebar); color: #e7eee9; }
.brand { display: flex; gap: 11px; align-items: center; min-height: 85px; padding: 22px 22px; color: #e7eee9; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #368d6c; color: #fff; flex: 0 0 auto; }
.brand-mark svg { width: 23px; height: 23px; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { color: #f0f5f1; font-size: 17px; font-weight: 650; letter-spacing: .6px; line-height: 1.5; }
.brand-copy small, .brand-copy span { color: #90a79b; font-size: 10px; letter-spacing: 1.5px; line-height: 1.8; }
.workspace-label { margin: 21px 25px 10px; color: #799489; font-size: 10px; font-weight: 600; letter-spacing: 2px; }
.nav-list { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0 12px; list-style: none; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid transparent; border-radius: 7px; background: none; color: #a9bcb2; font-size: 13px; text-align: left; transition: background .15s, color .15s; }
.nav-item:hover { background: #ffffff08; color: #f4f8f5; }
.nav-item.active { background: #2d4a3d; border-color: #45634f55; color: #fff; font-weight: 550; }
.nav-icon { display: inline-flex; color: #93b2a0; }
.nav-item.active .nav-icon { color: #b5d99e; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-label { white-space: nowrap; }
.nav-badge { display: grid; place-items: center; min-width: 21px; height: 20px; margin-left: auto; padding: 0 5px; border-radius: 5px; background: #ffffff12; color: #b6c7bd; font-size: 10px; font-weight: 600; }
.nav-item.active .nav-badge { background: #b4d49d; color: #244031; }
.sidebar-bottom { display: flex; flex-direction: column; gap: 16px; margin-top: auto; padding: 24px 15px 17px; }
.connection-card { padding: 13px 12px; border: 1px solid #355046; border-radius: 8px; background: #1c352d; font-size: 11px; color: #a8bbaf; }
.connection-card > div:first-child { display: flex; align-items: center; gap: 7px; color: #d4e1d7; font-size: 12px; }
.connection-card p { margin-top: 7px; color: #7f9a8b; font-size: 10px; line-height: 1.75; }
.connection-card .button { width: 100%; min-height: 29px; margin-top: 12px; border-color: #425b4d; background: #ffffff06; color: #c3d4c6; font-size: 10px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #c7a764; flex: 0 0 auto; }
.status-dot.online { background: #77b992; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; padding: 0 8px; color: #718f7e; font-size: 10px; }
.sidebar-footer svg { width: 13px; height: 13px; }
.main-shell { width: calc(100% - 216px); min-width: 0; margin-left: 216px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; padding: 0 32px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 12px; }
.breadcrumb svg { width: 15px; height: 15px; }
.breadcrumb strong, .breadcrumb span:last-child { font-weight: 500; color: var(--ink-light); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.topbar-actions > .divider { width: 1px; height: 24px; margin: 0; background: var(--line); }
.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #77877e; transition: background .15s; }
.icon-button:hover { background: var(--surface-soft); color: var(--teal); }
.icon-button svg { width: 18px; height: 18px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; background: #e8efe9; color: #527a61; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.avatar svg { width: 18px; height: 18px; }
.avatar.small { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.avatar.large { width: 42px; height: 42px; border-radius: 12px; font-size: 15px; }
.user-meta { display: flex; flex-direction: column; font-size: 11px; line-height: 1.6; }
.user-meta strong { font-size: 12px; font-weight: 550; }
.user-meta small { color: var(--muted); font-size: 10px; }
.main-content { max-width: 1600px; margin: 0 auto; padding: 29px 32px 40px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 25px; }
.eyebrow { margin-bottom: 7px; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: #83a18e; }
.page-title { color: #1a3229; font-size: 26px; font-weight: 650; line-height: 1.4; letter-spacing: -.7px; }
.page-description { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.heading-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 36px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink-light); font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.button svg { width: 15px; height: 15px; }
.button:hover { border-color: #bacfc0; background: #f6faf7; }
.button.primary { border-color: var(--teal); background: var(--teal); color: #fff; box-shadow: 0 2px 3px #1b705610; }
.button.primary:hover { border-color: var(--teal-dark); background: var(--teal-dark); }
.button.secondary { background: #fff; }
.button.ghost { border-color: transparent; background: transparent; color: var(--ink-light); }
.button.ghost:hover { background: #edf3ef; }
.button.danger { border-color: #e9d5d1; background: #fff; color: var(--red); }
.button.danger:hover { border-color: #dbbdb6; background: var(--red-soft); }
.button.small { min-height: 29px; padding: 5px 10px; font-size: 11px; }
.button.full { width: 100%; }
.connection-banner { display: flex; align-items: center; gap: 13px; padding: 13px 17px; margin-bottom: 22px; border: 1px solid #e9e5d5; border-radius: 8px; background: #fbfaf3; }
.banner-icon { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #eee7d0; border-radius: 8px; background: #f7f2de; color: #a48b49; flex: 0 0 auto; }
.banner-icon svg { width: 17px; height: 17px; }
.banner-copy { flex: 1; min-width: 0; }
.banner-copy strong { color: #706343; font-size: 12px; font-weight: 550; }
.banner-copy p, .banner-copy small { color: #a09272; font-size: 11px; margin-top: 2px; }
.connection-banner > .button, .connection-banner > .link-button { color: #928051; font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 3px 8px; border-radius: 4px; color: #738278; background: #f0f3f1; font-size: 10px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.badge.teal { color: #348265; background: #eaf5ef; }
.badge.amber { color: #a3813f; background: #fcf4e3; }
.badge.gray { color: #8c9690; background: #f1f3f2; }
.badge.red { color: #b5655e; background: #fbedea; }
.badge .status-dot { width: 4px; height: 4px; background: currentColor; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 25px; }
.stat-card { position: relative; padding: 19px 21px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--ink-light); font-size: 11px; }
.stat-value { margin: 9px 0 8px; font-size: 32px; font-weight: 550; line-height: 1.3; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 6px; color: #99a59e; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.stat-foot { display: flex; gap: 6px; align-items: center; color: #9aa69e; font-size: 10px; }
.stat-foot strong { color: #5f9074; font-weight: 500; }
.stat-icon { position: absolute; top: 18px; right: 19px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #f1f6f2; color: #86a68b; }
.stat-icon svg { width: 16px; height: 16px; }
.stat-card:nth-child(2) .stat-icon { background: #f8f5ec; color: #b7a875; }
.stat-card:nth-child(3) .stat-icon { background: #eef4f7; color: #83a6b3; }
.stat-card:nth-child(4) .stat-icon { background: #f3f0f7; color: #a799ba; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(285px, .9fr); gap: 22px; align-items: start; }
.workspace-grid > div, .workspace-grid > section { min-width: 0; }
.workspace-grid > div > .card + .card { margin-top: 22px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 17px; }
.card-title { font-size: 15px; font-weight: 600; color: #2b4235; }
.card-subtitle { color: var(--muted); font-size: 11px; margin-top: 3px; }
.card-body { padding: 0 22px 22px; }
.card-body > .form-field:last-child { margin-bottom: 0; }
.tab-list { display: flex; gap: 22px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.tab { position: relative; min-height: 38px; padding: 0 1px 10px; border: 0; background: transparent; color: #8b978f; font-size: 11px; white-space: nowrap; }
.tab.active { color: var(--teal); font-weight: 550; }
.tab.active::after { position: absolute; height: 2px; background: var(--teal); content: ""; left: 0; right: 0; bottom: -1px; }
.tab .badge { margin-left: 5px; padding: 0 5px; background: #f0f3f1; font-size: 9px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.table th { padding: 12px 22px; border-bottom: 1px solid var(--line); background: #fafcfb; color: #93a097; font-size: 10px; font-weight: 500; }
.table td { padding: 14px 22px; border-bottom: 1px solid #edf1ee; color: #64786b; font-size: 12px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fcfdfc; }
.table .person { min-width: 130px; }
.table td:first-child { color: var(--ink); }
.table td:last-child, .table th:last-child { padding-right: 22px; }
.person { display: flex; align-items: center; gap: 10px; }
.person-copy { min-width: 0; }
.person-name { display: flex; align-items: center; gap: 7px; color: #354b3d; font-size: 13px; font-weight: 500; }
.person-meta { max-width: 230px; overflow: hidden; text-overflow: ellipsis; color: #9aa69d; font-size: 10px; white-space: nowrap; margin-top: 2px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-block; padding: 2px 6px; border: 1px solid #e9eee9; border-radius: 4px; color: #8c9a90; background: #fbfcfb; font-size: 10px; line-height: 1.5; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 170px; padding: 32px; text-align: center; color: var(--muted); font-size: 12px; }
.empty-state svg { width: 27px; height: 27px; margin-bottom: 5px; color: #a7bcb0; }
.empty-state strong { color: var(--ink-light); font-weight: 500; }
.empty-state p { max-width: 320px; font-size: 11px; }
.link-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--teal); font-size: 11px; line-height: 1.6; text-align: left; }
.link-button:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.link-button svg { width: 14px; height: 14px; }
.link-button.danger { color: var(--red); }
.link-button.danger:hover { color: #963f3f; }
.knowledge-delete-title { margin: 16px 0; overflow-wrap: anywhere; }
.knowledge-delete-note { margin-top: 12px; color: var(--red); font-size: 12px; }
.task-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:24px}.task-summary section{padding:20px 24px;display:grid;grid-template-columns:1fr auto;gap:8px}.task-summary span{font-size:13px;color:var(--ink-light)}.task-summary strong{grid-row:1/3;grid-column:2;font-size:30px;line-height:1.3;color:var(--teal)}.task-summary small{font-size:11px;color:var(--muted)}#task-kind{width:145px}.task-table td{vertical-align:top;padding-top:20px;padding-bottom:20px}.task-table td:first-child{width:22%;min-width:170px}.task-table td:nth-child(2){width:45%}.task-message{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.8;max-height:180px;overflow:auto;margin:0 0 10px}.task-reason{display:flex;flex-wrap:wrap;gap:7px;align-items:center;font-size:11px;color:var(--muted)}.task-time{white-space:nowrap;font-size:11px;color:var(--muted)}.task-actions{display:flex;align-items:center;flex-direction:column;gap:12px;min-width:100px}.task-actions .button{min-height:32px;padding:5px 10px;font-size:11px}.task-footnote{font-size:11px;color:var(--muted);margin-top:16px;line-height:1.8}#task-sync{font-size:11px;color:var(--muted)}@media(max-width:1000px){.task-summary{gap:10px}.task-summary section{padding:15px}.task-summary strong{font-size:24px}.task-table{min-width:760px}}
.trigger-fieldset{border:0;padding:0;margin:20px 0}.trigger-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.trigger-option{display:flex;align-items:flex-start;gap:9px;padding:12px;border:1px solid var(--line);border-radius:8px;background:#fafcfb;cursor:pointer}.trigger-option input{margin-top:3px;accent-color:var(--teal)}.trigger-option strong{display:block;font-size:12px}.trigger-option small{display:block;font-size:10px;color:var(--muted);margin-top:4px;line-height:1.6}.rules-actions{display:flex;flex-wrap:wrap;gap:12px}#reply-live-status{margin-bottom:20px}#reply-live-status h3{font-size:15px;margin-bottom:14px}#reply-live-status .form-help{line-height:1.8;margin-top:16px}@media(max-width:1100px){.trigger-options{grid-template-columns:1fr}}
.flow-list { margin: 0; padding: 0; list-style: none; }
.flow-item { position: relative; display: flex; align-items: flex-start; gap: 13px; padding: 2px 0 20px; }
.flow-item:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 5px; width: 1px; background: #e2e9e3; }
.flow-item:last-child { padding-bottom: 4px; }
.flow-index { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border: 1px solid #dfe9e1; border-radius: 8px; background: #f2f7f2; color: #6d9477; font-size: 11px; font-weight: 550; }
.flow-index svg { width: 14px; height: 14px; }
.flow-copy { padding-top: 1px; }
.flow-copy strong { display: block; color: #4e6656; font-size: 12px; font-weight: 500; }
.flow-copy p, .flow-copy small { display: block; margin-top: 3px; color: #96a297; font-size: 10px; line-height: 1.8; }
.info-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; padding: 12px 13px; border: 1px solid #e8eee7; border-radius: 6px; background: #f7faf6; color: #8a9c89; font-size: 10px; line-height: 1.85; }
.info-note svg { width: 14px; height: 14px; margin-top: 2px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-action { display: flex; align-items: center; gap: 11px; padding: 15px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; transition: border-color .15s, background .15s; }
.quick-action:hover { border-color: #b9d1c2; background: #fcfdfb; }
.quick-action > svg { width: 19px; height: 19px; color: #71997d; }
.quick-action strong { display: block; color: #536858; font-size: 11px; font-weight: 500; }
.quick-action small { display: block; color: #9aa59c; font-size: 9px; margin-top: 2px; }
.activity-list { display: flex; flex-direction: column; gap: 0; padding: 0; margin: 0; list-style: none; }
.activity-item { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 0 0 20px; }
.activity-item:last-child { padding-bottom: 0; }
.activity-item:not(:last-child)::before { content: ""; position: absolute; width: 1px; left: 3px; top: 14px; bottom: 5px; background: #e8ede8; }
.activity-dot { display: inline-block; width: 7px; height: 7px; margin-top: 6px; border: 2px solid #c3d4c5; border-radius: 50%; background: #fff; flex: 0 0 auto; }
.activity-item:first-child .activity-dot { border-color: #75a084; background: #75a084; }
.activity-item > div { min-width: 0; flex: 1; }
.activity-item strong { display: block; color: #566f5c; font-size: 11px; font-weight: 500; }
.activity-item p { margin-top: 2px; color: #9aa69c; font-size: 10px; }
.activity-time { color: #abb5ae; font-size: 9px; white-space: nowrap; margin-top: 2px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 13px; gap: 10px; }
.section-heading h2, .section-heading h3 { font-size: 13px; font-weight: 600; }

.conversation-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 226px); min-height: 580px; max-height: 1000px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.conversation-list { min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); padding: 10px 8px; background: #fff; }
.conversation-list > .toolbar { margin: 0; padding: 8px 5px 15px; }
.conversation-list > .tab-list { gap: 17px; padding: 0 12px; margin: 0 -8px 9px; }
.conversation-item { display: flex; width: 100%; gap: 10px; align-items: flex-start; padding: 14px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; }
.conversation-item:hover { background: #f7faf8; }
.conversation-item.active { background: #eef6f0; border-color: #dfebe1; }
.conversation-info { flex: 1; min-width: 0; }
.conversation-info > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.conversation-info strong { color: #39553f; font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-info time, .conversation-info small { color: #9aa89c; font-size: 9px; white-space: nowrap; }
.conversation-preview { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 7px; font-size: 10px; color: #92a195; }
.conversation-item .badge { font-size: 8px; padding: 1px 5px; }
.chat-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.chat-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 19px 22px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.chat-header .heading-actions { gap: 7px; }
.chat-header .heading-actions .button { font-size: 10px; padding: 6px 9px; min-height: 29px; }
.chat-messages { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; flex: 1; min-height: 0; padding: 27px 28px; overflow-y: auto; background: #fafcfb; }
.message { position: relative; max-width: 82%; align-self: flex-start; }
.message.customer { align-self: flex-start; }
.message.staff { align-self: flex-end; }
.message-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; color: #97a49a; font-size: 10px; }
.message-meta strong { font-weight: 500; color: #738d7b; }
.message.staff .message-meta { justify-content: flex-end; }
.message-bubble { padding: 12px 15px; border: 1px solid #e6ece7; border-radius: 0 10px 10px; background: #fff; color: #4c6154; font-size: 13px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.staff .message-bubble { border-color: #dde9dd; border-radius: 10px 0 10px 10px; background: #eaf4e9; color: #49654f; }
.message.selected .message-bubble { outline: 2px solid #77b78e; outline-offset: 2px; }
.message .checkbox { cursor: pointer; }
.chat-compose { padding: 17px 22px; border-top: 1px solid var(--line); background: #fff; flex: 0 0 auto; }
.chat-compose .textarea { min-height: 80px; margin: 10px 0; font-size: 12px; }
.chat-compose .toolbar { margin: 0; }
.chat-compose > p { font-size: 10px; color: var(--muted); }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 22px; border-bottom: 1px solid #dfeadf; background: #eef7ed; color: #608466; font-size: 11px; flex: 0 0 auto; }
.checkbox { width: 14px; height: 14px; margin: 0; vertical-align: middle; flex: 0 0 auto; }
.knowledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.knowledge-card { display: flex; flex-direction: column; min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.knowledge-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.knowledge-card h3 { font-size: 14px; font-weight: 600; color: #3a553f; margin-bottom: 8px; }
.knowledge-question { margin-bottom: 11px; color: #748b7b; font-size: 12px; line-height: 1.8; }
.knowledge-answer { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 18px; color: #7e9082; font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.knowledge-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid #edf1ed; font-size: 10px; color: #a1aca3; }
.knowledge-card-footer > div { display: flex; gap: 8px; }
.knowledge-card-footer .button { padding: 4px 7px; font-size: 10px; min-height: 26px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 19px; }
.toolbar > div { display: flex; align-items: center; gap: 9px; }
.search-field { position: relative; display: flex; align-items: center; width: 280px; max-width: 100%; padding: 0 11px; gap: 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.search-field svg { width: 15px; height: 15px; color: #a4b0a7; }
.search-field input { width: 100%; min-width: 0; height: 36px; padding: 7px 0; border: 0; background: transparent; outline: none; font-size: 11px; color: var(--ink-light); }
.search-field:focus-within { border-color: #8eb69d; box-shadow: 0 0 0 2px #dfece3; }
.search-field input:focus-visible { outline: none; }
.search-field input::placeholder { color: #a7b1aa; }
.filter-select { min-height: 36px; padding: 7px 29px 7px 11px; border: 1px solid var(--line-strong); border-radius: 6px; background-color: #fff; color: #7b8e80; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-grid .form-field { margin-bottom: 0; }
.form-label { display: block; color: #58705e; font-size: 11px; font-weight: 500; }
.input, .textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: #526759; font-size: 12px; line-height: 1.7; transition: border-color .15s, box-shadow .15s; }
.input { min-height: 39px; }
.textarea { display: block; min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus { outline: none; border-color: #8ab19b; box-shadow: 0 0 0 3px #edf5ef; }
.input::placeholder, .textarea::placeholder { color: #adb8b0; }
.input:disabled, .textarea:disabled { background: #f7f9f7; color: #aab6ac; }
.form-help { color: #9ca99e; font-size: 10px; line-height: 1.8; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); align-items: start; gap: 22px; }
.settings-grid > .card + .card { margin-top: 0; }
.settings-section { padding: 21px 23px; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; }
.settings-section h3 { color: #4b6752; font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 0; border-bottom: 1px solid #edf1ee; }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong { display: block; color: #58705f; font-size: 12px; font-weight: 500; }
.setting-row p { color: #9ca99f; font-size: 10px; margin-top: 3px; }
.setting-row .input { max-width: 94px; }
.switch { position: relative; display: inline-flex; width: 34px; height: 20px; flex: 0 0 auto; vertical-align: middle; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; z-index: 1; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: #dce5df; border-radius: 12px; transition: background .18s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px #193d2615; transition: transform .18s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 3px solid #b6d2bd; outline-offset: 3px; }
.switch input:disabled + span { opacity: .5; }
.input-switch { appearance: none; position: relative; width: 34px; height: 20px; border: 0; border-radius: 12px; background: #dce5df; cursor: pointer; flex: 0 0 auto; }
.input-switch::after { content: ""; position: absolute; width: 14px; height: 14px; top: 3px; left: 3px; background: #fff; border-radius: 50%; transition: transform .18s; }
.input-switch:checked { background: var(--teal); }
.input-switch:checked::after { transform: translateX(14px); }
.detail-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.detail-list > div, .detail-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; color: #95a197; font-size: 11px; }
.detail-list strong, .detail-list dd { color: #6c8473; font-weight: 500; margin: 0; text-align: right; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: #0d291b59; backdrop-filter: blur(3px); animation: fade-in .15s ease; }
.modal { display: flex; flex-direction: column; width: 640px; max-width: 100%; max-height: 90vh; max-height: 90dvh; border: 1px solid #ffffffb3; border-radius: 13px; background: #fff; box-shadow: 0 24px 90px #112b2333; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 21px 25px; border-bottom: 1px solid var(--line); gap: 15px; flex: 0 0 auto; }
.modal-header h2 { color: #35533c; font-size: 17px; font-weight: 600; }
.modal-header p { color: #9aa89c; font-size: 11px; margin-top: 3px; }
.modal-body { min-height: 0; padding: 24px 25px; overflow-y: auto; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 17px 25px; border-top: 1px solid var(--line); background: #fcfdfc; flex: 0 0 auto; }
.modal-footer .form-help { margin-right: auto; }
.close-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: #f5f8f5; color: #91a093; font-size: 21px; font-weight: 300; line-height: 1; }
.close-button:hover { background: #eaf2eb; color: var(--teal); }
.toast { position: fixed; z-index: 200; left: calc(50% + 108px); bottom: 28px; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 48px); padding: 13px 20px; border: 1px solid #365c45; border-radius: 8px; background: #213e2f; color: #f2f7f2; font-size: 12px; box-shadow: 0 10px 35px #1d332233; transform: translateX(-50%); animation: fade-in .15s ease; }
.toast.error { background: #67463d; border-color: #815e51; }
.toast svg { width: 16px; height: 16px; color: #b6d5b4; }
.spinner { width: 18px; height: 18px; border: 2px solid #dce8df; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 55vh; color: var(--muted); font-size: 12px; }
.draft-card { padding: 20px 22px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.draft-card + .draft-card { margin-top: 15px; }
.draft-card > .person { margin-bottom: 15px; }
.draft-text { padding: 14px 16px; margin: 12px 0; border: 1px solid #e5ede5; border-radius: 7px; background: #f9fbf7; color: #657e68; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.source-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 7px; border-radius: 4px; background: #eef5ed; color: #839d7f; font-size: 10px; overflow-wrap: anywhere; }
.source-chip svg { width: 12px; height: 12px; }
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.split-grid > .card + .card { margin-top: 0; }
.muted { color: var(--muted); font-size: 11px; }
.divider { border: 0; height: 1px; margin: 20px 0; background: var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hidden, [hidden] { display: none !important; }

/* Workspace composition and view-specific details. */
.main-column, .side-column { min-width: 0; }
.local-status { display: flex; align-items: center; gap: 7px; color: #84988a; font-size: 10px; }
.local-status .status-dot { width: 5px; height: 5px; background: #79a283; }
.topbar-divider { width: 1px; height: 25px; background: var(--line); }
.top-avatar { width: 32px; height: 32px; border-radius: 10px; background: #e8eee7; color: #6b876c; font-size: 11px; }
.sidebar-version { display: block; margin-top: 11px; color: #638772; font-size: 9px; font-weight: 500; letter-spacing: 1.6px; }
.connection-card > .status-dot { margin-right: 6px; }
.connection-card > strong { color: #c8d8cc; font-size: 11px; font-weight: 500; }
.nav-item > .nav-icon { width: 18px; height: 18px; }
.banner-copy > span { display: block; margin-top: 3px; font-size: 10px; color: #9a9075; }
.stat-value > span { margin-left: 5px; color: #9aa79f; font-size: 14px; font-weight: 400; letter-spacing: 0; }
.small-dot { width: 4px; height: 4px; border-radius: 50%; background: #b6c6bb; flex: 0 0 auto; }
.amber-dot { background: #c8b179; }
.count-label { display: inline-block; min-width: 19px; margin-left: 5px; padding: 1px 5px; border: 1px solid #e3ebe5; border-radius: 4px; color: #9aaca0; font-size: 9px; font-weight: 400; line-height: 1.4; text-align: center; vertical-align: 1px; }
.table-preview { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #768b7d; font-size: 12px; }
.review-section .card-header { padding-bottom: 21px; }
.review-section .flow-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 0 22px 22px; }
.review-section .flow-item { display: flex; align-items: center; padding: 0; gap: 10px; }
.review-section .flow-item::after { display: none; }
.review-section .flow-item > svg { width: 15px; height: 15px; color: #b6c7b9; margin-left: auto; }
.review-section .flow-item:last-child > svg { color: #83a58a; }
.review-section .flow-index { width: 30px; height: 33px; border-color: #e7eee7; border-radius: 6px; background: #f6f9f4; color: #8fab88; font-size: 11px; }
.review-section .flow-copy strong { font-size: 11px; }
.review-section .flow-copy p { font-size: 9px; margin-top: 3px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 22px; border-top: 1px solid var(--line); background: #fcfdfb; }
.card-bottom > span { display: flex; align-items: center; gap: 6px; color: #9aa99b; font-size: 9px; }
.card-bottom > span svg { width: 12px; height: 12px; }
.card-bottom .link-button { font-size: 10px; white-space: nowrap; }
.side-column .quick-actions { display: flex; flex-direction: column; gap: 1px; padding: 0 13px 12px; }
.side-column .quick-action { flex-direction: row; align-items: center; gap: 12px; padding: 11px 9px; border: 1px solid transparent; border-radius: 7px; background: #fff; }
.side-column .quick-action:hover { border-color: #edf2eb; background: #f9fbf7; }
.side-column .quick-action > svg { width: 13px; height: 13px; color: #b3c0b6; margin-left: auto; }
.quick-action-icon { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #e3ece3; border-radius: 8px; background: #f1f6ee; color: #8aa47e; flex: 0 0 auto; }
.quick-action-icon svg { width: 16px; height: 16px; }
.side-column .quick-action:nth-child(2) .quick-action-icon { border-color: #e4eaf1; background: #f0f4f8; color: #8ba0b0; }
.side-column .quick-action:nth-child(3) .quick-action-icon { border-color: #eee7dc; background: #f7f3e9; color: #b4a27d; }
.side-column .quick-action strong { font-size: 11px; }
.side-column .quick-action small { font-size: 9px; }
.activity-card .activity-list { padding: 0 22px 22px; }
.activity-card .activity-item { padding-bottom: 17px; }
.activity-card .activity-item:last-child { padding-bottom: 0; }
.full-activity { padding: 8px 24px 25px; }
.full-activity .activity-item { padding-bottom: 25px; }
.full-activity .activity-item strong { font-size: 12px; }
.full-activity .activity-item p { font-size: 11px; }
.side-column > .info-note { margin: 17px 3px 0; padding: 0; border: 0; background: none; }
.info-note strong { display: block; color: #81947e; font-size: 10px; font-weight: 500; }
.info-note p { margin-top: 3px; }
.conversation-list { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.conversation-list-tools { flex: 0 0 auto; padding: 16px 14px 0; }
.conversation-list-tools .search-field { width: 100%; border-color: #e8ede9; background: #fafcfb; }
.conversation-list-tools .search-field input { height: 33px; font-size: 10px; }
.conversation-list-tools .tab-list { margin-top: 10px; padding: 0 5px; gap: 24px; }
.conversation-list-tools .tab { min-height: 34px; padding-bottom: 8px; }
.conversation-items { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.conversation-name { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: #45634c; font-size: 12px; font-weight: 550; }
.conversation-name svg { width: 12px; height: 12px; color: #a5b4a8; }
.conversation-meta { display: block; color: #a3afa5; font-size: 9px; }
.chat-hint { display: flex; align-items: center; gap: 7px; padding: 8px 22px; border-bottom: 1px solid #edf1ed; background: #fdfefc; color: #9aab9a; font-size: 10px; flex: 0 0 auto; }
.chat-hint svg { width: 13px; height: 13px; }
.message { display: flex; align-items: flex-start; gap: 9px; }
.message.staff { flex-direction: row-reverse; }
.message-select { padding-top: 30px; opacity: .55; cursor: pointer; }
.message:hover .message-select, .message-select:focus-within { opacity: 1; }
.message-content { min-width: 0; }
.message-meta time { color: #b0bbb3; font-size: 9px; }
.chat-compose > .draft-card { padding: 0; border: 0; border-radius: 0; }
.draft-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.draft-heading strong { display: flex; align-items: center; gap: 7px; color: #708872; font-size: 11px; font-weight: 500; }
.draft-heading svg { width: 14px; height: 14px; }
.chat-compose .textarea.draft-text { min-height: 75px; height: 85px; max-height: 180px; padding: 9px 12px; margin: 10px 0 8px; font-size: 13px; line-height: 1.8; }
.draft-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.draft-sources .muted { font-size: 10px; }
.draft-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.draft-actions > .form-help { margin-right: auto; font-size: 9px; }
.draft-actions > .button { font-size: 10px; padding: 5px 8px; min-height: 28px; }
.compose-intro { margin-bottom: 13px; }
.compose-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #edf1ed; }
.compose-bottom > .primary { font-size: 11px; min-height: 32px; padding: 7px 11px; }
.compose-limit { margin-top: 9px; text-align: right; font-size: 9px !important; color: #abb6ac !important; }
.knowledge-card h2 { margin-bottom: 9px; color: #3f5b43; font-size: 14px; font-weight: 550; line-height: 1.65; }
.knowledge-source { display: flex; align-items: center; gap: 5px; margin-top: auto; margin-bottom: 12px; color: #a2aea4; font-size: 9px; }
.knowledge-source svg { width: 11px; height: 11px; }
.knowledge-card-footer { margin-top: 0; }
.knowledge-card-footer .person-meta { margin-top: 0; font-size: 9px; }
.toolbar > .tab-list { padding: 0; gap: 22px; flex-wrap: nowrap; border: 0; }
.toolbar .tab { padding-bottom: 6px; }
.tab > span { display: inline-block; margin-left: 5px; color: #a9b7ac; font-size: 9px; }
.tab.active > span { color: #79a086; }
.settings-grid .settings-section { padding: 0; border: 1px solid var(--line); }
.settings-grid > div > .button { margin-top: 20px; }
.settings-grid .card-header > svg { width: 18px; height: 18px; color: #a4b9a7; }
.setting-row + .form-field { margin-top: 18px; }
.settings-grid .detail-list { margin: 22px 0; }
.settings-grid .card-body > h3 { color: #6b846e; font-size: 13px; font-weight: 550; margin-bottom: 8px; }
.connection-illustration { display: grid; place-items: center; width: 49px; height: 49px; border: 1px solid #e6ede4; border-radius: 12px; margin-bottom: 17px; background: #f3f8f0; color: #a0b393; }
.connection-illustration svg { width: 24px; height: 24px; }
.switch .input-switch { appearance: auto; }
.switch .input-switch::after { display: none; }
.modal > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.modal-body > .form-grid { margin-bottom: 18px; }
.modal-body > .card-subtitle { margin-bottom: 20px; }
.modal-body .info-note.compact { margin-top: 0; margin-bottom: 20px; }
.modal-body .flow-list.vertical { margin-top: 23px; }
.retrieval-result { margin-top: 14px; padding: 16px; border: 1px solid #e5eee4; border-radius: 7px; background: #f8fbf6; }
.retrieval-result strong { color: #648463; font-size: 12px; font-weight: 550; }
.retrieval-result p { margin: 7px 0 10px; color: #8a9d87; font-size: 11px; line-height: 1.9; white-space: pre-wrap; }
.review-answer { margin: 15px 0 20px; padding: 15px; border: 1px solid #e6ece4; border-radius: 7px; background: #f9fbf7; color: #789173; font-size: 12px; line-height: 1.95; white-space: pre-wrap; }
.review-confirm { display: flex; align-items: flex-start; gap: 8px; color: #8d9d89; font-size: 11px; line-height: 1.9; cursor: pointer; }
.review-confirm input { margin: 4px 0 0; flex: 0 0 auto; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 1680px) {
  .main-content { padding-top: 36px; }
  .page-heading { margin-bottom: 29px; }
  .stat-card { padding-top: 23px; padding-bottom: 22px; }
  .stat-value { margin: 13px 0; }
  .table td { padding-top: 17px; padding-bottom: 17px; }
}
@media (max-width: 1350px) {
  .main-content { padding: 25px 25px 35px; }
  .topbar { padding: 0 25px; }
  .workspace-grid { gap: 18px; grid-template-columns: minmax(0, 1.7fr) minmax(265px, 1fr); }
  .card-header { padding: 18px 18px 15px; }
  .card-body { padding: 0 18px 18px; }
  .table td, .table th { padding-left: 15px; padding-right: 15px; }
  .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-actions { gap: 8px; }
  .quick-action { flex-direction: column; align-items: flex-start; gap: 10px; padding: 13px; }
  .conversation-layout { grid-template-columns: 270px minmax(0, 1fr); }
  .chat-header { padding: 16px 18px; }
  .chat-messages { padding: 24px 22px; }
  .settings-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); }
  .table-preview { max-width: 170px; }
  .review-section .flow-list { gap: 10px; padding-left: 18px; padding-right: 18px; }
  .review-section .flow-item { gap: 8px; }
  .review-section .flow-item > svg { display: none; }
  .review-section .flow-copy p { font-size: 8px; }
  .card-bottom { padding-left: 18px; padding-right: 18px; }
  .card-bottom > span { max-width: 65%; }
  .activity-card .activity-list { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 1100px) {
  .stats-grid { gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-icon { right: 12px; top: 15px; width: 25px; height: 25px; }
  .stat-label { font-size: 10px; }
  .stat-value { font-size: 28px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-grid > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .workspace-grid > div:last-child > .card { margin-top: 0; }
  .quick-action { flex-direction: row; align-items: center; }
  .conversation-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .chat-header { flex-wrap: wrap; }
  .chat-header .heading-actions { margin-left: auto; }
  .settings-grid { grid-template-columns: 1fr; }
  .workspace-grid > div:last-child > .info-note { grid-column: 1 / -1; margin-top: 0; }
  .table-preview { max-width: 240px; }
}
@media (max-width: 900px) {
  .sidebar { width: 76px; }
  .brand { justify-content: center; min-height: 78px; padding: 20px 0; }
  .brand-copy, .workspace-label, .nav-label, .nav-badge, .sidebar-footer, .connection-card { display: none; }
  .nav-list { gap: 8px; padding: 12px; }
  .nav-item { justify-content: center; padding: 13px; min-height: 47px; }
  .nav-icon svg { width: 20px; height: 20px; }
  .sidebar-bottom { padding: 15px 12px; }
  .main-shell { margin-left: 76px; width: calc(100% - 76px); }
  .topbar { height: 62px; padding: 0 22px; }
  .main-content { padding: 24px 22px 32px; }
  .page-title { font-size: 24px; }
  .stats-grid { gap: 10px; }
  .stat-foot { font-size: 9px; }
  .conversation-layout { min-height: 570px; }
  .toast { left: calc(50% + 38px); }
  .knowledge-card-footer { flex-wrap: wrap; }
  .connection-banner > .badge { display: none; }
}
@media (max-width: 650px) {
  html { min-width: 360px; }
  .sidebar { position: fixed; top: auto; bottom: 0; width: 100%; height: 63px; flex-direction: row; border-top: 1px solid #304c3d; }
  .brand, .sidebar-bottom, .sidebar > .workspace-label { display: none; }
  .nav-list { width: 100%; flex-direction: row; align-items: center; justify-content: space-around; gap: 3px; padding: 7px; }
  .nav-list > li { flex: 1; }
  .nav-item { flex: 1; min-height: 46px; padding: 7px 9px; border-radius: 6px; }
  .nav-icon svg { width: 18px; height: 18px; }
  .main-shell { margin-left: 0; width: 100%; }
  .topbar { height: 58px; padding: 0 18px; gap: 10px; }
  .topbar-actions { gap: 10px; }
  .user-meta, .topbar-actions .divider { display: none; }
  .topbar-actions .avatar { width: 30px; height: 30px; font-size: 11px; border-radius: 9px; }
  .breadcrumb { font-size: 10px; gap: 7px; }
  .main-content { padding: 22px 16px 90px; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: 17px; margin-bottom: 19px; }
  .page-title { font-size: 23px; }
  .page-description { font-size: 11px; }
  .heading-actions { gap: 8px; }
  .heading-actions .button { min-height: 33px; font-size: 11px; }
  .eyebrow { font-size: 9px; }
  .connection-banner { align-items: flex-start; gap: 10px; padding: 12px; margin-bottom: 17px; }
  .connection-banner > .button, .connection-banner > .link-button { display: none; }
  .banner-copy strong { font-size: 11px; }
  .banner-copy p { font-size: 10px; }
  .banner-icon { width: 27px; height: 27px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 20px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 29px; margin: 10px 0 7px; }
  .stat-foot { font-size: 9px; }
  .workspace-grid { gap: 18px; }
  .workspace-grid > div:last-child { display: block; }
  .workspace-grid > div:last-child > .card + .card { margin-top: 18px; }
  .card-header { padding: 17px 16px 15px; }
  .card-body { padding: 0 16px 17px; }
  .card-title { font-size: 13px; }
  .card-subtitle { font-size: 10px; }
  .tab-list { padding: 0 16px; gap: 19px; }
  .tab { font-size: 10px; }
  .quick-actions { gap: 8px; }
  .quick-action { flex-direction: column; align-items: flex-start; padding: 12px; gap: 9px; }
  .quick-action small { display: none; }
  .quick-action strong { font-size: 10px; }
  .table th, .table td { padding-left: 15px; padding-right: 15px; }
  .table { min-width: 470px; }
  .conversation-layout { grid-template-columns: 1fr; height: auto; min-height: 0; max-height: none; }
  .conversation-list { display: flex; flex-wrap: wrap; align-items: stretch; max-height: 215px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .conversation-list > .toolbar, .conversation-list > .tab-list { width: 100%; }
  .conversation-item { width: 50%; gap: 7px; padding: 10px 8px; }
  .conversation-item .avatar { width: 29px; height: 29px; border-radius: 8px; font-size: 10px; }
  .conversation-info strong { font-size: 10px; max-width: 90px; }
  .conversation-info time { display: none; }
  .conversation-preview { font-size: 9px; margin-top: 3px; margin-bottom: 4px; }
  .chat-panel { min-height: 580px; }
  .chat-header { padding: 14px; gap: 10px; }
  .chat-header .heading-actions { margin-left: 0; }
  .chat-messages { max-height: 430px; min-height: 230px; padding: 20px 17px; gap: 18px; }
  .message { max-width: 92%; }
  .message-bubble { padding: 10px 12px; font-size: 11px; }
  .chat-compose { padding: 15px; }
  .chat-compose .textarea { min-height: 85px; }
  .selection-bar { padding: 10px 15px; font-size: 10px; }
  .selection-bar .button { font-size: 10px; }
  .knowledge-grid { grid-template-columns: 1fr; gap: 13px; }
  .knowledge-card { padding: 19px; }
  .knowledge-card h3 { font-size: 13px; }
  .knowledge-card-footer { flex-wrap: nowrap; }
  .toolbar { gap: 10px; }
  .toolbar > div { flex-wrap: wrap; }
  .search-field { width: 100%; }
  .toolbar > .search-field { flex: 1; min-width: 180px; }
  .form-grid, .split-grid, .settings-grid { grid-template-columns: 1fr; }
  .settings-section { padding: 17px 18px; }
  .setting-row { gap: 16px; }
  .modal-backdrop { padding: 12px; }
  .modal { border-radius: 11px; max-height: 92dvh; }
  .modal-header { padding: 18px; }
  .modal-header h2 { font-size: 16px; }
  .modal-body { padding: 20px 18px; }
  .modal-footer { padding: 14px 18px; flex-wrap: wrap; }
  .modal-footer .form-help { width: 100%; }
  .toast { left: 50%; bottom: 78px; font-size: 11px; padding: 12px 16px; }
  .topbar-divider { display: none; }
  .local-status { font-size: 9px; }
  .review-section .flow-list { grid-template-columns: 1fr; gap: 17px; padding: 0 18px 20px; }
  .review-section .flow-copy p { font-size: 10px; }
  .review-section .flow-item > svg { display: block; }
  .card-bottom { flex-wrap: wrap; gap: 9px; padding: 12px 16px; }
  .card-bottom > span { max-width: 100%; }
  .side-column .quick-action small { display: block; }
  .conversation-list { display: flex; flex-direction: column; padding: 0; flex-wrap: nowrap; max-height: 230px; }
  .conversation-list-tools { padding-top: 12px; }
  .conversation-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-y: auto; padding: 6px; }
  .conversation-item { width: 100%; }
  .conversation-name { font-size: 10px; }
  .conversation-meta { font-size: 8px; }
  .chat-hint { padding: 8px 14px; font-size: 9px; }
  .chat-compose .textarea.draft-text { min-height: 85px; }
  .draft-actions > .form-help { flex-basis: 100%; margin-bottom: 2px; }
  .toolbar > .tab-list { gap: 17px; }
  .compose-limit { font-size: 8px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* The desktop host owns the application navigation and the native WeCom window. */
.desktop-mode .sidebar, .desktop-mode .topbar { display: none; }
.desktop-mode .main-shell { width: 100%; margin-left: 0; }
.desktop-mode .main-content { width: 100%; max-width: none; padding: 28px 30px 40px; }
.desktop-mode .toast { left: 50%; bottom: 26px; }
.desktop-mode .page-title { font-size: 25px; }

.wecom-entry { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(290px, .85fr); padding: 0; }
.wecom-entry-copy { padding: 42px 38px 40px; }
.wecom-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 24px; border: 1px solid #dce9df; border-radius: 17px; background: #edf6ee; color: #4b9770; }
.wecom-mark svg { width: 32px; height: 32px; stroke-width: 1.5; }
.wecom-entry-copy > .badge { margin-bottom: 15px; }
.wecom-entry h2 { margin-bottom: 17px; color: #304e3b; font-size: 25px; font-weight: 600; letter-spacing: -.5px; line-height: 1.5; }
.wecom-entry-copy > p { max-width: 520px; color: #879a8a; font-size: 13px; line-height: 1.95; }
.wecom-entry-copy > .wecom-entry-lead { margin-bottom: 12px; color: #526e59; font-size: 15px; line-height: 1.9; }
.wecom-entry-copy .heading-actions { margin-top: 29px; flex-wrap: wrap; gap: 9px; }
.wecom-entry-guide { display: flex; flex-direction: column; justify-content: center; padding: 35px 29px; border-left: 1px solid #e8eee9; background: #fafcf9; }
.wecom-entry-guide > .eyebrow { margin-bottom: 23px; font-size: 11px; color: #8ca88f; }
.desktop-steps { display: flex; flex-direction: column; gap: 26px; padding: 0; margin: 0; list-style: none; }
.desktop-steps li { position: relative; display: flex; align-items: flex-start; gap: 13px; }
.desktop-steps li:not(:last-child)::after { position: absolute; top: 35px; bottom: -18px; left: 14px; width: 1px; background: #e0e8df; content: ""; }
.desktop-steps li > span { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border: 1px solid #e1e9df; border-radius: 8px; background: #fff; color: #81a080; font-size: 11px; font-weight: 600; }
.desktop-steps strong { display: block; color: #536f58; font-size: 13px; font-weight: 550; }
.desktop-steps p { margin-top: 5px; color: #93a38f; font-size: 11px; line-height: 1.9; }
.wecom-entry-guide .info-note { margin-top: 27px; color: #9aa78f; background: #f4f7ef; }
.entry-bottom-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
.entry-feature { display: flex; align-items: center; gap: 16px; padding: 23px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; transition: border-color .15s, background .15s; }
.entry-feature:hover { border-color: #bfd6c5; background: #fcfefb; }
.entry-feature > svg:first-child { width: 23px; height: 23px; color: #8aa68b; }
.entry-feature > svg:last-child { width: 17px; height: 17px; margin-left: auto; color: #a8b9a9; }
.entry-feature strong { display: block; color: #526f59; font-size: 13px; font-weight: 550; }
.entry-feature p { margin-top: 4px; color: #9ba99b; font-size: 11px; }

@media (max-width: 1150px) {
  .wecom-entry { grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr); }
  .wecom-entry-copy { padding: 32px 27px; }
  .wecom-entry-guide { padding: 28px 24px; }
  .wecom-entry h2 { font-size: 22px; }
  .page-heading .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 750px) {
  .wecom-entry { grid-template-columns: 1fr; }
  .wecom-entry-copy { padding: 27px; }
  .wecom-entry-guide { padding: 26px; border-left: 0; border-top: 1px solid #e8eee9; }
  .wecom-entry-copy > .wecom-entry-lead { font-size: 14px; }
  .entry-bottom-grid { grid-template-columns: 1fr; gap: 13px; }
  .entry-feature { padding: 20px; }
  .desktop-mode .main-content { padding: 23px 20px 30px; }
  .desktop-mode .page-heading { flex-direction: column; align-items: flex-start; gap: 17px; }
  .desktop-mode .page-title { font-size: 23px; }
  .page-heading .heading-actions { justify-content: flex-start; }
}
.task-summary > .card { margin: 0; }
.log-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.log-summary section{padding:18px;display:flex;flex-direction:column;gap:8px}.log-summary strong{font-size:29px}.log-toolbar .search-field{width:360px;max-width:100%}.log-toolbar select{width:155px}.log-table{min-width:980px;table-layout:fixed}.log-table th:nth-child(1){width:18%}.log-table th:nth-child(2){width:28%}.log-table th:nth-child(3){width:18%}.log-table th:nth-child(4){width:20%}.log-table th:nth-child(5){width:12%}.log-table th:last-child{width:4%}.log-table td{vertical-align:top;overflow-wrap:anywhere}.log-table .badge{white-space:normal;line-height:1.7}.log-table .task-time{white-space:normal;line-height:1.7}.log-message{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:0 0 6px;line-height:1.8}.log-muted,.log-reason,#log-sync{font-size:11px;color:var(--muted);line-height:1.8}.log-reason{margin:7px 0 0}.log-pagination{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.log-pagination>div{display:flex;gap:10px}.log-detail{font-size:13px;line-height:1.9}.log-detail-heading{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.log-detail-heading>p{width:100%;margin:0;color:var(--muted)}.log-detail section{border-top:1px solid var(--line);padding:16px 0}.log-detail h3{font-size:13px;color:var(--teal);margin:0 0 9px}.log-full-message{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bg);padding:12px;border-radius:8px;max-height:280px;overflow:auto}.log-job+.log-job{margin-top:16px}.log-detail details{overflow-wrap:anywhere}.log-detail summary{cursor:pointer;color:var(--muted)}@media(max-width:1150px){.log-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.log-toolbar{flex-wrap:wrap;gap:12px}}@media(max-width:600px){.log-toolbar select{width:140px}}

.task-bulk{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:16px 22px;border-bottom:1px solid var(--line);font-size:13px}.task-bulk[hidden]{display:none}.task-bulk label{display:flex;gap:8px;align-items:center;cursor:pointer}.task-bulk small{color:var(--muted)}.task-select-column{width:56px;text-align:center!important}.task-bulk input,.task-select-column input{width:16px;height:16px;accent-color:var(--teal)}
