/* Mile I Shipping V87.28 — complete phone, tablet and small-screen launch alignment
   Desktop behavior is preserved. These rules apply only to compact devices unless noted. */

:root{
  --v8728-phone-gutter:14px;
  --v8728-tablet-gutter:20px;
  --v8728-header-height:72px;
  --v8728-text:#092f62;
  --v8728-muted:#617995;
  --v8728-border:#cbddec;
  --v8728-soft:#f3f8fd;
  --v8728-red:#ed1c2e;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;overflow-x:hidden}
body{min-width:0;overflow-x:hidden}
img,video,canvas{max-width:100%;height:auto}
input,select,textarea,button{font:inherit}
button,a,input,select,textarea{touch-action:manipulation}

/* The separate mobile sign-in dock is injected by v8728-responsive-launch.js. */
.v8728-mobile-auth-dock{display:none}

/* --------------------------------------------------------------------------
   TABLET / SMALL LAPTOP — coherent grids, readable tables and usable dialogs
   -------------------------------------------------------------------------- */
@media (max-width:1100px){
  html,body{width:100%;max-width:100%;min-width:0}

  body.portal-body .portal-main,
  body.portal-body .portal-main-v25,
  body.portal-body .admin-main-v29{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    padding-left:var(--v8728-tablet-gutter)!important;
    padding-right:var(--v8728-tablet-gutter)!important;
  }

  body.portal-body .portal-view,
  body.portal-body .panel,
  body.portal-body .portal-top,
  body.portal-body .portal-top-v25,
  body.portal-body .admin-filter-bar,
  body.portal-body .table-wrap,
  body.portal-body .admin-table-panel{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  body.portal-body .portal-top,
  body.portal-body .portal-top-v25{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:start!important;
    gap:14px!important;
  }

  body.portal-body .portal-top h1,
  body.portal-body .portal-top-v25 h1{
    max-width:100%!important;
    margin:.18em 0!important;
    font-size:clamp(30px,5vw,46px)!important;
    line-height:1.05!important;
    letter-spacing:-.025em!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  body.portal-body .portal-top p,
  body.portal-body .portal-top-v25 p{
    max-width:760px!important;
    margin:0!important;
    font-size:14px!important;
    line-height:1.5!important;
  }

  body.portal-body .admin-top-actions,
  body.portal-body .v81-rate-top-actions,
  body.portal-body .pt-section-actions{
    width:100%!important;
    display:flex!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    gap:9px!important;
  }

  body.portal-body .admin-top-actions>* ,
  body.portal-body .v81-rate-top-actions>*{
    min-width:0!important;
  }

  body.portal-body .table-wrap,
  body.portal-body .admin-table-panel .table-wrap,
  body.pt-private-page .pt-table-wrap{
    overflow-x:auto!important;
    overflow-y:visible!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-gutter:stable!important;
  }

  body.portal-body .table-wrap table,
  body.portal-body table.admin-data-table,
  body.pt-private-page .pt-table-wrap table{
    min-width:760px;
  }

  body.portal-body dialog,
  body.portal-body [role="dialog"],
  body.portal-body .v8648-dialog-shell,
  body.portal-body .v8649-shipment-dialog,
  body.pt-private-page dialog{
    width:min(960px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - 20px)!important;
    margin:auto!important;
  }

  body.portal-body dialog form,
  body.portal-body [role="dialog"] form,
  body.pt-private-page dialog form{
    min-width:0!important;
  }

  /* Main operational grids stop forcing narrow, unreadable columns. */
  body.portal-body .invoice-summary-grid,
  body.portal-body .v8612-finance-kpis,
  body.portal-body .v81-rate-kpis,
  body.portal-body .dashboard-kpi-grid,
  body.portal-body .admin-kpi-grid,
  body.portal-body [class*="summary-grid"],
  body.portal-body [class*="kpi-grid"]{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.pt-private-page .pt-app,
  body.pt-private-page .pt-view,
  body.pt-private-page .pt-section-head,
  body.pt-private-page .pt-db-shell,
  body.pt-private-page .pt-address-form,
  body.pt-private-page .pt-access-grid{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  body.pt-private-page .pt-app-header{
    align-items:flex-start!important;
    gap:14px!important;
  }
  body.pt-private-page .pt-header-actions{
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
  }
  body.pt-private-page .pt-tabs{
    overflow-x:auto!important;
    overscroll-behavior-x:contain!important;
    scrollbar-width:thin!important;
  }
  body.pt-private-page .pt-tabs button{white-space:nowrap!important}
  body.pt-private-page .pt-section-head{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
  body.pt-private-page .pt-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.pt-private-page .pt-full{grid-column:1/-1!important}
}

/* --------------------------------------------------------------------------
   PUBLIC PHONE/TABLET HEADER — navigation links and account actions separate
   -------------------------------------------------------------------------- */
@media (max-width:1024px){
  body.public-site .site-header,
  body.rates-page .site-header{
    position:fixed!important;
    inset:0 0 auto 0!important;
    z-index:2147482000!important;
    width:100%!important;
    height:var(--v8728-header-height)!important;
    min-height:var(--v8728-header-height)!important;
    max-height:var(--v8728-header-height)!important;
    padding:8px 12px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 52px!important;
    grid-template-rows:1fr!important;
    align-items:center!important;
    gap:10px!important;
    overflow:visible!important;
    background:#062653!important;
    border-bottom:1px solid rgba(255,255,255,.11)!important;
    box-shadow:0 10px 26px rgba(2,19,47,.18)!important;
  }

  body.public-site .site-header .brand,
  body.rates-page .site-header .brand{
    min-width:0!important;
    max-width:min(300px,calc(100vw - 92px))!important;
  }
  body.public-site .site-header .brand img,
  body.rates-page .site-header .brand img{
    display:block!important;
    width:auto!important;
    max-width:100%!important;
    max-height:54px!important;
    object-fit:contain!important;
  }
  body.public-site .site-header .menu-toggle,
  body.rates-page .site-header .menu-toggle{
    position:static!important;
    grid-column:2!important;
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    margin:0!important;
    border-radius:14px!important;
  }

  /* Hide the legacy actions regardless of whether an older script moved them into nav. */
  body.public-site .site-header .header-actions,
  body.rates-page .site-header .header-actions{
    display:none!important;
  }

  body.public-site .v8728-mobile-auth-dock,
  body.rates-page .v8728-mobile-auth-dock{
    position:fixed!important;
    z-index:2147482050!important;
    top:calc(var(--v8728-header-height) + 8px)!important;
    right:12px!important;
    width:min(360px,calc(100vw - 24px))!important;
    padding:9px!important;
    display:none!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:15px!important;
    background:#0a3267!important;
    box-shadow:0 18px 40px rgba(0,17,44,.30)!important;
  }
  body.public-site.menu-open .v8728-mobile-auth-dock,
  body.rates-page.menu-open .v8728-mobile-auth-dock{
    display:grid!important;
  }
  .v8728-mobile-auth-dock .btn{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    margin:0!important;
    padding:9px 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:10px!important;
    font-size:12px!important;
    font-weight:900!important;
    line-height:1.15!important;
    text-align:center!important;
    white-space:normal!important;
  }
  .v8728-mobile-auth-dock .btn-ghost{
    color:#fff!important;
    border:1px solid rgba(255,255,255,.34)!important;
    background:rgba(255,255,255,.06)!important;
  }

  body.public-site.menu-open .site-header,
  body.rates-page.menu-open .site-header{
    height:var(--v8728-header-height)!important;
    min-height:var(--v8728-header-height)!important;
    max-height:var(--v8728-header-height)!important;
    padding:8px 12px!important;
    overflow:visible!important;
  }

  body.public-site .site-header nav,
  body.rates-page .site-header nav,
  body.public-site.menu-open .site-header nav,
  body.rates-page.menu-open .site-header nav{
    position:fixed!important;
    z-index:2147482040!important;
    top:calc(var(--v8728-header-height) + 70px)!important;
    right:12px!important;
    left:auto!important;
    bottom:auto!important;
    width:min(360px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - var(--v8728-header-height) - 92px)!important;
    margin:0!important;
    padding:10px!important;
    display:none!important;
    grid-template-columns:1fr!important;
    gap:4px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:15px!important;
    background:#062653!important;
    box-shadow:0 20px 48px rgba(0,16,42,.34)!important;
  }
  body.public-site.menu-open .site-header nav,
  body.rates-page.menu-open .site-header nav{
    display:grid!important;
  }
  body.public-site .site-header nav a,
  body.rates-page .site-header nav a{
    width:100%!important;
    min-height:42px!important;
    padding:9px 11px!important;
    display:flex!important;
    align-items:center!important;
    border:1px solid transparent!important;
    border-radius:9px!important;
    color:#fff!important;
    font-size:13px!important;
    font-weight:850!important;
    line-height:1.25!important;
    letter-spacing:.01em!important;
    text-align:left!important;
    white-space:normal!important;
  }
  body.public-site .site-header nav a:hover,
  body.public-site .site-header nav a:focus-visible,
  body.rates-page .site-header nav a:hover,
  body.rates-page .site-header nav a:focus-visible{
    color:#fff!important;
    background:rgba(255,255,255,.075)!important;
    border-color:rgba(255,255,255,.13)!important;
  }
  body.public-site .site-header nav a::before,
  body.public-site .site-header nav a::after,
  body.rates-page .site-header nav a::before,
  body.rates-page .site-header nav a::after{display:none!important;content:none!important}

  body.public-site main,
  body.rates-page main{padding-top:var(--v8728-header-height)!important}

  body.home-page .mobile-home-hero-v63,
  body.home-page .desktop-home-hero-v63,
  body.home-page .hero-trust-wrap,
  body.home-page section,
  body.rates-page section{
    min-width:0!important;
    max-width:100%!important;
  }
  body.home-page .mh63-content,
  body.home-page .hero-content{
    width:100%!important;
    max-width:680px!important;
    padding-left:clamp(20px,6vw,44px)!important;
    padding-right:clamp(20px,6vw,44px)!important;
  }
  body.home-page .mh63-content h1,
  body.home-page .hero-content h1{
    font-size:clamp(38px,8vw,64px)!important;
    line-height:.98!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.home-page .mh63-content p,
  body.home-page .hero-content p{
    max-width:620px!important;
    font-size:clamp(15px,2.3vw,18px)!important;
    line-height:1.55!important;
  }
  body.home-page .mh63-actions,
  body.home-page .hero-actions{
    display:flex!important;
    align-items:stretch!important;
    flex-wrap:wrap!important;
    gap:10px!important;
  }
  body.home-page .mh63-actions .btn,
  body.home-page .hero-actions .btn{
    flex:1 1 180px!important;
    min-width:0!important;
  }

  body.home-page .premium-trust-bar,
  body.home-page .service-grid,
  body.home-page [class*="grid"]{
    min-width:0!important;
  }
}

/* --------------------------------------------------------------------------
   PHONE — compact, aligned and fully readable portal/public/auth layouts
   -------------------------------------------------------------------------- */
@media (max-width:767px){
  :root{--v8728-header-height:68px;--v8728-phone-gutter:12px}

  html,body,body.portal-body,body.public-site,body.rates-page,body.auth-page,
  body.info-page,body.pt-private-page{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }

  /* Public account actions are a separate compact row below the hamburger. */
  body.public-site .v8728-mobile-auth-dock,
  body.rates-page .v8728-mobile-auth-dock{
    right:10px!important;
    width:calc(100vw - 20px)!important;
    grid-template-columns:1fr 1fr!important;
  }
  body.public-site .site-header nav,
  body.rates-page .site-header nav,
  body.public-site.menu-open .site-header nav,
  body.rates-page.menu-open .site-header nav{
    right:10px!important;
    width:calc(100vw - 20px)!important;
    max-width:calc(100vw - 20px)!important;
  }

  body.home-page .mobile-home-hero-v63{
    min-height:0!important;
    padding-top:26px!important;
    padding-bottom:28px!important;
  }
  body.home-page .mh63-content{
    padding:30px 18px 24px!important;
  }
  body.home-page .mh63-content h1{
    font-size:clamp(36px,12vw,52px)!important;
  }
  body.home-page .mh63-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  body.home-page .premium-trust-bar,
  body.home-page .service-grid,
  body.home-page .smart-calculator-grid,
  body.home-page .dimension-group{
    grid-template-columns:1fr!important;
  }
  body.home-page .section-pad,
  body.home-page .utility-shell,
  body.rates-page main,
  body.info-page main{
    padding-left:var(--v8728-phone-gutter)!important;
    padding-right:var(--v8728-phone-gutter)!important;
  }
  body.home-page h2,
  body.rates-page h1,
  body.rates-page h2,
  body.info-page h1,
  body.info-page h2{
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }

  /* Portal frame and top bar. */
  body.portal-body .portal-main,
  body.portal-body .portal-main-v25,
  body.portal-body .admin-main-v29{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:calc(var(--v8693-mobile-header-height,64px) + 12px) var(--v8728-phone-gutter) 22px!important;
    overflow-x:hidden!important;
  }

  body.portal-body .portal-appbar,
  body.portal-body .admin-appbar{
    grid-template-columns:46px minmax(0,1fr) auto!important;
    gap:7px!important;
    padding:7px 8px!important;
  }
  body.portal-body .portal-appbar>span,
  body.portal-body .admin-appbar>span{
    font-size:15px!important;
    line-height:1.15!important;
  }
  body.portal-body .portal-menu-button,
  body.portal-body #admin-sidebar-toggle,
  body.portal-body #portal-sidebar-toggle,
  body.portal-body .premium-bell-button,
  body.portal-body #admin-notification-bell,
  body.portal-body .v8683-help-launch,
  body.portal-body .portal-user-chip,
  body.portal-body #admin-profile-menu-button{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    border-radius:13px!important;
  }
  body.portal-body .portal-appbar-actions,
  body.portal-body .admin-appbar-actions{gap:4px!important}

  body.portal-body .portal-view,
  body.portal-body .panel,
  body.portal-body .admin-table-panel,
  body.portal-body .portal-top,
  body.portal-body .portal-top-v25,
  body.portal-body .admin-filter-bar,
  body.portal-body .table-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  body.portal-body .portal-top,
  body.portal-body .portal-top-v25{
    padding-left:2px!important;
    padding-right:2px!important;
  }
  body.portal-body .portal-top h1,
  body.portal-body .portal-top-v25 h1{
    margin:4px 0 7px!important;
    font-size:clamp(31px,10vw,42px)!important;
    line-height:1.02!important;
    letter-spacing:-.025em!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.portal-body .portal-top p,
  body.portal-body .portal-top-v25 p{
    font-size:13px!important;
    line-height:1.48!important;
  }
  body.portal-body .admin-top-actions,
  body.portal-body .v81-rate-top-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  body.portal-body .admin-top-actions>* ,
  body.portal-body .v81-rate-top-actions>*{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
  }

  /* Package Journey: all five steps remain visible without huge cards. */
  body.portal-body .v8727-flow-card{
    margin:14px 0!important;
    padding:13px!important;
    border-radius:17px!important;
  }
  body.portal-body .v8727-flow-head{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    margin-bottom:11px!important;
  }
  body.portal-body .v8727-flow-head strong{
    font-size:22px!important;
    line-height:1.12!important;
  }
  body.portal-body .v8727-flow-head p{font-size:12px!important;line-height:1.42!important}
  body.portal-body .v8727-live-total{
    width:100%!important;
    min-width:0!important;
    padding:9px 11px!important;
    text-align:left!important;
  }
  body.portal-body .v8727-live-total b{font-size:20px!important}
  body.portal-body .v8727-flow-steps{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  body.portal-body .v8727-flow-step{
    min-width:0!important;
    min-height:84px!important;
    padding:10px!important;
    grid-template-columns:31px minmax(0,1fr)!important;
    gap:8px!important;
    border-radius:14px!important;
  }
  body.portal-body .v8727-flow-step:last-child:nth-child(odd){grid-column:1/-1!important}
  body.portal-body .v8727-step-number{width:30px!important;height:30px!important;font-size:13px!important}
  body.portal-body .v8727-step-copy strong{font-size:12px!important;line-height:1.18!important}
  body.portal-body .v8727-step-copy small{margin-top:4px!important;font-size:10px!important}
  body.portal-body .v8727-step-copy small b{font-size:14px!important}
  body.portal-body .v8727-step-copy em{display:none!important}
  body.portal-body .v8727-step-arrow{display:none!important}

  /* Compact status filters rather than a tall, scattered block. */
  body.portal-body .package-filter-tabs{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    padding:8px!important;
    border-radius:15px!important;
  }
  body.portal-body .package-filter-tabs button{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    padding:8px 7px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    border-radius:10px!important;
    font-size:12px!important;
    line-height:1.15!important;
    text-align:center!important;
    white-space:normal!important;
  }
  body.portal-body .package-filter-tabs button:last-child:nth-child(odd){grid-column:1/-1!important}

  body.portal-body .admin-filter-bar,
  body.portal-body .v8612-command-bar,
  body.portal-body .v8612-finance-filter,
  body.portal-body .report-filter-bar{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:10px!important;
    border-radius:15px!important;
  }
  body.portal-body .admin-filter-bar>*,
  body.portal-body .v8612-command-bar>*,
  body.portal-body .v8612-finance-filter>*,
  body.portal-body .report-filter-bar>*{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:44px!important;
  }

  /* Phone directory tables become concise labelled cards. */
  body.portal-body .admin-table-panel .table-wrap,
  body.portal-body .panel .table-wrap{
    padding:0!important;
    overflow:visible!important;
  }
  body.portal-body table.admin-data-table,
  body.portal-body .admin-table-panel table,
  body.portal-body .v8612-finance-table{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    table-layout:auto!important;
    border:0!important;
  }
  body.portal-body table.admin-data-table thead,
  body.portal-body .admin-table-panel table thead,
  body.portal-body .v8612-finance-table thead{display:none!important}
  body.portal-body table.admin-data-table tbody,
  body.portal-body .admin-table-panel table tbody,
  body.portal-body .v8612-finance-table tbody{
    display:grid!important;
    width:100%!important;
    gap:10px!important;
  }
  body.portal-body table.admin-data-table tbody tr:not(.empty-row),
  body.portal-body .admin-table-panel table tbody tr:not(.empty-row),
  body.portal-body .v8612-finance-table tbody tr:not(.empty-row){
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    overflow:hidden!important;
    border:1px solid var(--v8728-border)!important;
    border-radius:15px!important;
    background:#fff!important;
    box-shadow:0 8px 20px rgba(8,40,79,.055)!important;
  }
  body.portal-body table.admin-data-table tbody td,
  body.portal-body .admin-table-panel table tbody td,
  body.portal-body .v8612-finance-table tbody td{
    display:grid!important;
    grid-template-columns:minmax(92px,34%) minmax(0,1fr)!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:0!important;
    padding:9px 11px!important;
    border:0!important;
    border-bottom:1px solid #e3edf5!important;
    color:#173b64!important;
    font-size:13px!important;
    line-height:1.34!important;
    text-align:left!important;
    white-space:normal!important;
    overflow:visible!important;
  }
  body.portal-body table.admin-data-table tbody td:last-child,
  body.portal-body .admin-table-panel table tbody td:last-child,
  body.portal-body .v8612-finance-table tbody td:last-child{border-bottom:0!important}
  body.portal-body table.admin-data-table tbody td::before,
  body.portal-body .admin-table-panel table tbody td::before,
  body.portal-body .v8612-finance-table tbody td::before{
    content:attr(data-v8728-label)!important;
    display:block!important;
    min-width:0!important;
    color:#647c96!important;
    font-size:10px!important;
    font-weight:950!important;
    line-height:1.25!important;
    letter-spacing:.065em!important;
    text-transform:uppercase!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.portal-body .v8693-mobile-cell-value,
  body.portal-body .v8728-mobile-cell-value{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    gap:3px!important;
    color:#173b64!important;
    text-align:left!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  body.portal-body .v8693-mobile-cell-value>*,
  body.portal-body .v8728-mobile-cell-value>*{
    max-width:100%!important;
    min-width:0!important;
    text-align:left!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  body.portal-body td[data-v8728-label="Action"],
  body.portal-body td[data-v8693-mobile-label="Action"]{
    grid-template-columns:1fr!important;
    background:#f8fbfe!important;
  }
  body.portal-body td[data-v8728-label="Action"]::before,
  body.portal-body td[data-v8693-mobile-label="Action"]::before{display:none!important}
  body.portal-body td[data-v8728-label="Action"] .v8693-mobile-cell-value,
  body.portal-body td[data-v8693-mobile-label="Action"] .v8693-mobile-cell-value,
  body.portal-body td[data-v8728-label="Action"] .v8728-mobile-cell-value{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  body.portal-body td[data-v8728-label="Action"] button,
  body.portal-body td[data-v8728-label="Action"] a,
  body.portal-body td[data-v8693-mobile-label="Action"] button,
  body.portal-body td[data-v8693-mobile-label="Action"] a{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    padding:8px!important;
    text-align:center!important;
  }
  body.portal-body table.admin-data-table tbody tr.empty-row,
  body.portal-body .admin-table-panel table tbody tr.empty-row,
  body.portal-body .v8612-finance-table tbody tr.empty-row{
    display:block!important;
    width:100%!important;
  }
  body.portal-body table.admin-data-table tbody tr.empty-row td,
  body.portal-body .admin-table-panel table tbody tr.empty-row td,
  body.portal-body .v8612-finance-table tbody tr.empty-row td{
    display:block!important;
    width:100%!important;
    padding:17px!important;
  }
  body.portal-body table.admin-data-table tbody tr.empty-row td::before,
  body.portal-body .admin-table-panel table tbody tr.empty-row td::before,
  body.portal-body .v8612-finance-table tbody tr.empty-row td::before{display:none!important}

  /* Store logos and long contact details remain inside their cells. */
  body.portal-body [class*="store-badge"],
  body.portal-body [class*="store-cell"],
  body.portal-body .v8692-store-badge,
  body.portal-body .v8692-store-cell{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    justify-content:flex-start!important;
  }
  body.portal-body [class*="store-badge"] img,
  body.portal-body [class*="store-cell"] img{
    flex:0 0 auto!important;
    object-fit:contain!important;
  }
  body.portal-body a[href^="mailto:"],
  body.portal-body a[href^="tel:"]{
    max-width:100%!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }

  /* Shipment cards use the phone width efficiently instead of stacking every field. */
  body.portal-body [data-portal-view="shipments"] .shipment-card-grid,
  body.portal-body [data-portal-view="shipments"] .shipment-card-grid.v8727-stable-shipment-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    width:100%!important;
    max-width:100%!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:13px!important;
    border-radius:17px!important;
    overflow:hidden!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-card::before{
    margin:-13px -13px 12px!important;
    border-radius:17px 17px 0 0!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-header{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    min-height:0!important;
    margin-bottom:11px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-header>div{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-service-badge{
    min-height:26px!important;
    padding:4px 8px!important;
    font-size:10px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-code-row{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-top:7px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:7px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-code-row h3{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    font-size:clamp(17px,5.3vw,22px)!important;
    line-height:1.15!important;
    letter-spacing:-.01em!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-copy-shipment{
    min-width:58px!important;
    min-height:36px!important;
    padding:7px 8px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8727-shipment-head-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:7px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-header .status-pill{
    width:100%!important;
    min-width:0!important;
    min-height:36px!important;
    padding:7px 10px!important;
    justify-content:flex-start!important;
    border-radius:11px!important;
    font-size:11px!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8727-collapse-shipment{
    min-width:40px!important;
    min-height:36px!important;
    padding:7px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8727-collapse-shipment span{display:none!important}

  body.portal-body [data-portal-view="shipments"] .v8676-shipment-route{
    grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr)!important;
    gap:7px!important;
    min-height:82px!important;
    padding:11px!important;
    border-radius:14px!important;
    text-align:left!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-route>div:last-child{text-align:right!important}
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-route>b{
    width:34px!important;
    height:34px!important;
    transform:none!important;
    font-size:15px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-route span{font-size:9px!important}
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-route strong{
    font-size:12px!important;
    line-height:1.25!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-metrics{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin-bottom:10px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-metrics>div{
    min-height:70px!important;
    padding:10px!important;
    border-radius:12px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-metrics span{margin-bottom:5px!important;font-size:9px!important}
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-metrics strong{
    font-size:12px!important;
    line-height:1.3!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-linked-packages{
    margin-bottom:10px!important;
    border-radius:13px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-linked-packages summary{
    min-height:58px!important;
    padding:9px 10px!important;
    grid-template-columns:minmax(0,1fr) auto 34px!important;
    gap:7px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-linked-packages summary strong{font-size:13px!important}
  body.portal-body [data-portal-view="shipments"] .v8676-linked-total{display:block!important;font-size:10px!important;white-space:nowrap!important}
  body.portal-body [data-portal-view="shipments"] .v8676-linked-package-list{padding:0 8px 8px!important;gap:6px!important}
  body.portal-body [data-portal-view="shipments"] .v8676-linked-package-row{
    grid-template-columns:38px minmax(0,1fr) auto!important;
    gap:8px!important;
    min-height:54px!important;
    padding:7px 8px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-linked-package-row small{
    max-width:100%!important;
    font-size:9px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-linked-package-row strong{
    font-size:11px!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-linked-package-meta{
    grid-column:auto!important;
    font-size:10px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(96px,.55fr)!important;
    gap:7px!important;
    padding-top:10px!important;
  }
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-actions>.btn,
  body.portal-body [data-portal-view="shipments"] .v8676-more-menu,
  body.portal-body [data-portal-view="shipments"] .v8676-more-menu summary{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
  }

  /* Generic content grids and forms. */
  body.portal-body .invoice-summary-grid,
  body.portal-body .v8612-finance-kpis,
  body.portal-body .v81-rate-kpis,
  body.portal-body .dashboard-kpi-grid,
  body.portal-body .admin-kpi-grid,
  body.portal-body [class*="summary-grid"],
  body.portal-body [class*="kpi-grid"]{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  body.portal-body form [class*="grid"],
  body.portal-body [role="dialog"] [class*="grid"],
  body.portal-body dialog [class*="grid"]{
    grid-template-columns:1fr!important;
  }
  body.portal-body input,
  body.portal-body select,
  body.portal-body textarea,
  body.portal-body button{
    max-width:100%!important;
  }

  /* Dialogs use the full phone safely with one scroll area and sticky controls. */
  body.portal-body dialog,
  body.portal-body [role="dialog"],
  body.portal-body #live-admin-dialog,
  body.portal-body .v8648-dialog-shell,
  body.portal-body .v8649-shipment-dialog{
    inset:4px!important;
    width:calc(100vw - 8px)!important;
    max-width:calc(100vw - 8px)!important;
    max-height:calc(100dvh - 8px)!important;
    margin:0!important;
    border-radius:17px!important;
  }
  body.portal-body dialog header,
  body.portal-body [role="dialog"] header{
    min-width:0!important;
  }
  body.portal-body dialog h2,
  body.portal-body [role="dialog"] h2{
    max-width:100%!important;
    font-size:clamp(21px,7vw,29px)!important;
    line-height:1.12!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.portal-body dialog footer,
  body.portal-body [role="dialog"] footer{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    padding:9px!important;
  }
  body.portal-body dialog footer button,
  body.portal-body [role="dialog"] footer button{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    padding:8px!important;
    font-size:12px!important;
    white-space:normal!important;
  }

  /* Guided help does not automatically obstruct phone content. */
  body.portal-body .v8683-help-card{
    display:none!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:none!important;
    max-height:min(42dvh,330px)!important;
    padding:13px!important;
    overflow-y:auto!important;
    border-radius:17px!important;
  }
  body.portal-body.v8728-mobile-guide-open .v8683-help-card:not([hidden]){display:block!important}
  body.portal-body:not(.v8728-mobile-guide-open) .v8683-help-highlight{outline:none!important}
  body.portal-body:not(.v8728-mobile-guide-open) .v8683-help-highlight::after{display:none!important;content:none!important}
  body.portal-body.v8728-mobile-guide-open .v8683-help-highlight{outline:2px solid rgba(237,28,46,.34)!important;outline-offset:2px!important}
  body.portal-body.v8728-mobile-guide-open .v8683-help-highlight::after{font-size:7px!important;padding:3px 6px!important}
  body.portal-body .v8683-help-copy{padding-right:34px!important;gap:4px!important}
  body.portal-body .v8683-help-copy small{font-size:9px!important}
  body.portal-body .v8683-help-copy strong{font-size:17px!important;line-height:1.2!important}
  body.portal-body .v8683-help-copy p{font-size:12px!important;line-height:1.4!important}
  body.portal-body .v8683-help-actions{grid-template-columns:1fr 1fr!important;gap:7px!important;margin-top:9px!important}
  body.portal-body .v8683-help-actions button{min-height:40px!important;padding:7px!important;font-size:12px!important}
  body.portal-body .v8683-help-actions [data-help-never]{grid-column:1/-1!important;min-height:34px!important}

  /* Auth pages: one clean column with readable inputs and no clipped footer. */
  body.auth-page .auth-layout{
    min-height:100dvh!important;
    display:block!important;
  }
  body.auth-page .auth-visual{display:none!important}
  body.auth-page .auth-panel{
    width:100%!important;
    min-height:auto!important;
    padding:18px var(--v8728-phone-gutter) 12px!important;
  }
  body.auth-page .auth-shell{
    width:100%!important;
    max-width:520px!important;
    min-width:0!important;
    margin:0 auto!important;
    padding:18px!important;
    border-radius:20px!important;
  }
  body.auth-page .auth-logo img{max-width:220px!important;max-height:74px!important;object-fit:contain!important}
  body.auth-page .auth-heading h1{font-size:clamp(30px,10vw,42px)!important;line-height:1.05!important}
  body.auth-page .auth-heading p{font-size:14px!important;line-height:1.5!important}
  body.auth-page .auth-form,
  body.auth-page .auth-form label,
  body.auth-page .password-row{width:100%!important;max-width:100%!important;min-width:0!important}
  body.auth-page .password-row{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
  body.auth-page .password-row a{justify-self:end!important;font-size:12px!important}
  body.auth-page input,
  body.auth-page select,
  body.auth-page textarea,
  body.auth-page .btn{width:100%!important;max-width:100%!important;min-width:0!important;min-height:48px!important}
  body.auth-page .auth-mini-footer{
    width:100%!important;
    padding:13px var(--v8728-phone-gutter) calc(13px + env(safe-area-inset-bottom))!important;
    display:grid!important;
    gap:7px!important;
    text-align:center!important;
  }
  body.auth-page .auth-mini-footer>div{display:flex!important;justify-content:center!important;flex-wrap:wrap!important;gap:7px!important}

  /* Legal/information pages stay inside the viewport. */
  body.info-page .info-shell,
  body.info-page .legal-shell,
  body.info-page article,
  body.info-page .content-shell{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  body.info-page h1{font-size:clamp(30px,10vw,42px)!important;line-height:1.05!important}
  body.info-page h2{font-size:clamp(22px,7vw,30px)!important;line-height:1.15!important}
  body.info-page p,
  body.info-page li,
  body.info-page td,
  body.info-page th{font-size:14px!important;line-height:1.6!important;overflow-wrap:anywhere!important}
  body.info-page table{min-width:640px!important}
  body.info-page .table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}

  /* Private Studio: usable phone cards, tabs, forms and dialogs. */
  body.pt-private-page main,
  body.pt-private-page .pt-app,
  body.pt-private-page .pt-view{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  body.pt-private-page main{padding:10px!important}
  body.pt-private-page .pt-auth-layout{
    width:100%!important;
    max-width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  body.pt-private-page .pt-auth-brand{display:none!important}
  body.pt-private-page .pt-auth-card{width:100%!important;max-width:100%!important;padding:18px!important;border-radius:20px!important}
  body.pt-private-page .pt-app-header{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    padding:14px!important;
  }
  body.pt-private-page .pt-header-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
  }
  body.pt-private-page .pt-current-account{grid-column:1/-1!important;overflow-wrap:anywhere!important}
  body.pt-private-page .pt-header-actions button{width:100%!important;min-width:0!important;min-height:42px!important;padding:7px!important;font-size:11px!important;white-space:normal!important}
  body.pt-private-page .pt-kpis{grid-template-columns:1fr 1fr!important;gap:7px!important}
  body.pt-private-page .pt-tabs{
    display:flex!important;
    gap:6px!important;
    padding:8px!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.pt-private-page .pt-tabs button{flex:0 0 auto!important;min-height:40px!important;padding:7px 10px!important;font-size:11px!important}
  body.pt-private-page .pt-view{padding:12px!important}
  body.pt-private-page .pt-section-head h2{font-size:clamp(24px,8vw,34px)!important;line-height:1.1!important;overflow-wrap:normal!important}
  body.pt-private-page .pt-section-actions,
  body.pt-private-page .pt-toolbar,
  body.pt-private-page .pt-address-actions,
  body.pt-private-page .pt-db-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
  }
  body.pt-private-page .pt-section-actions>*,
  body.pt-private-page .pt-toolbar>*,
  body.pt-private-page .pt-address-actions>*,
  body.pt-private-page .pt-db-actions>*{width:100%!important;min-width:0!important;min-height:42px!important}
  body.pt-private-page .pt-grid,
  body.pt-private-page .pt-grid.compact,
  body.pt-private-page .pt-db-grid,
  body.pt-private-page .pt-access-grid,
  body.pt-private-page .pt-password-grid{
    grid-template-columns:1fr!important;
  }
  body.pt-private-page .pt-table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.pt-private-page .pt-table-wrap table{min-width:720px!important}
  body.pt-private-page dialog,
  body.pt-private-page .pt-production-dialog,
  body.pt-private-page .pt-small-dialog{
    inset:4px!important;
    width:calc(100vw - 8px)!important;
    max-width:calc(100vw - 8px)!important;
    max-height:calc(100dvh - 8px)!important;
    margin:0!important;
    border-radius:17px!important;
  }
  body.pt-private-page .pt-dialog-header,
  body.pt-private-page .pt-db-dialog-head{
    gap:8px!important;
    padding:13px!important;
  }
  body.pt-private-page .pt-dialog-header h2,
  body.pt-private-page .pt-db-dialog-head h2{font-size:clamp(20px,7vw,28px)!important;line-height:1.12!important}
  body.pt-private-page .pt-dialog-body,
  body.pt-private-page .pt-db-dialog-body{padding:13px!important}
  body.pt-private-page .pt-dialog-footer,
  body.pt-private-page .pt-db-dialog-foot{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    padding:10px!important;
  }
  body.pt-private-page .pt-dialog-footer button,
  body.pt-private-page .pt-db-dialog-foot button{width:100%!important;min-width:0!important;min-height:42px!important;padding:7px!important;font-size:11px!important;white-space:normal!important}

  /* Prevent accidental character-by-character wrapping anywhere in headings/IDs. */
  body.portal-body h1,body.portal-body h2,body.portal-body h3,
  body.portal-body [class*="code"],body.portal-body [class*="package-id"],
  body.portal-body [class*="shipment-id"]{
    word-break:normal!important;
    hyphens:none!important;
  }
}

@media (max-width:390px){
  body.public-site .v8728-mobile-auth-dock,
  body.rates-page .v8728-mobile-auth-dock{grid-template-columns:1fr!important}
  body.public-site .site-header nav,
  body.rates-page .site-header nav,
  body.public-site.menu-open .site-header nav,
  body.rates-page.menu-open .site-header nav{top:calc(var(--v8728-header-height) + 116px)!important;max-height:calc(100dvh - var(--v8728-header-height) - 136px)!important}

  body.portal-body .v8727-flow-steps{grid-template-columns:1fr!important}
  body.portal-body .v8727-flow-step:last-child:nth-child(odd){grid-column:auto!important}
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-route{grid-template-columns:1fr 34px 1fr!important;padding:9px!important}
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-route strong{font-size:11px!important}
  body.portal-body [data-portal-view="shipments"] .v8676-shipment-metrics{grid-template-columns:1fr 1fr!important}
  body.portal-body table.admin-data-table tbody td,
  body.portal-body .admin-table-panel table tbody td,
  body.portal-body .v8612-finance-table tbody td{grid-template-columns:minmax(82px,32%) minmax(0,1fr)!important;padding:8px 9px!important}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
