/* Mobile only: desktop layouts, calendar dates and business operations unchanged. */
@media screen and (max-width:1050px) {
  html body.renta-app.ui-ready .rnx-shell > #renta-navigation,
  html body.renta-admin.ui-ready .admin-shell > #renta-navigation {
    max-width: min(300px, calc(100vw - 32px)) !important;
    height: 100dvh !important;
    overflow: auto !important;
    overscroll-behavior: contain;
  }
  html body.ui-nav-open:is(.renta-app,.renta-admin) {overflow:hidden;}
  html body.renta-app .rnx-content,
  html body.renta-admin .admin-content,
  html body.rd-dialog main {min-width:0;box-sizing:border-box;}
  html body:is(.renta-app,.renta-admin,.rd-dialog,.renta-utility) :is(.table-wrap,.rf-scroll,.tpl-table-scroll,.ppv-table-scroll) {
    max-width:100%;min-width:0;overflow-x:auto!important;overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
  }
  [data-rmc-scroll]:focus-visible {outline:2px solid #315fbd;outline-offset:2px;}
}
@media screen and (max-width:640px) {
  /* Search spans the second row; keep all primary controls reachable. */
  html body.renta-app main.rnx-content > .rnx-topbar {
    display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px!important;
    padding:9px 10px!important;margin:0 0 10px!important;
    width:100%!important;min-width:0;box-sizing:border-box;
  }
  html body.renta-app .rnx-topbar .ui-menu-button {
    grid-column:1;grid-row:1;justify-self:start;display:inline-flex!important;
    align-items:center;gap:7px;min-height:42px!important;padding:7px 9px!important;
  }
  html body.renta-app .rnx-topbar .rnx-company {display:none!important;}
  html body.renta-app .rnx-topbar .header-actions {
    grid-column:2;grid-row:1;display:flex!important;align-items:center;justify-content:flex-end;
    gap:5px!important;flex-wrap:wrap;min-width:0;width:auto!important;
  }
  html body.renta-app .rnx-topbar .header-user {display:none!important;}
  html body.renta-app .rnx-topbar .header-actions :is(.header-icon,.rnx-create>summary) {
    min-height:42px!important;min-width:40px!important;flex-shrink:0;
  }
  html body.renta-app .rnx-topbar form.global-search {
    grid-column:1/-1;grid-row:2;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;
  }
  html body.renta-app .rnx-topbar form.global-search input[name=q] {
    min-height:42px;font-size:16px!important;padding-right:12px!important;
  }
  html body.renta-app .rnx-topbar form.global-search kbd {display:none!important;}
  html body.renta-app .rnx-topbar .rnx-create {position:relative;}
  html body.renta-app .rnx-topbar .rnx-create>div {max-width:calc(100vw - 24px);}
  html body.renta-app .rnx-section-heading {flex-wrap:wrap;gap:8px;}
  html body.renta-app .rnx-section-heading .badge {white-space:normal;overflow-wrap:anywhere;}
  html body:is(.renta-app,.renta-admin) :is(.page-body,.admin-content) > :is(.card,.form-card,.page-dashboard,.equipment-page,.settings-layout,.rental-master-detail,.split-layout) {min-width:0;max-width:100%;}
  html body.renta-app :is(.page-filters,.equipment-filters,.psl-filters,.psh-search,.rpa-filters,.rnx-branch-search,.crm-search) {
    display:flex!important;flex-wrap:wrap;gap:9px!important;align-items:end;
  }
  html body.renta-app :is(.page-filters,.equipment-filters,.psl-filters,.psh-search,.rpa-filters,.rnx-branch-search,.crm-search)>label {
    flex:1 1 140px;min-width:0;max-width:100%;
  }
  html body.renta-app :is(.page-filters,.equipment-filters,.psl-filters,.psh-search,.rpa-filters,.rnx-branch-search,.crm-search)>:is(.btn,button) {flex:1 1 100px;min-height:42px;}
  html body:is(.rd-dialog,.renta-auth,.renta-app,.renta-admin,.renta-utility) form
    :is(input:not([type=hidden],[type=checkbox],[type=radio],[type=range],[type=color],[type=button],[type=submit],[type=reset],[type=image]),select,textarea) {
      max-width:100%;min-width:0;font-size:16px!important;box-sizing:border-box;
  }
  html body:is(.renta-app,.rd-dialog) :is(.rf-layout,.rf-issue-layout,.cw-layout,.rnx-rental-overview,.rental-master-detail,.ro-workday .ro-columns) {
    grid-template-columns:minmax(0,1fr)!important;min-width:0;
  }
  html body:is(.renta-app,.rd-dialog) :is(.rf-main,.rf-summary,.cw-main,.cw-sidebar) {min-width:0;max-width:100%;}
  html body:is(.renta-app,.rd-dialog) :is(.rf-summary,.cw-sidebar) {position:static!important;}
  html body:is(.renta-app,.rd-dialog) :is(.rf-shortcuts,.rf-modal-bottom,.rf-pack-actions,.cw-actions,.rd5-actions) {flex-wrap:wrap;gap:8px;}
  html body:is(.renta-app,.rd-dialog) :is(.rf-shortcuts,.rf-modal-bottom,.rf-pack-actions,.cw-actions) .btn {white-space:normal;min-height:42px;}
  html body.rd-ui dialog:is(.rf-dialog,.rrt-dialog,.rpm-dialog,.rpj-confirm,.cw-paper-confirm,.cs-dialog,.tpl-dialog,.ppv-pay-dialog,.psc-dialog,#rcc-extend-dialog,#rf-document-pack) {
    box-sizing:border-box;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;overflow-y:auto;overscroll-behavior:contain;
  }
  html[data-rnx] body.renta-app dialog.rental-card-modal {
    box-sizing:border-box;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;
  }
  html body.renta-app dialog.rental-card-modal > header {flex-wrap:wrap;gap:6px;padding:8px 10px;}
  html body.renta-app dialog.rental-card-modal > header > div {flex-wrap:wrap;min-width:0;}
  html body.renta-app dialog.rental-card-modal [data-card-close] {min-width:42px;min-height:42px;}
  html body.renta-app dialog.rental-card-modal iframe {min-width:0;max-width:100%;display:block;}
  html body:is(.renta-app,.rd-dialog) :is(.rf-scroll,.table-wrap) > table {max-width:none;}
  html body.renta-auth :is(.auth-main,.auth-aside) {min-width:0;max-width:100%;}
  html body.renta-auth .ui-password-row {min-width:0;max-width:100%;}
}
@media screen and (max-width:360px) {
  html body.renta-app .rnx-topbar .ui-menu-button span {display:none;}
}
