/* Phase 8.7.6 — no-scroll paging, back buttons, collapsible measurements, and POS polish */
:root{
  --dbs-orange:#f68b13;
  --dbs-orange-dark:#cc6900;
  --dbs-blue:#1687e8;
  --dbs-green:#0fa36b;
  --dbs-purple:#7b4ce2;
  --dbs-red:#e43f35;
  --dbs-gold:#f6c46b;
  --dbs-gold-line:#edbd74;
  --dbs-cream:#fff7e8;
  --dbs-ink:#071d3a;
}

/* Universal page back button */
.phase876-page-back-row{display:flex;justify-content:flex-start;align-items:center;margin:-2px 0 12px;min-height:42px;}
.phase876-back-button{display:inline-flex!important;align-items:center!important;gap:8px!important;min-height:42px!important;padding:10px 18px!important;border-radius:999px!important;background:linear-gradient(135deg,#213a63,#071d3a)!important;color:#fff!important;box-shadow:0 10px 20px rgba(7,29,58,.18),inset 0 1px 0 rgba(255,255,255,.25)!important;}
.phase876-back-button:hover{filter:brightness(1.05);transform:translateY(-1px)}

/* Golden, even page frames */
.card,.panel,.card-lite,.nested-panel{border-color:var(--dbs-gold-line)!important;box-shadow:0 12px 28px rgba(125,80,20,.08), inset 0 1px 0 rgba(255,255,255,.70)!important;}
.panel,.card{border-radius:18px!important;}
.split-layout,.phase87-pos-split,.phase872-pos-register{gap:18px!important;align-items:start!important;}
.main-shell{overflow-x:hidden!important;}
.app-footer{margin-top:16px!important;}

/* Sleek buttons with bright white font. */
.button,.tab-chip,.phase872-function-grid button,.phase872-keypad button,.phase872-transaction-tabs button.plus{font-weight:950!important;text-decoration:none!important;}
.button,.phase872-function-grid button{color:#fff!important;text-shadow:0 1px 1px rgba(0,0,0,.22)!important;border:0!important;box-shadow:0 8px 18px rgba(91,55,0,.14),inset 0 1px 0 rgba(255,255,255,.28)!important;}
.button.primary{background:linear-gradient(135deg,#ff9d21,#db7100)!important;}
.button.secondary{background:linear-gradient(135deg,#26a8ff,#116dd8)!important;}
.button.ghost{background:linear-gradient(135deg,#f3a21f,#d87800)!important;color:#fff!important;}
.button.dark{background:linear-gradient(135deg,#253c63,#071d3a)!important;}
.button.warning{background:linear-gradient(135deg,#f6bd32,#d97900)!important;}
.button.info{background:linear-gradient(135deg,#1bb4ff,#1572d1)!important;}
.button.danger{background:linear-gradient(135deg,#ff6658,#c93328)!important;}
.button:disabled,.phase872-function-grid button:disabled{opacity:.45!important;filter:grayscale(.18)!important;cursor:not-allowed!important;}

/* Transaction tabs: plus opens a new clean transaction and no longer looks dead. */
.phase872-transaction-tabs{height:48px!important;overflow:visible!important;border:1px solid #d7e5f2!important;border-bottom:1px solid #c6d5e5!important;border-radius:14px 14px 0 0!important;margin:-18px -18px 0!important;background:#eef8ff!important;}
.phase872-transaction-tabs span.active{display:flex!important;align-items:center!important;height:48px!important;padding:0 20px!important;font-size:17px!important;color:#0477b7!important;}
.phase872-transaction-tabs .plus{height:48px!important;min-width:54px!important;border-radius:0 13px 0 0!important;background:linear-gradient(135deg,#ffab2e,#df7600)!important;color:#fff!important;font-size:20px!important;line-height:1!important;}
.phase872-transaction-tabs .plus:hover{filter:brightness(1.05);}

/* Measurements and repairs split frame balance. */
.phase87-pos-split{grid-template-columns:minmax(420px,40%) minmax(0,60%)!important;}
.phase87-measurements-page .phase872-register-left,
.phase87-repairs-page .phase872-register-left{min-height:0!important;max-height:none!important;overflow:hidden!important;padding-bottom:18px!important;}
.phase872-cart-table-wrap{height:360px!important;min-height:220px!important;overflow:hidden!important;background:#fff!important;}
.phase872-cart-table td,.phase872-cart-table th{padding:9px 10px!important;}
.phase872-bottom-split{grid-template-columns:1fr 1fr!important;align-items:stretch!important;gap:12px!important;padding:12px 0 0!important;}
.phase872-totals-box,.phase872-customer-box{min-height:142px!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;border-color:#d5e4f3!important;background:linear-gradient(180deg,#f9fcff,#f6fbff)!important;}
.phase872-customer-box p{margin:4px 0!important;line-height:1.25!important;}
.phase874-left-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;margin:12px 0 0!important;}
.phase874-left-actions .button{min-height:46px!important;border-radius:13px!important;}
.phase87-recent-box{max-height:132px!important;overflow:hidden!important;margin-top:12px!important;}

/* Collapsed body measurement profile. Search row remains visible at top. */
.phase876-collapsible{transition:all .18s ease;}
.phase876-collapsible-head{cursor:pointer!important;}
.phase876-collapse-toggle{min-width:86px!important;}
.phase876-collapsible.is-collapsed .phase87-compact-grid,
.phase876-collapsible.is-collapsed .section-help,
.phase876-collapsible.is-collapsed .phase871-inline-help{display:none!important;}
.phase876-collapsible.is-collapsed{padding-bottom:12px!important;}
.phase876-collapsible.is-collapsed .panel-head{margin-bottom:0!important;}
.phase87-profile-section .phase87-head-actions{gap:8px!important;}

/* 3-row paged service/product button areas. */
.phase876-paged-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important;overflow:hidden!important;max-height:none!important;padding-right:0!important;align-items:stretch!important;}
.phase876-paged-grid .quick-item,
.phase876-paged-grid .product-button{min-height:64px!important;height:64px!important;border-radius:12px!important;padding:7px 6px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1.03!important;overflow:hidden!important;}
.phase876-paged-grid .quick-item span,.phase876-paged-grid .product-button span{font-size:10px!important;font-weight:950!important;line-height:1.05!important;margin-top:3px!important;}
.phase876-paged-grid .product-button small{font-size:8px!important;line-height:1!important;margin-top:2px!important;}
.phase876-blank-tile{visibility:hidden!important;min-height:64px!important;height:64px!important;border-radius:12px!important;}
.phase876-pager{display:grid!important;grid-template-columns:88px 1fr 88px!important;align-items:center!important;gap:10px!important;margin:10px 0 2px!important;}
.phase876-pager button{min-height:38px!important;border-radius:12px!important;border:0!important;color:#fff!important;font-weight:950!important;background:linear-gradient(135deg,#213a63,#071d3a)!important;box-shadow:0 6px 14px rgba(7,29,58,.12)!important;}
.phase876-pager button:disabled{opacity:.35!important;cursor:not-allowed!important;}
.phase876-pager span{text-align:center!important;font-weight:900!important;color:#6d4b18!important;}
.phase87-service-section{overflow:hidden!important;}
.phase87-step-title{margin-top:10px!important;margin-bottom:7px!important;}
.garment-category-tabs{max-height:none!important;overflow:hidden!important;}

/* Shop POS: customer frame, white number keys, color feature keys, paged product grid. */
.phase872-pos-register{grid-template-columns:minmax(560px,60%) minmax(420px,40%)!important;}
.phase872-register-left{min-height:0!important;}
.phase872-cart-form{min-height:0!important;}
.phase87-shop-page .phase872-cart-table-wrap{height:420px!important;}
.phase87-shop-page .phase872-bottom-split{grid-template-columns:1fr 1fr!important;align-items:stretch!important;}
.phase87-shop-page .phase872-customer-box{min-height:232px!important;justify-content:space-between!important;}
.phase87-shop-page .phase872-customer-grid{grid-template-columns:minmax(160px,.8fr) minmax(180px,1fr)!important;gap:10px!important;}
.phase87-shop-page .phase872-customer-box .button{min-width:0!important;flex:1 1 0!important;}
.phase87-shop-page .phase872-customer-box .button + .button{margin-left:8px!important;}
.phase87-shop-page .phase872-customer-box p{margin:10px 0 auto!important;}
.phase872-keypad{grid-template-columns:repeat(3,1fr)!important;gap:7px!important;}
.phase872-keypad button{background:#fff!important;color:#071d3a!important;border:1.5px solid #d7e3ef!important;border-radius:9px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 3px 10px rgba(0,0,0,.04)!important;font-size:16px!important;min-height:39px!important;text-shadow:none!important;}
.phase872-function-grid{grid-template-columns:repeat(3,1fr)!important;gap:7px!important;}
.phase872-function-grid button{min-height:39px!important;border-radius:9px!important;font-size:13px!important;}
.phase872-function-grid button:nth-child(1),.phase872-function-grid .danger{background:linear-gradient(135deg,#ff5b50,#c93028)!important;}
.phase872-function-grid button:nth-child(2),.phase872-function-grid .success{background:linear-gradient(135deg,#13bb74,#088d5b)!important;}
.phase872-function-grid button:nth-child(3),.phase872-function-grid button:nth-child(4),.phase872-function-grid button:nth-child(5){background:linear-gradient(135deg,#ff9d21,#db7100)!important;}
.phase872-function-grid .info{background:linear-gradient(135deg,#1aa8f5,#116ed4)!important;}
.phase872-function-grid .dark{background:linear-gradient(135deg,#263d63,#071d3a)!important;}
.phase872-function-grid .purple{background:linear-gradient(135deg,#9855f0,#6d34c9)!important;}
.phase872-function-grid .pay{background:linear-gradient(135deg,#20bd72,#0b8a58)!important;}
.phase872-payment-summary{margin-bottom:12px!important;}
.phase872-product-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;max-height:none!important;overflow:hidden!important;}
.phase872-product-grid .quick-item{height:68px!important;min-height:68px!important;}
.phase87-ticket-scroll{max-height:none!important;overflow:hidden!important;display:grid!important;gap:10px!important;}
.phase87-ticket-scroll .list-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:12px!important;padding:12px!important;}
.phase87-ticket-scroll .row-actions{display:flex!important;align-items:center!important;gap:8px!important;}

/* Client-side paginated lists on standard pages. */
.phase876-paged-list .list-row,
.phase876-paged-list .card-lite{margin-bottom:10px!important;}
.phase876-list-pager{display:grid!important;grid-template-columns:92px 1fr 92px!important;align-items:center!important;gap:12px!important;margin:14px 0 0!important;padding-top:12px!important;border-top:1px dashed #f0bf82!important;}
.phase876-list-pager button{min-height:40px!important;border:0!important;border-radius:12px!important;background:linear-gradient(135deg,#213a63,#071d3a)!important;color:#fff!important;font-weight:950!important;box-shadow:0 6px 14px rgba(7,29,58,.10)!important;}
.phase876-list-pager button:disabled{opacity:.35!important;cursor:not-allowed!important;}
.phase876-list-pager span{text-align:center!important;font-weight:950!important;color:#6d4b18!important;}
.report-table-wrap{overflow:hidden!important;}
.report-table{width:100%!important;}
.report-table tbody tr.phase876-hidden-row{display:none!important;}

/* Category, products, pickup, sales and reports: stop long visible lists from creating giant scroll. */
body:has(.list-table) .list-table{overflow:visible!important;}
.categories-page .list-table,.products-page .list-table{max-height:none!important;}

/* Preview page print controls: better Back spacing. */
.phase875-print-controls{gap:12px!important;}
.phase875-print-controls .print-btn{min-width:70px!important;}

/* Avoid empty tall areas at page bottoms. */
.phase87-repairs-page .phase87-work-panel,
.phase87-measurements-page .phase87-work-panel{margin-bottom:0!important;}
.phase87-repairs-page + .app-footer,.phase87-measurements-page + .app-footer{margin-top:10px!important;}

@media (max-width:1280px){
  .phase87-pos-split,.phase872-pos-register{grid-template-columns:1fr!important;}
  .phase872-cart-table-wrap{height:auto!important;max-height:340px!important;overflow:hidden!important;}
  .phase876-paged-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
@media (max-width:820px){
  .phase876-paged-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .phase872-bottom-split,.phase87-shop-page .phase872-bottom-split{grid-template-columns:1fr!important;}
  .phase874-left-actions{grid-template-columns:1fr!important;}
}
