:root{--man-anthracite: #303C49;--man-red: #E40045;--man-silver: #AFAFAF;--surface: #ffffff;--page: #f4f5f6;--line: #d7d9db;--text: #1f2933;--muted: #687481;color:var(--text);background:var(--page);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;overflow:hidden}body{margin:0}button,input,textarea{font:inherit}h1,h2,h3,p,dl,dd{margin:0}button{min-height:32px;border:1px solid var(--man-silver);border-radius:4px;background:var(--surface);color:var(--man-anthracite);cursor:pointer;font-weight:700}button:hover:not(:disabled){border-color:var(--man-red);color:var(--man-red)}button:disabled{color:#8d949b;cursor:default}.primary{border-color:var(--man-red);background:var(--man-red);color:#fff}.primary:hover:not(:disabled){color:#fff;filter:brightness(.95)}.ghost-danger{color:var(--man-red)}.icon-danger{display:inline-grid;place-items:center;width:28px;min-width:28px;min-height:26px;padding:0;border-color:#edd0d8;color:var(--man-red);font-size:18px;line-height:1}.app-shell{display:grid;grid-template-columns:minmax(0,58fr) minmax(0,42fr);grid-template-rows:auto minmax(0,1fr);gap:10px;height:100vh;overflow:hidden;padding:10px 12px}.topbar{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:54px;padding:8px 14px;border:1px solid var(--man-silver);background:var(--man-anthracite);color:#fff}.brand-block,.topbar-meta,.actions,.assistant-actions,.section-heading,.review-bar,.review-bar>div{display:flex;align-items:center;gap:10px}.logo-placeholder{display:grid;place-items:center;width:76px;height:30px;border:1px solid var(--man-silver);color:#fff;font-size:18px;font-weight:900;letter-spacing:1px}.brand-logo{width:76px;height:34px;object-fit:contain}.topbar h1{font-size:18px}.topbar p{color:#d8dde2;font-size:12px}.topbar-meta{color:#edf0f2;font-size:13px}.status-dot{padding:4px 8px;border-radius:3px;background:#e8eaec;color:var(--man-anthracite);font-size:12px;font-weight:800}.status-dot.red{background:var(--man-red);color:#fff}.status-dot.yellow{background:#fff3d0;color:#725000}.status-dot.green{background:#e5f4e7;color:#1f6b31}.editor,.panel{min-height:0;border:1px solid var(--man-silver);border-radius:4px;background:var(--surface);overflow:hidden}.editor{min-width:0;height:100%;overflow-y:auto;overflow-x:hidden}.editor-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border-bottom:1px solid var(--man-silver);background:#f8f9fa}.editor-header h2,.panel h2{color:var(--man-anthracite);font-size:16px}.editor-header p,.empty,.source-item p,.history p,.validation-band span,.panel h2 span{color:var(--muted);font-size:12px}.total-chip{min-width:118px;padding:6px 9px;border-left:4px solid var(--man-red);background:#eef0f2;text-align:right;font-weight:900}.validation-band{display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding:7px 12px;border-bottom:1px solid var(--line);background:#fbfbfc}.validation-band strong{color:var(--man-anthracite)}.validation-band button{min-height:24px;padding:2px 7px;border-color:#d9dcdf;font-size:12px}.validation-band button.warn{border-color:#d8a400;background:#fff7dc;color:#735600}.validation-issues{display:flex;flex:1;min-width:180px;gap:8px;overflow-x:auto;white-space:nowrap}.section{padding:9px 12px;border-bottom:1px solid #e5e7e9;scroll-margin-top:82px}.section h3,.section summary{color:var(--man-anthracite);font-size:13px;font-weight:900;text-transform:uppercase}.section h3{margin-bottom:7px}.section summary{cursor:pointer;list-style-position:inside}.compact-section .grid{margin-top:8px}.section-heading{justify-content:space-between;margin-bottom:7px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px}.field{display:grid;gap:3px}.field span{display:flex;align-items:baseline;justify-content:space-between;gap:10px;color:#4d5864;font-size:10px;font-weight:800;text-transform:uppercase}.field small{padding:1px 5px;border:1px solid #d9dcdf;color:#5c6670;font-size:9px;font-weight:700;text-transform:none}.field input,.field textarea,td input,.assistant textarea{width:100%;border:1px solid var(--man-silver);border-radius:3px;background:#fff;color:var(--text)}.field input,td input{height:29px;padding:4px 7px}.field textarea,.assistant textarea{min-height:62px;padding:7px;resize:none}.field input:read-only,.field textarea:read-only{background:#eef0f2;color:#384450;font-weight:700}.table-wrap{overflow-x:auto;border:1px solid var(--man-silver);border-radius:3px}table{width:100%;min-width:860px;border-collapse:collapse;font-size:13px}th,td{padding:5px;border-bottom:1px solid #e6e8ea;text-align:left;vertical-align:top}th{background:var(--man-anthracite);color:#fff;font-size:11px;text-transform:uppercase}.charge-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-column:1 / -1;gap:10px}.totals-section{background:#f7f8f9}.custom-fields{display:grid;gap:7px;margin-top:8px}.custom-field-row,.custom-field-add{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(160px,1.2fr) auto auto;align-items:center;gap:7px}.custom-field-row input,.custom-field-add input{width:100%;height:28px;border:1px solid var(--man-silver);border-radius:3px;padding:4px 7px}.custom-field-row small{color:var(--muted);font-size:11px;white-space:nowrap}.add-field{justify-self:start;min-height:26px;padding:2px 8px;border-style:dashed;color:#46525e;font-size:12px}.side{display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:10px;min-width:0;min-height:0;height:100%}.panel{padding:10px 12px;overflow:auto}.panel h2{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sources{overflow-y:auto}.source-item{padding:8px 0;border-top:1px solid #e5e7e9}.source-item>div{display:flex;justify-content:space-between;gap:10px;margin-bottom:4px}.source-item strong{color:var(--man-anthracite)}.source-item span{color:var(--man-red);font-weight:900}.source-item>strong{display:block;margin-top:4px;font-size:13px}.source-item button{margin-top:6px;min-height:26px;padding:2px 7px;font-size:12px}.assistant{display:flex;flex-direction:column;gap:8px;overflow:hidden}.assistant>div:first-child p{color:var(--muted);font-size:12px}.history{display:grid;align-content:start;gap:7px;flex:1;min-height:0;overflow:auto}.message,.suggestions,.warning{padding:8px;border:1px solid #d9dcdf;border-radius:3px;background:#f8f9fa}.message p{white-space:pre-line}.message.user{justify-self:end;max-width:86%;border-left:3px solid var(--man-anthracite);background:#fff}.message.assistant,.message.status{border-left:3px solid var(--man-red)}.message.warning,.message.suggestion{border-left:3px solid #c68100;background:#fffaf0}.message-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.chips{display:flex;flex-wrap:wrap;gap:7px;align-self:start}.chips button{min-height:28px;padding:3px 8px;font-size:12px}.suggestions{display:grid;gap:6px;max-height:120px;overflow:auto}.suggestions h3{color:var(--man-anthracite);font-size:13px}.warning{border-color:var(--man-red);color:var(--man-red)}.missing{color:var(--muted);font-style:italic;font-weight:400}.field em{color:var(--muted);font-size:11px;font-style:normal}.field-red input,.field-red textarea{border-color:var(--man-red);background:#fff7f7}.field-yellow input,.field-yellow textarea{border-color:#c68100;background:#fffaf0}.field-pulse input,.field-pulse textarea{outline:2px solid rgba(227,0,15,.25)}.skeleton{height:92px;background:#e6e8ea}.composer{display:grid;gap:7px;margin-top:auto;padding-top:8px;border-top:1px solid var(--line);background:#fff}.composer textarea{min-height:66px;max-height:86px}.assistant-actions{justify-content:space-between}.assistant-actions .primary{margin-left:auto}.review-bar{position:sticky;bottom:0;z-index:3;justify-content:space-between;padding:9px 12px;border-top:1px solid var(--man-silver);background:#fff;box-shadow:0 -4px 10px #303c4914}.review-bar>div:last-child{display:none}.review-bar span{color:#46525e;font-size:11px;font-weight:700}.review-bar span:last-child{color:#7a5800}.drawer{position:fixed;inset:0;z-index:10;display:flex;justify-content:flex-end;background:#303c4959}.drawer>div{width:min(560px,92vw);padding:18px;background:#fff;box-shadow:-12px 0 28px #303c4938}.drawer button{margin-bottom:14px}.drawer h2{color:var(--man-anthracite);margin-bottom:8px}.drawer p{margin-bottom:10px;color:#4f5b66}.source-modal-backdrop{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:4vh 5vw;background:#141c249e}.source-modal{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(90vw,1280px);height:86vh;border:1px solid var(--man-silver);border-radius:4px;background:#fff;box-shadow:0 18px 42px #141c2457;overflow:hidden}.source-modal header,.source-modal footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:#f8f9fa}.source-modal header{border-bottom:1px solid var(--line)}.source-modal footer{border-top:1px solid var(--line)}.source-modal h2{color:var(--man-anthracite);font-size:17px}.source-modal footer span{min-width:0;overflow:hidden;color:var(--muted);font-size:13px;text-overflow:ellipsis;white-space:nowrap}.modal-close{width:32px;min-width:32px;padding:0;color:var(--man-red);font-size:20px}.pdf-preview{display:grid;place-items:center;min-height:0;background:#eef0f2}.pdf-preview iframe{width:100%;height:100%;border:0;background:#fff}.pdf-error{display:grid;gap:10px;max-width:520px;padding:18px;border:1px solid var(--man-red);background:#fff;color:var(--man-red)}.info{color:#2563eb;font-size:12px;margin:6px 0 0}.file-input{display:none}.table-wrap.mini{max-height:180px;margin:10px 0}.excel-preview table{font-size:12px}@media(max-width:1180px){.app-shell{grid-template-columns:minmax(0,58fr) minmax(0,42fr)}.side{grid-template-rows:auto auto}}.source-detail-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}.source-detail-header h2{margin:0}.source-detail-list{display:grid;grid-template-columns:130px minmax(0,1fr);margin:0 0 16px;border-top:1px solid var(--line)}.source-detail-list dt,.source-detail-list dd{margin:0;padding:6px 8px;border-bottom:1px solid var(--line);line-height:1.35}.source-detail-list dt{color:var(--muted);font-size:12px;font-weight:700}.source-detail-list dd{color:var(--man-anthracite);font-size:13px;font-weight:650;overflow-wrap:anywhere}.source-detail-list dd.missing{color:var(--muted);font-style:italic;font-weight:500}.source-detail-section-title{margin:14px 0 6px;font-size:12px;font-weight:900;letter-spacing:.04em}.source-detail-snippet{max-height:140px;overflow-y:auto;padding:10px;border:1px solid var(--line);background:#f8f9fa;color:#4f5b66;font-size:12px;line-height:1.45}.source-detail-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px}.source-detail-actions button{width:100%;min-width:0;margin:0}@media(max-width:720px){.source-detail-actions{grid-template-columns:1fr}}.source-detail-list.compact{grid-template-columns:minmax(150px,42%) minmax(0,58%)}.source-detail-list.compact dt,.source-detail-list.compact dd{min-width:0;overflow-wrap:anywhere;word-break:break-word}.source-detail-list.compact dt{padding-right:14px}.source-detail-list.compact dd{padding-left:14px}.section-error{border:1px solid rgba(228,0,69,.65)!important;background:#e4004506;box-shadow:inset 3px 0 #e40045}.section-warning{border:1px solid rgba(190,135,0,.55)!important;background:#ffc10709;box-shadow:inset 3px 0 #c58b00}.section-validation-hint{display:inline-block;margin-left:10px;color:#e40045;font-size:11px;font-weight:700;text-transform:none;letter-spacing:normal}.man-logo{display:block;width:100%;height:100%;object-fit:contain}.logo-placeholder:has(.man-logo){overflow:hidden;padding:4px 8px}.assistant-scroll{flex:1 1 auto;min-height:0;max-height:32vh;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:6px}.assistant-scroll>*{flex-shrink:0}.panel.assistant,.assistant-panel{min-height:0;overflow:hidden}.panel.assistant .messages,.panel.assistant .assistant-messages,.assistant-panel .messages,.assistant-panel .assistant-messages{min-height:0;overflow-y:auto;overflow-x:hidden}.login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#f3f5f7}.login-card{width:min(460px,90vw);background:#fff;border:1px solid #d7dbe0;border-radius:12px;padding:40px;box-shadow:0 10px 35px #00000014}.login-brand{display:flex;align-items:center;gap:18px;margin-bottom:35px}.login-logo{width:90px;height:45px;object-fit:contain}.login-brand h1{margin:0;font-size:28px}.login-brand p{margin:4px 0 0}.login-content h2{margin-bottom:10px}.login-content p{color:#667085;line-height:1.5;margin-bottom:28px}.login-button{width:100%;padding:14px;font-size:16px}.logo-placeholder{width:72px;height:36px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:transparent;border:none}.logo-placeholder .man-logo{width:100%;height:100%;object-fit:contain;object-position:center}.login-logo{width:110px;height:45px;object-fit:contain;object-position:center}.login-screen{background:#f4f6f8}.login-card{border-radius:14px;border:1px solid #d9dde3}.login-button{background:#e40045;color:#fff;border:none}.login-button:hover{filter:brightness(.95)}
