.vendor-sync-page{padding:16px;display:grid;gap:14px}.vendor-sync-heading,.vendor-sync-heading header,.vendor-sync-card>header,.vendor-sync-card>footer,.vendor-sync-dialog>header,.vendor-sync-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.vendor-sync-filters{display:grid;grid-template-columns:minmax(220px,320px) minmax(240px,1fr) minmax(180px,240px);gap:10px;align-items:center}.vendor-sync-list{display:grid;gap:12px}.vendor-sync-empty{padding:40px;text-align:center}.vendor-sync-card{border:1px solid var(--border-color);border-radius:12px;background:var(--secondary-background-color);padding:14px;display:grid;gap:14px}.vendor-sync-card h3,.vendor-sync-dialog h2,.vendor-sync-dialog h3{margin:0}.vendor-sync-card header>div:last-child{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.vendor-sync-badge{border-radius:999px;padding:4px 9px;font-size:12px;background:#344052}.vendor-sync-badge.warn{background:#6b4b16;color:#ffd88a}.vendor-sync-badge.good{background:#164f39;color:#8cf0c3}.vendor-sync-badge.error,.vendor-sync-error{background:#5d2528;color:#ffb4b8}.vendor-sync-error{padding:9px;border-radius:7px}.vendor-sync-compare{display:grid;grid-template-columns:1fr 1fr;gap:14px}.vendor-sync-compare section{border:1px solid var(--border-color);border-radius:9px;padding:12px;min-width:0}.vendor-sync-images{display:flex;gap:8px;min-height:92px;padding:10px 0;overflow-x:auto}.vendor-sync-images img{width:88px;height:88px;flex:0 0 auto;border:1px solid var(--border-color);border-radius:9px;object-fit:cover;background:white}.vendor-sync-description{max-height:90px;overflow:auto;white-space:pre-wrap}.vendor-sync-modal{position:fixed;inset:0;z-index:10000;background:#000b;display:grid;place-items:center;padding:18px}.vendor-sync-dialog{width:min(1050px,96vw);max-height:92vh;overflow:auto;border:1px solid var(--border-color);border-radius:13px;background:var(--background-color);padding:18px;display:grid;gap:14px;box-shadow:0 24px 80px #0008}.vendor-sync-dialog textarea{width:100%;box-sizing:border-box;background:var(--secondary-background-color);color:inherit;border:1px solid var(--border-color);border-radius:8px;padding:10px}.vendor-sync-check{display:flex;gap:8px;align-items:center;font-weight:700}.vendor-sync-variants{display:grid;gap:8px}.vendor-sync-variant{display:grid;grid-template-columns:minmax(220px,1fr) 90px minmax(140px,220px) 120px;gap:9px;align-items:center;border:1px solid var(--border-color);border-radius:8px;padding:9px}.vendor-sync-variant small{display:block;color:var(--muted-color);margin-top:3px}.vendor-sync-variant input[type=text],.vendor-sync-variant input[type=number],.vendor-sync-variant input:not([type]){min-width:0;background:var(--secondary-background-color);color:inherit;border:1px solid var(--border-color);border-radius:6px;padding:8px}@media(max-width:800px){.vendor-sync-filters,.vendor-sync-compare{grid-template-columns:1fr}.vendor-sync-card>header,.vendor-sync-card>footer{align-items:flex-start;flex-direction:column}.vendor-sync-variant{grid-template-columns:1fr 80px}.vendor-sync-variant input{grid-column:span 1}}
#vendor-product-sync-section.document-section.active { overflow: hidden; min-height: 0; }
#vendor-product-sync-section .vendor-sync-page { width: 100%; height: 100%; min-height: 0; box-sizing: border-box; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
#vendor-product-sync-section .vendor-sync-list { min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; overscroll-behavior: contain; scrollbar-gutter: stable; }

.vendor-sync-description-html { max-height: 220px; white-space: normal; line-height: 1.5; }
.vendor-sync-description-html :is(p,ul,ol,blockquote,h1,h2,h3,h4,h5,h6) { margin: .45em 0; }
.vendor-sync-description-html :is(ul,ol) { padding-left: 22px; }
.vendor-sync-description-html img { max-width: 100%; height: auto; border-radius: 6px; }
.vendor-sync-description-html a { color: var(--accent-color); text-decoration: underline; }

.vendor-sync-modal { background: rgba(0,0,0,.82); backdrop-filter: blur(4px); }
.vendor-sync-dialog { background: #0c121a; color: var(--main-text-color,#f4f7fb); opacity: 1; isolation: isolate; }
body.light-mode .vendor-sync-dialog { background: #fff; color: #172033; }
.vendor-sync-review-section { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border-color); border-radius: 10px; background: #101923; }
body.light-mode .vendor-sync-review-section { background: #f7f9fc; }
.vendor-sync-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vendor-sync-editor-tabs { display: flex; gap: 4px; }
.vendor-sync-editor-tabs .btn { padding: 6px 11px; }
.vendor-sync-editor-tabs .btn.active { border-color: #2f75e8; background: #205fc5; color: #fff; }
.vendor-sync-rich-editor,.vendor-sync-html-editor { width: 100%; min-height: 220px; max-height: 42vh; overflow: auto; box-sizing: border-box; padding: 14px; border: 1px solid var(--border-color); border-radius: 8px; background: #080d13; color: #f4f7fb; line-height: 1.5; }
body.light-mode :is(.vendor-sync-rich-editor,.vendor-sync-html-editor) { background: #fff; color: #172033; }
.vendor-sync-rich-editor:focus,.vendor-sync-html-editor:focus { outline: 2px solid #2f75e8; outline-offset: -1px; }
.vendor-sync-rich-editor :is(p,ul,ol,blockquote,h1,h2,h3,h4) { margin: .55em 0; }
.vendor-sync-rich-editor :is(ul,ol) { padding-left: 24px; }
.vendor-sync-html-editor { resize: vertical; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; white-space: pre-wrap; }
.vendor-sync-rich-editor[hidden],.vendor-sync-html-editor[hidden] { display: none !important; }
.vendor-sync-variant { grid-template-columns: minmax(220px,1fr) minmax(230px,.7fr) minmax(200px,.55fr); gap: 12px; background: #0b121a; }
body.light-mode .vendor-sync-variant { background: #fff; }
.vendor-sync-field-choice { display: grid; grid-template-columns: auto auto minmax(100px,1fr); align-items: center; gap: 7px; }
.vendor-sync-field-choice>span { font-size: 12px; font-weight: 700; }
.vendor-sync-field-choice input:not([type=checkbox]) { width: 100%; box-sizing: border-box; }
@media(max-width:800px){.vendor-sync-review-heading{align-items:flex-start;flex-direction:column}.vendor-sync-variant{grid-template-columns:1fr}.vendor-sync-field-choice{grid-template-columns:auto 55px 1fr}}
.vendor-sync-format-toolbar { display: flex; gap: 5px; flex-wrap: wrap; padding: 7px; margin-bottom: -11px; border: 1px solid var(--border-color); border-bottom: 0; border-radius: 8px 8px 0 0; background: #151f2b; }
.vendor-sync-format-toolbar[hidden] { display: none !important; }
.vendor-sync-format-toolbar button { min-width: 34px; padding: 5px 8px; border: 1px solid var(--border-color); border-radius: 5px; background: #202c3a; color: inherit; cursor: pointer; }
.vendor-sync-format-toolbar + .vendor-sync-rich-editor { border-radius: 0 0 8px 8px; }

.po-line-vendor-links { margin-top: 6px; }
.po-vendor-link-button { min-width: 30px; height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 1px solid var(--border-color); border-radius: 7px; color: inherit; cursor: pointer; }
.po-vendor-link-button.has-links { border-color: #288a68; background: #143e32; color: #8cf0c3; }
.po-vendor-link-button.add-links { border-style: dashed; background: var(--secondary-background-color); color: var(--muted-color); }
.po-vendor-link-button:disabled { opacity: .45; cursor: not-allowed; }
.po-vendor-link-plus { font-weight: 800; }
.po-vendor-links-dialog { width: min(760px,96vw); background: #0c121a; }
.po-vendor-links-dialog code { color: #8fc4ff; }
#po-vendor-links-editor-list { display: grid; gap: 9px; }
.po-vendor-link-editor-row { display: grid; grid-template-columns: minmax(0,1fr) 38px 38px; gap: 8px; align-items: center; }
.po-vendor-link-editor-row input { width: 100%; box-sizing: border-box; }
.po-vendor-open-link { height: 36px; display: grid; place-items: center; box-sizing: border-box; }
.po-vendor-add-link { justify-self: start; }
@media(max-width:600px){.po-vendor-link-editor-row{grid-template-columns:minmax(0,1fr) 36px 36px}}
.po-vendor-links-modal { z-index: 1000010 !important; isolation: isolate; }
.po-vendor-links-modal .po-vendor-links-dialog { position: relative; z-index: 1; }

.po-vendor-link-button.drag-target { transform: scale(1.12); border-style: solid; border-color: #58d6a8; background: #1b6650; color: #fff; box-shadow: 0 0 0 4px rgba(88,214,168,.22); }
.po-identity-syncing { opacity: .65; cursor: progress; }
.po-identity-sync-success { border-color: #36b985 !important; box-shadow: 0 0 0 2px rgba(54,185,133,.18); }
.po-identity-sync-error { border-color: #ef5350 !important; box-shadow: 0 0 0 2px rgba(239,83,80,.18); }

.po-receive-action-cell { min-width: 155px; }
.po-receive-action-cell .po-receive-disposition { width: 100%; margin-bottom: 6px; font-size: 12px; }
.po-receive-action-cell .receive-qty { width: 100%; box-sizing: border-box; }

.po-receipt-disposition { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: #184c38; color: #a4f4cf; white-space: nowrap; }
.po-receipt-disposition--lost_in_transit { background: #5a4218; color: #ffd68a; }
.po-receipt-disposition--damaged_in_transit { background: #5a2529; color: #ffb3b8; }

.po-receive-mode-wrapper { min-width: 190px; }
#po-receive-disposition { font-weight: 700; }
