/* CELEBRATE MOBILE LAYOUT PATCH — CSS ONLY — designed for deployment over the
   actual current Admin archive; do not replace the current Admin with an old ZIP.
   Preserve #102D46 navy / #A9D9D3 mint / #326F80 petrol / #4C9A98 teal. */
@media screen and (max-width: 767px) {
  body#celebrate-admin #appView .main :is(.celebrate-workspace,.panel,.admin-group-module,.fd-surface,.business-master-card,.gift-workspace) {min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  body#celebrate-admin #appView .main :is(input,select,textarea,button){max-width:100%;box-sizing:border-box}
  body#celebrate-admin #appView .main :is(.clean-page-head,.events-page-head,.gift-page-head,.directory-head){min-height:0!important;height:auto!important;gap:10px!important;padding:12px 14px!important;align-items:center!important;flex-wrap:wrap!important}
  body#celebrate-admin #appView .main :is(.gift-page-actions,.toolbar){flex-wrap:wrap!important;max-width:100%!important}
  /* Front Desk: prevent unused header space and horizontally clipped columns. */
  body#celebrate-admin #appView .main :is(.fd-next-header,.fd-v809-hero){padding:10px 12px!important;margin-bottom:10px!important;min-height:0!important}
  body#celebrate-admin #appView .main .fd-v809-brandline h1{font-size:clamp(23px,6vw,31px)!important;line-height:1.12!important}
  body#celebrate-admin #appView .main :is(.fd-surface,.fd-workspace-pane) {min-width:0!important}
  body#celebrate-admin #appView .main :is(.fd-party-top,.fd-surface-title){height:auto!important;min-height:0!important;padding:12px!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important}
  body#celebrate-admin #appView .main .fd-party-controls{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px!important;width:100%!important;align-items:center!important;min-width:0!important;margin:0!important}
  body#celebrate-admin #appView .main .fd-party-controls :is(input,button){min-width:0!important;width:auto!important;min-height:36px!important;margin:0!important;padding:7px 10px!important}
  body#celebrate-admin #appView .main .fd-party-controls input{width:100%!important}
  body#celebrate-admin #appView .main #fdPartyDashboard :is(.party-card,.fd-party-card,.party-dashboard-card){min-width:0!important;max-width:100%!important;padding:13px!important}
  /* Events: turn the 5-column desktop grid into an accessible, two-column card. */
  body#celebrate-admin #appView .main #section-events .events-table-wrap{overflow:visible!important;width:100%!important;min-width:0!important}
  body#celebrate-admin #appView .main #section-events .events-table-head{display:none!important}
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px 10px!important;min-width:0!important;width:100%!important;padding:12px!important;margin:0 0 10px!important;background:#fff!important;border:1px solid #cbdde4!important;border-radius:12px!important}
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-main-cell{grid-column:1/-1!important;font-size:15px!important}
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-date-cell{grid-column:1!important}
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-cell:nth-child(3){grid-column:2!important}
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-cell:nth-child(4){grid-column:1/-1!important}
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-actions-cell{display:flex!important;grid-column:1/-1!important;gap:7px!important;flex-wrap:wrap!important;justify-content:flex-start!important;white-space:normal!important;min-width:0!important;padding-top:6px!important;border-top:1px solid #e1eaee!important}
  body#celebrate-admin #appView .main #section-events .event-actions-cell button{flex:1 1 95px!important;white-space:normal!important;width:auto!important;min-height:40px!important;font-size:12px!important;padding:8px 9px!important}
  body#celebrate-admin #appView .main #section-events :is(.event-cell,.event-registration,.event-row-registrations){min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important}
  /* Customers: preserve the name-matching safety warnings; only compress controls. */
  body#celebrate-admin #appView .main #section-people :is(.customer-filters,.customer-filter-options){display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:10px!important}
  body#celebrate-admin #appView .main #section-people .customer-search-wrap{flex:1 1 100%!important;min-width:0!important}
  body#celebrate-admin #appView .main #section-people .customer-filter-options>*{flex:1 1 115px!important;min-width:0!important}
  body#celebrate-admin #appView .main #section-people :is(.customer-work-item,.customer-profile-clean,.customer-detail-panel){max-width:100%!important;min-width:0!important;overflow-wrap:anywhere}
  body#celebrate-admin #appView .main #section-people .customer-directory-columns{padding:8px 10px!important}
  /* Gift Cards: keep actionable information visible, allow horizontal scrolling only on the physical-card data table. */
  body#celebrate-admin #appView .main #section-giftcards :is(.gift-page-head,.gift-page-actions){display:flex!important;gap:8px!important;flex-wrap:wrap!important;min-height:0!important}
  body#celebrate-admin #appView .main #section-giftcards .gift-page-actions button{flex:1 1 145px!important;min-height:38px!important;padding:8px 10px!important;white-space:normal!important}
  body#celebrate-admin #appView .main #section-giftcards .gift-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0!important;padding:10px!important}
  body#celebrate-admin #appView .main #section-giftcards .gift-filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:10px!important}
  body#celebrate-admin #appView .main #section-giftcards .gift-search-wrap{grid-column:1/-1!important;min-width:0!important}
  body#celebrate-admin #appView .main #section-giftcards .gift-clear{grid-column:1/-1!important}
  body#celebrate-admin #appView .main #section-giftcards #giftCardsTable{width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  body#celebrate-admin #appView .main #section-giftcards .gift-directory-card{min-width:0!important;max-width:100%!important}
  /* Business module: remove enormous mint panels; retain active tab and all controls. */
  body#celebrate-admin #appView .main #section-business .business-hero-head{display:flex!important;flex-wrap:wrap!important;justify-content:space-between!important;align-items:center!important;gap:8px!important;height:auto!important;min-height:0!important;max-height:none!important;padding:11px 14px!important;margin:0!important;background:#A9D9D3!important}
  body#celebrate-admin #appView .main #section-business .business-hero-head :is(h1,h2){font-size:24px!important;margin:0!important;padding:0!important;line-height:1.15!important}
  body#celebrate-admin #appView .main #section-business .business-hero-head :is(.business-hero-month,.business-month-select){max-width:100%!important;margin:0!important}
  body#celebrate-admin #appView .main #section-business .business-hero-head #businessAddExpenseBtn{width:auto!important;max-width:100%!important;margin:0!important;min-height:35px!important;padding:7px 11px!important}
  body#celebrate-admin #appView .main #section-business .v926-business-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:10px 12px!important;margin:0!important}
  body#celebrate-admin #appView .main #section-business .v926-business-tab{width:100%!important;min-width:0!important;min-height:40px!important;padding:8px!important}
  body#celebrate-admin #appView .main #section-business :is(.business-master-content,.business-master-pane,.business-table-workspace,.business-table-head,.tax-v929-root){min-width:0!important;max-width:100%!important}
  body#celebrate-admin #appView .main #section-business .business-table-head{min-height:0!important;height:auto!important;padding:10px!important}
  body#celebrate-admin #appView .main #section-business .business-table-title{display:flex!important;flex-wrap:wrap!important;gap:5px 9px!important;align-items:baseline!important}
  body#celebrate-admin #appView .main #section-business :is(.business-table-actions,.expense-toolbar){display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:8px 0!important}
  body#celebrate-admin #appView .main #section-business :is(.business-table-actions,.expense-toolbar)>*{min-width:0!important;max-width:100%!important}
  body#celebrate-admin #appView .main #section-business .v927-expense-month-controls{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:6px!important}
  body#celebrate-admin #appView .main #section-business .expense-toolbar .expense-search-wrap{flex:1 1 100%!important}
  body#celebrate-admin #appView .main #section-business .expense-toolbar :is(.expense-date-field,.filter-select){flex:1 1 125px!important}
  body#celebrate-admin #appView .main #section-business .expense-toolbar .expense-pdf-btn{flex:1 1 100%!important}
  body#celebrate-admin #appView .main #section-business :is(.tax-v929-heading,.tax-v929-topline){height:auto!important;min-height:0!important;padding:12px!important}
  body#celebrate-admin #appView .main #section-business .tax-v929-heading :is(h1,h2){font-size:21px!important}
  body#celebrate-admin #appView .main #section-business :is(.business-master-card,.business-master-content,.business-master-pane){overflow-wrap:break-word}
  /* Never create page-level horizontal scrolling. Internal wide financial tables can scroll independently. */
  body#celebrate-admin #appView .main #section-business :is(.finance-v740-root,.finance-simple-v740,#financeSaturdayTable){max-width:100%!important;min-width:0!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  body#celebrate-admin #appView .main #section-business :is(.inventory-table,.finance-table) {max-width:100%}
}
@media screen and (max-width: 390px){
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row{grid-template-columns:1fr!important}
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-cell{grid-column:1!important}
  body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-actions-cell{grid-column:1!important}
}

/* V976: targeted mobile layout overrides, verified against V975 source. */
@media screen and (max-width: 767px) {
 body#celebrate-admin #appView .main {min-width:0!important;max-width:100%!important;overflow-x:clip!important}
 body#celebrate-admin #appView .main>.section {min-width:0!important;max-width:100%!important}
 /* Keep all active controls accessible in the Events cards. */
 body#celebrate-admin #appView .main #section-events .events-table-wrap,
 body#celebrate-admin #appView .main #section-events #eventSignupSummary {min-width:0!important;max-width:100%!important;overflow:visible!important}
 body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-areas:"main main" "date count" "status status" "actions actions"!important;min-width:0!important;max-width:100%!important;row-gap:9px!important;padding:12px!important;box-sizing:border-box!important;}
 body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-main-cell {grid-area:main!important;min-width:0!important}
 body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-date-cell {grid-area:date!important;min-width:0!important}
 body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-cell:nth-child(3) {grid-area:count!important;min-width:0!important}
 body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-cell:nth-child(4) {grid-area:status!important;min-width:0!important}
 body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row>.event-actions-cell {grid-area:actions!important;display:flex!important;flex-wrap:wrap!important;min-width:0!important;gap:8px!important;justify-content:flex-start!important}
 body#celebrate-admin #appView .main #section-events .event-inline-registrations {width:100%!important;max-width:100%!important;min-width:0!important;overflow-wrap:anywhere!important}
 body#celebrate-admin #appView .main #section-events .event-registration {display:flex!important;flex-wrap:wrap!important;gap:9px!important;max-width:100%!important;min-width:0!important}
 /* Finance navigation: do not reserve the huge empty mint banner. */
 body#celebrate-admin #appView .main #section-business#section-business .business-hero-head {min-height:0!important;height:auto!important;max-height:none!important;padding:12px 14px!important;display:flex!important;gap:9px!important;justify-content:flex-start!important;align-items:center!important;flex-wrap:wrap!important;background:#A9D9D3!important}
 body#celebrate-admin #appView .main #section-business#section-business .business-hero-head>div {flex:1 1 125px!important;min-width:0!important}
 body#celebrate-admin #appView .main #section-business#section-business .business-hero-head h1 {font-size:23px!important;text-align:left!important;margin:0!important;line-height:1.15!important}
 body#celebrate-admin #appView .main #section-business#section-business .business-hero-head .business-hero-month {flex:1 1 145px!important;min-width:0!important;max-width:100%!important;position:static!important;transform:none!important}
 body#celebrate-admin #appView .main #section-business#section-business .business-hero-head #businessAddExpenseBtn {flex:1 1 100%!important;position:static!important;transform:none!important;max-width:100%!important;margin:0!important;min-height:39px!important}
 body#celebrate-admin #appView .main #section-business#section-business .v926-business-tabs {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:10px 12px!important}
 body#celebrate-admin #appView .main #section-business .business-master-content {padding:10px!important;max-width:100%!important;min-width:0!important}
 body#celebrate-admin #appView .main #section-business :is(.finance-table,.business-table-workspace,.tax-v929-root,.inventory-v928-root) {max-width:100%!important;min-width:0!important}
 body#celebrate-admin #appView .main #section-business .business-hero-head::before,
 body#celebrate-admin #appView .main #section-business .business-hero-head::after {display:none!important;content:none!important}
 /* Compact Party heading while preserving date and Refresh controls. */
 body#celebrate-admin #appView .main #section-frontdesk .fd-party-top,
 body#celebrate-admin #appView .main #section-frontdesk .fd-party-controls {min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important}
 body#celebrate-admin #appView .main #section-frontdesk .fd-party-controls {display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:flex-start!important}
 body#celebrate-admin #appView .main #section-frontdesk .fd-party-controls :is(label,input,button) {min-width:0!important;max-width:100%!important;width:auto!important;position:static!important;transform:none!important}
 /* No page-wide horizontal scrolling for Gift Card controls. The internal data table may scroll independently. */
 body#celebrate-admin #appView .main #section-giftcards .gift-workspace {max-width:100%!important;min-width:0!important}
 body#celebrate-admin #appView .main #section-giftcards .gift-page-head {min-height:0!important;height:auto!important;padding:12px!important}
 body#celebrate-admin #appView .main #section-giftcards #giftCardsTable {overflow-x:auto!important;max-width:100%!important;-webkit-overflow-scrolling:touch!important}
 body#celebrate-admin #appView .main #section-giftcards .gift-directory-card {min-width:0!important;max-width:100%!important}
 /* Preserve the accessible full-width Open Play table with a local horizontal scroll only when necessary. */
 body#celebrate-admin #appView .main #section-frontdesk #frontDeskOpenPlay .op-direct-list {overflow-x:auto!important;max-width:100%!important;-webkit-overflow-scrolling:touch!important}
}
@media screen and (max-width:390px) {
 body#celebrate-admin #appView .main #section-events #eventSignupSummary>.event-table-row {grid-template-columns:1fr!important;grid-template-areas:"main" "date" "count" "status" "actions"!important}
}

