/* Desktop controls retain their existing layout. Resize handles are handles, not full buttons. */
html[data-theme] body .ps72-resize{min-height:0!important;width:10px!important;height:26px!important;max-width:10px!important;padding:0!important;position:absolute!important;right:0!important;top:5px!important;border:0!important;border-radius:3px!important;background:transparent!important;color:var(--muted)!important;cursor:col-resize!important;touch-action:none}
html[data-theme] body .ps54-sort{width:auto!important;min-height:30px!important;padding:4px 12px 4px 0!important;background:transparent!important;border:0!important;color:var(--text)!important;text-align:left;font-size:inherit!important}
.m77-more,.m77-table-options,.m77-row-actions,.m77-view-toggle{display:none}.m77-choice-hint{display:none;font-size:.75rem;color:var(--muted,#52616c);font-weight:400;margin-top:4px}
/* The same mobile rules are also loaded by standalone check-in, DTE and customer forms. */
@media(max-width:900px){
html.m77-active{--m77-gap:12px}body{overflow-wrap:break-word}
html.m77-active body :is(main,#erp-module-content,.content,.page-content,.panel,.card,.g73,.p75-content){min-width:0;max-width:100%;box-sizing:border-box}
html.m77-active body .m77-form{min-width:0!important;max-width:100%!important;width:100%;box-sizing:border-box;gap:var(--m77-gap)!important}
html.m77-active body .m77-form:not(.m77-search-form){font-size:1rem;line-height:1.4}
html.m77-active body .m77-form :is(.form-grid,.erp-form-grid,.grid-2,.grid-3,.g75-grid,.g73-grid,.ln-grid,.rd63-fields,.rdoc-fields,.form-row,.p75-fields,.cr-fields,.rcom-fields,.checkin-grid,.sales-form-grid,.quote-form-grid,.ficha-grid){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;min-width:0!important}
html.m77-active body .m77-form:is(.erp-form,.g73-form,.ln-grid,.form-grid,.form,.p75-panel){display:grid!important;grid-template-columns:minmax(0,1fr)!important}
html.m77-active body .m77-form label{min-width:0!important;max-width:100%;width:auto;height:auto!important;align-self:start;box-sizing:border-box;line-height:1.4;font-size:.9rem;font-weight:600}
html.m77-active body .m77-form label:not(:has(input[type=checkbox],input[type=radio])){display:flex!important;flex-direction:column!important;gap:5px}
html.m77-active body .m77-form :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea){box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:44px!important;height:auto!important;padding:10px 11px!important;font-size:16px!important;line-height:1.35!important;border:1px solid var(--border,#cbd5dc)!important;border-radius:9px!important;background:var(--panel,#fff);color:var(--text,#172c36)}
html.m77-active body .m77-form textarea{min-height:80px!important;resize:vertical}
html.m77-active body .m77-form :is(input[type=checkbox],input[type=radio]){width:20px!important;min-height:20px!important;flex:0 0 20px}
html.m77-active body .m77-form label:has(input[type=checkbox],input[type=radio]){display:flex!important;gap:8px;align-items:flex-start}
html.m77-active body .m77-form :is(button,.button,input[type=submit]){min-height:44px!important;max-width:100%!important;height:auto!important;padding:10px 13px!important;line-height:1.25!important;font-size:.9rem!important}
html.m77-active body .m77-form :is(.actions,.form-actions,.g75-actions,.payment-modal-actions,.ln-actions,.rd63-actions){display:flex!important;gap:8px!important;flex-wrap:wrap;grid-column:1/-1;align-items:center;background:var(--panel,#fff);padding-block:8px}
html.m77-active body :is(.g75-actions,.reservation-modal-actions,.payment-modal-actions){position:sticky;bottom:0;z-index:4;border-top:1px solid var(--border,#cbd5dc)}
html.m77-active body .m77-form :is(fieldset,.panel,.cr-section,.checkin-admin-box){min-width:0!important;max-width:100%;padding:12px!important;margin:0 0 10px!important;border-radius:10px!important}
html.m77-active body :is(dialog[open],.reservation-floating[open],.jc-floating-window){box-sizing:border-box!important;width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;min-width:0!important;max-height:calc(var(--jc-vheight,100dvh) - 16px)!important;overflow:auto!important;overscroll-behavior:contain;padding:14px!important;border-radius:14px!important}
html.m77-active body :is(.reservation-modal-form,.sale-editor-body,.sales-payment-modal-card,.payment-modal-body){min-width:0!important;max-width:100%;padding:12px!important}
html.m77-active body :is(.cr-tabs,.rd63-tabs,.w76-tabs,.reservation-tabs){display:flex!important;gap:4px!important;flex-wrap:wrap!important;margin-bottom:12px}
html.m77-active body :is(.cr-tabs,.rd63-tabs,.w76-tabs,.reservation-tabs)>:is(button,a){min-width:0!important;min-height:40px!important;flex:1 1 auto!important;padding:8px!important;font-size:.8rem!important}
html.m77-active body :is(.g73-head,.g73-section-head,.module-header,.panel-title){gap:10px!important;padding:12px!important;min-height:0!important}
html.m77-active body :is(.g73-head,.module-header) h1{font-size:1.4rem!important;margin:0 0 6px!important}
html.m77-active body :is(.g73-nav,.seg53-cards){gap:6px!important;display:flex!important;flex-wrap:wrap!important}
html.m77-active body :is(.g73-nav,.seg53-cards)>:is(a,button){min-height:40px!important;padding:9px 11px!important;flex:1 1 130px!important}
html.m77-active body :is(.g73-nav a[aria-current],.g73-nav a.active,.g73-tabs a.active,.g73-tabs .active){background:var(--accent,#176579)!important;color:var(--erp76-on-accent,#fff)!important}
html.m77-active body .m77-more{display:block!important;grid-column:1/-1;min-width:0;border:1px solid var(--border,#ccd5db);border-radius:9px;padding:10px 12px;margin:4px 0}
.m77-more summary,.m77-table-options>summary,.m77-row-actions>summary{cursor:pointer;font-weight:650;min-height:24px;color:var(--text,#172c36)}
.m77-more-body,.m77-options-body{display:grid;gap:10px;padding-top:12px;min-width:0}
html.m77-active body .m77-form [hidden]{display:none!important}
html.m77-active body :is(.ps54-host,.ps54-scroll,.table-wrap){min-width:0!important;max-width:100%!important;box-sizing:border-box}
html.m77-active body .ps54-toolbar{display:flex!important;gap:8px!important;padding:10px!important}
html.m77-active body .ps54-search{width:100%!important;flex:1 1 100%!important;min-height:44px!important;font-size:16px!important}
.m77-table-options{display:block!important;flex:1 1 100%;border:1px solid var(--border,#cbd5dc);border-radius:8px;padding:9px 12px}
html.m77-active body .ps54-toolbar>.ps54-count{font-size:.8rem;margin:0}
html.m77-active body .m77-options-body :is(button,summary){width:auto!important;min-height:40px!important;padding:8px 10px!important;font-size:.8rem!important}
html.m77-active body .ps54-footer{display:flex!important;flex-wrap:wrap;gap:6px;padding:10px!important}
html.m77-active body .ps54-footer :is(button,select){width:auto!important;min-height:38px!important;font-size:.8rem!important;padding:8px!important}
html.m77-active body .ps54-footer>span{flex-basis:100%;font-size:.8rem}
html.m77-active body .m77-view-toggle{display:inline-flex!important;margin:8px 0;min-height:40px!important}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet){display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet)>:is(thead,colgroup){display:none!important}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet)>tbody{display:grid!important;gap:10px}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet)>tbody>tr:not([data-ps54-hidden]):not([hidden]){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--border,#cbd5dc);border-radius:10px;padding:10px;background:var(--panel,#fff)}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet)>tbody>tr>td{position:static!important;inset:auto!important;display:block;box-sizing:border-box!important;min-width:0!important;width:auto!important;max-width:100%!important;height:auto!important;min-height:0!important;padding:7px!important;white-space:normal!important;border:0!important;overflow-wrap:anywhere;background:transparent!important;font-size:.9rem}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet)>tbody>tr>td::before{content:attr(data-m77-label);display:block;font-size:.7rem;font-weight:600;color:var(--muted,#52616c);margin-bottom:3px}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet)>tbody>tr>td:last-child{grid-column:1/-1;display:flex!important;gap:8px;align-items:flex-start;flex-wrap:wrap;border-top:1px solid var(--border,#cbd5dc)!important}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet)>tbody>tr>td:last-child::before{display:none}
.m77-row-actions{display:block!important;flex:1;padding:10px;border:1px solid var(--border,#cbd5dc);border-radius:8px}
html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet) :is([data-ps54-hidden],[data-ps54-col-off]){display:none!important}
html.m77-active body .m77-row-actions:not([open])>.m77-options-body{display:none!important}
html.m77-active body .notification-center{z-index:40}html.m77-active body :is(#erp-module-content,.p75-content){padding-bottom:calc(100px + env(safe-area-inset-bottom))!important}
html.m77-active body .g73-tools{margin-block:10px!important}.g76-inline h3{font-size:1.1rem!important}
}
@media(max-width:480px){html.m77-active body .m77-form :is(.form-grid,.erp-form-grid,.grid-2,.grid-3,.g75-grid,.g73-grid,.ln-grid,.rd63-fields,.rdoc-fields,.form-row,.p75-fields,.cr-fields,.rcom-fields,.checkin-grid,.sales-form-grid,.quote-form-grid){grid-template-columns:minmax(0,1fr)!important}}
@media print{.m77-table-options,.m77-view-toggle,.m77-choice-hint{display:none!important}}

@media(max-width:900px){html.m77-active body .m77-form>*{min-width:0!important;max-width:100%!important;box-sizing:border-box}html.m77-active body .m77-form:not(.m77-search-form){display:grid!important;grid-template-columns:minmax(0,1fr)!important}html.m77-active body .m77-form .m77-fields{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;min-width:0!important}html.m77-active body .m77-form :is(label,div,section,fieldset)[hidden][hidden]{display:none!important}html.m77-active body .g73-tabs a[aria-current=page]{color:var(--erp76-on-accent,#fff)!important}html.m77-active body .g73-tabs a{min-height:40px!important;padding:9px!important;font-size:.8rem!important}html.m77-active body .m77-form .m77-more:empty{display:none!important}}
@media(max-width:480px){html.m77-active body .m77-form .m77-fields{grid-template-columns:minmax(0,1fr)!important}}

@media(max-width:900px){.m77-choice-hint{display:block}}

@media(max-width:900px){html.m77-active body .m77-form summary{white-space:normal!important;overflow-wrap:anywhere!important;min-width:0!important;max-width:100%!important;line-height:1.4!important}html.m77-active body #erp-module-content table.m77-records:not(.m77-sheet)>tbody>tr>td:not(:last-child)::before{display:block!important;content:attr(data-m77-label)!important}html.m77-active body .g73-tools>span{font-size:.8rem!important}}

@media(max-width:900px){html.m77-active body .g73-head p{font-size:.85rem!important;margin:5px 0!important}html.m77-active body .g73-head>.g73-tools{width:100%}html.m77-active body .m77-form>details{max-width:100%;box-sizing:border-box}html.m77-active body .g73-tabs{margin:12px 0!important}}

/* Compact desktop widgets without reflowing the established desktop forms. */
@media(min-width:901px){html[data-theme] body :is(.ps54-toolbar,.ps54-footer) :is(button,summary){min-height:32px!important;padding:6px 10px!important;font-size:.8rem!important}html[data-theme] body .ps54-toolbar>details{align-self:start;min-width:0;max-width:100%}html[data-theme] body .ps54-toolbar{padding:10px!important}}
