
/* Desktop >=1100px intentionally inherits the existing ERP layout unchanged. */
@media screen and (max-width:1099px){
  body{min-width:0!important;}
  .sidebar{width:76px!important;min-width:76px!important;padding-left:0!important;padding-right:0!important;}
  .sidebar .logo-container{padding:14px 8px!important;text-align:center!important;display:block!important;}
  .sidebar .logo-container:before{margin:0 auto 6px!important;}
  .sidebar .logo,.sidebar .proprietor,.sidebar-brand-footer{display:none!important;}
  .nav-menu{overflow-y:auto!important;overflow-x:hidden!important;}
  .nav-item{padding:11px 0!important;justify-content:center!important;gap:0!important;border-left-width:0!important;}
  .nav-item>span:not(.nav-svg){display:none!important;}
  .nav-svg{width:22px!important;height:22px!important;margin:0!important;flex:0 0 22px!important;}
  .main-content{min-width:0!important;width:calc(100vw - 76px)!important;max-width:none!important;}
  .top-company-bar{gap:10px!important;flex-wrap:wrap!important;}
  .top-company-bar>div:last-child,.ud-header-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .modal-content{max-width:calc(100vw - 110px)!important;max-height:92dvh!important;overflow:auto!important;}
  .table-container,.table-responsive,.table-wrap,.ph-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  table{max-width:none;}
}
@media screen and (max-width:699px){
  html,body{width:100%!important;max-width:100%!important;min-width:0!important;}
  body{display:block!important;overflow:hidden!important;}
  .sidebar{position:fixed!important;z-index:2147482000!important;left:0!important;top:0!important;bottom:0!important;width:min(82vw,300px)!important;min-width:0!important;height:100dvh!important;transform:translateX(-105%)!important;transition:transform .22s ease!important;box-shadow:0 18px 45px rgba(15,23,42,.28)!important;padding:16px 0!important;}
  body.erp-mobile-menu-open .sidebar{transform:translateX(0)!important;}
  .sidebar .logo-container{display:grid!important;text-align:left!important;padding:0 18px 16px!important;}
  .sidebar .logo-container:before{margin:0!important;}
  .sidebar .logo,.sidebar .proprietor,.sidebar-brand-footer{display:block!important;}
  .sidebar-brand-footer{margin-top:auto!important;}
  .nav-item{padding:11px 18px!important;justify-content:flex-start!important;gap:11px!important;}
  .nav-item>span:not(.nav-svg){display:inline!important;}
  .nav-svg{width:20px!important;height:20px!important;flex:0 0 20px!important;}
  .main-content{width:100vw!important;max-width:100vw!important;height:100dvh!important;min-width:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding-top:54px!important;}
  #erpMobileMenuBtn{display:flex!important;}
  #erpMobileScrim{display:block!important;pointer-events:none;opacity:0;}
  body.erp-mobile-menu-open #erpMobileScrim{pointer-events:auto;opacity:1;}
  .top-company-bar{margin:8px 10px 10px!important;padding:12px!important;align-items:flex-start!important;flex-direction:column!important;}
  .top-company-bar .company-title-area h2{font-size:1.05rem!important;}
  .top-company-bar .company-title-area p{font-size:.75rem!important;line-height:1.35!important;}
  .top-company-bar>div:last-child{width:100%!important;}
  .top-company-bar>div:last-child .btn,.ud-header-actions .btn{flex:1 1 auto!important;min-height:42px!important;}
  .tab-content{max-width:100%!important;min-width:0!important;}
  .grid,.ud-kpis,.vp-kpis,.kpi-grid{grid-template-columns:1fr!important;}
  .ud-header,.vp-header,.erp-ar-header{flex-wrap:wrap!important;gap:10px!important;}
  .ud-header-actions{width:100%!important;}
  input,select,textarea{max-width:100%!important;}
  .modal{padding:8px!important;align-items:center!important;}
  .modal-content{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:92dvh!important;padding:16px!important;border-radius:12px!important;overflow:auto!important;}
  .modal-content .grid,.modal-content form>.grid{grid-template-columns:1fr!important;}
  .modal-content .btn,form .btn{min-height:42px;}
  .table-container,.table-responsive,.table-wrap,.ph-table-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;}
  .table-container table,.table-responsive table,.table-wrap table,.ph-table-wrap table{min-width:720px!important;width:max-content!important;max-width:none!important;table-layout:auto!important;}
  .table-container table th,.table-container table td,.table-responsive table th,.table-responsive table td,.table-wrap table th,.table-wrap table td,.ph-table-wrap table th,.ph-table-wrap table td{white-space:nowrap!important;}
  .table-container table th:first-child,.table-container table td:first-child,.table-responsive table th:first-child,.table-responsive table td:first-child,.table-wrap table th:first-child,.table-wrap table td:first-child{position:sticky!important;left:0!important;z-index:2;background:inherit;}
  .table-container table thead th:first-child,.table-responsive table thead th:first-child,.table-wrap table thead th:first-child{z-index:4;}
  .btn{touch-action:manipulation;}
}
@media screen and (max-width:420px){
  .main-content{padding-top:52px!important;}
  .modal-content{padding:13px!important;}
  .top-company-bar{margin-left:8px!important;margin-right:8px!important;}
}
#erpMobileMenuBtn{display:none;position:fixed;top:8px;left:10px;z-index:2147482500;width:40px;height:40px;border:0;border-radius:10px;background:#0f172a;color:#fff;align-items:center;justify-content:center;font-size:22px;line-height:1;box-shadow:0 4px 14px rgba(15,23,42,.22);cursor:pointer;}
#erpMobileScrim{display:none;position:fixed;inset:0;z-index:2147481900;background:rgba(15,23,42,.45);transition:opacity .2s ease;}
