/* Shared screen layout: print layouts retain their own sizing. */
@media screen{
 img{max-width:100%;height:auto;}
 .page-shell,.workspace,.row>[class*="col-"],.pro-card,.app-card,.pro-card-body{min-width:0;}
 .page-header,.page-header-pro,.pro-card-header,.toolbar{flex-wrap:wrap;}
 .page-header>div,.page-header-pro>div,.pro-card-header>div{min-width:0;}
 .page-title,.page-title-pro,.page-subtitle,.page-subtitle-pro,.pro-desc,.alert{overflow-wrap:anywhere;}
 .table-responsive{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
 .table-responsive table{margin-bottom:0;}
 .table-responsive .money{white-space:nowrap;}
 .date-arrow-field{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:6px;align-items:stretch;min-width:0;width:100%;}
 .date-arrow-field input{min-width:0;width:100%;}
 .date-arrow-button{display:flex;align-items:center;justify-content:center;border:1px solid #bdd6d9;border-radius:10px;background:#f0f8f8;color:#00717a;font-size:1.6rem;line-height:1;min-height:44px;padding:0;}
 .date-arrow-button:hover{background:#e0f1f2;}
 .date-arrow-button:focus-visible{outline:3px solid #99cbd0;outline-offset:2px;}
 .date-arrow-button:disabled{opacity:.45;cursor:not-allowed;}
}
@media screen and (max-width:1199.98px){
 .topbar .dropdown-menu{min-width:0;max-width:100%;}
 .topbar .dropdown-item{white-space:normal;overflow-wrap:anywhere;}
 .topbar .nav-link{min-height:44px;display:flex;align-items:center;}
}
@media screen and (max-width:767.98px){
 .page-title,.page-title-pro{font-size:clamp(1.25rem,5vw,1.7rem);line-height:1.5;}
 .page-header,.page-header-pro{align-items:stretch;flex-direction:column;}
 .page-header>div,.page-header-pro>div{max-width:100%;}
 .inventory-header-actions{width:100%;}
 .inventory-header-actions>.btn{flex:1 1 180px;white-space:normal;}
 .toolbar{max-width:100%;}
 .pro-card-header{gap:.65rem;}
 .form-control,.form-select{font-size:16px;min-height:44px;max-width:100%;}
 .btn:not(.btn-close),.date-stepper-btn,.receive-date-step-btn{min-height:44px;}
 .btn{white-space:normal;}
 .unified-filter-row,.unified-filter-fields,.unified-filter-period{min-width:0;max-width:100%;}
 .unified-filter-period{width:100%;}
 .unified-filter-fields{flex-basis:100%;}
 .unified-date-field,.unified-range-fields{width:100%;}
 .unified-range-fields>div{min-width:0;width:100%;}
 .filter-chip,.period-chip{white-space:normal;}
 .daily-summary-grid,.daily-summary-grid-dynamic,.quick-grid,.jobs-payment-channel-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .daily-summary-card strong,.metric-card .stat,.kpi-value{overflow-wrap:anywhere;}
 .box-row-grid,.service-row-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .box-row-grid>div:first-child,.service-row-grid>div:first-child,.service-row-grid>div:nth-child(2){grid-column:1/-1;}
 .box-row-grid>div,.service-row-grid>div{min-width:0;}
 .checkout-summary.sticky-summary{position:static!important;bottom:auto;}
 .staff-picker-panel{max-width:calc(100vw - 24px);max-height:60dvh;}
 .employee-dropdown summary{white-space:normal;overflow-wrap:anywhere;}
 .modal-dialog{margin:.75rem;}
 .swal2-popup{max-width:calc(100vw - 24px)!important;}
 main>form.d-flex{flex-wrap:wrap;}
 main>form.d-flex>div{flex:1 1 220px;min-width:0;}
 .pro-card-body>form>.d-flex{flex-wrap:wrap;}
 .pagination{flex-wrap:wrap;gap:4px;}
}
@media screen and (max-width:399.98px){
 .daily-summary-grid,.daily-summary-grid-dynamic,.quick-grid{grid-template-columns:minmax(0,1fr);}
 .topbar .navbar-brand{font-size:1rem;gap:.4rem;}
 .topbar .brand-logo{width:36px;height:36px;}
 .cash-entry-mode{flex-wrap:wrap;max-width:100%;}
 .cash-entry-mode .cash-mode-btn{white-space:normal;}
 .date-arrow-field{grid-template-columns:36px minmax(0,1fr) 36px;gap:4px;}
}

@media screen and (pointer:coarse){
 .btn:not(.btn-close),.form-control,.form-select,.staff-picker-option,.navbar-toggler{min-height:44px;}
 input[type=checkbox],input[type=radio]{min-width:20px;min-height:20px;}
}
@media print{.date-arrow-button{display:none!important;}}

/* Jobs filters keep enough room for dates, search hints and full staff names. */
@media screen and (min-width:576px){
 #jobsFilterForm>.jobs-date-mode{flex:0 1 310px;width:310px;min-width:290px;}
 #jobsFilterForm>.jobs-search-field{flex:1 1 520px;width:520px;min-width:480px;}
 #jobsFilterForm>.jobs-staff-field{flex:1 1 360px;width:360px;min-width:340px;}
 #jobsFilterForm>.jobs-payment-field{flex:0 1 180px;width:180px;min-width:160px;}
 #jobsFilterForm>.jobs-reset-field{flex:0 0 110px;width:110px;}
}
#jobsStaffPickerTrigger{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
@media screen and (max-width:575.98px){
 #jobsFilterForm>.jobs-date-mode,#jobsFilterForm>.jobs-search-field,#jobsFilterForm>.jobs-staff-field,#jobsFilterForm>.jobs-payment-field{width:100%;min-width:0;}
}

/* Leave room for localized month names and the native calendar indicator. */
@media screen and (min-width:576px){
 .calendar-field.calendar-day-field{width:320px!important;min-width:300px!important;max-width:100%!important;flex:0 1 320px!important;}
 .calendar-field.calendar-month-field{width:380px!important;min-width:360px!important;max-width:100%!important;flex:0 1 380px!important;}
 .unified-range-fields{width:min(100%,660px);max-width:100%!important;flex-wrap:wrap;}
}
@media screen and (max-width:575.98px){
 .calendar-field{width:100%!important;min-width:0!important;max-width:100%!important;}
 .calendar-month-field .date-arrow-field{grid-template-columns:1fr 1fr;}
 .calendar-month-field .date-arrow-field input{grid-column:1/-1;grid-row:1;}
 .calendar-month-field .date-arrow-button{grid-row:2;}
}
@media screen and (max-width:399.98px){.calendar-field .date-arrow-field{grid-template-columns:1fr 1fr;}.calendar-field .date-arrow-field input{grid-column:1/-1;grid-row:1;}.calendar-field .date-arrow-button{grid-row:2;}}
