/* AKSMART Step108 sale mobile/list focus fixes - external CSS only */
html body.page-sale .ak-sale-page .ak-sale-rows tbody tr[data-real="1"],
html body.page-sale .ak-sale-page .ak-inv-table tbody tr[data-real="1"]{
  outline:none !important;
  cursor:pointer !important;
}
html body.page-sale .ak-sale-page .ak-sale-rows tbody tr[data-real="1"]:focus td,
html body.page-sale .ak-sale-page .ak-sale-rows tbody tr[data-real="1"].sel td{
  background:#f5dfb8 !important;
  box-shadow:inset 0 0 0 2px #d97706 !important;
}
html body.page-sale .ak-sale-page .ak-inv-table tbody tr[data-real="1"]:focus td,
html body.page-sale .ak-sale-page .ak-inv-table tbody tr[data-real="1"].sel td{
  background:#dbeafe !important;
  box-shadow:inset 0 0 0 2px #d97706 !important;
}
html body.page-sale .ak-sale-page .ak-sale-rows tbody tr.ak-editing td{
  padding-left:12px !important;
  padding-right:12px !important;
  vertical-align:middle !important;
}
html body.page-sale .ak-sale-page .ak-sale-rows tbody tr.ak-editing td .ak-inline-edit{
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-height:26px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:inherit !important;
  font:inherit !important;
  line-height:inherit !important;
  text-align:left !important;
  box-sizing:border-box !important;
}
html body.page-sale .ak-sale-page .ak-sale-rows tbody tr.ak-editing td:has(.ak-inline-edit:focus){
  background:#e0fbff !important;
  box-shadow:inset 0 0 0 2px #0ea5a0 !important;
}
html body.page-sale .ak-sale-page .ak-sale-quick-tools{
  box-sizing:border-box !important;
}

@media (max-width:760px), (pointer:coarse){
  html body.page-sale .ak-sale-page{
    padding-bottom:calc(var(--sale-bottom-gap,66px) + 96px) !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar{
    display:flex !important;
    visibility:visible !important;
    pointer-events:auto !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    align-items:center !important;
    gap:6px !important;
    padding:7px 8px !important;
    width:calc(100vw - 12px) !important;
    max-width:none !important;
    height:52px !important;
    min-height:52px !important;
    max-height:52px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    border-radius:16px !important;
    bottom:calc(var(--sale-bottom-gap,66px) + 4px) !important;
    left:6px !important;
    right:6px !important;
    transform:none !important;
    z-index:130 !important;
    scrollbar-width:thin;
  }
  html body.bottombar-hidden.page-sale .ak-sale-page .ak-bottom-toolbar{
    bottom:8px !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar.hidden{
    display:none !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar .ak-btn{
    flex:0 0 auto !important;
    min-width:76px !important;
    width:auto !important;
    height:38px !important;
    padding:0 10px !important;
    border-radius:12px !important;
    font-size:12px !important;
    line-height:1 !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnAdd,
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnEditRow{
    min-width:68px !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnDelRow{
    min-width:82px !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnShareInv{
    min-width:86px !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnExit{
    min-width:70px !important;
  }

  html body.page-sale .ak-sale-page .ak-sale-quick-tools{
    display:flex !important;
    visibility:visible !important;
    left:6px !important;
    right:6px !important;
    bottom:calc(var(--sale-bottom-gap,66px) + 62px) !important;
    transform:none !important;
    width:auto !important;
    max-width:none !important;
    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;
    padding:5px 7px !important;
    gap:6px !important;
    border-radius:16px !important;
    justify-content:center !important;
    align-items:center !important;
    z-index:128 !important;
  }
  html body.bottombar-hidden.page-sale .ak-sale-page .ak-sale-quick-tools{
    bottom:62px !important;
  }
  html body.page-sale.sale-work-active:not(.sale-grid-edit-active) .ak-sale-page .ak-sale-quick-tools{
    display:none !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools:not(.show) input{
    display:none !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools.show{
    justify-content:flex-start !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools.show input{
    display:block !important;
    flex:1 1 auto !important;
    width:auto !important;
    min-width:86px !important;
    max-width:none !important;
    height:32px !important;
    font-size:13px !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools button{
    flex:0 0 auto !important;
    min-width:56px !important;
    height:32px !important;
    padding:0 7px !important;
    border-radius:11px !important;
    font-size:11px !important;
  }

  html body.page-sale.sale-grid-edit-active .ak-sale-page .ak-sale-main{
    display:grid !important;
    grid-template-columns:minmax(0,.49fr) minmax(0,.51fr) !important;
    grid-template-areas:"rows center" !important;
    gap:5px !important;
    overflow:hidden !important;
  }
  html body.page-sale.sale-grid-edit-active .ak-sale-page .ak-rows-wrap{
    grid-area:rows !important;
  }
  html body.page-sale.sale-grid-edit-active .ak-sale-page .ak-center{
    grid-area:center !important;
    display:block !important;
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  html body.page-sale.sale-grid-edit-active .ak-sale-page .ak-invoices-wrap{
    display:none !important;
  }
  html body.page-sale.sale-grid-edit-active .ak-sale-page .ak-entry-panel{
    display:flex !important;
    height:100% !important;
    max-width:none !important;
    flex-direction:column !important;
    overflow:hidden !important;
    padding:7px !important;
  }
  html body.page-sale.sale-grid-edit-active .ak-sale-page .ak-entry-buttons{
    display:none !important;
  }
  html body.page-sale.sale-grid-edit-active .ak-sale-page .ak-entry-hint{
    display:none !important;
  }
  html body.page-sale.sale-grid-edit-active .ak-sale-page .ak-bottom-toolbar{
    display:flex !important;
    visibility:visible !important;
    pointer-events:auto !important;
  }
}

@media (max-width:420px){
  html body.page-sale .ak-sale-page .ak-bottom-toolbar .ak-btn{
    min-width:70px !important;
    height:36px !important;
    font-size:11px !important;
    padding:0 8px !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools{
    bottom:calc(var(--sale-bottom-gap,66px) + 58px) !important;
    height:42px !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools button{
    min-width:52px !important;
    font-size:10.5px !important;
  }
}

/* AKSMART Step109 sale refinements: mobile quick panel, toolbar, edit focus */
html body.page-sale .ak-sale-page .ak-sale-quick-tools{
  max-width:none !important;
  box-sizing:border-box !important;
}
@media (max-width:760px), (pointer:coarse){
  html body.page-sale .ak-sale-page .ak-sale-main{
    padding-bottom:58px !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools{
    position:fixed !important;
    left:8px !important;
    right:8px !important;
    width:auto !important;
    max-width:none !important;
    transform:none !important;
    bottom:calc(var(--sale-bottom-gap,66px) + 60px) !important;
    height:48px !important;
    min-height:48px !important;
    padding:6px 8px !important;
    justify-content:center !important;
    gap:7px !important;
    border-radius:18px !important;
    background:rgba(255,250,241,.96) !important;
  }
  html body.bottombar-hidden.page-sale .ak-sale-page .ak-sale-quick-tools{
    bottom:62px !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools.show{
    justify-content:flex-start !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools.show input{
    flex:1 1 auto !important;
    min-width:96px !important;
    max-width:none !important;
    height:34px !important;
    font-size:14px !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-quick-tools button{
    flex:0 0 auto !important;
    min-width:64px !important;
    height:34px !important;
    font-size:11px !important;
    padding:0 8px !important;
    white-space:nowrap !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar{
    height:56px !important;
    min-height:56px !important;
    max-height:56px !important;
    padding:8px 8px !important;
    gap:7px !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar .ak-btn{
    min-width:82px !important;
    height:40px !important;
    font-size:12px !important;
    padding:0 10px !important;
    overflow:visible !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnAdd,
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnEditRow{
    min-width:74px !important;
  }
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnDelRow,
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnInvSearch2{
    min-width:86px !important;
  }
  html body.page-sale .ak-sale-page .ak-sale-rows tbody tr.ak-editing td .ak-inline-edit{
    -webkit-user-select:text !important;
    user-select:text !important;
  }
}
@media (max-width:420px){
  html body.page-sale .ak-sale-page .ak-bottom-toolbar .ak-btn{min-width:76px !important;font-size:11px !important;padding:0 8px !important;}
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnAdd,
  html body.page-sale .ak-sale-page .ak-bottom-toolbar #btnEditRow{min-width:68px !important;}
  html body.page-sale .ak-sale-page .ak-sale-quick-tools button{min-width:58px !important;font-size:10.5px !important;}
}
