:root{--bg: #0f1419;--surface: #1a2332;--border: #2d3a4f;--text: #e6edf3;--text-muted: #8b9cb3;--accent: #3b82f6;--accent-hover: #2563eb;--ready: #22c55e;--nearly: #eab308;--incomplete: #ef4444;--attention: #f59e0b;--attention-dim: rgba(245, 158, 11, .12);--attention-border: rgba(245, 158, 11, .42);--attention-text-muted: #fbbf24;--radius: 8px}*{box-sizing:border-box}body{margin:0;font-family:DM Sans,system-ui,sans-serif;background:var(--bg);color:var(--text);min-height:100vh;line-height:1.5}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{font:inherit;cursor:pointer;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);color:var(--text);padding:.5rem 1rem;transition:background .1s ease,border-color .1s ease,color .1s ease}button:hover:not(:disabled){background:#ffffff0f}button:disabled{opacity:.55;cursor:not-allowed}button.primary{background:var(--accent);border-color:var(--accent);color:#fff}button.primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}button.danger{background:var(--incomplete);border-color:var(--incomplete);color:#fff}button.danger:hover:not(:disabled){background:#b91c1c;border-color:#b91c1c}button.btn-sm{padding:.25rem .6rem;font-size:.875rem}button.btn-ghost{background:transparent;border:1px solid transparent;color:var(--text-muted);padding:.35rem .6rem}button.btn-ghost:hover:not(:disabled){color:var(--text);background:#ffffff0f}*:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}button.edit-button-gh{padding:.25rem .5rem;font-size:.875rem;color:var(--text-muted);background:transparent;border:none}button.edit-button-gh:hover{color:var(--accent);text-decoration:none}input,select{font:inherit;padding:.5rem .75rem;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);color:var(--text)}.app{display:flex;flex-direction:column;min-height:100vh}.header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1.5rem;background:var(--surface);border-bottom:1px solid var(--border)}.header h1{margin:0;font-size:1.25rem;font-weight:600}.nav{display:flex;gap:.5rem}.nav a{padding:.5rem .75rem;border-radius:var(--radius);color:var(--text-muted)}.nav a:hover,.nav a.active{color:var(--text);background:#ffffff0f;text-decoration:none}.nav-link-btn{background:none;border:none;padding:.5rem .75rem;color:var(--text-muted);font-size:inherit}.nav-link-btn:hover{color:var(--text);background:#ffffff0f;text-decoration:none}.account-menu{position:relative}.account-menu-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10}.account-menu-dropdown{position:absolute;top:100%;right:0;margin-top:.25rem;min-width:10rem;padding:.25rem 0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 4px 12px #0000004d;z-index:20}.account-menu-item{display:block;width:100%;padding:.5rem 1rem;text-align:left;background:none;border:none;color:var(--text);font:inherit;cursor:pointer}.account-menu-item:hover{background:#ffffff0f}.main{flex:1;padding:1.5rem;max-width:1200px;width:100%;margin:0 auto}.card,.shipment-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem;margin-bottom:1rem}.shipment-card .status-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:.5rem}.shipment-card .status-dot.ready{background:var(--ready)}.shipment-card .status-dot.nearly_complete{background:var(--nearly)}.shipment-card .status-dot.incomplete{background:var(--incomplete)}.shipment-card .status-dot.attention{background:var(--attention);box-shadow:0 0 0 2px #f59e0b59}.shipment-card--attention{border-color:var(--attention-border);background:linear-gradient(180deg,rgba(245,158,11,.06) 0%,var(--surface) 120px);box-shadow:inset 4px 0 0 0 var(--attention)}.shipment-card--attention.selected{box-shadow:inset 4px 0 0 0 var(--attention),0 0 0 1px #3b82f666}.shipment-card.selected{border-color:var(--accent);box-shadow:0 0 0 1px #3b82f666}.chip{display:inline-flex;align-items:center;gap:.3rem;font-size:.72rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.2rem .5rem;border-radius:999px;border:1px solid var(--border);background:#ffffff0a;color:var(--text-muted);vertical-align:middle;line-height:1.2}.chip-attention{border-color:var(--attention-border);background:var(--attention-dim);color:var(--attention-text-muted)}.chip-attention svg{flex-shrink:0}.filters button.filter-needs-attention.active{border-color:var(--attention-border);color:var(--attention-text-muted);background:var(--attention-dim)}.classification-review-banner{position:relative;margin-bottom:1.25rem;border-radius:calc(var(--radius) + 2px);border:1px solid var(--attention-border);background:linear-gradient(125deg,var(--attention-dim) 0%,rgba(26,35,50,.98) 42%,var(--surface) 100%);overflow:hidden;box-shadow:0 8px 28px #00000047}.classification-review-banner:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-left:4px solid var(--attention);border-radius:inherit;pointer-events:none}.classification-review-drapes{position:absolute;inset:-40% -20% auto 55%;height:140%;background:radial-gradient(ellipse at center,rgba(245,158,11,.14) 0%,transparent 68%);pointer-events:none}.classification-review-inner{position:relative;display:grid;grid-template-columns:auto 1fr;gap:1rem 1.25rem;padding:1.15rem 1.25rem 1.25rem 1.35rem}.classification-review-main{min-width:0}.classification-review-footer{margin-top:1.25rem;padding-top:1rem;border-top:1px solid var(--border)}.classification-review-footer-hint{margin:.55rem 0 0;font-size:.8rem;color:var(--text-muted);line-height:1.45;max-width:42rem}@media (max-width: 640px){.classification-review-inner{grid-template-columns:1fr}}.classification-review-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--attention-dim);border:1px solid var(--attention-border);color:var(--attention);flex-shrink:0}.classification-review-title{margin:0 0 .35rem;font-size:1.05rem;font-weight:650;letter-spacing:-.02em;color:var(--text)}.classification-review-lede{margin:0 0 1rem;font-size:.9rem;color:var(--text-muted);line-height:1.55;max-width:52rem}.classification-review-lede strong{color:var(--attention-text-muted);font-weight:600}.classification-review-group{margin-top:1.35rem}.classification-review-group:first-of-type{margin-top:.5rem}.classification-review-group-intro{margin:0 0 .65rem;font-size:.9rem;color:var(--text);line-height:1.5}.classification-review-group-intro strong{color:var(--attention-text-muted);font-weight:600}.classification-review-group-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}.classification-review-unlink-btn{font-size:.78rem;padding:.25rem .65rem;border-radius:var(--radius);border:1px solid var(--border);background:transparent;color:var(--text);cursor:pointer}.classification-review-unlink-btn:disabled{opacity:.5;cursor:not-allowed}.classification-review-unlink-btn:not(:disabled):hover{background:var(--bg-elevated)}.classification-review-file-list{margin:0 0 .65rem;padding-left:1.2rem;list-style:disc;color:var(--text);font-size:.9rem}.classification-review-file-list li{margin:.15rem 0}.classification-review-file-list a{color:var(--link);text-decoration:none}.classification-review-file-list a:hover{text-decoration:underline}.classification-review-table-wrap{overflow-x:auto;border-radius:var(--radius);border:1px solid var(--border);background:#0000002e}.classification-review-table{width:100%;border-collapse:collapse;font-size:.875rem}.classification-review-table th{text-align:left;padding:.65rem .85rem;color:var(--text-muted);font-weight:600;font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--border);background:#0003}.classification-review-table td{padding:.7rem .85rem;border-bottom:1px solid rgba(45,58,79,.6);vertical-align:middle}.classification-review-table tr:last-child td{border-bottom:none}.classification-review-table td a{font-weight:500}.type-pill{display:inline-block;padding:.12rem .45rem;border-radius:6px;font-size:.8rem;background:#ffffff0f;border:1px solid var(--border);color:var(--text)}.classification-review-cta{white-space:nowrap}.classification-review-type-controls{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}.classification-review-type-controls select{min-width:12rem;max-width:100%;padding:.35rem .5rem;border-radius:var(--radius);border:1px solid var(--border);background:#00000040;color:var(--text);font-size:.85rem}.classification-review-type-controls button.primary{padding:.35rem .65rem;font-size:.8rem}.classification-review-cta a,a.classification-review-open{display:inline-flex;align-items:center;gap:.25rem;font-size:.85rem;font-weight:600;padding:.35rem .65rem;border-radius:var(--radius);border:1px solid var(--accent);background:#3b82f61f;color:var(--accent);text-decoration:none}.classification-review-cta a:hover,a.classification-review-open:hover{background:#3b82f638;text-decoration:none}.shipment-title-row-pills{display:inline-flex;align-items:center;gap:.45rem;margin-left:.35rem;vertical-align:middle}.doc-classification-dispute{border-radius:var(--radius);border:1px solid var(--attention-border);background:var(--attention-dim);padding:1rem 1.1rem;margin-bottom:1rem}.doc-classification-dispute h3{margin:0 0 .5rem;font-size:.95rem;display:flex;align-items:center;gap:.45rem;color:var(--attention-text-muted)}.doc-classification-dispute p{margin:0;font-size:.9rem;color:var(--text-muted);line-height:1.5}.all-files-row--attention{background:#f59e0b0f}.all-files-row--attention .all-files-type-label{color:var(--attention-text-muted)}.doc-types-other-row--attention{border-left:3px solid var(--attention);padding-left:.5rem;margin-left:-.5rem}.shipment-select{margin-right:.5rem;vertical-align:middle;cursor:pointer}.bulk-bar{display:flex;align-items:center;gap:.75rem;padding:.55rem .85rem;margin-bottom:.75rem;background:#1c2941;border:1px solid rgba(59,130,246,.45);border-radius:var(--radius);position:sticky;top:0;z-index:5;box-shadow:0 4px 12px #00000059;animation:bulk-bar-slide .15s ease-out}@keyframes bulk-bar-slide{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.bulk-bar-count{font-size:.9rem;color:var(--text-muted)}.bulk-bar-count strong{color:var(--text);font-weight:600;margin-right:.2rem}.bulk-bar-actions{display:inline-flex;align-items:center;gap:.4rem;margin-left:auto;flex-wrap:wrap}.shipment-header{font-weight:600;margin-bottom:.5rem}.shipment-meta{color:var(--text-muted);font-size:.9rem;margin-bottom:.75rem}.document-card{margin-bottom:1rem}.document-header{margin-bottom:.35rem}.document-title{font-weight:600;text-decoration:none;color:var(--text)}.document-title:hover{text-decoration:underline}.document-meta{color:var(--text-muted);font-size:.85rem;margin-bottom:1rem;display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}.doc-chip{display:inline-flex;align-items:baseline;gap:.4rem;padding:.18rem .6rem;border-radius:9999px;background:var(--card-bg-alt, rgba(255, 255, 255, .03));border:1px solid var(--border);text-decoration:none;color:var(--text);font-size:.85rem;line-height:1.4;max-width:100%;transition:background .15s ease,border-color .15s ease}.doc-chip__label{color:var(--text-muted);font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;font-weight:600}.doc-chip__value{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:32ch}.doc-chip--type{text-transform:capitalize;color:var(--text-muted)}.doc-chip--shipment{border-color:#60a5fa66;color:var(--accent, #60a5fa)}.doc-chip--shipment:hover{background:#60a5fa1a;border-color:#60a5fa99}.doc-chip--trade{border-color:#a855f766;color:#c084fc}.doc-chip--trade:hover{background:#a855f71a;border-color:#a855f799}.doc-chip--orphan{color:var(--text-muted);font-style:italic;border-style:dashed}.doc-checklist{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.25rem;font-size:.85rem;margin-bottom:1rem}.doc-checklist span.yes:before{content:"✓ ";color:var(--ready)}.doc-checklist span.no:before{content:"✗ ";color:var(--text-muted)}.card-actions{display:flex;gap:.5rem;justify-content:flex-end}.filters{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}.filters button{padding:.4rem .75rem;font-size:.9rem}.filters button.active{background:var(--accent);border-color:var(--accent);color:#fff}.search-wrap{margin-bottom:1rem}.search-wrap input{width:100%;max-width:320px}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:100;padding:1rem}.modal,.modal-content{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);max-width:560px;width:100%;max-height:90vh;overflow:auto;padding:1.5rem}.document-link-modal{max-width:28rem}.document-type-conflict-dialog{max-width:34rem}.dtc-shipment-banner{margin-top:.75rem;margin-bottom:.65rem;padding:.55rem .75rem;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface)}.dtc-shipment-banner-label{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin-bottom:.15rem}.dtc-shipment-banner-value{font-weight:600;font-size:.95rem;line-height:1.35}.dtc-doc-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin-bottom:1rem}@media (max-width: 520px){.dtc-doc-grid{grid-template-columns:1fr}}.dtc-doc-card{border:1px solid var(--border);border-radius:var(--radius);padding:.75rem;background:var(--surface);min-width:0}.dtc-doc-card-label{font-size:.68rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:.35rem}.dtc-doc-card-title{font-weight:600;font-size:.92rem;margin-bottom:.25rem;overflow-wrap:anywhere}.dtc-doc-card-meta{font-size:.82rem;color:var(--text-muted);margin-bottom:.45rem}.dtc-doc-card a{font-size:.88rem}.dtc-lede{color:var(--text-muted);font-size:.92rem;margin-top:0;margin-bottom:1rem;line-height:1.45}.dtc-actions{display:flex;flex-direction:column;gap:.75rem}.dtc-option-card{padding:.75rem;border:1px solid var(--border);border-radius:var(--radius)}.dtc-option-hint{margin:0 0 .5rem;font-size:.88rem;color:var(--text-muted);line-height:1.4}.dtc-reclassify-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.dtc-reclassify-row select{min-width:12rem;padding:.35rem .5rem}.dtc-unlink-btn{width:100%;text-align:left}.dtc-unlink-sub{display:block;font-size:.85rem;font-weight:400;opacity:.95;margin-top:.2rem}.link-modal-filter-note{font-size:.82rem;color:var(--text-muted);margin:-.35rem 0 .85rem;line-height:1.35}.document-link-shipment-list{list-style:none;padding:0;margin:0;max-height:20rem;overflow:auto}.document-link-shipment-list li{display:flex;align-items:center;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--border);flex-wrap:nowrap}.document-link-shipment-list li:last-child{border-bottom:none}.document-link-item-content{display:flex;flex-direction:column;gap:.2rem;min-width:0;flex:1 1 auto}.document-link-shipment-name{font-weight:600;min-width:0;overflow-wrap:break-word;word-break:break-word}.document-link-shipment-meta{font-size:.85rem;color:var(--text-muted)}.document-link-shipment-list button{flex-shrink:0;align-self:center}.document-link-pagination{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-top:1rem;padding-top:.75rem;border-top:1px solid var(--border)}.document-link-pagination-info{font-size:.9rem;color:var(--text-muted)}.add-doc-mode-tabs button:hover{color:var(--text)}.modal h2{margin:0 0 1rem;font-size:1.25rem}.modal-close{float:right;background:none;border:none;font-size:1.25rem;cursor:pointer;color:var(--text-muted)}.modal-close:hover{color:var(--text)}.modal-actions{margin-top:1.5rem;display:flex;gap:.5rem;justify-content:flex-end}.system-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}.system-cards .card h3{margin:0 0 .75rem;font-size:1rem}.system-cards table{width:100%;font-size:.9rem}.system-cards td:first-child{color:var(--text-muted);padding-right:1rem}.back-link{display:inline-block;margin-bottom:1rem;color:var(--text-muted)}.back-link:hover{color:var(--accent)}.doc-types-list{list-style:none;padding:0;margin:0}.doc-types-list li{padding:.5rem 0;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}.doc-types-list li:last-child{border-bottom:none}.chat-page{display:flex;flex-direction:column;height:calc(100vh - 6rem);min-height:0}.chat-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem;flex-shrink:0}.chat-header h2{margin:0}.chat-layout{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:var(--chat-sidebar-width, 16rem) 14px 1fr;gap:0}.chat-layout.resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.chat-resize-handle{position:relative;cursor:col-resize;background:transparent;border:0;display:flex;align-items:center;justify-content:center;z-index:1}.chat-resize-handle:hover .chat-resize-grip,.chat-resize-handle:focus-visible .chat-resize-grip,.chat-layout.resizing .chat-resize-grip{background:var(--accent)}.chat-resize-grip{width:2px;height:32px;background:var(--border);border-radius:1px;transition:background .1s ease}.chat-resize-handle:focus-visible{outline:none}.chat-sidebar{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;min-height:0}.chat-new-btn{margin:.6rem;flex-shrink:0}.chat-conv-list{flex:1 1 auto;overflow-y:auto;padding:0 .4rem .6rem}.chat-empty-side{color:var(--text-muted);margin:.5rem .6rem;font-size:.9rem}.chat-conv-item{position:relative;padding:.55rem 1.8rem .55rem .7rem;border-radius:var(--radius);cursor:pointer;margin-bottom:.2rem;transition:background .1s ease,padding .15s ease}.chat-conv-item:hover{background:#ffffff0d}.chat-conv-item.active{background:#3b82f62e}.chat-conv-title{font-size:.92rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:.4rem}.chat-conv-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent);flex-shrink:0;animation:chat-conv-dot-pulse 1.4s infinite ease-in-out}@keyframes chat-conv-dot-pulse{0%,to{opacity:.4}50%{opacity:1}}.chat-conv-meta{font-size:.78rem;color:var(--text-muted);margin-top:.1rem}.chat-conv-delete{position:absolute;top:50%;right:.4rem;transform:translateY(-50%);width:1.4rem;height:1.4rem;padding:0;border:none;border-radius:50%;background:transparent;color:var(--text-muted);font-size:1.1rem;line-height:1;opacity:.45;cursor:pointer;transition:opacity .1s ease,background .1s ease,color .1s ease}.chat-conv-item:hover .chat-conv-delete,.chat-conv-item.active .chat-conv-delete{opacity:1}.chat-conv-delete:hover{background:#ef444433;color:var(--incomplete)}.chat-window{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}@media (max-width: 720px){.chat-layout{grid-template-columns:1fr;grid-template-rows:auto 1fr}.chat-sidebar{max-height:22rem}.chat-conv-list{max-height:14rem}.chat-resize-handle{display:none}}.chat-messages{flex:1 1 auto;min-height:0;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.4rem}.chat-empty{margin:auto;color:var(--text-muted)}.chat-row{display:flex;width:100%}.chat-row.user{justify-content:flex-end}.chat-row.assistant{justify-content:flex-start}.chat-row+.chat-row.user,.chat-row+.chat-row.assistant{margin-top:.35rem}.chat-bubble{max-width:min(75%,640px);padding:.55rem .85rem;border-radius:16px;white-space:pre-wrap;word-wrap:break-word;line-height:1.4;box-shadow:0 1px 1px #00000026}.chat-row.user .chat-bubble{background:var(--accent);color:#fff;border-bottom-right-radius:4px}.chat-row.assistant .chat-bubble{background:#ffffff0f;color:var(--text);border-bottom-left-radius:4px}.chat-bubble.pending{color:var(--text-muted);font-style:italic}.chat-bubble.error{background:#ef444426;border:1px solid rgba(239,68,68,.4);color:var(--text)}.chat-typing{display:inline-flex;gap:3px;align-items:center;height:1em}.chat-typing span{width:6px;height:6px;border-radius:50%;background:var(--text-muted);animation:chat-typing-bounce 1.2s infinite ease-in-out}.chat-typing span:nth-child(2){animation-delay:.15s}.chat-typing span:nth-child(3){animation-delay:.3s}@keyframes chat-typing-bounce{0%,60%,to{transform:translateY(0);opacity:.4}30%{transform:translateY(-3px);opacity:1}}.chat-composer{border-top:1px solid var(--border);padding:.65rem .75rem;background:var(--surface);display:flex;gap:.5rem;align-items:flex-end;flex-shrink:0}.chat-composer textarea{flex:1;resize:none;font:inherit;padding:.55rem .75rem;border-radius:18px;border:1px solid var(--border);background:var(--bg);color:var(--text);max-height:8rem;min-height:2.4rem;line-height:1.4}.chat-composer textarea:focus{outline:none;border-color:var(--accent)}.chat-composer button.primary{border-radius:18px;padding:.55rem 1.1rem}.chat-error{color:var(--incomplete);font-size:.85rem;margin:.25rem 0 0;padding:0 .25rem}.md-message{white-space:normal}.md-message>*:first-child{margin-top:0}.md-message>*:last-child{margin-bottom:0}.md-message p{margin:0 0 .55em;line-height:1.5}.md-message p:last-child{margin-bottom:0}.md-message strong{font-weight:600;color:var(--text)}.md-message em{font-style:italic}.md-message a{color:var(--accent);text-decoration:underline;text-decoration-color:#3b82f666;text-underline-offset:2px}.md-message a:hover{text-decoration-color:var(--accent)}.md-message ul,.md-message ol{margin:.35em 0 .6em;padding-left:1.4em}.md-message li{margin-bottom:.2em}.md-message li>p{margin-bottom:.2em}.md-message h1,.md-message h2,.md-message h3,.md-message h4{margin:.8em 0 .35em;line-height:1.3;font-weight:600}.md-message h1{font-size:1.15rem}.md-message h2{font-size:1.05rem}.md-message h3{font-size:1rem}.md-message h4{font-size:.95rem;color:var(--text-muted)}.md-message hr{border:0;border-top:1px solid var(--border);margin:.8em 0}.md-message blockquote{margin:.5em 0;padding:.25em .75em;border-left:3px solid var(--border);color:var(--text-muted)}.md-message code{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,monospace;font-size:.85em;padding:.08em .35em;background:#00000047;border:1px solid var(--border);border-radius:4px}.md-message pre{margin:.55em 0;padding:.7em .85em;background:#00000052;border:1px solid var(--border);border-radius:6px;overflow-x:auto;font-size:.82em;line-height:1.45}.md-message pre code{padding:0;background:transparent;border:0;font-size:inherit}.md-message table{border-collapse:collapse;margin:.5em 0;font-size:.9em;display:block;overflow-x:auto;max-width:100%}.md-message th,.md-message td{padding:.35em .6em;border:1px solid var(--border);text-align:left}.md-message th{background:#ffffff0a;font-weight:600}.md-message tr:nth-child(2n) td{background:#ffffff05}.chat-row.user .md-message a{color:#fff;text-decoration-color:#fff9}.chat-phase{display:inline-flex;align-items:center;gap:.5rem;font-style:normal;font-size:.9rem;color:var(--text)}.chat-phase-label{color:var(--text-muted)}.chat-bubble-actions{display:flex;gap:.4rem;margin-top:.4rem;flex-wrap:wrap}.chat-bubble-actions button{padding:.2rem .55rem;font-size:.8rem}.chat-reasoning{margin-top:.5rem;font-size:.85rem;color:var(--text-muted)}.chat-reasoning summary{cursor:pointer;-webkit-user-select:none;user-select:none;list-style:none}.chat-reasoning summary::-webkit-details-marker{display:none}.chat-reasoning summary:before{content:"▸ ";display:inline-block;transition:transform .1s ease}.chat-reasoning[open] summary:before{content:"▾ "}.chat-reasoning-body{margin-top:.4rem;padding:.6rem .75rem;background:#00000040;border:1px solid var(--border);border-radius:6px}.chat-reasoning-body pre{margin:.35rem 0 0;white-space:pre-wrap;word-break:break-word;font-size:.78rem;color:var(--text);max-height:16rem;overflow:auto}.chat-conv-search{margin:0 .6rem .4rem;display:flex}.chat-conv-search input{width:100%;padding:.4rem .6rem;font-size:.9rem}.toast-stack{position:fixed;bottom:1rem;right:1rem;display:flex;flex-direction:column;gap:.5rem;z-index:200;max-width:min(380px,calc(100vw - 2rem))}.toast{display:flex;align-items:flex-start;gap:.5rem;padding:.6rem .75rem;background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--radius);box-shadow:0 4px 12px #00000059;animation:toast-in .18s ease-out}.toast-success{border-left-color:var(--ready)}.toast-error{border-left-color:var(--incomplete)}.toast-info{border-left-color:var(--accent)}.toast-message{flex:1 1 auto;font-size:.92rem;line-height:1.35}.toast-dismiss{flex-shrink:0;background:transparent;border:none;color:var(--text-muted);font-size:1.05rem;line-height:1;padding:0 .25rem}.toast-dismiss:hover{color:var(--text)}@keyframes toast-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.skeleton{display:block;background:linear-gradient(90deg,#ffffff0a,#ffffff1a,#ffffff0a);background-size:200% 100%;border-radius:6px;animation:skeleton-shimmer 1.4s linear infinite}.skeleton-line{height:.85rem;margin:.4rem 0}.skeleton-card{height:6.5rem;margin-bottom:1rem}@keyframes skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.doc-checklist span{padding:.15rem .4rem;border-radius:4px}.doc-checklist span.required-missing{background:#ef44441f;color:var(--text)}.doc-checklist span.required-missing:before{content:"✗ ";color:var(--incomplete);font-weight:600}.doc-checklist span.required-present{color:var(--text)}.doc-checklist span.required-present:before{content:"✓ ";color:var(--ready)}.doc-checklist span.required-present--attention{color:var(--text)}.doc-checklist span.required-present--attention:before{content:"";display:inline-block;width:.55rem;height:.5rem;margin-right:.2rem;vertical-align:middle;background:var(--attention);clip-path:polygon(50% 0%,0% 100%,100% 100%)}.doc-checklist span.optional{color:var(--text-muted)}.doc-checklist span.optional:before{content:"○ ";color:var(--text-muted)}.doc-checklist span.optional--attention{color:var(--attention-text-muted)}.doc-checklist span.optional--attention:before{content:"";display:inline-block;width:.55rem;height:.5rem;margin-right:.2rem;vertical-align:middle;background:var(--attention);clip-path:polygon(50% 0%,0% 100%,100% 100%)}.drop-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:250;background:#0f1419c7;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;pointer-events:none;animation:drop-overlay-fade .12s ease-out}.drop-overlay-card{border:2px dashed var(--accent);border-radius:16px;background:#3b82f614;padding:2.5rem 3rem;text-align:center;max-width:min(480px,80vw);box-shadow:0 0 0 8px #3b82f60f}.drop-overlay-icon{font-size:2.5rem;color:var(--accent);margin-bottom:.5rem;animation:drop-overlay-bob 1.4s ease-in-out infinite}.drop-overlay-title{font-size:1.1rem;margin-bottom:.35rem}.drop-overlay-title strong{color:var(--accent)}.drop-overlay-hint{font-size:.85rem;color:var(--text-muted)}@keyframes drop-overlay-fade{0%{opacity:0}to{opacity:1}}@keyframes drop-overlay-bob{0%,to{transform:translateY(0)}50%{transform:translateY(-6px)}}.drop-progress-stack{position:fixed;left:1rem;bottom:1rem;display:flex;flex-direction:column;gap:.4rem;z-index:200;max-width:min(360px,calc(100vw - 2rem))}.drop-progress{display:flex;align-items:center;gap:.6rem;padding:.5rem .75rem;background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--radius);box-shadow:0 4px 12px #00000059;font-size:.85rem;animation:toast-in .15s ease-out}.drop-progress-uploading{border-left-color:var(--accent)}.drop-progress-processing{border-left-color:var(--nearly)}.drop-progress-done{border-left-color:var(--ready)}.drop-progress-error{border-left-color:var(--incomplete)}.drop-progress-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.drop-progress-status{flex-shrink:0;font-size:.78rem;color:var(--text-muted)}.drop-progress-error .drop-progress-status{color:var(--incomplete)}.drop-progress-done .drop-progress-status{color:var(--ready)}.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;padding:3rem 1.5rem;margin:1rem 0;background:linear-gradient(180deg,#ffffff04,#fff0);border:1px dashed var(--border);border-radius:var(--radius);color:var(--text-muted)}.empty-state-icon{width:88px;height:88px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#3b82f614;color:var(--accent);margin-bottom:1rem}.empty-state-title{margin:0 0 .4rem;font-size:1.05rem;font-weight:600;color:var(--text)}.empty-state-description{margin:0;font-size:.9rem;max-width:32rem;line-height:1.5}.empty-state-action{margin-top:1rem;display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center}.empty-state-description code{font-size:.85em;padding:.05rem .35rem;background:#ffffff0f;border:1px solid var(--border);border-radius:4px;color:var(--text)}.search-wrap-with-status{position:relative;max-width:320px}.search-wrap-with-status input{width:100%;padding-right:2rem}.search-wrap-with-status .search-spinner{position:absolute;top:50%;right:.6rem;transform:translateY(-50%);width:.85rem;height:.85rem;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:translateY(-50%) rotate(360deg)}}.pagination-jump{display:inline-flex;align-items:center;gap:.35rem;font-size:.9rem;color:var(--text-muted)}.pagination-jump input{width:4rem;padding:.25rem .4rem}.status-dot{position:relative}.status-dot:after{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 6px);transform:translate(-50%);white-space:nowrap;background:#0b1220;color:var(--text);border:1px solid var(--border);padding:.25rem .5rem;border-radius:4px;font-size:.75rem;pointer-events:none;opacity:0;transition:opacity .1s ease}.status-dot[data-tooltip]:hover:after,.status-dot[data-tooltip]:focus:after{opacity:1}.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}.queue-bars{display:flex;align-items:flex-end;gap:.4rem;height:4rem;margin-top:.5rem}.queue-bar{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:.2rem;font-size:.75rem;color:var(--text-muted)}.queue-bar-fill{width:100%;background:var(--accent);border-radius:3px 3px 0 0;min-height:2px;transition:height .2s ease}.queue-bar.pending .queue-bar-fill{background:var(--text-muted)}.queue-bar.processing .queue-bar-fill{background:var(--accent)}.queue-bar.completed .queue-bar-fill{background:var(--ready)}.queue-bar.failed .queue-bar-fill{background:var(--incomplete)}.queue-bar-count{font-weight:600;color:var(--text)}
