/* Shared mobile and foldable layout fixes. Loaded after each page theme. */
@media (max-width: 1100px) {
  html,body{width:100%;max-width:100%;overflow-x:clip}
  body>.unified-header,.factory-header.unified-header{left:0!important;top:0!important;transform:none!important;width:100%!important;height:78px!important;min-height:78px;padding:0 18px!important;gap:10px!important;display:flex!important;align-items:center!important}
  .unified-header .logo,.unified-header .factory-logo{min-width:0!important;width:auto!important;flex:0 1 auto;gap:8px!important;overflow:hidden}
  .unified-header .logo i,.unified-header .factory-logo i{width:42px!important;height:42px!important;min-width:42px;border-radius:12px 12px 12px 4px!important;font-size:21px!important}
  .unified-header .logo b,.unified-header .factory-logo b{font-size:19px!important;line-height:1.05!important;white-space:nowrap}
  .unified-header .logo small,.unified-header .factory-logo small{margin-top:4px!important;font-size:6px!important;letter-spacing:2.6px!important}
  .unified-header .mobile-nav-toggle{display:flex!important;flex:0 0 38px!important;order:8;width:38px!important;height:36px!important;min-width:38px;margin-left:auto!important;padding:9px 8px!important;border:1px solid #ffffff8c!important;border-radius:11px!important;background:#ffffff1a!important;flex-direction:column;justify-content:space-between}
  .unified-header .mobile-nav-toggle span{display:block!important;width:100%;height:2px;border-radius:2px;background:#fff!important;opacity:1!important}
  .unified-header .language-switcher{order:9;flex:0 0 auto;margin-left:0!important}
  .unified-header .language-current{min-width:82px!important;width:82px;height:36px!important;padding:0 7px!important;gap:5px}
  .unified-header nav{position:absolute!important;left:12px!important;right:12px!important;top:72px!important;width:auto!important;height:auto!important;max-height:calc(100vh - 90px);overflow-y:auto;padding:8px!important;gap:2px!important;z-index:100!important;flex-direction:column!important;border:1px solid #ffffff42!important;border-radius:14px!important;background:#1634a9f7!important;box-shadow:0 18px 45px #0c185257!important;backdrop-filter:blur(16px)}
  .unified-header nav a{min-height:42px;padding:11px 13px!important;color:#fff!important;opacity:1!important;border-radius:9px}
  .unified-header nav a.active{background:#ffffff29!important;color:#fff!important}.unified-header nav a.active:after{display:none!important}
  .partner-page .unified-header .mobile-nav-toggle{border-color:#314c9b55!important;background:#fff8!important}
  .partner-page .unified-header .mobile-nav-toggle span{background:#263f8e!important}
  .partner-page .unified-header .language-current{border-color:#314c9b55!important;color:#243b78!important;background:#fff9!important}
  .hero{height:auto!important;min-height:0;padding-bottom:54px;border-radius:0 0 38px 38px!important}
  .hero .hero-wrap{width:calc(100% - 36px)!important;height:auto!important;min-height:0;padding-top:112px!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:38px}
  .hero .hero-copy{width:100%!important;max-width:650px}.hero .hero-copy h1{font-size:clamp(40px,7vw,54px)!important;line-height:1.16!important}
  .hero .hero-ui{width:100%!important;max-width:700px;height:380px!important;margin:0 auto!important}.hero .dashboard{position:absolute;inset:0 0 auto 0!important;width:100%!important;transform:none!important}
  .hero .float-card{left:8px!important}.hero .toast{right:8px!important}
  .factory-wrap{width:calc(100% - 36px)!important}.hero-grid,.partner-hero-grid{width:calc(100% - 36px)!important;grid-template-columns:minmax(0,1fr)!important;gap:42px!important;padding-top:110px!important}
  .factory-dashboard,.partner-console{width:100%!important;max-width:760px;margin:0 auto!important;transform:none!important}.dispatch-card{right:8px!important}
}
@media (max-width:520px){
  body>.unified-header,.factory-header.unified-header{height:70px!important;min-height:70px;padding:0 14px!important;gap:7px!important}
  .unified-header .logo i,.unified-header .factory-logo i{width:38px!important;height:38px!important;min-width:38px;font-size:19px!important}.unified-header .logo b,.unified-header .factory-logo b{font-size:17px!important}
  .unified-header .mobile-nav-toggle{flex-basis:36px!important;width:36px!important;min-width:36px;height:34px!important}.unified-header .language-current{min-width:70px!important;width:70px;height:34px!important;font-size:12px!important}.unified-header .language-flag{font-size:13px!important}.unified-header nav{top:66px!important;left:10px!important;right:10px!important}
  .hero{padding-bottom:38px}.hero .hero-wrap{width:calc(100% - 28px)!important;padding-top:94px!important;gap:30px}.hero .tabs{width:100%!important;height:42px!important;margin-bottom:26px!important}.hero .tabs button{font-size:14px!important;padding:0 6px}.hero .hero-copy h1{font-size:clamp(34px,10.5vw,43px)!important;letter-spacing:-1px}.hero .hero-copy>p{margin:24px 0!important;font-size:15px!important;line-height:1.8}.hero .buttons{gap:10px!important}.hero .buttons a{width:auto!important;min-width:0!important;flex:1;height:50px!important;padding:0 10px;font-size:15px!important}.hero .hero-ui{height:315px!important}.hero .dashboard{height:280px!important}.hero .float-card{width:145px!important;padding:12px!important}.hero .float-card b{font-size:20px!important}.hero .toast{max-width:178px;padding:11px!important}
  .factory-wrap{width:calc(100% - 28px)!important}.hero-grid,.partner-hero-grid{width:calc(100% - 28px)!important;padding-top:96px!important}.hero-copy h1,.partner-hero-copy h1{font-size:36px!important}
}
@media (max-width:370px){.unified-header .logo b,.unified-header .factory-logo b{font-size:15px!important}.unified-header .language-current{width:62px;min-width:62px!important}.unified-header .language-current>span:nth-child(2){display:none}}
