/* Mile I Shipping V84.1 full-sweep hardening */
*{min-width:0}
html,body{max-width:100%;overflow-x:hidden}
.btn,.button,button.icon-control,.live-admin-actions button,.v84-form-section button{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.2}
.live-admin-dialog,.v84-operations-dialog,.v81-rate-dialog{max-height:calc(100dvh - 24px);overflow:hidden}
.live-admin-dialog form,.v84-operations-dialog form,.v81-rate-dialog form{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.live-admin-fields,.v84-section-grid,.v81-rate-dialog-body{min-width:0}
.live-admin-fields label,.v84-section-grid label,.v84-invoice-line>*{min-width:0;overflow-wrap:anywhere}
.live-admin-fields input,.live-admin-fields select,.live-admin-fields textarea,.v81-rate-dialog input,.v81-rate-dialog select,.v81-rate-dialog textarea{max-width:100%;box-sizing:border-box}
.rates-page-hero{contain:paint;overflow:clip!important;min-width:0!important}
.rates-page-hero::after{display:none!important}
.rates-page-hero-inner,.rates-page-hero h1,.rates-page-hero p{min-width:0;overflow-wrap:anywhere}
.input-with-suffix,.input-with-prefix{min-width:0!important;width:100%!important;max-width:100%!important;overflow:hidden!important;box-sizing:border-box!important}
.input-with-suffix input,.input-with-prefix input{min-width:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important}
#help-dynamic-panel{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;padding-bottom:18px!important}
.service-legend,.service-legend div,.service-breakdown-card{min-width:0!important;max-width:100%!important}
.service-legend strong,.service-legend span{overflow-wrap:anywhere}
.table th,.table td,.admin-data-table th,.admin-data-table td{overflow-wrap:anywhere}
.v77-role-notice{line-height:1.5}
body[data-staff-role="support"] .live-admin-manage-package{display:none!important}
@media(max-width:720px){
  .package-filter-tabs,.help-topic-tabs,.settings-tab-bar{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;width:100%!important;max-width:100%!important}
  .package-filter-tabs button,.help-topic-tabs button,.settings-tab-bar button{flex:1 1 calc(33.333% - 8px)!important;max-width:100%!important;padding-inline:9px!important;white-space:normal!important;text-align:center!important}
  .service-legend div{grid-template-columns:12px minmax(0,1fr) auto!important}
  .service-legend strong{justify-self:end;max-width:72px;text-align:right}
  .live-admin-dialog,.v84-operations-dialog,.v81-rate-dialog{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;border-radius:14px!important}
  .live-admin-dialog form,.v84-operations-dialog form,.v81-rate-dialog form{max-height:calc(100dvh - 16px)!important}
  .live-admin-dialog-head,.v81-rate-dialog-head{padding:18px 16px 14px!important}
  .live-admin-dialog-head h3,.v81-rate-dialog-head h3{font-size:23px!important;line-height:1.15!important}
  .live-admin-fields,.v81-rate-dialog-body{padding:16px!important}
  .v84-section-grid,.v81-rate-form-grid{grid-template-columns:1fr!important}
  .v84-section-grid .full,.v81-rate-form-grid .full{grid-column:auto!important}
  .live-admin-actions,.v81-rate-dialog-actions{position:sticky;bottom:0;z-index:4;display:grid!important;grid-template-columns:1fr 1fr!important;padding:12px 16px!important;background:#fff;border-top:1px solid #e1e9f2}
  .live-admin-actions button,.v81-rate-dialog-actions button{width:100%!important;min-width:0!important;padding-inline:10px!important}
  .v84-invoice-line{grid-template-columns:minmax(0,1fr) 70px 90px!important;gap:8px!important}
  .v84-invoice-line .v84-line-total{grid-column:1/3;text-align:left}
  .v84-invoice-line .v84-remove-line{grid-column:3;grid-row:2}
}
@media(max-width:430px){
  .package-filter-tabs button,.help-topic-tabs button,.settings-tab-bar button{flex-basis:calc(50% - 6px)!important}
  .live-admin-actions,.v81-rate-dialog-actions{grid-template-columns:1fr!important}
}

/* ======================================================================
   V84.2 PUBLIC HEADER RESPONSIVE CORRECTION
   Prevents the logo, navigation and account actions from overflowing at
   desktop browser zoom levels and medium laptop viewport widths.
   ====================================================================== */
@media (min-width:1421px){
  .site-header{
    grid-template-columns:minmax(230px,270px) minmax(0,1fr) auto!important;
    gap:clamp(10px,1.15vw,20px)!important;
    padding-inline:clamp(20px,2.6vw,44px)!important;
  }
  .site-header .brand{
    width:270px!important;
    min-width:230px!important;
    max-width:270px!important;
    height:86px!important;
  }
  .site-header .brand img{
    width:100%!important;
    max-width:270px!important;
    max-height:76px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }
  .site-header nav{
    min-width:0!important;
    gap:clamp(10px,.95vw,18px)!important;
  }
  .site-header nav a{
    min-width:0!important;
    white-space:nowrap!important;
    font-size:clamp(10px,.74vw,11.5px)!important;
  }
  .site-header .header-actions{
    min-width:0!important;
    gap:8px!important;
    white-space:nowrap!important;
  }
  .site-header .header-actions .btn{
    min-width:0!important;
    padding-inline:clamp(12px,.9vw,17px)!important;
    font-size:10.5px!important;
  }
}

@media (min-width:901px) and (max-width:1420px){
  .site-header,
  .site-header.scrolled{
    min-height:82px!important;
    height:82px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:14px!important;
    padding:0 22px!important;
    background:rgba(3,23,53,.97)!important;
    box-shadow:0 8px 28px rgba(3,23,53,.2)!important;
    backdrop-filter:blur(10px)!important;
  }
  .site-header .brand{
    width:240px!important;
    min-width:0!important;
    max-width:240px!important;
    height:76px!important;
  }
  .site-header .brand img{
    width:230px!important;
    max-width:230px!important;
    max-height:68px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }
  .site-header .menu-toggle{
    display:grid!important;
    width:48px!important;
    height:48px!important;
    align-content:center!important;
    justify-content:center!important;
    border:0!important;
    border-radius:12px!important;
    background:#123b72!important;
  }
  .site-header .menu-toggle span{
    width:25px!important;
    height:2px!important;
    margin:4px 0!important;
    background:#fff!important;
  }
  .site-header nav,
  .site-header .header-actions{
    display:none!important;
  }
  body.menu-open .site-header{
    height:auto!important;
    min-height:82px!important;
    padding-bottom:16px!important;
  }
  body.menu-open .site-header nav{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
    gap:7px!important;
    padding:10px 0 0!important;
  }
  body.menu-open .site-header nav a{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:42px!important;
    padding:10px 12px!important;
    border-radius:9px!important;
    background:rgba(255,255,255,.07)!important;
    color:#fff!important;
    text-align:center!important;
    white-space:normal!important;
  }
  body.menu-open .site-header .header-actions{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
    gap:9px!important;
    padding-top:4px!important;
  }
  body.menu-open .site-header .header-actions .btn{
    width:100%!important;
    min-width:0!important;
  }
}

@media (max-width:620px){
  body.menu-open .site-header nav,
  body.menu-open .site-header .header-actions{
    grid-template-columns:1fr!important;
  }
}
