/* Presentation only: preserve original controls, fields, tables and handlers. */
.crm-mobile-nav{display:none}
.crm-full-table-toggle{display:none}
.crm-order-field{display:contents}
.crm-mobile-menu{border:0;border-radius:18px;width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;color:#19364a;box-shadow:0 24px 80px #0004}
.crm-mobile-menu::backdrop{background:#122b4280}
.crm-mobile-menu header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;border-bottom:1px solid #e1e8ee}
.crm-mobile-menu h2{font:700 20px system-ui;margin:0}
.crm-mobile-menu nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:16px;max-height:65dvh;overflow:auto}
.crm-mobile-menu a,.crm-mobile-menu button{font:inherit;color:inherit;border:1px solid #d9e3e9;border-radius:10px;background:#f8fafc;padding:12px;text-decoration:none;min-height:44px}
.crm-mobile-menu [aria-current=page]{background:#e5f3fa;color:#0b5266;border-color:#6cafc0}
.crm-mobile-menu footer{padding:16px 20px;color:#5c6c78;font:12px system-ui}
.crm-scroll-hint{display:none;font:12px system-ui;color:#536878;margin:6px 0}
.crm-table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.crm-responsive .table-responsive,.crm-responsive .table-container,.crm-responsive .table-wrapper,.crm-responsive .items-table-container{max-width:100%;overflow-x:auto}
.crm-responsive :focus-visible{outline:3px solid #3187b5;outline-offset:3px}
@media screen and (max-width:991px){
 .crm-responsive{--crm-touch:44px;--crm-bottom:calc(64px + env(safe-area-inset-bottom,0px));-webkit-text-size-adjust:100%}
 .crm-responsive,.crm-responsive *{box-sizing:border-box}
 .crm-responsive{margin:0;max-width:100%;width:100%;min-height:100vh;min-height:100dvh}
 .crm-responsive.crm-has-mobile-nav{padding-bottom:var(--crm-bottom)!important;scroll-padding-bottom:calc(var(--crm-bottom) + 20px)}
 .crm-responsive .wrapper,.crm-responsive .content-wrapper,.crm-responsive .content,.crm-responsive .container,.crm-responsive .container-fluid,.crm-responsive main{min-width:0;max-width:100%}
 .crm-responsive main,.crm-responsive>.container,.crm-responsive>.container-fluid{width:100%;margin-left:auto;margin-right:auto}
 .crm-responsive .content-wrapper{min-height:calc(100dvh - 120px)!important}
 .crm-responsive .content-wrapper,.crm-responsive .main-header,.crm-responsive .main-footer{margin-left:0!important}
 .crm-responsive .main-header{position:sticky;top:0;z-index:1035;padding-top:env(safe-area-inset-top,0px)}
 .crm-responsive .main-sidebar{max-height:100dvh;overflow-y:auto;padding-bottom:var(--crm-bottom)}
 .crm-responsive .main-header .nav-link{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
 .crm-responsive .card,.crm-responsive .card-body,.crm-responsive form,.crm-responsive [class*="col-"],.crm-responsive .order-card{min-width:0}
 .crm-responsive .form-control,.crm-responsive .form-select,.crm-responsive input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.crm-responsive select,.crm-responsive textarea{font-size:16px!important;min-height:44px;max-width:100%}
 .crm-responsive input[type=checkbox],.crm-responsive input[type=radio]{width:20px;height:20px;flex-shrink:0}
 .crm-responsive .btn,.crm-responsive button:not(.ag-button):not(.fc-button),.crm-responsive .page-link{min-height:44px;touch-action:manipulation}
 .crm-responsive .btn-close,.crm-responsive .close{min-width:44px;min-height:44px}
 .crm-responsive .page-header>.d-flex,.crm-responsive .header-actions,.crm-responsive .action-buttons,.crm-responsive .toolbar,.crm-responsive .filter-actions,.crm-responsive .pagination-container{flex-wrap:wrap;gap:10px}
 .crm-responsive .page-header .d-flex{flex-wrap:wrap;min-width:0;max-width:100%}
 .crm-responsive .page-header .btn>span,.crm-responsive .page-header .btn>i+span{display:inline!important}
 .crm-responsive .page-header h1,.crm-responsive .page-header h2,.crm-responsive .page-header h4{overflow-wrap:anywhere}
 .crm-responsive .order-header-table{display:grid;grid-template-columns:minmax(90px,.4fr) minmax(0,1fr);gap:10px 12px}
 .crm-responsive .order-header-table>div:empty{display:none}
 .crm-responsive .order-header-table .sap-input{min-width:0}
 .crm-responsive .table-responsive,.crm-responsive .table-container,.crm-responsive .table-wrapper,.crm-responsive .items-table-container,.crm-responsive .crm-table-scroll{max-width:100%;width:100%;min-width:0;overflow-x:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
 .crm-responsive table{font-size:14px!important}
 .crm-responsive table th,.crm-responsive table td{font-size:14px!important;padding:10px 12px;vertical-align:middle}
 .crm-responsive table .btn{white-space:nowrap}
 .crm-responsive #itemsTable,.crm-responsive .line-table{min-width:1500px;table-layout:auto}
 .crm-responsive #itemsTable input:not([type=checkbox]):not([type=hidden]){min-width:90px}
 .crm-responsive #itemsTable .item-info{min-width:170px}
 .crm-responsive .crm-scroll-hint[data-overflow=true]{display:block}
 .crm-responsive .crm-show-full-table{display:block!important}
 .crm-responsive .crm-full-table-toggle{display:inline-flex;margin-bottom:12px}
 .crm-responsive .modal .table-responsive{display:block!important}
 .crm-responsive .modal-dialog{width:calc(100% - 16px)!important;max-width:calc(100% - 16px)!important;margin:8px auto!important}
 .crm-responsive .modal-content{max-height:calc(100dvh - 16px);min-height:0;border-radius:14px;display:flex;flex-direction:column}
 .crm-responsive .modal-header,.crm-responsive .modal-footer{flex-shrink:0;flex-wrap:wrap;gap:8px}
 .crm-responsive .modal-body{flex:1 1 auto;min-height:0;max-height:calc(100dvh - 170px);overflow:auto!important;-webkit-overflow-scrolling:touch}
 .crm-responsive .modal.active{z-index:1055}
 .crm-responsive:has(.modal.show,.modal.active) .crm-mobile-nav{visibility:hidden}
 .crm-responsive .modal-content>form{display:flex;flex-direction:column;min-height:0;max-height:inherit}
 .crm-responsive .modal-footer .btn{flex:1 1 auto}
 .crm-responsive .cfl-toolbar,.crm-responsive .cfl-search-bar,.crm-responsive .doctor-cfl-toolbar{display:flex;flex-wrap:wrap;gap:8px}
 .crm-responsive .cfl-toolbar>*,.crm-responsive .cfl-search-bar>*{min-width:0;max-width:100%}
 .crm-responsive [class*="ag-theme-"]{max-width:100%;min-width:0;--ag-font-size:14px}
 .crm-responsive .cfl-grid-container{max-height:55dvh;min-height:200px}
 .crm-responsive .ag-cell,.crm-responsive .ag-header-cell{font-size:14px}
 .crm-responsive .sap-confirm-dialog{position:fixed!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%);width:calc(100vw - 24px)!important;max-width:480px;max-height:calc(100dvh - 24px);overflow:auto}
 .crm-responsive pre{max-width:100%;overflow:auto;overflow-wrap:anywhere}
 .crm-responsive canvas{max-width:100%}
 .crm-responsive .fc-header-toolbar{flex-wrap:wrap;gap:10px}
 .crm-responsive .fc-button{min-height:44px}
 .crm-responsive .fc-toolbar-title{font-size:20px!important}
 .crm-responsive .crm-mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:1038;gap:4px;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #dce5eb;box-shadow:0 -4px 20px #1633470c}
 .crm-mobile-nav a,.crm-mobile-nav button{flex:1;display:flex;align-items:center;justify-content:center;min-width:0;min-height:50px;padding:8px 6px;border:0;border-radius:10px;background:transparent;color:#315266;font:600 13px system-ui;text-align:center;text-decoration:none}
 .crm-mobile-nav [aria-current=page]{background:#e5f3fa;color:#0b5266}
 .crm-responsive .dropdown-menu{max-width:calc(100vw - 20px);max-height:65dvh;overflow:auto}
 .crm-responsive .order-feedback{width:calc(100vw - 24px);max-height:85dvh}
 .crm-responsive.crm-auth-page{height:auto;min-height:100dvh;padding:16px}
 .crm-responsive .password-change-container{width:min(400px,100%);padding:24px}
}
@media screen and (max-width:575px){
 .crm-responsive main,.crm-responsive>.container{padding:16px 12px!important;margin-top:12px}
 .crm-responsive .card-body,.crm-responsive .order-card{padding:12px}
 .crm-responsive .content-header h1{font-size:24px}
 .crm-responsive .order-header-table{grid-template-columns:minmax(0,1fr);gap:6px}
 .crm-responsive .order-header-table .sap-input{margin-bottom:10px}
 .crm-responsive .main-header .navbar-nav{min-width:0}
 .crm-responsive .modal-dialog{width:100%!important;max-width:100%!important;margin:0!important}
 .crm-responsive .modal-content{max-height:100dvh;border-radius:0}
 .crm-responsive .modal-body{max-height:calc(100dvh - 160px)}
 .crm-responsive .fc-toolbar-chunk{max-width:100%}
 .crm-responsive .crm-mobile-menu nav{grid-template-columns:1fr}
}
/* Compact dashboard filters: every control stays visible and touch friendly. */
@media screen and (max-width:767px){
 .crm-responsive .order-header-table{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;align-items:start}
 .crm-responsive .order-header-table .crm-order-field{display:flex;flex-direction:column;gap:4px;min-width:0}
 .crm-responsive .order-header-table .crm-order-customer,.crm-responsive .order-header-table>.header-center{grid-column:1 / -1}
 .crm-responsive .order-header-table .sap-label .form-label{font-size:12px;margin:0;line-height:1.4}
 .crm-responsive .order-header-table .crm-order-field .sap-input{width:100%;margin:0}
 .crm-responsive .order-header-table .sap-input>.d-inline-flex{display:flex!important;width:100%}
 .crm-responsive .order-header-table .sap-input>.d-inline-flex input{width:0;min-width:0;flex:1 1 0}
 .crm-responsive .order-header-table>.header-center{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;white-space:normal;justify-items:start}
 .crm-responsive .order-header-table>.header-center>span{grid-column:1 / -1;font-size:11px}
 .crm-responsive .order-header-table .header-nav .btn{min-width:44px;padding:6px}
 .crm-responsive .order-header-table .header-search{font-size:12px;min-height:44px;display:flex;align-items:center;max-width:85px;white-space:normal}
 .crm-responsive .filter-section-header{padding:10px 12px;min-height:44px}
 .crm-responsive #filterBody{padding:10px 12px}
 .crm-responsive #filterBody .filter-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;align-items:end}
 .crm-responsive #filterBody .filter-field{width:auto;min-width:0;max-width:100%;margin:0}
 .crm-responsive #filterBody .ff-customer,.crm-responsive #filterBody .custom-date-range{grid-column:1 / -1}
 .crm-responsive #filterBody .form-label{font-size:12px;margin-bottom:4px;line-height:1.3}
 .crm-responsive #filterBody .form-control{width:100%;min-width:0;margin:0}
 .crm-responsive #filterBody .filter-actions{gap:0}
 .crm-responsive #filterBody .filter-actions>.btn,.crm-responsive #filterBody .filter-actions>.btn-group{width:100%;margin:0}
 .crm-responsive #filterBody .filter-actions .btn-group{display:flex;min-width:0}
 .crm-responsive #filterBody .filter-actions .btn-group>.btn{flex:1 1 0;min-width:0;min-height:44px;padding:8px 6px}
 .crm-responsive #filterBody .filter-scope-note{font-size:11px;line-height:1.4;margin-top:8px;overflow-wrap:anywhere}
 .crm-responsive #filterBody #activeFiltersBar{margin-top:6px;gap:4px}
 .crm-responsive #filterBody .custom-date-range>.d-flex{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){.crm-responsive *{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
@media print{.crm-mobile-nav,.crm-mobile-menu,.crm-scroll-hint,.crm-full-table-toggle{display:none!important}.crm-has-mobile-nav{padding-bottom:0!important}.crm-table-scroll{overflow:visible;max-width:none}}
