/* Phone toolbar: current sheet, month, undo/redo and zoom, on one line. */
@media (max-width:767px), (max-width:1023px) and (max-height:500px), (pointer:coarse) and (max-width:1200px){
 .sales-statistics-page .sales-business-header{display:grid!important;grid-template-columns:auto minmax(105px,1fr) 88px 60px!important;align-items:center!important;gap:2px!important;padding:2px 4px!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar,.sales-statistics-page .sales-business-header .sales-header-tools{display:contents!important;}
 .sales-statistics-page .sales-business-header .sales-header-identity,.sales-statistics-page .sales-business-header .sales-mobile-tools-toggle{display:none!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar>[data-slot='native-select-wrapper']{min-width:0!important;max-width:none!important;width:100%!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar>[data-slot='native-select-wrapper']:first-child{grid-column:1;grid-row:1;width:56px!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar>[data-slot='native-select-wrapper']:nth-child(2){grid-column:2;grid-row:1;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar select{font-size:13px!important;height:44px!important;min-height:44px!important;min-width:0!important;width:100%!important;padding-left:0!important;padding-right:16px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>a,.sales-statistics-page .sales-business-header .sales-header-tools>div:last-child{display:none!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:has(.sheet-action-button){grid-column:3;grid-row:1;display:flex!important;gap:0!important;width:88px!important;padding:0!important;border:0!important;height:44px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools .sheet-action-button{width:44px!important;min-width:44px!important;height:44px!important;padding:10px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date):has(select){grid-column:4;grid-row:1;display:flex!important;width:60px!important;min-width:0!important;padding:0!important;border:0!important;height:44px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date):has(select)>svg{display:none!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date) select{width:60px!important;min-width:0!important;height:44px!important;padding-left:0!important;padding-right:16px!important;font-size:13px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools .sales-header-date{display:none!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools .sales-header-date[data-period-mode='custom']{display:grid!important;grid-column:1 / -1!important;grid-row:2!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;order:initial!important;}
 .sales-statistics-page .sales-business-header .sales-header-date>span:first-child,.sales-statistics-page .sales-business-header .sales-header-date>[data-slot='native-select-wrapper']:first-of-type{display:none!important;}
 .sales-statistics-page .sales-business-header .sales-header-date[data-period-mode='custom']>[data-slot='native-select-wrapper']:nth-of-type(2){grid-column:1!important;grid-row:1!important;}
 .sales-statistics-page .sales-business-header .sales-header-date[data-period-mode='custom']>span:not(:first-child){grid-column:2!important;grid-row:1!important;}
 .sales-statistics-page .sales-business-header .sales-header-date[data-period-mode='custom']>[data-slot='native-select-wrapper']:nth-of-type(3){grid-column:3!important;grid-row:1!important;}
}
/* Compact, balanced two-row phone filter. */
@media (max-width:767px), (max-width:1023px) and (max-height:500px), (pointer:coarse) and (max-width:1200px){
 .sales-statistics-page .sales-business-header{grid-template-columns:52px minmax(108px,1fr) 88px 56px!important;gap:2px 3px!important;grid-template-rows:auto!important;grid-auto-rows:auto!important;overflow:visible!important;max-height:none!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar>[data-slot='native-select-wrapper']:first-child{width:52px!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar select{font-size:12px!important;height:40px!important;min-height:40px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:has(.sheet-action-button){width:88px!important;height:44px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools .sheet-action-button{width:44px!important;min-width:44px!important;height:44px!important;padding:10px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date):has(select){height:40px!important;width:56px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date) select{height:40px!important;min-height:40px!important;width:56px!important;font-size:12px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools .sales-header-date[data-period-mode='custom']{grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr)!important;gap:4px!important;padding:0 2px 6px!important;min-height:40px!important;height:auto!important;align-items:center!important;}
 .sales-statistics-page .sales-business-header .sales-header-date[data-period-mode='custom'] [data-slot='native-select-wrapper']{height:34px!important;min-height:34px!important;margin:0!important;}
 .sales-statistics-page .sales-business-header .sales-header-date[data-period-mode='custom'] select{height:34px!important;min-height:34px!important;font-size:13px!important;padding:2px 24px 2px 8px!important;border-radius:5px!important;}
 .sales-statistics-page .sales-business-header .sales-header-date[data-period-mode='custom']>span:not(:first-child){font-size:12px!important;text-align:center;}
}
/* Wide touch layouts keep related controls together instead of stretching them. */
@media (min-width:600px) and (max-width:767px), (min-width:600px) and (max-width:1023px) and (max-height:500px), (min-width:600px) and (pointer:coarse) and (max-width:1200px){
 .sales-statistics-page .sales-business-header{grid-template-columns:56px 176px 88px 60px minmax(0,1fr)!important;column-gap:6px!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar>[data-slot='native-select-wrapper']:first-child{width:56px!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar select{font-size:14px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date):has(select),.sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date) select{width:60px!important;font-size:14px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools .sales-header-date[data-period-mode='custom']{grid-column:1 / 5!important;width:100%!important;justify-self:start!important;}
 .sales-statistics-page .sales-business-header .sales-header-date[data-period-mode='custom'] select{font-size:14px!important;}
}
/* Narrow folded cover screens. */
@media (max-width:359px){
 .sales-statistics-page .sales-business-header{grid-template-columns:48px minmax(80px,1fr) 88px 52px!important;column-gap:2px!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar>[data-slot='native-select-wrapper']:first-child{width:48px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date):has(select),.sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date) select{width:52px!important;}
}

@media (max-width:767px), (max-width:1023px) and (max-height:500px), (pointer:coarse) and (max-width:1200px){
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar>[data-slot='native-select-wrapper']:first-child select{padding-right:0!important;}
}
/* User requested a shorter date/action row on mobile. */
@media (max-width:767px), (max-width:1023px) and (max-height:500px), (pointer:coarse) and (max-width:1200px){
 .sales-statistics-page .sales-business-header{padding-top:0!important;padding-bottom:0!important;min-height:0!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar>[data-slot='native-select-wrapper'],
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar select,
 .sales-statistics-page .sales-business-header .sales-header-tools>div:has(.sheet-action-button),
 .sales-statistics-page .sales-business-header .sales-header-tools .sheet-action-button,
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date):has(select),
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date) [data-slot='native-select-wrapper'],
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date) select{height:32px!important;min-height:32px!important;}
 .sales-statistics-page .sales-business-header .sales-header-tools .sheet-action-button{padding:7px 12px!important;}
 .sales-statistics-page .sales-business-header .sales-mobile-quickbar select,
 .sales-statistics-page .sales-business-header .sales-header-tools>div:not(.sales-header-date) select{padding-top:0!important;padding-bottom:0!important;}
}
