/* 手机端二次优化：将尚未适配的业务表自动转为信息卡片。 */
@media(max-width:767px){
  .mobile-summary-card{border-radius:16px!important;padding:14px!important}.mobile-summary-actions .btn{flex:1;min-width:72px}.mobile-summary-meta{gap:6px}.mobile-summary-meta span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #quoteSheetModal .modal,#contractModal .modal,.contract-view-modal{max-height:calc(100dvh - 16px)!important;width:100%!important;border-radius:18px!important}.quote-items-table{min-width:640px}.contract-view-modal{overflow-y:auto!important}
  .production-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.safety-table{min-width:0!important}.safety-table thead{display:none}.safety-table,.safety-table tbody,.safety-table tr,.safety-table td{display:block;width:100%}.safety-table tr{padding:12px;border-bottom:1px solid var(--border-light)}.safety-table td{border:0!important;padding:4px 0!important;white-space:normal!important}.safety-table td:before{content:attr(data-label);display:block;color:var(--text-3);font-size:11px;margin-bottom:2px}
}
/* Mobile regression fixes, October 2026. */
@media(max-width:767px){
  html,body{height:auto;min-height:100%;overflow:auto}
  body.mobile-app-active{height:100dvh;overflow:hidden}
  .cloud-login,.login-page{min-height:100dvh;height:auto;padding:24px 12px 72px}
  .cloud-login-box,.login-box{width:100%;max-width:400px;padding:28px 22px}
  .cloud-input,.login-box input{font-size:16px}
  .app.active{height:var(--mobile-viewport-height,100dvh);min-height:0}
  .main,.content{min-height:0;min-width:0}
  .sidebar{height:var(--mobile-viewport-height,100dvh)}
  .card table.mobile-summary-source{display:none!important}
  .mobile-summary-list{min-width:0;width:100%}
  .mobile-summary-main>div:first-child{min-width:0;overflow-wrap:anywhere}
  .mobile-summary-meta span{white-space:normal!important;overflow-wrap:anywhere}
  .mobile-summary-actions button,.mobile-summary-actions a{min-height:40px!important}
  .mobile-bottom-nav{height:calc(68px + env(safe-area-inset-bottom));grid-auto-flow:column;grid-auto-columns:1fr;grid-template-columns:none}
  .mobile-bottom-nav [hidden]{display:none!important}
  .modal-overlay{height:var(--mobile-viewport-height,100dvh);padding:8px}
  .modal,#quoteSheetModal .modal,#contractModal .modal,.contract-view-modal{max-height:calc(var(--mobile-viewport-height,100dvh) - 16px)!important;min-width:0;overflow-y:auto!important}
  .modal-actions{flex-wrap:wrap;bottom:0;padding-bottom:8px}
  .modal-actions button{min-width:80px}
  input[type=checkbox],input[type=radio]{min-height:0!important;width:18px;height:18px;flex-shrink:0}
  .table-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .table-toolbar input{min-width:0}
  .table-toolbar button{white-space:normal!important;overflow-wrap:anywhere}
}
@media(max-width:767px){
  /* Keep fixed navigation and floating help behind business dialogs. */
  .modal-overlay{z-index:10000!important}
  .toast{z-index:16000!important}
}
