/* Purchase views: quiet surfaces, clear hierarchy, and roomy controls. */
.purchase-toolbar,
.purchase-filter { display:flex;align-items:center;flex-wrap:wrap;gap:16px;min-width:0; }
.purchase-toolbar { justify-content:space-between;margin:0 0 28px;gap:20px; }
.purchase-toolbar .view-tabs { display:flex;flex-wrap:wrap;gap:4px;padding:5px;border:0;border-radius:999px;background:#eaeaee;min-width:0; }
.purchase-toolbar .view-tab { flex:0 1 auto;min-height:40px;padding:9px 16px;border:0;border-radius:999px;background:transparent;color:#6e6e73;font-size:13px;font-weight:500;line-height:1.5;white-space:nowrap;box-shadow:none; }
.purchase-toolbar .view-tab::after { display:none; }
.purchase-toolbar .view-tab:hover { color:#1d1d1f;background:#ffffff80; }
.purchase-toolbar .view-tab.active { background:#fff;color:#1d1d1f;box-shadow:0 2px 6px #0000000a; }
.purchase-filter label { margin:0;font-size:12px;color:#6e6e73;white-space:nowrap; }
.purchase-filter input { width:155px;min-width:0;min-height:42px;margin:0;padding:9px 12px;background:#fff;border:1px solid #d2d2d7;border-radius:12px;font-size:14px; }
.purchase-filter .is-disabled { opacity:.45;pointer-events:none; }
.purchase-owner-filter { display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 24px;min-width:0; }
.purchase-owner-filter label { margin:0;font-size:13px;font-weight:500;color:#1d1d1f;white-space:nowrap; }
.purchase-owner-filter select { width:200px;max-width:100%;min-width:0;min-height:42px;margin:0;padding:9px 34px 9px 12px;border:1px solid #d2d2d7;border-radius:12px;background-color:#fff;color:#1d1d1f;font:inherit;font-size:14px; }
.purchase-owner-filter select:focus-visible { outline:3px solid #0071e350;outline-offset:2px; }
.purchase-owner-filter select:disabled { opacity:.55; }
.purchase-filter-count { color:#6e6e73;font-size:12px;white-space:nowrap; }
.purchase-scope-note { max-width:100%;margin:0 0 28px;font-size:12px;line-height:1.8;color:#6e6e73;overflow-wrap:anywhere; }
.purchase-month-reminders { display:grid;gap:7px;padding:20px 24px;margin:0 0 24px;background:#fff;border:1px solid #e5e5ea;border-radius:20px; }
.purchase-month-reminders p { margin:0;font-size:14px;line-height:1.7;color:#6e6e73; }
.purchase-month-reminders strong { padding:0 2px;font-size:17px;font-weight:600;color:#1d1d1f;font-variant-numeric:tabular-nums; }

/* Summary cards. */
.purchase-record-list { display:grid;gap:24px; }
.purchase-record { min-width:0;background:#fff;border:1px solid #e5e5ea;border-radius:24px;overflow:hidden;box-shadow:0 3px 16px #00000003; }
.purchase-record-owner { display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:22px 26px;border-bottom:1px solid #ededf0; }
.purchase-owner-avatar { display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;background:#f0f0f3;border-radius:50%;font-size:18px;font-weight:600;color:#55555b; }
.purchase-record-owner>div { min-width:0; }
.purchase-record-owner>div>span,
.purchase-detail-owner>div>span { display:block;margin-bottom:4px;font-size:12px;color:#6e6e73; }
.purchase-record-owner>div>strong { font-size:17px;line-height:1.4;font-weight:600;color:#1d1d1f;overflow-wrap:anywhere; }
.purchase-record-state { display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-left:auto; }
.purchase-record-owner>.purchase-record-state>span { display:inline-flex;margin:0; }
.purchase-record-body { display:flex;align-items:center;justify-content:space-between;gap:32px;padding:26px; }
.purchase-record-info { min-width:0; }
.purchase-open { max-width:100%;padding:0;border:0;background:none;color:#1d1d1f;font:inherit;font-size:18px;font-weight:600;line-height:1.55;text-align:left;cursor:pointer;overflow-wrap:anywhere; }
.purchase-open:hover { color:#0071e3; }
.purchase-record-info p { margin:10px 0 0;font-size:12px;line-height:1.8;color:#6e6e73;overflow-wrap:anywhere; }
.purchase-record-photos { flex-shrink:0;width:250px;max-width:100%;padding:0;border:0;background:none;color:#6e6e73;text-align:left;font:inherit;cursor:pointer; }
.purchase-record-thumbnails { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
.purchase-record-thumbnails img { display:block;width:100%;height:82px;object-fit:cover;background:#f5f5f7;border:1px solid #e5e5ea;border-radius:12px; }
.purchase-record-photos>span:last-child { display:block;margin-top:10px;font-size:12px;line-height:1.6; }
.purchase-record-photos:hover>span:last-child { color:#0071e3; }
.purchase-record-photos.is-empty { display:flex;align-items:center;gap:12px;min-height:92px;padding:18px;border:1px dashed #d2d2d7;border-radius:16px;background:#fafafa; }
.purchase-record-photos.is-empty>span:last-child { margin:0; }
.purchase-empty-photo-icon { display:grid;place-items:center;color:#86868b; }
.purchase-empty-photo-icon svg { width:28px;height:28px; }
.purchase-record-footer { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:17px 26px;border-top:1px solid #ededf0;font-size:12px;line-height:1.7;color:#6e6e73; }
.purchase-record-footer .text-button { flex-shrink:0;font-size:13px; }
.purchase-status,
.purchase-evidence { display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:#f0f0f3;color:#6e6e73;font-size:12px;line-height:1.5;white-space:nowrap; }
.purchase-status.pending,
.purchase-evidence.missing { background:#fff4e5;color:#a46010; }
.purchase-status.ordered { background:#eaf3ff;color:#0066cc; }
.purchase-status.received,
.purchase-evidence.complete { background:#edf7ef;color:#287b40; }
.purchase-status.cancelled,
.purchase-status.deleted { background:#f1eff0;color:#776b70; }
.purchase-order-action { display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding:18px 20px;margin:0 0 22px;background:#f5f9ff;border:1px solid #deebfa;border-radius:18px; }
.purchase-order-action>.button { flex-shrink:0;font-size:13px; }
.purchase-order-action>.button:disabled { opacity:.5;cursor:not-allowed; }
.purchase-order-action p { margin:0;font-size:12px;line-height:1.7;color:#6e6e73; }
.purchase-order-action .purchase-order-blocked { margin-top:3px;color:#a46010; }
.purchase-record>.purchase-order-action { padding:17px 26px;margin:0;border-right:0;border-left:0;border-radius:0;background:#f8fbff; }
.purchase-order-error { margin:0 0 18px; }

/* Edit and detail dialogs. */
.purchase-edit-modal,
.purchase-detail-modal { width:min(1040px,calc(100vw - 48px));max-width:1040px; }
.purchase-edit-modal .modal-footer,
.purchase-detail-modal .modal-heading { gap:16px; }
.purchase-edit-modal .modal-heading>.icon-button,
.purchase-detail-modal .modal-heading>.icon-button { width:44px;height:44px;flex-shrink:0; }
.purchase-edit-modal { scroll-padding-block:90px 130px; }
.purchase-edit-modal .modal-footer { position:sticky;bottom:0;z-index:3;padding:18px 0 calc(18px + env(safe-area-inset-bottom));margin-top:28px;border-top:1px solid #e5e5ea;background:#ffffffef;backdrop-filter:blur(20px);box-shadow:0 -10px 20px #ffffffd9; }
.purchase-edit-modal .field-hint,
.purchase-detail-modal .field-hint { font-size:12px;line-height:1.8; }
.purchase-edit-modal h2,
.purchase-detail-modal h2 { overflow-wrap:anywhere; }
.purchase-form-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px; }
.purchase-form-grid>div { min-width:0; }
.purchase-form-grid .full-select,
.purchase-form-grid input { width:100%;min-width:0; }
.purchase-items-heading { gap:12px;margin:32px 0 14px;flex-wrap:wrap; }
.purchase-items-heading h3 { margin:0;font-size:19px;font-weight:600;color:#1d1d1f; }
.purchase-item-row { position:relative;margin:16px 0;padding:24px;border:1px solid #e5e5ea;border-radius:20px;background:#fafafa; }
.purchase-item-number { padding-right:28px;margin-bottom:14px;color:#6e6e73;font-size:12px;font-weight:500; }
.purchase-item-row>.icon-button { position:absolute;right:8px;top:8px;width:44px;height:44px; }
.purchase-item-row>.icon-button:disabled { opacity:.3;cursor:not-allowed; }
.purchase-item-fields { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 14px;align-items:start; }
.purchase-item-fields label { min-width:0;margin:0!important;color:#6e6e73;font-size:14px;line-height:1.5; }
.purchase-item-fields label:first-child,
.purchase-item-fields label:nth-child(2) { grid-column:span 2; }
.purchase-item-fields input { width:100%;min-width:0;min-height:46px;margin:8px 0 0;padding:11px 12px;border:1px solid #d2d2d7;border-radius:12px;background:#fff;color:#1d1d1f;font-size:16px;scroll-margin-block:90px 150px; }
.purchase-item-fields input:disabled { background:#f0f0f3;color:#86868b; }
.purchase-row-total { grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:16px 0 0;border-top:1px solid #e5e5ea; }
.purchase-row-total>span { display:block;color:#6e6e73;font-size:12px;line-height:1.5; }
.purchase-row-total output { display:block;font-size:17px;line-height:1.5;font-weight:600;color:#1d1d1f;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;text-align:right; }
.purchase-item-preserved,
.purchase-item-delete-note { margin:14px 0 0;color:#6e6e73;font-size:12px;line-height:1.8; }
.purchase-legacy-price { margin:14px 0 0;font-size:12px;line-height:1.8;color:#a46010; }
.purchase-price-summary { margin:22px 0 28px;padding:20px 22px;border-radius:18px;background:#f5f5f7;color:#1d1d1f;font-size:18px;font-weight:600;line-height:1.7;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums; }
.purchase-current-status { padding:12px 16px;margin:10px 0 14px;border:1px solid #e5e5ea;border-radius:12px;background:#f5f5f7;color:#6e6e73;font-size:12px;line-height:1.8; }
.purchase-detail-owner { display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding:24px;margin:8px 0 24px;border:1px solid #e5e5ea;border-radius:22px;background:#f5f5f7; }
.purchase-detail-owner .purchase-owner-avatar { width:52px;height:52px;background:#fff;font-size:23px; }
.purchase-detail-owner>div { min-width:0; }
.purchase-detail-owner>div>strong { display:block;color:#1d1d1f;font-size:26px;line-height:1.3;font-weight:600;overflow-wrap:anywhere; }
.purchase-detail-owner>p { margin:0 0 0 auto;font-size:12px;line-height:1.7;color:#6e6e73; }
.purchase-detail-top { display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 24px; }
.purchase-detail-top>.button { margin-left:auto; }
.purchase-detail-top>[data-purchase-detail-action="delete"] { margin-left:0; }
.purchase-metadata { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;padding:24px 0;margin:0 0 28px;border-top:1px solid #e5e5ea;border-bottom:1px solid #e5e5ea; }
.purchase-metadata dt { margin-bottom:8px;font-size:12px;color:#6e6e73; }
.purchase-metadata dd { margin:0;font-size:14px;line-height:1.6;color:#1d1d1f;overflow-wrap:anywhere; }
.purchase-detail-modal h3 { margin:28px 0 16px;color:#1d1d1f;font-size:20px;font-weight:600; }
.purchase-share { margin-top:28px; }
.purchase-share-text { max-height:220px;padding:18px;margin:12px 0;border-radius:16px;background:#f5f5f7;color:#6e6e73;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow:auto;overflow-wrap:anywhere; }
.purchase-link-actions { display:flex;flex-wrap:wrap;gap:10px; }

/* Arrival evidence and item actions. */
.purchase-photo-section { margin-top:30px;padding-top:12px;border-top:1px solid #e5e5ea; }
.purchase-photo-section .section-heading { gap:14px;flex-wrap:wrap;margin:0; }
.purchase-photo-section .section-heading h3 { margin:0; }
.purchase-product-evidence { padding:24px;margin:20px 0;border:1px solid #e5e5ea;border-radius:22px;background:#fff; }
.purchase-product-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:16px; }
.purchase-product-heading>div { min-width:0; }
.purchase-product-heading h4 { margin:6px 0 14px;color:#1d1d1f;font-size:19px;line-height:1.5;font-weight:600;overflow-wrap:anywhere; }
.purchase-product-heading .purchase-item-number { display:block;padding:0;margin:0; }
.purchase-product-photo-actions { display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px; }
.purchase-product-photo-actions .button { white-space:nowrap; }
.purchase-product-meta { display:flex;flex-wrap:wrap;gap:8px 24px;font-size:12px;line-height:1.8;color:#6e6e73; }
.purchase-product-meta span { overflow-wrap:anywhere; }
.purchase-gallery,
.purchase-queue-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:22px 0; }
.purchase-photo,
.purchase-queued-photo { min-width:0;border:1px solid #e5e5ea;border-radius:16px;background:#fafafa;overflow:hidden;text-decoration:none; }
.purchase-photo img,
.purchase-queued-photo img { display:block;width:100%;height:170px;object-fit:cover;background:#f5f5f7; }
.purchase-photo span,
.purchase-queued-photo>span { display:block;padding:11px 12px 8px;color:#6e6e73;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.purchase-photo:hover { border-color:#93bce8; }
.purchase-queued-photo small { display:block;padding:0 12px 10px;font-size:12px;line-height:1.6;color:#6e6e73;overflow-wrap:anywhere; }
.purchase-queued-photo .text-button { padding:4px 12px 12px;font-size:12px; }
.purchase-no-photos { margin:14px 0;padding:6px 0;color:#86868b;font-size:12px;line-height:1.8; }
.purchase-photo-placeholder { display:grid;place-items:center;height:170px;padding:14px;color:#86868b;font-size:12px; }
.purchase-product-evidence .purchase-gallery:empty,
.purchase-item-upload:empty,
.purchase-photo-progress:empty { display:none; }
.purchase-item-photo-controls { display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:20px 0 4px; }
.purchase-item-photo-controls small { color:#86868b;font-size:12px; }
.purchase-photo-dropzone { padding:22px;border:1px dashed #b7b7bd;border-radius:16px;background:#fafafa;transition:background .15s,border-color .15s; }
.purchase-photo-requirement { margin:12px 0;padding:12px 16px;border:1px solid #e8bf72;border-left:4px solid #c88a19;border-radius:10px;background:#fff4d6;color:#7a4100;font-size:15px;font-weight:600;line-height:1.6; }
.purchase-photo-dropzone>strong { flex-basis:100%;color:#1d1d1f;font-size:14px;font-weight:500; }
.purchase-photo-dropzone.is-dragover { border-color:#0071e3;border-style:solid;background:#eaf3ff;box-shadow:0 0 0 3px #0071e314; }
.purchase-photo-dropzone.is-busy { opacity:.55; }
.purchase-cart-section.is-locked>.field-hint { display:none; }
.purchase-item-upload { display:flex;justify-content:flex-end; }
.purchase-photo-progress { color:#287b40;font-size:12px;line-height:1.8; }
.purchase-unassigned { padding:0 24px 16px;margin-top:28px;border:1px solid #f0dfc4;border-radius:20px;background:#fffcf7; }
.purchase-unassigned-photo { min-width:0;border:1px solid #e5e5ea;border-radius:16px;background:#fff;overflow:hidden; }
.purchase-unassigned-photo .purchase-photo { display:block;border:0;border-radius:0; }
.purchase-assign-label { margin:10px 12px 5px!important;font-size:12px!important;color:#6e6e73!important; }
.purchase-assign-label select { display:block;width:100%;max-width:100%;min-height:42px;margin:8px 0 0;padding:8px 10px;font-size:12px; }
.purchase-unassigned-photo>.text-button { margin:3px 12px 14px;font-size:12px; }
.purchase-legacy-warning { padding:16px 18px;border-radius:14px;background:#fff4e5;color:#a46010;font-size:12px;line-height:1.8; }
.purchase-receive-action { margin-top:28px; }
.purchase-item-delete-action { display:flex;justify-content:flex-end;padding-top:16px;margin-top:18px;border-top:1px solid #ededf0; }
.purchase-item-delete-action .text-button { min-height:44px;font-size:12px; }
.purchase-item-delete-summary { padding:20px;margin:18px 0 24px;border:1px solid #e5e5ea;border-radius:18px;background:#f5f5f7;overflow-wrap:anywhere; }
.purchase-item-delete-summary strong { display:block;font-size:17px;line-height:1.7;color:#1d1d1f; }
.purchase-item-delete-summary p { margin:8px 0 0;font-size:14px;line-height:1.7;color:#6e6e73; }
.purchase-confirm-modal { width:min(500px,calc(100vw - 32px));max-width:500px; }
.purchase-confirm-modal .modal-heading h2 { font-size:24px; }
.purchase-delete-name { margin:12px 0;font-size:17px;font-weight:600;line-height:1.7;color:#1d1d1f;overflow-wrap:anywhere; }
.purchase-delete-confirm { background:#d6362d;border-color:#d6362d;color:#fff; }
.purchase-delete-confirm:hover { background:#bd2d25;border-color:#bd2d25; }
.purchase-delete-confirm:disabled { opacity:.55;cursor:wait; }
.purchase-deleted-note { margin:0 0 22px;padding:16px 18px;border-radius:14px;background:#f5f5f7;color:#6e6e73;font-size:12px;line-height:1.8; }

/* Source images and OCR review. */
.purchase-cart-section { padding:24px;margin:12px 0 30px;border:1px solid #e5e5ea;border-radius:22px;background:#fafafa; }
.purchase-cart-section .section-heading { gap:14px;flex-wrap:wrap;margin:0; }
.purchase-cart-section h3 { margin:0;color:#1d1d1f;font-size:19px;font-weight:600; }
.purchase-cart-images { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:20px; }
.purchase-cart-image { min-width:0;border:1px solid #e5e5ea;border-radius:16px;background:#fff;overflow:hidden; }
.purchase-cart-image>a { display:block; }
.purchase-cart-image img { display:block;width:100%;height:200px;object-fit:contain;background:#f5f5f7; }
.purchase-cart-image>strong { display:block;padding:13px 14px 6px;color:#1d1d1f;font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.purchase-cart-image>small { display:block;padding:0 14px;font-size:12px;line-height:1.7;color:#6e6e73;overflow-wrap:anywhere; }
.purchase-cart-image>div:last-child { display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:12px 14px 14px; }
.purchase-cart-image .text-button { font-size:12px; }
.purchase-cart-actions { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;margin-top:20px; }
.purchase-cart-actions .field-hint { margin:0;font-size:12px; }
.purchase-cart-drop-target { display:grid;gap:7px;padding:30px 20px;margin:20px 0;border:1px dashed #b7b7bd;border-radius:18px;background:#fff;text-align:center;outline:none; }
.purchase-cart-drop-target strong { color:#1d1d1f;font-size:16px;font-weight:500; }
.purchase-cart-drop-target span,
.purchase-cart-drop-target small { color:#6e6e73;font-size:12px;line-height:1.8; }
.purchase-cart-drop-target:focus-visible { outline:3px solid #0071e34d;outline-offset:3px; }
.purchase-cart-section.is-dragover { border-color:#0071e3;background:#f1f7ff; }
.purchase-cart-section.is-dragover .purchase-cart-drop-target { border-style:solid;border-color:#0071e3;background:#eaf3ff;box-shadow:0 0 0 3px #0071e314; }
.purchase-cart-section.is-busy .purchase-cart-drop-target { opacity:.55; }
.purchase-cart-preview { padding:20px;margin:20px 0 24px;border:1px solid #e5e5ea;border-radius:18px;background:#fff;color:#6e6e73;font-size:14px;line-height:1.8; }
.purchase-cart-preview h4 { margin:0 0 12px;font-size:17px;color:#1d1d1f; }
.purchase-preview-warning { margin:4px 0 12px;color:#a46010;font-size:12px;line-height:1.8;overflow-wrap:anywhere; }
.purchase-ocr-result { padding:14px 0;border-bottom:1px solid #e5e5ea; }
.purchase-ocr-result>strong { font-size:12px;overflow-wrap:anywhere; }
.purchase-ocr-result summary,
.purchase-ocr-source summary { padding:7px 0;color:#6e6e73;font-size:12px;cursor:pointer; }
.purchase-ocr-text { max-height:240px;padding:14px;border:1px solid #e5e5ea;border-radius:12px;background:#f5f5f7;color:#6e6e73;font-family:inherit;font-size:12px;line-height:1.8;white-space:pre-wrap;overflow:auto;overflow-wrap:anywhere; }
.purchase-ocr-review { display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.3fr);gap:24px;padding:24px 0;border-top:1px solid #e5e5ea; }
.purchase-ocr-source { min-width:0; }
.purchase-ocr-source>strong { display:block;margin-bottom:12px;color:#6e6e73;font-size:12px;overflow-wrap:anywhere; }
.purchase-ocr-source>a { display:block;border:1px solid #e5e5ea;border-radius:16px;background:#fff;color:#0071e3;overflow:hidden;text-decoration:none; }
.purchase-ocr-source img { display:block;width:100%;max-height:600px;object-fit:contain;background:#f5f5f7; }
.purchase-ocr-source>a>span { display:block;padding:12px 14px;border-top:1px solid #e5e5ea;font-size:12px; }
.purchase-ocr-source summary { margin-top:12px; }
.purchase-ocr-items { display:grid;align-content:start;gap:18px;min-width:0; }
.purchase-ocr-items>.purchase-preview-warning { margin:0; }
.purchase-candidate-edit { min-width:0;padding:20px;border:1px solid #e5e5ea;border-radius:18px;background:#fafafa; }
.purchase-candidate-heading { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:18px; }
.purchase-candidate-heading strong { font-size:14px;font-weight:600;color:#1d1d1f; }
.purchase-candidate-heading span { font-size:12px;color:#6e6e73; }
.purchase-candidate-fields { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px; }
.purchase-candidate-fields label { min-width:0;margin:0!important;color:#6e6e73;font-size:14px; }
.purchase-candidate-fields label:nth-child(1),
.purchase-candidate-fields label:nth-child(2) { grid-column:1 / -1; }
.purchase-candidate-fields input { display:block;width:100%;min-width:0;min-height:44px;padding:10px 11px;margin:7px 0 0;border:1px solid #d2d2d7;border-radius:11px;background:#fff;color:#1d1d1f;font-size:16px;scroll-margin-block:90px 150px; }
.purchase-item-fields input:focus,
.purchase-candidate-fields input:focus,
.purchase-filter input:focus { border-color:#0071e3;outline:none;box-shadow:0 0 0 3px #0071e326; }
.purchase-candidate-fields input:disabled { background:#f0f0f3;color:#86868b; }
.purchase-candidate-check,
.purchase-import-check { display:flex!important;align-items:flex-start;gap:9px;margin:18px 0!important;color:#6e6e73!important;font-size:12px!important;line-height:1.8; }
.purchase-candidate-check input,
.purchase-import-check input { width:18px!important;height:18px!important;min-height:18px!important;flex-shrink:0;padding:0;margin:3px 0 0!important;accent-color:#0071e3; }
.purchase-candidate-edit>.field-hint { margin:14px 0;font-size:12px;line-height:1.8; }
.purchase-candidate-edit>.button { font-size:13px; }
.purchase-candidate-edit>.button:disabled { opacity:.5; }
.purchase-candidate-edit>.form-error,
.purchase-candidate-edit>.purchase-preview-warning { font-size:12px; }
.purchase-candidates { display:grid;gap:14px;margin:18px 0; }
.purchase-candidate { display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px;border:1px solid #e5e5ea;border-radius:16px;background:#fff; }
.purchase-candidate>div { min-width:0; }
.purchase-candidate strong { color:#1d1d1f;font-size:14px;font-weight:600;overflow-wrap:anywhere; }
.purchase-candidate p { margin:6px 0;color:#6e6e73;font-size:12px;line-height:1.7;overflow-wrap:anywhere; }
.purchase-candidate small { display:block;margin-top:7px;color:#86868b;font-size:12px;overflow-wrap:anywhere; }
.purchase-candidate>.button { flex-shrink:0; }
.purchase-cart-history { margin:26px 0 32px; }
.purchase-cart-history .purchase-photo img { height:190px;object-fit:contain;background:#f5f5f7; }
.purchase-cart-history .field-hint { font-size:12px; }
.numeric-input-error { display:block;margin:7px 0 0;color:#b2362e;font-size:12px;font-weight:400;line-height:1.7;overflow-wrap:anywhere; }
.numeric-input-error[hidden] { display:none; }

@media (max-width:1050px) {
  .purchase-record-photos { width:220px; }
  .purchase-record-body { gap:24px; }
  .purchase-gallery,
  .purchase-queue-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width:720px) {
  .purchase-toolbar { gap:16px;margin-bottom:24px; }
  .purchase-toolbar .view-tabs { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;border-radius:18px; }
  .purchase-toolbar .view-tab { min-width:0;min-height:42px;padding:10px 8px;font-size:12px;border-radius:13px;white-space:normal; }
  .purchase-filter { width:100%;gap:12px;justify-content:space-between; }
  .purchase-filter label { display:none; }
  .purchase-filter input { width:145px;max-width:100%; }
  .purchase-filter .button { padding:10px 12px;font-size:12px;white-space:normal; }
  .purchase-month-reminders { padding:18px 20px;border-radius:18px; }
  .purchase-record-list { gap:18px; }
  .purchase-record { border-radius:22px; }
  .purchase-record-owner { padding:20px;gap:10px; }
  .purchase-owner-avatar { width:40px;height:40px;font-size:17px; }
  .purchase-record-owner>div>strong { font-size:16px; }
  .purchase-record-state { flex-basis:100%;justify-content:flex-start;margin-left:50px; }
  .purchase-record-body { display:block;padding:20px; }
  .purchase-open { font-size:17px; }
  .purchase-record-photos { width:100%;margin-top:22px; }
  .purchase-record-thumbnails img { height:100px; }
  .purchase-record-photos.is-empty { min-height:80px;padding:16px; }
  .purchase-record-footer { padding:16px 20px;align-items:flex-start; }
  .purchase-order-action,
  .purchase-record>.purchase-order-action { padding:18px 20px;gap:12px; }
  .purchase-order-action>div { flex-basis:100%; }
  .purchase-edit-modal,
  .purchase-detail-modal { width:calc(100vw - 24px);max-width:none;padding:24px 18px; }
  .purchase-edit-modal h2,
  .purchase-detail-modal h2 { font-size:24px; }
  .purchase-edit-modal .modal-footer { gap:12px;flex-wrap:wrap;padding-top:16px; }
  .purchase-form-grid { grid-template-columns:1fr;gap:0; }
  .purchase-item-row { padding:18px 16px;border-radius:18px; }
  .purchase-item-fields { grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px; }
  .purchase-item-fields label:first-child,
  .purchase-item-fields label:nth-child(2) { grid-column:1 / -1; }
  .purchase-item-fields input { font-size:16px;padding:10px; }
  .purchase-row-total { align-items:flex-start; }
  .purchase-row-total output { font-size:16px; }
  .purchase-price-summary { padding:18px;font-size:16px;text-align:left; }
  .purchase-detail-owner { padding:20px;gap:12px;border-radius:18px; }
  .purchase-detail-owner>div>strong { font-size:23px; }
  .purchase-detail-owner>p { flex-basis:100%;margin:0; }
  .purchase-detail-top>.button { margin-left:0; }
  .purchase-metadata { grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 16px; }
  .purchase-detail-modal h3 { font-size:19px; }
  .purchase-product-evidence { padding:18px 16px;border-radius:18px; }
  .purchase-product-heading { flex-wrap:wrap;gap:8px; }
  .purchase-product-heading h4 { font-size:17px; }
  .purchase-product-meta { gap:7px 16px;margin-top:10px; }
  .purchase-product-meta span:first-child { width:100%; }
  .purchase-gallery,
  .purchase-queue-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
  .purchase-photo img,
  .purchase-queued-photo img,
  .purchase-photo-placeholder { height:140px; }
  .purchase-unassigned { padding:0 16px 14px; }
  .purchase-receive-action .button { width:100%; }
  .purchase-cart-section { padding:18px 14px;border-radius:18px; }
  .purchase-cart-images { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
  .purchase-cart-image img { height:170px; }
  .purchase-cart-image>strong,
  .purchase-cart-image>small { padding-left:10px;padding-right:10px; }
  .purchase-cart-image>div:last-child { padding-left:10px;padding-right:10px; }
  .purchase-cart-drop-target { padding:24px 14px; }
  .purchase-cart-drop-target strong { font-size:15px; }
  .purchase-cart-preview { padding:16px 0;border:0;border-radius:0;background:transparent; }
  .purchase-ocr-review { grid-template-columns:1fr;gap:20px;padding:22px 0; }
  .purchase-ocr-source img { max-height:420px; }
  .purchase-candidate-edit { padding:16px 12px;border-radius:16px; }
  .purchase-candidate-fields { gap:12px 8px; }
  .purchase-candidate-fields input { font-size:16px;padding:9px 8px; }
  .purchase-candidate { align-items:flex-start;flex-direction:column;gap:14px;padding:16px; }
  .purchase-cart-history .purchase-photo img { height:160px; }
  .purchase-confirm-modal .modal-footer { flex-wrap:wrap;gap:12px; }
  .purchase-item-delete-summary { padding:18px; }
}

@media (max-width:400px) {
  .purchase-filter { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px; }
  .purchase-filter input { width:100%; }
  .purchase-filter .button { justify-content:center; }
  .purchase-record-owner,
  .purchase-record-body { padding:18px; }
  .purchase-record-footer,
  .purchase-record>.purchase-order-action { padding:16px 18px; }
  .purchase-record-state { margin-left:0; }
  .purchase-record-thumbnails img { height:88px; }
  .purchase-row-total { display:block; }
  .purchase-row-total output { padding-top:8px;text-align:left; }
  .purchase-cart-actions>.button { width:100%;white-space:normal; }
  .purchase-candidate-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .purchase-candidate-fields label:last-child { grid-column:1 / -1; }
}

.purchase-price-fill { display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:16px 0 24px;padding:16px;background:var(--bg,#f5f5f7);border-radius:12px; }
.purchase-price-fill label { display:grid;gap:8px;font-size:14px; }
.purchase-price-fill input { width:180px;max-width:100%; }
.purchase-price-fill small { flex-basis:100%;color:var(--muted,#6e6e73); }
