/* Mobile-only corrections. Desktop styling remains owned by the existing stylesheets. */
@media (max-width:720px) {
  html,body { width:100%; max-width:100%; overflow-x:hidden; }

  .umbrella-header {
    min-height:68px;
    padding:12px 16px;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
    gap:10px;
  }
  .umbrella-header .logo { min-width:0; padding:0; order:1; }
  .umbrella-header .logo>div { min-width:0; }
  .umbrella-header .logo small { white-space:normal; line-height:1.25; }
  .umbrella-header .crm-navigator-header { width:100%; min-width:0; order:2; }
  .umbrella-header>div:last-child { align-items:center; gap:7px; flex-wrap:wrap; order:3; }
  #umbrellaUser { display:none; }
  .umbrella-header .secondary { padding:8px 10px; font-size:11px; }
  .umbrella-main { width:100%; max-width:none; margin:0; padding:24px 16px; }
  .umbrella-main h1 { font-size:26px; }
  .umbrella-main>div { width:100%; min-width:0; }
  .umbrella-main>div>p:not(.eyebrow) { margin-bottom:18px; }
  .umbrella-grid { width:100%; grid-template-columns:minmax(0,1fr); gap:12px; }
  .umbrella-choice { width:100%; min-width:0; min-height:132px; padding:18px; }
  .umbrella-choice b { font-size:18px; margin-top:9px; }
  .umbrella-choice small { margin-top:12px; }

  .app-shell,.workspace { width:100%; max-width:100%; min-width:0; }
  .sidebar nav {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(72px,1fr));
    gap:5px;
    overflow:visible;
  }
  .sidebar .nav-btn {
    min-width:0;
    min-height:58px;
    padding:8px 4px;
    flex-direction:column;
    justify-content:center;
    gap:3px;
    text-align:center;
    white-space:normal;
    font-size:10px;
    line-height:1.15;
  }
  .sidebar .nav-btn span { font-size:16px; }
  .workspace header {
    min-height:74px;
    height:auto;
    padding:10px 12px;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:10px;
    overflow:visible;
  }
  .workspace header>div:first-child { min-width:0; }
  .workspace header h1 { font-size:19px; line-height:1.15; }
  .workspace header p { font-size:9px; }
  .header-actions {
    min-width:0;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:6px;
    overflow:visible;
    padding:2px 0 0;
  }
  .header-actions button {
    flex:0 0 auto;
    padding:8px 9px;
    font-size:11px !important;
    white-space:nowrap;
  }
  .header-actions button::after { content:none !important; }

  .app-shell.enquiries-focus main { padding:12px; }
  .pilot-stats {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-bottom:12px;
    overflow:visible;
  }
  .pilot-stats article {
    min-width:0;
    min-height:78px;
    padding:12px;
  }
  .pilot-stats article:last-child:nth-child(odd) { grid-column:1/-1; }
  .pilot-stats b { margin-bottom:5px; font-size:21px; }
  .pilot-stats span { font-size:10px; }

  .pilot-toolbar { gap:8px; margin-bottom:12px; }
  .pilot-toolbar .search { width:100%; min-height:42px; }
  .pilot-toolbar .filters {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    width:100%;
    gap:7px;
  }
  .pilot-toolbar .filters select { width:100%; min-width:0; padding:9px 8px; font-size:11px; }
  #ownerFilter { grid-column:1 / -1; }

  .pilot-layout { grid-template-columns:minmax(0,1fr); gap:12px; }
  .pilot-records,.pilot-reminders { min-width:0; }
  .records-heading { display:block; min-height:0; padding:12px; }
  .records-title { margin-bottom:9px; }
  .record-heading-tools { width:100%; align-items:stretch; margin:0; gap:7px; }
  .category-rooms { width:100%; align-items:stretch; margin:0; }
  .category-room-row {
    width:100%;
    max-width:none;
    justify-content:flex-start;
    overflow-x:auto;
    scrollbar-width:thin;
  }
  .category-room { min-height:34px; padding:6px 9px; font-size:11px; }
  .management-review { justify-content:flex-end; flex-wrap:wrap; }

  .pilot-records .enquiry-record {
    display:grid;
    grid-template-columns:minmax(0,1fr) !important;
    gap:9px 12px;
    min-height:0;
    padding:14px 12px;
    align-items:start;
  }
  .pilot-records .enquiry-record>.enquiry-customer,
  .pilot-records .enquiry-record>.enquiry-list-field {
    display:block !important;
    grid-column:1;
    min-width:0;
  }
  .pilot-records .enquiry-record>.enquiry-list-field {
    padding-top:9px;
    border-top:1px solid #edf1f3;
  }
  .pilot-records .enquiry-record>.enquiry-row-placeholder { display:none !important; }
  .pilot-records .enquiry-record>.enquiry-customer { padding-right:0; }
  .pilot-records .enquiry-record .record-label { margin-bottom:3px; }
  .pilot-records .enquiry-record b { overflow-wrap:anywhere; }

  dialog.modal,dialog.modal.wide {
    width:calc(100vw - 16px);
    max-width:calc(100vw - 16px);
    max-height:calc(100vh - 16px);
    margin:auto;
    overflow:hidden;
  }
  .modal form { max-height:calc(100vh - 16px); }
  .modal-head { padding:14px 15px; }
  .modal-head h2 { font-size:18px; }
  .form-tabs { width:100%; max-width:100%; padding:0 4px; overflow-x:auto; }
  .tab { flex:0 0 auto; padding:11px 10px; font-size:11px; }
  .modal-body { padding:6px 15px 18px; overflow-x:hidden; }
  .form-grid { width:100%; min-width:0; column-gap:0; }
  .form-grid label,.form-grid input,.form-grid select,.form-grid textarea { min-width:0; max-width:100%; }
  .modal-foot { flex-direction:row; align-items:center; padding:11px 15px; }
  .modal-foot>div { width:auto; margin-left:auto; }
  .modal-foot button { min-height:42px; }
}
