/* Xeus POS v3.7.3.219 · Flujo profesional de compras, móvil primero. */
.purchase-stepper{position:sticky;top:74px;z-index:20;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;margin:0 0 1rem;padding:.55rem;border:1px solid #e4e7ec;border-radius:16px;background:rgba(255,255,255,.94);box-shadow:0 8px 24px rgba(15,23,42,.07);backdrop-filter:blur(12px)}
.purchase-stepper-item{display:grid;grid-template-columns:34px minmax(0,1fr);grid-template-rows:auto auto;column-gap:.65rem;align-items:center;min-width:0;padding:.55rem .7rem;border:1px solid transparent;border-radius:12px;color:#667085;text-decoration:none;transition:.18s ease}
.purchase-stepper-item>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#eef0f4;color:#667085;font-weight:800}
.purchase-stepper-item strong{color:#344054;font-size:.86rem;line-height:1.1}.purchase-stepper-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.7rem}
.purchase-stepper-item:hover,.purchase-stepper-item.is-active{border-color:rgba(88,86,214,.25);background:rgba(88,86,214,.06)}
.purchase-stepper-item.is-ready>span,.purchase-stepper-item.is-active>span{background:linear-gradient(135deg,#5856d6,#7447e8);color:#fff;box-shadow:0 5px 12px rgba(88,86,214,.22)}
.purchase-flow-section{scroll-margin-top:150px}.purchase-result-action{width:142px}
.purchase-mobile-dock{display:none}
.purchase-quick-modal .modal-content>form{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden}
.purchase-quick-modal .modal-header,.purchase-quick-modal .modal-footer{flex-shrink:0}
.purchase-quick-modal .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto}
@media(min-width:768px){.purchase-quick-modal .modal-dialog-scrollable{height:calc(100dvh - 1.25rem);min-height:calc(100dvh - 1.25rem);margin:.625rem auto}.purchase-quick-modal .modal-content{max-height:100%}}

@media(max-width:991.98px){
  .purchase-page-head .btn{flex:1 1 170px}
  .purchase-stepper{top:68px}
  .purchase-flow-section{scroll-margin-top:145px}
  .purchase-quick-modal .modal-dialog{width:min(720px,calc(100vw - 1.25rem));max-width:none;margin:.625rem auto}
  .purchase-quick-modal .modal-content{max-height:calc(100dvh - 1.25rem)}
  .purchase-quick-modal .modal-body{min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
}

@media(min-width:768px) and (max-width:991.98px){
  #purchase-cart-container>.table-responsive{overflow:visible!important}
  .purchase-table,.purchase-table tbody{display:block!important;width:100%!important;min-width:0!important}.purchase-table thead,.purchase-table tfoot{display:none!important}
  .purchase-table tbody tr{position:relative;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;margin:.85rem;padding:1rem;border:1px solid #dfe3eb;border-radius:14px;background:#fff;box-shadow:0 5px 14px rgba(15,23,42,.05)}
  .purchase-table tbody td{display:block!important;width:auto!important;min-width:0!important;padding:0!important;border:0!important;text-align:left!important}
  .purchase-table tbody td[data-label]::before{display:block;margin-bottom:.25rem;color:#667085;font-size:.64rem;font-weight:800;text-transform:uppercase;content:attr(data-label)}
  .purchase-table .purchase-cell-product{grid-column:1/-1;padding-right:42px!important;padding-bottom:.7rem!important;border-bottom:1px solid #edf0f4!important}.purchase-table .purchase-cell-product select{max-width:360px}
  .purchase-table .purchase-cell-stock,.purchase-table .purchase-cell-quantity,.purchase-table .purchase-cell-cost,.purchase-table .purchase-cell-sale{grid-column:auto}.purchase-stock-values{display:flex;flex-direction:column;gap:.1rem}
  .purchase-table .purchase-cell-margin{grid-column:1/3}.purchase-table .purchase-cell-subtotal{grid-column:3/5}.purchase-table .purchase-cell-remove{position:absolute;top:.85rem;right:.85rem}.purchase-table .purchase-cell-remove .btn{width:38px;height:38px;padding:0}
  .purchase-table .purchase-cart-input,.purchase-table .purchase-cart-money{width:100%!important;min-width:0!important}.purchase-table input,.purchase-table select{min-height:42px}
}

@media(max-width:767.98px){
  body:has(#purchase-flow){padding-bottom:82px}
  .purchase-page-head{margin-bottom:.75rem!important}.purchase-page-head h1{font-size:1.42rem}.purchase-page-head p{font-size:.8rem;line-height:1.4}
  .purchase-page-head>div:last-child{display:grid!important;grid-template-columns:1fr 1fr;width:100%}.purchase-page-head>div:last-child .btn{min-height:42px;padding:.5rem .35rem;font-size:.72rem}.purchase-page-head>div:last-child .btn:last-child:nth-child(odd){grid-column:1/-1}
  .purchase-stepper{top:62px;gap:.25rem;margin-bottom:.7rem;padding:.35rem;border-radius:13px}
  .purchase-stepper-item{display:flex;flex-direction:column;justify-content:center;gap:.2rem;min-height:58px;padding:.35rem .15rem;text-align:center}
  .purchase-stepper-item>span{width:25px;height:25px;font-size:.7rem}.purchase-stepper-item strong{font-size:.7rem}.purchase-stepper-item small{display:none}
  .purchase-flow-section{scroll-margin-top:132px;border-radius:14px!important}
  .purchase-flow-head{display:grid!important;grid-template-columns:minmax(0,1fr);gap:.65rem!important}.purchase-flow-title{gap:.55rem!important}.purchase-flow-head h5{font-size:1rem}.purchase-flow-head .flow-help{line-height:1.35}.purchase-flow-head>.btn{width:100%;min-height:42px}
  .purchase-cart-live{display:grid!important;grid-template-columns:auto auto minmax(0,1fr)!important;align-items:center!important}.purchase-cart-live .btn{justify-self:end;margin-left:auto}
  #purchase-search-form .input-group{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important}.purchase-search-form .input-group-text{width:44px}.purchase-flow #purchase-search-form .btn{grid-column:1/-1;min-height:43px;margin-top:.45rem;border-radius:.6rem!important}.purchase-flow #purchase-search-form .form-control{min-width:0;border-radius:0 .6rem .6rem 0!important}
  .purchase-inline-create{display:grid!important;grid-template-columns:1fr!important}.purchase-inline-create .btn{width:100%;min-height:42px}
  .purchase-result{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:.7rem!important;padding:.75rem!important}.purchase-result-action{display:grid;grid-template-columns:minmax(0,1fr) minmax(118px,.8fr);gap:.5rem;width:100%}.purchase-result-action label{grid-column:1/-1}.purchase-result-action input,.purchase-result-action button{height:42px;margin:0!important}

  #purchase-cart-container>.table-responsive{overflow:visible!important}
  .purchase-table,.purchase-table tbody{display:block!important;width:100%!important;min-width:0!important}.purchase-table thead,.purchase-table tfoot{display:none!important}
  .purchase-table tbody tr{position:relative;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin:.7rem;padding:.85rem;border:1px solid #dfe3eb;border-radius:14px;background:#fff;box-shadow:0 5px 14px rgba(15,23,42,.05)}
  .purchase-table tbody td{display:block!important;width:auto!important;min-width:0!important;padding:0!important;border:0!important;text-align:left!important}
  .purchase-table tbody td[data-label]::before{display:block;margin-bottom:.25rem;color:#667085;font-size:.64rem;font-weight:800;letter-spacing:.02em;text-transform:uppercase;content:attr(data-label)}
  .purchase-table .purchase-cell-product{grid-column:1/-1;padding-right:38px!important;border-bottom:1px solid #edf0f4!important;padding-bottom:.65rem!important}.purchase-table .purchase-cell-stock{grid-column:1/-1;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:.7rem;padding:.55rem .65rem!important;border-radius:10px!important;background:#f3fbf6!important}.purchase-table .purchase-cell-stock::before{margin:0!important}.purchase-stock-values{display:flex!important;align-items:center;gap:.55rem;margin-left:auto}.purchase-stock-values .text-success{font-size:.74rem!important}
  .purchase-table .purchase-cell-quantity,.purchase-table .purchase-cell-cost,.purchase-table .purchase-cell-sale,.purchase-table .purchase-cell-margin{grid-column:auto}.purchase-table .purchase-cell-subtotal{grid-column:1/-1;display:flex!important;justify-content:space-between!important;padding-top:.65rem!important;border-top:1px solid #edf0f4!important;font-size:1rem}.purchase-table .purchase-cell-subtotal::before{margin:0!important}
  .purchase-table .purchase-cell-remove{position:absolute;top:.75rem;right:.75rem}.purchase-table .purchase-cell-remove .btn{width:36px;height:36px;padding:0;border-radius:10px}.purchase-table .purchase-cart-input,.purchase-table .purchase-cart-money{width:100%!important;min-width:0!important}.purchase-table select,.purchase-table input{min-height:42px!important}
  #purchase-cart-container>.d-flex{margin:.7rem;border:1px solid #e1e5ec!important;border-radius:12px;background:#f8fafc!important}
  #purchase-details-section .purchase-flow-body{padding:.7rem!important}#purchase-details-section .card{border-radius:13px}#purchase-details-section .card-body{padding:.8rem}#purchase-details-section .row.g-4{--cui-gutter-y:.75rem}#purchase-details-section .form-control,#purchase-details-section .form-select{min-height:44px}
  .purchase-confirm-note{display:grid!important;grid-template-columns:1fr!important}.purchase-confirm-note .btn{width:100%;min-height:42px}
  .purchase-mobile-dock{position:fixed;z-index:1028;right:12px;bottom:max(10px,env(safe-area-inset-bottom));left:12px;display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:.5rem;padding:.48rem;border:1px solid rgba(255,255,255,.35);border-radius:16px;background:linear-gradient(135deg,#514fce,#7447e8);box-shadow:0 14px 32px rgba(54,47,145,.34)}
  .purchase-mobile-dock-main{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-width:0;padding:.2rem .35rem;border:0;background:transparent;color:#fff;text-align:left}.purchase-mobile-dock-main:disabled{opacity:.68}.purchase-mobile-dock-main span:first-child{display:flex;flex-direction:column;min-width:0}.purchase-mobile-dock-main strong{font-size:.79rem}.purchase-mobile-dock-main small{font-size:.62rem;opacity:.8}.purchase-mobile-total{font-size:.92rem;font-weight:800;white-space:nowrap}.purchase-mobile-dock>.btn{width:48px;min-height:48px;border:0;border-radius:12px;background:#fff;color:#198754}.purchase-mobile-dock>.btn:disabled{background:rgba(255,255,255,.62);color:#667085}
  .purchase-quick-modal .modal-dialog{width:100%!important;height:100dvh!important;min-height:100dvh!important;margin:0!important}.purchase-quick-modal .modal-content{height:100dvh!important;max-height:100dvh!important;border-radius:0!important;display:flex!important}.purchase-quick-modal form{display:flex;flex:1 1 auto;min-height:0;flex-direction:column}.purchase-quick-modal .modal-header{flex:0 0 auto;padding:max(.75rem,env(safe-area-inset-top)) .8rem .7rem}.purchase-quick-modal .modal-title{font-size:1rem}.purchase-quick-modal .modal-body{flex:1 1 auto;min-height:0;padding:.8rem;overflow-y:auto}.purchase-quick-modal .modal-footer{display:grid;grid-template-columns:1fr 1fr;flex:0 0 auto;gap:.5rem;padding:.7rem .8rem max(.7rem,env(safe-area-inset-bottom));box-shadow:0 -.4rem 1rem rgba(15,23,42,.08)}.purchase-quick-modal .modal-footer .btn{min-height:44px;margin:0}
}

@media(max-width:379.98px){.purchase-table tbody tr{grid-template-columns:1fr}.purchase-table .purchase-cell-quantity,.purchase-table .purchase-cell-cost,.purchase-table .purchase-cell-sale,.purchase-table .purchase-cell-margin{grid-column:1}.purchase-quick-modal .modal-footer{grid-template-columns:1fr}}
