/* Responsive V6 — consistent desktop/tablet/mobile layout */
:root{--v6-space:clamp(12px,1.5vw,24px);--v6-control-h:44px;--v6-radius:14px}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.mf-classic-v4{min-width:320px;overflow-x:hidden}
body.mf-classic-v4 .sidebar-layout,body.mf-classic-v4 .main-area,body.mf-classic-v4 .content-area{min-width:0;max-width:100%}
body.mf-classic-v4 .main-area{width:calc(100% - var(--sidebar-width));overflow:visible}
body.mf-classic-v4.sidebar-collapsed .main-area{width:100%}
body.mf-classic-v4 .content-area{width:100%;min-width:0;padding:clamp(14px,2vw,28px)!important;overflow-x:clip}
body.mf-classic-v4 .content-area>*{min-width:0;max-width:100%}
body.mf-classic-v4 .content-area .row{min-width:0;max-width:100%}
body.mf-classic-v4 .content-area [class*=col-]{min-width:0}
body.mf-classic-v4 .page-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;min-width:0}
body.mf-classic-v4 .page-header>div,body.mf-classic-v4 .page-header .header-actions{min-width:0;max-width:100%;display:flex;align-items:center;flex-wrap:wrap;gap:8px}
body.mf-classic-v4 .page-header h1,body.mf-classic-v4 .page-header h2{max-width:100%;overflow-wrap:anywhere}
body.mf-classic-v4 .card,body.mf-classic-v4 .card-modern,body.mf-classic-v4 .stat-card,body.mf-classic-v4 .summary-card,body.mf-classic-v4 .dash-panel,body.mf-classic-v4 .form-card{min-width:0;max-width:100%;height:auto}
body.mf-classic-v4 .card-body,body.mf-classic-v4 .card-header,body.mf-classic-v4 .card-footer{min-width:0;overflow-wrap:anywhere}
body.mf-classic-v4 .stats-grid,body.mf-classic-v4 .summary-cards,body.mf-classic-v4 .dash-kpi-grid,body.mf-classic-v4 .dash-quick-actions{grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr));min-width:0}
body.mf-classic-v4 .dash-main-grid,body.mf-classic-v4 .dash-bottom-grid{grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr)}
body.mf-classic-v4 .dash-kpi,body.mf-classic-v4 .dash-quick-actions>a{min-width:0}
body.mf-classic-v4 .dash-kpi strong{overflow-wrap:anywhere;white-space:normal}
body.mf-classic-v4 .dash-panel{overflow:hidden}
body.mf-classic-v4 .dash-panel .table-responsive{max-width:100%;overflow-x:auto}
body.mf-classic-v4 .table-responsive,body.mf-classic-v4 .v6-table-scroll,body.mf-classic-v4 .dataTables_wrapper{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
body.mf-classic-v4 .v6-table-scroll{width:100%;border-radius:12px}
body.mf-classic-v4 .v6-table-scroll>table{margin-bottom:0}
body.mf-classic-v4 .content-area table{max-width:100%}
body.mf-classic-v4 .content-area table th,body.mf-classic-v4 .content-area table td{vertical-align:middle}
body.mf-classic-v4 .content-area .table{--bs-table-bg:transparent}
body.mf-classic-v4 .content-area .table thead th{white-space:nowrap}
body.mf-classic-v4 .content-area .table td{overflow-wrap:anywhere}

/* Controls: reliable hit targets, clear focus and readable fields */
body.mf-classic-v4 .btn,body.mf-classic-v4 button,body.mf-classic-v4 input[type=button],body.mf-classic-v4 input[type=submit]{touch-action:manipulation}
body.mf-classic-v4 .content-area .btn,body.mf-classic-v4 .content-area button.btn{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:normal;line-height:1.25}
body.mf-classic-v4 .content-area .btn-sm{min-height:34px;padding:6px 10px!important;font-size:12px!important}
body.mf-classic-v4 .content-area .btn-group{display:inline-flex;flex-wrap:wrap;gap:5px;max-width:100%}
body.mf-classic-v4 .content-area .btn-group>.btn{border-radius:9px!important}
body.mf-classic-v4 .content-area .btn:disabled,body.mf-classic-v4 .content-area button:disabled{opacity:.55;cursor:not-allowed;transform:none!important}
body.mf-classic-v4 a:focus-visible,body.mf-classic-v4 button:focus-visible,body.mf-classic-v4 input:focus-visible,body.mf-classic-v4 select:focus-visible,body.mf-classic-v4 textarea:focus-visible{outline:3px solid rgba(118,82,200,.32)!important;outline-offset:2px}
body.mf-classic-v4 .content-area .form-control,body.mf-classic-v4 .content-area .form-select,body.mf-classic-v4 .content-area input:not([type=checkbox]):not([type=radio]):not([type=range]),body.mf-classic-v4 .content-area select,body.mf-classic-v4 .content-area textarea{width:100%;max-width:100%;min-width:0;min-height:var(--v6-control-h);font-size:14px!important;line-height:1.4;padding:9px 12px!important}
body.mf-classic-v4 .content-area textarea{min-height:100px;resize:vertical}
body.mf-classic-v4 .content-area input[type=checkbox],body.mf-classic-v4 .content-area input[type=radio]{width:18px;height:18px;vertical-align:middle;cursor:pointer}
body.mf-classic-v4 .content-area label,body.mf-classic-v4 .content-area .form-label{display:inline-block;max-width:100%;overflow-wrap:anywhere;font-weight:650}
body.mf-classic-v4 .content-area .input-group{max-width:100%;min-width:0;flex-wrap:nowrap}
body.mf-classic-v4 .content-area .input-group>.form-control,body.mf-classic-v4 .content-area .input-group>.form-select{min-width:0}
body.mf-classic-v4 .content-area .input-group-text{display:flex;align-items:center;white-space:nowrap}
body.mf-classic-v4 .content-area .form-text,body.mf-classic-v4 .content-area .text-muted{overflow-wrap:anywhere}
body.mf-classic-v4 .content-area .dropdown-menu,body.mf-classic-v4 .user-menu,body.mf-classic-v4 #mfv4SearchResults{max-width:min(92vw,360px);max-height:min(70vh,480px);overflow-y:auto;overscroll-behavior:contain}
body.mf-classic-v4 .modal{padding:0!important}
body.mf-classic-v4 .modal-dialog{width:auto;max-width:min(960px,calc(100vw - 32px));margin:16px auto}
body.mf-classic-v4 .modal-dialog.modal-sm{max-width:min(420px,calc(100vw - 28px))}
body.mf-classic-v4 .modal-dialog.modal-lg{max-width:min(960px,calc(100vw - 32px))}
body.mf-classic-v4 .modal-dialog.modal-xl{max-width:min(1140px,calc(100vw - 32px))}
body.mf-classic-v4 .modal-content{max-height:calc(100dvh - 32px);display:flex;flex-direction:column;min-height:0}
body.mf-classic-v4 .modal-header,body.mf-classic-v4 .modal-footer{flex-shrink:0;gap:8px;flex-wrap:wrap}
body.mf-classic-v4 .modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
body.mf-classic-v4 .modal-title{overflow-wrap:anywhere}
body.mf-classic-v4 .modal-footer>*{max-width:100%}
body.mf-classic-v4 .alert,body.mf-classic-v4 .toast{overflow-wrap:anywhere}
body.mf-classic-v4 .top-bar{gap:8px;padding-inline:clamp(8px,1.4vw,22px)!important}
body.mf-classic-v4 .header-left,body.mf-classic-v4 .header-right{min-width:0;gap:8px!important}
body.mf-classic-v4 .header-right{padding-right:0!important}
body.mf-classic-v4 .header-right>*{flex-shrink:0}
body.mf-classic-v4 .header-right button,body.mf-classic-v4 .sidebar-toggle{min-width:40px;min-height:40px}
body.mf-classic-v4 .user-menu{right:0;z-index:1600}
body.mf-classic-v4 .overlay{z-index:1400!important}
body.mf-classic-v4 #sidebar.mf-sidebar-v4{z-index:1410!important}

/* Tablet and small laptop */
@media(max-width:1200px){
 body.mf-classic-v4 .dash-main-grid,body.mf-classic-v4 .dash-bottom-grid{grid-template-columns:minmax(0,1fr)}
 body.mf-classic-v4 .dash-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.mf-classic-v4 .dash-quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.mf-classic-v4 .content-area .row>[class*=col-xl-]{margin-bottom:12px}
}
@media(max-width:992px){
 body.mf-classic-v4 .main-area{width:100%!important;margin:var(--header-height) 0 0!important;min-height:calc(100dvh - var(--header-height))}
 body.mf-classic-v4.sidebar-collapsed .main-area{width:100%!important}
 body.mf-classic-v4 .top-bar{left:0!important;right:0!important;width:100%;height:60px!important}
 body.mf-classic-v4 #sidebar.mf-sidebar-v4{position:fixed!important;inset:0 auto 0 0!important;width:min(320px,88vw)!important;max-width:88vw!important;height:100dvh!important;max-height:100dvh!important;transform:translateX(-105%);left:0!important;right:auto!important;visibility:hidden!important;opacity:1!important;transition:transform .25s ease,visibility .25s ease!important;border-radius:0 16px 16px 0!important;overflow:hidden!important}
 body.mf-classic-v4 #sidebar.mf-sidebar-v4.open{transform:translateX(0)!important;visibility:visible!important}
 body.mf-classic-v4.sidebar-collapsed #sidebar.mf-sidebar-v4{transform:translateX(-105%)}
 body.mf-classic-v4.sidebar-collapsed #sidebar.mf-sidebar-v4.open{transform:translateX(0)}
 body.mf-classic-v4 #sidebar .mf-sidebar-scroll{min-height:0;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 body.mf-classic-v4 #sidebar .mf-sidebar-top{flex-shrink:0}
 body.mf-classic-v4 #sidebar .mf-sidebar-footer{flex-shrink:0}
 body.mf-classic-v4 .sidebar-toggle{display:flex!important}
 body.mf-classic-v4 .content-area{padding:16px!important}
 body.mf-classic-v4 .mfv4-head-search{display:flex!important;flex:1;min-width:0!important;width:auto!important;margin:0 6px!important}
 body.mf-classic-v4 .mfv4-head-search input{width:100%!important;min-width:0}
 body.mf-classic-v4 .header-right{gap:5px!important}
 body.mf-classic-v4 .dash-main-grid,body.mf-classic-v4 .dash-bottom-grid{grid-template-columns:minmax(0,1fr)}
 body.mf-classic-v4 .dash-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.mf-classic-v4 .dash-quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.mf-classic-v4 .content-area .row{--bs-gutter-x:1rem;--bs-gutter-y:1rem}
}
@media(max-width:767px){
 body.mf-classic-v4 .content-area{padding:13px 12px!important}
 body.mf-classic-v4 .page-header{align-items:flex-start;padding-bottom:13px!important;margin-bottom:15px!important}
 body.mf-classic-v4 .page-header h1,body.mf-classic-v4 .page-header h2{font-size:19px!important;line-height:1.35}
 body.mf-classic-v4 .page-header .header-actions{width:100%;justify-content:flex-start}
 body.mf-classic-v4 .page-header .header-actions .btn{flex:0 1 auto}
 body.mf-classic-v4 .stats-grid,body.mf-classic-v4 .summary-cards,body.mf-classic-v4 .dash-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 body.mf-classic-v4 .dash-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
 body.mf-classic-v4 .dash-welcome{padding:19px!important;align-items:flex-start;flex-direction:column}
 body.mf-classic-v4 .dash-welcome-meta{align-items:flex-start;text-align:left}
 body.mf-classic-v4 .dash-panel{padding:14px!important}
 body.mf-classic-v4 .dash-panel-head{align-items:flex-start;flex-wrap:wrap}
 body.mf-classic-v4 .card-body{padding:14px!important}
 body.mf-classic-v4 .content-area .row>[class*=col-]{min-width:0}
 body.mf-classic-v4 .modal-dialog{max-width:calc(100vw - 20px)!important;margin:10px auto!important}
 body.mf-classic-v4 .modal-content{max-height:calc(100dvh - 20px)}
 body.mf-classic-v4 .modal-body{padding:14px!important}
 body.mf-classic-v4 .site-footer{padding:12px!important;font-size:11px}
 body.mf-classic-v4 .site-footer .developer-info{overflow-wrap:anywhere}
 body.mf-classic-v4 .dash-recent-item{gap:7px}
 body.mf-classic-v4 .dash-recent-amount{white-space:normal;text-align:right}
 body.mf-classic-v4 .dash-recent-amount strong{overflow-wrap:anywhere}
}

/* Phones: remove header crowding and preserve readable touch controls */
@media(max-width:600px){
 :root{--header-height:58px;--v6-control-h:44px}
 body.mf-classic-v4 .top-bar{height:58px!important;padding:0 8px!important;gap:5px!important}
 body.mf-classic-v4 .header-left{gap:4px!important}
 body.mf-classic-v4 .header-left .brand{display:none!important}
 body.mf-classic-v4 .sidebar-toggle{width:40px;height:40px;min-width:40px}
 body.mf-classic-v4 .mfv4-head-search{display:none!important}
 body.mf-classic-v4 .header-right{gap:5px!important}
 body.mf-classic-v4 .header-right .lang-btn{display:flex!important;min-width:40px;min-height:40px;width:40px;padding:0!important;justify-content:center}
 body.mf-classic-v4 .header-right .pos-btn{min-width:40px;min-height:40px;width:40px;padding:0!important;justify-content:center}
 body.mf-classic-v4 .header-right .pos-btn span{display:none!important}
 body.mf-classic-v4 .header-right .theme-btn,body.mf-classic-v4 .header-right .user-btn{min-width:40px;min-height:40px;width:40px;padding:0!important;justify-content:center}
 body.mf-classic-v4 .header-right .user-btn>span:not(.user-avatar),body.mf-classic-v4 .header-right .user-btn>.bi-chevron-down{display:none!important}
 body.mf-classic-v4 .header-right .user-avatar{width:34px;height:34px}
 body.mf-classic-v4 .content-area{padding:11px 9px!important}
 body.mf-classic-v4 .page-header h1,body.mf-classic-v4 .page-header h2{font-size:18px!important}
 body.mf-classic-v4 .content-area .btn,body.mf-classic-v4 .content-area button.btn{min-height:42px;padding:8px 11px!important;font-size:12px!important}
 body.mf-classic-v4 .content-area .btn-sm{min-height:36px;padding:6px 9px!important}
 body.mf-classic-v4 .content-area .form-control,body.mf-classic-v4 .content-area .form-select,body.mf-classic-v4 .content-area input:not([type=checkbox]):not([type=radio]):not([type=range]),body.mf-classic-v4 .content-area select,body.mf-classic-v4 .content-area textarea{font-size:16px!important}
 body.mf-classic-v4 .dash-kpi{padding:12px!important;gap:6px}
 body.mf-classic-v4 .dash-kpi strong{font-size:15px;white-space:normal;overflow-wrap:anywhere}
 body.mf-classic-v4 .dash-kpi .kpi-label{font-size:10px}
 body.mf-classic-v4 .dash-quick-actions>a{padding:11px!important;grid-template-columns:30px minmax(0,1fr);column-gap:8px}
 body.mf-classic-v4 .dash-quick-actions a>i{width:30px;height:30px}
 body.mf-classic-v4 .dash-panel-head>a{white-space:normal}
 body.mf-classic-v4 .content-area .table{min-width:620px}
 body.mf-classic-v4 .v6-table-scroll{margin-bottom:12px}
 body.mf-classic-v4 .content-area .form-actions,body.mf-classic-v4 .content-area .modal-footer{display:flex;flex-wrap:wrap;gap:8px}
 body.mf-classic-v4 .content-area .form-actions>*{flex:1 1 120px}
 body.mf-classic-v4 .content-area .input-group{flex-wrap:nowrap}
 body.mf-classic-v4 .content-area .input-group>.btn{flex:0 0 auto}
 body.mf-classic-v4 .content-area .row>[class*=col-]{margin-bottom:10px}
 body.mf-classic-v4 .content-area .card-header{flex-wrap:wrap;gap:8px}
 body.mf-classic-v4 .content-area .card-header>*{max-width:100%}
 body.mf-classic-v4 .user-menu{right:-4px!important;min-width:190px}
 body.mf-classic-v4 #sidebar .mf-nav-row>a.mf-nav-leaf-link,body.mf-classic-v4 #sidebar .mf-nav-group-btn{min-height:46px!important}
 body.mf-classic-v4 #sidebar .mf-nav-children .mf-nav-row>a.mf-nav-leaf-link{min-height:42px!important}
}
@media(max-width:380px){
 body.mf-classic-v4 .header-right{gap:3px!important}
 body.mf-classic-v4 .header-right .pos-btn,body.mf-classic-v4 .header-right .theme-btn,body.mf-classic-v4 .header-right .user-btn{width:36px;min-width:36px;min-height:38px}
 body.mf-classic-v4 .sidebar-toggle{width:38px;min-width:38px}
 body.mf-classic-v4 .content-area{padding:9px 7px!important}
 body.mf-classic-v4 .dash-welcome h1{font-size:18px}
 body.mf-classic-v4 .dash-kpi{padding:10px!important}
}
@media(hover:none){
 body.mf-classic-v4 .btn:hover,body.mf-classic-v4 a:hover{transform:none}
 body.mf-classic-v4 #sidebar .mf-pin-btn{opacity:.75!important}
}
@media(prefers-reduced-motion:reduce){
 body.mf-classic-v4 *,body.mf-classic-v4 *::before,body.mf-classic-v4 *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}
}
@media print{
 body.mf-classic-v4 .top-bar,body.mf-classic-v4 #sidebar,body.mf-classic-v4 .overlay,body.mf-classic-v4 .site-footer{display:none!important}
 body.mf-classic-v4 .main-area{width:100%!important;margin:0!important}
 body.mf-classic-v4 .content-area{padding:0!important;overflow:visible!important}
 body.mf-classic-v4 .v6-table-scroll{overflow:visible!important}
}
body.mf-classic-v4.v6-drawer-open{overflow:hidden}
@media(max-width:600px){body.mf-classic-v4 .v6-table-scroll>table{min-width:620px}}
/* POS, product and management page-specific responsive refinements */
body.mf-classic-v4.pos .pos-wrapper{grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);gap:14px;height:calc(100dvh - 205px);min-height:540px;max-width:100%}
body.mf-classic-v4.pos .pos-wrapper>*{min-width:0;max-width:100%}
body.mf-classic-v4.pos .pos-products-panel,body.mf-classic-v4.pos .pos-cart-panel{min-width:0;max-width:100%;min-height:0}
body.mf-classic-v4.pos .products-filters{align-items:stretch;min-width:0}
body.mf-classic-v4.pos .products-filters .search-box{flex:1 1 200px;min-width:min(100%,200px)}
body.mf-classic-v4.pos .products-filters select{flex:1 1 140px;min-width:0;max-width:100%}
body.mf-classic-v4.pos .products-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,112px),1fr));min-width:0}
body.mf-classic-v4.pos .product-card{min-width:0}
body.mf-classic-v4.pos .product-card img{max-width:100%;height:auto;object-fit:contain}
body.mf-classic-v4.pos .cart-body,body.mf-classic-v4.pos .cart-items{min-width:0;overflow-x:auto}
body.mf-classic-v4.pos .cart-summary,body.mf-classic-v4.pos .payment-section{min-width:0}
body.mf-classic-v4 .search-filter-bar{flex-wrap:wrap;min-width:0}
body.mf-classic-v4 .search-filter-bar>*{min-width:0;max-width:100%}
body.mf-classic-v4 .admin-hero{max-width:100%;padding:clamp(18px,3vw,36px)}
body.mf-classic-v4 .admin-hero h1{flex-wrap:wrap;overflow-wrap:anywhere}
body.mf-classic-v4 .admin-hero::before,body.mf-classic-v4 .admin-hero::after{max-width:45vw;max-height:45vw}
body.mf-classic-v4 .content-area [style*="width: 400px"],body.mf-classic-v4 .content-area [style*="width:400px"],body.mf-classic-v4 .content-area [style*="width: 300px"],body.mf-classic-v4 .content-area [style*="width:300px"]{max-width:100%!important}
@media(max-width:1200px){
 body.mf-classic-v4.pos .pos-wrapper{grid-template-columns:minmax(0,1fr) minmax(320px,.9fr);height:auto;min-height:0}
}
@media(max-width:992px){
 body.mf-classic-v4.pos .pos-wrapper{grid-template-columns:minmax(0,1fr);height:auto;min-height:0}
 body.mf-classic-v4.pos .pos-products-panel{max-height:55dvh;min-height:320px}
 body.mf-classic-v4.pos .pos-cart-panel{max-height:none;overflow:visible}
}
@media(max-width:600px){
 body.mf-classic-v4.pos .page-header{padding:16px!important;gap:10px}
 body.mf-classic-v4.pos .page-header h1{font-size:20px!important;flex-wrap:wrap}
 body.mf-classic-v4.pos .page-header .header-actions{width:100%}
 body.mf-classic-v4.pos .page-header .header-actions .btn{width:100%}
 body.mf-classic-v4.pos .pos-products-panel{max-height:52dvh;min-height:280px}
 body.mf-classic-v4.pos .products-filters{padding:9px;gap:7px}
 body.mf-classic-v4.pos .products-filters .search-box{flex-basis:100%;min-width:0}
 body.mf-classic-v4.pos .products-filters select{width:100%;flex-basis:100%;min-height:42px}
 body.mf-classic-v4.pos .products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px}
 body.mf-classic-v4.pos .pos-cart-panel{padding:10px!important}
}

/* POS Cart V7 — keep the cart header visible and make every lower section reachable */
body.mf-classic-v4.pos .pos-wrapper{
    grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr)!important;
    height:calc(100dvh - 120px)!important;
    min-height:360px!important;
    max-height:calc(100dvh - 90px);
    align-items:stretch;
}
body.mf-classic-v4.pos .pos-products-panel{
    height:100%;
    min-height:0;
    overflow:hidden;
}
body.mf-classic-v4.pos .pos-cart-panel{
    display:flex;
    flex-direction:column;
    height:100%;
    min-height:0;
    max-height:none!important;
    padding:0 2px 0 0!important;
    overflow:hidden!important;
}
body.mf-classic-v4.pos .cart-card{
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    height:100%!important;
    min-height:0;
    overflow:hidden;
}
body.mf-classic-v4.pos .cart-header{
    position:relative;
    z-index:2;
    flex:0 0 auto;
}
body.mf-classic-v4.pos .cart-body{
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain;
    scrollbar-width:thin;
    scrollbar-color:#b7a6df #f3f0fa;
    -webkit-overflow-scrolling:touch;
}
body.mf-classic-v4.pos .cart-body::-webkit-scrollbar{width:8px}
body.mf-classic-v4.pos .cart-body::-webkit-scrollbar-track{background:#f3f0fa;border-radius:8px}
body.mf-classic-v4.pos .cart-body::-webkit-scrollbar-thumb{background:#b7a6df;border:2px solid #f3f0fa;border-radius:8px}
body.mf-classic-v4.pos .cart-items{
    flex:0 0 auto;
    min-height:80px;
    max-height:clamp(100px,22dvh,180px);
    overflow:auto;
    overscroll-behavior:contain;
}
body.mf-classic-v4.pos .customer-row,
body.mf-classic-v4.pos .summary-card,
body.mf-classic-v4.pos .payment-card{
    flex:0 0 auto;
    min-width:0;
}
body.mf-classic-v4.pos .customer-row .customer-input>*{min-width:0}
body.mf-classic-v4.pos .summary-row{gap:8px;min-width:0}
body.mf-classic-v4.pos .summary-row>span,
body.mf-classic-v4.pos .summary-row>div{min-width:0}
body.mf-classic-v4.pos .summary-row input{max-width:72px}
body.mf-classic-v4.pos .payment-methods{flex-wrap:wrap}
body.mf-classic-v4.pos .method-btn{min-width:72px;min-height:48px}
body.mf-classic-v4.pos .complete-btn{min-height:48px;position:sticky;bottom:0;z-index:1}
@media(max-height:680px) and (min-width:993px){
 body.mf-classic-v4.pos .pos-wrapper{height:calc(100dvh - 105px)!important;min-height:320px!important}
 body.mf-classic-v4.pos .cart-header{padding:9px 12px}
 body.mf-classic-v4.pos .cart-body{gap:8px;padding:8px}
 body.mf-classic-v4.pos .cart-items{max-height:18dvh}
 body.mf-classic-v4.pos .order-card{padding:10px}
 body.mf-classic-v4.pos .summary-card{padding:8px;margin-bottom:6px}
 body.mf-classic-v4.pos .payment-card{padding:9px}
}
@media(max-width:1200px) and (min-width:993px){
 body.mf-classic-v4.pos .pos-wrapper{height:calc(100dvh - 120px)!important;min-height:340px!important}
}
@media(max-width:992px){
 body.mf-classic-v4.pos .pos-wrapper{
  display:grid;
  grid-template-columns:minmax(0,1fr)!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
 }
 body.mf-classic-v4.pos .pos-products-panel{height:auto;max-height:48dvh;min-height:260px}
 body.mf-classic-v4.pos .pos-cart-panel{
  height:auto!important;
  max-height:none!important;
  min-height:0;
  overflow:visible!important;
  padding:0!important;
 }
 body.mf-classic-v4.pos .cart-card{height:auto!important;min-height:0;overflow:visible}
 body.mf-classic-v4.pos .cart-body{overflow:visible!important;min-height:0!important}
 body.mf-classic-v4.pos .cart-items{max-height:220px}
 body.mf-classic-v4.pos .complete-btn{position:static}
}
@media(max-width:600px){
 body.mf-classic-v4.pos .pos-products-panel{max-height:44dvh;min-height:240px}
 body.mf-classic-v4.pos .cart-header{align-items:flex-start;gap:8px;flex-wrap:wrap;padding:10px}
 body.mf-classic-v4.pos .cart-header>div{flex-wrap:wrap}
 body.mf-classic-v4.pos .cart-header .clear-btn{min-height:36px}
 body.mf-classic-v4.pos .cart-body{padding:9px;gap:9px}
 body.mf-classic-v4.pos .cart-table{min-width:0;table-layout:fixed}
 body.mf-classic-v4.pos .cart-table th,
 body.mf-classic-v4.pos .cart-table td{padding:7px 4px;overflow-wrap:anywhere}
 body.mf-classic-v4.pos .payment-inputs{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 body.mf-classic-v4.pos .payment-inputs>div{min-width:0}
 body.mf-classic-v4.pos .payment-inputs .form-control{width:100%;min-width:0}
 body.mf-classic-v4.pos .payment-methods{gap:5px}
 body.mf-classic-v4.pos .method-btn{flex:1 1 0;min-width:0;padding:8px 3px}
 body.mf-classic-v4.pos .summary-row{padding:7px 6px}
}
