/* AKSMART v15 — sale-style row selection, fixed mobile work area, compact scroll cues */
body.page-drawbill .db88-table tbody tr,
body.page-partybill .db88-table tbody tr,
body.page-cashbook .cb-table tbody tr,
body.page-billing-date .bd32-party{
  -webkit-user-select:none!important; user-select:none!important;
}
body.page-drawbill .db88:not(.db88-edit-active) .db88-table tbody .db88-edit-input,
body.page-partybill .db88:not(.db88-edit-active) .db88-table tbody .db88-edit-input{
  pointer-events:none!important; -webkit-user-select:none!important; user-select:none!important;
  caret-color:transparent!important;
}
body.page-drawbill .db88-table tbody tr:focus,
body.page-partybill .db88-table tbody tr:focus,
body.page-cashbook .cb-table tbody tr:focus{outline:none!important}
body.page-cashbook .cb-table tbody tr.sel{background:#fff0ad!important;box-shadow:inset 4px 0 0 #9b450c!important}

/* Native fallback scrollbar: compact and visible only on overflow-capable rails. */
.db88-table-wrap,.db88-toolbar,.cb-table-wrap,.cb-actions,.bd32-party-list,.bd32-controls{
  scrollbar-width:thin; scrollbar-color:rgba(84,68,50,.58) rgba(84,68,50,.10);
}
.db88-table-wrap::-webkit-scrollbar,.db88-toolbar::-webkit-scrollbar,.cb-table-wrap::-webkit-scrollbar,.cb-actions::-webkit-scrollbar,.bd32-party-list::-webkit-scrollbar,.bd32-controls::-webkit-scrollbar{width:5px;height:5px}
.db88-table-wrap::-webkit-scrollbar-thumb,.db88-toolbar::-webkit-scrollbar-thumb,.cb-table-wrap::-webkit-scrollbar-thumb,.cb-actions::-webkit-scrollbar-thumb,.bd32-party-list::-webkit-scrollbar-thumb,.bd32-controls::-webkit-scrollbar-thumb{background:rgba(84,68,50,.58);border-radius:999px}
.db88-table-wrap::-webkit-scrollbar-track,.db88-toolbar::-webkit-scrollbar-track,.cb-table-wrap::-webkit-scrollbar-track,.cb-actions::-webkit-scrollbar-track,.bd32-party-list::-webkit-scrollbar-track,.bd32-controls::-webkit-scrollbar-track{background:rgba(84,68,50,.10);border-radius:999px}

/* Lightweight visual mini handle. It is mounted only when real overflow exists. */
.ak-mini-scroll-v,.ak-mini-scroll-h{position:absolute!important;z-index:60!important;pointer-events:none!important;opacity:.82!important;border-radius:999px!important;background:rgba(66,57,47,.55)!important;box-shadow:0 1px 4px rgba(0,0,0,.13)!important}
.ak-mini-scroll-v{right:2px!important;width:4px!important;min-height:20px!important}
.ak-mini-scroll-h{bottom:2px!important;height:4px!important;min-width:24px!important}
.ak-scroll-host{position:relative!important}

@media(max-width:900px){
  /* Bills: header/meta fixed, list gets remaining room, selected bar + buttons never jump. */
  body.page-drawbill .db88,body.page-partybill .db88{height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  body.page-drawbill .db88-body,body.page-partybill .db88-body{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  body.page-drawbill .db88-meta,body.page-partybill .db88-meta{flex:0 0 auto!important}
  body.page-drawbill .db88-table-wrap,body.page-partybill .db88-table-wrap{display:block!important;flex:1 1 auto!important;min-height:120px!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
  body.page-drawbill .db88-selected,body.page-partybill .db88-selected{flex:0 0 auto!important}

  /* Sale-style single button rail. Horizontal scroll appears only if screen is too narrow. */
  body.page-drawbill .db88-toolbar,body.page-partybill .db88-toolbar,
  body.page-drawbill .db88-toolbar.no-manage,body.page-partybill .db88-toolbar.no-manage{
    flex:0 0 auto!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
    gap:6px!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;
    padding:6px 6px 9px!important;scroll-snap-type:x proximity!important;overscroll-behavior-x:contain!important;
  }
  body.page-drawbill .db88-toolbar .ak-btn,body.page-partybill .db88-toolbar .ak-btn{
    flex:0 0 88px!important;min-width:88px!important;width:88px!important;height:36px!important;scroll-snap-align:start!important;
  }

  /* Date Bill expanded action tools also remain one clean line. */
  body.page-billing-date .bd32-controls.is-open{display:flex!important;flex-wrap:nowrap!important;gap:5px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:3px 2px 7px!important;overscroll-behavior-x:contain!important}
  body.page-billing-date .bd32-controls.is-open>*{flex:0 0 auto!important}
  body.page-billing-date .bd32-controls.is-open .bd32-btn{min-width:78px!important}
  body.page-billing-date .bd32-shell{overflow:hidden!important}
  body.page-billing-date .bd32-work{min-height:0!important;overflow:hidden!important}

  /* Cashbook action rail and entries list follow the same interaction language. */
  body.page-cashbook #view{overflow:hidden!important}
  body.page-cashbook .cb30{height:100dvh!important;max-height:100dvh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding-bottom:66px!important}
  body.page-cashbook .cb30-grid{flex:0 0 auto!important}
  body.page-cashbook .cb30>.cb-card:last-of-type{flex:1 1 auto!important;min-height:120px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  body.page-cashbook .cb-table-wrap{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
  body.page-cashbook .cb-actions{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;padding-bottom:6px!important;overscroll-behavior-x:contain!important}
  body.page-cashbook .cb-actions .cb-btn{flex:0 0 112px!important;min-width:112px!important}
  body.page-cashbook .cb-actions .small{flex:0 0 auto!important;white-space:nowrap!important}
}
