:root {
  color-scheme: light;
  --ink:#1f2924; --muted:#53635b; --light-muted:#617068;
  --line:#e1e6e1; --canvas:#f4f6f3; --white:#fff;
  --dark:#1d2723; --dark-raised:#2d3933;
  --orange:#ff7a31; --brand:#b7460c; --orange-pale:#fff0e5;
  --green:#235d44; --green-pale:#e8f3eb;
  --rail:205px; --inbox:306px; --profile:292px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
*,*::before,*::after {box-sizing:border-box}
body {margin:0;color:var(--ink);background:var(--canvas);font-size:1rem}
button,input,textarea,select {font:inherit;color:inherit}
button {cursor:pointer}
button:disabled {cursor:not-allowed;opacity:.55}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:2px solid #a74715;outline-offset:2px;
}
a {color:var(--green)}
h1,h2,h3,p,dl,dd {margin:0}
[hidden] {display:none!important}
input,textarea,select {
  width:100%;padding:9px 11px;border:1px solid #cbd5cd;border-radius:7px;background:#fff;
}
textarea {resize:vertical;min-height:82px}
.icon {display:inline-block;flex:none;vertical-align:middle;width:19px;height:19px}
.sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.loading {display:grid;place-items:center;min-height:100dvh;color:var(--muted)}
.shell {display:grid;grid-template-columns:var(--rail) minmax(0,1fr);min-height:100dvh}
.rail {background:var(--dark);color:#e4ebe5;display:flex;flex-direction:column;padding:23px 13px 16px;min-height:100dvh}
.brand {display:flex;align-items:center;gap:11px;padding:0 8px 23px}
.brand img {width:42px;height:42px;border-radius:10px;border:1px solid #526158}
.brand strong {display:block;color:#fff;font-size:19px;letter-spacing:-.035em}
.brand span {font-size:13px;color:#aebdb3}
.rail-nav {display:grid;gap:5px}
.rail-nav button {border:0;border-radius:7px;background:none;color:inherit;display:flex;align-items:center;gap:10px;min-height:43px;padding:8px 10px;text-align:left;font-size:14px}
.rail-nav button[aria-current],.rail-nav button:hover {background:var(--dark-raised);color:#fff}
.rail-nav button[aria-current] .icon {color:#ff9a64}
.rail-nav button:focus-visible {outline-color:#ffab79}
.rail-nav .nav-number {margin-inline-start:auto;color:#fff;background:#995121;padding:2px 6px;border-radius:5px;font-size:12px}
.rail-divider {height:1px;background:#3d4b43;margin:14px 6px}
.rail-bottom {margin-top:auto;padding:16px 8px 0;font-size:13px;color:#bac8bf}
.rail-bottom strong {display:block;color:#fff;margin-bottom:5px}
.rail-bottom p {line-height:1.5}
.work {display:flex;flex-direction:column;min-width:0;max-height:100dvh;overflow:auto}
.topbar {min-height:75px;background:#fff;border-bottom:1px solid var(--line);padding:14px 25px;display:flex;align-items:center;justify-content:space-between;gap:13px;flex:none}
.topbar h1 {font-size:23px;letter-spacing:-.035em}
.topbar p {margin-top:4px;color:var(--muted);font-size:13px}
.top-actions,.cluster {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.badge {display:inline-flex;align-items:center;gap:5px;width:max-content;max-width:100%;padding:4px 7px;border-radius:5px;background:var(--canvas);color:var(--muted);font-size:12px;font-weight:600}
.badge.demo {background:var(--orange-pale);color:#844017}
.badge.green {background:var(--green-pale);color:var(--green)}
.button {display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;min-height:38px;border:1px solid #ccd6ce;border-radius:6px;background:white;font-size:14px;font-weight:650;text-decoration:none}
.button:hover {background:#eef2ee;border-color:#a9b9af}
.button.primary {background:var(--orange);border-color:var(--orange);color:#261609}
.button.primary:hover {background:#ff9358}
.button.small {min-height:33px;padding:5px 8px;font-size:13px}
.icon-button {width:37px;min-height:37px;display:grid;place-items:center;background:white;border:1px solid var(--line);border-radius:7px}
.icon-button:hover {background:var(--canvas)}
.inbox-grid {display:grid;grid-template-columns:var(--inbox) minmax(0,1fr) var(--profile);flex:1;min-height:0}
.inbox,.profile,.chat {min-width:0;min-height:0}
.inbox {display:flex;flex-direction:column;background:#fff;border-inline-end:1px solid var(--line)}
.inbox-filters {padding:15px 13px 10px}
.search-field {display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;background:var(--canvas);color:var(--muted);border-radius:7px;padding:0 9px;border:1px solid var(--line)}
.search-field input {min-width:0;border:0;background:transparent;padding:10px 5px;font-size:14px}
.search-field:focus-within {outline:2px solid #a74715;outline-offset:1px}
.search-field input:focus {outline:0}
.channel-line {display:flex;align-items:center;gap:8px;margin:11px 0 8px}
.channel-line select {min-width:0;font-size:14px}
.thread-tabs {display:flex;gap:5px}
.thread-tabs button {padding:7px 9px;border:0;border-radius:5px;background:transparent;font-size:14px;color:var(--muted);white-space:nowrap}
.thread-tabs button[aria-pressed=true] {background:#eaf0eb;color:var(--ink);font-weight:700}
.thread-list {overflow:auto;overscroll-behavior:contain;padding-block:3px 14px}
.thread-card {position:relative;width:100%;border:0;border-bottom:1px solid #edf0ed;background:#fff;display:grid;grid-template-columns:38px minmax(0,1fr);gap:9px;padding:13px 12px;text-align:start}
.thread-card:hover {background:#f5f8f4}
.thread-card[aria-current] {background:#fff5ec;box-shadow:inset 3px 0 #ed6e27}
.avatar {display:inline-grid;place-items:center;width:38px;height:38px;border-radius:12px;flex:none;background:#e5efe7;color:#295d46;font-weight:750;font-size:13px}
.avatar[data-color='1'] {background:#e6edf9;color:#344c79}
.avatar[data-color='2'] {background:#f4e9f4;color:#693f65}
.avatar[data-color='3'] {background:#f6eadb;color:#734b28}
.avatar.large {width:43px;height:43px;font-size:15px}
.thread-title,.thread-meta,.chat-title {display:flex;align-items:center;gap:6px;min-width:0}
.thread-title {justify-content:space-between;font-size:14px}
.thread-title time {font-size:12px;color:var(--muted);white-space:nowrap}
.ellipsis {white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}
.thread-preview {margin:5px 0;color:#43534a;font-size:13px;line-height:1.35}
.thread-meta {font-size:12px;color:var(--muted)}
.thread-meta .badge {margin-inline-start:auto}
.unread {background:#286245;color:#fff;border-radius:999px;min-width:19px;padding:2px 4px;text-align:center;font-size:11px;font-weight:700}
.chat {display:flex;flex-direction:column;background:#f2f5f1}
.chat-head {background:#fff;border-bottom:1px solid var(--line);padding:12px 17px;display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:68px}
.chat-head h2 {font-size:17px}
.chat-head p {color:var(--muted);font-size:13px;margin-top:3px}
.chat-head .channel {flex:none;max-width:45%}
.chat-log {flex:1;min-height:120px;overflow:auto;padding:18px clamp(12px,2vw,26px);overscroll-behavior:contain}
.day-divider {padding:4px 9px;background:#e3e9e3;color:#435149;font-size:12px;border-radius:7px;width:max-content;margin:3px auto 17px}
.msg {margin:0 0 13px;max-width:min(84%,570px);padding:10px 12px 7px;border:1px solid #dde5de;border-radius:3px 11px 11px 11px;background:#fff;width:fit-content}
.msg.out {margin-left:auto;background:#e5f2e7;border-color:#cee1d1;border-radius:11px 3px 11px 11px}
.msg p {font-size:14px;line-height:1.55;overflow-wrap:anywhere;white-space:pre-wrap}
.msg time {text-align:right;display:block;font-size:11px;color:var(--muted);margin-top:4px}
.composer {padding:10px 14px 13px;background:#fff;border-top:1px solid var(--line)}
.composer textarea {margin:8px 0 0;background:#f8faf7;min-height:72px;padding:9px 10px;font-size:14px}
.compose-actions {display:flex;justify-content:space-between;align-items:center;gap:9px;margin-top:4px}
.compose-hint {font-size:12px;color:var(--muted)}
.snippets {border:1px solid #d4ddd4;border-radius:7px;padding:8px;margin-top:7px;display:grid;gap:5px;max-height:150px;overflow:auto}
.snippets button {text-align:left;padding:8px;border:0;border-radius:4px;background:var(--canvas);font-size:14px}
.profile {background:#fff;border-inline-start:1px solid var(--line);overflow:auto;overscroll-behavior:contain}
.profile-head {padding:16px 15px 12px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.profile h2 {font-size:16px}
.profile-block {padding:12px 15px;border-top:1px solid var(--line)}
.profile-title {display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:8px}
.profile-title h3 {font-size:14px}
.profile-dl {display:grid;gap:8px;font-size:13px}
.profile-dl div {display:grid;grid-template-columns:60px minmax(0,1fr);gap:7px}
.profile-dl dt {color:var(--muted)}
.profile-dl dd {overflow-wrap:anywhere}
.profile-block .cluster {margin-top:10px}
.timeline {display:grid;gap:8px}
.timeline article {padding:8px 9px;background:var(--canvas);border-radius:5px}
.timeline time {color:var(--muted);font-size:12px}
.timeline p {margin-top:3px;line-height:1.45;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
.empty {padding:26px 15px;text-align:center;color:var(--muted);font-size:14px;line-height:1.5}
.chat .empty {margin:auto}
.mobile-only {display:none}
.page-content {padding:23px 26px;display:grid;gap:20px}
.panel {background:#fff;border:1px solid var(--line);border-radius:9px;min-width:0}
.panel-head {padding:13px 15px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}
.panel-head h2 {font-size:17px}
.summary-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stat {padding:15px;background:#fff;border-radius:7px;border:1px solid var(--line)}
.stat span {display:block;font-size:14px;color:var(--muted);margin-bottom:8px}
.stat strong {font-size:27px}
.table-wrap {overflow:auto}
table {border-collapse:collapse;width:100%;font-size:14px;text-align:start}
th,td {padding:12px 14px;border-bottom:1px solid #ebefeb;text-align:start;white-space:nowrap}
th {color:var(--muted);background:#f8faf8;font-weight:650}
tr:last-child td {border-bottom:0}
.table-link {padding:0;background:none;border:0;color:var(--green);text-decoration:underline;text-underline-offset:3px;font-weight:650}
.pipeline {display:grid;grid-template-columns:repeat(5,minmax(158px,1fr));overflow:auto;gap:11px}
.pipeline-lane {background:#e9eee8;border-radius:8px;padding:10px;min-height:155px}
.pipeline-lane h2 {font-size:14px;margin:3px 0 9px}
.pipeline-card {width:100%;text-align:left;background:#fff;border:1px solid var(--line);border-radius:7px;padding:9px;margin-bottom:7px;line-height:1.4;font-size:14px}
.pipeline-card small {color:var(--muted);display:block;margin-top:4px}
.cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:13px}
.content-card {padding:15px;background:#fff;border:1px solid var(--line);border-radius:7px}
.content-card h2 {font-size:16px;margin-bottom:8px}
.content-card p {font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;margin-bottom:10px}
.account-card .cluster {margin:9px 0}
.settings-note {font-size:14px;color:var(--muted);line-height:1.6}
dialog {width:min(540px,calc(100vw - 28px));border:1px solid var(--line);border-radius:12px;padding:0;color:var(--ink);box-shadow:0 20px 65px #13291f47}
dialog::backdrop {background:#1e29236e}
.dialog-header,.dialog-actions {padding:14px 17px;display:flex;justify-content:space-between;align-items:center;gap:9px}
.dialog-header {border-bottom:1px solid var(--line)}
.dialog-header h2 {font-size:19px}
.dialog-actions {border-top:1px solid var(--line);justify-content:flex-end}
.dialog-fields {display:grid;gap:12px;padding:16px 17px;max-height:65dvh;overflow:auto}
.dialog-fields label,.login label {display:grid;gap:5px;font-size:14px;font-weight:650}
.dialog-fields .pair {display:grid;grid-template-columns:1fr 1fr;gap:10px}
.form-error {color:#9a3619;font-size:14px;line-height:1.45}
#notice:empty {display:none}
#notice {position:fixed;z-index:9;inset:auto 16px 15px auto;background:#24362c;color:#fff;max-width:min(340px,calc(100vw - 32px));font-size:14px;padding:11px 15px;border-radius:7px;box-shadow:0 5px 16px #13291f35}
.login {margin:12vh auto;width:min(420px,calc(100% - 28px));padding:25px;background:#fff;border:1px solid var(--line);border-radius:12px;display:grid;gap:15px}
.login img {width:50px;border-radius:9px}
@media(max-width:1275px) { :root{--rail:178px;--inbox:270px;--profile:260px} }
@media(max-width:1050px) {
  :root {--rail:61px;--inbox:246px;--profile:242px}
  .rail{padding-inline:8px}
  .brand{padding:0 0 21px;justify-content:center}
  .brand div,.rail-bottom,.rail-nav .nav-label,.rail-nav .nav-number {display:none}
  .rail-nav button {justify-content:center;padding:8px}
}
@media(max-width:870px) {
  .inbox-grid {grid-template-columns:var(--inbox) minmax(0,1fr)}
  .profile {display:none}
  .profile.mobile-open {display:block;position:fixed;z-index:4;inset:75px 0 0 auto;width:min(330px,calc(100% - 61px));box-shadow:-9px 5px 28px #18251e38}
  .mobile-only.profile-toggle {display:grid}
  .topbar {padding:12px 14px}
}
@media(max-width:630px) {
  .shell {display:flex;flex-direction:column}
  .rail {min-height:auto;padding:6px 8px;flex-direction:row;align-items:center;position:sticky;top:0;z-index:3;gap:5px}
  .brand {flex:none;padding:0;margin-right:4px}
  .brand img {width:33px;height:33px}
  .rail-nav {display:flex;justify-content:space-between;gap:0;flex:1}
  .rail-nav button {min-width:0;flex:1;padding:4px;min-height:37px}
  .rail-divider {display:none}
  .topbar {min-height:62px;padding:9px 10px}
  .topbar h1 {font-size:18px}
  .topbar p {display:none}
  .topbar .button {padding:6px 7px;font-size:13px}
  .work {max-height:calc(100dvh - 49px);min-height:calc(100dvh - 49px)}
  .inbox-grid {display:block;overflow:hidden}
  .inbox,.chat {height:100%}
  .inbox-grid.has-chat .inbox {display:none}
  .inbox-grid:not(.has-chat) .chat {display:none}
  .mobile-only.back {display:grid}
  .chat-head{padding:8px 9px}
  .chat-head .channel {display:none}
  .chat-title .avatar {display:none}
  .profile.mobile-open {inset:49px 0 0 auto;width:min(340px,100%)}
  .page-content {padding:14px 10px}
  .summary-grid {gap:7px}
  .stat {padding:10px 6px}
  .stat span {font-size:13px}
}
