:root {
  color-scheme: light;
  --ink: #1f2937;
  --muted: #7a8493;
  --line: #e7e9ee;
  --sidebar: #f7f8fa;
  --canvas: #ffffff;
  --soft: #f5f6f8;
  --accent: #5267d9;
  --accent-dark: #4055c4;
  --accent-soft: #edf0ff;
  --shadow: 0 16px 50px rgba(38, 46, 66, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.quality-open { overflow: hidden; }
.document-quality-button { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.quality-content { padding: 24px; font-size: 12px; }
.quality-intro, .quality-method p { color: #5d6878; line-height: 1.65; }
.quality-notices p { padding: 12px; border: 1px solid #ebd2a5; border-radius: 8px; background: #fff8e9; color: #765522; }
.quality-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 12px; margin: 20px 0; }
.quality-metric { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.quality-metric h3 { margin: 0 0 10px; color: #596577; font-size: 12px; font-weight: 500; }
.quality-metric strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.quality-metric p { margin: 10px 0 0; color: #687485; line-height: 1.5; font-size: 11px; }
.quality-method { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.quality-method summary { cursor: pointer; font-weight: 600; }
.quality-chunks-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.quality-chunks-heading select { max-width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; }
.quality-table-wrap { overflow-x: auto; }
.quality-table { width: 100%; border-collapse: collapse; font-size: 11px; background: #fff; }
.quality-table th, .quality-table td { padding: 12px; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.quality-table th { background: var(--soft); }
.quality-table td:first-child { min-width: 130px; max-width: 190px; overflow-wrap: anywhere; }
.quality-table small { display: block; margin-top: 5px; color: #6b7686; font-size: 10px; }
.quality-content-cell { min-width: 210px; white-space: pre-wrap; overflow-wrap: anywhere; }
.quality-signal { display: block; margin-bottom: 5px; padding: 4px 6px; color: #765522; background: #fff8e9; border-radius: 4px; }
.quality-neutral { color: #657183; }
.quality-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.quality-pagination button { font-size: 11px; }
.quality-dialog .document-preview-header > div { min-width: 0; }
.quality-dialog #quality-document { overflow-wrap: anywhere; }

* { box-sizing: border-box; scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { color: var(--ink); background: var(--canvas); font-size: 14px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
button, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { display: flex; height: 100dvh; min-height: 0; overflow: hidden; }
.app-sidebar {
  display: flex; flex: 0 0 272px; flex-direction: column; width: 272px;
  padding: 22px 16px 16px; overflow-x: hidden; background: var(--sidebar); border-right: 1px solid var(--line);
  transition: width .2s ease, flex-basis .2s ease, padding .2s ease;
}
.sidebar-header { display: flex; align-items: center; justify-content: flex-end; min-height: 32px; margin-bottom: 12px; }
.user-avatar {
  display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7182e6, #475ac9);
  font-weight: 700;
}
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; line-height: 1; }
.icon-button:hover { color: var(--ink); }
.sidebar-toggle { display: grid; flex: 0 0 32px; }
.sidebar-mobile-close-icon { display: none; }
.new-chat-button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 13px;
  color: #fff; background: var(--accent); border: 0; border-radius: 9px; font-weight: 600;
  text-decoration: none; box-shadow: 0 7px 15px rgba(82, 103, 217, .2); transition: background .15s, transform .15s;
}
.new-chat-button:hover, .new-chat-button:focus, .new-chat-button:active { color: #fff; text-decoration: none; }
.new-chat-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.new-chat-button:disabled { opacity: .65; cursor: wait; transform: none; }
.new-chat-button .ui-icon { flex: 0 0 18px; }
.history-heading { padding: 29px 10px 9px; color: #9aa1ad; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chat-history { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.chat-list-row { display: flex; align-items: center; min-width: 0; border-radius: 8px; transition: background .15s, color .15s, opacity .15s; }
.chat-list-row:hover { color: var(--ink); background: #eceef3; }
.chat-list-row.is-active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 600; }
.chat-list-row.is-deleting { opacity: .5; pointer-events: none; }
.chat-list-item { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; padding: 10px 4px 10px 10px; color: #606a78; border-radius: 8px; text-decoration: none; }
.chat-list-row:hover .chat-list-item { color: var(--ink); }
.chat-list-row.is-active .chat-list-item { color: var(--accent-dark); }
.chat-list-icon { flex: 0 0 18px; color: #a2a9b4; }
.chat-list-row.is-active .chat-list-icon { color: var(--accent); }
.chat-list-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-delete-button { display: grid; flex: 0 0 28px; width: 28px; height: 28px; margin-right: 3px; padding: 0; place-items: center; color: #a7aeba; background: transparent; border: 0; border-radius: 50%; opacity: 0; transition: color .15s, opacity .15s; }
.chat-list-row:hover .chat-delete-button, .chat-delete-button:focus-visible { opacity: 1; }
.chat-delete-button:hover, .chat-delete-button:focus-visible { color: #a04452; outline: none; }
.chat-delete-button .ui-icon { width: 13px; height: 13px; stroke-width: 1.6; }
.chat-delete-button:disabled { cursor: wait; }
@media (hover: none) { .chat-delete-button { opacity: .7; } }
.sidebar-tools { margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--line); }
.sidebar-tool-link { display: flex; align-items: center; gap: 10px; padding: 10px; color: #606a78; border-radius: 8px; text-decoration: none; transition: background .15s, color .15s; }
.sidebar-tool-link:hover { color: var(--ink); background: #eceef3; }
.sidebar-tool-link.is-active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 600; }
.sidebar-tool-icon { flex: 0 0 18px; width: 18px; color: #9aa3b0; }
.sidebar-tool-link.is-active .sidebar-tool-icon { color: var(--accent); }
.privacy-notice-link { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 4px; padding: 10px; color: #606a78; background: transparent; border: 0; border-radius: 8px; text-align: left; transition: background .15s, color .15s; }
.privacy-notice-link:hover, .privacy-notice-link:focus-visible { color: var(--ink); background: #eceef3; outline: none; }
.privacy-notice-link .sidebar-tool-icon { flex: 0 0 18px; width: 18px; }
.sidebar-footer { margin-top: auto; padding: 20px 0 0; border-top: 1px solid var(--line); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; }
.user-avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; font-size: 13px; }
.user-details { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-details strong { font-size: 13px; }
.user-details small { color: var(--muted); font-size: 11px; }
.logout-button { margin-left: auto; padding: 4px 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 10px; }
.logout-button:hover { color: var(--accent-dark); }

@media (min-width: 701px) {
  .sidebar-collapsed .app-sidebar { flex-basis: 72px; width: 72px; padding-right: 16px; padding-left: 16px; }
  .sidebar-collapsed .sidebar-header { justify-content: center; }
  .sidebar-collapsed .new-chat-button { justify-content: center; width: 40px; height: 40px; margin: 0 auto; padding: 0; border-radius: 10px; }
  .sidebar-collapsed .new-chat-button span,
  .sidebar-collapsed .history-heading,
  .sidebar-collapsed .chat-history,
  .sidebar-collapsed .sidebar-tool-link span,
  .sidebar-collapsed .privacy-notice-link span,
  .sidebar-collapsed .user-details,
  .sidebar-collapsed .logout-button { display: none; }
  .sidebar-collapsed .sidebar-tools { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 18px; padding-top: 0; border-top: 0; }
  .sidebar-collapsed .sidebar-tool-link { justify-content: center; width: 40px; height: 40px; padding: 0; }
  .sidebar-collapsed .privacy-notice-link { justify-content: center; width: 40px; height: 40px; margin-right: auto; margin-left: auto; padding: 0; }
  .sidebar-collapsed .sidebar-tool-icon { flex-basis: 19px; width: 19px; height: 19px; }
  .sidebar-collapsed .sidebar-footer { display: flex; justify-content: center; padding-top: 15px; }
  .sidebar-collapsed .user-card { justify-content: center; padding: 4px; }
}

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #f7f8fb; }
.login-card { width: min(390px, 100%); padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 45px rgba(38, 46, 66, .08); }
.login-card h1 { margin: 7px 0 8px; font-size: 28px; letter-spacing: -.04em; }
.login-intro { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.login-form { display: flex; flex-direction: column; gap: 15px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; color: #596474; font-size: 11px; font-weight: 700; }
.login-form input:not([type=hidden]) { min-height: 40px; padding: 9px 10px; color: #465163; background: #fbfbfc; border: 1px solid #dfe3eb; border-radius: 7px; outline: 0; font-size: 13px; font-weight: 400; }
.login-form input:focus { border-color: #aeb9f4; box-shadow: 0 0 0 3px var(--accent-soft); }
.login-form .primary-button { justify-content: center; width: 100%; margin-top: 3px; }
.login-error { margin: -2px 0 0; color: #a04452; font-size: 12px; }

.app-main { display: flex; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: var(--canvas); }
.page-root { display: flex; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.mobile-topbar { display: none; }
.chat-app { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.chat-header { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 20px clamp(24px, 6vw, 92px); border-bottom: 1px solid var(--line); }
.chat-header h1 { margin: 4px 0 0; overflow: hidden; font-size: 18px; font-weight: 650; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chat-thread { flex: 1; width: min(880px, 100%); margin: 0 auto; padding: 34px clamp(20px, 4vw, 54px) 28px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.message-row { display: flex; gap: 11px; width: 100%; margin-bottom: 25px; }
.message-row-user { justify-content: flex-end; }
.message-content { min-width: 0; max-width: min(720px, 86%); }
.message-row-assistant .message-content { width: 100%; max-width: 720px; }
.message-bubble { line-height: 1.65; overflow-wrap: anywhere; }
.message-user { padding: 11px 15px; color: #fff; background: var(--accent); border-radius: 16px 16px 4px 16px; box-shadow: 0 5px 14px rgba(82, 103, 217, .12); }
.message-assistant { padding: 2px 0; color: #3f4856; }
.message-assistant > :first-child { margin-top: 0; }
.message-bubble > :last-child { margin-bottom: 0; }
.message-bubble p { margin: 0 0 10px; }
.message-bubble h1, .message-bubble h2, .message-bubble h3 { margin: 4px 0 8px; line-height: 1.3; }
.message-bubble ul, .message-bubble ol { margin: 8px 0; padding-left: 22px; }
.message-bubble pre { padding: 12px; overflow-x: auto; color: #e9ecf3; background: #242938; border-radius: 9px; }
.message-bubble code { padding: 2px 4px; color: #b23a6f; background: #f1eff2; border-radius: 4px; font-size: .9em; }
.message-bubble pre code { padding: 0; color: inherit; background: transparent; }
.chat-table-shell {
  width: 100%; margin: 16px 0 18px; overflow-x: auto; color: #465163; background: #fff;
  border: 1px solid #e1e5ec; border-radius: 11px; outline: none;
  box-shadow: 0 5px 18px rgba(38, 46, 66, .045); overscroll-behavior-inline: contain;
}
.chat-table-shell:focus-visible { border-color: #bdc6f7; box-shadow: 0 0 0 3px var(--accent-soft); }
.message-assistant .chat-table-shell table {
  width: 100%; min-width: 500px; border-collapse: separate; border-spacing: 0;
  color: #465163; font-size: 13px; line-height: 1.55; table-layout: auto;
}
.message-assistant .chat-table-shell th {
  padding: 11px 14px; color: #344054; background: #f7f8fb; border-bottom: 1px solid #dde2ea;
  font-size: 11px; font-weight: 750; letter-spacing: .035em; text-align: left; vertical-align: bottom;
}
.message-assistant .chat-table-shell td {
  padding: 12px 14px; border-bottom: 1px solid #edf0f4; vertical-align: top;
  overflow-wrap: normal; word-break: normal;
}
.message-assistant .chat-table-shell th + th,
.message-assistant .chat-table-shell td + td { border-left: 1px solid #edf0f4; }
.message-assistant .chat-table-shell tbody tr:nth-child(even) { background: #fbfcfd; }
.message-assistant .chat-table-shell tbody tr:last-child td { border-bottom: 0; }
.message-assistant .chat-table-shell tbody tr:hover { background: #f7f8ff; }
.message-assistant .chat-table-shell .chat-table-columns-2 th:first-child,
.message-assistant .chat-table-shell .chat-table-columns-2 td:first-child { width: 29%; min-width: 150px; }
.message-assistant .chat-table-shell td > :first-child { margin-top: 0; }
.message-assistant .chat-table-shell td > :last-child { margin-bottom: 0; }
.message-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 12px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); }
.message-meta-content { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.message-meta-content:empty { display: none; }
.strategy-badge { padding: 3px 7px; color: #7d8795; background: var(--soft); border-radius: 5px; font-size: 10px; font-weight: 600; }
.inline-citation-group { display: inline-flex; align-items: baseline; gap: 1px; margin: 0 1px; padding: 0 3px; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid #dfe4ff; border-radius: 5px; font-size: 11px; font-weight: 750; line-height: 1.55; white-space: nowrap; vertical-align: baseline; }
.inline-citation { padding: 0 1px; color: inherit; background: transparent; border: 0; border-radius: 3px; font-size: inherit; font-weight: inherit; line-height: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.inline-citation:hover, .inline-citation:focus-visible { color: #fff; background: var(--accent); outline: none; text-decoration-color: currentColor; }
.message-sources { min-width: 0; }
.verification-status { color: var(--muted); font-size: 12px; }
.message-sources summary { list-style: none; }
.message-sources summary::-webkit-details-marker { display: none; }
.message-sources > summary { display: flex; align-items: center; gap: 8px; min-height: 32px; color: var(--accent-dark); cursor: pointer; font-size: 12px; font-weight: 700; }
.message-sources > summary:focus-visible { outline: 1px solid #aeb9f4; outline-offset: 3px; border-radius: 4px; box-shadow: 0 0 0 3px var(--accent-soft); }
.message-sources > summary:hover .message-sources-title { text-decoration: underline; text-underline-offset: 3px; }
.message-sources-title { display: inline-flex; align-items: center; gap: 7px; }
.message-sources-title .ui-icon { width: 16px; height: 16px; }
.message-sources-count { display: grid; min-height: 21px; place-items: center; padding: 3px 7px; color: #737da9; background: var(--accent-soft); border-radius: 11px; font-size: 9px; font-weight: 700; line-height: 1.3; }
.source-chevron { flex: 0 0 auto; width: 7px; height: 7px; margin: -3px 3px 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .16s ease, margin .16s ease; }
details[open] > summary > .source-chevron { margin-top: 3px; transform: rotate(225deg); }
.message-source-list { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--line); }
.message-source-document { padding: 11px 0 2px; border-bottom: 1px solid var(--line); }
.message-source-document:last-child { border-bottom: 0; }
.message-source-document-header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; color: #596474; }
.message-source-document-index { color: var(--accent-dark); font-size: 10px; font-weight: 750; }
.message-source-index { color: var(--accent-dark); font-size: 10px; font-weight: 750; }
.message-source-identity { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.message-source-identity strong { overflow: hidden; color: #3f4957; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.message-source-identity small { color: var(--muted); font-size: 10px; }
.message-source-passages { display: flex; flex-direction: column; gap: 0; padding: 6px 0 0 19px; }
.message-source-passage { position: relative; padding: 8px 0 9px 9px; border-top: 1px solid #f0f1f4; outline: none; scroll-margin: 18px; box-shadow: inset 2px 0 0 #c6cdf2; transition: color .2s, background .2s, box-shadow .2s; }
.message-source-passage.is-highlighted, .message-source-passage:focus-visible { background: #f7f8ff; border-color: #aeb9f4; box-shadow: inset 2px 0 0 var(--accent), 0 0 0 3px var(--accent-soft); }
.message-source-passage-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.message-source-passage-header strong { color: #4c5665; font-size: 10px; }
.message-source-passage-header small { margin-left: auto; color: var(--muted); font-size: 9px; }
.message-source-passage blockquote { margin: 0; color: #667181; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.feedback-actions { display: inline-flex; align-self: stretch; align-items: flex-start; gap: 3px; margin-left: auto; padding-left: 10px; border-left: 1px solid var(--line); }
.feedback-button { display: grid; place-items: center; width: 29px; height: 28px; padding: 0; color: #9aa3af; background: transparent; border: 1px solid transparent; border-radius: 8px; opacity: .8; transition: color .15s, background .15s, border-color .15s, transform .15s, opacity .15s; }
.feedback-button .ui-icon { width: 16px; height: 16px; stroke-width: 1.65; }
.feedback-button:hover { color: #465bd2; background: #f5f6ff; border-color: #e1e5ff; opacity: 1; transform: translateY(-1px); }
.feedback-button.is-selected { color: #fff; background: var(--accent); border-color: var(--accent); opacity: 1; }
.feedback-button[data-feedback-value="negative"].is-selected { background: #b95b68; border-color: #b95b68; }
.feedback-button:disabled { cursor: wait; opacity: .45; }
.composer-area { padding: 0 clamp(20px, 4vw, 54px) 24px; }
.chat-composer { position: relative; width: min(772px, 100%); margin: 0 auto; padding: 9.5px 58px 9.5px 12px; background: #fff; border: 1px solid #dfe3eb; border-radius: 22px; box-shadow: 0 10px 32px rgba(38, 46, 66, .09); transition: border-color .16s, box-shadow .16s; }
.chat-composer:focus-within { border-color: #c8cff5; box-shadow: 0 12px 36px rgba(61, 77, 162, .12); }
.composer-input-row textarea { display: block; width: 100%; min-height: 52px; max-height: 180px; padding: max(0px, calc((52px - 1lh) / 2)) 7px; resize: none; color: var(--ink); background: transparent; border: 0; outline: 0; line-height: 1.5; }
.composer-input-row textarea::placeholder { color: #9ba3af; }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-tools { display: flex; align-items: center; gap: 7px; min-width: 0; }
.composer-dropdown-control { position: relative; min-width: 0; }
.composer-select-control { display: inline-flex; align-items: center; gap: 7px; height: 36px; min-width: 0; max-width: 260px; padding: 0 9px 0 11px; color: #505966; background: #f4f4f5; border: 1px solid transparent; border-radius: 18px; font-size: 11px; font-weight: 650; white-space: nowrap; transition: color .15s, background .15s, border-color .15s, box-shadow .15s; }
.composer-select-control:hover { color: #252b35; background: #ececef; }
.composer-select-control:disabled { color: #616b78; cursor: default; opacity: .85; }
.composer-select-control:focus-visible, .composer-select-control[aria-expanded="true"] { color: var(--accent-dark); background: var(--accent-soft); border-color: #d8defe; outline: none; box-shadow: 0 0 0 3px rgba(82, 103, 217, .1); }
.composer-control-icon { flex: 0 0 auto; width: 15px; height: 15px; color: var(--accent); }
.composer-control-chevron { flex: 0 0 14px; width: 14px; height: 14px; margin-left: 2px; color: #7c8594; stroke-width: 2.1; transition: color .15s, transform .18s ease; }
.composer-select-control:disabled .composer-control-chevron { display: none; }
.composer-select-control[aria-expanded="true"] .composer-control-chevron { color: var(--accent); transform: rotate(180deg); }
.document-filter-toggle #document-filter-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-menu { position: absolute; z-index: 30; bottom: calc(100% + 9px); left: 0; min-width: 280px; padding: 7px; background: rgba(255, 255, 255, .98); border: 1px solid #dde2eb; border-radius: 13px; box-shadow: 0 18px 48px rgba(31, 41, 55, .16), 0 2px 8px rgba(31, 41, 55, .05); backdrop-filter: blur(12px); }
.composer-menu[hidden] { display: none; }
.strategy-menu { width: 330px; }
.composer-menu-option { display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; align-items: center; gap: 9px; width: 100%; min-height: 42px; padding: 9px 10px; color: #4f5967; background: transparent; border: 0; border-radius: 8px; text-align: left; transition: color .14s, background .14s; }
.composer-menu-option:hover, .composer-menu-option:focus-visible { color: var(--accent-dark); background: #f1f3ff; outline: none; }
.composer-menu-option.is-selected { color: var(--accent-dark); background: var(--accent-soft); }
.composer-menu-option strong, .composer-menu-option small { display: block; }
.composer-menu-option strong { margin-bottom: 3px; color: #303743; font-size: 12px; }
.composer-menu-option small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.composer-menu-icon { width: 17px; height: 17px; color: var(--accent); }
.composer-menu-check { visibility: hidden; color: var(--accent); font-weight: 800; }
.composer-menu-option.is-selected .composer-menu-check { visibility: visible; }
.document-filter-menu { min-width: 270px; max-width: 340px; max-height: 265px; overflow-y: auto; }
.document-filter-option { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 38px; padding: 8px 9px; color: #596474; border-radius: 8px; cursor: pointer; transition: color .14s, background .14s; }
.document-filter-option:hover { color: var(--accent-dark); background: #f1f3ff; }
.document-filter-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.document-filter-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-filter-all { color: var(--accent-dark); font-weight: 650; }
.document-filter-separator { height: 1px; margin: 5px 8px; background: var(--line); }
.document-filter-empty { margin: 8px; color: var(--muted); font-size: 11px; }
.send-button { position: absolute; top: 50%; right: 13px; display: grid; place-items: center; width: 36px; height: 36px; color: #fff; background: linear-gradient(145deg, #6074e5, #465bd2); border: 0; border-radius: 50%; box-shadow: 0 5px 12px rgba(82, 103, 217, .22); transform: translateY(-50%); transition: box-shadow .15s, background .15s; }
.send-button:hover:not(:disabled) { background: linear-gradient(145deg, #5369df, #3f53c5); box-shadow: 0 8px 18px rgba(82, 103, 217, .30); }
.send-button:active:not(:disabled) { box-shadow: 0 3px 8px rgba(82, 103, 217, .22); }
.send-button:focus-visible { outline: 3px solid rgba(82, 103, 217, .18); outline-offset: 2px; }
.send-button:disabled { opacity: .5; cursor: wait; box-shadow: none; }
.typing-indicator { display: flex; align-items: center; gap: 4px; height: 28px; }
.typing-indicator i { width: 6px; height: 6px; background: #9aa4b5; border-radius: 50%; animation: pulse 1.1s infinite ease-in-out; }
.typing-indicator i:nth-child(2) { animation-delay: .14s; }
.typing-indicator i:nth-child(3) { animation-delay: .28s; }
@keyframes pulse { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.toast-container { position: fixed; z-index: 20; top: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; }
.toast { max-width: 340px; padding: 12px 15px; color: #fff; background: #333b4a; border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; }
.toast-danger { background: #bd4c5d; }
.toast-success { background: #3d956e; }

.documents-page { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; background: #fbfbfc; }
.documents-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 42px clamp(24px, 6vw, 92px) 30px; background: #fff; border-bottom: 1px solid var(--line); }
.documents-header h1 { margin: 5px 0 8px; font-size: 29px; letter-spacing: -.04em; }
.documents-intro { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.6; }
.document-count-card { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 88px; height: 72px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 12px; }
.document-count-card strong { font-size: 24px; line-height: 1; }
.document-count-card span { margin-top: 5px; color: #737da9; font-size: 11px; }
.documents-content { width: min(1260px, 100%); margin: 0 auto; padding: 26px clamp(14px, 4vw, 48px) 60px; }
.upload-card { padding: 21px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 8px 28px rgba(38, 46, 66, .04); }
.upload-card-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.upload-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--accent); background: var(--accent-soft); border-radius: 10px; font-size: 23px; }
.upload-card h2, .documents-list-section h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.upload-card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.document-dropzone { display: flex; align-items: center; gap: 13px; min-height: 76px; padding: 17px 20px; color: #687384; background: #fafbfc; border: 1px dashed #cbd2df; border-radius: 9px; cursor: pointer; transition: background .15s, border-color .15s; }
.document-dropzone:hover, .document-dropzone.is-dragging { color: var(--accent-dark); background: var(--accent-soft); border-color: var(--accent); }
.dropzone-symbol { color: var(--accent); font-size: 25px; font-weight: 300; }
.dropzone-copy { display: flex; flex-direction: column; gap: 3px; }
.dropzone-copy strong { color: #4c5767; font-size: 13px; }
.dropzone-copy small { color: var(--muted); font-size: 11px; }
.document-dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.selected-document { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; color: var(--accent-dark); font-size: 11px; }
.selected-document span { padding: 7px 9px; overflow: hidden; background: var(--accent-soft); border-radius: 6px; text-overflow: ellipsis; white-space: nowrap; }
.upload-actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; margin-top: 15px; }
.upload-status { margin-right: auto; color: var(--muted); font-size: 12px; }
.upload-status.is-loading { color: #8b6a25; }
.upload-status.is-success { color: #3d956e; }
.upload-status.is-error { color: #bd4c5d; }
.primary-button { padding: 10px 15px; color: #fff; background: var(--accent); border: 0; border-radius: 8px; font-size: 12px; font-weight: 650; box-shadow: 0 5px 12px rgba(82, 103, 217, .16); }
.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { cursor: wait; opacity: .6; }
.ingestion-section { margin-top: 28px; }
.ingestion-section h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.02em; }
.ingestion-job-list { display: flex; flex-direction: column; gap: 8px; }
.ingestion-empty { padding: 22px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; text-align: center; }
.ingestion-unavailable { color: #9a6b27; background: #fffaf0; border-color: #f0dfba; }
.ingestion-job { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.5fr) minmax(130px, .55fr); align-items: center; gap: 18px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s; }
.ingestion-job-processing { border-color: #dce1ff; background: #fdfdff; }
.ingestion-job-retry_scheduled { border-color: #eadcb8; background: #fffdf8; }
.ingestion-job-failed { border-color: #efcbd1; background: #fffafb; }
.ingestion-job-cancelling { border-color: #d8dce5; background: #f8f9fb; }
.ingestion-job-completed { border-color: #cae8da; background: #fbfffd; }
.ingestion-job-identity { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.ingestion-job-identity strong { overflow: hidden; color: #465160; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ingestion-job-state { color: #7c8695; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ingestion-job-processing .ingestion-job-state { color: var(--accent-dark); }
.ingestion-job-retry_scheduled .ingestion-job-state { color: #9a6b27; }
.ingestion-job-failed .ingestion-job-state { color: #ad4656; }
.ingestion-job-cancelling .ingestion-job-state { color: #68717f; }
.ingestion-job-completed .ingestion-job-state { color: #3d956e; }
.ingestion-job-progress { min-width: 0; }
.ingestion-progress-track { height: 5px; overflow: hidden; background: #eceef3; border-radius: 5px; }
.ingestion-progress-track i { display: block; width: 0; height: 100%; background: var(--accent); border-radius: inherit; transition: width .35s ease; }
.ingestion-job-retry_scheduled .ingestion-progress-track i { background: #c79237; }
.ingestion-job-failed .ingestion-progress-track i { background: #bd5868; }
.ingestion-job-completed .ingestion-progress-track i { background: #48a77b; }
.ingestion-progress-detail { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.ingestion-progress-detail span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ingestion-progress-detail span:last-child { flex: 0 0 auto; }
.ingestion-job-attempts { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; color: #8a93a0; font-size: 9px; text-align: right; }
.ingestion-job-attempts small { display: -webkit-box; max-width: 240px; overflow: hidden; color: #ad4656; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; }
.ingestion-job-remove-button { margin-top: 5px; padding: 5px 9px; color: #ad4656; background: #fff; border: 1px solid #e5b8c0; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; }
.ingestion-job-remove-button:hover:not(:disabled) { color: #913746; background: #fff4f6; border-color: #d98f9b; }
.ingestion-job-remove-button:disabled { color: #8a93a0; background: #f2f3f6; border-color: #dfe2e8; cursor: wait; }
.ingestion-job.is-deleting { opacity: .65; pointer-events: none; }
.documents-list-section { margin-top: 39px; }
.section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 15px; }
.section-heading-row h2 { margin-top: 4px; }
.section-count { display: grid; place-items: center; width: 25px; height: 25px; color: #737da9; background: var(--accent-soft); border-radius: 50%; font-size: 11px; font-weight: 700; }
.documents-empty { display: flex; flex-direction: column; align-items: center; padding: 55px 20px; color: #596474; background: #fff; border: 1px solid var(--line); border-radius: 11px; text-align: center; }
.empty-document-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 13px; color: #a3adbd; background: var(--soft); border-radius: 12px; font-size: 23px; }
.documents-empty p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.documents-list { display: flex; flex-direction: column; gap: 8px; }
.document-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.document-file-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 42px; color: #c35161; background: #fff0f2; border: 1px solid #ffd9de; border-radius: 7px; font-size: 9px; font-weight: 800; }
.document-card-main { min-width: 0; flex: 1; }
.document-card-main h3 { margin: 0; overflow: hidden; color: #3e4857; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.document-card-main p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.document-card-main .document-description { display: -webkit-box; margin-top: 6px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.4; }
.document-stats { display: flex; flex-direction: column; gap: 4px; min-width: 145px; color: var(--muted); font-size: 10px; }
.document-stats strong { color: #596474; font-size: 11px; }
.document-status { display: flex; align-items: center; gap: 5px; color: #4b9c78; font-size: 10px; white-space: nowrap; }
.document-status i { width: 6px; height: 6px; background: #51b985; border-radius: 50%; }
.document-card-actions { display: flex; align-items: center; gap: 9px; }
.document-preview-button { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 9px; color: var(--accent-dark); background: #f7f8ff; border: 1px solid #dce1ff; border-radius: 7px; font-size: 9px; font-weight: 700; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.document-preview-button .ui-icon { width: 14px; height: 14px; }
.document-preview-button:hover, .document-preview-button:focus-visible { background: #fff; border-color: #aeb9f4; box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.document-preview-button:disabled { color: #a0a8b4; background: #f5f6f8; border-color: #e6e8ed; cursor: not-allowed; box-shadow: none; }
.document-delete-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: #a0a8b4; background: transparent; border: 0; border-radius: 50%; transition: color .15s; }
.document-delete-button .ui-icon { width: 13px; height: 13px; stroke-width: 1.6; }
.document-delete-button:hover { color: #b34858; }
.document-delete-button:disabled { cursor: wait; opacity: .45; }
.document-card.is-deleting { opacity: .55; pointer-events: none; }
body.document-preview-open { overflow: hidden; }
.document-preview-dialog { width: min(980px, calc(100vw - 32px)); max-width: none; height: min(88vh, 880px); max-height: none; margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: #fff; border: 1px solid #dfe3eb; border-radius: 18px; box-shadow: 0 28px 90px rgba(25, 31, 45, .24); }
.document-preview-dialog::backdrop { background: rgba(24, 29, 42, .48); backdrop-filter: blur(3px); }
.document-preview-shell { display: flex; height: 100%; flex-direction: column; }
.document-preview-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 25px 18px; background: linear-gradient(135deg, #fafbff, #fff); border-bottom: 1px solid var(--line); }
.document-preview-header h2 { margin: 5px 0 0; overflow: hidden; font-size: 21px; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.document-preview-header p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.document-preview-close { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; padding: 0; color: #788291; background: #f1f3f7; border: 0; border-radius: 9px; transition: color .15s, background .15s; }
.document-preview-close:hover, .document-preview-close:focus-visible { color: var(--ink); background: #e7eaf0; outline: 3px solid var(--accent-soft); }
.document-preview-close .ui-icon { width: 17px; height: 17px; }
.document-preview-toolbar { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; min-height: 48px; padding: 7px 25px; background: #fff; border-bottom: 1px solid var(--line); }
.document-preview-tab { min-height: 31px; padding: 6px 11px; color: #747e8d; background: transparent; border: 0; border-radius: 7px; font-size: 10px; font-weight: 700; }
.document-preview-tab:hover, .document-preview-tab:focus-visible { color: var(--accent-dark); background: #f2f4ff; outline: none; }
.document-preview-tab.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.document-preview-toolbar > span { margin-left: auto; color: #8c95a2; font-size: 9px; }
.document-preview-content { flex: 1; min-height: 0; padding: 26px clamp(18px, 5vw, 54px) 42px; overflow: auto; background: #f7f8fa; scrollbar-width: thin; scrollbar-color: #cbd1dc transparent; }
.document-preview-rendered, .document-preview-raw { width: min(760px, 100%); min-height: 100%; margin: 0 auto; padding: 34px clamp(22px, 5vw, 48px); color: #465160; background: #fff; border: 1px solid #e2e5eb; border-radius: 11px; box-shadow: 0 10px 32px rgba(35, 42, 60, .06); }
.document-preview-rendered { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.document-preview-rendered h1 { margin: 0 0 22px; padding-bottom: 13px; color: #303946; border-bottom: 1px solid var(--line); font-size: 24px; }
.document-preview-rendered h2 { margin: 30px 0 12px; color: #3c4756; font-size: 17px; }
.document-preview-rendered h3 { margin: 23px 0 9px; color: #465160; font-size: 14px; }
.document-preview-rendered p { margin: 0 0 12px; }
.document-preview-rendered blockquote { margin: 0 0 24px; padding: 11px 14px; color: #697486; background: #f5f6ff; border-left: 3px solid #aeb9f4; border-radius: 0 7px 7px 0; }
.document-preview-rendered ul, .document-preview-rendered ol { margin: 10px 0 15px; padding-left: 23px; }
.document-preview-rendered table { width: 100%; margin: 15px 0; border-collapse: collapse; font-size: 10px; }
.document-preview-rendered th, .document-preview-rendered td { padding: 7px 8px; border: 1px solid #e0e4eb; text-align: left; }
.document-preview-rendered th { color: #4e5968; background: #f5f6f8; }
.document-preview-rendered pre { padding: 12px; overflow-x: auto; color: #e9ecf3; background: #292e3a; border-radius: 8px; }
.document-preview-rendered code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.document-preview-raw { overflow: visible; color: #505b69; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.document-preview-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 260px; color: var(--muted); font-size: 11px; }
.document-preview-loading i { width: 17px; height: 17px; border: 2px solid #d8ddf7; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.document-preview-error { margin: 80px auto; padding: 14px; color: #a04452; background: #fff0f2; border: 1px solid #f1cbd2; border-radius: 8px; text-align: center; }

.data-page { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: #fbfbfc; }
.data-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 42px clamp(24px, 6vw, 92px) 30px; background: #fff; border-bottom: 1px solid var(--line); }
.data-header h1 { margin: 5px 0 8px; font-size: 29px; letter-spacing: -.04em; }
.data-intro { max-width: 640px; margin: 0; color: var(--muted); line-height: 1.6; }
.data-summary { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 88px; height: 72px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 12px; }
.data-summary strong { font-size: 24px; line-height: 1; }
.data-summary span { margin-top: 5px; color: #737da9; font-size: 11px; }
.data-content { width: min(1260px, 100%); margin: 0 auto; padding: 26px clamp(14px, 4vw, 48px) 60px; }
.data-alert { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 12px 14px; color: #8c3f4d; background: #fff2f4; border: 1px solid #f1cbd2; border-radius: 9px; font-size: 12px; }
.data-alert strong { flex: 0 0 auto; }
.data-filter-card, .data-table-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 8px 28px rgba(38, 46, 66, .04); }
.data-filter-card { padding: 21px; }
.data-filter-card-compact { padding: 16px 18px; }
.filter-grid { display: grid; gap: 12px; }
.chunk-filter-grid { grid-template-columns: minmax(280px, 2fr) minmax(210px, 1.25fr) minmax(130px, .65fr) auto; align-items: end; }
.interaction-filter-grid { grid-template-columns: minmax(130px, .7fr) minmax(130px, .7fr) minmax(170px, 1fr) minmax(140px, .8fr) minmax(200px, 1.2fr) auto; align-items: end; }
.document-filter-card { margin-top: 22px; }
.document-filter-card + .documents-list-section { margin-top: 22px; }
.document-filter-grid { grid-template-columns: minmax(280px, 1fr) auto; align-items: end; }
.filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter-field > span, .filter-field > label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.filter-field input, .filter-field select { width: 100%; min-height: 36px; padding: 7px 9px; color: #4e5968; background: #fbfbfc; border: 1px solid #dfe3eb; border-radius: 7px; outline: 0; font-size: 12px; }
.filter-field input:focus, .filter-field select:focus { border-color: #aeb9f4; box-shadow: 0 0 0 3px var(--accent-soft); }
.app-select { position: relative; width: 100%; min-width: 0; }
.app-select.is-open { z-index: 35; }
.app-select-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.app-select-trigger { display: grid; grid-template-columns: minmax(0, 1fr) 26px; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 6px 7px 6px 12px; color: #475365; background: #fbfbfd; border: 1px solid #dce1e9; border-radius: 10px; outline: 0; text-align: left; box-shadow: 0 1px 2px rgba(31, 41, 55, .02); transition: color .15s, background .15s, border-color .15s, box-shadow .15s; }
.app-select-trigger:hover { color: #303a49; background: #fff; border-color: #cfd5e0; }
.app-select-trigger:focus-visible, .app-select.is-open .app-select-trigger { color: var(--accent-dark); background: #fff; border-color: #aeb9f4; box-shadow: 0 0 0 4px rgba(82, 103, 217, .11); }
.app-select-trigger:disabled { color: #929aa7; background: #f2f3f5; cursor: not-allowed; }
.app-select-value { overflow: hidden; font-size: 12px; font-weight: 560; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.app-select-chevron { display: grid; place-items: center; width: 26px; height: 26px; color: #657084; background: #f0f2f7; border-radius: 8px; transition: color .15s, background .15s, transform .18s ease; }
.app-select-trigger:hover .app-select-chevron { color: var(--accent-dark); background: var(--accent-soft); }
.app-select.is-open .app-select-chevron { color: #fff; background: var(--accent); transform: rotate(180deg); }
.app-select-chevron-icon { width: 15px; height: 15px; stroke-width: 2.1; }
.app-select-menu { position: absolute; z-index: 36; top: calc(100% + 7px); right: 0; left: 0; max-height: 276px; padding: 6px; overflow-y: auto; background: rgba(255, 255, 255, .98); border: 1px solid #dce1e9; border-radius: 11px; box-shadow: 0 18px 46px rgba(31, 41, 55, .16), 0 2px 8px rgba(31, 41, 55, .05); backdrop-filter: blur(12px); scrollbar-width: thin; scrollbar-color: #cbd1dc transparent; }
.app-select-menu[hidden] { display: none; }
.app-select.opens-up .app-select-menu { top: auto; bottom: calc(100% + 7px); }
.app-select-option { display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 8px 9px; color: #536071; background: transparent; border: 0; border-radius: 8px; text-align: left; transition: color .13s, background .13s; }
.app-select-option > span { overflow: hidden; font-size: 12px; font-weight: 520; text-overflow: ellipsis; white-space: nowrap; }
.app-select-option:hover, .app-select-option:focus-visible { color: var(--accent-dark); background: #f1f3ff; outline: none; }
.app-select-option.is-selected { color: var(--accent-dark); background: var(--accent-soft); font-weight: 680; }
.app-select-option-check { visibility: hidden; width: 16px; height: 16px; color: var(--accent); stroke-width: 2.3; }
.app-select-option.is-selected .app-select-option-check { visibility: visible; }
.app-select-option:disabled { color: #a5acb7; cursor: not-allowed; }
.data-filter-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.data-filter-actions-inline { align-items: center; margin-top: 0; }
.data-filter-actions-inline .primary-button, .data-filter-actions-inline .secondary-button { min-height: 36px; }
.secondary-button { display: inline-flex; align-items: center; padding: 9px 13px; color: #687384; background: transparent; border: 1px solid #dfe3eb; border-radius: 7px; font-size: 11px; text-decoration: none; }
.secondary-button:hover { color: var(--accent-dark); background: var(--soft); }
.data-table-card { margin-top: 22px; overflow: hidden; }
.data-table-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 19px 20px 14px; border-bottom: 1px solid var(--line); }
.data-table-heading h2 { margin: 4px 0 0; font-size: 16px; }
.table-hint { color: var(--muted); font-size: 10px; }
.data-table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; color: #55606f; font-size: 11px; }
.data-table th { padding: 10px 13px; color: #929aa7; background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table[data-sort-enhanced="true"] th { padding: 0; transition: color .15s, background .15s; }
.data-table th[aria-sort="ascending"], .data-table th[aria-sort="descending"] { color: var(--accent-dark); background: #fafbfc; }
.table-sort-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 38px; padding: 9px 10px 9px 13px; color: inherit; background: transparent; border: 0; outline: none; font: inherit; font-weight: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; white-space: nowrap; transition: color .15s, background .15s; }
.table-sort-button:hover, .table-sort-button:focus-visible { color: var(--accent-dark); background: transparent; }
.table-sort-button:focus-visible { box-shadow: inset 0 -2px 0 #aeb9f4; }
.table-sort-icon { flex: 0 0 16px; width: 16px; height: 16px; padding: 0; color: #9aa3b0; background: transparent; stroke-width: 2; transition: color .15s; }
.table-sort-icon path { opacity: .38; transition: opacity .15s; }
.data-table th[aria-sort="ascending"] .table-sort-icon, .data-table th[aria-sort="descending"] .table-sort-icon { color: var(--accent-dark); }
.data-table th[aria-sort="ascending"] .sort-arrow-up, .data-table th[aria-sort="descending"] .sort-arrow-down { opacity: 1; }
.data-table th[aria-sort="ascending"] .sort-arrow-down, .data-table th[aria-sort="descending"] .sort-arrow-up { opacity: .2; }
.data-table td { max-width: 330px; padding: 12px 13px; border-bottom: 1px solid #f0f1f4; vertical-align: top; }
.data-table tbody tr:hover { background: #fcfcff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.chunks-table td:first-child { color: var(--accent-dark); font-weight: 700; }
.table-document { display: inline-flex; align-items: center; gap: 7px; min-width: 170px; color: #4d5868; font-weight: 600; }
.pdf-dot { display: grid; place-items: center; width: 24px; height: 24px; color: #c35161; background: #fff0f2; border-radius: 5px; font-size: 7px; font-weight: 800; }
.table-section { display: inline-block; max-width: 160px; overflow: hidden; color: #737da9; background: var(--accent-soft); border-radius: 4px; padding: 4px 6px; text-overflow: ellipsis; white-space: nowrap; }
.chunk-id { color: #9aa3b0; font-size: 9px; }
.chunk-content-collapse { position: relative; max-width: 560px; }
.chunk-content-cell { min-width: 330px; margin: 0; max-height: 132px; overflow: hidden; overflow-wrap: anywhere; color: #667181; font: inherit; line-height: 1.5; white-space: pre-wrap; transition: max-height .22s ease; }
.chunk-content-collapse.is-expanded .chunk-content-cell { max-height: 480px; overflow-y: auto; }
.chunk-content-toggle { display: block; margin-top: 4px; padding: 2px 0 1px; color: var(--accent-dark); background: none; border: 0; cursor: pointer; font-size: 10px; font-weight: 700; }
.chunk-content-toggle:hover, .chunk-content-toggle:focus-visible { color: var(--accent); text-decoration: underline; outline: none; }
.interaction-details { max-width: 380px; }
.interaction-details summary { cursor: pointer; line-height: 1.5; }
.chunk-content-cell { min-width: 330px; margin: 0; overflow-wrap: anywhere; color: #667181; font: inherit; line-height: 1.5; white-space: pre-wrap; }
.date-cell { min-width: 122px; color: #7e8794; white-space: nowrap; }
.chat-title-cell { display: inline-block; max-width: 130px; overflow: hidden; color: #596474; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.answer-preview { margin-top: 9px; padding: 10px; color: #596474; background: var(--soft); border-left: 2px solid #cbd3ff; border-radius: 0 5px 5px 0; line-height: 1.5; }
.answer-preview p { max-height: 120px; margin: 0 0 7px; overflow: hidden; white-space: pre-wrap; }
.answer-preview small { color: var(--muted); font-size: 10px; }
.answer-preview small + small { display: block; margin-top: 4px; }
.status-badge { display: inline-block; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-badge.completed { color: #337c5c; background: #eaf7f0; }
.status-badge.failed { color: #a04452; background: #fff0f2; }

/* Verifica delle affermazioni nel dettaglio interazione */
.verification-status-badge { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.verification-status-badge.supported, .verification-status-badge.partially_supported { color: #337c5c; background: #eaf7f0; }
.verification-status-badge.insufficient_evidence { color: #9a6b1f; background: #fdf3df; }
.verification-status-badge.contradicted, .verification-status-badge.invalid_citation { color: #a04452; background: #fff0f2; }
.verification-status-badge.unverified, .verification-status-badge.disabled { color: #6a7285; background: #eef0f4; }
.verification-detail { margin-top: 10px; }
.verification-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; color: var(--muted); font-size: 9px; }
.verification-legend > span:first-child { font-weight: 700; }
.verification-list { display: flex; flex-direction: column; gap: 7px; }
.verification-claim { overflow: hidden; border: 1px solid #e0e4eb; border-radius: 10px; background: #fff; }
.verification-claim > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 11px; cursor: pointer; list-style: none; }
.verification-claim > summary::-webkit-details-marker { display: none; }
.verification-claim > summary strong { overflow: hidden; color: #4d5868; font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.verification-claim-body { padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.verification-claim-body .verification-reason { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; color: #596474; font-size: 10px; line-height: 1.5; }
.verification-claim-body .verification-reason strong { color: #6a7285; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.verification-citations { margin-top: 4px; }
.verification-citations > strong { display: block; margin-bottom: 4px; color: #6a7285; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.verification-citations ol { margin: 0; padding-left: 0; display: flex; flex-direction: column; gap: 6px; list-style: none; }
.verification-citations li { color: #596474; font-size: 10px; }
.verification-citations blockquote { margin: 3px 0 0; padding: 7px 9px; color: #596474; background: #f7f8fa; border-left: 2px solid #d5dbe6; font-size: 9.5px; line-height: 1.55; white-space: pre-wrap; }
.verification-note { margin: 8px 0 0; color: #9a6b1f; font-size: 9.5px; line-height: 1.5; }
.verdict-badge { display: inline-block; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 750; line-height: 1.3; white-space: nowrap; }
.verdict-badge.supported { color: #337c5c; background: #eaf7f0; }
.verdict-badge.partially_supported, .verdict-badge.partial { color: #337c5c; background: #eaf7f0; }
.verdict-badge.insufficient_evidence, .verdict-badge.insufficient { color: #9a6b1f; background: #fdf3df; }
.verdict-badge.contradicted { color: #a04452; background: #fff0f2; }
.verdict-badge.invalid_citation, .verdict-badge.invalid, .verdict-badge.quote_not_found { color: #a04452; background: #fff0f2; }
.verdict-badge.unverified { color: #6a7285; background: #eef0f4; }
.consulted-sources-details { margin-top: 11px; }
.consulted-sources-list { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.consulted-source { display: flex; flex-direction: column; gap: 2px; }
.consulted-source strong { color: #4d5868; font-size: 10px; }
.consulted-source span { color: var(--muted); font-size: 9px; }
.consulted-source blockquote { margin: 4px 0 0; padding: 8px 10px; color: #596474; background: #f7f8fa; border-left: 2px solid #d5dbe6; font-size: 9.5px; line-height: 1.55; white-space: pre-wrap; }
.data-strategy { display: inline-block; max-width: 145px; color: #737da9; white-space: normal; }
.source-stack { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.source-mini { display: block; max-width: 220px; overflow: hidden; color: var(--accent-dark); background: var(--accent-soft); border-radius: 4px; padding: 4px 6px; text-overflow: ellipsis; white-space: nowrap; }
.source-detail-mini { max-width: 240px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 4px; padding: 4px 6px; }
.source-detail-mini summary { overflow: hidden; cursor: pointer; text-overflow: ellipsis; white-space: nowrap; }
.source-detail-mini div { margin-top: 7px; padding-top: 7px; color: #596474; border-top: 1px solid #dce2ff; line-height: 1.5; white-space: normal; }
.muted-cell { color: #a1a8b3; }
.feedback-cell { display: inline-flex; align-items: center; min-height: 20px; }
.feedback-cell .ui-icon { width: 16px; height: 16px; }
.feedback-cell.positive { color: #3d956e; }
.feedback-cell.negative { color: #bd4c5d; }
.interaction-cell-preview { display: -webkit-box; max-width: 260px; overflow: hidden; color: #4d5868; font-weight: 650; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.45; }
.interaction-answer-preview { max-width: 300px; color: #697384; font-weight: 450; }
.interaction-detail-button { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 5px 7px 5px 10px; color: var(--accent-dark); background: #f7f8ff; border: 1px solid #dce1ff; border-radius: 8px; font-size: 10px; font-weight: 700; transition: background .15s, border-color .15s, box-shadow .15s; }
.interaction-detail-button span { display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; color: #fff; background: var(--accent); border-radius: 6px; font-size: 9px; }
.interaction-detail-button:hover, .interaction-detail-button:focus-visible { background: #fff; border-color: #aeb9f4; box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
body.interaction-dialog-open, body.document-preview-open, body.app-dialog-open { overflow: hidden; }
.app-dialog { width: min(430px, calc(100vw - 28px)); max-width: none; margin: auto; padding: 0; color: var(--ink); background: #fff; border: 1px solid #dfe3eb; border-radius: 14px; box-shadow: 0 24px 80px rgba(25, 31, 45, .22); }
.app-dialog::backdrop { background: rgba(27, 32, 44, .42); backdrop-filter: blur(3px); }
.app-dialog-shell { padding: 22px; }
.app-dialog-header { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 12px; }
.app-dialog-symbol { display: grid; width: 34px; height: 34px; place-items: center; color: #a04452; background: #fff1f3; border-radius: 50%; }
.app-dialog-symbol .ui-icon { width: 14px; height: 14px; stroke-width: 1.7; }
.app-dialog-header h2 { margin: 1px 0 5px; font-size: 17px; letter-spacing: -.02em; }
.app-dialog-header p { margin: 0; overflow-wrap: anywhere; color: #596474; font-size: 12px; line-height: 1.45; }
.app-dialog-detail { margin: 17px 0 0 46px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.app-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.data-notice-dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.data-notice-shell { padding: 25px; }
.data-notice-heading { display: flex; align-items: center; gap: 12px; }
.data-notice-heading .eyebrow { margin-bottom: 4px; }
.data-notice-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.data-notice-symbol { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; color: var(--accent-dark); background: var(--accent-soft); border-radius: 11px; }
.data-notice-symbol .ui-icon { width: 19px; height: 19px; stroke-width: 1.7; }
.data-notice-intro { margin: 20px 0 0; color: #596474; font-size: 12px; line-height: 1.6; }
.data-notice-content { margin-top: 14px; padding: 13px 15px; color: #596474; background: #f7f8fa; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; line-height: 1.6; }
.data-notice-content p { margin: 0; }
.data-notice-content h3 { margin: 18px 0 7px; color: var(--ink); font-size: 12px; font-weight: 650; }
.data-notice-content h3:first-child { margin-top: 0; }
.data-notice-content p + p { margin-top: 10px; }
.data-notice-content strong { color: #3d4b9c; }
.data-notice-muted { color: var(--muted); font-size: 10px; }
.danger-button { min-height: 36px; padding: 8px 14px; color: #fff; background: #a94b5a; border: 0; border-radius: 7px; font-size: 11px; font-weight: 700; }
.danger-button:hover, .danger-button:focus-visible { background: #943f4d; outline: 3px solid #f8dfe3; }
.interaction-dialog { width: min(1040px, calc(100vw - 32px)); max-width: none; height: min(88vh, 900px); max-height: none; margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: #fff; border: 1px solid #dfe3eb; border-radius: 18px; box-shadow: 0 28px 90px rgba(25, 31, 45, .24); }
.interaction-dialog::backdrop { background: rgba(24, 29, 42, .48); backdrop-filter: blur(3px); }
.interaction-dialog-shell { display: flex; height: 100%; flex-direction: column; }
.interaction-dialog-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 25px 19px; background: linear-gradient(135deg, #fafbff, #fff); border-bottom: 1px solid var(--line); }
.interaction-dialog-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.interaction-dialog-header h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.interaction-dialog-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.interaction-dialog-close { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; padding: 0; color: #788291; background: #f1f3f7; border: 0; border-radius: 9px; transition: color .15s, background .15s; }
.interaction-dialog-close:hover, .interaction-dialog-close:focus-visible { color: var(--ink); background: #e7eaf0; outline: 3px solid var(--accent-soft); }
.interaction-dialog-close .ui-icon { width: 17px; height: 17px; }
.interaction-dialog-body { flex: 1; min-height: 0; padding: 22px 25px 32px; overflow-y: auto; overscroll-behavior: contain; background: #fbfbfc; }
.interaction-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.interaction-metrics > div { display: flex; min-width: 0; min-height: 70px; flex-direction: column; justify-content: center; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.interaction-metrics span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.interaction-metrics strong { margin-top: 7px; overflow: hidden; color: #4654a9; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.interaction-detail-section { margin-top: 13px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 4px 16px rgba(38, 46, 66, .025); }
.interaction-detail-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.interaction-detail-heading h3 { margin: 4px 0 0; color: #3f4957; font-size: 15px; }
.interaction-detail-heading > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.interaction-qa-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 11px; }
.interaction-qa-grid article { padding: 13px 14px; background: #f7f8fa; border-radius: 9px; }
.interaction-qa-grid article > span, .interaction-rephrased > span { color: #7a8493; font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.interaction-qa-grid p, .interaction-rephrased p { margin: 7px 0 0; color: #4f5a69; font-size: 11px; line-height: 1.6; white-space: pre-wrap; }
.interaction-rephrased { margin-top: 10px; padding: 11px 13px; background: var(--accent-soft); border-left: 3px solid #aeb9f4; border-radius: 0 8px 8px 0; }
.interaction-error { margin-top: 10px; padding: 11px 13px; color: #8c3f4d; background: #fff2f4; border: 1px solid #f1cbd2; border-radius: 8px; }
.interaction-error p { margin: 4px 0 0; font-size: 10px; line-height: 1.5; }
.interaction-timeline { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.interaction-timeline li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; min-height: 54px; padding-bottom: 10px; }
.interaction-timeline li:not(:last-child)::before { position: absolute; top: 27px; bottom: -1px; left: 13px; width: 1px; content: ''; background: #dfe3eb; }
.timeline-index { z-index: 1; display: grid; width: 28px; height: 28px; place-items: center; color: #477b61; background: #eaf7f0; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #d6ede1; font-size: 9px; font-weight: 750; }
.interaction-timeline li.failed .timeline-index { color: #a04452; background: #fff0f2; box-shadow: 0 0 0 1px #f1cbd2; }
.timeline-title { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-top: 3px; }
.timeline-title strong { color: #4a5564; font-size: 11px; text-transform: capitalize; }
.timeline-title span { color: var(--muted); font-size: 9px; }
.interaction-timeline p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.interaction-empty-state { margin: 0; padding: 12px; color: #929aa7; background: #f7f8fa; border-radius: 8px; font-size: 10px; text-align: center; }
.retrieval-list, .tool-call-list, .interaction-source-list { display: flex; flex-direction: column; gap: 8px; }
.retrieval-card, .tool-call-card, .interaction-source-list details { overflow: hidden; border: 1px solid #e0e4eb; border-radius: 10px; }
.retrieval-card > summary, .tool-call-card > summary { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; cursor: pointer; list-style: none; }
.retrieval-card > summary::-webkit-details-marker, .tool-call-card > summary::-webkit-details-marker { display: none; }
.retrieval-card > summary:hover, .tool-call-card > summary:hover { background: #fafbff; }
.retrieval-card > summary > span:nth-child(2), .tool-call-card > summary > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.retrieval-card summary strong, .tool-call-card summary strong { color: #4a5564; font-size: 11px; }
.retrieval-card summary small, .tool-call-card summary small { color: var(--muted); font-size: 9px; }
.retrieval-sequence, .tool-call-sequence { display: grid; width: 28px; height: 28px; place-items: center; color: var(--accent-dark); background: var(--accent-soft); border-radius: 7px; font-size: 10px; font-weight: 750; }
.retrieval-card .source-chevron, .tool-call-card .source-chevron { color: #8993a2; }
.retrieval-card[open] > summary, .tool-call-card[open] > summary { background: #fbfbfe; border-bottom: 1px solid var(--line); }
.retrieval-card-body { padding: 13px; }
.trace-definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
.trace-definition-grid > div { min-width: 0; padding: 9px 10px; background: #f7f8fa; border-radius: 7px; }
.trace-definition-grid dt { color: #8992a0; font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.trace-definition-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; color: #505b69; font-size: 10px; line-height: 1.45; }
.retrieval-chunks { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; }
.retrieval-chunk { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 9px; background: #fbfbfc; border: 1px solid #eff0f3; border-radius: 7px; }
.retrieval-chunk > span { color: var(--accent-dark); font-size: 9px; font-weight: 750; }
.retrieval-chunk > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.retrieval-chunk strong { overflow: hidden; color: #4d5868; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.retrieval-chunk small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.retrieval-chunk em { color: #6673bd; font-size: 9px; font-style: normal; font-weight: 700; }
.agent-trace-section { border-color: #dce1f8; }
.agent-iterations { display: flex; gap: 7px; margin-bottom: 11px; overflow-x: auto; padding-bottom: 2px; }
.agent-iteration { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-width: 150px; padding: 8px 10px; background: #f5f6ff; border-radius: 8px; }
.agent-iteration > span { display: grid; width: 23px; height: 23px; place-items: center; color: #fff; background: var(--accent); border-radius: 6px; font-size: 9px; font-weight: 750; }
.agent-iteration > div { display: flex; flex-direction: column; gap: 3px; }
.agent-iteration strong { color: #4d5871; font-size: 9px; }
.agent-iteration small { max-width: 190px; overflow: hidden; color: #7b8497; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tool-call-payload { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 11px; }
.tool-call-payload > div > span { color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.tool-call-payload pre, .configuration-details pre { max-height: 220px; margin: 6px 0 0; padding: 10px; overflow: auto; color: #4f5968; background: #f5f6f8; border-radius: 7px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; line-height: 1.5; white-space: pre-wrap; }
.interaction-source-list details > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 11px; cursor: pointer; list-style: none; }
.interaction-source-list details > summary::-webkit-details-marker { display: none; }
.interaction-source-list summary > span { color: var(--accent-dark); font-size: 9px; font-weight: 750; }
.interaction-source-list summary strong { overflow: hidden; color: #4d5868; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.interaction-source-list summary small { color: var(--muted); font-size: 8px; }
.interaction-source-list blockquote { margin: 0; padding: 11px 13px; color: #596474; background: #f7f8fa; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.6; white-space: pre-wrap; }
.configuration-details { margin-top: 9px; overflow: hidden; border: 1px solid #e0e4eb; border-radius: 8px; }
.configuration-details > summary { padding: 10px 11px; color: #596474; background: #fafbfc; cursor: pointer; font-size: 10px; font-weight: 650; }
.configuration-details pre { max-height: 300px; margin: 0; border-radius: 0; }
.data-empty { display: flex; flex-direction: column; align-items: center; padding: 55px 20px; color: #596474; text-align: center; }
.interactions-empty { min-height: 230px; justify-content: center; }
.data-empty > span { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 12px; color: #a3adbd; background: var(--soft); border-radius: 12px; font-size: 23px; }
.data-empty p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.pipeline-unavailable { display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px; color: #a04452; background: #fff0f2; border-radius: 17px; font-size: 11px; font-weight: 650; }

@media (min-width: 701px) and (max-width: 1100px) {
  .chunk-filter-grid, .interaction-filter-grid { grid-template-columns: 1fr 1fr; }
  .chunk-filter-grid .filter-field-wide { grid-column: 1 / -1; }
  .data-filter-actions-inline { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .app-shell { min-height: 100%; }
  .app-sidebar { position: fixed; z-index: 10; top: 0; bottom: 0; left: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 15px 0 35px rgba(20, 25, 40, .1); }
  .sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-collapse-icon { display: none; }
  .sidebar-mobile-close-icon { display: block; }
  .mobile-topbar { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 17px; border-bottom: 1px solid var(--line); }
  .mobile-title { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
  .app-main { flex-direction: column; }
  .chat-header { display: none; }
  .chat-thread { padding: 25px 17px 20px; }
  .composer-area { padding: 0 12px 13px; }
  .composer-topline { flex-wrap: wrap; }
  .composer-divider { display: none; }
  .document-filter-menu { right: 0; left: auto; }
  .message-bubble { max-width: 90%; }
  .message-content { max-width: 90%; }
  .message-row-assistant .message-bubble { max-width: 100%; }
  .chat-table-shell { width: calc(100vw - 34px); margin: 14px 0 16px; border-radius: 9px; }
  .message-assistant .chat-table-shell table { min-width: 540px; font-size: 12px; }
  .message-assistant .chat-table-shell th { padding: 10px 12px; }
  .message-assistant .chat-table-shell td { padding: 11px 12px; }
  .message-meta { gap: 7px; }
  .message-sources > summary { align-items: flex-start; flex-wrap: wrap; }
  .message-sources-count { order: 3; }
  .message-source-list { padding: 8px; }
  .message-source-passage-header { flex-wrap: wrap; }
  .documents-header { align-items: flex-start; padding: 31px 18px 25px; }
  .documents-header h1 { font-size: 26px; }
  .document-count-card { min-width: 70px; height: 64px; }
  .ingestion-job { grid-template-columns: 1fr; gap: 11px; }
  .ingestion-job-attempts { align-items: flex-start; text-align: left; }
  .documents-content { padding: 20px 12px 40px; }
  .upload-card { padding: 17px; }
  .upload-actions { align-items: stretch; flex-direction: column; gap: 10px; }
  .upload-status { margin-right: 0; }
  .primary-button { width: 100%; }
  .document-card { align-items: flex-start; flex-wrap: wrap; }
  .document-stats { width: calc(100% - 52px); margin-left: 52px; }
  .document-card-actions { margin-left: auto; }
  .document-preview-button span { display: none; }
  .document-preview-button { width: 30px; padding: 0; justify-content: center; }
  .document-preview-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); border-radius: 13px; }
  .document-preview-header { padding: 17px; }
  .document-preview-toolbar { padding: 7px 17px; }
  .document-preview-toolbar > span { display: none; }
  .document-preview-content { padding: 12px; }
  .document-preview-rendered, .document-preview-raw { padding: 23px 18px; }
  .data-header { align-items: flex-start; padding: 31px 18px 25px; }
  .data-header h1 { font-size: 26px; }
  .data-summary { min-width: 70px; height: 64px; }
  .data-content { padding: 20px 12px 40px; }
  .data-filter-card { padding: 16px; }
  .chunk-filter-grid, .interaction-filter-grid, .document-filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-field-wide { grid-column: 1 / -1; }
  .data-filter-actions-inline { grid-column: 1 / -1; }
  .data-filter-actions { align-items: stretch; flex-direction: column-reverse; }
  .secondary-button, .data-filter-actions .primary-button { justify-content: center; width: 100%; }
  .data-table-heading { align-items: flex-start; flex-direction: column; }
  .interaction-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); border-radius: 13px; }
  .app-dialog-shell { padding: 19px; }
  .app-dialog-detail { margin-left: 0; }
  .interaction-dialog-header { padding: 18px; }
  .interaction-dialog-body { padding: 14px; }
  .interaction-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .interaction-metrics > div { min-height: 60px; }
  .interaction-detail-section { padding: 14px; }
  .interaction-qa-grid, .tool-call-payload, .trace-definition-grid { grid-template-columns: 1fr; }
  .interaction-detail-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .interaction-source-list details > summary { grid-template-columns: auto minmax(0, 1fr); }
  .interaction-source-list summary small { grid-column: 2; }
}

.settings-form { display: grid; gap: 12px; max-width: 460px; padding: 24px; }
.settings-form label { font-weight: 650; }
.settings-form select { padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.settings-form p { margin: 0 0 8px; }
.message-strategy { font-size: 12px; color: #566173; font-weight: 650; }
.message-sources > summary { position: relative; }
.message-info { display: inline-grid; flex: 0 0 auto; place-items: center; color: var(--accent-dark); cursor: help; }
.message-info .ui-icon { width: 16px; height: 16px; }
.message-info-text {
  position: absolute;
  z-index: 2;
  top: 100%;
  left: 0;
  width: min(220px, 80vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #323b4c;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  visibility: hidden;
}
.message-info:hover .message-info-text,
.message-info:focus .message-info-text { visibility: visible; }
.feedback-actions > .message-info { position: relative; width: 24px; height: 28px; }
.feedback-actions .message-info-text { right: 0; left: auto; }
