/* MUA mobile-first workspace: top app bar, visible bottom tabs, compact cards.
   Desktop layout, data and authentication are unchanged. */
.mobile-app-brand,.mobile-bottom-nav,.mobile-fab{display:none}
.mobile-quick-sheet{border:0;max-width:500px;width:calc(100% - 24px);padding:22px;border-radius:24px 24px 0 0;background:#fff;color:#24352e;box-shadow:0 -12px 50px #1539262c}
.mobile-quick-sheet::backdrop{background:#112b2190}
.mobile-quick-head{display:flex;align-items:center;justify-content:space-between;font-size:19px;margin-bottom:20px}
.mobile-quick-head button{width:40px;height:40px;border-radius:50%;background:#f3f6f4;font-size:26px}
.mobile-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.mobile-quick-grid button{background:#f7faf8;border:1px solid #e0ece5;border-radius:16px;padding:19px 6px;min-height:99px;font-weight:750;color:#30493a;display:grid;justify-items:center;gap:8px}
.mobile-quick-grid span{font-size:28px}
.mobile-fab[hidden]{display:none!important}
/* Desktop retains full text labels inside calendar cells. */
.mobile-calendar-day,.mobile-calendar-agenda{display:none}
@media(max-width:700px){
 html,body{width:100%;max-width:100%;overflow-x:hidden}
 .layout:not(.hidden){height:100dvh!important;min-height:0!important;overflow:hidden!important;position:relative!important;display:flex}
 .layout .work{min-width:0;width:100%;height:100%;padding:0;display:flex;flex-direction:column;background:#f7f8fb}
 /* Override old mobile header's flex: 1 1 100% and flex-wrap:wrap:
    they pushed the menu onto a second row on iPhone. */
 .layout .header{background:#0eaa60!important;color:white!important;border:0!important;
   padding:calc(11px + env(safe-area-inset-top,0px)) 16px 12px!important;display:flex!important;
   flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;
   justify-content:space-between!important;gap:10px!important;flex-shrink:0;min-height:72px;
   box-shadow:0 2px 14px #08663c15}
 .layout .header>.mobile-app-brand{display:flex;align-items:center;gap:12px;
   min-width:0;flex:1 1 auto!important;width:auto!important}
 .mobile-app-brand img{width:44px;height:44px;border-radius:13px;background:#fff;padding:1px;flex:0 0 auto}
 .mobile-app-brand strong,.mobile-app-brand span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .mobile-app-brand strong{font-size:19px;line-height:1.3;font-weight:750}
 .mobile-app-brand span{font-size:12px;color:#d7fbe4;margin-top:2px}
 .layout .header>div:nth-child(2){display:flex;flex:0 0 43px!important;align-items:center;
   justify-content:center;min-width:43px;order:2}
 .layout .header .breadcrumb,.layout .header #pageHint{display:none}
 .layout .header h1{display:none}
 .layout .header .header-right{display:none!important}
 .layout .mobile-menu-toggle{display:grid!important;place-items:center;color:#fff;background:#0d9657;
   border:1px solid #56cb8d;margin:0!important;width:43px;height:43px;border-radius:13px;font-size:21px}
 .layout #content{display:block!important;flex:1 1 auto;min-height:0;min-width:0;overflow-y:auto!important;
   overflow-x:hidden!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
   padding:15px 13px calc(105px + env(safe-area-inset-bottom,0px))!important;background:#f7f8fb}
 .layout .work footer{display:none}
 .mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:start;
   height:calc(66px + env(safe-area-inset-bottom,0px));padding:5px 3px env(safe-area-inset-bottom,0px);
   position:absolute;bottom:0;right:0;left:0;z-index:46;border-top:1px solid #e2ebe6;
   box-shadow:0 -5px 19px #143c2710;background:#fff}
 .mobile-bottom-nav button{height:57px;min-width:0;padding:5px 0 2px;background:transparent;color:#809188;
   display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;font-weight:750;white-space:nowrap}
 .mobile-bottom-nav .mobile-nav-icon{display:block;font-size:24px;line-height:26px;font-weight:500}
 .mobile-bottom-nav button.current{color:#0caa60;background:#eaf9ef;border-radius:12px}
 .mobile-fab{display:grid;place-items:center;position:absolute;right:15px;bottom:calc(83px + env(safe-area-inset-bottom,0px));
   z-index:45;border-radius:50%;width:52px;height:52px;padding:0;background:#1285ed;color:white;
   font-size:35px;line-height:1;box-shadow:0 5px 16px #147ae84a}
 .mobile-fab:active{transform:scale(.96)}
 .layout.mobile-nav-open .sidebar{max-width:85vw;width:min(308px,85vw)!important;
   padding-bottom:calc(15px + env(safe-area-inset-bottom,0px))}
 .layout .sidebar .nav{min-height:45px!important}
 .mobile-quick-sheet[open]{position:fixed;top:auto;left:0;right:0;bottom:0;margin:0 auto;width:100%;
   max-width:700px;border-radius:23px 23px 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:120}
 .card,.metric,.more-section{box-shadow:0 4px 13px #152c2110!important}
 .card,.metric{border-radius:14px!important}
 .layout .reference-heading{align-items:center;margin:5px 2px 13px;gap:6px}
 .layout .reference-heading h2{font-size:18px}
 .layout .reference-heading .link{font-size:12px;white-space:nowrap}
 .layout .rent-kpis{background:transparent;border:0;padding:0;
   display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:13px}
 .layout .rent-kpis>.rent-kpi{min-height:102px;border:0;border-radius:18px;
   display:flex;gap:5px;justify-content:center;padding:13px}
 .layout .rent-kpis>.rent-kpi:nth-child(4n+1){background:#fff1df}
 .layout .rent-kpis>.rent-kpi:nth-child(4n+2){background:#dbedff}
 .layout .rent-kpis>.rent-kpi:nth-child(4n+3){background:#e4f5ed}
 .layout .rent-kpis>.rent-kpi:nth-child(4n+4){background:#fff7be}
 .layout .rent-kpis>.rent-kpi>span{font-size:12px;color:#53675f}
 .layout .rent-kpis>.rent-kpi>strong{font-size:17px;overflow-wrap:anywhere}
 .layout .rent-kpis.mobile-compact-kpis>.rent-kpi:nth-child(n+5){display:none}
 .layout .rent-kpis.mobile-compact-kpis.show-all>.rent-kpi:nth-child(n+5){display:flex}
 .mobile-kpi-toggle{grid-column:1/-1;border:1px solid #d6e9df;color:#118455;
   border-radius:12px;background:#fff;padding:10px;font-weight:750}
 .mobile-home-shortcuts{margin:14px 0 24px}
 .mobile-home-shortcuts h2{font-size:19px;color:#1d2927;margin:0 0 14px 3px}
 .mobile-home-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
 .mobile-home-grid button{min-width:0;border-radius:18px;background:white;box-shadow:0 4px 15px #112e1e0f;
   border:1px solid #f0f2f0;min-height:112px;padding:13px 6px;color:#262e2c;
   display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-size:12px;font-weight:700;line-height:1.3;text-align:center}
 .mobile-home-grid .icon{display:grid;place-items:center;width:49px;height:49px;font-size:26px;border-radius:14px;background:#e6f6ec}
 .mobile-home-grid button:nth-child(5n+2) .icon{background:#fff1e0}
 .mobile-home-grid button:nth-child(5n+3) .icon{background:#e9efff}
 .mobile-home-grid button:nth-child(5n+4) .icon{background:#fff4f5}
 .mobile-home-grid button:nth-child(5n+5) .icon{background:#e5f5fb}
 .layout .rent-pos{display:flex;flex-direction:column;gap:13px;height:auto;max-height:none;min-height:0}
 .layout .rent-pos-catalog{height:auto;max-height:none;min-height:0;overflow:visible;display:flex;flex-direction:column}
 .layout .rent-pos-catalog .mobile-rental-toggle{display:flex;justify-content:space-between;align-items:center;
   padding:18px 15px;background:#fff;border-bottom:1px solid #e6eeea;color:#0b9b5b;font-weight:850;font-size:15px}
 .layout .rent-pos-catalog.mobile-catalog-collapsed .pos-searchbar,
 .layout .rent-pos-catalog.mobile-catalog-collapsed .rental-products{display:none!important}
 .layout .rent-pos-catalog .rental-products{max-height:300px;overflow-y:auto;grid-template-columns:repeat(2,minmax(0,1fr));
   padding:10px;gap:8px}
 .layout .rent-pos-catalog .rental-product{min-height:130px;padding:10px}
 .layout .rent-pos-catalog .pos-current-lines{max-height:none;overflow:visible}
 .layout .rent-pos-catalog .pos-catalog-meta{padding:13px}
 .layout .rent-pos-summary{overflow:visible}
 .layout .rent-pos-summary #rentalCreateForm{overflow:visible;max-height:none;padding:4px 10px 6px}
 .layout .rent-submit-wrap{position:static;padding:12px}
 .layout .rent-submit-wrap button{min-height:46px;font-size:15px}
 /* iOS Safari renders a long localized date string. Two ~150px date inputs
    overlap even with min-width:0, so use one full-width picker per row. */
 .layout .rent-pos-summary .rent-date-pair{display:grid;grid-template-columns:minmax(0,1fr);
   width:100%;gap:12px}
 .layout .rent-pos-summary .rent-date-pair>label{display:block;width:100%;min-width:0;
   max-width:100%;margin:0}
 .layout .rent-pos-summary .rent-date-pair input[type=date]{
   display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;
   min-height:48px;padding:10px 12px;font-size:16px!important;text-align:left}
 .layout .rent-pos-summary .rent-date-pair input[type=date]::-webkit-date-and-time-value{
   min-width:0;text-align:left}
 .layout .rent-pos-summary .rent-date-pair input[type=date]::-webkit-datetime-edit{
   min-width:0;text-align:left}
 .layout .rent-pos-summary input,.layout .rent-pos-summary select,.layout .rent-pos-summary textarea{max-width:100%}
 .layout .more-hero{margin:0 0 14px;padding:15px}
 .layout .more-hero h2{font-size:18px}
 .layout .more-section{margin-bottom:9px}
 .layout .more-tile-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .layout .more-tile{min-height:88px;padding:9px 5px}
 .layout .more-section h3{padding:13px}
 .layout .setting-grid{grid-template-columns:1fr!important}
 .layout .setting-tile{padding:15px;border-radius:11px}
 .layout .header button:focus-visible,.mobile-bottom-nav button:focus-visible,.mobile-home-grid button:focus-visible,.mobile-fab:focus-visible{outline:3px solid #ffc566;outline-offset:2px}
 #editDialog,#orderDialog,#invoiceDialog,.modal.large,.retail-customer-dialog{max-height:calc(100dvh - 30px);width:calc(100vw - 20px)}
 .modal-bottom{flex-wrap:wrap}
 .tablewrap{max-width:100%;overflow-x:auto}
 .layout .form-row{grid-template-columns:1fr 1fr}
 .layout .order-finance{grid-template-columns:1fr}
 /* Rental calendar: seven compact day columns + full-size daily agenda.
    In particular, never force long customer names into 42px day cells. */
 .layout .rent-calendar-toolbar{padding:10px;gap:9px;border-radius:14px 14px 0 0}
 .layout .rent-calendar-toolbar>div{width:100%;min-width:0;gap:6px;flex-wrap:nowrap}
 .layout .rent-calendar-toolbar>div:first-child strong{flex:1;margin-left:5px;min-width:0;
   font-size:13px;line-height:1.3;text-align:right}
 .layout .rent-calendar-toolbar>div:last-child{justify-content:space-between}
 .layout .rent-calendar-toolbar button{flex:0 0 auto;min-width:0;padding:8px 10px;font-size:12px}
 .layout .rent-calendar-toolbar [data-navigate=createRental]{margin-left:auto;font-size:12px}
 .layout .rent-calendar-grid{grid-template-columns:repeat(7,minmax(0,1fr));
   width:100%;max-width:100%;overflow:hidden;border:1px solid #e3eee7;border-right:0}
 .layout .calendar-dow{padding:9px 0;font-size:10px;white-space:nowrap;min-width:0}
 .layout .calendar-cell{min-width:0;height:60px;min-height:60px;padding:0;overflow:hidden}
 .layout .calendar-cell>.cal-date,
 .layout .calendar-cell>.calendar-event,
 .layout .calendar-cell>small{display:none!important}
 .layout .calendar-cell .mobile-calendar-day{width:100%;height:100%;min-width:0;display:flex;
   flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:3px 0;
   background:transparent;color:#4b5e53;border:0;border-radius:0}
 .layout .mobile-calendar-number{display:grid;place-items:center;width:26px;height:26px;
   border-radius:50%;font-size:12px;font-weight:800;line-height:1}
 .layout .calendar-today .mobile-calendar-number{background:#dff7e9;color:#087f4d}
 .layout .calendar-selected .mobile-calendar-day{background:#ecfbf2;box-shadow:inset 0 0 0 2px #0daa64}
 .layout .calendar-selected .mobile-calendar-number{background:#0daa64;color:#fff}
 .layout .mobile-calendar-count{display:grid;place-items:center;min-width:18px;height:16px;
   max-width:95%;padding:0 3px;border-radius:8px;background:#fff0cf;color:#9b650a;
   font-size:10px;font-weight:850;line-height:1}
 .layout .mobile-calendar-empty{display:block;height:16px}
 .layout .calendar-other{opacity:.55}
 .layout .mobile-calendar-agenda{display:block;margin:12px 0 8px;padding:13px;
   background:#fff;border:1px solid #e5eee8;border-radius:13px;box-shadow:0 3px 10px #132c2110}
 .layout .mobile-calendar-agenda-head{display:flex;align-items:center;justify-content:space-between;
   flex-wrap:wrap;gap:8px;margin-bottom:10px;font-size:14px;color:#174933}
 .layout .mobile-calendar-agenda-head>span{color:#698373;font-size:12px}
 .layout .mobile-calendar-booking{display:flex;align-items:center;gap:9px;min-width:0;
   width:100%;text-align:left;background:#f7faf8;border:1px solid #e5eee8;border-radius:10px;
   padding:10px;margin-top:8px;font-size:12px;color:#234a38;min-height:50px}
 .layout .mobile-calendar-booking-main{display:block;min-width:0;flex:1;overflow-wrap:anywhere}
 .layout .mobile-calendar-booking-main strong{display:block;font-size:13px}
 .layout .mobile-calendar-booking-main small{display:block;color:#788b7e;font-size:11px;
   margin-top:3px;white-space:normal}
 .layout .mobile-calendar-booking .rent-tag{flex:0 0 auto;font-size:10px}
 .layout .mobile-calendar-no-bookings{font-size:12px;color:#7e9387;margin:0}
 .layout .calendar-legend{gap:8px 15px;padding:12px 3px;font-size:11px}
 .layout .calendar-legend small{margin-left:0;flex-basis:100%;line-height:1.5}
}
@media(max-width:380px){
 .mobile-home-grid{gap:8px}
 .mobile-home-grid button{min-height:98px;font-size:11px}
 .mobile-bottom-nav button{font-size:9px}
}
@media(min-width:701px){.mobile-home-shortcuts,.mobile-kpi-toggle,.mobile-rental-toggle{display:none!important}}
