/* v0.9 — global request safety + inline single-action feedback */
.settings-divider{height:1px;background:var(--line-soft);margin:4px 0 2px}
.request-limit-input span{min-width:62px;font-size:10px}
#requestLimitStatus{margin:0;line-height:1.7}
.row-win-btn.is-loading{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.button-spinner{width:12px;height:12px;border:2px solid currentColor;border-left-color:transparent;border-radius:50%;display:inline-block;animation:button-spin .8s linear infinite}
@keyframes button-spin{to{transform:rotate(360deg)}}
.mismatch-report{margin-top:12px;padding:12px;border:1px solid #efd6b8;background:#fff8ef;border-radius:12px;display:grid;gap:8px}
.mismatch-report>strong{font-size:12px}
.mismatch-report>div{display:grid;gap:3px;padding-top:7px;border-top:1px solid #f1e2d0}
.mismatch-report>div:first-of-type{border-top:0;padding-top:0}
.mismatch-report span{font-size:11px;font-weight:700}
.mismatch-report small{font-size:10px;line-height:1.7;color:#7a6650}
/* v0.10 — API-efficient product browsing */
.product-search-results{margin:0 20px 12px;padding:8px;border:1px solid var(--line-soft);border-radius:14px;background:#fff;display:grid;gap:6px;max-height:320px;overflow:auto}
.search-result-item{width:100%;border:0;background:#f8fafb;border-radius:10px;padding:8px 10px;display:flex;align-items:center;gap:10px;text-align:right;cursor:pointer;font:inherit;color:inherit}
.search-result-item:hover{background:#f0f5f7}.search-result-item img{width:42px;height:42px;object-fit:cover;border-radius:8px}.search-result-item span{font-size:12px;font-weight:700}
.product-pager{display:flex;align-items:center;justify-content:center;gap:12px;padding:14px 10px 4px;flex-wrap:wrap}.product-pager span{min-width:110px;text-align:center;font-size:12px;font-weight:700}.product-page-size{display:inline-flex;align-items:center;gap:7px;font-size:11px;color:#6b7782;white-space:nowrap}.product-page-size select{width:auto;min-width:72px;padding:8px 28px 8px 9px;border-radius:9px;background:#fff;font-weight:700}
@media(max-width:700px){.product-search-results{margin:0 10px 10px}.product-tools{display:grid;grid-template-columns:1fr auto;gap:7px}.product-tools .search{grid-column:1/-1}.product-pager{position:sticky;bottom:0;background:rgba(245,247,249,.96);z-index:5;padding:10px}.product-page-size{width:100%;justify-content:center}.product-page-size select{min-width:84px}}
/* v0.11 — compact names + tap-to-expand on mobile */
.product-name-wrap{min-width:0;max-width:100%}
.product-name-truncate,.preview-product-name{position:relative;display:block;max-width:280px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;text-align:right;cursor:default;white-space:nowrap;overflow:visible}
.product-name-truncate>span:first-child,.preview-product-name>span:first-child{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-product-cell{max-width:300px;min-width:180px}
.product-cell .full-name-popover,.preview-product-cell .full-name-popover{display:none;position:absolute;z-index:40;right:0;bottom:calc(100% + 7px);width:max-content;max-width:min(420px,80vw);padding:8px 10px;border:1px solid var(--line-soft);border-radius:10px;background:#fff;box-shadow:0 8px 28px rgba(29,43,54,.14);white-space:normal;line-height:1.7;font-size:11px;font-weight:600;color:var(--text);text-align:right;margin:0}
@media(hover:hover) and (pointer:fine){
  .product-name-truncate,.preview-product-name{cursor:help}
  .product-name-truncate:hover .full-name-popover,.product-name-truncate:focus-visible .full-name-popover,.preview-product-name:hover .full-name-popover,.preview-product-name:focus-visible .full-name-popover{display:block}
}
@media(hover:none), (pointer:coarse){
  .product-name-truncate.is-open .full-name-popover,.preview-product-name.is-open .full-name-popover{display:block}
}
@media(max-width:700px){
  .product-name-truncate,.preview-product-name{max-width:min(58vw,260px);cursor:pointer}
  .preview-product-cell{max-width:64vw;min-width:0}
  .product-cell .full-name-popover,.preview-product-cell .full-name-popover{position:absolute;right:0;bottom:calc(100% + 6px);max-width:82vw;font-size:12px}
}

/* v0.12.1 — transparent selected queue + all-products view */
.multi-action-progress{margin:10px 20px 0;padding:11px 13px;border:1px solid var(--line-soft);border-radius:13px;background:#f8fbfc;display:grid;gap:8px}
.multi-action-progress.has-error{border-color:#f0c7c3;background:#fff8f7}
.multi-progress-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.multi-progress-head strong{font-size:12px}.multi-progress-head span,.multi-progress-message{font-size:10px;color:#6f7d87;line-height:1.7}
.multi-progress-track{height:7px;border-radius:99px;background:#e5ecef;overflow:hidden}.multi-progress-track span{display:block;width:0;height:100%;background:#1e3445;border-radius:inherit;transition:width .2s ease}
.row-win-btn.is-error{border-color:#e8b8b2;color:#a53b33;background:#fff8f7}.row-win-btn.is-stopped{border-color:#d7dde1;color:#77838c;background:#f5f7f8}
@media(max-width:700px){.multi-action-progress{margin:8px 10px 0}.multi-progress-head{align-items:flex-start;flex-direction:column;gap:3px}}

/* v0.14 — mobile-first tab navigation, contained scrolling, product policies */
.app-tabs{display:flex;align-items:center;gap:6px;margin:0 0 14px;padding:5px;background:#edf2f5;border:1px solid var(--line);border-radius:14px;position:sticky;top:8px;z-index:30;box-shadow:0 4px 18px rgba(23,33,43,.05)}
.app-tab-btn{flex:1;min-height:42px;display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 12px;border-radius:10px;background:transparent;color:#687681;font-size:12px}
.app-tab-btn.is-active{background:#fff;color:#17212b;box-shadow:0 2px 10px rgba(23,33,43,.08)}
.tab-icon{font-size:16px;line-height:1}
.app-tab-panel{display:none}.app-tab-panel.is-active{display:block}
.status.exception{background:#eee9fb;color:#5c448c}
.row-policy-btn{padding:7px 10px;border:1px solid #e0d9ef;background:#faf8ff;color:#624d8b;border-radius:9px;font-size:11px;white-space:nowrap}
.row-policy-btn:hover:not(:disabled){background:#f2eefb}
.product-policies-card{margin-bottom:0}
.policy-list{display:grid;gap:8px}
.policy-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--line-soft);border-radius:12px;background:#fafcfd}
.policy-item>div:first-child{min-width:0;display:grid;gap:4px}.policy-item strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.policy-item small{font-size:10px;color:#7b8791;line-height:1.7}
.policy-item-actions{display:flex;gap:6px;flex:0 0 auto}.policy-item-actions button{padding:7px 9px;font-size:10px}
.policy-switch-row{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--line-soft);border-radius:12px;background:#f8fafb;cursor:pointer}
.policy-switch-row input{width:19px;height:19px;flex:0 0 auto;margin-top:2px}.policy-switch-row span{display:grid;gap:4px}.policy-switch-row strong{font-size:12px}.policy-switch-row small{font-size:10px;line-height:1.75;color:#77848e}
#allActionProgress{margin:0 0 10px}

@media(max-width:700px){
  html,body{min-height:100%;overscroll-behavior-y:none}
  body{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  .shell{padding:8px 7px calc(82px + env(safe-area-inset-bottom))}
  .topbar{min-height:54px;margin-bottom:8px;padding-inline:3px}.topbar>div:first-child p{display:none}.topbar h1{font-size:18px;margin-bottom:0}
  .app-tabs{position:fixed;left:7px;right:7px;bottom:max(7px,env(safe-area-inset-bottom));top:auto;z-index:80;margin:0;padding:6px;border-radius:17px;background:rgba(244,247,249,.96);backdrop-filter:blur(14px);box-shadow:0 10px 36px rgba(20,31,40,.2)}
  .app-tab-btn{min-width:0;min-height:52px;display:grid;grid-template-rows:20px auto;gap:1px;padding:5px 3px;font-size:10px}.app-tab-btn .tab-icon{font-size:17px}.app-tab-btn.is-active{background:#fff}
  .app-tab-panel{min-width:0}

  .app-tab-panel[data-tab-panel="products"].is-active{height:calc(100dvh - 78px - env(safe-area-inset-bottom));overflow:hidden}
  .app-tab-panel[data-tab-panel="products"] .products-card{height:100%;margin:0;display:flex;flex-direction:column;overflow:hidden;padding:10px}
  .products-card .products-head,.products-card .summary-strip,.products-card .selection-bar,.products-card .multi-action-progress,.products-card .product-search-results,.products-card .product-pager{flex:0 0 auto}
  .products-card .products-head{margin-bottom:8px}.products-card .summary-strip{max-height:76px;overflow:auto;margin-bottom:7px}
  .products-card .products-wrap{flex:1 1 0;min-height:150px;max-height:none!important;overflow:auto!important;border:1px solid var(--line-soft)!important;border-radius:12px!important;background:#f7f9fa!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1px}
  .products-card .product-pager{position:static!important;padding:8px 2px 0!important;background:#fff!important;border-top:1px solid var(--line-soft);margin-top:7px;gap:6px}
  .products-card .product-pager button{min-height:42px;padding:8px 10px}.products-card .product-page-size{width:auto;flex:1;justify-content:flex-end}.products-card .product-page-size select{min-height:42px}
  .products-card .selection-bar{position:static!important;margin-bottom:7px;box-shadow:none}
  .products-card .multi-action-progress{margin:0 0 7px}
  .product-search-results{max-height:160px;margin:0 0 7px}
  .products-table tbody{padding:5px}.products-table tr{margin:0}.products-table td{padding:8px 10px}.products-table td:last-child .row-actions{grid-template-columns:repeat(3,1fr)}
  .products-table td:last-child .row-actions button{min-height:42px}

  .app-tab-panel[data-tab-panel="automation"].is-active{height:calc(100dvh - 78px - env(safe-area-inset-bottom));overflow:hidden;display:flex;flex-direction:column;gap:8px}
  .app-tab-panel[data-tab-panel="automation"] .action-card{min-height:0;flex:1 1 auto;margin:0;display:flex;flex-direction:column;overflow:hidden;padding:10px}
  .action-card>.card-head{flex:0 0 auto;margin-bottom:8px}.action-card #dryEmpty{flex:0 0 auto}
  .action-card #dryReport:not(.hidden){display:flex!important;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden}
  .action-card #drySummary{flex:0 0 auto;max-height:116px;overflow:auto;margin-bottom:8px}
  .action-card .report-head{flex:0 0 auto;margin-bottom:7px;gap:6px}.action-card .report-head>div{min-width:0}.action-card .report-head select{max-width:155px}
  .action-card #allActionProgress{flex:0 0 auto;margin:0 0 7px}
  .action-card .report-table{flex:1 1 0;min-height:140px;max-height:none!important;overflow:auto!important;border:1px solid var(--line-soft)!important;border-radius:12px!important;background:#f7f9fa!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1px}
  .action-card .execute-row{flex:0 0 auto;padding-top:8px;margin-top:0;background:#fff}.action-card .execute-row .notice{max-height:58px;overflow:auto;font-size:10px}.action-card .execute-row button{min-height:46px}
  .app-tab-panel[data-tab-panel="automation"] #progressCard{flex:0 0 auto;margin:0;max-height:180px;overflow:auto}

  .app-tab-panel[data-tab-panel="settings"],.app-tab-panel[data-tab-panel="history"]{padding-bottom:6px}
  .policy-item{align-items:stretch;flex-direction:column}.policy-item-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.policy-item-actions button{min-height:42px}
  .product-policies-card{margin-bottom:8px}
  .row-actions{min-width:0!important}
  #toast{bottom:calc(76px + env(safe-area-inset-bottom))}
}

@media(min-width:701px){
  .app-tabs{max-width:650px;margin-inline:auto}
  .app-tab-panel[data-tab-panel="products"] .products-card{min-height:620px}
}
@media(max-width:700px){
  .products-table td:last-child .row-actions{grid-template-columns:repeat(auto-fit,minmax(88px,1fr))}
}

/* v0.14.1 — final iPhone polish */
@media(max-width:700px){
  html,body{height:100%;min-height:100%;overflow:hidden}
  body{padding-bottom:0}
  .shell{height:100vh;height:100dvh;padding:7px 7px calc(7px + env(safe-area-inset-bottom));overflow:hidden}
  #appView:not(.hidden){display:flex;flex-direction:column;height:100%;min-height:0}
  #appView>.topbar{flex:0 0 auto;min-height:48px;margin-bottom:5px;padding:0 4px}
  #appView>.topbar h1{font-size:17px;line-height:1.25}
  #appView>.topbar .top-actions{gap:4px}
  #appView>.topbar .badge{padding:6px 8px;font-size:9.5px}
  #appView>.topbar .ghost{padding:7px 8px;font-size:10.5px}

  .app-tabs{left:7px;right:7px;bottom:max(6px,env(safe-area-inset-bottom));padding:5px;border-radius:18px;background:rgba(247,249,251,.96);box-shadow:0 8px 30px rgba(20,31,40,.17)}
  .app-tab-btn{min-height:50px;border-radius:13px;font-size:9.5px;color:#6f7d88}
  .app-tab-btn .tab-icon{font-size:17px}
  .app-tab-btn.is-active{color:#17212b;box-shadow:0 2px 9px rgba(23,33,43,.07)}

  .app-tab-panel.is-active{flex:1 1 0;min-height:0;margin:0;padding-bottom:calc(66px + env(safe-area-inset-bottom))}
  .app-tab-panel[data-tab-panel="settings"].is-active,
  .app-tab-panel[data-tab-panel="history"].is-active{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}

  .app-tab-panel[data-tab-panel="products"].is-active{display:flex;height:auto;overflow:hidden}
  .app-tab-panel[data-tab-panel="products"] .products-card{flex:1 1 0;height:auto;min-height:0;padding:8px;margin:0;border-radius:15px}
  .products-card .products-head{margin:0 0 6px;gap:6px}
  .products-card .products-head>div:first-child{width:100%;min-width:0}
  .products-card .products-head h2{font-size:15px;margin-bottom:1px}
  .products-card #productsSubtitle{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9.5px;line-height:1.5}
  .products-card .product-tools{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px;width:100%}
  .products-card .product-tools .search{grid-column:1/-1;width:100%;height:38px;padding:8px 11px;border-radius:10px;font-size:11px}
  .products-card .product-tools button{width:100%;min-height:38px;padding:7px 8px;border-radius:10px;font-size:10.5px}
  .product-search-results{max-height:132px;border-radius:10px;padding:5px;margin:0 0 6px}
  .search-result-item{padding:6px 8px;border-radius:8px}.search-result-item img{width:36px;height:36px}.search-result-item span{font-size:10.5px}

  .products-card .summary-strip{display:flex!important;flex-wrap:nowrap!important;gap:5px;max-height:none!important;overflow-x:auto!important;overflow-y:hidden!important;margin:0 0 6px;padding:0 0 2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .products-card .summary-strip::-webkit-scrollbar{display:none}
  .products-card .summary-strip span{flex:0 0 auto!important;min-width:86px;padding:6px 8px;border-radius:9px;font-size:9.5px;white-space:nowrap}
  .products-card .summary-strip b{font-size:10.5px}

  .products-card .selection-bar{margin:0 0 6px;padding:7px 8px;border-radius:10px;gap:6px}
  .products-card .selection-bar>div:first-child{font-size:10.5px}
  .products-card .selection-actions{grid-template-columns:1fr 1fr;gap:5px}
  .products-card .selection-actions button{min-height:37px;padding:7px 8px;font-size:10px}
  .products-card .multi-action-progress{margin:0 0 6px;padding:8px 9px;border-radius:10px;gap:6px}

  .products-card .products-wrap{flex:1 1 0;min-height:110px;border-radius:11px!important;padding:4px!important}
  .products-table tbody{gap:7px;padding:0}
  .products-table tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr);border-radius:12px;box-shadow:0 2px 9px rgba(23,33,43,.035)}
  .products-table td{min-width:0;padding:7px 9px;gap:5px}
  .products-table td:nth-child(2){grid-column:1/-1;padding:9px 10px}
  .products-table td:nth-child(n+3):nth-child(-n+6){display:grid;align-content:center;justify-items:start;gap:2px;padding:6px 9px;background:#fbfcfd;text-align:right;white-space:nowrap}
  .products-table td:nth-child(n+3):nth-child(-n+6)::before{font-size:8.5px;line-height:1.25}
  .products-table td:nth-child(n+3):nth-child(-n+6){font-size:10.5px}
  .products-table td:nth-child(7){grid-column:1/-1;padding:6px 9px}
  .products-table td:nth-child(8){grid-column:1/-1;padding:7px 9px}
  .products-table .select-col{right:7px;top:7px;margin:0;padding:5px!important}
  .products-table .select-col input{width:18px;height:18px}
  .product-cell{min-width:0;padding-right:27px;gap:8px;align-items:center}
  .product-cell img{width:43px;height:43px;flex-basis:43px;border-radius:9px}
  .product-name-truncate{max-width:none;font-size:10.5px;line-height:1.6}
  .product-name-wrap>span{font-size:9px;margin-top:2px}
  .products-table td:last-child .row-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:5px;width:100%}
  .products-table td:last-child .row-actions button{min-height:37px;padding:7px 6px;border-radius:9px;font-size:9.5px}
  .products-table td:last-child .row-actions .muted{grid-column:1/-1;text-align:center;font-size:9.5px;padding:4px}
  .products-table .status{padding:5px 8px;font-size:9px}

  .products-card .product-pager{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:5px;margin:5px 0 0;padding:6px 0 0!important;border-top:1px solid var(--line-soft);background:#fff!important}
  .products-card .product-pager>button{width:100%;min-width:0;min-height:37px;padding:7px 6px;border-radius:9px;font-size:10px}
  .products-card .product-pager>span{min-width:92px;font-size:10px;white-space:nowrap}
  .products-card .product-page-size{grid-column:1/-1;width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 7px;border-radius:9px;background:#f7f9fa;font-size:9.5px}
  .products-card .product-page-size select{width:96px;min-width:96px;min-height:34px;height:34px;padding:5px 24px 5px 7px;border-radius:8px;font-size:10px;background:#fff}

  .app-tab-panel[data-tab-panel="automation"].is-active{display:flex;height:auto;overflow:hidden;padding-bottom:calc(66px + env(safe-area-inset-bottom));gap:6px}
  .app-tab-panel[data-tab-panel="automation"] .action-card{flex:1 1 0;min-height:0;padding:8px;border-radius:15px}
  .action-card>.card-head{margin-bottom:6px;gap:6px}
  .action-card>.card-head h2{font-size:14px}
  .action-card>.card-head p{font-size:9.5px;line-height:1.5}
  .action-card>.card-head button{min-height:39px;padding:8px;font-size:10.5px}
  .action-card #drySummary{display:flex;grid-template-columns:none;gap:5px;max-height:none;overflow-x:auto;overflow-y:hidden;margin:0 0 6px;padding-bottom:2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .action-card #drySummary::-webkit-scrollbar{display:none}
  .action-card #drySummary>div{flex:0 0 104px;padding:7px 8px;border-radius:9px}
  .action-card #drySummary span{font-size:8.5px;margin-bottom:3px}.action-card #drySummary strong{font-size:13px}
  .action-card .report-head{display:grid;grid-template-columns:minmax(0,1fr) 132px;align-items:center;gap:6px;margin:0 0 6px}
  .action-card .report-head>div{min-width:0}.action-card .report-head strong{font-size:10.5px}.action-card .report-head .small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8.5px}
  .action-card .report-head select{width:132px;max-width:none;min-height:36px;padding:6px 25px 6px 7px;font-size:9.5px;border-radius:9px}
  .action-card .report-table{min-height:105px;border-radius:11px!important;padding:4px!important}
  .preview-table tbody{gap:7px}.preview-table tr{border-radius:11px}.preview-table td{padding:6px 9px;font-size:10px}
  .action-card .execute-row{gap:6px;padding-top:6px}.action-card .execute-row .notice{max-height:42px;padding:7px 9px;font-size:8.5px;line-height:1.55;border-radius:9px}.action-card .execute-row button{min-height:40px;font-size:10.5px;border-radius:10px}
  .app-tab-panel[data-tab-panel="automation"] #progressCard{max-height:142px;padding:9px;border-radius:12px}

  .product-policies-card,.setup-grid .card,.policy-bar,.history-card{border-radius:14px}
  #toast{left:8px;right:8px;bottom:calc(68px + env(safe-area-inset-bottom))}
}

@media(max-width:390px){
  #appView>.topbar h1{font-size:15.5px}
  #appView>.topbar .badge{max-width:118px;overflow:hidden;text-overflow:ellipsis}
  .products-card .summary-strip span{min-width:80px}
  .products-card .product-pager>span{min-width:78px;font-size:9.5px}
  .products-card .product-pager>button{font-size:9.5px}
  .products-card .product-page-size select{width:90px;min-width:90px}
}

/* v0.14.3 — inventory polish */
@media(max-width:700px){
  .stock-line{gap:5px;margin-top:5px}
  .product-cell .stock-label{font-size:9px}
  .product-cell .guard-override-badge{padding:5px 8px;font-size:9px}
  .product-cell .stock-empty{padding:5px 8px;font-size:9px}
  .stock-control{width:100%;display:grid;grid-template-columns:34px 58px 34px minmax(58px,1fr);gap:4px}
  .stock-control button,.stock-control input{width:100%;height:34px;min-height:34px}
  .stock-input{font-size:11px;padding:4px}
  .stock-save{font-size:9.5px}
}

/* v0.14.4 — compact filter rail + low-stock badge */
@media(max-width:700px){
  .products-card .summary-strip .summary-static,.products-card .summary-strip .summary-filter{flex:0 0 auto!important;min-width:86px;padding:6px 8px;border-radius:9px;font-size:9.5px;white-space:nowrap}
  .products-card .summary-strip .summary-filter.is-active{background:#d9f1e2;border-color:#55a978;color:#145a34;font-weight:800;box-shadow:0 0 0 2px rgba(85,169,120,.18),0 3px 8px rgba(20,90,52,.10)}
  .products-card .summary-strip .summary-filter.is-active b{color:#0f4d2b;font-weight:900}
  .product-cell .stock-low{padding:5px 8px;font-size:9px}
}
@media(max-width:380px){
  .products-card .summary-strip .summary-static,.products-card .summary-strip .summary-filter{min-width:80px}
}

/* v0.14.9 — compact single-row mobile product controls */
@media(max-width:700px){
  .products-card .product-tools{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center;
    gap:5px;
    width:100%;
  }
  .products-card .product-tools .search{
    flex:1 1 auto;
    width:auto;
    min-width:0;
    height:40px;
    padding:8px 10px;
    border-radius:10px;
    font-size:11px;
  }
  .products-card .product-tools button{
    flex:0 0 40px;
    width:40px!important;
    min-width:40px;
    height:40px;
    min-height:40px;
    padding:0!important;
    border-radius:10px;
    font-size:0!important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .products-card #productSearchBtn::before{content:"⌕";font-size:23px;font-weight:800;line-height:1;color:currentColor}
  .products-card #loadProductsBtn::before{content:"↻";font-size:21px;font-weight:800;line-height:1;color:currentColor}
  .products-card #productPrintBtn::before{content:"⎙";font-size:19px;font-weight:800;line-height:1;color:currentColor}
  .products-card #productSearchClearBtn::before{content:"×";font-size:22px;font-weight:700;line-height:1;color:currentColor}

  .products-card .product-pager{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center;
    justify-content:flex-start;
    gap:3px;
    margin:5px 0 0;
    padding:6px 0 0!important;
    border-top:1px solid var(--line-soft);
    background:#fff!important;
  }
  .products-card .product-pager>button{
    flex:0 0 auto;
    width:auto;
    min-width:56px;
    height:38px;
    min-height:38px;
    padding:0 8px!important;
    border-radius:9px;
    font-size:10px!important;
    font-weight:800;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:4px;
    white-space:nowrap;
  }
  .products-card #productPrevBtn::before,.products-card #productNextBtn::before{content:none}
  .products-card .product-pager>span{
    flex:0 0 auto;
    min-width:72px!important;
    text-align:center;
    font-size:10px;
    white-space:nowrap;
  }
  .products-card .product-page-size{
    flex:0 0 auto;
    width:auto!important;
    margin-inline-start:auto;
    min-width:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:4px;
    padding:0!important;
    background:transparent!important;
    font-size:0!important;
  }
  .products-card .product-page-size::before{content:"☷";font-size:16px;line-height:1;color:#687681}
  .products-card .product-page-size select{
    width:66px!important;
    min-width:66px!important;
    height:38px;
    min-height:38px;
    padding:5px 20px 5px 5px;
    border-radius:9px;
    font-size:10px;
    background:#fff;
  }
}
@media(max-width:390px){
  .products-card .product-tools{gap:4px}
  .products-card .product-tools button{flex-basis:38px;width:38px!important;min-width:38px;height:38px;min-height:38px}
  .products-card .product-tools .search{height:38px}
  .products-card .product-pager{gap:2px}
  .products-card .product-pager>button{min-width:52px;height:36px;min-height:36px;padding:0 6px!important;font-size:9.5px!important}
  .products-card .product-page-size select{width:62px!important;min-width:62px!important;height:36px;min-height:36px}
  .products-card .product-pager>span{font-size:9.5px}
}


/* v0.14.10: clear product-page loading feedback */
.products-card .products-wrap{position:relative}
.product-list-loading{
  position:absolute;
  inset:0;
  z-index:12;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:150px;
  padding:24px;
  text-align:center;
  background:rgba(248,250,251,.93);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.product-list-loading.hidden{display:none!important}
.product-loading-spinner{
  width:34px;
  height:34px;
  border:3px solid #dfe6ea;
  border-top-color:#2f7d4c;
  border-radius:50%;
  animation:product-loading-spin .75s linear infinite;
}
.products-card .products-wrap.is-loading .products-table{opacity:.22;pointer-events:none;user-select:none}
.products-card .products-wrap.is-loading{overflow:hidden!important}
@keyframes product-loading-spin{to{transform:rotate(360deg)}}
@media(max-width:700px){
  .product-list-loading{min-height:180px;border-radius:10px;background:rgba(248,250,251,.96)}
  .product-list-loading strong{font-size:13px}
  .product-list-loading .small{font-size:10px}
  .product-loading-spinner{width:30px;height:30px}
}

/* v0.14.12 — configurable undercut + restore-to-base actions */
.settings-policy-toggle{margin-top:2px}
.settings-policy-toggle input:checked+span strong{color:#276340}
.row-base-btn{padding:7px 10px;border:1px solid #e3d5b5;background:#fff9ed;color:#765c22;border-radius:9px;font-size:11px;white-space:nowrap}
.row-base-btn:hover:not(:disabled){background:#fff2d8}
.row-base-btn.is-loading{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.row-base-btn.is-error{border-color:#e8b8b2;color:#a53b33;background:#fff8f7}
.row-base-btn.is-stopped{border-color:#d7dde1;color:#77838c;background:#f5f7f8}
.restore-all-box{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:10px 12px;border:1px solid #eadfc2;border-radius:12px;background:#fffaf0}
.restore-all-box>div{display:grid;gap:3px;min-width:0}.restore-all-box strong{font-size:12px;color:#5d4a20}.restore-all-box small{font-size:9.5px;line-height:1.65;color:#7d725c}
.restore-all-box button{flex:0 0 auto;white-space:nowrap}
@media(max-width:700px){
  .settings-policy-toggle{padding:10px}
  .products-card .selection-actions{grid-template-columns:repeat(3,1fr)}
  .restore-all-box{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:8px 9px;margin-bottom:7px}
  .restore-all-box strong{font-size:10.5px}.restore-all-box small{font-size:8.5px;line-height:1.5}
  .restore-all-box button{min-height:38px;padding:7px 9px;font-size:9.5px}
}

/* v0.14.13: clearer two-step automation UX */
.automation-heading{margin-bottom:10px!important}
.automation-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:10px}
.automation-mode-card{display:grid;gap:10px;padding:12px;border:1px solid var(--line-soft);border-radius:14px;background:#f8fafb}
.automation-win-card{border-color:#d8e4ea;background:#f7fbfd}
.automation-restore-card{border-color:#eadfc2;background:#fffaf0;margin:0}
.automation-mode-copy{display:grid;gap:4px}.automation-mode-copy strong{font-size:14px}.automation-mode-copy small{font-size:10px;line-height:1.7;color:var(--muted)}
.automation-kicker{width:max-content;padding:3px 7px;border-radius:999px;background:#e9eef2;color:#52606b;font-size:9px;font-weight:800}
.automation-restore-card .automation-kicker{background:#f8edcf;color:#745817}
.automation-mode-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.automation-mode-actions button{min-height:42px}
.warning-action{border:1px solid #dfc47d;background:#f9e9b8;color:#654b0b;font-weight:800;border-radius:10px;padding:8px 12px;cursor:pointer}
.warning-action:disabled{opacity:.45;cursor:not-allowed}
.action-card .execute-row{display:block}.action-card .execute-row .notice{width:100%}
@media(max-width:720px){
  .automation-mode-grid{grid-template-columns:1fr;gap:6px;margin-bottom:6px}
  .automation-mode-card{padding:8px 9px;gap:7px;border-radius:11px}
  .automation-mode-copy{grid-template-columns:auto 1fr;align-items:center;column-gap:7px}.automation-mode-copy small{grid-column:1/-1;font-size:8.5px;line-height:1.5}.automation-mode-copy strong{font-size:10.5px}
  .automation-kicker{font-size:8px;padding:2px 6px}
  .automation-mode-actions{gap:5px}.automation-mode-actions button{min-height:37px;padding:6px 7px;font-size:9.5px;border-radius:9px}
}
.automation-mode-card.is-previewed{box-shadow:0 0 0 2px rgba(58,117,92,.16);border-color:#8ab9a3}
.automation-restore-card.is-previewed{box-shadow:0 0 0 2px rgba(181,139,42,.15);border-color:#d3b25c}

.restore-percent-field{display:grid;grid-template-columns:auto minmax(80px,120px);gap:6px 10px;align-items:center;margin-top:10px}.restore-percent-field>span{font-weight:700}.restore-percent-field input{width:100%;direction:ltr;text-align:center}.restore-percent-field small{grid-column:1/-1;line-height:1.65}
@media(max-width:700px){.restore-percent-field{grid-template-columns:1fr 90px}}
