.source-scope{border:1px solid #d0def0;border-radius:10px;background:#fff;margin:18px 0;padding:22px;scroll-margin-top:24px;color:#15344d}.source-scope header{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.source-scope h3{font-size:23px;margin:5px 0 10px}.source-scope p{line-height:1.6}.source-scope .eyebrow{font-size:10px;color:#607e9e;letter-spacing:1px;margin:0}.source-filters{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0 18px}.source-filters button{font-size:12px;max-width:100%;overflow-wrap:anywhere}.source-filters button[aria-pressed=true]{background:#ecf4ff;border-color:#93bbff;color:#005bbb}.source-filters small{padding-left:6px}.source-search{flex-basis:100%}.source-search input{width:100%;padding:9px 12px;border:1px solid #cedcf0;border-radius:6px;background:white}.source-toolbar{display:flex;flex-wrap:wrap;gap:18px;align-items:center;background:#fafcff;padding:12px 0;border-block:1px solid #d9e4f4;font-size:12px}.source-toolbar label{display:flex;gap:8px;align-items:center}.source-toolbar button{border:0;background:transparent;color:#005bbb;font-size:12px}.source-toolbar>span{margin-left:auto;color:#005bbb}.source-columns,.source-entry{display:grid;grid-template-columns:20px 32px 82px 76px minmax(0,1fr) 108px;gap:14px;align-items:center;padding:14px}.source-columns{font-size:11px;color:#6e839e;border-bottom:1px solid #e6edf7}.source-columns>span:last-child{text-align:right}.source-entry{border:1px solid #d6e2f3;border-radius:8px;margin:9px 0;cursor:pointer}.source-entry.is-selected{background:#f0f6ff;border-color:#85b4ff}.source-entry input{width:17px;height:17px;accent-color:#005bbb}.source-zone{display:flex;align-items:center;gap:14px;font-size:12px;color:#50759b;margin:26px 0 12px}.source-zone:after{content:'';height:1px;flex:1;background:#e4edf7}.source-ordinal,.source-designation{font-size:11px;color:#607f9d;overflow-wrap:anywhere}.source-image{width:76px;height:76px;border:1px solid #d8e5f6;border-radius:7px;background:white;display:flex;align-items:center;justify-content:center;overflow:hidden}.source-image.empty{flex-direction:column;border-style:dashed;color:#8da1b8;background:#fbfdff}.source-image.empty>span{font-size:25px}.source-image small{font-size:9px}.source-image img{width:100%;height:100%;object-fit:contain;min-width:0}.source-copy>span{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6}.source-copy small{display:block;font-size:11px;line-height:1.5;color:#7289a4;margin-top:5px}.source-quantity{text-align:right;font-size:13px;line-height:1.5}.source-quantity>*{display:block}.source-quantity small{font-size:10px;color:#7289a4}.source-report{font-size:12px;color:#607b97;margin:20px 0;line-height:1.6}.source-report li{margin:8px 0;overflow-wrap:anywhere}.source-handoff{position:sticky;bottom:10px;z-index:12;display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid #ccdcef;border-radius:8px;background:#fff;padding:16px;box-shadow:0 4px 22px #233d5812;margin-top:22px}.source-handoff strong{display:block;font-size:14px}.source-handoff small{display:block;font-size:11px;margin-top:6px;color:#607b97}.source-handoff button{white-space:nowrap}.source-scope .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
#mdd-work-panel:has(.source-scope){overflow:clip}
@media(max-width:1000px){.source-columns,.source-entry{grid-template-columns:18px 25px 58px 62px minmax(0,1fr) 82px;gap:10px;padding:12px}.source-image{width:62px;height:68px}.source-scope{padding:18px}.source-handoff{padding:13px}}
@media(max-width:620px){.source-scope{padding:14px}.source-scope header{display:block}.source-scope header>.pill{display:none}.source-columns{display:none}.source-entry{grid-template-columns:18px 62px minmax(0,1fr);grid-template-areas:'check ordinal designation' '. image text' '. qty qty';align-items:start;gap:10px}.source-entry input{grid-area:check}.source-ordinal{grid-area:ordinal}.source-ordinal:before{content:'Lp. '}.source-designation{grid-area:designation}.source-designation:before{content:'Oznaczenie: '}.source-image{grid-area:image}.source-copy{grid-area:text}.source-copy>span{font-size:12px}.source-quantity{grid-area:qty;text-align:left;border-top:1px solid #e1eaf5;padding-top:7px}.source-quantity:before{content:'Ilość według opisu';display:block;color:#7289a4;font-size:10px}.source-toolbar{gap:10px}.source-toolbar>span{width:100%;margin-left:25px}.source-handoff{flex-direction:column;align-items:stretch}.source-handoff button{white-space:normal}}

/* Wide source preview with a per-case column picker. */
.source-view-picker{margin:12px 0;padding:9px 13px;border:1px solid #d2e1f2;border-radius:8px;background:#f8fbff}
.source-view-picker summary{cursor:pointer;font-size:12px;font-weight:650;color:#005bbb}
.source-view-picker [data-source-column-options]{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:8px 12px;max-height:260px;overflow:auto;margin-top:12px}
.source-view-picker label{display:flex;align-items:center;gap:7px;font-size:12px}
.source-view-picker input{width:16px;height:16px;accent-color:#005bbb}
.source-view-picker p{font-size:11px;color:#607b97;margin:9px 0 0}
.source-table-scroll{max-width:100%;overflow-x:auto}
.source-table-scroll .source-columns,.source-table-scroll .source-entry{width:100%;min-width:100%;gap:12px;align-items:start}
.source-table-scroll .source-columns>span:last-child{text-align:left}
.source-table-scroll .source-entry>*{min-width:0}
.source-table-scroll .source-image{width:240px;height:124px;display:flex;justify-content:flex-start;gap:4px;overflow-x:auto;position:relative;scroll-snap-type:x proximity}
.source-table-scroll .source-image img{flex:0 0 112px;width:112px;height:112px;object-fit:contain;scroll-snap-align:start}
.source-table-scroll .source-image em{position:sticky;right:0;bottom:0;align-self:end;white-space:nowrap;font-size:9px;font-style:normal;background:#fffffff0;color:#496582;padding:2px 3px}
.source-table-scroll .source-copy>span{font-size:13px;line-height:1.45}
.source-table-scroll .source-value{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.45}
.source-table-scroll .source-quantity{text-align:left}
@media(max-width:700px){.source-table-scroll .source-columns{display:none}.source-table-scroll .source-entry{display:flex;flex-wrap:wrap;width:100%;min-width:0;gap:8px}.source-table-scroll .source-entry>[data-label]{flex:1 1 100%}.source-table-scroll .source-entry>[data-label]:before{content:attr(data-label);display:block;color:#7289a4;font-size:10px}.source-table-scroll .source-entry input[data-source-entry]{flex:0 0 18px}.source-table-scroll .source-image{flex:0 0 240px;max-width:100%}.source-table-scroll .source-ordinal:before,.source-table-scroll .source-designation:before,.source-table-scroll .source-quantity:before{content:attr(data-label)}}

/* Source documents are distinct from individual image crops extracted for matching. */
.material-bulk-toolbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0;padding:9px 12px;border:1px solid #d2e1f2;border-radius:8px;background:#f8fbffef;backdrop-filter:blur(6px)}
.material-bulk-toolbar label{display:inline-flex;align-items:center;gap:7px;font-size:12px;margin-right:auto}
.material-bulk-toolbar label input,.material-row>[data-material-select]{width:17px;height:17px;flex:none;accent-color:#005bc5}
.material-bulk-toolbar [data-material-count]{font-size:12px;color:#607b97;margin-right:8px}
.material-row>[data-material-select]{margin-right:2px}
.technical-images{margin-top:20px;background:#fff}
.technical-images summary{font-weight:600}
.technical-image-folder{margin:10px 0;border:1px solid #dce6f2;border-radius:8px;padding:8px 12px}
.technical-image-folder summary{cursor:pointer;overflow-wrap:anywhere}
.technical-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;max-height:520px;overflow:auto;padding:4px}
.technical-image-grid figure{margin:0;padding:7px;border:1px solid #dce6f2;border-radius:7px;background:#fafcff;min-width:0}
.technical-image-grid .file-preview{width:100%;height:110px;object-fit:contain}
.technical-image-grid figcaption{font-size:10px;color:#607b97;overflow-wrap:anywhere;max-height:42px;overflow:hidden}
.bulk-material-names{max-height:145px;overflow:auto;font-size:12px;line-height:1.5}
.bulk-position-list{max-height:310px;overflow:auto;padding:0 10px;border:1px solid #dce6f2;border-radius:7px}
.bulk-position-list .check-row{margin:6px 0;padding:5px 0;border-bottom:1px solid #edf2f8}
@media(max-width:760px){.material-bulk-toolbar{position:static}.material-bulk-toolbar label{width:100%}.material-row .actions{padding-left:0}}

/* Compact, expandable source rows keep multi-line cells readable on demand. */
.source-table-scroll .source-entry{align-items:center;padding:5px 8px;min-height:60px;cursor:default}
.source-table-scroll .source-entry.is-expanded{align-items:start}
.source-table-scroll .source-expand{border:1px solid #c9dcf3;border-radius:6px;background:#f5f9ff;color:#005bbb;padding:0;width:23px;height:27px;min-height:27px;line-height:1;font-size:18px;cursor:pointer}
.source-table-scroll .source-expand:hover,.source-table-scroll .source-expand:focus-visible{background:#e6f1ff}
.source-table-scroll .source-image{height:50px}
.source-table-scroll .source-image img{height:44px;flex-basis:66px;width:66px}
.source-table-scroll .source-copy>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;line-height:1.35}
.source-table-scroll .source-copy small{margin-top:3px}
.source-table-scroll .source-value,.source-table-scroll .source-designation,.source-table-scroll .source-quantity{display:block;max-height:43px;overflow:hidden;white-space:normal;line-height:1.35}
.source-table-scroll .source-entry.is-expanded .source-copy>span{display:block;white-space:pre-wrap;overflow:visible}
.source-table-scroll .source-entry.is-expanded .source-value,.source-table-scroll .source-entry.is-expanded .source-designation,.source-table-scroll .source-entry.is-expanded .source-quantity{max-height:none;white-space:pre-wrap;overflow:visible}
.source-table-scroll .source-entry.is-expanded .source-image{height:124px}
.source-table-scroll .source-entry.is-expanded .source-image img{height:112px;flex-basis:112px;width:112px}
@media(max-width:700px){.source-table-scroll .source-entry{min-height:0;align-items:flex-start}.source-table-scroll .source-expand{flex:none}.source-table-scroll .source-copy>span{-webkit-line-clamp:3}}
.source-review-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 0}.source-review-controls span{font-size:12px;color:#527096}.source-review-state{grid-column:1/-1;display:flex;gap:10px;align-items:center;justify-content:flex-end}.source-review-state small{color:#527096}.source-map-dialog{width:min(1100px,96vw);max-height:85vh;border:1px solid #b9d0ef;border-radius:12px;padding:20px;box-shadow:0 16px 48px #152f5938}.source-map-dialog::backdrop{background:#152a4266}.source-map-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:15px 0}.source-map-fields label{display:grid;gap:4px;font-size:13px}.source-map-fields select,.source-map-fields input{padding:8px;border:1px solid #bad0ec;border-radius:6px}.source-map-preview{max-height:35vh;overflow:auto}.source-map-preview table{border-collapse:collapse;font-size:12px;min-width:800px}.source-map-preview th,.source-map-preview td{border:1px solid #d6e2f2;padding:6px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-map-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}
.source-text-dialog{width:min(1400px,97vw);max-height:92vh;overflow:auto;color:#15344d}.source-text-dialog h3{margin:0 0 8px}.source-text-dialog p{font-size:13px;line-height:1.5}.source-text-tools{display:flex;flex-wrap:wrap;align-items:end;gap:9px;margin:12px 0}.source-text-tools label{display:grid;gap:4px;flex:1 1 260px;font-size:12px}.source-text-tools select{width:100%;padding:8px;border:1px solid #bad0ec;border-radius:6px}.source-text-layout{display:grid;grid-template-columns:minmax(230px,0.9fr) minmax(360px,1.4fr);gap:16px}.source-text-layout h4{margin:8px 0;font-size:14px}.source-text-lines,.source-text-rows{max-height:54vh;overflow:auto;border:1px solid #d6e2f2;border-radius:7px;padding:8px}.source-text-lines button{display:block;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;margin:3px 0;padding:7px;border:1px solid transparent;border-radius:5px;background:#f8fbff;color:#183751;font-size:12px;line-height:1.4}.source-text-lines button[aria-pressed=true]{border-color:#66a5ef;background:#eaf4ff}.source-text-lines button strong{margin-right:8px;color:#005bbb}.source-text-row{border:1px solid #d6e2f2;border-radius:8px;padding:10px;margin-bottom:9px}.source-text-row-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.source-text-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin:10px 0}.source-text-fields label{display:grid;gap:4px;font-size:11px}.source-text-fields input,.source-text-fields textarea{width:100%;box-sizing:border-box;padding:7px;border:1px solid #bad0ec;border-radius:5px;font:inherit}.source-text-fields .source-text-wide{grid-column:1/-1}.source-text-row small{display:block;color:#607b97;overflow-wrap:anywhere}.source-text-dialog footer{position:sticky;bottom:-20px;background:#fff;padding:12px 0;border-top:1px solid #d6e2f2}@media(max-width:800px){.source-text-layout{grid-template-columns:1fr}.source-text-lines,.source-text-rows{max-height:32vh}}
