/* Local styles. Theme tokens first, then layout, components and responsive rules. */
:root {
  --bg:#111214;
  --sidebar:#161719;
  --panel:#191a1d;
  --raised:#202124;
  --hover:#25262a;
  --selected:#282b2d;
  --border:#2a2b2e;
  --faint-border:#232427;
  --text:#ebedee;
  --muted:#909398;
  --subtle:#62666c;
  --primary:#e6e9e7;
  --primary-text:#1b211d;
  --green:#83c9a0;
  --red:#ee9595;
  --amber:#d9b673;
  --blue:#a0bfe0;
  --bubble:#1c1d20;
  --note:#26332e;
  --note-border:#394c42;
  --shadow:0 20px 80px #0005;
  --code:#121315;
  --focus:#8fad9b;
  --sidebar-width:338px;
  --body-font:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  color-scheme:dark
}
:root[data-theme=light] {
  --bg:#fafbf9;
  --sidebar:#f3f4f2;
  --panel:#fff;
  --raised:#eeefed;
  --hover:#e8ebe7;
  --selected:#e2e8e1;
  --border:#dde0db;
  --faint-border:#e9ebe6;
  --text:#242b26;
  --muted:#68726b;
  --subtle:#879089;
  --primary:#293a2e;
  --primary-text:#f5faf5;
  --green:#397850;
  --red:#b94d4d;
  --amber:#957030;
  --blue:#587da6;
  --bubble:#fff;
  --note:#e5efe6;
  --note-border:#cddfcf;
  --shadow:0 20px 80px #18281c20;
  --code:#f1f3ef;
  --focus:#598768;
  color-scheme:light
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  font-family:var(--body-font);
  background:var(--bg);
  color:var(--text);
  font-size:14px;
  -webkit-font-smoothing:antialiased
}
button,input,textarea,select {
  font:inherit
}
button {
  cursor:pointer;
  color:inherit
}
button:disabled {
  cursor:wait;
  opacity:.5
}
button,input,textarea,select {
  outline:none
}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:2px solid var(--focus);
  outline-offset:3px
}
button {
  border:0;
  background:none
}
a {
  color:var(--green)
}
svg {
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0
}
button svg {
  pointer-events:none
}
strong {
  font-weight:600
}
[hidden] {
  display:none!important
}
.sprite {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden
}
.app-shell {
  display:flex;
  width:100%;
  height:100dvh;
  min-height:420px;
  overflow:hidden
}
.sidebar {
  width:var(--sidebar-width);
  flex-shrink:0;
  border-right:1px solid var(--border);
  background:var(--sidebar);
  display:flex;
  flex-direction:column;
  min-height:0
}
.brand-header {
  display:flex;
  align-items:center;
  gap:11px;
  padding:27px 22px 29px
}
.brand-mark {
  width:37px;
  height:37px;
  border:1px solid #4c5750;
  border-radius:11px;
  background:#d9e2da;
  color:#28392c;
  display:grid;
  place-items:center
}
.brand-mark svg {
  width:23px
}
.brand-title {
  flex:1;
  min-width:0
}
.brand-title strong {
  font-size:16px;
  letter-spacing:-.5px
}
.brand-title span {
  display:block;
  font-size:8px;
  letter-spacing:1.35px;
  color:var(--muted);
  margin-top:5px
}
.icon-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:8px;
  color:var(--muted);
  flex-shrink:0
}
.icon-button:hover {
  background:var(--hover);
  color:var(--text)
}
.sidebar-intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 23px 18px
}
.sidebar-intro h1 {
  font-size:18px;
  letter-spacing:-.6px;
  margin:0;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:9px
}
.sidebar-intro h1 span {
  font-size:11px;
  background:var(--raised);
  color:var(--muted);
  padding:3px 7px;
  border-radius:6px;
  font-weight:500
}
.workspace-label {
  font-size:9px;
  letter-spacing:1.3px;
  color:var(--subtle)
}
.search-field {
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid var(--border);
  border-radius:8px;
  color:var(--subtle)
}
.search-field svg {
  width:16px;
  height:16px
}
.search-field input {
  border:0;
  background:none;
  color:var(--text);
  min-width:0;
  width:100%;
  font-size:12px;
  height:36px;
  outline:none
}
.search-field:focus-within {
  border-color:var(--focus)
}
.search-field input:focus-visible {
  outline:none
}
.search-field input::placeholder {
  color:var(--subtle)
}
.sidebar-search {
  margin:0 20px;
  padding:0 11px;
  background:var(--bg)
}
kbd {
  font-family:var(--body-font);
  font-size:10px;
  color:var(--subtle)
}
.sidebar-search kbd {
  border:1px solid var(--border);
  border-radius:3px;
  min-width:16px;
  line-height:18px;
  text-align:center
}
.sidebar-tabs {
  display:flex;
  padding:17px 20px 13px;
  gap:5px;
  border-bottom:1px solid var(--faint-border)
}
.sidebar-tabs button {
  font-size:11px;
  color:var(--muted);
  padding:7px 11px;
  border-radius:6px;
  white-space:nowrap
}
.sidebar-tabs button.active {
  background:var(--raised);
  color:var(--text)
}
.sidebar-tabs button:hover {
  color:var(--text)
}
.sidebar-tabs span {
  font-size:9px;
  color:var(--green);
  margin-left:3px
}
.chat-list {
  flex:1;
  overflow:auto;
  padding:11px 10px;
  scrollbar-width:thin;
  scrollbar-color:var(--border) transparent
}
.chat-row {
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:100%;
  padding:15px 12px;
  border-radius:9px;
  text-align:left;
  border:1px solid transparent;
  margin-bottom:4px;
  position:relative
}
.chat-row:hover {
  background:var(--raised)
}
.chat-row.active {
  background:var(--selected);
  border-color:var(--border)
}
.avatar {
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  flex-shrink:0;
  background:var(--avatar-bg);
  color:var(--avatar-color);
  font-size:12px;
  font-weight:600;
  letter-spacing:.2px;
  border:1px solid var(--avatar-border)
}
.sage {
  --avatar-bg:#26382f;
  --avatar-color:#b1d9bf;
  --avatar-border:#35483d
}
.violet {
  --avatar-bg:#353044;
  --avatar-color:#c9bde4;
  --avatar-border:#484055
}
.amber {
  --avatar-bg:#3c3426;
  --avatar-color:#dcc79e;
  --avatar-border:#514633
}
.blue {
  --avatar-bg:#2b3540;
  --avatar-color:#aec7df;
  --avatar-border:#3b4858
}
.rose {
  --avatar-bg:#3e2f34;
  --avatar-color:#dfb0bd;
  --avatar-border:#523e46
}
.slate {
  --avatar-bg:#33373b;
  --avatar-color:#c4cbd1;
  --avatar-border:#464c52
}
[data-theme=light] .sage {
  --avatar-bg:#e0ecdf;
  --avatar-color:#4f6b50;
  --avatar-border:#c9ddc7
}
[data-theme=light] .violet {
  --avatar-bg:#ebe5f2;
  --avatar-color:#77618f;
  --avatar-border:#ddd2e9
}
[data-theme=light] .amber {
  --avatar-bg:#f2ebdd;
  --avatar-color:#8c7346;
  --avatar-border:#e7dbc1
}
[data-theme=light] .blue {
  --avatar-bg:#e2eaf1;
  --avatar-color:#537292;
  --avatar-border:#cddbe7
}
[data-theme=light] .rose {
  --avatar-bg:#f1e3e8;
  --avatar-color:#9c6879;
  --avatar-border:#e5cdd6
}
[data-theme=light] .slate {
  --avatar-bg:#e6e9eb;
  --avatar-color:#65717b;
  --avatar-border:#d6dbdf
}
.chat-details {
  min-width:0;
  flex:1
}
.chat-row-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  padding-top:1px
}
.chat-row-title {
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:175px
}
.chat-time {
  font-size:9px;
  white-space:nowrap;
  color:var(--subtle);
  font-variant-numeric:tabular-nums
}
.chat-preview {
  display:flex;
  align-items:center;
  gap:5px;
  margin-top:7px
}
.chat-preview-text {
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:16px;
  flex:1
}
.unread-badge {
  min-width:18px;
  height:18px;
  border-radius:6px;
  padding:0 4px;
  background:var(--primary);
  color:var(--primary-text);
  font-size:9px;
  display:grid;
  place-items:center
}
.chat-pin {
  width:12px;
  height:12px;
  color:var(--subtle)
}
.chat-row-meta {
  font-size:9px;
  color:var(--subtle);
  margin-top:6px;
  display:flex;
  align-items:center;
  gap:6px
}
.list-placeholder {
  padding:25px 13px;
  font-size:12px;
  line-height:1.7;
  color:var(--muted);
  text-align:center
}
.add-entity-row {
  padding:16px 24px;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:11px;
  border-top:1px solid var(--faint-border);
  text-align:left
}
.add-entity-row svg {
  width:16px;
  height:16px
}
.add-entity-row:hover {
  background:var(--raised);
  color:var(--text)
}
.sidebar-footer {
  padding:14px 24px 17px;
  border-top:1px solid var(--border)
}
.connection-row {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:10px;
  color:var(--muted);
  height:25px
}
.connection-row .icon-button {
  margin-left:auto;
  width:28px;
  height:28px
}
.connection-row .icon-button svg {
  width:15px;
  height:15px
}
.status-dot {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--green);
  flex-shrink:0
}
.status-dot.offline {
  background:var(--red)
}
.status-dot.pending {
  background:var(--amber)
}
.open-access {
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--subtle);
  font-size:10px;
  width:100%;
  padding:10px 0 0
}
.open-access svg {
  width:12px;
  height:12px
}
.open-access:hover {
  color:var(--muted)
}
.footer-version {
  margin-left:auto;
  font-size:9px
}
.conversation {
  flex:1;
  min-width:0;
  position:relative;
  background:var(--bg)
}
.chat-view {
  height:100%;
  display:flex;
  flex-direction:column
}
.conversation-header {
  height:86px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  gap:13px;
  padding:0 29px;
  border-bottom:1px solid var(--border);
  position:relative;
  background:var(--bg)
}
.conversation-title {
  min-width:0;
  flex:1
}
.conversation-title h2 {
  font-size:15px;
  font-weight:600;
  letter-spacing:-.3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin:0 0 7px
}
.conversation-title>button {
  display:flex;
  align-items:center;
  gap:7px;
  padding:0;
  color:var(--muted);
  font-size:10px;
  max-width:100%
}
.conversation-title>button span:last-of-type {
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:350px
}
.conversation-title>button svg {
  width:11px;
  height:11px;
  opacity:.5
}
.small-status {
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--green)
}
.header-actions {
  display:flex;
  align-items:center;
  gap:14px
}
.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:8px;
  padding:10px 15px;
  font-size:12px;
  font-weight:500;
  line-height:18px;
  white-space:nowrap
}
.button:hover {
  background:var(--hover)
}
.button svg {
  width:16px;
  height:16px
}
.button.primary {
  background:var(--primary);
  color:var(--primary-text);
  border-color:var(--primary)
}
.button.primary:hover {
  filter:brightness(.93)
}
.button.small {
  padding:7px 11px;
  font-size:11px;
  border-radius:7px
}
.button.small svg {
  width:14px;
  height:14px
}
.button.danger {
  background:#953e43;
  border-color:#a94c52;
  color:#fff
}
.button.danger:hover {
  background:#ac494f
}
.conversation-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:15px 29px 12px
}
.level-filters {
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0
}
.level-filters button,.level-filters select {
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:10px;
  padding:7px 9px;
  border:1px solid transparent;
  border-radius:6px;
  white-space:nowrap;
  background:none
}
.level-filters button.active,.level-filters select.active {
  background:var(--raised);
  border-color:var(--border);
  color:var(--text)
}
.level-filters select {
  max-width:80px;
  padding-right:2px
}
.level-filters select option {
  background:var(--panel);
  color:var(--text)
}
#error-count {
  font-size:9px;
  color:var(--subtle);
  margin-left:1px
}
.level-dot {
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--muted);
  display:inline-block;
  flex-shrink:0
}
.level-dot.error,.level-dot.critical {
  background:var(--red)
}
.level-dot.warning {
  background:var(--amber)
}
.level-dot.success {
  background:var(--green)
}
.level-dot.info {
  background:var(--blue)
}
.live-button {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:10px;
  color:var(--green);
  border:1px solid var(--border);
  border-radius:6px;
  padding:6px 8px
}
.live-button svg {
  width:12px;
  height:12px;
  margin-left:4px;
  color:var(--muted)
}
.live-button.paused {
  color:var(--amber)
}
.live-button.paused .status-dot {
  background:var(--amber)
}
.conversation-search-wrap {
  padding:0 29px 13px;
  border-bottom:1px solid var(--faint-border)
}
.conversation-search {
  border:0;
  border-radius:0;
  gap:8px
}
.conversation-search input {
  height:25px;
  font-size:11px
}
.conversation-search span {
  font-size:10px;
  white-space:nowrap;
  color:var(--subtle)
}
.messages-scroll {
  flex:1;
  overflow:auto;
  padding:0 max(29px, calc((100% - 880px) / 2));
  scrollbar-width:thin;
  scrollbar-color:var(--border) transparent;
  overscroll-behavior:contain
}
.history-top {
  text-align:center;
  padding:23px 0 6px;
  color:var(--subtle);
  font-size:9px
}
.history-top .text-button {
  margin:auto;
  font-size:10px
}
.message-stream {
  padding:0 0 20px
}
.day-separator {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:17px;
  margin:20px 0 25px;
  color:var(--subtle);
  font-size:10px
}
.day-separator:before,.day-separator:after {
  content:"";
  height:1px;
  background:var(--faint-border);
  width:58px
}
.message-group {
  display:flex;
  align-items:flex-end;
  gap:9px;
  margin:0 0 21px
}
.message-group .message-avatar {
  width:27px;
  height:27px;
  border-radius:8px;
  font-size:8px;
  align-self:flex-start;
  margin-top:21px
}
.message-main {
  max-width:min(680px,88%);
  min-width:100px
}
.message-source {
  font-size:10px;
  font-weight:500;
  color:var(--muted);
  margin-bottom:8px;
  display:flex;
  align-items:center;
  gap:7px
}
.message-source .source-tag {
  font-size:8px;
  line-height:12px;
  border:1px solid var(--border);
  border-radius:3px;
  padding:0 4px;
  color:var(--subtle);
  font-weight:500;
  letter-spacing:.3px
}
.message-bubble {
  background:var(--bubble);
  border:1px solid var(--border);
  border-radius:3px 12px 12px 12px;
  padding:14px 16px 10px;
  min-width:245px;
  max-width:100%;
  position:relative
}
.message-bubble.error,.message-bubble.critical {
  border-left:2px solid #965459
}
.message-bubble.warning {
  border-left:2px solid #8e7852
}
.message-bubble.success {
  border-left:2px solid #537b62
}
.message-topline {
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:9px;
  flex-wrap:wrap
}
.level-badge {
  font-size:8px;
  letter-spacing:.6px;
  text-transform:uppercase;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--blue);
  background:#92b6e010;
  border-radius:4px;
  line-height:17px;
  padding:0 6px
}
.level-badge.success {
  color:var(--green);
  background:#83c9a00d
}
.level-badge.error,.level-badge.critical {
  color:var(--red);
  background:#ee959512
}
.level-badge.warning {
  color:var(--amber);
  background:#d9b67310
}
.level-badge.debug {
  color:var(--muted);
  background:var(--raised)
}
.message-environment {
  font-size:8px;
  color:var(--subtle);
  letter-spacing:.3px
}
.message-text {
  font-size:12px;
  line-height:1.75;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:var(--text);
  word-break:break-word
}
.message-text b,.message-text strong {
  font-weight:600
}
.message-text code {
  font-family:var(--mono);
  font-size:11px;
  background:var(--code);
  border:1px solid var(--border);
  border-radius:4px;
  padding:1px 4px
}
.message-text pre {
  font-family:var(--mono);
  font-size:11px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin:9px 0 1px;
  padding:11px 12px;
  background:var(--code);
  border:1px solid var(--faint-border);
  border-radius:6px;
  line-height:1.8
}
.message-text pre code {
  border:0;
  padding:0;
  background:none
}
.message-text blockquote {
  border-left:2px solid var(--subtle);
  padding-left:10px;
  margin:7px 0;
  color:var(--muted)
}
.message-bottomline {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:6px;
  margin-top:8px;
  min-height:14px;
  color:var(--subtle);
  font-size:8px
}
.message-bottomline .message-id {
  margin-right:auto;
  font-family:var(--mono);
  font-size:8px;
  max-width:200px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.message-bottomline time {
  font-variant-numeric:tabular-nums
}
.message-bottomline svg {
  width:11px;
  height:11px;
  color:var(--green)
}
.copy-message {
  opacity:0;
  width:22px;
  height:22px;
  position:absolute;
  right:8px;
  top:8px;
  border-radius:4px;
  color:var(--muted);
  background:var(--raised)
}
.copy-message svg {
  width:12px;
  height:12px
}
.message-bubble:hover .copy-message,.copy-message:focus-visible {
  opacity:1
}
.message-group.note {
  justify-content:flex-end
}
.note .message-main {
  max-width:78%
}
.note .message-bubble {
  background:var(--note);
  border-color:var(--note-border);
  border-radius:12px 3px 12px 12px
}
.note .message-source {
  justify-content:flex-end
}
.note .message-text {
  font-size:12px
}
.properties {
  margin-top:9px;
  border-top:1px solid var(--faint-border);
  padding-top:7px
}
.properties summary {
  font-size:9px;
  color:var(--muted);
  cursor:pointer
}
.properties pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  background:var(--code);
  font:10px/1.6 var(--mono);
  padding:9px;
  border-radius:5px;
  max-height:220px;
  overflow:auto
}
.composer-area {
  flex-shrink:0;
  padding:14px 29px 17px;
  border-top:1px solid var(--faint-border);
  background:var(--bg)
}
.composer {
  display:flex;
  align-items:flex-end;
  gap:12px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  padding:11px 11px 11px 16px
}
.composer:focus-within {
  border-color:var(--focus)
}
.composer textarea {
  width:100%;
  max-height:140px;
  min-height:24px;
  resize:none;
  border:0;
  background:none;
  color:var(--text);
  font-size:12px;
  line-height:24px;
  outline:none;
  padding:2px 0;
  scrollbar-width:thin
}
.composer textarea:focus-visible {
  outline:none
}
.composer textarea::placeholder {
  color:var(--subtle)
}
.composer>button {
  background:var(--primary);
  color:var(--primary-text);
  width:32px;
  height:32px;
  border-radius:7px;
  display:grid;
  place-items:center;
  flex-shrink:0
}
.composer>button svg {
  width:17px;
  height:17px
}
.composer-caption {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:var(--subtle);
  font-size:9px;
  padding-top:10px
}
.composer-caption>span {
  display:flex;
  align-items:center;
  gap:4px
}
.composer-caption svg {
  width:11px;
  height:11px;
  margin-right:1px
}
.composer-caption kbd {
  font-size:9px
}
.jump-latest {
  position:absolute;
  right:40px;
  bottom:128px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:9px 12px;
  background:var(--primary);
  color:var(--primary-text);
  border-radius:22px;
  box-shadow:0 3px 16px #0004;
  font-size:10px
}
.jump-latest svg {
  width:13px;
  height:13px
}
.connection-banner {
  padding:8px 29px;
  background:#ae804614;
  border-top:1px solid #ae804630;
  color:var(--amber);
  font-size:11px
}
.welcome {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  height:100%;
  text-align:center;
  padding:40px
}
.welcome-visual {
  position:relative;
  margin-bottom:47px
}
.welcome-icon {
  height:80px;
  width:80px;
  border-radius:23px;
  display:grid;
  place-items:center;
  color:var(--muted);
  border:1px solid var(--border);
  background:var(--panel);
  transform:rotate(-5deg)
}
.welcome-icon svg {
  height:36px;
  width:36px;
  stroke-width:1.1
}
.mini-live {
  position:absolute;
  bottom:-8px;
  right:-31px;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:8px;
  letter-spacing:.8px;
  background:var(--raised);
  border:1px solid var(--border);
  border-radius:5px;
  padding:7px 9px;
  color:var(--muted);
  white-space:nowrap
}
.mini-live .status-dot {
  width:5px;
  height:5px
}
.eyebrow {
  font-size:9px;
  letter-spacing:1.7px;
  color:var(--subtle);
  font-weight:500
}
.welcome h2 {
  font-size:40px;
  font-weight:500;
  line-height:1.2;
  letter-spacing:-1.8px;
  margin:20px 0 17px
}
.welcome>p {
  font-size:13px;
  line-height:1.9;
  color:var(--muted);
  margin:0 0 27px
}
.welcome-actions {
  display:flex;
  align-items:center;
  gap:10px
}
.text-button {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--muted);
  padding:5px 0
}
.text-button:hover {
  color:var(--text)
}
.text-button svg {
  width:13px;
  height:13px
}
.welcome>.text-button {
  margin-top:19px;
  font-size:11px
}
.welcome>.text-button span {
  margin-left:4px
}
.welcome-footnote {
  display:flex;
  gap:19px;
  color:var(--subtle);
  font-size:9px;
  margin-top:51px
}
.welcome-footnote span+span:before {
  content:"·";
  margin-right:19px
}
.empty-conversation {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  padding:80px 20px;
  text-align:center
}
.empty-icon {
  width:49px;
  height:49px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--panel);
  color:var(--muted);
  display:grid;
  place-items:center
}
.empty-icon svg {
  width:23px;
  height:23px
}
.empty-conversation h3 {
  font-size:17px;
  letter-spacing:-.4px;
  font-weight:500;
  margin:23px 0 8px
}
.empty-conversation p {
  font-size:12px;
  color:var(--muted);
  line-height:1.8;
  margin:0 0 19px
}
.no-matches {
  padding:60px 20px;
  text-align:center;
  color:var(--muted);
  font-size:12px
}
.dropdown-menu {
  position:absolute;
  z-index:10;
  right:27px;
  top:70px;
  padding:6px;
  min-width:195px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow:var(--shadow)
}
.dropdown-menu button {
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:11px;
  padding:10px;
  border-radius:5px;
  text-align:left;
  color:var(--muted)
}
.dropdown-menu button:hover {
  background:var(--hover);
  color:var(--text)
}
.dropdown-menu button svg {
  width:14px;
  height:14px
}
.dropdown-menu .danger-text {
  color:var(--red)
}
.menu-separator {
  height:1px;
  background:var(--border);
  margin:5px
}
.modal {
  width:440px;
  max-width:calc(100vw - 32px);
  max-height:calc(100dvh - 36px);
  padding:26px 26px 0;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:15px;
  color:var(--text);
  box-shadow:var(--shadow);
  overflow:auto
}
.modal::backdrop {
  background:#08090ba8;
  backdrop-filter:blur(3px)
}
.modal-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px
}
.modal-header h2 {
  font-size:21px;
  font-weight:500;
  letter-spacing:-.6px;
  margin:8px 0 0
}
.modal-header .icon-button {
  margin-top:-4px;
  margin-right:-8px
}
.modal-description {
  font-size:12px;
  line-height:1.8;
  color:var(--muted);
  margin:16px 0 24px
}
.field-label {
  display:block;
  font-size:11px;
  color:var(--text);
  margin-top:19px
}
.field-label input,.field-label textarea {
  display:block;
  width:100%;
  padding:11px 12px;
  border:1px solid var(--border);
  background:var(--bg);
  border-radius:7px;
  color:var(--text);
  font-size:12px;
  resize:vertical;
  margin-top:8px;
  line-height:1.5
}
.field-label input:disabled {
  color:var(--subtle);
  cursor:not-allowed
}
.field-label input::placeholder,.field-label textarea::placeholder {
  color:var(--subtle)
}
.optional {
  color:var(--subtle);
  font-size:10px;
  margin-left:5px
}
.field-hint {
  display:block;
  color:var(--subtle);
  font-size:10px;
  line-height:1.5;
  margin-top:7px
}
.avatar-options {
  border:0;
  padding:0;
  margin:22px 0 0;
  display:flex;
  gap:9px
}
.avatar-options legend {
  font-size:11px;
  margin-bottom:10px
}
.swatch {
  position:relative;
  cursor:pointer
}
.swatch input {
  position:absolute;
  opacity:0;
  width:28px;
  height:28px
}
.swatch span {
  display:block;
  width:27px;
  height:27px;
  border-radius:8px;
  background:var(--avatar-bg);
  border:2px solid var(--avatar-border)
}
.swatch input:checked+span {
  border-color:var(--avatar-color);
  box-shadow:inset 0 0 0 3px var(--avatar-bg)
}
.swatch input:focus-visible+span {
  outline:2px solid var(--focus);
  outline-offset:3px
}
.modal-footer {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  border-top:1px solid var(--border);
  margin:26px -26px 0;
  padding:18px 26px
}
.form-error {
  color:var(--red);
  font-size:11px;
  line-height:1.7
}
.integration-modal {
  width:660px
}
.copy-field {
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:8px
}
.copy-field input {
  margin-top:0;
  min-width:0;
  font-family:var(--mono);
  font-size:10px
}
.copy-field button {
  border:1px solid var(--border);
  height:39px;
  width:39px;
  background:var(--bg);
  border-radius:7px
}
.code-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:23px
}
.code-tabs {
  display:flex;
  gap:4px
}
.code-tabs button {
  font-size:10px;
  color:var(--muted);
  padding:7px 11px;
  border-radius:5px
}
.code-tabs .active {
  background:var(--raised);
  color:var(--text)
}
.code-block {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  padding:16px 17px;
  font:11px/1.8 var(--mono);
  background:var(--code);
  border:1px solid var(--border);
  border-radius:8px;
  max-height:360px;
  overflow:auto;
  color:var(--muted)
}
.notice {
  display:flex;
  align-items:flex-start;
  gap:10px;
  border:1px solid var(--border);
  border-radius:8px;
  padding:13px 14px;
  color:var(--muted);
  background:var(--raised)
}
.notice svg {
  width:16px;
  height:16px;
  margin-top:2px
}
.notice p {
  font-size:11px;
  line-height:1.7;
  margin:0
}
.warning-notice {
  color:var(--amber);
  background:#ae80460a;
  border-color:#ae80462a
}
.compact-modal .modal-header h2 {
  margin-top:0;
  font-size:19px
}
.small-description {
  font-size:11px;
  margin-bottom:0
}
.toast-region {
  position:fixed;
  bottom:23px;
  left:50%;
  transform:translateX(-50%);
  z-index:100;
  display:flex;
  flex-direction:column;
  gap:8px;
  pointer-events:none;
  max-width:90vw
}
.toast {
  font-size:12px;
  line-height:1.6;
  background:var(--primary);
  color:var(--primary-text);
  border-radius:9px;
  padding:12px 18px;
  box-shadow:var(--shadow)
}
.toast.error {
  background:#70363d;
  color:#ffe1e4
}
.mobile-back {
  display:none
}
::selection {
  background:#7aa88a55
}
::-webkit-scrollbar {
  width:5px;
  height:5px
}
::-webkit-scrollbar-thumb {
  background:var(--border);
  border-radius:5px
}
@media(min-width:1700px) {
  :root {
    --sidebar-width:365px
  }
  .brand-header {
    padding-top:32px;
    padding-bottom:36px
  }
  .chat-row {
    padding-top:18px;
    padding-bottom:18px
  }
  .conversation-header {
    height:92px
  }
}
@media(max-width:1100px) {
  :root {
    --sidebar-width:300px
  }
  .brand-header {
    padding-left:18px;
    padding-right:17px
  }
  .workspace-label {
    display:none
  }
  .chat-row {
    padding:13px 8px;
    gap:10px
  }
  .chat-row-title {
    max-width:150px
  }
  .sidebar-intro {
    padding-left:20px
  }
  .header-actions {
    gap:6px
  }
  .conversation-header {
    padding:0 20px
  }
  .conversation-toolbar {
    padding-left:20px;
    padding-right:20px
  }
  .conversation-search-wrap {
    padding-left:20px;
    padding-right:20px
  }
  .messages-scroll {
    padding:0 20px
  }
  .composer-area {
    padding-left:20px;
    padding-right:20px
  }
  .composer-caption>span:last-child {
    display:none
  }
  .message-main {
    max-width:91%
  }
  .message-bubble {
    min-width:210px
  }
  .level-filters button {
    padding-left:7px;
    padding-right:7px
  }
  .message-text {
    font-size:11px
  }
  .welcome h2 {
    font-size:34px
  }
  .welcome {
    padding:25px
  }
  .welcome-actions .button {
    font-size:11px;
    padding:9px 12px
  }
}
@media(max-width:760px) {
  .sidebar {
    width:100%
  }
  .conversation {
    display:none
  }
  .app-shell.mobile-chat .sidebar {
    display:none
  }
  .app-shell.mobile-chat .conversation {
    display:block;
    width:100%
  }
  .brand-header {
    padding:24px 22px
  }
  .sidebar-intro {
    padding-left:24px;
    padding-right:24px
  }
  .workspace-label {
    display:block
  }
  .sidebar-search {
    margin-left:22px;
    margin-right:22px
  }
  .chat-row {
    padding:17px 14px;
    gap:13px
  }
  .chat-row-title {
    max-width:calc(100vw - 160px);
    font-size:13px
  }
  .chat-preview-text {
    font-size:12px
  }
  .avatar {
    height:43px;
    width:43px
  }
  .mobile-back {
    display:inline-flex;
    width:22px;
    margin-left:-7px
  }
  .conversation-header {
    height:79px;
    gap:9px;
    padding:0 16px
  }
  .conversation-header .avatar {
    width:35px;
    height:35px;
    font-size:10px;
    border-radius:10px
  }
  .conversation-title h2 {
    font-size:13px
  }
  .conversation-title>button {
    font-size:9px
  }
  .conversation-title>button span:last-of-type {
    max-width:170px
  }
  .header-actions .button span {
    display:none
  }
  .header-actions .button {
    border:0;
    background:none;
    padding:7px
  }
  .header-actions .button svg {
    height:19px;
    width:19px
  }
  .header-actions {
    gap:0
  }
  .conversation-toolbar {
    padding:13px 13px 10px;
    gap:5px
  }
  .level-filters {
    gap:0
  }
  .level-filters button {
    font-size:9px;
    padding:6px
  }
  .level-filters select {
    font-size:9px;
    max-width:64px
  }
  .live-button {
    font-size:9px;
    padding:5px 6px;
    gap:5px
  }
  .live-button svg {
    margin-left:0
  }
  .conversation-search-wrap {
    padding:0 16px 10px
  }
  .messages-scroll {
    padding:0 15px
  }
  .message-group {
    gap:7px
  }
  .message-group .message-avatar {
    width:22px;
    height:22px;
    border-radius:6px;
    font-size:7px
  }
  .message-main {
    max-width:calc(100% - 31px)
  }
  .message-bubble {
    min-width:180px;
    padding:12px 12px 8px
  }
  .message-source {
    font-size:9px
  }
  .message-text {
    font-size:12px
  }
  .copy-message {
    opacity:.7
  }
  .note .message-main {
    max-width:87%
  }
  .composer-area {
    padding:11px 13px max(12px,env(safe-area-inset-bottom))
  }
  .composer-caption {
    font-size:8px;
    padding-top:7px
  }
  .composer-caption svg {
    display:none
  }
  .composer {
    padding:8px 8px 8px 12px
  }
  .composer textarea {
    font-size:12px
  }
  .jump-latest {
    right:20px;
    bottom:115px
  }
  .history-top {
    padding-top:16px
  }
  .day-separator {
    margin:17px 0 21px
  }
  .dropdown-menu {
    right:13px;
    top:67px
  }
  .modal {
    padding:22px 20px 0
  }
  .modal-footer {
    margin-left:-20px;
    margin-right:-20px;
    padding:16px 20px
  }
  .toast-region {
    bottom:17px
  }
  .chat-time {
    font-size:10px
  }
  .welcome {
    padding:25px
  }
  .welcome-actions {
    flex-direction:column
  }
  .welcome h2 {
    font-size:32px
  }
  .desktop-only {
    display:none
  }
  .connection-banner {
    padding:8px 16px
  }
}
@media(prefers-reduced-motion:no-preference) {
  button {
    transition:background .13s,color .13s,border-color .13s
  }
  .toast {
    animation:toast-in .15s ease-out
  }
  @keyframes toast-in {
    from {
      opacity:0;
      transform:translateY(8px)
    }
    to {
      opacity:1;
      transform:none
    }
  }
}

.login-page { display: grid; place-items: center; min-height: 100vh; }
.login-card { width: min(420px, calc(100vw - 40px)); padding: 32px; border: 1px solid var(--border); border-radius: 16px; }
.login-card form, .login-card label { display: grid; gap: 12px; margin-top: 20px; }
.login-card input { padding: 12px; background: transparent; color: inherit; border: 1px solid var(--border); border-radius: 8px; }
