:root {
  --ink: #202123;
  --muted: #6f7478;
  --line: #e4e4e1;
  --soft: #f7f7f5;
  --paper: #ffffff;
  --sidebar: #202221;
  --sidebar-hover: #2c2f2d;
  --sidebar-active: #292b29;
  --accent: #137b68;
  --accent-soft: #e6f4f0;
  --warning: #b7791f;
  --red: #b74646;
  --radius: 8px;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; min-width: 320px; overflow: hidden; background: var(--paper); }
button, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { height: 100vh; display: grid; grid-template-columns: 58px 252px minmax(0, 1fr); background: var(--paper); }
.app-shell.market-view, .app-shell.enterprise-view { grid-template-columns: 58px minmax(0, 1fr); }
.app-shell.market-view .sidebar, .app-shell.enterprise-view .sidebar { display: none; }
.app-shell.market-view .chat-header-actions, .app-shell.enterprise-view .chat-header-actions { display: none; }
.app-shell.no-agent-view .chat-header-actions { display: none; }
.app-rail { height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 8px; border-right: 1px solid #363937; background: #272a28; padding: 12px 0; color: #b7bcb8; }
.rail-brand { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 10px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; }
.rail-item { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 7px; background: transparent; color: inherit; font-size: 16px; text-decoration: none; }
.rail-item:hover, .rail-item.active { background: #3a3e3b; color: #fff; }
.rail-spacer { flex: 1 1 auto; }
.rail-account-menu { position: relative; margin-top: 2px; }
.rail-account-menu summary { list-style: none; }
.rail-account-menu summary::-webkit-details-marker { display: none; }
.rail-account-trigger { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; cursor: pointer; }
.rail-account-trigger:hover, .rail-account-menu[open] .rail-account-trigger { background: #3a3e3b; }
.rail-account-trigger .avatar { width: 26px; height: 26px; font-size: 9px; }
.rail-account-popover { position: absolute; z-index: 40; bottom: 0; left: calc(100% + 8px); width: 208px; border: 1px solid #d9dcda; border-radius: 7px; background: #fff; box-shadow: 0 10px 30px rgba(27, 30, 28, .16); padding: 12px; color: #30332f; }
.rail-account-popover strong, .rail-account-popover small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-account-popover strong { font-size: 12px; }
.rail-account-popover small { margin-top: 3px; color: #7e8580; font-size: 10px; }
.rail-account-popover .connection { margin: 10px 0 8px; padding: 8px 0; border-top: 1px solid #ececea; border-bottom: 1px solid #ececea; color: #69706b; font-size: 10px; }
.rail-account-popover .logout-button { width: 100%; margin: 0; color: #7d3732; text-align: left; font-size: 11px; }
.rail-account-popover .logout-button:hover { background: #fbeceb; color: #8d3029; }
.external-bindings-button { width: 100%; margin: 0 0 4px; border: 0; background: transparent; color: #3f6b5d; text-align: left; font: inherit; font-size: 11px; cursor: pointer; padding: 6px 4px; }
.external-bindings-button:hover { background: #eff6f2; }
.external-bindings-dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid #d9dcda; border-radius: 8px; padding: 0; box-shadow: 0 18px 46px rgba(27, 30, 28, .2); }
.external-bindings-dialog::backdrop { background: rgba(18, 25, 22, .34); }
.external-bindings-dialog section { padding: 20px; color: #30332f; }
.external-bindings-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.external-bindings-dialog header strong { font-size: 16px; }.external-bindings-dialog header p { margin: 5px 0 0; color: #69706b; font-size: 12px; line-height: 1.6; }.external-bindings-dialog header button { border: 0; background: transparent; font-size: 22px; color: #69706b; cursor: pointer; }
.external-binding-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid #ececea; }.external-binding-row strong,.external-binding-row small { display:block; }.external-binding-row small { margin-top:4px; color:#69706b; font-size:11px; }.external-binding-row button { border:1px solid #c8d8d0; border-radius:5px; background:#fff; color:#245846; padding:6px 9px; font-size:12px; cursor:pointer; }

.sidebar { min-width: 0; height: 100vh; overflow: hidden; background: var(--sidebar); color: #e9ebe9; display: flex; flex-direction: column; padding: 12px; z-index: 30; }
.sidebar-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 2px 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; }
.brand-mark, .welcome-mark { display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; border-radius: 6px; }
.brand-mark { width: 28px; height: 28px; }
.square-button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: inherit; font-size: 18px; }
.square-button:hover { background: rgba(127, 127, 127, .14); }
.workspace-agents { flex: 0 0 auto; max-height: 42%; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.workspace-agent-list { display: grid; gap: 2px; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.workspace-agent-list > span { color: #8b908d; font-size: 12px; padding: 9px; }
.workspace-agent-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 48px; border: 0; border-radius: 6px; background: transparent; color: #d4d7d5; padding: 6px 8px; text-align: left; }
.workspace-agent-row:hover { background: var(--sidebar-hover); color: #fff; }
.workspace-agent-row.active { background: var(--sidebar-active); color: #fff; }
.workspace-agent-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #dceee8; color: #176754; font-size: 10px; font-weight: 800; }
.workspace-agent-copy { min-width: 0; }
.workspace-agent-copy strong, .workspace-agent-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-agent-copy strong { font-size: 12px; }
.workspace-agent-copy small { margin-top: 2px; color: #969b98; font-size: 10px; }
.recent-conversations { min-height: 0; overflow: hidden; flex: 1 1 0; display: flex; flex-direction: column; }
.sidebar-section-title { color: #969b98; font-size: 11px; font-weight: 700; margin: 8px 9px; }
.conversation-list { min-height: 0; flex: 1 1 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #c5c7c3 transparent; scrollbar-gutter: stable; }
.conversation-list::-webkit-scrollbar { width: 8px; }
.conversation-list::-webkit-scrollbar-track { background: transparent; }
.conversation-list::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #c5c7c3; background-clip: padding-box; }
.conversation-list::-webkit-scrollbar-thumb:hover { background-color: #aeb1ac; }
.conversation-list > span { color: #8b908d; font-size: 12px; padding: 9px; }
.conversation-link-row { flex: 0 0 34px; min-height: 34px; max-height: 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px; border-radius: 6px; }
.conversation-link-row:hover { background: var(--sidebar-hover); }
.conversation-link-row.active { background: var(--sidebar-active); }
.conversation-link { min-width: 0; width: 100%; min-height: 34px; max-height: 34px; display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 7px; border: 0; background: transparent; color: #d4d7d5; padding: 0 9px; border-radius: 6px; text-align: left; font-size: 12px; }
.conversation-link-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-actions { position: relative; display: inline-flex; align-items: center; padding-right: 3px; }
.conversation-menu-button { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #aeb3b0; opacity: 0; font-size: 15px; line-height: 1; letter-spacing: 0; }
.conversation-link-row:hover .conversation-menu-button, .conversation-link-row.active .conversation-menu-button, .conversation-menu-button:focus-visible, .conversation-menu-button[aria-expanded="true"] { opacity: 1; }
.conversation-menu-button:hover, .conversation-menu-button[aria-expanded="true"] { background: rgba(255, 255, 255, .1); color: #fff; }
.conversation-action-menu { position: absolute; z-index: 30; top: calc(100% + 4px); right: 2px; display: grid; min-width: 112px; padding: 4px; border: 1px solid #cfd1cd; border-radius: 6px; background: #fff; box-shadow: 0 8px 20px rgba(30, 33, 30, .16); }
.conversation-action-menu button { height: 30px; border: 0; border-radius: 4px; background: transparent; color: #343733; padding: 0 9px; text-align: left; font-size: 12px; letter-spacing: 0; }
.conversation-action-menu button:hover, .conversation-action-menu button:focus-visible { background: #efefec; outline: none; }
.conversation-action-menu button.danger { color: #a3443c; }
.conversation-action-menu button.danger:hover, .conversation-action-menu button.danger:focus-visible { background: #fbeceb; }
.conversation-link-row.renaming { grid-template-columns: minmax(0, 1fr); background: var(--sidebar-hover); }
.conversation-rename-form { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 24px 24px; gap: 2px; align-items: center; padding: 3px; }
.conversation-rename-form input { min-width: 0; height: 28px; border: 1px solid #686d69; border-radius: 5px; background: #202321; color: #fff; padding: 0 7px; font-size: 12px; outline: none; }
.conversation-rename-form input:focus { border-color: #d8dbd6; }
.conversation-rename-form button { width: 24px; height: 24px; border: 0; border-radius: 5px; background: transparent; color: #cfd2d0; }
.conversation-rename-form button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.conversation-running-indicator { width: 12px; height: 12px; justify-self: center; border: 1.5px solid #a5a8a3; border-top-color: #343733; border-radius: 50%; animation: conversation-run-spin .8s linear infinite; }
@keyframes conversation-run-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .conversation-running-indicator { animation-duration: 1.8s; } }
.conversation-link-row:hover .conversation-link, .conversation-link-row.active .conversation-link { color: #fff; }
.sidebar-footer { flex: 0 0 auto; border-top: 1px solid #383b39; padding: 10px 4px 4px; display: grid; gap: 10px; background: var(--sidebar); }
.admin-link { min-width: 0; display: flex; align-items: center; gap: 9px; height: 34px; border-radius: 6px; padding: 0 9px; color: #cfd2d0; text-decoration: none; font-size: 12px; }
.admin-link:hover { color: #fff; background: var(--sidebar-hover); }
.admin-link[hidden] { display: none; }
.account-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.logout-button { flex: 0 0 auto; margin-left: auto; border: 0; border-radius: 5px; background: transparent; padding: 5px 7px; color: #aeb3b0; font-size: 10px; }
.logout-button:hover { background: var(--sidebar-hover); color: #fff; }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e5c86f; color: #514319; font-size: 10px; font-weight: 800; }
.account-copy { min-width: 0; font-size: 12px; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: #969b98; margin-top: 2px; }
.connection { color: #aeb3b0; font-size: 11px; padding-left: 4px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #59bd8b; margin-right: 7px; }

.chat-shell { min-width: 0; height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 58px minmax(0, 1fr) auto; position: relative; overflow: hidden; }
.chat-header { border-bottom: 1px solid var(--line); padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(255, 255, 255, .96); z-index: 10; }
.chat-header-leading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-header-leading > div { min-width: 0; }
.chat-header-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.active-agent-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; background: var(--soft); padding: 6px 9px; color: #4c534f; font-size: 11px; }
.chat-header strong, .chat-header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-header strong { font-size: 13px; }
.chat-header small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.mobile-menu { display: none; color: var(--ink); }
.context-actions { display: flex; align-items: center; gap: 2px; }
.context-actions button, .inspector-tabs button, .panel-meta button { border: 0; background: transparent; color: var(--muted); padding: 7px 9px; border-radius: 6px; font-size: 12px; }
.context-actions button:hover, .inspector-tabs button:hover, .inspector-tabs button.active, .panel-meta button:hover { background: var(--soft); color: var(--ink); }

.conversation { min-width: 0; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; padding: 0 max(24px, calc((100% - 820px) / 2)); scrollbar-width: thin; }
.conversation.market-mode { padding-top: 30px; }
.bot-market { width: min(980px, 100%); margin: 0 auto; padding: 0 0 56px; }
.bot-market-header { margin: 0 0 24px; }
.bot-market-header h1 { margin: 0; font-size: 22px; font-weight: 650; }
.bot-market-header p { max-width: 560px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.bot-market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bot-card { display: flex; flex-direction: column; min-height: 204px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 16px; }
.bot-card header { display: flex; align-items: center; gap: 10px; }
.bot-card-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; }
.bot-card strong { font-size: 14px; }
.bot-card p { flex: 1 1 auto; margin: 15px 0; color: #5f6662; font-size: 12px; line-height: 1.7; }
.bot-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bot-card-actions { display: inline-flex; align-items: center; gap: 6px; }
.bot-card-state { color: var(--muted); font-size: 10px; }
.bot-card button { height: 30px; border: 1px solid #cbd8d3; border-radius: 6px; background: #fff; color: #296454; padding: 0 10px; font-size: 11px; }
.bot-card button:hover { background: var(--accent-soft); border-color: #9acdbf; }
.enterprise-workspace { width: min(1080px, 100%); margin: 0 auto; padding: 0 0 64px; }
.enterprise-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.enterprise-edit-workspace { width: min(780px, 100%); }
.enterprise-edit-header { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.enterprise-edit-content { max-width: 780px; }
.enterprise-kicker { margin: 0 0 5px; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.enterprise-header h1 { margin: 0; font-size: 24px; font-weight: 650; }
.enterprise-header p:not(.enterprise-kicker) { max-width: 620px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.enterprise-header-actions, .enterprise-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.enterprise-primary, .enterprise-secondary, .enterprise-text-button { min-height: 32px; border-radius: 6px; padding: 0 11px; font-size: 12px; }
.enterprise-primary { border: 1px solid #2b302d; background: #2b302d; color: #fff; }
.enterprise-primary:hover { background: #414742; }
.enterprise-primary:disabled { cursor: default; opacity: .45; }
.enterprise-secondary { border: 1px solid #d2d6d3; background: #fff; color: #3f4742; }
.enterprise-secondary:hover { background: var(--soft); border-color: #b9c2bc; }
.enterprise-text-button { border: 0; background: transparent; color: #5c6861; }
.enterprise-text-button:hover { background: var(--soft); color: var(--ink); }
.enterprise-summary { display: flex; gap: 28px; margin: 0 0 28px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fafaf8; color: #606762; font-size: 12px; }
.enterprise-summary strong { margin-right: 4px; color: #252a26; font-size: 18px; }
.enterprise-section { margin-top: 30px; }
.enterprise-section > header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 13px; }
.enterprise-section h2 { margin: 0; font-size: 15px; font-weight: 650; }
.enterprise-section p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.enterprise-employee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 12px; }
.enterprise-employee-card { display: flex; flex-direction: column; min-height: 205px; border: 1px solid var(--line); border-radius: 8px; padding: 15px; background: #fff; }
.enterprise-employee-card[data-enterprise-employee-card] { cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.enterprise-employee-card[data-enterprise-employee-card]:hover { border-color: #a8c9bd; box-shadow: 0 4px 14px rgba(25, 68, 53, .07); transform: translateY(-1px); }
.enterprise-employee-card[data-enterprise-employee-card]:focus-visible { outline: 2px solid #80b4a2; outline-offset: 2px; }
.enterprise-employee-card header { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.enterprise-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 800; }
.enterprise-employee-card strong, .enterprise-employee-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enterprise-employee-card strong { font-size: 13px; }
.enterprise-employee-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.enterprise-status { border-radius: 999px; background: #f1f1ef; padding: 3px 6px; color: #7b817c; font-size: 10px; white-space: nowrap; }
.enterprise-status.active { background: #e6f4f0; color: #24715e; }
.enterprise-employee-card > p { flex: 1 1 auto; margin: 13px 0; color: #59615c; font-size: 12px; line-height: 1.65; }
.enterprise-card-meta { display: flex; justify-content: space-between; gap: 8px; color: #858b87; font-size: 10px; }
.enterprise-employee-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; }
.enterprise-employee-card footer > span { color: #77817b; font-size: 10px; }
.enterprise-employee-detail { display: grid; gap: 20px; }
.enterprise-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.enterprise-detail-person { display: flex; align-items: center; min-width: 0; gap: 12px; }
.enterprise-detail-person .enterprise-avatar { flex: 0 0 auto; width: 46px; height: 46px; font-size: 11px; }
.enterprise-detail-person h2 { margin: 0; font-size: 18px; font-weight: 650; }
.enterprise-detail-person p:not(.enterprise-kicker), .enterprise-detail-description { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.enterprise-detail-description { max-width: 760px; }
.enterprise-summary.employee-summary { margin: 0; }
.enterprise-task-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.enterprise-task-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .45fr) auto; gap: 15px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #eeeeeb; }
.enterprise-task-row:last-child { border-bottom: 0; }
.enterprise-task-main strong, .enterprise-task-main small, .enterprise-task-time span, .enterprise-task-time small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enterprise-task-main strong { font-size: 12px; }
.enterprise-task-main small, .enterprise-task-time { margin-top: 3px; color: var(--muted); font-size: 10px; }
.enterprise-task-time { margin: 0; }
.enterprise-task-time span { color: #59625c; }
.enterprise-task-time small { margin-top: 3px; }
.enterprise-task-actions { display: inline-flex; gap: 5px; }
.enterprise-task-actions button { height: 28px; border: 1px solid #d8ddda; border-radius: 5px; background: #fff; color: #466258; padding: 0 8px; font-size: 11px; }
.enterprise-task-actions button:hover { background: var(--accent-soft); border-color: #bad6cd; }
.enterprise-run-list { display: grid; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.enterprise-run-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 11px 14px; border-bottom: 1px solid #eeeeeb; }
.enterprise-run-row:last-child { border-bottom: 0; }
.enterprise-run-state { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #aeb4b0; }
.enterprise-run-state.completed { background: #48a87f; }
.enterprise-run-state.failed { background: #c96b62; }
.enterprise-run-state.running, .enterprise-run-state.queued { background: #d99a3e; }
.enterprise-run-main { min-width: 0; }
.enterprise-run-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.enterprise-run-row strong { font-size: 12px; }
.enterprise-run-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enterprise-run-status { flex: 0 0 auto; border-radius: 999px; background: #f0f1ef; padding: 2px 6px; color: #737a75; font-size: 9px; line-height: 1.35; }
.enterprise-run-status.queued, .enterprise-run-status.running { background: #fff4df; color: #9a6b20; }
.enterprise-run-status.completed { background: #e6f4f0; color: #24715e; }
.enterprise-run-status.failed, .enterprise-run-status.stopped { background: #f9eae8; color: #a6544d; }
.enterprise-run-row p { max-width: 660px; margin: 3px 0 0; color: #606762; font-size: 11px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enterprise-run-meta { display: block; margin-top: 4px; color: #858c87; font-size: 10px; line-height: 1.5; }
.enterprise-run-progress { margin-top: 8px; border-top: 1px solid #edf0ed; padding-top: 7px; }
.enterprise-run-progress summary { cursor: pointer; list-style: none; color: #4c655a; font-size: 10px; }
.enterprise-run-progress summary::-webkit-details-marker { display: none; }
.enterprise-run-progress summary::before { content: "›"; display: inline-block; margin-right: 5px; color: #8a948e; font-size: 15px; line-height: .65; transition: transform .15s ease; vertical-align: -1px; }
.enterprise-run-progress[open] summary::before { transform: rotate(90deg); }
.enterprise-run-progress ol { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.enterprise-run-progress li { display: flex; justify-content: space-between; gap: 12px; color: #68716c; font-size: 10px; line-height: 1.5; }
.enterprise-run-progress li::before { content: ""; width: 5px; height: 5px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: #80ad9d; }
.enterprise-run-progress li span { flex: 1 1 auto; }
.enterprise-run-progress li time { flex: 0 0 auto; color: #9aa19d; font-size: 9px; }
.enterprise-run-actions { display: grid; justify-items: end; gap: 5px; }
.enterprise-run-actions button { height: 25px; border: 1px solid #d8ddda; border-radius: 5px; background: #fff; color: #466258; padding: 0 7px; font-size: 10px; }
.enterprise-run-actions button:hover { background: var(--accent-soft); border-color: #bad6cd; }
.enterprise-run-row time { color: #8a908c; font-size: 10px; white-space: nowrap; }
.enterprise-placeholder { margin: 0; padding: 20px; color: var(--muted); font-size: 12px; }
.enterprise-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 238px; border: 1px dashed #ccd2ce; border-radius: 8px; padding: 30px; text-align: center; }
.enterprise-empty > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 800; }
.enterprise-empty h2 { margin: 12px 0 0; font-size: 16px; }
.enterprise-empty p { max-width: 430px; margin: 7px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.enterprise-editor { margin: 0; border: 1px solid #d8dfdb; border-radius: 8px; background: #fff; padding: 20px; box-shadow: 0 4px 18px rgba(32, 45, 38, .035); }
.enterprise-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.enterprise-editor strong { font-size: 14px; }
.enterprise-editor p { max-width: 660px; margin: 5px 0 0; color: #637068; font-size: 11px; line-height: 1.6; }
.enterprise-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.enterprise-form-grid label { display: grid; gap: 5px; color: #4d5650; font-size: 11px; }
.enterprise-form-grid label.wide { grid-column: 1 / -1; }
.enterprise-form-grid input, .enterprise-form-grid select, .enterprise-form-grid textarea { width: 100%; min-width: 0; border: 1px solid #d3dad6; border-radius: 6px; background: #fff; padding: 8px 9px; color: var(--ink); font: inherit; font-size: 12px; outline: none; }
.enterprise-form-grid textarea { resize: vertical; line-height: 1.55; }
.enterprise-form-grid input:focus, .enterprise-form-grid select:focus, .enterprise-form-grid textarea:focus { border-color: #8fb9aa; box-shadow: 0 0 0 2px rgba(90, 154, 132, .12); }
.enterprise-form-grid small { color: #7d8781; font-size: 10px; line-height: 1.45; }
.enterprise-form-grid .enterprise-switch { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; }
.enterprise-switch input { width: auto; }
.enterprise-form-actions { grid-column: 1 / -1; padding-top: 3px; }
.enterprise-notice { margin: 0 0 14px; border-left: 3px solid var(--accent); background: #f3faf7; padding: 8px 10px; color: #3f6255; font-size: 12px; }
.welcome { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 0 120px; text-align: center; }
.welcome.hidden { display: none; }
.welcome-mark { width: 42px; height: 42px; margin-bottom: 18px; font-size: 12px; }
.welcome h1 { font-size: 25px; font-weight: 600; letter-spacing: 0; margin: 0 0 24px; }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(560px, 100%); }
.suggestions button { min-height: 44px; border: 1px solid var(--line); background: var(--paper); color: #424644; text-align: left; border-radius: var(--radius); padding: 10px 12px; font-size: 12px; }
.suggestions button:hover { background: var(--soft); border-color: #c8ccc9; }
.empty-agent-workspace { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(520px, 100%); margin: 0 auto; padding: 40px 0 120px; text-align: center; }
.empty-agent-workspace .welcome-mark { width: 42px; height: 42px; margin-bottom: 18px; }
.empty-agent-workspace h1 { margin: 0; color: var(--ink); font-size: 22px; font-weight: 600; }
.empty-agent-workspace p { max-width: 420px; margin: 10px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-agent-workspace button { min-height: 32px; border: 1px solid #292b28; border-radius: 6px; background: #292b28; padding: 0 12px; color: #fff; font-size: 12px; }
.empty-agent-workspace button:hover { background: #3b3e3a; }
.new-analysis:disabled { cursor: default; opacity: .35; }

.message { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 22px 0; font-size: 14px; line-height: 1.7; }
.message.user { display: flex; justify-content: flex-end; padding-top: 14px; padding-bottom: 14px; }
.message-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--accent); color: white; font-size: 9px; font-weight: 800; margin-top: 2px; }
.message-body { min-width: 0; }
.message-content { overflow-wrap: anywhere; }
.message-content p, .stream-answer p { margin: 0 0 12px; }
.message-content p:last-child, .stream-answer p:last-child { margin-bottom: 0; }
.message.user .message-content { max-width: min(640px, 82%); background: var(--soft); border: 1px solid #efefec; border-radius: var(--radius); padding: 10px 14px; }
.message.user .message-content { white-space: pre-wrap; }
.message-actions { display: flex; align-items: center; gap: 7px; margin-top: 10px; }
.message-actions button, .message-actions a { border: 0; background: transparent; color: var(--muted); border-radius: 5px; padding: 4px 6px; font-size: 11px; font-family: inherit; text-decoration: none; }
.message-actions button:hover, .message-actions a:hover { color: var(--ink); background: var(--soft); }

.stream-answer { overflow-wrap: anywhere; }
.message.assistant h1, .message.assistant h2, .message.assistant h3, .message.assistant h4, .message.assistant h5, .message.assistant h6 { margin: 18px 0 8px; font-size: 15px; line-height: 1.45; }
.message.assistant h1:first-child, .message.assistant h2:first-child, .message.assistant h3:first-child { margin-top: 0; }
.message.assistant ul, .message.assistant ol { margin: 8px 0 14px; padding-left: 22px; }
.message.assistant li { margin: 4px 0; padding-left: 2px; }
.message.assistant blockquote { margin: 12px 0; padding: 2px 0 2px 12px; border-left: 3px solid #cbd1cd; color: #595f5b; }
.message.assistant hr { height: 1px; margin: 18px 0; border: 0; background: var(--line); }
.message.assistant code { border-radius: 4px; background: #f0f1ef; padding: 2px 5px; color: #2f5d55; font: 12px/1.5 Consolas, "SFMono-Regular", monospace; }
.message.assistant pre { overflow-x: auto; margin: 12px 0; border: 1px solid #303431; border-radius: 7px; background: #202321; padding: 13px 14px; color: #e9ecea; }
.message.assistant pre code { border-radius: 0; background: transparent; padding: 0; color: inherit; white-space: pre; }
.markdown-table { max-width: 100%; overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 7px; }
.markdown-table table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.5; }
.markdown-table th, .markdown-table td { min-width: 100px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.markdown-table th { background: var(--soft); font-weight: 700; }
.markdown-table th:last-child, .markdown-table td:last-child { border-right: 0; }
.markdown-table tbody tr:last-child td { border-bottom: 0; }
.analysis-artifacts { display: grid; gap: 14px; margin-top: 18px; }
.analysis-chart-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 4px 18px rgba(32,45,38,.04); }
.analysis-chart-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0ed; padding: 14px 16px 11px; }
.analysis-chart-card > header strong { display: block; color: var(--ink); font-size: 13px; }
.analysis-chart-card > header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.analysis-chart-card > header > span { flex: 0 0 auto; border-radius: 12px; background: var(--accent-soft); padding: 3px 8px; color: var(--accent); font-size: 9px; font-weight: 700; }
.chart-canvas { width: 100%; min-height: 260px; overflow-x: auto; padding: 8px 10px 0; }
.chart-canvas svg { display: block; width: 100%; min-width: 560px; height: auto; }
.chart-empty { display: grid; min-height: 250px; place-items: center; color: var(--muted); font-size: 11px; }
.chart-data { border-top: 1px solid #edf0ed; }
.chart-data summary { cursor: pointer; list-style: none; padding: 9px 16px; color: var(--muted); font-size: 10px; }
.chart-data summary::-webkit-details-marker { display: none; }
.chart-data summary::before { content: "›"; display: inline-block; margin-right: 6px; font-size: 15px; line-height: 1; transition: transform .16s ease; vertical-align: -1px; }
.chart-data[open] summary::before { transform: rotate(90deg); }
.chart-data .markdown-table { margin: 0 14px 14px; }
.analysis-chart-card > footer { border-top: 1px solid #edf0ed; padding: 8px 16px; color: #929a95; font-size: 9px; }
.stream-answer:empty::after { content: ""; display: inline-block; width: 7px; height: 15px; background: #7f8581; animation: blink 1s steps(1) infinite; vertical-align: -2px; }
.message.streaming .stream-answer:not(:empty)::after { content: ""; display: inline-block; width: 6px; height: 14px; margin-left: 2px; background: #7f8581; animation: blink 1s steps(1) infinite; vertical-align: -2px; }
@keyframes blink { 50% { opacity: 0; } }

.live-reasoning { margin: 2px 0 14px; border: 1px solid #e3e6e4; border-radius: 10px; background: #fbfcfb; color: var(--muted); overflow: hidden; }
.live-reasoning summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; width: fit-content; font-size: 12px; font-weight: 600; color: #565c59; }
.live-reasoning > summary { width: 100%; min-height: 42px; padding: 0 13px; }
.live-reasoning summary::-webkit-details-marker { display: none; }
.live-reasoning summary::before { content: "›"; font-size: 17px; line-height: 1; transform: rotate(0deg); transition: transform .16s ease; }
.live-reasoning[open] summary::before { transform: rotate(90deg); }
.live-stage { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); font-weight: 500; }
.run-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; border-top: 1px solid #edf0ee; padding: 9px 13px; color: #7a807c; font-size: 10px; }
.run-summary span { white-space: nowrap; }
.run-summary .run-tokens { color: #59627a; font-variant-numeric: tabular-nums; }
.live-events { list-style: none; display: grid; gap: 7px; margin: 0; padding: 0 13px 13px; max-height: 260px; overflow-y: auto; }
.live-event { color: var(--muted); font-size: 11px; line-height: 1.5; }
.live-event.status { display: none; }
.live-event.model { color: #5a6380; }
.live-event.plan { border-radius: 6px; background: #f2f6f4; padding: 8px 10px; color: #355b52; }
.live-event.plan.revised { background: #f7f3e9; color: #79632f; }
.live-event.plan strong, .live-event.plan p, .live-event.plan small { display: block; }
.live-event.plan p { margin-top: 3px; }
.live-event.plan small { margin-top: 3px; color: var(--muted); }
.live-event.stage { color: #7a807c; font-size: 10px; }
.live-event.assessment, .live-event.supervisor { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; border-radius: 6px; padding: 7px 9px; }
.live-event.assessment { background: #edf7f2; color: var(--accent); }
.live-event.assessment.pending { background: #f8f3e8; color: var(--warning); }
.live-event.supervisor.warning { background: #f8f3e8; color: #7b612a; }
.live-event.supervisor.block { background: #faeeee; color: var(--red); }
.live-event.assessment p, .live-event.supervisor p { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.live-event.tool, .live-event.recovery { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; border: 1px solid #e8ece9; border-radius: 7px; background: #fff; padding: 7px 9px; }
.live-event.tool span { color: var(--muted); }
.live-event.tool.running span { color: var(--warning); }
.live-event.tool.completed span { color: var(--accent); }
.live-event.tool.failed span, .live-event.stopped { color: var(--red); }
.live-event.recovery { border-color: #e9dfc6; background: #fffcf5; color: #77602f; }
.live-event.recovery span { color: #9a7628; }
.live-event.recovery.data_unavailable, .live-event.recovery.access_limited { border-color: #e5e7ea; background: #fafbfc; color: #59636c; }
.live-event.recovery.data_unavailable span, .live-event.recovery.access_limited span { color: #68747f; }
.live-event p, .live-event small { grid-column: 1 / -1; margin: 0; }

.composer-area { padding: 12px max(20px, calc((100% - 820px) / 2)) 16px; background: var(--paper); border-top: 1px solid rgba(228, 228, 225, .6); }
.composer { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) 38px; grid-template-areas: "input send" "settings settings"; gap: 5px 8px; align-items: end; border: 1px solid #cfd4d1; border-radius: var(--radius); padding: 8px 8px 7px 14px; background: var(--paper); box-shadow: 0 8px 24px rgba(32, 33, 35, .08); }
.composer:focus-within { border-color: #9ca4a0; box-shadow: 0 8px 28px rgba(32, 33, 35, .11); }
.composer textarea { grid-area: input; min-height: 36px; max-height: 160px; resize: none; border: 0; outline: none; padding: 8px 0 5px; line-height: 1.45; color: var(--ink); background: transparent; overflow-y: auto; }
.composer textarea::placeholder { color: #999e9b; }
.send-button { grid-area: send; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 7px; background: var(--ink); color: white; font-size: 20px; line-height: 1; }
.send-button:hover { background: #343735; }
.send-button.stop { background: var(--red); font-size: 13px; }
.composer-settings { grid-area: settings; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid #efefec; padding-top: 5px; }
.model-picker { min-width: 0; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.model-picker > span { flex: 0 0 auto; }
.model-picker select { min-width: 92px; max-width: 210px; height: 25px; border: 0; border-radius: 5px; outline: none; background: var(--soft); padding: 0 22px 0 7px; color: #444946; font-size: 10px; text-overflow: ellipsis; }
.model-picker select:focus { box-shadow: 0 0 0 1px #aeb7b2; }
.model-picker select:disabled { cursor: default; color: #8d928f; opacity: .7; }
.composer-status { text-align: center; color: #959a97; font-size: 10px; margin: 8px 0 0; }

/* Codex-style task surface: quiet navigation, unframed messages, compact work log. */
.app-shell { grid-template-columns: 58px 252px minmax(0, 1fr); background: #fff; }
.sidebar { border-right: 1px solid #e5e5e2; background: #f5f5f3; color: #30322f; padding: 10px; }
.sidebar-header { padding: 3px 2px 14px; }
.brand { color: #272926; font-size: 13px; }
.brand-mark { background: #252724; }
.sidebar-section-title { color: #8b8e89; margin-top: 12px; }
.workspace-agent-row { color: #50534f; }
.workspace-agent-row:hover { background: #ececea; color: #20221f; }
.workspace-agent-row.active { background: #e8e8e5; color: #20221f; }
.workspace-agent-avatar { background: #dceee8; color: #176754; }
.workspace-agent-copy small { color: #858984; }
.conversation-list > span { color: #969994; }
.conversation-link { color: #50534f; padding: 8px 9px; }
.conversation-link-row:hover { background: #ececea; }
.conversation-link-row.active { background: #e8e8e5; box-shadow: none; }
.conversation-link-row.active .conversation-link { color: #20221f; }
.conversation-link:hover, .conversation-link.active { color: #20221f; background: transparent; }
.sidebar-footer { border-top-color: #dfdfdb; background: #f5f5f3; }
.admin-link { color: #555954; }
.admin-link:hover, .logout-button:hover { color: #20221f; background: #e8e8e5; }
.account-copy small, .connection, .logout-button { color: #858984; }

@media (min-width: 761px) {
  .sidebar-footer { display: none; }
}

.chat-shell { grid-template-rows: 52px minmax(0, 1fr) auto; }
.chat-header { border-bottom-color: #ededeb; padding: 0 20px; background: rgba(255, 255, 255, .98); }
.chat-header strong { font-size: 12px; font-weight: 650; }
.chat-header small { font-size: 9px; }
.context-actions button { font-size: 11px; }
.conversation { padding-inline: max(24px, calc((100% - 900px) / 2)); }
.welcome { align-items: flex-start; justify-content: center; padding-bottom: 132px; text-align: left; }
.welcome-mark { width: 34px; height: 34px; margin-bottom: 16px; background: #252724; }
.welcome h1 { font-size: 22px; margin-bottom: 20px; }
.suggestions { width: min(660px, 100%); }
.suggestions button { min-height: 42px; background: #fafaf9; }

.message { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 17px 0; line-height: 1.72; }
.message.assistant { grid-template-columns: minmax(0, 1fr); gap: 0; }
.message.assistant .message-avatar { display: none; }
.message + .message.assistant { border-top: 0; }
.message.user { padding: 12px 0 16px; }
.message-avatar { width: 22px; height: 22px; border-radius: 5px; background: #242623; font-size: 7px; }
.message.user .message-content { max-width: min(680px, 88%); border: 0; border-radius: 8px; background: #f2f2f0; padding: 9px 13px; }
.message.assistant h1, .message.assistant h2, .message.assistant h3, .message.assistant h4, .message.assistant h5, .message.assistant h6 { font-size: 14px; }
.message-actions { margin-top: 8px; }
.message-actions button, .message-actions a { padding: 3px 5px; }

.live-reasoning { margin: 0 0 14px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.live-reasoning > summary { width: 100%; min-height: 30px; padding: 0; gap: 7px; color: #555954; }
.live-reasoning summary::before { display: none; }
.reasoning-chevron { color: #8b8f8a; font-size: 17px; line-height: 1; transition: transform .15s ease; }
.live-reasoning[open] .reasoning-chevron { transform: rotate(90deg); }
.live-stage { max-width: none; color: #818580; font-size: 11px; font-weight: 400; }
.run-summary { gap: 4px 12px; margin: 2px 0 7px 22px; border: 0; padding: 0; color: #929690; font-size: 9px; }
.run-summary .run-tokens { color: #747873; }
.live-events { position: relative; gap: 0; max-height: 300px; margin-left: 22px; padding: 2px 0 4px; border: 0; }
.live-event { position: relative; padding: 5px 0; font-size: 10px; }
.live-event::before { display: none; }
.live-event.tool, .live-event.recovery, .live-event.plan, .live-event.assessment, .live-event.supervisor { border: 0; border-radius: 0; background: transparent; padding: 5px 0; }
.live-event.tool.running::before { background: #c18a32; }
.live-event.tool.completed::before { background: #31836f; }
.live-event.recovery::before, .live-event.stopped::before { background: #b9704e; }
.live-event.tool strong, .live-event.recovery strong { color: #555954; font-weight: 600; }
.live-event.tool p, .live-event.recovery p { margin-top: 1px; color: #8a8e89; }
.live-event .work-detail { color: #626762; }
.live-event .work-observation { color: #8a8e89; }
.live-event.tool span, .live-event.recovery span { font-size: 9px; }
.live-events { max-height: none; overflow: visible; }
.historical-work-log { margin-bottom: 10px; }
.historical-work-log .live-events { max-height: none; overflow: visible; }
.task-timeline { min-width: 0; max-width: 100%; display: grid; gap: 8px; }
.agent-acknowledgement { margin: 0 0 12px; color: #30332f; font-size: 13px; line-height: 1.75; }
.agent-acknowledgement > :first-child, .timeline-model-markdown > :first-child { margin-top: 0; }
.agent-acknowledgement > :last-child, .timeline-model-markdown > :last-child { margin-bottom: 0; }
.message.assistant.streaming:not([data-model-responded]) .agent-acknowledgement:empty::before { content: "正在思考"; color: #929690; }
.work-segment { margin-bottom: 0; }
.timeline-finding { margin: 4px 0 8px; color: #30332f; }
.timeline-model-update { margin: 4px 0 8px; color: #30332f; }
.timeline-model-markdown { font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.timeline-model-markdown p { margin: 0 0 10px; }
.timeline-model-markdown .markdown-table { margin: 8px 0 12px; }
.timeline-model-update.live .timeline-model-markdown::after { content: ""; display: inline-block; width: 5px; height: 1em; margin-left: 2px; border-radius: 1px; background: #8b8f8a; vertical-align: -2px; animation: blink 1s ease-in-out infinite; }
.historical-timeline { margin-bottom: 10px; }

@media (max-width: 640px) {
  .timeline-model-markdown { font-size: 12px; }
  .run-summary, .live-events { margin-left: 18px; }
}
.stream-answer { color: #252724; }

.composer-area { border-top: 0; padding: 10px max(22px, calc((100% - 900px) / 2)) 14px; }
.composer { min-height: 66px; border-color: #d4d5d1; border-radius: 8px; padding: 7px 7px 6px 13px; box-shadow: 0 5px 18px rgba(29, 31, 28, .07); }
.composer:focus-within { border-color: #a7aaa5; box-shadow: 0 6px 20px rgba(29, 31, 28, .09); }
.composer-settings { border-top: 0; padding-top: 2px; }
.model-picker select { background: transparent; }
.composer-status { margin-top: 6px; }

.inspector { position: fixed; top: 0; right: 0; width: min(390px, 92vw); height: 100vh; background: var(--paper); border-left: 1px solid var(--line); box-shadow: -12px 0 30px rgba(32, 33, 35, .1); z-index: 50; transform: translateX(102%); transition: transform .2s ease; display: grid; grid-template-rows: 54px 44px minmax(0, 1fr); }
.inspector.open { transform: translateX(0); }
.inspector-header { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.inspector-header .square-button { color: var(--ink); }
.inspector-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.inspector-tabs button.active { color: var(--accent); background: var(--accent-soft); }
.inspector-panel { display: none; overflow-y: auto; }
.inspector-panel.active { display: block; }
.empty-state { color: var(--muted); font-size: 12px; padding: 24px 18px; }
.panel-meta { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; color: var(--muted); font-size: 11px; }
.metric-list, .audit-list, .evidence-list { padding: 0 14px 18px; font-size: 12px; }
.metric-row, .audit-row, .evidence-item { border-bottom: 1px solid #ededeb; padding: 12px 2px; }
.metric-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.metric-row p, .audit-row p, .evidence-item p { color: var(--muted); margin: 3px 0 0; font-size: 10px; line-height: 1.5; }
.metric-row span, .audit-row time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.audit-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; }
.audit-state { width: 7px; height: 7px; border-radius: 50%; background: #58ba87; }
.audit-state.denied, .audit-state.error { background: var(--red); }
.evidence-item > div { display: flex; justify-content: space-between; gap: 8px; }
.evidence-item.denied { color: var(--red); }
.evidence-item code { display: block; color: #35606e; font-size: 9px; word-break: break-word; margin-top: 7px; }
.trace-ok { color: var(--accent); font-size: 9px; }
.investigation-trace { padding: 14px 2px; border-bottom: 1px solid var(--line); }
.trace-heading { display: flex; justify-content: space-between; gap: 8px; }
.trace-heading span { color: var(--accent); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.trace-objective, .trace-runtime { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 6px 0; }
.trace-plan { margin: 10px 0; border: 1px solid #dce5e1; border-radius: 6px; background: #f5f8f7; padding: 9px 10px; }
.trace-plan > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trace-plan span, .trace-plan small { color: var(--muted); font-size: 9px; }
.trace-plan p { margin: 6px 0; color: #47504c; font-size: 10px; line-height: 1.5; }
.trace-plan small { display: block; margin-top: 3px; line-height: 1.45; }
.trace-assessment, .trace-findings { margin: 10px 0; border: 1px solid #dce5e1; border-radius: 6px; padding: 9px 10px; }
.trace-assessment > div { display: flex; justify-content: space-between; gap: 8px; color: var(--accent); }
.trace-assessment p { margin: 7px 0 0; color: #47504c; font-size: 10px; line-height: 1.45; }
.trace-assessment p b, .trace-assessment p small { display: block; }
.trace-assessment small, .trace-findings { color: var(--muted); font-size: 9px; }
.trace-findings { border-color: #eadfca; background: #fcfaf5; }
.trace-findings > strong { color: #6d5a31; }
.trace-findings p { margin: 6px 0 0; line-height: 1.45; }
.trace-findings p span { margin-right: 6px; font-family: Consolas, monospace; }
.trace-findings p.block { color: var(--red); }
.investigation-trace ol { margin: 10px 0 0; padding-left: 20px; }
.trace-step { padding: 3px 0; font-size: 10px; }
.trace-step p { color: var(--muted); margin: 2px 0 0; }
.trace-step.recovery { margin: 6px 0; border-left: 2px solid #d5aa53; padding: 5px 0 5px 8px; color: #755d2f; }
.hypothesis-list { display: grid; gap: 6px; margin-top: 10px; }
.hypothesis { display: flex; justify-content: space-between; gap: 8px; border-left: 2px solid #aaa; padding-left: 7px; font-size: 10px; }
.hypothesis.supported { border-color: var(--accent); }
.hypothesis.rejected { border-color: var(--red); }
.hypothesis small { color: var(--muted); white-space: nowrap; }
.page-overlay { display: none; position: fixed; inset: 0; border: 0; background: rgba(20, 22, 21, .32); z-index: 25; }
.page-overlay.visible { display: block; }
.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; }

@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-shell.market-view, .app-shell.enterprise-view { grid-template-columns: 1fr; }
  .enterprise-header { flex-direction: column; }
  .enterprise-detail-header { flex-direction: column; }
  .enterprise-task-row { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .enterprise-task-actions { justify-self: start; }
  .enterprise-form-grid { grid-template-columns: 1fr; }
  .app-rail { display: none; }
  .sidebar-footer { display: grid; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-102%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .conversation-menu-button { opacity: 1; }
  .mobile-menu { display: grid; }
  .context-actions button { padding: 7px 6px; }
  .chat-header-actions { gap: 4px; }
  .active-agent-label { display: none; }
  .chat-header { padding: 0 10px; }
  .conversation { padding: 0 16px; }
  .welcome { padding-bottom: 80px; }
  .suggestions { grid-template-columns: 1fr; }
  .message { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 18px 0; }
  .message.assistant { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .message.user .message-content { max-width: 90%; }
  .composer-area { padding: 10px 12px 12px; }
  .composer-status { display: none; }
  .composer-settings { align-items: flex-end; }
  .model-picker { max-width: 46%; flex-direction: column; align-items: flex-start; gap: 1px; }
  .model-picker select { width: 100%; max-width: 150px; }
  .live-stage { max-width: 220px; }
}
