/* Phase 8.7.9 — final responsive alignment: transaction close tabs, single pagers, compact grids, mobile menu fix. */
:root{
  --dbs-font-body:clamp(12px,.72vw,14px);
  --dbs-font-button:clamp(11px,.68vw,13px);
  --dbs-font-small:clamp(9px,.58vw,11px);
  --dbs-font-title:clamp(22px,1.55vw,34px);
  --dbs-gap:clamp(10px,.82vw,16px);
  --dbs-panel-pad:clamp(10px,.78vw,16px);
  --dbs-gold:#f28a13;
  --dbs-gold-dark:#d87300;
  --dbs-blue:#1e9af0;
  --dbs-navy:#10284c;
  --dbs-border:#f1b46d;
}
html,body{font-size:var(--dbs-font-body)!important;overflow-x:hidden!important;}
body,.app-body,input,select,textarea,button,.button,.tab-chip,.status{font-size:var(--dbs-font-body)!important;}
h1{font-size:var(--dbs-font-title)!important;line-height:1.05!important;}
h2{font-size:clamp(18px,1.22vw,26px)!important;line-height:1.08!important;}
h3{font-size:clamp(14px,.88vw,18px)!important;line-height:1.12!important;}
button,.button,.tab-chip{font-size:var(--dbs-font-button)!important;font-weight:900!important;line-height:1.1!important;white-space:nowrap!important;}
.button,button{border-radius:12px!important;}
.card,.panel,.card-lite,.nested-panel{border-color:var(--dbs-border)!important;box-shadow:0 10px 24px rgba(104,60,11,.07)!important;}
.main-shell{padding:clamp(12px,1vw,22px)!important;}
.topbar{align-items:flex-start!important;margin-bottom:clamp(8px,.65vw,14px)!important;}
.topbar-title-wrap{gap:10px!important;align-items:flex-start!important;}
.topbar-meta{gap:10px!important;align-items:center!important;white-space:nowrap!important;}
.chip[data-dbs-local-time]{min-width:165px!important;text-align:center!important;}
.phase876-page-back-row{margin:8px 0 10px!important;}
.phase876-back-button{min-height:38px!important;padding:9px 18px!important;background:linear-gradient(135deg,#ff981a,#df7600)!important;color:#fff!important;border:0!important;box-shadow:0 8px 18px rgba(224,116,0,.16)!important;}

/* Split pages balance at 1920x1024 but shrink proportionally. */
.phase87-pos-split,.phase872-pos-register{
  display:grid!important;grid-template-columns:minmax(390px,40%) minmax(590px,60%)!important;gap:var(--dbs-gap)!important;align-items:stretch!important;max-width:100%!important;
}
.phase87-pos-split>.card.panel,.phase872-pos-register>.card.panel{
  height:clamp(642px,calc(100vh - 175px),805px)!important;min-height:0!important;overflow:hidden!important;padding:var(--dbs-panel-pad)!important;display:flex!important;flex-direction:column!important;
}
.phase87-work-panel,.phase872-register-right,.phase872-register-left{min-width:0!important;}
.phase87-work-panel .phase87-entry-form,.phase87-repair-form{min-height:0!important;display:flex!important;flex-direction:column!important;gap:10px!important;}
.phase87-work-panel .phase87-service-section{min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:6px!important;padding:12px!important;}
.phase87-service-scroll,.repair-quick-scroll861{overflow:hidden!important;max-height:none!important;}

/* Transaction tabs: capped, close buttons, no oversized tabs when mobile. */
.phase872-transaction-tabs{height:46px!important;min-height:46px!important;display:flex!important;align-items:stretch!important;gap:0!important;overflow:hidden!important;background:#eaf7ff!important;border-bottom:1px solid #cfe1ef!important;}
.phase872-transaction-tabs .tx-tab{position:relative!important;flex:0 1 clamp(108px,8vw,150px)!important;min-width:78px!important;max-width:150px!important;height:46px!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;}
.phase872-transaction-tabs .tx-tab.active{background:#dcf2ff!important;color:#006aa2!important;}
.phase872-transaction-tabs .tx-label{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;max-width:100%!important;font-size:clamp(11px,.72vw,15px)!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:#ffffff!important;color:#d33!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:46px!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;}

.phase872-cart-table-wrap{flex:1 1 auto!important;min-height:250px!important;overflow:hidden!important;border-bottom:1px solid #d7e5ef!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:132px!important;padding:13px!important;display:flex!important;flex-direction:column!important;}
.phase872-totals-box h3,.phase872-customer-box h3{margin-bottom:8px!important;}
.phase872-totals-box div{gap:10px!important;}
.phase872-customer-box .muted-text{font-size:var(--dbs-font-small)!important;line-height:1.32!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:38px!important;min-height:38px!important;padding:8px 10px!important;}
.phase87-recent-box{margin-top:10px!important;max-height:96px!important;overflow:hidden!important;}

/* Collapsed measurement profile stays tight. */
.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;}

/* Exact 3 rows paging. Service = 18 slots, shop products = 15 slots to prevent broken product text. */
.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{grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:repeat(3,44px)!important;height:148px!important;min-height:148px!important;max-height:148px!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;}
.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.02!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.phase876-paged-grid>[hidden],.phase872-product-grid>[hidden],.phase879-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{display:grid!important;grid-template-columns:86px 1fr 86px!important;align-items:center!important;gap:10px!important;margin:7px 0 5px!important;flex:0 0 auto!important;}
.phase879-pager button{height:34px!important;min-height:34px!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{opacity:.42!important;cursor:not-allowed!important;}
.phase879-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;}
.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:34px!important;padding:8px 13px!important;}

/* Shop frame balance and clean customer box. */
.phase87-shop-page>.card.panel{height:clamp(660px,calc(100vh - 158px),820px)!important;}
.phase87-shop-page .phase872-cart-table-wrap{min-height:235px!important;}
.phase87-shop-page .phase872-customer-box{position:relative!important;min-height:168px!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:36px!important;min-width:0!important;}
.phase877-customer-help{margin:8px 0 46px!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:34px!important;min-height:34px!important;padding:6px 9px!important;font-size:var(--dbs-font-small)!important;}
.phase878-recent-tender{margin-top:10px!important;flex:0 0 188px!important;min-height:0!important;overflow:hidden!important;padding:11px!important;}
.phase878-shop-ticket-list{max-height:116px!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;}
.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;}
.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:76px!important;overflow:hidden!important;align-content:flex-start!important;}

/* Single list pager only. */
.phase876-list-pager,.phase878-list-pager{display:none!important;}
.phase879-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{height:34px!important;border-radius:10px!important;background:#10284c!important;color:#fff!important;border:0!important;}
.phase879-list-pager button:disabled{opacity:.42!important;}
.phase879-list-pager span{text-align:center!important;font-weight:950!important;color:#916000!important;}
.phase879-paged-list>[hidden],.phase879-paged-list>tr[hidden]{display:none!important;}

/* Category/Product/Pickup/Sales/Reports list pages: consistent one-screen rows. */
.split-layout{gap:var(--dbs-gap)!important;align-items:start!important;}
.list-table.compact .list-row{margin-bottom:9px!important;padding:12px 14px!important;}
.product-label-actions{margin-top:auto!important;padding-top:16px!important;}
.products-tab-list,.report-tabs{gap:8px!important;align-items:center!important;}
.products-tab-list{max-height:80px!important;overflow:hidden!important;}

.phase871-sales-filter,.phase879-reports-panel{padding:16px!important;}
.phase879-sales-toolbar-grid{display:grid!important;grid-template-columns:minmax(150px,170px) minmax(150px,170px) minmax(360px,1fr) minmax(430px,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:160px 160px 170px 170px 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;}

/* Keep footer from forcing unnecessary page scroll on paged list pages. */
.app-footer{margin-top:10px!important;padding:6px!important;font-size:var(--dbs-font-small)!important;}

/* Mobile / iPhone menu and shrinking controls. */
@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-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;}
  .phase872-transaction-tabs{height:42px!important;min-height:42px!important;}
  .phase872-transaction-tabs .tx-tab{height:42px!important;flex-basis:96px!important;min-width:78px!important;padding-right:22px!important;}
  .phase872-transaction-tabs .plus{height:42px!important;flex-basis:42px!important;width:42px!important;min-width:42px!important;}
  .phase87-client-row,.phase87-detail-grid,.phase872-bottom-split{grid-template-columns:1fr!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;}
  .phase87-bottom-actions,.phase87-repair-form .phase87-bottom-actions,.phase874-left-actions,.phase877-customer-actions{grid-template-columns:1fr!important;position:static!important;}
  .phase877-customer-help{margin:8px 0!important;}
  .phase879-pager,.phase879-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;}
  .chip[data-dbs-local-time]{min-width:0!important;}
  .phase876-page-back-row{margin-top:8px!important;}
  .phase872-transaction-tabs .tx-tab{flex-basis:86px!important;min-width:70px!important;}
  .phase872-transaction-tabs .tx-label{font-size:11px!important;}
  .phase872-transaction-tabs .plus{flex-basis:38px!important;min-width:38px!important;width:38px!important;}
  input,select,textarea{min-width:0!important;}
}
