.igf-sales-detail-modal.modal-dialog{width:min(1440px,calc(100vw - 32px));max-width:none;margin:16px auto;height:calc(100dvh - 32px)}
.igf-sales-detail-modal .modal-content{display:flex;flex-direction:column;height:100%;max-height:100%;overflow:hidden;border-radius:16px!important}
.igf-sales-detail-modal .modal-header{display:flex;align-items:center;gap:12px;flex:0 0 auto;padding:16px 20px!important;background:#fff!important}
.igf-review-heading{min-width:0;flex:1}.igf-review-heading h2{font-size:21px;margin:0!important}.igf-review-heading>small{display:block;color:#64748b;font-size:12px;margin-top:4px}.igf-review-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.igf-sales-detail-modal .modal-body{flex:1 1 auto;min-height:0;overflow:auto;padding:20px!important;background:#f6f8fb}
.igf-review-grid{display:grid;grid-template-columns:minmax(0,2.5fr) minmax(280px,1fr);gap:20px;align-items:start}.igf-review-main,.igf-review-aside{min-width:0;display:grid;gap:18px}
.igf-review-aside>[class*=col-]{float:none;width:100%;padding:16px;background:#fff;border:1px solid #e1e7ef;border-radius:12px}.igf-review-aside address{margin-bottom:0}.igf-review-aside .well{margin:8px 0 0;background:#f8fafc;border:0;box-shadow:none;white-space:pre-wrap}
.igf-review-main>.row{margin:0}.igf-review-main>.row>[class*=col-]{float:none;width:100%;padding:0}.igf-sale-review-products,.igf-sale-review-payments,.igf-review-history,.igf-review-main>.stockpile-shipment-manifest{background:#fff;border:1px solid #e1e7ef;border-radius:12px;padding:16px!important;min-width:0}
.igf-sales-detail-modal .igf-sale-lines{margin-bottom:0;border:0}.igf-sales-detail-modal .igf-sale-lines th{background:#f8fafc}.igf-sales-detail-modal .table-responsive{margin-bottom:0}
.igf-sale-review-payments{display:flex;flex-direction:column;gap:12px}.igf-sale-review-payments>div:has(.igf-sales-detail-totals){order:-1}.igf-sales-detail-totals table{margin-bottom:0}.igf-review-history h3{font-size:16px;margin:0 0 14px}.igf-review-history ol{list-style:none;padding:0;margin:0;border-left:2px solid #dbe3ee}.igf-review-history li{position:relative;margin-left:14px;padding:0 0 18px 10px}.igf-review-history li:before{content:'';position:absolute;left:-20px;top:5px;width:9px;height:9px;border-radius:50%;background:#64748b;border:2px solid #fff}.igf-review-history li>small,.igf-review-history li>strong{display:block}.igf-review-history li>small{color:#64748b;font-size:11px}.igf-review-history li>strong{font-size:13px;margin:4px 0}.igf-review-history p{white-space:pre-wrap;font-size:12px;overflow-wrap:anywhere}.igf-history-outcome{font-size:11px;border:1px solid #cbd5e1;border-radius:5px;padding:2px 5px}
.igf-review-actions{position:relative;flex-shrink:0}.igf-review-actions>summary{list-style:none;cursor:pointer;border:1px solid #cbd5e1;border-radius:8px;padding:9px 12px;font-weight:600}.igf-review-actions>summary:after{content:' ⌄'}.igf-review-action-list{position:absolute;right:0;top:calc(100% + 6px);width:280px;max-width:calc(100vw - 40px);max-height:55dvh;overflow:auto;padding:8px;background:#fff;border:1px solid #dbe3ed;border-radius:12px;box-shadow:0 12px 32px #0f172a26;z-index:4}.igf-review-actions:not([open]) .igf-review-action-list{display:none}.igf-review-action-list>a,.igf-review-action-list>button{display:flex;width:100%;justify-content:flex-start;margin:3px 0!important;white-space:normal;text-align:left;font-size:13px!important;min-height:40px;background:#fff!important;color:#334155!important;border:0!important}
.igf-review-invoice-nav{display:flex;gap:4px}.igf-review-invoice-nav button{width:36px;height:38px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;font-size:18px}.igf-review-invoice-nav button:disabled{opacity:.4}.igf-sales-detail-modal .modal-header .close{float:none;flex-shrink:0;margin:0}
.igf-sales-detail-modal .modal-footer[hidden]{display:none!important}.igf-review-alerts:empty{display:none}.igf-review-alerts>.row{margin:0 0 14px}.igf-review-alerts:has(>br:only-child){display:none}
@media(max-width:900px){.igf-review-grid{grid-template-columns:minmax(0,1fr)}.igf-review-aside{grid-template-columns:repeat(2,minmax(0,1fr))}.igf-review-aside>[class*=col-]{width:auto}.igf-review-main{order:0}.igf-review-aside{order:1}}
@media(max-width:767px){.igf-sales-detail-modal.modal-dialog{width:100%;height:100dvh;max-height:100dvh;margin:0;padding:0}.igf-sales-detail-modal .modal-content{border-radius:0!important;max-height:100dvh!important}.igf-sales-detail-modal .modal-header{padding:12px!important;flex-wrap:wrap;gap:8px}.igf-review-heading{flex:1 1 calc(100% - 40px);order:0}.igf-review-heading h2{font-size:18px}.igf-sales-detail-modal .modal-header .close{order:1}.igf-review-actions{order:2}.igf-review-invoice-nav{order:3;margin-left:auto}.igf-sales-detail-modal .modal-body{padding:12px 12px calc(20px + env(safe-area-inset-bottom))!important}.igf-review-aside{grid-template-columns:minmax(0,1fr)}.igf-review-action-list{right:auto;left:0}.igf-sale-review-products,.igf-sale-review-payments,.igf-review-history{padding:12px!important}}
@media print{.igf-review-actions,.igf-review-invoice-nav{display:none}}

.view_modal:has(.igf-sales-detail-modal){padding:0!important}

.igf-review-section-title{font-size:16px;margin:0 0 14px;font-weight:650}.igf-review-history [hidden]{display:none!important}.igf-history-change{margin:3px 0;color:#475569}.igf-sales-detail-modal .igf-sale-lines{min-width:720px}

.igf-sales-detail-modal .igf-review-aside .well{background:#f8fafc!important;min-height:0;padding:10px;margin:8px 0 0}.igf-sale-review-payments .table.bg-gray,.igf-sale-review-payments .table.bg-gray td{background:#fff!important}.igf-sale-review-payments h4{font-size:15px;font-weight:650}.igf-sale-review-payments th{background:#f8fafc!important;color:#475569!important;font-size:12px}
@media(max-width:767px){.igf-sales-detail-modal .modal-header{position:relative;padding-right:12px!important}.igf-review-heading{padding-right:34px;flex-basis:100%}.igf-sales-detail-modal .modal-header .close{position:absolute;right:10px;top:12px}.igf-review-actions{order:2}.igf-review-aside .well{max-height:none}}

.igf-sale-line-identity img[hidden]{display:none!important}.igf-missing-sale-image{display:flex;width:44px;height:44px;flex:0 0 44px;align-items:center;justify-content:center;border:1px solid #e2e8f0;border-radius:7px;color:#94a3b8;background:#f8fafc;font-size:22px}
/* Item identity has a defined width; prices and quantities stay readable at every viewport. */
.igf-sales-detail-modal .igf-sale-lines{min-width:960px;table-layout:auto}
.igf-sales-detail-modal .igf-sale-lines th{white-space:nowrap}
.igf-sales-detail-modal .igf-sale-lines td:nth-child(2){min-width:254px;width:254px}
.igf-sales-detail-modal .igf-sale-line-identity{width:230px;max-width:230px}
.igf-sales-detail-modal .igf-sale-line-identity__text{flex:1;min-width:0;overflow-wrap:anywhere;white-space:normal}
.igf-sales-detail-modal .igf-sale-lines td:nth-child(3){min-width:90px;white-space:nowrap}
.igf-sales-detail-modal .igf-sale-lines td:nth-child(n+4){min-width:85px;white-space:nowrap}
.igf-sales-detail-modal .igf-sale-lines td:nth-child(6){min-width:150px;white-space:normal}
.igf-sales-detail-modal .igf-sale-lines .display_currency{white-space:nowrap;display:inline-block}

.igf-sales-detail-modal .alert-warning{background:#fff7e6!important;color:#713c08!important;border:1px solid #e8c58c!important;border-left:4px solid #b7791f!important}.igf-sales-detail-modal .alert-warning::before{content:"⚠";display:inline-block;margin-right:9px}.igf-sale-media-preview{border:0;background:transparent;padding:0;flex:0 0 44px;cursor:zoom-in}.igf-sale-media-preview:focus-visible{outline:3px solid #2563eb;outline-offset:3px}.igf-invoice-media{position:fixed;inset:0;z-index:1200;background:#101827f2;color:#fff;display:flex;flex-direction:column;padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))}.igf-invoice-media header{display:flex;align-items:center;justify-content:space-between;gap:12px}.igf-invoice-media button{min-width:44px;min-height:44px;border:1px solid #ffffff66;border-radius:8px;background:#fff;color:#172033}.igf-invoice-media__body{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto;touch-action:pinch-zoom}.igf-invoice-media img,.igf-invoice-media video{max-width:100%;max-height:100%;object-fit:contain}.igf-invoice-media p{color:inherit}.igf-invoice-media [hidden]{display:none!important}

/* Phone review reads the exact server-rendered values, without a wide table. */
.igf-phone-items,.igf-phone-payments,.igf-phone-review-back,.igf-phone-bar-title{display:none}
.igf-review-open-scanner{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:48px;padding:12px 16px;margin:16px 0 0;border:1px solid #096b57;border-radius:10px;background:#087f68;color:#fff;font-size:16px;font-weight:700}
.igf-review-open-scanner:hover{background:#056b57}.igf-review-open-scanner:focus-visible,.igf-phone-review-back:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
@media(max-width:767px){
 .igf-review-phone.modal-dialog{position:fixed;left:var(--igf-visible-left,0px);top:var(--igf-visible-top,0px);width:var(--igf-visible-width,100vw);height:var(--igf-visible-height,100dvh);max-height:var(--igf-visible-height,100dvh);margin:0}
 .igf-review-phone .modal-content{height:100%;max-height:100%!important;box-shadow:none;border:0}
 .igf-review-phone .modal-header{flex-wrap:nowrap;gap:8px;padding:6px 12px!important;min-height:56px;border-bottom:1px solid #e2e8f0}
 .igf-phone-review-back{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;background:#fff;border:1px solid #dbe3ed;border-radius:50%;font-size:24px;color:#243145}
 .igf-phone-bar-title{display:block;min-width:0;flex:1;font-size:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
 .igf-review-phone .modal-header>.close{display:none}
 .igf-review-phone .igf-review-actions{order:0;margin:0}
 .igf-review-phone .igf-review-actions>summary{min-height:44px;display:flex;align-items:center;padding:8px 10px;font-size:14px}
 .igf-review-phone .igf-review-action-list{left:auto;right:0;max-width:calc(100vw - 24px);max-height:65dvh}
 .igf-review-phone .igf-review-invoice-nav{margin:0;padding:6px 0;border-top:1px solid #e2e8f0}
 .igf-review-phone .igf-review-invoice-nav button{width:50%;min-height:44px;font-size:14px}
 .igf-review-phone .modal-body{padding:14px 12px calc(24px + env(safe-area-inset-bottom))!important;overscroll-behavior:contain;background:#f7f9fc}
 .igf-review-phone .modal-body>.igf-review-heading{padding:0;margin:0 0 16px}
 .igf-review-phone .igf-review-heading h2{font-size:21px;line-height:1.3;overflow-wrap:anywhere}
 .igf-review-phone .igf-review-heading>small{font-size:13px;line-height:1.45}
 .igf-review-phone .igf-review-badges{gap:6px;margin-top:10px}.igf-review-phone .igf-review-badges>span{max-width:100%;white-space:normal;font-size:12px}
 .igf-review-phone .igf-review-grid,.igf-review-phone .igf-review-main,.igf-review-phone .igf-review-aside{gap:14px}
 .igf-review-phone .igf-review-aside>[class*=col-]{padding:14px;border-radius:10px;font-size:14px;overflow-wrap:anywhere}
 .igf-review-phone .igf-sale-review-products,.igf-review-phone .igf-sale-review-payments,.igf-review-phone .igf-review-history{padding:12px!important;border-radius:10px}
 .igf-review-phone .igf-sale-review-products .igf-sale-lines,.igf-review-phone .igf-review-payment-records{display:none}
 .igf-review-phone .table-responsive:has(>.igf-sale-lines),.igf-review-phone .table-responsive:has(>.igf-review-payment-records){overflow:visible;min-height:0;border:0}
 .igf-review-phone .igf-phone-items,.igf-review-phone .igf-phone-payments{display:block}
 .igf-phone-item{padding:14px 0;border-bottom:1px solid #e3e8ef;color:#243145;min-width:0}.igf-phone-item:first-child{padding-top:0}.igf-phone-item:last-child{border-bottom:0;padding-bottom:0}
 .igf-phone-item-heading{display:flex;align-items:flex-start;gap:10px;min-width:0}
 .igf-phone-item-heading>.igf-sale-media-preview,.igf-phone-item-heading>img{flex:0 0 48px;width:48px;height:48px}.igf-phone-item-heading img{width:48px;height:48px;border-radius:7px;object-fit:cover}
 .igf-phone-item-name{min-width:0;flex:1;font-size:15px;line-height:1.4;overflow-wrap:anywhere}.igf-phone-item-name .igf-review-product-name{display:block;font-weight:650}.igf-phone-item-name .igf-review-variant{display:block;font-size:13px;color:#475569;margin-top:2px}
 .igf-phone-item-sku{display:block;font-size:12px;color:#53657b;line-height:1.45;margin-top:3px;overflow-wrap:anywhere}.igf-phone-item-name .igf-sale-line-media-label{display:block;font-size:11px;color:#64748b}
 .igf-phone-item-price{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-top:9px;font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}.igf-phone-item-price>span{min-width:0;overflow-wrap:anywhere}.igf-phone-item-price>strong{text-align:right;min-width:0;max-width:55%;overflow-wrap:anywhere}.igf-phone-item-price .display_currency{white-space:normal!important}
 .igf-phone-item-details>summary,.igf-phone-payment summary{display:flex;align-items:center;min-height:44px;cursor:pointer;color:#1759a4;font-size:13px;font-weight:600;list-style:none}.igf-phone-item-details>summary::after,.igf-phone-payment summary::after{content:'⌄';margin-left:8px}.igf-phone-item-details[open]>summary::after,.igf-phone-payment details[open]>summary::after{content:'⌃'}
 .igf-phone-items dl,.igf-phone-payments dl{margin:0;background:#f8fafc;padding:10px;border-radius:8px;font-size:13px;line-height:1.45}.igf-phone-items dl>div,.igf-phone-payments dl>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:10px;padding:5px 0}.igf-phone-items dt,.igf-phone-payments dt{font-weight:500;color:#53657b}.igf-phone-items dd,.igf-phone-payments dd{margin:0;overflow-wrap:anywhere;min-width:0}.igf-phone-items .display_currency{white-space:normal!important}.igf-phone-item-details h4{font-size:13px}
 .igf-review-phone .igf-sales-detail-totals{overflow:visible;min-width:0;border:0}.igf-review-phone .igf-sales-detail-totals table{width:100%;min-width:0;font-size:14px}.igf-review-phone .igf-sales-detail-totals tr{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(90px,auto);gap:6px}.igf-review-phone .igf-sales-detail-totals th,.igf-review-phone .igf-sales-detail-totals td{width:auto!important;padding:8px 0;white-space:normal;overflow-wrap:anywhere;border:0;min-width:0}.igf-review-phone .igf-sales-detail-totals th{font-weight:500}.igf-review-phone .igf-sales-detail-totals td:last-child{text-align:right}.igf-review-phone .igf-sales-detail-totals [colspan]{grid-column:1/-1}.igf-review-phone .igf-sales-detail-totals .pull-right{float:none!important}.igf-review-phone .igf-sales-detail-totals tr:has(>th>strong){border-top:1px solid #dbe3ed}
 .igf-phone-payment{padding:10px 0;border-bottom:1px solid #e2e8f0;font-size:14px}.igf-phone-payment>div:first-child{display:flex;justify-content:space-between;gap:12px}.igf-phone-payment>small{display:block;color:#64748b;margin-top:5px}.igf-phone-payment b{text-align:right;font-variant-numeric:tabular-nums}
 .igf-review-phone>.modal-content>.modal-body>.igf-review-history{margin-top:14px}.igf-review-phone .igf-review-history p{font-size:13px}.igf-review-phone .igf-review-history li>small{font-size:12px}
 .igf-review-phone .igf-review-alerts{font-size:14px;overflow-wrap:anywhere}
}
@media print{.igf-phone-items,.igf-phone-payments,.igf-phone-review-back,.igf-phone-bar-title{display:none!important}.igf-sale-lines,.igf-review-payment-records{display:table!important}}

.igf-phone-status-label{display:none}@media(max-width:767px){.igf-review-phone .igf-phone-status-label{display:inline}.igf-review-phone.modal-dialog{padding:0!important}.igf-review-phone .modal-body{padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}}

/* Payment evidence has its own column budget; item tables keep their existing sizing. */
.igf-review-payment-records{table-layout:fixed;width:100%;min-width:900px}
.igf-review-payment-records .igf-payment-index{width:4%}
.igf-review-payment-records .igf-payment-date{width:12%}
.igf-review-payment-records .igf-payment-reference{width:15%}
.igf-review-payment-records .igf-payment-amount{width:17%}
.igf-review-payment-records .igf-payment-method{width:18%}
.igf-review-payment-records .igf-payment-note{width:34%}
.igf-review-payment-records th,.igf-review-payment-records td{vertical-align:top;white-space:normal;word-break:normal}
.igf-review-payment-records th:nth-child(2),.igf-review-payment-records td:nth-child(2),.igf-review-payment-records th:nth-child(4),.igf-review-payment-records td:nth-child(4){white-space:nowrap}
.igf-review-payment-records td:nth-child(3){overflow-wrap:anywhere}
.igf-review-payment-records td:last-child{overflow-wrap:anywhere;white-space:pre-line}

/* Keep the complete shipping instructions beside a stable, readable amount. */
.igf-sales-detail-modal .igf-sales-detail-totals .igf-review-shipping-row>th{white-space:normal!important;min-width:0;vertical-align:top;overflow-wrap:anywhere}
.igf-review-shipping-description{display:block;white-space:pre-wrap!important;overflow-wrap:anywhere;word-break:normal;max-width:100%;font-weight:400;margin-top:4px;line-height:1.5}
.igf-sales-detail-modal .igf-sales-detail-totals .igf-review-shipping-row>td{vertical-align:top}
.igf-sales-detail-modal .igf-sales-detail-totals .igf-review-shipping-row>td:last-child,.igf-review-shipping-row .display_currency{white-space:nowrap!important}

.igf-note-popover {position:fixed;z-index:1080;display:flex;flex-direction:column;gap:12px;padding:14px;background:#fff;color:#1e293b;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 10px 35px #0f172a33;overflow:hidden;}
.igf-note-popover__heading,.igf-note-popover__controls {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0;}
.igf-note-popover__heading button {border:0;background:transparent;font-size:24px;min-width:32px;min-height:32px;}
.igf-note-popover__text {white-space:pre-wrap;overflow:auto;overflow-wrap:anywhere;min-height:0;line-height:1.5;}
.igf-note-popover {padding:0;border-color:#d9e2ef;border-radius:12px;gap:0;box-shadow:0 12px 32px #0f172a24;}
.igf-note-popover__heading {padding:12px 14px;border-bottom:1px solid #edf1f6;background:#f8fafc;}
.igf-note-popover__heading strong,.igf-note-popover__heading small {display:block;}
.igf-note-popover__heading small {font-size:11px;color:#64748b;margin-top:3px;}
.igf-note-popover__heading button {font-size:22px;color:#64748b;border-radius:6px;}
.igf-note-popover__text {padding:14px;font-size:13px;}
.igf-note-popover__controls {padding:10px 14px;border-top:1px solid #edf1f6;background:#fafbfd;}
.igf-note-popover__controls .btn {border-radius:7px;font-size:12px;}

.igf-note-popover [hidden] {display:none!important;}
.igf-note-popover :focus-visible,.igf-invoice-note:focus-visible,.igf-review-shipment-return:focus-visible {outline:2px solid #2563eb;outline-offset:2px;}
.igf-invoice-note {display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;flex:none;min-width:28px;min-height:28px;margin-inline:0 5px;padding:4px;border:1px solid transparent;border-radius:6px;background:transparent;color:#475569;}
.igf-invoice-note svg {width:17px;height:17px;}
.igf-invoice-note:hover,.igf-invoice-note[aria-expanded="true"] {background:#eaf2fe;border-color:#c7dcf7;color:#174d8d;}
.igf-review-shipment-return {display:inline-flex;align-items:center;gap:8px;min-height:34px;margin:0 0 8px;padding:4px 8px;border:1px solid transparent;border-radius:7px;background:#eff6ff;color:#174d8d;font-size:13px;font-weight:600;}
.igf-review-shipment-return span {font-size:18px;line-height:1;}
.igf-review-shipment-return:hover {background:#dbeafe;border-color:#bfdbfe;}
@media (pointer:coarse), (max-width:767px) {
    .igf-invoice-note {min-width:44px;min-height:44px;}
}
@media (max-width:767px) {
    .igf-review-phone .igf-review-shipment-return {display:none;}
    .igf-review-phone .igf-phone-review-back--shipment {display:inline-flex;gap:5px;justify-content:center;flex:0 0 auto;width:auto;padding:0 9px;border-radius:8px;color:#174d8d;}
    .igf-phone-shipment-label {font-size:12px;font-weight:600;}
}
@media print {.igf-invoice-note,.igf-note-popover,.igf-review-shipment-return {display:none!important;}}
