.workspace:has(#expanded-status){grid-template-columns:1fr}.workspace:has(#expanded-status) .workspace-controls{border-right:0;border-bottom:1px solid var(--line);padding:25px}.workspace:has(#expanded-status) .workspace-result{padding:25px;min-width:0}.expanded-two,.expanded-three{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.expanded-three{grid-template-columns:repeat(3,minmax(0,1fr))}.expanded-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:16px 0}.expanded-actions .field{margin:0;min-width:140px}.expanded-actions .button{padding:11px 16px}.workspace textarea{box-sizing:border-box;resize:vertical;width:100%;padding:12px;border:1px solid #bdc9be;border-radius:5px;background:#fff;color:#173f3b;font:14px/1.5 ui-monospace,monospace}.expanded-table-scroll{overflow-x:auto}.invoice-items{width:100%;border-collapse:collapse;min-width:620px}.invoice-items td,.invoice-items th{padding:7px;text-align:left}.invoice-items input{width:100%;box-sizing:border-box;padding:9px;border:1px solid #bdc9be}.invoice-items td:first-child{width:50%}.invoice-items td:nth-child(2),.invoice-items td:nth-child(3){width:100px}.invoice-items button{padding:5px;margin:2px;border:1px solid #bdc9be;background:white;border-radius:4px}.document-preview{width:100%;height:650px;border:1px solid #d5dcd1;background:white}.expanded-print-frame{position:fixed;width:1px;height:1px;bottom:0;left:0;border:0;opacity:0;pointer-events:none}.expanded-details{padding:15px;border:1px solid var(--line);margin-top:20px}.expanded-details>summary{cursor:pointer;font-weight:600;margin-bottom:15px}.qr-preview{max-width:350px;margin:20px auto}.qr-preview svg{width:100%;height:auto}.qr-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:150px;overflow:auto}.diff-output{max-height:650px;overflow:auto;border:1px solid var(--line);background:white}.diff-columns{display:grid;grid-template-columns:1fr 1fr}.diff-columns>div{min-width:0}.diff-columns>div+div{border-left:1px solid #ccc}.diff-line{display:flex;gap:12px;padding:4px 8px;white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.5 ui-monospace,monospace;min-height:27px}.diff-line:focus{outline:2px solid #365e54;outline-offset:-2px}.diff-line-number{color:#6b746c;min-width:45px;user-select:none;font-size:11px}.diff-line.add{background:#dff4df}.diff-line.remove{background:#ffe5df}.diff-line mark{background:#ffce73;color:#222}.expanded-drop{border:2px dashed #bacaba;padding:25px;display:grid;gap:14px;cursor:pointer}.extended-preview{max-width:100%;max-height:500px;display:block;margin:auto;object-fit:contain}.batch-errors{font-size:13px;overflow-wrap:anywhere}.has-error{color:#aa392e}#expanded-progress{width:100%;height:15px}#expanded-status{min-height:1.6em;overflow-wrap:anywhere}.workspace:has(#expanded-status) input[type=file]{max-width:100%;font-size:12px}.workspace:has(#expanded-status) button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:650px){.expanded-two,.expanded-three{grid-template-columns:1fr}.workspace:has(#expanded-status) .workspace-controls,.workspace:has(#expanded-status) .workspace-result{padding:16px}.expanded-actions{gap:8px}.expanded-actions .button{font-size:12px}.document-preview{height:500px}.diff-columns{grid-template-columns:1fr}.diff-columns>div+div{border-left:0;border-top:2px solid #bbb}.expanded-actions .field{width:100%}}

.diff-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}.diff-pair>div{min-width:0}.diff-pair>div+div{border-left:1px solid #d0d8cc}.diff-pair .diff-line{height:100%;box-sizing:border-box}.diff-pair .empty{background:#f0f1ed}@media(max-width:650px){.diff-pair{grid-template-columns:1fr}.diff-pair>div+div{border-left:0}}
.workspace[data-tool="invoice-generator"] .invoice-items{min-width:930px;table-layout:fixed}
.workspace[data-tool="invoice-generator"] .invoice-items th:first-child,.workspace[data-tool="invoice-generator"] .invoice-items td:first-child{width:29%}
.workspace[data-tool="invoice-generator"] .invoice-items th:nth-child(2),.workspace[data-tool="invoice-generator"] .invoice-items td:nth-child(2){width:9%}
.workspace[data-tool="invoice-generator"] .invoice-items th:nth-child(3),.workspace[data-tool="invoice-generator"] .invoice-items td:nth-child(3){width:9%}
.workspace[data-tool="invoice-generator"] .invoice-items th:nth-child(4){width:12%}
.workspace[data-tool="invoice-generator"] .invoice-items th:nth-child(5){width:15%}
.workspace[data-tool="invoice-generator"] .invoice-items th:nth-child(6){width:8%}
.invoice-items input[type="checkbox"]{width:18px;height:18px;accent-color:var(--ink)}
.invoice-line-amount{overflow-wrap:anywhere;font-size:12px}
.qr-column-help{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.7 ui-monospace,monospace;color:var(--muted)}
.workspace[data-tool="qr-code-generator"] #qr-fields textarea{min-height:120px}
.workspace[data-tool="qr-code-generator"] #qr-bulk{min-height:140px}
.qr-preview details{margin-top:12px;font-size:12px}.qr-preview summary{cursor:pointer;overflow-wrap:anywhere}

.expanded-table-scroll{max-height:460px;overflow:auto}.invoice-items th{position:sticky;top:0;background:#f4f6f0;z-index:1}.invoice-items td>button{font-size:11px}
