/* Phase 8.7.10 — restore missing bottom actions, remove clipped panels, and keep paged controls usable. */
:root{
  --dbs-font-body:clamp(12px,.72vw,14px);
  --dbs-font-button:clamp(11px,.66vw,13px);
  --dbs-font-small:clamp(9.5px,.56vw,11px);
  --dbs-gold:#f28a13;
  --dbs-gold-deep:#d87300;
  --dbs-blue:#1e9af0;
  --dbs-navy:#10284c;
  --dbs-border:#efb66d;
}
html,body,.app-body{overflow-x:hidden!important;overflow-y:auto!important;min-height:100%!important;}
body,.app-body,input,select,textarea,button,.button,.tab-chip,.status{font-size:var(--dbs-font-body)!important;}
button,.button,.tab-chip{font-size:var(--dbs-font-button)!important;font-weight:900!important;color:inherit;}
.button.primary,.button.secondary,.button.ghost:not(.tab-chip),button.primary,button.secondary,button.ghost{color:#fff!important;text-shadow:0 1px 0 rgba(0,0,0,.12)!important;}
.button.secondary,.button.ghost:not(.tab-chip){background:linear-gradient(135deg,#ff9c1a,#df7600)!important;border:0!important;}
.button.primary{background:linear-gradient(135deg,#23a7ff,#0877d7)!important;border:0!important;}
.button.dark{background:#10284c!important;color:#fff!important;}
.tab-chip{min-height:32px!important;padding:7px 13px!important;border-radius:999px!important;line-height:1.08!important;}
.tab-chip:not(.active){color:#071d38!important;background:#fff!important;}
.tab-chip.active{color:#fff!important;background:linear-gradient(135deg,#ff981a,#e87900)!important;border-color:#e87900!important;}
.card,.panel,.card-lite,.nested-panel{border-color:var(--dbs-border)!important;box-shadow:0 10px 24px rgba(104,60,11,.065)!important;}
.main-shell{overflow:visible!important;padding:clamp(12px,1vw,22px)!important;}
.app-footer{position:relative!important;margin-top:12px!important;padding:6px!important;}

/* Do not hide the bottom of Measurements, Repairs, or Shop.  Earlier fixed-height panels clipped the Save/Create buttons. */
.phase87-pos-split,.phase872-pos-register{
  display:grid!important;
  grid-template-columns:minmax(380px,40%) minmax(560px,60%)!important;
  gap:clamp(12px,.9vw,18px)!important;
  align-items:start!important;
  max-width:100%!important;
}
.phase87-pos-split>.card.panel,.phase872-pos-register>.card.panel{
  height:auto!important;
  min-height:calc(100vh - 178px)!important;
  max-height:none!important;
  overflow:visible!important;
  padding:clamp(12px,.8vw,16px)!important;
  display:flex!important;
  flex-direction:column!important;
}
.phase87-work-panel,.phase872-register-right,.phase872-register-left,.phase87-active-panel{min-width:0!important;overflow:visible!important;}
.phase87-work-panel .phase87-entry-form,.phase87-repair-form,.phase872-cart-form{min-height:0!important;height:auto!important;overflow:visible!important;display:flex!important;flex-direction:column!important;gap:10px!important;}
.phase87-work-panel .phase87-service-section,.phase87-service-section{
  overflow:visible!important;
  max-height:none!important;
  min-height:0!important;
  height:auto!important;
  flex:0 0 auto!important;
  padding:12px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
}
.phase87-service-scroll,.repair-quick-scroll861{overflow:hidden!important;overflow-y:hidden!important;max-height:none!important;padding-right:0!important;}

/* Transaction tab bar: max three tabs, readable labels, no over-wide empty area. */
.phase872-transaction-tabs{
  height:44px!important;min-height:44px!important;display:flex!important;align-items:stretch!important;gap:0!important;overflow:hidden!important;background:#eaf7ff!important;border-bottom:1px solid #cfe1ef!important;border-radius:12px 12px 0 0!important;
}
.phase872-transaction-tabs .tx-tab,.phase872-transaction-tabs span.active{
  position:relative!important;flex:0 1 128px!important;min-width:104px!important;max-width:132px!important;height:44px!important;padding:7px 24px 7px 8px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;border:0!important;border-right:1px solid #cfe1ef!important;border-radius:0!important;background:#eaf7ff!important;color:#057ab9!important;box-shadow:none!important;white-space:normal!important;
}
.phase872-transaction-tabs .tx-tab.active,.phase872-transaction-tabs span.active{background:#dcf2ff!important;color:#005f92!important;}
.phase872-transaction-tabs .tx-label{display:block!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.05!important;font-size:clamp(10px,.72vw,14px)!important;}
.phase872-transaction-tabs .tx-close{position:absolute!important;right:5px!important;top:50%!important;transform:translateY(-50%)!important;width:18px!important;height:18px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:50%!important;background:#fff!important;color:#d73333!important;font-size:13px!important;font-weight:950!important;line-height:1!important;box-shadow:0 1px 4px rgba(0,0,0,.12)!important;}
.phase872-transaction-tabs .plus{flex:0 0 48px!important;width:48px!important;min-width:48px!important;height:44px!important;padding:0!important;margin:0!important;border-radius:0!important;background:linear-gradient(135deg,#ff9f1a,#db7700)!important;color:#fff!important;border:0!important;box-shadow:none!important;font-size:18px!important;}

/* Left transaction area keeps a clean single page, but does not clip the lower action boxes. */
.phase872-cart-table-wrap{flex:1 1 auto!important;min-height:260px!important;height:auto!important;overflow:hidden!important;border-bottom:1px solid #d7e5ef!important;background:#fff!important;}
.phase872-cart-table th,.phase872-cart-table td{font-size:var(--dbs-font-small)!important;padding:7px 9px!important;}
.phase872-bottom-split{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;flex:0 0 auto!important;margin-top:10px!important;}
.phase872-totals-box,.phase872-customer-box{min-height:130px!important;padding:13px!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;overflow:hidden!important;}
.phase872-customer-box h3,.phase872-totals-box h3{margin-bottom:7px!important;}
.phase872-customer-box .muted-text{font-size:var(--dbs-font-small)!important;line-height:1.35!important;}
.phase874-left-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:10px!important;}
.phase874-left-actions .button{height:36px!important;min-height:36px!important;padding:7px 10px!important;}
.phase87-recent-box{max-height:120px!important;overflow:hidden!important;margin-top:10px!important;}

/* Collapsed measurement profile remains compact; expand still works. */
.phase876-collapsible.is-collapsed .phase87-compact-grid,.phase876-collapsible.is-collapsed .section-help{display:none!important;}
.phase876-collapsible.is-collapsed{padding:10px 12px!important;}
.phase876-collapsible-head{gap:10px!important;}
.phase87-head-actions{gap:8px!important;}
.phase87-head-actions .button{height:34px!important;min-height:34px!important;padding:7px 10px!important;}
.phase87-client-row{grid-template-columns:1fr 1fr!important;gap:12px!important;margin-bottom:10px!important;}
.phase87-inline-action{grid-template-columns:1fr auto auto!important;gap:8px!important;}
.phase87-inline-action input,.phase87-client-row select{height:38px!important;}
.phase87-inline-action .button{height:38px!important;min-height:38px!important;padding:8px 10px!important;}

/* Real 3-row paging grid.  18 service slots, 12 shop product slots so product names do not crush. */
.phase876-paged-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:repeat(3,42px)!important;gap:8px!important;height:142px!important;min-height:142px!important;max-height:142px!important;overflow:hidden!important;align-content:start!important;margin:4px 0!important;}
.phase872-product-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(3,44px)!important;gap:8px!important;height:148px!important;min-height:148px!important;max-height:148px!important;overflow:hidden!important;align-content:start!important;}
.phase876-paged-grid>.quick-item,.phase876-paged-grid>button,.phase872-product-grid>.quick-item,.phase872-product-grid>button,.phase876-blank-tile{height:100%!important;min-height:0!important;width:100%!important;margin:0!important;padding:5px 7px!important;border-radius:10px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;}
.quick-item,.product-button,.service-pick,.repair-service-pick{font-size:var(--dbs-font-button)!important;line-height:1.05!important;}
.quick-item strong,.quick-item span,.quick-item small,.product-button strong,.product-button span,.product-button small{font-size:var(--dbs-font-small)!important;line-height:1.05!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.phase876-paged-grid>[hidden],.phase872-product-grid>[hidden],.phase8710-page-hidden{display:none!important;}
.phase876-blank-tile{visibility:hidden!important;pointer-events:none!important;background:transparent!important;border:0!important;box-shadow:none!important;}
.phase879-pager,.phase8710-pager{display:grid!important;grid-template-columns:76px 1fr 76px!important;align-items:center!important;gap:10px!important;margin:7px 0 6px!important;flex:0 0 auto!important;}
.phase879-pager button,.phase8710-pager button{height:32px!important;min-height:32px!important;padding:6px 10px!important;border-radius:10px!important;background:#10284c!important;color:#fff!important;border:0!important;box-shadow:0 6px 14px rgba(16,40,76,.16)!important;}
.phase879-pager button:disabled,.phase8710-pager button:disabled{opacity:.42!important;cursor:not-allowed!important;}
.phase879-pager span,.phase8710-pager span{text-align:center!important;color:#916000!important;font-weight:950!important;font-size:var(--dbs-font-button)!important;}
.phase87-detail-grid{grid-template-columns:1fr 1fr!important;gap:8px 12px!important;}
.phase87-detail-grid input,.phase87-detail-grid select{height:36px!important;min-height:36px!important;}
.phase87-bottom-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;margin-top:8px!important;flex:0 0 auto!important;position:static!important;}
.phase87-repair-form .phase87-bottom-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
.phase87-bottom-actions .button{height:38px!important;min-height:38px!important;padding:7px 8px!important;white-space:normal!important;}
.phase87-step-title{margin-top:4px!important;margin-bottom:4px!important;font-size:var(--dbs-font-small)!important;font-weight:950!important;}
.phase87-wrap-row,.category-tabs{gap:7px!important;}
.category-tabs .tab-chip{min-height:32px!important;padding:7px 12px!important;}

/* Shop: keep all controls visible, keep product buttons below payment without being cut off. */
.phase87-shop-page>.card.panel{height:auto!important;min-height:calc(100vh - 155px)!important;overflow:visible!important;}
.phase87-shop-page .phase872-cart-table-wrap{min-height:240px!important;}
.phase87-shop-page .phase872-customer-box{position:relative!important;min-height:150px!important;padding:13px!important;}
.phase87-shop-page .phase872-customer-grid{display:grid!important;grid-template-columns:minmax(110px,.9fr) minmax(130px,1fr)!important;gap:8px!important;}
.phase87-shop-page .phase872-customer-grid select,.phase87-shop-page .phase872-customer-grid input{height:34px!important;min-width:0!important;}
.phase877-customer-help{margin:8px 0 38px!important;}
.phase877-customer-actions{position:absolute!important;left:13px!important;right:13px!important;bottom:12px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;}
.phase877-customer-actions .button{height:32px!important;min-height:32px!important;padding:6px 9px!important;font-size:var(--dbs-font-small)!important;}
.phase878-recent-tender{margin-top:10px!important;flex:0 0 auto!important;min-height:0!important;overflow:visible!important;padding:11px!important;}
.phase878-shop-ticket-list{max-height:160px!important;overflow:hidden!important;}
.phase878-shop-ticket-list .list-row{padding:8px 9px!important;margin-bottom:7px!important;}
.phase872-register-search{display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;margin-bottom:7px!important;}
.phase872-register-search input,.phase872-register-search button,.phase872-barcode-entry input{height:36px!important;min-height:36px!important;}
.phase872-keypad{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:6px!important;margin:7px 0!important;}
.phase872-keypad button{height:32px!important;min-height:32px!important;background:#fff!important;color:#061a38!important;border:1px solid #cbddec!important;border-radius:9px!important;text-shadow:none!important;}
.phase872-function-grid{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:6px!important;margin:7px 0!important;}
.phase872-function-grid button{height:34px!important;min-height:34px!important;padding:6px 8px!important;border-radius:9px!important;color:#fff!important;}
.phase872-payment-summary{padding:9px!important;margin:7px 0!important;}
.phase872-payment-summary div{display:grid!important;grid-template-columns:repeat(6,auto)!important;gap:4px 12px!important;font-size:var(--dbs-font-small)!important;}
.phase872-payment-summary textarea{height:38px!important;min-height:38px!important;margin-top:6px!important;}
.product-tabs{max-height:70px!important;overflow:hidden!important;align-content:flex-start!important;}

/* List pages: only one pager, no duplicate pager rows. */
.phase876-list-pager,.phase878-list-pager{display:none!important;}
.phase879-list-pager,.phase8710-list-pager{display:grid!important;grid-template-columns:86px 1fr 86px!important;align-items:center!important;gap:10px!important;margin:10px 0 0!important;padding-top:10px!important;border-top:1px dashed #f0bf82!important;}
.phase879-list-pager button,.phase8710-list-pager button{height:34px!important;border-radius:10px!important;background:#10284c!important;color:#fff!important;border:0!important;}
.phase879-list-pager button:disabled,.phase8710-list-pager button:disabled{opacity:.42!important;}
.phase879-list-pager span,.phase8710-list-pager span{text-align:center!important;font-weight:950!important;color:#916000!important;}
.phase879-paged-list>[hidden],.phase879-paged-list>tr[hidden],.phase8710-paged-list>[hidden],.phase8710-paged-list>tr[hidden]{display:none!important;}
.product-label-actions{margin-top:16px!important;padding-top:0!important;}
.products-tab-list,.report-tabs{gap:8px!important;align-items:center!important;}
.products-tab-list{max-height:76px!important;overflow:hidden!important;}
.phase871-sales-filter,.phase879-reports-panel{padding:16px!important;overflow:visible!important;}
.phase879-sales-toolbar-grid{display:grid!important;grid-template-columns:minmax(150px,170px) minmax(150px,170px) minmax(330px,1fr) minmax(380px,1fr) auto!important;gap:12px!important;align-items:end!important;}
.sales-tab-block{min-width:0!important;}
.sales-tab-block .report-tabs{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;}
.sales-tab-label{display:block!important;margin-bottom:7px!important;font-weight:950!important;}
.sales-date-actions{display:flex!important;gap:8px!important;justify-content:flex-end!important;align-items:end!important;}
.sales-date-field input,.sales-date-actions .button{height:38px!important;min-height:38px!important;}
.phase879-report-tabs{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-bottom:12px!important;}
.phase879-report-filter-bar{display:grid!important;grid-template-columns:150px 150px 160px 160px auto auto auto auto!important;gap:10px!important;align-items:end!important;margin-bottom:14px!important;}
.phase879-report-filter-bar .compact-label input,.phase879-report-filter-bar .button{height:38px!important;min-height:38px!important;}
.report-table-wrap{overflow:hidden!important;}
.report-table th,.report-table td{font-size:var(--dbs-font-small)!important;padding:8px 10px!important;}

@media (max-width:1500px){
  .phase87-pos-split,.phase872-pos-register{grid-template-columns:minmax(360px,40%) minmax(520px,60%)!important;}
  .phase872-transaction-tabs .tx-tab,.phase872-transaction-tabs span.active{flex-basis:118px!important;min-width:96px!important;}
  .phase876-paged-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;}
  .phase872-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
@media (max-width:1100px){
  .phase87-pos-split,.phase872-pos-register,.split-layout,.phase879-sales-toolbar-grid,.phase879-report-filter-bar{grid-template-columns:1fr!important;}
  .phase87-pos-split>.card.panel,.phase872-pos-register>.card.panel{height:auto!important;min-height:0!important;overflow:visible!important;}
}
@media (max-width:900px){
  .app-shell{display:block!important;}
  .sidebar{position:fixed!important;left:0!important;top:0!important;bottom:0!important;z-index:1000!important;transform:translateX(-102%)!important;transition:.2s ease!important;}
  .sidebar.open{transform:translateX(0)!important;}
  .main-shell{padding:12px 10px!important;}
  .topbar{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  .topbar-title-wrap{display:grid!important;grid-template-columns:44px 1fr!important;align-items:start!important;gap:10px!important;}
  .menu-toggle{width:38px!important;height:38px!important;min-width:38px!important;border-radius:10px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0!important;font-size:18px!important;line-height:1!important;background:#ff981a!important;color:#fff!important;border:0!important;box-shadow:0 6px 12px rgba(0,0,0,.12)!important;}
  .topbar-meta{justify-content:flex-start!important;flex-wrap:wrap!important;}
  .phase87-client-row,.phase87-detail-grid,.phase872-bottom-split,.phase874-left-actions,.phase877-customer-actions{grid-template-columns:1fr!important;position:static!important;}
  .phase877-customer-help{margin:8px 0!important;}
  .phase876-paged-grid,.phase872-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(3,44px)!important;height:148px!important;min-height:148px!important;max-height:148px!important;}
  .phase879-pager,.phase8710-pager,.phase879-list-pager,.phase8710-list-pager{grid-template-columns:72px 1fr 72px!important;}
}
@media (max-width:460px){
  :root{--dbs-font-body:12px;--dbs-font-button:11px;--dbs-font-small:9.5px;}
  h1{font-size:26px!important;}
  .topbar-title-wrap{grid-template-columns:40px 1fr!important;}
  .menu-toggle{width:34px!important;height:34px!important;min-width:34px!important;}
  .phase872-transaction-tabs .tx-tab{flex-basis:90px!important;min-width:76px!important;}
  .phase872-transaction-tabs .tx-label{font-size:10px!important;}
  .phase872-transaction-tabs .plus{flex-basis:38px!important;min-width:38px!important;width:38px!important;}
  input,select,textarea{min-width:0!important;}
}
