/* Integration workspace, persistent filters and mobile glass notifications. */
body [data-integration-panel][hidden], body .catalog-filter-menu [hidden] { display:none!important; }
.integration-tabs1421 { display:flex; gap:6px; padding:6px; width:fit-content; max-width:100%; margin:0 0 20px; border:1px solid #e6ddc9; border-radius:18px; background:rgba(255,255,255,.72); box-shadow:inset 0 1px #fff; }
.integration-tabs1421 button { padding:12px 20px; min-height:44px; border:0; border-radius:12px; background:transparent; color:#6f6654; font:inherit; font-weight:700; cursor:pointer; }
.integration-tabs1421 button[aria-selected=true] { background:linear-gradient(135deg,#f5df9a,#d5ae4d); color:#30250f; box-shadow:0 3px 10px #b8933924,inset 0 1px #fff8; }
.integration-tabs1421 button:focus-visible { outline:2px solid #9a7420; outline-offset:2px; }
body #integrationFiscalPanel > .panel { background:linear-gradient(145deg,#fff,#f1f3f5); border:1px solid #e6decc; border-radius:26px; overflow:hidden; }
body #integrationFiscalPanel .panel-head { padding:26px; background:linear-gradient(120deg,#f1f3f5,#f1f3f5); border-bottom:1px solid #e7dcc2; }
body #integrationFiscalPanel .panel-head h2 { font-size:25px; letter-spacing:-.6px; }
body #integrationFiscalPanel .panel-head p { max-width:750px; line-height:1.6; color:#706650; }
body #customerFiscalScenariosList { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
body #customerFiscalScenariosList .customer-scenario1420 { min-width:0; padding:23px; background:#fff; border:1px solid #e7dfce; border-radius:21px; box-shadow:0 5px 22px #44350b06; }
body #customerFiscalScenariosList [data-customer-fiscal-group=NORMAL] { grid-column:1/-1; background:linear-gradient(115deg,#f1f3f5,#fff); border-color:#d6b65d; }
body #customerFiscalScenariosList h3 { margin:0 0 9px; line-height:1.4; font-size:16px; }
body #customerFiscalScenariosList p { margin:0 0 20px; min-height:35px; color:#796c51; line-height:1.5; }
body #customerFiscalScenariosList .dialog-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
body #customerFiscalScenariosList [data-customer-fiscal-group=NORMAL] .dialog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
body #customerFiscalScenariosList select { min-height:48px; border:1px solid #e1d8c6; border-radius:13px; padding:11px 30px 11px 13px; color:#3b3425; background-color:#f1f3f5; text-overflow:ellipsis; }
body #customerFiscalScenariosList select:focus-visible { outline:2px solid #b08a30; outline-offset:2px; }
body #customerFiscalScenariosForm > button { justify-self:end; min-height:46px; padding:12px 24px; }

/* Popover top layer avoids clipping by the sticky, blurred catalog toolbar. */
body #app .catalog-filter-menu { position:fixed; inset:var(--filter-top,100px) auto auto var(--filter-left,12px); margin:0; width:min(360px,calc(100vw - 24px)); min-width:0; max-width:none; max-height:min(540px,75dvh); padding:14px; border:1px solid #e0d3b4; border-radius:23px; background:rgba(241,243,245,.97); color:#29251c; box-shadow:0 22px 65px #32270938,inset 0 1px #fff; backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); overflow:hidden; }
body #app .catalog-filter-menu:not([hidden]) { display:flex; flex-direction:column; gap:12px; }
body #app .filter-head1421 { display:flex; justify-content:space-between; align-items:center; gap:12px; }
body #app .filter-head1421 strong { font-size:17px; padding-left:4px; }
body #app .filter-done1421 { min-height:40px; padding:8px 15px; border:1px solid #e2ca86; border-radius:12px; background:#f8e7b6; color:#5c430d; font:inherit; font-weight:750; }
body #app .catalog-filter-menu .filter-search1421 { flex:0 0 auto; width:100%; height:46px; padding:11px 14px; margin:0; border:1px solid #e5dcc7; border-radius:14px; background:#fff; font:inherit; font-size:16px; }
body #app .filter-choices1421 { overflow-y:auto; overscroll-behavior:contain; min-height:0; max-height:330px; display:grid; gap:5px; }
body #app .filter-choices1421 label { flex:none; display:flex; gap:12px; min-height:48px; padding:11px 12px; border:1px solid transparent; border-radius:13px; line-height:1.5; }
body #app .filter-choices1421 label:has(input:checked) { background:#f1f3f5; border-color:#e6cf8d; }
body #app .filter-choices1421 span { white-space:normal; overflow-wrap:anywhere; }
body #app .filter-count1421 { color:#7b6c4b; padding:6px 4px 0; border-top:1px solid #e9e0cd; font-size:12px; }
body #app .filter-empty1421 { padding:15px 5px; color:#746b58; }
body #app .filter-choices1421 input[type=checkbox], body #purchaseHistoryDialog .purchase-order-item input[type=checkbox] { appearance:none; -webkit-appearance:none; display:grid; place-content:center; flex:0 0 23px; width:23px; min-width:23px; height:23px; padding:0; margin:0; border:1.5px solid #bcaf91; border-radius:7px; background:#fff; cursor:pointer; }
body #app .filter-choices1421 input[type=checkbox]:checked, body #purchaseHistoryDialog .purchase-order-item input[type=checkbox]:checked { border-color:#a87e20; background:linear-gradient(135deg,#f5d784,#cca13b); }
body #app .filter-choices1421 input[type=checkbox]::before, body #purchaseHistoryDialog .purchase-order-item input[type=checkbox]::before { content:''; width:11px; height:6px; border-left:2px solid #3e2e0b; border-bottom:2px solid #3e2e0b; transform:rotate(-45deg) scale(0); margin-top:-3px; }
body #app .filter-choices1421 input[type=checkbox]:checked::before, body #purchaseHistoryDialog .purchase-order-item input[type=checkbox]:checked::before { transform:rotate(-45deg) scale(1); }
body #app .filter-choices1421 input:focus-visible, body #purchaseHistoryDialog input:focus-visible { outline:2px solid #95701e; outline-offset:3px; }

body #purchaseHistoryDialog .dialog-body { background:#f1f3f5; }
body #purchaseHistoryDialog .purchase-order-items { padding:10px; display:grid; gap:8px; }
body #purchaseHistoryDialog .purchase-order-item { cursor:pointer; margin:0; padding:16px; gap:14px; border:1px solid #e8e1d4; border-radius:16px; background:#fff; grid-template-columns:24px minmax(0,1.7fr) minmax(85px,.65fr) minmax(110px,1fr); }
body #purchaseHistoryDialog .purchase-order-item:has(input:checked) { background:#f1f3f5; border-color:#d7b658; box-shadow:inset 3px 0 #d3a63b; }
body #purchaseHistoryDialog .purchase-order-item input[type=checkbox] { grid-column:1; grid-row:1; margin-top:2px; min-height:23px; max-height:23px; max-width:23px; }
body #purchaseHistoryDialog .purchase-order-item > span { min-width:0; overflow-wrap:anywhere; }
body #purchaseHistoryDialog .dialog-actions { background:rgba(241,243,245,.93); backdrop-filter:blur(18px); border-top:1px solid #e7dfce; }

/* A popover must have an intrinsic block size, not stretch to Safari's viewport. */
body #toastRegion { position:fixed; inset:18px 18px auto auto; margin:0; width:min(420px,calc(100vw - 28px)); max-width:calc(100vw - 28px); height:auto; min-height:0; max-height:320px; block-size:fit-content; padding:0; border:0; overflow:visible; background:transparent; pointer-events:none; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:10px; z-index:2147483000; }
body #toastRegion::backdrop { background:transparent; pointer-events:none; }
body #toastRegion:empty { display:none; }
body #toastRegion .toast { pointer-events:auto; touch-action:pan-y; flex:0 0 auto; display:grid; grid-template-columns:36px minmax(0,1fr) 36px; align-items:start; align-content:start; gap:10px; width:100%; min-width:0; height:auto; min-height:0; max-height:150px; padding:14px; border:1px solid rgba(255,255,255,.96); border-radius:24px; background:rgba(255,255,255,.93); color:#292720; box-shadow:0 10px 32px #302b201f,inset 0 1px 1px #fff; backdrop-filter:blur(24px) saturate(140%); -webkit-backdrop-filter:blur(24px) saturate(140%); animation:toast-enter1421 .2s ease-out; }
.toast-icon1421 { display:grid; place-items:center; width:34px; height:34px; border-radius:12px; background:#f1db9f; color:#735213; font-size:19px; font-weight:800; }
.toast-content1421 { display:grid; gap:5px; padding:2px 0; min-width:0; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.toast-content1421 strong { font-size:13px; }
.toast-content1421 > span { max-height:90px; overflow:auto; overscroll-behavior:contain; }
body .toast-close1421 { display:grid; place-items:center; width:36px; min-width:36px; height:36px; min-height:36px; border:0; border-radius:12px; background:#e6d9b83b; color:#77684a; font-size:23px; cursor:pointer; }
body #toastRegion .toast.error { border-color:#d5aa91; }
.toast.error .toast-icon1421 { background:#f1f3f5; color:#913f24; }
.toast.success .toast-icon1421 { background:#e6e7b9; color:#526021; }
body #priceConditionEditor > [data-action="reset-product-price"] { margin-top:10px; min-height:44px; }
body #bonusTotalRow > span { display:flex; align-items:center; gap:8px; }
body .bonus-preview-button { display:grid; place-items:center; width:36px; height:36px; padding:0; border:1px solid #e5ddcd; border-radius:12px; background:#fff; color:#8a661e; cursor:pointer; }
.bonus-preview1422 { display:grid; gap:14px; }
.bonus-approval-note { padding:14px; border-radius:16px; background:#f1f3f5; border:1px solid #ecd79b; }
.bonus-preview-line { display:flex; justify-content:space-between; gap:16px; padding:14px; border:1px solid #e8e4dc; border-radius:16px; background:#fff; }
.bonus-preview-line small { display:block; margin-top:5px; color:#716d63; }
.bonus-preview-line > div { min-width:0; }
.bonus-preview-line > strong { flex-shrink:0; white-space:nowrap; }
.bonus-preview-total { display:flex; justify-content:space-between; gap:16px; padding-top:12px; border-top:1px solid #e8e4dc; }
body #pdfNotificationsDialog { border:1px solid #eee2c4; border-radius:28px; background:rgba(241,243,245,.96); backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); }
body #pdfNotificationsDialog .pdf-task { border:1px solid #e8dec6; border-radius:18px; background:linear-gradient(120deg,#fff,#f1f3f5); }
@keyframes toast-enter1421 { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
@media (prefers-reduced-motion:reduce) { body #toastRegion .toast { animation:none; } }
@media (max-width:900px) {
  body #app .catalog-controls { padding:16px; border-radius:25px; margin:0 0 18px; position:static; overflow:visible; }
  body #app .mobile-customer-strip { padding:0 0 13px; margin:0 0 14px; min-height:50px; border-bottom:1px solid #e8e0d0; }
  body #app .mobile-customer-strip span { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.45; font-size:13px; }
  body #app .mobile-customer-strip .icon { flex:0 0 20px; }
  body #app .catalog-controls #catalogDisplayControls { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; padding:0 0 14px; margin:0 0 14px; }
  body #app .catalog-controls .catalog-context { grid-column:1; grid-row:1; }
  body #app .catalog-controls .catalog-context b { font-size:12px; line-height:1.4; }
  body #app .catalog-controls .view-switch { grid-column:2; grid-row:1; grid-template-columns:repeat(3,42px); border-radius:15px; padding:3px; justify-self:end; background:#f1f3f5; }
  body #app .catalog-controls .view-switch button { width:42px; height:44px; border-radius:11px; }
  body #app .catalog-controls .view-switch button.is-active { background:linear-gradient(135deg,#f3da91,#d6af49); color:#35270c; box-shadow:0 3px 7px #8260161a; }
  body #app .catalog-controls #priceTable, body #app .catalog-controls #catalogSort { width:100%; min-height:44px; padding:9px; font-size:13px; border-radius:13px; }
  body #app .catalog-controls .catalog-filter-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; padding:0; border:0; }
  body #app .catalog-controls .catalog-filter-picker { width:100%; }
  body #app .catalog-controls .catalog-filter-trigger { width:100%; padding:10px 12px; border-radius:15px; min-height:46px; }
  body #app .catalog-controls .catalog-filter-trigger::before { content:attr(data-mobile-label); font-size:13px; font-weight:650; }
  body #app .catalog-controls .catalog-filter-trigger > span { display:none; }
  body #app .catalog-controls .catalog-filter-trigger .icon { display:block; width:16px; }
  body #app .catalog-controls .catalog-options > button, body #app .catalog-controls [data-action=current-customer-history] { width:100%; min-height:44px; border-radius:14px; padding:9px; font-size:12px; }
  body #app .catalog-controls .history-button-label { display:inline; }
  body #app .catalog-controls .catalog-options-menu { width:min(340px,calc(100vw - 40px)); border-radius:19px; }
  body #app .catalog-filter-menu { inset:auto 12px max(14px,env(safe-area-inset-bottom)) 12px; width:auto; max-height:65dvh; padding:18px; border-radius:26px; }
  body #app .catalog-filter-menu .filter-choices1421 { max-height:40dvh; }
  body #app #productGrid[data-view=compact] { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body #app #productGrid[data-view=compact] .product-body { padding:10px; }
  body #app #productGrid[data-view=compact] .product-name { font-size:11px; line-height:1.45; }
  body #app #productGrid[data-view=compact] .product-price-value { padding:8px 6px; }
  body #app #productGrid[data-view=compact] .product-price-value strong { font-size:13px; }
  body #app #productGrid[data-view=compact] .product-actions { grid-template-columns:minmax(0,1fr) 36px; gap:5px; }
  body #app #productGrid[data-view=compact] .product-actions .qty-control { grid-template-columns:30px minmax(18px,1fr) 30px; }
  body #app #productGrid[data-view=compact] .product-actions .qty-control button { width:30px; min-width:30px; }
  body #app #productGrid[data-view=compact] .product-actions .product-more { width:36px; min-width:36px; height:44px; min-height:44px; }
  body #app #productGrid[data-view=compact] .product-actions .qty-wrap { min-width:0; }
  body #toastRegion { inset:calc(10px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) auto max(12px,env(safe-area-inset-left)); width:auto; max-width:none; height:auto; min-height:0; max-height:300px; gap:8px; }
  body #toastRegion .toast { padding:12px; border-radius:22px; grid-template-columns:32px minmax(0,1fr) 36px; gap:9px; }
  body #toastRegion .toast:nth-last-child(n+3) { display:none; }
  .toast-icon1421 { width:32px; height:32px; }
}
@media (max-width:640px) {
  body #customerFiscalScenariosList { grid-template-columns:minmax(0,1fr); gap:14px; }
  body #customerFiscalScenariosList [data-customer-fiscal-group=NORMAL] .dialog-grid { grid-template-columns:minmax(0,1fr); }
  body #customerFiscalScenariosList .customer-scenario1420 { padding:18px; }
  body #integrationFiscalPanel .panel-head { padding:22px 18px; }
  body #customerFiscalScenariosForm > button { width:100%; }
  .integration-tabs1421 { width:100%; }
  .integration-tabs1421 button { flex:1; padding:10px; }
  body #purchaseHistoryDialog .purchase-order-item { grid-template-columns:24px minmax(0,1fr); padding:14px; gap:10px; }
  body #purchaseHistoryDialog .purchase-order-item > input + span { grid-column:2; grid-row:1; }
  body #purchaseHistoryDialog .customer-history-quantity1420 { grid-column:2; grid-row:2; display:flex; align-items:baseline; gap:7px; }
  body #purchaseHistoryDialog .purchase-order-item > .customer-history-price1420 { grid-column:2; grid-row:3; background:#f1f3f5; }
  body #purchaseHistoryDialog .dialog-actions { display:grid; grid-template-columns:auto minmax(0,1fr); gap:9px; }
  body #purchaseHistoryDialog [data-action=add-selected-history] { font-size:12px; line-height:1.4; }
}
