:root {
  --background: #f4f6f8;
  --surface: #fff;
  --sidebar: #ffffff;
  --sidebar-muted: #9ca5bc;
  --text: #172c3e;
  --muted: #5f6f7e;
  --line: #e1e7ec;
  --primary: #2465ad;
  --primary-dark: #19538f;
  --primary-soft: #edf5fd;
  --success: #427217;
  --danger: #b33443;
  --radius: 13px;
  --shadow: 0 2px 6px rgb(22 31 55 / 2%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
:focus-visible { outline: 3px solid #5b97de; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 14px; top: -60px; padding: 10px 16px; background: white; border-radius: 8px; }
.skip-link:focus { top: 10px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh; padding: 31px 16px 20px; display: flex; flex-direction: column; background: var(--sidebar); color: #f5f6ff; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 27px; font-weight: 710; letter-spacing: -1px; line-height: 1; }
.sidebar .brand { padding: 0 10px; }
.brand-mark { display: inline-flex; width: 31px; height: 35px; align-items: center; justify-content: center; color: #a4b0ff; }
.brand-mark .icon { width: 29px; height: 29px; stroke-width: 1.8; }
.brand-dot { color: #8b9bff; }
.nav-list { display: flex; flex-direction: column; gap: 7px; margin-top: 49px; }
.nav-item { min-height: 44px; display: flex; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 8px; color: #5f6f7e; font-size: 14px; font-weight: 520; transition: background .15s, color .15s; }
.nav-item:hover { background: #232b44; color: #fff; }
.nav-item.is-active { background: #2c3557; color: #fff; box-shadow: inset 3px 0 0 #90a0ff; }
.nav-item .icon { width: 18px; height: 18px; }
.sidebar-bottom { margin-top: auto; display: flex; gap: 10px; align-items: center; border-top: 1px solid #2c3248; padding: 21px 9px 0; }
.workspace-mark { display: grid; place-items: center; width: 32px; height: 32px; background: #262d43; border-radius: 8px; color: #5f6f7e; flex-shrink: 0; }
.workspace-name { color: #5f6f7e; font-size: 14px; overflow-wrap: anywhere; }
.app-main { min-width: 0; }
.topbar { min-height: 77px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 36px; background: white; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #5f6f7e; font-size: 14px; min-width: 0; }
.breadcrumb a { color: #667086; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36vw; color: #596275; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.topbar-actions form { display: flex; }
.topbar-divider { width: 1px; height: 23px; background: var(--line); margin: 0 3px; }
.user-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #edf5fd; color: #2465ad; font-size: 14px; font-weight: 700; }
.user-name { font-size: 14px; color: #626c80; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-content { padding: 34px 36px 50px; max-width: 1740px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
h1 { font-size: clamp(24px, 2vw, 29px); line-height: 1.25; letter-spacing: -.75px; font-weight: 680; overflow-wrap: anywhere; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 550; margin-bottom: 7px; }
.button { border: 1px solid transparent; border-radius: 8px; padding: 10px 16px; min-height: 41px; font-weight: 580; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; line-height: 1.4; transition: background .15s, border-color .15s; }
.button .icon { width: 17px; height: 17px; }
.button-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 3px rgb(82 99 217 / 12%); }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { background: white; border-color: #dfe3ee; color: #4c566c; }
.button-secondary:hover { border-color: #b8c0d8; background: #fbfbfe; }
.button-ghost { color: #677187; background: transparent; }
.button-ghost:hover { background: #f1f3f9; }
.button:disabled { background: #f0f2f7; border-color: #e6e9f0; color: #5f6f7e; box-shadow: none; }
.button-compact { min-height: 37px; padding: 8px 12px; }
.button-small { min-height: 31px; padding: 6px 10px; font-size: 13px; }
.button-small .icon { width: 14px; height: 14px; }
.button-full { width: 100%; }
.icon-button { width: 33px; height: 33px; border-radius: 7px; padding: 6px; display: inline-flex; align-items: center; justify-content: center; color: #5f6f7e; border: 0; background: transparent; }
.icon-button:hover { color: var(--primary); background: var(--primary-soft); }
.icon-button.small { width: 27px; height: 27px; padding: 5px; }
.icon-button.small .icon { width: 16px; height: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { min-height: 61px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 21px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 650; letter-spacing: -.1px; }
.panel-heading h2 .icon { width: 17px; height: 17px; color: #5f6f7e; }
.panel-body { padding: 20px; }
.small-label { font-size: 12px; color: #5f6f7e; }
.count-badge { display: inline-grid; place-items: center; background: #f2f4f8; color: #5f6f7e; font-size: 12px; font-weight: 600; min-width: 22px; height: 21px; border-radius: 6px; padding: 0 6px; }
.filter-bar { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.search-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding-left: 11px; max-width: 410px; width: 100%; gap: 9px; }
.search-input .icon { width: 17px; height: 17px; color: #5f6f7e; }
.search-input input { width: 100%; border: 0; min-height: 37px; padding: 8px 10px 8px 0; background: transparent; font-size: 14px; }
.search-input:focus-within { border-color: #5b97de; box-shadow: 0 0 0 3px var(--primary-soft); }
.search-input input:focus { outline: 0; box-shadow: none; }
.filter-bar select { min-width: 160px; width: auto; padding: 8px 30px 8px 12px; min-height: 39px; font-size: 14px; }
.filter-bar .button { min-height: 39px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { border: 1px solid #dde2ed; border-radius: 8px; background: #fff; padding: 10px 12px; color: var(--text); width: 100%; min-height: 42px; }
input::placeholder, textarea::placeholder { color: #5f6f7e; opacity: 1; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { outline: 0; border-color: #5b97de; box-shadow: 0 0 0 3px var(--primary-soft); }
.search-input input:not([type=checkbox]):not([type=radio]) { border: 0; padding-left: 0; min-height: 37px; }
textarea { resize: vertical; min-height: 105px; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background: #fcfcfe; font-weight: 500; font-size: 12px; color: #5f6f7e; padding: 13px 21px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table td { font-size: 14px; padding: 21px; border-bottom: 1px solid #eef0f5; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table td:last-child { width: 35px; padding-left: 3px; }
.table-main-link { font-weight: 620; display: inline-block; overflow-wrap: anywhere; }
.table-main-link:hover { color: var(--primary); }
.table-secondary { color: #5f6f7e; font-size: 12px; margin-top: 5px; }
.dot-separator { margin: 0 6px; color: #5f6f7e; }
.table-date { color: #69748a; white-space: nowrap; font-size: 13px !important; }
.table-date span { display: block; color: #5f6f7e; font-size: 12px; margin-top: 3px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; font-size: 12px; line-height: 1.2; font-weight: 550; color: #5f6f7e; background: #f0f2f6; white-space: nowrap; }
.status > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-processing { color: #2465ad; background: #edf5fd; }
.status-needs_input { color: #955100; background: #fff3e3; }
.status-ready { color: #42691f; background: #f0f7e5; }
.status-error { color: #a42d3b; background: #fff0f1; }
.empty-state { padding: 74px 24px 81px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 21px; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 59px; height: 59px; background: #edf5fd; color: #5f6f7e; border-radius: 17px; }
.empty-icon .icon { width: 27px; height: 27px; stroke-width: 1.4; }
.empty-state h2, .chat-empty h2 { font-size: 15px; font-weight: 580; color: #66728b; }
.contact-lines { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #5f6f7e; }
.contact-lines a:hover { color: var(--primary); }
.back-link { display: inline-flex; gap: 6px; align-items: center; color: #5f6f7e; font-size: 13px; margin-bottom: 13px; }
.back-link:hover { color: var(--primary); }
.back-link .icon { width: 14px; height: 14px; }
.form-panel { max-width: 720px; }
.standard-form { padding: 29px; }
.form-field { margin-bottom: 21px; }
.form-field label { display: block; margin-bottom: 7px; color: #59657b; font-weight: 520; font-size: 14px; }
.form-field input, .form-field select, .form-field textarea { font-size: 15px; }
.form-field textarea { min-height: 104px; }
.checkbox-field { display: flex; align-items: center; gap: 10px; }
.checkbox-field label { margin: 0; order: 1; }
.has-error input, .has-error select, .has-error textarea { border-color: #d98f9b; }
.errorlist { list-style: none; padding: 0; margin: 0; }
.field-errors { color: var(--danger); font-size: 13px; margin-top: 6px; }
.form-errors, .inline-error { background: #fff1f3; color: #b34f5e; padding: 12px 14px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.form-errors li + li { margin-top: 5px; }
.form-actions { display: flex; align-items: center; gap: 10px; padding-top: 6px; flex-wrap: wrap; }
.form-side-link { margin-left: auto; font-size: 13px; color: var(--primary); }
.form-side-link:hover, .text-link:hover { text-decoration: underline; }
.heading-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.deal-heading { align-items: center; margin-bottom: 25px; }
.deal-meta { display: flex; flex-wrap: wrap; gap: 0; color: #5f6f7e; font-size: 13px; margin-top: 12px; }
.deal-meta span + span::before { content: "·"; padding: 0 10px; color: #5f6f7e; }
.deal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 345px; align-items: start; gap: 23px; }
.chat-panel { display: flex; flex-direction: column; min-height: 610px; }
.chat-history { height: max(420px, calc(100vh - 470px)); max-height: 760px; overflow-y: auto; overscroll-behavior: contain; padding: 25px 23px; scrollbar-width: thin; scrollbar-color: #d9deec transparent; }
.chat-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; padding: 35px 15px; text-align: center; }
.chat-empty p { color: #5f6f7e; font-size: 13px; margin-top: -7px; }
.chat-message { display: flex; gap: 12px; margin-bottom: 28px; }
.chat-message:last-child { margin-bottom: 0; }
.message-avatar { width: 30px; height: 30px; border-radius: 9px; background: #f0f7e5; display: grid; place-items: center; color: #42691f; font-size: 13px; font-weight: 650; flex-shrink: 0; }
.message-assistant .message-avatar { background: #edf5fd; color: #2465ad; }
.message-system .message-avatar { background: #f2f4f7; color: #5f6f7e; }
.message-avatar .icon { width: 17px; height: 17px; }
.message-body { min-width: 0; flex: 1; }
.message-meta { display: flex; align-items: center; gap: 12px; padding: 4px 0 9px; }
.message-meta strong { font-size: 13px; font-weight: 650; }
.message-meta time { font-size: 12px; color: #5f6f7e; }
.message-text { font-size: 14px; line-height: 1.8; color: #5e6b83; overflow-wrap: anywhere; }
.message-system .message-text { color: #5f6f7e; font-size: 13px; }
.message-attachment { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; margin-top: 10px; background: #f8fafc; font-size: 13px; color: #6b7790; max-width: 350px; }
.message-attachment:hover { border-color: #c2caee; }
.message-attachment > span { flex: 1; overflow-wrap: anywhere; }
.message-attachment .icon { width: 17px; height: 17px; color: #5f6f7e; }
.message-attachment small { display: block; font-size: 12px; color: #5f6f7e; margin-top: 3px; }
.message-attachment.is-inactive { opacity: .6; }
.chat-composer { border-top: 1px solid var(--line); padding: 19px 22px 16px; background: #fff; }
.chat-composer textarea { border: 0; background: transparent; resize: vertical; padding: 0 0 10px; min-height: 70px; max-height: 240px; font-size: 14px; line-height: 1.7; border-radius: 0; }
.chat-composer textarea:focus { border: 0; box-shadow: none; }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.attachment-button { padding-left: 0; min-height: 34px; color: #5f6f7e; font-size: 13px; }
.attachment-button:focus-within { outline: 3px solid #5b97de; outline-offset: 3px; }
.composer-files:empty { display: none; }
.composer-files { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 10px; }
.file-chip { font-size: 12px; padding: 5px 8px; border-radius: 6px; background: #edf5fd; color: #5f6f7e; overflow-wrap: anywhere; max-width: 100%; }
.chat-composer .inline-error { margin-bottom: 10px; }
.deal-aside { display: flex; flex-direction: column; gap: 19px; min-width: 0; }
.section-empty { color: #5f6f7e; font-size: 13px; text-align: center; padding: 13px 0 24px; }
.document-list .section-empty { padding: 30px 20px; }
.inline-alert { display: flex; gap: 9px; padding: 11px 12px; border-radius: 7px; font-size: 13px; line-height: 1.65; margin-bottom: 15px; }
.inline-alert .icon { width: 15px; height: 15px; margin-top: 2px; }
.alert-error { color: #b45c6b; background: #fdf1f3; }
.alert-warning { color: #a3834e; background: #fcf7ec; }
.findings { display: flex; flex-direction: column; gap: 11px; margin-bottom: 19px; }
.finding { padding: 12px; border: 1px solid #f0e6cd; border-radius: 8px; background: #fffdf7; }
.finding-blocker { background: #fff9fa; border-color: #f1dde1; }
.finding-info { background: #f9faff; border-color: #e4e9f7; }
.finding-title { display: flex; gap: 7px; align-items: center; color: #b09253; font-size: 12px; font-weight: 620; }
.finding-blocker .finding-title { color: #5f6f7e; }
.finding-info .finding-title { color: #5f6f7e; }
.finding-title .icon { width: 14px; height: 14px; }
.finding p { font-size: 13px; color: #5f6f7e; line-height: 1.7; margin-top: 7px; overflow-wrap: anywhere; }
.evidence { margin-top: 9px; font-size: 12px; color: #5f6f7e; }
.evidence summary { display: flex; gap: 5px; align-items: center; list-style: none; }
.evidence summary::-webkit-details-marker { display: none; }
.evidence summary span { flex: 1; overflow-wrap: anywhere; }
.evidence summary .icon { width: 12px; height: 12px; }
.evidence[open] summary .icon:last-child { transform: rotate(180deg); }
.evidence-content { padding: 7px 0 0; }
.evidence-content blockquote { border-left: 2px solid #d7ddeb; margin: 4px 0 8px; padding: 0 0 0 8px; color: #5f6f7e; overflow-wrap: anywhere; }
.evidence-content a { color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.evidence-content a .icon { width: 11px; height: 11px; }
.check-success { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--success); margin: 3px 0 21px; }
.check-success .icon { width: 17px; height: 17px; }
.connection-empty { text-align: center; font-size: 13px; color: #5f6f7e; margin-bottom: 14px; }
.extracted-fields { border-top: 1px solid var(--line); padding: 16px 20px; }
.extracted-fields > summary { display: flex; align-items: center; gap: 8px; list-style: none; font-size: 13px; color: #5f6f7e; }
.extracted-fields > summary::-webkit-details-marker { display: none; }
.extracted-fields > summary > .icon { width: 14px; height: 14px; margin-left: auto; }
.extracted-fields[open] > summary > .icon { transform: rotate(180deg); }
.extracted-fields dl { margin: 7px 0 0; }
.extracted-field { padding: 12px 0; border-bottom: 1px solid var(--line); }
.extracted-field:last-child { border-bottom: 0; padding-bottom: 0; }
.extracted-field dt { font-size: 12px; color: #5f6f7e; }
.extracted-field dd { margin: 4px 0 0; font-size: 14px; color: #63728a; overflow-wrap: anywhere; }
.muted { color: #5f6f7e; }
.document-item { display: flex; align-items: flex-start; gap: 10px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.document-item:last-child { border-bottom: 0; }
.document-file-icon { width: 30px; height: 35px; background: #edf5fd; color: #5f6f7e; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.document-file-icon .icon { width: 17px; height: 17px; }
.document-info { flex: 1; min-width: 0; padding-top: 1px; }
.document-info > a { font-size: 13px; font-weight: 550; display: block; overflow-wrap: anywhere; color: #69758c; }
.document-info > a:hover { color: var(--primary); }
.document-info > span { display: block; color: #5f6f7e; font-size: 12px; margin-top: 5px; }
.document-info .dot-separator { margin: 0 5px; }
.document-item.is-inactive { background: #fcfcfe; }
.document-item.is-inactive .document-file-icon, .document-item.is-inactive .document-info { opacity: .55; }
.document-error { color: #5f6f7e; font-size: 12px; margin-top: 7px; overflow-wrap: anywhere; }
.document-item form { margin: 1px -5px 0 0; }
.package-list { display: flex; flex-direction: column; gap: 17px; }
.package-item strong { font-size: 14px; font-weight: 600; color: #626f85; }
.package-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: #5f6f7e; margin: 5px 0 10px; }
.version-badge { font-size: 11px; padding: 2px 5px; border-radius: 4px; background: #fcf4e6; color: #b29664; }
.package-actions { display: flex; gap: 8px; }
.generate-form { margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--line); }
.generate-form select { font-size: 13px; margin-bottom: 10px; min-height: 38px; }
.empty-template { color: #5f6f7e; font-size: 13px; margin: 2px 0 9px; }
.text-link { color: var(--primary); font-size: 13px; display: inline-flex; gap: 5px; align-items: center; }
.text-link .icon { width: 13px; height: 13px; }
.participants-panel > summary { padding: 18px 20px; display: flex; align-items: center; gap: 9px; list-style: none; font-size: 14px; }
.participants-panel > summary::-webkit-details-marker { display: none; }
.participants-panel > summary > span:first-child { display: flex; gap: 8px; align-items: center; margin-right: auto; }
.participants-panel > summary .icon { color: #5f6f7e; width: 16px; height: 16px; }
.participants-panel > summary > .icon { width: 13px; height: 13px; }
.participants-panel[open] > summary { border-bottom: 1px solid var(--line); }
.participants-panel[open] > summary > .icon { transform: rotate(180deg); }
.participant-item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; margin-bottom: 14px; color: #5f6f7e; }
.participant-item .small-label { text-align: right; flex-shrink: 0; }
.participant-form { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 16px; }
.participant-form .form-field { margin-bottom: 13px; }
.participant-form .form-field label { font-size: 12px; }
.participant-form select { font-size: 13px; min-height: 36px; padding: 7px 10px; }
.templates-layout { display: grid; grid-template-columns: minmax(0, 1fr) 335px; align-items: start; gap: 24px; }
.template-item { display: flex; align-items: center; gap: 16px; padding: 23px; border-bottom: 1px solid var(--line); }
.template-item:last-child { border-bottom: 0; }
.template-file-icon { display: grid; place-items: center; width: 42px; height: 48px; border-radius: 9px; background: #edf5fd; color: #5f6f7e; flex-shrink: 0; }
.template-info { flex: 1; min-width: 0; }
.template-info strong { font-size: 15px; font-weight: 600; display: block; overflow-wrap: anywhere; }
.template-info > span { display: block; font-size: 13px; color: #5f6f7e; margin-top: 5px; }
.template-info > span.small-label { font-size: 12px; color: #5f6f7e; }
.upload-template-panel .standard-form { padding: 22px; }
.upload-template-panel .form-field:last-of-type { margin-bottom: 24px; }
input[type=file] { font-size: 13px !important; padding: 7px !important; color: #5f6f7e !important; }
input[type=file]::file-selector-button { border: 0; background: #edf5fd; color: #2465ad; padding: 7px; font-family: inherit; border-radius: 5px; margin-right: 8px; cursor: pointer; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 650px) 305px; align-items: start; gap: 24px; }
.settings-panel { max-width: none; }
.connection-state { display: inline-flex; align-items: center; gap: 6px; color: #5f6f7e; font-size: 12px; white-space: nowrap; }
.connection-state > span { width: 5px; height: 5px; border-radius: 50%; background: #b0b6c5; }
.connection-state.is-connected { color: #42691f; }
.connection-state.is-connected > span { background: #73ad99; }
.connection-details { margin: 0 0 22px; }
.connection-details dt { color: #5f6f7e; font-size: 12px; }
.connection-details dd { color: #5f6f7e; font-size: 14px; margin: 7px 0 0; }
.settings-readonly { padding: 0 29px 20px; }
.settings-readonly div { padding-top: 20px; }
.settings-readonly dt { font-size: 13px; color: #5f6f7e; }
.settings-readonly dd { margin: 6px 0 0; font-size: 15px; }
.flash-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 23px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; background: #edf1fd; border: 1px solid #dfe6fc; color: #5f6f7e; font-size: 14px; border-radius: 9px; overflow-wrap: anywhere; }
.flash .icon { width: 17px; height: 17px; margin-top: 1px; }
.flash-error { background: #fdf0f3; border-color: #f5dce3; color: #b9687a; }
.flash-success { background: #edf7f3; border-color: #dceee6; color: #6d998a; }
.flash-warning { background: #fdf7eb; border-color: #f1e8cf; color: #b19a66; }
.notifications-menu { position: relative; }
.notifications-menu > summary { list-style: none; position: relative; }
.notifications-menu > summary::-webkit-details-marker { display: none; }
.notification-count { position: absolute; top: 0; right: -2px; padding: 1px 4px; background: #e58d96; color: #fff; font-size: 11px; line-height: 1.4; min-width: 13px; border-radius: 5px; }
.notification-popover { position: absolute; right: 0; top: 43px; width: 355px; max-height: 480px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 12px 45px rgb(28 38 65 / 12%); z-index: 20; }
.popover-heading { font-size: 14px; font-weight: 600; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.notification-item { padding: 16px 18px; display: flex; gap: 10px; border-bottom: 1px solid #f0f2f7; font-size: 13px; color: #5f6f7e; }
.notification-item > div { flex: 1; }
.notification-item a:hover { color: var(--primary); }
.notification-item.is-unread { background: #fafbff; color: #5f6d89; }
.notification-item time { display: block; color: #5f6f7e; font-size: 12px; margin-top: 6px; }
.notification-item:last-child { border-bottom: 0; }
.notification-empty { padding: 35px 20px; font-size: 14px; color: #5f6f7e; text-align: center; }
.spinner { width: 15px; height: 15px; display: inline-block; border: 2px solid #e3e7fb; border-top-color: #8090de; border-radius: 50%; animation: spin 1s linear infinite; flex-shrink: 0; }
.processing-indicator, .analysis-running { display: flex; gap: 8px; align-items: center; color: #5f6f7e; font-size: 13px; padding: 7px 0 11px; }
.analysis-running { margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px 20px; background: radial-gradient(ellipse at 15% 5%, #eaedfb 0, transparent 55%), var(--background); }
.login-card { width: 100%; max-width: 440px; padding: 39px; border: 1px solid #e6e9f3; border-radius: 18px; background: white; box-shadow: 0 16px 70px rgb(48 65 117 / 5%); }
.login-brand { color: #28324a; margin-bottom: 35px; }
.login-brand .brand-mark { color: #7182d5; }
.login-card h1 { font-size: 22px; letter-spacing: -.4px; max-width: 260px; line-height: 1.4; }
.login-card .standard-form { padding: 29px 0 0; }
.login-card .button { margin-top: 10px; }
.login-footer { margin-top: 24px; font-size: 12px; color: #5f6f7e; letter-spacing: .1px; }
[hidden] { display: none !important; }
@media (min-width: 1600px) { .page-content { padding-top: 42px; } .deal-grid { grid-template-columns: minmax(0, 1fr) 375px; gap: 26px; } .chat-panel { min-height: 690px; } .chat-history { height: max(490px, calc(100vh - 465px)); } }
@media (max-width: 1200px) { .app-shell { grid-template-columns: 190px minmax(0, 1fr); } .sidebar { padding-right: 12px; padding-left: 12px; } .nav-item { font-size: 13px; gap: 9px; padding-left: 10px; padding-right: 8px; } .page-content, .topbar { padding-left: 25px; padding-right: 25px; } .deal-grid { grid-template-columns: minmax(0, 1fr) 305px; gap: 17px; } .panel-heading { padding-left: 17px; padding-right: 17px; } .panel-body { padding: 17px; } .chat-history { padding-left: 17px; padding-right: 17px; } .chat-composer { padding-left: 17px; padding-right: 17px; } .data-table td, .data-table th { padding-left: 17px; padding-right: 17px; } .templates-layout { grid-template-columns: minmax(0, 1fr) 305px; gap: 18px; } .settings-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; } }
@media (max-width: 1000px) { .app-shell { grid-template-columns: 72px minmax(0, 1fr); } .sidebar { padding: 27px 10px 20px; align-items: center; } .sidebar .brand { padding: 0; } .sidebar .brand > span:last-child, .nav-item > span, .workspace-name { display: none; } .nav-list { width: 100%; gap: 13px; } .nav-item { justify-content: center; padding: 12px; } .nav-item .icon { width: 20px; height: 20px; } .sidebar-bottom { padding-left: 0; padding-right: 0; width: 100%; justify-content: center; } .deal-grid { grid-template-columns: minmax(0, 1fr) 300px; } .page-content, .topbar { padding-left: 22px; padding-right: 22px; } .settings-layout { grid-template-columns: 1fr; max-width: 720px; } .connection-panel { max-width: none; } }
@media (max-width: 820px) { .deal-grid { grid-template-columns: 1fr; } .deal-aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .chat-history { height: 470px; } .analysis-panel { grid-row: span 2; } .deal-heading { align-items: flex-start; } .templates-layout { grid-template-columns: 1fr; } .upload-template-panel { max-width: 600px; } .filter-bar { flex-wrap: wrap; } .search-input { max-width: none; flex: 1; min-width: 200px; } .user-name { max-width: 110px; } .data-table { min-width: 630px; } }
@media (max-width: 600px) { .app-shell { display: block; padding-bottom: 65px; } .sidebar { position: fixed; height: 61px; width: 100%; top: auto; bottom: 0; padding: 0 10px; z-index: 30; display: block; border-top: 1px solid #2c3551; } .sidebar .brand, .sidebar-bottom { display: none; } .nav-list { margin: 0; display: flex; flex-direction: row; height: 100%; gap: 0; } .nav-item { flex: 1; border-radius: 0; height: 100%; min-height: 0; } .nav-item.is-active { box-shadow: inset 0 3px 0 #8e9ff1; background: #252e4c; } .topbar { min-height: 61px; padding: 12px 17px; } .topbar-actions { gap: 7px; } .topbar-divider, .user-name { display: none; } .user-avatar { width: 27px; height: 27px; font-size: 12px; } .breadcrumb { font-size: 12px; } .breadcrumb-current { max-width: 36vw; } .page-content { padding: 25px 16px 32px; } .page-heading { gap: 13px; margin-bottom: 22px; } h1 { font-size: 24px; } .eyebrow { font-size: 12px; } .page-heading > .button { font-size: 12px; padding: 9px 10px; min-height: 36px; } .page-heading > .button .icon { width: 14px; height: 14px; } .filter-bar { gap: 9px; padding: 13px; } .search-input { flex: 1 1 100%; min-width: 0; } .filter-bar select { flex: 1; font-size: 13px; } .filter-bar > .button { font-size: 13px; } .form-panel .standard-form { padding: 22px; } .form-side-link { margin-left: 0; width: 100%; padding-top: 8px; } .deal-meta { font-size: 12px; line-height: 1.8; } .deal-meta span + span::before { padding: 0 6px; } .heading-line { gap: 10px; } .deal-heading h1 { font-size: 22px; } .deal-heading > .button { margin-top: 30px; } .deal-aside { display: flex; } .chat-panel { min-height: 500px; } .chat-history { height: 380px; padding: 20px 15px; } .message-meta { gap: 8px; flex-wrap: wrap; } .message-meta strong { font-size: 12px; } .message-meta time { font-size: 11px; } .message-text { font-size: 13px; } .chat-message { gap: 9px; } .message-avatar { width: 26px; height: 26px; } .chat-composer { padding: 16px; } .panel-heading { min-height: 56px; padding-top: 16px; padding-bottom: 16px; } .panel-heading h2 { font-size: 14px; } .notification-popover { position: fixed; top: 60px; right: 12px; width: min(355px, calc(100vw - 24px)); } .standard-form { padding: 22px; } .settings-panel .panel-heading { align-items: flex-start; flex-wrap: wrap; } .login-card { padding: 30px; } .empty-state { padding-top: 55px; padding-bottom: 60px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.search-input input:not([type=checkbox]):not([type=radio]):focus { box-shadow: none; }
.error-code { font-size: 13px; font-weight: 600; letter-spacing: 1px; color: #5f6f7e; margin-bottom: 9px; }
.error-page > p { color: #5f6f7e; font-size: 14px; line-height: 1.8; margin: 18px 0 24px; }
.error-page .button { margin-top: 0; }
.chat-message:target { border-radius: 8px; outline: 5px solid #edf5fd; background: #edf5fd; }
@media (min-width: 821px) {
  .chat-panel { height: calc(100vh - 260px); min-height: 480px; max-height: 940px; position: sticky; top: 20px; }
  .chat-history { flex: 1; min-height: 0; height: auto; max-height: none; }
  .chat-composer { flex-shrink: 0; }
  .chat-panel > .panel-heading { flex-shrink: 0; }
}
@media (min-width: 821px) and (max-height: 680px) {
  .chat-panel { min-height: 380px; }
}
.missing-documents { background: #fffdf7; border: 1px solid #f0e6cd; border-radius: 8px; padding: 12px; margin-bottom: 15px; }
.missing-documents ul { margin: 9px 0 0; padding-left: 17px; font-size: 13px; color: #8f835f; line-height: 1.7; }
.missing-documents li + li { margin-top: 5px; }
.nav-short { display: none; }
@media (max-width: 600px) {
  .nav-item { flex-direction: column; gap: 4px; padding-top: 8px; padding-bottom: 7px; }
  .nav-item .nav-short { display: block; font-size: 12px; line-height: 1; font-weight: 500; }
  .nav-item .icon { width: 18px; height: 18px; }
}

.deal-main { display: flex; flex-direction: column; gap: 23px; min-width: 0; }
.deal-main .chat-panel { position: static; }
.case-note-content { padding: 18px 22px 22px; }
.case-note-content > p { margin: 0; font-size: 15px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
.case-note-content > p + p { margin-top: 12px; }
.case-note-sources { margin-top: 18px; }
.case-note-sources > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.case-note-sources > .evidence { margin-top: 10px; }
@media (max-width: 600px) { .deal-main { gap: 17px; } .case-note-content { padding: 15px 17px 17px; } }

.template-choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.template-choices legend { margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.template-choice { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; cursor: pointer; font-size: 14px; }
.template-choice input { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--primary); }
.template-choice span { overflow-wrap: anywhere; }
.package-missing-fields { margin: 9px 0; font-size: 14px; color: var(--muted); }
.package-missing-fields ul { padding-left: 18px; margin: 8px 0; }
.package-missing-fields li + li { margin-top: 4px; }

.composer-toolbar, .composer-actions { flex-wrap: wrap; }
.composer-actions { display: flex; gap: 8px; margin-left: auto; }
.deal-link-form { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 16px; }
.deal-link-form .form-field { margin-bottom: 13px; }
.deal-link-form .form-field label { font-size: 12px; }
.deal-link-form select { font-size: 13px; min-height: 36px; padding: 7px 10px; }
.deal-link-item + .deal-link-item { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 15px; }
.deal-link-heading { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.deal-link-heading a { min-width: 0; font-size: 14px; }
.deal-link-heading .small-label { text-align: right; flex-shrink: 0; }
.deal-link-actions { display: flex; gap: 8px; align-items: center; margin-top: 9px; }
.reconciliation-details { font-size: 13px; margin-top: 10px; }
.reconciliation-details > summary { color: var(--muted); }
.reconciliation-finding { margin-top: 12px; }
.reconciliation-finding p { margin: 5px 0; line-height: 1.6; overflow-wrap: anywhere; }

.related-deals-panel > summary { padding: 18px 20px; display: flex; align-items: center; gap: 9px; list-style: none; font-size: 14px; }
.related-deals-panel > summary::-webkit-details-marker { display: none; }
.related-deals-panel > summary > span:first-child { display: flex; gap: 8px; align-items: center; margin-right: auto; }
.related-deals-panel > summary .icon { color: #5f6f7e; width: 16px; height: 16px; }
.related-deals-panel > summary > .icon { width: 13px; height: 13px; }
.related-deals-panel[open] > summary { border-bottom: 1px solid var(--line); }
.related-deals-panel[open] > summary > .icon { transform: rotate(180deg); }

.report-trigger { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; padding: 8px; border-radius: 7px; }
.report-trigger:hover { color: var(--primary); background: #edf5fd; }
.report-trigger .icon { width: 17px; height: 17px; flex-shrink: 0; }
.report-content h2 { font-size: 15px; margin-bottom: 10px; }
.report-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; font-size: 15px; margin-bottom: 25px; }
.report-text:last-child { margin-bottom: 0; }
.report-files { list-style: none; padding: 0; margin: 0; }
.report-files li { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 0; }
.report-files a { display: inline-flex; align-items: center; gap: 8px; overflow-wrap: anywhere; min-width: 0; }
.report-files .icon { flex-shrink: 0; width: 16px; height: 16px; }
.report-files li > span { color: var(--muted); white-space: nowrap; font-size: 13px; }
.report-status { border-top: 1px solid var(--line); }
.report-status .form-field { max-width: 250px; }
@media (max-width: 820px) { .report-trigger span { display: none; } }

.chat-panel.is-dragging { outline: 2px solid var(--primary); outline-offset: -2px; }
.chat-panel.is-dragging .chat-composer { background: #edf5fd; }
.file-chip { display: inline-flex; align-items: center; gap: 7px; }
.file-chip > span { min-width: 0; overflow-wrap: anywhere; }
.file-chip-remove { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 22px; height: 22px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.file-chip-remove:hover { background: #dcebf9; color: var(--primary); }
.file-chip-remove:focus-visible { outline: 2px solid var(--primary); }
.chat-composer[aria-busy=true] .attachment-button { pointer-events: none; opacity: .6; }
.file-chip-remove:disabled { opacity: .5; cursor: default; }
