/* LEITO tenant-only responsive improvements. Keep dense calendars inside their own scroll areas.
   Do NOT change the shared Management Trial, API, or other tenant deployments. */
html{min-width:0;width:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0;max-width:100%;width:100%;margin:0}
.shell,.shell>div,.main,#content{min-width:0;max-width:100%}
.main{width:100%}
img,video,canvas,svg{max-width:100%}
input,select,textarea{min-width:0}
.panel,.guestroom,.roomcard,.stat,.operations-detail,.detail-body{min-width:0;max-width:100%}
.scroll,.calendar-scroll,.availability-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
@media(max-width:700px){
  .shell{display:block;width:100%;min-width:0}
  .shell>aside,.shell>.main,.shell>div{min-width:0;width:100%;max-width:100%}
  aside{width:100%;padding:12px 14px}
  .main{width:100%;padding:14px 12px max(18px,env(safe-area-inset-bottom))}
  .main>header{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px;min-width:0}
  .main>header>*,header .toolbar>*{min-width:0;max-width:100%}
  .main h1{font-size:clamp(23px,7vw,29px);line-height:1.15;overflow-wrap:anywhere}
  .main h2{font-size:clamp(17px,5vw,21px);overflow-wrap:anywhere}
  .brand{display:flex;align-items:center;gap:10px;min-width:0}
  .brandlogo{width:66px;height:66px;flex:none;max-width:66px;margin:0;object-fit:contain}
  .brandname{font-size:clamp(17px,5vw,24px);letter-spacing:.02em}
  .language-control{flex-wrap:wrap;min-width:0}
  nav{display:flex;min-width:0;max-width:100%;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding-bottom:5px}
  nav button{flex:none;font-size:13px;line-height:1.25;padding:10px 12px;min-height:44px}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:15px}
  .stat{padding:11px 12px}
  .stat strong{font-size:clamp(21px,6vw,28px);overflow-wrap:anywhere}
  .cards,.guestrooms,.occupancy-grid,.report-stats{grid-template-columns:minmax(0,1fr)}
  .toolbar,.report-toolbar{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;max-width:100%}
  .toolbar>*,.report-toolbar>*{max-width:100%;min-width:0}
  .toolbar .spacer{display:none}
  .toolbar input:not([type=checkbox]),.toolbar select,.toolbar .btn{min-width:0;max-width:100%}
  .toolbar input[type=search]{max-width:100%;width:100%}
  .panel{max-width:100%;margin-bottom:14px}
  .panelhead{padding:12px;gap:10px}
  .roomcard{padding:14px}
  .guestrow{grid-template-columns:58px minmax(0,1fr);gap:8px}
  .month-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;padding:0 7px 10px}
  .month-day{min-width:0;min-height:60px;padding:5px 3px;gap:2px}
  .month-day strong{font-size:clamp(14px,4.1vw,18px)}
  .month-day span{font-size:9px;overflow-wrap:anywhere}
  .weekday{font-size:10px;padding:5px 0}
  .month-heading{flex-wrap:wrap;padding:10px;gap:6px}
  .month-heading h2{min-width:100%;flex:auto;font-size:18px}
  .month-legend{flex-wrap:wrap;padding:10px 12px;gap:8px}
  dialog,.operations-detail,.guest-contact-dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);box-sizing:border-box}
  dialog form,.guest-contact-dialog form{padding:14px}
  .formgrid,.availability-rooms,.leito-balance-summary{grid-template-columns:minmax(0,1fr)}
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px;max-width:100%}
  dialog input,dialog select,dialog textarea{width:100%}
  .actions{flex-wrap:wrap;gap:8px}
  .actions>.btn,.actions>button{min-height:42px;max-width:100%}
  .refundbox{max-width:calc(100vw - 20px);padding:14px}
  .detail-head{padding:12px;gap:8px;flex-wrap:wrap}
  .detail-body{padding:10px}
  .calendar-scroll,.availability-scroll{max-width:100%;overflow-x:auto}
  /* Large booking grids scroll locally instead of forcing the entire page to zoom out. */
  .calendar-scroll .calendar,.availability-scroll .availability-timeline{min-width:640px}
}
@media(max-width:370px){
  .main{padding-inline:9px}
  .stats{grid-template-columns:minmax(0,1fr)}
  .stat strong{font-size:24px}
  .brandlogo{width:56px;height:56px;max-width:56px}
  .month-grid{gap:2px;padding-inline:5px}
  .month-day{padding:5px 2px;min-height:56px}
  .month-day span{font-size:8px}
}

/* ===== LEITO phone app shell (v4, 2026-11-25). Active only when app/leito-mobile.js adds
   html.leito-m (screens up to 760px). Works the same on iPhone and Android. ===== */
html.leito-m{--lm-bar:56px;--lm-tabs:62px;--lm-safe-b:env(safe-area-inset-bottom,0px);--lm-safe-t:env(safe-area-inset-top,0px);--lm-navy:#18324f;--lm-blue:#0875e2}
html.leito-m body{padding-bottom:calc(var(--lm-tabs) + var(--lm-safe-b) + 12px);background:#f4f8fe;-webkit-tap-highlight-color:transparent}
html.leito-m .shell{display:block}
/* The desktop sidebar, banner, page hero and session row are replaced by the app shell. */
html.leito-m .shell>aside,html.leito-m .demo,html.leito-m .main>header,html.leito-m #rolebar,html.leito-m .main>footer{display:none!important}
html.leito-m .main{padding:12px 12px 8px}
/* Top bar */
html.leito-m #lm-bar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:11px;min-height:var(--lm-bar);padding:calc(8px + var(--lm-safe-t)) 14px 8px;background:var(--lm-navy);color:#fff;box-shadow:0 2px 10px rgba(10,30,60,.18)}
html.leito-m #lm-bar img{width:34px;height:34px;border-radius:9px;flex:none}
html.leito-m .lm-titles{display:flex;flex-direction:column;min-width:0;line-height:1.15}
html.leito-m #lm-title{font:700 18px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.leito-m #lm-hostel{font:500 12.5px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;opacity:.78;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.leito-m #lm-hostel:empty{display:none}
/* Bottom tabs (thumb reach on both platforms; 48px+ touch targets) */
html.leito-m #lm-tabs{position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;height:calc(var(--lm-tabs) + var(--lm-safe-b));padding:0 4px var(--lm-safe-b);background:#fff;border-top:1px solid #dbe5f0;box-shadow:0 -4px 16px rgba(10,30,60,.07)}
html.leito-m #lm-tabs button{all:unset;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:48px;color:#5b6f86;font:600 11.5px/1.1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;cursor:pointer;-webkit-user-select:none;user-select:none}
html.leito-m #lm-tabs button span{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px}
html.leito-m #lm-tabs .lm-icon{width:25px;height:25px;padding:3px 14px;border-radius:16px;box-sizing:content-box;transition:background .15s}
html.leito-m #lm-tabs button[aria-current] {color:var(--lm-blue)}
html.leito-m #lm-tabs button[aria-current] .lm-icon{background:#e3efff}
html.leito-m #lm-tabs button:focus-visible .lm-icon{outline:2px solid var(--lm-blue)}
/* Floating new-reservation button */
html.leito-m #lm-fab{position:fixed;right:16px;bottom:calc(var(--lm-tabs) + var(--lm-safe-b) + 16px);z-index:41;width:58px;height:58px;border:0;border-radius:18px;background:linear-gradient(135deg,#17baf8,#0875e2 55%,#003083);color:#fff;box-shadow:0 8px 20px rgba(8,80,180,.38);display:grid;place-items:center;cursor:pointer}
html.leito-m #lm-fab[hidden]{display:none}
html.leito-m #lm-fab .lm-fab-icon{width:28px;height:28px;stroke-width:2.6}
html.leito-m #lm-fab:active{transform:scale(.96)}
/* While typing, keep the keyboard area clear (Android resizes the page for the keyboard). */
html.leito-m.lm-typing #lm-tabs,html.leito-m.lm-typing #lm-fab{display:none}
/* "More" sheet */
html.leito-m #lm-sheet{position:fixed;inset:0;z-index:60;background:rgba(8,22,40,.45);display:flex;align-items:flex-end}
html.leito-m #lm-sheet[hidden]{display:none}
html.leito-m.lm-sheet-open body{overflow:hidden}
html.leito-m .lm-panel{width:100%;max-height:85dvh;overflow:auto;background:#fff;border-radius:20px 20px 0 0;padding:6px 14px calc(14px + var(--lm-safe-b));box-shadow:0 -10px 40px rgba(0,0,0,.2);animation:lm-up .18s ease-out}
@keyframes lm-up{from{transform:translateY(30px)}to{transform:none}}
html.leito-m .lm-grip{width:40px;height:5px;border-radius:3px;background:#cfd9e4;margin:6px auto 8px}
html.leito-m .lm-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 8px;font:700 17px system-ui,-apple-system,Roboto,sans-serif;color:#17365a}
html.leito-m .lm-close{border:0;background:#eef3f8;color:#17365a;width:40px;height:40px;border-radius:20px;font-size:16px;cursor:pointer}
html.leito-m .lm-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}
html.leito-m .lm-list button{display:flex;align-items:center;gap:10px;min-height:56px;padding:10px 12px;border:1px solid #e1e9f2;border-radius:14px;background:#f7faff;color:#17365a;font:600 14px/1.2 system-ui,-apple-system,Roboto,sans-serif;text-align:left;cursor:pointer}
html.leito-m .lm-list button[aria-current]{border-color:var(--lm-blue);background:#e3efff}
html.leito-m .lm-list .lm-icon,html.leito-m .lm-language .lm-icon{width:22px;height:22px;flex:none;color:var(--lm-blue)}
html.leito-m .lm-language{display:flex;align-items:center;gap:10px;margin:14px 0 0;padding:6px 12px;border:1px solid #e1e9f2;border-radius:14px;font:600 14px system-ui,-apple-system,Roboto,sans-serif;color:#17365a}
html.leito-m .lm-language span{flex:1}
html.leito-m .lm-language select{width:auto;min-height:44px;margin:0;border:0;background:transparent;font:600 15px system-ui,-apple-system,Roboto,sans-serif;color:var(--lm-blue)}
html.leito-m .lm-session{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;padding:12px;border-radius:14px;background:#f4f8fc;font:14px system-ui,-apple-system,Roboto,sans-serif;color:#33475e}
html.leito-m .lm-logout{flex:none;min-height:44px;padding:0 16px;border:1px solid #c9d6e4;border-radius:12px;background:#fff;color:#b42318;font:600 14px system-ui,-apple-system,Roboto,sans-serif}
/* Toast sits above the tab bar */
html.leito-m #toast{bottom:calc(var(--lm-tabs) + var(--lm-safe-b) + 16px);left:12px;right:88px;z-index:45}
/* Summary cards: tighter */
html.leito-m .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
html.leito-m .stat{padding:10px 12px;border-radius:14px}
html.leito-m .stat strong{font-size:clamp(20px,6vw,25px)}
/* Bed calendar: readable dates, wider guest names, bed column stays visible while scrolling */
html.leito-m .calendar,html.leito-m .calendar-scroll table{min-width:860px}
html.leito-m .calendar th{white-space:nowrap;font-size:11.5px;padding:10px 3px}
html.leito-m .calendar th:first-child,html.leito-m .calendar td:first-child{position:sticky;left:0;z-index:2;background:#fafbf8;width:118px}
html.leito-m .calendar tr.room td{position:static;background:#fff7e6}
html.leito-m .calendar button{height:34px;font-size:12px}
html.leito-m .calendar-scroll{border-radius:12px}
/* Month view: one-row header, colour-coded days without squeezed text */
html.leito-m .month-heading{display:flex;flex-direction:row!important;flex-wrap:nowrap;align-items:center;gap:6px}
html.leito-m .month-heading h2{flex:1;min-width:0!important;order:0;text-align:center;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.leito-m .month-heading .btn{min-width:44px;min-height:44px;padding:0 10px}
html.leito-m #monthtoday{order:3}
html.leito-m .month-day{min-height:52px}
html.leito-m .month-day>span,html.leito-m .month-day>small{display:none}
html.leito-m .month-legend{font-size:12px}
/* Toolbars: date pickers and buttons wrap cleanly */
html.leito-m .toolbar{gap:8px}
html.leito-m .toolbar .btn,html.leito-m .toolbar select{min-height:44px}
html.leito-m .report-toolbar label{flex:1 1 140px}
html.leito-m #reportapply{flex:1 1 100%}
/* Dialogs: booking form opens full screen; every dialog keeps its title and close button on one row */
html.leito-m dialog .panelhead{display:flex;flex-direction:row!important;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:10px}
html.leito-m dialog .panelhead h2{margin:0;font-size:19px}
html.leito-m dialog .panelhead .btn{flex:none;min-width:44px;min-height:44px}
html.leito-m dialog#booking,html.leito-m dialog#roomdialog,html.leito-m dialog#receiptdialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0;padding:0}
html.leito-m dialog#booking form,html.leito-m dialog#roomdialog form,html.leito-m dialog#receiptdialog>*{padding:0 16px calc(24px + var(--lm-safe-b))}
html.leito-m dialog#booking .panelhead{position:sticky;top:0;z-index:3;background:var(--cream,#fff);margin:0 -16px;width:calc(100% + 32px);max-width:none;padding:calc(10px + var(--lm-safe-t)) 16px 10px!important;border-bottom:1px solid #e1e9f2}
/* Comfortable touch targets and no iOS zoom-on-focus (inputs at 16px) */
html.leito-m input:not([type=checkbox]):not([type=radio]),html.leito-m select,html.leito-m textarea{font-size:16px}
html.leito-m .btn{min-height:44px}

/* LEITO 3.1.0: calendar button icon that looks the same in every browser
   (Safari drew the old text symbol as a blank square). */
.mandioca-date-button{font-size:0!important;line-height:0!important;display:inline-flex!important;align-items:center;justify-content:center}
.mandioca-date-button::before{content:"";width:20px;height:20px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3Cpath d='M7.5 13.5h2M11 13.5h2M14.5 13.5h2M7.5 17h2M11 17h2'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3Cpath d='M7.5 13.5h2M11 13.5h2M14.5 13.5h2M7.5 17h2M11 17h2'/%3E%3C/svg%3E") center/contain no-repeat}

/* LEITO 3.1.0: easier reading on laptops and big monitors (phones unchanged). */
@media (min-width:1100px){body{zoom:1.12}}
@media (min-width:1440px){body{zoom:1.2}}
@media (min-width:1800px){body{zoom:1.3}}
