#purchases-page {display:grid;gap:18px;max-width:1220px;margin:0 auto}
.purchase-preview-banner {position:fixed;z-index:100;top:8px;right:12px;padding:7px 11px;border-radius:99px;background:#79572c;color:#fff;font-weight:700;font-size:12px;box-shadow:0 2px 8px #0003}
.purchase-intro {display:flex;justify-content:space-between;align-items:center;gap:18px}
.purchase-intro-actions {display:inline-flex;align-items:center;gap:3px;flex:none;padding:4px;border:1px solid rgba(255,255,255,.8);border-radius:16px;background:rgba(255,255,255,.28);box-shadow:0 5px 18px rgba(67,49,38,.08),inset 0 1px rgba(255,255,255,.6);backdrop-filter:blur(18px) saturate(145%);-webkit-backdrop-filter:blur(18px) saturate(145%)}
.purchase-intro-actions button {min-height:36px;min-width:62px;padding:7px 15px;border:0;border-radius:12px;background:transparent;box-shadow:none;color:var(--ink);font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.purchase-intro-actions button[hidden] {display:none}
.purchase-intro-actions button:focus-visible {outline:2px solid var(--blue);outline-offset:1px}
.purchase-intro-actions button:active {background:rgba(255,255,255,.5)}
@media(hover:hover) and (pointer:fine) {.purchase-intro-actions button:hover {background:rgba(255,255,255,.56)}}
html[data-theme="dark"] .purchase-intro-actions {background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.18);box-shadow:0 5px 18px rgba(0,0,0,.16)}
html[data-theme="dark"] .purchase-intro-actions button:active {background:rgba(255,255,255,.16)}
@media(hover:hover) and (pointer:fine) {html[data-theme="dark"] .purchase-intro-actions button:hover {background:rgba(255,255,255,.14)}}
.purchase-intro h2 {margin:0;font-size:22px;letter-spacing:-.02em}
.purchase-intro p,.purchase-card header p {margin:0;color:var(--muted);line-height:1.5}
.purchase-monitor-status {margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.purchase-controls {display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.purchase-controls label,.purchase-form label {display:grid;gap:7px;font-weight:600;color:var(--ink)}
.purchase-controls label:first-child {flex:1;min-width:220px}
.purchase-controls input,.purchase-controls select,.purchase-form input,.purchase-form select {width:100%;min-height:42px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink)}
.purchase-list {display:grid;gap:14px}.purchase-card {background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:20px;display:grid;gap:16px}
.purchase-card-target {border-color:var(--blue);box-shadow:0 0 0 2px var(--blue-wash)}
.order-purchase-state {display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;background:color-mix(in srgb,var(--green) 12%,var(--surface));color:var(--green);font-size:12px;font-weight:600;line-height:1.4}
.purchase-card header {display:flex;justify-content:space-between;align-items:start;gap:16px}.purchase-card h3 {font-size:17px;line-height:1.45;margin:4px 0;overflow-wrap:anywhere}.purchase-shop {font-size:12px;font-weight:700;color:var(--blue)}
.purchase-stage {white-space:nowrap;font-size:12px;padding:7px 10px;border-radius:99px;color:var(--blue);background:var(--blue-wash)}
.purchase-flow {display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.purchase-flow span {border-top:3px solid var(--line);padding-top:8px;color:var(--muted);font-size:12px}.purchase-flow .done {border-color:var(--green);color:var(--green)}.purchase-flow .current {border-color:var(--blue);color:var(--blue)}
.purchase-summary {display:flex;flex-wrap:wrap;gap:12px 24px;color:var(--muted);font-size:13px}.purchase-summary b {color:var(--ink);font-weight:650}.purchase-summary a,.purchase-hint a {color:var(--blue);text-decoration:underline;text-underline-offset:3px}.purchase-hint {margin:0;color:var(--muted);line-height:1.5;font-size:13px}
.purchase-delivery {display:grid;grid-template-columns:1fr 1fr;gap:10px}.purchase-delivery div {background:var(--surface-secondary);border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;gap:5px;overflow-wrap:anywhere}.purchase-delivery span,.purchase-delivery small {color:var(--muted)}
.purchase-actions {display:flex;gap:8px;flex-wrap:wrap}.purchase-notice {background:var(--blue-wash);border:1px solid var(--line);border-radius:14px;padding:14px 16px}.purchase-notice>div {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:7px}.purchase-empty {background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:32px}
.purchase-actions .purchase-remove {margin-left:auto;color:var(--muted)}
.purchase-cancellation {display:grid;gap:10px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--surface) 78%,transparent);line-height:1.5}
.purchase-cancellation a {color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.purchase-cancellation-actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.purchase-stock-form {display:grid;gap:14px}
.purchase-stock-form label {display:grid;gap:7px}
.purchase-stock-form .purchase-stock-check {display:flex;align-items:flex-start;gap:8px;font-weight:400}
.purchase-stock-form .purchase-stock-check input {width:auto;margin:3px 0 0}
.purchase-sync-feedback {margin:0;padding:9px 12px;border-radius:10px;background:var(--surface-secondary);color:var(--ink);font-size:13px;line-height:1.5}
.purchase-form {display:grid;gap:14px}.purchase-form fieldset {border:1px solid var(--line);border-radius:12px;padding:14px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.purchase-form legend {font-weight:700;padding:0 6px}.purchase-form small,.purchase-modal-note {color:var(--muted);font-weight:400}.purchase-modal-note {line-height:1.6}#workspace .dock-nav .nav-link .purchase-icon-wrap {position:relative;display:inline-grid;place-items:center;width:32px;height:32px;flex:none;overflow:visible}
#modal:has(.purchase-form)[open] {
 display:flex;flex-direction:column;width:min(560px,calc(100vw - 32px));max-height:min(760px,calc(100dvh - 32px));padding:0;overflow:hidden;
 border:1px solid rgba(255,255,255,.82);border-radius:24px;background:linear-gradient(115deg,rgba(255,253,251,.66),rgba(250,248,246,.48) 52%,rgba(247,252,250,.58));
 box-shadow:0 16px 38px rgba(53,42,37,.17),0 3px 10px rgba(53,42,37,.07),inset 0 1px 0 rgba(255,255,255,.8);
 backdrop-filter:blur(16px) saturate(130%);-webkit-backdrop-filter:blur(16px) saturate(130%);
}
#modal:has(.purchase-form) .modal-header {flex:none;align-items:center;gap:16px;margin:0;padding:22px 26px 15px}
#modal:has(.purchase-form) .modal-header h2 {font-size:21px;line-height:1.3}
#modal:has(.purchase-form) .modal-header .eyebrow {margin:0 0 5px;color:#82786f;font-size:11px;letter-spacing:.08em}
#modal:has(.purchase-form) .modal-header .icon-button {width:36px;height:36px;flex:none;background:rgba(255,255,255,.46);color:#655e57}
#modal:has(.purchase-form) #modal-content {min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
#modal:has(.purchase-form) .modal-body {padding:0 26px}
#modal:has(.purchase-form) .purchase-modal-note {margin:0 0 20px;padding:12px 14px;border:1px solid rgba(255,255,255,.65);border-radius:14px;background:rgba(255,255,255,.3)}
#modal:has(.purchase-form) .purchase-modal-order {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 9px;color:#70675f;font-size:12px;line-height:1.45}
#modal:has(.purchase-form) .purchase-modal-order strong {color:var(--ink);font-size:14px;font-weight:650;overflow-wrap:anywhere}
#modal:has(.purchase-form) .purchase-modal-sku {overflow-wrap:anywhere}
#modal:has(.purchase-form) .purchase-modal-note p {margin:5px 0 0;color:#70675f;font-size:12px;line-height:1.5}
#modal:has(.purchase-form) .purchase-form {gap:16px}
#modal:has(.purchase-form) .purchase-form label {display:grid;gap:7px;min-width:0;margin:0;color:var(--ink);font-size:13px;font-weight:600;line-height:1.45}
#modal:has(.purchase-form) .purchase-form :is(input,select) {min-width:0;min-height:46px;margin:0;padding:10px 12px;border:1px solid rgba(131,115,99,.23);border-radius:11px;background:rgba(255,255,255,.68);color:var(--ink);font-size:14px;font-weight:450}
#modal:has(.purchase-stock-form) .purchase-stock-form p {margin:0;line-height:1.5;overflow-wrap:anywhere}
#modal:has(.purchase-stock-form) .purchase-stock-modes {display:flex;gap:4px;width:max-content;max-width:100%;padding:4px;border:1px solid rgba(255,255,255,.55);border-radius:13px;background:rgba(255,255,255,.25)}
#modal:has(.purchase-stock-form) .purchase-stock-modes button {border:0;border-radius:9px;padding:8px 12px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}
#modal:has(.purchase-stock-form) .purchase-stock-modes button[aria-pressed="true"] {background:rgba(255,255,255,.65);box-shadow:0 2px 8px rgba(53,42,37,.1)}
#modal:has(.purchase-stock-form) .purchase-stock-modes button:focus-visible {outline:2px solid #a96650;outline-offset:2px}
#modal:has(.purchase-stock-form) .purchase-stock-fields {display:grid;gap:12px;min-width:0}
#modal:has(.purchase-stock-form) .purchase-stock-fields[hidden] {display:none}
@media(min-width:520px){#modal:has(.purchase-stock-form) .purchase-stock-new {grid-template-columns:1fr 1fr}}
#modal:has(.purchase-stock-form) .purchase-stock-form .purchase-stock-check {display:flex;align-items:flex-start;gap:9px;font-weight:400}
#modal:has(.purchase-stock-form) .purchase-stock-form .purchase-stock-check input {width:18px;height:18px;min-height:18px;flex:none;margin:1px 0 0;padding:0;accent-color:var(--blue)}
#modal:has(.purchase-form) .purchase-form :is(input,select):focus-visible {outline:2px solid #a96650;outline-offset:2px}
#modal:has(.purchase-form) .purchase-form fieldset {min-width:0;margin:0;padding:13px 14px 15px;gap:12px;border:1px solid rgba(131,115,99,.2);border-radius:14px;background:rgba(255,255,255,.23)}
#modal:has(.purchase-form) .purchase-form legend {padding:0 6px;font-size:13px;font-weight:650}
#modal:has(.purchase-form) .purchase-form label:has([name="reason"]),#modal:has(.purchase-form) .purchase-form label:has([name="receipt"]) {grid-column:1/-1}
#modal:has(.purchase-form) .purchase-form input[type="file"] {padding:9px;font-size:13px}
#modal:has(.purchase-form) .purchase-form .purchase-upload {grid-column:1/-1}
#modal:has(.purchase-form) .purchase-dropzone {position:relative;display:flex;min-height:112px;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:16px;text-align:center;border:1px dashed rgba(125,101,88,.45);border-radius:14px;background:rgba(255,255,255,.3);transition:background 120ms ease,border-color 120ms ease}
#modal:has(.purchase-form) .purchase-dropzone:is(.is-dragging,:focus-within) {border-color:#a96650;background:rgba(255,255,255,.56);outline:2px solid rgba(169,102,80,.32);outline-offset:2px}
#modal:has(.purchase-form) .purchase-form .purchase-dropzone input[type="file"] {position:absolute;inset:0;width:100%;height:100%;padding:0;opacity:0;cursor:pointer}
#modal:has(.purchase-form) .purchase-dropzone-title {font-weight:600;color:var(--ink)}
#modal:has(.purchase-form) .purchase-dropzone-preview {display:block;max-width:100%;width:auto;max-height:140px;object-fit:contain;border-radius:8px}
#modal:has(.purchase-form) .purchase-dropzone-preview[hidden] {display:none}
#modal:has(.purchase-form) .purchase-dropzone-replace {display:none;color:var(--muted);font-size:12px;font-weight:400}
#modal:has(.purchase-form) .purchase-dropzone.has-preview :is(.purchase-dropzone-title,small) {display:none}
#modal:has(.purchase-form) .purchase-dropzone.has-preview .purchase-dropzone-replace {display:block}
#modal:has(.purchase-form) .purchase-upload-file {font-size:12px;font-weight:400;overflow-wrap:anywhere}
#modal:has(.purchase-form) .purchase-upload-file:empty {display:none}
#modal:has(.purchase-form) .purchase-form small {font-size:12px;line-height:1.45}
#modal:has(.purchase-form) .purchase-form .error-text:empty {display:none}
#modal:has(.purchase-form) .purchase-form .modal-actions {position:sticky;bottom:0;z-index:2;justify-content:flex-end;gap:9px;margin:2px -26px 0;padding:14px 26px 18px;border-top:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.13)}
#modal:has(.purchase-form-details) .purchase-service-field,#modal:has(.purchase-form-details) .purchase-site-field,#modal:has(.purchase-form-details) .purchase-sync-hint {grid-column:1/-1}
#modal:has(.purchase-form-details) .purchase-sync-hint {color:var(--muted);font-size:12px;line-height:1.4}
@media(min-width:680px){
 #modal:has(.purchase-form-details)[open] {width:min(1000px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px)}
 #modal:has(.purchase-form-details) .modal-header {padding:16px 24px 8px}
 #modal:has(.purchase-form-details) .modal-body {padding:0 24px}
 #modal:has(.purchase-form-details) .purchase-modal-note {margin-bottom:10px;padding:8px 12px}
 #modal:has(.purchase-form-details) .purchase-form-details {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}
 #modal:has(.purchase-form-details) .purchase-form-details label:has([name="purchaseUrl"]),#modal:has(.purchase-form-details) .purchase-form-details>.error-text,#modal:has(.purchase-form-details) .purchase-form-details>.modal-actions {grid-column:1/-1}
 #modal:has(.purchase-form-details) .purchase-form-details fieldset {align-content:start;padding:9px 12px 11px;gap:8px}
 #modal:has(.purchase-form-details) .purchase-form-details :is(input,select) {min-height:40px;padding:8px 10px}
 #modal:has(.purchase-form-details) .purchase-form-details .modal-actions {position:static;margin:0 -24px;padding:10px 24px 14px}
}
#modal:has(.purchase-form) .modal-actions button {min-height:42px;min-width:88px}
html[data-theme="dark"] #modal:has(.purchase-form)[open] {background:rgba(48,42,38,.76);border-color:rgba(248,229,215,.22);box-shadow:0 24px 70px rgba(0,0,0,.36),inset 0 1px 0 rgba(255,255,255,.09)}
html[data-theme="dark"] #modal:has(.purchase-form) .purchase-modal-note,html[data-theme="dark"] #modal:has(.purchase-form) .purchase-form fieldset {background:rgba(255,255,255,.07);border-color:rgba(248,229,215,.15)}
html[data-theme="dark"] #modal:has(.purchase-form) :is(.purchase-modal-order,.purchase-modal-note p,.modal-header .eyebrow) {color:#d6c7b9}
html[data-theme="dark"] #modal:has(.purchase-form) .modal-header .icon-button {background:rgba(255,255,255,.11);color:#eee3db}
html[data-theme="dark"] #modal:has(.purchase-form) .purchase-form :is(input,select) {background:rgba(37,32,29,.72);border-color:rgba(248,229,215,.2);color:var(--ink)}
html[data-theme="dark"] #modal:has(.purchase-form) .purchase-form .modal-actions {background:rgba(48,42,38,.82);border-color:rgba(248,229,215,.15)}
@media (prefers-reduced-transparency:reduce) {#modal:has(.purchase-form)[open] {background:#faf8f2;backdrop-filter:none;-webkit-backdrop-filter:none}#modal:has(.purchase-form) .purchase-form .modal-actions {background:#faf8f2;backdrop-filter:none;-webkit-backdrop-filter:none}html[data-theme="dark"] #modal:has(.purchase-form)[open],html[data-theme="dark"] #modal:has(.purchase-form) .purchase-form .modal-actions {background:#302a26}}
@media (max-width:480px) {#modal:has(.purchase-form)[open] {max-height:calc(100dvh - 20px);width:calc(100vw - 20px);border-radius:20px}#modal:has(.purchase-form) .modal-header {padding:18px 18px 14px}#modal:has(.purchase-form) .modal-body {padding:0 18px}#modal:has(.purchase-form) .purchase-form .modal-actions {margin-right:-18px;margin-left:-18px;padding:12px 18px calc(14px + env(safe-area-inset-bottom,0px))}#modal:has(.purchase-form) .modal-actions button {flex:1}}
#purchase-notice-badge {position:absolute;z-index:1;top:-3px;right:-5px;display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#ff3b30;color:#fff;font-size:11px;font-weight:600;line-height:1;letter-spacing:0;font-variant-numeric:tabular-nums}
@media(max-width:640px){.purchase-card{padding:15px}.purchase-card header{flex-direction:column}.purchase-delivery,.purchase-form fieldset{grid-template-columns:1fr}.purchase-intro{align-items:start}.purchase-flow span{font-size:11px}}

/* Cancelled purchase receipt */
#modal:has(#purchase-warehouse-receipt) {
 --receipt-ink:#203740;
 --receipt-muted:#506774;
 --receipt-teal:#146861;
 --receipt-primary:#17665f;
 --receipt-focus:#187b74;
 --receipt-paper:rgba(255,255,255,.74);
 --receipt-pane:#f2f7f8;
 --receipt-line:rgba(59,92,100,.22);
 --receipt-tint:#e7f4ef;
 --receipt-selected:#71a99b;
 --receipt-gutter:24px;
}
#modal:has(#purchase-warehouse-receipt)[open] {
 width:min(512px,calc(100vw - 24px));
 max-height:min(720px,calc(100dvh - 24px));
 color:var(--receipt-ink);
 background:linear-gradient(138deg,rgba(255,255,255,.94),rgba(240,247,248,.88));
 border:1px solid rgba(255,255,255,.92);
 box-shadow:0 16px 60px rgba(20,47,54,.19),0 3px 10px rgba(20,47,54,.07);
}
#modal:has(#purchase-warehouse-receipt) .modal-header {
 padding:20px var(--receipt-gutter) 13px;
 color:var(--receipt-ink);
}
#modal:has(#purchase-warehouse-receipt) .modal-header .eyebrow {
 color:var(--receipt-muted);
}
#modal:has(#purchase-warehouse-receipt) .modal-header .icon-button {
 color:var(--receipt-muted);
 background:var(--receipt-paper);
}
#modal:has(#purchase-warehouse-receipt) .modal-body {padding:0 var(--receipt-gutter)}
#modal #purchase-warehouse-receipt {grid-template-columns:minmax(0,1fr);gap:17px}
#modal #purchase-warehouse-receipt .receipt-product {
 display:grid;
 grid-template-columns:36px minmax(0,1fr) auto;
 align-items:center;
 gap:11px;
 padding:11px 13px;
 border-radius:13px;
 background:var(--receipt-pane);
 border:1px solid var(--receipt-line);
}
#modal #purchase-warehouse-receipt .receipt-product-icon {
 display:grid;
 width:36px;height:36px;
 place-items:center;
 color:var(--receipt-teal);
 background:var(--receipt-paper);
 border-radius:10px;
}
#modal #purchase-warehouse-receipt .receipt-product-icon svg {width:21px;height:21px}
#modal #purchase-warehouse-receipt .receipt-product-copy {display:grid;gap:2px;overflow-wrap:anywhere}
#modal #purchase-warehouse-receipt .receipt-product-copy strong {font-size:15px;line-height:1.4;color:var(--receipt-ink)}
#modal #purchase-warehouse-receipt .receipt-product-copy small {color:var(--receipt-muted);font-size:12px;font-variant-numeric:tabular-nums}
#modal #purchase-warehouse-receipt .receipt-qty {color:var(--receipt-muted);font-size:13px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
#modal #purchase-warehouse-receipt .receipt-warehouses {display:block;margin:0;padding:0;border:0;background:none}
#modal #purchase-warehouse-receipt .receipt-warehouses legend {
 margin:0 0 8px;padding:0;
 font-weight:650;font-size:13px;line-height:1.45;color:var(--receipt-ink);
}
#modal #purchase-warehouse-receipt :is(.receipt-choices,.receipt-fields) {display:grid;gap:8px;min-width:0}
#modal #purchase-warehouse-receipt .receipt-choices {grid-template-columns:repeat(2,minmax(0,1fr))}
#modal #purchase-warehouse-receipt :is(.receipt-choice,.receipt-consent) {
 position:relative;
 display:flex;align-items:center;gap:10px;
 padding:9px 12px;
 min-width:0;min-height:44px;
 line-height:1.4;
 color:var(--receipt-ink);
 border:1px solid var(--receipt-line);
 border-radius:11px;
 background:var(--receipt-paper);
 cursor:pointer;
 overflow-wrap:anywhere;
}
#modal #purchase-warehouse-receipt .receipt-consent {min-height:46px}
#modal #purchase-warehouse-receipt :is(.receipt-choice,.receipt-consent):has(input:checked) {
 color:var(--receipt-teal);border-color:var(--receipt-selected);background:var(--receipt-tint);
}
#modal #purchase-warehouse-receipt :is(.receipt-choice,.receipt-consent) input {
 position:absolute;clip-path:inset(50%);overflow:hidden;
 width:1px;height:1px;min-width:0;min-height:0;
 margin:0;padding:0;border:0;white-space:nowrap;
}
#modal #purchase-warehouse-receipt :is(.receipt-choice-dot,.receipt-check) {
 display:grid;place-items:center;flex:none;
 box-sizing:border-box;
 border:1.5px solid var(--receipt-muted);
 background:var(--receipt-paper);
}
#modal #purchase-warehouse-receipt .receipt-choice-dot {width:16px;height:16px;border-radius:50%}
#modal #purchase-warehouse-receipt .receipt-choice-dot::after {
 content:"";width:8px;height:8px;border-radius:50%;
 background:var(--receipt-teal);transform:scale(0);
}
#modal #purchase-warehouse-receipt .receipt-check {width:20px;height:20px;border-radius:6px;color:white}
#modal #purchase-warehouse-receipt .receipt-check svg {width:16px;height:16px;stroke-width:2.65}
#modal #purchase-warehouse-receipt .receipt-check path {stroke-dasharray:22;stroke-dashoffset:22;opacity:0}
#modal #purchase-warehouse-receipt input:checked + .receipt-choice-dot {border-color:var(--receipt-teal)}
#modal #purchase-warehouse-receipt input:checked + .receipt-choice-dot::after {transform:scale(1)}
#modal #purchase-warehouse-receipt input:checked + .receipt-check {border-color:var(--receipt-primary);background:var(--receipt-primary)}
#modal #purchase-warehouse-receipt input:checked + .receipt-check path {stroke-dashoffset:0;opacity:1}
#modal #purchase-warehouse-receipt input:focus-visible + :is(.receipt-check,.receipt-choice-dot) {
 outline:2px solid var(--receipt-focus);outline-offset:3px;
}
#modal #purchase-warehouse-receipt .receipt-hint {margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--receipt-muted)}
#modal #purchase-warehouse-receipt .receipt-fields label {color:var(--receipt-ink)}
#modal #purchase-warehouse-receipt .receipt-fields input {
 min-height:42px;
 padding:9px 12px;
 background:var(--receipt-paper);border-color:var(--receipt-line);color:var(--receipt-ink);
}
#modal #purchase-warehouse-receipt .receipt-fields input:focus-visible {
 border-color:var(--receipt-focus);outline:2px solid var(--receipt-focus);outline-offset:1px;
}
#modal #purchase-warehouse-receipt .modal-actions {
 position:static;
 display:flex;align-items:center;justify-content:flex-end;gap:8px;
 margin:0 calc(0px - var(--receipt-gutter));
 padding:12px var(--receipt-gutter) calc(14px + env(safe-area-inset-bottom,0px));
 border-color:var(--receipt-line);background:transparent;
}
#modal #purchase-warehouse-receipt .modal-actions button {
 display:inline-flex;align-items:center;justify-content:center;gap:7px;
 min-width:76px;min-height:42px;
 padding:8px 16px;
 border:1px solid var(--receipt-line);border-radius:11px;
 color:var(--receipt-ink);background:var(--receipt-paper);box-shadow:none;
 font-size:14px;font-weight:600;
}
#modal #purchase-warehouse-receipt .modal-actions .primary {
 min-width:114px;border-color:transparent;color:white;background:var(--receipt-primary);
}
#modal #purchase-warehouse-receipt .modal-actions .primary:disabled {
 opacity:1;color:var(--receipt-muted);background:var(--receipt-pane);border:1px solid var(--receipt-line);cursor:default;
}
#modal #purchase-warehouse-receipt .modal-actions button:focus-visible {outline:2px solid var(--receipt-focus);outline-offset:2px}
#modal #purchase-warehouse-receipt .receipt-next {width:15px;height:15px;flex:none}
#modal #purchase-warehouse-receipt[data-saving] .modal-actions {cursor:progress}

@media (min-width:520px) {
 #modal #purchase-warehouse-receipt .receipt-fields:has([data-receipt-name]:not([hidden])) {
  grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
 }
}
@media (max-width:480px) {
 #modal:has(#purchase-warehouse-receipt) {--receipt-gutter:16px}
 #modal:has(#purchase-warehouse-receipt) .modal-header {padding-top:16px}
 #modal #purchase-warehouse-receipt {gap:14px}
 #modal #purchase-warehouse-receipt .receipt-fields input {font-size:16px}
 #modal #purchase-warehouse-receipt .modal-actions .secondary {flex:1}
 #modal #purchase-warehouse-receipt .modal-actions .primary {flex:1.5}
}
@media (max-width:310px) {
 #modal #purchase-warehouse-receipt .receipt-choices {grid-template-columns:minmax(0,1fr)}
}
@media (hover:hover) {
 #modal #purchase-warehouse-receipt :is(.receipt-choice,.receipt-consent):not(:has(input:disabled)):hover,
 #modal #purchase-warehouse-receipt .modal-actions .secondary:enabled:hover {border-color:var(--receipt-selected)}
}
@media (prefers-reduced-motion:no-preference) {
 #modal #purchase-warehouse-receipt :is(.receipt-choice,.receipt-consent,.modal-actions button) {
  transition:background-color 140ms ease,border-color 140ms ease,transform 130ms ease;
 }
 #modal #purchase-warehouse-receipt :is(.receipt-choice,.receipt-consent):not(:has(input:disabled)):active,
 #modal #purchase-warehouse-receipt .modal-actions button:enabled:active {transform:scale(.985)}
 #modal #purchase-warehouse-receipt .receipt-choice-dot::after {transition:transform 150ms cubic-bezier(.2,.8,.3,1)}
 #modal #purchase-warehouse-receipt .receipt-check {transition:background-color 130ms ease}
 #modal #purchase-warehouse-receipt .receipt-check path {transition:stroke-dashoffset 160ms ease-out,opacity 100ms ease}
 #modal #purchase-warehouse-receipt :is(.receipt-hint,[data-receipt-name]):not([hidden]) {animation:receipt-field-appear 145ms ease-out}
 @keyframes receipt-field-appear {from {opacity:0;transform:translateY(2px)}to {opacity:1;transform:none}}
}
html[data-theme="dark"] #modal:has(#purchase-warehouse-receipt) {
 --receipt-ink:#ecf3f4;--receipt-muted:#afc2c6;
 --receipt-teal:#97dcd1;--receipt-primary:#276c65;--receipt-focus:#8ad9cc;
 --receipt-paper:rgba(44,60,65,.9);--receipt-pane:#293b40;
 --receipt-line:rgba(157,187,192,.34);--receipt-tint:#243f3d;--receipt-selected:#629e91;
 background:linear-gradient(138deg,rgba(30,44,49,.96),rgba(23,37,41,.93));
 border-color:var(--receipt-line);
}
@media (prefers-reduced-transparency:reduce) {
 #modal:has(#purchase-warehouse-receipt)[open] {background:#f8fbfc;backdrop-filter:none;-webkit-backdrop-filter:none}
 html[data-theme="dark"] #modal:has(#purchase-warehouse-receipt)[open] {background:#1d2b2e}
}
@media (forced-colors:active) {
 #modal #purchase-warehouse-receipt :is(.receipt-check,.receipt-choice-dot) {
  forced-color-adjust:none;border-color:ButtonText;background:Canvas;
 }
 #modal #purchase-warehouse-receipt input:checked + .receipt-check {
  background:Highlight;border-color:Highlight;color:HighlightText;
 }
 #modal #purchase-warehouse-receipt input:checked + .receipt-choice-dot {border-color:Highlight}
 #modal #purchase-warehouse-receipt .receipt-choice-dot::after {background:Highlight}
 #modal #purchase-warehouse-receipt input:focus-visible + :is(.receipt-check,.receipt-choice-dot) {outline-color:Highlight}
 #modal #purchase-warehouse-receipt .modal-actions button:disabled {color:GrayText}
}
