
.mbm-pos-wrap h1{margin-bottom:18px}
.mbm-pos-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:20px;max-width:1300px}
.mbm-card{background:#fff;border:1px solid #dcdcde;border-radius:12px;padding:18px;box-shadow:0 2px 12px rgba(0,0,0,.04);margin-bottom:18px}
.mbm-card h2{margin-top:0}
#mbm-pos-search,.mbm-form-row input,.mbm-form-row select,#mbm-order-note{width:100%;padding:12px;border:1px solid #ccd0d4;border-radius:8px;font-size:15px;box-sizing:border-box}
#mbm-order-note{min-height:80px;margin:12px 0}
.mbm-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.mbm-product{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #eee;border-radius:10px;margin-top:10px;background:#fafafa}
.mbm-product img{width:54px;height:54px;border-radius:8px;object-fit:cover;background:#eee}
.mbm-product-info{flex:1}
.mbm-product-title{font-weight:700}
.mbm-product-meta{font-size:12px;color:#646970;margin-top:4px}
.mbm-add-product{white-space:nowrap}
.mbm-total-row{display:flex;justify-content:space-between;align-items:center;font-size:20px;margin-top:18px;padding-top:14px;border-top:1px solid #eee}
#mbm-pos-cart-table input[type="number"]{width:65px}
#mbm-pos-message{margin-top:14px;font-weight:700}
.mbm-success{color:#008a20}
.mbm-error{color:#b32d2e}
.mbm-print-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
@media(max-width:900px){.mbm-pos-grid{grid-template-columns:1fr}.mbm-form-row{grid-template-columns:1fr}}

.mbm-discount-box{margin-top:14px;padding-top:14px;border-top:1px solid #eee}
.mbm-total-row.small-total{font-size:14px;margin-top:8px;padding-top:0;border-top:0;color:#50575e}

.mbm-pos-frontend-page{max-width:1320px;margin:20px auto;padding:10px}
.mbm-pos-frontend-page .mbm-pos-wrap{font-family:Arial,sans-serif}
.mbm-pos-frontend-page .button,.mbm-pos-login .button{display:inline-block;text-decoration:none}
.mbm-pos-login{max-width:420px;margin:40px auto;background:#fff;border:1px solid #ddd;border-radius:12px;padding:20px}
.mbm-pos-login input[type="text"],.mbm-pos-login input[type="password"]{width:100%;padding:10px}

.mbm-scan-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
.mbm-scan-help{font-size:12px;color:#646970;margin:8px 0}
#mbm-scanner-box{margin:12px 0;padding:12px;border:1px solid #ddd;border-radius:10px;background:#fafafa}
#mbm-reader{width:100%;max-width:420px;margin:0 auto 10px}
@media(max-width:600px){.mbm-scan-row{grid-template-columns:1fr}.mbm-scan-row .button{width:100%;text-align:center}}

.mbm-pos-clean-page{max-width:1320px!important;margin:0 auto!important;padding:0!important}
.mbm-pos-standalone-body .mbm-pos-wrap h1{display:none}
.mbm-pos-standalone-body .mbm-pos-grid{max-width:none}
.mbm-pos-standalone-body .mbm-card{border-radius:10px}
.mbm-pos-standalone-body a.page-title-action{display:none!important}

/* v2.1 mobile POS layout fixes */
@media(max-width:768px){
	.mbm-standalone-content{padding:8px!important}
	.mbm-pos-frontend-page{padding:0!important;margin:0!important;width:100%!important}
	.mbm-pos-grid{display:flex!important;flex-direction:column!important;gap:10px!important}
	.mbm-pos-products,.mbm-pos-cart{width:100%!important;min-width:0!important}
	.mbm-card{padding:12px!important;margin-bottom:10px!important;border-radius:10px!important}
	.mbm-card h2{font-size:18px!important;margin-bottom:10px!important}
	#mbm-pos-search,.mbm-form-row input,.mbm-form-row select,#mbm-order-note{font-size:16px!important;min-height:44px!important}
	#mbm-pos-cart-table{display:block!important;width:100%!important;overflow-x:auto!important;white-space:normal!important}
	#mbm-pos-cart-table thead,#mbm-pos-cart-table tbody,#mbm-pos-cart-table tr{width:100%!important}
	#mbm-pos-cart-table th,#mbm-pos-cart-table td{font-size:12px!important;padding:8px 5px!important;vertical-align:middle!important}
	#mbm-pos-cart-table input[type="number"]{width:55px!important;min-height:36px!important}
	.mbm-product{align-items:flex-start!important;padding:10px!important;gap:8px!important}
	.mbm-product img{width:48px!important;height:48px!important;flex:0 0 48px!important}
	.mbm-product-info{min-width:0!important}
	.mbm-product-title{font-size:13px!important;line-height:1.25!important;word-break:break-word!important}
	.mbm-product-meta{font-size:11px!important}
	.mbm-add-product{padding:6px 9px!important;min-height:34px!important}
	.mbm-total-row{font-size:18px!important;position:relative!important;background:#fff!important}
	.mbm-total-row.small-total{font-size:13px!important}
	.mbm-print-buttons .button{width:100%!important;text-align:center!important;margin:3px 0!important}
	.mbm-standalone-topbar{position:sticky!important;top:0!important;z-index:999999!important}
}
@media(max-width:420px){
	#mbm-pos-cart-table th:nth-child(3),#mbm-pos-cart-table td:nth-child(3){display:none!important}
	#mbm-pos-cart-table th:nth-child(1),#mbm-pos-cart-table td:nth-child(1){min-width:150px!important}
}

.mbm-recent-list{display:flex;flex-direction:column;gap:10px}
.mbm-recent-order{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #eee;background:#fafafa;border-radius:10px;padding:10px}
.mbm-recent-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:768px){
	.mbm-recent-order{align-items:flex-start;flex-direction:column}
	.mbm-recent-actions{width:100%}
	.mbm-recent-actions .button{flex:1;text-align:center}
}

.mbm-extra-item-box{margin-top:14px;padding-top:14px;border-top:1px solid #eee}
.mbm-extra-item-grid{display:grid;grid-template-columns:1.5fr .8fr .5fr auto;gap:8px;margin-top:8px}
.mbm-extra-item-grid input{width:100%;padding:10px;border:1px solid #ccd0d4;border-radius:8px;box-sizing:border-box}
@media(max-width:768px){
	.mbm-extra-item-grid{grid-template-columns:1fr 1fr}
	#mbm-add-extra-item{grid-column:1/-1;width:100%}
}

/* v2.1.6 notification overlap + saved order fixes */
#mbm-pos-message{
	position:relative!important;
	z-index:1!important;
	clear:both!important;
	display:block!important;
	margin-top:12px!important;
	padding:10px 12px!important;
	border-radius:8px!important;
	background:#fff!important;
	line-height:1.35!important;
	white-space:normal!important;
	word-break:break-word!important;
}
#mbm-pos-message:empty{display:none!important}
#mbm-pos-message.mbm-success{background:#e9f7ef!important;border:1px solid #8fd19e!important;color:#007a3d!important}
#mbm-pos-message.mbm-error{background:#fdeaea!important;border:1px solid #e08b8b!important;color:#b32d2e!important}
.mbm-order-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:center}
.mbm-order-actions .button{width:100%;text-align:center}
.mbm-hold-card{margin-top:12px!important}
.mbm-held-list{display:flex;flex-direction:column;gap:8px}
.mbm-held-order{display:flex;justify-content:space-between;gap:10px;align-items:center;background:#fafafa;border:1px solid #eee;border-radius:10px;padding:10px}
.mbm-held-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:768px){
	#mbm-pos-message{
		position:static!important;
		margin:10px 0!important;
		width:100%!important;
		box-sizing:border-box!important;
		font-size:13px!important;
	}
	.mbm-order-actions{grid-template-columns:1fr!important}
	.mbm-held-order{flex-direction:column;align-items:flex-start}
	.mbm-held-actions{width:100%}
	.mbm-held-actions .button{flex:1;text-align:center}
	.mbm-hold-card h2{font-size:16px!important}
}

.mbm-loyalty-box{display:flex;align-items:center;gap:10px;background:#fafafa;border:1px solid #eee;border-radius:8px;padding:10px;margin-bottom:12px}
#mbm-loyalty-info{font-weight:700}
#mbm-return-message{margin-top:10px;padding:8px;border-radius:8px}
@media(max-width:768px){.mbm-loyalty-box{flex-direction:column;align-items:flex-start}.mbm-loyalty-box .button{width:100%}}

.mbm-due-box,.mbm-offline-status{display:flex;align-items:center;gap:10px;background:#fafafa;border:1px solid #eee;border-radius:8px;padding:10px;margin-bottom:12px}
#mbm-due-info,#mbm-offline-count{font-weight:700}
#mbm-due-payment-message{margin-top:10px;padding:8px;border-radius:8px}
@media(max-width:768px){.mbm-due-box,.mbm-offline-status{flex-direction:column;align-items:flex-start}.mbm-due-box .button,.mbm-offline-status .button{width:100%}}

/* v3.1.2 cart product image */
.mbm-cart-product{display:flex;align-items:center;gap:8px;min-width:0}
.mbm-cart-product img,.mbm-cart-noimg{width:42px;height:42px;border-radius:7px;object-fit:cover;flex:0 0 42px;background:#f0f0f1;border:1px solid #ddd}
.mbm-cart-noimg{display:flex;align-items:center;justify-content:center;font-size:10px;color:#646970;font-weight:700}
.mbm-cart-product strong{display:block;line-height:1.2;word-break:break-word}
@media(max-width:768px){
	.mbm-cart-product img,.mbm-cart-noimg{width:36px;height:36px;flex-basis:36px}
	.mbm-cart-product{gap:6px}
}


/* v3.1.3-image-tweak: stable card size, slightly bigger images only */
.mbm-due-box,
#mbm-due-payment-message{
	display:none!important;
}

/* Keep product card/grid sizing from stable version. Only image content is slightly bigger. */
.mbm-product img{
	transform:scale(1.12);
	transform-origin:center center;
	object-fit:contain!important;
}

/* Prevent enlarged image from affecting card size */
.mbm-product{
	overflow:hidden!important;
}

/* Slightly bigger cart product images only */
.mbm-cart-product img,
.mbm-cart-noimg{
	width:50px!important;
	height:50px!important;
	flex:0 0 50px!important;
	object-fit:contain!important;
}

/* Mobile: keep it clean */
@media(max-width:768px){
	.mbm-product img{
		transform:scale(1.08);
	}
	.mbm-cart-product img,
	.mbm-cart-noimg{
		width:42px!important;
		height:42px!important;
		flex-basis:42px!important;
	}
}

/* v3.1.4 extra item popup */
#mbm-show-extra-item{
	width:100%!important;
	min-height:42px!important;
	background:#00a99d!important;
	color:#fff!important;
	border:0!important;
	border-radius:8px!important;
	font-weight:800!important;
	text-transform:uppercase;
}
#mbm-extra-item-panel{
	background:#f8fafc!important;
	border:1px solid #e6ebef!important;
	border-radius:10px!important;
	padding:12px!important;
}


/* v3.1.6 button color fix */
.mbm-pos-wrap .button,
.mbm-pos-frontend-page .button,
.mbm-pos-standalone-body .button{
	border-radius:8px!important;
	font-weight:800!important;
	box-shadow:none!important;
	text-decoration:none!important;
	cursor:pointer!important;
}

/* Primary teal buttons */
#mbm-camera-scan,
.mbm-add-product,
#mbm-show-extra-item,
#mbm-add-extra-item,
#mbm-refresh-orders,
#mbm-check-loyalty,
#mbm-sync-offline,
#mbm-process-return,
.mbm-recent-actions .button-primary,
.mbm-held-actions .button-primary,
.mbm-print-buttons .button-primary{
	background:#00a99d!important;
	border-color:#00a99d!important;
	color:#ffffff!important;
}

.mbm-whatsapp-receipt{
	background:#25d366!important;
	border-color:#25d366!important;
	color:#ffffff!important;
}

.mbm-receipt-pdf{
	background:#7c3aed!important;
	border-color:#7c3aed!important;
	color:#ffffff!important;
}

/* Main order button green */
#mbm-create-order{
	background:#16a34a!important;
	border-color:#16a34a!important;
	color:#ffffff!important;
	font-weight:900!important;
}

/* Save / hold order amber */
#mbm-save-hold-order{
	background:#f59e0b!important;
	border-color:#f59e0b!important;
	color:#ffffff!important;
	font-weight:900!important;
}

/* Secondary buttons */
.mbm-print-buttons .button-secondary,
.mbm-recent-actions .button:not(.button-primary),
.mbm-held-actions .button:not(.button-primary),
#mbm-stop-scan{
	background:#334155!important;
	border-color:#334155!important;
	color:#ffffff!important;
}

/* Delete/remove buttons */
.mbm-remove,
.mbm-delete-held{
	background:#ef4444!important;
	border-color:#ef4444!important;
	color:#ffffff!important;
}

/* Extra item add button */
#mbm-add-extra-item{
	background:#0ea5e9!important;
	border-color:#0ea5e9!important;
	color:#ffffff!important;
}

/* Print A4 buttons */
a[href*="mbm_pos_print_a4_invoice"],
.mbm-recent-actions a[href*="mbm_pos_print_a4_invoice"]{
	background:#475569!important;
	border-color:#475569!important;
	color:#ffffff!important;
}

/* Thermal buttons */
a[href*="mbm_pos_print_thermal_receipt"],
.mbm-recent-actions a[href*="mbm_pos_print_thermal_receipt"]{
	background:#00a99d!important;
	border-color:#00a99d!important;
	color:#ffffff!important;
}

/* Hover */
.mbm-pos-wrap .button:hover,
.mbm-pos-frontend-page .button:hover,
.mbm-pos-standalone-body .button:hover{
	filter:brightness(.94)!important;
	color:#ffffff!important;
}

/* Disabled */
.mbm-pos-wrap .button:disabled{
	background:#cbd5e1!important;
	border-color:#cbd5e1!important;
	color:#64748b!important;
	cursor:not-allowed!important;
}


/* v3.1.7 mobile cart price fix */
@media(max-width:768px){
	#mbm-pos-cart-table{
		display:table!important;
		width:100%!important;
		table-layout:auto!important;
		overflow:visible!important;
		white-space:normal!important;
	}
	#mbm-pos-cart-table thead{
		display:table-header-group!important;
	}
	#mbm-pos-cart-table tbody{
		display:table-row-group!important;
	}
	#mbm-pos-cart-table tr{
		display:table-row!important;
		width:auto!important;
		min-height:0!important;
	}
	#mbm-pos-cart-table th,
	#mbm-pos-cart-table td{
		display:table-cell!important;
		font-size:11px!important;
		padding:7px 4px!important;
		vertical-align:middle!important;
	}
	#mbm-pos-cart-table th:nth-child(1),
	#mbm-pos-cart-table td:nth-child(1){
		width:48%!important;
		min-width:0!important;
	}
	#mbm-pos-cart-table th:nth-child(2),
	#mbm-pos-cart-table td:nth-child(2){
		width:18%!important;
		text-align:center!important;
	}
	#mbm-pos-cart-table th:nth-child(3),
	#mbm-pos-cart-table td:nth-child(3){
		display:table-cell!important;
		width:22%!important;
		text-align:right!important;
		font-weight:800!important;
	}
	#mbm-pos-cart-table th:nth-child(4),
	#mbm-pos-cart-table td:nth-child(4){
		width:12%!important;
		text-align:center!important;
	}
	#mbm-pos-cart-table input[type="number"]{
		width:42px!important;
		min-height:32px!important;
		height:32px!important;
		font-size:13px!important;
		padding:2px!important;
	}
	.mbm-cart-product{
		display:flex!important;
		gap:5px!important;
		align-items:center!important;
		min-width:0!important;
	}
	.mbm-cart-product img,
	.mbm-cart-noimg{
		width:34px!important;
		height:34px!important;
		flex:0 0 34px!important;
	}
	.mbm-cart-product strong{
		font-size:11px!important;
		line-height:1.15!important;
		max-height:26px!important;
		overflow:hidden!important;
	}
	.mbm-cart-product small{
		font-size:9px!important;
	}
	.mbm-remove{
		width:28px!important;
		height:28px!important;
		min-height:28px!important;
		padding:0!important;
		font-size:15px!important;
	}
}

/* Override older rule that hid price column on very small phones */
@media(max-width:420px){
	#mbm-pos-cart-table th:nth-child(3),
	#mbm-pos-cart-table td:nth-child(3){
		display:table-cell!important;
	}
	#mbm-pos-cart-table th:nth-child(1),
	#mbm-pos-cart-table td:nth-child(1){
		min-width:0!important;
	}
}

/* v3.2 Phase 1 improvements */
.mbm-quick-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 12px}
.mbm-cat-tab{background:#f1f5f9!important;border:1px solid #dbe3e8!important;color:#334155!important;font-weight:800!important;border-radius:8px!important}
.mbm-cat-tab.active{background:#00a99d!important;border-color:#00a99d!important;color:#fff!important}
.mbm-fast-products{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:10px;margin-bottom:12px}
.mbm-quick-product{min-height:170px!important}
.mbm-quick-product img{height:105px!important;object-fit:contain!important;background:#fff!important}
.mbm-quick-product .mbm-product-title{font-size:12px!important;line-height:1.2!important;max-height:32px!important;overflow:hidden}
.mbm-quick-product .mbm-product-meta{font-size:11px!important}
.mbm-quick-discount{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 10px}
.mbm-quick-disc,.mbm-clear-disc{font-weight:800!important;border-radius:8px!important}
.mbm-quick-disc{background:#e0f7f5!important;border-color:#00a99d!important;color:#008a82!important}
.mbm-clear-disc{background:#f1f5f9!important;border-color:#cbd5e1!important;color:#334155!important}
.mbm-split-payment-box{background:#f8fafc;border:1px solid #e6ebef;border-radius:10px;padding:12px;margin:10px 0}
.mbm-split-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:8px}
.mbm-split-grid input{width:100%;padding:10px;border:1px solid #dbe3e8;border-radius:8px;box-sizing:border-box}
#mbm-split-summary{font-weight:900;margin-top:8px;color:#00a99d}
.mbm-ledger-card{background:#fff!important}
.mbm-ledger-box{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f8fafc;border:1px solid #e6ebef;border-radius:8px;padding:10px;margin-bottom:10px}
.mbm-ledger-payment{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;margin-bottom:10px}
.mbm-ledger-payment input,.mbm-ledger-payment select{width:100%;padding:10px;border:1px solid #dbe3e8;border-radius:8px;box-sizing:border-box}
.mbm-ledger-entry{background:#f8fafc;border:1px solid #e6ebef;border-radius:8px;padding:10px;margin-top:8px}
.mbm-ledger-entry small{color:#64748b}
@media(max-width:900px){
	.mbm-fast-products{grid-template-columns:repeat(2,minmax(120px,1fr))}
	.mbm-split-grid{grid-template-columns:repeat(2,1fr)}
	.mbm-ledger-payment{grid-template-columns:1fr}
	.mbm-ledger-box{flex-direction:column;align-items:flex-start}
}
@media(max-width:430px){
	.mbm-fast-products{grid-template-columns:1fr}
	.mbm-split-grid{grid-template-columns:1fr}
}

/* v3.2.1 tabs fix - force visibility */
.mbm-quick-tabs{
	display:flex!important;
	gap:8px!important;
	flex-wrap:wrap!important;
	margin:10px 0 12px!important;
}
.mbm-cat-tab{
	display:inline-flex!important;
	align-items:center!important;
	justify-content:center!important;
	background:#f1f5f9!important;
	border:1px solid #dbe3e8!important;
	color:#334155!important;
	font-weight:800!important;
	border-radius:8px!important;
	min-height:36px!important;
}
.mbm-cat-tab.active{
	background:#00a99d!important;
	border-color:#00a99d!important;
	color:#fff!important;
}
.mbm-fast-products{
	display:grid!important;
	grid-template-columns:repeat(3,minmax(120px,1fr))!important;
	gap:10px!important;
	margin:10px 0 14px!important;
	clear:both!important;
}
.mbm-fast-products > p{
	grid-column:1/-1!important;
	background:#fff!important;
	border:1px solid #e6ebef!important;
	border-radius:8px!important;
	padding:10px!important;
	margin:0!important;
}
.mbm-fast-products .mbm-product{
	display:flex!important;
	min-height:170px!important;
}
.mbm-fast-products .mbm-product img{
	height:105px!important;
	object-fit:contain!important;
}
@media(max-width:900px){
	.mbm-fast-products{grid-template-columns:repeat(2,minmax(120px,1fr))!important}
}
@media(max-width:430px){
	.mbm-fast-products{grid-template-columns:1fr!important}
}

/* v3.2.2 click-to-open */
#mbm-show-fast-products,
#mbm-show-discount{
	width:100%!important;
	min-height:42px!important;
	background:#00a99d!important;
	color:#fff!important;
	border:0!important;
	border-radius:8px!important;
	font-weight:900!important;
	text-transform:uppercase!important;
	margin:8px 0!important;
}
#mbm-fast-products-panel,
#mbm-discount-panel{
	background:#f8fafc!important;
	border:1px solid #e6ebef!important;
	border-radius:10px!important;
	padding:12px!important;
	margin:10px 0!important;
}

/* v3.2.3 top sold only */
.mbm-quick-tabs,
.mbm-cat-tab{
	display:none!important;
}
#mbm-show-fast-products{
	background:#00a99d!important;
	color:#fff!important;
}

/* v3.2.5 no due ledger safety */
.mbm-due-box,
#mbm-due-payment-message,
a[href*="mbm-pos-due-ledger"],
button[id*="due"],
button[class*="due"]{display:none!important}
.mbm-ledger-card,
.mbm-ledger-card button,
.mbm-ledger-card input,
.mbm-ledger-card select{display:revert!important}
