:root{color:#17202a;background:#eef2f5;font-family:Segoe UI,Arial,sans-serif}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{color:#fff;cursor:pointer;background:#146c94;border:0;border-radius:6px;padding:9px 14px}button:disabled{opacity:.55;cursor:default}button.ghost{color:#174155;background:#e3edf2}.login-page{background:#f4f7f9;place-items:center;min-height:100vh;display:grid}.fatal-error-page{background:#eef2f5;place-items:center;min-height:100vh;padding:24px;display:grid}.fatal-error-card{background:#fff;border:1px solid #dce3e8;border-radius:8px;gap:14px;width:min(760px,100%);padding:22px;display:grid}.fatal-error-card h1{margin:0}.login-panel{background:#fff;border:1px solid #dce3e8;border-radius:8px;gap:16px;width:min(420px,100vw - 32px);padding:28px;display:grid;box-shadow:0 16px 40px #192d3c1f}.login-panel h1,.topbar h1,.panel h2{margin:0}label{gap:6px;font-weight:600;display:grid}input,select,textarea{color:#17202a;background:#fff;border:1px solid #c9d5dd;border-radius:6px;width:100%;padding:9px 10px}textarea{resize:vertical;min-height:260px}.shell{min-height:100vh}.topbar{z-index:120;background:#fff;border-bottom:1px solid #dce3e8;justify-content:space-between;align-items:center;gap:16px;min-height:72px;padding:12px 24px;display:flex;position:sticky;top:0}.topbar span,.muted{color:#697985}.tabs{z-index:119;background:#f8fafb;border-bottom:1px solid #dce3e8;align-items:center;gap:8px;padding:8px 18px;display:flex;position:sticky;top:0}.tabs button{color:#244756;background:0 0;border:1px solid #cbd8df}.tabs .tabs-logout{margin-left:auto}.tabs button.active{color:#fff;background:#146c94;border-color:#146c94}main{padding:18px 24px 28px}.work-grid,.admin-grid,.chat-grid,.history-grid{gap:16px;display:grid}.work-grid,.admin-grid{grid-template-columns:minmax(360px,.9fr) minmax(420px,1.1fr)}.ocr-batch-screen{grid-template-rows:auto minmax(140px, var(--ocr-files-height,250px)) 7px minmax(190px, 1fr);isolation:isolate;background:#eef3f6;border:1px solid #c5d0d8;gap:3px;height:calc(100vh - 68px);min-height:560px;max-height:calc(100vh - 68px);margin:-12px -18px -22px;font-size:13px;display:grid;overflow:hidden}.ocr-toolbar{z-index:120;background:#f7fafc;border-bottom:1px solid #b7c5ce;grid-template-columns:minmax(600px,1.25fr) minmax(460px,1fr);grid-template-areas:"paths info""actions summary""notice notice";align-items:center;gap:4px 8px;padding:4px 8px;display:grid;position:sticky;top:0;box-shadow:0 2px 6px #1f2a331a}.ocr-path-stack{grid-area:paths;grid-template-columns:repeat(2,minmax(260px,1fr));gap:3px 8px;display:grid}.ocr-path-stack label{grid-template-columns:104px minmax(0,1fr);align-items:center;gap:4px;font-weight:400}.ocr-path-stack input{border-color:#aebdc6;border-radius:0;height:24px;padding:2px 6px}.ocr-config-button{color:#174155;background:#fff;border:1px solid #9fb3c0;border-radius:0;min-width:96px;min-height:0;padding:3px 9px}.ocr-config-lines{color:#263f4b;grid-area:info;gap:3px;min-width:0;padding:0;display:grid}.ocr-mode-line{flex-wrap:wrap;align-items:center;gap:5px;display:flex}.ocr-source-mode-select{grid-template-columns:auto 150px;align-items:center;gap:5px;font-weight:400;display:inline-grid}.ocr-source-mode-select span{white-space:nowrap}.ocr-source-mode-select select{border-radius:0;height:25px;padding:2px 24px 2px 7px}.ocr-mode-line button{color:#174155;background:#e6edf1;border-radius:0;min-width:auto;padding:3px 8px}.ocr-mode-line button.active{color:#fff;background:#146c94}.ocr-runtime-card{background:#eef5f8;border:1px solid #c4d1da;grid-area:runtime;gap:8px;min-height:82px;padding:8px;display:grid}.ocr-runtime-card button{border-radius:0;justify-self:start;padding:5px 10px}.ocr-runtime-button{border:1px solid #c4d1da;border-radius:0;padding:3px 9px}.ocr-runtime-text{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.ocr-profile-panel{background:#f8fafc;border:1px solid #d8dee9;border-radius:6px;grid-column:1/-1;padding:10px}.ocr-cache-panel{background:#f7fbfd;border:1px solid #c7d8e2;grid-template-columns:minmax(260px,1fr) auto auto auto;align-items:center;gap:8px;padding:8px;display:grid}.ocr-cache-panel.compact{grid-template-columns:minmax(220px,1fr) auto auto auto;padding:5px 6px}.ocr-cache-panel>div:first-child{gap:3px;min-width:0;display:grid}.ocr-cache-panel span{text-overflow:ellipsis;overflow:hidden}.ocr-cache-metrics{flex-wrap:wrap;gap:6px;display:inline-flex}.ocr-cache-metrics span{background:#fff;border:1px solid #c9d5dc;padding:2px 6px}.ocr-profile-header,.ocr-profile-actions{justify-content:space-between;align-items:center;gap:10px;display:flex}.ocr-profile-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px;margin-top:10px;display:grid}.ocr-profile-card{background:#fff;border:1px solid #d8dee9;border-radius:6px;gap:7px;padding:10px;display:grid}.ocr-profile-card.active{background:#eff6ff;border-color:#2563eb;box-shadow:inset 0 0 0 1px #2563eb}.ocr-profile-select{text-align:left;cursor:pointer;background:0 0;border:0;grid-template-columns:18px minmax(0,1fr) auto;align-items:start;gap:8px;padding:0;display:grid}.ocr-profile-select:disabled{cursor:default}.ocr-profile-select input{margin-top:2px}.ocr-profile-select span{gap:3px;display:grid}.ocr-profile-select b{color:#1d4ed8;white-space:nowrap;background:#dbeafe;border-radius:4px;padding:2px 6px;font-size:11px}.ocr-profile-card.active .ocr-profile-select b{color:#fff;background:#1d4ed8}.ocr-profile-card span,.ocr-profile-card small,.ocr-profile-card em{overflow-wrap:anywhere;color:#4b5563;font-size:12px}.ocr-profile-card em{font-style:normal}.ocr-profile-state-row{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.ocr-profile-status{border-radius:4px;width:fit-content;padding:2px 6px;font-weight:700;display:inline-flex}.ocr-profile-status.ready{color:#166534;background:#dcfce7}.ocr-profile-status.missing{color:#92400e;background:#fef3c7}.ocr-profile-status.warning{color:#991b1b;background:#fee2e2}.ocr-config-lines span,.ocr-summary-line span{overflow-wrap:anywhere}.ocr-actions,.ocr-summary-line{flex-wrap:wrap;grid-area:actions;align-items:center;gap:8px;display:flex}.ocr-actions button{color:#173748;background:#fff;border:1px solid #aebdc6;border-radius:0;min-width:104px;padding:5px 12px}.ocr-actions button.primary{color:#fff;background:#0f6f98;border-color:#0f6f98;font-weight:700}.ocr-actions button:not(:disabled):hover,.ocr-runtime-card button:not(:disabled):hover{background:#e9f3f8}.ocr-actions button:not(.ghost):not(:disabled){color:#173748;background:#fff}.ocr-actions button.primary:not(:disabled){color:#fff;background:#0f6f98}.ocr-summary-line{flex-wrap:nowrap;grid-area:summary;justify-content:flex-end;gap:4px;padding-top:0;overflow-x:auto}.ocr-summary-line span{color:#294653;white-space:nowrap;background:#fff;border:1px solid #c8d4dc;align-items:center;min-height:20px;padding:1px 6px;display:inline-flex}.ocr-toolbar .success,.ocr-toolbar .error{border-radius:0;grid-area:notice;padding:6px 8px}.ocr-modal-backdrop{z-index:400;background:#0f172a59;justify-content:flex-end;align-items:stretch;padding:0;display:flex;position:fixed;inset:0;overflow:hidden}.ocr-modal{background:#fff;border:0;border-left:1px solid #9fb3c0;grid-template-rows:auto minmax(0,1fr) auto;width:min(680px,100vw - 48px);height:100vh;max-height:100vh;display:grid;box-shadow:-12px 0 34px #0f172a3d}.ocr-log-modal{width:min(560px,100vw - 48px)}.ocr-modal-header,.ocr-modal-footer{z-index:3;background:#f8fafc;border-bottom:1px solid #d7e0e6;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;display:flex;position:sticky;top:0}.ocr-modal-footer{border-top:1px solid #d7e0e6;border-bottom:0;justify-content:flex-end}.ocr-modal-header>div{gap:3px;min-width:0;display:grid}.ocr-modal-header span{color:#52616b;overflow-wrap:anywhere}.ocr-modal-body{align-content:start;gap:12px;padding:12px 14px;display:grid;overflow:auto}.ocr-modal-section{background:#fbfdfe;border:1px solid #d7e0e6;gap:10px;padding:10px;display:grid}.ocr-check-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px;display:grid}.ocr-check-card{color:#1f2f38;text-align:left;background:#fff;border:1px solid #c9d5dc;gap:5px;min-height:76px;padding:10px;display:grid}.ocr-check-card.active{background:#e9f5fb;border-color:#146c94;box-shadow:inset 0 0 0 1px #146c94}.ocr-check-card span{color:#52616b;line-height:1.35}.ocr-log-filter-section label{gap:5px;display:grid}.ocr-log-filter-section input{border:1px solid #b9c6ce;max-width:420px;height:28px;padding:3px 8px}.ocr-grid-panel{z-index:1;background:#fff;border-top:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;grid-template-rows:0 auto;min-width:0;min-height:0;padding:0;display:grid;position:relative;overflow:hidden}.ocr-files-panel{grid-template-rows:auto auto minmax(0,1fr)}.ocr-grid-panel .panel-title{border:0;height:0;padding:0;overflow:hidden}.ocr-files-panel .panel-title{border-bottom:1px solid #d4d4d4;align-items:center;gap:10px;height:auto;min-height:34px;padding:4px 8px;display:flex;overflow:visible}.ocr-files-panel .panel-title h2{margin:0;font-size:13px}.ocr-files-panel .panel-title .muted{margin-right:auto}.ocr-column-panel{background:#f8fbfd;border-bottom:1px solid #d4d4d4;gap:8px;padding:8px;display:grid}.ocr-column-actions{align-items:center;gap:8px;display:flex}.ocr-column-actions strong{margin-right:auto}.ocr-column-options{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:6px 10px;display:grid}.ocr-column-option{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;min-width:0;display:grid}.ocr-column-option.required{font-weight:700}.ocr-column-option label{align-items:center;gap:6px;min-width:0;display:inline-flex}.ocr-column-options input{width:auto}.ocr-column-options span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ocr-column-order{gap:4px;display:inline-flex}.ocr-column-order button{border-radius:4px;width:28px;min-width:28px;height:24px;padding:0}.ocr-files-panel .grid-table-wrap,.ocr-results-panel .grid-table-wrap{height:100%;min-height:0;max-height:none}.grid-table-wrap{scrollbar-gutter:stable;background:#fff;border:0;border-radius:0;max-height:330px;position:relative;overflow:auto}.grid-table{border-collapse:separate;border-spacing:0;background:#fff;border-top:1px solid #bfc8cf;border-left:1px solid #bfc8cf;width:100%;min-width:1500px;font-size:12px}.ocr-files-panel .grid-table{min-width:2240px}.ocr-results-panel .grid-table{min-width:3600px}.grid-table th,.grid-table td{text-align:left;vertical-align:top;white-space:nowrap;border-bottom:1px solid #c6cfd6;border-right:1px solid #c6cfd6;padding:5px 8px}.grid-table th{z-index:60;color:#405663;text-align:center;-webkit-user-select:none;user-select:none;background:#e9eef2;font-weight:600;position:sticky;top:0;box-shadow:0 1px #aeb9c1}.grid-header-title{text-overflow:ellipsis;display:block;overflow:hidden}.grid-column-resizer{cursor:col-resize;z-index:6;width:7px;height:100%;position:absolute;top:0;right:-3px}.grid-column-resizer:hover{background:#1e70972e}.column-resizing,.column-resizing *{cursor:col-resize!important;-webkit-user-select:none!important;user-select:none!important}.grid-table td{text-overflow:ellipsis;max-width:280px;overflow:hidden}.grid-table td.col-OcrAction,.grid-table td.col-OcrPipeline,.grid-table td.col-FieldStatus,.grid-table td.col-OcrError{white-space:normal;text-overflow:clip;max-height:74px;line-height:1.35}.grid-table td.col-stt,.grid-table td.col-StatusLabel,.grid-table td.col-ProgressPercent,.grid-table td.col-OcrMs,.grid-table td.col-OcrModel,.grid-table td.col-OcrRouteRaw,.grid-table td.col-OcrEngineRaw{white-space:nowrap}.grid-table tbody tr:nth-child(2n){background:#fcfcfc}.grid-table tbody tr:hover{background:#eef7fb}.grid-table .sticky-cell{z-index:40;background:#fff;position:sticky}.grid-table th.sticky-cell{z-index:80;background:#e9eef2}.grid-table tbody tr:nth-child(2n) .sticky-cell{background:#fcfcfc}.grid-table tbody tr:hover .sticky-cell{background:#eef7fb}.grid-table td.status-ok{color:#166534;background:#e8f7ee;font-weight:600}.grid-table td.status-warn{color:#92400e;background:#fff7e6;font-weight:600}.grid-table td.status-error{color:#991b1b;background:#feecec;font-weight:600}.grid-table tbody tr:nth-child(2n) td.status-ok{background:#e3f4ea}.grid-table tbody tr:nth-child(2n) td.status-warn{background:#fff3d8}.grid-table tbody tr:nth-child(2n) td.status-error{background:#fde3e3}.grid-table tbody tr:hover td.status-ok,.grid-table tbody tr:hover td.status-warn,.grid-table tbody tr:hover td.status-error{background:#e3f2f8}.ocr-grid-splitter{cursor:row-resize;z-index:20;background:linear-gradient(#d9e0e4,#c7d1d7);border-top:1px solid #aeb9c1;border-bottom:1px solid #aeb9c1;min-height:7px;position:relative}.ocr-grid-splitter:after{content:"";border-top:1px solid #7d8d96;border-bottom:1px solid #7d8d96;width:54px;height:2px;position:absolute;top:2px;left:50%;transform:translate(-50%)}.ocr-grid-splitter:hover{background:#b9cdd8}.grid-row-resizing,.grid-row-resizing *{cursor:row-resize!important;-webkit-user-select:none!important;user-select:none!important}.chat-grid,.history-grid{grid-template-columns:minmax(360px,.8fr) minmax(520px,1.2fr);align-items:start}.panel{background:#fff;border:1px solid #dce3e8;border-radius:8px;gap:12px;padding:16px;display:grid}.row,.button-row,.panel-title,.composer-actions{align-items:center;gap:12px;display:flex}.panel-title,.composer-actions{justify-content:space-between}.row>*{flex:1}.toggle-line{border:1px solid #c9d5dd;border-radius:6px;align-self:end;align-items:center;gap:8px;min-height:41px;padding:9px 10px;font-weight:500;display:flex}.toggle-line input{width:auto}.prompt-box{min-height:170px}.hidden-input{display:none}.chat-control{position:sticky;top:12px}.conversation-panel{grid-template-rows:auto 1fr auto;min-height:640px}.conversation{flex-direction:column;gap:14px;min-height:520px;max-height:calc(100vh - 230px);padding-right:4px;display:flex;overflow:auto}.message{border:1px solid #dce3e8;border-radius:8px;max-width:92%;padding:12px 14px;line-height:1.55}.user-message{background:#eef7f2;border-color:#c9dfd2;align-self:flex-end}.assistant-message{background:#fbfcfd;align-self:flex-start}.message-role{color:#667780;text-transform:uppercase;margin-bottom:6px;font-size:12px;font-weight:700}.markdown-text h1,.markdown-text h2,.markdown-text h3,.markdown-text p{margin:0 0 10px}.markdown-text h1{font-size:22px}.markdown-text h2{font-size:18px}.markdown-text h3{font-size:16px}.markdown-text ul{margin:0 0 10px 20px;padding:0}.markdown-text p:last-child,.markdown-text ul:last-child{margin-bottom:0}.file-chips{flex-wrap:wrap;gap:8px;display:flex}.file-chips.compact{margin-bottom:8px}.file-chip{text-overflow:ellipsis;white-space:nowrap;color:#29414d;background:#f3f5f7;border:1px solid #d9e1e6;width:auto;max-width:100%;padding:6px 10px;overflow:hidden}.file-chip.static{border-radius:6px;display:inline-block}.status-line{color:#174155;background:#edf7fb;border:1px solid #cce6ef;border-radius:6px;padding:10px}.warning{color:#6f4d00;background:#fff8e5;border:1px solid #eed58d;border-radius:6px;padding:10px}.error{color:#9b1c1c;background:#fff1f1;border:1px solid #f2c7c7;border-radius:6px;padding:10px}.success{color:#0f6b3f;background:#eefbf3;border:1px solid #bfe8cf;border-radius:6px;padding:10px}.session-list,.history-group{border-top:1px solid #edf1f4;gap:8px;padding-top:12px;display:grid}.section-heading{color:#405863;text-transform:uppercase;font-size:13px;font-weight:700}.session-item,.history-item{text-align:left;color:#17202a;background:#f8fafb;border:1px solid #dce3e8;gap:4px;width:100%;display:grid}.session-item.active{border-color:#146c94;box-shadow:inset 3px 0 #146c94}.session-item span,.history-item span,.job-item span{color:#697985;font-size:13px}.job-item{background:#fbfcfd;border:1px solid #dce3e8;border-radius:6px;gap:4px;padding:10px;display:grid}.web-sources{border-top:1px solid #edf1f4;gap:8px;padding-top:12px;display:grid}.web-sources a{color:#146c94;text-decoration:none}.empty{color:#697985;text-align:center;border:1px dashed #cbd8df;border-radius:8px;padding:14px}.empty.large{min-width:min(420px,100%);margin:auto;font-size:20px}.result{min-height:520px}.result pre{white-space:pre-wrap;margin:0;line-height:1.5;overflow:auto}.full{grid-column:1/-1}.system-panel{align-content:start}.metric-grid{grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px;display:grid}.metric-card{background:#fbfcfd;border:1px solid #dce3e8;border-radius:8px;gap:8px;min-height:118px;padding:14px;display:grid}.metric-card span{color:#667780;text-transform:uppercase;font-size:13px;font-weight:700}.metric-card strong{color:#17202a;font-size:24px;line-height:1.1}.metric-card em{color:#697985;overflow-wrap:anywhere;font-style:normal}.qwen-install-panel{background:#fff8e5;border:1px solid #eed58d;border-radius:8px;justify-content:space-between;align-items:center;gap:16px;padding:12px 14px;display:flex}.server-ops-panel{background:#edf7fb;border:1px solid #b9d4e2;border-radius:8px;justify-content:space-between;align-items:center;gap:16px;padding:12px 14px;display:flex}.server-ops-panel div{gap:4px;min-width:0;display:grid}.server-ops-panel span{color:#365461;overflow-wrap:anywhere}.qwen-install-panel div{gap:4px;min-width:0;display:grid}.qwen-install-panel span{color:#6f4d00;overflow-wrap:anywhere}.install-log{color:#eef5f8;white-space:pre-wrap;background:#101820;border-radius:8px;max-height:260px;padding:12px;overflow:auto}form{gap:12px;display:grid}.sam-chat-layout{background:#fff;grid-template-columns:260px minmax(0,1fr);gap:0;min-height:calc(100vh - 146px);margin:-18px -24px -28px;display:grid}.sam-sidebar{background:#f6f6f6;border-right:1px solid #e3e3e3;flex-direction:column;gap:10px;min-height:0;padding:14px 10px;display:flex;overflow:hidden}.sidebar-content{flex-direction:column;gap:10px;min-height:0;display:flex;overflow:auto}.sidebar-rail,.panel-rail{display:none}.sidebar-collapsed{align-items:center;padding:10px 6px}.sidebar-collapsed .sidebar-content{display:none}.sidebar-collapsed .sidebar-rail{gap:8px;display:grid}.sidebar-brand-actions{align-items:center;gap:4px;display:inline-flex}.panel-icon-button{color:#222;background:0 0;border:1px solid #0000;border-radius:8px;place-items:center;width:34px;height:34px;padding:0;display:inline-grid}.panel-icon-button:hover{background:#e9e9e9}.panel-icon-button.compact{width:30px;height:30px}.sam-sidebar-brand{justify-content:space-between;align-items:center;padding:4px 6px 12px;display:flex}.sam-sidebar-brand strong{font-size:18px}.icon-button,.composer-plus{color:#17202a;background:0 0;border:1px solid #0000;border-radius:50%;place-items:center;width:34px;height:34px;padding:0;font-size:22px;display:inline-grid}.icon-button:hover,.composer-plus:hover{background:#e9e9e9}.sidebar-command,.sidebar-nav button,.sidebar-session{text-align:left;color:#17202a;background:0 0;border-radius:8px;width:100%;padding:9px 10px}.sidebar-command.active,.sidebar-nav button:hover,.sidebar-session:hover,.sidebar-session.active{background:#e9e9e9}.sidebar-search{color:#606060;gap:6px;padding:0 6px;font-size:13px}.sidebar-search input{border-color:#e0e0e0;border-radius:8px;height:34px}.sidebar-nav{border-bottom:1px solid #e3e3e3;gap:2px;padding-bottom:10px;display:grid}.sidebar-section-title{padding:10px 6px 4px;font-size:13px;font-weight:700}.sidebar-sessions{gap:2px;display:grid}.sidebar-session{cursor:pointer;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;display:grid}.sidebar-session-text{gap:3px;min-width:0;display:grid}.sidebar-session-text strong{text-overflow:ellipsis;white-space:nowrap;font-weight:500;overflow:hidden}.sidebar-session-text span,.sidebar-empty{color:#777;font-size:12px}.sidebar-session-actions{gap:4px;display:none}.sidebar-session:hover .sidebar-session-actions{display:flex}.sidebar-session-actions button{color:#333;background:#fff;border:1px solid #ddd;padding:4px 6px;font-size:12px}.sidebar-empty{padding:10px 8px}.sam-chat-main{background:#fff;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;display:grid;overflow:hidden}.sam-chat-topbar{justify-content:space-between;align-items:center;gap:12px;height:56px;padding:0 22px;display:flex}.sam-chat-topbar>div{gap:2px;display:grid}.sam-chat-topbar span{color:#777;font-size:13px}.sam-chat-stage{min-height:0;padding:18px 24px;overflow:auto}.sam-chat-stage.empty-state{place-items:center;display:grid}.sam-welcome{text-align:center;margin-bottom:110px}.sam-welcome h2{margin:0;font-size:26px;font-weight:500}.sam-messages{gap:18px;width:min(860px,100%);margin:0 auto;display:grid}.sam-message{padding:10px 0;line-height:1.65}.sam-message.user-message{background:#f4f4f4;border:0;border-radius:18px;justify-self:end;max-width:min(720px,88%);padding:12px 16px}.sam-message.assistant-message{background:0 0;border:0;justify-self:stretch;padding:8px 0}.thinking-panel{background:#fbfbfb;border:1px solid #e7e7e7;border-radius:12px;gap:8px;width:min(860px,100% - 48px);margin:0 auto 10px;padding:12px;display:grid}.thinking-header{color:#555;justify-content:space-between;gap:12px;font-size:13px;display:flex}.thinking-header strong{color:#146c94;font-weight:700}.thinking-step{color:#333;border-left:3px solid #146c94;padding-left:10px}.web-sources.compact{border-top:1px solid #eee;padding-top:8px}.sam-composer-wrap{gap:8px;width:min(760px,100% - 48px);margin:0 auto 26px;display:grid}.sam-composer{border:1px solid #e1e1e1;border-radius:999px;grid-template-columns:auto minmax(160px,1fr) auto auto auto auto;align-items:center;gap:8px;min-height:58px;padding:8px 10px;display:grid;box-shadow:0 8px 26px #00000014}.sam-composer textarea{resize:none;border:0;min-height:34px;max-height:120px;padding:7px 4px}.sam-composer textarea:focus{outline:none}.sam-composer select{color:#666;background:0 0;border:0;width:auto;max-width:150px;padding:6px}.send-button{border-radius:999px;min-width:44px}.composer-toolbox{background:#fff;border:1px solid #e5e5e5;border-radius:12px;flex-wrap:wrap;justify-self:start;align-items:center;gap:8px;padding:8px;display:flex;box-shadow:0 8px 20px #00000014}.composer-toolbox button{color:#222;background:#f2f2f2}.composer-toolbox label{align-items:center;gap:6px;font-weight:500;display:flex}.composer-toolbox input{width:auto}.composer-files{justify-content:center}.project-chat-layout{grid-template-columns:var(--left-panel-width,280px) 6px minmax(0, 1fr) 6px var(--right-panel-width,320px);background:#fff;gap:0;height:calc(100vh - 146px);min-height:0;margin:-18px -24px -28px;display:grid;overflow:hidden}.panel-closed{visibility:hidden;pointer-events:none;border:0!important;min-width:0!important;padding:0!important;overflow:hidden!important}.resize-handle{color:#999;cursor:col-resize;background:#f7f7f7;border:0;border-left:1px solid #ececec;border-right:1px solid #ececec;border-radius:0;width:6px;min-width:6px;height:100%;padding:0;font-size:11px}.resize-handle:hover{color:#146c94;background:#e9f3f8}.project-row{text-align:left;color:#17202a;background:0 0;border:0;border-radius:8px;gap:4px;width:100%;padding:9px 10px;display:grid}.project-row:hover,.project-row.active{background:#e9e9e9}.project-row strong{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.project-row span,.muted{color:#777;font-size:13px}.project-chip{color:#115b83;background:#eef7ff;border-radius:999px;justify-self:center;max-width:100%;padding:6px 12px;font-size:13px}.sam-composer.modern{grid-template-columns:minmax(0,1fr) auto}.composer-options{color:#555;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;font-size:14px;display:flex}.composer-options label{background:#fff;border:1px solid #e4e4e4;border-radius:999px;align-items:center;gap:6px;padding:6px 10px;display:inline-flex}.composer-options select{color:#17202a;background:0 0;border:0;width:auto;min-width:92px;padding:2px 4px}.option-pill{color:#333;background:#fff;border:1px solid #e4e4e4;border-radius:999px;padding:7px 12px}.option-pill.active{color:#146c94;background:#e7f4fb;border-color:#b8dceb}.project-panel{background:#fafafa;border-left:1px solid #e7e7e7;flex-direction:column;gap:14px;min-height:0;padding:18px 16px;display:flex;overflow:hidden}.project-panel-content{flex-direction:column;gap:14px;min-height:0;display:flex;overflow:auto}.project-panel-collapsed{align-items:center;padding:10px 5px}.project-panel-collapsed .project-panel-content{display:none}.project-panel-collapsed .panel-rail{gap:8px;display:grid}.project-create-form{background:#fff;border:1px solid #e4e4e4;border-radius:10px;gap:8px;padding:10px;display:grid}.project-create-form input,.project-create-form textarea{border:1px solid #d9e2ea;border-radius:8px;width:100%;padding:8px 10px}.project-create-form textarea{resize:vertical;min-height:64px}.project-create-form div{gap:8px;display:flex}.project-create-form button{border-radius:8px;padding:7px 10px}.project-settings-form{gap:12px;display:grid}.project-settings-form label{color:#555;gap:6px;font-size:13px;display:grid}.project-settings-form input,.project-settings-form textarea{color:#17202a;background:#fff;border:1px solid #d9e2ea;border-radius:8px;width:100%;padding:9px 10px}.project-settings-form textarea{resize:vertical;min-height:82px}.project-settings-form textarea.large{min-height:160px}.form-actions{flex-wrap:wrap;gap:8px;display:flex}.form-actions button{border-radius:8px;padding:8px 10px}.topbar-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.project-panel section{border-bottom:1px solid #e8e8e8;gap:10px;padding-bottom:14px;display:grid}.project-panel h3,.project-panel p{margin:0}.panel-title{justify-content:space-between;align-items:center;gap:10px;display:flex}.panel-title button,.member-row button,.project-file-row button{color:#333;background:#fff;border:1px solid #ddd;border-radius:7px;padding:5px 8px;font-size:12px}.panel-title .panel-icon-button{border-radius:8px;width:30px;height:30px;padding:0}.danger{color:#b42318;background:#fff1f1;border-color:#ffc9c9}.admin-stack,.admin-form,.audit-list{gap:12px;display:grid}.admin-users-panel{align-content:start;min-width:0}.admin-table-wrap{border:1px solid #dce3e8;border-radius:8px;overflow:auto}.admin-table{border-collapse:collapse;width:100%;min-width:780px}.admin-table th,.admin-table td{text-align:left;vertical-align:middle;border-bottom:1px solid #edf1f4;padding:10px 12px}.admin-table th{color:#405863;background:#f8fafb;font-size:13px}.admin-table tr.selected td{background:#eef7fb}.admin-actions{white-space:nowrap;justify-content:flex-end;gap:8px;display:flex}.admin-actions button{padding:6px 10px}.link-button{color:#146c94;background:0 0;border:0;padding:0;font-weight:700}.audit-row{border-top:1px solid #edf1f4;justify-content:space-between;gap:12px;padding-top:8px;display:flex}.audit-row span{color:#697985;font-size:13px}.member-list,.project-file-list{gap:8px;display:grid}.member-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.member-row div:first-child{gap:2px;min-width:0;display:grid}.member-row span{color:#777;font-size:12px}.member-row div:last-child,.project-file-row{gap:6px;display:flex}.project-file-row{justify-content:space-between;align-items:center}.project-file-row button:first-child{text-overflow:ellipsis;white-space:nowrap;text-align:left;min-width:0;overflow:hidden}@media (width<=1180px){.metric-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}.ocr-batch-screen{height:calc(100vh - 58px);max-height:calc(100vh - 58px)}.ocr-toolbar{grid-template-columns:minmax(520px,1.1fr) minmax(360px,.9fr);grid-template-areas:"paths info""actions summary""notice notice"}.ocr-path-stack{grid-template-columns:repeat(2,minmax(230px,1fr))}.ocr-modal{width:min(86vw,760px)}.ocr-log-modal{width:min(78vw,620px)}.ocr-paths,.ocr-runtime-box{grid-template-columns:1fr}.project-chat-layout{grid-template-columns:var(--left-panel-width,250px) 6px minmax(0, 1fr) 6px var(--right-panel-width,300px)}.project-panel{border-top:1px solid #e7e7e7;border-left:0;grid-column:1/-1;grid-template-columns:repeat(2,minmax(220px,1fr));min-height:auto;display:grid}}@media (width<=980px){.work-grid,.admin-grid,.chat-grid,.history-grid{grid-template-columns:1fr}.ocr-batch-screen{min-height:520px;margin:-14px}.ocr-toolbar{grid-template-columns:1fr;grid-template-areas:"paths""info""actions""summary""notice"}.ocr-config-lines{padding:2px 0}.ocr-path-stack{grid-template-columns:1fr}.ocr-actions{justify-content:flex-start;padding-bottom:2px;overflow-x:auto}.ocr-actions button{min-width:104px;padding:6px 10px}.ocr-modal{width:calc(100vw - 32px)}.sam-chat-layout{grid-template-columns:1fr;margin:-14px}.project-chat-layout{grid-template-columns:1fr;height:auto;min-height:calc(100vh - 146px);margin:-14px;overflow:visible}.resize-handle{display:none}.panel-closed{display:none!important}.sam-sidebar{border-bottom:1px solid #e3e3e3;border-right:0;min-height:auto;max-height:260px}.project-panel{grid-template-columns:1fr}.chat-control{position:static}.conversation{max-height:none}.topbar,.tabs{padding-left:14px;padding-right:14px}main{padding:14px}}@media (width<=640px){.topbar,.tabs,.row,.composer-actions{flex-direction:column;align-items:stretch}.ocr-batch-screen{grid-template-rows:auto minmax(130px, var(--ocr-files-height,210px)) 7px minmax(180px, 1fr);height:calc(100vh - 50px);min-height:480px;max-height:calc(100vh - 50px);margin:-12px}.ocr-toolbar{grid-template-columns:1fr;grid-template-areas:"paths""info""actions""summary""notice";padding:6px}.ocr-path-stack label{grid-template-columns:92px minmax(0,1fr)}.ocr-summary-line{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto}.ocr-modal-backdrop{justify-content:center;align-items:flex-end}.ocr-modal,.ocr-log-modal{border:1px solid #9fb3c0;border-bottom:0;border-radius:10px 10px 0 0;width:100vw;height:min(92vh,760px);max-height:92vh;box-shadow:0 -10px 28px #0f172a3d}.ocr-modal-header,.ocr-modal-footer{padding:10px 12px}.ocr-check-grid,.ocr-cache-panel,.metric-grid{grid-template-columns:1fr}.message{max-width:100%}.sam-composer{border-radius:18px;grid-template-columns:auto minmax(0,1fr) auto}.sam-composer select{display:none}.composer-options{justify-content:flex-start}.composer-options label{justify-content:space-between;width:100%}}
