/* Shared visual language for the real supplier workspace and its offline tour. */
.supplier-home{max-width:1320px!important}.supplier-home .home-header{gap:20px}.supplier-portal{max-width:1160px;margin:auto}.supplier-portal .section{max-width:none}.supplier-eyebrow{display:block;font-size:10px;font-weight:750;letter-spacing:1.6px;color:var(--theme-accent,#17664a);margin-bottom:10px}.supplier-access-pill{display:inline-flex;align-items:center;padding:7px 12px;border:1px solid var(--border,#a8b9af);border-radius:999px;font-size:11px;white-space:nowrap;background:var(--theme-panel,#eef3ed);color:var(--theme-panel-ink,#233e32)}
.supplier-intake-card{padding:26px 0}.supplier-intake-card>h2,.supplier-preview-top h2{font-size:clamp(24px,3vw,36px);letter-spacing:-1px;line-height:1.15;margin:8px 0 14px}.supplier-intake-card>p,.supplier-preview-top p{max-width:720px;line-height:1.7;color:var(--theme-surface-muted,#5f7069)}
.supplier-journey{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:24px 0}.supplier-journey span{padding:8px 12px;border:1px solid var(--border,#b8c8bd);border-radius:999px;font-size:12px;color:var(--theme-surface-muted,#52665c)}.supplier-journey span:first-child{color:var(--theme-accent,#17664a);border-color:var(--theme-accent,#17664a)}
.supplier-upload-card,.supplier-next-card,.supplier-history-card,.supplier-editor-card{border:1px solid var(--border,#b8c8bd);border-radius:20px;background:var(--theme-surface,#fcf8f0);color:var(--theme-surface-ink,#22322d);padding:26px;box-sizing:border-box}.supplier-upload-card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;border-style:dashed;background:var(--theme-panel,#f0f4ef)}.supplier-upload-card p,.supplier-next-card p{line-height:1.7;margin:0}.supplier-upload-card h3,.supplier-next-card h3{font-size:21px;margin:0}.supplier-card-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid var(--theme-accent,#17664a);border-radius:15px;font-size:28px;color:var(--theme-accent,#17664a);margin-bottom:4px}.supplier-upload-card small{font-size:11px;line-height:1.6;color:var(--theme-panel-muted,#5b6c63);max-width:430px}.supplier-upload-card input[type=file]{max-width:100%;box-sizing:border-box}.supplier-upload-card .help-field{width:min(100%,500px)}.supplier-upload-card>.help-info{margin-top:-8px}
.supplier-status{display:inline-flex;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:650;line-height:1.3;background:var(--theme-badge,#e8eee7);color:var(--theme-badge-ink,#264939);white-space:nowrap}.supplier-status.attention{background:var(--theme-warning,#fff0d2);color:var(--theme-warning-ink,#764c13)}.supplier-status.ready{background:var(--theme-success,#e4f0e6);color:var(--theme-success-ink,#22633e)}
.supplier-history-card{margin:24px 0}.supplier-history-card header,.supplier-history-heading,.supplier-editor-card>header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.supplier-history-card h2,.supplier-history-card h3,.supplier-editor-card h3{margin:0}.supplier-history-card>p{font-size:13px;line-height:1.7;margin:14px 0}.supplier-history-scroll{max-width:100%;overflow:auto;margin-top:20px;border:1px solid var(--border,#b8c8bd);border-radius:12px}.supplier-history-scroll table{border-collapse:collapse;width:100%;font-size:13px}.supplier-history-scroll th{background:var(--theme-header,#e9ede5);color:var(--theme-header-ink,#233e32);text-align:left;font-size:11px;padding:14px 16px}.supplier-history-scroll td{padding:16px;border-bottom:1px solid var(--border,#c5d0c8)}.supplier-history-scroll small{display:block;margin-top:5px;font-size:11px;color:var(--theme-surface-muted,#5f7069)}.supplier-history-card .list-table{margin:0}.supplier-history-card .list-table td{padding:18px 12px}
.supplier-editor-card>p{line-height:1.7}.supplier-editor-card footer{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:20px}.supplier-editor-card footer>span{font-size:12px;color:var(--theme-surface-muted,#5f7069)}.supplier-editor-card .supplier-correction-table{border-radius:12px}.supplier-editor-card .supplier-correction-table td{padding:8px;min-width:180px}.supplier-editor-card .supplier-cell-issue{box-shadow:inset 3px 0 #bc8b28}.supplier-editor-card input:focus-visible{outline:2px solid var(--theme-accent,#17664a);outline-offset:2px}
.supplier-portal-preview{padding:clamp(18px,3vw,34px)!important}.supplier-preview-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.supplier-preview-notice{font-size:11px;padding:10px 14px;border-radius:10px;background:var(--theme-panel,#edf1e8);color:var(--theme-panel-muted,#52665c);margin-top:20px}.supplier-portal-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:20px}.supplier-next-card{display:flex;flex-direction:column;align-items:flex-start;gap:16px}.supplier-file-picker{width:100%;font-size:12px}.supplier-file-picker input{margin-top:8px}.supplier-issue-banner{padding:14px 16px;background:var(--theme-warning,#fff0d2);color:var(--theme-warning-ink,#764c13);border-radius:12px;border-left:3px solid #bc8b28;margin:20px 0}.supplier-issue-banner span{display:block;font-size:12px;margin-top:6px}.supplier-preview-flag{background:var(--theme-warning,#fff0d2);color:var(--theme-warning-ink,#764c13);box-shadow:inset 3px 0 #bc8b28}.supplier-preview-flag input{max-width:180px}.supplier-preview-result{padding:14px 0;font-size:13px;line-height:1.6}.supplier-editor-card table input{box-sizing:border-box;width:100%}
@media(max-width:760px){.supplier-home{padding:14px!important}.supplier-home .home-header{align-items:flex-start;flex-wrap:wrap}.supplier-portal-grid{grid-template-columns:1fr}.supplier-upload-card,.supplier-next-card,.supplier-history-card,.supplier-editor-card{padding:18px;border-radius:16px}.supplier-preview-top{flex-direction:column}.supplier-journey{gap:6px}.supplier-journey span{font-size:10px;padding:7px 9px}.supplier-history-scroll th,.supplier-history-scroll td{padding:12px}.supplier-history-card .list-table{display:table}.supplier-editor-card.supplier-correction-dialog{padding:16px}.supplier-access-pill{font-size:10px}}

.supplier-cell-styled input{background:transparent!important;color:inherit!important;font-weight:inherit;font-style:inherit;font-family:inherit;font-size:inherit}.supplier-cell-styled .supplier-issue-tag{font-style:normal;font-weight:700;font-size:10px}

.supplier-editor-card header>div>small{display:block;font-size:10px;letter-spacing:1.3px;margin-bottom:8px;color:var(--theme-surface-muted,#5f7069)}.supplier-editor-card header h2{display:block!important;margin:0;font-size:22px}.supplier-upload-card .supplier-card-icon svg{display:block}
.supplier-intake-card{padding:26px;border:1px solid var(--border,#b8c8bd);border-radius:20px;background:var(--theme-surface,#fcf8f0)}
@media(max-width:760px){.supplier-intake-card{padding:18px}.supplier-history-card .list-table,.supplier-history-card .list-table tbody{display:block;width:100%}.supplier-history-card .list-table thead{display:none}.supplier-history-card .list-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;border-bottom:1px solid var(--border,#b8c8bd);padding:12px 0}.supplier-history-card .list-table td{display:block;border:0;padding:8px 0;overflow-wrap:anywhere}.supplier-history-card .list-table td:first-child{grid-column:1/-1}.supplier-history-card .list-table td:last-child{grid-column:1/-1;display:flex;align-items:center;gap:8px}.supplier-history-card .list-table td:last-child button{flex:1;white-space:normal}.supplier-history-card .list-table td:nth-child(2){font-size:12px;color:var(--theme-surface-muted,#5f7069)}}

/* Window controls remain grouped at the far right; expansion uses the viewport. */
.supplier-correction-dialog>header{flex-wrap:nowrap;align-items:flex-start}
.supplier-correction-dialog>header>div:first-child{min-width:0;overflow-wrap:anywhere}
.supplier-correction-dialog .correction-window-actions{margin-left:auto;display:flex;flex-shrink:0;gap:6px}
.correction-window-actions button{width:32px;height:32px;padding:0;background:transparent;font-size:20px}
.supplier-correction-dialog.is-expanded{position:fixed;inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;display:flex;flex-direction:column}
.supplier-correction-dialog.is-expanded .supplier-correction-table{flex:1;min-height:120px;max-height:none;margin:8px 0}
.supplier-correction-dialog.is-expanded>p{margin:6px 0}
.supplier-correction-dialog.issues-only [data-correction-table] tbody tr:not(.has-issue){display:none}
.supplier-history-filters{align-items:end;gap:12px}
.supplier-correction-table table{border-collapse:separate;border-spacing:0;min-width:100%}.supplier-editor-card .supplier-correction-table td{position:relative;padding:0;border:1px solid var(--border)}.supplier-correction-table input[data-correction-row][readonly]{border:0;border-radius:0;background:transparent;color:inherit;padding:9px 28px 9px 9px;font:inherit;outline:none}.supplier-correction-table input[data-correction-row]:not([readonly]){background:var(--theme-input);color:var(--ink);border:2px solid var(--theme-accent);padding:7px}.supplier-correction-table .supplier-issue-tag{position:absolute;right:3px;top:4px;border-radius:50%;width:20px;height:20px;padding:0;background:var(--theme-warning);color:var(--theme-warning-ink);border:1px solid currentColor}.correction-message{display:block;text-align:left;border:0;background:transparent;color:inherit;padding:7px;width:100%}.correction-message.warning{border-left:3px solid #bc8b28}.correction-message.error,.correction-message.reject{border-left:3px solid #c84444}.message-focused,.issue-focused{box-shadow:inset 0 0 0 3px #2582bd!important;background:#2582bd22!important}.verification-outcome{font-weight:600}.supplier-file-history th button{background:transparent;border:0;color:inherit;padding:3px;white-space:nowrap}

.verification-outcome{display:block;margin-top:8px}
/* Portal history stays compact; the complete journey is in a detached hover card. */
.portal-status-trigger{cursor:help;white-space:nowrap;font:inherit}.portal-status-card{position:fixed;z-index:1000;max-width:calc(100vw - 24px);box-sizing:border-box;padding:12px;background:var(--theme-surface);color:var(--theme-surface-ink);border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 30px #0003;overflow-x:auto}.portal-status-card .lifecycle{display:flex;flex-wrap:nowrap;white-space:nowrap;margin:0;width:max-content}.portal-status-card .lifecycle li,.portal-status-card .lifecycle small{white-space:nowrap;flex-shrink:0}.portal-status-card .lifecycle small{display:inline}.portal-open-file{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;border:1px solid var(--border);border-radius:8px;padding:8px 12px;background:var(--theme-panel);color:var(--theme-panel-ink);font-weight:600}.portal-open-file:hover{border-color:var(--theme-accent);background:var(--theme-hover)}.intake-results .portal-open-file{margin-left:12px}
/* Use Workbench's fixed-width, bordered data-table, with compact spreadsheet cells. */
.supplier-correction-dialog .supplier-correction-table{border-radius:0;background:var(--theme-table);min-height:180px}.supplier-correction-dialog .supplier-correction-table .data-table{table-layout:fixed;border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:13px}.supplier-correction-dialog .supplier-correction-table .data-table th{text-align:left;height:40px;padding:8px 12px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);font-size:12px}.supplier-correction-dialog .supplier-correction-table .data-table td{height:36px;padding:0;min-width:0;border-right:1px solid var(--border);border-bottom:1px solid var(--border);border-top:0;border-left:0}.supplier-correction-dialog .supplier-correction-table input[data-correction-row]{display:block;width:100%;height:36px;min-width:0;box-sizing:border-box;padding:8px 28px 8px 12px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;outline:none}.supplier-correction-dialog .supplier-correction-table input[data-correction-row]:focus{box-shadow:inset 0 0 0 2px var(--theme-accent);background:var(--theme-input);color:var(--theme-input-ink)}.supplier-correction-dialog .portal-row-number{width:52px}.portal-upload-changes{margin:8px 0}.portal-upload-changes .diff-scroll{max-height:220px}.portal-upload-changes .diff-before{display:block;font-size:11px;opacity:.8}.portal-upload-changes p{font-size:12px}.supplier-correction-dialog.is-expanded .portal-upload-changes{flex-shrink:0;max-height:38dvh;overflow:auto}

/* Keep rule borders above editable controls and delta colors, inside the cell. */
.supplier-correction-dialog td.supplier-cell-styled{position:relative}


/* One Workbench cell surface, with a border overlay above the temporary editor. */
.supplier-correction-dialog td.supplier-cell-styled::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;outline:inherit;outline-offset:inherit}
.supplier-correction-dialog .supplier-correction-table input[data-correction-row][readonly]{cursor:cell;box-shadow:none;background:transparent;color:inherit;text-decoration:inherit}
.supplier-correction-dialog .supplier-correction-table input[data-correction-row]:not([readonly]){box-shadow:inset 0 0 0 2px var(--theme-accent);text-decoration:none}
/* Keep messages readable when the full-screen editor shares space with a diff.
   Scroll the issue area instead of flex-shrinking individual messages to nothing. */
.supplier-correction-dialog.is-expanded>[data-correction-issues]{flex:0 0 auto;max-height:22vh;overflow:auto}
.supplier-correction-dialog.is-expanded>header,.supplier-correction-dialog.is-expanded>footer,.supplier-correction-dialog.is-expanded>.form-row,.supplier-correction-dialog.is-expanded>h3,.supplier-correction-dialog.is-expanded>p{flex-shrink:0}
.supplier-correction-dialog.is-expanded .supplier-correction-table{min-height:220px}

.version-diff-table td.supplier-cell-styled{position:relative}.version-diff-table td.supplier-cell-styled::after{content:"";position:absolute;inset:0;pointer-events:none;outline:inherit;outline-offset:inherit}

/* One full-size view at a time, without discarding corrections between tabs. */
.supplier-correction-dialog [role=tabpanel][hidden],.supplier-correction-dialog .correction-view-tabs[hidden]{display:none!important}
.correction-view-tabs{display:flex;gap:6px;border-bottom:1px solid var(--border);padding:0 0 10px;flex-shrink:0}.correction-view-tabs button{background:transparent;border:1px solid transparent;border-radius:8px;padding:10px 14px;white-space:normal}.correction-view-tabs button[aria-selected=true]{background:var(--theme-panel);border-color:var(--green);color:var(--theme-surface-ink);font-weight:700}
.supplier-correction-dialog .portal-upload-changes .diff-scroll{max-height:55dvh;overflow:auto}.supplier-correction-dialog.is-expanded [role=tabpanel]:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0;max-height:none;overflow:hidden}.supplier-correction-dialog.is-expanded .portal-upload-changes{flex-shrink:1;margin:0}.supplier-correction-dialog.is-expanded [data-upload-changes]{display:flex;flex-direction:column;flex:1;min-height:0}.supplier-correction-dialog.is-expanded .portal-upload-changes .diff-scroll{flex:1;min-height:0;max-height:none}.supplier-correction-dialog.is-expanded .correction-verification .supplier-correction-table{min-height:0;flex:1}.correction-verification>[data-correction-issues]{flex:none;max-height:18dvh;overflow:auto}.correction-verification>h3{display:none}.correction-verification>[data-correction-note]{font-size:12px;line-height:1.5}.supplier-correction-dialog .file-diff-table thead th{position:sticky;top:0;z-index:2;background:var(--theme-header);color:var(--theme-header-ink)}
/* Compact file review: table-first layout, independent tabs and collapsed findings. */
.supplier-correction-dialog.supplier-editor-card{padding:12px;height:min(880px,94dvh);display:flex;flex-direction:column;overflow:hidden}.supplier-correction-dialog:not([open]){display:none}.supplier-correction-dialog>header{position:relative;align-items:center;margin:0 0 8px;min-height:32px;flex-shrink:0}.supplier-correction-dialog>header>div:first-child{flex:1;text-align:center;padding-left:76px}.supplier-correction-dialog>header h2{font-size:16px;line-height:1.3;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.supplier-correction-dialog .correction-window-actions button{padding:4px 8px;min-height:30px}.supplier-correction-dialog .correction-view-tabs{padding:0 0 6px;gap:5px}.supplier-correction-dialog .correction-view-tabs button{padding:7px 12px;border-color:var(--border);background:var(--theme-input);color:var(--theme-input-ink);font-size:12px}.supplier-correction-dialog .correction-view-tabs button[aria-selected=true]{background:var(--theme-accent);color:#fff;border-color:var(--theme-accent);box-shadow:inset 0 -3px 0 currentColor}.supplier-correction-dialog [role=tabpanel]:not([hidden]),.supplier-correction-dialog [data-upload-changes]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.supplier-correction-dialog [data-correction-note]{margin:6px 0;font-size:12px}.supplier-correction-dialog .correction-verification>.form-row{margin:0;gap:8px;align-items:center}.supplier-correction-dialog .correction-verification>.form-row label{display:flex;align-items:center;gap:6px}.supplier-correction-dialog select,.supplier-correction-dialog footer button{padding:6px 9px;font-size:12px}.supplier-correction-dialog .correction-findings{flex:none;margin:5px 0;font-size:12px}.correction-findings>summary{cursor:pointer;font-weight:600;padding:5px 0}.supplier-correction-dialog .correction-findings [data-correction-issues]{max-height:16dvh}.supplier-correction-dialog.schema-blocked .correction-findings{max-height:45dvh;overflow:auto}.supplier-correction-dialog.schema-blocked .correction-findings [data-correction-issues]{max-height:none}.supplier-correction-dialog .supplier-correction-table,.supplier-correction-dialog .portal-upload-changes .diff-scroll{flex:1;min-height:0;max-height:none;margin:4px 0;overflow:auto}.supplier-correction-dialog footer{flex-shrink:0;margin:5px 0 0;gap:6px;font-size:12px}.supplier-correction-dialog [data-correction-status]:empty{display:none}.supplier-correction-dialog [data-correction-status]{flex-shrink:0;margin:4px 0;font-size:12px}.portal-diff-toolbar,.portal-diff-controls,.portal-diff-pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex-shrink:0;margin:4px 0;font-size:12px}.portal-diff-toolbar .diff-summary{margin:0;gap:5px}.portal-diff-toolbar .diff-header{padding:6px 9px}.portal-diff-baseline{max-width:320px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:auto}.portal-diff-controls label{display:flex;align-items:center;gap:5px}.portal-diff-help{margin-left:auto}.portal-diff-help p{max-width:560px;margin:6px 0}.portal-diff-pagination{justify-content:flex-end}.portal-diff-pagination button{padding:4px 9px;font-size:12px}.portal-upload-changes .file-diff-table th small{display:block;font-size:10px;font-weight:normal}.supplier-correction-dialog.is-expanded{height:100dvh}.supplier-correction-dialog .file-diff-table thead tr:nth-child(2) th{top:35px}

.portal-upload-changes .value-added{background:#25955130}.portal-upload-changes .value-removed{background:#d4454530}

/* Shared supplier review grid: selection never changes data or saved formatting. */
.supplier-correction-table .data-table thead th{position:sticky;top:0;z-index:3;background:var(--theme-header);color:var(--theme-header-ink);cursor:cell}
.supplier-correction-table .data-table th.portal-row-number{position:sticky;left:0;z-index:2;background:var(--theme-header);color:var(--theme-header-ink);padding:0;text-align:center}
.supplier-correction-table .data-table thead th.portal-row-number{z-index:4}
.portal-row-number>button{width:100%;height:100%;border:0;background:transparent;color:inherit;padding:6px;cursor:cell}
.review-column-resize{position:absolute;right:0;top:0;bottom:0;width:7px;cursor:col-resize;touch-action:none}
.review-row-resize{position:absolute;left:0;right:0;bottom:0;height:7px;cursor:row-resize;touch-action:none}
.review-column-resize:hover,.review-row-resize:hover,.review-column-resize:focus,.review-row-resize:focus{background:var(--theme-accent)}
.supplier-correction-table .review-cell-text{display:block;white-space:pre;overflow:hidden;text-overflow:clip;padding:8px 28px 8px 12px;line-height:20px;min-height:36px;box-sizing:border-box}
.supplier-correction-table td{overflow:hidden}
.supplier-correction-dialog .supplier-correction-table input[data-correction-row][readonly]{position:absolute;inset:0;height:100%;opacity:0}
.supplier-correction-dialog .supplier-correction-table input[data-correction-row]:not([readonly]){position:absolute;inset:0;height:100%;z-index:1}
.wrap-cell-text .review-cell-text{white-space:pre-wrap;overflow-wrap:anywhere}
.supplier-correction-table .review-selected{outline:2px solid #8b5cf6;outline-offset:-2px;background-image:linear-gradient(#8b5cf624,#8b5cf624)!important}
.supplier-correction-table .review-intersection{outline:3px solid #7c3aed;outline-offset:-3px;background-image:linear-gradient(#8b5cf64d,#8b5cf64d)!important}
.supplier-correction-table .supplier-allowed-value,.supplier-correction-table .supplier-issue-tag{z-index:2}
.supplier-value-picker:has([data-values-context][open]){max-width:calc(100vw - 16px);max-height:85dvh;overflow:auto}
.supplier-value-picker [data-values-context-tables] .table-scroll{max-height:300px;overflow:auto}
.supplier-correction-table .supplier-allowed-value{position:relative}

/* Fixed numeric table width prevents long cell values from sizing columns. */
.supplier-correction-dialog .supplier-correction-table .data-table{min-width:0;max-width:none}
.supplier-correction-table .data-table thead th{white-space:normal;overflow:visible;padding-right:24px}
.review-column-name{display:block;overflow:hidden;overflow-wrap:anywhere}
.review-column-resize{width:11px;right:-3px;z-index:8;border-right:2px solid transparent}
.review-column-resize:hover{border-color:var(--theme-accent)}
.supplier-correction-dialog:not(.wrap-cell-text) .review-cell-text{height:36px;max-height:36px;white-space:pre;overflow:hidden}
.supplier-correction-dialog:not(.wrap-cell-text) .data-table td{height:36px}
.review-column-filter{position:absolute;top:4px;right:12px;font-weight:normal}
.review-column-filter summary{cursor:pointer;list-style:none;padding:2px}
.review-column-filter>div{position:absolute;top:24px;right:0;width:240px;padding:10px;border:1px solid var(--border);border-radius:6px;background:var(--theme-panel);color:var(--theme-panel-ink);box-shadow:0 6px 20px #0003;z-index:9;white-space:normal}
.review-column-filter label{margin:5px 0}
.review-column-filter input[type=search]{width:100%}
.supplier-shared-columns{display:flex;flex-wrap:wrap;gap:10px;border:1px solid var(--border);padding:10px;margin:8px 0}
.supplier-shared-columns[disabled]{opacity:.45}

.review-column-filter input[type=checkbox]{position:static;width:auto;height:auto;margin:0;display:inline-block}
.supplier-correction-table .supplier-allowed-value{position:absolute;top:5px;right:27px;width:24px;height:24px;padding:0;line-height:22px;background:var(--theme-input);color:var(--theme-input-ink);border:1px solid var(--border)}
.supplier-correction-table .review-cell-text{padding-right:58px}
.supplier-value-picker{display:none;max-height:min(460px,85dvh);overflow:hidden}
.supplier-value-picker:popover-open{display:flex;flex-direction:column;gap:8px}
.supplier-value-picker.show-full-table{height:82dvh;max-height:82dvh}
.supplier-value-picker [data-choice-full-table]{flex:1;min-height:0;overflow:auto}
.supplier-value-picker [data-choice-full-table] section{display:flex;flex-direction:column;min-height:0;max-height:65dvh}
.supplier-value-picker [data-choice-full-table] .table-scroll{max-height:60dvh;overflow:auto}
.supplier-value-picker [data-choice-full-table] th{position:sticky;top:0;background:var(--theme-header);color:var(--theme-header-ink)}
.supplier-value-picker [role=listbox]{max-height:min(300px,45dvh);overflow:auto;flex:1;min-height:0}

/* Keep the review controls and filter checkbox aligned in both app themes. */
.correction-grid-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.correction-grid-toolbar .grow{flex:1}
.correction-grid-toolbar .icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:6px}
.correction-grid-toolbar .icon-button[aria-pressed=true]{background:var(--theme-accent);color:var(--theme-accent-ink,#fff)}
.review-column-filter>div{display:flex;flex-direction:column;gap:10px;padding:14px;width:260px}
.review-column-filter>div>label:not(.review-filter-issues){display:flex;flex-direction:column;gap:5px}
.review-column-filter .review-filter-issues{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;font-size:13px;line-height:1.4;margin:0}
.review-column-filter .review-filter-issues input[type=checkbox]{flex:0 0 16px;width:16px;height:16px}
.review-column-filter .review-filter-issues span{flex:1;text-align:left}

.supplier-correction-table thead th:has(.review-column-filter[open]){z-index:20}
.review-column-filter>div{background:var(--theme-panel,#fff);color:var(--theme-panel-ink,#22322d)}
.review-filter-actions{display:flex;justify-content:flex-end;gap:8px}
.review-filter-actions button{width:auto;margin:0}

.review-finding-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}
.review-finding-tools input{flex:1;min-width:160px}
.correction-message.finding-message{display:grid;grid-template-columns:78px 86px minmax(0,1fr);gap:12px;align-items:start;border-bottom:1px solid var(--border);padding:10px;text-align:left}
.finding-message[hidden]{display:none!important}.finding-row{font-variant-numeric:tabular-nums;white-space:nowrap}.finding-severity{font-size:12px;font-weight:650}.finding-description{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}
.finding-message.message-focused{background:transparent!important;box-shadow:none!important;outline:2px solid #00a5c8;outline-offset:-2px}
.supplier-correction-table td:is(.review-issue-target,.review-issue-related)::after{content:"";position:absolute;inset:3px;pointer-events:none;z-index:4;border:2px dashed #9d85db;border-radius:3px}
.supplier-correction-table td.review-issue-target::after{inset:4px;border:3px solid #00b9df;box-shadow:0 0 0 1px #00647a;border-radius:3px}
@media(max-width:600px){.correction-message.finding-message{grid-template-columns:66px 76px minmax(0,1fr);gap:6px;font-size:12px}}
.supplier-correction-dialog .correction-findings [data-correction-issues]{max-height:min(240px,24dvh);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}

/* Three stable toolbar slots survive info-button wrappers and keep one row. */
.supplier-correction-dialog .review-finding-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,auto) auto;gap:10px;align-items:center;margin:6px 0}
.review-finding-tools>div{display:flex;align-items:center;min-width:0;gap:4px}
.review-finding-tools .help-field{flex:1;min-width:0}
.supplier-correction-dialog .review-finding-tools input,.supplier-correction-dialog .review-finding-tools select{width:100%;min-width:0;max-width:100%}
.review-finding-tools button{white-space:nowrap}
.supplier-correction-dialog .finding-message{padding:6px 9px;gap:10px;min-height:34px;align-items:center}
.finding-message .finding-description{display:grid;grid-template-columns:minmax(120px,1fr) minmax(160px,2fr);gap:12px;align-items:center}
.finding-description strong,.finding-description>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.supplier-correction-table td.review-issue-related::after{inset:4px;border:3px dashed #b38aff;box-shadow:0 0 0 1px #493269}
.supplier-correction-table td.review-issue-target::after{inset:4px;border:4px solid #00e5ff;box-shadow:0 0 0 1px #003945,inset 0 0 0 1px #003945}
.supplier-correction-table td:is(.review-issue-target,.review-issue-related)::before{content:"";position:absolute;top:4px;left:4px;width:0;height:0;border-top:10px solid #b38aff;border-right:10px solid transparent;pointer-events:none;z-index:5}
.supplier-correction-table td.review-issue-target::before{border-top-color:#00e5ff;border-top-width:13px;border-right-width:13px}
@media(max-width:600px){.supplier-correction-dialog .review-finding-tools{grid-template-columns:minmax(0,1fr) 100px auto;gap:5px}.review-finding-tools input,.review-finding-tools select,.review-finding-tools button{font-size:11px!important;padding:6px!important}.finding-message .finding-description{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.finding-description>span{margin-left:8px}.finding-message .finding-row,.finding-message .finding-severity{font-size:11px}}

.correction-grid-toolbar [data-correction-download]{margin-left:auto}
.supplier-correction-dialog .correction-findings [data-correction-issues]{max-height:min(180px,20dvh)}
@media(max-width:600px){.supplier-correction-dialog .correction-findings [data-correction-issues]{max-height:15dvh}}

/* Finding navigation and filtering are independent keyboard-operable buttons. */
.filter-icon{display:inline-block;vertical-align:middle;flex:none;pointer-events:none}
.finding-entry{position:relative;min-width:0}
.finding-entry[hidden],.review-active-filter[hidden]{display:none!important}
.supplier-correction-dialog .finding-entry>.finding-message{padding-right:44px}
.finding-rule-filter{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;padding:5px;border:1px solid transparent;border-radius:5px;background:transparent;color:inherit}
.finding-rule-filter:hover{border-color:var(--theme-accent,#217c72)}
.finding-rule-filter[aria-pressed=true]{background:var(--theme-accent,#217c72);color:var(--theme-accent-ink,#fff);border-color:currentColor}
.finding-rule-filter:focus-visible{outline:2px solid var(--theme-accent,#217c72);outline-offset:1px}
.review-active-filter{display:inline-flex;align-items:center;gap:4px;max-width:260px;padding:3px 5px;border:1px solid var(--theme-accent,#217c72);border-radius:6px;font-size:12px}
.review-active-filter>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.review-active-filter>button{padding:0 4px;line-height:20px;border:0;background:transparent;color:inherit}
.review-column-filter summary{display:inline-flex;align-items:center;gap:2px}

/* Draft status supplements, rather than replaces, saved rule formatting. */
.supplier-correction-dialog .review-draft-note{font-size:.8rem;color:var(--muted);margin:.25rem 0}
.supplier-correction-dialog [data-draft-status="resolved"]>.supplier-issue-tag{background:#167c45;color:#fff}
.supplier-correction-dialog [data-draft-status="checking"]>.supplier-issue-tag{background:#365f9c;color:#fff}
.supplier-correction-dialog [data-draft-status="deferred"]>.supplier-issue-tag{background:#94680c;color:#fff}
.supplier-correction-dialog .review-cell-text[data-draft-status="resolved"]{box-shadow:inset 0 -3px #35c779}
.supplier-correction-dialog .finding-message[data-draft-status="resolved"] .finding-severity{color:#35c779}
.supplier-correction-dialog .finding-message[data-draft-status="checking"] .finding-severity{color:#6db9ff}
.supplier-correction-dialog .finding-message[data-draft-status="deferred"] .finding-severity{color:#e8bb54}

.supplier-correction-dialog [data-draft-status="remaining"][data-draft-blocking="false"]>.supplier-issue-tag{background:#94680c;color:#fff}
.supplier-correction-dialog [data-draft-status="remaining"][data-draft-blocking="true"]>.supplier-issue-tag{background:#b3313a;color:#fff}
